@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
|
@@ -16,25 +16,23 @@ class Serviceability {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
19
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateBulkExportParam} arg
|
|
20
20
|
* - Arg object
|
|
21
21
|
*
|
|
22
22
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
23
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
* @summary: Create rourier rule
|
|
29
|
-
* @description: Creates a rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/).
|
|
24
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneBulkExport>} - Success response
|
|
25
|
+
* @name createBulkExport
|
|
26
|
+
* @summary: Create Bulk Export of Zones
|
|
27
|
+
* @description: Export zones defined at the application level. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createBulkExport/).
|
|
30
28
|
*/
|
|
31
|
-
async
|
|
29
|
+
async createBulkExport(
|
|
32
30
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
33
31
|
{ responseHeaders } = { responseHeaders: false }
|
|
34
32
|
) {
|
|
35
33
|
const {
|
|
36
34
|
error,
|
|
37
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
35
|
+
} = ServiceabilityPlatformApplicationValidator.createBulkExport().validate(
|
|
38
36
|
{
|
|
39
37
|
body,
|
|
40
38
|
},
|
|
@@ -47,7 +45,7 @@ class Serviceability {
|
|
|
47
45
|
// Showing warrnings if extra unknown parameters are found
|
|
48
46
|
const {
|
|
49
47
|
error: warrning,
|
|
50
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
48
|
+
} = ServiceabilityPlatformApplicationValidator.createBulkExport().validate(
|
|
51
49
|
{
|
|
52
50
|
body,
|
|
53
51
|
},
|
|
@@ -56,7 +54,7 @@ class Serviceability {
|
|
|
56
54
|
if (warrning) {
|
|
57
55
|
Logger({
|
|
58
56
|
level: "WARN",
|
|
59
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
57
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createBulkExport \n ${warrning}`,
|
|
60
58
|
});
|
|
61
59
|
}
|
|
62
60
|
|
|
@@ -65,7 +63,7 @@ class Serviceability {
|
|
|
65
63
|
const response = await PlatformAPIClient.execute(
|
|
66
64
|
this.config,
|
|
67
65
|
"post",
|
|
68
|
-
`/service/platform/logistics/
|
|
66
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/bulk/export`,
|
|
69
67
|
query_params,
|
|
70
68
|
body,
|
|
71
69
|
requestHeaders,
|
|
@@ -79,10 +77,92 @@ class Serviceability {
|
|
|
79
77
|
|
|
80
78
|
const {
|
|
81
79
|
error: res_error,
|
|
82
|
-
} = ServiceabilityPlatformModel.
|
|
83
|
-
|
|
80
|
+
} = ServiceabilityPlatformModel.ZoneBulkExport().validate(responseData, {
|
|
81
|
+
abortEarly: false,
|
|
82
|
+
allowUnknown: true,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
if (res_error) {
|
|
86
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
87
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
88
|
+
} else {
|
|
89
|
+
Logger({
|
|
90
|
+
level: "WARN",
|
|
91
|
+
message: `Response Validation Warnings for platform > Serviceability > createBulkExport \n ${res_error}`,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return response;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateBulkGeoAreaParam} arg
|
|
101
|
+
* - Arg object
|
|
102
|
+
*
|
|
103
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
104
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
105
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkGeoAreaResult>} -
|
|
106
|
+
* Success response
|
|
107
|
+
* @name createBulkGeoArea
|
|
108
|
+
* @summary: Bulk Creation of GeoArea Regions
|
|
109
|
+
* @description: Allows to create and manage GeoAreas, representing groups of geographic regions in bulk. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createBulkGeoArea/).
|
|
110
|
+
*/
|
|
111
|
+
async createBulkGeoArea(
|
|
112
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
113
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
114
|
+
) {
|
|
115
|
+
const {
|
|
116
|
+
error,
|
|
117
|
+
} = ServiceabilityPlatformApplicationValidator.createBulkGeoArea().validate(
|
|
118
|
+
{
|
|
119
|
+
body,
|
|
120
|
+
},
|
|
84
121
|
{ abortEarly: false, allowUnknown: true }
|
|
85
122
|
);
|
|
123
|
+
if (error) {
|
|
124
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Showing warrnings if extra unknown parameters are found
|
|
128
|
+
const {
|
|
129
|
+
error: warrning,
|
|
130
|
+
} = ServiceabilityPlatformApplicationValidator.createBulkGeoArea().validate(
|
|
131
|
+
{
|
|
132
|
+
body,
|
|
133
|
+
},
|
|
134
|
+
{ abortEarly: false, allowUnknown: false }
|
|
135
|
+
);
|
|
136
|
+
if (warrning) {
|
|
137
|
+
Logger({
|
|
138
|
+
level: "WARN",
|
|
139
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createBulkGeoArea \n ${warrning}`,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const query_params = {};
|
|
144
|
+
|
|
145
|
+
const response = await PlatformAPIClient.execute(
|
|
146
|
+
this.config,
|
|
147
|
+
"post",
|
|
148
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/regions/bulk`,
|
|
149
|
+
query_params,
|
|
150
|
+
body,
|
|
151
|
+
requestHeaders,
|
|
152
|
+
{ responseHeaders }
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
let responseData = response;
|
|
156
|
+
if (responseHeaders) {
|
|
157
|
+
responseData = response[0];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const {
|
|
161
|
+
error: res_error,
|
|
162
|
+
} = ServiceabilityPlatformModel.BulkGeoAreaResult().validate(responseData, {
|
|
163
|
+
abortEarly: false,
|
|
164
|
+
allowUnknown: true,
|
|
165
|
+
});
|
|
86
166
|
|
|
87
167
|
if (res_error) {
|
|
88
168
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -90,7 +170,7 @@ class Serviceability {
|
|
|
90
170
|
} else {
|
|
91
171
|
Logger({
|
|
92
172
|
level: "WARN",
|
|
93
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
173
|
+
message: `Response Validation Warnings for platform > Serviceability > createBulkGeoArea \n ${res_error}`,
|
|
94
174
|
});
|
|
95
175
|
}
|
|
96
176
|
}
|
|
@@ -99,25 +179,25 @@ class Serviceability {
|
|
|
99
179
|
}
|
|
100
180
|
|
|
101
181
|
/**
|
|
102
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
182
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam} arg
|
|
103
183
|
* - Arg object
|
|
104
184
|
*
|
|
105
185
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
106
186
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
107
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
187
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResult>}
|
|
108
188
|
* - Success response
|
|
109
189
|
*
|
|
110
|
-
* @name
|
|
111
|
-
* @summary: Create
|
|
112
|
-
* @description:
|
|
190
|
+
* @name createCourierPartnerRule
|
|
191
|
+
* @summary: Create courier rule
|
|
192
|
+
* @description: Creates a rule within the delivery configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createCourierPartnerRule/).
|
|
113
193
|
*/
|
|
114
|
-
async
|
|
194
|
+
async createCourierPartnerRule(
|
|
115
195
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
116
196
|
{ responseHeaders } = { responseHeaders: false }
|
|
117
197
|
) {
|
|
118
198
|
const {
|
|
119
199
|
error,
|
|
120
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
200
|
+
} = ServiceabilityPlatformApplicationValidator.createCourierPartnerRule().validate(
|
|
121
201
|
{
|
|
122
202
|
body,
|
|
123
203
|
},
|
|
@@ -130,7 +210,7 @@ class Serviceability {
|
|
|
130
210
|
// Showing warrnings if extra unknown parameters are found
|
|
131
211
|
const {
|
|
132
212
|
error: warrning,
|
|
133
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
213
|
+
} = ServiceabilityPlatformApplicationValidator.createCourierPartnerRule().validate(
|
|
134
214
|
{
|
|
135
215
|
body,
|
|
136
216
|
},
|
|
@@ -139,7 +219,7 @@ class Serviceability {
|
|
|
139
219
|
if (warrning) {
|
|
140
220
|
Logger({
|
|
141
221
|
level: "WARN",
|
|
142
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
222
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerRule \n ${warrning}`,
|
|
143
223
|
});
|
|
144
224
|
}
|
|
145
225
|
|
|
@@ -148,7 +228,7 @@ class Serviceability {
|
|
|
148
228
|
const response = await PlatformAPIClient.execute(
|
|
149
229
|
this.config,
|
|
150
230
|
"post",
|
|
151
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
231
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules`,
|
|
152
232
|
query_params,
|
|
153
233
|
body,
|
|
154
234
|
requestHeaders,
|
|
@@ -162,7 +242,7 @@ class Serviceability {
|
|
|
162
242
|
|
|
163
243
|
const {
|
|
164
244
|
error: res_error,
|
|
165
|
-
} = ServiceabilityPlatformModel.
|
|
245
|
+
} = ServiceabilityPlatformModel.CourierPartnerRuleResult().validate(
|
|
166
246
|
responseData,
|
|
167
247
|
{ abortEarly: false, allowUnknown: true }
|
|
168
248
|
);
|
|
@@ -173,7 +253,7 @@ class Serviceability {
|
|
|
173
253
|
} else {
|
|
174
254
|
Logger({
|
|
175
255
|
level: "WARN",
|
|
176
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
256
|
+
message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerRule \n ${res_error}`,
|
|
177
257
|
});
|
|
178
258
|
}
|
|
179
259
|
}
|
|
@@ -182,25 +262,27 @@ class Serviceability {
|
|
|
182
262
|
}
|
|
183
263
|
|
|
184
264
|
/**
|
|
185
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
265
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateFulfillmentOptionParam} arg
|
|
186
266
|
* - Arg object
|
|
187
267
|
*
|
|
188
268
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
189
269
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
190
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
270
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOption>} -
|
|
191
271
|
* Success response
|
|
192
|
-
* @name
|
|
193
|
-
* @summary:
|
|
194
|
-
* @description:
|
|
272
|
+
* @name createFulfillmentOption
|
|
273
|
+
* @summary: Create a new fulfillment option
|
|
274
|
+
* @description: Creates a new fulfillment option for the specified company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createFulfillmentOption/).
|
|
195
275
|
*/
|
|
196
|
-
async
|
|
197
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
276
|
+
async createFulfillmentOption(
|
|
277
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
198
278
|
{ responseHeaders } = { responseHeaders: false }
|
|
199
279
|
) {
|
|
200
280
|
const {
|
|
201
281
|
error,
|
|
202
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
203
|
-
{
|
|
282
|
+
} = ServiceabilityPlatformApplicationValidator.createFulfillmentOption().validate(
|
|
283
|
+
{
|
|
284
|
+
body,
|
|
285
|
+
},
|
|
204
286
|
{ abortEarly: false, allowUnknown: true }
|
|
205
287
|
);
|
|
206
288
|
if (error) {
|
|
@@ -210,14 +292,16 @@ class Serviceability {
|
|
|
210
292
|
// Showing warrnings if extra unknown parameters are found
|
|
211
293
|
const {
|
|
212
294
|
error: warrning,
|
|
213
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
214
|
-
{
|
|
295
|
+
} = ServiceabilityPlatformApplicationValidator.createFulfillmentOption().validate(
|
|
296
|
+
{
|
|
297
|
+
body,
|
|
298
|
+
},
|
|
215
299
|
{ abortEarly: false, allowUnknown: false }
|
|
216
300
|
);
|
|
217
301
|
if (warrning) {
|
|
218
302
|
Logger({
|
|
219
303
|
level: "WARN",
|
|
220
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
304
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createFulfillmentOption \n ${warrning}`,
|
|
221
305
|
});
|
|
222
306
|
}
|
|
223
307
|
|
|
@@ -225,10 +309,10 @@ class Serviceability {
|
|
|
225
309
|
|
|
226
310
|
const response = await PlatformAPIClient.execute(
|
|
227
311
|
this.config,
|
|
228
|
-
"
|
|
229
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
312
|
+
"post",
|
|
313
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options`,
|
|
230
314
|
query_params,
|
|
231
|
-
|
|
315
|
+
body,
|
|
232
316
|
requestHeaders,
|
|
233
317
|
{ responseHeaders }
|
|
234
318
|
);
|
|
@@ -240,10 +324,10 @@ class Serviceability {
|
|
|
240
324
|
|
|
241
325
|
const {
|
|
242
326
|
error: res_error,
|
|
243
|
-
} = ServiceabilityPlatformModel.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
);
|
|
327
|
+
} = ServiceabilityPlatformModel.FulfillmentOption().validate(responseData, {
|
|
328
|
+
abortEarly: false,
|
|
329
|
+
allowUnknown: true,
|
|
330
|
+
});
|
|
247
331
|
|
|
248
332
|
if (res_error) {
|
|
249
333
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -251,7 +335,7 @@ class Serviceability {
|
|
|
251
335
|
} else {
|
|
252
336
|
Logger({
|
|
253
337
|
level: "WARN",
|
|
254
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
338
|
+
message: `Response Validation Warnings for platform > Serviceability > createFulfillmentOption \n ${res_error}`,
|
|
255
339
|
});
|
|
256
340
|
}
|
|
257
341
|
}
|
|
@@ -260,25 +344,27 @@ class Serviceability {
|
|
|
260
344
|
}
|
|
261
345
|
|
|
262
346
|
/**
|
|
263
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
347
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateGeoAreaParam} arg
|
|
264
348
|
* - Arg object
|
|
265
349
|
*
|
|
266
350
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
267
351
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
268
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
352
|
+
* @returns {Promise<ServiceabilityPlatformModel.GeoAreaResponseBody>} -
|
|
269
353
|
* Success response
|
|
270
|
-
* @name
|
|
271
|
-
* @summary:
|
|
272
|
-
* @description:
|
|
354
|
+
* @name createGeoArea
|
|
355
|
+
* @summary: Creation of GeoArea
|
|
356
|
+
* @description: Allows to create and manage GeoAreas, representing groups of geographic regions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createGeoArea/).
|
|
273
357
|
*/
|
|
274
|
-
async
|
|
275
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
358
|
+
async createGeoArea(
|
|
359
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
276
360
|
{ responseHeaders } = { responseHeaders: false }
|
|
277
361
|
) {
|
|
278
362
|
const {
|
|
279
363
|
error,
|
|
280
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
281
|
-
{
|
|
364
|
+
} = ServiceabilityPlatformApplicationValidator.createGeoArea().validate(
|
|
365
|
+
{
|
|
366
|
+
body,
|
|
367
|
+
},
|
|
282
368
|
{ abortEarly: false, allowUnknown: true }
|
|
283
369
|
);
|
|
284
370
|
if (error) {
|
|
@@ -288,14 +374,16 @@ class Serviceability {
|
|
|
288
374
|
// Showing warrnings if extra unknown parameters are found
|
|
289
375
|
const {
|
|
290
376
|
error: warrning,
|
|
291
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
292
|
-
{
|
|
377
|
+
} = ServiceabilityPlatformApplicationValidator.createGeoArea().validate(
|
|
378
|
+
{
|
|
379
|
+
body,
|
|
380
|
+
},
|
|
293
381
|
{ abortEarly: false, allowUnknown: false }
|
|
294
382
|
);
|
|
295
383
|
if (warrning) {
|
|
296
384
|
Logger({
|
|
297
385
|
level: "WARN",
|
|
298
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
386
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createGeoArea \n ${warrning}`,
|
|
299
387
|
});
|
|
300
388
|
}
|
|
301
389
|
|
|
@@ -303,10 +391,10 @@ class Serviceability {
|
|
|
303
391
|
|
|
304
392
|
const response = await PlatformAPIClient.execute(
|
|
305
393
|
this.config,
|
|
306
|
-
"
|
|
307
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
394
|
+
"post",
|
|
395
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas`,
|
|
308
396
|
query_params,
|
|
309
|
-
|
|
397
|
+
body,
|
|
310
398
|
requestHeaders,
|
|
311
399
|
{ responseHeaders }
|
|
312
400
|
);
|
|
@@ -318,10 +406,10 @@ class Serviceability {
|
|
|
318
406
|
|
|
319
407
|
const {
|
|
320
408
|
error: res_error,
|
|
321
|
-
} = ServiceabilityPlatformModel.
|
|
322
|
-
|
|
323
|
-
allowUnknown: true
|
|
324
|
-
|
|
409
|
+
} = ServiceabilityPlatformModel.GeoAreaResponseBody().validate(
|
|
410
|
+
responseData,
|
|
411
|
+
{ abortEarly: false, allowUnknown: true }
|
|
412
|
+
);
|
|
325
413
|
|
|
326
414
|
if (res_error) {
|
|
327
415
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -329,7 +417,7 @@ class Serviceability {
|
|
|
329
417
|
} else {
|
|
330
418
|
Logger({
|
|
331
419
|
level: "WARN",
|
|
332
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
420
|
+
message: `Response Validation Warnings for platform > Serviceability > createGeoArea \n ${res_error}`,
|
|
333
421
|
});
|
|
334
422
|
}
|
|
335
423
|
}
|
|
@@ -338,26 +426,28 @@ class Serviceability {
|
|
|
338
426
|
}
|
|
339
427
|
|
|
340
428
|
/**
|
|
341
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
429
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateGeoAreaExportJobParam} arg
|
|
342
430
|
* - Arg object
|
|
343
431
|
*
|
|
344
432
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
345
433
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
346
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
434
|
+
* @returns {Promise<ServiceabilityPlatformModel.GeoAreaBulkCreationResult>}
|
|
347
435
|
* - Success response
|
|
348
436
|
*
|
|
349
|
-
* @name
|
|
350
|
-
* @summary:
|
|
351
|
-
* @description:
|
|
437
|
+
* @name createGeoAreaExportJob
|
|
438
|
+
* @summary: Create job for exporting Geoarea regions
|
|
439
|
+
* @description: Create the job for exporting the regions in Geoarea in CSV format. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createGeoAreaExportJob/).
|
|
352
440
|
*/
|
|
353
|
-
async
|
|
354
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
441
|
+
async createGeoAreaExportJob(
|
|
442
|
+
{ geoareaId, requestHeaders } = { requestHeaders: {} },
|
|
355
443
|
{ responseHeaders } = { responseHeaders: false }
|
|
356
444
|
) {
|
|
357
445
|
const {
|
|
358
446
|
error,
|
|
359
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
360
|
-
{
|
|
447
|
+
} = ServiceabilityPlatformApplicationValidator.createGeoAreaExportJob().validate(
|
|
448
|
+
{
|
|
449
|
+
geoareaId,
|
|
450
|
+
},
|
|
361
451
|
{ abortEarly: false, allowUnknown: true }
|
|
362
452
|
);
|
|
363
453
|
if (error) {
|
|
@@ -367,14 +457,16 @@ class Serviceability {
|
|
|
367
457
|
// Showing warrnings if extra unknown parameters are found
|
|
368
458
|
const {
|
|
369
459
|
error: warrning,
|
|
370
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
371
|
-
{
|
|
460
|
+
} = ServiceabilityPlatformApplicationValidator.createGeoAreaExportJob().validate(
|
|
461
|
+
{
|
|
462
|
+
geoareaId,
|
|
463
|
+
},
|
|
372
464
|
{ abortEarly: false, allowUnknown: false }
|
|
373
465
|
);
|
|
374
466
|
if (warrning) {
|
|
375
467
|
Logger({
|
|
376
468
|
level: "WARN",
|
|
377
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
469
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createGeoAreaExportJob \n ${warrning}`,
|
|
378
470
|
});
|
|
379
471
|
}
|
|
380
472
|
|
|
@@ -382,8 +474,8 @@ class Serviceability {
|
|
|
382
474
|
|
|
383
475
|
const response = await PlatformAPIClient.execute(
|
|
384
476
|
this.config,
|
|
385
|
-
"
|
|
386
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
477
|
+
"post",
|
|
478
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/bulk/export/${geoareaId}`,
|
|
387
479
|
query_params,
|
|
388
480
|
undefined,
|
|
389
481
|
requestHeaders,
|
|
@@ -397,7 +489,7 @@ class Serviceability {
|
|
|
397
489
|
|
|
398
490
|
const {
|
|
399
491
|
error: res_error,
|
|
400
|
-
} = ServiceabilityPlatformModel.
|
|
492
|
+
} = ServiceabilityPlatformModel.GeoAreaBulkCreationResult().validate(
|
|
401
493
|
responseData,
|
|
402
494
|
{ abortEarly: false, allowUnknown: true }
|
|
403
495
|
);
|
|
@@ -408,7 +500,7 @@ class Serviceability {
|
|
|
408
500
|
} else {
|
|
409
501
|
Logger({
|
|
410
502
|
level: "WARN",
|
|
411
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
503
|
+
message: `Response Validation Warnings for platform > Serviceability > createGeoAreaExportJob \n ${res_error}`,
|
|
412
504
|
});
|
|
413
505
|
}
|
|
414
506
|
}
|
|
@@ -417,27 +509,27 @@ class Serviceability {
|
|
|
417
509
|
}
|
|
418
510
|
|
|
419
511
|
/**
|
|
420
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
512
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreatePolygonParam} arg
|
|
421
513
|
* - Arg object
|
|
422
514
|
*
|
|
423
515
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
424
516
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
425
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
517
|
+
* @returns {Promise<ServiceabilityPlatformModel.StorePolygonServiceabilityResult>}
|
|
426
518
|
* - Success response
|
|
427
519
|
*
|
|
428
|
-
* @name
|
|
429
|
-
* @summary:
|
|
430
|
-
* @description:
|
|
520
|
+
* @name createPolygon
|
|
521
|
+
* @summary: Create polygon-based serviceability for stores
|
|
522
|
+
* @description: Creates polygon-based serviceability regions for one or more stores for quick commerce. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createPolygon/).
|
|
431
523
|
*/
|
|
432
|
-
async
|
|
433
|
-
{
|
|
524
|
+
async createPolygon(
|
|
525
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
434
526
|
{ responseHeaders } = { responseHeaders: false }
|
|
435
527
|
) {
|
|
436
528
|
const {
|
|
437
529
|
error,
|
|
438
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
530
|
+
} = ServiceabilityPlatformApplicationValidator.createPolygon().validate(
|
|
439
531
|
{
|
|
440
|
-
|
|
532
|
+
body,
|
|
441
533
|
},
|
|
442
534
|
{ abortEarly: false, allowUnknown: true }
|
|
443
535
|
);
|
|
@@ -448,16 +540,16 @@ class Serviceability {
|
|
|
448
540
|
// Showing warrnings if extra unknown parameters are found
|
|
449
541
|
const {
|
|
450
542
|
error: warrning,
|
|
451
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
543
|
+
} = ServiceabilityPlatformApplicationValidator.createPolygon().validate(
|
|
452
544
|
{
|
|
453
|
-
|
|
545
|
+
body,
|
|
454
546
|
},
|
|
455
547
|
{ abortEarly: false, allowUnknown: false }
|
|
456
548
|
);
|
|
457
549
|
if (warrning) {
|
|
458
550
|
Logger({
|
|
459
551
|
level: "WARN",
|
|
460
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
552
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPolygon \n ${warrning}`,
|
|
461
553
|
});
|
|
462
554
|
}
|
|
463
555
|
|
|
@@ -465,10 +557,10 @@ class Serviceability {
|
|
|
465
557
|
|
|
466
558
|
const response = await PlatformAPIClient.execute(
|
|
467
559
|
this.config,
|
|
468
|
-
"
|
|
469
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
560
|
+
"post",
|
|
561
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/polygon`,
|
|
470
562
|
query_params,
|
|
471
|
-
|
|
563
|
+
body,
|
|
472
564
|
requestHeaders,
|
|
473
565
|
{ responseHeaders }
|
|
474
566
|
);
|
|
@@ -480,7 +572,7 @@ class Serviceability {
|
|
|
480
572
|
|
|
481
573
|
const {
|
|
482
574
|
error: res_error,
|
|
483
|
-
} = ServiceabilityPlatformModel.
|
|
575
|
+
} = ServiceabilityPlatformModel.StorePolygonServiceabilityResult().validate(
|
|
484
576
|
responseData,
|
|
485
577
|
{ abortEarly: false, allowUnknown: true }
|
|
486
578
|
);
|
|
@@ -491,7 +583,7 @@ class Serviceability {
|
|
|
491
583
|
} else {
|
|
492
584
|
Logger({
|
|
493
585
|
level: "WARN",
|
|
494
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
586
|
+
message: `Response Validation Warnings for platform > Serviceability > createPolygon \n ${res_error}`,
|
|
495
587
|
});
|
|
496
588
|
}
|
|
497
589
|
}
|
|
@@ -500,29 +592,28 @@ class Serviceability {
|
|
|
500
592
|
}
|
|
501
593
|
|
|
502
594
|
/**
|
|
503
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
595
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateShipmentsParam} arg
|
|
504
596
|
* - Arg object
|
|
505
597
|
*
|
|
506
598
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
507
599
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
508
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
600
|
+
* @returns {Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>}
|
|
509
601
|
* - Success response
|
|
510
602
|
*
|
|
511
|
-
* @name
|
|
512
|
-
* @summary:
|
|
513
|
-
* @description:
|
|
603
|
+
* @name createShipments
|
|
604
|
+
* @summary: Create and return shipments
|
|
605
|
+
* @description: Create and return shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createShipments/).
|
|
514
606
|
*/
|
|
515
|
-
async
|
|
516
|
-
{
|
|
607
|
+
async createShipments(
|
|
608
|
+
{ body, xOrderingSource, requestHeaders } = { requestHeaders: {} },
|
|
517
609
|
{ responseHeaders } = { responseHeaders: false }
|
|
518
610
|
) {
|
|
519
611
|
const {
|
|
520
612
|
error,
|
|
521
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
613
|
+
} = ServiceabilityPlatformApplicationValidator.createShipments().validate(
|
|
522
614
|
{
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
status,
|
|
615
|
+
body,
|
|
616
|
+
xOrderingSource,
|
|
526
617
|
},
|
|
527
618
|
{ abortEarly: false, allowUnknown: true }
|
|
528
619
|
);
|
|
@@ -533,32 +624,28 @@ class Serviceability {
|
|
|
533
624
|
// Showing warrnings if extra unknown parameters are found
|
|
534
625
|
const {
|
|
535
626
|
error: warrning,
|
|
536
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
627
|
+
} = ServiceabilityPlatformApplicationValidator.createShipments().validate(
|
|
537
628
|
{
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
status,
|
|
629
|
+
body,
|
|
630
|
+
xOrderingSource,
|
|
541
631
|
},
|
|
542
632
|
{ abortEarly: false, allowUnknown: false }
|
|
543
633
|
);
|
|
544
634
|
if (warrning) {
|
|
545
635
|
Logger({
|
|
546
636
|
level: "WARN",
|
|
547
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
637
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createShipments \n ${warrning}`,
|
|
548
638
|
});
|
|
549
639
|
}
|
|
550
640
|
|
|
551
641
|
const query_params = {};
|
|
552
|
-
query_params["page_no"] = pageNo;
|
|
553
|
-
query_params["page_size"] = pageSize;
|
|
554
|
-
query_params["status"] = status;
|
|
555
642
|
|
|
556
643
|
const response = await PlatformAPIClient.execute(
|
|
557
644
|
this.config,
|
|
558
|
-
"
|
|
559
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
645
|
+
"post",
|
|
646
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments`,
|
|
560
647
|
query_params,
|
|
561
|
-
|
|
648
|
+
body,
|
|
562
649
|
requestHeaders,
|
|
563
650
|
{ responseHeaders }
|
|
564
651
|
);
|
|
@@ -570,7 +657,7 @@ class Serviceability {
|
|
|
570
657
|
|
|
571
658
|
const {
|
|
572
659
|
error: res_error,
|
|
573
|
-
} = ServiceabilityPlatformModel.
|
|
660
|
+
} = ServiceabilityPlatformModel.PlatformShipmentsResponseSchema().validate(
|
|
574
661
|
responseData,
|
|
575
662
|
{ abortEarly: false, allowUnknown: true }
|
|
576
663
|
);
|
|
@@ -581,7 +668,7 @@ class Serviceability {
|
|
|
581
668
|
} else {
|
|
582
669
|
Logger({
|
|
583
670
|
level: "WARN",
|
|
584
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
671
|
+
message: `Response Validation Warnings for platform > Serviceability > createShipments \n ${res_error}`,
|
|
585
672
|
});
|
|
586
673
|
}
|
|
587
674
|
}
|
|
@@ -590,26 +677,26 @@ class Serviceability {
|
|
|
590
677
|
}
|
|
591
678
|
|
|
592
679
|
/**
|
|
593
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
680
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg
|
|
594
681
|
* - Arg object
|
|
595
682
|
*
|
|
596
683
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
597
684
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
598
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
685
|
+
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleResultSchema>} -
|
|
599
686
|
* Success response
|
|
600
|
-
* @name
|
|
601
|
-
* @summary:
|
|
602
|
-
* @description:
|
|
687
|
+
* @name createStoreRules
|
|
688
|
+
* @summary: Create store rule
|
|
689
|
+
* @description: Create a rule within the order routing rules - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createStoreRules/).
|
|
603
690
|
*/
|
|
604
|
-
async
|
|
605
|
-
{
|
|
691
|
+
async createStoreRules(
|
|
692
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
606
693
|
{ responseHeaders } = { responseHeaders: false }
|
|
607
694
|
) {
|
|
608
695
|
const {
|
|
609
696
|
error,
|
|
610
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
697
|
+
} = ServiceabilityPlatformApplicationValidator.createStoreRules().validate(
|
|
611
698
|
{
|
|
612
|
-
|
|
699
|
+
body,
|
|
613
700
|
},
|
|
614
701
|
{ abortEarly: false, allowUnknown: true }
|
|
615
702
|
);
|
|
@@ -620,16 +707,2917 @@ class Serviceability {
|
|
|
620
707
|
// Showing warrnings if extra unknown parameters are found
|
|
621
708
|
const {
|
|
622
709
|
error: warrning,
|
|
623
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
710
|
+
} = ServiceabilityPlatformApplicationValidator.createStoreRules().validate(
|
|
624
711
|
{
|
|
625
|
-
|
|
712
|
+
body,
|
|
713
|
+
},
|
|
714
|
+
{ abortEarly: false, allowUnknown: false }
|
|
715
|
+
);
|
|
716
|
+
if (warrning) {
|
|
717
|
+
Logger({
|
|
718
|
+
level: "WARN",
|
|
719
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createStoreRules \n ${warrning}`,
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
const query_params = {};
|
|
724
|
+
|
|
725
|
+
const response = await PlatformAPIClient.execute(
|
|
726
|
+
this.config,
|
|
727
|
+
"post",
|
|
728
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules`,
|
|
729
|
+
query_params,
|
|
730
|
+
body,
|
|
731
|
+
requestHeaders,
|
|
732
|
+
{ responseHeaders }
|
|
733
|
+
);
|
|
734
|
+
|
|
735
|
+
let responseData = response;
|
|
736
|
+
if (responseHeaders) {
|
|
737
|
+
responseData = response[0];
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
const {
|
|
741
|
+
error: res_error,
|
|
742
|
+
} = ServiceabilityPlatformModel.StoreRuleResultSchema().validate(
|
|
743
|
+
responseData,
|
|
744
|
+
{ abortEarly: false, allowUnknown: true }
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
if (res_error) {
|
|
748
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
749
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
750
|
+
} else {
|
|
751
|
+
Logger({
|
|
752
|
+
level: "WARN",
|
|
753
|
+
message: `Response Validation Warnings for platform > Serviceability > createStoreRules \n ${res_error}`,
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
return response;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateZoneParam} arg
|
|
763
|
+
* - Arg object
|
|
764
|
+
*
|
|
765
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
766
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
767
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneSchema>} - Success response
|
|
768
|
+
* @name createZone
|
|
769
|
+
* @summary: Create zone
|
|
770
|
+
* @description: Creates a delivery zone. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createZone/).
|
|
771
|
+
*/
|
|
772
|
+
async createZone(
|
|
773
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
774
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
775
|
+
) {
|
|
776
|
+
const {
|
|
777
|
+
error,
|
|
778
|
+
} = ServiceabilityPlatformApplicationValidator.createZone().validate(
|
|
779
|
+
{
|
|
780
|
+
body,
|
|
781
|
+
},
|
|
782
|
+
{ abortEarly: false, allowUnknown: true }
|
|
783
|
+
);
|
|
784
|
+
if (error) {
|
|
785
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// Showing warrnings if extra unknown parameters are found
|
|
789
|
+
const {
|
|
790
|
+
error: warrning,
|
|
791
|
+
} = ServiceabilityPlatformApplicationValidator.createZone().validate(
|
|
792
|
+
{
|
|
793
|
+
body,
|
|
794
|
+
},
|
|
795
|
+
{ abortEarly: false, allowUnknown: false }
|
|
796
|
+
);
|
|
797
|
+
if (warrning) {
|
|
798
|
+
Logger({
|
|
799
|
+
level: "WARN",
|
|
800
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createZone \n ${warrning}`,
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
const query_params = {};
|
|
805
|
+
|
|
806
|
+
const response = await PlatformAPIClient.execute(
|
|
807
|
+
this.config,
|
|
808
|
+
"post",
|
|
809
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones`,
|
|
810
|
+
query_params,
|
|
811
|
+
body,
|
|
812
|
+
requestHeaders,
|
|
813
|
+
{ responseHeaders }
|
|
814
|
+
);
|
|
815
|
+
|
|
816
|
+
let responseData = response;
|
|
817
|
+
if (responseHeaders) {
|
|
818
|
+
responseData = response[0];
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
const {
|
|
822
|
+
error: res_error,
|
|
823
|
+
} = ServiceabilityPlatformModel.ZoneSchema().validate(responseData, {
|
|
824
|
+
abortEarly: false,
|
|
825
|
+
allowUnknown: true,
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
if (res_error) {
|
|
829
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
830
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
831
|
+
} else {
|
|
832
|
+
Logger({
|
|
833
|
+
level: "WARN",
|
|
834
|
+
message: `Response Validation Warnings for platform > Serviceability > createZone \n ${res_error}`,
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
return response;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateZoneProductsBulkPatchJobParam} arg
|
|
844
|
+
* - Arg object
|
|
845
|
+
*
|
|
846
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
847
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
848
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneBulkExport>} - Success response
|
|
849
|
+
* @name createZoneProductsBulkPatchJob
|
|
850
|
+
* @summary: Create bulk zone products patch job
|
|
851
|
+
* @description: Initiates a bulk zone products patch operation by accepting a CSV file URL. The file is validated and a background job is created for processing zone product additions or removals. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createZoneProductsBulkPatchJob/).
|
|
852
|
+
*/
|
|
853
|
+
async createZoneProductsBulkPatchJob(
|
|
854
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
855
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
856
|
+
) {
|
|
857
|
+
const {
|
|
858
|
+
error,
|
|
859
|
+
} = ServiceabilityPlatformApplicationValidator.createZoneProductsBulkPatchJob().validate(
|
|
860
|
+
{
|
|
861
|
+
body,
|
|
862
|
+
},
|
|
863
|
+
{ abortEarly: false, allowUnknown: true }
|
|
864
|
+
);
|
|
865
|
+
if (error) {
|
|
866
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
// Showing warrnings if extra unknown parameters are found
|
|
870
|
+
const {
|
|
871
|
+
error: warrning,
|
|
872
|
+
} = ServiceabilityPlatformApplicationValidator.createZoneProductsBulkPatchJob().validate(
|
|
873
|
+
{
|
|
874
|
+
body,
|
|
875
|
+
},
|
|
876
|
+
{ abortEarly: false, allowUnknown: false }
|
|
877
|
+
);
|
|
878
|
+
if (warrning) {
|
|
879
|
+
Logger({
|
|
880
|
+
level: "WARN",
|
|
881
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createZoneProductsBulkPatchJob \n ${warrning}`,
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
const query_params = {};
|
|
886
|
+
|
|
887
|
+
const response = await PlatformAPIClient.execute(
|
|
888
|
+
this.config,
|
|
889
|
+
"post",
|
|
890
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/bulk/products`,
|
|
891
|
+
query_params,
|
|
892
|
+
body,
|
|
893
|
+
requestHeaders,
|
|
894
|
+
{ responseHeaders }
|
|
895
|
+
);
|
|
896
|
+
|
|
897
|
+
let responseData = response;
|
|
898
|
+
if (responseHeaders) {
|
|
899
|
+
responseData = response[0];
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
const {
|
|
903
|
+
error: res_error,
|
|
904
|
+
} = ServiceabilityPlatformModel.ZoneBulkExport().validate(responseData, {
|
|
905
|
+
abortEarly: false,
|
|
906
|
+
allowUnknown: true,
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
if (res_error) {
|
|
910
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
911
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
912
|
+
} else {
|
|
913
|
+
Logger({
|
|
914
|
+
level: "WARN",
|
|
915
|
+
message: `Response Validation Warnings for platform > Serviceability > createZoneProductsBulkPatchJob \n ${res_error}`,
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
return response;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* @param {ServiceabilityPlatformApplicationValidator.DeleteFulfillmentOptionsParam} arg
|
|
925
|
+
* - Arg object
|
|
926
|
+
*
|
|
927
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
928
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
929
|
+
* @returns {Promise<ServiceabilityPlatformModel.OperationResponseSchema>}
|
|
930
|
+
* - Success response
|
|
931
|
+
*
|
|
932
|
+
* @name deleteFulfillmentOptions
|
|
933
|
+
* @summary: Delete fulfillment options
|
|
934
|
+
* @description: Deletes fulfillment options for provided slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/deleteFulfillmentOptions/).
|
|
935
|
+
*/
|
|
936
|
+
async deleteFulfillmentOptions(
|
|
937
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
938
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
939
|
+
) {
|
|
940
|
+
const {
|
|
941
|
+
error,
|
|
942
|
+
} = ServiceabilityPlatformApplicationValidator.deleteFulfillmentOptions().validate(
|
|
943
|
+
{
|
|
944
|
+
slug,
|
|
945
|
+
},
|
|
946
|
+
{ abortEarly: false, allowUnknown: true }
|
|
947
|
+
);
|
|
948
|
+
if (error) {
|
|
949
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
// Showing warrnings if extra unknown parameters are found
|
|
953
|
+
const {
|
|
954
|
+
error: warrning,
|
|
955
|
+
} = ServiceabilityPlatformApplicationValidator.deleteFulfillmentOptions().validate(
|
|
956
|
+
{
|
|
957
|
+
slug,
|
|
958
|
+
},
|
|
959
|
+
{ abortEarly: false, allowUnknown: false }
|
|
960
|
+
);
|
|
961
|
+
if (warrning) {
|
|
962
|
+
Logger({
|
|
963
|
+
level: "WARN",
|
|
964
|
+
message: `Parameter Validation warrnings for platform > Serviceability > deleteFulfillmentOptions \n ${warrning}`,
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
const query_params = {};
|
|
969
|
+
|
|
970
|
+
const response = await PlatformAPIClient.execute(
|
|
971
|
+
this.config,
|
|
972
|
+
"delete",
|
|
973
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/${slug}`,
|
|
974
|
+
query_params,
|
|
975
|
+
undefined,
|
|
976
|
+
requestHeaders,
|
|
977
|
+
{ responseHeaders }
|
|
978
|
+
);
|
|
979
|
+
|
|
980
|
+
let responseData = response;
|
|
981
|
+
if (responseHeaders) {
|
|
982
|
+
responseData = response[0];
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
const {
|
|
986
|
+
error: res_error,
|
|
987
|
+
} = ServiceabilityPlatformModel.OperationResponseSchema().validate(
|
|
988
|
+
responseData,
|
|
989
|
+
{ abortEarly: false, allowUnknown: true }
|
|
990
|
+
);
|
|
991
|
+
|
|
992
|
+
if (res_error) {
|
|
993
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
994
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
995
|
+
} else {
|
|
996
|
+
Logger({
|
|
997
|
+
level: "WARN",
|
|
998
|
+
message: `Response Validation Warnings for platform > Serviceability > deleteFulfillmentOptions \n ${res_error}`,
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
return response;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* @param {ServiceabilityPlatformApplicationValidator.DeleteZoneParam} arg
|
|
1008
|
+
* - Arg object
|
|
1009
|
+
*
|
|
1010
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1011
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1012
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneDeleteSuccessResult>}
|
|
1013
|
+
* - Success response
|
|
1014
|
+
*
|
|
1015
|
+
* @name deleteZone
|
|
1016
|
+
* @summary: Delete a Specific Zone
|
|
1017
|
+
* @description: Delete a Zone under that application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/deleteZone/).
|
|
1018
|
+
*/
|
|
1019
|
+
async deleteZone(
|
|
1020
|
+
{ zoneId, requestHeaders } = { requestHeaders: {} },
|
|
1021
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1022
|
+
) {
|
|
1023
|
+
const {
|
|
1024
|
+
error,
|
|
1025
|
+
} = ServiceabilityPlatformApplicationValidator.deleteZone().validate(
|
|
1026
|
+
{
|
|
1027
|
+
zoneId,
|
|
1028
|
+
},
|
|
1029
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1030
|
+
);
|
|
1031
|
+
if (error) {
|
|
1032
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1036
|
+
const {
|
|
1037
|
+
error: warrning,
|
|
1038
|
+
} = ServiceabilityPlatformApplicationValidator.deleteZone().validate(
|
|
1039
|
+
{
|
|
1040
|
+
zoneId,
|
|
1041
|
+
},
|
|
1042
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1043
|
+
);
|
|
1044
|
+
if (warrning) {
|
|
1045
|
+
Logger({
|
|
1046
|
+
level: "WARN",
|
|
1047
|
+
message: `Parameter Validation warrnings for platform > Serviceability > deleteZone \n ${warrning}`,
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
const query_params = {};
|
|
1052
|
+
|
|
1053
|
+
const response = await PlatformAPIClient.execute(
|
|
1054
|
+
this.config,
|
|
1055
|
+
"delete",
|
|
1056
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/${zoneId}`,
|
|
1057
|
+
query_params,
|
|
1058
|
+
undefined,
|
|
1059
|
+
requestHeaders,
|
|
1060
|
+
{ responseHeaders }
|
|
1061
|
+
);
|
|
1062
|
+
|
|
1063
|
+
let responseData = response;
|
|
1064
|
+
if (responseHeaders) {
|
|
1065
|
+
responseData = response[0];
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
const {
|
|
1069
|
+
error: res_error,
|
|
1070
|
+
} = ServiceabilityPlatformModel.ZoneDeleteSuccessResult().validate(
|
|
1071
|
+
responseData,
|
|
1072
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1073
|
+
);
|
|
1074
|
+
|
|
1075
|
+
if (res_error) {
|
|
1076
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1077
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1078
|
+
} else {
|
|
1079
|
+
Logger({
|
|
1080
|
+
level: "WARN",
|
|
1081
|
+
message: `Response Validation Warnings for platform > Serviceability > deleteZone \n ${res_error}`,
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
return response;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* @param {ServiceabilityPlatformApplicationValidator.DownloadGeoareaSampleFileParam} arg
|
|
1091
|
+
* - Arg object
|
|
1092
|
+
*
|
|
1093
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1094
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1095
|
+
* @returns {Promise<string>} - Success response
|
|
1096
|
+
* @name downloadGeoareaSampleFile
|
|
1097
|
+
* @summary: Download geoarea sample file
|
|
1098
|
+
* @description: Download a sample file for geoarea data. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/downloadGeoareaSampleFile/).
|
|
1099
|
+
*/
|
|
1100
|
+
async downloadGeoareaSampleFile(
|
|
1101
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1102
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1103
|
+
) {
|
|
1104
|
+
const {
|
|
1105
|
+
error,
|
|
1106
|
+
} = ServiceabilityPlatformApplicationValidator.downloadGeoareaSampleFile().validate(
|
|
1107
|
+
{},
|
|
1108
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1109
|
+
);
|
|
1110
|
+
if (error) {
|
|
1111
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1115
|
+
const {
|
|
1116
|
+
error: warrning,
|
|
1117
|
+
} = ServiceabilityPlatformApplicationValidator.downloadGeoareaSampleFile().validate(
|
|
1118
|
+
{},
|
|
1119
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1120
|
+
);
|
|
1121
|
+
if (warrning) {
|
|
1122
|
+
Logger({
|
|
1123
|
+
level: "WARN",
|
|
1124
|
+
message: `Parameter Validation warrnings for platform > Serviceability > downloadGeoareaSampleFile \n ${warrning}`,
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
const query_params = {};
|
|
1129
|
+
|
|
1130
|
+
const response = await PlatformAPIClient.execute(
|
|
1131
|
+
this.config,
|
|
1132
|
+
"get",
|
|
1133
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/regions/bulk/sample`,
|
|
1134
|
+
query_params,
|
|
1135
|
+
undefined,
|
|
1136
|
+
requestHeaders,
|
|
1137
|
+
{ responseHeaders }
|
|
1138
|
+
);
|
|
1139
|
+
|
|
1140
|
+
let responseData = response;
|
|
1141
|
+
if (responseHeaders) {
|
|
1142
|
+
responseData = response[0];
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
const { error: res_error } = Joi.string()
|
|
1146
|
+
.allow("")
|
|
1147
|
+
.validate(responseData, { abortEarly: false, allowUnknown: true });
|
|
1148
|
+
|
|
1149
|
+
if (res_error) {
|
|
1150
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1151
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1152
|
+
} else {
|
|
1153
|
+
Logger({
|
|
1154
|
+
level: "WARN",
|
|
1155
|
+
message: `Response Validation Warnings for platform > Serviceability > downloadGeoareaSampleFile \n ${res_error}`,
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
return response;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* @param {ServiceabilityPlatformApplicationValidator.DownloadZoneProductsBulkSampleFileParam} arg
|
|
1165
|
+
* - Arg object
|
|
1166
|
+
*
|
|
1167
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1168
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1169
|
+
* @returns {Promise<string>} - Success response
|
|
1170
|
+
* @name downloadZoneProductsBulkSampleFile
|
|
1171
|
+
* @summary: Download zone products bulk patch sample file
|
|
1172
|
+
* @description: Downloads a CSV sample template file for bulk patching zone products. The template includes headers for zone_id, product_type, products, and action. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/downloadZoneProductsBulkSampleFile/).
|
|
1173
|
+
*/
|
|
1174
|
+
async downloadZoneProductsBulkSampleFile(
|
|
1175
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1176
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1177
|
+
) {
|
|
1178
|
+
const {
|
|
1179
|
+
error,
|
|
1180
|
+
} = ServiceabilityPlatformApplicationValidator.downloadZoneProductsBulkSampleFile().validate(
|
|
1181
|
+
{},
|
|
1182
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1183
|
+
);
|
|
1184
|
+
if (error) {
|
|
1185
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1189
|
+
const {
|
|
1190
|
+
error: warrning,
|
|
1191
|
+
} = ServiceabilityPlatformApplicationValidator.downloadZoneProductsBulkSampleFile().validate(
|
|
1192
|
+
{},
|
|
1193
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1194
|
+
);
|
|
1195
|
+
if (warrning) {
|
|
1196
|
+
Logger({
|
|
1197
|
+
level: "WARN",
|
|
1198
|
+
message: `Parameter Validation warrnings for platform > Serviceability > downloadZoneProductsBulkSampleFile \n ${warrning}`,
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
const query_params = {};
|
|
1203
|
+
|
|
1204
|
+
const response = await PlatformAPIClient.execute(
|
|
1205
|
+
this.config,
|
|
1206
|
+
"get",
|
|
1207
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/bulk/products/sample`,
|
|
1208
|
+
query_params,
|
|
1209
|
+
undefined,
|
|
1210
|
+
requestHeaders,
|
|
1211
|
+
{ responseHeaders }
|
|
1212
|
+
);
|
|
1213
|
+
|
|
1214
|
+
let responseData = response;
|
|
1215
|
+
if (responseHeaders) {
|
|
1216
|
+
responseData = response[0];
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
const { error: res_error } = Joi.string()
|
|
1220
|
+
.allow("")
|
|
1221
|
+
.validate(responseData, { abortEarly: false, allowUnknown: true });
|
|
1222
|
+
|
|
1223
|
+
if (res_error) {
|
|
1224
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1225
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1226
|
+
} else {
|
|
1227
|
+
Logger({
|
|
1228
|
+
level: "WARN",
|
|
1229
|
+
message: `Response Validation Warnings for platform > Serviceability > downloadZoneProductsBulkSampleFile \n ${res_error}`,
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
return response;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigParam} arg
|
|
1239
|
+
* - Arg object
|
|
1240
|
+
*
|
|
1241
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1242
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1243
|
+
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleConfigData>} -
|
|
1244
|
+
* Success response
|
|
1245
|
+
* @name getApplicationConfig
|
|
1246
|
+
* @summary: Get store rule configuration
|
|
1247
|
+
* @description: Retrieves information about the order routing setup for a single application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getApplicationConfig/).
|
|
1248
|
+
*/
|
|
1249
|
+
async getApplicationConfig(
|
|
1250
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1251
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1252
|
+
) {
|
|
1253
|
+
const {
|
|
1254
|
+
error,
|
|
1255
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationConfig().validate(
|
|
1256
|
+
{},
|
|
1257
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1258
|
+
);
|
|
1259
|
+
if (error) {
|
|
1260
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1264
|
+
const {
|
|
1265
|
+
error: warrning,
|
|
1266
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationConfig().validate(
|
|
1267
|
+
{},
|
|
1268
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1269
|
+
);
|
|
1270
|
+
if (warrning) {
|
|
1271
|
+
Logger({
|
|
1272
|
+
level: "WARN",
|
|
1273
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getApplicationConfig \n ${warrning}`,
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
const query_params = {};
|
|
1278
|
+
|
|
1279
|
+
const response = await PlatformAPIClient.execute(
|
|
1280
|
+
this.config,
|
|
1281
|
+
"get",
|
|
1282
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/configuration`,
|
|
1283
|
+
query_params,
|
|
1284
|
+
undefined,
|
|
1285
|
+
requestHeaders,
|
|
1286
|
+
{ responseHeaders }
|
|
1287
|
+
);
|
|
1288
|
+
|
|
1289
|
+
let responseData = response;
|
|
1290
|
+
if (responseHeaders) {
|
|
1291
|
+
responseData = response[0];
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
const {
|
|
1295
|
+
error: res_error,
|
|
1296
|
+
} = ServiceabilityPlatformModel.StoreRuleConfigData().validate(
|
|
1297
|
+
responseData,
|
|
1298
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1299
|
+
);
|
|
1300
|
+
|
|
1301
|
+
if (res_error) {
|
|
1302
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1303
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1304
|
+
} else {
|
|
1305
|
+
Logger({
|
|
1306
|
+
level: "WARN",
|
|
1307
|
+
message: `Response Validation Warnings for platform > Serviceability > getApplicationConfig \n ${res_error}`,
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
return response;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigurationParam} arg
|
|
1317
|
+
* - Arg object
|
|
1318
|
+
*
|
|
1319
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1320
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1321
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationConfigGetResult>}
|
|
1322
|
+
* - Success response
|
|
1323
|
+
*
|
|
1324
|
+
* @name getApplicationConfiguration
|
|
1325
|
+
* @summary: Get delivery configuration
|
|
1326
|
+
* @description: This API returns all the Application config that has been applied to the given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getApplicationConfiguration/).
|
|
1327
|
+
*/
|
|
1328
|
+
async getApplicationConfiguration(
|
|
1329
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1330
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1331
|
+
) {
|
|
1332
|
+
const {
|
|
1333
|
+
error,
|
|
1334
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationConfiguration().validate(
|
|
1335
|
+
{},
|
|
1336
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1337
|
+
);
|
|
1338
|
+
if (error) {
|
|
1339
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1343
|
+
const {
|
|
1344
|
+
error: warrning,
|
|
1345
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationConfiguration().validate(
|
|
1346
|
+
{},
|
|
1347
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1348
|
+
);
|
|
1349
|
+
if (warrning) {
|
|
1350
|
+
Logger({
|
|
1351
|
+
level: "WARN",
|
|
1352
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getApplicationConfiguration \n ${warrning}`,
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
const query_params = {};
|
|
1357
|
+
|
|
1358
|
+
const response = await PlatformAPIClient.execute(
|
|
1359
|
+
this.config,
|
|
1360
|
+
"get",
|
|
1361
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
1362
|
+
query_params,
|
|
1363
|
+
undefined,
|
|
1364
|
+
requestHeaders,
|
|
1365
|
+
{ responseHeaders }
|
|
1366
|
+
);
|
|
1367
|
+
|
|
1368
|
+
let responseData = response;
|
|
1369
|
+
if (responseHeaders) {
|
|
1370
|
+
responseData = response[0];
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
const {
|
|
1374
|
+
error: res_error,
|
|
1375
|
+
} = ServiceabilityPlatformModel.ApplicationConfigGetResult().validate(
|
|
1376
|
+
responseData,
|
|
1377
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1378
|
+
);
|
|
1379
|
+
|
|
1380
|
+
if (res_error) {
|
|
1381
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1382
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1383
|
+
} else {
|
|
1384
|
+
Logger({
|
|
1385
|
+
level: "WARN",
|
|
1386
|
+
message: `Response Validation Warnings for platform > Serviceability > getApplicationConfiguration \n ${res_error}`,
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
return response;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetApplicationCourierPartnersListParam} arg
|
|
1396
|
+
* - Arg object
|
|
1397
|
+
*
|
|
1398
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1399
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1400
|
+
* @returns {Promise<ServiceabilityPlatformModel.GenerateShipmentsAndCourierPartnerResult>}
|
|
1401
|
+
* - Success response
|
|
1402
|
+
*
|
|
1403
|
+
* @name getApplicationCourierPartnersList
|
|
1404
|
+
* @summary: Get available application courier partners
|
|
1405
|
+
* @description: Retrieves a list of courier partners available for shipping based on serviceability criteria, shipment details, and delivery rules. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getApplicationCourierPartnersList/).
|
|
1406
|
+
*/
|
|
1407
|
+
async getApplicationCourierPartnersList(
|
|
1408
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1409
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1410
|
+
) {
|
|
1411
|
+
const {
|
|
1412
|
+
error,
|
|
1413
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationCourierPartnersList().validate(
|
|
1414
|
+
{
|
|
1415
|
+
body,
|
|
1416
|
+
},
|
|
1417
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1418
|
+
);
|
|
1419
|
+
if (error) {
|
|
1420
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1424
|
+
const {
|
|
1425
|
+
error: warrning,
|
|
1426
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationCourierPartnersList().validate(
|
|
1427
|
+
{
|
|
1428
|
+
body,
|
|
1429
|
+
},
|
|
1430
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1431
|
+
);
|
|
1432
|
+
if (warrning) {
|
|
1433
|
+
Logger({
|
|
1434
|
+
level: "WARN",
|
|
1435
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getApplicationCourierPartnersList \n ${warrning}`,
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
const query_params = {};
|
|
1440
|
+
|
|
1441
|
+
const response = await PlatformAPIClient.execute(
|
|
1442
|
+
this.config,
|
|
1443
|
+
"post",
|
|
1444
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partners`,
|
|
1445
|
+
query_params,
|
|
1446
|
+
body,
|
|
1447
|
+
requestHeaders,
|
|
1448
|
+
{ responseHeaders }
|
|
1449
|
+
);
|
|
1450
|
+
|
|
1451
|
+
let responseData = response;
|
|
1452
|
+
if (responseHeaders) {
|
|
1453
|
+
responseData = response[0];
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
const {
|
|
1457
|
+
error: res_error,
|
|
1458
|
+
} = ServiceabilityPlatformModel.GenerateShipmentsAndCourierPartnerResult().validate(
|
|
1459
|
+
responseData,
|
|
1460
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1461
|
+
);
|
|
1462
|
+
|
|
1463
|
+
if (res_error) {
|
|
1464
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1465
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1466
|
+
} else {
|
|
1467
|
+
Logger({
|
|
1468
|
+
level: "WARN",
|
|
1469
|
+
message: `Response Validation Warnings for platform > Serviceability > getApplicationCourierPartnersList \n ${res_error}`,
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
return response;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetBulkExportParam} arg
|
|
1479
|
+
* - Arg object
|
|
1480
|
+
*
|
|
1481
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1482
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1483
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetZoneBulkExport>} -
|
|
1484
|
+
* Success response
|
|
1485
|
+
* @name getBulkExport
|
|
1486
|
+
* @summary: Get Bulk Export of Zones
|
|
1487
|
+
* @description: Get specific zone which is exported at the application level. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getBulkExport/).
|
|
1488
|
+
*/
|
|
1489
|
+
async getBulkExport(
|
|
1490
|
+
{ batchId, requestHeaders } = { requestHeaders: {} },
|
|
1491
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1492
|
+
) {
|
|
1493
|
+
const {
|
|
1494
|
+
error,
|
|
1495
|
+
} = ServiceabilityPlatformApplicationValidator.getBulkExport().validate(
|
|
1496
|
+
{
|
|
1497
|
+
batchId,
|
|
1498
|
+
},
|
|
1499
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1500
|
+
);
|
|
1501
|
+
if (error) {
|
|
1502
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1506
|
+
const {
|
|
1507
|
+
error: warrning,
|
|
1508
|
+
} = ServiceabilityPlatformApplicationValidator.getBulkExport().validate(
|
|
1509
|
+
{
|
|
1510
|
+
batchId,
|
|
1511
|
+
},
|
|
1512
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1513
|
+
);
|
|
1514
|
+
if (warrning) {
|
|
1515
|
+
Logger({
|
|
1516
|
+
level: "WARN",
|
|
1517
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkExport \n ${warrning}`,
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
const query_params = {};
|
|
1522
|
+
|
|
1523
|
+
const response = await PlatformAPIClient.execute(
|
|
1524
|
+
this.config,
|
|
1525
|
+
"get",
|
|
1526
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/bulk/export/${batchId}`,
|
|
1527
|
+
query_params,
|
|
1528
|
+
undefined,
|
|
1529
|
+
requestHeaders,
|
|
1530
|
+
{ responseHeaders }
|
|
1531
|
+
);
|
|
1532
|
+
|
|
1533
|
+
let responseData = response;
|
|
1534
|
+
if (responseHeaders) {
|
|
1535
|
+
responseData = response[0];
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
const {
|
|
1539
|
+
error: res_error,
|
|
1540
|
+
} = ServiceabilityPlatformModel.GetZoneBulkExport().validate(responseData, {
|
|
1541
|
+
abortEarly: false,
|
|
1542
|
+
allowUnknown: true,
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
if (res_error) {
|
|
1546
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1547
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1548
|
+
} else {
|
|
1549
|
+
Logger({
|
|
1550
|
+
level: "WARN",
|
|
1551
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkExport \n ${res_error}`,
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
return response;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetBulkFulfillmentValidationStatusParam} arg
|
|
1561
|
+
* - Arg object
|
|
1562
|
+
*
|
|
1563
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1564
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1565
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOptionBulkValidate>}
|
|
1566
|
+
* - Success response
|
|
1567
|
+
*
|
|
1568
|
+
* @name getBulkFulfillmentValidationStatus
|
|
1569
|
+
* @summary: Validate bulk fulfillment options.
|
|
1570
|
+
* @description: Validates a bulk list of fulfillment options for an application before processing, ensuring correctness for stores or products. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getBulkFulfillmentValidationStatus/).
|
|
1571
|
+
*/
|
|
1572
|
+
async getBulkFulfillmentValidationStatus(
|
|
1573
|
+
{ bulkId, requestHeaders } = { requestHeaders: {} },
|
|
1574
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1575
|
+
) {
|
|
1576
|
+
const {
|
|
1577
|
+
error,
|
|
1578
|
+
} = ServiceabilityPlatformApplicationValidator.getBulkFulfillmentValidationStatus().validate(
|
|
1579
|
+
{
|
|
1580
|
+
bulkId,
|
|
1581
|
+
},
|
|
1582
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1583
|
+
);
|
|
1584
|
+
if (error) {
|
|
1585
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1589
|
+
const {
|
|
1590
|
+
error: warrning,
|
|
1591
|
+
} = ServiceabilityPlatformApplicationValidator.getBulkFulfillmentValidationStatus().validate(
|
|
1592
|
+
{
|
|
1593
|
+
bulkId,
|
|
1594
|
+
},
|
|
1595
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1596
|
+
);
|
|
1597
|
+
if (warrning) {
|
|
1598
|
+
Logger({
|
|
1599
|
+
level: "WARN",
|
|
1600
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkFulfillmentValidationStatus \n ${warrning}`,
|
|
1601
|
+
});
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
const query_params = {};
|
|
1605
|
+
|
|
1606
|
+
const response = await PlatformAPIClient.execute(
|
|
1607
|
+
this.config,
|
|
1608
|
+
"get",
|
|
1609
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/poll/validate/${bulkId}`,
|
|
1610
|
+
query_params,
|
|
1611
|
+
undefined,
|
|
1612
|
+
requestHeaders,
|
|
1613
|
+
{ responseHeaders }
|
|
1614
|
+
);
|
|
1615
|
+
|
|
1616
|
+
let responseData = response;
|
|
1617
|
+
if (responseHeaders) {
|
|
1618
|
+
responseData = response[0];
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
const {
|
|
1622
|
+
error: res_error,
|
|
1623
|
+
} = ServiceabilityPlatformModel.FulfillmentOptionBulkValidate().validate(
|
|
1624
|
+
responseData,
|
|
1625
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1626
|
+
);
|
|
1627
|
+
|
|
1628
|
+
if (res_error) {
|
|
1629
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1630
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1631
|
+
} else {
|
|
1632
|
+
Logger({
|
|
1633
|
+
level: "WARN",
|
|
1634
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkFulfillmentValidationStatus \n ${res_error}`,
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
return response;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetBulkGeoAreaParam} arg
|
|
1644
|
+
* - Arg object
|
|
1645
|
+
*
|
|
1646
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1647
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1648
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkGeoAreaGetResult>} -
|
|
1649
|
+
* Success response
|
|
1650
|
+
* @name getBulkGeoArea
|
|
1651
|
+
* @summary: Get status of GeoAreas created in bulk
|
|
1652
|
+
* @description: Allows to Get GeoArea status which is created, representing groups of geographic regions in bulk. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getBulkGeoArea/).
|
|
1653
|
+
*/
|
|
1654
|
+
async getBulkGeoArea(
|
|
1655
|
+
{ geoareaId, requestHeaders } = { requestHeaders: {} },
|
|
1656
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1657
|
+
) {
|
|
1658
|
+
const {
|
|
1659
|
+
error,
|
|
1660
|
+
} = ServiceabilityPlatformApplicationValidator.getBulkGeoArea().validate(
|
|
1661
|
+
{
|
|
1662
|
+
geoareaId,
|
|
1663
|
+
},
|
|
1664
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1665
|
+
);
|
|
1666
|
+
if (error) {
|
|
1667
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1671
|
+
const {
|
|
1672
|
+
error: warrning,
|
|
1673
|
+
} = ServiceabilityPlatformApplicationValidator.getBulkGeoArea().validate(
|
|
1674
|
+
{
|
|
1675
|
+
geoareaId,
|
|
1676
|
+
},
|
|
1677
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1678
|
+
);
|
|
1679
|
+
if (warrning) {
|
|
1680
|
+
Logger({
|
|
1681
|
+
level: "WARN",
|
|
1682
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkGeoArea \n ${warrning}`,
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
const query_params = {};
|
|
1687
|
+
|
|
1688
|
+
const response = await PlatformAPIClient.execute(
|
|
1689
|
+
this.config,
|
|
1690
|
+
"get",
|
|
1691
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/regions/bulk/${geoareaId}`,
|
|
1692
|
+
query_params,
|
|
1693
|
+
undefined,
|
|
1694
|
+
requestHeaders,
|
|
1695
|
+
{ responseHeaders }
|
|
1696
|
+
);
|
|
1697
|
+
|
|
1698
|
+
let responseData = response;
|
|
1699
|
+
if (responseHeaders) {
|
|
1700
|
+
responseData = response[0];
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
const {
|
|
1704
|
+
error: res_error,
|
|
1705
|
+
} = ServiceabilityPlatformModel.BulkGeoAreaGetResult().validate(
|
|
1706
|
+
responseData,
|
|
1707
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1708
|
+
);
|
|
1709
|
+
|
|
1710
|
+
if (res_error) {
|
|
1711
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1712
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1713
|
+
} else {
|
|
1714
|
+
Logger({
|
|
1715
|
+
level: "WARN",
|
|
1716
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkGeoArea \n ${res_error}`,
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
return response;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
/**
|
|
1725
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam} arg
|
|
1726
|
+
* - Arg object
|
|
1727
|
+
*
|
|
1728
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1729
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1730
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResult>}
|
|
1731
|
+
* - Success response
|
|
1732
|
+
*
|
|
1733
|
+
* @name getCourierPartnerRule
|
|
1734
|
+
* @summary: Get courier rule
|
|
1735
|
+
* @description: Retrieves a single rule within the delivery configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartnerRule/).
|
|
1736
|
+
*/
|
|
1737
|
+
async getCourierPartnerRule(
|
|
1738
|
+
{ ruleUid, requestHeaders } = { requestHeaders: {} },
|
|
1739
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1740
|
+
) {
|
|
1741
|
+
const {
|
|
1742
|
+
error,
|
|
1743
|
+
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRule().validate(
|
|
1744
|
+
{
|
|
1745
|
+
ruleUid,
|
|
1746
|
+
},
|
|
1747
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1748
|
+
);
|
|
1749
|
+
if (error) {
|
|
1750
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1754
|
+
const {
|
|
1755
|
+
error: warrning,
|
|
1756
|
+
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRule().validate(
|
|
1757
|
+
{
|
|
1758
|
+
ruleUid,
|
|
1759
|
+
},
|
|
1760
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1761
|
+
);
|
|
1762
|
+
if (warrning) {
|
|
1763
|
+
Logger({
|
|
1764
|
+
level: "WARN",
|
|
1765
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerRule \n ${warrning}`,
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
const query_params = {};
|
|
1770
|
+
|
|
1771
|
+
const response = await PlatformAPIClient.execute(
|
|
1772
|
+
this.config,
|
|
1773
|
+
"get",
|
|
1774
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/${ruleUid}`,
|
|
1775
|
+
query_params,
|
|
1776
|
+
undefined,
|
|
1777
|
+
requestHeaders,
|
|
1778
|
+
{ responseHeaders }
|
|
1779
|
+
);
|
|
1780
|
+
|
|
1781
|
+
let responseData = response;
|
|
1782
|
+
if (responseHeaders) {
|
|
1783
|
+
responseData = response[0];
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
const {
|
|
1787
|
+
error: res_error,
|
|
1788
|
+
} = ServiceabilityPlatformModel.CourierPartnerRuleResult().validate(
|
|
1789
|
+
responseData,
|
|
1790
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1791
|
+
);
|
|
1792
|
+
|
|
1793
|
+
if (res_error) {
|
|
1794
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1795
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1796
|
+
} else {
|
|
1797
|
+
Logger({
|
|
1798
|
+
level: "WARN",
|
|
1799
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerRule \n ${res_error}`,
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
return response;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam} arg
|
|
1809
|
+
* - Arg object
|
|
1810
|
+
*
|
|
1811
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1812
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1813
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRulesListResult>}
|
|
1814
|
+
* - Success response
|
|
1815
|
+
*
|
|
1816
|
+
* @name getCourierPartnerRules
|
|
1817
|
+
* @summary: Get courier rules
|
|
1818
|
+
* @description: Retrieve a list of rules within the delivery configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartnerRules/).
|
|
1819
|
+
*/
|
|
1820
|
+
async getCourierPartnerRules(
|
|
1821
|
+
{ pageNo, pageSize, status, requestHeaders } = { requestHeaders: {} },
|
|
1822
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1823
|
+
) {
|
|
1824
|
+
const {
|
|
1825
|
+
error,
|
|
1826
|
+
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRules().validate(
|
|
1827
|
+
{
|
|
1828
|
+
pageNo,
|
|
1829
|
+
pageSize,
|
|
1830
|
+
status,
|
|
1831
|
+
},
|
|
1832
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1833
|
+
);
|
|
1834
|
+
if (error) {
|
|
1835
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1839
|
+
const {
|
|
1840
|
+
error: warrning,
|
|
1841
|
+
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRules().validate(
|
|
1842
|
+
{
|
|
1843
|
+
pageNo,
|
|
1844
|
+
pageSize,
|
|
1845
|
+
status,
|
|
1846
|
+
},
|
|
1847
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1848
|
+
);
|
|
1849
|
+
if (warrning) {
|
|
1850
|
+
Logger({
|
|
1851
|
+
level: "WARN",
|
|
1852
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerRules \n ${warrning}`,
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
const query_params = {};
|
|
1857
|
+
query_params["page_no"] = pageNo;
|
|
1858
|
+
query_params["page_size"] = pageSize;
|
|
1859
|
+
query_params["status"] = status;
|
|
1860
|
+
|
|
1861
|
+
const response = await PlatformAPIClient.execute(
|
|
1862
|
+
this.config,
|
|
1863
|
+
"get",
|
|
1864
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules`,
|
|
1865
|
+
query_params,
|
|
1866
|
+
undefined,
|
|
1867
|
+
requestHeaders,
|
|
1868
|
+
{ responseHeaders }
|
|
1869
|
+
);
|
|
1870
|
+
|
|
1871
|
+
let responseData = response;
|
|
1872
|
+
if (responseHeaders) {
|
|
1873
|
+
responseData = response[0];
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
const {
|
|
1877
|
+
error: res_error,
|
|
1878
|
+
} = ServiceabilityPlatformModel.CourierPartnerRulesListResult().validate(
|
|
1879
|
+
responseData,
|
|
1880
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1881
|
+
);
|
|
1882
|
+
|
|
1883
|
+
if (res_error) {
|
|
1884
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1885
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1886
|
+
} else {
|
|
1887
|
+
Logger({
|
|
1888
|
+
level: "WARN",
|
|
1889
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerRules \n ${res_error}`,
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
return response;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnersParam} arg
|
|
1899
|
+
* - Arg object
|
|
1900
|
+
*
|
|
1901
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1902
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1903
|
+
* @returns {Promise<ServiceabilityPlatformModel.ShipmentCourierPartnerResult>}
|
|
1904
|
+
* - Success response
|
|
1905
|
+
*
|
|
1906
|
+
* @name getCourierPartners
|
|
1907
|
+
* @summary: Serviceable Courier Partners
|
|
1908
|
+
* @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getCourierPartners/).
|
|
1909
|
+
*/
|
|
1910
|
+
async getCourierPartners(
|
|
1911
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1912
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1913
|
+
) {
|
|
1914
|
+
const {
|
|
1915
|
+
error,
|
|
1916
|
+
} = ServiceabilityPlatformApplicationValidator.getCourierPartners().validate(
|
|
1917
|
+
{
|
|
1918
|
+
body,
|
|
1919
|
+
},
|
|
1920
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1921
|
+
);
|
|
1922
|
+
if (error) {
|
|
1923
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1927
|
+
const {
|
|
1928
|
+
error: warrning,
|
|
1929
|
+
} = ServiceabilityPlatformApplicationValidator.getCourierPartners().validate(
|
|
1930
|
+
{
|
|
1931
|
+
body,
|
|
1932
|
+
},
|
|
1933
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1934
|
+
);
|
|
1935
|
+
if (warrning) {
|
|
1936
|
+
Logger({
|
|
1937
|
+
level: "WARN",
|
|
1938
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartners \n ${warrning}`,
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
const query_params = {};
|
|
1943
|
+
|
|
1944
|
+
const response = await PlatformAPIClient.execute(
|
|
1945
|
+
this.config,
|
|
1946
|
+
"post",
|
|
1947
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipment/courier-partners`,
|
|
1948
|
+
query_params,
|
|
1949
|
+
body,
|
|
1950
|
+
requestHeaders,
|
|
1951
|
+
{ responseHeaders }
|
|
1952
|
+
);
|
|
1953
|
+
|
|
1954
|
+
let responseData = response;
|
|
1955
|
+
if (responseHeaders) {
|
|
1956
|
+
responseData = response[0];
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
const {
|
|
1960
|
+
error: res_error,
|
|
1961
|
+
} = ServiceabilityPlatformModel.ShipmentCourierPartnerResult().validate(
|
|
1962
|
+
responseData,
|
|
1963
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1964
|
+
);
|
|
1965
|
+
|
|
1966
|
+
if (res_error) {
|
|
1967
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1968
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1969
|
+
} else {
|
|
1970
|
+
Logger({
|
|
1971
|
+
level: "WARN",
|
|
1972
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartners \n ${res_error}`,
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
return response;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetFulfillmentOptionProductsParam} arg
|
|
1982
|
+
* - Arg object
|
|
1983
|
+
*
|
|
1984
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1985
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1986
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOptionProducts>}
|
|
1987
|
+
* - Success response
|
|
1988
|
+
*
|
|
1989
|
+
* @name getFulfillmentOptionProducts
|
|
1990
|
+
* @summary: Get products for a specific fulfillment option.
|
|
1991
|
+
* @description: Retrieves products available for a specific fulfillment option in an application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getFulfillmentOptionProducts/).
|
|
1992
|
+
*/
|
|
1993
|
+
async getFulfillmentOptionProducts(
|
|
1994
|
+
{ slug, storeId, q, requestHeaders } = { requestHeaders: {} },
|
|
1995
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1996
|
+
) {
|
|
1997
|
+
const {
|
|
1998
|
+
error,
|
|
1999
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptionProducts().validate(
|
|
2000
|
+
{
|
|
2001
|
+
slug,
|
|
2002
|
+
storeId,
|
|
2003
|
+
q,
|
|
2004
|
+
},
|
|
2005
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2006
|
+
);
|
|
2007
|
+
if (error) {
|
|
2008
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2012
|
+
const {
|
|
2013
|
+
error: warrning,
|
|
2014
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptionProducts().validate(
|
|
2015
|
+
{
|
|
2016
|
+
slug,
|
|
2017
|
+
storeId,
|
|
2018
|
+
q,
|
|
2019
|
+
},
|
|
2020
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2021
|
+
);
|
|
2022
|
+
if (warrning) {
|
|
2023
|
+
Logger({
|
|
2024
|
+
level: "WARN",
|
|
2025
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getFulfillmentOptionProducts \n ${warrning}`,
|
|
2026
|
+
});
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
const query_params = {};
|
|
2030
|
+
query_params["q"] = q;
|
|
2031
|
+
query_params["store_id"] = storeId;
|
|
2032
|
+
|
|
2033
|
+
const response = await PlatformAPIClient.execute(
|
|
2034
|
+
this.config,
|
|
2035
|
+
"get",
|
|
2036
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/${slug}/products`,
|
|
2037
|
+
query_params,
|
|
2038
|
+
undefined,
|
|
2039
|
+
requestHeaders,
|
|
2040
|
+
{ responseHeaders }
|
|
2041
|
+
);
|
|
2042
|
+
|
|
2043
|
+
let responseData = response;
|
|
2044
|
+
if (responseHeaders) {
|
|
2045
|
+
responseData = response[0];
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
const {
|
|
2049
|
+
error: res_error,
|
|
2050
|
+
} = ServiceabilityPlatformModel.FulfillmentOptionProducts().validate(
|
|
2051
|
+
responseData,
|
|
2052
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2053
|
+
);
|
|
2054
|
+
|
|
2055
|
+
if (res_error) {
|
|
2056
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2057
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2058
|
+
} else {
|
|
2059
|
+
Logger({
|
|
2060
|
+
level: "WARN",
|
|
2061
|
+
message: `Response Validation Warnings for platform > Serviceability > getFulfillmentOptionProducts \n ${res_error}`,
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
return response;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetFulfillmentOptionStoresParam} arg
|
|
2071
|
+
* - Arg object
|
|
2072
|
+
*
|
|
2073
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2074
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2075
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOptionStores>}
|
|
2076
|
+
* - Success response
|
|
2077
|
+
*
|
|
2078
|
+
* @name getFulfillmentOptionStores
|
|
2079
|
+
* @summary: Get stores for a specific fulfillment option.
|
|
2080
|
+
* @description: Retrieves stores available for a specific fulfillment option in an application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getFulfillmentOptionStores/).
|
|
2081
|
+
*/
|
|
2082
|
+
async getFulfillmentOptionStores(
|
|
2083
|
+
{ slug, q, requestHeaders } = { requestHeaders: {} },
|
|
2084
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2085
|
+
) {
|
|
2086
|
+
const {
|
|
2087
|
+
error,
|
|
2088
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptionStores().validate(
|
|
2089
|
+
{
|
|
2090
|
+
slug,
|
|
2091
|
+
q,
|
|
2092
|
+
},
|
|
2093
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2094
|
+
);
|
|
2095
|
+
if (error) {
|
|
2096
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2100
|
+
const {
|
|
2101
|
+
error: warrning,
|
|
2102
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptionStores().validate(
|
|
2103
|
+
{
|
|
2104
|
+
slug,
|
|
2105
|
+
q,
|
|
2106
|
+
},
|
|
2107
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2108
|
+
);
|
|
2109
|
+
if (warrning) {
|
|
2110
|
+
Logger({
|
|
2111
|
+
level: "WARN",
|
|
2112
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getFulfillmentOptionStores \n ${warrning}`,
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
const query_params = {};
|
|
2117
|
+
query_params["q"] = q;
|
|
2118
|
+
|
|
2119
|
+
const response = await PlatformAPIClient.execute(
|
|
2120
|
+
this.config,
|
|
2121
|
+
"get",
|
|
2122
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/${slug}/stores`,
|
|
2123
|
+
query_params,
|
|
2124
|
+
undefined,
|
|
2125
|
+
requestHeaders,
|
|
2126
|
+
{ responseHeaders }
|
|
2127
|
+
);
|
|
2128
|
+
|
|
2129
|
+
let responseData = response;
|
|
2130
|
+
if (responseHeaders) {
|
|
2131
|
+
responseData = response[0];
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
const {
|
|
2135
|
+
error: res_error,
|
|
2136
|
+
} = ServiceabilityPlatformModel.FulfillmentOptionStores().validate(
|
|
2137
|
+
responseData,
|
|
2138
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2139
|
+
);
|
|
2140
|
+
|
|
2141
|
+
if (res_error) {
|
|
2142
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2143
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2144
|
+
} else {
|
|
2145
|
+
Logger({
|
|
2146
|
+
level: "WARN",
|
|
2147
|
+
message: `Response Validation Warnings for platform > Serviceability > getFulfillmentOptionStores \n ${res_error}`,
|
|
2148
|
+
});
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
return response;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetFulfillmentOptionsParam} arg
|
|
2157
|
+
* - Arg object
|
|
2158
|
+
*
|
|
2159
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2160
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2161
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOption>} -
|
|
2162
|
+
* Success response
|
|
2163
|
+
* @name getFulfillmentOptions
|
|
2164
|
+
* @summary: Get fulfillment options
|
|
2165
|
+
* @description: Fetches available fulfillment options for a given product and store. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getFulfillmentOptions/).
|
|
2166
|
+
*/
|
|
2167
|
+
async getFulfillmentOptions(
|
|
2168
|
+
{ slug, productId, storeId, requestHeaders } = { requestHeaders: {} },
|
|
2169
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2170
|
+
) {
|
|
2171
|
+
const {
|
|
2172
|
+
error,
|
|
2173
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptions().validate(
|
|
2174
|
+
{
|
|
2175
|
+
slug,
|
|
2176
|
+
productId,
|
|
2177
|
+
storeId,
|
|
2178
|
+
},
|
|
2179
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2180
|
+
);
|
|
2181
|
+
if (error) {
|
|
2182
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2186
|
+
const {
|
|
2187
|
+
error: warrning,
|
|
2188
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptions().validate(
|
|
2189
|
+
{
|
|
2190
|
+
slug,
|
|
2191
|
+
productId,
|
|
2192
|
+
storeId,
|
|
2193
|
+
},
|
|
2194
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2195
|
+
);
|
|
2196
|
+
if (warrning) {
|
|
2197
|
+
Logger({
|
|
2198
|
+
level: "WARN",
|
|
2199
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getFulfillmentOptions \n ${warrning}`,
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
const query_params = {};
|
|
2204
|
+
query_params["product_id"] = productId;
|
|
2205
|
+
query_params["store_id"] = storeId;
|
|
2206
|
+
|
|
2207
|
+
const response = await PlatformAPIClient.execute(
|
|
2208
|
+
this.config,
|
|
2209
|
+
"get",
|
|
2210
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/${slug}`,
|
|
2211
|
+
query_params,
|
|
2212
|
+
undefined,
|
|
2213
|
+
requestHeaders,
|
|
2214
|
+
{ responseHeaders }
|
|
2215
|
+
);
|
|
2216
|
+
|
|
2217
|
+
let responseData = response;
|
|
2218
|
+
if (responseHeaders) {
|
|
2219
|
+
responseData = response[0];
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
const {
|
|
2223
|
+
error: res_error,
|
|
2224
|
+
} = ServiceabilityPlatformModel.FulfillmentOption().validate(responseData, {
|
|
2225
|
+
abortEarly: false,
|
|
2226
|
+
allowUnknown: true,
|
|
2227
|
+
});
|
|
2228
|
+
|
|
2229
|
+
if (res_error) {
|
|
2230
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2231
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2232
|
+
} else {
|
|
2233
|
+
Logger({
|
|
2234
|
+
level: "WARN",
|
|
2235
|
+
message: `Response Validation Warnings for platform > Serviceability > getFulfillmentOptions \n ${res_error}`,
|
|
2236
|
+
});
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
return response;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
/**
|
|
2244
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetFulfillmentOptionsListParam} arg
|
|
2245
|
+
* - Arg object
|
|
2246
|
+
*
|
|
2247
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2248
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2249
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOptionsList>} -
|
|
2250
|
+
* Success response
|
|
2251
|
+
* @name getFulfillmentOptionsList
|
|
2252
|
+
* @summary: Retrieve fulfillment options with optional filters.
|
|
2253
|
+
* @description: Fetches fulfillment options for an application. Queryable by product_slug, store_id, and status. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getFulfillmentOptionsList/).
|
|
2254
|
+
*/
|
|
2255
|
+
async getFulfillmentOptionsList(
|
|
2256
|
+
{ productSlug, storeId, status, requestHeaders } = { requestHeaders: {} },
|
|
2257
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2258
|
+
) {
|
|
2259
|
+
const {
|
|
2260
|
+
error,
|
|
2261
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptionsList().validate(
|
|
2262
|
+
{
|
|
2263
|
+
productSlug,
|
|
2264
|
+
storeId,
|
|
2265
|
+
status,
|
|
2266
|
+
},
|
|
2267
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2268
|
+
);
|
|
2269
|
+
if (error) {
|
|
2270
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2274
|
+
const {
|
|
2275
|
+
error: warrning,
|
|
2276
|
+
} = ServiceabilityPlatformApplicationValidator.getFulfillmentOptionsList().validate(
|
|
2277
|
+
{
|
|
2278
|
+
productSlug,
|
|
2279
|
+
storeId,
|
|
2280
|
+
status,
|
|
2281
|
+
},
|
|
2282
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2283
|
+
);
|
|
2284
|
+
if (warrning) {
|
|
2285
|
+
Logger({
|
|
2286
|
+
level: "WARN",
|
|
2287
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getFulfillmentOptionsList \n ${warrning}`,
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
const query_params = {};
|
|
2292
|
+
query_params["product_slug"] = productSlug;
|
|
2293
|
+
query_params["store_id"] = storeId;
|
|
2294
|
+
query_params["status"] = status;
|
|
2295
|
+
|
|
2296
|
+
const response = await PlatformAPIClient.execute(
|
|
2297
|
+
this.config,
|
|
2298
|
+
"get",
|
|
2299
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options`,
|
|
2300
|
+
query_params,
|
|
2301
|
+
undefined,
|
|
2302
|
+
requestHeaders,
|
|
2303
|
+
{ responseHeaders }
|
|
2304
|
+
);
|
|
2305
|
+
|
|
2306
|
+
let responseData = response;
|
|
2307
|
+
if (responseHeaders) {
|
|
2308
|
+
responseData = response[0];
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
const {
|
|
2312
|
+
error: res_error,
|
|
2313
|
+
} = ServiceabilityPlatformModel.FulfillmentOptionsList().validate(
|
|
2314
|
+
responseData,
|
|
2315
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2316
|
+
);
|
|
2317
|
+
|
|
2318
|
+
if (res_error) {
|
|
2319
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2320
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2321
|
+
} else {
|
|
2322
|
+
Logger({
|
|
2323
|
+
level: "WARN",
|
|
2324
|
+
message: `Response Validation Warnings for platform > Serviceability > getFulfillmentOptionsList \n ${res_error}`,
|
|
2325
|
+
});
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
return response;
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
/**
|
|
2333
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetGeoAreaParam} arg
|
|
2334
|
+
* - Arg object
|
|
2335
|
+
*
|
|
2336
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2337
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2338
|
+
* @returns {Promise<ServiceabilityPlatformModel.GeoAreaDetails>} - Success response
|
|
2339
|
+
* @name getGeoArea
|
|
2340
|
+
* @summary: Get details of the specific geoarea
|
|
2341
|
+
* @description: This API Returns the data of the specific GeoArea which exists on the platform. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getGeoArea/).
|
|
2342
|
+
*/
|
|
2343
|
+
async getGeoArea(
|
|
2344
|
+
{ geoareaId, requestHeaders } = { requestHeaders: {} },
|
|
2345
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2346
|
+
) {
|
|
2347
|
+
const {
|
|
2348
|
+
error,
|
|
2349
|
+
} = ServiceabilityPlatformApplicationValidator.getGeoArea().validate(
|
|
2350
|
+
{
|
|
2351
|
+
geoareaId,
|
|
2352
|
+
},
|
|
2353
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2354
|
+
);
|
|
2355
|
+
if (error) {
|
|
2356
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2360
|
+
const {
|
|
2361
|
+
error: warrning,
|
|
2362
|
+
} = ServiceabilityPlatformApplicationValidator.getGeoArea().validate(
|
|
2363
|
+
{
|
|
2364
|
+
geoareaId,
|
|
2365
|
+
},
|
|
2366
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2367
|
+
);
|
|
2368
|
+
if (warrning) {
|
|
2369
|
+
Logger({
|
|
2370
|
+
level: "WARN",
|
|
2371
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getGeoArea \n ${warrning}`,
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
const query_params = {};
|
|
2376
|
+
|
|
2377
|
+
const response = await PlatformAPIClient.execute(
|
|
2378
|
+
this.config,
|
|
2379
|
+
"get",
|
|
2380
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/${geoareaId}`,
|
|
2381
|
+
query_params,
|
|
2382
|
+
undefined,
|
|
2383
|
+
requestHeaders,
|
|
2384
|
+
{ responseHeaders }
|
|
2385
|
+
);
|
|
2386
|
+
|
|
2387
|
+
let responseData = response;
|
|
2388
|
+
if (responseHeaders) {
|
|
2389
|
+
responseData = response[0];
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
const {
|
|
2393
|
+
error: res_error,
|
|
2394
|
+
} = ServiceabilityPlatformModel.GeoAreaDetails().validate(responseData, {
|
|
2395
|
+
abortEarly: false,
|
|
2396
|
+
allowUnknown: true,
|
|
2397
|
+
});
|
|
2398
|
+
|
|
2399
|
+
if (res_error) {
|
|
2400
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2401
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2402
|
+
} else {
|
|
2403
|
+
Logger({
|
|
2404
|
+
level: "WARN",
|
|
2405
|
+
message: `Response Validation Warnings for platform > Serviceability > getGeoArea \n ${res_error}`,
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
return response;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetGeoAreaExportJobStatusParam} arg
|
|
2415
|
+
* - Arg object
|
|
2416
|
+
*
|
|
2417
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2418
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2419
|
+
* @returns {Promise<ServiceabilityPlatformModel.GeoAreaBulkExportResult>}
|
|
2420
|
+
* - Success response
|
|
2421
|
+
*
|
|
2422
|
+
* @name getGeoAreaExportJobStatus
|
|
2423
|
+
* @summary: Get status of Geoarea export job
|
|
2424
|
+
* @description: Get the status and details of the Geoarea bulk export process. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getGeoAreaExportJobStatus/).
|
|
2425
|
+
*/
|
|
2426
|
+
async getGeoAreaExportJobStatus(
|
|
2427
|
+
{ geoareaId, requestHeaders } = { requestHeaders: {} },
|
|
2428
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2429
|
+
) {
|
|
2430
|
+
const {
|
|
2431
|
+
error,
|
|
2432
|
+
} = ServiceabilityPlatformApplicationValidator.getGeoAreaExportJobStatus().validate(
|
|
2433
|
+
{
|
|
2434
|
+
geoareaId,
|
|
2435
|
+
},
|
|
2436
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2437
|
+
);
|
|
2438
|
+
if (error) {
|
|
2439
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2443
|
+
const {
|
|
2444
|
+
error: warrning,
|
|
2445
|
+
} = ServiceabilityPlatformApplicationValidator.getGeoAreaExportJobStatus().validate(
|
|
2446
|
+
{
|
|
2447
|
+
geoareaId,
|
|
2448
|
+
},
|
|
2449
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2450
|
+
);
|
|
2451
|
+
if (warrning) {
|
|
2452
|
+
Logger({
|
|
2453
|
+
level: "WARN",
|
|
2454
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getGeoAreaExportJobStatus \n ${warrning}`,
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
const query_params = {};
|
|
2459
|
+
|
|
2460
|
+
const response = await PlatformAPIClient.execute(
|
|
2461
|
+
this.config,
|
|
2462
|
+
"get",
|
|
2463
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/bulk/export/${geoareaId}`,
|
|
2464
|
+
query_params,
|
|
2465
|
+
undefined,
|
|
2466
|
+
requestHeaders,
|
|
2467
|
+
{ responseHeaders }
|
|
2468
|
+
);
|
|
2469
|
+
|
|
2470
|
+
let responseData = response;
|
|
2471
|
+
if (responseHeaders) {
|
|
2472
|
+
responseData = response[0];
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
const {
|
|
2476
|
+
error: res_error,
|
|
2477
|
+
} = ServiceabilityPlatformModel.GeoAreaBulkExportResult().validate(
|
|
2478
|
+
responseData,
|
|
2479
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2480
|
+
);
|
|
2481
|
+
|
|
2482
|
+
if (res_error) {
|
|
2483
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2484
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2485
|
+
} else {
|
|
2486
|
+
Logger({
|
|
2487
|
+
level: "WARN",
|
|
2488
|
+
message: `Response Validation Warnings for platform > Serviceability > getGeoAreaExportJobStatus \n ${res_error}`,
|
|
2489
|
+
});
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
return response;
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
/**
|
|
2497
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetGeoAreasParam} arg
|
|
2498
|
+
* - Arg object
|
|
2499
|
+
*
|
|
2500
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2501
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2502
|
+
* @returns {Promise<ServiceabilityPlatformModel.GeoAreaGetResponseBody>} -
|
|
2503
|
+
* Success response
|
|
2504
|
+
* @name getGeoAreas
|
|
2505
|
+
* @summary: Get all geoareas in the current application
|
|
2506
|
+
* @description: Retrieves a listing view of created GeoAreas. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getGeoAreas/).
|
|
2507
|
+
*/
|
|
2508
|
+
async getGeoAreas(
|
|
2509
|
+
{
|
|
2510
|
+
pageSize,
|
|
2511
|
+
isActive,
|
|
2512
|
+
pageNo,
|
|
2513
|
+
type,
|
|
2514
|
+
q,
|
|
2515
|
+
countryIsoCode,
|
|
2516
|
+
state,
|
|
2517
|
+
city,
|
|
2518
|
+
pincode,
|
|
2519
|
+
sector,
|
|
2520
|
+
requestHeaders,
|
|
2521
|
+
} = { requestHeaders: {} },
|
|
2522
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2523
|
+
) {
|
|
2524
|
+
const {
|
|
2525
|
+
error,
|
|
2526
|
+
} = ServiceabilityPlatformApplicationValidator.getGeoAreas().validate(
|
|
2527
|
+
{
|
|
2528
|
+
pageSize,
|
|
2529
|
+
isActive,
|
|
2530
|
+
pageNo,
|
|
2531
|
+
type,
|
|
2532
|
+
q,
|
|
2533
|
+
countryIsoCode,
|
|
2534
|
+
state,
|
|
2535
|
+
city,
|
|
2536
|
+
pincode,
|
|
2537
|
+
sector,
|
|
2538
|
+
},
|
|
2539
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2540
|
+
);
|
|
2541
|
+
if (error) {
|
|
2542
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2546
|
+
const {
|
|
2547
|
+
error: warrning,
|
|
2548
|
+
} = ServiceabilityPlatformApplicationValidator.getGeoAreas().validate(
|
|
2549
|
+
{
|
|
2550
|
+
pageSize,
|
|
2551
|
+
isActive,
|
|
2552
|
+
pageNo,
|
|
2553
|
+
type,
|
|
2554
|
+
q,
|
|
2555
|
+
countryIsoCode,
|
|
2556
|
+
state,
|
|
2557
|
+
city,
|
|
2558
|
+
pincode,
|
|
2559
|
+
sector,
|
|
2560
|
+
},
|
|
2561
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2562
|
+
);
|
|
2563
|
+
if (warrning) {
|
|
2564
|
+
Logger({
|
|
2565
|
+
level: "WARN",
|
|
2566
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getGeoAreas \n ${warrning}`,
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
const query_params = {};
|
|
2571
|
+
query_params["page_size"] = pageSize;
|
|
2572
|
+
query_params["is_active"] = isActive;
|
|
2573
|
+
query_params["page_no"] = pageNo;
|
|
2574
|
+
query_params["type"] = type;
|
|
2575
|
+
query_params["q"] = q;
|
|
2576
|
+
query_params["country_iso_code"] = countryIsoCode;
|
|
2577
|
+
query_params["state"] = state;
|
|
2578
|
+
query_params["city"] = city;
|
|
2579
|
+
query_params["pincode"] = pincode;
|
|
2580
|
+
query_params["sector"] = sector;
|
|
2581
|
+
|
|
2582
|
+
const response = await PlatformAPIClient.execute(
|
|
2583
|
+
this.config,
|
|
2584
|
+
"get",
|
|
2585
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas`,
|
|
2586
|
+
query_params,
|
|
2587
|
+
undefined,
|
|
2588
|
+
requestHeaders,
|
|
2589
|
+
{ responseHeaders }
|
|
2590
|
+
);
|
|
2591
|
+
|
|
2592
|
+
let responseData = response;
|
|
2593
|
+
if (responseHeaders) {
|
|
2594
|
+
responseData = response[0];
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
const {
|
|
2598
|
+
error: res_error,
|
|
2599
|
+
} = ServiceabilityPlatformModel.GeoAreaGetResponseBody().validate(
|
|
2600
|
+
responseData,
|
|
2601
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2602
|
+
);
|
|
2603
|
+
|
|
2604
|
+
if (res_error) {
|
|
2605
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2606
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2607
|
+
} else {
|
|
2608
|
+
Logger({
|
|
2609
|
+
level: "WARN",
|
|
2610
|
+
message: `Response Validation Warnings for platform > Serviceability > getGeoAreas \n ${res_error}`,
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
return response;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetPolygonParam} arg
|
|
2620
|
+
* - Arg object
|
|
2621
|
+
*
|
|
2622
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2623
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2624
|
+
* @returns {Promise<ServiceabilityPlatformModel.StorePolygonServiceabilityGetResult>}
|
|
2625
|
+
* - Success response
|
|
2626
|
+
*
|
|
2627
|
+
* @name getPolygon
|
|
2628
|
+
* @summary: Get polygon-based serviceability for stores
|
|
2629
|
+
* @description: Retrieves polygon-based serviceability configurations for stores for quick commerce. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getPolygon/).
|
|
2630
|
+
*/
|
|
2631
|
+
async getPolygon(
|
|
2632
|
+
{ pageNumber, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2633
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2634
|
+
) {
|
|
2635
|
+
const {
|
|
2636
|
+
error,
|
|
2637
|
+
} = ServiceabilityPlatformApplicationValidator.getPolygon().validate(
|
|
2638
|
+
{
|
|
2639
|
+
pageNumber,
|
|
2640
|
+
pageSize,
|
|
2641
|
+
},
|
|
2642
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2643
|
+
);
|
|
2644
|
+
if (error) {
|
|
2645
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2649
|
+
const {
|
|
2650
|
+
error: warrning,
|
|
2651
|
+
} = ServiceabilityPlatformApplicationValidator.getPolygon().validate(
|
|
2652
|
+
{
|
|
2653
|
+
pageNumber,
|
|
2654
|
+
pageSize,
|
|
2655
|
+
},
|
|
2656
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2657
|
+
);
|
|
2658
|
+
if (warrning) {
|
|
2659
|
+
Logger({
|
|
2660
|
+
level: "WARN",
|
|
2661
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPolygon \n ${warrning}`,
|
|
2662
|
+
});
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
const query_params = {};
|
|
2666
|
+
query_params["page_number"] = pageNumber;
|
|
2667
|
+
query_params["page_size"] = pageSize;
|
|
2668
|
+
|
|
2669
|
+
const response = await PlatformAPIClient.execute(
|
|
2670
|
+
this.config,
|
|
2671
|
+
"get",
|
|
2672
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/polygon`,
|
|
2673
|
+
query_params,
|
|
2674
|
+
undefined,
|
|
2675
|
+
requestHeaders,
|
|
2676
|
+
{ responseHeaders }
|
|
2677
|
+
);
|
|
2678
|
+
|
|
2679
|
+
let responseData = response;
|
|
2680
|
+
if (responseHeaders) {
|
|
2681
|
+
responseData = response[0];
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
const {
|
|
2685
|
+
error: res_error,
|
|
2686
|
+
} = ServiceabilityPlatformModel.StorePolygonServiceabilityGetResult().validate(
|
|
2687
|
+
responseData,
|
|
2688
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2689
|
+
);
|
|
2690
|
+
|
|
2691
|
+
if (res_error) {
|
|
2692
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2693
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2694
|
+
} else {
|
|
2695
|
+
Logger({
|
|
2696
|
+
level: "WARN",
|
|
2697
|
+
message: `Response Validation Warnings for platform > Serviceability > getPolygon \n ${res_error}`,
|
|
2698
|
+
});
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
return response;
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
/**
|
|
2706
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetStoreRuleParam} arg
|
|
2707
|
+
* - Arg object
|
|
2708
|
+
*
|
|
2709
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2710
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2711
|
+
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleDataSchema>} -
|
|
2712
|
+
* Success response
|
|
2713
|
+
* @name getStoreRule
|
|
2714
|
+
* @summary: Get store rule
|
|
2715
|
+
* @description: Retrieves a single rule within the order routing rules - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getStoreRule/).
|
|
2716
|
+
*/
|
|
2717
|
+
async getStoreRule(
|
|
2718
|
+
{ ruleUid, requestHeaders } = { requestHeaders: {} },
|
|
2719
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2720
|
+
) {
|
|
2721
|
+
const {
|
|
2722
|
+
error,
|
|
2723
|
+
} = ServiceabilityPlatformApplicationValidator.getStoreRule().validate(
|
|
2724
|
+
{
|
|
2725
|
+
ruleUid,
|
|
2726
|
+
},
|
|
2727
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2728
|
+
);
|
|
2729
|
+
if (error) {
|
|
2730
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2734
|
+
const {
|
|
2735
|
+
error: warrning,
|
|
2736
|
+
} = ServiceabilityPlatformApplicationValidator.getStoreRule().validate(
|
|
2737
|
+
{
|
|
2738
|
+
ruleUid,
|
|
2739
|
+
},
|
|
2740
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2741
|
+
);
|
|
2742
|
+
if (warrning) {
|
|
2743
|
+
Logger({
|
|
2744
|
+
level: "WARN",
|
|
2745
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getStoreRule \n ${warrning}`,
|
|
2746
|
+
});
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
const query_params = {};
|
|
2750
|
+
|
|
2751
|
+
const response = await PlatformAPIClient.execute(
|
|
2752
|
+
this.config,
|
|
2753
|
+
"get",
|
|
2754
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules/${ruleUid}`,
|
|
2755
|
+
query_params,
|
|
2756
|
+
undefined,
|
|
2757
|
+
requestHeaders,
|
|
2758
|
+
{ responseHeaders }
|
|
2759
|
+
);
|
|
2760
|
+
|
|
2761
|
+
let responseData = response;
|
|
2762
|
+
if (responseHeaders) {
|
|
2763
|
+
responseData = response[0];
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
const {
|
|
2767
|
+
error: res_error,
|
|
2768
|
+
} = ServiceabilityPlatformModel.StoreRuleDataSchema().validate(
|
|
2769
|
+
responseData,
|
|
2770
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2771
|
+
);
|
|
2772
|
+
|
|
2773
|
+
if (res_error) {
|
|
2774
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2775
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2776
|
+
} else {
|
|
2777
|
+
Logger({
|
|
2778
|
+
level: "WARN",
|
|
2779
|
+
message: `Response Validation Warnings for platform > Serviceability > getStoreRule \n ${res_error}`,
|
|
2780
|
+
});
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
return response;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
/**
|
|
2788
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetStoreRulesParam} arg
|
|
2789
|
+
* - Arg object
|
|
2790
|
+
*
|
|
2791
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2792
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2793
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetStoreRulesApiResult>} -
|
|
2794
|
+
* Success response
|
|
2795
|
+
* @name getStoreRules
|
|
2796
|
+
* @summary: Get store rules
|
|
2797
|
+
* @description: Retrieves an existing order routing setup for a single application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getStoreRules/).
|
|
2798
|
+
*/
|
|
2799
|
+
async getStoreRules(
|
|
2800
|
+
{ pageNo, pageSize, status, requestHeaders } = { requestHeaders: {} },
|
|
2801
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2802
|
+
) {
|
|
2803
|
+
const {
|
|
2804
|
+
error,
|
|
2805
|
+
} = ServiceabilityPlatformApplicationValidator.getStoreRules().validate(
|
|
2806
|
+
{
|
|
2807
|
+
pageNo,
|
|
2808
|
+
pageSize,
|
|
2809
|
+
status,
|
|
2810
|
+
},
|
|
2811
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2812
|
+
);
|
|
2813
|
+
if (error) {
|
|
2814
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2818
|
+
const {
|
|
2819
|
+
error: warrning,
|
|
2820
|
+
} = ServiceabilityPlatformApplicationValidator.getStoreRules().validate(
|
|
2821
|
+
{
|
|
2822
|
+
pageNo,
|
|
2823
|
+
pageSize,
|
|
2824
|
+
status,
|
|
2825
|
+
},
|
|
2826
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2827
|
+
);
|
|
2828
|
+
if (warrning) {
|
|
2829
|
+
Logger({
|
|
2830
|
+
level: "WARN",
|
|
2831
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getStoreRules \n ${warrning}`,
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
const query_params = {};
|
|
2836
|
+
query_params["page_no"] = pageNo;
|
|
2837
|
+
query_params["page_size"] = pageSize;
|
|
2838
|
+
query_params["status"] = status;
|
|
2839
|
+
|
|
2840
|
+
const response = await PlatformAPIClient.execute(
|
|
2841
|
+
this.config,
|
|
2842
|
+
"get",
|
|
2843
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules`,
|
|
2844
|
+
query_params,
|
|
2845
|
+
undefined,
|
|
2846
|
+
requestHeaders,
|
|
2847
|
+
{ responseHeaders }
|
|
2848
|
+
);
|
|
2849
|
+
|
|
2850
|
+
let responseData = response;
|
|
2851
|
+
if (responseHeaders) {
|
|
2852
|
+
responseData = response[0];
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
const {
|
|
2856
|
+
error: res_error,
|
|
2857
|
+
} = ServiceabilityPlatformModel.GetStoreRulesApiResult().validate(
|
|
2858
|
+
responseData,
|
|
2859
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2860
|
+
);
|
|
2861
|
+
|
|
2862
|
+
if (res_error) {
|
|
2863
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2864
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2865
|
+
} else {
|
|
2866
|
+
Logger({
|
|
2867
|
+
level: "WARN",
|
|
2868
|
+
message: `Response Validation Warnings for platform > Serviceability > getStoreRules \n ${res_error}`,
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
return response;
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetZoneParam} arg - Arg object
|
|
2878
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2879
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2880
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetZoneByIdSchema>} -
|
|
2881
|
+
* Success response
|
|
2882
|
+
* @name getZone
|
|
2883
|
+
* @summary: Get zone details
|
|
2884
|
+
* @description: Retrieves a single delivery zone - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getZone/).
|
|
2885
|
+
*/
|
|
2886
|
+
async getZone(
|
|
2887
|
+
{ zoneId, requestHeaders } = { requestHeaders: {} },
|
|
2888
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2889
|
+
) {
|
|
2890
|
+
const {
|
|
2891
|
+
error,
|
|
2892
|
+
} = ServiceabilityPlatformApplicationValidator.getZone().validate(
|
|
2893
|
+
{
|
|
2894
|
+
zoneId,
|
|
2895
|
+
},
|
|
2896
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2897
|
+
);
|
|
2898
|
+
if (error) {
|
|
2899
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2903
|
+
const {
|
|
2904
|
+
error: warrning,
|
|
2905
|
+
} = ServiceabilityPlatformApplicationValidator.getZone().validate(
|
|
2906
|
+
{
|
|
2907
|
+
zoneId,
|
|
2908
|
+
},
|
|
2909
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2910
|
+
);
|
|
2911
|
+
if (warrning) {
|
|
2912
|
+
Logger({
|
|
2913
|
+
level: "WARN",
|
|
2914
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getZone \n ${warrning}`,
|
|
2915
|
+
});
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
const query_params = {};
|
|
2919
|
+
|
|
2920
|
+
const response = await PlatformAPIClient.execute(
|
|
2921
|
+
this.config,
|
|
2922
|
+
"get",
|
|
2923
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/${zoneId}`,
|
|
2924
|
+
query_params,
|
|
2925
|
+
undefined,
|
|
2926
|
+
requestHeaders,
|
|
2927
|
+
{ responseHeaders }
|
|
2928
|
+
);
|
|
2929
|
+
|
|
2930
|
+
let responseData = response;
|
|
2931
|
+
if (responseHeaders) {
|
|
2932
|
+
responseData = response[0];
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
const {
|
|
2936
|
+
error: res_error,
|
|
2937
|
+
} = ServiceabilityPlatformModel.GetZoneByIdSchema().validate(responseData, {
|
|
2938
|
+
abortEarly: false,
|
|
2939
|
+
allowUnknown: true,
|
|
2940
|
+
});
|
|
2941
|
+
|
|
2942
|
+
if (res_error) {
|
|
2943
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2944
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2945
|
+
} else {
|
|
2946
|
+
Logger({
|
|
2947
|
+
level: "WARN",
|
|
2948
|
+
message: `Response Validation Warnings for platform > Serviceability > getZone \n ${res_error}`,
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2953
|
+
return response;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
/**
|
|
2957
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetZoneProductsBulkPatchJobStatusParam} arg
|
|
2958
|
+
* - Arg object
|
|
2959
|
+
*
|
|
2960
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2961
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2962
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetZoneProductsBulkPatchResult>}
|
|
2963
|
+
* - Success response
|
|
2964
|
+
*
|
|
2965
|
+
* @name getZoneProductsBulkPatchJobStatus
|
|
2966
|
+
* @summary: Get bulk zone products patch job status
|
|
2967
|
+
* @description: Retrieves the status and details of a specific bulk zone products patch job by its batch identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getZoneProductsBulkPatchJobStatus/).
|
|
2968
|
+
*/
|
|
2969
|
+
async getZoneProductsBulkPatchJobStatus(
|
|
2970
|
+
{ batchId, requestHeaders } = { requestHeaders: {} },
|
|
2971
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2972
|
+
) {
|
|
2973
|
+
const {
|
|
2974
|
+
error,
|
|
2975
|
+
} = ServiceabilityPlatformApplicationValidator.getZoneProductsBulkPatchJobStatus().validate(
|
|
2976
|
+
{
|
|
2977
|
+
batchId,
|
|
2978
|
+
},
|
|
2979
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2980
|
+
);
|
|
2981
|
+
if (error) {
|
|
2982
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2986
|
+
const {
|
|
2987
|
+
error: warrning,
|
|
2988
|
+
} = ServiceabilityPlatformApplicationValidator.getZoneProductsBulkPatchJobStatus().validate(
|
|
2989
|
+
{
|
|
2990
|
+
batchId,
|
|
2991
|
+
},
|
|
2992
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2993
|
+
);
|
|
2994
|
+
if (warrning) {
|
|
2995
|
+
Logger({
|
|
2996
|
+
level: "WARN",
|
|
2997
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getZoneProductsBulkPatchJobStatus \n ${warrning}`,
|
|
2998
|
+
});
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
const query_params = {};
|
|
3002
|
+
|
|
3003
|
+
const response = await PlatformAPIClient.execute(
|
|
3004
|
+
this.config,
|
|
3005
|
+
"get",
|
|
3006
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/bulk/products/${batchId}`,
|
|
3007
|
+
query_params,
|
|
3008
|
+
undefined,
|
|
3009
|
+
requestHeaders,
|
|
3010
|
+
{ responseHeaders }
|
|
3011
|
+
);
|
|
3012
|
+
|
|
3013
|
+
let responseData = response;
|
|
3014
|
+
if (responseHeaders) {
|
|
3015
|
+
responseData = response[0];
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
const {
|
|
3019
|
+
error: res_error,
|
|
3020
|
+
} = ServiceabilityPlatformModel.GetZoneProductsBulkPatchResult().validate(
|
|
3021
|
+
responseData,
|
|
3022
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3023
|
+
);
|
|
3024
|
+
|
|
3025
|
+
if (res_error) {
|
|
3026
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3027
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3028
|
+
} else {
|
|
3029
|
+
Logger({
|
|
3030
|
+
level: "WARN",
|
|
3031
|
+
message: `Response Validation Warnings for platform > Serviceability > getZoneProductsBulkPatchJobStatus \n ${res_error}`,
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
return response;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
/**
|
|
3040
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetZonesParam} arg - Arg object
|
|
3041
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3042
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3043
|
+
* @returns {Promise<ServiceabilityPlatformModel.ListViewSchema>} - Success response
|
|
3044
|
+
* @name getZones
|
|
3045
|
+
* @summary: Get zones
|
|
3046
|
+
* @description: Retrieves a list of delivery zones. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/getZones/).
|
|
3047
|
+
*/
|
|
3048
|
+
async getZones(
|
|
3049
|
+
{
|
|
3050
|
+
stage,
|
|
3051
|
+
pageSize,
|
|
3052
|
+
pageNo,
|
|
3053
|
+
fulfillmentOptionSlug,
|
|
3054
|
+
isActive,
|
|
3055
|
+
q,
|
|
3056
|
+
countryIsoCode,
|
|
3057
|
+
pincode,
|
|
3058
|
+
state,
|
|
3059
|
+
city,
|
|
3060
|
+
sector,
|
|
3061
|
+
requestHeaders,
|
|
3062
|
+
} = { requestHeaders: {} },
|
|
3063
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3064
|
+
) {
|
|
3065
|
+
const {
|
|
3066
|
+
error,
|
|
3067
|
+
} = ServiceabilityPlatformApplicationValidator.getZones().validate(
|
|
3068
|
+
{
|
|
3069
|
+
stage,
|
|
3070
|
+
pageSize,
|
|
3071
|
+
pageNo,
|
|
3072
|
+
fulfillmentOptionSlug,
|
|
3073
|
+
isActive,
|
|
3074
|
+
q,
|
|
3075
|
+
countryIsoCode,
|
|
3076
|
+
pincode,
|
|
3077
|
+
state,
|
|
3078
|
+
city,
|
|
3079
|
+
sector,
|
|
3080
|
+
},
|
|
3081
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3082
|
+
);
|
|
3083
|
+
if (error) {
|
|
3084
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3088
|
+
const {
|
|
3089
|
+
error: warrning,
|
|
3090
|
+
} = ServiceabilityPlatformApplicationValidator.getZones().validate(
|
|
3091
|
+
{
|
|
3092
|
+
stage,
|
|
3093
|
+
pageSize,
|
|
3094
|
+
pageNo,
|
|
3095
|
+
fulfillmentOptionSlug,
|
|
3096
|
+
isActive,
|
|
3097
|
+
q,
|
|
3098
|
+
countryIsoCode,
|
|
3099
|
+
pincode,
|
|
3100
|
+
state,
|
|
3101
|
+
city,
|
|
3102
|
+
sector,
|
|
3103
|
+
},
|
|
3104
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3105
|
+
);
|
|
3106
|
+
if (warrning) {
|
|
3107
|
+
Logger({
|
|
3108
|
+
level: "WARN",
|
|
3109
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getZones \n ${warrning}`,
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
const query_params = {};
|
|
3114
|
+
query_params["stage"] = stage;
|
|
3115
|
+
query_params["page_size"] = pageSize;
|
|
3116
|
+
query_params["page_no"] = pageNo;
|
|
3117
|
+
query_params["fulfillment_option_slug"] = fulfillmentOptionSlug;
|
|
3118
|
+
query_params["is_active"] = isActive;
|
|
3119
|
+
query_params["q"] = q;
|
|
3120
|
+
query_params["country_iso_code"] = countryIsoCode;
|
|
3121
|
+
query_params["pincode"] = pincode;
|
|
3122
|
+
query_params["state"] = state;
|
|
3123
|
+
query_params["city"] = city;
|
|
3124
|
+
query_params["sector"] = sector;
|
|
3125
|
+
|
|
3126
|
+
const response = await PlatformAPIClient.execute(
|
|
3127
|
+
this.config,
|
|
3128
|
+
"get",
|
|
3129
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones`,
|
|
3130
|
+
query_params,
|
|
3131
|
+
undefined,
|
|
3132
|
+
requestHeaders,
|
|
3133
|
+
{ responseHeaders }
|
|
3134
|
+
);
|
|
3135
|
+
|
|
3136
|
+
let responseData = response;
|
|
3137
|
+
if (responseHeaders) {
|
|
3138
|
+
responseData = response[0];
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
const {
|
|
3142
|
+
error: res_error,
|
|
3143
|
+
} = ServiceabilityPlatformModel.ListViewSchema().validate(responseData, {
|
|
3144
|
+
abortEarly: false,
|
|
3145
|
+
allowUnknown: true,
|
|
3146
|
+
});
|
|
3147
|
+
|
|
3148
|
+
if (res_error) {
|
|
3149
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3150
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3151
|
+
} else {
|
|
3152
|
+
Logger({
|
|
3153
|
+
level: "WARN",
|
|
3154
|
+
message: `Response Validation Warnings for platform > Serviceability > getZones \n ${res_error}`,
|
|
3155
|
+
});
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
return response;
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
/**
|
|
3163
|
+
* @param {ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam} arg
|
|
3164
|
+
* - Arg object
|
|
3165
|
+
*
|
|
3166
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3167
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3168
|
+
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleConfigData>} -
|
|
3169
|
+
* Success response
|
|
3170
|
+
* @name insertApplicationConfig
|
|
3171
|
+
* @summary: Create store rule configuration
|
|
3172
|
+
* @description: Creates a order routing setup for an application, which involves updating sorting settings or rule priorities. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/insertApplicationConfig/).
|
|
3173
|
+
*/
|
|
3174
|
+
async insertApplicationConfig(
|
|
3175
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3176
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3177
|
+
) {
|
|
3178
|
+
const {
|
|
3179
|
+
error,
|
|
3180
|
+
} = ServiceabilityPlatformApplicationValidator.insertApplicationConfig().validate(
|
|
3181
|
+
{
|
|
3182
|
+
body,
|
|
3183
|
+
},
|
|
3184
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3185
|
+
);
|
|
3186
|
+
if (error) {
|
|
3187
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3191
|
+
const {
|
|
3192
|
+
error: warrning,
|
|
3193
|
+
} = ServiceabilityPlatformApplicationValidator.insertApplicationConfig().validate(
|
|
3194
|
+
{
|
|
3195
|
+
body,
|
|
3196
|
+
},
|
|
3197
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3198
|
+
);
|
|
3199
|
+
if (warrning) {
|
|
3200
|
+
Logger({
|
|
3201
|
+
level: "WARN",
|
|
3202
|
+
message: `Parameter Validation warrnings for platform > Serviceability > insertApplicationConfig \n ${warrning}`,
|
|
3203
|
+
});
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
const query_params = {};
|
|
3207
|
+
|
|
3208
|
+
const response = await PlatformAPIClient.execute(
|
|
3209
|
+
this.config,
|
|
3210
|
+
"post",
|
|
3211
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/configuration`,
|
|
3212
|
+
query_params,
|
|
3213
|
+
body,
|
|
3214
|
+
requestHeaders,
|
|
3215
|
+
{ responseHeaders }
|
|
3216
|
+
);
|
|
3217
|
+
|
|
3218
|
+
let responseData = response;
|
|
3219
|
+
if (responseHeaders) {
|
|
3220
|
+
responseData = response[0];
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
const {
|
|
3224
|
+
error: res_error,
|
|
3225
|
+
} = ServiceabilityPlatformModel.StoreRuleConfigData().validate(
|
|
3226
|
+
responseData,
|
|
3227
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3228
|
+
);
|
|
3229
|
+
|
|
3230
|
+
if (res_error) {
|
|
3231
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3232
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3233
|
+
} else {
|
|
3234
|
+
Logger({
|
|
3235
|
+
level: "WARN",
|
|
3236
|
+
message: `Response Validation Warnings for platform > Serviceability > insertApplicationConfig \n ${res_error}`,
|
|
3237
|
+
});
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
return response;
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
/**
|
|
3245
|
+
* @param {ServiceabilityPlatformApplicationValidator.PatchApplicationConfigurationParam} arg
|
|
3246
|
+
* - Arg object
|
|
3247
|
+
*
|
|
3248
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3249
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3250
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationConfigPatchResult>}
|
|
3251
|
+
* - Success response
|
|
3252
|
+
*
|
|
3253
|
+
* @name patchApplicationConfiguration
|
|
3254
|
+
* @summary: To patch any config which can be applied to application
|
|
3255
|
+
* @description: Apply configs to application. Supports patching for buybox rule config and promise config. For reference, refer to examples - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/patchApplicationConfiguration/).
|
|
3256
|
+
*/
|
|
3257
|
+
async patchApplicationConfiguration(
|
|
3258
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3259
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3260
|
+
) {
|
|
3261
|
+
const {
|
|
3262
|
+
error,
|
|
3263
|
+
} = ServiceabilityPlatformApplicationValidator.patchApplicationConfiguration().validate(
|
|
3264
|
+
{
|
|
3265
|
+
body,
|
|
3266
|
+
},
|
|
3267
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3268
|
+
);
|
|
3269
|
+
if (error) {
|
|
3270
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3274
|
+
const {
|
|
3275
|
+
error: warrning,
|
|
3276
|
+
} = ServiceabilityPlatformApplicationValidator.patchApplicationConfiguration().validate(
|
|
3277
|
+
{
|
|
3278
|
+
body,
|
|
3279
|
+
},
|
|
3280
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3281
|
+
);
|
|
3282
|
+
if (warrning) {
|
|
3283
|
+
Logger({
|
|
3284
|
+
level: "WARN",
|
|
3285
|
+
message: `Parameter Validation warrnings for platform > Serviceability > patchApplicationConfiguration \n ${warrning}`,
|
|
3286
|
+
});
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
const query_params = {};
|
|
3290
|
+
|
|
3291
|
+
const response = await PlatformAPIClient.execute(
|
|
3292
|
+
this.config,
|
|
3293
|
+
"patch",
|
|
3294
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
3295
|
+
query_params,
|
|
3296
|
+
body,
|
|
3297
|
+
requestHeaders,
|
|
3298
|
+
{ responseHeaders }
|
|
3299
|
+
);
|
|
3300
|
+
|
|
3301
|
+
let responseData = response;
|
|
3302
|
+
if (responseHeaders) {
|
|
3303
|
+
responseData = response[0];
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
const {
|
|
3307
|
+
error: res_error,
|
|
3308
|
+
} = ServiceabilityPlatformModel.ApplicationConfigPatchResult().validate(
|
|
3309
|
+
responseData,
|
|
3310
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3311
|
+
);
|
|
3312
|
+
|
|
3313
|
+
if (res_error) {
|
|
3314
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3315
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3316
|
+
} else {
|
|
3317
|
+
Logger({
|
|
3318
|
+
level: "WARN",
|
|
3319
|
+
message: `Response Validation Warnings for platform > Serviceability > patchApplicationConfiguration \n ${res_error}`,
|
|
3320
|
+
});
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
return response;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
/**
|
|
3328
|
+
* @param {ServiceabilityPlatformApplicationValidator.PutFulfillmentOptionParam} arg
|
|
3329
|
+
* - Arg object
|
|
3330
|
+
*
|
|
3331
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3332
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3333
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOption>} -
|
|
3334
|
+
* Success response
|
|
3335
|
+
* @name putFulfillmentOption
|
|
3336
|
+
* @summary: Update an existing fulfillment option
|
|
3337
|
+
* @description: Updates the details of an existing fulfillment option for the specified company and application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/putFulfillmentOption/).
|
|
3338
|
+
*/
|
|
3339
|
+
async putFulfillmentOption(
|
|
3340
|
+
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
3341
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3342
|
+
) {
|
|
3343
|
+
const {
|
|
3344
|
+
error,
|
|
3345
|
+
} = ServiceabilityPlatformApplicationValidator.putFulfillmentOption().validate(
|
|
3346
|
+
{
|
|
3347
|
+
slug,
|
|
3348
|
+
body,
|
|
3349
|
+
},
|
|
3350
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3351
|
+
);
|
|
3352
|
+
if (error) {
|
|
3353
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3357
|
+
const {
|
|
3358
|
+
error: warrning,
|
|
3359
|
+
} = ServiceabilityPlatformApplicationValidator.putFulfillmentOption().validate(
|
|
3360
|
+
{
|
|
3361
|
+
slug,
|
|
3362
|
+
body,
|
|
3363
|
+
},
|
|
3364
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3365
|
+
);
|
|
3366
|
+
if (warrning) {
|
|
3367
|
+
Logger({
|
|
3368
|
+
level: "WARN",
|
|
3369
|
+
message: `Parameter Validation warrnings for platform > Serviceability > putFulfillmentOption \n ${warrning}`,
|
|
3370
|
+
});
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
const query_params = {};
|
|
3374
|
+
|
|
3375
|
+
const response = await PlatformAPIClient.execute(
|
|
3376
|
+
this.config,
|
|
3377
|
+
"put",
|
|
3378
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/${slug}`,
|
|
3379
|
+
query_params,
|
|
3380
|
+
body,
|
|
3381
|
+
requestHeaders,
|
|
3382
|
+
{ responseHeaders }
|
|
3383
|
+
);
|
|
3384
|
+
|
|
3385
|
+
let responseData = response;
|
|
3386
|
+
if (responseHeaders) {
|
|
3387
|
+
responseData = response[0];
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
const {
|
|
3391
|
+
error: res_error,
|
|
3392
|
+
} = ServiceabilityPlatformModel.FulfillmentOption().validate(responseData, {
|
|
3393
|
+
abortEarly: false,
|
|
3394
|
+
allowUnknown: true,
|
|
3395
|
+
});
|
|
3396
|
+
|
|
3397
|
+
if (res_error) {
|
|
3398
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3399
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3400
|
+
} else {
|
|
3401
|
+
Logger({
|
|
3402
|
+
level: "WARN",
|
|
3403
|
+
message: `Response Validation Warnings for platform > Serviceability > putFulfillmentOption \n ${res_error}`,
|
|
3404
|
+
});
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3408
|
+
return response;
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
/**
|
|
3412
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateBulkGeoAreaParam} arg
|
|
3413
|
+
* - Arg object
|
|
3414
|
+
*
|
|
3415
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3416
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3417
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkGeoAreaResult>} -
|
|
3418
|
+
* Success response
|
|
3419
|
+
* @name updateBulkGeoArea
|
|
3420
|
+
* @summary: Update geoareas and their associated regions in bulk
|
|
3421
|
+
* @description: Update geoarea details and their associated regions through a CSV file in bulk. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateBulkGeoArea/).
|
|
3422
|
+
*/
|
|
3423
|
+
async updateBulkGeoArea(
|
|
3424
|
+
{ geoareaId, body, requestHeaders } = { requestHeaders: {} },
|
|
3425
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3426
|
+
) {
|
|
3427
|
+
const {
|
|
3428
|
+
error,
|
|
3429
|
+
} = ServiceabilityPlatformApplicationValidator.updateBulkGeoArea().validate(
|
|
3430
|
+
{
|
|
3431
|
+
geoareaId,
|
|
3432
|
+
body,
|
|
3433
|
+
},
|
|
3434
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3435
|
+
);
|
|
3436
|
+
if (error) {
|
|
3437
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3441
|
+
const {
|
|
3442
|
+
error: warrning,
|
|
3443
|
+
} = ServiceabilityPlatformApplicationValidator.updateBulkGeoArea().validate(
|
|
3444
|
+
{
|
|
3445
|
+
geoareaId,
|
|
3446
|
+
body,
|
|
3447
|
+
},
|
|
3448
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3449
|
+
);
|
|
3450
|
+
if (warrning) {
|
|
3451
|
+
Logger({
|
|
3452
|
+
level: "WARN",
|
|
3453
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateBulkGeoArea \n ${warrning}`,
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3457
|
+
const query_params = {};
|
|
3458
|
+
|
|
3459
|
+
const response = await PlatformAPIClient.execute(
|
|
3460
|
+
this.config,
|
|
3461
|
+
"put",
|
|
3462
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/regions/bulk/${geoareaId}`,
|
|
3463
|
+
query_params,
|
|
3464
|
+
body,
|
|
3465
|
+
requestHeaders,
|
|
3466
|
+
{ responseHeaders }
|
|
3467
|
+
);
|
|
3468
|
+
|
|
3469
|
+
let responseData = response;
|
|
3470
|
+
if (responseHeaders) {
|
|
3471
|
+
responseData = response[0];
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
const {
|
|
3475
|
+
error: res_error,
|
|
3476
|
+
} = ServiceabilityPlatformModel.BulkGeoAreaResult().validate(responseData, {
|
|
3477
|
+
abortEarly: false,
|
|
3478
|
+
allowUnknown: true,
|
|
3479
|
+
});
|
|
3480
|
+
|
|
3481
|
+
if (res_error) {
|
|
3482
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3483
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3484
|
+
} else {
|
|
3485
|
+
Logger({
|
|
3486
|
+
level: "WARN",
|
|
3487
|
+
message: `Response Validation Warnings for platform > Serviceability > updateBulkGeoArea \n ${res_error}`,
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3492
|
+
return response;
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
/**
|
|
3496
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateCourierPartnerRulePriorityParam} arg
|
|
3497
|
+
* - Arg object
|
|
3498
|
+
*
|
|
3499
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3500
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3501
|
+
* @returns {Promise<ServiceabilityPlatformModel.RulePriorityResult>} -
|
|
3502
|
+
* Success response
|
|
3503
|
+
* @name updateCourierPartnerRulePriority
|
|
3504
|
+
* @summary: Update courier partner rule priority
|
|
3505
|
+
* @description: Updates a courier partner rule priority for a single application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateCourierPartnerRulePriority/).
|
|
3506
|
+
*/
|
|
3507
|
+
async updateCourierPartnerRulePriority(
|
|
3508
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3509
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3510
|
+
) {
|
|
3511
|
+
const {
|
|
3512
|
+
error,
|
|
3513
|
+
} = ServiceabilityPlatformApplicationValidator.updateCourierPartnerRulePriority().validate(
|
|
3514
|
+
{
|
|
3515
|
+
body,
|
|
3516
|
+
},
|
|
3517
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3518
|
+
);
|
|
3519
|
+
if (error) {
|
|
3520
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3521
|
+
}
|
|
3522
|
+
|
|
3523
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3524
|
+
const {
|
|
3525
|
+
error: warrning,
|
|
3526
|
+
} = ServiceabilityPlatformApplicationValidator.updateCourierPartnerRulePriority().validate(
|
|
3527
|
+
{
|
|
3528
|
+
body,
|
|
3529
|
+
},
|
|
3530
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3531
|
+
);
|
|
3532
|
+
if (warrning) {
|
|
3533
|
+
Logger({
|
|
3534
|
+
level: "WARN",
|
|
3535
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerRulePriority \n ${warrning}`,
|
|
3536
|
+
});
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
const query_params = {};
|
|
3540
|
+
|
|
3541
|
+
const response = await PlatformAPIClient.execute(
|
|
3542
|
+
this.config,
|
|
3543
|
+
"put",
|
|
3544
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/priority`,
|
|
3545
|
+
query_params,
|
|
3546
|
+
body,
|
|
3547
|
+
requestHeaders,
|
|
3548
|
+
{ responseHeaders }
|
|
3549
|
+
);
|
|
3550
|
+
|
|
3551
|
+
let responseData = response;
|
|
3552
|
+
if (responseHeaders) {
|
|
3553
|
+
responseData = response[0];
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3556
|
+
const {
|
|
3557
|
+
error: res_error,
|
|
3558
|
+
} = ServiceabilityPlatformModel.RulePriorityResult().validate(
|
|
3559
|
+
responseData,
|
|
3560
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3561
|
+
);
|
|
3562
|
+
|
|
3563
|
+
if (res_error) {
|
|
3564
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3565
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3566
|
+
} else {
|
|
3567
|
+
Logger({
|
|
3568
|
+
level: "WARN",
|
|
3569
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerRulePriority \n ${res_error}`,
|
|
3570
|
+
});
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
|
|
3574
|
+
return response;
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
/**
|
|
3578
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam} arg
|
|
3579
|
+
* - Arg object
|
|
3580
|
+
*
|
|
3581
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3582
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3583
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResult>}
|
|
3584
|
+
* - Success response
|
|
3585
|
+
*
|
|
3586
|
+
* @name updateCourierRule
|
|
3587
|
+
* @summary: Update courier rule
|
|
3588
|
+
* @description: Updates an existing rule within the delivery configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateCourierRule/).
|
|
3589
|
+
*/
|
|
3590
|
+
async updateCourierRule(
|
|
3591
|
+
{ ruleUid, body, requestHeaders } = { requestHeaders: {} },
|
|
3592
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3593
|
+
) {
|
|
3594
|
+
const {
|
|
3595
|
+
error,
|
|
3596
|
+
} = ServiceabilityPlatformApplicationValidator.updateCourierRule().validate(
|
|
3597
|
+
{
|
|
3598
|
+
ruleUid,
|
|
3599
|
+
body,
|
|
3600
|
+
},
|
|
3601
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3602
|
+
);
|
|
3603
|
+
if (error) {
|
|
3604
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3608
|
+
const {
|
|
3609
|
+
error: warrning,
|
|
3610
|
+
} = ServiceabilityPlatformApplicationValidator.updateCourierRule().validate(
|
|
3611
|
+
{
|
|
3612
|
+
ruleUid,
|
|
3613
|
+
body,
|
|
626
3614
|
},
|
|
627
3615
|
{ abortEarly: false, allowUnknown: false }
|
|
628
3616
|
);
|
|
629
3617
|
if (warrning) {
|
|
630
3618
|
Logger({
|
|
631
3619
|
level: "WARN",
|
|
632
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
3620
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierRule \n ${warrning}`,
|
|
633
3621
|
});
|
|
634
3622
|
}
|
|
635
3623
|
|
|
@@ -637,10 +3625,10 @@ class Serviceability {
|
|
|
637
3625
|
|
|
638
3626
|
const response = await PlatformAPIClient.execute(
|
|
639
3627
|
this.config,
|
|
640
|
-
"
|
|
641
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3628
|
+
"put",
|
|
3629
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/${ruleUid}`,
|
|
642
3630
|
query_params,
|
|
643
|
-
|
|
3631
|
+
body,
|
|
644
3632
|
requestHeaders,
|
|
645
3633
|
{ responseHeaders }
|
|
646
3634
|
);
|
|
@@ -652,7 +3640,7 @@ class Serviceability {
|
|
|
652
3640
|
|
|
653
3641
|
const {
|
|
654
3642
|
error: res_error,
|
|
655
|
-
} = ServiceabilityPlatformModel.
|
|
3643
|
+
} = ServiceabilityPlatformModel.CourierPartnerRuleResult().validate(
|
|
656
3644
|
responseData,
|
|
657
3645
|
{ abortEarly: false, allowUnknown: true }
|
|
658
3646
|
);
|
|
@@ -663,7 +3651,7 @@ class Serviceability {
|
|
|
663
3651
|
} else {
|
|
664
3652
|
Logger({
|
|
665
3653
|
level: "WARN",
|
|
666
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
3654
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierRule \n ${res_error}`,
|
|
667
3655
|
});
|
|
668
3656
|
}
|
|
669
3657
|
}
|
|
@@ -672,29 +3660,28 @@ class Serviceability {
|
|
|
672
3660
|
}
|
|
673
3661
|
|
|
674
3662
|
/**
|
|
675
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
3663
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateGeoAreaParam} arg
|
|
676
3664
|
* - Arg object
|
|
677
3665
|
*
|
|
678
3666
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
679
3667
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
680
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
* @
|
|
684
|
-
* @
|
|
685
|
-
* @description: Retrieves an existing order routing setup for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRules/).
|
|
3668
|
+
* @returns {Promise<ServiceabilityPlatformModel.GeoAreaPutResponseBody>} -
|
|
3669
|
+
* Success response
|
|
3670
|
+
* @name updateGeoArea
|
|
3671
|
+
* @summary: Update the details of existing GeoArea
|
|
3672
|
+
* @description: Updates the GeoArea with a new name, regions, etc. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateGeoArea/).
|
|
686
3673
|
*/
|
|
687
|
-
async
|
|
688
|
-
{
|
|
3674
|
+
async updateGeoArea(
|
|
3675
|
+
{ geoareaId, body, requestHeaders } = { requestHeaders: {} },
|
|
689
3676
|
{ responseHeaders } = { responseHeaders: false }
|
|
690
3677
|
) {
|
|
691
3678
|
const {
|
|
692
3679
|
error,
|
|
693
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3680
|
+
} = ServiceabilityPlatformApplicationValidator.updateGeoArea().validate(
|
|
694
3681
|
{
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
3682
|
+
geoareaId,
|
|
3683
|
+
|
|
3684
|
+
body,
|
|
698
3685
|
},
|
|
699
3686
|
{ abortEarly: false, allowUnknown: true }
|
|
700
3687
|
);
|
|
@@ -705,32 +3692,29 @@ class Serviceability {
|
|
|
705
3692
|
// Showing warrnings if extra unknown parameters are found
|
|
706
3693
|
const {
|
|
707
3694
|
error: warrning,
|
|
708
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3695
|
+
} = ServiceabilityPlatformApplicationValidator.updateGeoArea().validate(
|
|
709
3696
|
{
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
3697
|
+
geoareaId,
|
|
3698
|
+
|
|
3699
|
+
body,
|
|
713
3700
|
},
|
|
714
3701
|
{ abortEarly: false, allowUnknown: false }
|
|
715
3702
|
);
|
|
716
3703
|
if (warrning) {
|
|
717
3704
|
Logger({
|
|
718
3705
|
level: "WARN",
|
|
719
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
3706
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateGeoArea \n ${warrning}`,
|
|
720
3707
|
});
|
|
721
3708
|
}
|
|
722
3709
|
|
|
723
3710
|
const query_params = {};
|
|
724
|
-
query_params["page_no"] = pageNo;
|
|
725
|
-
query_params["page_size"] = pageSize;
|
|
726
|
-
query_params["status"] = status;
|
|
727
3711
|
|
|
728
3712
|
const response = await PlatformAPIClient.execute(
|
|
729
3713
|
this.config,
|
|
730
|
-
"
|
|
731
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3714
|
+
"put",
|
|
3715
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/geoareas/${geoareaId}`,
|
|
732
3716
|
query_params,
|
|
733
|
-
|
|
3717
|
+
body,
|
|
734
3718
|
requestHeaders,
|
|
735
3719
|
{ responseHeaders }
|
|
736
3720
|
);
|
|
@@ -742,7 +3726,7 @@ class Serviceability {
|
|
|
742
3726
|
|
|
743
3727
|
const {
|
|
744
3728
|
error: res_error,
|
|
745
|
-
} = ServiceabilityPlatformModel.
|
|
3729
|
+
} = ServiceabilityPlatformModel.GeoAreaPutResponseBody().validate(
|
|
746
3730
|
responseData,
|
|
747
3731
|
{ abortEarly: false, allowUnknown: true }
|
|
748
3732
|
);
|
|
@@ -753,7 +3737,7 @@ class Serviceability {
|
|
|
753
3737
|
} else {
|
|
754
3738
|
Logger({
|
|
755
3739
|
level: "WARN",
|
|
756
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
3740
|
+
message: `Response Validation Warnings for platform > Serviceability > updateGeoArea \n ${res_error}`,
|
|
757
3741
|
});
|
|
758
3742
|
}
|
|
759
3743
|
}
|
|
@@ -762,26 +3746,29 @@ class Serviceability {
|
|
|
762
3746
|
}
|
|
763
3747
|
|
|
764
3748
|
/**
|
|
765
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
3749
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam} arg
|
|
766
3750
|
* - Arg object
|
|
767
3751
|
*
|
|
768
3752
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
769
3753
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
770
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
771
|
-
* Success response
|
|
772
|
-
*
|
|
773
|
-
* @
|
|
774
|
-
* @
|
|
3754
|
+
* @returns {Promise<ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResultData>}
|
|
3755
|
+
* - Success response
|
|
3756
|
+
*
|
|
3757
|
+
* @name updatePincodeAuditHistory
|
|
3758
|
+
* @summary: Get audit trail
|
|
3759
|
+
* @description: Retrieves the history of changes made to cash on delivery settings for pincodes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePincodeAuditHistory/).
|
|
775
3760
|
*/
|
|
776
|
-
async
|
|
777
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3761
|
+
async updatePincodeAuditHistory(
|
|
3762
|
+
{ body, pageNumber, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
778
3763
|
{ responseHeaders } = { responseHeaders: false }
|
|
779
3764
|
) {
|
|
780
3765
|
const {
|
|
781
3766
|
error,
|
|
782
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3767
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeAuditHistory().validate(
|
|
783
3768
|
{
|
|
784
3769
|
body,
|
|
3770
|
+
pageNumber,
|
|
3771
|
+
pageSize,
|
|
785
3772
|
},
|
|
786
3773
|
{ abortEarly: false, allowUnknown: true }
|
|
787
3774
|
);
|
|
@@ -792,25 +3779,29 @@ class Serviceability {
|
|
|
792
3779
|
// Showing warrnings if extra unknown parameters are found
|
|
793
3780
|
const {
|
|
794
3781
|
error: warrning,
|
|
795
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3782
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeAuditHistory().validate(
|
|
796
3783
|
{
|
|
797
3784
|
body,
|
|
3785
|
+
pageNumber,
|
|
3786
|
+
pageSize,
|
|
798
3787
|
},
|
|
799
3788
|
{ abortEarly: false, allowUnknown: false }
|
|
800
3789
|
);
|
|
801
3790
|
if (warrning) {
|
|
802
3791
|
Logger({
|
|
803
3792
|
level: "WARN",
|
|
804
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
3793
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePincodeAuditHistory \n ${warrning}`,
|
|
805
3794
|
});
|
|
806
3795
|
}
|
|
807
3796
|
|
|
808
3797
|
const query_params = {};
|
|
3798
|
+
query_params["page_number"] = pageNumber;
|
|
3799
|
+
query_params["page_size"] = pageSize;
|
|
809
3800
|
|
|
810
3801
|
const response = await PlatformAPIClient.execute(
|
|
811
3802
|
this.config,
|
|
812
3803
|
"post",
|
|
813
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3804
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/history`,
|
|
814
3805
|
query_params,
|
|
815
3806
|
body,
|
|
816
3807
|
requestHeaders,
|
|
@@ -824,7 +3815,7 @@ class Serviceability {
|
|
|
824
3815
|
|
|
825
3816
|
const {
|
|
826
3817
|
error: res_error,
|
|
827
|
-
} = ServiceabilityPlatformModel.
|
|
3818
|
+
} = ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResultData().validate(
|
|
828
3819
|
responseData,
|
|
829
3820
|
{ abortEarly: false, allowUnknown: true }
|
|
830
3821
|
);
|
|
@@ -835,7 +3826,7 @@ class Serviceability {
|
|
|
835
3826
|
} else {
|
|
836
3827
|
Logger({
|
|
837
3828
|
level: "WARN",
|
|
838
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
3829
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePincodeAuditHistory \n ${res_error}`,
|
|
839
3830
|
});
|
|
840
3831
|
}
|
|
841
3832
|
}
|
|
@@ -844,25 +3835,24 @@ class Serviceability {
|
|
|
844
3835
|
}
|
|
845
3836
|
|
|
846
3837
|
/**
|
|
847
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
3838
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeBulkViewParam} arg
|
|
848
3839
|
* - Arg object
|
|
849
3840
|
*
|
|
850
3841
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
851
3842
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
852
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
* @
|
|
856
|
-
* @
|
|
857
|
-
* @description: Updates self ship setup for an existing application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/patchApplicationServiceabilitySelfShipment/).
|
|
3843
|
+
* @returns {Promise<ServiceabilityPlatformModel.PincodeBulkViewResult>} -
|
|
3844
|
+
* Success response
|
|
3845
|
+
* @name updatePincodeBulkView
|
|
3846
|
+
* @summary: Bulk update pincode COD support
|
|
3847
|
+
* @description: Updates the cash on delivery settings for multiple specified pin codes simultaneously. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePincodeBulkView/).
|
|
858
3848
|
*/
|
|
859
|
-
async
|
|
3849
|
+
async updatePincodeBulkView(
|
|
860
3850
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
861
3851
|
{ responseHeaders } = { responseHeaders: false }
|
|
862
3852
|
) {
|
|
863
3853
|
const {
|
|
864
3854
|
error,
|
|
865
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3855
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeBulkView().validate(
|
|
866
3856
|
{
|
|
867
3857
|
body,
|
|
868
3858
|
},
|
|
@@ -875,7 +3865,7 @@ class Serviceability {
|
|
|
875
3865
|
// Showing warrnings if extra unknown parameters are found
|
|
876
3866
|
const {
|
|
877
3867
|
error: warrning,
|
|
878
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3868
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeBulkView().validate(
|
|
879
3869
|
{
|
|
880
3870
|
body,
|
|
881
3871
|
},
|
|
@@ -884,7 +3874,7 @@ class Serviceability {
|
|
|
884
3874
|
if (warrning) {
|
|
885
3875
|
Logger({
|
|
886
3876
|
level: "WARN",
|
|
887
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
3877
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePincodeBulkView \n ${warrning}`,
|
|
888
3878
|
});
|
|
889
3879
|
}
|
|
890
3880
|
|
|
@@ -892,8 +3882,8 @@ class Serviceability {
|
|
|
892
3882
|
|
|
893
3883
|
const response = await PlatformAPIClient.execute(
|
|
894
3884
|
this.config,
|
|
895
|
-
"
|
|
896
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3885
|
+
"post",
|
|
3886
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pincode-mop-bulk-update`,
|
|
897
3887
|
query_params,
|
|
898
3888
|
body,
|
|
899
3889
|
requestHeaders,
|
|
@@ -907,7 +3897,7 @@ class Serviceability {
|
|
|
907
3897
|
|
|
908
3898
|
const {
|
|
909
3899
|
error: res_error,
|
|
910
|
-
} = ServiceabilityPlatformModel.
|
|
3900
|
+
} = ServiceabilityPlatformModel.PincodeBulkViewResult().validate(
|
|
911
3901
|
responseData,
|
|
912
3902
|
{ abortEarly: false, allowUnknown: true }
|
|
913
3903
|
);
|
|
@@ -918,7 +3908,7 @@ class Serviceability {
|
|
|
918
3908
|
} else {
|
|
919
3909
|
Logger({
|
|
920
3910
|
level: "WARN",
|
|
921
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
3911
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePincodeBulkView \n ${res_error}`,
|
|
922
3912
|
});
|
|
923
3913
|
}
|
|
924
3914
|
}
|
|
@@ -927,26 +3917,29 @@ class Serviceability {
|
|
|
927
3917
|
}
|
|
928
3918
|
|
|
929
3919
|
/**
|
|
930
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
3920
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeCoDListingParam} arg
|
|
931
3921
|
* - Arg object
|
|
932
3922
|
*
|
|
933
3923
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
934
3924
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
935
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
936
|
-
* Success response
|
|
937
|
-
*
|
|
938
|
-
* @
|
|
939
|
-
* @
|
|
3925
|
+
* @returns {Promise<ServiceabilityPlatformModel.PincodeCodStatusListingResult>}
|
|
3926
|
+
* - Success response
|
|
3927
|
+
*
|
|
3928
|
+
* @name updatePincodeCoDListing
|
|
3929
|
+
* @summary: Get COD enabled pincodes
|
|
3930
|
+
* @description: Retrieves a list of pincodes along with the count based on whether cash on delivery settings. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePincodeCoDListing/).
|
|
940
3931
|
*/
|
|
941
|
-
async
|
|
942
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3932
|
+
async updatePincodeCoDListing(
|
|
3933
|
+
{ body, pageNumber, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
943
3934
|
{ responseHeaders } = { responseHeaders: false }
|
|
944
3935
|
) {
|
|
945
3936
|
const {
|
|
946
3937
|
error,
|
|
947
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3938
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeCoDListing().validate(
|
|
948
3939
|
{
|
|
949
3940
|
body,
|
|
3941
|
+
pageNumber,
|
|
3942
|
+
pageSize,
|
|
950
3943
|
},
|
|
951
3944
|
{ abortEarly: false, allowUnknown: true }
|
|
952
3945
|
);
|
|
@@ -957,25 +3950,29 @@ class Serviceability {
|
|
|
957
3950
|
// Showing warrnings if extra unknown parameters are found
|
|
958
3951
|
const {
|
|
959
3952
|
error: warrning,
|
|
960
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
3953
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeCoDListing().validate(
|
|
961
3954
|
{
|
|
962
3955
|
body,
|
|
3956
|
+
pageNumber,
|
|
3957
|
+
pageSize,
|
|
963
3958
|
},
|
|
964
3959
|
{ abortEarly: false, allowUnknown: false }
|
|
965
3960
|
);
|
|
966
3961
|
if (warrning) {
|
|
967
3962
|
Logger({
|
|
968
3963
|
level: "WARN",
|
|
969
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
3964
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePincodeCoDListing \n ${warrning}`,
|
|
970
3965
|
});
|
|
971
3966
|
}
|
|
972
3967
|
|
|
973
3968
|
const query_params = {};
|
|
3969
|
+
query_params["page_number"] = pageNumber;
|
|
3970
|
+
query_params["page_size"] = pageSize;
|
|
974
3971
|
|
|
975
3972
|
const response = await PlatformAPIClient.execute(
|
|
976
3973
|
this.config,
|
|
977
|
-
"
|
|
978
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3974
|
+
"post",
|
|
3975
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pincode-mop-data`,
|
|
979
3976
|
query_params,
|
|
980
3977
|
body,
|
|
981
3978
|
requestHeaders,
|
|
@@ -989,10 +3986,10 @@ class Serviceability {
|
|
|
989
3986
|
|
|
990
3987
|
const {
|
|
991
3988
|
error: res_error,
|
|
992
|
-
} = ServiceabilityPlatformModel.
|
|
993
|
-
|
|
994
|
-
allowUnknown: true
|
|
995
|
-
|
|
3989
|
+
} = ServiceabilityPlatformModel.PincodeCodStatusListingResult().validate(
|
|
3990
|
+
responseData,
|
|
3991
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3992
|
+
);
|
|
996
3993
|
|
|
997
3994
|
if (res_error) {
|
|
998
3995
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1000,7 +3997,7 @@ class Serviceability {
|
|
|
1000
3997
|
} else {
|
|
1001
3998
|
Logger({
|
|
1002
3999
|
level: "WARN",
|
|
1003
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4000
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePincodeCoDListing \n ${res_error}`,
|
|
1004
4001
|
});
|
|
1005
4002
|
}
|
|
1006
4003
|
}
|
|
@@ -1009,24 +4006,23 @@ class Serviceability {
|
|
|
1009
4006
|
}
|
|
1010
4007
|
|
|
1011
4008
|
/**
|
|
1012
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4009
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeMopViewParam} arg
|
|
1013
4010
|
* - Arg object
|
|
1014
4011
|
*
|
|
1015
4012
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1016
4013
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1017
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1018
|
-
*
|
|
1019
|
-
* @
|
|
1020
|
-
* @
|
|
1021
|
-
* @description: Updates a courier partner rule priority for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerRulePriority/).
|
|
4014
|
+
* @returns {Promise<ServiceabilityPlatformModel.PincodeMOPResult>} - Success response
|
|
4015
|
+
* @name updatePincodeMopView
|
|
4016
|
+
* @summary: Update pincode COD support
|
|
4017
|
+
* @description: Modify and update views related to pincode MOP (Mode of Payment). - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePincodeMopView/).
|
|
1022
4018
|
*/
|
|
1023
|
-
async
|
|
4019
|
+
async updatePincodeMopView(
|
|
1024
4020
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1025
4021
|
{ responseHeaders } = { responseHeaders: false }
|
|
1026
4022
|
) {
|
|
1027
4023
|
const {
|
|
1028
4024
|
error,
|
|
1029
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4025
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeMopView().validate(
|
|
1030
4026
|
{
|
|
1031
4027
|
body,
|
|
1032
4028
|
},
|
|
@@ -1039,7 +4035,7 @@ class Serviceability {
|
|
|
1039
4035
|
// Showing warrnings if extra unknown parameters are found
|
|
1040
4036
|
const {
|
|
1041
4037
|
error: warrning,
|
|
1042
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4038
|
+
} = ServiceabilityPlatformApplicationValidator.updatePincodeMopView().validate(
|
|
1043
4039
|
{
|
|
1044
4040
|
body,
|
|
1045
4041
|
},
|
|
@@ -1048,7 +4044,7 @@ class Serviceability {
|
|
|
1048
4044
|
if (warrning) {
|
|
1049
4045
|
Logger({
|
|
1050
4046
|
level: "WARN",
|
|
1051
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4047
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePincodeMopView \n ${warrning}`,
|
|
1052
4048
|
});
|
|
1053
4049
|
}
|
|
1054
4050
|
|
|
@@ -1056,8 +4052,8 @@ class Serviceability {
|
|
|
1056
4052
|
|
|
1057
4053
|
const response = await PlatformAPIClient.execute(
|
|
1058
4054
|
this.config,
|
|
1059
|
-
"
|
|
1060
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4055
|
+
"post",
|
|
4056
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pincode-mop-update`,
|
|
1061
4057
|
query_params,
|
|
1062
4058
|
body,
|
|
1063
4059
|
requestHeaders,
|
|
@@ -1071,10 +4067,10 @@ class Serviceability {
|
|
|
1071
4067
|
|
|
1072
4068
|
const {
|
|
1073
4069
|
error: res_error,
|
|
1074
|
-
} = ServiceabilityPlatformModel.
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
);
|
|
4070
|
+
} = ServiceabilityPlatformModel.PincodeMOPResult().validate(responseData, {
|
|
4071
|
+
abortEarly: false,
|
|
4072
|
+
allowUnknown: true,
|
|
4073
|
+
});
|
|
1078
4074
|
|
|
1079
4075
|
if (res_error) {
|
|
1080
4076
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1082,7 +4078,7 @@ class Serviceability {
|
|
|
1082
4078
|
} else {
|
|
1083
4079
|
Logger({
|
|
1084
4080
|
level: "WARN",
|
|
1085
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4081
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePincodeMopView \n ${res_error}`,
|
|
1086
4082
|
});
|
|
1087
4083
|
}
|
|
1088
4084
|
}
|
|
@@ -1091,27 +4087,26 @@ class Serviceability {
|
|
|
1091
4087
|
}
|
|
1092
4088
|
|
|
1093
4089
|
/**
|
|
1094
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4090
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdatePolygonParam} arg
|
|
1095
4091
|
* - Arg object
|
|
1096
4092
|
*
|
|
1097
4093
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1098
4094
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1099
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
4095
|
+
* @returns {Promise<ServiceabilityPlatformModel.StorePolygonServiceabilityResult>}
|
|
1100
4096
|
* - Success response
|
|
1101
4097
|
*
|
|
1102
|
-
* @name
|
|
1103
|
-
* @summary: Update
|
|
1104
|
-
* @description: Updates
|
|
4098
|
+
* @name updatePolygon
|
|
4099
|
+
* @summary: Update polygon-based serviceability for stores
|
|
4100
|
+
* @description: Updates polygon-based serviceability regions for one or more stores for quick commerce. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updatePolygon/).
|
|
1105
4101
|
*/
|
|
1106
|
-
async
|
|
1107
|
-
{
|
|
4102
|
+
async updatePolygon(
|
|
4103
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1108
4104
|
{ responseHeaders } = { responseHeaders: false }
|
|
1109
4105
|
) {
|
|
1110
4106
|
const {
|
|
1111
4107
|
error,
|
|
1112
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4108
|
+
} = ServiceabilityPlatformApplicationValidator.updatePolygon().validate(
|
|
1113
4109
|
{
|
|
1114
|
-
ruleId,
|
|
1115
4110
|
body,
|
|
1116
4111
|
},
|
|
1117
4112
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1123,9 +4118,8 @@ class Serviceability {
|
|
|
1123
4118
|
// Showing warrnings if extra unknown parameters are found
|
|
1124
4119
|
const {
|
|
1125
4120
|
error: warrning,
|
|
1126
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4121
|
+
} = ServiceabilityPlatformApplicationValidator.updatePolygon().validate(
|
|
1127
4122
|
{
|
|
1128
|
-
ruleId,
|
|
1129
4123
|
body,
|
|
1130
4124
|
},
|
|
1131
4125
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1133,7 +4127,7 @@ class Serviceability {
|
|
|
1133
4127
|
if (warrning) {
|
|
1134
4128
|
Logger({
|
|
1135
4129
|
level: "WARN",
|
|
1136
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4130
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updatePolygon \n ${warrning}`,
|
|
1137
4131
|
});
|
|
1138
4132
|
}
|
|
1139
4133
|
|
|
@@ -1141,8 +4135,8 @@ class Serviceability {
|
|
|
1141
4135
|
|
|
1142
4136
|
const response = await PlatformAPIClient.execute(
|
|
1143
4137
|
this.config,
|
|
1144
|
-
"
|
|
1145
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4138
|
+
"patch",
|
|
4139
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/polygon`,
|
|
1146
4140
|
query_params,
|
|
1147
4141
|
body,
|
|
1148
4142
|
requestHeaders,
|
|
@@ -1156,7 +4150,7 @@ class Serviceability {
|
|
|
1156
4150
|
|
|
1157
4151
|
const {
|
|
1158
4152
|
error: res_error,
|
|
1159
|
-
} = ServiceabilityPlatformModel.
|
|
4153
|
+
} = ServiceabilityPlatformModel.StorePolygonServiceabilityResult().validate(
|
|
1160
4154
|
responseData,
|
|
1161
4155
|
{ abortEarly: false, allowUnknown: true }
|
|
1162
4156
|
);
|
|
@@ -1167,7 +4161,7 @@ class Serviceability {
|
|
|
1167
4161
|
} else {
|
|
1168
4162
|
Logger({
|
|
1169
4163
|
level: "WARN",
|
|
1170
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4164
|
+
message: `Response Validation Warnings for platform > Serviceability > updatePolygon \n ${res_error}`,
|
|
1171
4165
|
});
|
|
1172
4166
|
}
|
|
1173
4167
|
}
|
|
@@ -1176,25 +4170,24 @@ class Serviceability {
|
|
|
1176
4170
|
}
|
|
1177
4171
|
|
|
1178
4172
|
/**
|
|
1179
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4173
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulePriorityParam} arg
|
|
1180
4174
|
* - Arg object
|
|
1181
4175
|
*
|
|
1182
4176
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1183
4177
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1184
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
* @
|
|
1188
|
-
* @
|
|
1189
|
-
* @description: Retrieves the history of changes made to cash on delivery settings for pincodes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeAuditHistory/).
|
|
4178
|
+
* @returns {Promise<ServiceabilityPlatformModel.RulePriorityResult>} -
|
|
4179
|
+
* Success response
|
|
4180
|
+
* @name updateStoreRulePriority
|
|
4181
|
+
* @summary: Update Store Rule priority
|
|
4182
|
+
* @description: Update Store Rule priority - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateStoreRulePriority/).
|
|
1190
4183
|
*/
|
|
1191
|
-
async
|
|
4184
|
+
async updateStoreRulePriority(
|
|
1192
4185
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1193
4186
|
{ responseHeaders } = { responseHeaders: false }
|
|
1194
4187
|
) {
|
|
1195
4188
|
const {
|
|
1196
4189
|
error,
|
|
1197
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4190
|
+
} = ServiceabilityPlatformApplicationValidator.updateStoreRulePriority().validate(
|
|
1198
4191
|
{
|
|
1199
4192
|
body,
|
|
1200
4193
|
},
|
|
@@ -1207,7 +4200,7 @@ class Serviceability {
|
|
|
1207
4200
|
// Showing warrnings if extra unknown parameters are found
|
|
1208
4201
|
const {
|
|
1209
4202
|
error: warrning,
|
|
1210
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4203
|
+
} = ServiceabilityPlatformApplicationValidator.updateStoreRulePriority().validate(
|
|
1211
4204
|
{
|
|
1212
4205
|
body,
|
|
1213
4206
|
},
|
|
@@ -1216,7 +4209,7 @@ class Serviceability {
|
|
|
1216
4209
|
if (warrning) {
|
|
1217
4210
|
Logger({
|
|
1218
4211
|
level: "WARN",
|
|
1219
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4212
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateStoreRulePriority \n ${warrning}`,
|
|
1220
4213
|
});
|
|
1221
4214
|
}
|
|
1222
4215
|
|
|
@@ -1224,8 +4217,8 @@ class Serviceability {
|
|
|
1224
4217
|
|
|
1225
4218
|
const response = await PlatformAPIClient.execute(
|
|
1226
4219
|
this.config,
|
|
1227
|
-
"
|
|
1228
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4220
|
+
"put",
|
|
4221
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules/priority`,
|
|
1229
4222
|
query_params,
|
|
1230
4223
|
body,
|
|
1231
4224
|
requestHeaders,
|
|
@@ -1239,7 +4232,7 @@ class Serviceability {
|
|
|
1239
4232
|
|
|
1240
4233
|
const {
|
|
1241
4234
|
error: res_error,
|
|
1242
|
-
} = ServiceabilityPlatformModel.
|
|
4235
|
+
} = ServiceabilityPlatformModel.RulePriorityResult().validate(
|
|
1243
4236
|
responseData,
|
|
1244
4237
|
{ abortEarly: false, allowUnknown: true }
|
|
1245
4238
|
);
|
|
@@ -1250,7 +4243,7 @@ class Serviceability {
|
|
|
1250
4243
|
} else {
|
|
1251
4244
|
Logger({
|
|
1252
4245
|
level: "WARN",
|
|
1253
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4246
|
+
message: `Response Validation Warnings for platform > Serviceability > updateStoreRulePriority \n ${res_error}`,
|
|
1254
4247
|
});
|
|
1255
4248
|
}
|
|
1256
4249
|
}
|
|
@@ -1259,26 +4252,27 @@ class Serviceability {
|
|
|
1259
4252
|
}
|
|
1260
4253
|
|
|
1261
4254
|
/**
|
|
1262
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4255
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulesParam} arg
|
|
1263
4256
|
* - Arg object
|
|
1264
4257
|
*
|
|
1265
4258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1266
4259
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1267
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
4260
|
+
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleUpdateResultSchema>}
|
|
1268
4261
|
* - Success response
|
|
1269
4262
|
*
|
|
1270
|
-
* @name
|
|
1271
|
-
* @summary:
|
|
1272
|
-
* @description: Updates
|
|
4263
|
+
* @name updateStoreRules
|
|
4264
|
+
* @summary: Update store rule
|
|
4265
|
+
* @description: Updates an existing rule within the order routing rules. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateStoreRules/).
|
|
1273
4266
|
*/
|
|
1274
|
-
async
|
|
1275
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4267
|
+
async updateStoreRules(
|
|
4268
|
+
{ ruleUid, body, requestHeaders } = { requestHeaders: {} },
|
|
1276
4269
|
{ responseHeaders } = { responseHeaders: false }
|
|
1277
4270
|
) {
|
|
1278
4271
|
const {
|
|
1279
4272
|
error,
|
|
1280
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4273
|
+
} = ServiceabilityPlatformApplicationValidator.updateStoreRules().validate(
|
|
1281
4274
|
{
|
|
4275
|
+
ruleUid,
|
|
1282
4276
|
body,
|
|
1283
4277
|
},
|
|
1284
4278
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1290,8 +4284,9 @@ class Serviceability {
|
|
|
1290
4284
|
// Showing warrnings if extra unknown parameters are found
|
|
1291
4285
|
const {
|
|
1292
4286
|
error: warrning,
|
|
1293
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4287
|
+
} = ServiceabilityPlatformApplicationValidator.updateStoreRules().validate(
|
|
1294
4288
|
{
|
|
4289
|
+
ruleUid,
|
|
1295
4290
|
body,
|
|
1296
4291
|
},
|
|
1297
4292
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1299,7 +4294,7 @@ class Serviceability {
|
|
|
1299
4294
|
if (warrning) {
|
|
1300
4295
|
Logger({
|
|
1301
4296
|
level: "WARN",
|
|
1302
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4297
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateStoreRules \n ${warrning}`,
|
|
1303
4298
|
});
|
|
1304
4299
|
}
|
|
1305
4300
|
|
|
@@ -1307,8 +4302,8 @@ class Serviceability {
|
|
|
1307
4302
|
|
|
1308
4303
|
const response = await PlatformAPIClient.execute(
|
|
1309
4304
|
this.config,
|
|
1310
|
-
"
|
|
1311
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4305
|
+
"put",
|
|
4306
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules/${ruleUid}`,
|
|
1312
4307
|
query_params,
|
|
1313
4308
|
body,
|
|
1314
4309
|
requestHeaders,
|
|
@@ -1322,7 +4317,7 @@ class Serviceability {
|
|
|
1322
4317
|
|
|
1323
4318
|
const {
|
|
1324
4319
|
error: res_error,
|
|
1325
|
-
} = ServiceabilityPlatformModel.
|
|
4320
|
+
} = ServiceabilityPlatformModel.StoreRuleUpdateResultSchema().validate(
|
|
1326
4321
|
responseData,
|
|
1327
4322
|
{ abortEarly: false, allowUnknown: true }
|
|
1328
4323
|
);
|
|
@@ -1333,7 +4328,7 @@ class Serviceability {
|
|
|
1333
4328
|
} else {
|
|
1334
4329
|
Logger({
|
|
1335
4330
|
level: "WARN",
|
|
1336
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4331
|
+
message: `Response Validation Warnings for platform > Serviceability > updateStoreRules \n ${res_error}`,
|
|
1337
4332
|
});
|
|
1338
4333
|
}
|
|
1339
4334
|
}
|
|
@@ -1342,25 +4337,24 @@ class Serviceability {
|
|
|
1342
4337
|
}
|
|
1343
4338
|
|
|
1344
4339
|
/**
|
|
1345
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4340
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulesConfigParam} arg
|
|
1346
4341
|
* - Arg object
|
|
1347
4342
|
*
|
|
1348
4343
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1349
4344
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1350
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1351
|
-
*
|
|
1352
|
-
*
|
|
1353
|
-
* @
|
|
1354
|
-
* @
|
|
1355
|
-
* @description: Retrieves a list of pincodes along with the count based on whether cash on delivery settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeCoDListing/).
|
|
4345
|
+
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleConfigData>} -
|
|
4346
|
+
* Success response
|
|
4347
|
+
* @name updateStoreRulesConfig
|
|
4348
|
+
* @summary: Update store rules configuration
|
|
4349
|
+
* @description: Updates an existing order routing setup for a single application, which involves updating sorting settings or rule priorities. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateStoreRulesConfig/).
|
|
1356
4350
|
*/
|
|
1357
|
-
async
|
|
4351
|
+
async updateStoreRulesConfig(
|
|
1358
4352
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1359
4353
|
{ responseHeaders } = { responseHeaders: false }
|
|
1360
4354
|
) {
|
|
1361
4355
|
const {
|
|
1362
4356
|
error,
|
|
1363
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4357
|
+
} = ServiceabilityPlatformApplicationValidator.updateStoreRulesConfig().validate(
|
|
1364
4358
|
{
|
|
1365
4359
|
body,
|
|
1366
4360
|
},
|
|
@@ -1373,7 +4367,7 @@ class Serviceability {
|
|
|
1373
4367
|
// Showing warrnings if extra unknown parameters are found
|
|
1374
4368
|
const {
|
|
1375
4369
|
error: warrning,
|
|
1376
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4370
|
+
} = ServiceabilityPlatformApplicationValidator.updateStoreRulesConfig().validate(
|
|
1377
4371
|
{
|
|
1378
4372
|
body,
|
|
1379
4373
|
},
|
|
@@ -1382,7 +4376,7 @@ class Serviceability {
|
|
|
1382
4376
|
if (warrning) {
|
|
1383
4377
|
Logger({
|
|
1384
4378
|
level: "WARN",
|
|
1385
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4379
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateStoreRulesConfig \n ${warrning}`,
|
|
1386
4380
|
});
|
|
1387
4381
|
}
|
|
1388
4382
|
|
|
@@ -1390,8 +4384,8 @@ class Serviceability {
|
|
|
1390
4384
|
|
|
1391
4385
|
const response = await PlatformAPIClient.execute(
|
|
1392
4386
|
this.config,
|
|
1393
|
-
"
|
|
1394
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4387
|
+
"put",
|
|
4388
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/configuration`,
|
|
1395
4389
|
query_params,
|
|
1396
4390
|
body,
|
|
1397
4391
|
requestHeaders,
|
|
@@ -1405,7 +4399,7 @@ class Serviceability {
|
|
|
1405
4399
|
|
|
1406
4400
|
const {
|
|
1407
4401
|
error: res_error,
|
|
1408
|
-
} = ServiceabilityPlatformModel.
|
|
4402
|
+
} = ServiceabilityPlatformModel.StoreRuleConfigData().validate(
|
|
1409
4403
|
responseData,
|
|
1410
4404
|
{ abortEarly: false, allowUnknown: true }
|
|
1411
4405
|
);
|
|
@@ -1416,7 +4410,7 @@ class Serviceability {
|
|
|
1416
4410
|
} else {
|
|
1417
4411
|
Logger({
|
|
1418
4412
|
level: "WARN",
|
|
1419
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4413
|
+
message: `Response Validation Warnings for platform > Serviceability > updateStoreRulesConfig \n ${res_error}`,
|
|
1420
4414
|
});
|
|
1421
4415
|
}
|
|
1422
4416
|
}
|
|
@@ -1425,25 +4419,28 @@ class Serviceability {
|
|
|
1425
4419
|
}
|
|
1426
4420
|
|
|
1427
4421
|
/**
|
|
1428
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4422
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateZoneParam} arg
|
|
1429
4423
|
* - Arg object
|
|
1430
4424
|
*
|
|
1431
4425
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1432
4426
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1433
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1434
|
-
* Success response
|
|
1435
|
-
*
|
|
1436
|
-
* @
|
|
1437
|
-
* @
|
|
4427
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneUpdateSuccessResult>}
|
|
4428
|
+
* - Success response
|
|
4429
|
+
*
|
|
4430
|
+
* @name updateZone
|
|
4431
|
+
* @summary: Update details of a Zone to enable or disable
|
|
4432
|
+
* @description: Enable or Disable a Zone under that application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateZone/).
|
|
1438
4433
|
*/
|
|
1439
|
-
async
|
|
1440
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4434
|
+
async updateZone(
|
|
4435
|
+
{ zoneId, body, requestHeaders } = { requestHeaders: {} },
|
|
1441
4436
|
{ responseHeaders } = { responseHeaders: false }
|
|
1442
4437
|
) {
|
|
1443
4438
|
const {
|
|
1444
4439
|
error,
|
|
1445
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4440
|
+
} = ServiceabilityPlatformApplicationValidator.updateZone().validate(
|
|
1446
4441
|
{
|
|
4442
|
+
zoneId,
|
|
4443
|
+
|
|
1447
4444
|
body,
|
|
1448
4445
|
},
|
|
1449
4446
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1455,8 +4452,10 @@ class Serviceability {
|
|
|
1455
4452
|
// Showing warrnings if extra unknown parameters are found
|
|
1456
4453
|
const {
|
|
1457
4454
|
error: warrning,
|
|
1458
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4455
|
+
} = ServiceabilityPlatformApplicationValidator.updateZone().validate(
|
|
1459
4456
|
{
|
|
4457
|
+
zoneId,
|
|
4458
|
+
|
|
1460
4459
|
body,
|
|
1461
4460
|
},
|
|
1462
4461
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1464,7 +4463,7 @@ class Serviceability {
|
|
|
1464
4463
|
if (warrning) {
|
|
1465
4464
|
Logger({
|
|
1466
4465
|
level: "WARN",
|
|
1467
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4466
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateZone \n ${warrning}`,
|
|
1468
4467
|
});
|
|
1469
4468
|
}
|
|
1470
4469
|
|
|
@@ -1472,8 +4471,8 @@ class Serviceability {
|
|
|
1472
4471
|
|
|
1473
4472
|
const response = await PlatformAPIClient.execute(
|
|
1474
4473
|
this.config,
|
|
1475
|
-
"
|
|
1476
|
-
`/service/platform/logistics/
|
|
4474
|
+
"patch",
|
|
4475
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/${zoneId}`,
|
|
1477
4476
|
query_params,
|
|
1478
4477
|
body,
|
|
1479
4478
|
requestHeaders,
|
|
@@ -1487,7 +4486,7 @@ class Serviceability {
|
|
|
1487
4486
|
|
|
1488
4487
|
const {
|
|
1489
4488
|
error: res_error,
|
|
1490
|
-
} = ServiceabilityPlatformModel.
|
|
4489
|
+
} = ServiceabilityPlatformModel.ZoneUpdateSuccessResult().validate(
|
|
1491
4490
|
responseData,
|
|
1492
4491
|
{ abortEarly: false, allowUnknown: true }
|
|
1493
4492
|
);
|
|
@@ -1498,7 +4497,7 @@ class Serviceability {
|
|
|
1498
4497
|
} else {
|
|
1499
4498
|
Logger({
|
|
1500
4499
|
level: "WARN",
|
|
1501
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4500
|
+
message: `Response Validation Warnings for platform > Serviceability > updateZone \n ${res_error}`,
|
|
1502
4501
|
});
|
|
1503
4502
|
}
|
|
1504
4503
|
}
|
|
@@ -1507,27 +4506,26 @@ class Serviceability {
|
|
|
1507
4506
|
}
|
|
1508
4507
|
|
|
1509
4508
|
/**
|
|
1510
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4509
|
+
* @param {ServiceabilityPlatformApplicationValidator.UploadBulkFulfillmentOptionsParam} arg
|
|
1511
4510
|
* - Arg object
|
|
1512
4511
|
*
|
|
1513
4512
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1514
4513
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1515
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
4514
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOptionBulkData>}
|
|
1516
4515
|
* - Success response
|
|
1517
4516
|
*
|
|
1518
|
-
* @name
|
|
1519
|
-
* @summary:
|
|
1520
|
-
* @description:
|
|
4517
|
+
* @name uploadBulkFulfillmentOptions
|
|
4518
|
+
* @summary: Upload bulk fulfillment options.
|
|
4519
|
+
* @description: Uploads a bulk list of fulfillment options for an application, allowing multiple fulfillment configurations to be processed at once. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/uploadBulkFulfillmentOptions/).
|
|
1521
4520
|
*/
|
|
1522
|
-
async
|
|
1523
|
-
{
|
|
4521
|
+
async uploadBulkFulfillmentOptions(
|
|
4522
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1524
4523
|
{ responseHeaders } = { responseHeaders: false }
|
|
1525
4524
|
) {
|
|
1526
4525
|
const {
|
|
1527
4526
|
error,
|
|
1528
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4527
|
+
} = ServiceabilityPlatformApplicationValidator.uploadBulkFulfillmentOptions().validate(
|
|
1529
4528
|
{
|
|
1530
|
-
ruleUid,
|
|
1531
4529
|
body,
|
|
1532
4530
|
},
|
|
1533
4531
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1539,9 +4537,8 @@ class Serviceability {
|
|
|
1539
4537
|
// Showing warrnings if extra unknown parameters are found
|
|
1540
4538
|
const {
|
|
1541
4539
|
error: warrning,
|
|
1542
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4540
|
+
} = ServiceabilityPlatformApplicationValidator.uploadBulkFulfillmentOptions().validate(
|
|
1543
4541
|
{
|
|
1544
|
-
ruleUid,
|
|
1545
4542
|
body,
|
|
1546
4543
|
},
|
|
1547
4544
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1549,7 +4546,7 @@ class Serviceability {
|
|
|
1549
4546
|
if (warrning) {
|
|
1550
4547
|
Logger({
|
|
1551
4548
|
level: "WARN",
|
|
1552
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4549
|
+
message: `Parameter Validation warrnings for platform > Serviceability > uploadBulkFulfillmentOptions \n ${warrning}`,
|
|
1553
4550
|
});
|
|
1554
4551
|
}
|
|
1555
4552
|
|
|
@@ -1557,8 +4554,8 @@ class Serviceability {
|
|
|
1557
4554
|
|
|
1558
4555
|
const response = await PlatformAPIClient.execute(
|
|
1559
4556
|
this.config,
|
|
1560
|
-
"
|
|
1561
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4557
|
+
"post",
|
|
4558
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/bulk`,
|
|
1562
4559
|
query_params,
|
|
1563
4560
|
body,
|
|
1564
4561
|
requestHeaders,
|
|
@@ -1572,7 +4569,7 @@ class Serviceability {
|
|
|
1572
4569
|
|
|
1573
4570
|
const {
|
|
1574
4571
|
error: res_error,
|
|
1575
|
-
} = ServiceabilityPlatformModel.
|
|
4572
|
+
} = ServiceabilityPlatformModel.FulfillmentOptionBulkData().validate(
|
|
1576
4573
|
responseData,
|
|
1577
4574
|
{ abortEarly: false, allowUnknown: true }
|
|
1578
4575
|
);
|
|
@@ -1583,7 +4580,7 @@ class Serviceability {
|
|
|
1583
4580
|
} else {
|
|
1584
4581
|
Logger({
|
|
1585
4582
|
level: "WARN",
|
|
1586
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4583
|
+
message: `Response Validation Warnings for platform > Serviceability > uploadBulkFulfillmentOptions \n ${res_error}`,
|
|
1587
4584
|
});
|
|
1588
4585
|
}
|
|
1589
4586
|
}
|
|
@@ -1592,25 +4589,27 @@ class Serviceability {
|
|
|
1592
4589
|
}
|
|
1593
4590
|
|
|
1594
4591
|
/**
|
|
1595
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
4592
|
+
* @param {ServiceabilityPlatformApplicationValidator.ValidateBulkFulfillmentOptionsParam} arg
|
|
1596
4593
|
* - Arg object
|
|
1597
4594
|
*
|
|
1598
4595
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1599
4596
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1600
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1601
|
-
* Success response
|
|
1602
|
-
*
|
|
1603
|
-
* @
|
|
1604
|
-
* @
|
|
4597
|
+
* @returns {Promise<ServiceabilityPlatformModel.FulfillmentOptionBulkValidateData>}
|
|
4598
|
+
* - Success response
|
|
4599
|
+
*
|
|
4600
|
+
* @name validateBulkFulfillmentOptions
|
|
4601
|
+
* @summary: Validate bulk fulfillment options.
|
|
4602
|
+
* @description: Validates a bulk list of fulfillment options for an application before processing, ensuring correctness for stores or products. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/validateBulkFulfillmentOptions/).
|
|
1605
4603
|
*/
|
|
1606
|
-
async
|
|
1607
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4604
|
+
async validateBulkFulfillmentOptions(
|
|
4605
|
+
{ type, body, requestHeaders } = { requestHeaders: {} },
|
|
1608
4606
|
{ responseHeaders } = { responseHeaders: false }
|
|
1609
4607
|
) {
|
|
1610
4608
|
const {
|
|
1611
4609
|
error,
|
|
1612
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4610
|
+
} = ServiceabilityPlatformApplicationValidator.validateBulkFulfillmentOptions().validate(
|
|
1613
4611
|
{
|
|
4612
|
+
type,
|
|
1614
4613
|
body,
|
|
1615
4614
|
},
|
|
1616
4615
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1622,8 +4621,9 @@ class Serviceability {
|
|
|
1622
4621
|
// Showing warrnings if extra unknown parameters are found
|
|
1623
4622
|
const {
|
|
1624
4623
|
error: warrning,
|
|
1625
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
4624
|
+
} = ServiceabilityPlatformApplicationValidator.validateBulkFulfillmentOptions().validate(
|
|
1626
4625
|
{
|
|
4626
|
+
type,
|
|
1627
4627
|
body,
|
|
1628
4628
|
},
|
|
1629
4629
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1631,7 +4631,7 @@ class Serviceability {
|
|
|
1631
4631
|
if (warrning) {
|
|
1632
4632
|
Logger({
|
|
1633
4633
|
level: "WARN",
|
|
1634
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
4634
|
+
message: `Parameter Validation warrnings for platform > Serviceability > validateBulkFulfillmentOptions \n ${warrning}`,
|
|
1635
4635
|
});
|
|
1636
4636
|
}
|
|
1637
4637
|
|
|
@@ -1639,8 +4639,8 @@ class Serviceability {
|
|
|
1639
4639
|
|
|
1640
4640
|
const response = await PlatformAPIClient.execute(
|
|
1641
4641
|
this.config,
|
|
1642
|
-
"
|
|
1643
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
4642
|
+
"post",
|
|
4643
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fulfillment-options/bulk/validate/${type}`,
|
|
1644
4644
|
query_params,
|
|
1645
4645
|
body,
|
|
1646
4646
|
requestHeaders,
|
|
@@ -1654,7 +4654,7 @@ class Serviceability {
|
|
|
1654
4654
|
|
|
1655
4655
|
const {
|
|
1656
4656
|
error: res_error,
|
|
1657
|
-
} = ServiceabilityPlatformModel.
|
|
4657
|
+
} = ServiceabilityPlatformModel.FulfillmentOptionBulkValidateData().validate(
|
|
1658
4658
|
responseData,
|
|
1659
4659
|
{ abortEarly: false, allowUnknown: true }
|
|
1660
4660
|
);
|
|
@@ -1665,7 +4665,7 @@ class Serviceability {
|
|
|
1665
4665
|
} else {
|
|
1666
4666
|
Logger({
|
|
1667
4667
|
level: "WARN",
|
|
1668
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
4668
|
+
message: `Response Validation Warnings for platform > Serviceability > validateBulkFulfillmentOptions \n ${res_error}`,
|
|
1669
4669
|
});
|
|
1670
4670
|
}
|
|
1671
4671
|
}
|