From fc7566da2a40670bc18b6afc1d62c4f42c2efa25 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 3 Jan 2022 13:12:18 +0200 Subject: [PATCH] fix: correct type for webhook event type (#221) --- CHANGELOG.md | 6 +++++- package.json | 2 +- src/resource_clients/webhook.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46f73f25..9eed5665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -2.0.4/ 2021/12/XX +2.0.5 / 2022/01/03 +=================== +- For TypeScript users, the `WebhookEventType` type was corrected to represent its correct value. + +2.0.4 / 2021/12/XX =================== - Fix: Unnamed storages can now be created again. diff --git a/package.json b/package.json index 11b3e61c..1b43ef39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apify-client", - "version": "2.0.4", + "version": "2.0.5", "description": "Apify API client for JavaScript", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/resource_clients/webhook.ts b/src/resource_clients/webhook.ts index b0205bcb..00ff5856 100644 --- a/src/resource_clients/webhook.ts +++ b/src/resource_clients/webhook.ts @@ -114,7 +114,7 @@ export interface WebhookStats { totalDispatches: number; } -export type WebhookEventType = keyof typeof WEBHOOK_EVENT_TYPES; +export type WebhookEventType = typeof WEBHOOK_EVENT_TYPES[keyof typeof WEBHOOK_EVENT_TYPES]; export type WebhookCondition = WebhookAnyRunOfActorCondition | WebhookAnyRunOfActorTaskCondition | WebhookCertainRunCondition;