@gofynd/fdk-client-javascript 1.4.15-beta.13 → 1.4.15-beta.15
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 +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -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 +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- 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 +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9571 -2674
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5081 -2019
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- 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
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -18,12 +18,12 @@ class Serviceability {
|
|
|
18
18
|
* @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
21
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResultItemData>}
|
|
22
22
|
* - Success response
|
|
23
23
|
*
|
|
24
24
|
* @name bulkServiceability
|
|
25
25
|
* @summary: Bulk update serviceability of localities
|
|
26
|
-
* @description: Bulk operations involve either new serviceability settings or updating existing ones in large quantities. - Check out [method documentation](https://
|
|
26
|
+
* @description: Bulk operations involve either new serviceability settings or updating existing ones in large quantities. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/bulkServiceability/).
|
|
27
27
|
*/
|
|
28
28
|
async bulkServiceability(
|
|
29
29
|
{ extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -68,7 +68,7 @@ class Serviceability {
|
|
|
68
68
|
const response = await PlatformAPIClient.execute(
|
|
69
69
|
this.config,
|
|
70
70
|
"post",
|
|
71
|
-
`/service/platform/logistics/
|
|
71
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
|
|
72
72
|
query_params,
|
|
73
73
|
body,
|
|
74
74
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -82,7 +82,7 @@ class Serviceability {
|
|
|
82
82
|
|
|
83
83
|
const {
|
|
84
84
|
error: res_error,
|
|
85
|
-
} = ServiceabilityPlatformModel.
|
|
85
|
+
} = ServiceabilityPlatformModel.BulkRegionResultItemData().validate(
|
|
86
86
|
responseData,
|
|
87
87
|
{ abortEarly: false, allowUnknown: true }
|
|
88
88
|
);
|
|
@@ -105,13 +105,13 @@ class Serviceability {
|
|
|
105
105
|
* @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object
|
|
106
106
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
107
107
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
108
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
108
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResultItemData>}
|
|
109
109
|
* - Success response
|
|
110
110
|
*
|
|
111
111
|
* @name bulkTat
|
|
112
112
|
* @summary: Locality TAT import or export
|
|
113
113
|
* @description: Updates locality wise TAT(Turn Around Time) for particular courier scheme using CSV file.
|
|
114
|
-
* Export locality wise CSV files. - Check out [method documentation](https://
|
|
114
|
+
* Export locality wise CSV files. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/bulkTat/).
|
|
115
115
|
*/
|
|
116
116
|
async bulkTat(
|
|
117
117
|
{ extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -154,7 +154,7 @@ class Serviceability {
|
|
|
154
154
|
const response = await PlatformAPIClient.execute(
|
|
155
155
|
this.config,
|
|
156
156
|
"post",
|
|
157
|
-
`/service/platform/logistics/
|
|
157
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
158
158
|
query_params,
|
|
159
159
|
body,
|
|
160
160
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -168,7 +168,7 @@ class Serviceability {
|
|
|
168
168
|
|
|
169
169
|
const {
|
|
170
170
|
error: res_error,
|
|
171
|
-
} = ServiceabilityPlatformModel.
|
|
171
|
+
} = ServiceabilityPlatformModel.BulkRegionResultItemData().validate(
|
|
172
172
|
responseData,
|
|
173
173
|
{ abortEarly: false, allowUnknown: true }
|
|
174
174
|
);
|
|
@@ -193,10 +193,12 @@ class Serviceability {
|
|
|
193
193
|
*
|
|
194
194
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
195
195
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
196
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
196
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountDetailsBody>}
|
|
197
|
+
* - Success response
|
|
198
|
+
*
|
|
197
199
|
* @name createCourierPartnerAccount
|
|
198
200
|
* @summary: Create courier account
|
|
199
|
-
* @description:
|
|
201
|
+
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createCourierPartnerAccount/).
|
|
200
202
|
*/
|
|
201
203
|
async createCourierPartnerAccount(
|
|
202
204
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -251,10 +253,10 @@ class Serviceability {
|
|
|
251
253
|
|
|
252
254
|
const {
|
|
253
255
|
error: res_error,
|
|
254
|
-
} = ServiceabilityPlatformModel.
|
|
255
|
-
|
|
256
|
-
allowUnknown: true
|
|
257
|
-
|
|
256
|
+
} = ServiceabilityPlatformModel.CourierAccountDetailsBody().validate(
|
|
257
|
+
responseData,
|
|
258
|
+
{ abortEarly: false, allowUnknown: true }
|
|
259
|
+
);
|
|
258
260
|
|
|
259
261
|
if (res_error) {
|
|
260
262
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -271,25 +273,25 @@ class Serviceability {
|
|
|
271
273
|
}
|
|
272
274
|
|
|
273
275
|
/**
|
|
274
|
-
* @param {ServiceabilityPlatformValidator.
|
|
276
|
+
* @param {ServiceabilityPlatformValidator.CreateCourierPartnerSchemeParam} arg
|
|
275
277
|
* - Arg object
|
|
276
278
|
*
|
|
277
279
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
278
280
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
279
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
281
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
280
282
|
* - Success response
|
|
281
283
|
*
|
|
282
|
-
* @name
|
|
283
|
-
* @summary: Create
|
|
284
|
-
* @description:
|
|
284
|
+
* @name createCourierPartnerScheme
|
|
285
|
+
* @summary: Create Scheme for courier partner extension
|
|
286
|
+
* @description: Create Scheme for courier partner extension - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createCourierPartnerScheme/).
|
|
285
287
|
*/
|
|
286
|
-
async
|
|
288
|
+
async createCourierPartnerScheme(
|
|
287
289
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
288
290
|
{ responseHeaders } = { responseHeaders: false }
|
|
289
291
|
) {
|
|
290
292
|
const {
|
|
291
293
|
error,
|
|
292
|
-
} = ServiceabilityPlatformValidator.
|
|
294
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerScheme().validate(
|
|
293
295
|
{
|
|
294
296
|
body,
|
|
295
297
|
},
|
|
@@ -302,7 +304,7 @@ class Serviceability {
|
|
|
302
304
|
// Showing warrnings if extra unknown parameters are found
|
|
303
305
|
const {
|
|
304
306
|
error: warrning,
|
|
305
|
-
} = ServiceabilityPlatformValidator.
|
|
307
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerScheme().validate(
|
|
306
308
|
{
|
|
307
309
|
body,
|
|
308
310
|
},
|
|
@@ -311,7 +313,7 @@ class Serviceability {
|
|
|
311
313
|
if (warrning) {
|
|
312
314
|
Logger({
|
|
313
315
|
level: "WARN",
|
|
314
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
316
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerScheme \n ${warrning}`,
|
|
315
317
|
});
|
|
316
318
|
}
|
|
317
319
|
|
|
@@ -322,7 +324,7 @@ class Serviceability {
|
|
|
322
324
|
const response = await PlatformAPIClient.execute(
|
|
323
325
|
this.config,
|
|
324
326
|
"post",
|
|
325
|
-
`/service/platform/logistics/
|
|
327
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
326
328
|
query_params,
|
|
327
329
|
body,
|
|
328
330
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -336,7 +338,7 @@ class Serviceability {
|
|
|
336
338
|
|
|
337
339
|
const {
|
|
338
340
|
error: res_error,
|
|
339
|
-
} = ServiceabilityPlatformModel.
|
|
341
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
340
342
|
responseData,
|
|
341
343
|
{ abortEarly: false, allowUnknown: true }
|
|
342
344
|
);
|
|
@@ -347,7 +349,7 @@ class Serviceability {
|
|
|
347
349
|
} else {
|
|
348
350
|
Logger({
|
|
349
351
|
level: "WARN",
|
|
350
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
352
|
+
message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerScheme \n ${res_error}`,
|
|
351
353
|
});
|
|
352
354
|
}
|
|
353
355
|
}
|
|
@@ -356,26 +358,27 @@ class Serviceability {
|
|
|
356
358
|
}
|
|
357
359
|
|
|
358
360
|
/**
|
|
359
|
-
* @param {ServiceabilityPlatformValidator.
|
|
361
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg
|
|
360
362
|
* - Arg object
|
|
361
363
|
*
|
|
362
364
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
363
365
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
364
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
366
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
365
367
|
* Success response
|
|
366
|
-
* @name
|
|
367
|
-
* @summary: Create packaging
|
|
368
|
-
* @description: Creates a packaging
|
|
368
|
+
* @name createPackageMaterial
|
|
369
|
+
* @summary: Create packaging material
|
|
370
|
+
* @description: Creates a packaging material - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createPackageMaterial/).
|
|
369
371
|
*/
|
|
370
|
-
async
|
|
371
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
372
|
+
async createPackageMaterial(
|
|
373
|
+
{ body, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
372
374
|
{ responseHeaders } = { responseHeaders: false }
|
|
373
375
|
) {
|
|
374
376
|
const {
|
|
375
377
|
error,
|
|
376
|
-
} = ServiceabilityPlatformValidator.
|
|
378
|
+
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
377
379
|
{
|
|
378
380
|
body,
|
|
381
|
+
pageNo,
|
|
379
382
|
},
|
|
380
383
|
{ abortEarly: false, allowUnknown: true }
|
|
381
384
|
);
|
|
@@ -386,27 +389,29 @@ class Serviceability {
|
|
|
386
389
|
// Showing warrnings if extra unknown parameters are found
|
|
387
390
|
const {
|
|
388
391
|
error: warrning,
|
|
389
|
-
} = ServiceabilityPlatformValidator.
|
|
392
|
+
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
390
393
|
{
|
|
391
394
|
body,
|
|
395
|
+
pageNo,
|
|
392
396
|
},
|
|
393
397
|
{ abortEarly: false, allowUnknown: false }
|
|
394
398
|
);
|
|
395
399
|
if (warrning) {
|
|
396
400
|
Logger({
|
|
397
401
|
level: "WARN",
|
|
398
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
402
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterial \n ${warrning}`,
|
|
399
403
|
});
|
|
400
404
|
}
|
|
401
405
|
|
|
402
406
|
const query_params = {};
|
|
407
|
+
query_params["page_no"] = pageNo;
|
|
403
408
|
|
|
404
409
|
const xHeaders = {};
|
|
405
410
|
|
|
406
411
|
const response = await PlatformAPIClient.execute(
|
|
407
412
|
this.config,
|
|
408
413
|
"post",
|
|
409
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-
|
|
414
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
|
|
410
415
|
query_params,
|
|
411
416
|
body,
|
|
412
417
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -420,7 +425,7 @@ class Serviceability {
|
|
|
420
425
|
|
|
421
426
|
const {
|
|
422
427
|
error: res_error,
|
|
423
|
-
} = ServiceabilityPlatformModel.
|
|
428
|
+
} = ServiceabilityPlatformModel.PackageMaterialResult().validate(
|
|
424
429
|
responseData,
|
|
425
430
|
{ abortEarly: false, allowUnknown: true }
|
|
426
431
|
);
|
|
@@ -431,7 +436,7 @@ class Serviceability {
|
|
|
431
436
|
} else {
|
|
432
437
|
Logger({
|
|
433
438
|
level: "WARN",
|
|
434
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
439
|
+
message: `Response Validation Warnings for platform > Serviceability > createPackageMaterial \n ${res_error}`,
|
|
435
440
|
});
|
|
436
441
|
}
|
|
437
442
|
}
|
|
@@ -440,19 +445,24 @@ class Serviceability {
|
|
|
440
445
|
}
|
|
441
446
|
|
|
442
447
|
/**
|
|
443
|
-
* @param {ServiceabilityPlatformValidator.
|
|
448
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam} arg
|
|
449
|
+
* - Arg object
|
|
450
|
+
*
|
|
444
451
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
445
452
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
446
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
447
|
-
*
|
|
448
|
-
* @
|
|
449
|
-
* @
|
|
453
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
454
|
+
* Success response
|
|
455
|
+
* @name createPackageMaterialRule
|
|
456
|
+
* @summary: Create packaging rule
|
|
457
|
+
* @description: Creates a packaging rule - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createPackageMaterialRule/).
|
|
450
458
|
*/
|
|
451
|
-
async
|
|
459
|
+
async createPackageMaterialRule(
|
|
452
460
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
453
461
|
{ responseHeaders } = { responseHeaders: false }
|
|
454
462
|
) {
|
|
455
|
-
const {
|
|
463
|
+
const {
|
|
464
|
+
error,
|
|
465
|
+
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
456
466
|
{
|
|
457
467
|
body,
|
|
458
468
|
},
|
|
@@ -465,7 +475,7 @@ class Serviceability {
|
|
|
465
475
|
// Showing warrnings if extra unknown parameters are found
|
|
466
476
|
const {
|
|
467
477
|
error: warrning,
|
|
468
|
-
} = ServiceabilityPlatformValidator.
|
|
478
|
+
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
469
479
|
{
|
|
470
480
|
body,
|
|
471
481
|
},
|
|
@@ -474,7 +484,7 @@ class Serviceability {
|
|
|
474
484
|
if (warrning) {
|
|
475
485
|
Logger({
|
|
476
486
|
level: "WARN",
|
|
477
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
487
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterialRule \n ${warrning}`,
|
|
478
488
|
});
|
|
479
489
|
}
|
|
480
490
|
|
|
@@ -485,7 +495,7 @@ class Serviceability {
|
|
|
485
495
|
const response = await PlatformAPIClient.execute(
|
|
486
496
|
this.config,
|
|
487
497
|
"post",
|
|
488
|
-
`/service/platform/logistics/
|
|
498
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
|
|
489
499
|
query_params,
|
|
490
500
|
body,
|
|
491
501
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -499,7 +509,7 @@ class Serviceability {
|
|
|
499
509
|
|
|
500
510
|
const {
|
|
501
511
|
error: res_error,
|
|
502
|
-
} = ServiceabilityPlatformModel.
|
|
512
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
503
513
|
abortEarly: false,
|
|
504
514
|
allowUnknown: true,
|
|
505
515
|
});
|
|
@@ -510,83 +520,7 @@ class Serviceability {
|
|
|
510
520
|
} else {
|
|
511
521
|
Logger({
|
|
512
522
|
level: "WARN",
|
|
513
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return response;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object
|
|
523
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
524
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
525
|
-
* @returns {Promise<ServiceabilityPlatformModel.GetStoresViewResponse>} -
|
|
526
|
-
* Success response
|
|
527
|
-
* @name getAllStores
|
|
528
|
-
* @summary: Get all stores
|
|
529
|
-
* @description: Retrieves a list of locations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/).
|
|
530
|
-
*/
|
|
531
|
-
async getAllStores(
|
|
532
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
533
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
534
|
-
) {
|
|
535
|
-
const { error } = ServiceabilityPlatformValidator.getAllStores().validate(
|
|
536
|
-
{},
|
|
537
|
-
{ abortEarly: false, allowUnknown: true }
|
|
538
|
-
);
|
|
539
|
-
if (error) {
|
|
540
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
// Showing warrnings if extra unknown parameters are found
|
|
544
|
-
const {
|
|
545
|
-
error: warrning,
|
|
546
|
-
} = ServiceabilityPlatformValidator.getAllStores().validate(
|
|
547
|
-
{},
|
|
548
|
-
{ abortEarly: false, allowUnknown: false }
|
|
549
|
-
);
|
|
550
|
-
if (warrning) {
|
|
551
|
-
Logger({
|
|
552
|
-
level: "WARN",
|
|
553
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getAllStores \n ${warrning}`,
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
const query_params = {};
|
|
558
|
-
|
|
559
|
-
const xHeaders = {};
|
|
560
|
-
|
|
561
|
-
const response = await PlatformAPIClient.execute(
|
|
562
|
-
this.config,
|
|
563
|
-
"get",
|
|
564
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/logistics/stores`,
|
|
565
|
-
query_params,
|
|
566
|
-
undefined,
|
|
567
|
-
{ ...xHeaders, ...requestHeaders },
|
|
568
|
-
{ responseHeaders }
|
|
569
|
-
);
|
|
570
|
-
|
|
571
|
-
let responseData = response;
|
|
572
|
-
if (responseHeaders) {
|
|
573
|
-
responseData = response[0];
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
const {
|
|
577
|
-
error: res_error,
|
|
578
|
-
} = ServiceabilityPlatformModel.GetStoresViewResponse().validate(
|
|
579
|
-
responseData,
|
|
580
|
-
{ abortEarly: false, allowUnknown: true }
|
|
581
|
-
);
|
|
582
|
-
|
|
583
|
-
if (res_error) {
|
|
584
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
585
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
586
|
-
} else {
|
|
587
|
-
Logger({
|
|
588
|
-
level: "WARN",
|
|
589
|
-
message: `Response Validation Warnings for platform > Serviceability > getAllStores \n ${res_error}`,
|
|
523
|
+
message: `Response Validation Warnings for platform > Serviceability > createPackageMaterialRule \n ${res_error}`,
|
|
590
524
|
});
|
|
591
525
|
}
|
|
592
526
|
}
|
|
@@ -600,11 +534,10 @@ class Serviceability {
|
|
|
600
534
|
*
|
|
601
535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
602
536
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
603
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
604
|
-
* Success response
|
|
537
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResult>} - Success response
|
|
605
538
|
* @name getBulkServiceability
|
|
606
539
|
* @summary: Bulk update history
|
|
607
|
-
* @description: Retrieves the history of changes made to serviceability settings for a scheme. - Check out [method documentation](https://
|
|
540
|
+
* @description: Retrieves the history of changes made to serviceability settings for a scheme. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getBulkServiceability/).
|
|
608
541
|
*/
|
|
609
542
|
async getBulkServiceability(
|
|
610
543
|
{
|
|
@@ -687,7 +620,7 @@ class Serviceability {
|
|
|
687
620
|
const response = await PlatformAPIClient.execute(
|
|
688
621
|
this.config,
|
|
689
622
|
"get",
|
|
690
|
-
`/service/platform/logistics/
|
|
623
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
|
|
691
624
|
query_params,
|
|
692
625
|
undefined,
|
|
693
626
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -701,10 +634,10 @@ class Serviceability {
|
|
|
701
634
|
|
|
702
635
|
const {
|
|
703
636
|
error: res_error,
|
|
704
|
-
} = ServiceabilityPlatformModel.
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
);
|
|
637
|
+
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
638
|
+
abortEarly: false,
|
|
639
|
+
allowUnknown: true,
|
|
640
|
+
});
|
|
708
641
|
|
|
709
642
|
if (res_error) {
|
|
710
643
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -724,11 +657,10 @@ class Serviceability {
|
|
|
724
657
|
* @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object
|
|
725
658
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
726
659
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
727
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
728
|
-
* Success response
|
|
660
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResult>} - Success response
|
|
729
661
|
* @name getBulkTat
|
|
730
662
|
* @summary: Locality TAT change history
|
|
731
|
-
* @description: Retrieves the history of changes made to TAT(Turn Around Time) for scheme. - Check out [method documentation](https://
|
|
663
|
+
* @description: Retrieves the history of changes made to TAT(Turn Around Time) for scheme. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getBulkTat/).
|
|
732
664
|
*/
|
|
733
665
|
async getBulkTat(
|
|
734
666
|
{
|
|
@@ -809,7 +741,7 @@ class Serviceability {
|
|
|
809
741
|
const response = await PlatformAPIClient.execute(
|
|
810
742
|
this.config,
|
|
811
743
|
"get",
|
|
812
|
-
`/service/platform/logistics/
|
|
744
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
813
745
|
query_params,
|
|
814
746
|
undefined,
|
|
815
747
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -823,10 +755,10 @@ class Serviceability {
|
|
|
823
755
|
|
|
824
756
|
const {
|
|
825
757
|
error: res_error,
|
|
826
|
-
} = ServiceabilityPlatformModel.
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
);
|
|
758
|
+
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
759
|
+
abortEarly: false,
|
|
760
|
+
allowUnknown: true,
|
|
761
|
+
});
|
|
830
762
|
|
|
831
763
|
if (res_error) {
|
|
832
764
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -851,7 +783,7 @@ class Serviceability {
|
|
|
851
783
|
* @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
|
|
852
784
|
* @name getCompanyConfiguration
|
|
853
785
|
* @summary: Get delivery configuration
|
|
854
|
-
* @description: Retrieves information about the delivery setup for a company - Check out [method documentation](https://
|
|
786
|
+
* @description: Retrieves information about the delivery setup for a company - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCompanyConfiguration/).
|
|
855
787
|
*/
|
|
856
788
|
async getCompanyConfiguration(
|
|
857
789
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -922,26 +854,27 @@ class Serviceability {
|
|
|
922
854
|
}
|
|
923
855
|
|
|
924
856
|
/**
|
|
925
|
-
* @param {ServiceabilityPlatformValidator.
|
|
857
|
+
* @param {ServiceabilityPlatformValidator.GetCompanyCourierPartnersListParam} arg
|
|
926
858
|
* - Arg object
|
|
927
859
|
*
|
|
928
860
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
929
861
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
930
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
931
|
-
* Success response
|
|
932
|
-
*
|
|
933
|
-
* @
|
|
934
|
-
* @
|
|
862
|
+
* @returns {Promise<ServiceabilityPlatformModel.GenerateShipmentsAndCourierPartnerResult>}
|
|
863
|
+
* - Success response
|
|
864
|
+
*
|
|
865
|
+
* @name getCompanyCourierPartnersList
|
|
866
|
+
* @summary: Get available company courier partners
|
|
867
|
+
* @description: Retrieves a list of courier partners available for shipping based on serviceability criteria, shipment details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCompanyCourierPartnersList/).
|
|
935
868
|
*/
|
|
936
|
-
async
|
|
937
|
-
{
|
|
869
|
+
async getCompanyCourierPartnersList(
|
|
870
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
938
871
|
{ responseHeaders } = { responseHeaders: false }
|
|
939
872
|
) {
|
|
940
873
|
const {
|
|
941
874
|
error,
|
|
942
|
-
} = ServiceabilityPlatformValidator.
|
|
875
|
+
} = ServiceabilityPlatformValidator.getCompanyCourierPartnersList().validate(
|
|
943
876
|
{
|
|
944
|
-
|
|
877
|
+
body,
|
|
945
878
|
},
|
|
946
879
|
{ abortEarly: false, allowUnknown: true }
|
|
947
880
|
);
|
|
@@ -952,16 +885,16 @@ class Serviceability {
|
|
|
952
885
|
// Showing warrnings if extra unknown parameters are found
|
|
953
886
|
const {
|
|
954
887
|
error: warrning,
|
|
955
|
-
} = ServiceabilityPlatformValidator.
|
|
888
|
+
} = ServiceabilityPlatformValidator.getCompanyCourierPartnersList().validate(
|
|
956
889
|
{
|
|
957
|
-
|
|
890
|
+
body,
|
|
958
891
|
},
|
|
959
892
|
{ abortEarly: false, allowUnknown: false }
|
|
960
893
|
);
|
|
961
894
|
if (warrning) {
|
|
962
895
|
Logger({
|
|
963
896
|
level: "WARN",
|
|
964
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
897
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCompanyCourierPartnersList \n ${warrning}`,
|
|
965
898
|
});
|
|
966
899
|
}
|
|
967
900
|
|
|
@@ -971,10 +904,10 @@ class Serviceability {
|
|
|
971
904
|
|
|
972
905
|
const response = await PlatformAPIClient.execute(
|
|
973
906
|
this.config,
|
|
974
|
-
"
|
|
975
|
-
`/service/platform/logistics/
|
|
907
|
+
"post",
|
|
908
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partners`,
|
|
976
909
|
query_params,
|
|
977
|
-
|
|
910
|
+
body,
|
|
978
911
|
{ ...xHeaders, ...requestHeaders },
|
|
979
912
|
{ responseHeaders }
|
|
980
913
|
);
|
|
@@ -986,7 +919,7 @@ class Serviceability {
|
|
|
986
919
|
|
|
987
920
|
const {
|
|
988
921
|
error: res_error,
|
|
989
|
-
} = ServiceabilityPlatformModel.
|
|
922
|
+
} = ServiceabilityPlatformModel.GenerateShipmentsAndCourierPartnerResult().validate(
|
|
990
923
|
responseData,
|
|
991
924
|
{ abortEarly: false, allowUnknown: true }
|
|
992
925
|
);
|
|
@@ -997,7 +930,7 @@ class Serviceability {
|
|
|
997
930
|
} else {
|
|
998
931
|
Logger({
|
|
999
932
|
level: "WARN",
|
|
1000
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
933
|
+
message: `Response Validation Warnings for platform > Serviceability > getCompanyCourierPartnersList \n ${res_error}`,
|
|
1001
934
|
});
|
|
1002
935
|
}
|
|
1003
936
|
}
|
|
@@ -1006,33 +939,27 @@ class Serviceability {
|
|
|
1006
939
|
}
|
|
1007
940
|
|
|
1008
941
|
/**
|
|
1009
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1010
|
-
* - Arg object
|
|
1011
|
-
*
|
|
942
|
+
* @param {ServiceabilityPlatformValidator.GetCountriesParam} arg - Arg object
|
|
1012
943
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1013
944
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1014
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
* @
|
|
1018
|
-
* @summary: List courier accounts
|
|
1019
|
-
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccounts/).
|
|
945
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetCountries>} - Success response
|
|
946
|
+
* @name getCountries
|
|
947
|
+
* @summary: Get all countries and associated data
|
|
948
|
+
* @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCountries/).
|
|
1020
949
|
*/
|
|
1021
|
-
async
|
|
1022
|
-
{ pageNo, pageSize,
|
|
950
|
+
async getCountries(
|
|
951
|
+
{ onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
|
|
1023
952
|
requestHeaders: {},
|
|
1024
953
|
},
|
|
1025
954
|
{ responseHeaders } = { responseHeaders: false }
|
|
1026
955
|
) {
|
|
1027
|
-
const {
|
|
1028
|
-
error,
|
|
1029
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
956
|
+
const { error } = ServiceabilityPlatformValidator.getCountries().validate(
|
|
1030
957
|
{
|
|
958
|
+
onboard,
|
|
1031
959
|
pageNo,
|
|
1032
960
|
pageSize,
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
transportType,
|
|
961
|
+
q,
|
|
962
|
+
hierarchy,
|
|
1036
963
|
},
|
|
1037
964
|
{ abortEarly: false, allowUnknown: true }
|
|
1038
965
|
);
|
|
@@ -1043,36 +970,523 @@ class Serviceability {
|
|
|
1043
970
|
// Showing warrnings if extra unknown parameters are found
|
|
1044
971
|
const {
|
|
1045
972
|
error: warrning,
|
|
1046
|
-
} = ServiceabilityPlatformValidator.
|
|
973
|
+
} = ServiceabilityPlatformValidator.getCountries().validate(
|
|
1047
974
|
{
|
|
975
|
+
onboard,
|
|
1048
976
|
pageNo,
|
|
1049
977
|
pageSize,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
transportType,
|
|
978
|
+
q,
|
|
979
|
+
hierarchy,
|
|
1053
980
|
},
|
|
1054
981
|
{ abortEarly: false, allowUnknown: false }
|
|
1055
982
|
);
|
|
1056
983
|
if (warrning) {
|
|
1057
984
|
Logger({
|
|
1058
985
|
level: "WARN",
|
|
1059
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
986
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCountries \n ${warrning}`,
|
|
1060
987
|
});
|
|
1061
988
|
}
|
|
1062
989
|
|
|
1063
990
|
const query_params = {};
|
|
991
|
+
query_params["onboard"] = onboard;
|
|
1064
992
|
query_params["page_no"] = pageNo;
|
|
1065
993
|
query_params["page_size"] = pageSize;
|
|
1066
|
-
query_params["
|
|
1067
|
-
query_params["
|
|
1068
|
-
|
|
994
|
+
query_params["q"] = q;
|
|
995
|
+
query_params["hierarchy"] = hierarchy;
|
|
996
|
+
|
|
997
|
+
const xHeaders = {};
|
|
998
|
+
|
|
999
|
+
const response = await PlatformAPIClient.execute(
|
|
1000
|
+
this.config,
|
|
1001
|
+
"get",
|
|
1002
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/countries`,
|
|
1003
|
+
query_params,
|
|
1004
|
+
undefined,
|
|
1005
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1006
|
+
{ responseHeaders }
|
|
1007
|
+
);
|
|
1008
|
+
|
|
1009
|
+
let responseData = response;
|
|
1010
|
+
if (responseHeaders) {
|
|
1011
|
+
responseData = response[0];
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
const {
|
|
1015
|
+
error: res_error,
|
|
1016
|
+
} = ServiceabilityPlatformModel.GetCountries().validate(responseData, {
|
|
1017
|
+
abortEarly: false,
|
|
1018
|
+
allowUnknown: true,
|
|
1019
|
+
});
|
|
1020
|
+
|
|
1021
|
+
if (res_error) {
|
|
1022
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1023
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1024
|
+
} else {
|
|
1025
|
+
Logger({
|
|
1026
|
+
level: "WARN",
|
|
1027
|
+
message: `Response Validation Warnings for platform > Serviceability > getCountries \n ${res_error}`,
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
return response;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg
|
|
1037
|
+
* - Arg object
|
|
1038
|
+
*
|
|
1039
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1040
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1041
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountResult>} -
|
|
1042
|
+
* Success response
|
|
1043
|
+
* @name getCourierPartnerAccount
|
|
1044
|
+
* @summary: Get courier account
|
|
1045
|
+
* @description: Retrieves a single courier partner account. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartnerAccount/).
|
|
1046
|
+
*/
|
|
1047
|
+
async getCourierPartnerAccount(
|
|
1048
|
+
{ accountId, requestHeaders } = { requestHeaders: {} },
|
|
1049
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1050
|
+
) {
|
|
1051
|
+
const {
|
|
1052
|
+
error,
|
|
1053
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
1054
|
+
{
|
|
1055
|
+
accountId,
|
|
1056
|
+
},
|
|
1057
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1058
|
+
);
|
|
1059
|
+
if (error) {
|
|
1060
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1064
|
+
const {
|
|
1065
|
+
error: warrning,
|
|
1066
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
1067
|
+
{
|
|
1068
|
+
accountId,
|
|
1069
|
+
},
|
|
1070
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1071
|
+
);
|
|
1072
|
+
if (warrning) {
|
|
1073
|
+
Logger({
|
|
1074
|
+
level: "WARN",
|
|
1075
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccount \n ${warrning}`,
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
const query_params = {};
|
|
1080
|
+
|
|
1081
|
+
const xHeaders = {};
|
|
1082
|
+
|
|
1083
|
+
const response = await PlatformAPIClient.execute(
|
|
1084
|
+
this.config,
|
|
1085
|
+
"get",
|
|
1086
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
1087
|
+
query_params,
|
|
1088
|
+
undefined,
|
|
1089
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1090
|
+
{ responseHeaders }
|
|
1091
|
+
);
|
|
1092
|
+
|
|
1093
|
+
let responseData = response;
|
|
1094
|
+
if (responseHeaders) {
|
|
1095
|
+
responseData = response[0];
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
const {
|
|
1099
|
+
error: res_error,
|
|
1100
|
+
} = ServiceabilityPlatformModel.CourierAccountResult().validate(
|
|
1101
|
+
responseData,
|
|
1102
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1103
|
+
);
|
|
1104
|
+
|
|
1105
|
+
if (res_error) {
|
|
1106
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1107
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1108
|
+
} else {
|
|
1109
|
+
Logger({
|
|
1110
|
+
level: "WARN",
|
|
1111
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccount \n ${res_error}`,
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
return response;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam} arg
|
|
1121
|
+
* - Arg object
|
|
1122
|
+
*
|
|
1123
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1124
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1125
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult>}
|
|
1126
|
+
* - Success response
|
|
1127
|
+
*
|
|
1128
|
+
* @name getCourierPartnerAccounts
|
|
1129
|
+
* @summary: List courier accounts
|
|
1130
|
+
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartnerAccounts/).
|
|
1131
|
+
*/
|
|
1132
|
+
async getCourierPartnerAccounts(
|
|
1133
|
+
{
|
|
1134
|
+
pageNo,
|
|
1135
|
+
pageSize,
|
|
1136
|
+
stage,
|
|
1137
|
+
paymentMode,
|
|
1138
|
+
transportType,
|
|
1139
|
+
accountIds,
|
|
1140
|
+
selfShip,
|
|
1141
|
+
ownAccount,
|
|
1142
|
+
q,
|
|
1143
|
+
requestHeaders,
|
|
1144
|
+
} = { requestHeaders: {} },
|
|
1145
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1146
|
+
) {
|
|
1147
|
+
const {
|
|
1148
|
+
error,
|
|
1149
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1150
|
+
{
|
|
1151
|
+
pageNo,
|
|
1152
|
+
pageSize,
|
|
1153
|
+
stage,
|
|
1154
|
+
paymentMode,
|
|
1155
|
+
transportType,
|
|
1156
|
+
accountIds,
|
|
1157
|
+
selfShip,
|
|
1158
|
+
ownAccount,
|
|
1159
|
+
q,
|
|
1160
|
+
},
|
|
1161
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1162
|
+
);
|
|
1163
|
+
if (error) {
|
|
1164
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1168
|
+
const {
|
|
1169
|
+
error: warrning,
|
|
1170
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1171
|
+
{
|
|
1172
|
+
pageNo,
|
|
1173
|
+
pageSize,
|
|
1174
|
+
stage,
|
|
1175
|
+
paymentMode,
|
|
1176
|
+
transportType,
|
|
1177
|
+
accountIds,
|
|
1178
|
+
selfShip,
|
|
1179
|
+
ownAccount,
|
|
1180
|
+
q,
|
|
1181
|
+
},
|
|
1182
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1183
|
+
);
|
|
1184
|
+
if (warrning) {
|
|
1185
|
+
Logger({
|
|
1186
|
+
level: "WARN",
|
|
1187
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccounts \n ${warrning}`,
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
const query_params = {};
|
|
1192
|
+
query_params["page_no"] = pageNo;
|
|
1193
|
+
query_params["page_size"] = pageSize;
|
|
1194
|
+
query_params["stage"] = stage;
|
|
1195
|
+
query_params["payment_mode"] = paymentMode;
|
|
1196
|
+
query_params["transport_type"] = transportType;
|
|
1197
|
+
query_params["account_ids"] = accountIds;
|
|
1198
|
+
query_params["self_ship"] = selfShip;
|
|
1199
|
+
query_params["own_account"] = ownAccount;
|
|
1200
|
+
query_params["q"] = q;
|
|
1201
|
+
|
|
1202
|
+
const xHeaders = {};
|
|
1203
|
+
|
|
1204
|
+
const response = await PlatformAPIClient.execute(
|
|
1205
|
+
this.config,
|
|
1206
|
+
"get",
|
|
1207
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
|
|
1208
|
+
query_params,
|
|
1209
|
+
undefined,
|
|
1210
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1211
|
+
{ responseHeaders }
|
|
1212
|
+
);
|
|
1213
|
+
|
|
1214
|
+
let responseData = response;
|
|
1215
|
+
if (responseHeaders) {
|
|
1216
|
+
responseData = response[0];
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
const {
|
|
1220
|
+
error: res_error,
|
|
1221
|
+
} = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult().validate(
|
|
1222
|
+
responseData,
|
|
1223
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1224
|
+
);
|
|
1225
|
+
|
|
1226
|
+
if (res_error) {
|
|
1227
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1228
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1229
|
+
} else {
|
|
1230
|
+
Logger({
|
|
1231
|
+
level: "WARN",
|
|
1232
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccounts \n ${res_error}`,
|
|
1233
|
+
});
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
return response;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemeParam} arg
|
|
1242
|
+
* - Arg object
|
|
1243
|
+
*
|
|
1244
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1245
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1246
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
1247
|
+
* - Success response
|
|
1248
|
+
*
|
|
1249
|
+
* @name getCourierPartnerScheme
|
|
1250
|
+
* @summary: Get Scheme for courier partner extension by Id
|
|
1251
|
+
* @description: Update Scheme for courier partner extension by Id - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartnerScheme/).
|
|
1252
|
+
*/
|
|
1253
|
+
async getCourierPartnerScheme(
|
|
1254
|
+
{ schemeId, requestHeaders } = { requestHeaders: {} },
|
|
1255
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1256
|
+
) {
|
|
1257
|
+
const {
|
|
1258
|
+
error,
|
|
1259
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1260
|
+
{ schemeId },
|
|
1261
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1262
|
+
);
|
|
1263
|
+
if (error) {
|
|
1264
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1268
|
+
const {
|
|
1269
|
+
error: warrning,
|
|
1270
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1271
|
+
{ schemeId },
|
|
1272
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1273
|
+
);
|
|
1274
|
+
if (warrning) {
|
|
1275
|
+
Logger({
|
|
1276
|
+
level: "WARN",
|
|
1277
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerScheme \n ${warrning}`,
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
const query_params = {};
|
|
1282
|
+
|
|
1283
|
+
const xHeaders = {};
|
|
1284
|
+
|
|
1285
|
+
const response = await PlatformAPIClient.execute(
|
|
1286
|
+
this.config,
|
|
1287
|
+
"get",
|
|
1288
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
1289
|
+
query_params,
|
|
1290
|
+
undefined,
|
|
1291
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1292
|
+
{ responseHeaders }
|
|
1293
|
+
);
|
|
1294
|
+
|
|
1295
|
+
let responseData = response;
|
|
1296
|
+
if (responseHeaders) {
|
|
1297
|
+
responseData = response[0];
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
const {
|
|
1301
|
+
error: res_error,
|
|
1302
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
1303
|
+
responseData,
|
|
1304
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1305
|
+
);
|
|
1306
|
+
|
|
1307
|
+
if (res_error) {
|
|
1308
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1309
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1310
|
+
} else {
|
|
1311
|
+
Logger({
|
|
1312
|
+
level: "WARN",
|
|
1313
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerScheme \n ${res_error}`,
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
return response;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemesParam} arg
|
|
1323
|
+
* - Arg object
|
|
1324
|
+
*
|
|
1325
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1326
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1327
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeList>}
|
|
1328
|
+
* - Success response
|
|
1329
|
+
*
|
|
1330
|
+
* @name getCourierPartnerSchemes
|
|
1331
|
+
* @summary: Get created Schemes for courier partner
|
|
1332
|
+
* @description: Get created Schemes for courier partner - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartnerSchemes/).
|
|
1333
|
+
*/
|
|
1334
|
+
async getCourierPartnerSchemes(
|
|
1335
|
+
{
|
|
1336
|
+
extensionId,
|
|
1337
|
+
schemeType,
|
|
1338
|
+
paymentMode,
|
|
1339
|
+
capabilities,
|
|
1340
|
+
schemeIds,
|
|
1341
|
+
q,
|
|
1342
|
+
requestHeaders,
|
|
1343
|
+
} = { requestHeaders: {} },
|
|
1344
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1345
|
+
) {
|
|
1346
|
+
const {
|
|
1347
|
+
error,
|
|
1348
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
1349
|
+
{
|
|
1350
|
+
extensionId,
|
|
1351
|
+
schemeType,
|
|
1352
|
+
paymentMode,
|
|
1353
|
+
capabilities,
|
|
1354
|
+
schemeIds,
|
|
1355
|
+
q,
|
|
1356
|
+
},
|
|
1357
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1358
|
+
);
|
|
1359
|
+
if (error) {
|
|
1360
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1364
|
+
const {
|
|
1365
|
+
error: warrning,
|
|
1366
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
1367
|
+
{
|
|
1368
|
+
extensionId,
|
|
1369
|
+
schemeType,
|
|
1370
|
+
paymentMode,
|
|
1371
|
+
capabilities,
|
|
1372
|
+
schemeIds,
|
|
1373
|
+
q,
|
|
1374
|
+
},
|
|
1375
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1376
|
+
);
|
|
1377
|
+
if (warrning) {
|
|
1378
|
+
Logger({
|
|
1379
|
+
level: "WARN",
|
|
1380
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerSchemes \n ${warrning}`,
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
const query_params = {};
|
|
1385
|
+
query_params["extension_id"] = extensionId;
|
|
1386
|
+
query_params["scheme_type"] = schemeType;
|
|
1387
|
+
query_params["payment_mode"] = paymentMode;
|
|
1388
|
+
query_params["capabilities"] = capabilities;
|
|
1389
|
+
query_params["scheme_ids"] = schemeIds;
|
|
1390
|
+
query_params["q"] = q;
|
|
1391
|
+
|
|
1392
|
+
const xHeaders = {};
|
|
1393
|
+
|
|
1394
|
+
const response = await PlatformAPIClient.execute(
|
|
1395
|
+
this.config,
|
|
1396
|
+
"get",
|
|
1397
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
1398
|
+
query_params,
|
|
1399
|
+
undefined,
|
|
1400
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1401
|
+
{ responseHeaders }
|
|
1402
|
+
);
|
|
1403
|
+
|
|
1404
|
+
let responseData = response;
|
|
1405
|
+
if (responseHeaders) {
|
|
1406
|
+
responseData = response[0];
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
const {
|
|
1410
|
+
error: res_error,
|
|
1411
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeList().validate(
|
|
1412
|
+
responseData,
|
|
1413
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1414
|
+
);
|
|
1415
|
+
|
|
1416
|
+
if (res_error) {
|
|
1417
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1418
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1419
|
+
} else {
|
|
1420
|
+
Logger({
|
|
1421
|
+
level: "WARN",
|
|
1422
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerSchemes \n ${res_error}`,
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
return response;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* @param {ServiceabilityPlatformValidator.GetInstalledCourierPartnerExtensionsParam} arg
|
|
1432
|
+
* - Arg object
|
|
1433
|
+
*
|
|
1434
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1435
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1436
|
+
* @returns {Promise<ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema>}
|
|
1437
|
+
* - Success response
|
|
1438
|
+
*
|
|
1439
|
+
* @name getInstalledCourierPartnerExtensions
|
|
1440
|
+
* @summary: Fetching of Package Material Rules from database.
|
|
1441
|
+
* @description: This API returns response of Package Materials Rules. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getInstalledCourierPartnerExtensions/).
|
|
1442
|
+
*/
|
|
1443
|
+
async getInstalledCourierPartnerExtensions(
|
|
1444
|
+
{ pageNo, pageSize, isInstalled, requestHeaders } = { requestHeaders: {} },
|
|
1445
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1446
|
+
) {
|
|
1447
|
+
const {
|
|
1448
|
+
error,
|
|
1449
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1450
|
+
{
|
|
1451
|
+
pageNo,
|
|
1452
|
+
pageSize,
|
|
1453
|
+
isInstalled,
|
|
1454
|
+
},
|
|
1455
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1456
|
+
);
|
|
1457
|
+
if (error) {
|
|
1458
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1462
|
+
const {
|
|
1463
|
+
error: warrning,
|
|
1464
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1465
|
+
{
|
|
1466
|
+
pageNo,
|
|
1467
|
+
pageSize,
|
|
1468
|
+
isInstalled,
|
|
1469
|
+
},
|
|
1470
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1471
|
+
);
|
|
1472
|
+
if (warrning) {
|
|
1473
|
+
Logger({
|
|
1474
|
+
level: "WARN",
|
|
1475
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${warrning}`,
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
const query_params = {};
|
|
1480
|
+
query_params["page_no"] = pageNo;
|
|
1481
|
+
query_params["page_size"] = pageSize;
|
|
1482
|
+
query_params["is_installed"] = isInstalled;
|
|
1069
1483
|
|
|
1070
1484
|
const xHeaders = {};
|
|
1071
1485
|
|
|
1072
1486
|
const response = await PlatformAPIClient.execute(
|
|
1073
1487
|
this.config,
|
|
1074
1488
|
"get",
|
|
1075
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/
|
|
1489
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/list`,
|
|
1076
1490
|
query_params,
|
|
1077
1491
|
undefined,
|
|
1078
1492
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1086,7 +1500,7 @@ class Serviceability {
|
|
|
1086
1500
|
|
|
1087
1501
|
const {
|
|
1088
1502
|
error: res_error,
|
|
1089
|
-
} = ServiceabilityPlatformModel.
|
|
1503
|
+
} = ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema().validate(
|
|
1090
1504
|
responseData,
|
|
1091
1505
|
{ abortEarly: false, allowUnknown: true }
|
|
1092
1506
|
);
|
|
@@ -1097,7 +1511,7 @@ class Serviceability {
|
|
|
1097
1511
|
} else {
|
|
1098
1512
|
Logger({
|
|
1099
1513
|
level: "WARN",
|
|
1100
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1514
|
+
message: `Response Validation Warnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${res_error}`,
|
|
1101
1515
|
});
|
|
1102
1516
|
}
|
|
1103
1517
|
}
|
|
@@ -1109,12 +1523,11 @@ class Serviceability {
|
|
|
1109
1523
|
* @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
1110
1524
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1111
1525
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1112
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1113
|
-
*
|
|
1114
|
-
*
|
|
1526
|
+
* @returns {Promise<ServiceabilityPlatformModel.OptimalLocationsResult>} -
|
|
1527
|
+
* Success response
|
|
1115
1528
|
* @name getOptimalLocations
|
|
1116
1529
|
* @summary: Get selling locations
|
|
1117
|
-
* @description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. - Check out [method documentation](https://
|
|
1530
|
+
* @description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getOptimalLocations/).
|
|
1118
1531
|
*/
|
|
1119
1532
|
async getOptimalLocations(
|
|
1120
1533
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1169,7 +1582,7 @@ class Serviceability {
|
|
|
1169
1582
|
|
|
1170
1583
|
const {
|
|
1171
1584
|
error: res_error,
|
|
1172
|
-
} = ServiceabilityPlatformModel.
|
|
1585
|
+
} = ServiceabilityPlatformModel.OptimalLocationsResult().validate(
|
|
1173
1586
|
responseData,
|
|
1174
1587
|
{ abortEarly: false, allowUnknown: true }
|
|
1175
1588
|
);
|
|
@@ -1194,11 +1607,11 @@ class Serviceability {
|
|
|
1194
1607
|
*
|
|
1195
1608
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1196
1609
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1197
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1610
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackagesListResult>} -
|
|
1198
1611
|
* Success response
|
|
1199
1612
|
* @name getPackageMaterialList
|
|
1200
1613
|
* @summary: Get packaging materials
|
|
1201
|
-
* @description: Retrieves a list of packaging materials - Check out [method documentation](https://
|
|
1614
|
+
* @description: Retrieves a list of packaging materials - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getPackageMaterialList/).
|
|
1202
1615
|
*/
|
|
1203
1616
|
async getPackageMaterialList(
|
|
1204
1617
|
{ pageNo, pageSize, q, size, packageType, requestHeaders } = {
|
|
@@ -1268,7 +1681,7 @@ class Serviceability {
|
|
|
1268
1681
|
|
|
1269
1682
|
const {
|
|
1270
1683
|
error: res_error,
|
|
1271
|
-
} = ServiceabilityPlatformModel.
|
|
1684
|
+
} = ServiceabilityPlatformModel.PackagesListResult().validate(
|
|
1272
1685
|
responseData,
|
|
1273
1686
|
{ abortEarly: false, allowUnknown: true }
|
|
1274
1687
|
);
|
|
@@ -1293,11 +1706,11 @@ class Serviceability {
|
|
|
1293
1706
|
*
|
|
1294
1707
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1295
1708
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1296
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1709
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
1297
1710
|
* Success response
|
|
1298
1711
|
* @name getPackageMaterialRule
|
|
1299
1712
|
* @summary: Get packaging material rule
|
|
1300
|
-
* @description: Retrieve packaging rule details. - Check out [method documentation](https://
|
|
1713
|
+
* @description: Retrieve packaging rule details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getPackageMaterialRule/).
|
|
1301
1714
|
*/
|
|
1302
1715
|
async getPackageMaterialRule(
|
|
1303
1716
|
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1352,10 +1765,10 @@ class Serviceability {
|
|
|
1352
1765
|
|
|
1353
1766
|
const {
|
|
1354
1767
|
error: res_error,
|
|
1355
|
-
} = ServiceabilityPlatformModel.
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
);
|
|
1768
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
1769
|
+
abortEarly: false,
|
|
1770
|
+
allowUnknown: true,
|
|
1771
|
+
});
|
|
1359
1772
|
|
|
1360
1773
|
if (res_error) {
|
|
1361
1774
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1371,108 +1784,14 @@ class Serviceability {
|
|
|
1371
1784
|
return response;
|
|
1372
1785
|
}
|
|
1373
1786
|
|
|
1374
|
-
/**
|
|
1375
|
-
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRulesParam} arg
|
|
1376
|
-
* - Arg object
|
|
1377
|
-
*
|
|
1378
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1379
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1380
|
-
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialRuleList>}
|
|
1381
|
-
* - Success response
|
|
1382
|
-
*
|
|
1383
|
-
* @name getPackageMaterialRules
|
|
1384
|
-
* @summary: Get packaging rules
|
|
1385
|
-
* @description: Retrieve packaging rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRules/).
|
|
1386
|
-
*/
|
|
1387
|
-
async getPackageMaterialRules(
|
|
1388
|
-
{ pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} },
|
|
1389
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1390
|
-
) {
|
|
1391
|
-
const {
|
|
1392
|
-
error,
|
|
1393
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialRules().validate(
|
|
1394
|
-
{
|
|
1395
|
-
pageNo,
|
|
1396
|
-
pageSize,
|
|
1397
|
-
isActive,
|
|
1398
|
-
},
|
|
1399
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1400
|
-
);
|
|
1401
|
-
if (error) {
|
|
1402
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1406
|
-
const {
|
|
1407
|
-
error: warrning,
|
|
1408
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialRules().validate(
|
|
1409
|
-
{
|
|
1410
|
-
pageNo,
|
|
1411
|
-
pageSize,
|
|
1412
|
-
isActive,
|
|
1413
|
-
},
|
|
1414
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1415
|
-
);
|
|
1416
|
-
if (warrning) {
|
|
1417
|
-
Logger({
|
|
1418
|
-
level: "WARN",
|
|
1419
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRules \n ${warrning}`,
|
|
1420
|
-
});
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
const query_params = {};
|
|
1424
|
-
query_params["page_no"] = pageNo;
|
|
1425
|
-
query_params["page_size"] = pageSize;
|
|
1426
|
-
query_params["is_active"] = isActive;
|
|
1427
|
-
|
|
1428
|
-
const xHeaders = {};
|
|
1429
|
-
|
|
1430
|
-
const response = await PlatformAPIClient.execute(
|
|
1431
|
-
this.config,
|
|
1432
|
-
"get",
|
|
1433
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
|
|
1434
|
-
query_params,
|
|
1435
|
-
undefined,
|
|
1436
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1437
|
-
{ responseHeaders }
|
|
1438
|
-
);
|
|
1439
|
-
|
|
1440
|
-
let responseData = response;
|
|
1441
|
-
if (responseHeaders) {
|
|
1442
|
-
responseData = response[0];
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
const {
|
|
1446
|
-
error: res_error,
|
|
1447
|
-
} = ServiceabilityPlatformModel.PackageMaterialRuleList().validate(
|
|
1448
|
-
responseData,
|
|
1449
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1450
|
-
);
|
|
1451
|
-
|
|
1452
|
-
if (res_error) {
|
|
1453
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1454
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1455
|
-
} else {
|
|
1456
|
-
Logger({
|
|
1457
|
-
level: "WARN",
|
|
1458
|
-
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRules \n ${res_error}`,
|
|
1459
|
-
});
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
return response;
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
1787
|
/**
|
|
1467
1788
|
* @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object
|
|
1468
1789
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1469
1790
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1470
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1471
|
-
* - Success response
|
|
1472
|
-
*
|
|
1791
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageItem>} - Success response
|
|
1473
1792
|
* @name getPackageMaterials
|
|
1474
1793
|
* @summary: Get packaging material
|
|
1475
|
-
* @description: Retrieve a single packaging material - Check out [method documentation](https://
|
|
1794
|
+
* @description: Retrieve a single packaging material - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getPackageMaterials/).
|
|
1476
1795
|
*/
|
|
1477
1796
|
async getPackageMaterials(
|
|
1478
1797
|
{ packageMaterialId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1527,10 +1846,10 @@ class Serviceability {
|
|
|
1527
1846
|
|
|
1528
1847
|
const {
|
|
1529
1848
|
error: res_error,
|
|
1530
|
-
} = ServiceabilityPlatformModel.
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
);
|
|
1849
|
+
} = ServiceabilityPlatformModel.PackageItem().validate(responseData, {
|
|
1850
|
+
abortEarly: false,
|
|
1851
|
+
allowUnknown: true,
|
|
1852
|
+
});
|
|
1534
1853
|
|
|
1535
1854
|
if (res_error) {
|
|
1536
1855
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1547,28 +1866,29 @@ class Serviceability {
|
|
|
1547
1866
|
}
|
|
1548
1867
|
|
|
1549
1868
|
/**
|
|
1550
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1869
|
+
* @param {ServiceabilityPlatformValidator.GetSampleFileServiceabilityStatusParam} arg
|
|
1870
|
+
* - Arg object
|
|
1871
|
+
*
|
|
1551
1872
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1552
1873
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1553
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1554
|
-
* Success response
|
|
1555
|
-
*
|
|
1556
|
-
* @
|
|
1557
|
-
* @
|
|
1874
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionServiceabilityTatResult>}
|
|
1875
|
+
* - Success response
|
|
1876
|
+
*
|
|
1877
|
+
* @name getSampleFileServiceabilityStatus
|
|
1878
|
+
* @summary: Get Serviceability TAT sample files generator status
|
|
1879
|
+
* @description: Get Serviceability TAT sample file generator status - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getSampleFileServiceabilityStatus/).
|
|
1558
1880
|
*/
|
|
1559
|
-
async
|
|
1560
|
-
{
|
|
1561
|
-
requestHeaders: {},
|
|
1562
|
-
},
|
|
1881
|
+
async getSampleFileServiceabilityStatus(
|
|
1882
|
+
{ pageNo, pageSize, batchId, requestHeaders } = { requestHeaders: {} },
|
|
1563
1883
|
{ responseHeaders } = { responseHeaders: false }
|
|
1564
1884
|
) {
|
|
1565
1885
|
const {
|
|
1566
1886
|
error,
|
|
1567
|
-
} = ServiceabilityPlatformValidator.
|
|
1887
|
+
} = ServiceabilityPlatformValidator.getSampleFileServiceabilityStatus().validate(
|
|
1568
1888
|
{
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1889
|
+
pageNo,
|
|
1890
|
+
pageSize,
|
|
1891
|
+
batchId,
|
|
1572
1892
|
},
|
|
1573
1893
|
{ abortEarly: false, allowUnknown: true }
|
|
1574
1894
|
);
|
|
@@ -1579,29 +1899,32 @@ class Serviceability {
|
|
|
1579
1899
|
// Showing warrnings if extra unknown parameters are found
|
|
1580
1900
|
const {
|
|
1581
1901
|
error: warrning,
|
|
1582
|
-
} = ServiceabilityPlatformValidator.
|
|
1902
|
+
} = ServiceabilityPlatformValidator.getSampleFileServiceabilityStatus().validate(
|
|
1583
1903
|
{
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1904
|
+
pageNo,
|
|
1905
|
+
pageSize,
|
|
1906
|
+
batchId,
|
|
1587
1907
|
},
|
|
1588
1908
|
{ abortEarly: false, allowUnknown: false }
|
|
1589
1909
|
);
|
|
1590
1910
|
if (warrning) {
|
|
1591
1911
|
Logger({
|
|
1592
1912
|
level: "WARN",
|
|
1593
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1913
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSampleFileServiceabilityStatus \n ${warrning}`,
|
|
1594
1914
|
});
|
|
1595
1915
|
}
|
|
1596
1916
|
|
|
1597
1917
|
const query_params = {};
|
|
1918
|
+
query_params["page_no"] = pageNo;
|
|
1919
|
+
query_params["page_size"] = pageSize;
|
|
1920
|
+
query_params["batch_id"] = batchId;
|
|
1598
1921
|
|
|
1599
1922
|
const xHeaders = {};
|
|
1600
1923
|
|
|
1601
1924
|
const response = await PlatformAPIClient.execute(
|
|
1602
1925
|
this.config,
|
|
1603
1926
|
"get",
|
|
1604
|
-
`/service/platform/logistics/
|
|
1927
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/localities/bulk-sample`,
|
|
1605
1928
|
query_params,
|
|
1606
1929
|
undefined,
|
|
1607
1930
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1615,7 +1938,7 @@ class Serviceability {
|
|
|
1615
1938
|
|
|
1616
1939
|
const {
|
|
1617
1940
|
error: res_error,
|
|
1618
|
-
} = ServiceabilityPlatformModel.
|
|
1941
|
+
} = ServiceabilityPlatformModel.BulkRegionServiceabilityTatResult().validate(
|
|
1619
1942
|
responseData,
|
|
1620
1943
|
{ abortEarly: false, allowUnknown: true }
|
|
1621
1944
|
);
|
|
@@ -1626,7 +1949,7 @@ class Serviceability {
|
|
|
1626
1949
|
} else {
|
|
1627
1950
|
Logger({
|
|
1628
1951
|
level: "WARN",
|
|
1629
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1952
|
+
message: `Response Validation Warnings for platform > Serviceability > getSampleFileServiceabilityStatus \n ${res_error}`,
|
|
1630
1953
|
});
|
|
1631
1954
|
}
|
|
1632
1955
|
}
|
|
@@ -1635,23 +1958,22 @@ class Serviceability {
|
|
|
1635
1958
|
}
|
|
1636
1959
|
|
|
1637
1960
|
/**
|
|
1638
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1961
|
+
* @param {ServiceabilityPlatformValidator.GetSelfShipDetailsParam} arg - Arg object
|
|
1639
1962
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1640
1963
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1641
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1642
|
-
*
|
|
1643
|
-
* @
|
|
1644
|
-
* @
|
|
1645
|
-
* @description: Retrieves a single delivery zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneById/).
|
|
1964
|
+
* @returns {Promise<ServiceabilityPlatformModel.SelfshipSchema>} - Success response
|
|
1965
|
+
* @name getSelfShipDetails
|
|
1966
|
+
* @summary: Get self-ship details
|
|
1967
|
+
* @description: Get the self-ship details such as TAT, activation status, and unit for a specified company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getSelfShipDetails/).
|
|
1646
1968
|
*/
|
|
1647
|
-
async
|
|
1648
|
-
{
|
|
1969
|
+
async getSelfShipDetails(
|
|
1970
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1649
1971
|
{ responseHeaders } = { responseHeaders: false }
|
|
1650
1972
|
) {
|
|
1651
|
-
const {
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
},
|
|
1973
|
+
const {
|
|
1974
|
+
error,
|
|
1975
|
+
} = ServiceabilityPlatformValidator.getSelfShipDetails().validate(
|
|
1976
|
+
{},
|
|
1655
1977
|
{ abortEarly: false, allowUnknown: true }
|
|
1656
1978
|
);
|
|
1657
1979
|
if (error) {
|
|
@@ -1661,16 +1983,14 @@ class Serviceability {
|
|
|
1661
1983
|
// Showing warrnings if extra unknown parameters are found
|
|
1662
1984
|
const {
|
|
1663
1985
|
error: warrning,
|
|
1664
|
-
} = ServiceabilityPlatformValidator.
|
|
1665
|
-
{
|
|
1666
|
-
zoneId,
|
|
1667
|
-
},
|
|
1986
|
+
} = ServiceabilityPlatformValidator.getSelfShipDetails().validate(
|
|
1987
|
+
{},
|
|
1668
1988
|
{ abortEarly: false, allowUnknown: false }
|
|
1669
1989
|
);
|
|
1670
1990
|
if (warrning) {
|
|
1671
1991
|
Logger({
|
|
1672
1992
|
level: "WARN",
|
|
1673
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1993
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSelfShipDetails \n ${warrning}`,
|
|
1674
1994
|
});
|
|
1675
1995
|
}
|
|
1676
1996
|
|
|
@@ -1681,7 +2001,7 @@ class Serviceability {
|
|
|
1681
2001
|
const response = await PlatformAPIClient.execute(
|
|
1682
2002
|
this.config,
|
|
1683
2003
|
"get",
|
|
1684
|
-
`/service/platform/logistics/
|
|
2004
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
1685
2005
|
query_params,
|
|
1686
2006
|
undefined,
|
|
1687
2007
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1695,7 +2015,7 @@ class Serviceability {
|
|
|
1695
2015
|
|
|
1696
2016
|
const {
|
|
1697
2017
|
error: res_error,
|
|
1698
|
-
} = ServiceabilityPlatformModel.
|
|
2018
|
+
} = ServiceabilityPlatformModel.SelfshipSchema().validate(responseData, {
|
|
1699
2019
|
abortEarly: false,
|
|
1700
2020
|
allowUnknown: true,
|
|
1701
2021
|
});
|
|
@@ -1706,7 +2026,7 @@ class Serviceability {
|
|
|
1706
2026
|
} else {
|
|
1707
2027
|
Logger({
|
|
1708
2028
|
level: "WARN",
|
|
1709
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2029
|
+
message: `Response Validation Warnings for platform > Serviceability > getSelfShipDetails \n ${res_error}`,
|
|
1710
2030
|
});
|
|
1711
2031
|
}
|
|
1712
2032
|
}
|
|
@@ -1715,42 +2035,27 @@ class Serviceability {
|
|
|
1715
2035
|
}
|
|
1716
2036
|
|
|
1717
2037
|
/**
|
|
1718
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2038
|
+
* @param {ServiceabilityPlatformValidator.SampleFileServiceabilityParam} arg
|
|
2039
|
+
* - Arg object
|
|
2040
|
+
*
|
|
1719
2041
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1720
2042
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1721
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1722
|
-
*
|
|
1723
|
-
*
|
|
1724
|
-
* @
|
|
2043
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionServiceabilityTatResultItemData>}
|
|
2044
|
+
* - Success response
|
|
2045
|
+
*
|
|
2046
|
+
* @name sampleFileServiceability
|
|
2047
|
+
* @summary: Sample File Download
|
|
2048
|
+
* @description: Sample File Download - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/sampleFileServiceability/).
|
|
1725
2049
|
*/
|
|
1726
|
-
async
|
|
1727
|
-
{
|
|
1728
|
-
pageNo,
|
|
1729
|
-
pageSize,
|
|
1730
|
-
isActive,
|
|
1731
|
-
applicationIds,
|
|
1732
|
-
q,
|
|
1733
|
-
countryIsoCode,
|
|
1734
|
-
state,
|
|
1735
|
-
city,
|
|
1736
|
-
pincode,
|
|
1737
|
-
sector,
|
|
1738
|
-
requestHeaders,
|
|
1739
|
-
} = { requestHeaders: {} },
|
|
2050
|
+
async sampleFileServiceability(
|
|
2051
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1740
2052
|
{ responseHeaders } = { responseHeaders: false }
|
|
1741
2053
|
) {
|
|
1742
|
-
const {
|
|
2054
|
+
const {
|
|
2055
|
+
error,
|
|
2056
|
+
} = ServiceabilityPlatformValidator.sampleFileServiceability().validate(
|
|
1743
2057
|
{
|
|
1744
|
-
|
|
1745
|
-
pageSize,
|
|
1746
|
-
isActive,
|
|
1747
|
-
applicationIds,
|
|
1748
|
-
q,
|
|
1749
|
-
countryIsoCode,
|
|
1750
|
-
state,
|
|
1751
|
-
city,
|
|
1752
|
-
pincode,
|
|
1753
|
-
sector,
|
|
2058
|
+
body,
|
|
1754
2059
|
},
|
|
1755
2060
|
{ abortEarly: false, allowUnknown: true }
|
|
1756
2061
|
);
|
|
@@ -1761,48 +2066,29 @@ class Serviceability {
|
|
|
1761
2066
|
// Showing warrnings if extra unknown parameters are found
|
|
1762
2067
|
const {
|
|
1763
2068
|
error: warrning,
|
|
1764
|
-
} = ServiceabilityPlatformValidator.
|
|
2069
|
+
} = ServiceabilityPlatformValidator.sampleFileServiceability().validate(
|
|
1765
2070
|
{
|
|
1766
|
-
|
|
1767
|
-
pageSize,
|
|
1768
|
-
isActive,
|
|
1769
|
-
applicationIds,
|
|
1770
|
-
q,
|
|
1771
|
-
countryIsoCode,
|
|
1772
|
-
state,
|
|
1773
|
-
city,
|
|
1774
|
-
pincode,
|
|
1775
|
-
sector,
|
|
2071
|
+
body,
|
|
1776
2072
|
},
|
|
1777
2073
|
{ abortEarly: false, allowUnknown: false }
|
|
1778
2074
|
);
|
|
1779
2075
|
if (warrning) {
|
|
1780
2076
|
Logger({
|
|
1781
2077
|
level: "WARN",
|
|
1782
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2078
|
+
message: `Parameter Validation warrnings for platform > Serviceability > sampleFileServiceability \n ${warrning}`,
|
|
1783
2079
|
});
|
|
1784
2080
|
}
|
|
1785
2081
|
|
|
1786
2082
|
const query_params = {};
|
|
1787
|
-
query_params["page_no"] = pageNo;
|
|
1788
|
-
query_params["page_size"] = pageSize;
|
|
1789
|
-
query_params["is_active"] = isActive;
|
|
1790
|
-
query_params["application_ids"] = applicationIds;
|
|
1791
|
-
query_params["q"] = q;
|
|
1792
|
-
query_params["country_iso_code"] = countryIsoCode;
|
|
1793
|
-
query_params["state"] = state;
|
|
1794
|
-
query_params["city"] = city;
|
|
1795
|
-
query_params["pincode"] = pincode;
|
|
1796
|
-
query_params["sector"] = sector;
|
|
1797
2083
|
|
|
1798
2084
|
const xHeaders = {};
|
|
1799
2085
|
|
|
1800
2086
|
const response = await PlatformAPIClient.execute(
|
|
1801
2087
|
this.config,
|
|
1802
|
-
"
|
|
1803
|
-
`/service/platform/logistics/v2.0/company/${this.config.companyId}/
|
|
2088
|
+
"post",
|
|
2089
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/localities/bulk-sample`,
|
|
1804
2090
|
query_params,
|
|
1805
|
-
|
|
2091
|
+
body,
|
|
1806
2092
|
{ ...xHeaders, ...requestHeaders },
|
|
1807
2093
|
{ responseHeaders }
|
|
1808
2094
|
);
|
|
@@ -1814,10 +2100,10 @@ class Serviceability {
|
|
|
1814
2100
|
|
|
1815
2101
|
const {
|
|
1816
2102
|
error: res_error,
|
|
1817
|
-
} = ServiceabilityPlatformModel.
|
|
1818
|
-
|
|
1819
|
-
allowUnknown: true
|
|
1820
|
-
|
|
2103
|
+
} = ServiceabilityPlatformModel.BulkRegionServiceabilityTatResultItemData().validate(
|
|
2104
|
+
responseData,
|
|
2105
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2106
|
+
);
|
|
1821
2107
|
|
|
1822
2108
|
if (res_error) {
|
|
1823
2109
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1825,7 +2111,7 @@ class Serviceability {
|
|
|
1825
2111
|
} else {
|
|
1826
2112
|
Logger({
|
|
1827
2113
|
level: "WARN",
|
|
1828
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2114
|
+
message: `Response Validation Warnings for platform > Serviceability > sampleFileServiceability \n ${res_error}`,
|
|
1829
2115
|
});
|
|
1830
2116
|
}
|
|
1831
2117
|
}
|
|
@@ -1842,16 +2128,17 @@ class Serviceability {
|
|
|
1842
2128
|
* @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
|
|
1843
2129
|
* @name updateCompanyConfiguration
|
|
1844
2130
|
* @summary: Update delivery configuration
|
|
1845
|
-
* @description: Updates an existing delivery setup for a company, including the ability to adjust self-shipping preferences. - Check out [method documentation](https://
|
|
2131
|
+
* @description: Updates an existing delivery setup for a company, including the ability to adjust self-shipping preferences. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateCompanyConfiguration/).
|
|
1846
2132
|
*/
|
|
1847
2133
|
async updateCompanyConfiguration(
|
|
1848
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2134
|
+
{ fulfillmentOptionSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
1849
2135
|
{ responseHeaders } = { responseHeaders: false }
|
|
1850
2136
|
) {
|
|
1851
2137
|
const {
|
|
1852
2138
|
error,
|
|
1853
2139
|
} = ServiceabilityPlatformValidator.updateCompanyConfiguration().validate(
|
|
1854
2140
|
{
|
|
2141
|
+
fulfillmentOptionSlug,
|
|
1855
2142
|
body,
|
|
1856
2143
|
},
|
|
1857
2144
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1865,6 +2152,7 @@ class Serviceability {
|
|
|
1865
2152
|
error: warrning,
|
|
1866
2153
|
} = ServiceabilityPlatformValidator.updateCompanyConfiguration().validate(
|
|
1867
2154
|
{
|
|
2155
|
+
fulfillmentOptionSlug,
|
|
1868
2156
|
body,
|
|
1869
2157
|
},
|
|
1870
2158
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1877,6 +2165,7 @@ class Serviceability {
|
|
|
1877
2165
|
}
|
|
1878
2166
|
|
|
1879
2167
|
const query_params = {};
|
|
2168
|
+
query_params["fulfillment_option_slug"] = fulfillmentOptionSlug;
|
|
1880
2169
|
|
|
1881
2170
|
const xHeaders = {};
|
|
1882
2171
|
|
|
@@ -1922,11 +2211,12 @@ class Serviceability {
|
|
|
1922
2211
|
*
|
|
1923
2212
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1924
2213
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1925
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1926
|
-
* Success response
|
|
2214
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountDetailsBody>}
|
|
2215
|
+
* - Success response
|
|
2216
|
+
*
|
|
1927
2217
|
* @name updateCourierPartnerAccount
|
|
1928
2218
|
* @summary: Update courier account
|
|
1929
|
-
* @description: Updates an existing courier partner account. - Check out [method documentation](https://
|
|
2219
|
+
* @description: Updates an existing courier partner account. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateCourierPartnerAccount/).
|
|
1930
2220
|
*/
|
|
1931
2221
|
async updateCourierPartnerAccount(
|
|
1932
2222
|
{ accountId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1983,7 +2273,7 @@ class Serviceability {
|
|
|
1983
2273
|
|
|
1984
2274
|
const {
|
|
1985
2275
|
error: res_error,
|
|
1986
|
-
} = ServiceabilityPlatformModel.
|
|
2276
|
+
} = ServiceabilityPlatformModel.CourierAccountDetailsBody().validate(
|
|
1987
2277
|
responseData,
|
|
1988
2278
|
{ abortEarly: false, allowUnknown: true }
|
|
1989
2279
|
);
|
|
@@ -2003,26 +2293,28 @@ class Serviceability {
|
|
|
2003
2293
|
}
|
|
2004
2294
|
|
|
2005
2295
|
/**
|
|
2006
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2296
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerSchemeParam} arg
|
|
2007
2297
|
* - Arg object
|
|
2008
2298
|
*
|
|
2009
2299
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2010
2300
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2011
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2012
|
-
* Success response
|
|
2013
|
-
*
|
|
2014
|
-
* @
|
|
2015
|
-
* @
|
|
2301
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
2302
|
+
* - Success response
|
|
2303
|
+
*
|
|
2304
|
+
* @name updateCourierPartnerScheme
|
|
2305
|
+
* @summary: Update Scheme for courier partner extension
|
|
2306
|
+
* @description: Update Scheme for courier partner extension - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateCourierPartnerScheme/).
|
|
2016
2307
|
*/
|
|
2017
|
-
async
|
|
2018
|
-
{
|
|
2308
|
+
async updateCourierPartnerScheme(
|
|
2309
|
+
{ schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
2019
2310
|
{ responseHeaders } = { responseHeaders: false }
|
|
2020
2311
|
) {
|
|
2021
2312
|
const {
|
|
2022
2313
|
error,
|
|
2023
|
-
} = ServiceabilityPlatformValidator.
|
|
2314
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerScheme().validate(
|
|
2024
2315
|
{
|
|
2025
|
-
|
|
2316
|
+
schemeId,
|
|
2317
|
+
|
|
2026
2318
|
body,
|
|
2027
2319
|
},
|
|
2028
2320
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2034,9 +2326,10 @@ class Serviceability {
|
|
|
2034
2326
|
// Showing warrnings if extra unknown parameters are found
|
|
2035
2327
|
const {
|
|
2036
2328
|
error: warrning,
|
|
2037
|
-
} = ServiceabilityPlatformValidator.
|
|
2329
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerScheme().validate(
|
|
2038
2330
|
{
|
|
2039
|
-
|
|
2331
|
+
schemeId,
|
|
2332
|
+
|
|
2040
2333
|
body,
|
|
2041
2334
|
},
|
|
2042
2335
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2044,7 +2337,7 @@ class Serviceability {
|
|
|
2044
2337
|
if (warrning) {
|
|
2045
2338
|
Logger({
|
|
2046
2339
|
level: "WARN",
|
|
2047
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2340
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerScheme \n ${warrning}`,
|
|
2048
2341
|
});
|
|
2049
2342
|
}
|
|
2050
2343
|
|
|
@@ -2054,8 +2347,8 @@ class Serviceability {
|
|
|
2054
2347
|
|
|
2055
2348
|
const response = await PlatformAPIClient.execute(
|
|
2056
2349
|
this.config,
|
|
2057
|
-
"
|
|
2058
|
-
`/service/platform/logistics/
|
|
2350
|
+
"put",
|
|
2351
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
2059
2352
|
query_params,
|
|
2060
2353
|
body,
|
|
2061
2354
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2069,7 +2362,7 @@ class Serviceability {
|
|
|
2069
2362
|
|
|
2070
2363
|
const {
|
|
2071
2364
|
error: res_error,
|
|
2072
|
-
} = ServiceabilityPlatformModel.
|
|
2365
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
2073
2366
|
responseData,
|
|
2074
2367
|
{ abortEarly: false, allowUnknown: true }
|
|
2075
2368
|
);
|
|
@@ -2080,7 +2373,7 @@ class Serviceability {
|
|
|
2080
2373
|
} else {
|
|
2081
2374
|
Logger({
|
|
2082
2375
|
level: "WARN",
|
|
2083
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2376
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerScheme \n ${res_error}`,
|
|
2084
2377
|
});
|
|
2085
2378
|
}
|
|
2086
2379
|
}
|
|
@@ -2089,27 +2382,26 @@ class Serviceability {
|
|
|
2089
2382
|
}
|
|
2090
2383
|
|
|
2091
2384
|
/**
|
|
2092
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2385
|
+
* @param {ServiceabilityPlatformValidator.UpdatePackageMaterialRuleParam} arg
|
|
2093
2386
|
* - Arg object
|
|
2094
2387
|
*
|
|
2095
2388
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2096
2389
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2097
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2098
|
-
*
|
|
2099
|
-
*
|
|
2100
|
-
* @
|
|
2101
|
-
* @
|
|
2102
|
-
* @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/).
|
|
2390
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
2391
|
+
* Success response
|
|
2392
|
+
* @name updatePackageMaterialRule
|
|
2393
|
+
* @summary: Update packaging rule
|
|
2394
|
+
* @description: Update an existing packaging rule - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePackageMaterialRule/).
|
|
2103
2395
|
*/
|
|
2104
|
-
async
|
|
2105
|
-
{
|
|
2396
|
+
async updatePackageMaterialRule(
|
|
2397
|
+
{ ruleId, body, requestHeaders } = { requestHeaders: {} },
|
|
2106
2398
|
{ responseHeaders } = { responseHeaders: false }
|
|
2107
2399
|
) {
|
|
2108
2400
|
const {
|
|
2109
2401
|
error,
|
|
2110
|
-
} = ServiceabilityPlatformValidator.
|
|
2402
|
+
} = ServiceabilityPlatformValidator.updatePackageMaterialRule().validate(
|
|
2111
2403
|
{
|
|
2112
|
-
|
|
2404
|
+
ruleId,
|
|
2113
2405
|
body,
|
|
2114
2406
|
},
|
|
2115
2407
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2121,9 +2413,9 @@ class Serviceability {
|
|
|
2121
2413
|
// Showing warrnings if extra unknown parameters are found
|
|
2122
2414
|
const {
|
|
2123
2415
|
error: warrning,
|
|
2124
|
-
} = ServiceabilityPlatformValidator.
|
|
2416
|
+
} = ServiceabilityPlatformValidator.updatePackageMaterialRule().validate(
|
|
2125
2417
|
{
|
|
2126
|
-
|
|
2418
|
+
ruleId,
|
|
2127
2419
|
body,
|
|
2128
2420
|
},
|
|
2129
2421
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2131,7 +2423,7 @@ class Serviceability {
|
|
|
2131
2423
|
if (warrning) {
|
|
2132
2424
|
Logger({
|
|
2133
2425
|
level: "WARN",
|
|
2134
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2426
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePackageMaterialRule \n ${warrning}`,
|
|
2135
2427
|
});
|
|
2136
2428
|
}
|
|
2137
2429
|
|
|
@@ -2142,7 +2434,7 @@ class Serviceability {
|
|
|
2142
2434
|
const response = await PlatformAPIClient.execute(
|
|
2143
2435
|
this.config,
|
|
2144
2436
|
"patch",
|
|
2145
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${
|
|
2437
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`,
|
|
2146
2438
|
query_params,
|
|
2147
2439
|
body,
|
|
2148
2440
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2156,10 +2448,10 @@ class Serviceability {
|
|
|
2156
2448
|
|
|
2157
2449
|
const {
|
|
2158
2450
|
error: res_error,
|
|
2159
|
-
} = ServiceabilityPlatformModel.
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
);
|
|
2451
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
2452
|
+
abortEarly: false,
|
|
2453
|
+
allowUnknown: true,
|
|
2454
|
+
});
|
|
2163
2455
|
|
|
2164
2456
|
if (res_error) {
|
|
2165
2457
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2167,7 +2459,7 @@ class Serviceability {
|
|
|
2167
2459
|
} else {
|
|
2168
2460
|
Logger({
|
|
2169
2461
|
level: "WARN",
|
|
2170
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2462
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePackageMaterialRule \n ${res_error}`,
|
|
2171
2463
|
});
|
|
2172
2464
|
}
|
|
2173
2465
|
}
|
|
@@ -2176,28 +2468,26 @@ class Serviceability {
|
|
|
2176
2468
|
}
|
|
2177
2469
|
|
|
2178
2470
|
/**
|
|
2179
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2471
|
+
* @param {ServiceabilityPlatformValidator.UpdatePackageMaterialsParam} arg
|
|
2472
|
+
* - Arg object
|
|
2473
|
+
*
|
|
2180
2474
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2181
2475
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2182
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2476
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
2183
2477
|
* Success response
|
|
2184
|
-
* @name
|
|
2185
|
-
* @summary: Update
|
|
2186
|
-
* @description:
|
|
2478
|
+
* @name updatePackageMaterials
|
|
2479
|
+
* @summary: Update packaging material
|
|
2480
|
+
* @description: Update an existing packaging material - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePackageMaterials/).
|
|
2187
2481
|
*/
|
|
2188
|
-
async
|
|
2189
|
-
{
|
|
2190
|
-
requestHeaders: {},
|
|
2191
|
-
},
|
|
2482
|
+
async updatePackageMaterials(
|
|
2483
|
+
{ packageMaterialId, body, requestHeaders } = { requestHeaders: {} },
|
|
2192
2484
|
{ responseHeaders } = { responseHeaders: false }
|
|
2193
2485
|
) {
|
|
2194
2486
|
const {
|
|
2195
2487
|
error,
|
|
2196
|
-
} = ServiceabilityPlatformValidator.
|
|
2488
|
+
} = ServiceabilityPlatformValidator.updatePackageMaterials().validate(
|
|
2197
2489
|
{
|
|
2198
|
-
|
|
2199
|
-
schemeId,
|
|
2200
|
-
regionId,
|
|
2490
|
+
packageMaterialId,
|
|
2201
2491
|
body,
|
|
2202
2492
|
},
|
|
2203
2493
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2209,11 +2499,9 @@ class Serviceability {
|
|
|
2209
2499
|
// Showing warrnings if extra unknown parameters are found
|
|
2210
2500
|
const {
|
|
2211
2501
|
error: warrning,
|
|
2212
|
-
} = ServiceabilityPlatformValidator.
|
|
2502
|
+
} = ServiceabilityPlatformValidator.updatePackageMaterials().validate(
|
|
2213
2503
|
{
|
|
2214
|
-
|
|
2215
|
-
schemeId,
|
|
2216
|
-
regionId,
|
|
2504
|
+
packageMaterialId,
|
|
2217
2505
|
body,
|
|
2218
2506
|
},
|
|
2219
2507
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2221,7 +2509,7 @@ class Serviceability {
|
|
|
2221
2509
|
if (warrning) {
|
|
2222
2510
|
Logger({
|
|
2223
2511
|
level: "WARN",
|
|
2224
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2512
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePackageMaterials \n ${warrning}`,
|
|
2225
2513
|
});
|
|
2226
2514
|
}
|
|
2227
2515
|
|
|
@@ -2231,8 +2519,8 @@ class Serviceability {
|
|
|
2231
2519
|
|
|
2232
2520
|
const response = await PlatformAPIClient.execute(
|
|
2233
2521
|
this.config,
|
|
2234
|
-
"
|
|
2235
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
2522
|
+
"patch",
|
|
2523
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`,
|
|
2236
2524
|
query_params,
|
|
2237
2525
|
body,
|
|
2238
2526
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2246,7 +2534,7 @@ class Serviceability {
|
|
|
2246
2534
|
|
|
2247
2535
|
const {
|
|
2248
2536
|
error: res_error,
|
|
2249
|
-
} = ServiceabilityPlatformModel.
|
|
2537
|
+
} = ServiceabilityPlatformModel.PackageMaterialResult().validate(
|
|
2250
2538
|
responseData,
|
|
2251
2539
|
{ abortEarly: false, allowUnknown: true }
|
|
2252
2540
|
);
|
|
@@ -2257,7 +2545,7 @@ class Serviceability {
|
|
|
2257
2545
|
} else {
|
|
2258
2546
|
Logger({
|
|
2259
2547
|
level: "WARN",
|
|
2260
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2548
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePackageMaterials \n ${res_error}`,
|
|
2261
2549
|
});
|
|
2262
2550
|
}
|
|
2263
2551
|
}
|
|
@@ -2266,22 +2554,24 @@ class Serviceability {
|
|
|
2266
2554
|
}
|
|
2267
2555
|
|
|
2268
2556
|
/**
|
|
2269
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2557
|
+
* @param {ServiceabilityPlatformValidator.UpdateSelfShipDetailsParam} arg
|
|
2558
|
+
* - Arg object
|
|
2559
|
+
*
|
|
2270
2560
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2271
2561
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2272
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2273
|
-
*
|
|
2274
|
-
* @
|
|
2275
|
-
* @
|
|
2276
|
-
* @description: Update an existing delivery zone . - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneById/).
|
|
2562
|
+
* @returns {Promise<ServiceabilityPlatformModel.SelfshipSchema>} - Success response
|
|
2563
|
+
* @name updateSelfShipDetails
|
|
2564
|
+
* @summary: Update self-ship details
|
|
2565
|
+
* @description: Updates the self-ship details such as TAT, activation status, and unit for a specified company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateSelfShipDetails/).
|
|
2277
2566
|
*/
|
|
2278
|
-
async
|
|
2279
|
-
{
|
|
2567
|
+
async updateSelfShipDetails(
|
|
2568
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2280
2569
|
{ responseHeaders } = { responseHeaders: false }
|
|
2281
2570
|
) {
|
|
2282
|
-
const {
|
|
2571
|
+
const {
|
|
2572
|
+
error,
|
|
2573
|
+
} = ServiceabilityPlatformValidator.updateSelfShipDetails().validate(
|
|
2283
2574
|
{
|
|
2284
|
-
zoneId,
|
|
2285
2575
|
body,
|
|
2286
2576
|
},
|
|
2287
2577
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2293,9 +2583,8 @@ class Serviceability {
|
|
|
2293
2583
|
// Showing warrnings if extra unknown parameters are found
|
|
2294
2584
|
const {
|
|
2295
2585
|
error: warrning,
|
|
2296
|
-
} = ServiceabilityPlatformValidator.
|
|
2586
|
+
} = ServiceabilityPlatformValidator.updateSelfShipDetails().validate(
|
|
2297
2587
|
{
|
|
2298
|
-
zoneId,
|
|
2299
2588
|
body,
|
|
2300
2589
|
},
|
|
2301
2590
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2303,7 +2592,7 @@ class Serviceability {
|
|
|
2303
2592
|
if (warrning) {
|
|
2304
2593
|
Logger({
|
|
2305
2594
|
level: "WARN",
|
|
2306
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2595
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateSelfShipDetails \n ${warrning}`,
|
|
2307
2596
|
});
|
|
2308
2597
|
}
|
|
2309
2598
|
|
|
@@ -2313,8 +2602,8 @@ class Serviceability {
|
|
|
2313
2602
|
|
|
2314
2603
|
const response = await PlatformAPIClient.execute(
|
|
2315
2604
|
this.config,
|
|
2316
|
-
"
|
|
2317
|
-
`/service/platform/logistics/
|
|
2605
|
+
"patch",
|
|
2606
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
2318
2607
|
query_params,
|
|
2319
2608
|
body,
|
|
2320
2609
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2328,10 +2617,10 @@ class Serviceability {
|
|
|
2328
2617
|
|
|
2329
2618
|
const {
|
|
2330
2619
|
error: res_error,
|
|
2331
|
-
} = ServiceabilityPlatformModel.
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
);
|
|
2620
|
+
} = ServiceabilityPlatformModel.SelfshipSchema().validate(responseData, {
|
|
2621
|
+
abortEarly: false,
|
|
2622
|
+
allowUnknown: true,
|
|
2623
|
+
});
|
|
2335
2624
|
|
|
2336
2625
|
if (res_error) {
|
|
2337
2626
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2339,7 +2628,7 @@ class Serviceability {
|
|
|
2339
2628
|
} else {
|
|
2340
2629
|
Logger({
|
|
2341
2630
|
level: "WARN",
|
|
2342
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2631
|
+
message: `Response Validation Warnings for platform > Serviceability > updateSelfShipDetails \n ${res_error}`,
|
|
2343
2632
|
});
|
|
2344
2633
|
}
|
|
2345
2634
|
}
|