Skip to content

Commit 44ced4d

Browse files
authored
feat: add new webhook fields (#426)
closes apify/apify-core#12283
1 parent 12b15fa commit 44ced4d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/resource_clients/webhook.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ export interface Webhook {
9292
lastDispatch: string;
9393
stats: WebhookStats;
9494
shouldInterpolateStrings: boolean;
95+
headersTemplate?: string;
96+
description?: string;
9597
}
9698

9799
export interface WebhookIdempotencyKey {
@@ -109,6 +111,8 @@ export type WebhookUpdateData = Partial<
109111
| 'requestUrl'
110112
| 'payloadTemplate'
111113
| 'shouldInterpolateStrings'
114+
| 'headersTemplate'
115+
| 'description'
112116
>
113117
> & WebhookIdempotencyKey;
114118

src/resource_clients/webhook_collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class WebhookCollectionClient extends ResourceCollectionClient {
1818
/**
1919
* https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/get-list-of-webhooks
2020
*/
21-
async list(options: WebhookCollectionListOptions = {}): Promise<PaginatedList<Omit<Webhook, 'payloadTemplate'>>> {
21+
async list(options: WebhookCollectionListOptions = {}): Promise<PaginatedList<Omit<Webhook, 'payloadTemplate' | 'headersTemplate'>>> {
2222
ow(options, ow.object.exactShape({
2323
limit: ow.optional.number,
2424
offset: ow.optional.number,

0 commit comments

Comments
 (0)