Skip to content

Commit

Permalink
feat: add new webhook fields (#426)
Browse files Browse the repository at this point in the history
closes apify/apify-core#12283
  • Loading branch information
superman030129-p committed Oct 3, 2023
1 parent a94554f commit 13bfe82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/resource_clients/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export interface Webhook {
lastDispatch: string;
stats: WebhookStats;
shouldInterpolateStrings: boolean;
headersTemplate?: string;
description?: string;
}

export interface WebhookIdempotencyKey {
Expand All @@ -109,6 +111,8 @@ export type WebhookUpdateData = Partial<
| 'requestUrl'
| 'payloadTemplate'
| 'shouldInterpolateStrings'
| 'headersTemplate'
| 'description'
>
> & WebhookIdempotencyKey;

Expand Down
2 changes: 1 addition & 1 deletion src/resource_clients/webhook_collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class WebhookCollectionClient extends ResourceCollectionClient {
/**
* https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/get-list-of-webhooks
*/
async list(options: WebhookCollectionListOptions = {}): Promise<PaginatedList<Omit<Webhook, 'payloadTemplate'>>> {
async list(options: WebhookCollectionListOptions = {}): Promise<PaginatedList<Omit<Webhook, 'payloadTemplate' | 'headersTemplate'>>> {
ow(options, ow.object.exactShape({
limit: ow.optional.number,
offset: ow.optional.number,
Expand Down

0 comments on commit 13bfe82

Please sign in to comment.