@gofynd/fdk-client-javascript 1.4.1 → 1.4.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +990 -1589
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +986 -1702
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -16,24 +16,23 @@ class Serviceability {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
20
|
-
* - Arg object
|
|
21
|
-
*
|
|
19
|
+
* @param {ServiceabilityPlatformApplicationValidator.AddAppDpParam} arg - Arg object
|
|
22
20
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
21
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
25
|
-
* Success response
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
* @
|
|
22
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse>}
|
|
23
|
+
* - Success response
|
|
24
|
+
*
|
|
25
|
+
* @name addAppDp
|
|
26
|
+
* @summary: Add application dp data
|
|
27
|
+
* @description: This API add application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/addAppDp/).
|
|
29
28
|
*/
|
|
30
|
-
async
|
|
29
|
+
async addAppDp(
|
|
31
30
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
32
31
|
{ responseHeaders } = { responseHeaders: false }
|
|
33
32
|
) {
|
|
34
33
|
const {
|
|
35
34
|
error,
|
|
36
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
35
|
+
} = ServiceabilityPlatformApplicationValidator.addAppDp().validate(
|
|
37
36
|
{
|
|
38
37
|
body,
|
|
39
38
|
},
|
|
@@ -46,7 +45,7 @@ class Serviceability {
|
|
|
46
45
|
// Showing warrnings if extra unknown parameters are found
|
|
47
46
|
const {
|
|
48
47
|
error: warrning,
|
|
49
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
48
|
+
} = ServiceabilityPlatformApplicationValidator.addAppDp().validate(
|
|
50
49
|
{
|
|
51
50
|
body,
|
|
52
51
|
},
|
|
@@ -55,7 +54,7 @@ class Serviceability {
|
|
|
55
54
|
if (warrning) {
|
|
56
55
|
Logger({
|
|
57
56
|
level: "WARN",
|
|
58
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
57
|
+
message: `Parameter Validation warrnings for platform > Serviceability > addAppDp \n ${warrning}`,
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
60
|
|
|
@@ -64,7 +63,7 @@ class Serviceability {
|
|
|
64
63
|
const response = await PlatformAPIClient.execute(
|
|
65
64
|
this.config,
|
|
66
65
|
"post",
|
|
67
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}
|
|
66
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
68
67
|
query_params,
|
|
69
68
|
body,
|
|
70
69
|
requestHeaders,
|
|
@@ -78,7 +77,7 @@ class Serviceability {
|
|
|
78
77
|
|
|
79
78
|
const {
|
|
80
79
|
error: res_error,
|
|
81
|
-
} = ServiceabilityPlatformModel.
|
|
80
|
+
} = ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse().validate(
|
|
82
81
|
responseData,
|
|
83
82
|
{ abortEarly: false, allowUnknown: true }
|
|
84
83
|
);
|
|
@@ -89,7 +88,7 @@ class Serviceability {
|
|
|
89
88
|
} else {
|
|
90
89
|
Logger({
|
|
91
90
|
level: "WARN",
|
|
92
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
91
|
+
message: `Response Validation Warnings for platform > Serviceability > addAppDp \n ${res_error}`,
|
|
93
92
|
});
|
|
94
93
|
}
|
|
95
94
|
}
|
|
@@ -98,27 +97,27 @@ class Serviceability {
|
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
100
|
+
* @param {ServiceabilityPlatformApplicationValidator.DeleteAppDpParam} arg
|
|
102
101
|
* - Arg object
|
|
103
102
|
*
|
|
104
103
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
105
104
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
106
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
105
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse>}
|
|
107
106
|
* - Success response
|
|
108
107
|
*
|
|
109
|
-
* @name
|
|
110
|
-
* @summary:
|
|
111
|
-
* @description:
|
|
108
|
+
* @name deleteAppDp
|
|
109
|
+
* @summary: Delete application dp data
|
|
110
|
+
* @description: This API remove application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/deleteAppDp/).
|
|
112
111
|
*/
|
|
113
|
-
async
|
|
114
|
-
{
|
|
112
|
+
async deleteAppDp(
|
|
113
|
+
{ courierPartnerId, requestHeaders } = { requestHeaders: {} },
|
|
115
114
|
{ responseHeaders } = { responseHeaders: false }
|
|
116
115
|
) {
|
|
117
116
|
const {
|
|
118
117
|
error,
|
|
119
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
118
|
+
} = ServiceabilityPlatformApplicationValidator.deleteAppDp().validate(
|
|
120
119
|
{
|
|
121
|
-
|
|
120
|
+
courierPartnerId,
|
|
122
121
|
},
|
|
123
122
|
{ abortEarly: false, allowUnknown: true }
|
|
124
123
|
);
|
|
@@ -129,16 +128,16 @@ class Serviceability {
|
|
|
129
128
|
// Showing warrnings if extra unknown parameters are found
|
|
130
129
|
const {
|
|
131
130
|
error: warrning,
|
|
132
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
131
|
+
} = ServiceabilityPlatformApplicationValidator.deleteAppDp().validate(
|
|
133
132
|
{
|
|
134
|
-
|
|
133
|
+
courierPartnerId,
|
|
135
134
|
},
|
|
136
135
|
{ abortEarly: false, allowUnknown: false }
|
|
137
136
|
);
|
|
138
137
|
if (warrning) {
|
|
139
138
|
Logger({
|
|
140
139
|
level: "WARN",
|
|
141
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
140
|
+
message: `Parameter Validation warrnings for platform > Serviceability > deleteAppDp \n ${warrning}`,
|
|
142
141
|
});
|
|
143
142
|
}
|
|
144
143
|
|
|
@@ -146,10 +145,10 @@ class Serviceability {
|
|
|
146
145
|
|
|
147
146
|
const response = await PlatformAPIClient.execute(
|
|
148
147
|
this.config,
|
|
149
|
-
"
|
|
150
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
148
|
+
"delete",
|
|
149
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/${courierPartnerId}`,
|
|
151
150
|
query_params,
|
|
152
|
-
|
|
151
|
+
undefined,
|
|
153
152
|
requestHeaders,
|
|
154
153
|
{ responseHeaders }
|
|
155
154
|
);
|
|
@@ -161,7 +160,7 @@ class Serviceability {
|
|
|
161
160
|
|
|
162
161
|
const {
|
|
163
162
|
error: res_error,
|
|
164
|
-
} = ServiceabilityPlatformModel.
|
|
163
|
+
} = ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse().validate(
|
|
165
164
|
responseData,
|
|
166
165
|
{ abortEarly: false, allowUnknown: true }
|
|
167
166
|
);
|
|
@@ -172,7 +171,7 @@ class Serviceability {
|
|
|
172
171
|
} else {
|
|
173
172
|
Logger({
|
|
174
173
|
level: "WARN",
|
|
175
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
174
|
+
message: `Response Validation Warnings for platform > Serviceability > deleteAppDp \n ${res_error}`,
|
|
176
175
|
});
|
|
177
176
|
}
|
|
178
177
|
}
|
|
@@ -181,24 +180,25 @@ class Serviceability {
|
|
|
181
180
|
}
|
|
182
181
|
|
|
183
182
|
/**
|
|
184
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
183
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetApplicationServiceabilityParam} arg
|
|
185
184
|
* - Arg object
|
|
186
185
|
*
|
|
187
186
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
188
187
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
189
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
190
|
-
* Success response
|
|
191
|
-
*
|
|
192
|
-
* @
|
|
193
|
-
* @
|
|
188
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse>}
|
|
189
|
+
* - Success response
|
|
190
|
+
*
|
|
191
|
+
* @name getApplicationServiceability
|
|
192
|
+
* @summary: Zone configuration of application.
|
|
193
|
+
* @description: This API returns serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceability/).
|
|
194
194
|
*/
|
|
195
|
-
async
|
|
195
|
+
async getApplicationServiceability(
|
|
196
196
|
{ requestHeaders } = { requestHeaders: {} },
|
|
197
197
|
{ responseHeaders } = { responseHeaders: false }
|
|
198
198
|
) {
|
|
199
199
|
const {
|
|
200
200
|
error,
|
|
201
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
201
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationServiceability().validate(
|
|
202
202
|
{},
|
|
203
203
|
{ abortEarly: false, allowUnknown: true }
|
|
204
204
|
);
|
|
@@ -209,14 +209,14 @@ class Serviceability {
|
|
|
209
209
|
// Showing warrnings if extra unknown parameters are found
|
|
210
210
|
const {
|
|
211
211
|
error: warrning,
|
|
212
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
212
|
+
} = ServiceabilityPlatformApplicationValidator.getApplicationServiceability().validate(
|
|
213
213
|
{},
|
|
214
214
|
{ abortEarly: false, allowUnknown: false }
|
|
215
215
|
);
|
|
216
216
|
if (warrning) {
|
|
217
217
|
Logger({
|
|
218
218
|
level: "WARN",
|
|
219
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
219
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getApplicationServiceability \n ${warrning}`,
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -225,7 +225,7 @@ class Serviceability {
|
|
|
225
225
|
const response = await PlatformAPIClient.execute(
|
|
226
226
|
this.config,
|
|
227
227
|
"get",
|
|
228
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
228
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/serviceability`,
|
|
229
229
|
query_params,
|
|
230
230
|
undefined,
|
|
231
231
|
requestHeaders,
|
|
@@ -239,7 +239,7 @@ class Serviceability {
|
|
|
239
239
|
|
|
240
240
|
const {
|
|
241
241
|
error: res_error,
|
|
242
|
-
} = ServiceabilityPlatformModel.
|
|
242
|
+
} = ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse().validate(
|
|
243
243
|
responseData,
|
|
244
244
|
{ abortEarly: false, allowUnknown: true }
|
|
245
245
|
);
|
|
@@ -250,7 +250,7 @@ class Serviceability {
|
|
|
250
250
|
} else {
|
|
251
251
|
Logger({
|
|
252
252
|
level: "WARN",
|
|
253
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
253
|
+
message: `Response Validation Warnings for platform > Serviceability > getApplicationServiceability \n ${res_error}`,
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
}
|
|
@@ -259,24 +259,25 @@ class Serviceability {
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
/**
|
|
262
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
262
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetDpApplicationRulesParam} arg
|
|
263
263
|
* - Arg object
|
|
264
264
|
*
|
|
265
265
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
266
266
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
267
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
268
|
-
* Success response
|
|
269
|
-
*
|
|
270
|
-
* @
|
|
271
|
-
* @
|
|
267
|
+
* @returns {Promise<ServiceabilityPlatformModel.DPApplicationRuleResponse>}
|
|
268
|
+
* - Success response
|
|
269
|
+
*
|
|
270
|
+
* @name getDpApplicationRules
|
|
271
|
+
* @summary: Get All DpApplicationRules rules added at application level from database.
|
|
272
|
+
* @description: This API returns response of all rules of DpApplicationRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpApplicationRules/).
|
|
272
273
|
*/
|
|
273
|
-
async
|
|
274
|
+
async getDpApplicationRules(
|
|
274
275
|
{ requestHeaders } = { requestHeaders: {} },
|
|
275
276
|
{ responseHeaders } = { responseHeaders: false }
|
|
276
277
|
) {
|
|
277
278
|
const {
|
|
278
279
|
error,
|
|
279
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
280
|
+
} = ServiceabilityPlatformApplicationValidator.getDpApplicationRules().validate(
|
|
280
281
|
{},
|
|
281
282
|
{ abortEarly: false, allowUnknown: true }
|
|
282
283
|
);
|
|
@@ -287,14 +288,14 @@ class Serviceability {
|
|
|
287
288
|
// Showing warrnings if extra unknown parameters are found
|
|
288
289
|
const {
|
|
289
290
|
error: warrning,
|
|
290
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
291
|
+
} = ServiceabilityPlatformApplicationValidator.getDpApplicationRules().validate(
|
|
291
292
|
{},
|
|
292
293
|
{ abortEarly: false, allowUnknown: false }
|
|
293
294
|
);
|
|
294
295
|
if (warrning) {
|
|
295
296
|
Logger({
|
|
296
297
|
level: "WARN",
|
|
297
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
298
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getDpApplicationRules \n ${warrning}`,
|
|
298
299
|
});
|
|
299
300
|
}
|
|
300
301
|
|
|
@@ -303,7 +304,7 @@ class Serviceability {
|
|
|
303
304
|
const response = await PlatformAPIClient.execute(
|
|
304
305
|
this.config,
|
|
305
306
|
"get",
|
|
306
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
307
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier/priority`,
|
|
307
308
|
query_params,
|
|
308
309
|
undefined,
|
|
309
310
|
requestHeaders,
|
|
@@ -317,10 +318,10 @@ class Serviceability {
|
|
|
317
318
|
|
|
318
319
|
const {
|
|
319
320
|
error: res_error,
|
|
320
|
-
} = ServiceabilityPlatformModel.
|
|
321
|
-
|
|
322
|
-
allowUnknown: true
|
|
323
|
-
|
|
321
|
+
} = ServiceabilityPlatformModel.DPApplicationRuleResponse().validate(
|
|
322
|
+
responseData,
|
|
323
|
+
{ abortEarly: false, allowUnknown: true }
|
|
324
|
+
);
|
|
324
325
|
|
|
325
326
|
if (res_error) {
|
|
326
327
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -328,7 +329,7 @@ class Serviceability {
|
|
|
328
329
|
} else {
|
|
329
330
|
Logger({
|
|
330
331
|
level: "WARN",
|
|
331
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
332
|
+
message: `Response Validation Warnings for platform > Serviceability > getDpApplicationRules \n ${res_error}`,
|
|
332
333
|
});
|
|
333
334
|
}
|
|
334
335
|
}
|
|
@@ -337,7 +338,7 @@ class Serviceability {
|
|
|
337
338
|
}
|
|
338
339
|
|
|
339
340
|
/**
|
|
340
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
341
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetSelfShipParam} arg
|
|
341
342
|
* - Arg object
|
|
342
343
|
*
|
|
343
344
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -345,17 +346,17 @@ class Serviceability {
|
|
|
345
346
|
* @returns {Promise<ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse>}
|
|
346
347
|
* - Success response
|
|
347
348
|
*
|
|
348
|
-
* @name
|
|
349
|
+
* @name getSelfShip
|
|
349
350
|
* @summary: Self-ship configuration of application.
|
|
350
|
-
* @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/
|
|
351
|
+
* @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getSelfShip/).
|
|
351
352
|
*/
|
|
352
|
-
async
|
|
353
|
+
async getSelfShip(
|
|
353
354
|
{ requestHeaders } = { requestHeaders: {} },
|
|
354
355
|
{ responseHeaders } = { responseHeaders: false }
|
|
355
356
|
) {
|
|
356
357
|
const {
|
|
357
358
|
error,
|
|
358
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
359
|
+
} = ServiceabilityPlatformApplicationValidator.getSelfShip().validate(
|
|
359
360
|
{},
|
|
360
361
|
{ abortEarly: false, allowUnknown: true }
|
|
361
362
|
);
|
|
@@ -366,14 +367,14 @@ class Serviceability {
|
|
|
366
367
|
// Showing warrnings if extra unknown parameters are found
|
|
367
368
|
const {
|
|
368
369
|
error: warrning,
|
|
369
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
370
|
+
} = ServiceabilityPlatformApplicationValidator.getSelfShip().validate(
|
|
370
371
|
{},
|
|
371
372
|
{ abortEarly: false, allowUnknown: false }
|
|
372
373
|
);
|
|
373
374
|
if (warrning) {
|
|
374
375
|
Logger({
|
|
375
376
|
level: "WARN",
|
|
376
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
377
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSelfShip \n ${warrning}`,
|
|
377
378
|
});
|
|
378
379
|
}
|
|
379
380
|
|
|
@@ -407,7 +408,7 @@ class Serviceability {
|
|
|
407
408
|
} else {
|
|
408
409
|
Logger({
|
|
409
410
|
level: "WARN",
|
|
410
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
411
|
+
message: `Response Validation Warnings for platform > Serviceability > getSelfShip \n ${res_error}`,
|
|
411
412
|
});
|
|
412
413
|
}
|
|
413
414
|
}
|
|
@@ -416,198 +417,27 @@ class Serviceability {
|
|
|
416
417
|
}
|
|
417
418
|
|
|
418
419
|
/**
|
|
419
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
420
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetZoneFromPincodeViewParam} arg
|
|
420
421
|
* - Arg object
|
|
421
422
|
*
|
|
422
423
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
423
424
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
424
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
425
|
-
* Success response
|
|
426
|
-
* @name getCourierPartnerRule
|
|
427
|
-
* @summary: Fetch of Courier Rule.
|
|
428
|
-
* @description: This API returns Courier Rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRule/).
|
|
429
|
-
*/
|
|
430
|
-
async getCourierPartnerRule(
|
|
431
|
-
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
432
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
433
|
-
) {
|
|
434
|
-
const {
|
|
435
|
-
error,
|
|
436
|
-
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRule().validate(
|
|
437
|
-
{
|
|
438
|
-
ruleId,
|
|
439
|
-
},
|
|
440
|
-
{ abortEarly: false, allowUnknown: true }
|
|
441
|
-
);
|
|
442
|
-
if (error) {
|
|
443
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
// Showing warrnings if extra unknown parameters are found
|
|
447
|
-
const {
|
|
448
|
-
error: warrning,
|
|
449
|
-
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRule().validate(
|
|
450
|
-
{
|
|
451
|
-
ruleId,
|
|
452
|
-
},
|
|
453
|
-
{ abortEarly: false, allowUnknown: false }
|
|
454
|
-
);
|
|
455
|
-
if (warrning) {
|
|
456
|
-
Logger({
|
|
457
|
-
level: "WARN",
|
|
458
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerRule \n ${warrning}`,
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
const query_params = {};
|
|
463
|
-
|
|
464
|
-
const response = await PlatformAPIClient.execute(
|
|
465
|
-
this.config,
|
|
466
|
-
"get",
|
|
467
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/${ruleId}`,
|
|
468
|
-
query_params,
|
|
469
|
-
undefined,
|
|
470
|
-
requestHeaders,
|
|
471
|
-
{ responseHeaders }
|
|
472
|
-
);
|
|
473
|
-
|
|
474
|
-
let responseData = response;
|
|
475
|
-
if (responseHeaders) {
|
|
476
|
-
responseData = response[0];
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
const {
|
|
480
|
-
error: res_error,
|
|
481
|
-
} = ServiceabilityPlatformModel.CourierPartnerRule().validate(
|
|
482
|
-
responseData,
|
|
483
|
-
{ abortEarly: false, allowUnknown: true }
|
|
484
|
-
);
|
|
485
|
-
|
|
486
|
-
if (res_error) {
|
|
487
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
488
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
489
|
-
} else {
|
|
490
|
-
Logger({
|
|
491
|
-
level: "WARN",
|
|
492
|
-
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerRule \n ${res_error}`,
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
return response;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam} arg
|
|
502
|
-
* - Arg object
|
|
503
|
-
*
|
|
504
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
505
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
506
|
-
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRulesListResponse>}
|
|
425
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetZoneFromPincodeViewResponse>}
|
|
507
426
|
* - Success response
|
|
508
427
|
*
|
|
509
|
-
* @name
|
|
510
|
-
* @summary:
|
|
511
|
-
* @description: This API returns
|
|
512
|
-
*/
|
|
513
|
-
async getCourierPartnerRules(
|
|
514
|
-
{ pageNo, pageSize, status, requestHeaders } = { requestHeaders: {} },
|
|
515
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
516
|
-
) {
|
|
517
|
-
const {
|
|
518
|
-
error,
|
|
519
|
-
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRules().validate(
|
|
520
|
-
{
|
|
521
|
-
pageNo,
|
|
522
|
-
pageSize,
|
|
523
|
-
status,
|
|
524
|
-
},
|
|
525
|
-
{ abortEarly: false, allowUnknown: true }
|
|
526
|
-
);
|
|
527
|
-
if (error) {
|
|
528
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
// Showing warrnings if extra unknown parameters are found
|
|
532
|
-
const {
|
|
533
|
-
error: warrning,
|
|
534
|
-
} = ServiceabilityPlatformApplicationValidator.getCourierPartnerRules().validate(
|
|
535
|
-
{
|
|
536
|
-
pageNo,
|
|
537
|
-
pageSize,
|
|
538
|
-
status,
|
|
539
|
-
},
|
|
540
|
-
{ abortEarly: false, allowUnknown: false }
|
|
541
|
-
);
|
|
542
|
-
if (warrning) {
|
|
543
|
-
Logger({
|
|
544
|
-
level: "WARN",
|
|
545
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerRules \n ${warrning}`,
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
const query_params = {};
|
|
550
|
-
query_params["page_no"] = pageNo;
|
|
551
|
-
query_params["page_size"] = pageSize;
|
|
552
|
-
query_params["status"] = status;
|
|
553
|
-
|
|
554
|
-
const response = await PlatformAPIClient.execute(
|
|
555
|
-
this.config,
|
|
556
|
-
"get",
|
|
557
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules`,
|
|
558
|
-
query_params,
|
|
559
|
-
undefined,
|
|
560
|
-
requestHeaders,
|
|
561
|
-
{ responseHeaders }
|
|
562
|
-
);
|
|
563
|
-
|
|
564
|
-
let responseData = response;
|
|
565
|
-
if (responseHeaders) {
|
|
566
|
-
responseData = response[0];
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
const {
|
|
570
|
-
error: res_error,
|
|
571
|
-
} = ServiceabilityPlatformModel.CourierPartnerRulesListResponse().validate(
|
|
572
|
-
responseData,
|
|
573
|
-
{ abortEarly: false, allowUnknown: true }
|
|
574
|
-
);
|
|
575
|
-
|
|
576
|
-
if (res_error) {
|
|
577
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
578
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
579
|
-
} else {
|
|
580
|
-
Logger({
|
|
581
|
-
level: "WARN",
|
|
582
|
-
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerRules \n ${res_error}`,
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
return response;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* @param {ServiceabilityPlatformApplicationValidator.GetStoreRuleParam} arg
|
|
592
|
-
* - Arg object
|
|
593
|
-
*
|
|
594
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
595
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
596
|
-
* @returns {Promise<ServiceabilityPlatformModel.StoreRuleDataSchema>} -
|
|
597
|
-
* Success response
|
|
598
|
-
* @name getStoreRule
|
|
599
|
-
* @summary: Get Single Store Rule
|
|
600
|
-
* @description: Get Single Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRule/).
|
|
428
|
+
* @name getZoneFromPincodeView
|
|
429
|
+
* @summary: GET zone from the Pincode.
|
|
430
|
+
* @description: This API returns zone from the Pincode View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneFromPincodeView/).
|
|
601
431
|
*/
|
|
602
|
-
async
|
|
603
|
-
{
|
|
432
|
+
async getZoneFromPincodeView(
|
|
433
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
604
434
|
{ responseHeaders } = { responseHeaders: false }
|
|
605
435
|
) {
|
|
606
436
|
const {
|
|
607
437
|
error,
|
|
608
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
438
|
+
} = ServiceabilityPlatformApplicationValidator.getZoneFromPincodeView().validate(
|
|
609
439
|
{
|
|
610
|
-
|
|
440
|
+
body,
|
|
611
441
|
},
|
|
612
442
|
{ abortEarly: false, allowUnknown: true }
|
|
613
443
|
);
|
|
@@ -618,16 +448,16 @@ class Serviceability {
|
|
|
618
448
|
// Showing warrnings if extra unknown parameters are found
|
|
619
449
|
const {
|
|
620
450
|
error: warrning,
|
|
621
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
451
|
+
} = ServiceabilityPlatformApplicationValidator.getZoneFromPincodeView().validate(
|
|
622
452
|
{
|
|
623
|
-
|
|
453
|
+
body,
|
|
624
454
|
},
|
|
625
455
|
{ abortEarly: false, allowUnknown: false }
|
|
626
456
|
);
|
|
627
457
|
if (warrning) {
|
|
628
458
|
Logger({
|
|
629
459
|
level: "WARN",
|
|
630
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
460
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getZoneFromPincodeView \n ${warrning}`,
|
|
631
461
|
});
|
|
632
462
|
}
|
|
633
463
|
|
|
@@ -635,10 +465,10 @@ class Serviceability {
|
|
|
635
465
|
|
|
636
466
|
const response = await PlatformAPIClient.execute(
|
|
637
467
|
this.config,
|
|
638
|
-
"
|
|
639
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
468
|
+
"post",
|
|
469
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/zones`,
|
|
640
470
|
query_params,
|
|
641
|
-
|
|
471
|
+
body,
|
|
642
472
|
requestHeaders,
|
|
643
473
|
{ responseHeaders }
|
|
644
474
|
);
|
|
@@ -650,7 +480,7 @@ class Serviceability {
|
|
|
650
480
|
|
|
651
481
|
const {
|
|
652
482
|
error: res_error,
|
|
653
|
-
} = ServiceabilityPlatformModel.
|
|
483
|
+
} = ServiceabilityPlatformModel.GetZoneFromPincodeViewResponse().validate(
|
|
654
484
|
responseData,
|
|
655
485
|
{ abortEarly: false, allowUnknown: true }
|
|
656
486
|
);
|
|
@@ -661,7 +491,7 @@ class Serviceability {
|
|
|
661
491
|
} else {
|
|
662
492
|
Logger({
|
|
663
493
|
level: "WARN",
|
|
664
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
494
|
+
message: `Response Validation Warnings for platform > Serviceability > getZoneFromPincodeView \n ${res_error}`,
|
|
665
495
|
});
|
|
666
496
|
}
|
|
667
497
|
}
|
|
@@ -670,29 +500,30 @@ class Serviceability {
|
|
|
670
500
|
}
|
|
671
501
|
|
|
672
502
|
/**
|
|
673
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
503
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetZonesFromApplicationIdViewParam} arg
|
|
674
504
|
* - Arg object
|
|
675
505
|
*
|
|
676
506
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
677
507
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
678
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
508
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetZoneFromApplicationIdViewResponse>}
|
|
679
509
|
* - Success response
|
|
680
510
|
*
|
|
681
|
-
* @name
|
|
682
|
-
* @summary:
|
|
683
|
-
* @description:
|
|
511
|
+
* @name getZonesFromApplicationIdView
|
|
512
|
+
* @summary: GET zones from the application_id.
|
|
513
|
+
* @description: This API returns zones from the application_id View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZonesFromApplicationIdView/).
|
|
684
514
|
*/
|
|
685
|
-
async
|
|
686
|
-
{ pageNo, pageSize,
|
|
515
|
+
async getZonesFromApplicationIdView(
|
|
516
|
+
{ pageNo, pageSize, zoneId, q, requestHeaders } = { requestHeaders: {} },
|
|
687
517
|
{ responseHeaders } = { responseHeaders: false }
|
|
688
518
|
) {
|
|
689
519
|
const {
|
|
690
520
|
error,
|
|
691
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
521
|
+
} = ServiceabilityPlatformApplicationValidator.getZonesFromApplicationIdView().validate(
|
|
692
522
|
{
|
|
693
523
|
pageNo,
|
|
694
524
|
pageSize,
|
|
695
|
-
|
|
525
|
+
zoneId,
|
|
526
|
+
q,
|
|
696
527
|
},
|
|
697
528
|
{ abortEarly: false, allowUnknown: true }
|
|
698
529
|
);
|
|
@@ -703,30 +534,32 @@ class Serviceability {
|
|
|
703
534
|
// Showing warrnings if extra unknown parameters are found
|
|
704
535
|
const {
|
|
705
536
|
error: warrning,
|
|
706
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
537
|
+
} = ServiceabilityPlatformApplicationValidator.getZonesFromApplicationIdView().validate(
|
|
707
538
|
{
|
|
708
539
|
pageNo,
|
|
709
540
|
pageSize,
|
|
710
|
-
|
|
541
|
+
zoneId,
|
|
542
|
+
q,
|
|
711
543
|
},
|
|
712
544
|
{ abortEarly: false, allowUnknown: false }
|
|
713
545
|
);
|
|
714
546
|
if (warrning) {
|
|
715
547
|
Logger({
|
|
716
548
|
level: "WARN",
|
|
717
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
549
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getZonesFromApplicationIdView \n ${warrning}`,
|
|
718
550
|
});
|
|
719
551
|
}
|
|
720
552
|
|
|
721
553
|
const query_params = {};
|
|
722
554
|
query_params["page_no"] = pageNo;
|
|
723
555
|
query_params["page_size"] = pageSize;
|
|
724
|
-
query_params["
|
|
556
|
+
query_params["zone_id"] = zoneId;
|
|
557
|
+
query_params["q"] = q;
|
|
725
558
|
|
|
726
559
|
const response = await PlatformAPIClient.execute(
|
|
727
560
|
this.config,
|
|
728
561
|
"get",
|
|
729
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
562
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/zones`,
|
|
730
563
|
query_params,
|
|
731
564
|
undefined,
|
|
732
565
|
requestHeaders,
|
|
@@ -740,7 +573,7 @@ class Serviceability {
|
|
|
740
573
|
|
|
741
574
|
const {
|
|
742
575
|
error: res_error,
|
|
743
|
-
} = ServiceabilityPlatformModel.
|
|
576
|
+
} = ServiceabilityPlatformModel.GetZoneFromApplicationIdViewResponse().validate(
|
|
744
577
|
responseData,
|
|
745
578
|
{ abortEarly: false, allowUnknown: true }
|
|
746
579
|
);
|
|
@@ -751,7 +584,7 @@ class Serviceability {
|
|
|
751
584
|
} else {
|
|
752
585
|
Logger({
|
|
753
586
|
level: "WARN",
|
|
754
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
587
|
+
message: `Response Validation Warnings for platform > Serviceability > getZonesFromApplicationIdView \n ${res_error}`,
|
|
755
588
|
});
|
|
756
589
|
}
|
|
757
590
|
}
|
|
@@ -760,107 +593,25 @@ class Serviceability {
|
|
|
760
593
|
}
|
|
761
594
|
|
|
762
595
|
/**
|
|
763
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
596
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationServiceabilityParam} arg
|
|
764
597
|
* - Arg object
|
|
765
598
|
*
|
|
766
599
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
767
600
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
768
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
769
|
-
* Success response
|
|
770
|
-
* @name insertApplicationConfig
|
|
771
|
-
* @summary: Insert Application Configuration
|
|
772
|
-
* @description: Insert Application Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/insertApplicationConfig/).
|
|
773
|
-
*/
|
|
774
|
-
async insertApplicationConfig(
|
|
775
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
776
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
777
|
-
) {
|
|
778
|
-
const {
|
|
779
|
-
error,
|
|
780
|
-
} = ServiceabilityPlatformApplicationValidator.insertApplicationConfig().validate(
|
|
781
|
-
{
|
|
782
|
-
body,
|
|
783
|
-
},
|
|
784
|
-
{ abortEarly: false, allowUnknown: true }
|
|
785
|
-
);
|
|
786
|
-
if (error) {
|
|
787
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
// Showing warrnings if extra unknown parameters are found
|
|
791
|
-
const {
|
|
792
|
-
error: warrning,
|
|
793
|
-
} = ServiceabilityPlatformApplicationValidator.insertApplicationConfig().validate(
|
|
794
|
-
{
|
|
795
|
-
body,
|
|
796
|
-
},
|
|
797
|
-
{ abortEarly: false, allowUnknown: false }
|
|
798
|
-
);
|
|
799
|
-
if (warrning) {
|
|
800
|
-
Logger({
|
|
801
|
-
level: "WARN",
|
|
802
|
-
message: `Parameter Validation warrnings for platform > Serviceability > insertApplicationConfig \n ${warrning}`,
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
const query_params = {};
|
|
807
|
-
|
|
808
|
-
const response = await PlatformAPIClient.execute(
|
|
809
|
-
this.config,
|
|
810
|
-
"post",
|
|
811
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/configuration`,
|
|
812
|
-
query_params,
|
|
813
|
-
body,
|
|
814
|
-
requestHeaders,
|
|
815
|
-
{ responseHeaders }
|
|
816
|
-
);
|
|
817
|
-
|
|
818
|
-
let responseData = response;
|
|
819
|
-
if (responseHeaders) {
|
|
820
|
-
responseData = response[0];
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
const {
|
|
824
|
-
error: res_error,
|
|
825
|
-
} = ServiceabilityPlatformModel.StoreRuleConfigData().validate(
|
|
826
|
-
responseData,
|
|
827
|
-
{ abortEarly: false, allowUnknown: true }
|
|
828
|
-
);
|
|
829
|
-
|
|
830
|
-
if (res_error) {
|
|
831
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
832
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
833
|
-
} else {
|
|
834
|
-
Logger({
|
|
835
|
-
level: "WARN",
|
|
836
|
-
message: `Response Validation Warnings for platform > Serviceability > insertApplicationConfig \n ${res_error}`,
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
return response;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* @param {ServiceabilityPlatformApplicationValidator.PatchApplicationServiceabilitySelfShipmentParam} arg
|
|
846
|
-
* - Arg object
|
|
847
|
-
*
|
|
848
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
849
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
850
|
-
* @returns {Promise<ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse>}
|
|
601
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse>}
|
|
851
602
|
* - Success response
|
|
852
603
|
*
|
|
853
|
-
* @name
|
|
854
|
-
* @summary:
|
|
855
|
-
* @description: This API updates
|
|
604
|
+
* @name updateApplicationServiceability
|
|
605
|
+
* @summary: Zone configuration of application.
|
|
606
|
+
* @description: This API updates serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationServiceability/).
|
|
856
607
|
*/
|
|
857
|
-
async
|
|
608
|
+
async updateApplicationServiceability(
|
|
858
609
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
859
610
|
{ responseHeaders } = { responseHeaders: false }
|
|
860
611
|
) {
|
|
861
612
|
const {
|
|
862
613
|
error,
|
|
863
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
614
|
+
} = ServiceabilityPlatformApplicationValidator.updateApplicationServiceability().validate(
|
|
864
615
|
{
|
|
865
616
|
body,
|
|
866
617
|
},
|
|
@@ -873,7 +624,7 @@ class Serviceability {
|
|
|
873
624
|
// Showing warrnings if extra unknown parameters are found
|
|
874
625
|
const {
|
|
875
626
|
error: warrning,
|
|
876
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
627
|
+
} = ServiceabilityPlatformApplicationValidator.updateApplicationServiceability().validate(
|
|
877
628
|
{
|
|
878
629
|
body,
|
|
879
630
|
},
|
|
@@ -882,7 +633,7 @@ class Serviceability {
|
|
|
882
633
|
if (warrning) {
|
|
883
634
|
Logger({
|
|
884
635
|
level: "WARN",
|
|
885
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
636
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateApplicationServiceability \n ${warrning}`,
|
|
886
637
|
});
|
|
887
638
|
}
|
|
888
639
|
|
|
@@ -890,256 +641,8 @@ class Serviceability {
|
|
|
890
641
|
|
|
891
642
|
const response = await PlatformAPIClient.execute(
|
|
892
643
|
this.config,
|
|
893
|
-
"
|
|
894
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
895
|
-
query_params,
|
|
896
|
-
body,
|
|
897
|
-
requestHeaders,
|
|
898
|
-
{ responseHeaders }
|
|
899
|
-
);
|
|
900
|
-
|
|
901
|
-
let responseData = response;
|
|
902
|
-
if (responseHeaders) {
|
|
903
|
-
responseData = response[0];
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
const {
|
|
907
|
-
error: res_error,
|
|
908
|
-
} = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate(
|
|
909
|
-
responseData,
|
|
910
|
-
{ abortEarly: false, allowUnknown: true }
|
|
911
|
-
);
|
|
912
|
-
|
|
913
|
-
if (res_error) {
|
|
914
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
915
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
916
|
-
} else {
|
|
917
|
-
Logger({
|
|
918
|
-
level: "WARN",
|
|
919
|
-
message: `Response Validation Warnings for platform > Serviceability > patchApplicationServiceabilitySelfShipment \n ${res_error}`,
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
return response;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam} arg
|
|
929
|
-
* - Arg object
|
|
930
|
-
*
|
|
931
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
932
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
933
|
-
* @returns {Promise<ServiceabilityPlatformModel.ApplicationConfig>} -
|
|
934
|
-
* Success response
|
|
935
|
-
* @name updateApplicationConfiguration
|
|
936
|
-
* @summary: Apply configuration to an application
|
|
937
|
-
* @description: Apply configuration to application to set DP rules and Zone configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationConfiguration/).
|
|
938
|
-
*/
|
|
939
|
-
async updateApplicationConfiguration(
|
|
940
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
941
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
942
|
-
) {
|
|
943
|
-
const {
|
|
944
|
-
error,
|
|
945
|
-
} = ServiceabilityPlatformApplicationValidator.updateApplicationConfiguration().validate(
|
|
946
|
-
{
|
|
947
|
-
body,
|
|
948
|
-
},
|
|
949
|
-
{ abortEarly: false, allowUnknown: true }
|
|
950
|
-
);
|
|
951
|
-
if (error) {
|
|
952
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
// Showing warrnings if extra unknown parameters are found
|
|
956
|
-
const {
|
|
957
|
-
error: warrning,
|
|
958
|
-
} = ServiceabilityPlatformApplicationValidator.updateApplicationConfiguration().validate(
|
|
959
|
-
{
|
|
960
|
-
body,
|
|
961
|
-
},
|
|
962
|
-
{ abortEarly: false, allowUnknown: false }
|
|
963
|
-
);
|
|
964
|
-
if (warrning) {
|
|
965
|
-
Logger({
|
|
966
|
-
level: "WARN",
|
|
967
|
-
message: `Parameter Validation warrnings for platform > Serviceability > updateApplicationConfiguration \n ${warrning}`,
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
const query_params = {};
|
|
972
|
-
|
|
973
|
-
const response = await PlatformAPIClient.execute(
|
|
974
|
-
this.config,
|
|
975
|
-
"put",
|
|
976
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
977
|
-
query_params,
|
|
978
|
-
body,
|
|
979
|
-
requestHeaders,
|
|
980
|
-
{ responseHeaders }
|
|
981
|
-
);
|
|
982
|
-
|
|
983
|
-
let responseData = response;
|
|
984
|
-
if (responseHeaders) {
|
|
985
|
-
responseData = response[0];
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
const {
|
|
989
|
-
error: res_error,
|
|
990
|
-
} = ServiceabilityPlatformModel.ApplicationConfig().validate(responseData, {
|
|
991
|
-
abortEarly: false,
|
|
992
|
-
allowUnknown: true,
|
|
993
|
-
});
|
|
994
|
-
|
|
995
|
-
if (res_error) {
|
|
996
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
997
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
998
|
-
} else {
|
|
999
|
-
Logger({
|
|
1000
|
-
level: "WARN",
|
|
1001
|
-
message: `Response Validation Warnings for platform > Serviceability > updateApplicationConfiguration \n ${res_error}`,
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
return response;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
/**
|
|
1010
|
-
* @param {ServiceabilityPlatformApplicationValidator.UpdateCourierPartnerRulePriorityParam} arg
|
|
1011
|
-
* - Arg object
|
|
1012
|
-
*
|
|
1013
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1014
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1015
|
-
* @returns {Promise<ServiceabilityPlatformModel.RulePriorityResponse>} -
|
|
1016
|
-
* Success response
|
|
1017
|
-
* @name updateCourierPartnerRulePriority
|
|
1018
|
-
* @summary: Updates Courier Partner Rules Priority for a sales channel
|
|
1019
|
-
* @description: Updates Courier Partner Rules Priority for a sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerRulePriority/).
|
|
1020
|
-
*/
|
|
1021
|
-
async updateCourierPartnerRulePriority(
|
|
1022
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1023
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1024
|
-
) {
|
|
1025
|
-
const {
|
|
1026
|
-
error,
|
|
1027
|
-
} = ServiceabilityPlatformApplicationValidator.updateCourierPartnerRulePriority().validate(
|
|
1028
|
-
{
|
|
1029
|
-
body,
|
|
1030
|
-
},
|
|
1031
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1032
|
-
);
|
|
1033
|
-
if (error) {
|
|
1034
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1038
|
-
const {
|
|
1039
|
-
error: warrning,
|
|
1040
|
-
} = ServiceabilityPlatformApplicationValidator.updateCourierPartnerRulePriority().validate(
|
|
1041
|
-
{
|
|
1042
|
-
body,
|
|
1043
|
-
},
|
|
1044
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1045
|
-
);
|
|
1046
|
-
if (warrning) {
|
|
1047
|
-
Logger({
|
|
1048
|
-
level: "WARN",
|
|
1049
|
-
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerRulePriority \n ${warrning}`,
|
|
1050
|
-
});
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
const query_params = {};
|
|
1054
|
-
|
|
1055
|
-
const response = await PlatformAPIClient.execute(
|
|
1056
|
-
this.config,
|
|
1057
|
-
"put",
|
|
1058
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/priority`,
|
|
1059
|
-
query_params,
|
|
1060
|
-
body,
|
|
1061
|
-
requestHeaders,
|
|
1062
|
-
{ responseHeaders }
|
|
1063
|
-
);
|
|
1064
|
-
|
|
1065
|
-
let responseData = response;
|
|
1066
|
-
if (responseHeaders) {
|
|
1067
|
-
responseData = response[0];
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
const {
|
|
1071
|
-
error: res_error,
|
|
1072
|
-
} = ServiceabilityPlatformModel.RulePriorityResponse().validate(
|
|
1073
|
-
responseData,
|
|
1074
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1075
|
-
);
|
|
1076
|
-
|
|
1077
|
-
if (res_error) {
|
|
1078
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1079
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1080
|
-
} else {
|
|
1081
|
-
Logger({
|
|
1082
|
-
level: "WARN",
|
|
1083
|
-
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerRulePriority \n ${res_error}`,
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
return response;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* @param {ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam} arg
|
|
1093
|
-
* - Arg object
|
|
1094
|
-
*
|
|
1095
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1096
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1097
|
-
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRule>} -
|
|
1098
|
-
* Success response
|
|
1099
|
-
* @name updateCourierRule
|
|
1100
|
-
* @summary: Updating of Courier Rule.
|
|
1101
|
-
* @description: This API updates and returns Courier Rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierRule/).
|
|
1102
|
-
*/
|
|
1103
|
-
async updateCourierRule(
|
|
1104
|
-
{ ruleId, body, requestHeaders } = { requestHeaders: {} },
|
|
1105
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1106
|
-
) {
|
|
1107
|
-
const {
|
|
1108
|
-
error,
|
|
1109
|
-
} = ServiceabilityPlatformApplicationValidator.updateCourierRule().validate(
|
|
1110
|
-
{
|
|
1111
|
-
ruleId,
|
|
1112
|
-
body,
|
|
1113
|
-
},
|
|
1114
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1115
|
-
);
|
|
1116
|
-
if (error) {
|
|
1117
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1121
|
-
const {
|
|
1122
|
-
error: warrning,
|
|
1123
|
-
} = ServiceabilityPlatformApplicationValidator.updateCourierRule().validate(
|
|
1124
|
-
{
|
|
1125
|
-
ruleId,
|
|
1126
|
-
body,
|
|
1127
|
-
},
|
|
1128
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1129
|
-
);
|
|
1130
|
-
if (warrning) {
|
|
1131
|
-
Logger({
|
|
1132
|
-
level: "WARN",
|
|
1133
|
-
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierRule \n ${warrning}`,
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
const query_params = {};
|
|
1138
|
-
|
|
1139
|
-
const response = await PlatformAPIClient.execute(
|
|
1140
|
-
this.config,
|
|
1141
|
-
"put",
|
|
1142
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/${ruleId}`,
|
|
644
|
+
"post",
|
|
645
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/serviceability`,
|
|
1143
646
|
query_params,
|
|
1144
647
|
body,
|
|
1145
648
|
requestHeaders,
|
|
@@ -1153,7 +656,7 @@ class Serviceability {
|
|
|
1153
656
|
|
|
1154
657
|
const {
|
|
1155
658
|
error: res_error,
|
|
1156
|
-
} = ServiceabilityPlatformModel.
|
|
659
|
+
} = ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse().validate(
|
|
1157
660
|
responseData,
|
|
1158
661
|
{ abortEarly: false, allowUnknown: true }
|
|
1159
662
|
);
|
|
@@ -1164,7 +667,7 @@ class Serviceability {
|
|
|
1164
667
|
} else {
|
|
1165
668
|
Logger({
|
|
1166
669
|
level: "WARN",
|
|
1167
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
670
|
+
message: `Response Validation Warnings for platform > Serviceability > updateApplicationServiceability \n ${res_error}`,
|
|
1168
671
|
});
|
|
1169
672
|
}
|
|
1170
673
|
}
|
|
@@ -1504,27 +1007,26 @@ class Serviceability {
|
|
|
1504
1007
|
}
|
|
1505
1008
|
|
|
1506
1009
|
/**
|
|
1507
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
1010
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateSelfShipParam} arg
|
|
1508
1011
|
* - Arg object
|
|
1509
1012
|
*
|
|
1510
1013
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1511
1014
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1512
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1015
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse>}
|
|
1513
1016
|
* - Success response
|
|
1514
1017
|
*
|
|
1515
|
-
* @name
|
|
1516
|
-
* @summary:
|
|
1517
|
-
* @description:
|
|
1018
|
+
* @name updateSelfShip
|
|
1019
|
+
* @summary: Self-ship configuration of application.
|
|
1020
|
+
* @description: This API updates Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateSelfShip/).
|
|
1518
1021
|
*/
|
|
1519
|
-
async
|
|
1520
|
-
{
|
|
1022
|
+
async updateSelfShip(
|
|
1023
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1521
1024
|
{ responseHeaders } = { responseHeaders: false }
|
|
1522
1025
|
) {
|
|
1523
1026
|
const {
|
|
1524
1027
|
error,
|
|
1525
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
1028
|
+
} = ServiceabilityPlatformApplicationValidator.updateSelfShip().validate(
|
|
1526
1029
|
{
|
|
1527
|
-
ruleUid,
|
|
1528
1030
|
body,
|
|
1529
1031
|
},
|
|
1530
1032
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1536,9 +1038,8 @@ class Serviceability {
|
|
|
1536
1038
|
// Showing warrnings if extra unknown parameters are found
|
|
1537
1039
|
const {
|
|
1538
1040
|
error: warrning,
|
|
1539
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
1041
|
+
} = ServiceabilityPlatformApplicationValidator.updateSelfShip().validate(
|
|
1540
1042
|
{
|
|
1541
|
-
ruleUid,
|
|
1542
1043
|
body,
|
|
1543
1044
|
},
|
|
1544
1045
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1546,7 +1047,7 @@ class Serviceability {
|
|
|
1546
1047
|
if (warrning) {
|
|
1547
1048
|
Logger({
|
|
1548
1049
|
level: "WARN",
|
|
1549
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1050
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateSelfShip \n ${warrning}`,
|
|
1550
1051
|
});
|
|
1551
1052
|
}
|
|
1552
1053
|
|
|
@@ -1554,8 +1055,8 @@ class Serviceability {
|
|
|
1554
1055
|
|
|
1555
1056
|
const response = await PlatformAPIClient.execute(
|
|
1556
1057
|
this.config,
|
|
1557
|
-
"
|
|
1558
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1058
|
+
"patch",
|
|
1059
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/selfship`,
|
|
1559
1060
|
query_params,
|
|
1560
1061
|
body,
|
|
1561
1062
|
requestHeaders,
|
|
@@ -1569,7 +1070,7 @@ class Serviceability {
|
|
|
1569
1070
|
|
|
1570
1071
|
const {
|
|
1571
1072
|
error: res_error,
|
|
1572
|
-
} = ServiceabilityPlatformModel.
|
|
1073
|
+
} = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate(
|
|
1573
1074
|
responseData,
|
|
1574
1075
|
{ abortEarly: false, allowUnknown: true }
|
|
1575
1076
|
);
|
|
@@ -1580,7 +1081,7 @@ class Serviceability {
|
|
|
1580
1081
|
} else {
|
|
1581
1082
|
Logger({
|
|
1582
1083
|
level: "WARN",
|
|
1583
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1084
|
+
message: `Response Validation Warnings for platform > Serviceability > updateSelfShip \n ${res_error}`,
|
|
1584
1085
|
});
|
|
1585
1086
|
}
|
|
1586
1087
|
}
|
|
@@ -1589,24 +1090,25 @@ class Serviceability {
|
|
|
1589
1090
|
}
|
|
1590
1091
|
|
|
1591
1092
|
/**
|
|
1592
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
1093
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpsertDpApplicationRulesParam} arg
|
|
1593
1094
|
* - Arg object
|
|
1594
1095
|
*
|
|
1595
1096
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1596
1097
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1597
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1598
|
-
* Success response
|
|
1599
|
-
*
|
|
1600
|
-
* @
|
|
1601
|
-
* @
|
|
1098
|
+
* @returns {Promise<ServiceabilityPlatformModel.DPApplicationRuleResponse>}
|
|
1099
|
+
* - Success response
|
|
1100
|
+
*
|
|
1101
|
+
* @name upsertDpApplicationRules
|
|
1102
|
+
* @summary: Upsert of DpApplicationRules in database.
|
|
1103
|
+
* @description: This API returns response of upsert of DpApplicationRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpApplicationRules/).
|
|
1602
1104
|
*/
|
|
1603
|
-
async
|
|
1105
|
+
async upsertDpApplicationRules(
|
|
1604
1106
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1605
1107
|
{ responseHeaders } = { responseHeaders: false }
|
|
1606
1108
|
) {
|
|
1607
1109
|
const {
|
|
1608
1110
|
error,
|
|
1609
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
1111
|
+
} = ServiceabilityPlatformApplicationValidator.upsertDpApplicationRules().validate(
|
|
1610
1112
|
{
|
|
1611
1113
|
body,
|
|
1612
1114
|
},
|
|
@@ -1619,7 +1121,7 @@ class Serviceability {
|
|
|
1619
1121
|
// Showing warrnings if extra unknown parameters are found
|
|
1620
1122
|
const {
|
|
1621
1123
|
error: warrning,
|
|
1622
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
1124
|
+
} = ServiceabilityPlatformApplicationValidator.upsertDpApplicationRules().validate(
|
|
1623
1125
|
{
|
|
1624
1126
|
body,
|
|
1625
1127
|
},
|
|
@@ -1628,7 +1130,7 @@ class Serviceability {
|
|
|
1628
1130
|
if (warrning) {
|
|
1629
1131
|
Logger({
|
|
1630
1132
|
level: "WARN",
|
|
1631
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1133
|
+
message: `Parameter Validation warrnings for platform > Serviceability > upsertDpApplicationRules \n ${warrning}`,
|
|
1632
1134
|
});
|
|
1633
1135
|
}
|
|
1634
1136
|
|
|
@@ -1637,7 +1139,7 @@ class Serviceability {
|
|
|
1637
1139
|
const response = await PlatformAPIClient.execute(
|
|
1638
1140
|
this.config,
|
|
1639
1141
|
"put",
|
|
1640
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1142
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier/priority`,
|
|
1641
1143
|
query_params,
|
|
1642
1144
|
body,
|
|
1643
1145
|
requestHeaders,
|
|
@@ -1651,7 +1153,7 @@ class Serviceability {
|
|
|
1651
1153
|
|
|
1652
1154
|
const {
|
|
1653
1155
|
error: res_error,
|
|
1654
|
-
} = ServiceabilityPlatformModel.
|
|
1156
|
+
} = ServiceabilityPlatformModel.DPApplicationRuleResponse().validate(
|
|
1655
1157
|
responseData,
|
|
1656
1158
|
{ abortEarly: false, allowUnknown: true }
|
|
1657
1159
|
);
|
|
@@ -1662,7 +1164,7 @@ class Serviceability {
|
|
|
1662
1164
|
} else {
|
|
1663
1165
|
Logger({
|
|
1664
1166
|
level: "WARN",
|
|
1665
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1167
|
+
message: `Response Validation Warnings for platform > Serviceability > upsertDpApplicationRules \n ${res_error}`,
|
|
1666
1168
|
});
|
|
1667
1169
|
}
|
|
1668
1170
|
}
|