@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
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 +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- 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 +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- 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 +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- 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 +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- 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 +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -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/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- 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 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -1,50 +1,5 @@
|
|
|
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
5
|
* @property {number} [item_total] - The total number of items on the page.
|
|
@@ -54,317 +9,344 @@ const Joi = require("joi");
|
|
|
54
9
|
* @property {number} [current] - The current page number.
|
|
55
10
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
56
11
|
* @property {number} [size] - The number of items per page.
|
|
57
|
-
* @property {number} [
|
|
12
|
+
* @property {number} [page_size] - The number of items per page.
|
|
58
13
|
*/
|
|
59
14
|
|
|
60
15
|
/**
|
|
61
|
-
* @typedef
|
|
62
|
-
* @property {string}
|
|
63
|
-
* @property {
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
* @
|
|
70
|
-
*
|
|
71
|
-
* @property {string} [message] - An optional message related to the ping.
|
|
72
|
-
* @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.
|
|
73
26
|
*/
|
|
74
27
|
|
|
75
28
|
/**
|
|
76
29
|
* @typedef SubscriberEventMapping
|
|
77
|
-
* @property {number} [id]
|
|
78
|
-
* @property {number} [event_id]
|
|
79
|
-
* @property {number} [subscriber_id]
|
|
80
|
-
* @property {
|
|
81
|
-
* @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.
|
|
82
58
|
*/
|
|
83
59
|
|
|
84
60
|
/**
|
|
85
61
|
* @typedef EventConfig
|
|
86
|
-
* @property {number} [id]
|
|
87
|
-
* @property {string} [
|
|
88
|
-
* @property {string} [
|
|
89
|
-
* @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.
|
|
90
69
|
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
91
|
-
* @property {Object} [event_schema]
|
|
92
|
-
*
|
|
93
|
-
* @property {string} [
|
|
94
|
-
*
|
|
95
|
-
* @property {string} [
|
|
96
|
-
* @property {string} [
|
|
97
|
-
* @property {string} [
|
|
70
|
+
* @property {Object} [event_schema] - The schema for the event, allowing for
|
|
71
|
+
* additional properties and may be null.
|
|
72
|
+
* @property {string} [group] - The group associated with the event
|
|
73
|
+
* configuration, which may be null.
|
|
74
|
+
* @property {string} [version] - The version of the event configuration.
|
|
75
|
+
* @property {string} [display_name] - The display name of the event configuration.
|
|
76
|
+
* @property {string} [description] - A description of the event configuration,
|
|
77
|
+
* which may be null.
|
|
78
|
+
* @property {string} [created_on] - The date and time when the event
|
|
79
|
+
* configuration was created.
|
|
80
|
+
* @property {string} [updated_on] - The date and time when the event
|
|
81
|
+
* configuration was last updated.
|
|
98
82
|
*/
|
|
99
83
|
|
|
100
84
|
/**
|
|
101
|
-
* @typedef
|
|
102
|
-
* @property {EventConfig[]} [event_configs]
|
|
85
|
+
* @typedef EventConfigResult
|
|
86
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
103
87
|
*/
|
|
104
88
|
|
|
105
89
|
/**
|
|
106
|
-
* @typedef
|
|
107
|
-
* @property {
|
|
108
|
-
*
|
|
90
|
+
* @typedef Association
|
|
91
|
+
* @property {string[]} [application_id] - A list of application IDs associated
|
|
92
|
+
* with the association.
|
|
93
|
+
* @property {string} [extension_id] - The extension ID associated with the association.
|
|
94
|
+
* @property {string} [criteria] - The criteria for the association, such as
|
|
95
|
+
* "ALL", "EMPTY", or "SPECIFIC-EVENTS".
|
|
109
96
|
*/
|
|
110
97
|
|
|
111
98
|
/**
|
|
112
|
-
* @typedef
|
|
113
|
-
* @property {
|
|
114
|
-
* @property {
|
|
99
|
+
* @typedef AssociationResp
|
|
100
|
+
* @property {number} [company_id] - The ID of the company associated with the response.
|
|
101
|
+
* @property {string[]} [application_id] - A list of application IDs associated
|
|
102
|
+
* with the response.
|
|
103
|
+
* @property {string} [extension_id] - The extension ID associated with the response.
|
|
104
|
+
* @property {string} [criteria] - The criteria for the response, such as "ALL",
|
|
105
|
+
* "EMPTY", or "SPECIFIC-EVENTS".
|
|
115
106
|
*/
|
|
116
107
|
|
|
117
108
|
/**
|
|
118
|
-
* @typedef
|
|
119
|
-
* @property {string} type - The type of
|
|
120
|
-
* @property {
|
|
121
|
-
* @property {number} [page_size] - The number of records per page.
|
|
109
|
+
* @typedef AuthMeta
|
|
110
|
+
* @property {string} [type] - The type of authentication method used.
|
|
111
|
+
* @property {string} [secret] - The secret key or token used for authentication.
|
|
122
112
|
*/
|
|
123
113
|
|
|
124
114
|
/**
|
|
125
|
-
* @typedef
|
|
126
|
-
* @property {
|
|
127
|
-
* @property {string} [
|
|
128
|
-
*
|
|
129
|
-
* @property {string} [
|
|
130
|
-
* @property {string} [
|
|
131
|
-
* @property {
|
|
132
|
-
*
|
|
133
|
-
* @property {
|
|
134
|
-
*
|
|
115
|
+
* @typedef SubscriberDetails
|
|
116
|
+
* @property {number} [id] - The unique identifier of the subscriber.
|
|
117
|
+
* @property {string} [modified_by] - The identifier of the user who last
|
|
118
|
+
* modified the subscriber details.
|
|
119
|
+
* @property {string} [name] - The name of the subscriber.
|
|
120
|
+
* @property {string} [provider] - The provider of the subscriber.
|
|
121
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
122
|
+
* @property {AssociationResp} [association]
|
|
123
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
124
|
+
* @property {SubscriberStatus} [status]
|
|
125
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
126
|
+
* @property {string} [updated_on] - The date and time when the subscriber
|
|
127
|
+
* details were last updated.
|
|
128
|
+
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
129
|
+
* @property {string} [type] - The type of subscriber, which can either be passed as null.
|
|
130
|
+
* @property {AuthMeta} [auth_meta]
|
|
131
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
135
132
|
*/
|
|
136
133
|
|
|
137
134
|
/**
|
|
138
|
-
* @typedef
|
|
139
|
-
* @property {string} [
|
|
140
|
-
* @property {string} [
|
|
135
|
+
* @typedef Events
|
|
136
|
+
* @property {string} [slug] - The slug or identifier for the event.
|
|
137
|
+
* @property {string} [topic] - The topic associated with the event.
|
|
138
|
+
* @property {string} [queue] - The queue associated with the event in case of
|
|
139
|
+
* provider as Pub/Sub.
|
|
140
|
+
* @property {string} [event_bridge_name] - The name of the event bridge
|
|
141
|
+
* associated with the event in case of provider as AWS event bridge.
|
|
142
|
+
* @property {string} [workflow_name] - The name of the workflow related to the
|
|
143
|
+
* event in case of provider as temporal.
|
|
144
|
+
* @property {string} [detail_type] - The type of detail for the event.
|
|
141
145
|
*/
|
|
142
146
|
|
|
143
147
|
/**
|
|
144
|
-
* @typedef
|
|
145
|
-
* @property {
|
|
148
|
+
* @typedef SubscriberConfigPostRequestV2
|
|
149
|
+
* @property {string} name - The name of the subscriber.
|
|
150
|
+
* @property {string} [type] - The type of the subscriber, which may be null.
|
|
151
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
152
|
+
* @property {string} provider - The provider of the subscriber.
|
|
153
|
+
* @property {Association} association
|
|
154
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
155
|
+
* @property {SubscriberStatus} status
|
|
156
|
+
* @property {string} email_id - The email ID associated with the subscriber.
|
|
157
|
+
* @property {AuthMeta} [auth_meta]
|
|
158
|
+
* @property {Events[]} events - The list of events associated with the subscriber.
|
|
146
159
|
*/
|
|
147
160
|
|
|
148
161
|
/**
|
|
149
|
-
* @typedef
|
|
150
|
-
* @property {
|
|
162
|
+
* @typedef SubscriberConfigUpdateRequestV2
|
|
163
|
+
* @property {number} id - The unique identifier of the subscriber to be updated.
|
|
164
|
+
* @property {string} [name] - The name of the subscriber.
|
|
165
|
+
* @property {string} [type] - The type of the subscriber, which may be null.
|
|
166
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
167
|
+
* @property {string} provider - The provider of the subscriber.
|
|
168
|
+
* @property {Association} [association]
|
|
169
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
170
|
+
* @property {SubscriberStatus} status
|
|
171
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
172
|
+
* @property {AuthMeta} [auth_meta]
|
|
173
|
+
* @property {Events[]} [events] - The list of events associated with the subscriber.
|
|
151
174
|
*/
|
|
152
175
|
|
|
153
176
|
/**
|
|
154
|
-
* @typedef
|
|
155
|
-
* @property {
|
|
156
|
-
* @property {
|
|
177
|
+
* @typedef SubscriberConfigPost
|
|
178
|
+
* @property {string} name - The name of the subscriber.
|
|
179
|
+
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
180
|
+
* @property {string} webhook_url - The URL for the subscriber's webhook.
|
|
181
|
+
* @property {Association} association
|
|
182
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
183
|
+
* @property {SubscriberStatus} status
|
|
184
|
+
* @property {string} email_id - The email ID associated with the subscriber.
|
|
185
|
+
* @property {AuthMeta} [auth_meta]
|
|
186
|
+
* @property {number[]} event_id - The list of event IDs associated with the subscriber.
|
|
157
187
|
*/
|
|
158
188
|
|
|
159
189
|
/**
|
|
160
|
-
* @typedef
|
|
161
|
-
* @property {number}
|
|
162
|
-
* @property {
|
|
163
|
-
* @property {
|
|
164
|
-
* @property {string} [
|
|
165
|
-
* @property {
|
|
166
|
-
* @property {
|
|
167
|
-
* @property {
|
|
168
|
-
*
|
|
169
|
-
* @property {
|
|
170
|
-
*
|
|
171
|
-
* @property {string} [message] - A message related to the history report.
|
|
190
|
+
* @typedef SubscriberConfigUpdate
|
|
191
|
+
* @property {number} id - The unique identifier of the subscriber to be updated.
|
|
192
|
+
* @property {string} [name] - The name of the subscriber.
|
|
193
|
+
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
194
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
195
|
+
* @property {Association} [association]
|
|
196
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
197
|
+
* @property {SubscriberStatus} [status]
|
|
198
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
199
|
+
* @property {AuthMeta} [auth_meta]
|
|
200
|
+
* @property {number[]} event_id - The list of event IDs associated with the subscriber.
|
|
172
201
|
*/
|
|
173
202
|
|
|
174
203
|
/**
|
|
175
|
-
* @typedef
|
|
176
|
-
* @property {
|
|
177
|
-
* @property {
|
|
204
|
+
* @typedef SubscriberConfigResult
|
|
205
|
+
* @property {number} [id] - The unique identifier of the subscriber configuration.
|
|
206
|
+
* @property {string} [modified_by] - The identifier of the user who last
|
|
207
|
+
* modified the subscriber configuration.
|
|
208
|
+
* @property {string} [name] - The name of the subscriber.
|
|
209
|
+
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
210
|
+
* @property {string} [provider] - The provider of the subscriber.
|
|
211
|
+
* @property {AssociationResp} [association]
|
|
212
|
+
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
213
|
+
* @property {SubscriberStatus} [status]
|
|
214
|
+
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
215
|
+
* @property {string} [updated_on] - The date and time when the subscriber was
|
|
216
|
+
* last updated.
|
|
217
|
+
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
218
|
+
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
219
|
+
* @property {AuthMeta} [auth_meta]
|
|
220
|
+
* @property {number[]} [event_id] - The list of event IDs associated with the subscriber.
|
|
178
221
|
*/
|
|
179
222
|
|
|
180
223
|
/**
|
|
181
|
-
* @typedef
|
|
182
|
-
* @property {
|
|
224
|
+
* @typedef SubscriberConfigList
|
|
225
|
+
* @property {SubscriberDetails[]} [items] - List of subscriber details.
|
|
226
|
+
* @property {Page} [page]
|
|
183
227
|
*/
|
|
184
228
|
|
|
185
229
|
/**
|
|
186
|
-
* @typedef
|
|
187
|
-
* @property {string
|
|
188
|
-
* @property {string}
|
|
189
|
-
* @property {string}
|
|
230
|
+
* @typedef RestEventData
|
|
231
|
+
* @property {string} event_category - The category of the event.
|
|
232
|
+
* @property {string} event_name - The name of the event.
|
|
233
|
+
* @property {string} event_type - The type of the event.
|
|
234
|
+
* @property {number} version - The version number of the event.
|
|
190
235
|
*/
|
|
191
236
|
|
|
192
237
|
/**
|
|
193
|
-
* @typedef
|
|
194
|
-
* @property {
|
|
195
|
-
* @property {string
|
|
196
|
-
* @property {
|
|
197
|
-
* @property {
|
|
238
|
+
* @typedef RestConfig
|
|
239
|
+
* @property {string} webhook_url - The URL for the webhook.
|
|
240
|
+
* @property {string} type - The type of the configuration.
|
|
241
|
+
* @property {Object} [custom_headers] - Custom headers for the configuration.
|
|
242
|
+
* @property {AuthMeta} [auth_meta]
|
|
243
|
+
* @property {RestEventData[]} events - List of event data for configuration.
|
|
198
244
|
*/
|
|
199
245
|
|
|
200
246
|
/**
|
|
201
|
-
* @typedef
|
|
202
|
-
* @property {string}
|
|
203
|
-
* @property {string}
|
|
247
|
+
* @typedef QueueEventData
|
|
248
|
+
* @property {string} event_category - The category of the event.
|
|
249
|
+
* @property {string} event_name - The name of the event.
|
|
250
|
+
* @property {string} event_type - The type of the event.
|
|
251
|
+
* @property {number} version - The version number of the event.
|
|
252
|
+
* @property {string} topic - The topic associated with the event.
|
|
204
253
|
*/
|
|
205
254
|
|
|
206
255
|
/**
|
|
207
|
-
* @typedef
|
|
208
|
-
* @property {
|
|
209
|
-
* @property {
|
|
210
|
-
* @property {string} [name]
|
|
211
|
-
* @property {string} [provider]
|
|
212
|
-
* @property {string} [webhook_url]
|
|
213
|
-
* @property {AssociationResp} [association]
|
|
214
|
-
* @property {Object} [custom_headers]
|
|
215
|
-
* @property {SubscriberStatus} [status]
|
|
216
|
-
* @property {string} [email_id]
|
|
217
|
-
* @property {string} [updated_on]
|
|
218
|
-
* @property {string} [created_on]
|
|
219
|
-
* @property {string} [type]
|
|
220
|
-
* @property {AuthMeta} [auth_meta]
|
|
221
|
-
* @property {EventConfig[]} [event_configs]
|
|
256
|
+
* @typedef KafkaConfig
|
|
257
|
+
* @property {string} [type] - Type of Kafka configuration (optional).
|
|
258
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
222
259
|
*/
|
|
223
260
|
|
|
224
261
|
/**
|
|
225
|
-
* @typedef
|
|
226
|
-
* @property {string} [
|
|
227
|
-
* @property {
|
|
262
|
+
* @typedef PubSubConfig
|
|
263
|
+
* @property {string} [type] - Type of Pub/Sub configuration (optional).
|
|
264
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
228
265
|
*/
|
|
229
266
|
|
|
230
267
|
/**
|
|
231
|
-
* @typedef
|
|
232
|
-
* @property {string}
|
|
233
|
-
* @property {string}
|
|
234
|
-
* @property {string}
|
|
235
|
-
* @property {
|
|
236
|
-
* @property {
|
|
237
|
-
* @property {
|
|
238
|
-
* @property {SubscriberStatus} status
|
|
239
|
-
* @property {string} email_id
|
|
240
|
-
* @property {AuthMeta} [auth_meta]
|
|
241
|
-
* @property {Events[]} events
|
|
268
|
+
* @typedef TemporalEventData
|
|
269
|
+
* @property {string} event_category - The category of the event.
|
|
270
|
+
* @property {string} event_name - The name of the event.
|
|
271
|
+
* @property {string} event_type - The type of the event.
|
|
272
|
+
* @property {number} version - The version number of the event.
|
|
273
|
+
* @property {string} [queue] - The queue associated with the event.
|
|
274
|
+
* @property {string} [workflow_name] - The workflow name related to the event.
|
|
242
275
|
*/
|
|
243
276
|
|
|
244
277
|
/**
|
|
245
|
-
* @typedef
|
|
246
|
-
* @property {
|
|
247
|
-
* @property {
|
|
248
|
-
* @property {string} [type]
|
|
249
|
-
* @property {string} [webhook_url]
|
|
250
|
-
* @property {string} provider
|
|
251
|
-
* @property {Association} [association]
|
|
252
|
-
* @property {Object} [custom_headers]
|
|
253
|
-
* @property {SubscriberStatus} status
|
|
254
|
-
* @property {string} [email_id]
|
|
255
|
-
* @property {AuthMeta} [auth_meta]
|
|
256
|
-
* @property {Events[]} [events]
|
|
278
|
+
* @typedef TemporalConfig
|
|
279
|
+
* @property {string} [type] - Type of Temporal configuration (optional).
|
|
280
|
+
* @property {TemporalEventData[]} events - List of event data for configuration.
|
|
257
281
|
*/
|
|
258
282
|
|
|
259
283
|
/**
|
|
260
|
-
* @typedef
|
|
261
|
-
* @property {string}
|
|
262
|
-
* @property {string}
|
|
263
|
-
* @property {string}
|
|
264
|
-
* @property {
|
|
265
|
-
* @property {
|
|
266
|
-
* @property {SubscriberStatus} status
|
|
267
|
-
* @property {string} email_id
|
|
268
|
-
* @property {AuthMeta} [auth_meta]
|
|
269
|
-
* @property {number[]} event_id
|
|
284
|
+
* @typedef SqsEventData
|
|
285
|
+
* @property {string} event_category - The category of the event.
|
|
286
|
+
* @property {string} event_name - The name of the event.
|
|
287
|
+
* @property {string} event_type - The type of the event.
|
|
288
|
+
* @property {number} version - The version number of the event.
|
|
289
|
+
* @property {string} [queue] - The queue name associated with the event in SQS.
|
|
270
290
|
*/
|
|
271
291
|
|
|
272
292
|
/**
|
|
273
|
-
* @typedef
|
|
274
|
-
* @property {
|
|
275
|
-
* @property {
|
|
276
|
-
* @property {string} [type]
|
|
277
|
-
* @property {string} [webhook_url]
|
|
278
|
-
* @property {Association} [association]
|
|
279
|
-
* @property {Object} [custom_headers]
|
|
280
|
-
* @property {SubscriberStatus} [status]
|
|
281
|
-
* @property {string} [email_id]
|
|
282
|
-
* @property {AuthMeta} [auth_meta]
|
|
283
|
-
* @property {number[]} event_id
|
|
293
|
+
* @typedef SqsConfig
|
|
294
|
+
* @property {string} [type] - Type of SQS configuration (optional).
|
|
295
|
+
* @property {SqsEventData[]} events - List of event data for configuration.
|
|
284
296
|
*/
|
|
285
297
|
|
|
286
298
|
/**
|
|
287
|
-
* @typedef
|
|
288
|
-
* @property {
|
|
289
|
-
* @property {string}
|
|
290
|
-
* @property {string}
|
|
291
|
-
* @property {
|
|
292
|
-
* @property {string} [
|
|
293
|
-
*
|
|
294
|
-
* @property {Object} [custom_headers]
|
|
295
|
-
* @property {SubscriberStatus} [status]
|
|
296
|
-
* @property {string} [email_id]
|
|
297
|
-
* @property {string} [updated_on]
|
|
298
|
-
* @property {string} [created_on]
|
|
299
|
-
* @property {string} [type]
|
|
300
|
-
* @property {AuthMeta} [auth_meta]
|
|
301
|
-
* @property {number[]} [event_id]
|
|
299
|
+
* @typedef EventBridgeData
|
|
300
|
+
* @property {string} event_category - The category of the event.
|
|
301
|
+
* @property {string} event_name - The name of the event.
|
|
302
|
+
* @property {string} event_type - The type of the event.
|
|
303
|
+
* @property {number} version - The version number of the event.
|
|
304
|
+
* @property {string} [event_bridge_name] - The name of the event bridge related
|
|
305
|
+
* to the event.
|
|
302
306
|
*/
|
|
303
307
|
|
|
304
308
|
/**
|
|
305
|
-
* @typedef
|
|
306
|
-
* @property {
|
|
307
|
-
* @property {
|
|
309
|
+
* @typedef EventBridgeConfig
|
|
310
|
+
* @property {string} [type] - Type of event configuration (optional).
|
|
311
|
+
* @property {EventBridgeData[]} events - List of event data for EventBridge
|
|
312
|
+
* configuration.
|
|
308
313
|
*/
|
|
309
314
|
|
|
310
|
-
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
version: Joi.string().allow(""),
|
|
320
|
-
});
|
|
321
|
-
}
|
|
315
|
+
/**
|
|
316
|
+
* @typedef EventMapBody
|
|
317
|
+
* @property {RestConfig} [rest]
|
|
318
|
+
* @property {KafkaConfig} [kafka]
|
|
319
|
+
* @property {PubSubConfig} [pub_sub]
|
|
320
|
+
* @property {TemporalConfig} [temporal]
|
|
321
|
+
* @property {SqsConfig} [sqs]
|
|
322
|
+
* @property {EventBridgeConfig} [event_bridge]
|
|
323
|
+
*/
|
|
322
324
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
event: Joi.array().items(WebhookPlatformModel.Event()),
|
|
332
|
-
});
|
|
333
|
-
}
|
|
325
|
+
/**
|
|
326
|
+
* @typedef WebhookConfig
|
|
327
|
+
* @property {string} [notification_email] - The email address for notifications.
|
|
328
|
+
* @property {string} [name] - The name of the webhook configuration.
|
|
329
|
+
* @property {string} [status] - The status of the webhook (e.g., active or inactive).
|
|
330
|
+
* @property {Association} [association]
|
|
331
|
+
* @property {EventMapBody} [event_map]
|
|
332
|
+
*/
|
|
334
333
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
});
|
|
340
|
-
}
|
|
334
|
+
/**
|
|
335
|
+
* @typedef UpsertSubscriberConfig
|
|
336
|
+
* @property {WebhookConfig} webhook_config
|
|
337
|
+
*/
|
|
341
338
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
339
|
+
/**
|
|
340
|
+
* @typedef UpsertSubscriberConfigResult
|
|
341
|
+
* @property {boolean} [status] - The status of the upsert operation (e.g.,
|
|
342
|
+
* success or failure).
|
|
343
|
+
* @property {string} [message] - A message providing details about the upsert
|
|
344
|
+
* operation result.
|
|
345
|
+
*/
|
|
349
346
|
|
|
350
|
-
|
|
351
|
-
static EventProcessReportObject() {
|
|
352
|
-
return Joi.object({
|
|
353
|
-
event_name: Joi.string().allow(""),
|
|
354
|
-
response_code: Joi.number(),
|
|
355
|
-
response_message: Joi.string().allow(""),
|
|
356
|
-
data: Joi.string().allow(""),
|
|
357
|
-
attempt: Joi.number(),
|
|
358
|
-
last_attempted_on: Joi.number(),
|
|
359
|
-
status: Joi.string().allow(""),
|
|
360
|
-
name: Joi.string().allow(""),
|
|
361
|
-
webhook_url: Joi.string().allow(""),
|
|
362
|
-
response_time: Joi.number(),
|
|
363
|
-
message_id: Joi.string().allow(""),
|
|
364
|
-
event_trace_id: Joi.string().allow(""),
|
|
365
|
-
});
|
|
366
|
-
}
|
|
347
|
+
/** @typedef {"active" | "inactive"} SubscriberStatus */
|
|
367
348
|
|
|
349
|
+
class WebhookPlatformModel {
|
|
368
350
|
/** @returns {Page} */
|
|
369
351
|
static Page() {
|
|
370
352
|
return Joi.object({
|
|
@@ -375,26 +357,20 @@ class WebhookPlatformModel {
|
|
|
375
357
|
current: Joi.number(),
|
|
376
358
|
type: Joi.string().allow("").required(),
|
|
377
359
|
size: Joi.number(),
|
|
378
|
-
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/** @returns {PingWebhook} */
|
|
383
|
-
static PingWebhook() {
|
|
384
|
-
return Joi.object({
|
|
385
|
-
webhook_url: Joi.string().allow("").required(),
|
|
386
|
-
auth_meta: Joi.any(),
|
|
387
|
-
custom_headers: Joi.any(),
|
|
360
|
+
page_size: Joi.number(),
|
|
388
361
|
});
|
|
389
362
|
}
|
|
390
363
|
|
|
391
|
-
/** @returns {
|
|
392
|
-
static
|
|
364
|
+
/** @returns {BroadcasterConfig} */
|
|
365
|
+
static BroadcasterConfig() {
|
|
393
366
|
return Joi.object({
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
367
|
+
topic: Joi.string().allow(""),
|
|
368
|
+
queue: Joi.string().allow(""),
|
|
369
|
+
event_bridge_name: Joi.string().allow(""),
|
|
370
|
+
workflow_name: Joi.string().allow(""),
|
|
371
|
+
account_id: Joi.string().allow(""),
|
|
372
|
+
detail_type: Joi.string().allow(""),
|
|
373
|
+
}).allow(null);
|
|
398
374
|
}
|
|
399
375
|
|
|
400
376
|
/** @returns {SubscriberEventMapping} */
|
|
@@ -403,18 +379,32 @@ class WebhookPlatformModel {
|
|
|
403
379
|
id: Joi.number(),
|
|
404
380
|
event_id: Joi.number(),
|
|
405
381
|
subscriber_id: Joi.number(),
|
|
406
|
-
|
|
382
|
+
filters: WebhookPlatformModel.FilterSchema(),
|
|
383
|
+
reducer: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
384
|
+
broadcaster_config: WebhookPlatformModel.BroadcasterConfig(),
|
|
407
385
|
created_on: Joi.string().allow(""),
|
|
408
386
|
});
|
|
409
387
|
}
|
|
410
388
|
|
|
389
|
+
/** @returns {FilterSchema} */
|
|
390
|
+
static FilterSchema() {
|
|
391
|
+
return Joi.object({
|
|
392
|
+
query: Joi.string().allow(""),
|
|
393
|
+
condition: Joi.string().allow(""),
|
|
394
|
+
logic: Joi.string().allow(""),
|
|
395
|
+
conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
396
|
+
}).allow(null);
|
|
397
|
+
}
|
|
398
|
+
|
|
411
399
|
/** @returns {EventConfig} */
|
|
412
400
|
static EventConfig() {
|
|
413
401
|
return Joi.object({
|
|
414
402
|
id: Joi.number(),
|
|
403
|
+
type: Joi.string().allow("").allow(null),
|
|
415
404
|
event_name: Joi.string().allow(""),
|
|
416
405
|
event_type: Joi.string().allow(""),
|
|
417
406
|
event_category: Joi.string().allow(""),
|
|
407
|
+
modified_by: Joi.string().allow(""),
|
|
418
408
|
subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
|
|
419
409
|
event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
420
410
|
group: Joi.string().allow("").allow(null),
|
|
@@ -426,110 +416,13 @@ class WebhookPlatformModel {
|
|
|
426
416
|
});
|
|
427
417
|
}
|
|
428
418
|
|
|
429
|
-
/** @returns {
|
|
430
|
-
static
|
|
419
|
+
/** @returns {EventConfigResult} */
|
|
420
|
+
static EventConfigResult() {
|
|
431
421
|
return Joi.object({
|
|
432
422
|
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
433
423
|
});
|
|
434
424
|
}
|
|
435
425
|
|
|
436
|
-
/** @returns {ReportFiltersPayload} */
|
|
437
|
-
static ReportFiltersPayload() {
|
|
438
|
-
return Joi.object({
|
|
439
|
-
subscriber_ids: Joi.array().items(Joi.number()).required(),
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/** @returns {ReportFilterResponse} */
|
|
444
|
-
static ReportFilterResponse() {
|
|
445
|
-
return Joi.object({
|
|
446
|
-
filter_name: Joi.string().allow(""),
|
|
447
|
-
values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/** @returns {HistoryPayload} */
|
|
452
|
-
static HistoryPayload() {
|
|
453
|
-
return Joi.object({
|
|
454
|
-
type: Joi.string().allow("").required(),
|
|
455
|
-
page_no: Joi.number(),
|
|
456
|
-
page_size: Joi.number(),
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/** @returns {HistoryFilters} */
|
|
461
|
-
static HistoryFilters() {
|
|
462
|
-
return Joi.object({
|
|
463
|
-
events: Joi.array().items(Joi.string().allow("")),
|
|
464
|
-
search_text: Joi.string().allow(""),
|
|
465
|
-
status: Joi.string().allow(""),
|
|
466
|
-
end_date: Joi.string().allow(""),
|
|
467
|
-
start_date: Joi.string().allow(""),
|
|
468
|
-
subscribers: Joi.array().items(Joi.number()),
|
|
469
|
-
webhook_type: Joi.array().items(Joi.string().allow("")),
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/** @returns {Url} */
|
|
474
|
-
static Url() {
|
|
475
|
-
return Joi.object({
|
|
476
|
-
url: Joi.string().allow(""),
|
|
477
|
-
name: Joi.string().allow(""),
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/** @returns {CdnObject} */
|
|
482
|
-
static CdnObject() {
|
|
483
|
-
return Joi.object({
|
|
484
|
-
urls: Joi.array().items(WebhookPlatformModel.Url()),
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/** @returns {UploadServiceObject} */
|
|
489
|
-
static UploadServiceObject() {
|
|
490
|
-
return Joi.object({
|
|
491
|
-
cdn: WebhookPlatformModel.CdnObject(),
|
|
492
|
-
}).allow(null);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/** @returns {HistoryAssociation} */
|
|
496
|
-
static HistoryAssociation() {
|
|
497
|
-
return Joi.object({
|
|
498
|
-
company_id: Joi.number(),
|
|
499
|
-
subscriber_ids: Joi.array().items(Joi.number()),
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/** @returns {HistoryItems} */
|
|
504
|
-
static HistoryItems() {
|
|
505
|
-
return Joi.object({
|
|
506
|
-
id: Joi.number(),
|
|
507
|
-
association: WebhookPlatformModel.HistoryAssociation(),
|
|
508
|
-
filters: WebhookPlatformModel.HistoryFilters(),
|
|
509
|
-
filename: Joi.string().allow(""),
|
|
510
|
-
status: Joi.string().allow(""),
|
|
511
|
-
upload_service_response: WebhookPlatformModel.UploadServiceObject(),
|
|
512
|
-
created_on: Joi.string().allow(""),
|
|
513
|
-
updated_on: Joi.string().allow("").allow(null),
|
|
514
|
-
message: Joi.string().allow(""),
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
/** @returns {HistoryResponse} */
|
|
519
|
-
static HistoryResponse() {
|
|
520
|
-
return Joi.object({
|
|
521
|
-
items: Joi.array().items(WebhookPlatformModel.HistoryItems()),
|
|
522
|
-
page: WebhookPlatformModel.Page(),
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/** @returns {CancelResponse} */
|
|
527
|
-
static CancelResponse() {
|
|
528
|
-
return Joi.object({
|
|
529
|
-
message: Joi.string().allow(""),
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
|
|
533
426
|
/** @returns {Association} */
|
|
534
427
|
static Association() {
|
|
535
428
|
return Joi.object({
|
|
@@ -557,8 +450,8 @@ class WebhookPlatformModel {
|
|
|
557
450
|
});
|
|
558
451
|
}
|
|
559
452
|
|
|
560
|
-
/** @returns {
|
|
561
|
-
static
|
|
453
|
+
/** @returns {SubscriberDetails} */
|
|
454
|
+
static SubscriberDetails() {
|
|
562
455
|
return Joi.object({
|
|
563
456
|
id: Joi.number(),
|
|
564
457
|
modified_by: Joi.string().allow(""),
|
|
@@ -566,7 +459,7 @@ class WebhookPlatformModel {
|
|
|
566
459
|
provider: Joi.string().allow(""),
|
|
567
460
|
webhook_url: Joi.string().allow(""),
|
|
568
461
|
association: WebhookPlatformModel.AssociationResp(),
|
|
569
|
-
custom_headers: Joi.any(),
|
|
462
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
570
463
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
571
464
|
email_id: Joi.string().allow(""),
|
|
572
465
|
updated_on: Joi.string().allow(""),
|
|
@@ -582,6 +475,10 @@ class WebhookPlatformModel {
|
|
|
582
475
|
return Joi.object({
|
|
583
476
|
slug: Joi.string().allow(""),
|
|
584
477
|
topic: Joi.string().allow(""),
|
|
478
|
+
queue: Joi.string().allow(""),
|
|
479
|
+
event_bridge_name: Joi.string().allow(""),
|
|
480
|
+
workflow_name: Joi.string().allow(""),
|
|
481
|
+
detail_type: Joi.string().allow(""),
|
|
585
482
|
});
|
|
586
483
|
}
|
|
587
484
|
|
|
@@ -593,7 +490,7 @@ class WebhookPlatformModel {
|
|
|
593
490
|
webhook_url: Joi.string().allow(""),
|
|
594
491
|
provider: Joi.string().allow("").required(),
|
|
595
492
|
association: WebhookPlatformModel.Association().required(),
|
|
596
|
-
custom_headers: Joi.any(),
|
|
493
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
597
494
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
598
495
|
email_id: Joi.string().allow("").required(),
|
|
599
496
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -610,7 +507,7 @@ class WebhookPlatformModel {
|
|
|
610
507
|
webhook_url: Joi.string().allow(""),
|
|
611
508
|
provider: Joi.string().allow("").required(),
|
|
612
509
|
association: WebhookPlatformModel.Association(),
|
|
613
|
-
custom_headers: Joi.any(),
|
|
510
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
614
511
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
615
512
|
email_id: Joi.string().allow(""),
|
|
616
513
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -625,7 +522,7 @@ class WebhookPlatformModel {
|
|
|
625
522
|
type: Joi.string().allow("").allow(null),
|
|
626
523
|
webhook_url: Joi.string().allow("").required(),
|
|
627
524
|
association: WebhookPlatformModel.Association().required(),
|
|
628
|
-
custom_headers: Joi.any(),
|
|
525
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
629
526
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
630
527
|
email_id: Joi.string().allow("").required(),
|
|
631
528
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -641,7 +538,7 @@ class WebhookPlatformModel {
|
|
|
641
538
|
type: Joi.string().allow("").allow(null),
|
|
642
539
|
webhook_url: Joi.string().allow(""),
|
|
643
540
|
association: WebhookPlatformModel.Association(),
|
|
644
|
-
custom_headers: Joi.any(),
|
|
541
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
645
542
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
646
543
|
email_id: Joi.string().allow(""),
|
|
647
544
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -649,8 +546,8 @@ class WebhookPlatformModel {
|
|
|
649
546
|
});
|
|
650
547
|
}
|
|
651
548
|
|
|
652
|
-
/** @returns {
|
|
653
|
-
static
|
|
549
|
+
/** @returns {SubscriberConfigResult} */
|
|
550
|
+
static SubscriberConfigResult() {
|
|
654
551
|
return Joi.object({
|
|
655
552
|
id: Joi.number(),
|
|
656
553
|
modified_by: Joi.string().allow(""),
|
|
@@ -658,7 +555,7 @@ class WebhookPlatformModel {
|
|
|
658
555
|
webhook_url: Joi.string().allow(""),
|
|
659
556
|
provider: Joi.string().allow(""),
|
|
660
557
|
association: WebhookPlatformModel.AssociationResp(),
|
|
661
|
-
custom_headers: Joi.any(),
|
|
558
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
662
559
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
663
560
|
email_id: Joi.string().allow(""),
|
|
664
561
|
updated_on: Joi.string().allow(""),
|
|
@@ -672,11 +569,165 @@ class WebhookPlatformModel {
|
|
|
672
569
|
/** @returns {SubscriberConfigList} */
|
|
673
570
|
static SubscriberConfigList() {
|
|
674
571
|
return Joi.object({
|
|
675
|
-
items: Joi.array().items(WebhookPlatformModel.
|
|
572
|
+
items: Joi.array().items(WebhookPlatformModel.SubscriberDetails()),
|
|
676
573
|
page: WebhookPlatformModel.Page(),
|
|
677
574
|
});
|
|
678
575
|
}
|
|
679
576
|
|
|
577
|
+
/** @returns {RestEventData} */
|
|
578
|
+
static RestEventData() {
|
|
579
|
+
return Joi.object({
|
|
580
|
+
event_category: Joi.string().allow("").required(),
|
|
581
|
+
event_name: Joi.string().allow("").required(),
|
|
582
|
+
event_type: Joi.string().allow("").required(),
|
|
583
|
+
version: Joi.number().required(),
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/** @returns {RestConfig} */
|
|
588
|
+
static RestConfig() {
|
|
589
|
+
return Joi.object({
|
|
590
|
+
webhook_url: Joi.string().allow("").required(),
|
|
591
|
+
type: Joi.string().allow("").required(),
|
|
592
|
+
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
593
|
+
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
594
|
+
events: Joi.array()
|
|
595
|
+
.items(WebhookPlatformModel.RestEventData())
|
|
596
|
+
.required(),
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/** @returns {QueueEventData} */
|
|
601
|
+
static QueueEventData() {
|
|
602
|
+
return Joi.object({
|
|
603
|
+
event_category: Joi.string().allow("").required(),
|
|
604
|
+
event_name: Joi.string().allow("").required(),
|
|
605
|
+
event_type: Joi.string().allow("").required(),
|
|
606
|
+
version: Joi.number().required(),
|
|
607
|
+
topic: Joi.string().allow("").required(),
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/** @returns {KafkaConfig} */
|
|
612
|
+
static KafkaConfig() {
|
|
613
|
+
return Joi.object({
|
|
614
|
+
type: Joi.string().allow("").allow(null),
|
|
615
|
+
events: Joi.array()
|
|
616
|
+
.items(WebhookPlatformModel.QueueEventData())
|
|
617
|
+
.required(),
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** @returns {PubSubConfig} */
|
|
622
|
+
static PubSubConfig() {
|
|
623
|
+
return Joi.object({
|
|
624
|
+
type: Joi.string().allow("").allow(null),
|
|
625
|
+
events: Joi.array()
|
|
626
|
+
.items(WebhookPlatformModel.QueueEventData())
|
|
627
|
+
.required(),
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/** @returns {TemporalEventData} */
|
|
632
|
+
static TemporalEventData() {
|
|
633
|
+
return Joi.object({
|
|
634
|
+
event_category: Joi.string().allow("").required(),
|
|
635
|
+
event_name: Joi.string().allow("").required(),
|
|
636
|
+
event_type: Joi.string().allow("").required(),
|
|
637
|
+
version: Joi.number().required(),
|
|
638
|
+
queue: Joi.string().allow(""),
|
|
639
|
+
workflow_name: Joi.string().allow(""),
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/** @returns {TemporalConfig} */
|
|
644
|
+
static TemporalConfig() {
|
|
645
|
+
return Joi.object({
|
|
646
|
+
type: Joi.string().allow("").allow(null),
|
|
647
|
+
events: Joi.array()
|
|
648
|
+
.items(WebhookPlatformModel.TemporalEventData())
|
|
649
|
+
.required(),
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/** @returns {SqsEventData} */
|
|
654
|
+
static SqsEventData() {
|
|
655
|
+
return Joi.object({
|
|
656
|
+
event_category: Joi.string().allow("").required(),
|
|
657
|
+
event_name: Joi.string().allow("").required(),
|
|
658
|
+
event_type: Joi.string().allow("").required(),
|
|
659
|
+
version: Joi.number().required(),
|
|
660
|
+
queue: Joi.string().allow(""),
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/** @returns {SqsConfig} */
|
|
665
|
+
static SqsConfig() {
|
|
666
|
+
return Joi.object({
|
|
667
|
+
type: Joi.string().allow("").allow(null),
|
|
668
|
+
events: Joi.array().items(WebhookPlatformModel.SqsEventData()).required(),
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/** @returns {EventBridgeData} */
|
|
673
|
+
static EventBridgeData() {
|
|
674
|
+
return Joi.object({
|
|
675
|
+
event_category: Joi.string().allow("").required(),
|
|
676
|
+
event_name: Joi.string().allow("").required(),
|
|
677
|
+
event_type: Joi.string().allow("").required(),
|
|
678
|
+
version: Joi.number().required(),
|
|
679
|
+
event_bridge_name: Joi.string().allow(""),
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/** @returns {EventBridgeConfig} */
|
|
684
|
+
static EventBridgeConfig() {
|
|
685
|
+
return Joi.object({
|
|
686
|
+
type: Joi.string().allow("").allow(null),
|
|
687
|
+
events: Joi.array()
|
|
688
|
+
.items(WebhookPlatformModel.EventBridgeData())
|
|
689
|
+
.required(),
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/** @returns {EventMapBody} */
|
|
694
|
+
static EventMapBody() {
|
|
695
|
+
return Joi.object({
|
|
696
|
+
rest: WebhookPlatformModel.RestConfig(),
|
|
697
|
+
kafka: WebhookPlatformModel.KafkaConfig(),
|
|
698
|
+
pub_sub: WebhookPlatformModel.PubSubConfig(),
|
|
699
|
+
temporal: WebhookPlatformModel.TemporalConfig(),
|
|
700
|
+
sqs: WebhookPlatformModel.SqsConfig(),
|
|
701
|
+
event_bridge: WebhookPlatformModel.EventBridgeConfig(),
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/** @returns {WebhookConfig} */
|
|
706
|
+
static WebhookConfig() {
|
|
707
|
+
return Joi.object({
|
|
708
|
+
notification_email: Joi.string().allow(""),
|
|
709
|
+
name: Joi.string().allow(""),
|
|
710
|
+
status: Joi.string().allow(""),
|
|
711
|
+
association: WebhookPlatformModel.Association(),
|
|
712
|
+
event_map: WebhookPlatformModel.EventMapBody(),
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/** @returns {UpsertSubscriberConfig} */
|
|
717
|
+
static UpsertSubscriberConfig() {
|
|
718
|
+
return Joi.object({
|
|
719
|
+
webhook_config: WebhookPlatformModel.WebhookConfig().required(),
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/** @returns {UpsertSubscriberConfigResult} */
|
|
724
|
+
static UpsertSubscriberConfigResult() {
|
|
725
|
+
return Joi.object({
|
|
726
|
+
status: Joi.boolean(),
|
|
727
|
+
message: Joi.string().allow(""),
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
|
|
680
731
|
/**
|
|
681
732
|
* Enum: SubscriberStatus Used By: Webhook
|
|
682
733
|
*
|