@gofynd/fdk-client-javascript 1.4.16-beta.4 → 1.4.16-beta.5
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 +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +68 -48
- package/sdk/application/Cart/CartApplicationClient.js +118 -27
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +59 -58
- package/sdk/application/Catalog/CatalogApplicationClient.js +30 -29
- 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 +51 -30
- package/sdk/application/Content/ContentApplicationClient.js +161 -56
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +35 -15
- package/sdk/application/Logistic/LogisticApplicationClient.js +101 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -12
- package/sdk/application/Order/OrderApplicationClient.js +56 -8
- 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 +4 -2
- 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/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -21
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -16
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- 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 +126 -20
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1200 -167
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +419 -115
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5070 -1296
- package/sdk/platform/Cart/CartPlatformModel.js +1992 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6512 -1770
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3228 -1687
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +204 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1076 -478
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +253 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +256 -130
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1372 -400
- package/sdk/platform/Content/ContentPlatformModel.js +631 -394
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- 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 +95 -39
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -63
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -22
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -24
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -116
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -104
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +416 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7607 -1267
- package/sdk/platform/Order/OrderPlatformModel.js +3929 -1269
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- 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 +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1842 -609
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +886 -554
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -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 +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +46 -7
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- 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 +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +810 -6
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- 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/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -18,7 +18,7 @@ class Logistics {
|
|
|
18
18
|
* @param {LogisticsPartnerValidator.SampleFileServiceabilityParam} arg - Arg object.
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
21
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionServiceabilityTatResultItemData>}
|
|
22
22
|
* - Success response
|
|
23
23
|
*
|
|
24
24
|
* @name sampleFileServiceability
|
|
@@ -76,7 +76,7 @@ class Logistics {
|
|
|
76
76
|
|
|
77
77
|
const {
|
|
78
78
|
error: res_error,
|
|
79
|
-
} = LogisticsPartnerModel.
|
|
79
|
+
} = LogisticsPartnerModel.BulkRegionServiceabilityTatResultItemData().validate(
|
|
80
80
|
responseData,
|
|
81
81
|
{ abortEarly: false, allowUnknown: true }
|
|
82
82
|
);
|
|
@@ -101,7 +101,7 @@ class Logistics {
|
|
|
101
101
|
*
|
|
102
102
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
103
103
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
104
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
104
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionServiceabilityTatResult>}
|
|
105
105
|
* - Success response
|
|
106
106
|
*
|
|
107
107
|
* @name getSampleFileServiceabilityStatus
|
|
@@ -166,7 +166,7 @@ class Logistics {
|
|
|
166
166
|
|
|
167
167
|
const {
|
|
168
168
|
error: res_error,
|
|
169
|
-
} = LogisticsPartnerModel.
|
|
169
|
+
} = LogisticsPartnerModel.BulkRegionServiceabilityTatResult().validate(
|
|
170
170
|
responseData,
|
|
171
171
|
{ abortEarly: false, allowUnknown: true }
|
|
172
172
|
);
|
|
@@ -189,7 +189,7 @@ class Logistics {
|
|
|
189
189
|
* @param {LogisticsPartnerValidator.BulkTatParam} arg - Arg object.
|
|
190
190
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
191
191
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
192
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
192
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResultItemData>} -
|
|
193
193
|
* Success response
|
|
194
194
|
* @name bulkTat
|
|
195
195
|
* @summary: Region TAT Import or Export
|
|
@@ -246,7 +246,7 @@ class Logistics {
|
|
|
246
246
|
|
|
247
247
|
const {
|
|
248
248
|
error: res_error,
|
|
249
|
-
} = LogisticsPartnerModel.
|
|
249
|
+
} = LogisticsPartnerModel.BulkRegionResultItemData().validate(
|
|
250
250
|
responseData,
|
|
251
251
|
{ abortEarly: false, allowUnknown: true }
|
|
252
252
|
);
|
|
@@ -269,7 +269,7 @@ class Logistics {
|
|
|
269
269
|
* @param {LogisticsPartnerValidator.GetBulkTatParam} arg - Arg object.
|
|
270
270
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
271
271
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
272
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
272
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResult>} - Success response
|
|
273
273
|
* @name getBulkTat
|
|
274
274
|
* @summary: Get region tat bulk history
|
|
275
275
|
* @description: Get region tat bulk history - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkTat/).
|
|
@@ -363,7 +363,7 @@ class Logistics {
|
|
|
363
363
|
|
|
364
364
|
const {
|
|
365
365
|
error: res_error,
|
|
366
|
-
} = LogisticsPartnerModel.
|
|
366
|
+
} = LogisticsPartnerModel.BulkRegionResult().validate(responseData, {
|
|
367
367
|
abortEarly: false,
|
|
368
368
|
allowUnknown: true,
|
|
369
369
|
});
|
|
@@ -382,11 +382,961 @@ class Logistics {
|
|
|
382
382
|
return response;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
+
/**
|
|
386
|
+
* @param {LogisticsPartnerValidator.CreateDeliveryTimeParam} arg - Arg object.
|
|
387
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
388
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
389
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
390
|
+
* @name createDeliveryTime
|
|
391
|
+
* @summary: Region based delivery time insert
|
|
392
|
+
* @description: Insert the region based delivery time for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createDeliveryTime/).
|
|
393
|
+
*/
|
|
394
|
+
async createDeliveryTime(
|
|
395
|
+
{
|
|
396
|
+
partnerOrgId,
|
|
397
|
+
courierPartnerExtensionId,
|
|
398
|
+
schemeId,
|
|
399
|
+
body,
|
|
400
|
+
requestHeaders,
|
|
401
|
+
} = { requestHeaders: {} },
|
|
402
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
403
|
+
) {
|
|
404
|
+
const { error } = LogisticsPartnerValidator.createDeliveryTime().validate(
|
|
405
|
+
{
|
|
406
|
+
partnerOrgId,
|
|
407
|
+
courierPartnerExtensionId,
|
|
408
|
+
schemeId,
|
|
409
|
+
body,
|
|
410
|
+
},
|
|
411
|
+
{ abortEarly: false, allowUnknown: true }
|
|
412
|
+
);
|
|
413
|
+
if (error) {
|
|
414
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// Showing warrnings if extra unknown parameters are found
|
|
418
|
+
const {
|
|
419
|
+
error: warrning,
|
|
420
|
+
} = LogisticsPartnerValidator.createDeliveryTime().validate(
|
|
421
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, body },
|
|
422
|
+
{ abortEarly: false, allowUnknown: false }
|
|
423
|
+
);
|
|
424
|
+
if (warrning) {
|
|
425
|
+
Logger({
|
|
426
|
+
level: "WARN",
|
|
427
|
+
message: `Parameter Validation warrnings for partner > Logistics > createDeliveryTime \n ${warrning}`,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const query_params = {};
|
|
432
|
+
|
|
433
|
+
const response = await PartnerAPIClient.execute(
|
|
434
|
+
this.config,
|
|
435
|
+
"post",
|
|
436
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time`,
|
|
437
|
+
query_params,
|
|
438
|
+
body,
|
|
439
|
+
requestHeaders,
|
|
440
|
+
{ responseHeaders }
|
|
441
|
+
);
|
|
442
|
+
|
|
443
|
+
let responseData = response;
|
|
444
|
+
if (responseHeaders) {
|
|
445
|
+
responseData = response[0];
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const {
|
|
449
|
+
error: res_error,
|
|
450
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
451
|
+
abortEarly: false,
|
|
452
|
+
allowUnknown: true,
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
if (res_error) {
|
|
456
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
457
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
458
|
+
} else {
|
|
459
|
+
Logger({
|
|
460
|
+
level: "WARN",
|
|
461
|
+
message: `Response Validation Warnings for partner > Logistics > createDeliveryTime \n ${res_error}`,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return response;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @param {LogisticsPartnerValidator.GetDeliveryTimesParam} arg - Arg object.
|
|
471
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
472
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
473
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatItemResult>} - Success response
|
|
474
|
+
* @name getDeliveryTimes
|
|
475
|
+
* @summary: Get region based delivery time list
|
|
476
|
+
* @description: Retrieve a list of delivery time for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTimes/).
|
|
477
|
+
*/
|
|
478
|
+
async getDeliveryTimes(
|
|
479
|
+
{
|
|
480
|
+
partnerOrgId,
|
|
481
|
+
courierPartnerExtensionId,
|
|
482
|
+
schemeId,
|
|
483
|
+
pageNo,
|
|
484
|
+
pageSize,
|
|
485
|
+
fromCountryCode,
|
|
486
|
+
fromStateCode,
|
|
487
|
+
fromCityCode,
|
|
488
|
+
fromSectorCode,
|
|
489
|
+
fromPincode,
|
|
490
|
+
toCountryCode,
|
|
491
|
+
toStateCode,
|
|
492
|
+
toCityCode,
|
|
493
|
+
toSectorCode,
|
|
494
|
+
toPincode,
|
|
495
|
+
requestHeaders,
|
|
496
|
+
} = { requestHeaders: {} },
|
|
497
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
498
|
+
) {
|
|
499
|
+
const { error } = LogisticsPartnerValidator.getDeliveryTimes().validate(
|
|
500
|
+
{
|
|
501
|
+
partnerOrgId,
|
|
502
|
+
courierPartnerExtensionId,
|
|
503
|
+
schemeId,
|
|
504
|
+
pageNo,
|
|
505
|
+
pageSize,
|
|
506
|
+
fromCountryCode,
|
|
507
|
+
fromStateCode,
|
|
508
|
+
fromCityCode,
|
|
509
|
+
fromSectorCode,
|
|
510
|
+
fromPincode,
|
|
511
|
+
toCountryCode,
|
|
512
|
+
toStateCode,
|
|
513
|
+
toCityCode,
|
|
514
|
+
toSectorCode,
|
|
515
|
+
toPincode,
|
|
516
|
+
},
|
|
517
|
+
{ abortEarly: false, allowUnknown: true }
|
|
518
|
+
);
|
|
519
|
+
if (error) {
|
|
520
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Showing warrnings if extra unknown parameters are found
|
|
524
|
+
const {
|
|
525
|
+
error: warrning,
|
|
526
|
+
} = LogisticsPartnerValidator.getDeliveryTimes().validate(
|
|
527
|
+
{
|
|
528
|
+
partnerOrgId,
|
|
529
|
+
courierPartnerExtensionId,
|
|
530
|
+
schemeId,
|
|
531
|
+
pageNo,
|
|
532
|
+
pageSize,
|
|
533
|
+
fromCountryCode,
|
|
534
|
+
fromStateCode,
|
|
535
|
+
fromCityCode,
|
|
536
|
+
fromSectorCode,
|
|
537
|
+
fromPincode,
|
|
538
|
+
toCountryCode,
|
|
539
|
+
toStateCode,
|
|
540
|
+
toCityCode,
|
|
541
|
+
toSectorCode,
|
|
542
|
+
toPincode,
|
|
543
|
+
},
|
|
544
|
+
{ abortEarly: false, allowUnknown: false }
|
|
545
|
+
);
|
|
546
|
+
if (warrning) {
|
|
547
|
+
Logger({
|
|
548
|
+
level: "WARN",
|
|
549
|
+
message: `Parameter Validation warrnings for partner > Logistics > getDeliveryTimes \n ${warrning}`,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
const query_params = {};
|
|
554
|
+
query_params["page_no"] = pageNo;
|
|
555
|
+
query_params["page_size"] = pageSize;
|
|
556
|
+
query_params["from_country_code"] = fromCountryCode;
|
|
557
|
+
query_params["from_state_code"] = fromStateCode;
|
|
558
|
+
query_params["from_city_code"] = fromCityCode;
|
|
559
|
+
query_params["from_sector_code"] = fromSectorCode;
|
|
560
|
+
query_params["from_pincode"] = fromPincode;
|
|
561
|
+
query_params["to_country_code"] = toCountryCode;
|
|
562
|
+
query_params["to_state_code"] = toStateCode;
|
|
563
|
+
query_params["to_city_code"] = toCityCode;
|
|
564
|
+
query_params["to_sector_code"] = toSectorCode;
|
|
565
|
+
query_params["to_pincode"] = toPincode;
|
|
566
|
+
|
|
567
|
+
const response = await PartnerAPIClient.execute(
|
|
568
|
+
this.config,
|
|
569
|
+
"get",
|
|
570
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time`,
|
|
571
|
+
query_params,
|
|
572
|
+
undefined,
|
|
573
|
+
requestHeaders,
|
|
574
|
+
{ responseHeaders }
|
|
575
|
+
);
|
|
576
|
+
|
|
577
|
+
let responseData = response;
|
|
578
|
+
if (responseHeaders) {
|
|
579
|
+
responseData = response[0];
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const {
|
|
583
|
+
error: res_error,
|
|
584
|
+
} = LogisticsPartnerModel.RegionTatItemResult().validate(responseData, {
|
|
585
|
+
abortEarly: false,
|
|
586
|
+
allowUnknown: true,
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
if (res_error) {
|
|
590
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
591
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
592
|
+
} else {
|
|
593
|
+
Logger({
|
|
594
|
+
level: "WARN",
|
|
595
|
+
message: `Response Validation Warnings for partner > Logistics > getDeliveryTimes \n ${res_error}`,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
return response;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* @param {LogisticsPartnerValidator.GetDeliveryTimeParam} arg - Arg object.
|
|
605
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
606
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
607
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
608
|
+
* @name getDeliveryTime
|
|
609
|
+
* @summary: Get region based delivery time for a given identifier
|
|
610
|
+
* @description: Retrieve the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTime/).
|
|
611
|
+
*/
|
|
612
|
+
async getDeliveryTime(
|
|
613
|
+
{
|
|
614
|
+
partnerOrgId,
|
|
615
|
+
courierPartnerExtensionId,
|
|
616
|
+
schemeId,
|
|
617
|
+
id,
|
|
618
|
+
requestHeaders,
|
|
619
|
+
} = { requestHeaders: {} },
|
|
620
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
621
|
+
) {
|
|
622
|
+
const { error } = LogisticsPartnerValidator.getDeliveryTime().validate(
|
|
623
|
+
{
|
|
624
|
+
partnerOrgId,
|
|
625
|
+
courierPartnerExtensionId,
|
|
626
|
+
schemeId,
|
|
627
|
+
id,
|
|
628
|
+
},
|
|
629
|
+
{ abortEarly: false, allowUnknown: true }
|
|
630
|
+
);
|
|
631
|
+
if (error) {
|
|
632
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// Showing warrnings if extra unknown parameters are found
|
|
636
|
+
const {
|
|
637
|
+
error: warrning,
|
|
638
|
+
} = LogisticsPartnerValidator.getDeliveryTime().validate(
|
|
639
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
640
|
+
{ abortEarly: false, allowUnknown: false }
|
|
641
|
+
);
|
|
642
|
+
if (warrning) {
|
|
643
|
+
Logger({
|
|
644
|
+
level: "WARN",
|
|
645
|
+
message: `Parameter Validation warrnings for partner > Logistics > getDeliveryTime \n ${warrning}`,
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const query_params = {};
|
|
650
|
+
|
|
651
|
+
const response = await PartnerAPIClient.execute(
|
|
652
|
+
this.config,
|
|
653
|
+
"get",
|
|
654
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`,
|
|
655
|
+
query_params,
|
|
656
|
+
undefined,
|
|
657
|
+
requestHeaders,
|
|
658
|
+
{ responseHeaders }
|
|
659
|
+
);
|
|
660
|
+
|
|
661
|
+
let responseData = response;
|
|
662
|
+
if (responseHeaders) {
|
|
663
|
+
responseData = response[0];
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const {
|
|
667
|
+
error: res_error,
|
|
668
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
669
|
+
abortEarly: false,
|
|
670
|
+
allowUnknown: true,
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
if (res_error) {
|
|
674
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
675
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
676
|
+
} else {
|
|
677
|
+
Logger({
|
|
678
|
+
level: "WARN",
|
|
679
|
+
message: `Response Validation Warnings for partner > Logistics > getDeliveryTime \n ${res_error}`,
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
return response;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* @param {LogisticsPartnerValidator.UpdateDeliveryTimeParam} arg - Arg object.
|
|
689
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
690
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
691
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
692
|
+
* @name updateDeliveryTime
|
|
693
|
+
* @summary: Region based delivery time update
|
|
694
|
+
* @description: Update the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateDeliveryTime/).
|
|
695
|
+
*/
|
|
696
|
+
async updateDeliveryTime(
|
|
697
|
+
{
|
|
698
|
+
partnerOrgId,
|
|
699
|
+
courierPartnerExtensionId,
|
|
700
|
+
schemeId,
|
|
701
|
+
id,
|
|
702
|
+
body,
|
|
703
|
+
requestHeaders,
|
|
704
|
+
} = { requestHeaders: {} },
|
|
705
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
706
|
+
) {
|
|
707
|
+
const { error } = LogisticsPartnerValidator.updateDeliveryTime().validate(
|
|
708
|
+
{
|
|
709
|
+
partnerOrgId,
|
|
710
|
+
courierPartnerExtensionId,
|
|
711
|
+
schemeId,
|
|
712
|
+
id,
|
|
713
|
+
body,
|
|
714
|
+
},
|
|
715
|
+
{ abortEarly: false, allowUnknown: true }
|
|
716
|
+
);
|
|
717
|
+
if (error) {
|
|
718
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// Showing warrnings if extra unknown parameters are found
|
|
722
|
+
const {
|
|
723
|
+
error: warrning,
|
|
724
|
+
} = LogisticsPartnerValidator.updateDeliveryTime().validate(
|
|
725
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id, body },
|
|
726
|
+
{ abortEarly: false, allowUnknown: false }
|
|
727
|
+
);
|
|
728
|
+
if (warrning) {
|
|
729
|
+
Logger({
|
|
730
|
+
level: "WARN",
|
|
731
|
+
message: `Parameter Validation warrnings for partner > Logistics > updateDeliveryTime \n ${warrning}`,
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
const query_params = {};
|
|
736
|
+
|
|
737
|
+
const response = await PartnerAPIClient.execute(
|
|
738
|
+
this.config,
|
|
739
|
+
"put",
|
|
740
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`,
|
|
741
|
+
query_params,
|
|
742
|
+
body,
|
|
743
|
+
requestHeaders,
|
|
744
|
+
{ responseHeaders }
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
let responseData = response;
|
|
748
|
+
if (responseHeaders) {
|
|
749
|
+
responseData = response[0];
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
const {
|
|
753
|
+
error: res_error,
|
|
754
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
755
|
+
abortEarly: false,
|
|
756
|
+
allowUnknown: true,
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
if (res_error) {
|
|
760
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
761
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
762
|
+
} else {
|
|
763
|
+
Logger({
|
|
764
|
+
level: "WARN",
|
|
765
|
+
message: `Response Validation Warnings for partner > Logistics > updateDeliveryTime \n ${res_error}`,
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
return response;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @param {LogisticsPartnerValidator.DeleteDeliveryTimeParam} arg - Arg object.
|
|
775
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
776
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
777
|
+
* @returns {Promise<LogisticsPartnerModel.RegionTatResult>} - Success response
|
|
778
|
+
* @name deleteDeliveryTime
|
|
779
|
+
* @summary: Region based delivery time delete
|
|
780
|
+
* @description: Delete the delivery time record for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteDeliveryTime/).
|
|
781
|
+
*/
|
|
782
|
+
async deleteDeliveryTime(
|
|
783
|
+
{
|
|
784
|
+
partnerOrgId,
|
|
785
|
+
courierPartnerExtensionId,
|
|
786
|
+
schemeId,
|
|
787
|
+
id,
|
|
788
|
+
requestHeaders,
|
|
789
|
+
} = { requestHeaders: {} },
|
|
790
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
791
|
+
) {
|
|
792
|
+
const { error } = LogisticsPartnerValidator.deleteDeliveryTime().validate(
|
|
793
|
+
{
|
|
794
|
+
partnerOrgId,
|
|
795
|
+
courierPartnerExtensionId,
|
|
796
|
+
schemeId,
|
|
797
|
+
id,
|
|
798
|
+
},
|
|
799
|
+
{ abortEarly: false, allowUnknown: true }
|
|
800
|
+
);
|
|
801
|
+
if (error) {
|
|
802
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// Showing warrnings if extra unknown parameters are found
|
|
806
|
+
const {
|
|
807
|
+
error: warrning,
|
|
808
|
+
} = LogisticsPartnerValidator.deleteDeliveryTime().validate(
|
|
809
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
810
|
+
{ abortEarly: false, allowUnknown: false }
|
|
811
|
+
);
|
|
812
|
+
if (warrning) {
|
|
813
|
+
Logger({
|
|
814
|
+
level: "WARN",
|
|
815
|
+
message: `Parameter Validation warrnings for partner > Logistics > deleteDeliveryTime \n ${warrning}`,
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
const query_params = {};
|
|
820
|
+
|
|
821
|
+
const response = await PartnerAPIClient.execute(
|
|
822
|
+
this.config,
|
|
823
|
+
"delete",
|
|
824
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`,
|
|
825
|
+
query_params,
|
|
826
|
+
undefined,
|
|
827
|
+
requestHeaders,
|
|
828
|
+
{ responseHeaders }
|
|
829
|
+
);
|
|
830
|
+
|
|
831
|
+
let responseData = response;
|
|
832
|
+
if (responseHeaders) {
|
|
833
|
+
responseData = response[0];
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
const {
|
|
837
|
+
error: res_error,
|
|
838
|
+
} = LogisticsPartnerModel.RegionTatResult().validate(responseData, {
|
|
839
|
+
abortEarly: false,
|
|
840
|
+
allowUnknown: true,
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
if (res_error) {
|
|
844
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
845
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
846
|
+
} else {
|
|
847
|
+
Logger({
|
|
848
|
+
level: "WARN",
|
|
849
|
+
message: `Response Validation Warnings for partner > Logistics > deleteDeliveryTime \n ${res_error}`,
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
return response;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* @param {LogisticsPartnerValidator.CreateServiceabilityParam} arg - Arg object.
|
|
859
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
860
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
861
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityResult>} -
|
|
862
|
+
* Success response
|
|
863
|
+
* @name createServiceability
|
|
864
|
+
* @summary: Serviceability insert
|
|
865
|
+
* @description: Insert the serviceability for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createServiceability/).
|
|
866
|
+
*/
|
|
867
|
+
async createServiceability(
|
|
868
|
+
{
|
|
869
|
+
partnerOrgId,
|
|
870
|
+
courierPartnerExtensionId,
|
|
871
|
+
schemeId,
|
|
872
|
+
body,
|
|
873
|
+
requestHeaders,
|
|
874
|
+
} = { requestHeaders: {} },
|
|
875
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
876
|
+
) {
|
|
877
|
+
const { error } = LogisticsPartnerValidator.createServiceability().validate(
|
|
878
|
+
{
|
|
879
|
+
partnerOrgId,
|
|
880
|
+
courierPartnerExtensionId,
|
|
881
|
+
schemeId,
|
|
882
|
+
body,
|
|
883
|
+
},
|
|
884
|
+
{ abortEarly: false, allowUnknown: true }
|
|
885
|
+
);
|
|
886
|
+
if (error) {
|
|
887
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// Showing warrnings if extra unknown parameters are found
|
|
891
|
+
const {
|
|
892
|
+
error: warrning,
|
|
893
|
+
} = LogisticsPartnerValidator.createServiceability().validate(
|
|
894
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, body },
|
|
895
|
+
{ abortEarly: false, allowUnknown: false }
|
|
896
|
+
);
|
|
897
|
+
if (warrning) {
|
|
898
|
+
Logger({
|
|
899
|
+
level: "WARN",
|
|
900
|
+
message: `Parameter Validation warrnings for partner > Logistics > createServiceability \n ${warrning}`,
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
const query_params = {};
|
|
905
|
+
|
|
906
|
+
const response = await PartnerAPIClient.execute(
|
|
907
|
+
this.config,
|
|
908
|
+
"post",
|
|
909
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability`,
|
|
910
|
+
query_params,
|
|
911
|
+
body,
|
|
912
|
+
requestHeaders,
|
|
913
|
+
{ responseHeaders }
|
|
914
|
+
);
|
|
915
|
+
|
|
916
|
+
let responseData = response;
|
|
917
|
+
if (responseHeaders) {
|
|
918
|
+
responseData = response[0];
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
const {
|
|
922
|
+
error: res_error,
|
|
923
|
+
} = LogisticsPartnerModel.RegionServiceabilityResult().validate(
|
|
924
|
+
responseData,
|
|
925
|
+
{ abortEarly: false, allowUnknown: true }
|
|
926
|
+
);
|
|
927
|
+
|
|
928
|
+
if (res_error) {
|
|
929
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
930
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
931
|
+
} else {
|
|
932
|
+
Logger({
|
|
933
|
+
level: "WARN",
|
|
934
|
+
message: `Response Validation Warnings for partner > Logistics > createServiceability \n ${res_error}`,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
return response;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* @param {LogisticsPartnerValidator.GetServiceabilitiesParam} arg - Arg object.
|
|
944
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
945
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
946
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityItemResult>}
|
|
947
|
+
* - Success response
|
|
948
|
+
*
|
|
949
|
+
* @name getServiceabilities
|
|
950
|
+
* @summary: Get region serviceability list
|
|
951
|
+
* @description: Retrieve a list of serviceability for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceabilities/).
|
|
952
|
+
*/
|
|
953
|
+
async getServiceabilities(
|
|
954
|
+
{
|
|
955
|
+
partnerOrgId,
|
|
956
|
+
courierPartnerExtensionId,
|
|
957
|
+
schemeId,
|
|
958
|
+
pageNo,
|
|
959
|
+
pageSize,
|
|
960
|
+
countryCode,
|
|
961
|
+
stateCode,
|
|
962
|
+
cityCode,
|
|
963
|
+
sectorCode,
|
|
964
|
+
pincode,
|
|
965
|
+
firstMile,
|
|
966
|
+
lastMile,
|
|
967
|
+
doorstepReturn,
|
|
968
|
+
doorstepQc,
|
|
969
|
+
installation,
|
|
970
|
+
requestHeaders,
|
|
971
|
+
} = { requestHeaders: {} },
|
|
972
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
973
|
+
) {
|
|
974
|
+
const { error } = LogisticsPartnerValidator.getServiceabilities().validate(
|
|
975
|
+
{
|
|
976
|
+
partnerOrgId,
|
|
977
|
+
courierPartnerExtensionId,
|
|
978
|
+
schemeId,
|
|
979
|
+
pageNo,
|
|
980
|
+
pageSize,
|
|
981
|
+
countryCode,
|
|
982
|
+
stateCode,
|
|
983
|
+
cityCode,
|
|
984
|
+
sectorCode,
|
|
985
|
+
pincode,
|
|
986
|
+
firstMile,
|
|
987
|
+
lastMile,
|
|
988
|
+
doorstepReturn,
|
|
989
|
+
doorstepQc,
|
|
990
|
+
installation,
|
|
991
|
+
},
|
|
992
|
+
{ abortEarly: false, allowUnknown: true }
|
|
993
|
+
);
|
|
994
|
+
if (error) {
|
|
995
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// Showing warrnings if extra unknown parameters are found
|
|
999
|
+
const {
|
|
1000
|
+
error: warrning,
|
|
1001
|
+
} = LogisticsPartnerValidator.getServiceabilities().validate(
|
|
1002
|
+
{
|
|
1003
|
+
partnerOrgId,
|
|
1004
|
+
courierPartnerExtensionId,
|
|
1005
|
+
schemeId,
|
|
1006
|
+
pageNo,
|
|
1007
|
+
pageSize,
|
|
1008
|
+
countryCode,
|
|
1009
|
+
stateCode,
|
|
1010
|
+
cityCode,
|
|
1011
|
+
sectorCode,
|
|
1012
|
+
pincode,
|
|
1013
|
+
firstMile,
|
|
1014
|
+
lastMile,
|
|
1015
|
+
doorstepReturn,
|
|
1016
|
+
doorstepQc,
|
|
1017
|
+
installation,
|
|
1018
|
+
},
|
|
1019
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1020
|
+
);
|
|
1021
|
+
if (warrning) {
|
|
1022
|
+
Logger({
|
|
1023
|
+
level: "WARN",
|
|
1024
|
+
message: `Parameter Validation warrnings for partner > Logistics > getServiceabilities \n ${warrning}`,
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
const query_params = {};
|
|
1029
|
+
query_params["page_no"] = pageNo;
|
|
1030
|
+
query_params["page_size"] = pageSize;
|
|
1031
|
+
query_params["country_code"] = countryCode;
|
|
1032
|
+
query_params["state_code"] = stateCode;
|
|
1033
|
+
query_params["city_code"] = cityCode;
|
|
1034
|
+
query_params["sector_code"] = sectorCode;
|
|
1035
|
+
query_params["pincode"] = pincode;
|
|
1036
|
+
query_params["first_mile"] = firstMile;
|
|
1037
|
+
query_params["last_mile"] = lastMile;
|
|
1038
|
+
query_params["doorstep_return"] = doorstepReturn;
|
|
1039
|
+
query_params["doorstep_qc"] = doorstepQc;
|
|
1040
|
+
query_params["installation"] = installation;
|
|
1041
|
+
|
|
1042
|
+
const response = await PartnerAPIClient.execute(
|
|
1043
|
+
this.config,
|
|
1044
|
+
"get",
|
|
1045
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability`,
|
|
1046
|
+
query_params,
|
|
1047
|
+
undefined,
|
|
1048
|
+
requestHeaders,
|
|
1049
|
+
{ responseHeaders }
|
|
1050
|
+
);
|
|
1051
|
+
|
|
1052
|
+
let responseData = response;
|
|
1053
|
+
if (responseHeaders) {
|
|
1054
|
+
responseData = response[0];
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const {
|
|
1058
|
+
error: res_error,
|
|
1059
|
+
} = LogisticsPartnerModel.RegionServiceabilityItemResult().validate(
|
|
1060
|
+
responseData,
|
|
1061
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1062
|
+
);
|
|
1063
|
+
|
|
1064
|
+
if (res_error) {
|
|
1065
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1066
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1067
|
+
} else {
|
|
1068
|
+
Logger({
|
|
1069
|
+
level: "WARN",
|
|
1070
|
+
message: `Response Validation Warnings for partner > Logistics > getServiceabilities \n ${res_error}`,
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
return response;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* @param {LogisticsPartnerValidator.GetServiceabilityParam} arg - Arg object.
|
|
1080
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1081
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1082
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityResult>} -
|
|
1083
|
+
* Success response
|
|
1084
|
+
* @name getServiceability
|
|
1085
|
+
* @summary: Get region serviceability
|
|
1086
|
+
* @description: Retrieve serviceability for specific region within a courier partner scheme for a given identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceability/).
|
|
1087
|
+
*/
|
|
1088
|
+
async getServiceability(
|
|
1089
|
+
{
|
|
1090
|
+
partnerOrgId,
|
|
1091
|
+
courierPartnerExtensionId,
|
|
1092
|
+
schemeId,
|
|
1093
|
+
id,
|
|
1094
|
+
requestHeaders,
|
|
1095
|
+
} = { requestHeaders: {} },
|
|
1096
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1097
|
+
) {
|
|
1098
|
+
const { error } = LogisticsPartnerValidator.getServiceability().validate(
|
|
1099
|
+
{
|
|
1100
|
+
partnerOrgId,
|
|
1101
|
+
courierPartnerExtensionId,
|
|
1102
|
+
schemeId,
|
|
1103
|
+
id,
|
|
1104
|
+
},
|
|
1105
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1106
|
+
);
|
|
1107
|
+
if (error) {
|
|
1108
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1112
|
+
const {
|
|
1113
|
+
error: warrning,
|
|
1114
|
+
} = LogisticsPartnerValidator.getServiceability().validate(
|
|
1115
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
1116
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1117
|
+
);
|
|
1118
|
+
if (warrning) {
|
|
1119
|
+
Logger({
|
|
1120
|
+
level: "WARN",
|
|
1121
|
+
message: `Parameter Validation warrnings for partner > Logistics > getServiceability \n ${warrning}`,
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
const query_params = {};
|
|
1126
|
+
|
|
1127
|
+
const response = await PartnerAPIClient.execute(
|
|
1128
|
+
this.config,
|
|
1129
|
+
"get",
|
|
1130
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`,
|
|
1131
|
+
query_params,
|
|
1132
|
+
undefined,
|
|
1133
|
+
requestHeaders,
|
|
1134
|
+
{ responseHeaders }
|
|
1135
|
+
);
|
|
1136
|
+
|
|
1137
|
+
let responseData = response;
|
|
1138
|
+
if (responseHeaders) {
|
|
1139
|
+
responseData = response[0];
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
const {
|
|
1143
|
+
error: res_error,
|
|
1144
|
+
} = LogisticsPartnerModel.RegionServiceabilityResult().validate(
|
|
1145
|
+
responseData,
|
|
1146
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1147
|
+
);
|
|
1148
|
+
|
|
1149
|
+
if (res_error) {
|
|
1150
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1151
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1152
|
+
} else {
|
|
1153
|
+
Logger({
|
|
1154
|
+
level: "WARN",
|
|
1155
|
+
message: `Response Validation Warnings for partner > Logistics > getServiceability \n ${res_error}`,
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
return response;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* @param {LogisticsPartnerValidator.UpdateServiceabilityParam} arg - Arg object.
|
|
1165
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1166
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1167
|
+
* @returns {Promise<LogisticsPartnerModel.ServiceabilityDetailsResult>} -
|
|
1168
|
+
* Success response
|
|
1169
|
+
* @name updateServiceability
|
|
1170
|
+
* @summary: Serviceability update
|
|
1171
|
+
* @description: Update the serviceability for a specific region within a courier partner scheme based on unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateServiceability/).
|
|
1172
|
+
*/
|
|
1173
|
+
async updateServiceability(
|
|
1174
|
+
{
|
|
1175
|
+
partnerOrgId,
|
|
1176
|
+
courierPartnerExtensionId,
|
|
1177
|
+
schemeId,
|
|
1178
|
+
id,
|
|
1179
|
+
body,
|
|
1180
|
+
requestHeaders,
|
|
1181
|
+
} = { requestHeaders: {} },
|
|
1182
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1183
|
+
) {
|
|
1184
|
+
const { error } = LogisticsPartnerValidator.updateServiceability().validate(
|
|
1185
|
+
{
|
|
1186
|
+
partnerOrgId,
|
|
1187
|
+
courierPartnerExtensionId,
|
|
1188
|
+
schemeId,
|
|
1189
|
+
id,
|
|
1190
|
+
body,
|
|
1191
|
+
},
|
|
1192
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1193
|
+
);
|
|
1194
|
+
if (error) {
|
|
1195
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1199
|
+
const {
|
|
1200
|
+
error: warrning,
|
|
1201
|
+
} = LogisticsPartnerValidator.updateServiceability().validate(
|
|
1202
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id, body },
|
|
1203
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1204
|
+
);
|
|
1205
|
+
if (warrning) {
|
|
1206
|
+
Logger({
|
|
1207
|
+
level: "WARN",
|
|
1208
|
+
message: `Parameter Validation warrnings for partner > Logistics > updateServiceability \n ${warrning}`,
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
const query_params = {};
|
|
1213
|
+
|
|
1214
|
+
const response = await PartnerAPIClient.execute(
|
|
1215
|
+
this.config,
|
|
1216
|
+
"put",
|
|
1217
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`,
|
|
1218
|
+
query_params,
|
|
1219
|
+
body,
|
|
1220
|
+
requestHeaders,
|
|
1221
|
+
{ responseHeaders }
|
|
1222
|
+
);
|
|
1223
|
+
|
|
1224
|
+
let responseData = response;
|
|
1225
|
+
if (responseHeaders) {
|
|
1226
|
+
responseData = response[0];
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
const {
|
|
1230
|
+
error: res_error,
|
|
1231
|
+
} = LogisticsPartnerModel.ServiceabilityDetailsResult().validate(
|
|
1232
|
+
responseData,
|
|
1233
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1234
|
+
);
|
|
1235
|
+
|
|
1236
|
+
if (res_error) {
|
|
1237
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1238
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1239
|
+
} else {
|
|
1240
|
+
Logger({
|
|
1241
|
+
level: "WARN",
|
|
1242
|
+
message: `Response Validation Warnings for partner > Logistics > updateServiceability \n ${res_error}`,
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
return response;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* @param {LogisticsPartnerValidator.DeleteServiceabilityParam} arg - Arg object.
|
|
1252
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1253
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1254
|
+
* @returns {Promise<LogisticsPartnerModel.RegionServiceabilityResult>} -
|
|
1255
|
+
* Success response
|
|
1256
|
+
* @name deleteServiceability
|
|
1257
|
+
* @summary: Serviceability delete
|
|
1258
|
+
* @description: Delete the serviceability for a specific region within a courier partner scheme based on a unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteServiceability/).
|
|
1259
|
+
*/
|
|
1260
|
+
async deleteServiceability(
|
|
1261
|
+
{
|
|
1262
|
+
partnerOrgId,
|
|
1263
|
+
courierPartnerExtensionId,
|
|
1264
|
+
schemeId,
|
|
1265
|
+
id,
|
|
1266
|
+
requestHeaders,
|
|
1267
|
+
} = { requestHeaders: {} },
|
|
1268
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1269
|
+
) {
|
|
1270
|
+
const { error } = LogisticsPartnerValidator.deleteServiceability().validate(
|
|
1271
|
+
{
|
|
1272
|
+
partnerOrgId,
|
|
1273
|
+
courierPartnerExtensionId,
|
|
1274
|
+
schemeId,
|
|
1275
|
+
id,
|
|
1276
|
+
},
|
|
1277
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1278
|
+
);
|
|
1279
|
+
if (error) {
|
|
1280
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1284
|
+
const {
|
|
1285
|
+
error: warrning,
|
|
1286
|
+
} = LogisticsPartnerValidator.deleteServiceability().validate(
|
|
1287
|
+
{ partnerOrgId, courierPartnerExtensionId, schemeId, id },
|
|
1288
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1289
|
+
);
|
|
1290
|
+
if (warrning) {
|
|
1291
|
+
Logger({
|
|
1292
|
+
level: "WARN",
|
|
1293
|
+
message: `Parameter Validation warrnings for partner > Logistics > deleteServiceability \n ${warrning}`,
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
const query_params = {};
|
|
1298
|
+
|
|
1299
|
+
const response = await PartnerAPIClient.execute(
|
|
1300
|
+
this.config,
|
|
1301
|
+
"delete",
|
|
1302
|
+
`/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`,
|
|
1303
|
+
query_params,
|
|
1304
|
+
undefined,
|
|
1305
|
+
requestHeaders,
|
|
1306
|
+
{ responseHeaders }
|
|
1307
|
+
);
|
|
1308
|
+
|
|
1309
|
+
let responseData = response;
|
|
1310
|
+
if (responseHeaders) {
|
|
1311
|
+
responseData = response[0];
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
const {
|
|
1315
|
+
error: res_error,
|
|
1316
|
+
} = LogisticsPartnerModel.RegionServiceabilityResult().validate(
|
|
1317
|
+
responseData,
|
|
1318
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1319
|
+
);
|
|
1320
|
+
|
|
1321
|
+
if (res_error) {
|
|
1322
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1323
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1324
|
+
} else {
|
|
1325
|
+
Logger({
|
|
1326
|
+
level: "WARN",
|
|
1327
|
+
message: `Response Validation Warnings for partner > Logistics > deleteServiceability \n ${res_error}`,
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
return response;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
385
1335
|
/**
|
|
386
1336
|
* @param {LogisticsPartnerValidator.BulkServiceabilityParam} arg - Arg object.
|
|
387
1337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
388
1338
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
389
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1339
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResultItemData>} -
|
|
390
1340
|
* Success response
|
|
391
1341
|
* @name bulkServiceability
|
|
392
1342
|
* @summary: Serviceability Import or Export
|
|
@@ -445,7 +1395,7 @@ class Logistics {
|
|
|
445
1395
|
|
|
446
1396
|
const {
|
|
447
1397
|
error: res_error,
|
|
448
|
-
} = LogisticsPartnerModel.
|
|
1398
|
+
} = LogisticsPartnerModel.BulkRegionResultItemData().validate(
|
|
449
1399
|
responseData,
|
|
450
1400
|
{ abortEarly: false, allowUnknown: true }
|
|
451
1401
|
);
|
|
@@ -468,7 +1418,7 @@ class Logistics {
|
|
|
468
1418
|
* @param {LogisticsPartnerValidator.GetBulkServiceabilityParam} arg - Arg object.
|
|
469
1419
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
470
1420
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
471
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1421
|
+
* @returns {Promise<LogisticsPartnerModel.BulkRegionResult>} - Success response
|
|
472
1422
|
* @name getBulkServiceability
|
|
473
1423
|
* @summary: Get Region Serviceability Bulk History
|
|
474
1424
|
* @description: Get Region Serviceability Bulk History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkServiceability/).
|
|
@@ -566,7 +1516,7 @@ class Logistics {
|
|
|
566
1516
|
|
|
567
1517
|
const {
|
|
568
1518
|
error: res_error,
|
|
569
|
-
} = LogisticsPartnerModel.
|
|
1519
|
+
} = LogisticsPartnerModel.BulkRegionResult().validate(responseData, {
|
|
570
1520
|
abortEarly: false,
|
|
571
1521
|
allowUnknown: true,
|
|
572
1522
|
});
|
|
@@ -672,7 +1622,7 @@ class Logistics {
|
|
|
672
1622
|
* @param {LogisticsPartnerValidator.GetCourierPartnerAccountsParam} arg - Arg object.
|
|
673
1623
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
674
1624
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
675
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1625
|
+
* @returns {Promise<LogisticsPartnerModel.CompanyCourierPartnerAccountListResult>}
|
|
676
1626
|
* - Success response
|
|
677
1627
|
*
|
|
678
1628
|
* @name getCourierPartnerAccounts
|
|
@@ -753,7 +1703,7 @@ class Logistics {
|
|
|
753
1703
|
|
|
754
1704
|
const {
|
|
755
1705
|
error: res_error,
|
|
756
|
-
} = LogisticsPartnerModel.
|
|
1706
|
+
} = LogisticsPartnerModel.CompanyCourierPartnerAccountListResult().validate(
|
|
757
1707
|
responseData,
|
|
758
1708
|
{ abortEarly: false, allowUnknown: true }
|
|
759
1709
|
);
|
|
@@ -778,7 +1728,7 @@ class Logistics {
|
|
|
778
1728
|
*
|
|
779
1729
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
780
1730
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
781
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1731
|
+
* @returns {Promise<LogisticsPartnerModel.CourierAccountResult>} - Success response
|
|
782
1732
|
* @name updateCourierPartnerAccount
|
|
783
1733
|
* @summary: Update Courier Account in database
|
|
784
1734
|
* @description: Updates Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateCourierPartnerAccount/).
|
|
@@ -838,7 +1788,7 @@ class Logistics {
|
|
|
838
1788
|
|
|
839
1789
|
const {
|
|
840
1790
|
error: res_error,
|
|
841
|
-
} = LogisticsPartnerModel.
|
|
1791
|
+
} = LogisticsPartnerModel.CourierAccountResult().validate(responseData, {
|
|
842
1792
|
abortEarly: false,
|
|
843
1793
|
allowUnknown: true,
|
|
844
1794
|
});
|
|
@@ -861,7 +1811,7 @@ class Logistics {
|
|
|
861
1811
|
* @param {LogisticsPartnerValidator.GetCourierPartnerAccountParam} arg - Arg object.
|
|
862
1812
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
863
1813
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
864
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1814
|
+
* @returns {Promise<LogisticsPartnerModel.CourierAccountResult>} - Success response
|
|
865
1815
|
* @name getCourierPartnerAccount
|
|
866
1816
|
* @summary: Getting Courier Account of a company from database
|
|
867
1817
|
* @description: This API returns response DpAccount of a company from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerAccount/).
|
|
@@ -919,7 +1869,7 @@ class Logistics {
|
|
|
919
1869
|
|
|
920
1870
|
const {
|
|
921
1871
|
error: res_error,
|
|
922
|
-
} = LogisticsPartnerModel.
|
|
1872
|
+
} = LogisticsPartnerModel.CourierAccountResult().validate(responseData, {
|
|
923
1873
|
abortEarly: false,
|
|
924
1874
|
allowUnknown: true,
|
|
925
1875
|
});
|
|
@@ -1024,7 +1974,7 @@ class Logistics {
|
|
|
1024
1974
|
* Arg object.
|
|
1025
1975
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1026
1976
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
1027
|
-
* @returns {Promise<LogisticsPartnerModel.
|
|
1977
|
+
* @returns {Promise<LogisticsPartnerModel.CourierPartnerSchemeUpdateDetails>}
|
|
1028
1978
|
* - Success response
|
|
1029
1979
|
*
|
|
1030
1980
|
* @name updateCourierPartnerScheme
|
|
@@ -1084,7 +2034,7 @@ class Logistics {
|
|
|
1084
2034
|
|
|
1085
2035
|
const {
|
|
1086
2036
|
error: res_error,
|
|
1087
|
-
} = LogisticsPartnerModel.
|
|
2037
|
+
} = LogisticsPartnerModel.CourierPartnerSchemeUpdateDetails().validate(
|
|
1088
2038
|
responseData,
|
|
1089
2039
|
{ abortEarly: false, allowUnknown: true }
|
|
1090
2040
|
);
|