@gofynd/fdk-client-javascript 1.3.11-beta.6 → 1.3.11-beta.8
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/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3630 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +342 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +401 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2000 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1094 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1356 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +238 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +310 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -5
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +18 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1030 -468
- package/sdk/platform/Order/OrderPlatformModel.js +1176 -523
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -8,11 +8,6 @@ const Joi = require("joi");
|
|
|
8
8
|
* @property {string} [extension_id]
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @typedef AssociationDetails
|
|
13
|
-
* @property {number} [company_id]
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* @typedef AuthMeta
|
|
18
13
|
* @property {string} [secret]
|
|
@@ -21,7 +16,7 @@ const Joi = require("joi");
|
|
|
21
16
|
|
|
22
17
|
/**
|
|
23
18
|
* @typedef CancelResponse
|
|
24
|
-
* @property {
|
|
19
|
+
* @property {string} [message] - The HTTP status code of the response (e.g., 200).
|
|
25
20
|
*/
|
|
26
21
|
|
|
27
22
|
/**
|
|
@@ -29,6 +24,18 @@ const Joi = require("joi");
|
|
|
29
24
|
* @property {Url[]} [urls]
|
|
30
25
|
*/
|
|
31
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @typedef DownloadReportResponse
|
|
29
|
+
* @property {string} [file_name]
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @typedef Err
|
|
34
|
+
* @property {string} [location]
|
|
35
|
+
* @property {string} [msg]
|
|
36
|
+
* @property {string} [param]
|
|
37
|
+
*/
|
|
38
|
+
|
|
32
39
|
/**
|
|
33
40
|
* @typedef Error
|
|
34
41
|
* @property {string} [error] - Error message describing the reason for the failure.
|
|
@@ -56,27 +63,41 @@ const Joi = require("joi");
|
|
|
56
63
|
|
|
57
64
|
/**
|
|
58
65
|
* @typedef EventConfigResponse
|
|
59
|
-
* @property {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @
|
|
64
|
-
* @property {
|
|
65
|
-
* @property {string} [
|
|
66
|
+
* @property {string} [created_on]
|
|
67
|
+
* @property {string} [description]
|
|
68
|
+
* @property {string} [display_name]
|
|
69
|
+
* @property {string} [event_category]
|
|
70
|
+
* @property {string} [event_name]
|
|
71
|
+
* @property {Object} [event_schema]
|
|
72
|
+
* @property {string} [event_type]
|
|
73
|
+
* @property {number} [id]
|
|
74
|
+
* @property {string} [updated_on]
|
|
75
|
+
* @property {string} [version]
|
|
66
76
|
*/
|
|
67
77
|
|
|
68
78
|
/**
|
|
69
|
-
* @typedef
|
|
70
|
-
* @property {string} [
|
|
71
|
-
* @property {
|
|
79
|
+
* @typedef EventConfigs
|
|
80
|
+
* @property {string} [created_on]
|
|
81
|
+
* @property {string} [description]
|
|
82
|
+
* @property {string} [display_name]
|
|
83
|
+
* @property {string} [event_category]
|
|
84
|
+
* @property {string} [event_name]
|
|
85
|
+
* @property {Object} [event_schema]
|
|
86
|
+
* @property {string} [event_type]
|
|
87
|
+
* @property {number} [id]
|
|
88
|
+
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
89
|
+
* @property {string} [updated_on]
|
|
90
|
+
* @property {string} [version]
|
|
72
91
|
*/
|
|
73
92
|
|
|
74
93
|
/**
|
|
75
94
|
* @typedef EventProcessReportObject
|
|
76
95
|
* @property {number} [attempt] - The attempt number of the event.
|
|
77
|
-
* @property {
|
|
96
|
+
* @property {Object} [data] - The data associated with the event.
|
|
78
97
|
* @property {string} [event_name] - The name of the processed event.
|
|
98
|
+
* @property {string} [event_trace_id]
|
|
79
99
|
* @property {number} [last_attempted_on] - The timestamp of the last attempted event.
|
|
100
|
+
* @property {string} [message_id]
|
|
80
101
|
* @property {string} [name] - The name of the event.
|
|
81
102
|
* @property {number} [response_code] - The response code of the event.
|
|
82
103
|
* @property {string} [response_message] - The response message of the event.
|
|
@@ -97,35 +118,21 @@ const Joi = require("joi");
|
|
|
97
118
|
* @property {Event[]} [event]
|
|
98
119
|
* @property {string} [search_text]
|
|
99
120
|
* @property {string} [start_date]
|
|
121
|
+
* @property {string} [status]
|
|
100
122
|
* @property {number[]} [subscriber_ids]
|
|
101
123
|
*/
|
|
102
124
|
|
|
103
125
|
/**
|
|
104
|
-
* @typedef
|
|
105
|
-
* @property {
|
|
106
|
-
* @property {
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @typedef FailedEventsCountSuccessResponse
|
|
111
|
-
* @property {EventCountItem[]} [items]
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @typedef FilterResponseObject
|
|
116
|
-
* @property {string} [filter_name] - The name of the filter.
|
|
117
|
-
* @property {FilterValues[]} [values]
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* @typedef FilterValues
|
|
122
|
-
* @property {string} [text] - The display text for the filter value.
|
|
123
|
-
* @property {Object} [value] - The value associated with the filter value.
|
|
126
|
+
* @typedef HistoryAssociation
|
|
127
|
+
* @property {number} [company_id]
|
|
128
|
+
* @property {number[]} [subscriber_ids]
|
|
124
129
|
*/
|
|
125
130
|
|
|
126
131
|
/**
|
|
127
132
|
* @typedef HistoryFilters
|
|
128
133
|
* @property {string} [end_date] - The end date and time of the history report.
|
|
134
|
+
* @property {string[]} [events]
|
|
135
|
+
* @property {string} [search_text]
|
|
129
136
|
* @property {string} [start_date] - The start date and time of the history report.
|
|
130
137
|
* @property {string} [status] - The status of the history report (e.g., "FAILED").
|
|
131
138
|
* @property {number[]} [subscribers] - An array of subscriber IDs associated
|
|
@@ -133,20 +140,8 @@ const Joi = require("joi");
|
|
|
133
140
|
*/
|
|
134
141
|
|
|
135
142
|
/**
|
|
136
|
-
* @typedef
|
|
137
|
-
* @property {
|
|
138
|
-
* @property {number} [page_size] - The number of records per page.
|
|
139
|
-
* @property {string} [type] - The type of history report (e.g., "platform").
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @typedef HistoryResponse
|
|
144
|
-
* @property {HistoryResponseObject[]} [items]
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @typedef HistoryResponseObject
|
|
149
|
-
* @property {AssociationDetails} [association]
|
|
143
|
+
* @typedef HistoryItems
|
|
144
|
+
* @property {HistoryAssociation} [association]
|
|
150
145
|
* @property {string} [created_on] - The date and time when the history report
|
|
151
146
|
* was created.
|
|
152
147
|
* @property {string} [filename] - The filename of the history report.
|
|
@@ -160,12 +155,22 @@ const Joi = require("joi");
|
|
|
160
155
|
*/
|
|
161
156
|
|
|
162
157
|
/**
|
|
163
|
-
* @typedef
|
|
164
|
-
* @property {
|
|
165
|
-
* @property {
|
|
166
|
-
* @property {string} [
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
* @typedef HistoryPayload
|
|
159
|
+
* @property {number} [page_no] - The page number of the history report.
|
|
160
|
+
* @property {number} [page_size] - The number of records per page.
|
|
161
|
+
* @property {string} [type] - The type of history report (e.g., "platform").
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @typedef HistoryResponse
|
|
166
|
+
* @property {HistoryItems[]} [items]
|
|
167
|
+
* @property {Page} [page]
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @typedef Item
|
|
172
|
+
* @property {number} [count]
|
|
173
|
+
* @property {string} [status]
|
|
169
174
|
*/
|
|
170
175
|
|
|
171
176
|
/**
|
|
@@ -196,7 +201,8 @@ const Joi = require("joi");
|
|
|
196
201
|
|
|
197
202
|
/**
|
|
198
203
|
* @typedef ReportFilterResponse
|
|
199
|
-
* @property {
|
|
204
|
+
* @property {string} [filter_name] - The name of the filter.
|
|
205
|
+
* @property {Object[]} [values]
|
|
200
206
|
*/
|
|
201
207
|
|
|
202
208
|
/**
|
|
@@ -205,6 +211,26 @@ const Joi = require("joi");
|
|
|
205
211
|
* filtering filters (optional).
|
|
206
212
|
*/
|
|
207
213
|
|
|
214
|
+
/**
|
|
215
|
+
* @typedef RetryCountResponse
|
|
216
|
+
* @property {Item[]} [items]
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @typedef RetryEventRequest
|
|
221
|
+
* @property {string} [end_date]
|
|
222
|
+
* @property {Event[]} [event]
|
|
223
|
+
* @property {string} [search_text]
|
|
224
|
+
* @property {string} [start_date]
|
|
225
|
+
* @property {string} [status]
|
|
226
|
+
* @property {number[]} [subscriber_ids]
|
|
227
|
+
*/
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @typedef RetryFailureResponse
|
|
231
|
+
* @property {Err[]} [err]
|
|
232
|
+
*/
|
|
233
|
+
|
|
208
234
|
/**
|
|
209
235
|
* @typedef RetryStatusResponse
|
|
210
236
|
* @property {number} [failure_count] - The count of failed retry attempts.
|
|
@@ -214,6 +240,12 @@ const Joi = require("joi");
|
|
|
214
240
|
* @property {number} [total_event] - The total number of events that require retry.
|
|
215
241
|
*/
|
|
216
242
|
|
|
243
|
+
/**
|
|
244
|
+
* @typedef RetrySuccessResponse
|
|
245
|
+
* @property {string} [message]
|
|
246
|
+
* @property {boolean} [success]
|
|
247
|
+
*/
|
|
248
|
+
|
|
217
249
|
/**
|
|
218
250
|
* @typedef SubscriberConfig
|
|
219
251
|
* @property {Association} [association]
|
|
@@ -223,7 +255,7 @@ const Joi = require("joi");
|
|
|
223
255
|
* @property {number[]} [event_id]
|
|
224
256
|
* @property {number} [id]
|
|
225
257
|
* @property {string} [name]
|
|
226
|
-
* @property {
|
|
258
|
+
* @property {string} [status]
|
|
227
259
|
* @property {string} [webhook_url]
|
|
228
260
|
*/
|
|
229
261
|
|
|
@@ -233,6 +265,38 @@ const Joi = require("joi");
|
|
|
233
265
|
* @property {Page} [page]
|
|
234
266
|
*/
|
|
235
267
|
|
|
268
|
+
/**
|
|
269
|
+
* @typedef SubscriberConfigResponse
|
|
270
|
+
* @property {Association} [association]
|
|
271
|
+
* @property {AuthMeta} [auth_meta]
|
|
272
|
+
* @property {string} [created_on]
|
|
273
|
+
* @property {Object} [custom_headers]
|
|
274
|
+
* @property {string} [email_id]
|
|
275
|
+
* @property {number[]} [event_id]
|
|
276
|
+
* @property {number} [id]
|
|
277
|
+
* @property {string} [modified_by]
|
|
278
|
+
* @property {string} [name]
|
|
279
|
+
* @property {string} [status]
|
|
280
|
+
* @property {string} [type]
|
|
281
|
+
* @property {string} [updated_on]
|
|
282
|
+
* @property {string} [webhook_url]
|
|
283
|
+
*/
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @typedef SubscriberEventMapping
|
|
287
|
+
* @property {string} [created_on]
|
|
288
|
+
* @property {number} [event_id]
|
|
289
|
+
* @property {number} [id]
|
|
290
|
+
* @property {number} [subscriber_id]
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @typedef SubscriberFailureResponse
|
|
295
|
+
* @property {string} [code]
|
|
296
|
+
* @property {string} [message]
|
|
297
|
+
* @property {string} [stack]
|
|
298
|
+
*/
|
|
299
|
+
|
|
236
300
|
/**
|
|
237
301
|
* @typedef SubscriberResponse
|
|
238
302
|
* @property {Association} [association]
|
|
@@ -240,10 +304,12 @@ const Joi = require("joi");
|
|
|
240
304
|
* @property {string} [created_on]
|
|
241
305
|
* @property {Object} [custom_headers]
|
|
242
306
|
* @property {string} [email_id]
|
|
243
|
-
* @property {
|
|
307
|
+
* @property {EventConfigs[]} [event_configs]
|
|
244
308
|
* @property {number} [id]
|
|
309
|
+
* @property {string} [modified_by]
|
|
245
310
|
* @property {string} [name]
|
|
246
|
-
* @property {
|
|
311
|
+
* @property {string} [status]
|
|
312
|
+
* @property {string} [type]
|
|
247
313
|
* @property {string} [updated_on]
|
|
248
314
|
* @property {string} [webhook_url]
|
|
249
315
|
*/
|
|
@@ -259,8 +325,6 @@ const Joi = require("joi");
|
|
|
259
325
|
* @property {string} [url] - The URL of the uploaded report file.
|
|
260
326
|
*/
|
|
261
327
|
|
|
262
|
-
/** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
|
|
263
|
-
|
|
264
328
|
class WebhookPlatformModel {
|
|
265
329
|
/** @returns {Association} */
|
|
266
330
|
static Association() {
|
|
@@ -272,13 +336,6 @@ class WebhookPlatformModel {
|
|
|
272
336
|
});
|
|
273
337
|
}
|
|
274
338
|
|
|
275
|
-
/** @returns {AssociationDetails} */
|
|
276
|
-
static AssociationDetails() {
|
|
277
|
-
return Joi.object({
|
|
278
|
-
company_id: Joi.number(),
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
|
|
282
339
|
/** @returns {AuthMeta} */
|
|
283
340
|
static AuthMeta() {
|
|
284
341
|
return Joi.object({
|
|
@@ -290,7 +347,7 @@ class WebhookPlatformModel {
|
|
|
290
347
|
/** @returns {CancelResponse} */
|
|
291
348
|
static CancelResponse() {
|
|
292
349
|
return Joi.object({
|
|
293
|
-
|
|
350
|
+
message: Joi.string().allow(""),
|
|
294
351
|
});
|
|
295
352
|
}
|
|
296
353
|
|
|
@@ -301,6 +358,22 @@ class WebhookPlatformModel {
|
|
|
301
358
|
});
|
|
302
359
|
}
|
|
303
360
|
|
|
361
|
+
/** @returns {DownloadReportResponse} */
|
|
362
|
+
static DownloadReportResponse() {
|
|
363
|
+
return Joi.object({
|
|
364
|
+
file_name: Joi.string().allow(""),
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** @returns {Err} */
|
|
369
|
+
static Err() {
|
|
370
|
+
return Joi.object({
|
|
371
|
+
location: Joi.string().allow(""),
|
|
372
|
+
msg: Joi.string().allow(""),
|
|
373
|
+
param: Joi.string().allow(""),
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
304
377
|
/** @returns {Error} */
|
|
305
378
|
static Error() {
|
|
306
379
|
return Joi.object({
|
|
@@ -335,23 +408,33 @@ class WebhookPlatformModel {
|
|
|
335
408
|
/** @returns {EventConfigResponse} */
|
|
336
409
|
static EventConfigResponse() {
|
|
337
410
|
return Joi.object({
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
411
|
+
created_on: Joi.string().allow(""),
|
|
412
|
+
description: Joi.string().allow("").allow(null),
|
|
413
|
+
display_name: Joi.string().allow(""),
|
|
414
|
+
event_category: Joi.string().allow(""),
|
|
415
|
+
event_name: Joi.string().allow(""),
|
|
416
|
+
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
417
|
+
event_type: Joi.string().allow(""),
|
|
418
|
+
id: Joi.number(),
|
|
419
|
+
updated_on: Joi.string().allow(""),
|
|
420
|
+
version: Joi.string().allow(""),
|
|
347
421
|
});
|
|
348
422
|
}
|
|
349
423
|
|
|
350
|
-
/** @returns {
|
|
351
|
-
static
|
|
424
|
+
/** @returns {EventConfigs} */
|
|
425
|
+
static EventConfigs() {
|
|
352
426
|
return Joi.object({
|
|
353
|
-
|
|
354
|
-
|
|
427
|
+
created_on: Joi.string().allow(""),
|
|
428
|
+
description: Joi.string().allow(""),
|
|
429
|
+
display_name: Joi.string().allow(""),
|
|
430
|
+
event_category: Joi.string().allow(""),
|
|
431
|
+
event_name: Joi.string().allow(""),
|
|
432
|
+
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
433
|
+
event_type: Joi.string().allow(""),
|
|
434
|
+
id: Joi.number(),
|
|
435
|
+
subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
|
|
436
|
+
updated_on: Joi.string().allow(""),
|
|
437
|
+
version: Joi.string().allow(""),
|
|
355
438
|
});
|
|
356
439
|
}
|
|
357
440
|
|
|
@@ -359,9 +442,11 @@ class WebhookPlatformModel {
|
|
|
359
442
|
static EventProcessReportObject() {
|
|
360
443
|
return Joi.object({
|
|
361
444
|
attempt: Joi.number(),
|
|
362
|
-
data: Joi.
|
|
445
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
363
446
|
event_name: Joi.string().allow(""),
|
|
447
|
+
event_trace_id: Joi.string().allow(""),
|
|
364
448
|
last_attempted_on: Joi.number(),
|
|
449
|
+
message_id: Joi.string().allow(""),
|
|
365
450
|
name: Joi.string().allow(""),
|
|
366
451
|
response_code: Joi.number(),
|
|
367
452
|
response_message: Joi.string().allow(""),
|
|
@@ -386,38 +471,16 @@ class WebhookPlatformModel {
|
|
|
386
471
|
event: Joi.array().items(WebhookPlatformModel.Event()),
|
|
387
472
|
search_text: Joi.string().allow(""),
|
|
388
473
|
start_date: Joi.string().allow(""),
|
|
474
|
+
status: Joi.string().allow(""),
|
|
389
475
|
subscriber_ids: Joi.array().items(Joi.number()),
|
|
390
476
|
});
|
|
391
477
|
}
|
|
392
478
|
|
|
393
|
-
/** @returns {
|
|
394
|
-
static
|
|
479
|
+
/** @returns {HistoryAssociation} */
|
|
480
|
+
static HistoryAssociation() {
|
|
395
481
|
return Joi.object({
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/** @returns {FailedEventsCountSuccessResponse} */
|
|
402
|
-
static FailedEventsCountSuccessResponse() {
|
|
403
|
-
return Joi.object({
|
|
404
|
-
items: Joi.array().items(WebhookPlatformModel.EventCountItem()),
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/** @returns {FilterResponseObject} */
|
|
409
|
-
static FilterResponseObject() {
|
|
410
|
-
return Joi.object({
|
|
411
|
-
filter_name: Joi.string().allow(""),
|
|
412
|
-
values: Joi.array().items(WebhookPlatformModel.FilterValues()),
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/** @returns {FilterValues} */
|
|
417
|
-
static FilterValues() {
|
|
418
|
-
return Joi.object({
|
|
419
|
-
text: Joi.string().allow(""),
|
|
420
|
-
value: Joi.any(),
|
|
482
|
+
company_id: Joi.number(),
|
|
483
|
+
subscriber_ids: Joi.array().items(Joi.number()),
|
|
421
484
|
});
|
|
422
485
|
}
|
|
423
486
|
|
|
@@ -425,12 +488,29 @@ class WebhookPlatformModel {
|
|
|
425
488
|
static HistoryFilters() {
|
|
426
489
|
return Joi.object({
|
|
427
490
|
end_date: Joi.string().allow(""),
|
|
491
|
+
events: Joi.array().items(Joi.string().allow("")),
|
|
492
|
+
search_text: Joi.string().allow(""),
|
|
428
493
|
start_date: Joi.string().allow(""),
|
|
429
494
|
status: Joi.string().allow(""),
|
|
430
495
|
subscribers: Joi.array().items(Joi.number()),
|
|
431
496
|
});
|
|
432
497
|
}
|
|
433
498
|
|
|
499
|
+
/** @returns {HistoryItems} */
|
|
500
|
+
static HistoryItems() {
|
|
501
|
+
return Joi.object({
|
|
502
|
+
association: WebhookPlatformModel.HistoryAssociation(),
|
|
503
|
+
created_on: Joi.string().allow(""),
|
|
504
|
+
filename: Joi.string().allow(""),
|
|
505
|
+
filters: WebhookPlatformModel.HistoryFilters(),
|
|
506
|
+
id: Joi.number(),
|
|
507
|
+
message: Joi.string().allow(""),
|
|
508
|
+
status: Joi.string().allow(""),
|
|
509
|
+
updated_on: Joi.string().allow("").allow(null),
|
|
510
|
+
upload_service_response: WebhookPlatformModel.UploadServiceObject(),
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
|
|
434
514
|
/** @returns {HistoryPayload} */
|
|
435
515
|
static HistoryPayload() {
|
|
436
516
|
return Joi.object({
|
|
@@ -443,33 +523,16 @@ class WebhookPlatformModel {
|
|
|
443
523
|
/** @returns {HistoryResponse} */
|
|
444
524
|
static HistoryResponse() {
|
|
445
525
|
return Joi.object({
|
|
446
|
-
items: Joi.array().items(WebhookPlatformModel.
|
|
526
|
+
items: Joi.array().items(WebhookPlatformModel.HistoryItems()),
|
|
527
|
+
page: WebhookPlatformModel.Page(),
|
|
447
528
|
});
|
|
448
529
|
}
|
|
449
530
|
|
|
450
|
-
/** @returns {
|
|
451
|
-
static
|
|
531
|
+
/** @returns {Item} */
|
|
532
|
+
static Item() {
|
|
452
533
|
return Joi.object({
|
|
453
|
-
|
|
454
|
-
created_on: Joi.string().allow(""),
|
|
455
|
-
filename: Joi.string().allow(""),
|
|
456
|
-
filters: WebhookPlatformModel.HistoryFilters(),
|
|
457
|
-
id: Joi.number(),
|
|
458
|
-
message: Joi.string().allow(""),
|
|
534
|
+
count: Joi.number(),
|
|
459
535
|
status: Joi.string().allow(""),
|
|
460
|
-
updated_on: Joi.string().allow(""),
|
|
461
|
-
upload_service_response: WebhookPlatformModel.UploadServiceObject(),
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/** @returns {ManualRetryFailedResponse} */
|
|
466
|
-
static ManualRetryFailedResponse() {
|
|
467
|
-
return Joi.object({
|
|
468
|
-
message: Joi.string().allow(""),
|
|
469
|
-
meta: Joi.any(),
|
|
470
|
-
request_id: Joi.string().allow(""),
|
|
471
|
-
stack_trace: Joi.string().allow(""),
|
|
472
|
-
success: Joi.boolean(),
|
|
473
536
|
});
|
|
474
537
|
}
|
|
475
538
|
|
|
@@ -507,7 +570,8 @@ class WebhookPlatformModel {
|
|
|
507
570
|
/** @returns {ReportFilterResponse} */
|
|
508
571
|
static ReportFilterResponse() {
|
|
509
572
|
return Joi.object({
|
|
510
|
-
|
|
573
|
+
filter_name: Joi.string().allow(""),
|
|
574
|
+
values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
511
575
|
});
|
|
512
576
|
}
|
|
513
577
|
|
|
@@ -518,6 +582,32 @@ class WebhookPlatformModel {
|
|
|
518
582
|
});
|
|
519
583
|
}
|
|
520
584
|
|
|
585
|
+
/** @returns {RetryCountResponse} */
|
|
586
|
+
static RetryCountResponse() {
|
|
587
|
+
return Joi.object({
|
|
588
|
+
items: Joi.array().items(WebhookPlatformModel.Item()),
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/** @returns {RetryEventRequest} */
|
|
593
|
+
static RetryEventRequest() {
|
|
594
|
+
return Joi.object({
|
|
595
|
+
end_date: Joi.string().allow(""),
|
|
596
|
+
event: Joi.array().items(WebhookPlatformModel.Event()),
|
|
597
|
+
search_text: Joi.string().allow(""),
|
|
598
|
+
start_date: Joi.string().allow(""),
|
|
599
|
+
status: Joi.string().allow(""),
|
|
600
|
+
subscriber_ids: Joi.array().items(Joi.number()),
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/** @returns {RetryFailureResponse} */
|
|
605
|
+
static RetryFailureResponse() {
|
|
606
|
+
return Joi.object({
|
|
607
|
+
err: Joi.array().items(WebhookPlatformModel.Err()),
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
|
|
521
611
|
/** @returns {RetryStatusResponse} */
|
|
522
612
|
static RetryStatusResponse() {
|
|
523
613
|
return Joi.object({
|
|
@@ -528,6 +618,14 @@ class WebhookPlatformModel {
|
|
|
528
618
|
});
|
|
529
619
|
}
|
|
530
620
|
|
|
621
|
+
/** @returns {RetrySuccessResponse} */
|
|
622
|
+
static RetrySuccessResponse() {
|
|
623
|
+
return Joi.object({
|
|
624
|
+
message: Joi.string().allow(""),
|
|
625
|
+
success: Joi.boolean(),
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
|
|
531
629
|
/** @returns {SubscriberConfig} */
|
|
532
630
|
static SubscriberConfig() {
|
|
533
631
|
return Joi.object({
|
|
@@ -538,7 +636,7 @@ class WebhookPlatformModel {
|
|
|
538
636
|
event_id: Joi.array().items(Joi.number()),
|
|
539
637
|
id: Joi.number(),
|
|
540
638
|
name: Joi.string().allow(""),
|
|
541
|
-
status:
|
|
639
|
+
status: Joi.string().allow(""),
|
|
542
640
|
webhook_url: Joi.string().allow(""),
|
|
543
641
|
});
|
|
544
642
|
}
|
|
@@ -551,6 +649,44 @@ class WebhookPlatformModel {
|
|
|
551
649
|
});
|
|
552
650
|
}
|
|
553
651
|
|
|
652
|
+
/** @returns {SubscriberConfigResponse} */
|
|
653
|
+
static SubscriberConfigResponse() {
|
|
654
|
+
return Joi.object({
|
|
655
|
+
association: WebhookPlatformModel.Association(),
|
|
656
|
+
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
657
|
+
created_on: Joi.string().allow(""),
|
|
658
|
+
custom_headers: Joi.any(),
|
|
659
|
+
email_id: Joi.string().allow(""),
|
|
660
|
+
event_id: Joi.array().items(Joi.number()),
|
|
661
|
+
id: Joi.number(),
|
|
662
|
+
modified_by: Joi.string().allow(""),
|
|
663
|
+
name: Joi.string().allow(""),
|
|
664
|
+
status: Joi.string().allow(""),
|
|
665
|
+
type: Joi.string().allow("").allow(null),
|
|
666
|
+
updated_on: Joi.string().allow(""),
|
|
667
|
+
webhook_url: Joi.string().allow(""),
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/** @returns {SubscriberEventMapping} */
|
|
672
|
+
static SubscriberEventMapping() {
|
|
673
|
+
return Joi.object({
|
|
674
|
+
created_on: Joi.string().allow(""),
|
|
675
|
+
event_id: Joi.number(),
|
|
676
|
+
id: Joi.number(),
|
|
677
|
+
subscriber_id: Joi.number(),
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/** @returns {SubscriberFailureResponse} */
|
|
682
|
+
static SubscriberFailureResponse() {
|
|
683
|
+
return Joi.object({
|
|
684
|
+
code: Joi.string().allow(""),
|
|
685
|
+
message: Joi.string().allow(""),
|
|
686
|
+
stack: Joi.string().allow(""),
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
|
|
554
690
|
/** @returns {SubscriberResponse} */
|
|
555
691
|
static SubscriberResponse() {
|
|
556
692
|
return Joi.object({
|
|
@@ -559,10 +695,12 @@ class WebhookPlatformModel {
|
|
|
559
695
|
created_on: Joi.string().allow(""),
|
|
560
696
|
custom_headers: Joi.any(),
|
|
561
697
|
email_id: Joi.string().allow(""),
|
|
562
|
-
event_configs: Joi.array().items(WebhookPlatformModel.
|
|
698
|
+
event_configs: Joi.array().items(WebhookPlatformModel.EventConfigs()),
|
|
563
699
|
id: Joi.number(),
|
|
700
|
+
modified_by: Joi.string().allow(""),
|
|
564
701
|
name: Joi.string().allow(""),
|
|
565
|
-
status:
|
|
702
|
+
status: Joi.string().allow(""),
|
|
703
|
+
type: Joi.string().allow("").allow(null),
|
|
566
704
|
updated_on: Joi.string().allow(""),
|
|
567
705
|
webhook_url: Joi.string().allow(""),
|
|
568
706
|
});
|
|
@@ -582,20 +720,5 @@ class WebhookPlatformModel {
|
|
|
582
720
|
url: Joi.string().allow(""),
|
|
583
721
|
});
|
|
584
722
|
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Enum: SubscriberStatus Used By: Webhook
|
|
588
|
-
*
|
|
589
|
-
* @returns {SubscriberStatus}
|
|
590
|
-
*/
|
|
591
|
-
static SubscriberStatus() {
|
|
592
|
-
return Joi.string().valid(
|
|
593
|
-
"active",
|
|
594
|
-
|
|
595
|
-
"inactive",
|
|
596
|
-
|
|
597
|
-
"blocked"
|
|
598
|
-
);
|
|
599
|
-
}
|
|
600
723
|
}
|
|
601
724
|
module.exports = WebhookPlatformModel;
|