@gofynd/fdk-client-javascript 1.2.0 → 1.3.0
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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
- package/sdk/application/Cart/CartApplicationModel.js +4 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -14,6 +14,7 @@ class Serviceability {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @param {ServiceabilityPlatformApplicationValidator.AddAppDpParam} arg - Arg object
|
|
17
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
17
18
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
19
|
* @returns {Promise<ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse>}
|
|
19
20
|
* - Success response
|
|
@@ -22,7 +23,10 @@ class Serviceability {
|
|
|
22
23
|
* @summary: Add application dp data
|
|
23
24
|
* @description: This API add application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/addAppDp/).
|
|
24
25
|
*/
|
|
25
|
-
async addAppDp(
|
|
26
|
+
async addAppDp(
|
|
27
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
28
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
29
|
+
) {
|
|
26
30
|
const {
|
|
27
31
|
error,
|
|
28
32
|
} = ServiceabilityPlatformApplicationValidator.addAppDp().validate(
|
|
@@ -59,12 +63,12 @@ class Serviceability {
|
|
|
59
63
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
60
64
|
query_params,
|
|
61
65
|
body,
|
|
62
|
-
|
|
63
|
-
{
|
|
66
|
+
requestHeaders,
|
|
67
|
+
{ responseHeaders }
|
|
64
68
|
);
|
|
65
69
|
|
|
66
70
|
let responseData = response;
|
|
67
|
-
if (
|
|
71
|
+
if (responseHeaders) {
|
|
68
72
|
responseData = response[0];
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -89,6 +93,7 @@ class Serviceability {
|
|
|
89
93
|
* @param {ServiceabilityPlatformApplicationValidator.DeleteAppDpParam} arg
|
|
90
94
|
* - Arg object
|
|
91
95
|
*
|
|
96
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
92
97
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
93
98
|
* @returns {Promise<ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse>}
|
|
94
99
|
* - Success response
|
|
@@ -98,8 +103,8 @@ class Serviceability {
|
|
|
98
103
|
* @description: This API remove application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/deleteAppDp/).
|
|
99
104
|
*/
|
|
100
105
|
async deleteAppDp(
|
|
101
|
-
{ courierPartnerId } = {},
|
|
102
|
-
{
|
|
106
|
+
{ courierPartnerId, requestHeaders } = { requestHeaders: {} },
|
|
107
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
103
108
|
) {
|
|
104
109
|
const {
|
|
105
110
|
error,
|
|
@@ -137,12 +142,12 @@ class Serviceability {
|
|
|
137
142
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/${courierPartnerId}`,
|
|
138
143
|
query_params,
|
|
139
144
|
undefined,
|
|
140
|
-
|
|
141
|
-
{
|
|
145
|
+
requestHeaders,
|
|
146
|
+
{ responseHeaders }
|
|
142
147
|
);
|
|
143
148
|
|
|
144
149
|
let responseData = response;
|
|
145
|
-
if (
|
|
150
|
+
if (responseHeaders) {
|
|
146
151
|
responseData = response[0];
|
|
147
152
|
}
|
|
148
153
|
|
|
@@ -164,6 +169,10 @@ class Serviceability {
|
|
|
164
169
|
}
|
|
165
170
|
|
|
166
171
|
/**
|
|
172
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetApplicationServiceabilityParam} arg
|
|
173
|
+
* - Arg object
|
|
174
|
+
*
|
|
175
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
167
176
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
168
177
|
* @returns {Promise<ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse>}
|
|
169
178
|
* - Success response
|
|
@@ -172,7 +181,10 @@ class Serviceability {
|
|
|
172
181
|
* @summary: Zone configuration of application.
|
|
173
182
|
* @description: This API returns serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceability/).
|
|
174
183
|
*/
|
|
175
|
-
async getApplicationServiceability(
|
|
184
|
+
async getApplicationServiceability(
|
|
185
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
186
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
187
|
+
) {
|
|
176
188
|
const {
|
|
177
189
|
error,
|
|
178
190
|
} = ServiceabilityPlatformApplicationValidator.getApplicationServiceability().validate(
|
|
@@ -205,12 +217,12 @@ class Serviceability {
|
|
|
205
217
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/serviceability`,
|
|
206
218
|
query_params,
|
|
207
219
|
undefined,
|
|
208
|
-
|
|
209
|
-
{
|
|
220
|
+
requestHeaders,
|
|
221
|
+
{ responseHeaders }
|
|
210
222
|
);
|
|
211
223
|
|
|
212
224
|
let responseData = response;
|
|
213
|
-
if (
|
|
225
|
+
if (responseHeaders) {
|
|
214
226
|
responseData = response[0];
|
|
215
227
|
}
|
|
216
228
|
|
|
@@ -232,20 +244,25 @@ class Serviceability {
|
|
|
232
244
|
}
|
|
233
245
|
|
|
234
246
|
/**
|
|
247
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetDpApplicationRulesParam} arg
|
|
248
|
+
* - Arg object
|
|
249
|
+
*
|
|
250
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
235
251
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
236
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
252
|
+
* @returns {Promise<ServiceabilityPlatformModel.DPApplicationRuleResponse>}
|
|
237
253
|
* - Success response
|
|
238
254
|
*
|
|
239
|
-
* @name
|
|
240
|
-
* @summary:
|
|
241
|
-
* @description: This API returns
|
|
255
|
+
* @name getDpApplicationRules
|
|
256
|
+
* @summary: Get All DpApplicationRules rules added at application level from database.
|
|
257
|
+
* @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/).
|
|
242
258
|
*/
|
|
243
|
-
async
|
|
244
|
-
{
|
|
259
|
+
async getDpApplicationRules(
|
|
260
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
261
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
245
262
|
) {
|
|
246
263
|
const {
|
|
247
264
|
error,
|
|
248
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
265
|
+
} = ServiceabilityPlatformApplicationValidator.getDpApplicationRules().validate(
|
|
249
266
|
{},
|
|
250
267
|
{ abortEarly: false, allowUnknown: true }
|
|
251
268
|
);
|
|
@@ -256,14 +273,14 @@ class Serviceability {
|
|
|
256
273
|
// Showing warrnings if extra unknown parameters are found
|
|
257
274
|
const {
|
|
258
275
|
error: warrning,
|
|
259
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
276
|
+
} = ServiceabilityPlatformApplicationValidator.getDpApplicationRules().validate(
|
|
260
277
|
{},
|
|
261
278
|
{ abortEarly: false, allowUnknown: false }
|
|
262
279
|
);
|
|
263
280
|
if (warrning) {
|
|
264
281
|
Logger({
|
|
265
282
|
level: "WARN",
|
|
266
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
283
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getDpApplicationRules \n ${warrning}`,
|
|
267
284
|
});
|
|
268
285
|
}
|
|
269
286
|
|
|
@@ -272,21 +289,21 @@ class Serviceability {
|
|
|
272
289
|
const response = await PlatformAPIClient.execute(
|
|
273
290
|
this.config,
|
|
274
291
|
"get",
|
|
275
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
292
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier/priority`,
|
|
276
293
|
query_params,
|
|
277
294
|
undefined,
|
|
278
|
-
|
|
279
|
-
{
|
|
295
|
+
requestHeaders,
|
|
296
|
+
{ responseHeaders }
|
|
280
297
|
);
|
|
281
298
|
|
|
282
299
|
let responseData = response;
|
|
283
|
-
if (
|
|
300
|
+
if (responseHeaders) {
|
|
284
301
|
responseData = response[0];
|
|
285
302
|
}
|
|
286
303
|
|
|
287
304
|
const {
|
|
288
305
|
error: res_error,
|
|
289
|
-
} = ServiceabilityPlatformModel.
|
|
306
|
+
} = ServiceabilityPlatformModel.DPApplicationRuleResponse().validate(
|
|
290
307
|
responseData,
|
|
291
308
|
{ abortEarly: false, allowUnknown: false }
|
|
292
309
|
);
|
|
@@ -294,7 +311,7 @@ class Serviceability {
|
|
|
294
311
|
if (res_error) {
|
|
295
312
|
Logger({
|
|
296
313
|
level: "WARN",
|
|
297
|
-
message: `Response Validation Warnnings for platform > Serviceability >
|
|
314
|
+
message: `Response Validation Warnnings for platform > Serviceability > getDpApplicationRules \n ${res_error}`,
|
|
298
315
|
});
|
|
299
316
|
}
|
|
300
317
|
|
|
@@ -302,18 +319,25 @@ class Serviceability {
|
|
|
302
319
|
}
|
|
303
320
|
|
|
304
321
|
/**
|
|
322
|
+
* @param {ServiceabilityPlatformApplicationValidator.GetSelfShipParam} arg
|
|
323
|
+
* - Arg object
|
|
324
|
+
*
|
|
325
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
305
326
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
306
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
327
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse>}
|
|
307
328
|
* - Success response
|
|
308
329
|
*
|
|
309
|
-
* @name
|
|
310
|
-
* @summary:
|
|
311
|
-
* @description: This API returns
|
|
330
|
+
* @name getSelfShip
|
|
331
|
+
* @summary: Self-ship configuration of application.
|
|
332
|
+
* @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getSelfShip/).
|
|
312
333
|
*/
|
|
313
|
-
async
|
|
334
|
+
async getSelfShip(
|
|
335
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
336
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
337
|
+
) {
|
|
314
338
|
const {
|
|
315
339
|
error,
|
|
316
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
340
|
+
} = ServiceabilityPlatformApplicationValidator.getSelfShip().validate(
|
|
317
341
|
{},
|
|
318
342
|
{ abortEarly: false, allowUnknown: true }
|
|
319
343
|
);
|
|
@@ -324,14 +348,14 @@ class Serviceability {
|
|
|
324
348
|
// Showing warrnings if extra unknown parameters are found
|
|
325
349
|
const {
|
|
326
350
|
error: warrning,
|
|
327
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
351
|
+
} = ServiceabilityPlatformApplicationValidator.getSelfShip().validate(
|
|
328
352
|
{},
|
|
329
353
|
{ abortEarly: false, allowUnknown: false }
|
|
330
354
|
);
|
|
331
355
|
if (warrning) {
|
|
332
356
|
Logger({
|
|
333
357
|
level: "WARN",
|
|
334
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
358
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSelfShip \n ${warrning}`,
|
|
335
359
|
});
|
|
336
360
|
}
|
|
337
361
|
|
|
@@ -340,21 +364,21 @@ class Serviceability {
|
|
|
340
364
|
const response = await PlatformAPIClient.execute(
|
|
341
365
|
this.config,
|
|
342
366
|
"get",
|
|
343
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
367
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/selfship`,
|
|
344
368
|
query_params,
|
|
345
369
|
undefined,
|
|
346
|
-
|
|
347
|
-
{
|
|
370
|
+
requestHeaders,
|
|
371
|
+
{ responseHeaders }
|
|
348
372
|
);
|
|
349
373
|
|
|
350
374
|
let responseData = response;
|
|
351
|
-
if (
|
|
375
|
+
if (responseHeaders) {
|
|
352
376
|
responseData = response[0];
|
|
353
377
|
}
|
|
354
378
|
|
|
355
379
|
const {
|
|
356
380
|
error: res_error,
|
|
357
|
-
} = ServiceabilityPlatformModel.
|
|
381
|
+
} = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate(
|
|
358
382
|
responseData,
|
|
359
383
|
{ abortEarly: false, allowUnknown: false }
|
|
360
384
|
);
|
|
@@ -362,7 +386,7 @@ class Serviceability {
|
|
|
362
386
|
if (res_error) {
|
|
363
387
|
Logger({
|
|
364
388
|
level: "WARN",
|
|
365
|
-
message: `Response Validation Warnnings for platform > Serviceability >
|
|
389
|
+
message: `Response Validation Warnnings for platform > Serviceability > getSelfShip \n ${res_error}`,
|
|
366
390
|
});
|
|
367
391
|
}
|
|
368
392
|
|
|
@@ -373,6 +397,7 @@ class Serviceability {
|
|
|
373
397
|
* @param {ServiceabilityPlatformApplicationValidator.GetZoneFromPincodeViewParam} arg
|
|
374
398
|
* - Arg object
|
|
375
399
|
*
|
|
400
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
376
401
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
377
402
|
* @returns {Promise<ServiceabilityPlatformModel.GetZoneFromPincodeViewResponse>}
|
|
378
403
|
* - Success response
|
|
@@ -382,8 +407,8 @@ class Serviceability {
|
|
|
382
407
|
* @description: This API returns zone from the Pincode View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneFromPincodeView/).
|
|
383
408
|
*/
|
|
384
409
|
async getZoneFromPincodeView(
|
|
385
|
-
{ body } = {},
|
|
386
|
-
{
|
|
410
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
411
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
387
412
|
) {
|
|
388
413
|
const {
|
|
389
414
|
error,
|
|
@@ -421,12 +446,12 @@ class Serviceability {
|
|
|
421
446
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/zones`,
|
|
422
447
|
query_params,
|
|
423
448
|
body,
|
|
424
|
-
|
|
425
|
-
{
|
|
449
|
+
requestHeaders,
|
|
450
|
+
{ responseHeaders }
|
|
426
451
|
);
|
|
427
452
|
|
|
428
453
|
let responseData = response;
|
|
429
|
-
if (
|
|
454
|
+
if (responseHeaders) {
|
|
430
455
|
responseData = response[0];
|
|
431
456
|
}
|
|
432
457
|
|
|
@@ -451,6 +476,7 @@ class Serviceability {
|
|
|
451
476
|
* @param {ServiceabilityPlatformApplicationValidator.GetZonesFromApplicationIdViewParam} arg
|
|
452
477
|
* - Arg object
|
|
453
478
|
*
|
|
479
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
454
480
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
455
481
|
* @returns {Promise<ServiceabilityPlatformModel.GetZoneFromApplicationIdViewResponse>}
|
|
456
482
|
* - Success response
|
|
@@ -460,8 +486,8 @@ class Serviceability {
|
|
|
460
486
|
* @description: This API returns zones from the application_id View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZonesFromApplicationIdView/).
|
|
461
487
|
*/
|
|
462
488
|
async getZonesFromApplicationIdView(
|
|
463
|
-
{ pageNo, pageSize, zoneId, q } = {},
|
|
464
|
-
{
|
|
489
|
+
{ pageNo, pageSize, zoneId, q, requestHeaders } = { requestHeaders: {} },
|
|
490
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
465
491
|
) {
|
|
466
492
|
const {
|
|
467
493
|
error,
|
|
@@ -509,12 +535,12 @@ class Serviceability {
|
|
|
509
535
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/zones`,
|
|
510
536
|
query_params,
|
|
511
537
|
undefined,
|
|
512
|
-
|
|
513
|
-
{
|
|
538
|
+
requestHeaders,
|
|
539
|
+
{ responseHeaders }
|
|
514
540
|
);
|
|
515
541
|
|
|
516
542
|
let responseData = response;
|
|
517
|
-
if (
|
|
543
|
+
if (responseHeaders) {
|
|
518
544
|
responseData = response[0];
|
|
519
545
|
}
|
|
520
546
|
|
|
@@ -536,24 +562,25 @@ class Serviceability {
|
|
|
536
562
|
}
|
|
537
563
|
|
|
538
564
|
/**
|
|
539
|
-
* @param {ServiceabilityPlatformApplicationValidator.
|
|
565
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationServiceabilityParam} arg
|
|
540
566
|
* - Arg object
|
|
541
567
|
*
|
|
568
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
542
569
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
543
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
570
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse>}
|
|
544
571
|
* - Success response
|
|
545
572
|
*
|
|
546
|
-
* @name
|
|
547
|
-
* @summary:
|
|
548
|
-
* @description: This API updates
|
|
573
|
+
* @name updateApplicationServiceability
|
|
574
|
+
* @summary: Zone configuration of application.
|
|
575
|
+
* @description: This API updates serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationServiceability/).
|
|
549
576
|
*/
|
|
550
|
-
async
|
|
551
|
-
{ body } = {},
|
|
552
|
-
{
|
|
577
|
+
async updateApplicationServiceability(
|
|
578
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
579
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
553
580
|
) {
|
|
554
581
|
const {
|
|
555
582
|
error,
|
|
556
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
583
|
+
} = ServiceabilityPlatformApplicationValidator.updateApplicationServiceability().validate(
|
|
557
584
|
{
|
|
558
585
|
body,
|
|
559
586
|
},
|
|
@@ -566,7 +593,7 @@ class Serviceability {
|
|
|
566
593
|
// Showing warrnings if extra unknown parameters are found
|
|
567
594
|
const {
|
|
568
595
|
error: warrning,
|
|
569
|
-
} = ServiceabilityPlatformApplicationValidator.
|
|
596
|
+
} = ServiceabilityPlatformApplicationValidator.updateApplicationServiceability().validate(
|
|
570
597
|
{
|
|
571
598
|
body,
|
|
572
599
|
},
|
|
@@ -575,7 +602,7 @@ class Serviceability {
|
|
|
575
602
|
if (warrning) {
|
|
576
603
|
Logger({
|
|
577
604
|
level: "WARN",
|
|
578
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
605
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateApplicationServiceability \n ${warrning}`,
|
|
579
606
|
});
|
|
580
607
|
}
|
|
581
608
|
|
|
@@ -583,22 +610,22 @@ class Serviceability {
|
|
|
583
610
|
|
|
584
611
|
const response = await PlatformAPIClient.execute(
|
|
585
612
|
this.config,
|
|
586
|
-
"
|
|
587
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
613
|
+
"post",
|
|
614
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/serviceability`,
|
|
588
615
|
query_params,
|
|
589
616
|
body,
|
|
590
|
-
|
|
591
|
-
{
|
|
617
|
+
requestHeaders,
|
|
618
|
+
{ responseHeaders }
|
|
592
619
|
);
|
|
593
620
|
|
|
594
621
|
let responseData = response;
|
|
595
|
-
if (
|
|
622
|
+
if (responseHeaders) {
|
|
596
623
|
responseData = response[0];
|
|
597
624
|
}
|
|
598
625
|
|
|
599
626
|
const {
|
|
600
627
|
error: res_error,
|
|
601
|
-
} = ServiceabilityPlatformModel.
|
|
628
|
+
} = ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse().validate(
|
|
602
629
|
responseData,
|
|
603
630
|
{ abortEarly: false, allowUnknown: false }
|
|
604
631
|
);
|
|
@@ -606,7 +633,7 @@ class Serviceability {
|
|
|
606
633
|
if (res_error) {
|
|
607
634
|
Logger({
|
|
608
635
|
level: "WARN",
|
|
609
|
-
message: `Response Validation Warnnings for platform > Serviceability >
|
|
636
|
+
message: `Response Validation Warnnings for platform > Serviceability > updateApplicationServiceability \n ${res_error}`,
|
|
610
637
|
});
|
|
611
638
|
}
|
|
612
639
|
|
|
@@ -617,6 +644,7 @@ class Serviceability {
|
|
|
617
644
|
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam} arg
|
|
618
645
|
* - Arg object
|
|
619
646
|
*
|
|
647
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
620
648
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
621
649
|
* @returns {Promise<ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResponseData>}
|
|
622
650
|
* - Success response
|
|
@@ -626,8 +654,8 @@ class Serviceability {
|
|
|
626
654
|
* @description: This API returns Audit logs of Pincode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeAuditHistory/).
|
|
627
655
|
*/
|
|
628
656
|
async updatePincodeAuditHistory(
|
|
629
|
-
{ body } = {},
|
|
630
|
-
{
|
|
657
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
658
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
631
659
|
) {
|
|
632
660
|
const {
|
|
633
661
|
error,
|
|
@@ -665,12 +693,12 @@ class Serviceability {
|
|
|
665
693
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/history`,
|
|
666
694
|
query_params,
|
|
667
695
|
body,
|
|
668
|
-
|
|
669
|
-
{
|
|
696
|
+
requestHeaders,
|
|
697
|
+
{ responseHeaders }
|
|
670
698
|
);
|
|
671
699
|
|
|
672
700
|
let responseData = response;
|
|
673
|
-
if (
|
|
701
|
+
if (responseHeaders) {
|
|
674
702
|
responseData = response[0];
|
|
675
703
|
}
|
|
676
704
|
|
|
@@ -695,6 +723,7 @@ class Serviceability {
|
|
|
695
723
|
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeBulkViewParam} arg
|
|
696
724
|
* - Arg object
|
|
697
725
|
*
|
|
726
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
698
727
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
699
728
|
* @returns {Promise<ServiceabilityPlatformModel.PincodeBulkViewResponse>}
|
|
700
729
|
* - Success response
|
|
@@ -703,7 +732,10 @@ class Serviceability {
|
|
|
703
732
|
* @summary: Bulk Update of pincode in the application.
|
|
704
733
|
* @description: This API constructs bulk write operations to update the MOP data for each pincode in the payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeBulkView/).
|
|
705
734
|
*/
|
|
706
|
-
async updatePincodeBulkView(
|
|
735
|
+
async updatePincodeBulkView(
|
|
736
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
737
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
738
|
+
) {
|
|
707
739
|
const {
|
|
708
740
|
error,
|
|
709
741
|
} = ServiceabilityPlatformApplicationValidator.updatePincodeBulkView().validate(
|
|
@@ -740,12 +772,12 @@ class Serviceability {
|
|
|
740
772
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pincode-mop-bulk-update`,
|
|
741
773
|
query_params,
|
|
742
774
|
body,
|
|
743
|
-
|
|
744
|
-
{
|
|
775
|
+
requestHeaders,
|
|
776
|
+
{ responseHeaders }
|
|
745
777
|
);
|
|
746
778
|
|
|
747
779
|
let responseData = response;
|
|
748
|
-
if (
|
|
780
|
+
if (responseHeaders) {
|
|
749
781
|
responseData = response[0];
|
|
750
782
|
}
|
|
751
783
|
|
|
@@ -770,6 +802,7 @@ class Serviceability {
|
|
|
770
802
|
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeCoDListingParam} arg
|
|
771
803
|
* - Arg object
|
|
772
804
|
*
|
|
805
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
773
806
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
774
807
|
* @returns {Promise<ServiceabilityPlatformModel.PincodeCodStatusListingResponse>}
|
|
775
808
|
* - Success response
|
|
@@ -779,8 +812,8 @@ class Serviceability {
|
|
|
779
812
|
* @description: This API returns count of active pincode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeCoDListing/).
|
|
780
813
|
*/
|
|
781
814
|
async updatePincodeCoDListing(
|
|
782
|
-
{ body } = {},
|
|
783
|
-
{
|
|
815
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
816
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
784
817
|
) {
|
|
785
818
|
const {
|
|
786
819
|
error,
|
|
@@ -818,12 +851,12 @@ class Serviceability {
|
|
|
818
851
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pincode-mop-data`,
|
|
819
852
|
query_params,
|
|
820
853
|
body,
|
|
821
|
-
|
|
822
|
-
{
|
|
854
|
+
requestHeaders,
|
|
855
|
+
{ responseHeaders }
|
|
823
856
|
);
|
|
824
857
|
|
|
825
858
|
let responseData = response;
|
|
826
|
-
if (
|
|
859
|
+
if (responseHeaders) {
|
|
827
860
|
responseData = response[0];
|
|
828
861
|
}
|
|
829
862
|
|
|
@@ -848,6 +881,7 @@ class Serviceability {
|
|
|
848
881
|
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeMopViewParam} arg
|
|
849
882
|
* - Arg object
|
|
850
883
|
*
|
|
884
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
851
885
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
852
886
|
* @returns {Promise<ServiceabilityPlatformModel.PincodeMOPresponse>} -
|
|
853
887
|
* Success response
|
|
@@ -855,7 +889,10 @@ class Serviceability {
|
|
|
855
889
|
* @summary: PincodeView update of MOP.
|
|
856
890
|
* @description: This API updates Pincode method of payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeMopView/).
|
|
857
891
|
*/
|
|
858
|
-
async updatePincodeMopView(
|
|
892
|
+
async updatePincodeMopView(
|
|
893
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
894
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
895
|
+
) {
|
|
859
896
|
const {
|
|
860
897
|
error,
|
|
861
898
|
} = ServiceabilityPlatformApplicationValidator.updatePincodeMopView().validate(
|
|
@@ -892,12 +929,12 @@ class Serviceability {
|
|
|
892
929
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pincode-mop-update`,
|
|
893
930
|
query_params,
|
|
894
931
|
body,
|
|
895
|
-
|
|
896
|
-
{
|
|
932
|
+
requestHeaders,
|
|
933
|
+
{ responseHeaders }
|
|
897
934
|
);
|
|
898
935
|
|
|
899
936
|
let responseData = response;
|
|
900
|
-
if (
|
|
937
|
+
if (responseHeaders) {
|
|
901
938
|
responseData = response[0];
|
|
902
939
|
}
|
|
903
940
|
|
|
@@ -918,10 +955,90 @@ class Serviceability {
|
|
|
918
955
|
return response;
|
|
919
956
|
}
|
|
920
957
|
|
|
958
|
+
/**
|
|
959
|
+
* @param {ServiceabilityPlatformApplicationValidator.UpdateSelfShipParam} arg
|
|
960
|
+
* - Arg object
|
|
961
|
+
*
|
|
962
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
963
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
964
|
+
* @returns {Promise<ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse>}
|
|
965
|
+
* - Success response
|
|
966
|
+
*
|
|
967
|
+
* @name updateSelfShip
|
|
968
|
+
* @summary: Self-ship configuration of application.
|
|
969
|
+
* @description: This API updates Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateSelfShip/).
|
|
970
|
+
*/
|
|
971
|
+
async updateSelfShip(
|
|
972
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
973
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
974
|
+
) {
|
|
975
|
+
const {
|
|
976
|
+
error,
|
|
977
|
+
} = ServiceabilityPlatformApplicationValidator.updateSelfShip().validate(
|
|
978
|
+
{
|
|
979
|
+
body,
|
|
980
|
+
},
|
|
981
|
+
{ abortEarly: false, allowUnknown: true }
|
|
982
|
+
);
|
|
983
|
+
if (error) {
|
|
984
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// Showing warrnings if extra unknown parameters are found
|
|
988
|
+
const {
|
|
989
|
+
error: warrning,
|
|
990
|
+
} = ServiceabilityPlatformApplicationValidator.updateSelfShip().validate(
|
|
991
|
+
{
|
|
992
|
+
body,
|
|
993
|
+
},
|
|
994
|
+
{ abortEarly: false, allowUnknown: false }
|
|
995
|
+
);
|
|
996
|
+
if (warrning) {
|
|
997
|
+
Logger({
|
|
998
|
+
level: "WARN",
|
|
999
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateSelfShip \n ${warrning}`,
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
const query_params = {};
|
|
1004
|
+
|
|
1005
|
+
const response = await PlatformAPIClient.execute(
|
|
1006
|
+
this.config,
|
|
1007
|
+
"patch",
|
|
1008
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/selfship`,
|
|
1009
|
+
query_params,
|
|
1010
|
+
body,
|
|
1011
|
+
requestHeaders,
|
|
1012
|
+
{ responseHeaders }
|
|
1013
|
+
);
|
|
1014
|
+
|
|
1015
|
+
let responseData = response;
|
|
1016
|
+
if (responseHeaders) {
|
|
1017
|
+
responseData = response[0];
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
const {
|
|
1021
|
+
error: res_error,
|
|
1022
|
+
} = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate(
|
|
1023
|
+
responseData,
|
|
1024
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1025
|
+
);
|
|
1026
|
+
|
|
1027
|
+
if (res_error) {
|
|
1028
|
+
Logger({
|
|
1029
|
+
level: "WARN",
|
|
1030
|
+
message: `Response Validation Warnnings for platform > Serviceability > updateSelfShip \n ${res_error}`,
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
return response;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
921
1037
|
/**
|
|
922
1038
|
* @param {ServiceabilityPlatformApplicationValidator.UpsertDpApplicationRulesParam} arg
|
|
923
1039
|
* - Arg object
|
|
924
1040
|
*
|
|
1041
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
925
1042
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
926
1043
|
* @returns {Promise<ServiceabilityPlatformModel.DPApplicationRuleResponse>}
|
|
927
1044
|
* - Success response
|
|
@@ -931,8 +1048,8 @@ class Serviceability {
|
|
|
931
1048
|
* @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/).
|
|
932
1049
|
*/
|
|
933
1050
|
async upsertDpApplicationRules(
|
|
934
|
-
{ body } = {},
|
|
935
|
-
{
|
|
1051
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1052
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
936
1053
|
) {
|
|
937
1054
|
const {
|
|
938
1055
|
error,
|
|
@@ -970,12 +1087,12 @@ class Serviceability {
|
|
|
970
1087
|
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier/priority`,
|
|
971
1088
|
query_params,
|
|
972
1089
|
body,
|
|
973
|
-
|
|
974
|
-
{
|
|
1090
|
+
requestHeaders,
|
|
1091
|
+
{ responseHeaders }
|
|
975
1092
|
);
|
|
976
1093
|
|
|
977
1094
|
let responseData = response;
|
|
978
|
-
if (
|
|
1095
|
+
if (responseHeaders) {
|
|
979
1096
|
responseData = response[0];
|
|
980
1097
|
}
|
|
981
1098
|
|