@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.4.0-beta.1
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/FileStorage/FileStoragePartnerModel.d.ts +3 -15
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
- 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 +3641 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +351 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +410 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2011 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1100 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1362 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +247 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +319 -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 +18 -19
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -18
- 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 +1032 -470
- package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
- 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
|
@@ -20,8 +20,9 @@ class Webhook {
|
|
|
20
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
21
|
* @returns {Promise<WebhookPlatformModel.CancelResponse>} - Success response
|
|
22
22
|
* @name cancelJobByName
|
|
23
|
-
* @summary: Cancel a report export
|
|
24
|
-
* @description: Cancel the export of a specific report for a company.
|
|
23
|
+
* @summary: Cancel a report export.
|
|
24
|
+
* @description: Cancel the export of a specific report for a company.
|
|
25
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/).
|
|
25
26
|
*/
|
|
26
27
|
async cancelJobByName(
|
|
27
28
|
{ filename, requestHeaders } = { requestHeaders: {} },
|
|
@@ -97,10 +98,11 @@ class Webhook {
|
|
|
97
98
|
* @param {WebhookPlatformValidator.DownloadDeliveryReportParam} arg - Arg object
|
|
98
99
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
99
100
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
100
|
-
* @returns {Promise<
|
|
101
|
+
* @returns {Promise<WebhookPlatformModel.DownloadReportResponse>} - Success response
|
|
101
102
|
* @name downloadDeliveryReport
|
|
102
|
-
* @summary: Download processed events report for a company
|
|
103
|
-
* @description: Download reports for a specific company based on the provided filters.
|
|
103
|
+
* @summary: Download processed events report for a company.
|
|
104
|
+
* @description: Download reports for a specific company based on the provided filters.
|
|
105
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/).
|
|
104
106
|
*/
|
|
105
107
|
async downloadDeliveryReport(
|
|
106
108
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -153,7 +155,9 @@ class Webhook {
|
|
|
153
155
|
responseData = response[0];
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
const {
|
|
158
|
+
const {
|
|
159
|
+
error: res_error,
|
|
160
|
+
} = WebhookPlatformModel.DownloadReportResponse().validate(responseData, {
|
|
157
161
|
abortEarly: false,
|
|
158
162
|
allowUnknown: true,
|
|
159
163
|
});
|
|
@@ -176,10 +180,11 @@ class Webhook {
|
|
|
176
180
|
* @param {WebhookPlatformValidator.FetchAllEventConfigurationsParam} arg - Arg object
|
|
177
181
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
178
182
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
179
|
-
* @returns {Promise<
|
|
183
|
+
* @returns {Promise<Object>} - Success response
|
|
180
184
|
* @name fetchAllEventConfigurations
|
|
181
|
-
* @summary:
|
|
182
|
-
* @description:
|
|
185
|
+
* @summary: Get All Webhook Events.
|
|
186
|
+
* @description: To fetch all webhook events.
|
|
187
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/).
|
|
183
188
|
*/
|
|
184
189
|
async fetchAllEventConfigurations(
|
|
185
190
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -228,9 +233,7 @@ class Webhook {
|
|
|
228
233
|
responseData = response[0];
|
|
229
234
|
}
|
|
230
235
|
|
|
231
|
-
const {
|
|
232
|
-
error: res_error,
|
|
233
|
-
} = WebhookPlatformModel.EventConfigResponse().validate(responseData, {
|
|
236
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
234
237
|
abortEarly: false,
|
|
235
238
|
allowUnknown: true,
|
|
236
239
|
});
|
|
@@ -255,8 +258,9 @@ class Webhook {
|
|
|
255
258
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
256
259
|
* @returns {Promise<WebhookPlatformModel.EventProcessReports>} - Success response
|
|
257
260
|
* @name getDeliveryReports
|
|
258
|
-
* @summary: Get processed events report for a company
|
|
259
|
-
* @description: Retrieve a list of processed events for a specific company based on the provided filters.
|
|
261
|
+
* @summary: Get processed events report for a company.
|
|
262
|
+
* @description: Retrieve a list of processed events for a specific company based on the provided filters.
|
|
263
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/).
|
|
260
264
|
*/
|
|
261
265
|
async getDeliveryReports(
|
|
262
266
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -332,9 +336,7 @@ class Webhook {
|
|
|
332
336
|
* @param {WebhookPlatformValidator.GetEventCountsParam} arg - Arg object
|
|
333
337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
334
338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
335
|
-
* @returns {Promise<WebhookPlatformModel.
|
|
336
|
-
* - Success response
|
|
337
|
-
*
|
|
339
|
+
* @returns {Promise<WebhookPlatformModel.RetryCountResponse>} - Success response
|
|
338
340
|
* @name getEventCounts
|
|
339
341
|
* @summary: Get the count of failed events for a company within a specified date range.
|
|
340
342
|
* @description: Retrieves the count of failed events for a specific company within the specified date range. The user can filter the count based on specific event types if provided.
|
|
@@ -391,10 +393,10 @@ class Webhook {
|
|
|
391
393
|
|
|
392
394
|
const {
|
|
393
395
|
error: res_error,
|
|
394
|
-
} = WebhookPlatformModel.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
);
|
|
396
|
+
} = WebhookPlatformModel.RetryCountResponse().validate(responseData, {
|
|
397
|
+
abortEarly: false,
|
|
398
|
+
allowUnknown: true,
|
|
399
|
+
});
|
|
398
400
|
|
|
399
401
|
if (res_error) {
|
|
400
402
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -416,8 +418,9 @@ class Webhook {
|
|
|
416
418
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
417
419
|
* @returns {Promise<WebhookPlatformModel.HistoryResponse>} - Success response
|
|
418
420
|
* @name getHistoricalReports
|
|
419
|
-
* @summary: Get report download history
|
|
420
|
-
* @description: Retrieve history reports for a specific company based on the provided filters.
|
|
421
|
+
* @summary: Get report download history.
|
|
422
|
+
* @description: Retrieve history reports for a specific company based on the provided filters.
|
|
423
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getHistoricalReports/).
|
|
421
424
|
*/
|
|
422
425
|
async getHistoricalReports(
|
|
423
426
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -569,10 +572,11 @@ class Webhook {
|
|
|
569
572
|
* @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object
|
|
570
573
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
571
574
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
572
|
-
* @returns {Promise<WebhookPlatformModel.ReportFilterResponse>} - Success response
|
|
575
|
+
* @returns {Promise<WebhookPlatformModel.ReportFilterResponse[]>} - Success response
|
|
573
576
|
* @name getReportFilters
|
|
574
|
-
* @summary: Get filters for a company
|
|
575
|
-
* @description: Retrieve filters for a specific company based on the provided subscriber IDs.
|
|
577
|
+
* @summary: Get filters for a company.
|
|
578
|
+
* @description: Retrieve filters for a specific company based on the provided subscriber IDs.
|
|
579
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/).
|
|
576
580
|
*/
|
|
577
581
|
async getReportFilters(
|
|
578
582
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -623,12 +627,9 @@ class Webhook {
|
|
|
623
627
|
responseData = response[0];
|
|
624
628
|
}
|
|
625
629
|
|
|
626
|
-
const {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
abortEarly: false,
|
|
630
|
-
allowUnknown: true,
|
|
631
|
-
});
|
|
630
|
+
const { error: res_error } = Joi.array()
|
|
631
|
+
.items(WebhookPlatformModel.ReportFilterResponse())
|
|
632
|
+
.validate(responseData, { abortEarly: false, allowUnknown: true });
|
|
632
633
|
|
|
633
634
|
if (res_error) {
|
|
634
635
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -727,10 +728,11 @@ class Webhook {
|
|
|
727
728
|
* @param {WebhookPlatformValidator.GetSubscribersByCompanyParam} arg - Arg object
|
|
728
729
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
729
730
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
730
|
-
* @returns {Promise<WebhookPlatformModel.
|
|
731
|
+
* @returns {Promise<WebhookPlatformModel.SubscriberConfigList>} - Success response
|
|
731
732
|
* @name getSubscribersByCompany
|
|
732
|
-
* @summary: Get Subscribers By
|
|
733
|
-
* @description: Get Subscribers By
|
|
733
|
+
* @summary: Get Subscribers By CompanyId.
|
|
734
|
+
* @description: Get Subscribers By Company ID.
|
|
735
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByCompany/).
|
|
734
736
|
*/
|
|
735
737
|
async getSubscribersByCompany(
|
|
736
738
|
{ pageNo, pageSize, extensionId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -778,7 +780,7 @@ class Webhook {
|
|
|
778
780
|
const response = await PlatformAPIClient.execute(
|
|
779
781
|
this.config,
|
|
780
782
|
"get",
|
|
781
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber
|
|
783
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
|
|
782
784
|
query_params,
|
|
783
785
|
undefined,
|
|
784
786
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -792,7 +794,7 @@ class Webhook {
|
|
|
792
794
|
|
|
793
795
|
const {
|
|
794
796
|
error: res_error,
|
|
795
|
-
} = WebhookPlatformModel.
|
|
797
|
+
} = WebhookPlatformModel.SubscriberConfigList().validate(responseData, {
|
|
796
798
|
abortEarly: false,
|
|
797
799
|
allowUnknown: true,
|
|
798
800
|
});
|
|
@@ -865,7 +867,7 @@ class Webhook {
|
|
|
865
867
|
const response = await PlatformAPIClient.execute(
|
|
866
868
|
this.config,
|
|
867
869
|
"get",
|
|
868
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscriber
|
|
870
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscriber/`,
|
|
869
871
|
query_params,
|
|
870
872
|
undefined,
|
|
871
873
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -902,7 +904,7 @@ class Webhook {
|
|
|
902
904
|
* @param {WebhookPlatformValidator.ManualRetryCancelParam} arg - Arg object
|
|
903
905
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
904
906
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
905
|
-
* @returns {Promise<
|
|
907
|
+
* @returns {Promise<string>} - Success response
|
|
906
908
|
* @name manualRetryCancel
|
|
907
909
|
* @summary: Cancel the active manual retry for a company's failed events.
|
|
908
910
|
* @description: Cancels the active manual retry for a specific company's failed events. If a manual retry is currently in progress, it will be cancelled.
|
|
@@ -953,12 +955,9 @@ class Webhook {
|
|
|
953
955
|
responseData = response[0];
|
|
954
956
|
}
|
|
955
957
|
|
|
956
|
-
const {
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
abortEarly: false,
|
|
960
|
-
allowUnknown: true,
|
|
961
|
-
});
|
|
958
|
+
const { error: res_error } = Joi.string()
|
|
959
|
+
.allow("")
|
|
960
|
+
.validate(responseData, { abortEarly: false, allowUnknown: true });
|
|
962
961
|
|
|
963
962
|
if (res_error) {
|
|
964
963
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -978,8 +977,7 @@ class Webhook {
|
|
|
978
977
|
* @param {WebhookPlatformValidator.ManualRetryOfFailedEventParam} arg - Arg object
|
|
979
978
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
980
979
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
981
|
-
* @returns {Promise<WebhookPlatformModel.
|
|
982
|
-
* Success response
|
|
980
|
+
* @returns {Promise<WebhookPlatformModel.RetrySuccessResponse>} - Success response
|
|
983
981
|
* @name manualRetryOfFailedEvent
|
|
984
982
|
* @summary: Initiate a manual retry for event processing.
|
|
985
983
|
* @description: Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried.
|
|
@@ -1038,10 +1036,10 @@ class Webhook {
|
|
|
1038
1036
|
|
|
1039
1037
|
const {
|
|
1040
1038
|
error: res_error,
|
|
1041
|
-
} = WebhookPlatformModel.
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
);
|
|
1039
|
+
} = WebhookPlatformModel.RetrySuccessResponse().validate(responseData, {
|
|
1040
|
+
abortEarly: false,
|
|
1041
|
+
allowUnknown: true,
|
|
1042
|
+
});
|
|
1045
1043
|
|
|
1046
1044
|
if (res_error) {
|
|
1047
1045
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1063,8 +1061,9 @@ class Webhook {
|
|
|
1063
1061
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1064
1062
|
* @returns {Promise<WebhookPlatformModel.PingWebhookResponse>} - Success response
|
|
1065
1063
|
* @name pingWebhook
|
|
1066
|
-
* @summary: Ping and validate webhook url
|
|
1067
|
-
* @description: Ping and validate webhook url
|
|
1064
|
+
* @summary: Ping and validate webhook url.
|
|
1065
|
+
* @description: Ping and validate webhook url.
|
|
1066
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/).
|
|
1068
1067
|
*/
|
|
1069
1068
|
async pingWebhook(
|
|
1070
1069
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1138,10 +1137,12 @@ class Webhook {
|
|
|
1138
1137
|
* @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object
|
|
1139
1138
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1140
1139
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1141
|
-
* @returns {Promise<WebhookPlatformModel.
|
|
1140
|
+
* @returns {Promise<WebhookPlatformModel.SubscriberConfigResponse>} -
|
|
1141
|
+
* Success response
|
|
1142
1142
|
* @name registerSubscriberToEvent
|
|
1143
|
-
* @summary: Register Subscriber
|
|
1144
|
-
* @description: Register Subscriber
|
|
1143
|
+
* @summary: Register Subscriber.
|
|
1144
|
+
* @description: Register Subscriber.
|
|
1145
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/).
|
|
1145
1146
|
*/
|
|
1146
1147
|
async registerSubscriberToEvent(
|
|
1147
1148
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1182,7 +1183,7 @@ class Webhook {
|
|
|
1182
1183
|
const response = await PlatformAPIClient.execute(
|
|
1183
1184
|
this.config,
|
|
1184
1185
|
"post",
|
|
1185
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber
|
|
1186
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
|
|
1186
1187
|
query_params,
|
|
1187
1188
|
body,
|
|
1188
1189
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1196,7 +1197,7 @@ class Webhook {
|
|
|
1196
1197
|
|
|
1197
1198
|
const {
|
|
1198
1199
|
error: res_error,
|
|
1199
|
-
} = WebhookPlatformModel.
|
|
1200
|
+
} = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, {
|
|
1200
1201
|
abortEarly: false,
|
|
1201
1202
|
allowUnknown: true,
|
|
1202
1203
|
});
|
|
@@ -1219,7 +1220,8 @@ class Webhook {
|
|
|
1219
1220
|
* @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object
|
|
1220
1221
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1221
1222
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1222
|
-
* @returns {Promise<WebhookPlatformModel.
|
|
1223
|
+
* @returns {Promise<WebhookPlatformModel.SubscriberConfigResponse>} -
|
|
1224
|
+
* Success response
|
|
1223
1225
|
* @name updateSubscriberConfig
|
|
1224
1226
|
* @summary: Update Subscriber
|
|
1225
1227
|
* @description: Update Subscriber - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/).
|
|
@@ -1263,7 +1265,7 @@ class Webhook {
|
|
|
1263
1265
|
const response = await PlatformAPIClient.execute(
|
|
1264
1266
|
this.config,
|
|
1265
1267
|
"put",
|
|
1266
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber
|
|
1268
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
|
|
1267
1269
|
query_params,
|
|
1268
1270
|
body,
|
|
1269
1271
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1277,7 +1279,7 @@ class Webhook {
|
|
|
1277
1279
|
|
|
1278
1280
|
const {
|
|
1279
1281
|
error: res_error,
|
|
1280
|
-
} = WebhookPlatformModel.
|
|
1282
|
+
} = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, {
|
|
1281
1283
|
abortEarly: false,
|
|
1282
1284
|
allowUnknown: true,
|
|
1283
1285
|
});
|