@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-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 +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +53 -60
- package/sdk/application/Cart/CartApplicationClient.js +53 -130
- package/sdk/application/Cart/CartApplicationModel.d.ts +143 -489
- package/sdk/application/Cart/CartApplicationModel.js +159 -380
- package/sdk/application/Cart/CartApplicationValidator.d.ts +19 -38
- package/sdk/application/Cart/CartApplicationValidator.js +18 -34
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +68 -88
- package/sdk/application/Catalog/CatalogApplicationClient.js +94 -114
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +142 -194
- package/sdk/application/Catalog/CatalogApplicationModel.js +133 -171
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -3
- package/sdk/application/Common/CommonApplicationClient.js +5 -6
- package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
- package/sdk/application/Common/CommonApplicationModel.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +27 -34
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +27 -34
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +57 -45
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +47 -35
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +33 -23
- package/sdk/application/Content/ContentApplicationClient.js +75 -54
- package/sdk/application/Content/ContentApplicationModel.d.ts +37 -93
- package/sdk/application/Content/ContentApplicationModel.js +32 -83
- package/sdk/application/Content/ContentApplicationValidator.d.ts +17 -23
- package/sdk/application/Content/ContentApplicationValidator.js +10 -15
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -9
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +13 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +25 -23
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +18 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -2
- package/sdk/application/Lead/LeadApplicationClient.js +3 -2
- package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
- package/sdk/application/Lead/LeadApplicationModel.js +19 -19
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +21 -189
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +173 -532
- package/sdk/application/Logistic/LogisticApplicationModel.js +139 -409
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +9 -54
- package/sdk/application/Logistic/LogisticApplicationValidator.js +8 -42
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -24
- package/sdk/application/Order/OrderApplicationClient.js +13 -96
- package/sdk/application/Order/OrderApplicationModel.d.ts +120 -436
- package/sdk/application/Order/OrderApplicationModel.js +81 -279
- package/sdk/application/Order/OrderApplicationValidator.d.ts +3 -17
- package/sdk/application/Order/OrderApplicationValidator.js +2 -15
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +99 -96
- package/sdk/application/Payment/PaymentApplicationClient.js +114 -111
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +289 -293
- package/sdk/application/Payment/PaymentApplicationModel.js +241 -243
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +22 -19
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
- package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
- package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
- package/sdk/application/Share/ShareApplicationModel.js +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +6 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +17 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +22 -42
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +3 -16
- package/sdk/application/Theme/ThemeApplicationValidator.js +2 -9
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +10 -10
- package/sdk/application/User/UserApplicationModel.d.ts +17 -17
- package/sdk/application/User/UserApplicationModel.js +16 -16
- package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
- package/sdk/application/User/UserApplicationValidator.js +2 -2
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +9 -11
- package/sdk/application/Webhook/WebhookApplicationModel.js +6 -8
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
- package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
- package/sdk/application/index.d.ts +0 -1
- package/sdk/application/index.js +0 -2
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +19 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +14 -121
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +37 -96
- package/sdk/partner/Theme/ThemePartnerModel.js +36 -90
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1304 -4979
- package/sdk/platform/Cart/CartPlatformModel.js +1217 -1922
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
- package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1751 -1501
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1224 -1393
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
- package/sdk/platform/Common/CommonPlatformClient.js +2 -3
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +124 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +94 -219
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
- package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
- package/sdk/platform/Content/ContentPlatformClient.js +336 -523
- package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
- package/sdk/platform/Content/ContentPlatformModel.js +390 -521
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
- package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
- package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +36 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +60 -462
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +101 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +84 -313
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -15
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -83
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -25
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -16
- package/sdk/platform/Order/OrderPlatformClient.d.ts +97 -178
- package/sdk/platform/Order/OrderPlatformClient.js +245 -597
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3071 -5449
- package/sdk/platform/Order/OrderPlatformModel.js +1656 -3501
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +190 -237
- package/sdk/platform/Order/OrderPlatformValidator.js +105 -153
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
- package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
- package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +64 -58
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +341 -602
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +284 -483
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
- package/sdk/platform/Share/SharePlatformModel.js +4 -27
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +11 -37
- package/sdk/platform/Theme/ThemePlatformModel.js +15 -33
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
- package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -6
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
- package/sdk/public/Content/ContentPublicClient.js +5 -791
- package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
- package/sdk/public/Content/ContentPublicModel.js +3 -649
- package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
- package/sdk/public/Content/ContentPublicValidator.js +2 -88
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
- package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
- package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
|
@@ -18,8 +18,7 @@ class Order {
|
|
|
18
18
|
* @param {OrderPlatformValidator.AddStateManagerConfigParam} arg - Arg object
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<OrderPlatformModel.
|
|
22
|
-
* Success response
|
|
21
|
+
* @returns {Promise<OrderPlatformModel.ConfigUpdatedResponse>} - Success response
|
|
23
22
|
* @name addStateManagerConfig
|
|
24
23
|
* @summary: Allows esm config updation
|
|
25
24
|
* @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/).
|
|
@@ -75,10 +74,10 @@ class Order {
|
|
|
75
74
|
|
|
76
75
|
const {
|
|
77
76
|
error: res_error,
|
|
78
|
-
} = OrderPlatformModel.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
);
|
|
77
|
+
} = OrderPlatformModel.ConfigUpdatedResponse().validate(responseData, {
|
|
78
|
+
abortEarly: false,
|
|
79
|
+
allowUnknown: true,
|
|
80
|
+
});
|
|
82
81
|
|
|
83
82
|
if (res_error) {
|
|
84
83
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -98,8 +97,7 @@ class Order {
|
|
|
98
97
|
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
99
98
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
100
99
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
101
|
-
* @returns {Promise<OrderPlatformModel.
|
|
102
|
-
* Success response
|
|
100
|
+
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponse>} - Success response
|
|
103
101
|
* @name attachOrderUser
|
|
104
102
|
* @summary: Attach order to a user
|
|
105
103
|
* @description: Attach an anonymous order to a customer based on OTP verification - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
|
|
@@ -155,10 +153,10 @@ class Order {
|
|
|
155
153
|
|
|
156
154
|
const {
|
|
157
155
|
error: res_error,
|
|
158
|
-
} = OrderPlatformModel.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
);
|
|
156
|
+
} = OrderPlatformModel.AttachOrderUserResponse().validate(responseData, {
|
|
157
|
+
abortEarly: false,
|
|
158
|
+
allowUnknown: true,
|
|
159
|
+
});
|
|
162
160
|
|
|
163
161
|
if (res_error) {
|
|
164
162
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -178,7 +176,7 @@ class Order {
|
|
|
178
176
|
* @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
|
|
179
177
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
180
178
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
181
|
-
* @returns {Promise<OrderPlatformModel.
|
|
179
|
+
* @returns {Promise<OrderPlatformModel.BulkListingResponse>} - Success response
|
|
182
180
|
* @name bulkListing
|
|
183
181
|
* @summary: Lists bulk operations
|
|
184
182
|
* @description: Get list of bulk operation that is initiated and completed as per the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
|
|
@@ -260,7 +258,7 @@ class Order {
|
|
|
260
258
|
|
|
261
259
|
const {
|
|
262
260
|
error: res_error,
|
|
263
|
-
} = OrderPlatformModel.
|
|
261
|
+
} = OrderPlatformModel.BulkListingResponse().validate(responseData, {
|
|
264
262
|
abortEarly: false,
|
|
265
263
|
allowUnknown: true,
|
|
266
264
|
});
|
|
@@ -283,9 +281,8 @@ class Order {
|
|
|
283
281
|
* @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object
|
|
284
282
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
285
283
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
286
|
-
* @returns {Promise<OrderPlatformModel.
|
|
287
|
-
*
|
|
288
|
-
*
|
|
284
|
+
* @returns {Promise<OrderPlatformModel.BulkStateTransistionResponse>} -
|
|
285
|
+
* Success response
|
|
289
286
|
* @name bulkStateTransistion
|
|
290
287
|
* @summary: Upload bulk state transitions file
|
|
291
288
|
* @description: Performs state transisiton in bulk using the CSV or excel file for the given shipments. The bulk transition CSV or excel template can be downloaded using the seller template download method. Current supported format is excel and CSV. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/).
|
|
@@ -341,7 +338,7 @@ class Order {
|
|
|
341
338
|
|
|
342
339
|
const {
|
|
343
340
|
error: res_error,
|
|
344
|
-
} = OrderPlatformModel.
|
|
341
|
+
} = OrderPlatformModel.BulkStateTransistionResponse().validate(
|
|
345
342
|
responseData,
|
|
346
343
|
{ abortEarly: false, allowUnknown: true }
|
|
347
344
|
);
|
|
@@ -439,92 +436,11 @@ class Order {
|
|
|
439
436
|
return response;
|
|
440
437
|
}
|
|
441
438
|
|
|
442
|
-
/**
|
|
443
|
-
* @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
|
|
444
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
445
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
446
|
-
* @returns {Promise<OrderPlatformModel.CreateChannelConfigResponseSchema>}
|
|
447
|
-
* - Success response
|
|
448
|
-
*
|
|
449
|
-
* @name createChannelConfig
|
|
450
|
-
* @summary: Create channel configuration
|
|
451
|
-
* @description: Set up configuration for a channel specific to orders which has implications over how the order fulfilment happens in a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/).
|
|
452
|
-
*/
|
|
453
|
-
async createChannelConfig(
|
|
454
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
455
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
456
|
-
) {
|
|
457
|
-
const { error } = OrderPlatformValidator.createChannelConfig().validate(
|
|
458
|
-
{
|
|
459
|
-
body,
|
|
460
|
-
},
|
|
461
|
-
{ abortEarly: false, allowUnknown: true }
|
|
462
|
-
);
|
|
463
|
-
if (error) {
|
|
464
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
// Showing warrnings if extra unknown parameters are found
|
|
468
|
-
const {
|
|
469
|
-
error: warrning,
|
|
470
|
-
} = OrderPlatformValidator.createChannelConfig().validate(
|
|
471
|
-
{
|
|
472
|
-
body,
|
|
473
|
-
},
|
|
474
|
-
{ abortEarly: false, allowUnknown: false }
|
|
475
|
-
);
|
|
476
|
-
if (warrning) {
|
|
477
|
-
Logger({
|
|
478
|
-
level: "WARN",
|
|
479
|
-
message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`,
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
const query_params = {};
|
|
484
|
-
|
|
485
|
-
const xHeaders = {};
|
|
486
|
-
|
|
487
|
-
const response = await PlatformAPIClient.execute(
|
|
488
|
-
this.config,
|
|
489
|
-
"post",
|
|
490
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
491
|
-
query_params,
|
|
492
|
-
body,
|
|
493
|
-
{ ...xHeaders, ...requestHeaders },
|
|
494
|
-
{ responseHeaders }
|
|
495
|
-
);
|
|
496
|
-
|
|
497
|
-
let responseData = response;
|
|
498
|
-
if (responseHeaders) {
|
|
499
|
-
responseData = response[0];
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
const {
|
|
503
|
-
error: res_error,
|
|
504
|
-
} = OrderPlatformModel.CreateChannelConfigResponseSchema().validate(
|
|
505
|
-
responseData,
|
|
506
|
-
{ abortEarly: false, allowUnknown: true }
|
|
507
|
-
);
|
|
508
|
-
|
|
509
|
-
if (res_error) {
|
|
510
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
511
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
512
|
-
} else {
|
|
513
|
-
Logger({
|
|
514
|
-
level: "WARN",
|
|
515
|
-
message: `Response Validation Warnings for platform > Order > createChannelConfig \n ${res_error}`,
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
return response;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
439
|
/**
|
|
524
440
|
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
525
441
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
526
442
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
527
|
-
* @returns {Promise<OrderPlatformModel.
|
|
443
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
528
444
|
* @name createOrder
|
|
529
445
|
* @summary: Create order
|
|
530
446
|
* @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
@@ -578,7 +494,7 @@ class Order {
|
|
|
578
494
|
|
|
579
495
|
const {
|
|
580
496
|
error: res_error,
|
|
581
|
-
} = OrderPlatformModel.
|
|
497
|
+
} = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
|
|
582
498
|
abortEarly: false,
|
|
583
499
|
allowUnknown: true,
|
|
584
500
|
});
|
|
@@ -601,7 +517,7 @@ class Order {
|
|
|
601
517
|
* @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object
|
|
602
518
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
603
519
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
604
|
-
* @returns {Promise<OrderPlatformModel.
|
|
520
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
605
521
|
* @name dispatchManifests
|
|
606
522
|
* @summary: Dispatch manifest
|
|
607
523
|
* @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/).
|
|
@@ -657,7 +573,7 @@ class Order {
|
|
|
657
573
|
|
|
658
574
|
const {
|
|
659
575
|
error: res_error,
|
|
660
|
-
} = OrderPlatformModel.
|
|
576
|
+
} = OrderPlatformModel.SuccessResponse().validate(responseData, {
|
|
661
577
|
abortEarly: false,
|
|
662
578
|
allowUnknown: true,
|
|
663
579
|
});
|
|
@@ -680,7 +596,7 @@ class Order {
|
|
|
680
596
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
681
597
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
682
598
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
683
|
-
* @returns {Promise<OrderPlatformModel.
|
|
599
|
+
* @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
|
|
684
600
|
* @name downloadBulkActionTemplate
|
|
685
601
|
* @summary: Download bulk template
|
|
686
602
|
* @description: Download bulk seller templates which can be used to perform operations in bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
|
|
@@ -739,7 +655,7 @@ class Order {
|
|
|
739
655
|
|
|
740
656
|
const {
|
|
741
657
|
error: res_error,
|
|
742
|
-
} = OrderPlatformModel.
|
|
658
|
+
} = OrderPlatformModel.FileResponse().validate(responseData, {
|
|
743
659
|
abortEarly: false,
|
|
744
660
|
allowUnknown: true,
|
|
745
661
|
});
|
|
@@ -762,9 +678,8 @@ class Order {
|
|
|
762
678
|
* @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
|
|
763
679
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
764
680
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
765
|
-
* @returns {Promise<OrderPlatformModel.
|
|
766
|
-
*
|
|
767
|
-
*
|
|
681
|
+
* @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponse>} -
|
|
682
|
+
* Success response
|
|
768
683
|
* @name downloadLanesReport
|
|
769
684
|
* @summary: Download Lane report
|
|
770
685
|
* @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
|
|
@@ -820,7 +735,7 @@ class Order {
|
|
|
820
735
|
|
|
821
736
|
const {
|
|
822
737
|
error: res_error,
|
|
823
|
-
} = OrderPlatformModel.
|
|
738
|
+
} = OrderPlatformModel.BulkReportsDownloadResponse().validate(
|
|
824
739
|
responseData,
|
|
825
740
|
{ abortEarly: false, allowUnknown: true }
|
|
826
741
|
);
|
|
@@ -843,8 +758,7 @@ class Order {
|
|
|
843
758
|
* @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
|
|
844
759
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
845
760
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
846
|
-
* @returns {Promise<OrderPlatformModel.
|
|
847
|
-
* Success response
|
|
761
|
+
* @returns {Promise<OrderPlatformModel.EInvoiceRetryResponse>} - Success response
|
|
848
762
|
* @name eInvoiceRetry
|
|
849
763
|
* @summary: Retry E-invoice
|
|
850
764
|
* @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
|
|
@@ -898,10 +812,10 @@ class Order {
|
|
|
898
812
|
|
|
899
813
|
const {
|
|
900
814
|
error: res_error,
|
|
901
|
-
} = OrderPlatformModel.
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
);
|
|
815
|
+
} = OrderPlatformModel.EInvoiceRetryResponse().validate(responseData, {
|
|
816
|
+
abortEarly: false,
|
|
817
|
+
allowUnknown: true,
|
|
818
|
+
});
|
|
905
819
|
|
|
906
820
|
if (res_error) {
|
|
907
821
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -996,89 +910,6 @@ class Order {
|
|
|
996
910
|
return response;
|
|
997
911
|
}
|
|
998
912
|
|
|
999
|
-
/**
|
|
1000
|
-
* @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object
|
|
1001
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1002
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1003
|
-
* @returns {Promise<OrderPlatformModel.FetchCreditBalanceResponsePayload>}
|
|
1004
|
-
* - Success response
|
|
1005
|
-
*
|
|
1006
|
-
* @name fetchCreditBalanceDetail
|
|
1007
|
-
* @summary: Get credit balance detail
|
|
1008
|
-
* @description: Retrieve details about credit balance on the basis of customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/).
|
|
1009
|
-
*/
|
|
1010
|
-
async fetchCreditBalanceDetail(
|
|
1011
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1012
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1013
|
-
) {
|
|
1014
|
-
const {
|
|
1015
|
-
error,
|
|
1016
|
-
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
1017
|
-
{
|
|
1018
|
-
body,
|
|
1019
|
-
},
|
|
1020
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1021
|
-
);
|
|
1022
|
-
if (error) {
|
|
1023
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1027
|
-
const {
|
|
1028
|
-
error: warrning,
|
|
1029
|
-
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
1030
|
-
{
|
|
1031
|
-
body,
|
|
1032
|
-
},
|
|
1033
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1034
|
-
);
|
|
1035
|
-
if (warrning) {
|
|
1036
|
-
Logger({
|
|
1037
|
-
level: "WARN",
|
|
1038
|
-
message: `Parameter Validation warrnings for platform > Order > fetchCreditBalanceDetail \n ${warrning}`,
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
const query_params = {};
|
|
1043
|
-
|
|
1044
|
-
const xHeaders = {};
|
|
1045
|
-
|
|
1046
|
-
const response = await PlatformAPIClient.execute(
|
|
1047
|
-
this.config,
|
|
1048
|
-
"post",
|
|
1049
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`,
|
|
1050
|
-
query_params,
|
|
1051
|
-
body,
|
|
1052
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1053
|
-
{ responseHeaders }
|
|
1054
|
-
);
|
|
1055
|
-
|
|
1056
|
-
let responseData = response;
|
|
1057
|
-
if (responseHeaders) {
|
|
1058
|
-
responseData = response[0];
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
const {
|
|
1062
|
-
error: res_error,
|
|
1063
|
-
} = OrderPlatformModel.FetchCreditBalanceResponsePayload().validate(
|
|
1064
|
-
responseData,
|
|
1065
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1066
|
-
);
|
|
1067
|
-
|
|
1068
|
-
if (res_error) {
|
|
1069
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1070
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1071
|
-
} else {
|
|
1072
|
-
Logger({
|
|
1073
|
-
level: "WARN",
|
|
1074
|
-
message: `Response Validation Warnings for platform > Order > fetchCreditBalanceDetail \n ${res_error}`,
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
return response;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
913
|
/**
|
|
1083
914
|
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
1084
915
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1163,8 +994,7 @@ class Order {
|
|
|
1163
994
|
* @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object
|
|
1164
995
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1165
996
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1166
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1167
|
-
* Success response
|
|
997
|
+
* @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponse>} - Success response
|
|
1168
998
|
* @name generateInvoiceID
|
|
1169
999
|
* @summary: Generate and attach invoice Id
|
|
1170
1000
|
* @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/).
|
|
@@ -1222,10 +1052,10 @@ class Order {
|
|
|
1222
1052
|
|
|
1223
1053
|
const {
|
|
1224
1054
|
error: res_error,
|
|
1225
|
-
} = OrderPlatformModel.
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
);
|
|
1055
|
+
} = OrderPlatformModel.GenerateInvoiceIDResponse().validate(responseData, {
|
|
1056
|
+
abortEarly: false,
|
|
1057
|
+
allowUnknown: true,
|
|
1058
|
+
});
|
|
1229
1059
|
|
|
1230
1060
|
if (res_error) {
|
|
1231
1061
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1245,9 +1075,8 @@ class Order {
|
|
|
1245
1075
|
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
1246
1076
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1247
1077
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1248
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1249
|
-
*
|
|
1250
|
-
*
|
|
1078
|
+
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>} -
|
|
1079
|
+
* Success response
|
|
1251
1080
|
* @name generatePOSReceiptByOrderId
|
|
1252
1081
|
* @summary: Generate POS receipt by order Id
|
|
1253
1082
|
* @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
@@ -1313,7 +1142,7 @@ class Order {
|
|
|
1313
1142
|
|
|
1314
1143
|
const {
|
|
1315
1144
|
error: res_error,
|
|
1316
|
-
} = OrderPlatformModel.
|
|
1145
|
+
} = OrderPlatformModel.GeneratePosOrderReceiptResponse().validate(
|
|
1317
1146
|
responseData,
|
|
1318
1147
|
{ abortEarly: false, allowUnknown: true }
|
|
1319
1148
|
);
|
|
@@ -1336,7 +1165,7 @@ class Order {
|
|
|
1336
1165
|
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
1337
1166
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1338
1167
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1339
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1168
|
+
* @returns {Promise<OrderPlatformModel.ManifestResponse>} - Success response
|
|
1340
1169
|
* @name generateProcessManifest
|
|
1341
1170
|
* @summary: Process Order Manifest
|
|
1342
1171
|
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
@@ -1392,7 +1221,7 @@ class Order {
|
|
|
1392
1221
|
|
|
1393
1222
|
const {
|
|
1394
1223
|
error: res_error,
|
|
1395
|
-
} = OrderPlatformModel.
|
|
1224
|
+
} = OrderPlatformModel.ManifestResponse().validate(responseData, {
|
|
1396
1225
|
abortEarly: false,
|
|
1397
1226
|
allowUnknown: true,
|
|
1398
1227
|
});
|
|
@@ -1501,8 +1330,7 @@ class Order {
|
|
|
1501
1330
|
* @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
|
|
1502
1331
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1503
1332
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1504
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1505
|
-
* Success response
|
|
1333
|
+
* @returns {Promise<OrderPlatformModel.AllowedTemplatesResponse>} - Success response
|
|
1506
1334
|
* @name getAllowedTemplatesForBulk
|
|
1507
1335
|
* @summary: List bulk operation templates
|
|
1508
1336
|
* @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
|
|
@@ -1556,10 +1384,10 @@ class Order {
|
|
|
1556
1384
|
|
|
1557
1385
|
const {
|
|
1558
1386
|
error: res_error,
|
|
1559
|
-
} = OrderPlatformModel.
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
);
|
|
1387
|
+
} = OrderPlatformModel.AllowedTemplatesResponse().validate(responseData, {
|
|
1388
|
+
abortEarly: false,
|
|
1389
|
+
allowUnknown: true,
|
|
1390
|
+
});
|
|
1563
1391
|
|
|
1564
1392
|
if (res_error) {
|
|
1565
1393
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1579,8 +1407,7 @@ class Order {
|
|
|
1579
1407
|
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1580
1408
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1581
1409
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1582
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1583
|
-
* Success response
|
|
1410
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
|
|
1584
1411
|
* @name getAnnouncements
|
|
1585
1412
|
* @summary: List announcements
|
|
1586
1413
|
* @description: Retrieve announcements related to orders fulfilment configured by platform or company admin - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
@@ -1637,10 +1464,10 @@ class Order {
|
|
|
1637
1464
|
|
|
1638
1465
|
const {
|
|
1639
1466
|
error: res_error,
|
|
1640
|
-
} = OrderPlatformModel.
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
);
|
|
1467
|
+
} = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
|
|
1468
|
+
abortEarly: false,
|
|
1469
|
+
allowUnknown: true,
|
|
1470
|
+
});
|
|
1644
1471
|
|
|
1645
1472
|
if (res_error) {
|
|
1646
1473
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1660,9 +1487,8 @@ class Order {
|
|
|
1660
1487
|
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1661
1488
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1662
1489
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1663
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
1490
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
|
|
1491
|
+
* Success response
|
|
1666
1492
|
* @name getBagById
|
|
1667
1493
|
* @summary: Get bag
|
|
1668
1494
|
* @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
@@ -1723,10 +1549,10 @@ class Order {
|
|
|
1723
1549
|
|
|
1724
1550
|
const {
|
|
1725
1551
|
error: res_error,
|
|
1726
|
-
} = OrderPlatformModel.
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
);
|
|
1552
|
+
} = OrderPlatformModel.BagDetailsPlatformResponse().validate(responseData, {
|
|
1553
|
+
abortEarly: false,
|
|
1554
|
+
allowUnknown: true,
|
|
1555
|
+
});
|
|
1730
1556
|
|
|
1731
1557
|
if (res_error) {
|
|
1732
1558
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1746,8 +1572,7 @@ class Order {
|
|
|
1746
1572
|
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
1747
1573
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1748
1574
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1749
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1750
|
-
* Success response
|
|
1575
|
+
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponse>} - Success response
|
|
1751
1576
|
* @name getBags
|
|
1752
1577
|
* @summary: List bags
|
|
1753
1578
|
* @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
@@ -1837,10 +1662,10 @@ class Order {
|
|
|
1837
1662
|
|
|
1838
1663
|
const {
|
|
1839
1664
|
error: res_error,
|
|
1840
|
-
} = OrderPlatformModel.
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
);
|
|
1665
|
+
} = OrderPlatformModel.GetBagsPlatformResponse().validate(responseData, {
|
|
1666
|
+
abortEarly: false,
|
|
1667
|
+
allowUnknown: true,
|
|
1668
|
+
});
|
|
1844
1669
|
|
|
1845
1670
|
if (res_error) {
|
|
1846
1671
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1860,9 +1685,8 @@ class Order {
|
|
|
1860
1685
|
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1861
1686
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1862
1687
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1863
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1688
|
+
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponse>} -
|
|
1689
|
+
* Success response
|
|
1866
1690
|
* @name getBulkActionTemplate
|
|
1867
1691
|
* @summary: List supported templates
|
|
1868
1692
|
* @description: Get list of templates so that users can download the required template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
|
|
@@ -1914,10 +1738,10 @@ class Order {
|
|
|
1914
1738
|
|
|
1915
1739
|
const {
|
|
1916
1740
|
error: res_error,
|
|
1917
|
-
} = OrderPlatformModel.
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
);
|
|
1741
|
+
} = OrderPlatformModel.BulkActionTemplateResponse().validate(responseData, {
|
|
1742
|
+
abortEarly: false,
|
|
1743
|
+
allowUnknown: true,
|
|
1744
|
+
});
|
|
1921
1745
|
|
|
1922
1746
|
if (res_error) {
|
|
1923
1747
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1937,7 +1761,7 @@ class Order {
|
|
|
1937
1761
|
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1938
1762
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1939
1763
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1940
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1764
|
+
* @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
|
|
1941
1765
|
* @name getBulkShipmentExcelFile
|
|
1942
1766
|
* @summary: Generate the report
|
|
1943
1767
|
* @description: Generates the report which can be filled and uploaded to perform the bulk operation based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
|
|
@@ -2015,96 +1839,21 @@ class Order {
|
|
|
2015
1839
|
query_params["dp_ids"] = dpIds;
|
|
2016
1840
|
query_params["start_date"] = startDate;
|
|
2017
1841
|
query_params["end_date"] = endDate;
|
|
2018
|
-
query_params["stores"] = stores;
|
|
2019
|
-
query_params["tags"] = tags;
|
|
2020
|
-
query_params["bag_status"] = bagStatus;
|
|
2021
|
-
query_params["payment_methods"] = paymentMethods;
|
|
2022
|
-
query_params["file_type"] = fileType;
|
|
2023
|
-
query_params["time_to_dispatch"] = timeToDispatch;
|
|
2024
|
-
query_params["page_no"] = pageNo;
|
|
2025
|
-
query_params["page_size"] = pageSize;
|
|
2026
|
-
|
|
2027
|
-
const xHeaders = {};
|
|
2028
|
-
|
|
2029
|
-
const response = await PlatformAPIClient.execute(
|
|
2030
|
-
this.config,
|
|
2031
|
-
"get",
|
|
2032
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/generate/file`,
|
|
2033
|
-
query_params,
|
|
2034
|
-
undefined,
|
|
2035
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2036
|
-
{ responseHeaders }
|
|
2037
|
-
);
|
|
2038
|
-
|
|
2039
|
-
let responseData = response;
|
|
2040
|
-
if (responseHeaders) {
|
|
2041
|
-
responseData = response[0];
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
const {
|
|
2045
|
-
error: res_error,
|
|
2046
|
-
} = OrderPlatformModel.FileResponseSchema().validate(responseData, {
|
|
2047
|
-
abortEarly: false,
|
|
2048
|
-
allowUnknown: true,
|
|
2049
|
-
});
|
|
2050
|
-
|
|
2051
|
-
if (res_error) {
|
|
2052
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2053
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2054
|
-
} else {
|
|
2055
|
-
Logger({
|
|
2056
|
-
level: "WARN",
|
|
2057
|
-
message: `Response Validation Warnings for platform > Order > getBulkShipmentExcelFile \n ${res_error}`,
|
|
2058
|
-
});
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
return response;
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
/**
|
|
2066
|
-
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
2067
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2068
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2069
|
-
* @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
|
|
2070
|
-
* @name getChannelConfig
|
|
2071
|
-
* @summary: Get channel configuration
|
|
2072
|
-
* @description: Retrieve configuration settings specific to orders for a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
|
|
2073
|
-
*/
|
|
2074
|
-
async getChannelConfig(
|
|
2075
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
2076
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2077
|
-
) {
|
|
2078
|
-
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
2079
|
-
{},
|
|
2080
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2081
|
-
);
|
|
2082
|
-
if (error) {
|
|
2083
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2087
|
-
const {
|
|
2088
|
-
error: warrning,
|
|
2089
|
-
} = OrderPlatformValidator.getChannelConfig().validate(
|
|
2090
|
-
{},
|
|
2091
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2092
|
-
);
|
|
2093
|
-
if (warrning) {
|
|
2094
|
-
Logger({
|
|
2095
|
-
level: "WARN",
|
|
2096
|
-
message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
const query_params = {};
|
|
1842
|
+
query_params["stores"] = stores;
|
|
1843
|
+
query_params["tags"] = tags;
|
|
1844
|
+
query_params["bag_status"] = bagStatus;
|
|
1845
|
+
query_params["payment_methods"] = paymentMethods;
|
|
1846
|
+
query_params["file_type"] = fileType;
|
|
1847
|
+
query_params["time_to_dispatch"] = timeToDispatch;
|
|
1848
|
+
query_params["page_no"] = pageNo;
|
|
1849
|
+
query_params["page_size"] = pageSize;
|
|
2101
1850
|
|
|
2102
1851
|
const xHeaders = {};
|
|
2103
1852
|
|
|
2104
1853
|
const response = await PlatformAPIClient.execute(
|
|
2105
1854
|
this.config,
|
|
2106
1855
|
"get",
|
|
2107
|
-
`/service/platform/order
|
|
1856
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/generate/file`,
|
|
2108
1857
|
query_params,
|
|
2109
1858
|
undefined,
|
|
2110
1859
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2118,7 +1867,7 @@ class Order {
|
|
|
2118
1867
|
|
|
2119
1868
|
const {
|
|
2120
1869
|
error: res_error,
|
|
2121
|
-
} = OrderPlatformModel.
|
|
1870
|
+
} = OrderPlatformModel.FileResponse().validate(responseData, {
|
|
2122
1871
|
abortEarly: false,
|
|
2123
1872
|
allowUnknown: true,
|
|
2124
1873
|
});
|
|
@@ -2129,7 +1878,7 @@ class Order {
|
|
|
2129
1878
|
} else {
|
|
2130
1879
|
Logger({
|
|
2131
1880
|
level: "WARN",
|
|
2132
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1881
|
+
message: `Response Validation Warnings for platform > Order > getBulkShipmentExcelFile \n ${res_error}`,
|
|
2133
1882
|
});
|
|
2134
1883
|
}
|
|
2135
1884
|
}
|
|
@@ -2141,7 +1890,7 @@ class Order {
|
|
|
2141
1890
|
* @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
|
|
2142
1891
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2143
1892
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2144
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1893
|
+
* @returns {Promise<OrderPlatformModel.JobFailedResponse>} - Success response
|
|
2145
1894
|
* @name getFileByStatus
|
|
2146
1895
|
* @summary: Download file used for Bulk operation
|
|
2147
1896
|
* @description: Get the file download URL used for performing bulk operation - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/).
|
|
@@ -2208,7 +1957,7 @@ class Order {
|
|
|
2208
1957
|
|
|
2209
1958
|
const {
|
|
2210
1959
|
error: res_error,
|
|
2211
|
-
} = OrderPlatformModel.
|
|
1960
|
+
} = OrderPlatformModel.JobFailedResponse().validate(responseData, {
|
|
2212
1961
|
abortEarly: false,
|
|
2213
1962
|
allowUnknown: true,
|
|
2214
1963
|
});
|
|
@@ -2231,7 +1980,7 @@ class Order {
|
|
|
2231
1980
|
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
2232
1981
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2233
1982
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2234
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1983
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
|
|
2235
1984
|
* @name getLaneConfig
|
|
2236
1985
|
* @summary: Get lane configuration
|
|
2237
1986
|
* @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
@@ -2361,7 +2110,7 @@ class Order {
|
|
|
2361
2110
|
|
|
2362
2111
|
const {
|
|
2363
2112
|
error: res_error,
|
|
2364
|
-
} = OrderPlatformModel.
|
|
2113
|
+
} = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
|
|
2365
2114
|
abortEarly: false,
|
|
2366
2115
|
allowUnknown: true,
|
|
2367
2116
|
});
|
|
@@ -2390,12 +2139,25 @@ class Order {
|
|
|
2390
2139
|
* @description: Get details regarding a manifest which can be used to perform further actions on it - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestDetails/).
|
|
2391
2140
|
*/
|
|
2392
2141
|
async getManifestDetails(
|
|
2393
|
-
{
|
|
2142
|
+
{
|
|
2143
|
+
manifestId,
|
|
2144
|
+
dpIds,
|
|
2145
|
+
endDate,
|
|
2146
|
+
startDate,
|
|
2147
|
+
pageNo,
|
|
2148
|
+
pageSize,
|
|
2149
|
+
requestHeaders,
|
|
2150
|
+
} = { requestHeaders: {} },
|
|
2394
2151
|
{ responseHeaders } = { responseHeaders: false }
|
|
2395
2152
|
) {
|
|
2396
2153
|
const { error } = OrderPlatformValidator.getManifestDetails().validate(
|
|
2397
2154
|
{
|
|
2398
2155
|
manifestId,
|
|
2156
|
+
dpIds,
|
|
2157
|
+
endDate,
|
|
2158
|
+
startDate,
|
|
2159
|
+
pageNo,
|
|
2160
|
+
pageSize,
|
|
2399
2161
|
},
|
|
2400
2162
|
{ abortEarly: false, allowUnknown: true }
|
|
2401
2163
|
);
|
|
@@ -2409,6 +2171,11 @@ class Order {
|
|
|
2409
2171
|
} = OrderPlatformValidator.getManifestDetails().validate(
|
|
2410
2172
|
{
|
|
2411
2173
|
manifestId,
|
|
2174
|
+
dpIds,
|
|
2175
|
+
endDate,
|
|
2176
|
+
startDate,
|
|
2177
|
+
pageNo,
|
|
2178
|
+
pageSize,
|
|
2412
2179
|
},
|
|
2413
2180
|
{ abortEarly: false, allowUnknown: false }
|
|
2414
2181
|
);
|
|
@@ -2420,13 +2187,19 @@ class Order {
|
|
|
2420
2187
|
}
|
|
2421
2188
|
|
|
2422
2189
|
const query_params = {};
|
|
2190
|
+
query_params["manifest_id"] = manifestId;
|
|
2191
|
+
query_params["dp_ids"] = dpIds;
|
|
2192
|
+
query_params["end_date"] = endDate;
|
|
2193
|
+
query_params["start_date"] = startDate;
|
|
2194
|
+
query_params["page_no"] = pageNo;
|
|
2195
|
+
query_params["page_size"] = pageSize;
|
|
2423
2196
|
|
|
2424
2197
|
const xHeaders = {};
|
|
2425
2198
|
|
|
2426
2199
|
const response = await PlatformAPIClient.execute(
|
|
2427
2200
|
this.config,
|
|
2428
2201
|
"get",
|
|
2429
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2202
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/details`,
|
|
2430
2203
|
query_params,
|
|
2431
2204
|
undefined,
|
|
2432
2205
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2582,8 +2355,7 @@ class Order {
|
|
|
2582
2355
|
* @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
|
|
2583
2356
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2584
2357
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2585
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2586
|
-
* Success response
|
|
2358
|
+
* @returns {Promise<OrderPlatformModel.ManifestFiltersResponse>} - Success response
|
|
2587
2359
|
* @name getManifestfilters
|
|
2588
2360
|
* @summary: List filters
|
|
2589
2361
|
* @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
|
|
@@ -2640,10 +2412,10 @@ class Order {
|
|
|
2640
2412
|
|
|
2641
2413
|
const {
|
|
2642
2414
|
error: res_error,
|
|
2643
|
-
} = OrderPlatformModel.
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
);
|
|
2415
|
+
} = OrderPlatformModel.ManifestFiltersResponse().validate(responseData, {
|
|
2416
|
+
abortEarly: false,
|
|
2417
|
+
allowUnknown: true,
|
|
2418
|
+
});
|
|
2647
2419
|
|
|
2648
2420
|
if (res_error) {
|
|
2649
2421
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2739,7 +2511,7 @@ class Order {
|
|
|
2739
2511
|
const response = await PlatformAPIClient.execute(
|
|
2740
2512
|
this.config,
|
|
2741
2513
|
"get",
|
|
2742
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2514
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/listing`,
|
|
2743
2515
|
query_params,
|
|
2744
2516
|
undefined,
|
|
2745
2517
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2776,8 +2548,7 @@ class Order {
|
|
|
2776
2548
|
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
2777
2549
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2778
2550
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2779
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2780
|
-
* Success response
|
|
2551
|
+
* @returns {Promise<OrderPlatformModel.OrderDetailsResponse>} - Success response
|
|
2781
2552
|
* @name getOrderById
|
|
2782
2553
|
* @summary: Get order
|
|
2783
2554
|
* @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
@@ -2840,7 +2611,7 @@ class Order {
|
|
|
2840
2611
|
|
|
2841
2612
|
const {
|
|
2842
2613
|
error: res_error,
|
|
2843
|
-
} = OrderPlatformModel.
|
|
2614
|
+
} = OrderPlatformModel.OrderDetailsResponse().validate(responseData, {
|
|
2844
2615
|
abortEarly: false,
|
|
2845
2616
|
allowUnknown: true,
|
|
2846
2617
|
});
|
|
@@ -2863,8 +2634,7 @@ class Order {
|
|
|
2863
2634
|
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
2864
2635
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2865
2636
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2866
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2867
|
-
* Success response
|
|
2637
|
+
* @returns {Promise<OrderPlatformModel.OrderListingResponse>} - Success response
|
|
2868
2638
|
* @name getOrders
|
|
2869
2639
|
* @summary: List orders
|
|
2870
2640
|
* @description: Get a list of orders based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
@@ -2894,7 +2664,7 @@ class Order {
|
|
|
2894
2664
|
customerId,
|
|
2895
2665
|
orderType,
|
|
2896
2666
|
allowInactive,
|
|
2897
|
-
|
|
2667
|
+
enforceDateFilter,
|
|
2898
2668
|
requestHeaders,
|
|
2899
2669
|
} = { requestHeaders: {} },
|
|
2900
2670
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -2924,7 +2694,7 @@ class Order {
|
|
|
2924
2694
|
customerId,
|
|
2925
2695
|
orderType,
|
|
2926
2696
|
allowInactive,
|
|
2927
|
-
|
|
2697
|
+
enforceDateFilter,
|
|
2928
2698
|
},
|
|
2929
2699
|
{ abortEarly: false, allowUnknown: true }
|
|
2930
2700
|
);
|
|
@@ -2958,7 +2728,7 @@ class Order {
|
|
|
2958
2728
|
customerId,
|
|
2959
2729
|
orderType,
|
|
2960
2730
|
allowInactive,
|
|
2961
|
-
|
|
2731
|
+
enforceDateFilter,
|
|
2962
2732
|
},
|
|
2963
2733
|
{ abortEarly: false, allowUnknown: false }
|
|
2964
2734
|
);
|
|
@@ -2993,7 +2763,7 @@ class Order {
|
|
|
2993
2763
|
query_params["customer_id"] = customerId;
|
|
2994
2764
|
query_params["order_type"] = orderType;
|
|
2995
2765
|
query_params["allow_inactive"] = allowInactive;
|
|
2996
|
-
query_params["
|
|
2766
|
+
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
2997
2767
|
|
|
2998
2768
|
const xHeaders = {};
|
|
2999
2769
|
|
|
@@ -3014,7 +2784,7 @@ class Order {
|
|
|
3014
2784
|
|
|
3015
2785
|
const {
|
|
3016
2786
|
error: res_error,
|
|
3017
|
-
} = OrderPlatformModel.
|
|
2787
|
+
} = OrderPlatformModel.OrderListingResponse().validate(responseData, {
|
|
3018
2788
|
abortEarly: false,
|
|
3019
2789
|
allowUnknown: true,
|
|
3020
2790
|
});
|
|
@@ -3037,7 +2807,7 @@ class Order {
|
|
|
3037
2807
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
3038
2808
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3039
2809
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3040
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2810
|
+
* @returns {Promise<OrderPlatformModel.GetActionsResponse>} - Success response
|
|
3041
2811
|
* @name getRoleBasedActions
|
|
3042
2812
|
* @summary: Get role-based actions
|
|
3043
2813
|
* @description: Retrieve permissible actions based on user roles such as company_admin, company_operation, customer_care, and read_only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
|
|
@@ -3089,7 +2859,7 @@ class Order {
|
|
|
3089
2859
|
|
|
3090
2860
|
const {
|
|
3091
2861
|
error: res_error,
|
|
3092
|
-
} = OrderPlatformModel.
|
|
2862
|
+
} = OrderPlatformModel.GetActionsResponse().validate(responseData, {
|
|
3093
2863
|
abortEarly: false,
|
|
3094
2864
|
allowUnknown: true,
|
|
3095
2865
|
});
|
|
@@ -3112,8 +2882,7 @@ class Order {
|
|
|
3112
2882
|
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
3113
2883
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3114
2884
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3115
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3116
|
-
* Success response
|
|
2885
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponse>} - Success response
|
|
3117
2886
|
* @name getShipmentById
|
|
3118
2887
|
* @summary: Get shipment
|
|
3119
2888
|
* @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
@@ -3185,7 +2954,7 @@ class Order {
|
|
|
3185
2954
|
|
|
3186
2955
|
const {
|
|
3187
2956
|
error: res_error,
|
|
3188
|
-
} = OrderPlatformModel.
|
|
2957
|
+
} = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, {
|
|
3189
2958
|
abortEarly: false,
|
|
3190
2959
|
allowUnknown: true,
|
|
3191
2960
|
});
|
|
@@ -3208,8 +2977,7 @@ class Order {
|
|
|
3208
2977
|
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
3209
2978
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3210
2979
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3211
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3212
|
-
* Success response
|
|
2980
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
3213
2981
|
* @name getShipmentHistory
|
|
3214
2982
|
* @summary: Get a shipment's history
|
|
3215
2983
|
* @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
@@ -3269,10 +3037,10 @@ class Order {
|
|
|
3269
3037
|
|
|
3270
3038
|
const {
|
|
3271
3039
|
error: res_error,
|
|
3272
|
-
} = OrderPlatformModel.
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
);
|
|
3040
|
+
} = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
|
|
3041
|
+
abortEarly: false,
|
|
3042
|
+
allowUnknown: true,
|
|
3043
|
+
});
|
|
3276
3044
|
|
|
3277
3045
|
if (res_error) {
|
|
3278
3046
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3292,9 +3060,8 @@ class Order {
|
|
|
3292
3060
|
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
3293
3061
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3294
3062
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3295
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3296
|
-
*
|
|
3297
|
-
*
|
|
3063
|
+
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponse>} -
|
|
3064
|
+
* Success response
|
|
3298
3065
|
* @name getShipmentReasons
|
|
3299
3066
|
* @summary: List bag cancellation reasons
|
|
3300
3067
|
* @description: Get reasons to perform full or partial cancellation of a bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/).
|
|
@@ -3354,7 +3121,7 @@ class Order {
|
|
|
3354
3121
|
|
|
3355
3122
|
const {
|
|
3356
3123
|
error: res_error,
|
|
3357
|
-
} = OrderPlatformModel.
|
|
3124
|
+
} = OrderPlatformModel.PlatformShipmentReasonsResponse().validate(
|
|
3358
3125
|
responseData,
|
|
3359
3126
|
{ abortEarly: false, allowUnknown: true }
|
|
3360
3127
|
);
|
|
@@ -3377,7 +3144,7 @@ class Order {
|
|
|
3377
3144
|
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
3378
3145
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3379
3146
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3380
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3147
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
|
|
3381
3148
|
* - Success response
|
|
3382
3149
|
*
|
|
3383
3150
|
* @name getShipments
|
|
@@ -3417,7 +3184,7 @@ class Order {
|
|
|
3417
3184
|
tags,
|
|
3418
3185
|
customerId,
|
|
3419
3186
|
orderType,
|
|
3420
|
-
|
|
3187
|
+
enforceDateFilter,
|
|
3421
3188
|
requestHeaders,
|
|
3422
3189
|
} = { requestHeaders: {} },
|
|
3423
3190
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3455,7 +3222,7 @@ class Order {
|
|
|
3455
3222
|
tags,
|
|
3456
3223
|
customerId,
|
|
3457
3224
|
orderType,
|
|
3458
|
-
|
|
3225
|
+
enforceDateFilter,
|
|
3459
3226
|
},
|
|
3460
3227
|
{ abortEarly: false, allowUnknown: true }
|
|
3461
3228
|
);
|
|
@@ -3497,7 +3264,7 @@ class Order {
|
|
|
3497
3264
|
tags,
|
|
3498
3265
|
customerId,
|
|
3499
3266
|
orderType,
|
|
3500
|
-
|
|
3267
|
+
enforceDateFilter,
|
|
3501
3268
|
},
|
|
3502
3269
|
{ abortEarly: false, allowUnknown: false }
|
|
3503
3270
|
);
|
|
@@ -3540,7 +3307,7 @@ class Order {
|
|
|
3540
3307
|
query_params["tags"] = tags;
|
|
3541
3308
|
query_params["customer_id"] = customerId;
|
|
3542
3309
|
query_params["order_type"] = orderType;
|
|
3543
|
-
query_params["
|
|
3310
|
+
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
3544
3311
|
|
|
3545
3312
|
const xHeaders = {};
|
|
3546
3313
|
|
|
@@ -3561,7 +3328,7 @@ class Order {
|
|
|
3561
3328
|
|
|
3562
3329
|
const {
|
|
3563
3330
|
error: res_error,
|
|
3564
|
-
} = OrderPlatformModel.
|
|
3331
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate(
|
|
3565
3332
|
responseData,
|
|
3566
3333
|
{ abortEarly: false, allowUnknown: true }
|
|
3567
3334
|
);
|
|
@@ -3745,8 +3512,7 @@ class Order {
|
|
|
3745
3512
|
* @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
|
|
3746
3513
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3747
3514
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3748
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3749
|
-
* Success response
|
|
3515
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
|
|
3750
3516
|
* @name getTemplate
|
|
3751
3517
|
* @summary: Download bulk operation templates
|
|
3752
3518
|
* @description: Get the excel or CSV file URL for the template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/).
|
|
@@ -3800,10 +3566,10 @@ class Order {
|
|
|
3800
3566
|
|
|
3801
3567
|
const {
|
|
3802
3568
|
error: res_error,
|
|
3803
|
-
} = OrderPlatformModel.
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
);
|
|
3569
|
+
} = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
|
|
3570
|
+
abortEarly: false,
|
|
3571
|
+
allowUnknown: true,
|
|
3572
|
+
});
|
|
3807
3573
|
|
|
3808
3574
|
if (res_error) {
|
|
3809
3575
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3823,7 +3589,7 @@ class Order {
|
|
|
3823
3589
|
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
3824
3590
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3825
3591
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3826
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3592
|
+
* @returns {Promise<OrderPlatformModel.FiltersResponse>} - Success response
|
|
3827
3593
|
* @name getfilters
|
|
3828
3594
|
* @summary: List filters
|
|
3829
3595
|
* @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
@@ -3881,7 +3647,7 @@ class Order {
|
|
|
3881
3647
|
|
|
3882
3648
|
const {
|
|
3883
3649
|
error: res_error,
|
|
3884
|
-
} = OrderPlatformModel.
|
|
3650
|
+
} = OrderPlatformModel.FiltersResponse().validate(responseData, {
|
|
3885
3651
|
abortEarly: false,
|
|
3886
3652
|
allowUnknown: true,
|
|
3887
3653
|
});
|
|
@@ -3904,9 +3670,8 @@ class Order {
|
|
|
3904
3670
|
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
3905
3671
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3906
3672
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3907
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3908
|
-
*
|
|
3909
|
-
*
|
|
3673
|
+
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponse>} -
|
|
3674
|
+
* Success response
|
|
3910
3675
|
* @name invalidateShipmentCache
|
|
3911
3676
|
* @summary: Invalidate shipment cache
|
|
3912
3677
|
* @description: Clear the existing shipment cache data stored in Redis and serialize the updated data for subsequent use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
|
|
@@ -3962,7 +3727,7 @@ class Order {
|
|
|
3962
3727
|
|
|
3963
3728
|
const {
|
|
3964
3729
|
error: res_error,
|
|
3965
|
-
} = OrderPlatformModel.
|
|
3730
|
+
} = OrderPlatformModel.InvalidateShipmentCacheResponse().validate(
|
|
3966
3731
|
responseData,
|
|
3967
3732
|
{ abortEarly: false, allowUnknown: true }
|
|
3968
3733
|
);
|
|
@@ -3985,7 +3750,7 @@ class Order {
|
|
|
3985
3750
|
* @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
|
|
3986
3751
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3987
3752
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3988
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3753
|
+
* @returns {Promise<OrderPlatformModel.JobDetailsResponse>} - Success response
|
|
3989
3754
|
* @name jobDetails
|
|
3990
3755
|
* @summary: Get bulk operation details
|
|
3991
3756
|
* @description: Fetches details of the job for the provided batch Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/).
|
|
@@ -4039,7 +3804,7 @@ class Order {
|
|
|
4039
3804
|
|
|
4040
3805
|
const {
|
|
4041
3806
|
error: res_error,
|
|
4042
|
-
} = OrderPlatformModel.
|
|
3807
|
+
} = OrderPlatformModel.JobDetailsResponse().validate(responseData, {
|
|
4043
3808
|
abortEarly: false,
|
|
4044
3809
|
allowUnknown: true,
|
|
4045
3810
|
});
|
|
@@ -4139,8 +3904,7 @@ class Order {
|
|
|
4139
3904
|
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
4140
3905
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4141
3906
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4142
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4143
|
-
* Success response
|
|
3907
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
4144
3908
|
* @name postShipmentHistory
|
|
4145
3909
|
* @summary: Create shipment history
|
|
4146
3910
|
* @description: Used to add logs in history for a bag for the provided Shipment ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
|
|
@@ -4196,10 +3960,10 @@ class Order {
|
|
|
4196
3960
|
|
|
4197
3961
|
const {
|
|
4198
3962
|
error: res_error,
|
|
4199
|
-
} = OrderPlatformModel.
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
);
|
|
3963
|
+
} = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
|
|
3964
|
+
abortEarly: false,
|
|
3965
|
+
allowUnknown: true,
|
|
3966
|
+
});
|
|
4203
3967
|
|
|
4204
3968
|
if (res_error) {
|
|
4205
3969
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4215,93 +3979,11 @@ class Order {
|
|
|
4215
3979
|
return response;
|
|
4216
3980
|
}
|
|
4217
3981
|
|
|
4218
|
-
/**
|
|
4219
|
-
* @param {OrderPlatformValidator.ProcessManifestsParam} arg - Arg object
|
|
4220
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4221
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4222
|
-
* @returns {Promise<OrderPlatformModel.ProcessManifestItemResponseSchema>}
|
|
4223
|
-
* - Success response
|
|
4224
|
-
*
|
|
4225
|
-
* @name processManifests
|
|
4226
|
-
* @summary: Generate manifest
|
|
4227
|
-
* @description: Generate manifest Id and PDF and tags the shipments with that manifest Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifests/).
|
|
4228
|
-
*/
|
|
4229
|
-
async processManifests(
|
|
4230
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4231
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4232
|
-
) {
|
|
4233
|
-
const { error } = OrderPlatformValidator.processManifests().validate(
|
|
4234
|
-
{
|
|
4235
|
-
body,
|
|
4236
|
-
},
|
|
4237
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4238
|
-
);
|
|
4239
|
-
if (error) {
|
|
4240
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4241
|
-
}
|
|
4242
|
-
|
|
4243
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4244
|
-
const {
|
|
4245
|
-
error: warrning,
|
|
4246
|
-
} = OrderPlatformValidator.processManifests().validate(
|
|
4247
|
-
{
|
|
4248
|
-
body,
|
|
4249
|
-
},
|
|
4250
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4251
|
-
);
|
|
4252
|
-
if (warrning) {
|
|
4253
|
-
Logger({
|
|
4254
|
-
level: "WARN",
|
|
4255
|
-
message: `Parameter Validation warrnings for platform > Order > processManifests \n ${warrning}`,
|
|
4256
|
-
});
|
|
4257
|
-
}
|
|
4258
|
-
|
|
4259
|
-
const query_params = {};
|
|
4260
|
-
|
|
4261
|
-
const xHeaders = {};
|
|
4262
|
-
|
|
4263
|
-
const response = await PlatformAPIClient.execute(
|
|
4264
|
-
this.config,
|
|
4265
|
-
"post",
|
|
4266
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests`,
|
|
4267
|
-
query_params,
|
|
4268
|
-
body,
|
|
4269
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4270
|
-
{ responseHeaders }
|
|
4271
|
-
);
|
|
4272
|
-
|
|
4273
|
-
let responseData = response;
|
|
4274
|
-
if (responseHeaders) {
|
|
4275
|
-
responseData = response[0];
|
|
4276
|
-
}
|
|
4277
|
-
|
|
4278
|
-
const {
|
|
4279
|
-
error: res_error,
|
|
4280
|
-
} = OrderPlatformModel.ProcessManifestItemResponseSchema().validate(
|
|
4281
|
-
responseData,
|
|
4282
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4283
|
-
);
|
|
4284
|
-
|
|
4285
|
-
if (res_error) {
|
|
4286
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4287
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4288
|
-
} else {
|
|
4289
|
-
Logger({
|
|
4290
|
-
level: "WARN",
|
|
4291
|
-
message: `Response Validation Warnings for platform > Order > processManifests \n ${res_error}`,
|
|
4292
|
-
});
|
|
4293
|
-
}
|
|
4294
|
-
}
|
|
4295
|
-
|
|
4296
|
-
return response;
|
|
4297
|
-
}
|
|
4298
|
-
|
|
4299
3982
|
/**
|
|
4300
3983
|
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
4301
3984
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4302
3985
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4303
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4304
|
-
* Success response
|
|
3986
|
+
* @returns {Promise<OrderPlatformModel.StoreReassignResponse>} - Success response
|
|
4305
3987
|
* @name reassignLocation
|
|
4306
3988
|
* @summary: Reassign location
|
|
4307
3989
|
* @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
|
|
@@ -4357,10 +4039,10 @@ class Order {
|
|
|
4357
4039
|
|
|
4358
4040
|
const {
|
|
4359
4041
|
error: res_error,
|
|
4360
|
-
} = OrderPlatformModel.
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
);
|
|
4042
|
+
} = OrderPlatformModel.StoreReassignResponse().validate(responseData, {
|
|
4043
|
+
abortEarly: false,
|
|
4044
|
+
allowUnknown: true,
|
|
4045
|
+
});
|
|
4364
4046
|
|
|
4365
4047
|
if (res_error) {
|
|
4366
4048
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4380,7 +4062,7 @@ class Order {
|
|
|
4380
4062
|
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
4381
4063
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4382
4064
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4383
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4065
|
+
* @returns {Promise<OrderPlatformModel.BaseResponse>} - Success response
|
|
4384
4066
|
* @name sendSmsNinja
|
|
4385
4067
|
* @summary: Send SMS
|
|
4386
4068
|
* @description: Send SMS to customer based on the template that is selected - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
|
|
@@ -4434,7 +4116,7 @@ class Order {
|
|
|
4434
4116
|
|
|
4435
4117
|
const {
|
|
4436
4118
|
error: res_error,
|
|
4437
|
-
} = OrderPlatformModel.
|
|
4119
|
+
} = OrderPlatformModel.BaseResponse().validate(responseData, {
|
|
4438
4120
|
abortEarly: false,
|
|
4439
4121
|
allowUnknown: true,
|
|
4440
4122
|
});
|
|
@@ -4457,8 +4139,7 @@ class Order {
|
|
|
4457
4139
|
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
4458
4140
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4459
4141
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4460
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4461
|
-
* Success response
|
|
4142
|
+
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponse>} - Success response
|
|
4462
4143
|
* @name sendUserMobileOTP
|
|
4463
4144
|
* @summary: Send user mobile OTP
|
|
4464
4145
|
* @description: Send a one-time OTP to a customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
|
|
@@ -4514,10 +4195,10 @@ class Order {
|
|
|
4514
4195
|
|
|
4515
4196
|
const {
|
|
4516
4197
|
error: res_error,
|
|
4517
|
-
} = OrderPlatformModel.
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
);
|
|
4198
|
+
} = OrderPlatformModel.SendUserMobileOtpResponse().validate(responseData, {
|
|
4199
|
+
abortEarly: false,
|
|
4200
|
+
allowUnknown: true,
|
|
4201
|
+
});
|
|
4521
4202
|
|
|
4522
4203
|
if (res_error) {
|
|
4523
4204
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4537,9 +4218,8 @@ class Order {
|
|
|
4537
4218
|
* @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
|
|
4538
4219
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4539
4220
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4540
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4541
|
-
*
|
|
4542
|
-
*
|
|
4221
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponse>} -
|
|
4222
|
+
* Success response
|
|
4543
4223
|
* @name trackShipment
|
|
4544
4224
|
* @summary: Track shipment
|
|
4545
4225
|
* @description: Retrieve courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/).
|
|
@@ -4605,7 +4285,7 @@ class Order {
|
|
|
4605
4285
|
|
|
4606
4286
|
const {
|
|
4607
4287
|
error: res_error,
|
|
4608
|
-
} = OrderPlatformModel.
|
|
4288
|
+
} = OrderPlatformModel.CourierPartnerTrackingResponse().validate(
|
|
4609
4289
|
responseData,
|
|
4610
4290
|
{ abortEarly: false, allowUnknown: true }
|
|
4611
4291
|
);
|
|
@@ -4628,19 +4308,44 @@ class Order {
|
|
|
4628
4308
|
* @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
|
|
4629
4309
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4630
4310
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4631
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4311
|
+
* @returns {Promise<OrderPlatformModel.BaseResponse>} - Success response
|
|
4632
4312
|
* @name updateAddress
|
|
4633
|
-
* @summary: Update
|
|
4634
|
-
* @description:
|
|
4313
|
+
* @summary: Update shipment address
|
|
4314
|
+
* @description: Modify the address details of an existing shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
|
|
4635
4315
|
*/
|
|
4636
4316
|
async updateAddress(
|
|
4637
|
-
{
|
|
4317
|
+
{
|
|
4318
|
+
shipmentId,
|
|
4319
|
+
addressCategory,
|
|
4320
|
+
name,
|
|
4321
|
+
address,
|
|
4322
|
+
addressType,
|
|
4323
|
+
pincode,
|
|
4324
|
+
phone,
|
|
4325
|
+
email,
|
|
4326
|
+
landmark,
|
|
4327
|
+
city,
|
|
4328
|
+
state,
|
|
4329
|
+
country,
|
|
4330
|
+
requestHeaders,
|
|
4331
|
+
} = { requestHeaders: {} },
|
|
4638
4332
|
{ responseHeaders } = { responseHeaders: false }
|
|
4639
4333
|
) {
|
|
4640
4334
|
const { error } = OrderPlatformValidator.updateAddress().validate(
|
|
4641
4335
|
{
|
|
4642
4336
|
shipmentId,
|
|
4643
|
-
|
|
4337
|
+
addressCategory,
|
|
4338
|
+
|
|
4339
|
+
name,
|
|
4340
|
+
address,
|
|
4341
|
+
addressType,
|
|
4342
|
+
pincode,
|
|
4343
|
+
phone,
|
|
4344
|
+
email,
|
|
4345
|
+
landmark,
|
|
4346
|
+
city,
|
|
4347
|
+
state,
|
|
4348
|
+
country,
|
|
4644
4349
|
},
|
|
4645
4350
|
{ abortEarly: false, allowUnknown: true }
|
|
4646
4351
|
);
|
|
@@ -4652,7 +4357,18 @@ class Order {
|
|
|
4652
4357
|
const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
|
|
4653
4358
|
{
|
|
4654
4359
|
shipmentId,
|
|
4655
|
-
|
|
4360
|
+
addressCategory,
|
|
4361
|
+
|
|
4362
|
+
name,
|
|
4363
|
+
address,
|
|
4364
|
+
addressType,
|
|
4365
|
+
pincode,
|
|
4366
|
+
phone,
|
|
4367
|
+
email,
|
|
4368
|
+
landmark,
|
|
4369
|
+
city,
|
|
4370
|
+
state,
|
|
4371
|
+
country,
|
|
4656
4372
|
},
|
|
4657
4373
|
{ abortEarly: false, allowUnknown: false }
|
|
4658
4374
|
);
|
|
@@ -4664,15 +4380,27 @@ class Order {
|
|
|
4664
4380
|
}
|
|
4665
4381
|
|
|
4666
4382
|
const query_params = {};
|
|
4383
|
+
query_params["shipment_id"] = shipmentId;
|
|
4384
|
+
query_params["name"] = name;
|
|
4385
|
+
query_params["address"] = address;
|
|
4386
|
+
query_params["address_type"] = addressType;
|
|
4387
|
+
query_params["pincode"] = pincode;
|
|
4388
|
+
query_params["phone"] = phone;
|
|
4389
|
+
query_params["email"] = email;
|
|
4390
|
+
query_params["landmark"] = landmark;
|
|
4391
|
+
query_params["address_category"] = addressCategory;
|
|
4392
|
+
query_params["city"] = city;
|
|
4393
|
+
query_params["state"] = state;
|
|
4394
|
+
query_params["country"] = country;
|
|
4667
4395
|
|
|
4668
4396
|
const xHeaders = {};
|
|
4669
4397
|
|
|
4670
4398
|
const response = await PlatformAPIClient.execute(
|
|
4671
4399
|
this.config,
|
|
4672
|
-
"
|
|
4673
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4400
|
+
"post",
|
|
4401
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/delight/update-address`,
|
|
4674
4402
|
query_params,
|
|
4675
|
-
|
|
4403
|
+
undefined,
|
|
4676
4404
|
{ ...xHeaders, ...requestHeaders },
|
|
4677
4405
|
{ responseHeaders }
|
|
4678
4406
|
);
|
|
@@ -4684,7 +4412,7 @@ class Order {
|
|
|
4684
4412
|
|
|
4685
4413
|
const {
|
|
4686
4414
|
error: res_error,
|
|
4687
|
-
} = OrderPlatformModel.
|
|
4415
|
+
} = OrderPlatformModel.BaseResponse().validate(responseData, {
|
|
4688
4416
|
abortEarly: false,
|
|
4689
4417
|
allowUnknown: true,
|
|
4690
4418
|
});
|
|
@@ -4707,7 +4435,7 @@ class Order {
|
|
|
4707
4435
|
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
4708
4436
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4709
4437
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4710
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4438
|
+
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponse>}
|
|
4711
4439
|
* - Success response
|
|
4712
4440
|
*
|
|
4713
4441
|
* @name updatePackagingDimensions
|
|
@@ -4767,7 +4495,7 @@ class Order {
|
|
|
4767
4495
|
|
|
4768
4496
|
const {
|
|
4769
4497
|
error: res_error,
|
|
4770
|
-
} = OrderPlatformModel.
|
|
4498
|
+
} = OrderPlatformModel.UpdatePackagingDimensionsResponse().validate(
|
|
4771
4499
|
responseData,
|
|
4772
4500
|
{ abortEarly: false, allowUnknown: true }
|
|
4773
4501
|
);
|
|
@@ -4786,93 +4514,15 @@ class Order {
|
|
|
4786
4514
|
return response;
|
|
4787
4515
|
}
|
|
4788
4516
|
|
|
4789
|
-
/**
|
|
4790
|
-
* @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object
|
|
4791
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4792
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4793
|
-
* @returns {Promise<Object>} - Success response
|
|
4794
|
-
* @name updatePaymentInfo
|
|
4795
|
-
* @summary: Update payment details for an order, its shipments and its bags.
|
|
4796
|
-
* @description: Updates the payment mode for an order, its shipments and its bags. This endpoint allows for modifying payment methods, and associated details but not amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePaymentInfo/).
|
|
4797
|
-
*/
|
|
4798
|
-
async updatePaymentInfo(
|
|
4799
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4800
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4801
|
-
) {
|
|
4802
|
-
const { error } = OrderPlatformValidator.updatePaymentInfo().validate(
|
|
4803
|
-
{
|
|
4804
|
-
body,
|
|
4805
|
-
},
|
|
4806
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4807
|
-
);
|
|
4808
|
-
if (error) {
|
|
4809
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4810
|
-
}
|
|
4811
|
-
|
|
4812
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4813
|
-
const {
|
|
4814
|
-
error: warrning,
|
|
4815
|
-
} = OrderPlatformValidator.updatePaymentInfo().validate(
|
|
4816
|
-
{
|
|
4817
|
-
body,
|
|
4818
|
-
},
|
|
4819
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4820
|
-
);
|
|
4821
|
-
if (warrning) {
|
|
4822
|
-
Logger({
|
|
4823
|
-
level: "WARN",
|
|
4824
|
-
message: `Parameter Validation warrnings for platform > Order > updatePaymentInfo \n ${warrning}`,
|
|
4825
|
-
});
|
|
4826
|
-
}
|
|
4827
|
-
|
|
4828
|
-
const query_params = {};
|
|
4829
|
-
|
|
4830
|
-
const xHeaders = {};
|
|
4831
|
-
|
|
4832
|
-
const response = await PlatformAPIClient.execute(
|
|
4833
|
-
this.config,
|
|
4834
|
-
"put",
|
|
4835
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/payment/update`,
|
|
4836
|
-
query_params,
|
|
4837
|
-
body,
|
|
4838
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4839
|
-
{ responseHeaders }
|
|
4840
|
-
);
|
|
4841
|
-
|
|
4842
|
-
let responseData = response;
|
|
4843
|
-
if (responseHeaders) {
|
|
4844
|
-
responseData = response[0];
|
|
4845
|
-
}
|
|
4846
|
-
|
|
4847
|
-
const { error: res_error } = Joi.any().validate(responseData, {
|
|
4848
|
-
abortEarly: false,
|
|
4849
|
-
allowUnknown: true,
|
|
4850
|
-
});
|
|
4851
|
-
|
|
4852
|
-
if (res_error) {
|
|
4853
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4854
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4855
|
-
} else {
|
|
4856
|
-
Logger({
|
|
4857
|
-
level: "WARN",
|
|
4858
|
-
message: `Response Validation Warnings for platform > Order > updatePaymentInfo \n ${res_error}`,
|
|
4859
|
-
});
|
|
4860
|
-
}
|
|
4861
|
-
}
|
|
4862
|
-
|
|
4863
|
-
return response;
|
|
4864
|
-
}
|
|
4865
|
-
|
|
4866
4517
|
/**
|
|
4867
4518
|
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
4868
4519
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4869
4520
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4870
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4871
|
-
*
|
|
4872
|
-
*
|
|
4521
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponse>} -
|
|
4522
|
+
* Success response
|
|
4873
4523
|
* @name updateShipmentLock
|
|
4874
4524
|
* @summary: Update a shipment lock
|
|
4875
|
-
* @description: Modify shipment/bag lock and
|
|
4525
|
+
* @description: Modify shipment/bag lock status and update lock/unlock messages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
|
|
4876
4526
|
*/
|
|
4877
4527
|
async updateShipmentLock(
|
|
4878
4528
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4925,10 +4575,10 @@ class Order {
|
|
|
4925
4575
|
|
|
4926
4576
|
const {
|
|
4927
4577
|
error: res_error,
|
|
4928
|
-
} = OrderPlatformModel.
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
);
|
|
4578
|
+
} = OrderPlatformModel.UpdateShipmentLockResponse().validate(responseData, {
|
|
4579
|
+
abortEarly: false,
|
|
4580
|
+
allowUnknown: true,
|
|
4581
|
+
});
|
|
4932
4582
|
|
|
4933
4583
|
if (res_error) {
|
|
4934
4584
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5109,18 +4759,17 @@ class Order {
|
|
|
5109
4759
|
* @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object
|
|
5110
4760
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5111
4761
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5112
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4762
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
5113
4763
|
* @name uploadConsents
|
|
5114
4764
|
* @summary: Upload consent
|
|
5115
4765
|
* @description: Uploads the consent signed by courier partner and seller to keep records - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/).
|
|
5116
4766
|
*/
|
|
5117
4767
|
async uploadConsents(
|
|
5118
|
-
{
|
|
4768
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5119
4769
|
{ responseHeaders } = { responseHeaders: false }
|
|
5120
4770
|
) {
|
|
5121
4771
|
const { error } = OrderPlatformValidator.uploadConsents().validate(
|
|
5122
4772
|
{
|
|
5123
|
-
manifestId,
|
|
5124
4773
|
body,
|
|
5125
4774
|
},
|
|
5126
4775
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -5134,7 +4783,6 @@ class Order {
|
|
|
5134
4783
|
error: warrning,
|
|
5135
4784
|
} = OrderPlatformValidator.uploadConsents().validate(
|
|
5136
4785
|
{
|
|
5137
|
-
manifestId,
|
|
5138
4786
|
body,
|
|
5139
4787
|
},
|
|
5140
4788
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -5153,7 +4801,7 @@ class Order {
|
|
|
5153
4801
|
const response = await PlatformAPIClient.execute(
|
|
5154
4802
|
this.config,
|
|
5155
4803
|
"post",
|
|
5156
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest
|
|
4804
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`,
|
|
5157
4805
|
query_params,
|
|
5158
4806
|
body,
|
|
5159
4807
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5167,7 +4815,7 @@ class Order {
|
|
|
5167
4815
|
|
|
5168
4816
|
const {
|
|
5169
4817
|
error: res_error,
|
|
5170
|
-
} = OrderPlatformModel.
|
|
4818
|
+
} = OrderPlatformModel.SuccessResponse().validate(responseData, {
|
|
5171
4819
|
abortEarly: false,
|
|
5172
4820
|
allowUnknown: true,
|
|
5173
4821
|
});
|
|
@@ -5190,7 +4838,7 @@ class Order {
|
|
|
5190
4838
|
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
5191
4839
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5192
4840
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5193
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4841
|
+
* @returns {Promise<OrderPlatformModel.VerifyOtpResponse>} - Success response
|
|
5194
4842
|
* @name verifyMobileOTP
|
|
5195
4843
|
* @summary: Verify mobile OTP
|
|
5196
4844
|
* @description: Perform OTP verification to link a user to an anonymous order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
|
|
@@ -5246,7 +4894,7 @@ class Order {
|
|
|
5246
4894
|
|
|
5247
4895
|
const {
|
|
5248
4896
|
error: res_error,
|
|
5249
|
-
} = OrderPlatformModel.
|
|
4897
|
+
} = OrderPlatformModel.VerifyOtpResponse().validate(responseData, {
|
|
5250
4898
|
abortEarly: false,
|
|
5251
4899
|
allowUnknown: true,
|
|
5252
4900
|
});
|