@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1
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 +6 -4
- package/sdk/application/Cart/CartApplicationModel.js +6 -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 +90 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
- 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
|
@@ -13,13 +13,17 @@ class Order {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
16
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
16
17
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
18
|
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponse>} - Success response
|
|
18
19
|
* @name attachOrderUser
|
|
19
20
|
* @summary:
|
|
20
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
|
|
21
|
+
* @description: Attach Order User - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
|
|
21
22
|
*/
|
|
22
|
-
async attachOrderUser(
|
|
23
|
+
async attachOrderUser(
|
|
24
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
25
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
26
|
+
) {
|
|
23
27
|
const { error } = OrderPlatformValidator.attachOrderUser().validate(
|
|
24
28
|
{
|
|
25
29
|
body,
|
|
@@ -56,12 +60,12 @@ class Order {
|
|
|
56
60
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/attach`,
|
|
57
61
|
query_params,
|
|
58
62
|
body,
|
|
59
|
-
xHeaders,
|
|
60
|
-
{
|
|
63
|
+
{ ...xHeaders, ...requestHeaders },
|
|
64
|
+
{ responseHeaders }
|
|
61
65
|
);
|
|
62
66
|
|
|
63
67
|
let responseData = response;
|
|
64
|
-
if (
|
|
68
|
+
if (responseHeaders) {
|
|
65
69
|
responseData = response[0];
|
|
66
70
|
}
|
|
67
71
|
|
|
@@ -84,13 +88,17 @@ class Order {
|
|
|
84
88
|
|
|
85
89
|
/**
|
|
86
90
|
* @param {OrderPlatformValidator.CheckOrderStatusParam} arg - Arg object
|
|
91
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
87
92
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
88
93
|
* @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
|
|
89
94
|
* @name checkOrderStatus
|
|
90
95
|
* @summary:
|
|
91
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
|
|
96
|
+
* @description: Check order status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
|
|
92
97
|
*/
|
|
93
|
-
async checkOrderStatus(
|
|
98
|
+
async checkOrderStatus(
|
|
99
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
100
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
101
|
+
) {
|
|
94
102
|
const { error } = OrderPlatformValidator.checkOrderStatus().validate(
|
|
95
103
|
{
|
|
96
104
|
body,
|
|
@@ -127,12 +135,12 @@ class Order {
|
|
|
127
135
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/debug/order_status`,
|
|
128
136
|
query_params,
|
|
129
137
|
body,
|
|
130
|
-
xHeaders,
|
|
131
|
-
{
|
|
138
|
+
{ ...xHeaders, ...requestHeaders },
|
|
139
|
+
{ responseHeaders }
|
|
132
140
|
);
|
|
133
141
|
|
|
134
142
|
let responseData = response;
|
|
135
|
-
if (
|
|
143
|
+
if (responseHeaders) {
|
|
136
144
|
responseData = response[0];
|
|
137
145
|
}
|
|
138
146
|
|
|
@@ -155,15 +163,18 @@ class Order {
|
|
|
155
163
|
|
|
156
164
|
/**
|
|
157
165
|
* @param {OrderPlatformValidator.Click2CallParam} arg - Arg object
|
|
166
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
158
167
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
159
168
|
* @returns {Promise<OrderPlatformModel.Click2CallResponse>} - Success response
|
|
160
169
|
* @name click2Call
|
|
161
170
|
* @summary:
|
|
162
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/click2Call/).
|
|
171
|
+
* @description: Click to Call - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/click2Call/).
|
|
163
172
|
*/
|
|
164
173
|
async click2Call(
|
|
165
|
-
{ caller, receiver, bagId, callerId, method } = {
|
|
166
|
-
|
|
174
|
+
{ caller, receiver, bagId, callerId, method, requestHeaders } = {
|
|
175
|
+
requestHeaders: {},
|
|
176
|
+
},
|
|
177
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
167
178
|
) {
|
|
168
179
|
const { error } = OrderPlatformValidator.click2Call().validate(
|
|
169
180
|
{
|
|
@@ -214,12 +225,12 @@ class Order {
|
|
|
214
225
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/click2call`,
|
|
215
226
|
query_params,
|
|
216
227
|
undefined,
|
|
217
|
-
xHeaders,
|
|
218
|
-
{
|
|
228
|
+
{ ...xHeaders, ...requestHeaders },
|
|
229
|
+
{ responseHeaders }
|
|
219
230
|
);
|
|
220
231
|
|
|
221
232
|
let responseData = response;
|
|
222
|
-
if (
|
|
233
|
+
if (responseHeaders) {
|
|
223
234
|
responseData = response[0];
|
|
224
235
|
}
|
|
225
236
|
|
|
@@ -242,6 +253,7 @@ class Order {
|
|
|
242
253
|
|
|
243
254
|
/**
|
|
244
255
|
* @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
|
|
256
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
245
257
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
246
258
|
* @returns {Promise<OrderPlatformModel.CreateChannelConfigResponse>} -
|
|
247
259
|
* Success response
|
|
@@ -249,7 +261,10 @@ class Order {
|
|
|
249
261
|
* @summary:
|
|
250
262
|
* @description: createChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/).
|
|
251
263
|
*/
|
|
252
|
-
async createChannelConfig(
|
|
264
|
+
async createChannelConfig(
|
|
265
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
266
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
267
|
+
) {
|
|
253
268
|
const { error } = OrderPlatformValidator.createChannelConfig().validate(
|
|
254
269
|
{
|
|
255
270
|
body,
|
|
@@ -286,12 +301,12 @@ class Order {
|
|
|
286
301
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
287
302
|
query_params,
|
|
288
303
|
body,
|
|
289
|
-
xHeaders,
|
|
290
|
-
{
|
|
304
|
+
{ ...xHeaders, ...requestHeaders },
|
|
305
|
+
{ responseHeaders }
|
|
291
306
|
);
|
|
292
307
|
|
|
293
308
|
let responseData = response;
|
|
294
|
-
if (
|
|
309
|
+
if (responseHeaders) {
|
|
295
310
|
responseData = response[0];
|
|
296
311
|
}
|
|
297
312
|
|
|
@@ -314,13 +329,17 @@ class Order {
|
|
|
314
329
|
|
|
315
330
|
/**
|
|
316
331
|
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
332
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
317
333
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
318
334
|
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
319
335
|
* @name createOrder
|
|
320
336
|
* @summary:
|
|
321
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
337
|
+
* @description: Create Order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
322
338
|
*/
|
|
323
|
-
async createOrder(
|
|
339
|
+
async createOrder(
|
|
340
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
341
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
342
|
+
) {
|
|
324
343
|
const { error } = OrderPlatformValidator.createOrder().validate(
|
|
325
344
|
{
|
|
326
345
|
body,
|
|
@@ -355,12 +374,12 @@ class Order {
|
|
|
355
374
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/create-order`,
|
|
356
375
|
query_params,
|
|
357
376
|
body,
|
|
358
|
-
xHeaders,
|
|
359
|
-
{
|
|
377
|
+
{ ...xHeaders, ...requestHeaders },
|
|
378
|
+
{ responseHeaders }
|
|
360
379
|
);
|
|
361
380
|
|
|
362
381
|
let responseData = response;
|
|
363
|
-
if (
|
|
382
|
+
if (responseHeaders) {
|
|
364
383
|
responseData = response[0];
|
|
365
384
|
}
|
|
366
385
|
|
|
@@ -383,13 +402,17 @@ class Order {
|
|
|
383
402
|
|
|
384
403
|
/**
|
|
385
404
|
* @param {OrderPlatformValidator.DispatchManifestParam} arg - Arg object
|
|
405
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
386
406
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
387
407
|
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
388
408
|
* @name dispatchManifest
|
|
389
409
|
* @summary:
|
|
390
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifest/).
|
|
410
|
+
* @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifest/).
|
|
391
411
|
*/
|
|
392
|
-
async dispatchManifest(
|
|
412
|
+
async dispatchManifest(
|
|
413
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
414
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
415
|
+
) {
|
|
393
416
|
const { error } = OrderPlatformValidator.dispatchManifest().validate(
|
|
394
417
|
{
|
|
395
418
|
body,
|
|
@@ -426,12 +449,12 @@ class Order {
|
|
|
426
449
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`,
|
|
427
450
|
query_params,
|
|
428
451
|
body,
|
|
429
|
-
xHeaders,
|
|
430
|
-
{
|
|
452
|
+
{ ...xHeaders, ...requestHeaders },
|
|
453
|
+
{ responseHeaders }
|
|
431
454
|
);
|
|
432
455
|
|
|
433
456
|
let responseData = response;
|
|
434
|
-
if (
|
|
457
|
+
if (responseHeaders) {
|
|
435
458
|
responseData = response[0];
|
|
436
459
|
}
|
|
437
460
|
|
|
@@ -454,15 +477,16 @@ class Order {
|
|
|
454
477
|
|
|
455
478
|
/**
|
|
456
479
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
480
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
457
481
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
458
482
|
* @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
|
|
459
483
|
* @name downloadBulkActionTemplate
|
|
460
484
|
* @summary:
|
|
461
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
|
|
485
|
+
* @description: Download bulk actions seller templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
|
|
462
486
|
*/
|
|
463
487
|
async downloadBulkActionTemplate(
|
|
464
|
-
{ templateSlug } = {},
|
|
465
|
-
{
|
|
488
|
+
{ templateSlug, requestHeaders } = { requestHeaders: {} },
|
|
489
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
466
490
|
) {
|
|
467
491
|
const {
|
|
468
492
|
error,
|
|
@@ -503,12 +527,12 @@ class Order {
|
|
|
503
527
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bulk-action/download-seller-templates`,
|
|
504
528
|
query_params,
|
|
505
529
|
undefined,
|
|
506
|
-
xHeaders,
|
|
507
|
-
{
|
|
530
|
+
{ ...xHeaders, ...requestHeaders },
|
|
531
|
+
{ responseHeaders }
|
|
508
532
|
);
|
|
509
533
|
|
|
510
534
|
let responseData = response;
|
|
511
|
-
if (
|
|
535
|
+
if (responseHeaders) {
|
|
512
536
|
responseData = response[0];
|
|
513
537
|
}
|
|
514
538
|
|
|
@@ -529,19 +553,169 @@ class Order {
|
|
|
529
553
|
return response;
|
|
530
554
|
}
|
|
531
555
|
|
|
556
|
+
/**
|
|
557
|
+
* @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
|
|
558
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
559
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
560
|
+
* @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponse>} -
|
|
561
|
+
* Success response
|
|
562
|
+
* @name downloadLanesReport
|
|
563
|
+
* @summary:
|
|
564
|
+
* @description: downloads lanes shipment/orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
|
|
565
|
+
*/
|
|
566
|
+
async downloadLanesReport(
|
|
567
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
568
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
569
|
+
) {
|
|
570
|
+
const { error } = OrderPlatformValidator.downloadLanesReport().validate(
|
|
571
|
+
{
|
|
572
|
+
body,
|
|
573
|
+
},
|
|
574
|
+
{ abortEarly: false, allowUnknown: true }
|
|
575
|
+
);
|
|
576
|
+
if (error) {
|
|
577
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// Showing warrnings if extra unknown parameters are found
|
|
581
|
+
const {
|
|
582
|
+
error: warrning,
|
|
583
|
+
} = OrderPlatformValidator.downloadLanesReport().validate(
|
|
584
|
+
{
|
|
585
|
+
body,
|
|
586
|
+
},
|
|
587
|
+
{ abortEarly: false, allowUnknown: false }
|
|
588
|
+
);
|
|
589
|
+
if (warrning) {
|
|
590
|
+
Logger({
|
|
591
|
+
level: "WARN",
|
|
592
|
+
message: `Parameter Validation warrnings for platform > Order > downloadLanesReport \n ${warrning}`,
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
const query_params = {};
|
|
597
|
+
|
|
598
|
+
const xHeaders = {};
|
|
599
|
+
|
|
600
|
+
const response = await PlatformAPIClient.execute(
|
|
601
|
+
this.config,
|
|
602
|
+
"post",
|
|
603
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/reports/lanes/download`,
|
|
604
|
+
query_params,
|
|
605
|
+
body,
|
|
606
|
+
{ ...xHeaders, ...requestHeaders },
|
|
607
|
+
{ responseHeaders }
|
|
608
|
+
);
|
|
609
|
+
|
|
610
|
+
let responseData = response;
|
|
611
|
+
if (responseHeaders) {
|
|
612
|
+
responseData = response[0];
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
const {
|
|
616
|
+
error: res_error,
|
|
617
|
+
} = OrderPlatformModel.BulkReportsDownloadResponse().validate(
|
|
618
|
+
responseData,
|
|
619
|
+
{ abortEarly: false, allowUnknown: false }
|
|
620
|
+
);
|
|
621
|
+
|
|
622
|
+
if (res_error) {
|
|
623
|
+
Logger({
|
|
624
|
+
level: "WARN",
|
|
625
|
+
message: `Response Validation Warnnings for platform > Order > downloadLanesReport \n ${res_error}`,
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
return response;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
|
|
634
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
635
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
636
|
+
* @returns {Promise<OrderPlatformModel.EInvoiceRetryResponse>} - Success response
|
|
637
|
+
* @name eInvoiceRetry
|
|
638
|
+
* @summary:
|
|
639
|
+
* @description: Retry e-invoice after failure - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
|
|
640
|
+
*/
|
|
641
|
+
async eInvoiceRetry(
|
|
642
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
643
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
644
|
+
) {
|
|
645
|
+
const { error } = OrderPlatformValidator.eInvoiceRetry().validate(
|
|
646
|
+
{
|
|
647
|
+
body,
|
|
648
|
+
},
|
|
649
|
+
{ abortEarly: false, allowUnknown: true }
|
|
650
|
+
);
|
|
651
|
+
if (error) {
|
|
652
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// Showing warrnings if extra unknown parameters are found
|
|
656
|
+
const { error: warrning } = OrderPlatformValidator.eInvoiceRetry().validate(
|
|
657
|
+
{
|
|
658
|
+
body,
|
|
659
|
+
},
|
|
660
|
+
{ abortEarly: false, allowUnknown: false }
|
|
661
|
+
);
|
|
662
|
+
if (warrning) {
|
|
663
|
+
Logger({
|
|
664
|
+
level: "WARN",
|
|
665
|
+
message: `Parameter Validation warrnings for platform > Order > eInvoiceRetry \n ${warrning}`,
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
const query_params = {};
|
|
670
|
+
|
|
671
|
+
const xHeaders = {};
|
|
672
|
+
|
|
673
|
+
const response = await PlatformAPIClient.execute(
|
|
674
|
+
this.config,
|
|
675
|
+
"post",
|
|
676
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/einvoice/retry/irn`,
|
|
677
|
+
query_params,
|
|
678
|
+
body,
|
|
679
|
+
{ ...xHeaders, ...requestHeaders },
|
|
680
|
+
{ responseHeaders }
|
|
681
|
+
);
|
|
682
|
+
|
|
683
|
+
let responseData = response;
|
|
684
|
+
if (responseHeaders) {
|
|
685
|
+
responseData = response[0];
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
const {
|
|
689
|
+
error: res_error,
|
|
690
|
+
} = OrderPlatformModel.EInvoiceRetryResponse().validate(responseData, {
|
|
691
|
+
abortEarly: false,
|
|
692
|
+
allowUnknown: false,
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
if (res_error) {
|
|
696
|
+
Logger({
|
|
697
|
+
level: "WARN",
|
|
698
|
+
message: `Response Validation Warnnings for platform > Order > eInvoiceRetry \n ${res_error}`,
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
return response;
|
|
703
|
+
}
|
|
704
|
+
|
|
532
705
|
/**
|
|
533
706
|
* @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object
|
|
707
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
534
708
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
535
709
|
* @returns {Promise<OrderPlatformModel.FetchCreditBalanceResponsePayload>}
|
|
536
710
|
* - Success response
|
|
537
711
|
*
|
|
538
712
|
* @name fetchCreditBalanceDetail
|
|
539
713
|
* @summary:
|
|
540
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/).
|
|
714
|
+
* @description: Fetch Credit Balance Detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/).
|
|
541
715
|
*/
|
|
542
716
|
async fetchCreditBalanceDetail(
|
|
543
|
-
{ body } = {},
|
|
544
|
-
{
|
|
717
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
718
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
545
719
|
) {
|
|
546
720
|
const {
|
|
547
721
|
error,
|
|
@@ -581,12 +755,12 @@ class Order {
|
|
|
581
755
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`,
|
|
582
756
|
query_params,
|
|
583
757
|
body,
|
|
584
|
-
xHeaders,
|
|
585
|
-
{
|
|
758
|
+
{ ...xHeaders, ...requestHeaders },
|
|
759
|
+
{ responseHeaders }
|
|
586
760
|
);
|
|
587
761
|
|
|
588
762
|
let responseData = response;
|
|
589
|
-
if (
|
|
763
|
+
if (responseHeaders) {
|
|
590
764
|
responseData = response[0];
|
|
591
765
|
}
|
|
592
766
|
|
|
@@ -609,14 +783,18 @@ class Order {
|
|
|
609
783
|
|
|
610
784
|
/**
|
|
611
785
|
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
786
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
612
787
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
613
788
|
* @returns {Promise<OrderPlatformModel.RefundModeConfigResponsePayload>} -
|
|
614
789
|
* Success response
|
|
615
790
|
* @name fetchRefundModeConfig
|
|
616
791
|
* @summary:
|
|
617
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
|
|
792
|
+
* @description: Fetch Refund Mode Config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
|
|
618
793
|
*/
|
|
619
|
-
async fetchRefundModeConfig(
|
|
794
|
+
async fetchRefundModeConfig(
|
|
795
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
796
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
797
|
+
) {
|
|
620
798
|
const { error } = OrderPlatformValidator.fetchRefundModeConfig().validate(
|
|
621
799
|
{
|
|
622
800
|
body,
|
|
@@ -653,12 +831,12 @@ class Order {
|
|
|
653
831
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund-mode-config`,
|
|
654
832
|
query_params,
|
|
655
833
|
body,
|
|
656
|
-
xHeaders,
|
|
657
|
-
{
|
|
834
|
+
{ ...xHeaders, ...requestHeaders },
|
|
835
|
+
{ responseHeaders }
|
|
658
836
|
);
|
|
659
837
|
|
|
660
838
|
let responseData = response;
|
|
661
|
-
if (
|
|
839
|
+
if (responseHeaders) {
|
|
662
840
|
responseData = response[0];
|
|
663
841
|
}
|
|
664
842
|
|
|
@@ -681,16 +859,19 @@ class Order {
|
|
|
681
859
|
|
|
682
860
|
/**
|
|
683
861
|
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
862
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
684
863
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
685
864
|
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>} -
|
|
686
865
|
* Success response
|
|
687
866
|
* @name generatePOSReceiptByOrderId
|
|
688
867
|
* @summary:
|
|
689
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
868
|
+
* @description: Generate POS recipt by order id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
690
869
|
*/
|
|
691
870
|
async generatePOSReceiptByOrderId(
|
|
692
|
-
{ orderId, shipmentId, documentType } = {
|
|
693
|
-
|
|
871
|
+
{ orderId, shipmentId, documentType, requestHeaders } = {
|
|
872
|
+
requestHeaders: {},
|
|
873
|
+
},
|
|
874
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
694
875
|
) {
|
|
695
876
|
const {
|
|
696
877
|
error,
|
|
@@ -736,12 +917,12 @@ class Order {
|
|
|
736
917
|
`/service/platform/order/v1.0/company/${this.config.companyId}/orders/${orderId}/generate/pos-receipt`,
|
|
737
918
|
query_params,
|
|
738
919
|
undefined,
|
|
739
|
-
xHeaders,
|
|
740
|
-
{
|
|
920
|
+
{ ...xHeaders, ...requestHeaders },
|
|
921
|
+
{ responseHeaders }
|
|
741
922
|
);
|
|
742
923
|
|
|
743
924
|
let responseData = response;
|
|
744
|
-
if (
|
|
925
|
+
if (responseHeaders) {
|
|
745
926
|
responseData = response[0];
|
|
746
927
|
}
|
|
747
928
|
|
|
@@ -762,15 +943,102 @@ class Order {
|
|
|
762
943
|
return response;
|
|
763
944
|
}
|
|
764
945
|
|
|
946
|
+
/**
|
|
947
|
+
* @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
|
|
948
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
949
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
950
|
+
* @returns {Promise<OrderPlatformModel.RoleBaseStateTransitionMapping>} -
|
|
951
|
+
* Success response
|
|
952
|
+
* @name getAllowedStateTransition
|
|
953
|
+
* @summary: To fetch next state transitions.
|
|
954
|
+
* @description: This endpoint will fetch next possible states based on logged in user
|
|
955
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedStateTransition/).
|
|
956
|
+
*/
|
|
957
|
+
async getAllowedStateTransition(
|
|
958
|
+
{ orderingChannel, status, requestHeaders } = { requestHeaders: {} },
|
|
959
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
960
|
+
) {
|
|
961
|
+
const {
|
|
962
|
+
error,
|
|
963
|
+
} = OrderPlatformValidator.getAllowedStateTransition().validate(
|
|
964
|
+
{
|
|
965
|
+
orderingChannel,
|
|
966
|
+
status,
|
|
967
|
+
},
|
|
968
|
+
{ abortEarly: false, allowUnknown: true }
|
|
969
|
+
);
|
|
970
|
+
if (error) {
|
|
971
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
// Showing warrnings if extra unknown parameters are found
|
|
975
|
+
const {
|
|
976
|
+
error: warrning,
|
|
977
|
+
} = OrderPlatformValidator.getAllowedStateTransition().validate(
|
|
978
|
+
{
|
|
979
|
+
orderingChannel,
|
|
980
|
+
status,
|
|
981
|
+
},
|
|
982
|
+
{ abortEarly: false, allowUnknown: false }
|
|
983
|
+
);
|
|
984
|
+
if (warrning) {
|
|
985
|
+
Logger({
|
|
986
|
+
level: "WARN",
|
|
987
|
+
message: `Parameter Validation warrnings for platform > Order > getAllowedStateTransition \n ${warrning}`,
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
const query_params = {};
|
|
992
|
+
query_params["ordering_channel"] = orderingChannel;
|
|
993
|
+
query_params["status"] = status;
|
|
994
|
+
|
|
995
|
+
const xHeaders = {};
|
|
996
|
+
|
|
997
|
+
const response = await PlatformAPIClient.execute(
|
|
998
|
+
this.config,
|
|
999
|
+
"get",
|
|
1000
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/allowed/state/transition`,
|
|
1001
|
+
query_params,
|
|
1002
|
+
undefined,
|
|
1003
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1004
|
+
{ responseHeaders }
|
|
1005
|
+
);
|
|
1006
|
+
|
|
1007
|
+
let responseData = response;
|
|
1008
|
+
if (responseHeaders) {
|
|
1009
|
+
responseData = response[0];
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
const {
|
|
1013
|
+
error: res_error,
|
|
1014
|
+
} = OrderPlatformModel.RoleBaseStateTransitionMapping().validate(
|
|
1015
|
+
responseData,
|
|
1016
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1017
|
+
);
|
|
1018
|
+
|
|
1019
|
+
if (res_error) {
|
|
1020
|
+
Logger({
|
|
1021
|
+
level: "WARN",
|
|
1022
|
+
message: `Response Validation Warnnings for platform > Order > getAllowedStateTransition \n ${res_error}`,
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
return response;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
765
1029
|
/**
|
|
766
1030
|
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1031
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
767
1032
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
768
1033
|
* @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
|
|
769
1034
|
* @name getAnnouncements
|
|
770
1035
|
* @summary:
|
|
771
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
1036
|
+
* @description: Get Announcements - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
772
1037
|
*/
|
|
773
|
-
async getAnnouncements(
|
|
1038
|
+
async getAnnouncements(
|
|
1039
|
+
{ date, requestHeaders } = { requestHeaders: {} },
|
|
1040
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1041
|
+
) {
|
|
774
1042
|
const { error } = OrderPlatformValidator.getAnnouncements().validate(
|
|
775
1043
|
{
|
|
776
1044
|
date,
|
|
@@ -808,12 +1076,12 @@ class Order {
|
|
|
808
1076
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/announcements`,
|
|
809
1077
|
query_params,
|
|
810
1078
|
undefined,
|
|
811
|
-
xHeaders,
|
|
812
|
-
{
|
|
1079
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1080
|
+
{ responseHeaders }
|
|
813
1081
|
);
|
|
814
1082
|
|
|
815
1083
|
let responseData = response;
|
|
816
|
-
if (
|
|
1084
|
+
if (responseHeaders) {
|
|
817
1085
|
responseData = response[0];
|
|
818
1086
|
}
|
|
819
1087
|
|
|
@@ -836,16 +1104,17 @@ class Order {
|
|
|
836
1104
|
|
|
837
1105
|
/**
|
|
838
1106
|
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1107
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
839
1108
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
840
1109
|
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
|
|
841
1110
|
* Success response
|
|
842
1111
|
* @name getBagById
|
|
843
1112
|
* @summary:
|
|
844
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
1113
|
+
* @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
845
1114
|
*/
|
|
846
1115
|
async getBagById(
|
|
847
|
-
{ bagId, channelBagId, channelId } = {},
|
|
848
|
-
{
|
|
1116
|
+
{ bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
|
|
1117
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
849
1118
|
) {
|
|
850
1119
|
const { error } = OrderPlatformValidator.getBagById().validate(
|
|
851
1120
|
{
|
|
@@ -888,12 +1157,12 @@ class Order {
|
|
|
888
1157
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bag-details/`,
|
|
889
1158
|
query_params,
|
|
890
1159
|
undefined,
|
|
891
|
-
xHeaders,
|
|
892
|
-
{
|
|
1160
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1161
|
+
{ responseHeaders }
|
|
893
1162
|
);
|
|
894
1163
|
|
|
895
1164
|
let responseData = response;
|
|
896
|
-
if (
|
|
1165
|
+
if (responseHeaders) {
|
|
897
1166
|
responseData = response[0];
|
|
898
1167
|
}
|
|
899
1168
|
|
|
@@ -916,11 +1185,12 @@ class Order {
|
|
|
916
1185
|
|
|
917
1186
|
/**
|
|
918
1187
|
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
1188
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
919
1189
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
920
1190
|
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponse>} - Success response
|
|
921
1191
|
* @name getBags
|
|
922
1192
|
* @summary:
|
|
923
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
1193
|
+
* @description: Get Bags for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
924
1194
|
*/
|
|
925
1195
|
async getBags(
|
|
926
1196
|
{
|
|
@@ -933,8 +1203,9 @@ class Order {
|
|
|
933
1203
|
channelId,
|
|
934
1204
|
pageNo,
|
|
935
1205
|
pageSize,
|
|
936
|
-
|
|
937
|
-
|
|
1206
|
+
requestHeaders,
|
|
1207
|
+
} = { requestHeaders: {} },
|
|
1208
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
938
1209
|
) {
|
|
939
1210
|
const { error } = OrderPlatformValidator.getBags().validate(
|
|
940
1211
|
{
|
|
@@ -995,12 +1266,12 @@ class Order {
|
|
|
995
1266
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bags`,
|
|
996
1267
|
query_params,
|
|
997
1268
|
undefined,
|
|
998
|
-
xHeaders,
|
|
999
|
-
{
|
|
1269
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1270
|
+
{ responseHeaders }
|
|
1000
1271
|
);
|
|
1001
1272
|
|
|
1002
1273
|
let responseData = response;
|
|
1003
|
-
if (
|
|
1274
|
+
if (responseHeaders) {
|
|
1004
1275
|
responseData = response[0];
|
|
1005
1276
|
}
|
|
1006
1277
|
|
|
@@ -1023,14 +1294,18 @@ class Order {
|
|
|
1023
1294
|
|
|
1024
1295
|
/**
|
|
1025
1296
|
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1297
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1026
1298
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1027
1299
|
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponse>} -
|
|
1028
1300
|
* Success response
|
|
1029
1301
|
* @name getBulkActionTemplate
|
|
1030
1302
|
* @summary:
|
|
1031
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
|
|
1303
|
+
* @description: Get Bulk Action seller templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
|
|
1032
1304
|
*/
|
|
1033
|
-
async getBulkActionTemplate(
|
|
1305
|
+
async getBulkActionTemplate(
|
|
1306
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1307
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1308
|
+
) {
|
|
1034
1309
|
const { error } = OrderPlatformValidator.getBulkActionTemplate().validate(
|
|
1035
1310
|
{},
|
|
1036
1311
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1063,12 +1338,12 @@ class Order {
|
|
|
1063
1338
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bulk-action/get-seller-templates`,
|
|
1064
1339
|
query_params,
|
|
1065
1340
|
undefined,
|
|
1066
|
-
xHeaders,
|
|
1067
|
-
{
|
|
1341
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1342
|
+
{ responseHeaders }
|
|
1068
1343
|
);
|
|
1069
1344
|
|
|
1070
1345
|
let responseData = response;
|
|
1071
|
-
if (
|
|
1346
|
+
if (responseHeaders) {
|
|
1072
1347
|
responseData = response[0];
|
|
1073
1348
|
}
|
|
1074
1349
|
|
|
@@ -1091,11 +1366,12 @@ class Order {
|
|
|
1091
1366
|
|
|
1092
1367
|
/**
|
|
1093
1368
|
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1369
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1094
1370
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1095
1371
|
* @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
|
|
1096
1372
|
* @name getBulkShipmentExcelFile
|
|
1097
1373
|
* @summary:
|
|
1098
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
|
|
1374
|
+
* @description: Generate Bulk Shipment Excel Report. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
|
|
1099
1375
|
*/
|
|
1100
1376
|
async getBulkShipmentExcelFile(
|
|
1101
1377
|
{
|
|
@@ -1111,8 +1387,9 @@ class Order {
|
|
|
1111
1387
|
timeToDispatch,
|
|
1112
1388
|
pageNo,
|
|
1113
1389
|
pageSize,
|
|
1114
|
-
|
|
1115
|
-
|
|
1390
|
+
requestHeaders,
|
|
1391
|
+
} = { requestHeaders: {} },
|
|
1392
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1116
1393
|
) {
|
|
1117
1394
|
const {
|
|
1118
1395
|
error,
|
|
@@ -1186,12 +1463,12 @@ class Order {
|
|
|
1186
1463
|
`/service/platform/order/v1.0/company/${this.config.companyId}/generate/file`,
|
|
1187
1464
|
query_params,
|
|
1188
1465
|
undefined,
|
|
1189
|
-
xHeaders,
|
|
1190
|
-
{
|
|
1466
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1467
|
+
{ responseHeaders }
|
|
1191
1468
|
);
|
|
1192
1469
|
|
|
1193
1470
|
let responseData = response;
|
|
1194
|
-
if (
|
|
1471
|
+
if (responseHeaders) {
|
|
1195
1472
|
responseData = response[0];
|
|
1196
1473
|
}
|
|
1197
1474
|
|
|
@@ -1214,13 +1491,17 @@ class Order {
|
|
|
1214
1491
|
|
|
1215
1492
|
/**
|
|
1216
1493
|
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
1494
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1217
1495
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1218
1496
|
* @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
|
|
1219
1497
|
* @name getChannelConfig
|
|
1220
1498
|
* @summary:
|
|
1221
1499
|
* @description: getChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
|
|
1222
1500
|
*/
|
|
1223
|
-
async getChannelConfig(
|
|
1501
|
+
async getChannelConfig(
|
|
1502
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1503
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1504
|
+
) {
|
|
1224
1505
|
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
1225
1506
|
{},
|
|
1226
1507
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1253,12 +1534,12 @@ class Order {
|
|
|
1253
1534
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
1254
1535
|
query_params,
|
|
1255
1536
|
undefined,
|
|
1256
|
-
xHeaders,
|
|
1257
|
-
{
|
|
1537
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1538
|
+
{ responseHeaders }
|
|
1258
1539
|
);
|
|
1259
1540
|
|
|
1260
1541
|
let responseData = response;
|
|
1261
|
-
if (
|
|
1542
|
+
if (responseHeaders) {
|
|
1262
1543
|
responseData = response[0];
|
|
1263
1544
|
}
|
|
1264
1545
|
|
|
@@ -1281,11 +1562,12 @@ class Order {
|
|
|
1281
1562
|
|
|
1282
1563
|
/**
|
|
1283
1564
|
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
1565
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1284
1566
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1285
1567
|
* @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
|
|
1286
1568
|
* @name getLaneConfig
|
|
1287
1569
|
* @summary:
|
|
1288
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
1570
|
+
* @description: Get lane config for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
1289
1571
|
*/
|
|
1290
1572
|
async getLaneConfig(
|
|
1291
1573
|
{
|
|
@@ -1304,8 +1586,10 @@ class Order {
|
|
|
1304
1586
|
timeToDispatch,
|
|
1305
1587
|
paymentMethods,
|
|
1306
1588
|
myOrders,
|
|
1307
|
-
|
|
1308
|
-
|
|
1589
|
+
showCrossCompanyData,
|
|
1590
|
+
requestHeaders,
|
|
1591
|
+
} = { requestHeaders: {} },
|
|
1592
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1309
1593
|
) {
|
|
1310
1594
|
const { error } = OrderPlatformValidator.getLaneConfig().validate(
|
|
1311
1595
|
{
|
|
@@ -1324,6 +1608,7 @@ class Order {
|
|
|
1324
1608
|
timeToDispatch,
|
|
1325
1609
|
paymentMethods,
|
|
1326
1610
|
myOrders,
|
|
1611
|
+
showCrossCompanyData,
|
|
1327
1612
|
},
|
|
1328
1613
|
{ abortEarly: false, allowUnknown: true }
|
|
1329
1614
|
);
|
|
@@ -1349,6 +1634,7 @@ class Order {
|
|
|
1349
1634
|
timeToDispatch,
|
|
1350
1635
|
paymentMethods,
|
|
1351
1636
|
myOrders,
|
|
1637
|
+
showCrossCompanyData,
|
|
1352
1638
|
},
|
|
1353
1639
|
{ abortEarly: false, allowUnknown: false }
|
|
1354
1640
|
);
|
|
@@ -1375,6 +1661,7 @@ class Order {
|
|
|
1375
1661
|
query_params["time_to_dispatch"] = timeToDispatch;
|
|
1376
1662
|
query_params["payment_methods"] = paymentMethods;
|
|
1377
1663
|
query_params["my_orders"] = myOrders;
|
|
1664
|
+
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
1378
1665
|
|
|
1379
1666
|
const xHeaders = {};
|
|
1380
1667
|
|
|
@@ -1384,12 +1671,12 @@ class Order {
|
|
|
1384
1671
|
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
|
|
1385
1672
|
query_params,
|
|
1386
1673
|
undefined,
|
|
1387
|
-
xHeaders,
|
|
1388
|
-
{
|
|
1674
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1675
|
+
{ responseHeaders }
|
|
1389
1676
|
);
|
|
1390
1677
|
|
|
1391
1678
|
let responseData = response;
|
|
1392
|
-
if (
|
|
1679
|
+
if (responseHeaders) {
|
|
1393
1680
|
responseData = response[0];
|
|
1394
1681
|
}
|
|
1395
1682
|
|
|
@@ -1412,13 +1699,17 @@ class Order {
|
|
|
1412
1699
|
|
|
1413
1700
|
/**
|
|
1414
1701
|
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
1702
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1415
1703
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1416
1704
|
* @returns {Promise<OrderPlatformModel.OrderDetailsResponse>} - Success response
|
|
1417
1705
|
* @name getOrderById
|
|
1418
1706
|
* @summary:
|
|
1419
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
1707
|
+
* @description: Get Order Details by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
1420
1708
|
*/
|
|
1421
|
-
async getOrderById(
|
|
1709
|
+
async getOrderById(
|
|
1710
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1711
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1712
|
+
) {
|
|
1422
1713
|
const { error } = OrderPlatformValidator.getOrderById().validate(
|
|
1423
1714
|
{
|
|
1424
1715
|
orderId,
|
|
@@ -1454,12 +1745,12 @@ class Order {
|
|
|
1454
1745
|
`/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
|
|
1455
1746
|
query_params,
|
|
1456
1747
|
undefined,
|
|
1457
|
-
xHeaders,
|
|
1458
|
-
{
|
|
1748
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1749
|
+
{ responseHeaders }
|
|
1459
1750
|
);
|
|
1460
1751
|
|
|
1461
1752
|
let responseData = response;
|
|
1462
|
-
if (
|
|
1753
|
+
if (responseHeaders) {
|
|
1463
1754
|
responseData = response[0];
|
|
1464
1755
|
}
|
|
1465
1756
|
|
|
@@ -1482,11 +1773,12 @@ class Order {
|
|
|
1482
1773
|
|
|
1483
1774
|
/**
|
|
1484
1775
|
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
1776
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1485
1777
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1486
1778
|
* @returns {Promise<OrderPlatformModel.OrderListingResponse>} - Success response
|
|
1487
1779
|
* @name getOrders
|
|
1488
1780
|
* @summary:
|
|
1489
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
1781
|
+
* @description: Get Orders Listing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
1490
1782
|
*/
|
|
1491
1783
|
async getOrders(
|
|
1492
1784
|
{
|
|
@@ -1507,8 +1799,11 @@ class Order {
|
|
|
1507
1799
|
isPrioritySort,
|
|
1508
1800
|
customMeta,
|
|
1509
1801
|
myOrders,
|
|
1510
|
-
|
|
1511
|
-
|
|
1802
|
+
showCrossCompanyData,
|
|
1803
|
+
customerId,
|
|
1804
|
+
requestHeaders,
|
|
1805
|
+
} = { requestHeaders: {} },
|
|
1806
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1512
1807
|
) {
|
|
1513
1808
|
const { error } = OrderPlatformValidator.getOrders().validate(
|
|
1514
1809
|
{
|
|
@@ -1529,6 +1824,8 @@ class Order {
|
|
|
1529
1824
|
isPrioritySort,
|
|
1530
1825
|
customMeta,
|
|
1531
1826
|
myOrders,
|
|
1827
|
+
showCrossCompanyData,
|
|
1828
|
+
customerId,
|
|
1532
1829
|
},
|
|
1533
1830
|
{ abortEarly: false, allowUnknown: true }
|
|
1534
1831
|
);
|
|
@@ -1556,6 +1853,8 @@ class Order {
|
|
|
1556
1853
|
isPrioritySort,
|
|
1557
1854
|
customMeta,
|
|
1558
1855
|
myOrders,
|
|
1856
|
+
showCrossCompanyData,
|
|
1857
|
+
customerId,
|
|
1559
1858
|
},
|
|
1560
1859
|
{ abortEarly: false, allowUnknown: false }
|
|
1561
1860
|
);
|
|
@@ -1584,6 +1883,8 @@ class Order {
|
|
|
1584
1883
|
query_params["is_priority_sort"] = isPrioritySort;
|
|
1585
1884
|
query_params["custom_meta"] = customMeta;
|
|
1586
1885
|
query_params["my_orders"] = myOrders;
|
|
1886
|
+
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
1887
|
+
query_params["customer_id"] = customerId;
|
|
1587
1888
|
|
|
1588
1889
|
const xHeaders = {};
|
|
1589
1890
|
|
|
@@ -1593,12 +1894,12 @@ class Order {
|
|
|
1593
1894
|
`/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
|
|
1594
1895
|
query_params,
|
|
1595
1896
|
undefined,
|
|
1596
|
-
xHeaders,
|
|
1597
|
-
{
|
|
1897
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1898
|
+
{ responseHeaders }
|
|
1598
1899
|
);
|
|
1599
1900
|
|
|
1600
1901
|
let responseData = response;
|
|
1601
|
-
if (
|
|
1902
|
+
if (responseHeaders) {
|
|
1602
1903
|
responseData = response[0];
|
|
1603
1904
|
}
|
|
1604
1905
|
|
|
@@ -1621,13 +1922,17 @@ class Order {
|
|
|
1621
1922
|
|
|
1622
1923
|
/**
|
|
1623
1924
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
1925
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1624
1926
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1625
1927
|
* @returns {Promise<OrderPlatformModel.GetActionsResponse>} - Success response
|
|
1626
1928
|
* @name getRoleBasedActions
|
|
1627
1929
|
* @summary:
|
|
1628
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
|
|
1930
|
+
* @description: Get Role Based Actions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
|
|
1629
1931
|
*/
|
|
1630
|
-
async getRoleBasedActions(
|
|
1932
|
+
async getRoleBasedActions(
|
|
1933
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1934
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1935
|
+
) {
|
|
1631
1936
|
const { error } = OrderPlatformValidator.getRoleBasedActions().validate(
|
|
1632
1937
|
{},
|
|
1633
1938
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1660,12 +1965,12 @@ class Order {
|
|
|
1660
1965
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/roles`,
|
|
1661
1966
|
query_params,
|
|
1662
1967
|
undefined,
|
|
1663
|
-
xHeaders,
|
|
1664
|
-
{
|
|
1968
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1969
|
+
{ responseHeaders }
|
|
1665
1970
|
);
|
|
1666
1971
|
|
|
1667
1972
|
let responseData = response;
|
|
1668
|
-
if (
|
|
1973
|
+
if (responseHeaders) {
|
|
1669
1974
|
responseData = response[0];
|
|
1670
1975
|
}
|
|
1671
1976
|
|
|
@@ -1688,15 +1993,16 @@ class Order {
|
|
|
1688
1993
|
|
|
1689
1994
|
/**
|
|
1690
1995
|
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
1996
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1691
1997
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1692
1998
|
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponse>} - Success response
|
|
1693
1999
|
* @name getShipmentById
|
|
1694
2000
|
* @summary:
|
|
1695
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
2001
|
+
* @description: Get shipment details for the given shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
1696
2002
|
*/
|
|
1697
2003
|
async getShipmentById(
|
|
1698
|
-
{ channelShipmentId, shipmentId } = {},
|
|
1699
|
-
{
|
|
2004
|
+
{ channelShipmentId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
2005
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1700
2006
|
) {
|
|
1701
2007
|
const { error } = OrderPlatformValidator.getShipmentById().validate(
|
|
1702
2008
|
{
|
|
@@ -1738,12 +2044,12 @@ class Order {
|
|
|
1738
2044
|
`/service/platform/order/v1.0/company/${this.config.companyId}/shipment-details`,
|
|
1739
2045
|
query_params,
|
|
1740
2046
|
undefined,
|
|
1741
|
-
xHeaders,
|
|
1742
|
-
{
|
|
2047
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2048
|
+
{ responseHeaders }
|
|
1743
2049
|
);
|
|
1744
2050
|
|
|
1745
2051
|
let responseData = response;
|
|
1746
|
-
if (
|
|
2052
|
+
if (responseHeaders) {
|
|
1747
2053
|
responseData = response[0];
|
|
1748
2054
|
}
|
|
1749
2055
|
|
|
@@ -1766,15 +2072,16 @@ class Order {
|
|
|
1766
2072
|
|
|
1767
2073
|
/**
|
|
1768
2074
|
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
2075
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1769
2076
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1770
2077
|
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
1771
2078
|
* @name getShipmentHistory
|
|
1772
2079
|
* @summary:
|
|
1773
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
2080
|
+
* @description: Get Shipment History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
1774
2081
|
*/
|
|
1775
2082
|
async getShipmentHistory(
|
|
1776
|
-
{ shipmentId, bagId } = {},
|
|
1777
|
-
{
|
|
2083
|
+
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
2084
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1778
2085
|
) {
|
|
1779
2086
|
const { error } = OrderPlatformValidator.getShipmentHistory().validate(
|
|
1780
2087
|
{
|
|
@@ -1816,12 +2123,12 @@ class Order {
|
|
|
1816
2123
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`,
|
|
1817
2124
|
query_params,
|
|
1818
2125
|
undefined,
|
|
1819
|
-
xHeaders,
|
|
1820
|
-
{
|
|
2126
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2127
|
+
{ responseHeaders }
|
|
1821
2128
|
);
|
|
1822
2129
|
|
|
1823
2130
|
let responseData = response;
|
|
1824
|
-
if (
|
|
2131
|
+
if (responseHeaders) {
|
|
1825
2132
|
responseData = response[0];
|
|
1826
2133
|
}
|
|
1827
2134
|
|
|
@@ -1844,6 +2151,7 @@ class Order {
|
|
|
1844
2151
|
|
|
1845
2152
|
/**
|
|
1846
2153
|
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
2154
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1847
2155
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1848
2156
|
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponse>} -
|
|
1849
2157
|
* Success response
|
|
@@ -1852,8 +2160,8 @@ class Order {
|
|
|
1852
2160
|
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/).
|
|
1853
2161
|
*/
|
|
1854
2162
|
async getShipmentReasons(
|
|
1855
|
-
{ shipmentId, bagId, state } = {},
|
|
1856
|
-
{
|
|
2163
|
+
{ shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} },
|
|
2164
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1857
2165
|
) {
|
|
1858
2166
|
const { error } = OrderPlatformValidator.getShipmentReasons().validate(
|
|
1859
2167
|
{
|
|
@@ -1895,12 +2203,12 @@ class Order {
|
|
|
1895
2203
|
`/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`,
|
|
1896
2204
|
query_params,
|
|
1897
2205
|
undefined,
|
|
1898
|
-
xHeaders,
|
|
1899
|
-
{
|
|
2206
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2207
|
+
{ responseHeaders }
|
|
1900
2208
|
);
|
|
1901
2209
|
|
|
1902
2210
|
let responseData = response;
|
|
1903
|
-
if (
|
|
2211
|
+
if (responseHeaders) {
|
|
1904
2212
|
responseData = response[0];
|
|
1905
2213
|
}
|
|
1906
2214
|
|
|
@@ -1923,13 +2231,14 @@ class Order {
|
|
|
1923
2231
|
|
|
1924
2232
|
/**
|
|
1925
2233
|
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
2234
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1926
2235
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1927
2236
|
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
|
|
1928
2237
|
* - Success response
|
|
1929
2238
|
*
|
|
1930
2239
|
* @name getShipments
|
|
1931
2240
|
* @summary:
|
|
1932
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
|
|
2241
|
+
* @description: Get Shipments Listing for the company id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
|
|
1933
2242
|
*/
|
|
1934
2243
|
async getShipments(
|
|
1935
2244
|
{
|
|
@@ -1956,9 +2265,13 @@ class Order {
|
|
|
1956
2265
|
companyAffiliateTag,
|
|
1957
2266
|
myOrders,
|
|
1958
2267
|
platformUserId,
|
|
2268
|
+
sortType,
|
|
2269
|
+
showCrossCompanyData,
|
|
1959
2270
|
tags,
|
|
1960
|
-
|
|
1961
|
-
|
|
2271
|
+
customerId,
|
|
2272
|
+
requestHeaders,
|
|
2273
|
+
} = { requestHeaders: {} },
|
|
2274
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1962
2275
|
) {
|
|
1963
2276
|
const { error } = OrderPlatformValidator.getShipments().validate(
|
|
1964
2277
|
{
|
|
@@ -1985,7 +2298,10 @@ class Order {
|
|
|
1985
2298
|
companyAffiliateTag,
|
|
1986
2299
|
myOrders,
|
|
1987
2300
|
platformUserId,
|
|
2301
|
+
sortType,
|
|
2302
|
+
showCrossCompanyData,
|
|
1988
2303
|
tags,
|
|
2304
|
+
customerId,
|
|
1989
2305
|
},
|
|
1990
2306
|
{ abortEarly: false, allowUnknown: true }
|
|
1991
2307
|
);
|
|
@@ -2019,7 +2335,10 @@ class Order {
|
|
|
2019
2335
|
companyAffiliateTag,
|
|
2020
2336
|
myOrders,
|
|
2021
2337
|
platformUserId,
|
|
2338
|
+
sortType,
|
|
2339
|
+
showCrossCompanyData,
|
|
2022
2340
|
tags,
|
|
2341
|
+
customerId,
|
|
2023
2342
|
},
|
|
2024
2343
|
{ abortEarly: false, allowUnknown: false }
|
|
2025
2344
|
);
|
|
@@ -2054,7 +2373,10 @@ class Order {
|
|
|
2054
2373
|
query_params["company_affiliate_tag"] = companyAffiliateTag;
|
|
2055
2374
|
query_params["my_orders"] = myOrders;
|
|
2056
2375
|
query_params["platform_user_id"] = platformUserId;
|
|
2376
|
+
query_params["sort_type"] = sortType;
|
|
2377
|
+
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
2057
2378
|
query_params["tags"] = tags;
|
|
2379
|
+
query_params["customer_id"] = customerId;
|
|
2058
2380
|
|
|
2059
2381
|
const xHeaders = {};
|
|
2060
2382
|
|
|
@@ -2064,12 +2386,12 @@ class Order {
|
|
|
2064
2386
|
`/service/platform/order/v1.0/company/${this.config.companyId}/shipments-listing`,
|
|
2065
2387
|
query_params,
|
|
2066
2388
|
undefined,
|
|
2067
|
-
xHeaders,
|
|
2068
|
-
{
|
|
2389
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2390
|
+
{ responseHeaders }
|
|
2069
2391
|
);
|
|
2070
2392
|
|
|
2071
2393
|
let responseData = response;
|
|
2072
|
-
if (
|
|
2394
|
+
if (responseHeaders) {
|
|
2073
2395
|
responseData = response[0];
|
|
2074
2396
|
}
|
|
2075
2397
|
|
|
@@ -2092,13 +2414,17 @@ class Order {
|
|
|
2092
2414
|
|
|
2093
2415
|
/**
|
|
2094
2416
|
* @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
|
|
2417
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2095
2418
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2096
2419
|
* @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
|
|
2097
2420
|
* @name getStateTransitionMap
|
|
2098
2421
|
* @summary:
|
|
2099
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
|
|
2422
|
+
* @description: Get State Transition Map - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
|
|
2100
2423
|
*/
|
|
2101
|
-
async getStateTransitionMap(
|
|
2424
|
+
async getStateTransitionMap(
|
|
2425
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2426
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2427
|
+
) {
|
|
2102
2428
|
const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
2103
2429
|
{},
|
|
2104
2430
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2131,12 +2457,12 @@ class Order {
|
|
|
2131
2457
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`,
|
|
2132
2458
|
query_params,
|
|
2133
2459
|
undefined,
|
|
2134
|
-
xHeaders,
|
|
2135
|
-
{
|
|
2460
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2461
|
+
{ responseHeaders }
|
|
2136
2462
|
);
|
|
2137
2463
|
|
|
2138
2464
|
let responseData = response;
|
|
2139
|
-
if (
|
|
2465
|
+
if (responseHeaders) {
|
|
2140
2466
|
responseData = response[0];
|
|
2141
2467
|
}
|
|
2142
2468
|
|
|
@@ -2159,15 +2485,16 @@ class Order {
|
|
|
2159
2485
|
|
|
2160
2486
|
/**
|
|
2161
2487
|
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
2488
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2162
2489
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2163
2490
|
* @returns {Promise<OrderPlatformModel.FiltersResponse>} - Success response
|
|
2164
2491
|
* @name getfilters
|
|
2165
2492
|
* @summary:
|
|
2166
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
2493
|
+
* @description: Get Listing Filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
2167
2494
|
*/
|
|
2168
2495
|
async getfilters(
|
|
2169
|
-
{ view, groupEntity } = {},
|
|
2170
|
-
{
|
|
2496
|
+
{ view, groupEntity, requestHeaders } = { requestHeaders: {} },
|
|
2497
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2171
2498
|
) {
|
|
2172
2499
|
const { error } = OrderPlatformValidator.getfilters().validate(
|
|
2173
2500
|
{
|
|
@@ -2207,12 +2534,12 @@ class Order {
|
|
|
2207
2534
|
`/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
|
|
2208
2535
|
query_params,
|
|
2209
2536
|
undefined,
|
|
2210
|
-
xHeaders,
|
|
2211
|
-
{
|
|
2537
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2538
|
+
{ responseHeaders }
|
|
2212
2539
|
);
|
|
2213
2540
|
|
|
2214
2541
|
let responseData = response;
|
|
2215
|
-
if (
|
|
2542
|
+
if (responseHeaders) {
|
|
2216
2543
|
responseData = response[0];
|
|
2217
2544
|
}
|
|
2218
2545
|
|
|
@@ -2235,6 +2562,7 @@ class Order {
|
|
|
2235
2562
|
|
|
2236
2563
|
/**
|
|
2237
2564
|
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
2565
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2238
2566
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2239
2567
|
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponse>} -
|
|
2240
2568
|
* Success response
|
|
@@ -2243,8 +2571,8 @@ class Order {
|
|
|
2243
2571
|
* @description: Invalidate shipment Cache - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
|
|
2244
2572
|
*/
|
|
2245
2573
|
async invalidateShipmentCache(
|
|
2246
|
-
{ body } = {},
|
|
2247
|
-
{
|
|
2574
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2575
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2248
2576
|
) {
|
|
2249
2577
|
const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
2250
2578
|
{
|
|
@@ -2282,12 +2610,12 @@ class Order {
|
|
|
2282
2610
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
|
|
2283
2611
|
query_params,
|
|
2284
2612
|
body,
|
|
2285
|
-
xHeaders,
|
|
2286
|
-
{
|
|
2613
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2614
|
+
{ responseHeaders }
|
|
2287
2615
|
);
|
|
2288
2616
|
|
|
2289
2617
|
let responseData = response;
|
|
2290
|
-
if (
|
|
2618
|
+
if (responseHeaders) {
|
|
2291
2619
|
responseData = response[0];
|
|
2292
2620
|
}
|
|
2293
2621
|
|
|
@@ -2310,13 +2638,17 @@ class Order {
|
|
|
2310
2638
|
|
|
2311
2639
|
/**
|
|
2312
2640
|
* @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
|
|
2641
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2313
2642
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2314
2643
|
* @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
|
|
2315
2644
|
* @name orderUpdate
|
|
2316
2645
|
* @summary:
|
|
2317
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
|
|
2646
|
+
* @description: Update Order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
|
|
2318
2647
|
*/
|
|
2319
|
-
async orderUpdate(
|
|
2648
|
+
async orderUpdate(
|
|
2649
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2650
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2651
|
+
) {
|
|
2320
2652
|
const { error } = OrderPlatformValidator.orderUpdate().validate(
|
|
2321
2653
|
{
|
|
2322
2654
|
body,
|
|
@@ -2351,12 +2683,12 @@ class Order {
|
|
|
2351
2683
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/validation`,
|
|
2352
2684
|
query_params,
|
|
2353
2685
|
body,
|
|
2354
|
-
xHeaders,
|
|
2355
|
-
{
|
|
2686
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2687
|
+
{ responseHeaders }
|
|
2356
2688
|
);
|
|
2357
2689
|
|
|
2358
2690
|
let responseData = response;
|
|
2359
|
-
if (
|
|
2691
|
+
if (responseHeaders) {
|
|
2360
2692
|
responseData = response[0];
|
|
2361
2693
|
}
|
|
2362
2694
|
|
|
@@ -2379,13 +2711,17 @@ class Order {
|
|
|
2379
2711
|
|
|
2380
2712
|
/**
|
|
2381
2713
|
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
2714
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2382
2715
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2383
2716
|
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
2384
2717
|
* @name postShipmentHistory
|
|
2385
2718
|
* @summary:
|
|
2386
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
|
|
2719
|
+
* @description: Post shipment history - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
|
|
2387
2720
|
*/
|
|
2388
|
-
async postShipmentHistory(
|
|
2721
|
+
async postShipmentHistory(
|
|
2722
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2723
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2724
|
+
) {
|
|
2389
2725
|
const { error } = OrderPlatformValidator.postShipmentHistory().validate(
|
|
2390
2726
|
{
|
|
2391
2727
|
body,
|
|
@@ -2422,12 +2758,12 @@ class Order {
|
|
|
2422
2758
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`,
|
|
2423
2759
|
query_params,
|
|
2424
2760
|
body,
|
|
2425
|
-
xHeaders,
|
|
2426
|
-
{
|
|
2761
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2762
|
+
{ responseHeaders }
|
|
2427
2763
|
);
|
|
2428
2764
|
|
|
2429
2765
|
let responseData = response;
|
|
2430
|
-
if (
|
|
2766
|
+
if (responseHeaders) {
|
|
2431
2767
|
responseData = response[0];
|
|
2432
2768
|
}
|
|
2433
2769
|
|
|
@@ -2450,13 +2786,17 @@ class Order {
|
|
|
2450
2786
|
|
|
2451
2787
|
/**
|
|
2452
2788
|
* @param {OrderPlatformValidator.ProcessManifestParam} arg - Arg object
|
|
2789
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2453
2790
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2454
2791
|
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
2455
2792
|
* @name processManifest
|
|
2456
2793
|
* @summary:
|
|
2457
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifest/).
|
|
2794
|
+
* @description: Process Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifest/).
|
|
2458
2795
|
*/
|
|
2459
|
-
async processManifest(
|
|
2796
|
+
async processManifest(
|
|
2797
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2798
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2799
|
+
) {
|
|
2460
2800
|
const { error } = OrderPlatformValidator.processManifest().validate(
|
|
2461
2801
|
{
|
|
2462
2802
|
body,
|
|
@@ -2493,12 +2833,12 @@ class Order {
|
|
|
2493
2833
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
|
|
2494
2834
|
query_params,
|
|
2495
2835
|
body,
|
|
2496
|
-
xHeaders,
|
|
2497
|
-
{
|
|
2836
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2837
|
+
{ responseHeaders }
|
|
2498
2838
|
);
|
|
2499
2839
|
|
|
2500
2840
|
let responseData = response;
|
|
2501
|
-
if (
|
|
2841
|
+
if (responseHeaders) {
|
|
2502
2842
|
responseData = response[0];
|
|
2503
2843
|
}
|
|
2504
2844
|
|
|
@@ -2521,13 +2861,17 @@ class Order {
|
|
|
2521
2861
|
|
|
2522
2862
|
/**
|
|
2523
2863
|
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
2864
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2524
2865
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2525
2866
|
* @returns {Promise<OrderPlatformModel.StoreReassignResponse>} - Success response
|
|
2526
2867
|
* @name reassignLocation
|
|
2527
2868
|
* @summary:
|
|
2528
2869
|
* @description: Reassign Location - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
|
|
2529
2870
|
*/
|
|
2530
|
-
async reassignLocation(
|
|
2871
|
+
async reassignLocation(
|
|
2872
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2873
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2874
|
+
) {
|
|
2531
2875
|
const { error } = OrderPlatformValidator.reassignLocation().validate(
|
|
2532
2876
|
{
|
|
2533
2877
|
body,
|
|
@@ -2564,12 +2908,12 @@ class Order {
|
|
|
2564
2908
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/store/reassign-internal`,
|
|
2565
2909
|
query_params,
|
|
2566
2910
|
body,
|
|
2567
|
-
xHeaders,
|
|
2568
|
-
{
|
|
2911
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2912
|
+
{ responseHeaders }
|
|
2569
2913
|
);
|
|
2570
2914
|
|
|
2571
2915
|
let responseData = response;
|
|
2572
|
-
if (
|
|
2916
|
+
if (responseHeaders) {
|
|
2573
2917
|
responseData = response[0];
|
|
2574
2918
|
}
|
|
2575
2919
|
|
|
@@ -2592,13 +2936,17 @@ class Order {
|
|
|
2592
2936
|
|
|
2593
2937
|
/**
|
|
2594
2938
|
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
2939
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2595
2940
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2596
2941
|
* @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
|
|
2597
2942
|
* @name sendSmsNinja
|
|
2598
2943
|
* @summary:
|
|
2599
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
|
|
2944
|
+
* @description: Send SMS Ninja Panel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
|
|
2600
2945
|
*/
|
|
2601
|
-
async sendSmsNinja(
|
|
2946
|
+
async sendSmsNinja(
|
|
2947
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2948
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2949
|
+
) {
|
|
2602
2950
|
const { error } = OrderPlatformValidator.sendSmsNinja().validate(
|
|
2603
2951
|
{
|
|
2604
2952
|
body,
|
|
@@ -2633,12 +2981,12 @@ class Order {
|
|
|
2633
2981
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/send-sms`,
|
|
2634
2982
|
query_params,
|
|
2635
2983
|
body,
|
|
2636
|
-
xHeaders,
|
|
2637
|
-
{
|
|
2984
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2985
|
+
{ responseHeaders }
|
|
2638
2986
|
);
|
|
2639
2987
|
|
|
2640
2988
|
let responseData = response;
|
|
2641
|
-
if (
|
|
2989
|
+
if (responseHeaders) {
|
|
2642
2990
|
responseData = response[0];
|
|
2643
2991
|
}
|
|
2644
2992
|
|
|
@@ -2661,13 +3009,17 @@ class Order {
|
|
|
2661
3009
|
|
|
2662
3010
|
/**
|
|
2663
3011
|
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
3012
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2664
3013
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2665
3014
|
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponse>} - Success response
|
|
2666
3015
|
* @name sendUserMobileOTP
|
|
2667
3016
|
* @summary:
|
|
2668
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
|
|
3017
|
+
* @description: Send User Mobile OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
|
|
2669
3018
|
*/
|
|
2670
|
-
async sendUserMobileOTP(
|
|
3019
|
+
async sendUserMobileOTP(
|
|
3020
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3021
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3022
|
+
) {
|
|
2671
3023
|
const { error } = OrderPlatformValidator.sendUserMobileOTP().validate(
|
|
2672
3024
|
{
|
|
2673
3025
|
body,
|
|
@@ -2704,12 +3056,12 @@ class Order {
|
|
|
2704
3056
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/send/otp/mobile`,
|
|
2705
3057
|
query_params,
|
|
2706
3058
|
body,
|
|
2707
|
-
xHeaders,
|
|
2708
|
-
{
|
|
3059
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3060
|
+
{ responseHeaders }
|
|
2709
3061
|
);
|
|
2710
3062
|
|
|
2711
3063
|
let responseData = response;
|
|
2712
|
-
if (
|
|
3064
|
+
if (responseHeaders) {
|
|
2713
3065
|
responseData = response[0];
|
|
2714
3066
|
}
|
|
2715
3067
|
|
|
@@ -2730,13 +3082,100 @@ class Order {
|
|
|
2730
3082
|
return response;
|
|
2731
3083
|
}
|
|
2732
3084
|
|
|
3085
|
+
/**
|
|
3086
|
+
* @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
|
|
3087
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3088
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3089
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponse>} -
|
|
3090
|
+
* Success response
|
|
3091
|
+
* @name trackShipment
|
|
3092
|
+
* @summary: Get courier partner tracking details
|
|
3093
|
+
* @description: This endpoint allows users to get courier partner tracking details for a given shipment id or awb no. The service will fetch courier partner statuses that are pushed to oms. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/).
|
|
3094
|
+
*/
|
|
3095
|
+
async trackShipment(
|
|
3096
|
+
{ shipmentId, awb, pageNo, pageSize, requestHeaders } = {
|
|
3097
|
+
requestHeaders: {},
|
|
3098
|
+
},
|
|
3099
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3100
|
+
) {
|
|
3101
|
+
const { error } = OrderPlatformValidator.trackShipment().validate(
|
|
3102
|
+
{
|
|
3103
|
+
shipmentId,
|
|
3104
|
+
awb,
|
|
3105
|
+
pageNo,
|
|
3106
|
+
pageSize,
|
|
3107
|
+
},
|
|
3108
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3109
|
+
);
|
|
3110
|
+
if (error) {
|
|
3111
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3112
|
+
}
|
|
3113
|
+
|
|
3114
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3115
|
+
const { error: warrning } = OrderPlatformValidator.trackShipment().validate(
|
|
3116
|
+
{
|
|
3117
|
+
shipmentId,
|
|
3118
|
+
awb,
|
|
3119
|
+
pageNo,
|
|
3120
|
+
pageSize,
|
|
3121
|
+
},
|
|
3122
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3123
|
+
);
|
|
3124
|
+
if (warrning) {
|
|
3125
|
+
Logger({
|
|
3126
|
+
level: "WARN",
|
|
3127
|
+
message: `Parameter Validation warrnings for platform > Order > trackShipment \n ${warrning}`,
|
|
3128
|
+
});
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
const query_params = {};
|
|
3132
|
+
query_params["shipment_id"] = shipmentId;
|
|
3133
|
+
query_params["awb"] = awb;
|
|
3134
|
+
query_params["page_no"] = pageNo;
|
|
3135
|
+
query_params["page_size"] = pageSize;
|
|
3136
|
+
|
|
3137
|
+
const xHeaders = {};
|
|
3138
|
+
|
|
3139
|
+
const response = await PlatformAPIClient.execute(
|
|
3140
|
+
this.config,
|
|
3141
|
+
"get",
|
|
3142
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/tracking`,
|
|
3143
|
+
query_params,
|
|
3144
|
+
undefined,
|
|
3145
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3146
|
+
{ responseHeaders }
|
|
3147
|
+
);
|
|
3148
|
+
|
|
3149
|
+
let responseData = response;
|
|
3150
|
+
if (responseHeaders) {
|
|
3151
|
+
responseData = response[0];
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3154
|
+
const {
|
|
3155
|
+
error: res_error,
|
|
3156
|
+
} = OrderPlatformModel.CourierPartnerTrackingResponse().validate(
|
|
3157
|
+
responseData,
|
|
3158
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3159
|
+
);
|
|
3160
|
+
|
|
3161
|
+
if (res_error) {
|
|
3162
|
+
Logger({
|
|
3163
|
+
level: "WARN",
|
|
3164
|
+
message: `Response Validation Warnnings for platform > Order > trackShipment \n ${res_error}`,
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
return response;
|
|
3169
|
+
}
|
|
3170
|
+
|
|
2733
3171
|
/**
|
|
2734
3172
|
* @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
|
|
3173
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2735
3174
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2736
3175
|
* @returns {Promise<OrderPlatformModel.BaseResponse>} - Success response
|
|
2737
3176
|
* @name updateAddress
|
|
2738
3177
|
* @summary:
|
|
2739
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
|
|
3178
|
+
* @description: Update Address for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
|
|
2740
3179
|
*/
|
|
2741
3180
|
async updateAddress(
|
|
2742
3181
|
{
|
|
@@ -2752,8 +3191,9 @@ class Order {
|
|
|
2752
3191
|
city,
|
|
2753
3192
|
state,
|
|
2754
3193
|
country,
|
|
2755
|
-
|
|
2756
|
-
|
|
3194
|
+
requestHeaders,
|
|
3195
|
+
} = { requestHeaders: {} },
|
|
3196
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2757
3197
|
) {
|
|
2758
3198
|
const { error } = OrderPlatformValidator.updateAddress().validate(
|
|
2759
3199
|
{
|
|
@@ -2825,12 +3265,12 @@ class Order {
|
|
|
2825
3265
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/delight/update-address`,
|
|
2826
3266
|
query_params,
|
|
2827
3267
|
undefined,
|
|
2828
|
-
xHeaders,
|
|
2829
|
-
{
|
|
3268
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3269
|
+
{ responseHeaders }
|
|
2830
3270
|
);
|
|
2831
3271
|
|
|
2832
3272
|
let responseData = response;
|
|
2833
|
-
if (
|
|
3273
|
+
if (responseHeaders) {
|
|
2834
3274
|
responseData = response[0];
|
|
2835
3275
|
}
|
|
2836
3276
|
|
|
@@ -2853,17 +3293,18 @@ class Order {
|
|
|
2853
3293
|
|
|
2854
3294
|
/**
|
|
2855
3295
|
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
3296
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2856
3297
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2857
3298
|
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponse>}
|
|
2858
3299
|
* - Success response
|
|
2859
3300
|
*
|
|
2860
3301
|
* @name updatePackagingDimensions
|
|
2861
3302
|
* @summary:
|
|
2862
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
|
|
3303
|
+
* @description: Update Packaging Dimensions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
|
|
2863
3304
|
*/
|
|
2864
3305
|
async updatePackagingDimensions(
|
|
2865
|
-
{ body } = {},
|
|
2866
|
-
{
|
|
3306
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3307
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2867
3308
|
) {
|
|
2868
3309
|
const {
|
|
2869
3310
|
error,
|
|
@@ -2903,12 +3344,12 @@ class Order {
|
|
|
2903
3344
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-packaging-dimension`,
|
|
2904
3345
|
query_params,
|
|
2905
3346
|
body,
|
|
2906
|
-
xHeaders,
|
|
2907
|
-
{
|
|
3347
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3348
|
+
{ responseHeaders }
|
|
2908
3349
|
);
|
|
2909
3350
|
|
|
2910
3351
|
let responseData = response;
|
|
2911
|
-
if (
|
|
3352
|
+
if (responseHeaders) {
|
|
2912
3353
|
responseData = response[0];
|
|
2913
3354
|
}
|
|
2914
3355
|
|
|
@@ -2931,6 +3372,7 @@ class Order {
|
|
|
2931
3372
|
|
|
2932
3373
|
/**
|
|
2933
3374
|
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
3375
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2934
3376
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2935
3377
|
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponse>} -
|
|
2936
3378
|
* Success response
|
|
@@ -2938,7 +3380,10 @@ class Order {
|
|
|
2938
3380
|
* @summary:
|
|
2939
3381
|
* @description: update shipment/bag lock and check status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
|
|
2940
3382
|
*/
|
|
2941
|
-
async updateShipmentLock(
|
|
3383
|
+
async updateShipmentLock(
|
|
3384
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3385
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3386
|
+
) {
|
|
2942
3387
|
const { error } = OrderPlatformValidator.updateShipmentLock().validate(
|
|
2943
3388
|
{
|
|
2944
3389
|
body,
|
|
@@ -2975,12 +3420,12 @@ class Order {
|
|
|
2975
3420
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/entity/lock-manager`,
|
|
2976
3421
|
query_params,
|
|
2977
3422
|
body,
|
|
2978
|
-
xHeaders,
|
|
2979
|
-
{
|
|
3423
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3424
|
+
{ responseHeaders }
|
|
2980
3425
|
);
|
|
2981
3426
|
|
|
2982
3427
|
let responseData = response;
|
|
2983
|
-
if (
|
|
3428
|
+
if (responseHeaders) {
|
|
2984
3429
|
responseData = response[0];
|
|
2985
3430
|
}
|
|
2986
3431
|
|
|
@@ -3003,6 +3448,7 @@ class Order {
|
|
|
3003
3448
|
|
|
3004
3449
|
/**
|
|
3005
3450
|
* @param {OrderPlatformValidator.UpdateShipmentStatusParam} arg - Arg object
|
|
3451
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3006
3452
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3007
3453
|
* @returns {Promise<OrderPlatformModel.UpdateShipmentStatusResponseBody>}
|
|
3008
3454
|
* - Success response
|
|
@@ -3011,7 +3457,10 @@ class Order {
|
|
|
3011
3457
|
* @summary:
|
|
3012
3458
|
* @description: This API is for Shipment State transition or Shipment data update or both below example is for partial state transition with data update - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentStatus/).
|
|
3013
3459
|
*/
|
|
3014
|
-
async updateShipmentStatus(
|
|
3460
|
+
async updateShipmentStatus(
|
|
3461
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3462
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3463
|
+
) {
|
|
3015
3464
|
const { error } = OrderPlatformValidator.updateShipmentStatus().validate(
|
|
3016
3465
|
{
|
|
3017
3466
|
body,
|
|
@@ -3048,12 +3497,12 @@ class Order {
|
|
|
3048
3497
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/status-internal`,
|
|
3049
3498
|
query_params,
|
|
3050
3499
|
body,
|
|
3051
|
-
xHeaders,
|
|
3052
|
-
{
|
|
3500
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3501
|
+
{ responseHeaders }
|
|
3053
3502
|
);
|
|
3054
3503
|
|
|
3055
3504
|
let responseData = response;
|
|
3056
|
-
if (
|
|
3505
|
+
if (responseHeaders) {
|
|
3057
3506
|
responseData = response[0];
|
|
3058
3507
|
}
|
|
3059
3508
|
|
|
@@ -3074,15 +3523,95 @@ class Order {
|
|
|
3074
3523
|
return response;
|
|
3075
3524
|
}
|
|
3076
3525
|
|
|
3526
|
+
/**
|
|
3527
|
+
* @param {OrderPlatformValidator.UpdateShipmentTrackingParam} arg - Arg object
|
|
3528
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3529
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3530
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingDetails>} -
|
|
3531
|
+
* Success response
|
|
3532
|
+
* @name updateShipmentTracking
|
|
3533
|
+
* @summary: Post courier partner tracking details
|
|
3534
|
+
* @description: This endpoint allows users to post courier partner tracking details for a given shipment id or awb no. The service will add entry for courier partner statuses and will be saved to oms. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentTracking/).
|
|
3535
|
+
*/
|
|
3536
|
+
async updateShipmentTracking(
|
|
3537
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3538
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3539
|
+
) {
|
|
3540
|
+
const { error } = OrderPlatformValidator.updateShipmentTracking().validate(
|
|
3541
|
+
{
|
|
3542
|
+
body,
|
|
3543
|
+
},
|
|
3544
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3545
|
+
);
|
|
3546
|
+
if (error) {
|
|
3547
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3548
|
+
}
|
|
3549
|
+
|
|
3550
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3551
|
+
const {
|
|
3552
|
+
error: warrning,
|
|
3553
|
+
} = OrderPlatformValidator.updateShipmentTracking().validate(
|
|
3554
|
+
{
|
|
3555
|
+
body,
|
|
3556
|
+
},
|
|
3557
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3558
|
+
);
|
|
3559
|
+
if (warrning) {
|
|
3560
|
+
Logger({
|
|
3561
|
+
level: "WARN",
|
|
3562
|
+
message: `Parameter Validation warrnings for platform > Order > updateShipmentTracking \n ${warrning}`,
|
|
3563
|
+
});
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
const query_params = {};
|
|
3567
|
+
|
|
3568
|
+
const xHeaders = {};
|
|
3569
|
+
|
|
3570
|
+
const response = await PlatformAPIClient.execute(
|
|
3571
|
+
this.config,
|
|
3572
|
+
"post",
|
|
3573
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/tracking`,
|
|
3574
|
+
query_params,
|
|
3575
|
+
body,
|
|
3576
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3577
|
+
{ responseHeaders }
|
|
3578
|
+
);
|
|
3579
|
+
|
|
3580
|
+
let responseData = response;
|
|
3581
|
+
if (responseHeaders) {
|
|
3582
|
+
responseData = response[0];
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3585
|
+
const {
|
|
3586
|
+
error: res_error,
|
|
3587
|
+
} = OrderPlatformModel.CourierPartnerTrackingDetails().validate(
|
|
3588
|
+
responseData,
|
|
3589
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3590
|
+
);
|
|
3591
|
+
|
|
3592
|
+
if (res_error) {
|
|
3593
|
+
Logger({
|
|
3594
|
+
level: "WARN",
|
|
3595
|
+
message: `Response Validation Warnnings for platform > Order > updateShipmentTracking \n ${res_error}`,
|
|
3596
|
+
});
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
return response;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3077
3602
|
/**
|
|
3078
3603
|
* @param {OrderPlatformValidator.UploadConsentParam} arg - Arg object
|
|
3604
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3079
3605
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3080
3606
|
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
3081
3607
|
* @name uploadConsent
|
|
3082
3608
|
* @summary:
|
|
3083
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsent/).
|
|
3609
|
+
* @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsent/).
|
|
3084
3610
|
*/
|
|
3085
|
-
async uploadConsent(
|
|
3611
|
+
async uploadConsent(
|
|
3612
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3613
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3614
|
+
) {
|
|
3086
3615
|
const { error } = OrderPlatformValidator.uploadConsent().validate(
|
|
3087
3616
|
{
|
|
3088
3617
|
body,
|
|
@@ -3117,12 +3646,12 @@ class Order {
|
|
|
3117
3646
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`,
|
|
3118
3647
|
query_params,
|
|
3119
3648
|
body,
|
|
3120
|
-
xHeaders,
|
|
3121
|
-
{
|
|
3649
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3650
|
+
{ responseHeaders }
|
|
3122
3651
|
);
|
|
3123
3652
|
|
|
3124
3653
|
let responseData = response;
|
|
3125
|
-
if (
|
|
3654
|
+
if (responseHeaders) {
|
|
3126
3655
|
responseData = response[0];
|
|
3127
3656
|
}
|
|
3128
3657
|
|
|
@@ -3145,13 +3674,17 @@ class Order {
|
|
|
3145
3674
|
|
|
3146
3675
|
/**
|
|
3147
3676
|
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
3677
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3148
3678
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3149
3679
|
* @returns {Promise<OrderPlatformModel.VerifyOtpResponse>} - Success response
|
|
3150
3680
|
* @name verifyMobileOTP
|
|
3151
3681
|
* @summary:
|
|
3152
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
|
|
3682
|
+
* @description: Verify Mobile OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
|
|
3153
3683
|
*/
|
|
3154
|
-
async verifyMobileOTP(
|
|
3684
|
+
async verifyMobileOTP(
|
|
3685
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3686
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3687
|
+
) {
|
|
3155
3688
|
const { error } = OrderPlatformValidator.verifyMobileOTP().validate(
|
|
3156
3689
|
{
|
|
3157
3690
|
body,
|
|
@@ -3188,12 +3721,12 @@ class Order {
|
|
|
3188
3721
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/verify/otp`,
|
|
3189
3722
|
query_params,
|
|
3190
3723
|
body,
|
|
3191
|
-
xHeaders,
|
|
3192
|
-
{
|
|
3724
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3725
|
+
{ responseHeaders }
|
|
3193
3726
|
);
|
|
3194
3727
|
|
|
3195
3728
|
let responseData = response;
|
|
3196
|
-
if (
|
|
3729
|
+
if (responseHeaders) {
|
|
3197
3730
|
responseData = response[0];
|
|
3198
3731
|
}
|
|
3199
3732
|
|