@gofynd/fdk-client-javascript 1.4.13 → 1.4.14
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 +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +60 -53
- package/sdk/application/Cart/CartApplicationClient.js +130 -53
- package/sdk/application/Cart/CartApplicationModel.d.ts +489 -143
- package/sdk/application/Cart/CartApplicationModel.js +380 -159
- package/sdk/application/Cart/CartApplicationValidator.d.ts +38 -19
- package/sdk/application/Cart/CartApplicationValidator.js +34 -18
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +88 -68
- package/sdk/application/Catalog/CatalogApplicationClient.js +114 -94
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +194 -142
- package/sdk/application/Catalog/CatalogApplicationModel.js +171 -133
- package/sdk/application/Common/CommonApplicationClient.d.ts +3 -2
- package/sdk/application/Common/CommonApplicationClient.js +6 -5
- package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
- package/sdk/application/Common/CommonApplicationModel.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +45 -57
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +35 -47
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +23 -33
- package/sdk/application/Content/ContentApplicationClient.js +54 -75
- package/sdk/application/Content/ContentApplicationModel.d.ts +93 -37
- package/sdk/application/Content/ContentApplicationModel.js +83 -32
- package/sdk/application/Content/ContentApplicationValidator.d.ts +23 -17
- package/sdk/application/Content/ContentApplicationValidator.js +15 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -8
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -25
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +16 -18
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +36 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +202 -0
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +289 -0
- package/sdk/application/Finance/FinanceApplicationModel.js +208 -0
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +25 -0
- package/sdk/application/Finance/FinanceApplicationValidator.js +31 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -3
- package/sdk/application/Lead/LeadApplicationClient.js +2 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
- package/sdk/application/Lead/LeadApplicationModel.js +19 -19
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +39 -16
- package/sdk/application/Logistic/LogisticApplicationClient.js +189 -21
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +532 -173
- package/sdk/application/Logistic/LogisticApplicationModel.js +409 -139
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +54 -9
- package/sdk/application/Logistic/LogisticApplicationValidator.js +42 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -10
- package/sdk/application/Order/OrderApplicationClient.js +96 -13
- package/sdk/application/Order/OrderApplicationModel.d.ts +434 -102
- package/sdk/application/Order/OrderApplicationModel.js +278 -73
- package/sdk/application/Order/OrderApplicationValidator.d.ts +17 -3
- package/sdk/application/Order/OrderApplicationValidator.js +15 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +96 -99
- package/sdk/application/Payment/PaymentApplicationClient.js +111 -114
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +293 -289
- package/sdk/application/Payment/PaymentApplicationModel.js +243 -241
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -16
- package/sdk/application/Rewards/RewardsApplicationClient.js +19 -22
- 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 +8 -6
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +48 -17
- package/sdk/application/Theme/ThemeApplicationModel.js +42 -22
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +16 -3
- package/sdk/application/Theme/ThemeApplicationValidator.js +9 -2
- 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 +11 -9
- package/sdk/application/Webhook/WebhookApplicationModel.js +8 -6
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
- package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
- package/sdk/application/index.d.ts +1 -0
- package/sdk/application/index.js +2 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- 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 +126 -20
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +767 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +429 -76
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +120 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4978 -1303
- package/sdk/platform/Cart/CartPlatformModel.js +1922 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +208 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +383 -358
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +122 -126
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +66 -68
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +141 -118
- package/sdk/platform/Catalog/CatalogPlatformClient.js +193 -170
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1516 -1766
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1393 -1224
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1241 -395
- package/sdk/platform/Content/ContentPlatformModel.js +521 -390
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- 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 +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +15 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +83 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +25 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +178 -97
- package/sdk/platform/Order/OrderPlatformClient.js +589 -229
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5447 -3071
- package/sdk/platform/Order/OrderPlatformModel.js +3496 -1653
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +241 -176
- package/sdk/platform/Order/OrderPlatformValidator.js +153 -97
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +327 -313
- package/sdk/platform/Payment/PaymentPlatformModel.js +283 -273
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- 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 +45 -35
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +117 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +22 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +24 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +602 -341
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +483 -284
- 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 +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- 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 +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +791 -5
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- 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/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -18,7 +18,8 @@ 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.
|
|
21
|
+
* @returns {Promise<OrderPlatformModel.ConfigUpdatedResponseSchema>} -
|
|
22
|
+
* Success response
|
|
22
23
|
* @name addStateManagerConfig
|
|
23
24
|
* @summary: Allows esm config updation
|
|
24
25
|
* @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/).
|
|
@@ -74,10 +75,10 @@ class Order {
|
|
|
74
75
|
|
|
75
76
|
const {
|
|
76
77
|
error: res_error,
|
|
77
|
-
} = OrderPlatformModel.
|
|
78
|
-
|
|
79
|
-
allowUnknown: true
|
|
80
|
-
|
|
78
|
+
} = OrderPlatformModel.ConfigUpdatedResponseSchema().validate(
|
|
79
|
+
responseData,
|
|
80
|
+
{ abortEarly: false, allowUnknown: true }
|
|
81
|
+
);
|
|
81
82
|
|
|
82
83
|
if (res_error) {
|
|
83
84
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -97,7 +98,8 @@ class Order {
|
|
|
97
98
|
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
98
99
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
99
100
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
100
|
-
* @returns {Promise<OrderPlatformModel.
|
|
101
|
+
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponseSchema>} -
|
|
102
|
+
* Success response
|
|
101
103
|
* @name attachOrderUser
|
|
102
104
|
* @summary: Attach order to a user
|
|
103
105
|
* @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/).
|
|
@@ -153,10 +155,10 @@ class Order {
|
|
|
153
155
|
|
|
154
156
|
const {
|
|
155
157
|
error: res_error,
|
|
156
|
-
} = OrderPlatformModel.
|
|
157
|
-
|
|
158
|
-
allowUnknown: true
|
|
159
|
-
|
|
158
|
+
} = OrderPlatformModel.AttachOrderUserResponseSchema().validate(
|
|
159
|
+
responseData,
|
|
160
|
+
{ abortEarly: false, allowUnknown: true }
|
|
161
|
+
);
|
|
160
162
|
|
|
161
163
|
if (res_error) {
|
|
162
164
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -176,7 +178,7 @@ class Order {
|
|
|
176
178
|
* @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
|
|
177
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
178
180
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
179
|
-
* @returns {Promise<OrderPlatformModel.
|
|
181
|
+
* @returns {Promise<OrderPlatformModel.BulkListingResponseSchema>} - Success response
|
|
180
182
|
* @name bulkListing
|
|
181
183
|
* @summary: Lists bulk operations
|
|
182
184
|
* @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/).
|
|
@@ -258,7 +260,7 @@ class Order {
|
|
|
258
260
|
|
|
259
261
|
const {
|
|
260
262
|
error: res_error,
|
|
261
|
-
} = OrderPlatformModel.
|
|
263
|
+
} = OrderPlatformModel.BulkListingResponseSchema().validate(responseData, {
|
|
262
264
|
abortEarly: false,
|
|
263
265
|
allowUnknown: true,
|
|
264
266
|
});
|
|
@@ -281,8 +283,9 @@ class Order {
|
|
|
281
283
|
* @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object
|
|
282
284
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
283
285
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
284
|
-
* @returns {Promise<OrderPlatformModel.
|
|
285
|
-
* Success response
|
|
286
|
+
* @returns {Promise<OrderPlatformModel.BulkStateTransistionResponseSchema>}
|
|
287
|
+
* - Success response
|
|
288
|
+
*
|
|
286
289
|
* @name bulkStateTransistion
|
|
287
290
|
* @summary: Upload bulk state transitions file
|
|
288
291
|
* @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/).
|
|
@@ -338,7 +341,7 @@ class Order {
|
|
|
338
341
|
|
|
339
342
|
const {
|
|
340
343
|
error: res_error,
|
|
341
|
-
} = OrderPlatformModel.
|
|
344
|
+
} = OrderPlatformModel.BulkStateTransistionResponseSchema().validate(
|
|
342
345
|
responseData,
|
|
343
346
|
{ abortEarly: false, allowUnknown: true }
|
|
344
347
|
);
|
|
@@ -436,11 +439,92 @@ class Order {
|
|
|
436
439
|
return response;
|
|
437
440
|
}
|
|
438
441
|
|
|
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
|
+
|
|
439
523
|
/**
|
|
440
524
|
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
441
525
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
442
526
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
443
|
-
* @returns {Promise<OrderPlatformModel.
|
|
527
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponseSchema>} - Success response
|
|
444
528
|
* @name createOrder
|
|
445
529
|
* @summary: Create order
|
|
446
530
|
* @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
@@ -494,7 +578,7 @@ class Order {
|
|
|
494
578
|
|
|
495
579
|
const {
|
|
496
580
|
error: res_error,
|
|
497
|
-
} = OrderPlatformModel.
|
|
581
|
+
} = OrderPlatformModel.CreateOrderResponseSchema().validate(responseData, {
|
|
498
582
|
abortEarly: false,
|
|
499
583
|
allowUnknown: true,
|
|
500
584
|
});
|
|
@@ -517,7 +601,7 @@ class Order {
|
|
|
517
601
|
* @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object
|
|
518
602
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
519
603
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
520
|
-
* @returns {Promise<OrderPlatformModel.
|
|
604
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
|
|
521
605
|
* @name dispatchManifests
|
|
522
606
|
* @summary: Dispatch manifest
|
|
523
607
|
* @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/).
|
|
@@ -573,7 +657,7 @@ class Order {
|
|
|
573
657
|
|
|
574
658
|
const {
|
|
575
659
|
error: res_error,
|
|
576
|
-
} = OrderPlatformModel.
|
|
660
|
+
} = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
577
661
|
abortEarly: false,
|
|
578
662
|
allowUnknown: true,
|
|
579
663
|
});
|
|
@@ -596,7 +680,7 @@ class Order {
|
|
|
596
680
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
597
681
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
598
682
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
599
|
-
* @returns {Promise<OrderPlatformModel.
|
|
683
|
+
* @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
|
|
600
684
|
* @name downloadBulkActionTemplate
|
|
601
685
|
* @summary: Download bulk template
|
|
602
686
|
* @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/).
|
|
@@ -655,7 +739,7 @@ class Order {
|
|
|
655
739
|
|
|
656
740
|
const {
|
|
657
741
|
error: res_error,
|
|
658
|
-
} = OrderPlatformModel.
|
|
742
|
+
} = OrderPlatformModel.FileResponseSchema().validate(responseData, {
|
|
659
743
|
abortEarly: false,
|
|
660
744
|
allowUnknown: true,
|
|
661
745
|
});
|
|
@@ -678,8 +762,9 @@ class Order {
|
|
|
678
762
|
* @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
|
|
679
763
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
680
764
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
681
|
-
* @returns {Promise<OrderPlatformModel.
|
|
682
|
-
* Success response
|
|
765
|
+
* @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponseSchema>}
|
|
766
|
+
* - Success response
|
|
767
|
+
*
|
|
683
768
|
* @name downloadLanesReport
|
|
684
769
|
* @summary: Download Lane report
|
|
685
770
|
* @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
|
|
@@ -735,7 +820,7 @@ class Order {
|
|
|
735
820
|
|
|
736
821
|
const {
|
|
737
822
|
error: res_error,
|
|
738
|
-
} = OrderPlatformModel.
|
|
823
|
+
} = OrderPlatformModel.BulkReportsDownloadResponseSchema().validate(
|
|
739
824
|
responseData,
|
|
740
825
|
{ abortEarly: false, allowUnknown: true }
|
|
741
826
|
);
|
|
@@ -758,7 +843,8 @@ class Order {
|
|
|
758
843
|
* @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
|
|
759
844
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
760
845
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
761
|
-
* @returns {Promise<OrderPlatformModel.
|
|
846
|
+
* @returns {Promise<OrderPlatformModel.EInvoiceRetryResponseSchema>} -
|
|
847
|
+
* Success response
|
|
762
848
|
* @name eInvoiceRetry
|
|
763
849
|
* @summary: Retry E-invoice
|
|
764
850
|
* @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
|
|
@@ -812,10 +898,10 @@ class Order {
|
|
|
812
898
|
|
|
813
899
|
const {
|
|
814
900
|
error: res_error,
|
|
815
|
-
} = OrderPlatformModel.
|
|
816
|
-
|
|
817
|
-
allowUnknown: true
|
|
818
|
-
|
|
901
|
+
} = OrderPlatformModel.EInvoiceRetryResponseSchema().validate(
|
|
902
|
+
responseData,
|
|
903
|
+
{ abortEarly: false, allowUnknown: true }
|
|
904
|
+
);
|
|
819
905
|
|
|
820
906
|
if (res_error) {
|
|
821
907
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -910,6 +996,89 @@ class Order {
|
|
|
910
996
|
return response;
|
|
911
997
|
}
|
|
912
998
|
|
|
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
|
+
|
|
913
1082
|
/**
|
|
914
1083
|
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
915
1084
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -994,7 +1163,8 @@ class Order {
|
|
|
994
1163
|
* @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object
|
|
995
1164
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
996
1165
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
997
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1166
|
+
* @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponseSchema>} -
|
|
1167
|
+
* Success response
|
|
998
1168
|
* @name generateInvoiceID
|
|
999
1169
|
* @summary: Generate and attach invoice Id
|
|
1000
1170
|
* @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/).
|
|
@@ -1052,10 +1222,10 @@ class Order {
|
|
|
1052
1222
|
|
|
1053
1223
|
const {
|
|
1054
1224
|
error: res_error,
|
|
1055
|
-
} = OrderPlatformModel.
|
|
1056
|
-
|
|
1057
|
-
allowUnknown: true
|
|
1058
|
-
|
|
1225
|
+
} = OrderPlatformModel.GenerateInvoiceIDResponseSchema().validate(
|
|
1226
|
+
responseData,
|
|
1227
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1228
|
+
);
|
|
1059
1229
|
|
|
1060
1230
|
if (res_error) {
|
|
1061
1231
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1075,8 +1245,9 @@ class Order {
|
|
|
1075
1245
|
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
1076
1246
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1077
1247
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1078
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1079
|
-
* Success response
|
|
1248
|
+
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponseSchema>}
|
|
1249
|
+
* - Success response
|
|
1250
|
+
*
|
|
1080
1251
|
* @name generatePOSReceiptByOrderId
|
|
1081
1252
|
* @summary: Generate POS receipt by order Id
|
|
1082
1253
|
* @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/).
|
|
@@ -1142,7 +1313,7 @@ class Order {
|
|
|
1142
1313
|
|
|
1143
1314
|
const {
|
|
1144
1315
|
error: res_error,
|
|
1145
|
-
} = OrderPlatformModel.
|
|
1316
|
+
} = OrderPlatformModel.GeneratePosOrderReceiptResponseSchema().validate(
|
|
1146
1317
|
responseData,
|
|
1147
1318
|
{ abortEarly: false, allowUnknown: true }
|
|
1148
1319
|
);
|
|
@@ -1165,7 +1336,7 @@ class Order {
|
|
|
1165
1336
|
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
1166
1337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1167
1338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1168
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1339
|
+
* @returns {Promise<OrderPlatformModel.ManifestResponseSchema>} - Success response
|
|
1169
1340
|
* @name generateProcessManifest
|
|
1170
1341
|
* @summary: Process Order Manifest
|
|
1171
1342
|
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
@@ -1221,7 +1392,7 @@ class Order {
|
|
|
1221
1392
|
|
|
1222
1393
|
const {
|
|
1223
1394
|
error: res_error,
|
|
1224
|
-
} = OrderPlatformModel.
|
|
1395
|
+
} = OrderPlatformModel.ManifestResponseSchema().validate(responseData, {
|
|
1225
1396
|
abortEarly: false,
|
|
1226
1397
|
allowUnknown: true,
|
|
1227
1398
|
});
|
|
@@ -1330,7 +1501,8 @@ class Order {
|
|
|
1330
1501
|
* @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
|
|
1331
1502
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1332
1503
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1333
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1504
|
+
* @returns {Promise<OrderPlatformModel.AllowedTemplatesResponseSchema>} -
|
|
1505
|
+
* Success response
|
|
1334
1506
|
* @name getAllowedTemplatesForBulk
|
|
1335
1507
|
* @summary: List bulk operation templates
|
|
1336
1508
|
* @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
|
|
@@ -1384,10 +1556,10 @@ class Order {
|
|
|
1384
1556
|
|
|
1385
1557
|
const {
|
|
1386
1558
|
error: res_error,
|
|
1387
|
-
} = OrderPlatformModel.
|
|
1388
|
-
|
|
1389
|
-
allowUnknown: true
|
|
1390
|
-
|
|
1559
|
+
} = OrderPlatformModel.AllowedTemplatesResponseSchema().validate(
|
|
1560
|
+
responseData,
|
|
1561
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1562
|
+
);
|
|
1391
1563
|
|
|
1392
1564
|
if (res_error) {
|
|
1393
1565
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1407,7 +1579,8 @@ class Order {
|
|
|
1407
1579
|
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1408
1580
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1409
1581
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1410
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1582
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponseSchema>} -
|
|
1583
|
+
* Success response
|
|
1411
1584
|
* @name getAnnouncements
|
|
1412
1585
|
* @summary: List announcements
|
|
1413
1586
|
* @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/).
|
|
@@ -1464,10 +1637,10 @@ class Order {
|
|
|
1464
1637
|
|
|
1465
1638
|
const {
|
|
1466
1639
|
error: res_error,
|
|
1467
|
-
} = OrderPlatformModel.
|
|
1468
|
-
|
|
1469
|
-
allowUnknown: true
|
|
1470
|
-
|
|
1640
|
+
} = OrderPlatformModel.AnnouncementsResponseSchema().validate(
|
|
1641
|
+
responseData,
|
|
1642
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1643
|
+
);
|
|
1471
1644
|
|
|
1472
1645
|
if (res_error) {
|
|
1473
1646
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1487,8 +1660,9 @@ class Order {
|
|
|
1487
1660
|
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1488
1661
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1489
1662
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1490
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1491
|
-
* Success response
|
|
1663
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponseSchema>}
|
|
1664
|
+
* - Success response
|
|
1665
|
+
*
|
|
1492
1666
|
* @name getBagById
|
|
1493
1667
|
* @summary: Get bag
|
|
1494
1668
|
* @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
@@ -1549,10 +1723,10 @@ class Order {
|
|
|
1549
1723
|
|
|
1550
1724
|
const {
|
|
1551
1725
|
error: res_error,
|
|
1552
|
-
} = OrderPlatformModel.
|
|
1553
|
-
|
|
1554
|
-
allowUnknown: true
|
|
1555
|
-
|
|
1726
|
+
} = OrderPlatformModel.BagDetailsPlatformResponseSchema().validate(
|
|
1727
|
+
responseData,
|
|
1728
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1729
|
+
);
|
|
1556
1730
|
|
|
1557
1731
|
if (res_error) {
|
|
1558
1732
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1572,7 +1746,8 @@ class Order {
|
|
|
1572
1746
|
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
1573
1747
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1574
1748
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1575
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1749
|
+
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponseSchema>} -
|
|
1750
|
+
* Success response
|
|
1576
1751
|
* @name getBags
|
|
1577
1752
|
* @summary: List bags
|
|
1578
1753
|
* @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
@@ -1662,10 +1837,10 @@ class Order {
|
|
|
1662
1837
|
|
|
1663
1838
|
const {
|
|
1664
1839
|
error: res_error,
|
|
1665
|
-
} = OrderPlatformModel.
|
|
1666
|
-
|
|
1667
|
-
allowUnknown: true
|
|
1668
|
-
|
|
1840
|
+
} = OrderPlatformModel.GetBagsPlatformResponseSchema().validate(
|
|
1841
|
+
responseData,
|
|
1842
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1843
|
+
);
|
|
1669
1844
|
|
|
1670
1845
|
if (res_error) {
|
|
1671
1846
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1685,8 +1860,9 @@ class Order {
|
|
|
1685
1860
|
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1686
1861
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1687
1862
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1688
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1689
|
-
* Success response
|
|
1863
|
+
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponseSchema>}
|
|
1864
|
+
* - Success response
|
|
1865
|
+
*
|
|
1690
1866
|
* @name getBulkActionTemplate
|
|
1691
1867
|
* @summary: List supported templates
|
|
1692
1868
|
* @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/).
|
|
@@ -1738,10 +1914,10 @@ class Order {
|
|
|
1738
1914
|
|
|
1739
1915
|
const {
|
|
1740
1916
|
error: res_error,
|
|
1741
|
-
} = OrderPlatformModel.
|
|
1742
|
-
|
|
1743
|
-
allowUnknown: true
|
|
1744
|
-
|
|
1917
|
+
} = OrderPlatformModel.BulkActionTemplateResponseSchema().validate(
|
|
1918
|
+
responseData,
|
|
1919
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1920
|
+
);
|
|
1745
1921
|
|
|
1746
1922
|
if (res_error) {
|
|
1747
1923
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1761,7 +1937,7 @@ class Order {
|
|
|
1761
1937
|
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1762
1938
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1763
1939
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1764
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1940
|
+
* @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
|
|
1765
1941
|
* @name getBulkShipmentExcelFile
|
|
1766
1942
|
* @summary: Generate the report
|
|
1767
1943
|
* @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/).
|
|
@@ -1853,7 +2029,82 @@ class Order {
|
|
|
1853
2029
|
const response = await PlatformAPIClient.execute(
|
|
1854
2030
|
this.config,
|
|
1855
2031
|
"get",
|
|
1856
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/generate/file`,
|
|
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 = {};
|
|
2101
|
+
|
|
2102
|
+
const xHeaders = {};
|
|
2103
|
+
|
|
2104
|
+
const response = await PlatformAPIClient.execute(
|
|
2105
|
+
this.config,
|
|
2106
|
+
"get",
|
|
2107
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
1857
2108
|
query_params,
|
|
1858
2109
|
undefined,
|
|
1859
2110
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1867,7 +2118,7 @@ class Order {
|
|
|
1867
2118
|
|
|
1868
2119
|
const {
|
|
1869
2120
|
error: res_error,
|
|
1870
|
-
} = OrderPlatformModel.
|
|
2121
|
+
} = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
|
|
1871
2122
|
abortEarly: false,
|
|
1872
2123
|
allowUnknown: true,
|
|
1873
2124
|
});
|
|
@@ -1878,7 +2129,7 @@ class Order {
|
|
|
1878
2129
|
} else {
|
|
1879
2130
|
Logger({
|
|
1880
2131
|
level: "WARN",
|
|
1881
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2132
|
+
message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
|
|
1882
2133
|
});
|
|
1883
2134
|
}
|
|
1884
2135
|
}
|
|
@@ -1890,7 +2141,7 @@ class Order {
|
|
|
1890
2141
|
* @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
|
|
1891
2142
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1892
2143
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1893
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2144
|
+
* @returns {Promise<OrderPlatformModel.JobFailedResponseSchema>} - Success response
|
|
1894
2145
|
* @name getFileByStatus
|
|
1895
2146
|
* @summary: Download file used for Bulk operation
|
|
1896
2147
|
* @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/).
|
|
@@ -1957,7 +2208,7 @@ class Order {
|
|
|
1957
2208
|
|
|
1958
2209
|
const {
|
|
1959
2210
|
error: res_error,
|
|
1960
|
-
} = OrderPlatformModel.
|
|
2211
|
+
} = OrderPlatformModel.JobFailedResponseSchema().validate(responseData, {
|
|
1961
2212
|
abortEarly: false,
|
|
1962
2213
|
allowUnknown: true,
|
|
1963
2214
|
});
|
|
@@ -1980,7 +2231,7 @@ class Order {
|
|
|
1980
2231
|
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
1981
2232
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1982
2233
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1983
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2234
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponseSchema>} - Success response
|
|
1984
2235
|
* @name getLaneConfig
|
|
1985
2236
|
* @summary: Get lane configuration
|
|
1986
2237
|
* @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
@@ -2110,7 +2361,7 @@ class Order {
|
|
|
2110
2361
|
|
|
2111
2362
|
const {
|
|
2112
2363
|
error: res_error,
|
|
2113
|
-
} = OrderPlatformModel.
|
|
2364
|
+
} = OrderPlatformModel.LaneConfigResponseSchema().validate(responseData, {
|
|
2114
2365
|
abortEarly: false,
|
|
2115
2366
|
allowUnknown: true,
|
|
2116
2367
|
});
|
|
@@ -2139,25 +2390,12 @@ class Order {
|
|
|
2139
2390
|
* @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/).
|
|
2140
2391
|
*/
|
|
2141
2392
|
async getManifestDetails(
|
|
2142
|
-
{
|
|
2143
|
-
manifestId,
|
|
2144
|
-
dpIds,
|
|
2145
|
-
endDate,
|
|
2146
|
-
startDate,
|
|
2147
|
-
pageNo,
|
|
2148
|
-
pageSize,
|
|
2149
|
-
requestHeaders,
|
|
2150
|
-
} = { requestHeaders: {} },
|
|
2393
|
+
{ manifestId, requestHeaders } = { requestHeaders: {} },
|
|
2151
2394
|
{ responseHeaders } = { responseHeaders: false }
|
|
2152
2395
|
) {
|
|
2153
2396
|
const { error } = OrderPlatformValidator.getManifestDetails().validate(
|
|
2154
2397
|
{
|
|
2155
2398
|
manifestId,
|
|
2156
|
-
dpIds,
|
|
2157
|
-
endDate,
|
|
2158
|
-
startDate,
|
|
2159
|
-
pageNo,
|
|
2160
|
-
pageSize,
|
|
2161
2399
|
},
|
|
2162
2400
|
{ abortEarly: false, allowUnknown: true }
|
|
2163
2401
|
);
|
|
@@ -2171,11 +2409,6 @@ class Order {
|
|
|
2171
2409
|
} = OrderPlatformValidator.getManifestDetails().validate(
|
|
2172
2410
|
{
|
|
2173
2411
|
manifestId,
|
|
2174
|
-
dpIds,
|
|
2175
|
-
endDate,
|
|
2176
|
-
startDate,
|
|
2177
|
-
pageNo,
|
|
2178
|
-
pageSize,
|
|
2179
2412
|
},
|
|
2180
2413
|
{ abortEarly: false, allowUnknown: false }
|
|
2181
2414
|
);
|
|
@@ -2187,19 +2420,13 @@ class Order {
|
|
|
2187
2420
|
}
|
|
2188
2421
|
|
|
2189
2422
|
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;
|
|
2196
2423
|
|
|
2197
2424
|
const xHeaders = {};
|
|
2198
2425
|
|
|
2199
2426
|
const response = await PlatformAPIClient.execute(
|
|
2200
2427
|
this.config,
|
|
2201
2428
|
"get",
|
|
2202
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2429
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests/${manifestId}`,
|
|
2203
2430
|
query_params,
|
|
2204
2431
|
undefined,
|
|
2205
2432
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2355,7 +2582,8 @@ class Order {
|
|
|
2355
2582
|
* @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
|
|
2356
2583
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2357
2584
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2358
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2585
|
+
* @returns {Promise<OrderPlatformModel.ManifestFiltersResponseSchema>} -
|
|
2586
|
+
* Success response
|
|
2359
2587
|
* @name getManifestfilters
|
|
2360
2588
|
* @summary: List filters
|
|
2361
2589
|
* @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
|
|
@@ -2412,10 +2640,10 @@ class Order {
|
|
|
2412
2640
|
|
|
2413
2641
|
const {
|
|
2414
2642
|
error: res_error,
|
|
2415
|
-
} = OrderPlatformModel.
|
|
2416
|
-
|
|
2417
|
-
allowUnknown: true
|
|
2418
|
-
|
|
2643
|
+
} = OrderPlatformModel.ManifestFiltersResponseSchema().validate(
|
|
2644
|
+
responseData,
|
|
2645
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2646
|
+
);
|
|
2419
2647
|
|
|
2420
2648
|
if (res_error) {
|
|
2421
2649
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2511,7 +2739,7 @@ class Order {
|
|
|
2511
2739
|
const response = await PlatformAPIClient.execute(
|
|
2512
2740
|
this.config,
|
|
2513
2741
|
"get",
|
|
2514
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2742
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests`,
|
|
2515
2743
|
query_params,
|
|
2516
2744
|
undefined,
|
|
2517
2745
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2548,7 +2776,8 @@ class Order {
|
|
|
2548
2776
|
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
2549
2777
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2550
2778
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2551
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2779
|
+
* @returns {Promise<OrderPlatformModel.OrderDetailsResponseSchema>} -
|
|
2780
|
+
* Success response
|
|
2552
2781
|
* @name getOrderById
|
|
2553
2782
|
* @summary: Get order
|
|
2554
2783
|
* @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
@@ -2611,7 +2840,7 @@ class Order {
|
|
|
2611
2840
|
|
|
2612
2841
|
const {
|
|
2613
2842
|
error: res_error,
|
|
2614
|
-
} = OrderPlatformModel.
|
|
2843
|
+
} = OrderPlatformModel.OrderDetailsResponseSchema().validate(responseData, {
|
|
2615
2844
|
abortEarly: false,
|
|
2616
2845
|
allowUnknown: true,
|
|
2617
2846
|
});
|
|
@@ -2634,7 +2863,8 @@ class Order {
|
|
|
2634
2863
|
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
2635
2864
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2636
2865
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2637
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2866
|
+
* @returns {Promise<OrderPlatformModel.OrderListingResponseSchema>} -
|
|
2867
|
+
* Success response
|
|
2638
2868
|
* @name getOrders
|
|
2639
2869
|
* @summary: List orders
|
|
2640
2870
|
* @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/).
|
|
@@ -2664,6 +2894,7 @@ class Order {
|
|
|
2664
2894
|
customerId,
|
|
2665
2895
|
orderType,
|
|
2666
2896
|
allowInactive,
|
|
2897
|
+
groupEntity,
|
|
2667
2898
|
requestHeaders,
|
|
2668
2899
|
} = { requestHeaders: {} },
|
|
2669
2900
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -2693,6 +2924,7 @@ class Order {
|
|
|
2693
2924
|
customerId,
|
|
2694
2925
|
orderType,
|
|
2695
2926
|
allowInactive,
|
|
2927
|
+
groupEntity,
|
|
2696
2928
|
},
|
|
2697
2929
|
{ abortEarly: false, allowUnknown: true }
|
|
2698
2930
|
);
|
|
@@ -2726,6 +2958,7 @@ class Order {
|
|
|
2726
2958
|
customerId,
|
|
2727
2959
|
orderType,
|
|
2728
2960
|
allowInactive,
|
|
2961
|
+
groupEntity,
|
|
2729
2962
|
},
|
|
2730
2963
|
{ abortEarly: false, allowUnknown: false }
|
|
2731
2964
|
);
|
|
@@ -2760,6 +2993,7 @@ class Order {
|
|
|
2760
2993
|
query_params["customer_id"] = customerId;
|
|
2761
2994
|
query_params["order_type"] = orderType;
|
|
2762
2995
|
query_params["allow_inactive"] = allowInactive;
|
|
2996
|
+
query_params["group_entity"] = groupEntity;
|
|
2763
2997
|
|
|
2764
2998
|
const xHeaders = {};
|
|
2765
2999
|
|
|
@@ -2780,7 +3014,7 @@ class Order {
|
|
|
2780
3014
|
|
|
2781
3015
|
const {
|
|
2782
3016
|
error: res_error,
|
|
2783
|
-
} = OrderPlatformModel.
|
|
3017
|
+
} = OrderPlatformModel.OrderListingResponseSchema().validate(responseData, {
|
|
2784
3018
|
abortEarly: false,
|
|
2785
3019
|
allowUnknown: true,
|
|
2786
3020
|
});
|
|
@@ -2803,7 +3037,7 @@ class Order {
|
|
|
2803
3037
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
2804
3038
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2805
3039
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2806
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3040
|
+
* @returns {Promise<OrderPlatformModel.GetActionsResponseSchema>} - Success response
|
|
2807
3041
|
* @name getRoleBasedActions
|
|
2808
3042
|
* @summary: Get role-based actions
|
|
2809
3043
|
* @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/).
|
|
@@ -2855,7 +3089,7 @@ class Order {
|
|
|
2855
3089
|
|
|
2856
3090
|
const {
|
|
2857
3091
|
error: res_error,
|
|
2858
|
-
} = OrderPlatformModel.
|
|
3092
|
+
} = OrderPlatformModel.GetActionsResponseSchema().validate(responseData, {
|
|
2859
3093
|
abortEarly: false,
|
|
2860
3094
|
allowUnknown: true,
|
|
2861
3095
|
});
|
|
@@ -2878,7 +3112,8 @@ class Order {
|
|
|
2878
3112
|
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
2879
3113
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2880
3114
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2881
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3115
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponseSchema>} -
|
|
3116
|
+
* Success response
|
|
2882
3117
|
* @name getShipmentById
|
|
2883
3118
|
* @summary: Get shipment
|
|
2884
3119
|
* @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
@@ -2950,7 +3185,7 @@ class Order {
|
|
|
2950
3185
|
|
|
2951
3186
|
const {
|
|
2952
3187
|
error: res_error,
|
|
2953
|
-
} = OrderPlatformModel.
|
|
3188
|
+
} = OrderPlatformModel.ShipmentInfoResponseSchema().validate(responseData, {
|
|
2954
3189
|
abortEarly: false,
|
|
2955
3190
|
allowUnknown: true,
|
|
2956
3191
|
});
|
|
@@ -2973,7 +3208,8 @@ class Order {
|
|
|
2973
3208
|
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
2974
3209
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2975
3210
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2976
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3211
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
|
|
3212
|
+
* Success response
|
|
2977
3213
|
* @name getShipmentHistory
|
|
2978
3214
|
* @summary: Get a shipment's history
|
|
2979
3215
|
* @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
@@ -3033,10 +3269,10 @@ class Order {
|
|
|
3033
3269
|
|
|
3034
3270
|
const {
|
|
3035
3271
|
error: res_error,
|
|
3036
|
-
} = OrderPlatformModel.
|
|
3037
|
-
|
|
3038
|
-
allowUnknown: true
|
|
3039
|
-
|
|
3272
|
+
} = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
|
|
3273
|
+
responseData,
|
|
3274
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3275
|
+
);
|
|
3040
3276
|
|
|
3041
3277
|
if (res_error) {
|
|
3042
3278
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3056,8 +3292,9 @@ class Order {
|
|
|
3056
3292
|
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
3057
3293
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3058
3294
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3059
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3060
|
-
* Success response
|
|
3295
|
+
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponseSchema>}
|
|
3296
|
+
* - Success response
|
|
3297
|
+
*
|
|
3061
3298
|
* @name getShipmentReasons
|
|
3062
3299
|
* @summary: List bag cancellation reasons
|
|
3063
3300
|
* @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/).
|
|
@@ -3117,7 +3354,7 @@ class Order {
|
|
|
3117
3354
|
|
|
3118
3355
|
const {
|
|
3119
3356
|
error: res_error,
|
|
3120
|
-
} = OrderPlatformModel.
|
|
3357
|
+
} = OrderPlatformModel.PlatformShipmentReasonsResponseSchema().validate(
|
|
3121
3358
|
responseData,
|
|
3122
3359
|
{ abortEarly: false, allowUnknown: true }
|
|
3123
3360
|
);
|
|
@@ -3140,7 +3377,7 @@ class Order {
|
|
|
3140
3377
|
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
3141
3378
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3142
3379
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3143
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3380
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
|
|
3144
3381
|
* - Success response
|
|
3145
3382
|
*
|
|
3146
3383
|
* @name getShipments
|
|
@@ -3180,6 +3417,7 @@ class Order {
|
|
|
3180
3417
|
tags,
|
|
3181
3418
|
customerId,
|
|
3182
3419
|
orderType,
|
|
3420
|
+
groupEntity,
|
|
3183
3421
|
requestHeaders,
|
|
3184
3422
|
} = { requestHeaders: {} },
|
|
3185
3423
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3217,6 +3455,7 @@ class Order {
|
|
|
3217
3455
|
tags,
|
|
3218
3456
|
customerId,
|
|
3219
3457
|
orderType,
|
|
3458
|
+
groupEntity,
|
|
3220
3459
|
},
|
|
3221
3460
|
{ abortEarly: false, allowUnknown: true }
|
|
3222
3461
|
);
|
|
@@ -3258,6 +3497,7 @@ class Order {
|
|
|
3258
3497
|
tags,
|
|
3259
3498
|
customerId,
|
|
3260
3499
|
orderType,
|
|
3500
|
+
groupEntity,
|
|
3261
3501
|
},
|
|
3262
3502
|
{ abortEarly: false, allowUnknown: false }
|
|
3263
3503
|
);
|
|
@@ -3300,6 +3540,7 @@ class Order {
|
|
|
3300
3540
|
query_params["tags"] = tags;
|
|
3301
3541
|
query_params["customer_id"] = customerId;
|
|
3302
3542
|
query_params["order_type"] = orderType;
|
|
3543
|
+
query_params["group_entity"] = groupEntity;
|
|
3303
3544
|
|
|
3304
3545
|
const xHeaders = {};
|
|
3305
3546
|
|
|
@@ -3320,7 +3561,7 @@ class Order {
|
|
|
3320
3561
|
|
|
3321
3562
|
const {
|
|
3322
3563
|
error: res_error,
|
|
3323
|
-
} = OrderPlatformModel.
|
|
3564
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate(
|
|
3324
3565
|
responseData,
|
|
3325
3566
|
{ abortEarly: false, allowUnknown: true }
|
|
3326
3567
|
);
|
|
@@ -3504,7 +3745,8 @@ class Order {
|
|
|
3504
3745
|
* @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
|
|
3505
3746
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3506
3747
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3507
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3748
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponseSchema>} -
|
|
3749
|
+
* Success response
|
|
3508
3750
|
* @name getTemplate
|
|
3509
3751
|
* @summary: Download bulk operation templates
|
|
3510
3752
|
* @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/).
|
|
@@ -3558,10 +3800,10 @@ class Order {
|
|
|
3558
3800
|
|
|
3559
3801
|
const {
|
|
3560
3802
|
error: res_error,
|
|
3561
|
-
} = OrderPlatformModel.
|
|
3562
|
-
|
|
3563
|
-
allowUnknown: true
|
|
3564
|
-
|
|
3803
|
+
} = OrderPlatformModel.TemplateDownloadResponseSchema().validate(
|
|
3804
|
+
responseData,
|
|
3805
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3806
|
+
);
|
|
3565
3807
|
|
|
3566
3808
|
if (res_error) {
|
|
3567
3809
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3581,7 +3823,7 @@ class Order {
|
|
|
3581
3823
|
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
3582
3824
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3583
3825
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3584
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3826
|
+
* @returns {Promise<OrderPlatformModel.FiltersResponseSchema>} - Success response
|
|
3585
3827
|
* @name getfilters
|
|
3586
3828
|
* @summary: List filters
|
|
3587
3829
|
* @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
@@ -3639,7 +3881,7 @@ class Order {
|
|
|
3639
3881
|
|
|
3640
3882
|
const {
|
|
3641
3883
|
error: res_error,
|
|
3642
|
-
} = OrderPlatformModel.
|
|
3884
|
+
} = OrderPlatformModel.FiltersResponseSchema().validate(responseData, {
|
|
3643
3885
|
abortEarly: false,
|
|
3644
3886
|
allowUnknown: true,
|
|
3645
3887
|
});
|
|
@@ -3662,8 +3904,9 @@ class Order {
|
|
|
3662
3904
|
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
3663
3905
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3664
3906
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3665
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3666
|
-
* Success response
|
|
3907
|
+
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponseSchema>}
|
|
3908
|
+
* - Success response
|
|
3909
|
+
*
|
|
3667
3910
|
* @name invalidateShipmentCache
|
|
3668
3911
|
* @summary: Invalidate shipment cache
|
|
3669
3912
|
* @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/).
|
|
@@ -3719,7 +3962,7 @@ class Order {
|
|
|
3719
3962
|
|
|
3720
3963
|
const {
|
|
3721
3964
|
error: res_error,
|
|
3722
|
-
} = OrderPlatformModel.
|
|
3965
|
+
} = OrderPlatformModel.InvalidateShipmentCacheResponseSchema().validate(
|
|
3723
3966
|
responseData,
|
|
3724
3967
|
{ abortEarly: false, allowUnknown: true }
|
|
3725
3968
|
);
|
|
@@ -3742,7 +3985,7 @@ class Order {
|
|
|
3742
3985
|
* @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
|
|
3743
3986
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3744
3987
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3745
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3988
|
+
* @returns {Promise<OrderPlatformModel.JobDetailsResponseSchema>} - Success response
|
|
3746
3989
|
* @name jobDetails
|
|
3747
3990
|
* @summary: Get bulk operation details
|
|
3748
3991
|
* @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/).
|
|
@@ -3796,7 +4039,7 @@ class Order {
|
|
|
3796
4039
|
|
|
3797
4040
|
const {
|
|
3798
4041
|
error: res_error,
|
|
3799
|
-
} = OrderPlatformModel.
|
|
4042
|
+
} = OrderPlatformModel.JobDetailsResponseSchema().validate(responseData, {
|
|
3800
4043
|
abortEarly: false,
|
|
3801
4044
|
allowUnknown: true,
|
|
3802
4045
|
});
|
|
@@ -3896,7 +4139,8 @@ class Order {
|
|
|
3896
4139
|
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
3897
4140
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3898
4141
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3899
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4142
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
|
|
4143
|
+
* Success response
|
|
3900
4144
|
* @name postShipmentHistory
|
|
3901
4145
|
* @summary: Create shipment history
|
|
3902
4146
|
* @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/).
|
|
@@ -3952,10 +4196,10 @@ class Order {
|
|
|
3952
4196
|
|
|
3953
4197
|
const {
|
|
3954
4198
|
error: res_error,
|
|
3955
|
-
} = OrderPlatformModel.
|
|
3956
|
-
|
|
3957
|
-
allowUnknown: true
|
|
3958
|
-
|
|
4199
|
+
} = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
|
|
4200
|
+
responseData,
|
|
4201
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4202
|
+
);
|
|
3959
4203
|
|
|
3960
4204
|
if (res_error) {
|
|
3961
4205
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3971,11 +4215,93 @@ class Order {
|
|
|
3971
4215
|
return response;
|
|
3972
4216
|
}
|
|
3973
4217
|
|
|
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
|
+
|
|
3974
4299
|
/**
|
|
3975
4300
|
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
3976
4301
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3977
4302
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3978
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4303
|
+
* @returns {Promise<OrderPlatformModel.StoreReassignResponseSchema>} -
|
|
4304
|
+
* Success response
|
|
3979
4305
|
* @name reassignLocation
|
|
3980
4306
|
* @summary: Reassign location
|
|
3981
4307
|
* @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/).
|
|
@@ -4031,10 +4357,10 @@ class Order {
|
|
|
4031
4357
|
|
|
4032
4358
|
const {
|
|
4033
4359
|
error: res_error,
|
|
4034
|
-
} = OrderPlatformModel.
|
|
4035
|
-
|
|
4036
|
-
allowUnknown: true
|
|
4037
|
-
|
|
4360
|
+
} = OrderPlatformModel.StoreReassignResponseSchema().validate(
|
|
4361
|
+
responseData,
|
|
4362
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4363
|
+
);
|
|
4038
4364
|
|
|
4039
4365
|
if (res_error) {
|
|
4040
4366
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4054,7 +4380,7 @@ class Order {
|
|
|
4054
4380
|
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
4055
4381
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4056
4382
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4057
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4383
|
+
* @returns {Promise<OrderPlatformModel.SendSmsResponseSchema>} - Success response
|
|
4058
4384
|
* @name sendSmsNinja
|
|
4059
4385
|
* @summary: Send SMS
|
|
4060
4386
|
* @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/).
|
|
@@ -4108,7 +4434,7 @@ class Order {
|
|
|
4108
4434
|
|
|
4109
4435
|
const {
|
|
4110
4436
|
error: res_error,
|
|
4111
|
-
} = OrderPlatformModel.
|
|
4437
|
+
} = OrderPlatformModel.SendSmsResponseSchema().validate(responseData, {
|
|
4112
4438
|
abortEarly: false,
|
|
4113
4439
|
allowUnknown: true,
|
|
4114
4440
|
});
|
|
@@ -4131,7 +4457,8 @@ class Order {
|
|
|
4131
4457
|
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
4132
4458
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4133
4459
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4134
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4460
|
+
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponseSchema>} -
|
|
4461
|
+
* Success response
|
|
4135
4462
|
* @name sendUserMobileOTP
|
|
4136
4463
|
* @summary: Send user mobile OTP
|
|
4137
4464
|
* @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/).
|
|
@@ -4187,10 +4514,10 @@ class Order {
|
|
|
4187
4514
|
|
|
4188
4515
|
const {
|
|
4189
4516
|
error: res_error,
|
|
4190
|
-
} = OrderPlatformModel.
|
|
4191
|
-
|
|
4192
|
-
allowUnknown: true
|
|
4193
|
-
|
|
4517
|
+
} = OrderPlatformModel.SendUserMobileOtpResponseSchema().validate(
|
|
4518
|
+
responseData,
|
|
4519
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4520
|
+
);
|
|
4194
4521
|
|
|
4195
4522
|
if (res_error) {
|
|
4196
4523
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4210,8 +4537,9 @@ class Order {
|
|
|
4210
4537
|
* @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
|
|
4211
4538
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4212
4539
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4213
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4214
|
-
* Success response
|
|
4540
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponseSchema>}
|
|
4541
|
+
* - Success response
|
|
4542
|
+
*
|
|
4215
4543
|
* @name trackShipment
|
|
4216
4544
|
* @summary: Track shipment
|
|
4217
4545
|
* @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/).
|
|
@@ -4277,7 +4605,7 @@ class Order {
|
|
|
4277
4605
|
|
|
4278
4606
|
const {
|
|
4279
4607
|
error: res_error,
|
|
4280
|
-
} = OrderPlatformModel.
|
|
4608
|
+
} = OrderPlatformModel.CourierPartnerTrackingResponseSchema().validate(
|
|
4281
4609
|
responseData,
|
|
4282
4610
|
{ abortEarly: false, allowUnknown: true }
|
|
4283
4611
|
);
|
|
@@ -4300,44 +4628,19 @@ class Order {
|
|
|
4300
4628
|
* @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
|
|
4301
4629
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4302
4630
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4303
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4631
|
+
* @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
|
|
4304
4632
|
* @name updateAddress
|
|
4305
|
-
* @summary: Update shipment
|
|
4306
|
-
* @description:
|
|
4633
|
+
* @summary: Update the address details of an existing shipment based on the provided address_category. This operation allows the modification of critical shipment details, potentially affecting delivery/billing accuracy and customer communication.
|
|
4634
|
+
* @description: Update the address details of an existing shipment on basis of address_category - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
|
|
4307
4635
|
*/
|
|
4308
4636
|
async updateAddress(
|
|
4309
|
-
{
|
|
4310
|
-
shipmentId,
|
|
4311
|
-
addressCategory,
|
|
4312
|
-
name,
|
|
4313
|
-
address,
|
|
4314
|
-
addressType,
|
|
4315
|
-
pincode,
|
|
4316
|
-
phone,
|
|
4317
|
-
email,
|
|
4318
|
-
landmark,
|
|
4319
|
-
city,
|
|
4320
|
-
state,
|
|
4321
|
-
country,
|
|
4322
|
-
requestHeaders,
|
|
4323
|
-
} = { requestHeaders: {} },
|
|
4637
|
+
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
4324
4638
|
{ responseHeaders } = { responseHeaders: false }
|
|
4325
4639
|
) {
|
|
4326
4640
|
const { error } = OrderPlatformValidator.updateAddress().validate(
|
|
4327
4641
|
{
|
|
4328
4642
|
shipmentId,
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
name,
|
|
4332
|
-
address,
|
|
4333
|
-
addressType,
|
|
4334
|
-
pincode,
|
|
4335
|
-
phone,
|
|
4336
|
-
email,
|
|
4337
|
-
landmark,
|
|
4338
|
-
city,
|
|
4339
|
-
state,
|
|
4340
|
-
country,
|
|
4643
|
+
body,
|
|
4341
4644
|
},
|
|
4342
4645
|
{ abortEarly: false, allowUnknown: true }
|
|
4343
4646
|
);
|
|
@@ -4349,18 +4652,7 @@ class Order {
|
|
|
4349
4652
|
const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
|
|
4350
4653
|
{
|
|
4351
4654
|
shipmentId,
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
name,
|
|
4355
|
-
address,
|
|
4356
|
-
addressType,
|
|
4357
|
-
pincode,
|
|
4358
|
-
phone,
|
|
4359
|
-
email,
|
|
4360
|
-
landmark,
|
|
4361
|
-
city,
|
|
4362
|
-
state,
|
|
4363
|
-
country,
|
|
4655
|
+
body,
|
|
4364
4656
|
},
|
|
4365
4657
|
{ abortEarly: false, allowUnknown: false }
|
|
4366
4658
|
);
|
|
@@ -4372,27 +4664,15 @@ class Order {
|
|
|
4372
4664
|
}
|
|
4373
4665
|
|
|
4374
4666
|
const query_params = {};
|
|
4375
|
-
query_params["shipment_id"] = shipmentId;
|
|
4376
|
-
query_params["name"] = name;
|
|
4377
|
-
query_params["address"] = address;
|
|
4378
|
-
query_params["address_type"] = addressType;
|
|
4379
|
-
query_params["pincode"] = pincode;
|
|
4380
|
-
query_params["phone"] = phone;
|
|
4381
|
-
query_params["email"] = email;
|
|
4382
|
-
query_params["landmark"] = landmark;
|
|
4383
|
-
query_params["address_category"] = addressCategory;
|
|
4384
|
-
query_params["city"] = city;
|
|
4385
|
-
query_params["state"] = state;
|
|
4386
|
-
query_params["country"] = country;
|
|
4387
4667
|
|
|
4388
4668
|
const xHeaders = {};
|
|
4389
4669
|
|
|
4390
4670
|
const response = await PlatformAPIClient.execute(
|
|
4391
4671
|
this.config,
|
|
4392
|
-
"
|
|
4393
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4672
|
+
"put",
|
|
4673
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/address`,
|
|
4394
4674
|
query_params,
|
|
4395
|
-
|
|
4675
|
+
body,
|
|
4396
4676
|
{ ...xHeaders, ...requestHeaders },
|
|
4397
4677
|
{ responseHeaders }
|
|
4398
4678
|
);
|
|
@@ -4404,7 +4684,7 @@ class Order {
|
|
|
4404
4684
|
|
|
4405
4685
|
const {
|
|
4406
4686
|
error: res_error,
|
|
4407
|
-
} = OrderPlatformModel.
|
|
4687
|
+
} = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
|
|
4408
4688
|
abortEarly: false,
|
|
4409
4689
|
allowUnknown: true,
|
|
4410
4690
|
});
|
|
@@ -4427,7 +4707,7 @@ class Order {
|
|
|
4427
4707
|
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
4428
4708
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4429
4709
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4430
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4710
|
+
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponseSchema>}
|
|
4431
4711
|
* - Success response
|
|
4432
4712
|
*
|
|
4433
4713
|
* @name updatePackagingDimensions
|
|
@@ -4487,7 +4767,7 @@ class Order {
|
|
|
4487
4767
|
|
|
4488
4768
|
const {
|
|
4489
4769
|
error: res_error,
|
|
4490
|
-
} = OrderPlatformModel.
|
|
4770
|
+
} = OrderPlatformModel.UpdatePackagingDimensionsResponseSchema().validate(
|
|
4491
4771
|
responseData,
|
|
4492
4772
|
{ abortEarly: false, allowUnknown: true }
|
|
4493
4773
|
);
|
|
@@ -4506,15 +4786,93 @@ class Order {
|
|
|
4506
4786
|
return response;
|
|
4507
4787
|
}
|
|
4508
4788
|
|
|
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
|
+
|
|
4509
4866
|
/**
|
|
4510
4867
|
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
4511
4868
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4512
4869
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4513
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4514
|
-
* Success response
|
|
4870
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponseSchema>}
|
|
4871
|
+
* - Success response
|
|
4872
|
+
*
|
|
4515
4873
|
* @name updateShipmentLock
|
|
4516
4874
|
* @summary: Update a shipment lock
|
|
4517
|
-
* @description: Modify shipment/bag lock
|
|
4875
|
+
* @description: Modify shipment/bag lock and check status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
|
|
4518
4876
|
*/
|
|
4519
4877
|
async updateShipmentLock(
|
|
4520
4878
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4567,10 +4925,10 @@ class Order {
|
|
|
4567
4925
|
|
|
4568
4926
|
const {
|
|
4569
4927
|
error: res_error,
|
|
4570
|
-
} = OrderPlatformModel.
|
|
4571
|
-
|
|
4572
|
-
allowUnknown: true
|
|
4573
|
-
|
|
4928
|
+
} = OrderPlatformModel.UpdateShipmentLockResponseSchema().validate(
|
|
4929
|
+
responseData,
|
|
4930
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4931
|
+
);
|
|
4574
4932
|
|
|
4575
4933
|
if (res_error) {
|
|
4576
4934
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4751,17 +5109,18 @@ class Order {
|
|
|
4751
5109
|
* @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object
|
|
4752
5110
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4753
5111
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4754
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5112
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
|
|
4755
5113
|
* @name uploadConsents
|
|
4756
5114
|
* @summary: Upload consent
|
|
4757
5115
|
* @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/).
|
|
4758
5116
|
*/
|
|
4759
5117
|
async uploadConsents(
|
|
4760
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5118
|
+
{ manifestId, body, requestHeaders } = { requestHeaders: {} },
|
|
4761
5119
|
{ responseHeaders } = { responseHeaders: false }
|
|
4762
5120
|
) {
|
|
4763
5121
|
const { error } = OrderPlatformValidator.uploadConsents().validate(
|
|
4764
5122
|
{
|
|
5123
|
+
manifestId,
|
|
4765
5124
|
body,
|
|
4766
5125
|
},
|
|
4767
5126
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -4775,6 +5134,7 @@ class Order {
|
|
|
4775
5134
|
error: warrning,
|
|
4776
5135
|
} = OrderPlatformValidator.uploadConsents().validate(
|
|
4777
5136
|
{
|
|
5137
|
+
manifestId,
|
|
4778
5138
|
body,
|
|
4779
5139
|
},
|
|
4780
5140
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -4793,7 +5153,7 @@ class Order {
|
|
|
4793
5153
|
const response = await PlatformAPIClient.execute(
|
|
4794
5154
|
this.config,
|
|
4795
5155
|
"post",
|
|
4796
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/
|
|
5156
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/${manifestId}/upload-consent`,
|
|
4797
5157
|
query_params,
|
|
4798
5158
|
body,
|
|
4799
5159
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4807,7 +5167,7 @@ class Order {
|
|
|
4807
5167
|
|
|
4808
5168
|
const {
|
|
4809
5169
|
error: res_error,
|
|
4810
|
-
} = OrderPlatformModel.
|
|
5170
|
+
} = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
4811
5171
|
abortEarly: false,
|
|
4812
5172
|
allowUnknown: true,
|
|
4813
5173
|
});
|
|
@@ -4830,7 +5190,7 @@ class Order {
|
|
|
4830
5190
|
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
4831
5191
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4832
5192
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4833
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5193
|
+
* @returns {Promise<OrderPlatformModel.VerifyOtpResponseSchema>} - Success response
|
|
4834
5194
|
* @name verifyMobileOTP
|
|
4835
5195
|
* @summary: Verify mobile OTP
|
|
4836
5196
|
* @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/).
|
|
@@ -4886,7 +5246,7 @@ class Order {
|
|
|
4886
5246
|
|
|
4887
5247
|
const {
|
|
4888
5248
|
error: res_error,
|
|
4889
|
-
} = OrderPlatformModel.
|
|
5249
|
+
} = OrderPlatformModel.VerifyOtpResponseSchema().validate(responseData, {
|
|
4890
5250
|
abortEarly: false,
|
|
4891
5251
|
allowUnknown: true,
|
|
4892
5252
|
});
|