( baseId: string, webhookId: string, sdk: AirtableSDK, cursor: number | undefined )
| 396 | }); |
| 397 | |
| 398 | async 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 | |
| 422 | async function getPayload( |
| 423 | baseId: string, |
no test coverage detected
searching dependent graphs…