@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -1,365 +1,364 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @typedef Event
|
|
5
|
-
* @property {string} [event_name]
|
|
6
|
-
* @property {string} [event_type]
|
|
7
|
-
* @property {string} [event_category]
|
|
8
|
-
* @property {string} [version]
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @typedef EventProcessRequest
|
|
13
|
-
* @property {string} [search_text]
|
|
14
|
-
* @property {string} end_date
|
|
15
|
-
* @property {string} start_date
|
|
16
|
-
* @property {number[]} [subscriber_ids]
|
|
17
|
-
* @property {string} [status]
|
|
18
|
-
* @property {Event[]} [event]
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @typedef DownloadReportResponse
|
|
23
|
-
* @property {string} [file_name]
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @typedef EventProcessReports
|
|
28
|
-
* @property {EventProcessReportObject[]} [rows]
|
|
29
|
-
* @property {Page} [page]
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @typedef EventProcessReportObject
|
|
34
|
-
* @property {string} [event_name] - The name of the processed event.
|
|
35
|
-
* @property {number} [response_code] - The response code of the event.
|
|
36
|
-
* @property {string} [response_message] - The response message of the event.
|
|
37
|
-
* @property {string} [data] - The data associated with the event.
|
|
38
|
-
* @property {number} [attempt] - The attempt number of the event.
|
|
39
|
-
* @property {number} [last_attempted_on] - The timestamp of the last attempted event.
|
|
40
|
-
* @property {string} [status] - The status of the event (e.g., "FAILED").
|
|
41
|
-
* @property {string} [name] - The name of the event.
|
|
42
|
-
* @property {string} [webhook_url] - The webhook URL associated with the event.
|
|
43
|
-
* @property {number} [response_time] - The response time of the event.
|
|
44
|
-
* @property {string} [message_id]
|
|
45
|
-
* @property {string} [event_trace_id]
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
3
|
/**
|
|
49
4
|
* @typedef Page
|
|
50
|
-
* @property {number} [item_total] - The total number of items
|
|
5
|
+
* @property {number} [item_total] - The total number of all items across all pages.
|
|
51
6
|
* @property {string} [next_id] - The identifier for the next page.
|
|
52
7
|
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
53
8
|
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
54
9
|
* @property {number} [current] - The current page number.
|
|
55
|
-
* @property {string} type - The type of the page,
|
|
10
|
+
* @property {string} type - The type of the page, can be 'cursor' or 'number'.
|
|
56
11
|
* @property {number} [size] - The number of items per page.
|
|
12
|
+
* @property {number} [page_size] - The number of items per page.
|
|
57
13
|
*/
|
|
58
14
|
|
|
59
15
|
/**
|
|
60
|
-
* @typedef
|
|
61
|
-
* @property {string}
|
|
62
|
-
* @property {
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* @
|
|
69
|
-
*
|
|
70
|
-
* @property {string} [message] - An optional message related to the ping.
|
|
71
|
-
* @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
|
|
16
|
+
* @typedef BroadcasterConfig
|
|
17
|
+
* @property {string} [topic] - The name of the topic for the broadcaster configuration.
|
|
18
|
+
* @property {string} [queue] - The name of the queue for the broadcaster configuration.
|
|
19
|
+
* @property {string} [event_bridge_name] - The name of the event bridge
|
|
20
|
+
* associated with the broadcaster.
|
|
21
|
+
* @property {string} [workflow_name] - The name of the workflow related to the
|
|
22
|
+
* broadcaster.
|
|
23
|
+
* @property {string} [account_id] - The account ID associated with the broadcaster.
|
|
24
|
+
* @property {string} [detail_type] - The type of detail for the broadcaster
|
|
25
|
+
* configuration.
|
|
72
26
|
*/
|
|
73
27
|
|
|
74
28
|
/**
|
|
75
29
|
* @typedef SubscriberEventMapping
|
|
76
|
-
* @property {number} [id]
|
|
77
|
-
* @property {number} [event_id]
|
|
78
|
-
* @property {number} [subscriber_id]
|
|
79
|
-
* @property {
|
|
80
|
-
* @property {
|
|
30
|
+
* @property {number} [id] - The unique identifier for the subscriber event mapping.
|
|
31
|
+
* @property {number} [event_id] - The ID of the event associated with the subscriber.
|
|
32
|
+
* @property {number} [subscriber_id] - The ID of the subscriber.
|
|
33
|
+
* @property {FilterSchema} [filters]
|
|
34
|
+
* @property {Object} [reducer] - The reducer property allows users to customize
|
|
35
|
+
* the JSON structure of the webhook payload using JSONPath queries. They can
|
|
36
|
+
* also create new properties by mapping existing ones. Note that it overrides
|
|
37
|
+
* the entire JSON structure of the webhook payload sent via the webhook. See
|
|
38
|
+
* the partner documentation's filter and reducer section for details.
|
|
39
|
+
* @property {BroadcasterConfig} [broadcaster_config]
|
|
40
|
+
* @property {string} [created_on] - The date and time when the subscriber event
|
|
41
|
+
* mapping was created.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @typedef FilterSchema
|
|
46
|
+
* @property {string} [query] - JSONPath expression that specifies the property
|
|
47
|
+
* in the webhook payload to filter on. This enables targeting specific data
|
|
48
|
+
* within the payload.
|
|
49
|
+
* @property {string} [condition] - JavaScript function used to evaluate the
|
|
50
|
+
* specified property in the webhook payload against a condition. This
|
|
51
|
+
* function determines whether the filter passes based on its return value.
|
|
52
|
+
* @property {string} [logic] - Logical operator used to combine multiple
|
|
53
|
+
* conditions in the `conditions` array. Supported values are `AND` and `OR`.
|
|
54
|
+
* @property {Object[]} [conditions] - An array of filter objects to be
|
|
55
|
+
* evaluated using the specified logical operator. This array will contain
|
|
56
|
+
* more filters including a combination of single condition mode and logical
|
|
57
|
+
* group mode filters.
|
|
81
58
|
*/
|
|
82
59
|
|
|
83
60
|
/**
|
|
84
61
|
* @typedef EventConfig
|
|
85
|
-
* @property {number} [id]
|
|
86
|
-
* @property {string} [
|
|
87
|
-
* @property {string} [
|
|
88
|
-
* @property {string} [
|
|
62
|
+
* @property {number} [id] - The unique identifier for the event configuration.
|
|
63
|
+
* @property {string} [type] - The type of event configuration, which may be null.
|
|
64
|
+
* @property {string} [event_name] - The name of the event.
|
|
65
|
+
* @property {string} [event_type] - The type of the event.
|
|
66
|
+
* @property {string} [event_category] - The category of the event.
|
|
67
|
+
* @property {string} [modified_by] - The identifier of the user who last
|
|
68
|
+
* modified the event configuration.
|
|
89
69
|
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
90
|
-
* @property {Object} [event_schema]
|
|
91
|
-
*
|
|
92
|
-
* @property {string} [
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* @property {string} [
|
|
96
|
-
*
|
|
70
|
+
* @property {Object} [event_schema] - The schema for the event, allowing for
|
|
71
|
+
* additional properties and may be null.
|
|
72
|
+
* @property {string} [sunset_date] - The date and time after which the event is
|
|
73
|
+
* considered sunset. After this timestamp, the entity should no longer be
|
|
74
|
+
* actively used, referenced, or offered for new operations, even if it still exists.
|
|
75
|
+
* @property {string} [announcement_date] - The date and time when the
|
|
76
|
+
* deprecation of the event is officially announced. This marks the start of
|
|
77
|
+
* the deprecation notice period and indicates that the entity is planned to
|
|
78
|
+
* be retired in the future, but may still remain available until the sunset date.
|
|
79
|
+
* @property {string} [support_end_date] - The date and time after which
|
|
80
|
+
* official support for the event ends. Beyond this point, no guarantees are
|
|
81
|
+
* made for maintenance, updates, fixes, or issue resolution.
|
|
82
|
+
* @property {string} [group] - The group associated with the event
|
|
83
|
+
* configuration, which may be null.
|
|
84
|
+
* @property {string} [version] - The version of the event configuration.
|
|
85
|
+
* @property {string} [display_name] - The display name of the event configuration.
|
|
86
|
+
* @property {string} [description] - A description of the event configuration,
|
|
87
|
+
* which may be null.
|
|
88
|
+
* @property {string} [created_on] - The date and time when the event
|
|
89
|
+
* configuration was created.
|
|
90
|
+
* @property {string} [updated_on] - The date and time when the event
|
|
91
|
+
* configuration was last updated.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @typedef EventConfigResult
|
|
96
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
97
97
|
*/
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* @typedef
|
|
101
|
-
* @property {
|
|
100
|
+
* @typedef Association
|
|
101
|
+
* @property {string[]} [application_id] - A list of application IDs associated
|
|
102
|
+
* with the association.
|
|
103
|
+
* @property {string} [extension_id] - The extension ID associated with the association.
|
|
104
|
+
* @property {string} [criteria] - The criteria for the association, such as
|
|
105
|
+
* "ALL", "EMPTY", or "SPECIFIC-EVENTS".
|
|
102
106
|
*/
|
|
103
107
|
|
|
104
108
|
/**
|
|
105
|
-
* @typedef
|
|
106
|
-
* @property {number[]
|
|
107
|
-
*
|
|
109
|
+
* @typedef AssociationResp
|
|
110
|
+
* @property {number} [company_id] - The ID of the company associated with the response.
|
|
111
|
+
* @property {string[]} [application_id] - A list of application IDs associated
|
|
112
|
+
* with the response.
|
|
113
|
+
* @property {string} [extension_id] - The extension ID associated with the response.
|
|
114
|
+
* @property {string} [criteria] - The criteria for the response, such as "ALL",
|
|
115
|
+
* "EMPTY", or "SPECIFIC-EVENTS".
|
|
108
116
|
*/
|
|
109
117
|
|
|
110
118
|
/**
|
|
111
|
-
* @typedef
|
|
112
|
-
* @property {string} [
|
|
113
|
-
* @property {
|
|
119
|
+
* @typedef AuthMeta
|
|
120
|
+
* @property {string} [type] - The type of authentication method used.
|
|
121
|
+
* @property {string} [secret] - The secret key or token used for authentication.
|
|
114
122
|
*/
|
|
115
123
|
|
|
116
124
|
/**
|
|
117
|
-
* @typedef
|
|
118
|
-
* @property {
|
|
119
|
-
* @property {
|
|
120
|
-
*
|
|
125
|
+
* @typedef SubscriberDetails
|
|
126
|
+
* @property {number} [id] - The unique identifier of the subscriber.
|
|
127
|
+
* @property {string} [modified_by] - The identifier of the user who last
|
|
128
|
+
* modified the subscriber details.
|
|
129
|
+
* @property {string} [name] - The name of the subscriber.
|
|
130
|
+
* @property {string} [provider] - The provider of the subscriber.
|
|
131
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
132
|
+
* @property {string} [source] - Source that subscriber belongs to.
|
|
133
|
+
* @property {AssociationResp} [association]
|
|
134
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
135
|
+
* @property {SubscriberStatus} [status]
|
|
136
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
137
|
+
* @property {string} [updated_on] - The date and time when the subscriber
|
|
138
|
+
* details were last updated.
|
|
139
|
+
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
140
|
+
* @property {string} [type] - The type of subscriber, which can either be passed as null.
|
|
141
|
+
* @property {AuthMeta} [auth_meta]
|
|
142
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
121
143
|
*/
|
|
122
144
|
|
|
123
145
|
/**
|
|
124
|
-
* @typedef
|
|
125
|
-
* @property {string
|
|
126
|
-
* @property {string} [
|
|
127
|
-
* @property {string} [
|
|
128
|
-
*
|
|
129
|
-
* @property {string} [
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
146
|
+
* @typedef Events
|
|
147
|
+
* @property {string} [slug] - The slug or identifier for the event.
|
|
148
|
+
* @property {string} [topic] - The topic associated with the event.
|
|
149
|
+
* @property {string} [queue] - The queue associated with the event in case of
|
|
150
|
+
* provider as Pub/Sub.
|
|
151
|
+
* @property {string} [event_bridge_name] - The name of the event bridge
|
|
152
|
+
* associated with the event in case of provider as AWS event bridge.
|
|
153
|
+
* @property {string} [workflow_name] - The name of the workflow related to the
|
|
154
|
+
* event in case of provider as temporal.
|
|
155
|
+
* @property {string} [detail_type] - The type of detail for the event.
|
|
134
156
|
*/
|
|
135
157
|
|
|
136
158
|
/**
|
|
137
|
-
* @typedef
|
|
138
|
-
* @property {string}
|
|
139
|
-
* @property {string} [
|
|
159
|
+
* @typedef SubscriberConfigPostRequestV2
|
|
160
|
+
* @property {string} name - The name of the subscriber.
|
|
161
|
+
* @property {string} [type] - The type of the subscriber, which may be null.
|
|
162
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
163
|
+
* @property {string} provider - The provider of the subscriber.
|
|
164
|
+
* @property {Association} association
|
|
165
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
166
|
+
* @property {SubscriberStatus} status
|
|
167
|
+
* @property {string} email_id - The email ID associated with the subscriber.
|
|
168
|
+
* @property {AuthMeta} [auth_meta]
|
|
169
|
+
* @property {Events[]} events - The list of events associated with the subscriber.
|
|
140
170
|
*/
|
|
141
171
|
|
|
142
172
|
/**
|
|
143
|
-
* @typedef
|
|
144
|
-
* @property {
|
|
173
|
+
* @typedef SubscriberConfigUpdateRequestV2
|
|
174
|
+
* @property {number} id - The unique identifier of the subscriber to be updated.
|
|
175
|
+
* @property {string} [name] - The name of the subscriber.
|
|
176
|
+
* @property {string} [type] - The type of the subscriber, which may be null.
|
|
177
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
178
|
+
* @property {string} provider - The provider of the subscriber.
|
|
179
|
+
* @property {Association} [association]
|
|
180
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
181
|
+
* @property {SubscriberStatus} status
|
|
182
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
183
|
+
* @property {AuthMeta} [auth_meta]
|
|
184
|
+
* @property {Events[]} [events] - The list of events associated with the subscriber.
|
|
145
185
|
*/
|
|
146
186
|
|
|
147
187
|
/**
|
|
148
|
-
* @typedef
|
|
149
|
-
* @property {
|
|
188
|
+
* @typedef SubscriberConfigPost
|
|
189
|
+
* @property {string} name - The name of the subscriber.
|
|
190
|
+
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
191
|
+
* @property {string} webhook_url - The URL for the subscriber's webhook.
|
|
192
|
+
* @property {Association} association
|
|
193
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
194
|
+
* @property {SubscriberStatus} status
|
|
195
|
+
* @property {string} email_id - The email ID associated with the subscriber.
|
|
196
|
+
* @property {AuthMeta} [auth_meta]
|
|
197
|
+
* @property {number[]} event_id - The list of event IDs associated with the subscriber.
|
|
150
198
|
*/
|
|
151
199
|
|
|
152
200
|
/**
|
|
153
|
-
* @typedef
|
|
154
|
-
* @property {number}
|
|
155
|
-
* @property {
|
|
201
|
+
* @typedef SubscriberConfigUpdate
|
|
202
|
+
* @property {number} id - The unique identifier of the subscriber to be updated.
|
|
203
|
+
* @property {string} [name] - The name of the subscriber.
|
|
204
|
+
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
205
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
206
|
+
* @property {Association} [association]
|
|
207
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
208
|
+
* @property {SubscriberStatus} [status]
|
|
209
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
210
|
+
* @property {AuthMeta} [auth_meta]
|
|
211
|
+
* @property {number[]} event_id - The list of event IDs associated with the subscriber.
|
|
156
212
|
*/
|
|
157
213
|
|
|
158
214
|
/**
|
|
159
|
-
* @typedef
|
|
160
|
-
* @property {number} [id] - The
|
|
161
|
-
* @property {
|
|
162
|
-
*
|
|
163
|
-
* @property {string} [
|
|
164
|
-
* @property {string} [
|
|
165
|
-
* @property {
|
|
166
|
-
* @property {
|
|
167
|
-
*
|
|
168
|
-
* @property {
|
|
169
|
-
*
|
|
170
|
-
* @property {string} [
|
|
215
|
+
* @typedef SubscriberConfigResult
|
|
216
|
+
* @property {number} [id] - The unique identifier of the subscriber configuration.
|
|
217
|
+
* @property {string} [modified_by] - The identifier of the user who last
|
|
218
|
+
* modified the subscriber configuration.
|
|
219
|
+
* @property {string} [name] - The name of the subscriber.
|
|
220
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
221
|
+
* @property {string} [provider] - The provider of the subscriber.
|
|
222
|
+
* @property {AssociationResp} [association]
|
|
223
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
224
|
+
* @property {SubscriberStatus} [status]
|
|
225
|
+
* @property {string} [source] - Source that subscriber belongs to.
|
|
226
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
227
|
+
* @property {string} [updated_on] - The date and time when the subscriber was
|
|
228
|
+
* last updated.
|
|
229
|
+
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
230
|
+
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
231
|
+
* @property {AuthMeta} [auth_meta]
|
|
232
|
+
* @property {number[]} [event_id] - The list of event IDs associated with the subscriber.
|
|
171
233
|
*/
|
|
172
234
|
|
|
173
235
|
/**
|
|
174
|
-
* @typedef
|
|
175
|
-
* @property {
|
|
236
|
+
* @typedef SubscriberConfigList
|
|
237
|
+
* @property {SubscriberDetails[]} [items] - List of subscriber details.
|
|
176
238
|
* @property {Page} [page]
|
|
177
239
|
*/
|
|
178
240
|
|
|
179
241
|
/**
|
|
180
|
-
* @typedef
|
|
181
|
-
* @property {string}
|
|
242
|
+
* @typedef RestEventData
|
|
243
|
+
* @property {string} event_category - The category of the event.
|
|
244
|
+
* @property {string} event_name - The name of the event.
|
|
245
|
+
* @property {string} event_type - The type of the event.
|
|
246
|
+
* @property {number} version - The version number of the event.
|
|
182
247
|
*/
|
|
183
248
|
|
|
184
249
|
/**
|
|
185
|
-
* @typedef
|
|
186
|
-
* @property {string
|
|
187
|
-
* @property {string}
|
|
188
|
-
* @property {
|
|
250
|
+
* @typedef RestConfig
|
|
251
|
+
* @property {string} webhook_url - The URL for the webhook.
|
|
252
|
+
* @property {string} type - The type of the configuration.
|
|
253
|
+
* @property {Object} [custom_headers] - Custom headers for the configuration.
|
|
254
|
+
* @property {AuthMeta} [auth_meta]
|
|
255
|
+
* @property {RestEventData[]} events - List of event data for configuration.
|
|
189
256
|
*/
|
|
190
257
|
|
|
191
258
|
/**
|
|
192
|
-
* @typedef
|
|
193
|
-
* @property {
|
|
194
|
-
* @property {string
|
|
195
|
-
* @property {string}
|
|
196
|
-
* @property {
|
|
259
|
+
* @typedef QueueEventData
|
|
260
|
+
* @property {string} event_category - The category of the event.
|
|
261
|
+
* @property {string} event_name - The name of the event.
|
|
262
|
+
* @property {string} event_type - The type of the event.
|
|
263
|
+
* @property {number} version - The version number of the event.
|
|
264
|
+
* @property {string} topic - The topic associated with the event.
|
|
197
265
|
*/
|
|
198
266
|
|
|
199
267
|
/**
|
|
200
|
-
* @typedef
|
|
201
|
-
* @property {string} [type]
|
|
202
|
-
* @property {
|
|
268
|
+
* @typedef KafkaConfig
|
|
269
|
+
* @property {string} [type] - Type of Kafka configuration (optional).
|
|
270
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
203
271
|
*/
|
|
204
272
|
|
|
205
273
|
/**
|
|
206
|
-
* @typedef
|
|
207
|
-
* @property {
|
|
208
|
-
* @property {
|
|
209
|
-
* @property {string} [name]
|
|
210
|
-
* @property {string} [provider]
|
|
211
|
-
* @property {string} [webhook_url]
|
|
212
|
-
* @property {AssociationResp} [association]
|
|
213
|
-
* @property {Object} [custom_headers]
|
|
214
|
-
* @property {SubscriberStatus} [status]
|
|
215
|
-
* @property {string} [email_id]
|
|
216
|
-
* @property {string} [updated_on]
|
|
217
|
-
* @property {string} [created_on]
|
|
218
|
-
* @property {string} [type]
|
|
219
|
-
* @property {AuthMeta} [auth_meta]
|
|
220
|
-
* @property {EventConfig[]} [event_configs]
|
|
274
|
+
* @typedef PubSubConfig
|
|
275
|
+
* @property {string} [type] - Type of Pub/Sub configuration (optional).
|
|
276
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
221
277
|
*/
|
|
222
278
|
|
|
223
279
|
/**
|
|
224
|
-
* @typedef
|
|
225
|
-
* @property {string}
|
|
226
|
-
* @property {string}
|
|
280
|
+
* @typedef TemporalEventData
|
|
281
|
+
* @property {string} event_category - The category of the event.
|
|
282
|
+
* @property {string} event_name - The name of the event.
|
|
283
|
+
* @property {string} event_type - The type of the event.
|
|
284
|
+
* @property {number} version - The version number of the event.
|
|
285
|
+
* @property {string} [queue] - The queue associated with the event.
|
|
286
|
+
* @property {string} [workflow_name] - The workflow name related to the event.
|
|
227
287
|
*/
|
|
228
288
|
|
|
229
289
|
/**
|
|
230
|
-
* @typedef
|
|
231
|
-
* @property {string}
|
|
232
|
-
* @property {
|
|
233
|
-
* @property {string} provider
|
|
234
|
-
* @property {Association} association
|
|
235
|
-
* @property {Object} [custom_headers]
|
|
236
|
-
* @property {SubscriberStatus} status
|
|
237
|
-
* @property {string} email_id
|
|
238
|
-
* @property {AuthMeta} [auth_meta]
|
|
239
|
-
* @property {Events[]} events
|
|
290
|
+
* @typedef TemporalConfig
|
|
291
|
+
* @property {string} [type] - Type of Temporal configuration (optional).
|
|
292
|
+
* @property {TemporalEventData[]} events - List of event data for configuration.
|
|
240
293
|
*/
|
|
241
294
|
|
|
242
295
|
/**
|
|
243
|
-
* @typedef
|
|
244
|
-
* @property {
|
|
245
|
-
* @property {string}
|
|
246
|
-
* @property {string}
|
|
247
|
-
* @property {
|
|
248
|
-
* @property {
|
|
249
|
-
* @property {Object} [custom_headers]
|
|
250
|
-
* @property {SubscriberStatus} status
|
|
251
|
-
* @property {string} [email_id]
|
|
252
|
-
* @property {AuthMeta} [auth_meta]
|
|
253
|
-
* @property {Events[]} [events]
|
|
296
|
+
* @typedef SqsEventData
|
|
297
|
+
* @property {string} event_category - The category of the event.
|
|
298
|
+
* @property {string} event_name - The name of the event.
|
|
299
|
+
* @property {string} event_type - The type of the event.
|
|
300
|
+
* @property {number} version - The version number of the event.
|
|
301
|
+
* @property {string} [queue] - The queue name associated with the event in SQS.
|
|
254
302
|
*/
|
|
255
303
|
|
|
256
304
|
/**
|
|
257
|
-
* @typedef
|
|
258
|
-
* @property {string}
|
|
259
|
-
* @property {
|
|
260
|
-
* @property {Association} association
|
|
261
|
-
* @property {Object} [custom_headers]
|
|
262
|
-
* @property {SubscriberStatus} status
|
|
263
|
-
* @property {string} email_id
|
|
264
|
-
* @property {AuthMeta} [auth_meta]
|
|
265
|
-
* @property {number[]} event_id
|
|
305
|
+
* @typedef SqsConfig
|
|
306
|
+
* @property {string} [type] - Type of SQS configuration (optional).
|
|
307
|
+
* @property {SqsEventData[]} events - List of event data for configuration.
|
|
266
308
|
*/
|
|
267
309
|
|
|
268
310
|
/**
|
|
269
|
-
* @typedef
|
|
270
|
-
* @property {
|
|
271
|
-
* @property {string}
|
|
272
|
-
* @property {string}
|
|
273
|
-
* @property {
|
|
274
|
-
* @property {
|
|
275
|
-
*
|
|
276
|
-
* @property {string} [email_id]
|
|
277
|
-
* @property {AuthMeta} [auth_meta]
|
|
278
|
-
* @property {number[]} event_id
|
|
311
|
+
* @typedef EventBridgeData
|
|
312
|
+
* @property {string} event_category - The category of the event.
|
|
313
|
+
* @property {string} event_name - The name of the event.
|
|
314
|
+
* @property {string} event_type - The type of the event.
|
|
315
|
+
* @property {number} version - The version number of the event.
|
|
316
|
+
* @property {string} [event_bridge_name] - The name of the event bridge related
|
|
317
|
+
* to the event.
|
|
279
318
|
*/
|
|
280
319
|
|
|
281
320
|
/**
|
|
282
|
-
* @typedef
|
|
283
|
-
* @property {
|
|
284
|
-
* @property {
|
|
285
|
-
*
|
|
286
|
-
* @property {string} [webhook_url]
|
|
287
|
-
* @property {string} [provider]
|
|
288
|
-
* @property {AssociationResp} [association]
|
|
289
|
-
* @property {Object} [custom_headers]
|
|
290
|
-
* @property {SubscriberStatus} [status]
|
|
291
|
-
* @property {string} [email_id]
|
|
292
|
-
* @property {string} [updated_on]
|
|
293
|
-
* @property {string} [created_on]
|
|
294
|
-
* @property {string} [type]
|
|
295
|
-
* @property {AuthMeta} [auth_meta]
|
|
296
|
-
* @property {number[]} [event_id]
|
|
321
|
+
* @typedef EventBridgeConfig
|
|
322
|
+
* @property {string} [type] - Type of event configuration (optional).
|
|
323
|
+
* @property {EventBridgeData[]} events - List of event data for EventBridge
|
|
324
|
+
* configuration.
|
|
297
325
|
*/
|
|
298
326
|
|
|
299
327
|
/**
|
|
300
|
-
* @typedef
|
|
301
|
-
* @property {
|
|
302
|
-
* @property {
|
|
328
|
+
* @typedef EventMapBody
|
|
329
|
+
* @property {RestConfig} [rest]
|
|
330
|
+
* @property {KafkaConfig} [kafka]
|
|
331
|
+
* @property {PubSubConfig} [pub_sub]
|
|
332
|
+
* @property {TemporalConfig} [temporal]
|
|
333
|
+
* @property {SqsConfig} [sqs]
|
|
334
|
+
* @property {EventBridgeConfig} [event_bridge]
|
|
303
335
|
*/
|
|
304
336
|
|
|
305
|
-
/**
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
event_category: Joi.string().allow(""),
|
|
314
|
-
version: Joi.string().allow(""),
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/** @returns {EventProcessRequest} */
|
|
319
|
-
static EventProcessRequest() {
|
|
320
|
-
return Joi.object({
|
|
321
|
-
search_text: Joi.string().allow(""),
|
|
322
|
-
end_date: Joi.string().allow("").required(),
|
|
323
|
-
start_date: Joi.string().allow("").required(),
|
|
324
|
-
subscriber_ids: Joi.array().items(Joi.number()),
|
|
325
|
-
status: Joi.string().allow(""),
|
|
326
|
-
event: Joi.array().items(WebhookPlatformModel.Event()),
|
|
327
|
-
});
|
|
328
|
-
}
|
|
337
|
+
/**
|
|
338
|
+
* @typedef WebhookConfig
|
|
339
|
+
* @property {string} [notification_email] - The email address for notifications.
|
|
340
|
+
* @property {string} [name] - The name of the webhook configuration.
|
|
341
|
+
* @property {string} [status] - The status of the webhook (e.g., active or inactive).
|
|
342
|
+
* @property {Association} [association]
|
|
343
|
+
* @property {EventMapBody} [event_map]
|
|
344
|
+
*/
|
|
329
345
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
});
|
|
335
|
-
}
|
|
346
|
+
/**
|
|
347
|
+
* @typedef UpsertSubscriberConfig
|
|
348
|
+
* @property {WebhookConfig} webhook_config
|
|
349
|
+
*/
|
|
336
350
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
351
|
+
/**
|
|
352
|
+
* @typedef UpsertSubscriberConfigResult
|
|
353
|
+
* @property {boolean} [status] - The status of the upsert operation (e.g.,
|
|
354
|
+
* success or failure).
|
|
355
|
+
* @property {string} [message] - A message providing details about the upsert
|
|
356
|
+
* operation result.
|
|
357
|
+
*/
|
|
344
358
|
|
|
345
|
-
|
|
346
|
-
static EventProcessReportObject() {
|
|
347
|
-
return Joi.object({
|
|
348
|
-
event_name: Joi.string().allow(""),
|
|
349
|
-
response_code: Joi.number(),
|
|
350
|
-
response_message: Joi.string().allow(""),
|
|
351
|
-
data: Joi.string().allow(""),
|
|
352
|
-
attempt: Joi.number(),
|
|
353
|
-
last_attempted_on: Joi.number(),
|
|
354
|
-
status: Joi.string().allow(""),
|
|
355
|
-
name: Joi.string().allow(""),
|
|
356
|
-
webhook_url: Joi.string().allow(""),
|
|
357
|
-
response_time: Joi.number(),
|
|
358
|
-
message_id: Joi.string().allow(""),
|
|
359
|
-
event_trace_id: Joi.string().allow(""),
|
|
360
|
-
});
|
|
361
|
-
}
|
|
359
|
+
/** @typedef {"active" | "inactive"} SubscriberStatus */
|
|
362
360
|
|
|
361
|
+
class WebhookPlatformModel {
|
|
363
362
|
/** @returns {Page} */
|
|
364
363
|
static Page() {
|
|
365
364
|
return Joi.object({
|
|
@@ -370,25 +369,20 @@ class WebhookPlatformModel {
|
|
|
370
369
|
current: Joi.number(),
|
|
371
370
|
type: Joi.string().allow("").required(),
|
|
372
371
|
size: Joi.number(),
|
|
372
|
+
page_size: Joi.number(),
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
/** @returns {
|
|
377
|
-
static
|
|
378
|
-
return Joi.object({
|
|
379
|
-
webhook_url: Joi.string().allow("").required(),
|
|
380
|
-
auth_meta: Joi.any(),
|
|
381
|
-
custom_headers: Joi.any(),
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/** @returns {PingWebhookResponse} */
|
|
386
|
-
static PingWebhookResponse() {
|
|
376
|
+
/** @returns {BroadcasterConfig} */
|
|
377
|
+
static BroadcasterConfig() {
|
|
387
378
|
return Joi.object({
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
379
|
+
topic: Joi.string().allow(""),
|
|
380
|
+
queue: Joi.string().allow(""),
|
|
381
|
+
event_bridge_name: Joi.string().allow(""),
|
|
382
|
+
workflow_name: Joi.string().allow(""),
|
|
383
|
+
account_id: Joi.string().allow(""),
|
|
384
|
+
detail_type: Joi.string().allow(""),
|
|
385
|
+
}).allow(null);
|
|
392
386
|
}
|
|
393
387
|
|
|
394
388
|
/** @returns {SubscriberEventMapping} */
|
|
@@ -397,20 +391,37 @@ class WebhookPlatformModel {
|
|
|
397
391
|
id: Joi.number(),
|
|
398
392
|
event_id: Joi.number(),
|
|
399
393
|
subscriber_id: Joi.number(),
|
|
400
|
-
|
|
394
|
+
filters: WebhookPlatformModel.FilterSchema(),
|
|
395
|
+
reducer: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
396
|
+
broadcaster_config: WebhookPlatformModel.BroadcasterConfig(),
|
|
401
397
|
created_on: Joi.string().allow(""),
|
|
402
398
|
});
|
|
403
399
|
}
|
|
404
400
|
|
|
401
|
+
/** @returns {FilterSchema} */
|
|
402
|
+
static FilterSchema() {
|
|
403
|
+
return Joi.object({
|
|
404
|
+
query: Joi.string().allow(""),
|
|
405
|
+
condition: Joi.string().allow(""),
|
|
406
|
+
logic: Joi.string().allow(""),
|
|
407
|
+
conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
408
|
+
}).allow(null);
|
|
409
|
+
}
|
|
410
|
+
|
|
405
411
|
/** @returns {EventConfig} */
|
|
406
412
|
static EventConfig() {
|
|
407
413
|
return Joi.object({
|
|
408
414
|
id: Joi.number(),
|
|
415
|
+
type: Joi.string().allow("").allow(null),
|
|
409
416
|
event_name: Joi.string().allow(""),
|
|
410
417
|
event_type: Joi.string().allow(""),
|
|
411
418
|
event_category: Joi.string().allow(""),
|
|
419
|
+
modified_by: Joi.string().allow(""),
|
|
412
420
|
subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
|
|
413
421
|
event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
422
|
+
sunset_date: Joi.string().allow("").allow(null),
|
|
423
|
+
announcement_date: Joi.string().allow("").allow(null),
|
|
424
|
+
support_end_date: Joi.string().allow("").allow(null),
|
|
414
425
|
group: Joi.string().allow("").allow(null),
|
|
415
426
|
version: Joi.string().allow(""),
|
|
416
427
|
display_name: Joi.string().allow(""),
|
|
@@ -420,110 +431,13 @@ class WebhookPlatformModel {
|
|
|
420
431
|
});
|
|
421
432
|
}
|
|
422
433
|
|
|
423
|
-
/** @returns {
|
|
424
|
-
static
|
|
434
|
+
/** @returns {EventConfigResult} */
|
|
435
|
+
static EventConfigResult() {
|
|
425
436
|
return Joi.object({
|
|
426
437
|
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
427
438
|
});
|
|
428
439
|
}
|
|
429
440
|
|
|
430
|
-
/** @returns {ReportFiltersPayload} */
|
|
431
|
-
static ReportFiltersPayload() {
|
|
432
|
-
return Joi.object({
|
|
433
|
-
subscriber_ids: Joi.array().items(Joi.number()).required(),
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/** @returns {ReportFilterResponse} */
|
|
438
|
-
static ReportFilterResponse() {
|
|
439
|
-
return Joi.object({
|
|
440
|
-
filter_name: Joi.string().allow(""),
|
|
441
|
-
values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
/** @returns {HistoryPayload} */
|
|
446
|
-
static HistoryPayload() {
|
|
447
|
-
return Joi.object({
|
|
448
|
-
type: Joi.string().allow("").required(),
|
|
449
|
-
page_no: Joi.number(),
|
|
450
|
-
page_size: Joi.number(),
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
/** @returns {HistoryFilters} */
|
|
455
|
-
static HistoryFilters() {
|
|
456
|
-
return Joi.object({
|
|
457
|
-
events: Joi.array().items(Joi.string().allow("")),
|
|
458
|
-
search_text: Joi.string().allow(""),
|
|
459
|
-
status: Joi.string().allow(""),
|
|
460
|
-
end_date: Joi.string().allow(""),
|
|
461
|
-
start_date: Joi.string().allow(""),
|
|
462
|
-
subscribers: Joi.array().items(Joi.number()),
|
|
463
|
-
webhook_type: Joi.array().items(Joi.string().allow("")),
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/** @returns {Url} */
|
|
468
|
-
static Url() {
|
|
469
|
-
return Joi.object({
|
|
470
|
-
url: Joi.string().allow(""),
|
|
471
|
-
name: Joi.string().allow(""),
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/** @returns {CdnObject} */
|
|
476
|
-
static CdnObject() {
|
|
477
|
-
return Joi.object({
|
|
478
|
-
urls: Joi.array().items(WebhookPlatformModel.Url()),
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
/** @returns {UploadServiceObject} */
|
|
483
|
-
static UploadServiceObject() {
|
|
484
|
-
return Joi.object({
|
|
485
|
-
cdn: WebhookPlatformModel.CdnObject(),
|
|
486
|
-
}).allow(null);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/** @returns {HistoryAssociation} */
|
|
490
|
-
static HistoryAssociation() {
|
|
491
|
-
return Joi.object({
|
|
492
|
-
company_id: Joi.number(),
|
|
493
|
-
subscriber_ids: Joi.array().items(Joi.number()),
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
/** @returns {HistoryItems} */
|
|
498
|
-
static HistoryItems() {
|
|
499
|
-
return Joi.object({
|
|
500
|
-
id: Joi.number(),
|
|
501
|
-
association: WebhookPlatformModel.HistoryAssociation(),
|
|
502
|
-
filters: WebhookPlatformModel.HistoryFilters(),
|
|
503
|
-
filename: Joi.string().allow(""),
|
|
504
|
-
status: Joi.string().allow(""),
|
|
505
|
-
upload_service_response: WebhookPlatformModel.UploadServiceObject(),
|
|
506
|
-
created_on: Joi.string().allow(""),
|
|
507
|
-
updated_on: Joi.string().allow("").allow(null),
|
|
508
|
-
message: Joi.string().allow(""),
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/** @returns {HistoryResponse} */
|
|
513
|
-
static HistoryResponse() {
|
|
514
|
-
return Joi.object({
|
|
515
|
-
items: Joi.array().items(WebhookPlatformModel.HistoryItems()),
|
|
516
|
-
page: WebhookPlatformModel.Page(),
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
/** @returns {CancelResponse} */
|
|
521
|
-
static CancelResponse() {
|
|
522
|
-
return Joi.object({
|
|
523
|
-
message: Joi.string().allow(""),
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
|
|
527
441
|
/** @returns {Association} */
|
|
528
442
|
static Association() {
|
|
529
443
|
return Joi.object({
|
|
@@ -551,16 +465,17 @@ class WebhookPlatformModel {
|
|
|
551
465
|
});
|
|
552
466
|
}
|
|
553
467
|
|
|
554
|
-
/** @returns {
|
|
555
|
-
static
|
|
468
|
+
/** @returns {SubscriberDetails} */
|
|
469
|
+
static SubscriberDetails() {
|
|
556
470
|
return Joi.object({
|
|
557
471
|
id: Joi.number(),
|
|
558
472
|
modified_by: Joi.string().allow(""),
|
|
559
473
|
name: Joi.string().allow(""),
|
|
560
474
|
provider: Joi.string().allow(""),
|
|
561
475
|
webhook_url: Joi.string().allow(""),
|
|
476
|
+
source: Joi.string().allow("").allow(null),
|
|
562
477
|
association: WebhookPlatformModel.AssociationResp(),
|
|
563
|
-
custom_headers: Joi.any(),
|
|
478
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
564
479
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
565
480
|
email_id: Joi.string().allow(""),
|
|
566
481
|
updated_on: Joi.string().allow(""),
|
|
@@ -576,6 +491,10 @@ class WebhookPlatformModel {
|
|
|
576
491
|
return Joi.object({
|
|
577
492
|
slug: Joi.string().allow(""),
|
|
578
493
|
topic: Joi.string().allow(""),
|
|
494
|
+
queue: Joi.string().allow(""),
|
|
495
|
+
event_bridge_name: Joi.string().allow(""),
|
|
496
|
+
workflow_name: Joi.string().allow(""),
|
|
497
|
+
detail_type: Joi.string().allow(""),
|
|
579
498
|
});
|
|
580
499
|
}
|
|
581
500
|
|
|
@@ -583,10 +502,11 @@ class WebhookPlatformModel {
|
|
|
583
502
|
static SubscriberConfigPostRequestV2() {
|
|
584
503
|
return Joi.object({
|
|
585
504
|
name: Joi.string().allow("").required(),
|
|
505
|
+
type: Joi.string().allow("").allow(null),
|
|
586
506
|
webhook_url: Joi.string().allow(""),
|
|
587
507
|
provider: Joi.string().allow("").required(),
|
|
588
508
|
association: WebhookPlatformModel.Association().required(),
|
|
589
|
-
custom_headers: Joi.any(),
|
|
509
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
590
510
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
591
511
|
email_id: Joi.string().allow("").required(),
|
|
592
512
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -599,10 +519,11 @@ class WebhookPlatformModel {
|
|
|
599
519
|
return Joi.object({
|
|
600
520
|
id: Joi.number().required(),
|
|
601
521
|
name: Joi.string().allow(""),
|
|
522
|
+
type: Joi.string().allow("").allow(null),
|
|
602
523
|
webhook_url: Joi.string().allow(""),
|
|
603
524
|
provider: Joi.string().allow("").required(),
|
|
604
525
|
association: WebhookPlatformModel.Association(),
|
|
605
|
-
custom_headers: Joi.any(),
|
|
526
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
606
527
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
607
528
|
email_id: Joi.string().allow(""),
|
|
608
529
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -614,9 +535,10 @@ class WebhookPlatformModel {
|
|
|
614
535
|
static SubscriberConfigPost() {
|
|
615
536
|
return Joi.object({
|
|
616
537
|
name: Joi.string().allow("").required(),
|
|
538
|
+
type: Joi.string().allow("").allow(null),
|
|
617
539
|
webhook_url: Joi.string().allow("").required(),
|
|
618
540
|
association: WebhookPlatformModel.Association().required(),
|
|
619
|
-
custom_headers: Joi.any(),
|
|
541
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
620
542
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
621
543
|
email_id: Joi.string().allow("").required(),
|
|
622
544
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -629,9 +551,10 @@ class WebhookPlatformModel {
|
|
|
629
551
|
return Joi.object({
|
|
630
552
|
id: Joi.number().required(),
|
|
631
553
|
name: Joi.string().allow(""),
|
|
554
|
+
type: Joi.string().allow("").allow(null),
|
|
632
555
|
webhook_url: Joi.string().allow(""),
|
|
633
556
|
association: WebhookPlatformModel.Association(),
|
|
634
|
-
custom_headers: Joi.any(),
|
|
557
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
635
558
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
636
559
|
email_id: Joi.string().allow(""),
|
|
637
560
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -639,8 +562,8 @@ class WebhookPlatformModel {
|
|
|
639
562
|
});
|
|
640
563
|
}
|
|
641
564
|
|
|
642
|
-
/** @returns {
|
|
643
|
-
static
|
|
565
|
+
/** @returns {SubscriberConfigResult} */
|
|
566
|
+
static SubscriberConfigResult() {
|
|
644
567
|
return Joi.object({
|
|
645
568
|
id: Joi.number(),
|
|
646
569
|
modified_by: Joi.string().allow(""),
|
|
@@ -648,8 +571,9 @@ class WebhookPlatformModel {
|
|
|
648
571
|
webhook_url: Joi.string().allow(""),
|
|
649
572
|
provider: Joi.string().allow(""),
|
|
650
573
|
association: WebhookPlatformModel.AssociationResp(),
|
|
651
|
-
custom_headers: Joi.any(),
|
|
574
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
652
575
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
576
|
+
source: Joi.string().allow("").allow(null),
|
|
653
577
|
email_id: Joi.string().allow(""),
|
|
654
578
|
updated_on: Joi.string().allow(""),
|
|
655
579
|
created_on: Joi.string().allow(""),
|
|
@@ -662,11 +586,165 @@ class WebhookPlatformModel {
|
|
|
662
586
|
/** @returns {SubscriberConfigList} */
|
|
663
587
|
static SubscriberConfigList() {
|
|
664
588
|
return Joi.object({
|
|
665
|
-
items: Joi.array().items(WebhookPlatformModel.
|
|
589
|
+
items: Joi.array().items(WebhookPlatformModel.SubscriberDetails()),
|
|
666
590
|
page: WebhookPlatformModel.Page(),
|
|
667
591
|
});
|
|
668
592
|
}
|
|
669
593
|
|
|
594
|
+
/** @returns {RestEventData} */
|
|
595
|
+
static RestEventData() {
|
|
596
|
+
return Joi.object({
|
|
597
|
+
event_category: Joi.string().allow("").required(),
|
|
598
|
+
event_name: Joi.string().allow("").required(),
|
|
599
|
+
event_type: Joi.string().allow("").required(),
|
|
600
|
+
version: Joi.number().required(),
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/** @returns {RestConfig} */
|
|
605
|
+
static RestConfig() {
|
|
606
|
+
return Joi.object({
|
|
607
|
+
webhook_url: Joi.string().allow("").required(),
|
|
608
|
+
type: Joi.string().allow("").required(),
|
|
609
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
610
|
+
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
611
|
+
events: Joi.array()
|
|
612
|
+
.items(WebhookPlatformModel.RestEventData())
|
|
613
|
+
.required(),
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/** @returns {QueueEventData} */
|
|
618
|
+
static QueueEventData() {
|
|
619
|
+
return Joi.object({
|
|
620
|
+
event_category: Joi.string().allow("").required(),
|
|
621
|
+
event_name: Joi.string().allow("").required(),
|
|
622
|
+
event_type: Joi.string().allow("").required(),
|
|
623
|
+
version: Joi.number().required(),
|
|
624
|
+
topic: Joi.string().allow("").required(),
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/** @returns {KafkaConfig} */
|
|
629
|
+
static KafkaConfig() {
|
|
630
|
+
return Joi.object({
|
|
631
|
+
type: Joi.string().allow("").allow(null),
|
|
632
|
+
events: Joi.array()
|
|
633
|
+
.items(WebhookPlatformModel.QueueEventData())
|
|
634
|
+
.required(),
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** @returns {PubSubConfig} */
|
|
639
|
+
static PubSubConfig() {
|
|
640
|
+
return Joi.object({
|
|
641
|
+
type: Joi.string().allow("").allow(null),
|
|
642
|
+
events: Joi.array()
|
|
643
|
+
.items(WebhookPlatformModel.QueueEventData())
|
|
644
|
+
.required(),
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/** @returns {TemporalEventData} */
|
|
649
|
+
static TemporalEventData() {
|
|
650
|
+
return Joi.object({
|
|
651
|
+
event_category: Joi.string().allow("").required(),
|
|
652
|
+
event_name: Joi.string().allow("").required(),
|
|
653
|
+
event_type: Joi.string().allow("").required(),
|
|
654
|
+
version: Joi.number().required(),
|
|
655
|
+
queue: Joi.string().allow(""),
|
|
656
|
+
workflow_name: Joi.string().allow(""),
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/** @returns {TemporalConfig} */
|
|
661
|
+
static TemporalConfig() {
|
|
662
|
+
return Joi.object({
|
|
663
|
+
type: Joi.string().allow("").allow(null),
|
|
664
|
+
events: Joi.array()
|
|
665
|
+
.items(WebhookPlatformModel.TemporalEventData())
|
|
666
|
+
.required(),
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/** @returns {SqsEventData} */
|
|
671
|
+
static SqsEventData() {
|
|
672
|
+
return Joi.object({
|
|
673
|
+
event_category: Joi.string().allow("").required(),
|
|
674
|
+
event_name: Joi.string().allow("").required(),
|
|
675
|
+
event_type: Joi.string().allow("").required(),
|
|
676
|
+
version: Joi.number().required(),
|
|
677
|
+
queue: Joi.string().allow(""),
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/** @returns {SqsConfig} */
|
|
682
|
+
static SqsConfig() {
|
|
683
|
+
return Joi.object({
|
|
684
|
+
type: Joi.string().allow("").allow(null),
|
|
685
|
+
events: Joi.array().items(WebhookPlatformModel.SqsEventData()).required(),
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/** @returns {EventBridgeData} */
|
|
690
|
+
static EventBridgeData() {
|
|
691
|
+
return Joi.object({
|
|
692
|
+
event_category: Joi.string().allow("").required(),
|
|
693
|
+
event_name: Joi.string().allow("").required(),
|
|
694
|
+
event_type: Joi.string().allow("").required(),
|
|
695
|
+
version: Joi.number().required(),
|
|
696
|
+
event_bridge_name: Joi.string().allow(""),
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/** @returns {EventBridgeConfig} */
|
|
701
|
+
static EventBridgeConfig() {
|
|
702
|
+
return Joi.object({
|
|
703
|
+
type: Joi.string().allow("").allow(null),
|
|
704
|
+
events: Joi.array()
|
|
705
|
+
.items(WebhookPlatformModel.EventBridgeData())
|
|
706
|
+
.required(),
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/** @returns {EventMapBody} */
|
|
711
|
+
static EventMapBody() {
|
|
712
|
+
return Joi.object({
|
|
713
|
+
rest: WebhookPlatformModel.RestConfig(),
|
|
714
|
+
kafka: WebhookPlatformModel.KafkaConfig(),
|
|
715
|
+
pub_sub: WebhookPlatformModel.PubSubConfig(),
|
|
716
|
+
temporal: WebhookPlatformModel.TemporalConfig(),
|
|
717
|
+
sqs: WebhookPlatformModel.SqsConfig(),
|
|
718
|
+
event_bridge: WebhookPlatformModel.EventBridgeConfig(),
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/** @returns {WebhookConfig} */
|
|
723
|
+
static WebhookConfig() {
|
|
724
|
+
return Joi.object({
|
|
725
|
+
notification_email: Joi.string().allow(""),
|
|
726
|
+
name: Joi.string().allow(""),
|
|
727
|
+
status: Joi.string().allow(""),
|
|
728
|
+
association: WebhookPlatformModel.Association(),
|
|
729
|
+
event_map: WebhookPlatformModel.EventMapBody(),
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/** @returns {UpsertSubscriberConfig} */
|
|
734
|
+
static UpsertSubscriberConfig() {
|
|
735
|
+
return Joi.object({
|
|
736
|
+
webhook_config: WebhookPlatformModel.WebhookConfig().required(),
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/** @returns {UpsertSubscriberConfigResult} */
|
|
741
|
+
static UpsertSubscriberConfigResult() {
|
|
742
|
+
return Joi.object({
|
|
743
|
+
status: Joi.boolean(),
|
|
744
|
+
message: Joi.string().allow(""),
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
|
|
670
748
|
/**
|
|
671
749
|
* Enum: SubscriberStatus Used By: Webhook
|
|
672
750
|
*
|