MCPcopy
hub / github.com/triggerdotdev/trigger.dev / getAllPayloads

Function getAllPayloads

integrations/airtable/src/webhooks.ts:398–420  ·  view source on GitHub ↗
(
  baseId: string,
  webhookId: string,
  sdk: AirtableSDK,
  cursor: number | undefined
)

Source from the content-addressed store, hash-verified

396});
397
398async function getAllPayloads(
399 baseId: string,
400 webhookId: string,
401 sdk: AirtableSDK,
402 cursor: number | undefined
403) {
404 let response: ListWebhooksResponse | undefined = undefined;
405 let hasMore = true;
406
407 while (hasMore) {
408 const newResponse = await getPayload(baseId, webhookId, sdk, cursor);
409 cursor = newResponse.cursor;
410 hasMore = newResponse.mightHaveMore;
411
412 if (response) {
413 response.payloads.push(...newResponse.payloads);
414 } else {
415 response = newResponse;
416 }
417 }
418
419 return response;
420}
421
422async function getPayload(
423 baseId: string,

Callers 1

createWebhookSourceFunction · 0.85

Calls 1

getPayloadFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…