@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -93,192 +93,6 @@ class Order {
|
|
|
93
93
|
return response;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
/**
|
|
97
|
-
* @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
|
|
98
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
99
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
100
|
-
* @returns {Promise<OrderPlatformModel.BulkListingResponse>} - Success response
|
|
101
|
-
* @name bulkListing
|
|
102
|
-
* @summary:
|
|
103
|
-
* @description: Fetches of previous or running bulk jobs.
|
|
104
|
-
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
|
|
105
|
-
*/
|
|
106
|
-
async bulkListing(
|
|
107
|
-
{
|
|
108
|
-
pageSize,
|
|
109
|
-
pageNo,
|
|
110
|
-
startDate,
|
|
111
|
-
endDate,
|
|
112
|
-
status,
|
|
113
|
-
bulkActionType,
|
|
114
|
-
searchKey,
|
|
115
|
-
requestHeaders,
|
|
116
|
-
} = { requestHeaders: {} },
|
|
117
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
118
|
-
) {
|
|
119
|
-
const { error } = OrderPlatformValidator.bulkListing().validate(
|
|
120
|
-
{
|
|
121
|
-
pageSize,
|
|
122
|
-
pageNo,
|
|
123
|
-
startDate,
|
|
124
|
-
endDate,
|
|
125
|
-
status,
|
|
126
|
-
bulkActionType,
|
|
127
|
-
searchKey,
|
|
128
|
-
},
|
|
129
|
-
{ abortEarly: false, allowUnknown: true }
|
|
130
|
-
);
|
|
131
|
-
if (error) {
|
|
132
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Showing warrnings if extra unknown parameters are found
|
|
136
|
-
const { error: warrning } = OrderPlatformValidator.bulkListing().validate(
|
|
137
|
-
{
|
|
138
|
-
pageSize,
|
|
139
|
-
pageNo,
|
|
140
|
-
startDate,
|
|
141
|
-
endDate,
|
|
142
|
-
status,
|
|
143
|
-
bulkActionType,
|
|
144
|
-
searchKey,
|
|
145
|
-
},
|
|
146
|
-
{ abortEarly: false, allowUnknown: false }
|
|
147
|
-
);
|
|
148
|
-
if (warrning) {
|
|
149
|
-
Logger({
|
|
150
|
-
level: "WARN",
|
|
151
|
-
message: `Parameter Validation warrnings for platform > Order > bulkListing \n ${warrning}`,
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const query_params = {};
|
|
156
|
-
query_params["page_size"] = pageSize;
|
|
157
|
-
query_params["page_no"] = pageNo;
|
|
158
|
-
query_params["start_date"] = startDate;
|
|
159
|
-
query_params["end_date"] = endDate;
|
|
160
|
-
query_params["status"] = status;
|
|
161
|
-
query_params["bulk_action_type"] = bulkActionType;
|
|
162
|
-
query_params["search_key"] = searchKey;
|
|
163
|
-
|
|
164
|
-
const xHeaders = {};
|
|
165
|
-
|
|
166
|
-
const response = await PlatformAPIClient.execute(
|
|
167
|
-
this.config,
|
|
168
|
-
"get",
|
|
169
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs`,
|
|
170
|
-
query_params,
|
|
171
|
-
undefined,
|
|
172
|
-
{ ...xHeaders, ...requestHeaders },
|
|
173
|
-
{ responseHeaders }
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
let responseData = response;
|
|
177
|
-
if (responseHeaders) {
|
|
178
|
-
responseData = response[0];
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const {
|
|
182
|
-
error: res_error,
|
|
183
|
-
} = OrderPlatformModel.BulkListingResponse().validate(responseData, {
|
|
184
|
-
abortEarly: false,
|
|
185
|
-
allowUnknown: true,
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
if (res_error) {
|
|
189
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
190
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
191
|
-
} else {
|
|
192
|
-
Logger({
|
|
193
|
-
level: "WARN",
|
|
194
|
-
message: `Response Validation Warnings for platform > Order > bulkListing \n ${res_error}`,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return response;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object
|
|
204
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
205
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
206
|
-
* @returns {Promise<OrderPlatformModel.BulkStateTransistionResponse>} -
|
|
207
|
-
* Success response
|
|
208
|
-
* @name bulkStateTransistion
|
|
209
|
-
* @summary:
|
|
210
|
-
* @description: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/).
|
|
211
|
-
*/
|
|
212
|
-
async bulkStateTransistion(
|
|
213
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
214
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
215
|
-
) {
|
|
216
|
-
const { error } = OrderPlatformValidator.bulkStateTransistion().validate(
|
|
217
|
-
{
|
|
218
|
-
body,
|
|
219
|
-
},
|
|
220
|
-
{ abortEarly: false, allowUnknown: true }
|
|
221
|
-
);
|
|
222
|
-
if (error) {
|
|
223
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// Showing warrnings if extra unknown parameters are found
|
|
227
|
-
const {
|
|
228
|
-
error: warrning,
|
|
229
|
-
} = OrderPlatformValidator.bulkStateTransistion().validate(
|
|
230
|
-
{
|
|
231
|
-
body,
|
|
232
|
-
},
|
|
233
|
-
{ abortEarly: false, allowUnknown: false }
|
|
234
|
-
);
|
|
235
|
-
if (warrning) {
|
|
236
|
-
Logger({
|
|
237
|
-
level: "WARN",
|
|
238
|
-
message: `Parameter Validation warrnings for platform > Order > bulkStateTransistion \n ${warrning}`,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const query_params = {};
|
|
243
|
-
|
|
244
|
-
const xHeaders = {};
|
|
245
|
-
|
|
246
|
-
const response = await PlatformAPIClient.execute(
|
|
247
|
-
this.config,
|
|
248
|
-
"post",
|
|
249
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/state-transition`,
|
|
250
|
-
query_params,
|
|
251
|
-
body,
|
|
252
|
-
{ ...xHeaders, ...requestHeaders },
|
|
253
|
-
{ responseHeaders }
|
|
254
|
-
);
|
|
255
|
-
|
|
256
|
-
let responseData = response;
|
|
257
|
-
if (responseHeaders) {
|
|
258
|
-
responseData = response[0];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const {
|
|
262
|
-
error: res_error,
|
|
263
|
-
} = OrderPlatformModel.BulkStateTransistionResponse().validate(
|
|
264
|
-
responseData,
|
|
265
|
-
{ abortEarly: false, allowUnknown: true }
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
if (res_error) {
|
|
269
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
270
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
271
|
-
} else {
|
|
272
|
-
Logger({
|
|
273
|
-
level: "WARN",
|
|
274
|
-
message: `Response Validation Warnings for platform > Order > bulkStateTransistion \n ${res_error}`,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return response;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
96
|
/**
|
|
283
97
|
* @param {OrderPlatformValidator.CheckOrderStatusParam} arg - Arg object
|
|
284
98
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -610,21 +424,20 @@ class Order {
|
|
|
610
424
|
}
|
|
611
425
|
|
|
612
426
|
/**
|
|
613
|
-
* @param {OrderPlatformValidator.
|
|
427
|
+
* @param {OrderPlatformValidator.DispatchManifestParam} arg - Arg object
|
|
614
428
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
615
429
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
616
430
|
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
617
|
-
* @name
|
|
431
|
+
* @name dispatchManifest
|
|
618
432
|
* @summary:
|
|
619
|
-
* @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/
|
|
433
|
+
* @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifest/).
|
|
620
434
|
*/
|
|
621
|
-
async
|
|
622
|
-
{
|
|
435
|
+
async dispatchManifest(
|
|
436
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
623
437
|
{ responseHeaders } = { responseHeaders: false }
|
|
624
438
|
) {
|
|
625
|
-
const { error } = OrderPlatformValidator.
|
|
439
|
+
const { error } = OrderPlatformValidator.dispatchManifest().validate(
|
|
626
440
|
{
|
|
627
|
-
manifestId,
|
|
628
441
|
body,
|
|
629
442
|
},
|
|
630
443
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -636,9 +449,8 @@ class Order {
|
|
|
636
449
|
// Showing warrnings if extra unknown parameters are found
|
|
637
450
|
const {
|
|
638
451
|
error: warrning,
|
|
639
|
-
} = OrderPlatformValidator.
|
|
452
|
+
} = OrderPlatformValidator.dispatchManifest().validate(
|
|
640
453
|
{
|
|
641
|
-
manifestId,
|
|
642
454
|
body,
|
|
643
455
|
},
|
|
644
456
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -646,7 +458,7 @@ class Order {
|
|
|
646
458
|
if (warrning) {
|
|
647
459
|
Logger({
|
|
648
460
|
level: "WARN",
|
|
649
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
461
|
+
message: `Parameter Validation warrnings for platform > Order > dispatchManifest \n ${warrning}`,
|
|
650
462
|
});
|
|
651
463
|
}
|
|
652
464
|
|
|
@@ -657,7 +469,7 @@ class Order {
|
|
|
657
469
|
const response = await PlatformAPIClient.execute(
|
|
658
470
|
this.config,
|
|
659
471
|
"post",
|
|
660
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest
|
|
472
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`,
|
|
661
473
|
query_params,
|
|
662
474
|
body,
|
|
663
475
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -682,7 +494,7 @@ class Order {
|
|
|
682
494
|
} else {
|
|
683
495
|
Logger({
|
|
684
496
|
level: "WARN",
|
|
685
|
-
message: `Response Validation Warnings for platform > Order >
|
|
497
|
+
message: `Response Validation Warnings for platform > Order > dispatchManifest \n ${res_error}`,
|
|
686
498
|
});
|
|
687
499
|
}
|
|
688
500
|
}
|
|
@@ -929,85 +741,6 @@ class Order {
|
|
|
929
741
|
return response;
|
|
930
742
|
}
|
|
931
743
|
|
|
932
|
-
/**
|
|
933
|
-
* @param {OrderPlatformValidator.FailedOrderLogDetailsParam} arg - Arg object
|
|
934
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
935
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
936
|
-
* @returns {Promise<OrderPlatformModel.FailedOrderLogDetails>} - Success response
|
|
937
|
-
* @name failedOrderLogDetails
|
|
938
|
-
* @summary: Get failed order logs according to the filter provided
|
|
939
|
-
* @description: This endpoint allows users to get the exact error trace from the log id provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/).
|
|
940
|
-
*/
|
|
941
|
-
async failedOrderLogDetails(
|
|
942
|
-
{ logId, requestHeaders } = { requestHeaders: {} },
|
|
943
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
944
|
-
) {
|
|
945
|
-
const { error } = OrderPlatformValidator.failedOrderLogDetails().validate(
|
|
946
|
-
{
|
|
947
|
-
logId,
|
|
948
|
-
},
|
|
949
|
-
{ abortEarly: false, allowUnknown: true }
|
|
950
|
-
);
|
|
951
|
-
if (error) {
|
|
952
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
// Showing warrnings if extra unknown parameters are found
|
|
956
|
-
const {
|
|
957
|
-
error: warrning,
|
|
958
|
-
} = OrderPlatformValidator.failedOrderLogDetails().validate(
|
|
959
|
-
{
|
|
960
|
-
logId,
|
|
961
|
-
},
|
|
962
|
-
{ abortEarly: false, allowUnknown: false }
|
|
963
|
-
);
|
|
964
|
-
if (warrning) {
|
|
965
|
-
Logger({
|
|
966
|
-
level: "WARN",
|
|
967
|
-
message: `Parameter Validation warrnings for platform > Order > failedOrderLogDetails \n ${warrning}`,
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
const query_params = {};
|
|
972
|
-
|
|
973
|
-
const xHeaders = {};
|
|
974
|
-
|
|
975
|
-
const response = await PlatformAPIClient.execute(
|
|
976
|
-
this.config,
|
|
977
|
-
"get",
|
|
978
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed/logs/${logId}`,
|
|
979
|
-
query_params,
|
|
980
|
-
undefined,
|
|
981
|
-
{ ...xHeaders, ...requestHeaders },
|
|
982
|
-
{ responseHeaders }
|
|
983
|
-
);
|
|
984
|
-
|
|
985
|
-
let responseData = response;
|
|
986
|
-
if (responseHeaders) {
|
|
987
|
-
responseData = response[0];
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
const {
|
|
991
|
-
error: res_error,
|
|
992
|
-
} = OrderPlatformModel.FailedOrderLogDetails().validate(responseData, {
|
|
993
|
-
abortEarly: false,
|
|
994
|
-
allowUnknown: true,
|
|
995
|
-
});
|
|
996
|
-
|
|
997
|
-
if (res_error) {
|
|
998
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
999
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1000
|
-
} else {
|
|
1001
|
-
Logger({
|
|
1002
|
-
level: "WARN",
|
|
1003
|
-
message: `Response Validation Warnings for platform > Order > failedOrderLogDetails \n ${res_error}`,
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
return response;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
744
|
/**
|
|
1012
745
|
* @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object
|
|
1013
746
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1430,22 +1163,22 @@ class Order {
|
|
|
1430
1163
|
}
|
|
1431
1164
|
|
|
1432
1165
|
/**
|
|
1433
|
-
* @param {OrderPlatformValidator.
|
|
1166
|
+
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1434
1167
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1435
1168
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1436
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1437
|
-
* @name
|
|
1169
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
|
|
1170
|
+
* @name getAnnouncements
|
|
1438
1171
|
* @summary:
|
|
1439
|
-
* @description:
|
|
1172
|
+
* @description: Get Announcements - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
1440
1173
|
*/
|
|
1441
|
-
async
|
|
1442
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
1174
|
+
async getAnnouncements(
|
|
1175
|
+
{ date, requestHeaders } = { requestHeaders: {} },
|
|
1443
1176
|
{ responseHeaders } = { responseHeaders: false }
|
|
1444
1177
|
) {
|
|
1445
|
-
const {
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1178
|
+
const { error } = OrderPlatformValidator.getAnnouncements().validate(
|
|
1179
|
+
{
|
|
1180
|
+
date,
|
|
1181
|
+
},
|
|
1449
1182
|
{ abortEarly: false, allowUnknown: true }
|
|
1450
1183
|
);
|
|
1451
1184
|
if (error) {
|
|
@@ -1455,25 +1188,28 @@ class Order {
|
|
|
1455
1188
|
// Showing warrnings if extra unknown parameters are found
|
|
1456
1189
|
const {
|
|
1457
1190
|
error: warrning,
|
|
1458
|
-
} = OrderPlatformValidator.
|
|
1459
|
-
{
|
|
1191
|
+
} = OrderPlatformValidator.getAnnouncements().validate(
|
|
1192
|
+
{
|
|
1193
|
+
date,
|
|
1194
|
+
},
|
|
1460
1195
|
{ abortEarly: false, allowUnknown: false }
|
|
1461
1196
|
);
|
|
1462
1197
|
if (warrning) {
|
|
1463
1198
|
Logger({
|
|
1464
1199
|
level: "WARN",
|
|
1465
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1200
|
+
message: `Parameter Validation warrnings for platform > Order > getAnnouncements \n ${warrning}`,
|
|
1466
1201
|
});
|
|
1467
1202
|
}
|
|
1468
1203
|
|
|
1469
1204
|
const query_params = {};
|
|
1205
|
+
query_params["date"] = date;
|
|
1470
1206
|
|
|
1471
1207
|
const xHeaders = {};
|
|
1472
1208
|
|
|
1473
1209
|
const response = await PlatformAPIClient.execute(
|
|
1474
1210
|
this.config,
|
|
1475
1211
|
"get",
|
|
1476
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
1212
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/announcements`,
|
|
1477
1213
|
query_params,
|
|
1478
1214
|
undefined,
|
|
1479
1215
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1487,7 +1223,7 @@ class Order {
|
|
|
1487
1223
|
|
|
1488
1224
|
const {
|
|
1489
1225
|
error: res_error,
|
|
1490
|
-
} = OrderPlatformModel.
|
|
1226
|
+
} = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
|
|
1491
1227
|
abortEarly: false,
|
|
1492
1228
|
allowUnknown: true,
|
|
1493
1229
|
});
|
|
@@ -1498,7 +1234,7 @@ class Order {
|
|
|
1498
1234
|
} else {
|
|
1499
1235
|
Logger({
|
|
1500
1236
|
level: "WARN",
|
|
1501
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1237
|
+
message: `Response Validation Warnings for platform > Order > getAnnouncements \n ${res_error}`,
|
|
1502
1238
|
});
|
|
1503
1239
|
}
|
|
1504
1240
|
}
|
|
@@ -1507,104 +1243,24 @@ class Order {
|
|
|
1507
1243
|
}
|
|
1508
1244
|
|
|
1509
1245
|
/**
|
|
1510
|
-
* @param {OrderPlatformValidator.
|
|
1246
|
+
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1511
1247
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1512
1248
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1513
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1514
|
-
*
|
|
1249
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
|
|
1250
|
+
* Success response
|
|
1251
|
+
* @name getBagById
|
|
1515
1252
|
* @summary:
|
|
1516
|
-
* @description: Get
|
|
1253
|
+
* @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
1517
1254
|
*/
|
|
1518
|
-
async
|
|
1519
|
-
{
|
|
1255
|
+
async getBagById(
|
|
1256
|
+
{ bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
|
|
1520
1257
|
{ responseHeaders } = { responseHeaders: false }
|
|
1521
1258
|
) {
|
|
1522
|
-
const { error } = OrderPlatformValidator.
|
|
1259
|
+
const { error } = OrderPlatformValidator.getBagById().validate(
|
|
1523
1260
|
{
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
);
|
|
1528
|
-
if (error) {
|
|
1529
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1533
|
-
const {
|
|
1534
|
-
error: warrning,
|
|
1535
|
-
} = OrderPlatformValidator.getAnnouncements().validate(
|
|
1536
|
-
{
|
|
1537
|
-
date,
|
|
1538
|
-
},
|
|
1539
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1540
|
-
);
|
|
1541
|
-
if (warrning) {
|
|
1542
|
-
Logger({
|
|
1543
|
-
level: "WARN",
|
|
1544
|
-
message: `Parameter Validation warrnings for platform > Order > getAnnouncements \n ${warrning}`,
|
|
1545
|
-
});
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
const query_params = {};
|
|
1549
|
-
query_params["date"] = date;
|
|
1550
|
-
|
|
1551
|
-
const xHeaders = {};
|
|
1552
|
-
|
|
1553
|
-
const response = await PlatformAPIClient.execute(
|
|
1554
|
-
this.config,
|
|
1555
|
-
"get",
|
|
1556
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/announcements`,
|
|
1557
|
-
query_params,
|
|
1558
|
-
undefined,
|
|
1559
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1560
|
-
{ responseHeaders }
|
|
1561
|
-
);
|
|
1562
|
-
|
|
1563
|
-
let responseData = response;
|
|
1564
|
-
if (responseHeaders) {
|
|
1565
|
-
responseData = response[0];
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
const {
|
|
1569
|
-
error: res_error,
|
|
1570
|
-
} = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
|
|
1571
|
-
abortEarly: false,
|
|
1572
|
-
allowUnknown: true,
|
|
1573
|
-
});
|
|
1574
|
-
|
|
1575
|
-
if (res_error) {
|
|
1576
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1577
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1578
|
-
} else {
|
|
1579
|
-
Logger({
|
|
1580
|
-
level: "WARN",
|
|
1581
|
-
message: `Response Validation Warnings for platform > Order > getAnnouncements \n ${res_error}`,
|
|
1582
|
-
});
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
return response;
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
/**
|
|
1590
|
-
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1591
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1592
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1593
|
-
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
|
|
1594
|
-
* Success response
|
|
1595
|
-
* @name getBagById
|
|
1596
|
-
* @summary:
|
|
1597
|
-
* @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
1598
|
-
*/
|
|
1599
|
-
async getBagById(
|
|
1600
|
-
{ bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
|
|
1601
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1602
|
-
) {
|
|
1603
|
-
const { error } = OrderPlatformValidator.getBagById().validate(
|
|
1604
|
-
{
|
|
1605
|
-
bagId,
|
|
1606
|
-
channelBagId,
|
|
1607
|
-
channelId,
|
|
1261
|
+
bagId,
|
|
1262
|
+
channelBagId,
|
|
1263
|
+
channelId,
|
|
1608
1264
|
},
|
|
1609
1265
|
{ abortEarly: false, allowUnknown: true }
|
|
1610
1266
|
);
|
|
@@ -1873,8 +1529,8 @@ class Order {
|
|
|
1873
1529
|
{
|
|
1874
1530
|
salesChannels,
|
|
1875
1531
|
dpIds,
|
|
1876
|
-
|
|
1877
|
-
|
|
1532
|
+
fromDate,
|
|
1533
|
+
toDate,
|
|
1878
1534
|
stores,
|
|
1879
1535
|
tags,
|
|
1880
1536
|
bagStatus,
|
|
@@ -1893,8 +1549,8 @@ class Order {
|
|
|
1893
1549
|
{
|
|
1894
1550
|
salesChannels,
|
|
1895
1551
|
dpIds,
|
|
1896
|
-
|
|
1897
|
-
|
|
1552
|
+
fromDate,
|
|
1553
|
+
toDate,
|
|
1898
1554
|
stores,
|
|
1899
1555
|
tags,
|
|
1900
1556
|
bagStatus,
|
|
@@ -1917,8 +1573,8 @@ class Order {
|
|
|
1917
1573
|
{
|
|
1918
1574
|
salesChannels,
|
|
1919
1575
|
dpIds,
|
|
1920
|
-
|
|
1921
|
-
|
|
1576
|
+
fromDate,
|
|
1577
|
+
toDate,
|
|
1922
1578
|
stores,
|
|
1923
1579
|
tags,
|
|
1924
1580
|
bagStatus,
|
|
@@ -1940,8 +1596,8 @@ class Order {
|
|
|
1940
1596
|
const query_params = {};
|
|
1941
1597
|
query_params["sales_channels"] = salesChannels;
|
|
1942
1598
|
query_params["dp_ids"] = dpIds;
|
|
1943
|
-
query_params["
|
|
1944
|
-
query_params["
|
|
1599
|
+
query_params["from_date"] = fromDate;
|
|
1600
|
+
query_params["to_date"] = toDate;
|
|
1945
1601
|
query_params["stores"] = stores;
|
|
1946
1602
|
query_params["tags"] = tags;
|
|
1947
1603
|
query_params["bag_status"] = bagStatus;
|
|
@@ -1990,538 +1646,20 @@ class Order {
|
|
|
1990
1646
|
}
|
|
1991
1647
|
|
|
1992
1648
|
/**
|
|
1993
|
-
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
1994
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1995
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1996
|
-
* @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
|
|
1997
|
-
* @name getChannelConfig
|
|
1998
|
-
* @summary:
|
|
1999
|
-
* @description: getChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
|
|
2000
|
-
*/
|
|
2001
|
-
async getChannelConfig(
|
|
2002
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
2003
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2004
|
-
) {
|
|
2005
|
-
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
2006
|
-
{},
|
|
2007
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2008
|
-
);
|
|
2009
|
-
if (error) {
|
|
2010
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2014
|
-
const {
|
|
2015
|
-
error: warrning,
|
|
2016
|
-
} = OrderPlatformValidator.getChannelConfig().validate(
|
|
2017
|
-
{},
|
|
2018
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2019
|
-
);
|
|
2020
|
-
if (warrning) {
|
|
2021
|
-
Logger({
|
|
2022
|
-
level: "WARN",
|
|
2023
|
-
message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
|
|
2024
|
-
});
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
const query_params = {};
|
|
2028
|
-
|
|
2029
|
-
const xHeaders = {};
|
|
2030
|
-
|
|
2031
|
-
const response = await PlatformAPIClient.execute(
|
|
2032
|
-
this.config,
|
|
2033
|
-
"get",
|
|
2034
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
2035
|
-
query_params,
|
|
2036
|
-
undefined,
|
|
2037
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2038
|
-
{ responseHeaders }
|
|
2039
|
-
);
|
|
2040
|
-
|
|
2041
|
-
let responseData = response;
|
|
2042
|
-
if (responseHeaders) {
|
|
2043
|
-
responseData = response[0];
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
const {
|
|
2047
|
-
error: res_error,
|
|
2048
|
-
} = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
|
|
2049
|
-
abortEarly: false,
|
|
2050
|
-
allowUnknown: true,
|
|
2051
|
-
});
|
|
2052
|
-
|
|
2053
|
-
if (res_error) {
|
|
2054
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2055
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2056
|
-
} else {
|
|
2057
|
-
Logger({
|
|
2058
|
-
level: "WARN",
|
|
2059
|
-
message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
|
|
2060
|
-
});
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
return response;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
/**
|
|
2068
|
-
* @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
|
|
2069
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2070
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2071
|
-
* @returns {Promise<OrderPlatformModel.JobFailedResponse>} - Success response
|
|
2072
|
-
* @name getFileByStatus
|
|
2073
|
-
* @summary:
|
|
2074
|
-
* @description: Get the file URL consisting Records of the provided status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/).
|
|
2075
|
-
*/
|
|
2076
|
-
async getFileByStatus(
|
|
2077
|
-
{ batchId, status, fileType, reportType, requestHeaders } = {
|
|
2078
|
-
requestHeaders: {},
|
|
2079
|
-
},
|
|
2080
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2081
|
-
) {
|
|
2082
|
-
const { error } = OrderPlatformValidator.getFileByStatus().validate(
|
|
2083
|
-
{
|
|
2084
|
-
batchId,
|
|
2085
|
-
status,
|
|
2086
|
-
fileType,
|
|
2087
|
-
reportType,
|
|
2088
|
-
},
|
|
2089
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2090
|
-
);
|
|
2091
|
-
if (error) {
|
|
2092
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2096
|
-
const {
|
|
2097
|
-
error: warrning,
|
|
2098
|
-
} = OrderPlatformValidator.getFileByStatus().validate(
|
|
2099
|
-
{
|
|
2100
|
-
batchId,
|
|
2101
|
-
status,
|
|
2102
|
-
fileType,
|
|
2103
|
-
reportType,
|
|
2104
|
-
},
|
|
2105
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2106
|
-
);
|
|
2107
|
-
if (warrning) {
|
|
2108
|
-
Logger({
|
|
2109
|
-
level: "WARN",
|
|
2110
|
-
message: `Parameter Validation warrnings for platform > Order > getFileByStatus \n ${warrning}`,
|
|
2111
|
-
});
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
const query_params = {};
|
|
2115
|
-
query_params["status"] = status;
|
|
2116
|
-
query_params["file_type"] = fileType;
|
|
2117
|
-
query_params["report_type"] = reportType;
|
|
2118
|
-
|
|
2119
|
-
const xHeaders = {};
|
|
2120
|
-
|
|
2121
|
-
const response = await PlatformAPIClient.execute(
|
|
2122
|
-
this.config,
|
|
2123
|
-
"get",
|
|
2124
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}/file`,
|
|
2125
|
-
query_params,
|
|
2126
|
-
undefined,
|
|
2127
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2128
|
-
{ responseHeaders }
|
|
2129
|
-
);
|
|
2130
|
-
|
|
2131
|
-
let responseData = response;
|
|
2132
|
-
if (responseHeaders) {
|
|
2133
|
-
responseData = response[0];
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
const {
|
|
2137
|
-
error: res_error,
|
|
2138
|
-
} = OrderPlatformModel.JobFailedResponse().validate(responseData, {
|
|
2139
|
-
abortEarly: false,
|
|
2140
|
-
allowUnknown: true,
|
|
2141
|
-
});
|
|
2142
|
-
|
|
2143
|
-
if (res_error) {
|
|
2144
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2145
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2146
|
-
} else {
|
|
2147
|
-
Logger({
|
|
2148
|
-
level: "WARN",
|
|
2149
|
-
message: `Response Validation Warnings for platform > Order > getFileByStatus \n ${res_error}`,
|
|
2150
|
-
});
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
return response;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
/**
|
|
2158
|
-
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
2159
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2160
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2161
|
-
* @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
|
|
2162
|
-
* @name getLaneConfig
|
|
2163
|
-
* @summary:
|
|
2164
|
-
* @description: Get lane config for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
2165
|
-
*/
|
|
2166
|
-
async getLaneConfig(
|
|
2167
|
-
{
|
|
2168
|
-
superLane,
|
|
2169
|
-
groupEntity,
|
|
2170
|
-
fromDate,
|
|
2171
|
-
toDate,
|
|
2172
|
-
startDate,
|
|
2173
|
-
endDate,
|
|
2174
|
-
dpIds,
|
|
2175
|
-
stores,
|
|
2176
|
-
salesChannels,
|
|
2177
|
-
paymentMode,
|
|
2178
|
-
bagStatus,
|
|
2179
|
-
searchType,
|
|
2180
|
-
searchValue,
|
|
2181
|
-
tags,
|
|
2182
|
-
timeToDispatch,
|
|
2183
|
-
paymentMethods,
|
|
2184
|
-
myOrders,
|
|
2185
|
-
showCrossCompanyData,
|
|
2186
|
-
orderType,
|
|
2187
|
-
requestHeaders,
|
|
2188
|
-
} = { requestHeaders: {} },
|
|
2189
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2190
|
-
) {
|
|
2191
|
-
const { error } = OrderPlatformValidator.getLaneConfig().validate(
|
|
2192
|
-
{
|
|
2193
|
-
superLane,
|
|
2194
|
-
groupEntity,
|
|
2195
|
-
fromDate,
|
|
2196
|
-
toDate,
|
|
2197
|
-
startDate,
|
|
2198
|
-
endDate,
|
|
2199
|
-
dpIds,
|
|
2200
|
-
stores,
|
|
2201
|
-
salesChannels,
|
|
2202
|
-
paymentMode,
|
|
2203
|
-
bagStatus,
|
|
2204
|
-
searchType,
|
|
2205
|
-
searchValue,
|
|
2206
|
-
tags,
|
|
2207
|
-
timeToDispatch,
|
|
2208
|
-
paymentMethods,
|
|
2209
|
-
myOrders,
|
|
2210
|
-
showCrossCompanyData,
|
|
2211
|
-
orderType,
|
|
2212
|
-
},
|
|
2213
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2214
|
-
);
|
|
2215
|
-
if (error) {
|
|
2216
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2220
|
-
const { error: warrning } = OrderPlatformValidator.getLaneConfig().validate(
|
|
2221
|
-
{
|
|
2222
|
-
superLane,
|
|
2223
|
-
groupEntity,
|
|
2224
|
-
fromDate,
|
|
2225
|
-
toDate,
|
|
2226
|
-
startDate,
|
|
2227
|
-
endDate,
|
|
2228
|
-
dpIds,
|
|
2229
|
-
stores,
|
|
2230
|
-
salesChannels,
|
|
2231
|
-
paymentMode,
|
|
2232
|
-
bagStatus,
|
|
2233
|
-
searchType,
|
|
2234
|
-
searchValue,
|
|
2235
|
-
tags,
|
|
2236
|
-
timeToDispatch,
|
|
2237
|
-
paymentMethods,
|
|
2238
|
-
myOrders,
|
|
2239
|
-
showCrossCompanyData,
|
|
2240
|
-
orderType,
|
|
2241
|
-
},
|
|
2242
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2243
|
-
);
|
|
2244
|
-
if (warrning) {
|
|
2245
|
-
Logger({
|
|
2246
|
-
level: "WARN",
|
|
2247
|
-
message: `Parameter Validation warrnings for platform > Order > getLaneConfig \n ${warrning}`,
|
|
2248
|
-
});
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
const query_params = {};
|
|
2252
|
-
query_params["super_lane"] = superLane;
|
|
2253
|
-
query_params["group_entity"] = groupEntity;
|
|
2254
|
-
query_params["from_date"] = fromDate;
|
|
2255
|
-
query_params["to_date"] = toDate;
|
|
2256
|
-
query_params["start_date"] = startDate;
|
|
2257
|
-
query_params["end_date"] = endDate;
|
|
2258
|
-
query_params["dp_ids"] = dpIds;
|
|
2259
|
-
query_params["stores"] = stores;
|
|
2260
|
-
query_params["sales_channels"] = salesChannels;
|
|
2261
|
-
query_params["payment_mode"] = paymentMode;
|
|
2262
|
-
query_params["bag_status"] = bagStatus;
|
|
2263
|
-
query_params["search_type"] = searchType;
|
|
2264
|
-
query_params["search_value"] = searchValue;
|
|
2265
|
-
query_params["tags"] = tags;
|
|
2266
|
-
query_params["time_to_dispatch"] = timeToDispatch;
|
|
2267
|
-
query_params["payment_methods"] = paymentMethods;
|
|
2268
|
-
query_params["my_orders"] = myOrders;
|
|
2269
|
-
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
2270
|
-
query_params["order_type"] = orderType;
|
|
2271
|
-
|
|
2272
|
-
const xHeaders = {};
|
|
2273
|
-
|
|
2274
|
-
const response = await PlatformAPIClient.execute(
|
|
2275
|
-
this.config,
|
|
2276
|
-
"get",
|
|
2277
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
|
|
2278
|
-
query_params,
|
|
2279
|
-
undefined,
|
|
2280
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2281
|
-
{ responseHeaders }
|
|
2282
|
-
);
|
|
2283
|
-
|
|
2284
|
-
let responseData = response;
|
|
2285
|
-
if (responseHeaders) {
|
|
2286
|
-
responseData = response[0];
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
const {
|
|
2290
|
-
error: res_error,
|
|
2291
|
-
} = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
|
|
2292
|
-
abortEarly: false,
|
|
2293
|
-
allowUnknown: true,
|
|
2294
|
-
});
|
|
2295
|
-
|
|
2296
|
-
if (res_error) {
|
|
2297
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2298
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2299
|
-
} else {
|
|
2300
|
-
Logger({
|
|
2301
|
-
level: "WARN",
|
|
2302
|
-
message: `Response Validation Warnings for platform > Order > getLaneConfig \n ${res_error}`,
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
return response;
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
/**
|
|
2311
|
-
* @param {OrderPlatformValidator.GetManifestDetailsParam} arg - Arg object
|
|
2312
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2313
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2314
|
-
* @returns {Promise<OrderPlatformModel.ManifestDetails>} - Success response
|
|
2315
|
-
* @name getManifestDetails
|
|
2316
|
-
* @summary:
|
|
2317
|
-
* @description: get Manifest Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestDetails/).
|
|
2318
|
-
*/
|
|
2319
|
-
async getManifestDetails(
|
|
2320
|
-
{ manifestId, requestHeaders } = { requestHeaders: {} },
|
|
2321
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2322
|
-
) {
|
|
2323
|
-
const { error } = OrderPlatformValidator.getManifestDetails().validate(
|
|
2324
|
-
{
|
|
2325
|
-
manifestId,
|
|
2326
|
-
},
|
|
2327
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2328
|
-
);
|
|
2329
|
-
if (error) {
|
|
2330
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2334
|
-
const {
|
|
2335
|
-
error: warrning,
|
|
2336
|
-
} = OrderPlatformValidator.getManifestDetails().validate(
|
|
2337
|
-
{
|
|
2338
|
-
manifestId,
|
|
2339
|
-
},
|
|
2340
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2341
|
-
);
|
|
2342
|
-
if (warrning) {
|
|
2343
|
-
Logger({
|
|
2344
|
-
level: "WARN",
|
|
2345
|
-
message: `Parameter Validation warrnings for platform > Order > getManifestDetails \n ${warrning}`,
|
|
2346
|
-
});
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
const query_params = {};
|
|
2350
|
-
|
|
2351
|
-
const xHeaders = {};
|
|
2352
|
-
|
|
2353
|
-
const response = await PlatformAPIClient.execute(
|
|
2354
|
-
this.config,
|
|
2355
|
-
"get",
|
|
2356
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests/${manifestId}`,
|
|
2357
|
-
query_params,
|
|
2358
|
-
undefined,
|
|
2359
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2360
|
-
{ responseHeaders }
|
|
2361
|
-
);
|
|
2362
|
-
|
|
2363
|
-
let responseData = response;
|
|
2364
|
-
if (responseHeaders) {
|
|
2365
|
-
responseData = response[0];
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
const {
|
|
2369
|
-
error: res_error,
|
|
2370
|
-
} = OrderPlatformModel.ManifestDetails().validate(responseData, {
|
|
2371
|
-
abortEarly: false,
|
|
2372
|
-
allowUnknown: true,
|
|
2373
|
-
});
|
|
2374
|
-
|
|
2375
|
-
if (res_error) {
|
|
2376
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2377
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2378
|
-
} else {
|
|
2379
|
-
Logger({
|
|
2380
|
-
level: "WARN",
|
|
2381
|
-
message: `Response Validation Warnings for platform > Order > getManifestDetails \n ${res_error}`,
|
|
2382
|
-
});
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
return response;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
/**
|
|
2390
|
-
* @param {OrderPlatformValidator.GetManifestShipmentsParam} arg - Arg object
|
|
2391
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2392
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2393
|
-
* @returns {Promise<OrderPlatformModel.ManifestShipmentListing>} - Success response
|
|
2394
|
-
* @name getManifestShipments
|
|
2395
|
-
* @summary:
|
|
2396
|
-
* @description: get Manifest Shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestShipments/).
|
|
2397
|
-
*/
|
|
2398
|
-
async getManifestShipments(
|
|
2399
|
-
{
|
|
2400
|
-
dpIds,
|
|
2401
|
-
stores,
|
|
2402
|
-
toDate,
|
|
2403
|
-
fromDate,
|
|
2404
|
-
dpName,
|
|
2405
|
-
salesChannels,
|
|
2406
|
-
searchType,
|
|
2407
|
-
searchValue,
|
|
2408
|
-
pageNo,
|
|
2409
|
-
pageSize,
|
|
2410
|
-
requestHeaders,
|
|
2411
|
-
} = { requestHeaders: {} },
|
|
2412
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2413
|
-
) {
|
|
2414
|
-
const { error } = OrderPlatformValidator.getManifestShipments().validate(
|
|
2415
|
-
{
|
|
2416
|
-
dpIds,
|
|
2417
|
-
stores,
|
|
2418
|
-
toDate,
|
|
2419
|
-
fromDate,
|
|
2420
|
-
dpName,
|
|
2421
|
-
salesChannels,
|
|
2422
|
-
searchType,
|
|
2423
|
-
searchValue,
|
|
2424
|
-
pageNo,
|
|
2425
|
-
pageSize,
|
|
2426
|
-
},
|
|
2427
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2428
|
-
);
|
|
2429
|
-
if (error) {
|
|
2430
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2434
|
-
const {
|
|
2435
|
-
error: warrning,
|
|
2436
|
-
} = OrderPlatformValidator.getManifestShipments().validate(
|
|
2437
|
-
{
|
|
2438
|
-
dpIds,
|
|
2439
|
-
stores,
|
|
2440
|
-
toDate,
|
|
2441
|
-
fromDate,
|
|
2442
|
-
dpName,
|
|
2443
|
-
salesChannels,
|
|
2444
|
-
searchType,
|
|
2445
|
-
searchValue,
|
|
2446
|
-
pageNo,
|
|
2447
|
-
pageSize,
|
|
2448
|
-
},
|
|
2449
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2450
|
-
);
|
|
2451
|
-
if (warrning) {
|
|
2452
|
-
Logger({
|
|
2453
|
-
level: "WARN",
|
|
2454
|
-
message: `Parameter Validation warrnings for platform > Order > getManifestShipments \n ${warrning}`,
|
|
2455
|
-
});
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
const query_params = {};
|
|
2459
|
-
query_params["dp_ids"] = dpIds;
|
|
2460
|
-
query_params["stores"] = stores;
|
|
2461
|
-
query_params["to_date"] = toDate;
|
|
2462
|
-
query_params["from_date"] = fromDate;
|
|
2463
|
-
query_params["dp_name"] = dpName;
|
|
2464
|
-
query_params["sales_channels"] = salesChannels;
|
|
2465
|
-
query_params["search_type"] = searchType;
|
|
2466
|
-
query_params["search_value"] = searchValue;
|
|
2467
|
-
query_params["page_no"] = pageNo;
|
|
2468
|
-
query_params["page_size"] = pageSize;
|
|
2469
|
-
|
|
2470
|
-
const xHeaders = {};
|
|
2471
|
-
|
|
2472
|
-
const response = await PlatformAPIClient.execute(
|
|
2473
|
-
this.config,
|
|
2474
|
-
"get",
|
|
2475
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests/shipments`,
|
|
2476
|
-
query_params,
|
|
2477
|
-
undefined,
|
|
2478
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2479
|
-
{ responseHeaders }
|
|
2480
|
-
);
|
|
2481
|
-
|
|
2482
|
-
let responseData = response;
|
|
2483
|
-
if (responseHeaders) {
|
|
2484
|
-
responseData = response[0];
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
const {
|
|
2488
|
-
error: res_error,
|
|
2489
|
-
} = OrderPlatformModel.ManifestShipmentListing().validate(responseData, {
|
|
2490
|
-
abortEarly: false,
|
|
2491
|
-
allowUnknown: true,
|
|
2492
|
-
});
|
|
2493
|
-
|
|
2494
|
-
if (res_error) {
|
|
2495
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2496
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2497
|
-
} else {
|
|
2498
|
-
Logger({
|
|
2499
|
-
level: "WARN",
|
|
2500
|
-
message: `Response Validation Warnings for platform > Order > getManifestShipments \n ${res_error}`,
|
|
2501
|
-
});
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
return response;
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
|
-
/**
|
|
2509
|
-
* @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
|
|
1649
|
+
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
2510
1650
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2511
1651
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2512
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2513
|
-
* @name
|
|
1652
|
+
* @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
|
|
1653
|
+
* @name getChannelConfig
|
|
2514
1654
|
* @summary:
|
|
2515
|
-
* @description:
|
|
1655
|
+
* @description: getChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
|
|
2516
1656
|
*/
|
|
2517
|
-
async
|
|
2518
|
-
{
|
|
1657
|
+
async getChannelConfig(
|
|
1658
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2519
1659
|
{ responseHeaders } = { responseHeaders: false }
|
|
2520
1660
|
) {
|
|
2521
|
-
const { error } = OrderPlatformValidator.
|
|
2522
|
-
{
|
|
2523
|
-
view,
|
|
2524
|
-
},
|
|
1661
|
+
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
1662
|
+
{},
|
|
2525
1663
|
{ abortEarly: false, allowUnknown: true }
|
|
2526
1664
|
);
|
|
2527
1665
|
if (error) {
|
|
@@ -2531,28 +1669,25 @@ class Order {
|
|
|
2531
1669
|
// Showing warrnings if extra unknown parameters are found
|
|
2532
1670
|
const {
|
|
2533
1671
|
error: warrning,
|
|
2534
|
-
} = OrderPlatformValidator.
|
|
2535
|
-
{
|
|
2536
|
-
view,
|
|
2537
|
-
},
|
|
1672
|
+
} = OrderPlatformValidator.getChannelConfig().validate(
|
|
1673
|
+
{},
|
|
2538
1674
|
{ abortEarly: false, allowUnknown: false }
|
|
2539
1675
|
);
|
|
2540
1676
|
if (warrning) {
|
|
2541
1677
|
Logger({
|
|
2542
1678
|
level: "WARN",
|
|
2543
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1679
|
+
message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
|
|
2544
1680
|
});
|
|
2545
1681
|
}
|
|
2546
1682
|
|
|
2547
1683
|
const query_params = {};
|
|
2548
|
-
query_params["view"] = view;
|
|
2549
1684
|
|
|
2550
1685
|
const xHeaders = {};
|
|
2551
1686
|
|
|
2552
1687
|
const response = await PlatformAPIClient.execute(
|
|
2553
1688
|
this.config,
|
|
2554
1689
|
"get",
|
|
2555
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
1690
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
2556
1691
|
query_params,
|
|
2557
1692
|
undefined,
|
|
2558
1693
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2566,7 +1701,7 @@ class Order {
|
|
|
2566
1701
|
|
|
2567
1702
|
const {
|
|
2568
1703
|
error: res_error,
|
|
2569
|
-
} = OrderPlatformModel.
|
|
1704
|
+
} = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
|
|
2570
1705
|
abortEarly: false,
|
|
2571
1706
|
allowUnknown: true,
|
|
2572
1707
|
});
|
|
@@ -2577,7 +1712,7 @@ class Order {
|
|
|
2577
1712
|
} else {
|
|
2578
1713
|
Logger({
|
|
2579
1714
|
level: "WARN",
|
|
2580
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1715
|
+
message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
|
|
2581
1716
|
});
|
|
2582
1717
|
}
|
|
2583
1718
|
}
|
|
@@ -2586,40 +1721,56 @@ class Order {
|
|
|
2586
1721
|
}
|
|
2587
1722
|
|
|
2588
1723
|
/**
|
|
2589
|
-
* @param {OrderPlatformValidator.
|
|
1724
|
+
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
2590
1725
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2591
1726
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2592
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2593
|
-
* @name
|
|
1727
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
|
|
1728
|
+
* @name getLaneConfig
|
|
2594
1729
|
* @summary:
|
|
2595
|
-
* @description:
|
|
1730
|
+
* @description: Get lane config for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
2596
1731
|
*/
|
|
2597
|
-
async
|
|
1732
|
+
async getLaneConfig(
|
|
2598
1733
|
{
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
1734
|
+
superLane,
|
|
1735
|
+
groupEntity,
|
|
1736
|
+
fromDate,
|
|
1737
|
+
toDate,
|
|
1738
|
+
dpIds,
|
|
1739
|
+
stores,
|
|
1740
|
+
salesChannels,
|
|
1741
|
+
paymentMode,
|
|
1742
|
+
bagStatus,
|
|
2602
1743
|
searchType,
|
|
2603
|
-
storeId,
|
|
2604
1744
|
searchValue,
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
1745
|
+
tags,
|
|
1746
|
+
timeToDispatch,
|
|
1747
|
+
paymentMethods,
|
|
1748
|
+
myOrders,
|
|
1749
|
+
showCrossCompanyData,
|
|
1750
|
+
orderType,
|
|
2608
1751
|
requestHeaders,
|
|
2609
1752
|
} = { requestHeaders: {} },
|
|
2610
1753
|
{ responseHeaders } = { responseHeaders: false }
|
|
2611
1754
|
) {
|
|
2612
|
-
const { error } = OrderPlatformValidator.
|
|
1755
|
+
const { error } = OrderPlatformValidator.getLaneConfig().validate(
|
|
2613
1756
|
{
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
1757
|
+
superLane,
|
|
1758
|
+
groupEntity,
|
|
1759
|
+
fromDate,
|
|
1760
|
+
toDate,
|
|
1761
|
+
dpIds,
|
|
1762
|
+
stores,
|
|
1763
|
+
salesChannels,
|
|
1764
|
+
paymentMode,
|
|
1765
|
+
bagStatus,
|
|
2617
1766
|
searchType,
|
|
2618
|
-
storeId,
|
|
2619
1767
|
searchValue,
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
1768
|
+
tags,
|
|
1769
|
+
timeToDispatch,
|
|
1770
|
+
paymentMethods,
|
|
1771
|
+
myOrders,
|
|
1772
|
+
showCrossCompanyData,
|
|
1773
|
+
orderType,
|
|
2623
1774
|
},
|
|
2624
1775
|
{ abortEarly: false, allowUnknown: true }
|
|
2625
1776
|
);
|
|
@@ -2628,44 +1779,60 @@ class Order {
|
|
|
2628
1779
|
}
|
|
2629
1780
|
|
|
2630
1781
|
// Showing warrnings if extra unknown parameters are found
|
|
2631
|
-
const { error: warrning } = OrderPlatformValidator.
|
|
1782
|
+
const { error: warrning } = OrderPlatformValidator.getLaneConfig().validate(
|
|
2632
1783
|
{
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
1784
|
+
superLane,
|
|
1785
|
+
groupEntity,
|
|
1786
|
+
fromDate,
|
|
1787
|
+
toDate,
|
|
1788
|
+
dpIds,
|
|
1789
|
+
stores,
|
|
1790
|
+
salesChannels,
|
|
1791
|
+
paymentMode,
|
|
1792
|
+
bagStatus,
|
|
2636
1793
|
searchType,
|
|
2637
|
-
storeId,
|
|
2638
1794
|
searchValue,
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
1795
|
+
tags,
|
|
1796
|
+
timeToDispatch,
|
|
1797
|
+
paymentMethods,
|
|
1798
|
+
myOrders,
|
|
1799
|
+
showCrossCompanyData,
|
|
1800
|
+
orderType,
|
|
2642
1801
|
},
|
|
2643
1802
|
{ abortEarly: false, allowUnknown: false }
|
|
2644
1803
|
);
|
|
2645
1804
|
if (warrning) {
|
|
2646
1805
|
Logger({
|
|
2647
1806
|
level: "WARN",
|
|
2648
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1807
|
+
message: `Parameter Validation warrnings for platform > Order > getLaneConfig \n ${warrning}`,
|
|
2649
1808
|
});
|
|
2650
1809
|
}
|
|
2651
1810
|
|
|
2652
1811
|
const query_params = {};
|
|
2653
|
-
query_params["
|
|
2654
|
-
query_params["
|
|
2655
|
-
query_params["
|
|
1812
|
+
query_params["super_lane"] = superLane;
|
|
1813
|
+
query_params["group_entity"] = groupEntity;
|
|
1814
|
+
query_params["from_date"] = fromDate;
|
|
1815
|
+
query_params["to_date"] = toDate;
|
|
1816
|
+
query_params["dp_ids"] = dpIds;
|
|
1817
|
+
query_params["stores"] = stores;
|
|
1818
|
+
query_params["sales_channels"] = salesChannels;
|
|
1819
|
+
query_params["payment_mode"] = paymentMode;
|
|
1820
|
+
query_params["bag_status"] = bagStatus;
|
|
2656
1821
|
query_params["search_type"] = searchType;
|
|
2657
|
-
query_params["store_id"] = storeId;
|
|
2658
1822
|
query_params["search_value"] = searchValue;
|
|
2659
|
-
query_params["
|
|
2660
|
-
query_params["
|
|
2661
|
-
query_params["
|
|
1823
|
+
query_params["tags"] = tags;
|
|
1824
|
+
query_params["time_to_dispatch"] = timeToDispatch;
|
|
1825
|
+
query_params["payment_methods"] = paymentMethods;
|
|
1826
|
+
query_params["my_orders"] = myOrders;
|
|
1827
|
+
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
1828
|
+
query_params["order_type"] = orderType;
|
|
2662
1829
|
|
|
2663
1830
|
const xHeaders = {};
|
|
2664
1831
|
|
|
2665
1832
|
const response = await PlatformAPIClient.execute(
|
|
2666
1833
|
this.config,
|
|
2667
1834
|
"get",
|
|
2668
|
-
`/service/platform/order
|
|
1835
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
|
|
2669
1836
|
query_params,
|
|
2670
1837
|
undefined,
|
|
2671
1838
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2679,7 +1846,7 @@ class Order {
|
|
|
2679
1846
|
|
|
2680
1847
|
const {
|
|
2681
1848
|
error: res_error,
|
|
2682
|
-
} = OrderPlatformModel.
|
|
1849
|
+
} = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
|
|
2683
1850
|
abortEarly: false,
|
|
2684
1851
|
allowUnknown: true,
|
|
2685
1852
|
});
|
|
@@ -2690,7 +1857,7 @@ class Order {
|
|
|
2690
1857
|
} else {
|
|
2691
1858
|
Logger({
|
|
2692
1859
|
level: "WARN",
|
|
2693
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1860
|
+
message: `Response Validation Warnings for platform > Order > getLaneConfig \n ${res_error}`,
|
|
2694
1861
|
});
|
|
2695
1862
|
}
|
|
2696
1863
|
}
|
|
@@ -2708,16 +1875,13 @@ class Order {
|
|
|
2708
1875
|
* @description: Get Order Details by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
2709
1876
|
*/
|
|
2710
1877
|
async getOrderById(
|
|
2711
|
-
{ orderId, myOrders,
|
|
2712
|
-
requestHeaders: {},
|
|
2713
|
-
},
|
|
1878
|
+
{ orderId, myOrders, requestHeaders } = { requestHeaders: {} },
|
|
2714
1879
|
{ responseHeaders } = { responseHeaders: false }
|
|
2715
1880
|
) {
|
|
2716
1881
|
const { error } = OrderPlatformValidator.getOrderById().validate(
|
|
2717
1882
|
{
|
|
2718
1883
|
orderId,
|
|
2719
1884
|
myOrders,
|
|
2720
|
-
allowInactive,
|
|
2721
1885
|
},
|
|
2722
1886
|
{ abortEarly: false, allowUnknown: true }
|
|
2723
1887
|
);
|
|
@@ -2730,7 +1894,6 @@ class Order {
|
|
|
2730
1894
|
{
|
|
2731
1895
|
orderId,
|
|
2732
1896
|
myOrders,
|
|
2733
|
-
allowInactive,
|
|
2734
1897
|
},
|
|
2735
1898
|
{ abortEarly: false, allowUnknown: false }
|
|
2736
1899
|
);
|
|
@@ -2744,7 +1907,6 @@ class Order {
|
|
|
2744
1907
|
const query_params = {};
|
|
2745
1908
|
query_params["order_id"] = orderId;
|
|
2746
1909
|
query_params["my_orders"] = myOrders;
|
|
2747
|
-
query_params["allow_inactive"] = allowInactive;
|
|
2748
1910
|
|
|
2749
1911
|
const xHeaders = {};
|
|
2750
1912
|
|
|
@@ -2804,8 +1966,6 @@ class Order {
|
|
|
2804
1966
|
searchValue,
|
|
2805
1967
|
fromDate,
|
|
2806
1968
|
toDate,
|
|
2807
|
-
startDate,
|
|
2808
|
-
endDate,
|
|
2809
1969
|
dpIds,
|
|
2810
1970
|
stores,
|
|
2811
1971
|
salesChannels,
|
|
@@ -2832,8 +1992,6 @@ class Order {
|
|
|
2832
1992
|
searchValue,
|
|
2833
1993
|
fromDate,
|
|
2834
1994
|
toDate,
|
|
2835
|
-
startDate,
|
|
2836
|
-
endDate,
|
|
2837
1995
|
dpIds,
|
|
2838
1996
|
stores,
|
|
2839
1997
|
salesChannels,
|
|
@@ -2864,8 +2022,6 @@ class Order {
|
|
|
2864
2022
|
searchValue,
|
|
2865
2023
|
fromDate,
|
|
2866
2024
|
toDate,
|
|
2867
|
-
startDate,
|
|
2868
|
-
endDate,
|
|
2869
2025
|
dpIds,
|
|
2870
2026
|
stores,
|
|
2871
2027
|
salesChannels,
|
|
@@ -2897,8 +2053,6 @@ class Order {
|
|
|
2897
2053
|
query_params["search_value"] = searchValue;
|
|
2898
2054
|
query_params["from_date"] = fromDate;
|
|
2899
2055
|
query_params["to_date"] = toDate;
|
|
2900
|
-
query_params["start_date"] = startDate;
|
|
2901
|
-
query_params["end_date"] = endDate;
|
|
2902
2056
|
query_params["dp_ids"] = dpIds;
|
|
2903
2057
|
query_params["stores"] = stores;
|
|
2904
2058
|
query_params["sales_channels"] = salesChannels;
|
|
@@ -2966,8 +2120,6 @@ class Order {
|
|
|
2966
2120
|
* field specified by the search_type
|
|
2967
2121
|
* @param {string} [arg.fromDate] -
|
|
2968
2122
|
* @param {string} [arg.toDate] -
|
|
2969
|
-
* @param {string} [arg.startDate] -
|
|
2970
|
-
* @param {string} [arg.endDate] -
|
|
2971
2123
|
* @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
|
|
2972
2124
|
* @param {string} [arg.stores] -
|
|
2973
2125
|
* @param {string} [arg.salesChannels] -
|
|
@@ -2993,8 +2145,6 @@ class Order {
|
|
|
2993
2145
|
searchValue,
|
|
2994
2146
|
fromDate,
|
|
2995
2147
|
toDate,
|
|
2996
|
-
startDate,
|
|
2997
|
-
endDate,
|
|
2998
2148
|
dpIds,
|
|
2999
2149
|
stores,
|
|
3000
2150
|
salesChannels,
|
|
@@ -3021,8 +2171,6 @@ class Order {
|
|
|
3021
2171
|
searchValue: searchValue,
|
|
3022
2172
|
fromDate: fromDate,
|
|
3023
2173
|
toDate: toDate,
|
|
3024
|
-
startDate: startDate,
|
|
3025
|
-
endDate: endDate,
|
|
3026
2174
|
dpIds: dpIds,
|
|
3027
2175
|
stores: stores,
|
|
3028
2176
|
salesChannels: salesChannels,
|
|
@@ -3130,16 +2278,13 @@ class Order {
|
|
|
3130
2278
|
* @description: Get shipment details for the given shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
3131
2279
|
*/
|
|
3132
2280
|
async getShipmentById(
|
|
3133
|
-
{ channelShipmentId, shipmentId,
|
|
3134
|
-
requestHeaders: {},
|
|
3135
|
-
},
|
|
2281
|
+
{ channelShipmentId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
3136
2282
|
{ responseHeaders } = { responseHeaders: false }
|
|
3137
2283
|
) {
|
|
3138
2284
|
const { error } = OrderPlatformValidator.getShipmentById().validate(
|
|
3139
2285
|
{
|
|
3140
2286
|
channelShipmentId,
|
|
3141
2287
|
shipmentId,
|
|
3142
|
-
fetchActiveShipment,
|
|
3143
2288
|
},
|
|
3144
2289
|
{ abortEarly: false, allowUnknown: true }
|
|
3145
2290
|
);
|
|
@@ -3154,7 +2299,6 @@ class Order {
|
|
|
3154
2299
|
{
|
|
3155
2300
|
channelShipmentId,
|
|
3156
2301
|
shipmentId,
|
|
3157
|
-
fetchActiveShipment,
|
|
3158
2302
|
},
|
|
3159
2303
|
{ abortEarly: false, allowUnknown: false }
|
|
3160
2304
|
);
|
|
@@ -3168,7 +2312,6 @@ class Order {
|
|
|
3168
2312
|
const query_params = {};
|
|
3169
2313
|
query_params["channel_shipment_id"] = channelShipmentId;
|
|
3170
2314
|
query_params["shipment_id"] = shipmentId;
|
|
3171
|
-
query_params["fetch_active_shipment"] = fetchActiveShipment;
|
|
3172
2315
|
|
|
3173
2316
|
const xHeaders = {};
|
|
3174
2317
|
|
|
@@ -3396,8 +2539,6 @@ class Order {
|
|
|
3396
2539
|
searchValue,
|
|
3397
2540
|
fromDate,
|
|
3398
2541
|
toDate,
|
|
3399
|
-
startDate,
|
|
3400
|
-
endDate,
|
|
3401
2542
|
dpIds,
|
|
3402
2543
|
stores,
|
|
3403
2544
|
salesChannels,
|
|
@@ -3433,8 +2574,6 @@ class Order {
|
|
|
3433
2574
|
searchValue,
|
|
3434
2575
|
fromDate,
|
|
3435
2576
|
toDate,
|
|
3436
|
-
startDate,
|
|
3437
|
-
endDate,
|
|
3438
2577
|
dpIds,
|
|
3439
2578
|
stores,
|
|
3440
2579
|
salesChannels,
|
|
@@ -3474,8 +2613,6 @@ class Order {
|
|
|
3474
2613
|
searchValue,
|
|
3475
2614
|
fromDate,
|
|
3476
2615
|
toDate,
|
|
3477
|
-
startDate,
|
|
3478
|
-
endDate,
|
|
3479
2616
|
dpIds,
|
|
3480
2617
|
stores,
|
|
3481
2618
|
salesChannels,
|
|
@@ -3516,8 +2653,6 @@ class Order {
|
|
|
3516
2653
|
query_params["search_value"] = searchValue;
|
|
3517
2654
|
query_params["from_date"] = fromDate;
|
|
3518
2655
|
query_params["to_date"] = toDate;
|
|
3519
|
-
query_params["start_date"] = startDate;
|
|
3520
|
-
query_params["end_date"] = endDate;
|
|
3521
2656
|
query_params["dp_ids"] = dpIds;
|
|
3522
2657
|
query_params["stores"] = stores;
|
|
3523
2658
|
query_params["sales_channels"] = salesChannels;
|
|
@@ -3589,8 +2724,6 @@ class Order {
|
|
|
3589
2724
|
* @param {string} [arg.searchValue] - Search type value
|
|
3590
2725
|
* @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
|
|
3591
2726
|
* @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
|
|
3592
|
-
* @param {string} [arg.startDate] - UTC Start Date in ISO format
|
|
3593
|
-
* @param {string} [arg.endDate] - UTC End Date in ISO format
|
|
3594
2727
|
* @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
|
|
3595
2728
|
* @param {string} [arg.stores] - Comma separated values of store ids
|
|
3596
2729
|
* @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
|
|
@@ -3625,8 +2758,6 @@ class Order {
|
|
|
3625
2758
|
searchValue,
|
|
3626
2759
|
fromDate,
|
|
3627
2760
|
toDate,
|
|
3628
|
-
startDate,
|
|
3629
|
-
endDate,
|
|
3630
2761
|
dpIds,
|
|
3631
2762
|
stores,
|
|
3632
2763
|
salesChannels,
|
|
@@ -3662,8 +2793,6 @@ class Order {
|
|
|
3662
2793
|
searchValue: searchValue,
|
|
3663
2794
|
fromDate: fromDate,
|
|
3664
2795
|
toDate: toDate,
|
|
3665
|
-
startDate: startDate,
|
|
3666
|
-
endDate: endDate,
|
|
3667
2796
|
dpIds: dpIds,
|
|
3668
2797
|
stores: stores,
|
|
3669
2798
|
salesChannels: salesChannels,
|
|
@@ -3771,83 +2900,6 @@ class Order {
|
|
|
3771
2900
|
return response;
|
|
3772
2901
|
}
|
|
3773
2902
|
|
|
3774
|
-
/**
|
|
3775
|
-
* @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
|
|
3776
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3777
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3778
|
-
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
|
|
3779
|
-
* @name getTemplate
|
|
3780
|
-
* @summary:
|
|
3781
|
-
* @description: Get the Excel file URL for the Template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/).
|
|
3782
|
-
*/
|
|
3783
|
-
async getTemplate(
|
|
3784
|
-
{ templateName, requestHeaders } = { requestHeaders: {} },
|
|
3785
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
3786
|
-
) {
|
|
3787
|
-
const { error } = OrderPlatformValidator.getTemplate().validate(
|
|
3788
|
-
{
|
|
3789
|
-
templateName,
|
|
3790
|
-
},
|
|
3791
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3792
|
-
);
|
|
3793
|
-
if (error) {
|
|
3794
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3795
|
-
}
|
|
3796
|
-
|
|
3797
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3798
|
-
const { error: warrning } = OrderPlatformValidator.getTemplate().validate(
|
|
3799
|
-
{
|
|
3800
|
-
templateName,
|
|
3801
|
-
},
|
|
3802
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3803
|
-
);
|
|
3804
|
-
if (warrning) {
|
|
3805
|
-
Logger({
|
|
3806
|
-
level: "WARN",
|
|
3807
|
-
message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`,
|
|
3808
|
-
});
|
|
3809
|
-
}
|
|
3810
|
-
|
|
3811
|
-
const query_params = {};
|
|
3812
|
-
|
|
3813
|
-
const xHeaders = {};
|
|
3814
|
-
|
|
3815
|
-
const response = await PlatformAPIClient.execute(
|
|
3816
|
-
this.config,
|
|
3817
|
-
"get",
|
|
3818
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`,
|
|
3819
|
-
query_params,
|
|
3820
|
-
undefined,
|
|
3821
|
-
{ ...xHeaders, ...requestHeaders },
|
|
3822
|
-
{ responseHeaders }
|
|
3823
|
-
);
|
|
3824
|
-
|
|
3825
|
-
let responseData = response;
|
|
3826
|
-
if (responseHeaders) {
|
|
3827
|
-
responseData = response[0];
|
|
3828
|
-
}
|
|
3829
|
-
|
|
3830
|
-
const {
|
|
3831
|
-
error: res_error,
|
|
3832
|
-
} = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
|
|
3833
|
-
abortEarly: false,
|
|
3834
|
-
allowUnknown: true,
|
|
3835
|
-
});
|
|
3836
|
-
|
|
3837
|
-
if (res_error) {
|
|
3838
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
3839
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3840
|
-
} else {
|
|
3841
|
-
Logger({
|
|
3842
|
-
level: "WARN",
|
|
3843
|
-
message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`,
|
|
3844
|
-
});
|
|
3845
|
-
}
|
|
3846
|
-
}
|
|
3847
|
-
|
|
3848
|
-
return response;
|
|
3849
|
-
}
|
|
3850
|
-
|
|
3851
2903
|
/**
|
|
3852
2904
|
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
3853
2905
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -4009,83 +3061,6 @@ class Order {
|
|
|
4009
3061
|
return response;
|
|
4010
3062
|
}
|
|
4011
3063
|
|
|
4012
|
-
/**
|
|
4013
|
-
* @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
|
|
4014
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4015
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4016
|
-
* @returns {Promise<OrderPlatformModel.JobDetailsResponse>} - Success response
|
|
4017
|
-
* @name jobDetails
|
|
4018
|
-
* @summary:
|
|
4019
|
-
* @description: Fetches details for the job of the provided batch_id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/).
|
|
4020
|
-
*/
|
|
4021
|
-
async jobDetails(
|
|
4022
|
-
{ batchId, requestHeaders } = { requestHeaders: {} },
|
|
4023
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4024
|
-
) {
|
|
4025
|
-
const { error } = OrderPlatformValidator.jobDetails().validate(
|
|
4026
|
-
{
|
|
4027
|
-
batchId,
|
|
4028
|
-
},
|
|
4029
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4030
|
-
);
|
|
4031
|
-
if (error) {
|
|
4032
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4033
|
-
}
|
|
4034
|
-
|
|
4035
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4036
|
-
const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
|
|
4037
|
-
{
|
|
4038
|
-
batchId,
|
|
4039
|
-
},
|
|
4040
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4041
|
-
);
|
|
4042
|
-
if (warrning) {
|
|
4043
|
-
Logger({
|
|
4044
|
-
level: "WARN",
|
|
4045
|
-
message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
|
|
4046
|
-
});
|
|
4047
|
-
}
|
|
4048
|
-
|
|
4049
|
-
const query_params = {};
|
|
4050
|
-
|
|
4051
|
-
const xHeaders = {};
|
|
4052
|
-
|
|
4053
|
-
const response = await PlatformAPIClient.execute(
|
|
4054
|
-
this.config,
|
|
4055
|
-
"get",
|
|
4056
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
|
|
4057
|
-
query_params,
|
|
4058
|
-
undefined,
|
|
4059
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4060
|
-
{ responseHeaders }
|
|
4061
|
-
);
|
|
4062
|
-
|
|
4063
|
-
let responseData = response;
|
|
4064
|
-
if (responseHeaders) {
|
|
4065
|
-
responseData = response[0];
|
|
4066
|
-
}
|
|
4067
|
-
|
|
4068
|
-
const {
|
|
4069
|
-
error: res_error,
|
|
4070
|
-
} = OrderPlatformModel.JobDetailsResponse().validate(responseData, {
|
|
4071
|
-
abortEarly: false,
|
|
4072
|
-
allowUnknown: true,
|
|
4073
|
-
});
|
|
4074
|
-
|
|
4075
|
-
if (res_error) {
|
|
4076
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4077
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4078
|
-
} else {
|
|
4079
|
-
Logger({
|
|
4080
|
-
level: "WARN",
|
|
4081
|
-
message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
|
|
4082
|
-
});
|
|
4083
|
-
}
|
|
4084
|
-
}
|
|
4085
|
-
|
|
4086
|
-
return response;
|
|
4087
|
-
}
|
|
4088
|
-
|
|
4089
3064
|
/**
|
|
4090
3065
|
* @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
|
|
4091
3066
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -4243,20 +3218,19 @@ class Order {
|
|
|
4243
3218
|
}
|
|
4244
3219
|
|
|
4245
3220
|
/**
|
|
4246
|
-
* @param {OrderPlatformValidator.
|
|
3221
|
+
* @param {OrderPlatformValidator.ProcessManifestParam} arg - Arg object
|
|
4247
3222
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4248
3223
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4249
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4250
|
-
*
|
|
4251
|
-
* @name processManifests
|
|
3224
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
3225
|
+
* @name processManifest
|
|
4252
3226
|
* @summary:
|
|
4253
|
-
* @description: Process Manifest
|
|
3227
|
+
* @description: Process Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifest/).
|
|
4254
3228
|
*/
|
|
4255
|
-
async
|
|
3229
|
+
async processManifest(
|
|
4256
3230
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4257
3231
|
{ responseHeaders } = { responseHeaders: false }
|
|
4258
3232
|
) {
|
|
4259
|
-
const { error } = OrderPlatformValidator.
|
|
3233
|
+
const { error } = OrderPlatformValidator.processManifest().validate(
|
|
4260
3234
|
{
|
|
4261
3235
|
body,
|
|
4262
3236
|
},
|
|
@@ -4269,7 +3243,7 @@ class Order {
|
|
|
4269
3243
|
// Showing warrnings if extra unknown parameters are found
|
|
4270
3244
|
const {
|
|
4271
3245
|
error: warrning,
|
|
4272
|
-
} = OrderPlatformValidator.
|
|
3246
|
+
} = OrderPlatformValidator.processManifest().validate(
|
|
4273
3247
|
{
|
|
4274
3248
|
body,
|
|
4275
3249
|
},
|
|
@@ -4278,7 +3252,7 @@ class Order {
|
|
|
4278
3252
|
if (warrning) {
|
|
4279
3253
|
Logger({
|
|
4280
3254
|
level: "WARN",
|
|
4281
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
3255
|
+
message: `Parameter Validation warrnings for platform > Order > processManifest \n ${warrning}`,
|
|
4282
3256
|
});
|
|
4283
3257
|
}
|
|
4284
3258
|
|
|
@@ -4289,7 +3263,7 @@ class Order {
|
|
|
4289
3263
|
const response = await PlatformAPIClient.execute(
|
|
4290
3264
|
this.config,
|
|
4291
3265
|
"post",
|
|
4292
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
3266
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
|
|
4293
3267
|
query_params,
|
|
4294
3268
|
body,
|
|
4295
3269
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4303,10 +3277,10 @@ class Order {
|
|
|
4303
3277
|
|
|
4304
3278
|
const {
|
|
4305
3279
|
error: res_error,
|
|
4306
|
-
} = OrderPlatformModel.
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
);
|
|
3280
|
+
} = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
|
|
3281
|
+
abortEarly: false,
|
|
3282
|
+
allowUnknown: true,
|
|
3283
|
+
});
|
|
4310
3284
|
|
|
4311
3285
|
if (res_error) {
|
|
4312
3286
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4314,7 +3288,7 @@ class Order {
|
|
|
4314
3288
|
} else {
|
|
4315
3289
|
Logger({
|
|
4316
3290
|
level: "WARN",
|
|
4317
|
-
message: `Response Validation Warnings for platform > Order >
|
|
3291
|
+
message: `Response Validation Warnings for platform > Order > processManifest \n ${res_error}`,
|
|
4318
3292
|
});
|
|
4319
3293
|
}
|
|
4320
3294
|
}
|
|
@@ -4564,7 +3538,7 @@ class Order {
|
|
|
4564
3538
|
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponse>} -
|
|
4565
3539
|
* Success response
|
|
4566
3540
|
* @name trackShipment
|
|
4567
|
-
* @summary:
|
|
3541
|
+
* @summary: Get courier partner tracking details
|
|
4568
3542
|
* @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/).
|
|
4569
3543
|
*/
|
|
4570
3544
|
async trackShipment(
|
|
@@ -5099,21 +4073,20 @@ class Order {
|
|
|
5099
4073
|
}
|
|
5100
4074
|
|
|
5101
4075
|
/**
|
|
5102
|
-
* @param {OrderPlatformValidator.
|
|
4076
|
+
* @param {OrderPlatformValidator.UploadConsentParam} arg - Arg object
|
|
5103
4077
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5104
4078
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5105
4079
|
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
5106
|
-
* @name
|
|
4080
|
+
* @name uploadConsent
|
|
5107
4081
|
* @summary:
|
|
5108
|
-
* @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/
|
|
4082
|
+
* @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsent/).
|
|
5109
4083
|
*/
|
|
5110
|
-
async
|
|
5111
|
-
{
|
|
4084
|
+
async uploadConsent(
|
|
4085
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5112
4086
|
{ responseHeaders } = { responseHeaders: false }
|
|
5113
4087
|
) {
|
|
5114
|
-
const { error } = OrderPlatformValidator.
|
|
4088
|
+
const { error } = OrderPlatformValidator.uploadConsent().validate(
|
|
5115
4089
|
{
|
|
5116
|
-
manifestId,
|
|
5117
4090
|
body,
|
|
5118
4091
|
},
|
|
5119
4092
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -5123,11 +4096,8 @@ class Order {
|
|
|
5123
4096
|
}
|
|
5124
4097
|
|
|
5125
4098
|
// Showing warrnings if extra unknown parameters are found
|
|
5126
|
-
const {
|
|
5127
|
-
error: warrning,
|
|
5128
|
-
} = OrderPlatformValidator.uploadConsents().validate(
|
|
4099
|
+
const { error: warrning } = OrderPlatformValidator.uploadConsent().validate(
|
|
5129
4100
|
{
|
|
5130
|
-
manifestId,
|
|
5131
4101
|
body,
|
|
5132
4102
|
},
|
|
5133
4103
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -5135,7 +4105,7 @@ class Order {
|
|
|
5135
4105
|
if (warrning) {
|
|
5136
4106
|
Logger({
|
|
5137
4107
|
level: "WARN",
|
|
5138
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4108
|
+
message: `Parameter Validation warrnings for platform > Order > uploadConsent \n ${warrning}`,
|
|
5139
4109
|
});
|
|
5140
4110
|
}
|
|
5141
4111
|
|
|
@@ -5146,7 +4116,7 @@ class Order {
|
|
|
5146
4116
|
const response = await PlatformAPIClient.execute(
|
|
5147
4117
|
this.config,
|
|
5148
4118
|
"post",
|
|
5149
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest
|
|
4119
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`,
|
|
5150
4120
|
query_params,
|
|
5151
4121
|
body,
|
|
5152
4122
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5171,7 +4141,7 @@ class Order {
|
|
|
5171
4141
|
} else {
|
|
5172
4142
|
Logger({
|
|
5173
4143
|
level: "WARN",
|
|
5174
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4144
|
+
message: `Response Validation Warnings for platform > Order > uploadConsent \n ${res_error}`,
|
|
5175
4145
|
});
|
|
5176
4146
|
}
|
|
5177
4147
|
}
|