MCPcopy Index your code
hub / github.com/simstudioai/sim / handleListRecipients

Function handleListRecipients

apps/sim/app/api/tools/docusign/route.ts:617–645  ·  view source on GitHub ↗
(
  apiBase: string,
  headers: Record<string, string>,
  params: Record<string, unknown>,
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

615}
616
617async function handleListRecipients(
618 apiBase: string,
619 headers: Record<string, string>,
620 params: Record<string, unknown>,
621 signal?: AbortSignal
622) {
623 const { envelopeId } = params
624 if (!envelopeId) {
625 return NextResponse.json({ success: false, error: 'envelopeId is required' }, { status: 400 })
626 }
627
628 const response = await fetchDocusign(
629 `${apiBase}/envelopes/${(envelopeId as string).trim()}/recipients`,
630 {
631 headers,
632 },
633 signal
634 )
635 const data = await readDocusignJson(response, 'DocuSign recipients response')
636
637 if (!response.ok) {
638 return NextResponse.json(
639 { success: false, error: docusignError(data, 'Failed to list recipients') },
640 { status: response.status }
641 )
642 }
643
644 return NextResponse.json(data)
645}

Callers 1

route.tsFile · 0.85

Calls 3

fetchDocusignFunction · 0.85
readDocusignJsonFunction · 0.85
docusignErrorFunction · 0.85

Tested by

no test coverage detected