@gofynd/fdk-client-javascript 1.4.16-beta.3 → 1.4.16-beta.4
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 +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
- package/sdk/application/Cart/CartApplicationClient.js +27 -117
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
- package/sdk/application/Catalog/CatalogApplicationClient.js +29 -30
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
- package/sdk/application/Content/ContentApplicationClient.d.ts +30 -51
- package/sdk/application/Content/ContentApplicationClient.js +56 -161
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -9
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
- package/sdk/application/Logistic/LogisticApplicationClient.js +8 -101
- package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
- package/sdk/application/Order/OrderApplicationClient.js +8 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
- package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +2 -4
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +6 -6
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/common/Utility.js +6 -3
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +37 -96
- package/sdk/partner/Theme/ThemePartnerModel.js +36 -90
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -121
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1294 -5068
- package/sdk/platform/Cart/CartPlatformModel.js +1217 -1992
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
- package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6389
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1681 -3222
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
- package/sdk/platform/Common/CommonPlatformClient.js +2 -3
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -204
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +475 -1073
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -253
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -256
- package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
- package/sdk/platform/Content/ContentPlatformClient.js +336 -523
- package/sdk/platform/Content/ContentPlatformModel.d.ts +403 -1375
- package/sdk/platform/Content/ContentPlatformModel.js +394 -631
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
- package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
- package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
- package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
- package/sdk/platform/Order/OrderPlatformClient.js +198 -416
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
- package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
- package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
- package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- 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 +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +49 -45
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -3
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +7 -46
- package/sdk/platform/Share/SharePlatformModel.js +6 -31
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +11 -37
- package/sdk/platform/Theme/ThemePlatformModel.js +15 -33
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
- package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -6
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
- package/sdk/public/Content/ContentPublicClient.js +6 -810
- package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
- package/sdk/public/Content/ContentPublicModel.js +3 -649
- package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
- package/sdk/public/Content/ContentPublicValidator.js +2 -88
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -111
|
@@ -1,5 +1,50 @@
|
|
|
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
|
+
|
|
3
48
|
/**
|
|
4
49
|
* @typedef Page
|
|
5
50
|
* @property {number} [item_total] - The total number of items on the page.
|
|
@@ -12,317 +57,309 @@ const Joi = require("joi");
|
|
|
12
57
|
*/
|
|
13
58
|
|
|
14
59
|
/**
|
|
15
|
-
* @typedef
|
|
16
|
-
* @property {string}
|
|
17
|
-
* @property {
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
60
|
+
* @typedef PingWebhook
|
|
61
|
+
* @property {string} webhook_url - The URL of the subscriber's webhook to ping.
|
|
62
|
+
* @property {Object} [auth_meta] - Authentication metadata (if required by the
|
|
63
|
+
* subscriber).
|
|
64
|
+
* @property {Object} [custom_headers] - Custom headers to include in the ping request.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @typedef PingWebhookResponse
|
|
69
|
+
* @property {string} [status] - The status of the ping (e.g., "SUCCESS").
|
|
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).
|
|
25
72
|
*/
|
|
26
73
|
|
|
27
74
|
/**
|
|
28
75
|
* @typedef SubscriberEventMapping
|
|
29
|
-
* @property {number} [id]
|
|
30
|
-
* @property {number} [event_id]
|
|
31
|
-
* @property {number} [subscriber_id]
|
|
32
|
-
* @property {
|
|
33
|
-
* @property {string} [created_on]
|
|
34
|
-
* mapping was created.
|
|
76
|
+
* @property {number} [id]
|
|
77
|
+
* @property {number} [event_id]
|
|
78
|
+
* @property {number} [subscriber_id]
|
|
79
|
+
* @property {string} [topic]
|
|
80
|
+
* @property {string} [created_on]
|
|
35
81
|
*/
|
|
36
82
|
|
|
37
83
|
/**
|
|
38
84
|
* @typedef EventConfig
|
|
39
|
-
* @property {number} [id]
|
|
40
|
-
* @property {string} [
|
|
41
|
-
* @property {string} [
|
|
42
|
-
* @property {string} [
|
|
43
|
-
* @property {string} [event_category] - The category of the event.
|
|
44
|
-
* @property {string} [modified_by] - The identifier of the user who last
|
|
45
|
-
* modified the event configuration.
|
|
85
|
+
* @property {number} [id]
|
|
86
|
+
* @property {string} [event_name]
|
|
87
|
+
* @property {string} [event_type]
|
|
88
|
+
* @property {string} [event_category]
|
|
46
89
|
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
47
|
-
* @property {Object} [event_schema]
|
|
48
|
-
*
|
|
49
|
-
* @property {string} [
|
|
50
|
-
*
|
|
51
|
-
* @property {string} [
|
|
52
|
-
* @property {string} [
|
|
53
|
-
* @property {string} [
|
|
54
|
-
* which may be null.
|
|
55
|
-
* @property {string} [created_on] - The date and time when the event
|
|
56
|
-
* configuration was created.
|
|
57
|
-
* @property {string} [updated_on] - The date and time when the event
|
|
58
|
-
* configuration was last updated.
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @typedef EventConfigResult
|
|
63
|
-
* @property {EventConfig[]} [event_configs]
|
|
90
|
+
* @property {Object} [event_schema]
|
|
91
|
+
* @property {string} [group]
|
|
92
|
+
* @property {string} [version]
|
|
93
|
+
* @property {string} [display_name]
|
|
94
|
+
* @property {string} [description]
|
|
95
|
+
* @property {string} [created_on]
|
|
96
|
+
* @property {string} [updated_on]
|
|
64
97
|
*/
|
|
65
98
|
|
|
66
99
|
/**
|
|
67
|
-
* @typedef
|
|
68
|
-
* @property {
|
|
69
|
-
* with the association.
|
|
70
|
-
* @property {string} [extension_id] - The extension ID associated with the association.
|
|
71
|
-
* @property {string} [criteria] - The criteria for the association, such as
|
|
72
|
-
* "ALL", "EMPTY", or "SPECIFIC-EVENTS".
|
|
100
|
+
* @typedef EventConfigResponse
|
|
101
|
+
* @property {EventConfig[]} [event_configs]
|
|
73
102
|
*/
|
|
74
103
|
|
|
75
104
|
/**
|
|
76
|
-
* @typedef
|
|
77
|
-
* @property {number
|
|
78
|
-
*
|
|
79
|
-
* with the response.
|
|
80
|
-
* @property {string} [extension_id] - The extension ID associated with the response.
|
|
81
|
-
* @property {string} [criteria] - The criteria for the response, such as "ALL",
|
|
82
|
-
* "EMPTY", or "SPECIFIC-EVENTS".
|
|
105
|
+
* @typedef ReportFiltersPayload
|
|
106
|
+
* @property {number[]} subscriber_ids - An array of subscriber IDs for
|
|
107
|
+
* filtering filters (optional).
|
|
83
108
|
*/
|
|
84
109
|
|
|
85
110
|
/**
|
|
86
|
-
* @typedef
|
|
87
|
-
* @property {string} [
|
|
88
|
-
* @property {
|
|
111
|
+
* @typedef ReportFilterResponse
|
|
112
|
+
* @property {string} [filter_name] - The name of the filter.
|
|
113
|
+
* @property {Object[]} [values]
|
|
89
114
|
*/
|
|
90
115
|
|
|
91
116
|
/**
|
|
92
|
-
* @typedef
|
|
93
|
-
* @property {
|
|
94
|
-
* @property {
|
|
95
|
-
*
|
|
96
|
-
* @property {string} [name] - The name of the subscriber.
|
|
97
|
-
* @property {string} [provider] - The provider of the subscriber.
|
|
98
|
-
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
99
|
-
* @property {AssociationResp} [association]
|
|
100
|
-
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
101
|
-
* @property {SubscriberStatus} [status]
|
|
102
|
-
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
103
|
-
* @property {string} [updated_on] - The date and time when the subscriber
|
|
104
|
-
* details were last updated.
|
|
105
|
-
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
106
|
-
* @property {string} [type] - The type of subscriber, which can either be passed as null.
|
|
107
|
-
* @property {AuthMeta} [auth_meta]
|
|
108
|
-
* @property {EventConfig[]} [event_configs]
|
|
117
|
+
* @typedef HistoryPayload
|
|
118
|
+
* @property {string} type - The type of history report (e.g., "platform").
|
|
119
|
+
* @property {number} [page_no] - The page number of the history report.
|
|
120
|
+
* @property {number} [page_size] - The number of records per page.
|
|
109
121
|
*/
|
|
110
122
|
|
|
111
123
|
/**
|
|
112
|
-
* @typedef
|
|
113
|
-
* @property {string} [
|
|
114
|
-
* @property {string} [
|
|
115
|
-
* @property {string} [
|
|
116
|
-
*
|
|
117
|
-
* @property {string} [
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
124
|
+
* @typedef HistoryFilters
|
|
125
|
+
* @property {string[]} [events]
|
|
126
|
+
* @property {string} [search_text]
|
|
127
|
+
* @property {string} [status] - The status of the history report (e.g., "FAILED").
|
|
128
|
+
* @property {string} [end_date] - The end date and time of the history report.
|
|
129
|
+
* @property {string} [start_date] - The start date and time of the history report.
|
|
130
|
+
* @property {number[]} [subscribers] - An array of subscriber IDs associated
|
|
131
|
+
* with the history report.
|
|
132
|
+
* @property {string[]} [webhook_type] - An array of webhook type to identify
|
|
133
|
+
* thetype of subscriber i.e (KAFKA or REST).
|
|
122
134
|
*/
|
|
123
135
|
|
|
124
136
|
/**
|
|
125
|
-
* @typedef
|
|
126
|
-
* @property {string}
|
|
127
|
-
* @property {string} [
|
|
128
|
-
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
129
|
-
* @property {string} provider - The provider of the subscriber.
|
|
130
|
-
* @property {Association} association
|
|
131
|
-
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
132
|
-
* @property {SubscriberStatus} status
|
|
133
|
-
* @property {string} email_id - The email ID associated with the subscriber.
|
|
134
|
-
* @property {AuthMeta} [auth_meta]
|
|
135
|
-
* @property {Events[]} events - The list of events associated with the subscriber.
|
|
137
|
+
* @typedef Url
|
|
138
|
+
* @property {string} [url] - The URL of the uploaded report file.
|
|
139
|
+
* @property {string} [name] - The name of the uploaded report file.
|
|
136
140
|
*/
|
|
137
141
|
|
|
138
142
|
/**
|
|
139
|
-
* @typedef
|
|
140
|
-
* @property {
|
|
141
|
-
* @property {string} [name] - The name of the subscriber.
|
|
142
|
-
* @property {string} [type] - The type of the subscriber, which may be null.
|
|
143
|
-
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
144
|
-
* @property {string} provider - The provider of the subscriber.
|
|
145
|
-
* @property {Association} [association]
|
|
146
|
-
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
147
|
-
* @property {SubscriberStatus} status
|
|
148
|
-
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
149
|
-
* @property {AuthMeta} [auth_meta]
|
|
150
|
-
* @property {Events[]} [events] - The list of events associated with the subscriber.
|
|
143
|
+
* @typedef CdnObject
|
|
144
|
+
* @property {Url[]} [urls]
|
|
151
145
|
*/
|
|
152
146
|
|
|
153
147
|
/**
|
|
154
|
-
* @typedef
|
|
155
|
-
* @property {
|
|
156
|
-
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
157
|
-
* @property {string} webhook_url - The URL for the subscriber's webhook.
|
|
158
|
-
* @property {Association} association
|
|
159
|
-
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
160
|
-
* @property {SubscriberStatus} status
|
|
161
|
-
* @property {string} email_id - The email ID associated with the subscriber.
|
|
162
|
-
* @property {AuthMeta} [auth_meta]
|
|
163
|
-
* @property {number[]} event_id - The list of event IDs associated with the subscriber.
|
|
148
|
+
* @typedef UploadServiceObject
|
|
149
|
+
* @property {CdnObject} [cdn]
|
|
164
150
|
*/
|
|
165
151
|
|
|
166
152
|
/**
|
|
167
|
-
* @typedef
|
|
168
|
-
* @property {number}
|
|
169
|
-
* @property {
|
|
170
|
-
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
171
|
-
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
172
|
-
* @property {Association} [association]
|
|
173
|
-
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
174
|
-
* @property {SubscriberStatus} [status]
|
|
175
|
-
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
176
|
-
* @property {AuthMeta} [auth_meta]
|
|
177
|
-
* @property {number[]} event_id - The list of event IDs associated with the subscriber.
|
|
153
|
+
* @typedef HistoryAssociation
|
|
154
|
+
* @property {number} [company_id]
|
|
155
|
+
* @property {number[]} [subscriber_ids]
|
|
178
156
|
*/
|
|
179
157
|
|
|
180
158
|
/**
|
|
181
|
-
* @typedef
|
|
182
|
-
* @property {number} [id] - The
|
|
183
|
-
* @property {
|
|
184
|
-
*
|
|
185
|
-
* @property {string} [
|
|
186
|
-
* @property {string} [
|
|
187
|
-
* @property {
|
|
188
|
-
* @property {
|
|
189
|
-
*
|
|
190
|
-
* @property {
|
|
191
|
-
*
|
|
192
|
-
* @property {string} [
|
|
193
|
-
* last updated.
|
|
194
|
-
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
195
|
-
* @property {string} [type] - The type of the subscriber, which can be null.
|
|
196
|
-
* @property {AuthMeta} [auth_meta]
|
|
197
|
-
* @property {number[]} [event_id] - The list of event IDs associated with the subscriber.
|
|
159
|
+
* @typedef HistoryItems
|
|
160
|
+
* @property {number} [id] - The ID of the history report.
|
|
161
|
+
* @property {HistoryAssociation} [association]
|
|
162
|
+
* @property {HistoryFilters} [filters]
|
|
163
|
+
* @property {string} [filename] - The filename of the history report.
|
|
164
|
+
* @property {string} [status] - The status of the history report (e.g., "COMPLETED").
|
|
165
|
+
* @property {UploadServiceObject} [upload_service_response]
|
|
166
|
+
* @property {string} [created_on] - The date and time when the history report
|
|
167
|
+
* was created.
|
|
168
|
+
* @property {string} [updated_on] - The date and time when the history report
|
|
169
|
+
* was last updated.
|
|
170
|
+
* @property {string} [message] - A message related to the history report.
|
|
198
171
|
*/
|
|
199
172
|
|
|
200
173
|
/**
|
|
201
|
-
* @typedef
|
|
202
|
-
* @property {
|
|
174
|
+
* @typedef HistoryResponse
|
|
175
|
+
* @property {HistoryItems[]} [items]
|
|
203
176
|
* @property {Page} [page]
|
|
204
177
|
*/
|
|
205
178
|
|
|
206
179
|
/**
|
|
207
|
-
* @typedef
|
|
208
|
-
* @property {string}
|
|
209
|
-
* @property {string} event_name - The name of the event.
|
|
210
|
-
* @property {string} event_type - The type of the event.
|
|
211
|
-
* @property {number} version - The version number of the event.
|
|
180
|
+
* @typedef CancelResponse
|
|
181
|
+
* @property {string} [message] - The HTTP status code of the response (e.g., 200).
|
|
212
182
|
*/
|
|
213
183
|
|
|
214
184
|
/**
|
|
215
|
-
* @typedef
|
|
216
|
-
* @property {string}
|
|
217
|
-
* @property {string}
|
|
218
|
-
* @property {
|
|
219
|
-
* @property {AuthMeta} [auth_meta]
|
|
220
|
-
* @property {RestEventData[]} events
|
|
185
|
+
* @typedef Association
|
|
186
|
+
* @property {string[]} [application_id]
|
|
187
|
+
* @property {string} [extension_id]
|
|
188
|
+
* @property {string} [criteria]
|
|
221
189
|
*/
|
|
222
190
|
|
|
223
191
|
/**
|
|
224
|
-
* @typedef
|
|
225
|
-
* @property {
|
|
226
|
-
* @property {string}
|
|
227
|
-
* @property {string}
|
|
228
|
-
* @property {
|
|
229
|
-
* @property {string} topic - The topic associated with the event.
|
|
192
|
+
* @typedef AssociationResp
|
|
193
|
+
* @property {number} [company_id]
|
|
194
|
+
* @property {string[]} [application_id]
|
|
195
|
+
* @property {string} [extension_id]
|
|
196
|
+
* @property {string} [criteria]
|
|
230
197
|
*/
|
|
231
198
|
|
|
232
199
|
/**
|
|
233
|
-
* @typedef
|
|
200
|
+
* @typedef AuthMeta
|
|
234
201
|
* @property {string} [type]
|
|
235
|
-
* @property {
|
|
202
|
+
* @property {string} [secret]
|
|
236
203
|
*/
|
|
237
204
|
|
|
238
205
|
/**
|
|
239
|
-
* @typedef
|
|
206
|
+
* @typedef SubscriberResponse
|
|
207
|
+
* @property {number} [id]
|
|
208
|
+
* @property {string} [modified_by]
|
|
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]
|
|
240
218
|
* @property {string} [type]
|
|
241
|
-
* @property {
|
|
219
|
+
* @property {AuthMeta} [auth_meta]
|
|
220
|
+
* @property {EventConfig[]} [event_configs]
|
|
242
221
|
*/
|
|
243
222
|
|
|
244
223
|
/**
|
|
245
|
-
* @typedef
|
|
246
|
-
* @property {string}
|
|
247
|
-
* @property {string}
|
|
248
|
-
* @property {string} event_type - The type of the event.
|
|
249
|
-
* @property {number} version - The version number of the event.
|
|
250
|
-
* @property {string} [queue] - The queue associated with the event.
|
|
251
|
-
* @property {string} [workflow_name] - The workflow name related to the event.
|
|
224
|
+
* @typedef Events
|
|
225
|
+
* @property {string} [slug]
|
|
226
|
+
* @property {string} [topic]
|
|
252
227
|
*/
|
|
253
228
|
|
|
254
229
|
/**
|
|
255
|
-
* @typedef
|
|
256
|
-
* @property {string}
|
|
257
|
-
* @property {
|
|
230
|
+
* @typedef SubscriberConfigPostRequestV2
|
|
231
|
+
* @property {string} name
|
|
232
|
+
* @property {string} [webhook_url]
|
|
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
|
|
258
240
|
*/
|
|
259
241
|
|
|
260
242
|
/**
|
|
261
|
-
* @typedef
|
|
262
|
-
* @property {
|
|
263
|
-
* @property {string}
|
|
264
|
-
* @property {string}
|
|
265
|
-
* @property {
|
|
266
|
-
* @property {
|
|
243
|
+
* @typedef SubscriberConfigUpdateRequestV2
|
|
244
|
+
* @property {number} id
|
|
245
|
+
* @property {string} [name]
|
|
246
|
+
* @property {string} [webhook_url]
|
|
247
|
+
* @property {string} provider
|
|
248
|
+
* @property {Association} [association]
|
|
249
|
+
* @property {Object} [custom_headers]
|
|
250
|
+
* @property {SubscriberStatus} status
|
|
251
|
+
* @property {string} [email_id]
|
|
252
|
+
* @property {AuthMeta} [auth_meta]
|
|
253
|
+
* @property {Events[]} [events]
|
|
267
254
|
*/
|
|
268
255
|
|
|
269
256
|
/**
|
|
270
|
-
* @typedef
|
|
271
|
-
* @property {string}
|
|
272
|
-
* @property {
|
|
257
|
+
* @typedef SubscriberConfigPost
|
|
258
|
+
* @property {string} name
|
|
259
|
+
* @property {string} webhook_url
|
|
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
|
|
273
266
|
*/
|
|
274
267
|
|
|
275
268
|
/**
|
|
276
|
-
* @typedef
|
|
277
|
-
* @property {
|
|
278
|
-
* @property {string}
|
|
279
|
-
* @property {string}
|
|
280
|
-
* @property {
|
|
281
|
-
* @property {
|
|
282
|
-
*
|
|
269
|
+
* @typedef SubscriberConfigUpdate
|
|
270
|
+
* @property {number} id
|
|
271
|
+
* @property {string} [name]
|
|
272
|
+
* @property {string} [webhook_url]
|
|
273
|
+
* @property {Association} [association]
|
|
274
|
+
* @property {Object} [custom_headers]
|
|
275
|
+
* @property {SubscriberStatus} [status]
|
|
276
|
+
* @property {string} [email_id]
|
|
277
|
+
* @property {AuthMeta} [auth_meta]
|
|
278
|
+
* @property {number[]} event_id
|
|
283
279
|
*/
|
|
284
280
|
|
|
285
281
|
/**
|
|
286
|
-
* @typedef
|
|
282
|
+
* @typedef SubscriberConfigResponse
|
|
283
|
+
* @property {number} [id]
|
|
284
|
+
* @property {string} [modified_by]
|
|
285
|
+
* @property {string} [name]
|
|
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]
|
|
287
294
|
* @property {string} [type]
|
|
288
|
-
* @property {
|
|
295
|
+
* @property {AuthMeta} [auth_meta]
|
|
296
|
+
* @property {number[]} [event_id]
|
|
289
297
|
*/
|
|
290
298
|
|
|
291
299
|
/**
|
|
292
|
-
* @typedef
|
|
293
|
-
* @property {
|
|
294
|
-
* @property {
|
|
295
|
-
* @property {PubSubConfig} [pub_sub]
|
|
296
|
-
* @property {TemporalConfig} [temporal]
|
|
297
|
-
* @property {SqsConfig} [sqs]
|
|
298
|
-
* @property {EventBridgeConfig} [event_bridge]
|
|
300
|
+
* @typedef SubscriberConfigList
|
|
301
|
+
* @property {SubscriberResponse[]} [items]
|
|
302
|
+
* @property {Page} [page]
|
|
299
303
|
*/
|
|
300
304
|
|
|
301
|
-
/**
|
|
302
|
-
* @typedef WebhookConfig
|
|
303
|
-
* @property {string} [notification_email] - The email address for notifications.
|
|
304
|
-
* @property {string} [name] - The name of the webhook configuration.
|
|
305
|
-
* @property {string} [status] - The status of the webhook (e.g., active or inactive).
|
|
306
|
-
* @property {Association} [association]
|
|
307
|
-
* @property {EventMapBody} [event_map]
|
|
308
|
-
*/
|
|
305
|
+
/** @typedef {"active" | "inactive"} SubscriberStatus */
|
|
309
306
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
307
|
+
class WebhookPlatformModel {
|
|
308
|
+
/** @returns {Event} */
|
|
309
|
+
static Event() {
|
|
310
|
+
return Joi.object({
|
|
311
|
+
event_name: Joi.string().allow(""),
|
|
312
|
+
event_type: Joi.string().allow(""),
|
|
313
|
+
event_category: Joi.string().allow(""),
|
|
314
|
+
version: Joi.string().allow(""),
|
|
315
|
+
});
|
|
316
|
+
}
|
|
314
317
|
|
|
315
|
-
/**
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
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
|
+
}
|
|
322
329
|
|
|
323
|
-
/** @
|
|
330
|
+
/** @returns {DownloadReportResponse} */
|
|
331
|
+
static DownloadReportResponse() {
|
|
332
|
+
return Joi.object({
|
|
333
|
+
file_name: Joi.string().allow(""),
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/** @returns {EventProcessReports} */
|
|
338
|
+
static EventProcessReports() {
|
|
339
|
+
return Joi.object({
|
|
340
|
+
rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
|
|
341
|
+
page: WebhookPlatformModel.Page(),
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/** @returns {EventProcessReportObject} */
|
|
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
|
+
}
|
|
324
362
|
|
|
325
|
-
class WebhookPlatformModel {
|
|
326
363
|
/** @returns {Page} */
|
|
327
364
|
static Page() {
|
|
328
365
|
return Joi.object({
|
|
@@ -336,16 +373,22 @@ class WebhookPlatformModel {
|
|
|
336
373
|
});
|
|
337
374
|
}
|
|
338
375
|
|
|
339
|
-
/** @returns {
|
|
340
|
-
static
|
|
376
|
+
/** @returns {PingWebhook} */
|
|
377
|
+
static PingWebhook() {
|
|
341
378
|
return Joi.object({
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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() {
|
|
387
|
+
return Joi.object({
|
|
388
|
+
status: Joi.string().allow(""),
|
|
389
|
+
message: Joi.string().allow(""),
|
|
390
|
+
code: Joi.number(),
|
|
391
|
+
});
|
|
349
392
|
}
|
|
350
393
|
|
|
351
394
|
/** @returns {SubscriberEventMapping} */
|
|
@@ -354,7 +397,7 @@ class WebhookPlatformModel {
|
|
|
354
397
|
id: Joi.number(),
|
|
355
398
|
event_id: Joi.number(),
|
|
356
399
|
subscriber_id: Joi.number(),
|
|
357
|
-
|
|
400
|
+
topic: Joi.string().allow("").allow(null),
|
|
358
401
|
created_on: Joi.string().allow(""),
|
|
359
402
|
});
|
|
360
403
|
}
|
|
@@ -363,11 +406,9 @@ class WebhookPlatformModel {
|
|
|
363
406
|
static EventConfig() {
|
|
364
407
|
return Joi.object({
|
|
365
408
|
id: Joi.number(),
|
|
366
|
-
type: Joi.string().allow("").allow(null),
|
|
367
409
|
event_name: Joi.string().allow(""),
|
|
368
410
|
event_type: Joi.string().allow(""),
|
|
369
411
|
event_category: Joi.string().allow(""),
|
|
370
|
-
modified_by: Joi.string().allow(""),
|
|
371
412
|
subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
|
|
372
413
|
event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
373
414
|
group: Joi.string().allow("").allow(null),
|
|
@@ -379,13 +420,110 @@ class WebhookPlatformModel {
|
|
|
379
420
|
});
|
|
380
421
|
}
|
|
381
422
|
|
|
382
|
-
/** @returns {
|
|
383
|
-
static
|
|
423
|
+
/** @returns {EventConfigResponse} */
|
|
424
|
+
static EventConfigResponse() {
|
|
384
425
|
return Joi.object({
|
|
385
426
|
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
386
427
|
});
|
|
387
428
|
}
|
|
388
429
|
|
|
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
|
+
|
|
389
527
|
/** @returns {Association} */
|
|
390
528
|
static Association() {
|
|
391
529
|
return Joi.object({
|
|
@@ -413,8 +551,8 @@ class WebhookPlatformModel {
|
|
|
413
551
|
});
|
|
414
552
|
}
|
|
415
553
|
|
|
416
|
-
/** @returns {
|
|
417
|
-
static
|
|
554
|
+
/** @returns {SubscriberResponse} */
|
|
555
|
+
static SubscriberResponse() {
|
|
418
556
|
return Joi.object({
|
|
419
557
|
id: Joi.number(),
|
|
420
558
|
modified_by: Joi.string().allow(""),
|
|
@@ -422,7 +560,7 @@ class WebhookPlatformModel {
|
|
|
422
560
|
provider: Joi.string().allow(""),
|
|
423
561
|
webhook_url: Joi.string().allow(""),
|
|
424
562
|
association: WebhookPlatformModel.AssociationResp(),
|
|
425
|
-
custom_headers: Joi.
|
|
563
|
+
custom_headers: Joi.any(),
|
|
426
564
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
427
565
|
email_id: Joi.string().allow(""),
|
|
428
566
|
updated_on: Joi.string().allow(""),
|
|
@@ -438,10 +576,6 @@ class WebhookPlatformModel {
|
|
|
438
576
|
return Joi.object({
|
|
439
577
|
slug: Joi.string().allow(""),
|
|
440
578
|
topic: Joi.string().allow(""),
|
|
441
|
-
queue: Joi.string().allow(""),
|
|
442
|
-
event_bridge_name: Joi.string().allow(""),
|
|
443
|
-
workflow_name: Joi.string().allow(""),
|
|
444
|
-
detail_type: Joi.string().allow(""),
|
|
445
579
|
});
|
|
446
580
|
}
|
|
447
581
|
|
|
@@ -449,11 +583,10 @@ class WebhookPlatformModel {
|
|
|
449
583
|
static SubscriberConfigPostRequestV2() {
|
|
450
584
|
return Joi.object({
|
|
451
585
|
name: Joi.string().allow("").required(),
|
|
452
|
-
type: Joi.string().allow("").allow(null),
|
|
453
586
|
webhook_url: Joi.string().allow(""),
|
|
454
587
|
provider: Joi.string().allow("").required(),
|
|
455
588
|
association: WebhookPlatformModel.Association().required(),
|
|
456
|
-
custom_headers: Joi.
|
|
589
|
+
custom_headers: Joi.any(),
|
|
457
590
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
458
591
|
email_id: Joi.string().allow("").required(),
|
|
459
592
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -466,11 +599,10 @@ class WebhookPlatformModel {
|
|
|
466
599
|
return Joi.object({
|
|
467
600
|
id: Joi.number().required(),
|
|
468
601
|
name: Joi.string().allow(""),
|
|
469
|
-
type: Joi.string().allow("").allow(null),
|
|
470
602
|
webhook_url: Joi.string().allow(""),
|
|
471
603
|
provider: Joi.string().allow("").required(),
|
|
472
604
|
association: WebhookPlatformModel.Association(),
|
|
473
|
-
custom_headers: Joi.
|
|
605
|
+
custom_headers: Joi.any(),
|
|
474
606
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
475
607
|
email_id: Joi.string().allow(""),
|
|
476
608
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -482,10 +614,9 @@ class WebhookPlatformModel {
|
|
|
482
614
|
static SubscriberConfigPost() {
|
|
483
615
|
return Joi.object({
|
|
484
616
|
name: Joi.string().allow("").required(),
|
|
485
|
-
type: Joi.string().allow("").allow(null),
|
|
486
617
|
webhook_url: Joi.string().allow("").required(),
|
|
487
618
|
association: WebhookPlatformModel.Association().required(),
|
|
488
|
-
custom_headers: Joi.
|
|
619
|
+
custom_headers: Joi.any(),
|
|
489
620
|
status: WebhookPlatformModel.SubscriberStatus().required(),
|
|
490
621
|
email_id: Joi.string().allow("").required(),
|
|
491
622
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -498,10 +629,9 @@ class WebhookPlatformModel {
|
|
|
498
629
|
return Joi.object({
|
|
499
630
|
id: Joi.number().required(),
|
|
500
631
|
name: Joi.string().allow(""),
|
|
501
|
-
type: Joi.string().allow("").allow(null),
|
|
502
632
|
webhook_url: Joi.string().allow(""),
|
|
503
633
|
association: WebhookPlatformModel.Association(),
|
|
504
|
-
custom_headers: Joi.
|
|
634
|
+
custom_headers: Joi.any(),
|
|
505
635
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
506
636
|
email_id: Joi.string().allow(""),
|
|
507
637
|
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
@@ -509,8 +639,8 @@ class WebhookPlatformModel {
|
|
|
509
639
|
});
|
|
510
640
|
}
|
|
511
641
|
|
|
512
|
-
/** @returns {
|
|
513
|
-
static
|
|
642
|
+
/** @returns {SubscriberConfigResponse} */
|
|
643
|
+
static SubscriberConfigResponse() {
|
|
514
644
|
return Joi.object({
|
|
515
645
|
id: Joi.number(),
|
|
516
646
|
modified_by: Joi.string().allow(""),
|
|
@@ -518,7 +648,7 @@ class WebhookPlatformModel {
|
|
|
518
648
|
webhook_url: Joi.string().allow(""),
|
|
519
649
|
provider: Joi.string().allow(""),
|
|
520
650
|
association: WebhookPlatformModel.AssociationResp(),
|
|
521
|
-
custom_headers: Joi.
|
|
651
|
+
custom_headers: Joi.any(),
|
|
522
652
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
523
653
|
email_id: Joi.string().allow(""),
|
|
524
654
|
updated_on: Joi.string().allow(""),
|
|
@@ -532,165 +662,11 @@ class WebhookPlatformModel {
|
|
|
532
662
|
/** @returns {SubscriberConfigList} */
|
|
533
663
|
static SubscriberConfigList() {
|
|
534
664
|
return Joi.object({
|
|
535
|
-
items: Joi.array().items(WebhookPlatformModel.
|
|
665
|
+
items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
|
|
536
666
|
page: WebhookPlatformModel.Page(),
|
|
537
667
|
});
|
|
538
668
|
}
|
|
539
669
|
|
|
540
|
-
/** @returns {RestEventData} */
|
|
541
|
-
static RestEventData() {
|
|
542
|
-
return Joi.object({
|
|
543
|
-
event_category: Joi.string().allow("").required(),
|
|
544
|
-
event_name: Joi.string().allow("").required(),
|
|
545
|
-
event_type: Joi.string().allow("").required(),
|
|
546
|
-
version: Joi.number().required(),
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/** @returns {RestConfig} */
|
|
551
|
-
static RestConfig() {
|
|
552
|
-
return Joi.object({
|
|
553
|
-
webhook_url: Joi.string().allow("").required(),
|
|
554
|
-
type: Joi.string().allow("").required(),
|
|
555
|
-
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
556
|
-
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
557
|
-
events: Joi.array()
|
|
558
|
-
.items(WebhookPlatformModel.RestEventData())
|
|
559
|
-
.required(),
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/** @returns {QueueEventData} */
|
|
564
|
-
static QueueEventData() {
|
|
565
|
-
return Joi.object({
|
|
566
|
-
event_category: Joi.string().allow("").required(),
|
|
567
|
-
event_name: Joi.string().allow("").required(),
|
|
568
|
-
event_type: Joi.string().allow("").required(),
|
|
569
|
-
version: Joi.number().required(),
|
|
570
|
-
topic: Joi.string().allow("").required(),
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/** @returns {KafkaConfig} */
|
|
575
|
-
static KafkaConfig() {
|
|
576
|
-
return Joi.object({
|
|
577
|
-
type: Joi.string().allow("").allow(null),
|
|
578
|
-
events: Joi.array()
|
|
579
|
-
.items(WebhookPlatformModel.QueueEventData())
|
|
580
|
-
.required(),
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/** @returns {PubSubConfig} */
|
|
585
|
-
static PubSubConfig() {
|
|
586
|
-
return Joi.object({
|
|
587
|
-
type: Joi.string().allow("").allow(null),
|
|
588
|
-
events: Joi.array()
|
|
589
|
-
.items(WebhookPlatformModel.QueueEventData())
|
|
590
|
-
.required(),
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
/** @returns {TemporalEventData} */
|
|
595
|
-
static TemporalEventData() {
|
|
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
|
-
queue: Joi.string().allow(""),
|
|
602
|
-
workflow_name: Joi.string().allow(""),
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
/** @returns {TemporalConfig} */
|
|
607
|
-
static TemporalConfig() {
|
|
608
|
-
return Joi.object({
|
|
609
|
-
type: Joi.string().allow("").allow(null),
|
|
610
|
-
events: Joi.array()
|
|
611
|
-
.items(WebhookPlatformModel.TemporalEventData())
|
|
612
|
-
.required(),
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/** @returns {SqsEventData} */
|
|
617
|
-
static SqsEventData() {
|
|
618
|
-
return Joi.object({
|
|
619
|
-
event_category: Joi.string().allow("").required(),
|
|
620
|
-
event_name: Joi.string().allow("").required(),
|
|
621
|
-
event_type: Joi.string().allow("").required(),
|
|
622
|
-
version: Joi.number().required(),
|
|
623
|
-
queue: Joi.string().allow(""),
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/** @returns {SqsConfig} */
|
|
628
|
-
static SqsConfig() {
|
|
629
|
-
return Joi.object({
|
|
630
|
-
type: Joi.string().allow("").allow(null),
|
|
631
|
-
events: Joi.array().items(WebhookPlatformModel.SqsEventData()).required(),
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
/** @returns {EventBridgeData} */
|
|
636
|
-
static EventBridgeData() {
|
|
637
|
-
return Joi.object({
|
|
638
|
-
event_category: Joi.string().allow("").required(),
|
|
639
|
-
event_name: Joi.string().allow("").required(),
|
|
640
|
-
event_type: Joi.string().allow("").required(),
|
|
641
|
-
version: Joi.number().required(),
|
|
642
|
-
event_bridge_name: Joi.string().allow(""),
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
/** @returns {EventBridgeConfig} */
|
|
647
|
-
static EventBridgeConfig() {
|
|
648
|
-
return Joi.object({
|
|
649
|
-
type: Joi.string().allow("").allow(null),
|
|
650
|
-
events: Joi.array()
|
|
651
|
-
.items(WebhookPlatformModel.EventBridgeData())
|
|
652
|
-
.required(),
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
/** @returns {EventMapBody} */
|
|
657
|
-
static EventMapBody() {
|
|
658
|
-
return Joi.object({
|
|
659
|
-
rest: WebhookPlatformModel.RestConfig(),
|
|
660
|
-
kafka: WebhookPlatformModel.KafkaConfig(),
|
|
661
|
-
pub_sub: WebhookPlatformModel.PubSubConfig(),
|
|
662
|
-
temporal: WebhookPlatformModel.TemporalConfig(),
|
|
663
|
-
sqs: WebhookPlatformModel.SqsConfig(),
|
|
664
|
-
event_bridge: WebhookPlatformModel.EventBridgeConfig(),
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/** @returns {WebhookConfig} */
|
|
669
|
-
static WebhookConfig() {
|
|
670
|
-
return Joi.object({
|
|
671
|
-
notification_email: Joi.string().allow(""),
|
|
672
|
-
name: Joi.string().allow(""),
|
|
673
|
-
status: Joi.string().allow(""),
|
|
674
|
-
association: WebhookPlatformModel.Association(),
|
|
675
|
-
event_map: WebhookPlatformModel.EventMapBody(),
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/** @returns {UpsertSubscriberConfig} */
|
|
680
|
-
static UpsertSubscriberConfig() {
|
|
681
|
-
return Joi.object({
|
|
682
|
-
webhook_config: WebhookPlatformModel.WebhookConfig().required(),
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
/** @returns {UpsertSubscriberConfigResult} */
|
|
687
|
-
static UpsertSubscriberConfigResult() {
|
|
688
|
-
return Joi.object({
|
|
689
|
-
status: Joi.boolean(),
|
|
690
|
-
message: Joi.string().allow(""),
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
|
|
694
670
|
/**
|
|
695
671
|
* Enum: SubscriberStatus Used By: Webhook
|
|
696
672
|
*
|