@gofynd/fdk-client-javascript 1.6.4 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +100 -80
- package/sdk/application/Cart/CartApplicationClient.js +257 -126
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -21
- package/sdk/application/Content/ContentApplicationClient.js +250 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +106 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +326 -208
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +0 -10
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +0 -75
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +1 -54
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +0 -43
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -6
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +251 -172
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +639 -521
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3150 -4468
- package/sdk/platform/Cart/CartPlatformModel.js +2858 -1867
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +976 -380
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6475 -2015
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1083 -162
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +884 -80
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +325 -568
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1162 -1562
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6008 -7688
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9522 -6892
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +234 -227
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +183 -177
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -238
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +876 -588
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +506 -270
- package/sdk/platform/Communication/CommunicationPlatformModel.js +611 -313
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +78 -77
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +97 -91
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1206 -459
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1011 -320
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +255 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1095 -464
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +871 -1315
- package/sdk/platform/Content/ContentPlatformModel.js +940 -599
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +486 -277
- package/sdk/platform/Order/OrderPlatformClient.js +1491 -938
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4560 -8636
- package/sdk/platform/Order/OrderPlatformModel.js +3604 -4056
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3531 -1292
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1504
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2188 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +394 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +342 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +150 -212
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +589 -1238
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3581 -2960
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3730 -1779
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +230 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +164 -287
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +11 -50
- package/sdk/platform/Share/SharePlatformModel.js +5 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +36 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +201 -58
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +28 -17
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +33 -16
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -16,28 +16,98 @@ class Order {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @param {OrderPlatformApplicationValidator.
|
|
19
|
+
* @param {OrderPlatformApplicationValidator.CreateRuleParam} arg - Arg object
|
|
20
20
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
21
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
|
-
* @returns {Promise<OrderPlatformModel.
|
|
23
|
-
* @name
|
|
24
|
-
* @summary:
|
|
25
|
-
* @description:
|
|
22
|
+
* @returns {Promise<OrderPlatformModel.RuleSuccessResponse>} - Success response
|
|
23
|
+
* @name createRule
|
|
24
|
+
* @summary: Create a new rule
|
|
25
|
+
* @description: Create a new rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createRule/).
|
|
26
26
|
*/
|
|
27
|
-
async
|
|
28
|
-
{
|
|
29
|
-
requestHeaders: {},
|
|
30
|
-
},
|
|
27
|
+
async createRule(
|
|
28
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
31
29
|
{ responseHeaders } = { responseHeaders: false }
|
|
32
30
|
) {
|
|
31
|
+
const { error } = OrderPlatformApplicationValidator.createRule().validate(
|
|
32
|
+
{
|
|
33
|
+
body,
|
|
34
|
+
},
|
|
35
|
+
{ abortEarly: false, allowUnknown: true }
|
|
36
|
+
);
|
|
37
|
+
if (error) {
|
|
38
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Showing warrnings if extra unknown parameters are found
|
|
33
42
|
const {
|
|
34
|
-
error,
|
|
35
|
-
} = OrderPlatformApplicationValidator.
|
|
43
|
+
error: warrning,
|
|
44
|
+
} = OrderPlatformApplicationValidator.createRule().validate(
|
|
36
45
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
body,
|
|
47
|
+
},
|
|
48
|
+
{ abortEarly: false, allowUnknown: false }
|
|
49
|
+
);
|
|
50
|
+
if (warrning) {
|
|
51
|
+
Logger({
|
|
52
|
+
level: "WARN",
|
|
53
|
+
message: `Parameter Validation warrnings for platform > Order > createRule \n ${warrning}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const query_params = {};
|
|
58
|
+
|
|
59
|
+
const response = await PlatformAPIClient.execute(
|
|
60
|
+
this.config,
|
|
61
|
+
"post",
|
|
62
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule`,
|
|
63
|
+
query_params,
|
|
64
|
+
body,
|
|
65
|
+
requestHeaders,
|
|
66
|
+
{ responseHeaders }
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
let responseData = response;
|
|
70
|
+
if (responseHeaders) {
|
|
71
|
+
responseData = response[0];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const {
|
|
75
|
+
error: res_error,
|
|
76
|
+
} = OrderPlatformModel.RuleSuccessResponse().validate(responseData, {
|
|
77
|
+
abortEarly: false,
|
|
78
|
+
allowUnknown: true,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
if (res_error) {
|
|
82
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
83
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
84
|
+
} else {
|
|
85
|
+
Logger({
|
|
86
|
+
level: "WARN",
|
|
87
|
+
message: `Response Validation Warnings for platform > Order > createRule \n ${res_error}`,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return response;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @param {OrderPlatformApplicationValidator.DeleteRuleParam} arg - Arg object
|
|
97
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
98
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
99
|
+
* @returns {Promise<OrderPlatformModel.RuleSuccessResponse>} - Success response
|
|
100
|
+
* @name deleteRule
|
|
101
|
+
* @summary: Delete a specific rule by ID
|
|
102
|
+
* @description: Delete a specific rule by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/deleteRule/).
|
|
103
|
+
*/
|
|
104
|
+
async deleteRule(
|
|
105
|
+
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
106
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
107
|
+
) {
|
|
108
|
+
const { error } = OrderPlatformApplicationValidator.deleteRule().validate(
|
|
109
|
+
{
|
|
110
|
+
ruleId,
|
|
41
111
|
},
|
|
42
112
|
{ abortEarly: false, allowUnknown: true }
|
|
43
113
|
);
|
|
@@ -48,33 +118,25 @@ class Order {
|
|
|
48
118
|
// Showing warrnings if extra unknown parameters are found
|
|
49
119
|
const {
|
|
50
120
|
error: warrning,
|
|
51
|
-
} = OrderPlatformApplicationValidator.
|
|
121
|
+
} = OrderPlatformApplicationValidator.deleteRule().validate(
|
|
52
122
|
{
|
|
53
|
-
|
|
54
|
-
pageSize,
|
|
55
|
-
searchType,
|
|
56
|
-
searchValue,
|
|
123
|
+
ruleId,
|
|
57
124
|
},
|
|
58
125
|
{ abortEarly: false, allowUnknown: false }
|
|
59
126
|
);
|
|
60
127
|
if (warrning) {
|
|
61
128
|
Logger({
|
|
62
129
|
level: "WARN",
|
|
63
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
130
|
+
message: `Parameter Validation warrnings for platform > Order > deleteRule \n ${warrning}`,
|
|
64
131
|
});
|
|
65
132
|
}
|
|
66
133
|
|
|
67
134
|
const query_params = {};
|
|
68
|
-
query_params["application_id"] = applicationId;
|
|
69
|
-
query_params["page_no"] = pageNo;
|
|
70
|
-
query_params["page_size"] = pageSize;
|
|
71
|
-
query_params["search_type"] = searchType;
|
|
72
|
-
query_params["search_value"] = searchValue;
|
|
73
135
|
|
|
74
136
|
const response = await PlatformAPIClient.execute(
|
|
75
137
|
this.config,
|
|
76
|
-
"
|
|
77
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
138
|
+
"delete",
|
|
139
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule/${ruleId}`,
|
|
78
140
|
query_params,
|
|
79
141
|
undefined,
|
|
80
142
|
requestHeaders,
|
|
@@ -88,7 +150,7 @@ class Order {
|
|
|
88
150
|
|
|
89
151
|
const {
|
|
90
152
|
error: res_error,
|
|
91
|
-
} = OrderPlatformModel.
|
|
153
|
+
} = OrderPlatformModel.RuleSuccessResponse().validate(responseData, {
|
|
92
154
|
abortEarly: false,
|
|
93
155
|
allowUnknown: true,
|
|
94
156
|
});
|
|
@@ -99,7 +161,7 @@ class Order {
|
|
|
99
161
|
} else {
|
|
100
162
|
Logger({
|
|
101
163
|
level: "WARN",
|
|
102
|
-
message: `Response Validation Warnings for platform > Order >
|
|
164
|
+
message: `Response Validation Warnings for platform > Order > deleteRule \n ${res_error}`,
|
|
103
165
|
});
|
|
104
166
|
}
|
|
105
167
|
}
|
|
@@ -113,18 +175,19 @@ class Order {
|
|
|
113
175
|
*
|
|
114
176
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
115
177
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
116
|
-
* @returns {Promise<OrderPlatformModel.
|
|
178
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
|
|
117
179
|
* - Success response
|
|
118
180
|
*
|
|
119
181
|
* @name getApplicationShipments
|
|
120
|
-
* @summary:
|
|
121
|
-
* @description: Get
|
|
182
|
+
* @summary: Get cross selling platform shipments
|
|
183
|
+
* @description: Get cross selling platform shipments - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getApplicationShipments/).
|
|
122
184
|
*/
|
|
123
185
|
async getApplicationShipments(
|
|
124
186
|
{
|
|
125
187
|
lane,
|
|
126
188
|
searchType,
|
|
127
189
|
searchId,
|
|
190
|
+
searchValue,
|
|
128
191
|
fromDate,
|
|
129
192
|
toDate,
|
|
130
193
|
dpIds,
|
|
@@ -148,6 +211,7 @@ class Order {
|
|
|
148
211
|
lane,
|
|
149
212
|
searchType,
|
|
150
213
|
searchId,
|
|
214
|
+
searchValue,
|
|
151
215
|
fromDate,
|
|
152
216
|
toDate,
|
|
153
217
|
dpIds,
|
|
@@ -175,6 +239,7 @@ class Order {
|
|
|
175
239
|
lane,
|
|
176
240
|
searchType,
|
|
177
241
|
searchId,
|
|
242
|
+
searchValue,
|
|
178
243
|
fromDate,
|
|
179
244
|
toDate,
|
|
180
245
|
dpIds,
|
|
@@ -201,6 +266,7 @@ class Order {
|
|
|
201
266
|
query_params["lane"] = lane;
|
|
202
267
|
query_params["search_type"] = searchType;
|
|
203
268
|
query_params["search_id"] = searchId;
|
|
269
|
+
query_params["search_value"] = searchValue;
|
|
204
270
|
query_params["from_date"] = fromDate;
|
|
205
271
|
query_params["to_date"] = toDate;
|
|
206
272
|
query_params["dp_ids"] = dpIds;
|
|
@@ -217,7 +283,7 @@ class Order {
|
|
|
217
283
|
const response = await PlatformAPIClient.execute(
|
|
218
284
|
this.config,
|
|
219
285
|
"get",
|
|
220
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments
|
|
286
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments`,
|
|
221
287
|
query_params,
|
|
222
288
|
undefined,
|
|
223
289
|
requestHeaders,
|
|
@@ -231,7 +297,7 @@ class Order {
|
|
|
231
297
|
|
|
232
298
|
const {
|
|
233
299
|
error: res_error,
|
|
234
|
-
} = OrderPlatformModel.
|
|
300
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate(
|
|
235
301
|
responseData,
|
|
236
302
|
{ abortEarly: false, allowUnknown: true }
|
|
237
303
|
);
|
|
@@ -256,11 +322,10 @@ class Order {
|
|
|
256
322
|
*
|
|
257
323
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
258
324
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
259
|
-
* @returns {Promise<OrderPlatformModel.
|
|
260
|
-
* Success response
|
|
325
|
+
* @returns {Promise<OrderPlatformModel.ShipmentReasonsResponse>} - Success response
|
|
261
326
|
* @name getPlatformShipmentReasons
|
|
262
|
-
* @summary:
|
|
263
|
-
* @description:
|
|
327
|
+
* @summary: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
328
|
+
* @description: Using action, get reasons behind full or partial cancellation of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getPlatformShipmentReasons/).
|
|
264
329
|
*/
|
|
265
330
|
async getPlatformShipmentReasons(
|
|
266
331
|
{ action, requestHeaders } = { requestHeaders: {} },
|
|
@@ -313,10 +378,95 @@ class Order {
|
|
|
313
378
|
|
|
314
379
|
const {
|
|
315
380
|
error: res_error,
|
|
316
|
-
} = OrderPlatformModel.
|
|
317
|
-
|
|
381
|
+
} = OrderPlatformModel.ShipmentReasonsResponse().validate(responseData, {
|
|
382
|
+
abortEarly: false,
|
|
383
|
+
allowUnknown: true,
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
if (res_error) {
|
|
387
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
388
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
389
|
+
} else {
|
|
390
|
+
Logger({
|
|
391
|
+
level: "WARN",
|
|
392
|
+
message: `Response Validation Warnings for platform > Order > getPlatformShipmentReasons \n ${res_error}`,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return response;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @param {OrderPlatformApplicationValidator.GetQuestionsParam} arg - Arg object
|
|
402
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
403
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
404
|
+
* @returns {Promise<Object>} - Success response
|
|
405
|
+
* @name getQuestions
|
|
406
|
+
* @summary: Get all questions of that cluster
|
|
407
|
+
* @description: Get all questions of that cluster - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getQuestions/).
|
|
408
|
+
*/
|
|
409
|
+
async getQuestions(
|
|
410
|
+
{ pageNo, pageSize, q, isActive, requestHeaders } = { requestHeaders: {} },
|
|
411
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
412
|
+
) {
|
|
413
|
+
const { error } = OrderPlatformApplicationValidator.getQuestions().validate(
|
|
414
|
+
{
|
|
415
|
+
pageNo,
|
|
416
|
+
pageSize,
|
|
417
|
+
q,
|
|
418
|
+
isActive,
|
|
419
|
+
},
|
|
318
420
|
{ abortEarly: false, allowUnknown: true }
|
|
319
421
|
);
|
|
422
|
+
if (error) {
|
|
423
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// Showing warrnings if extra unknown parameters are found
|
|
427
|
+
const {
|
|
428
|
+
error: warrning,
|
|
429
|
+
} = OrderPlatformApplicationValidator.getQuestions().validate(
|
|
430
|
+
{
|
|
431
|
+
pageNo,
|
|
432
|
+
pageSize,
|
|
433
|
+
q,
|
|
434
|
+
isActive,
|
|
435
|
+
},
|
|
436
|
+
{ abortEarly: false, allowUnknown: false }
|
|
437
|
+
);
|
|
438
|
+
if (warrning) {
|
|
439
|
+
Logger({
|
|
440
|
+
level: "WARN",
|
|
441
|
+
message: `Parameter Validation warrnings for platform > Order > getQuestions \n ${warrning}`,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const query_params = {};
|
|
446
|
+
query_params["page_no"] = pageNo;
|
|
447
|
+
query_params["page_size"] = pageSize;
|
|
448
|
+
query_params["q"] = q;
|
|
449
|
+
query_params["is_active"] = isActive;
|
|
450
|
+
|
|
451
|
+
const response = await PlatformAPIClient.execute(
|
|
452
|
+
this.config,
|
|
453
|
+
"get",
|
|
454
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/question`,
|
|
455
|
+
query_params,
|
|
456
|
+
undefined,
|
|
457
|
+
requestHeaders,
|
|
458
|
+
{ responseHeaders }
|
|
459
|
+
);
|
|
460
|
+
|
|
461
|
+
let responseData = response;
|
|
462
|
+
if (responseHeaders) {
|
|
463
|
+
responseData = response[0];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
467
|
+
abortEarly: false,
|
|
468
|
+
allowUnknown: true,
|
|
469
|
+
});
|
|
320
470
|
|
|
321
471
|
if (res_error) {
|
|
322
472
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -324,7 +474,164 @@ class Order {
|
|
|
324
474
|
} else {
|
|
325
475
|
Logger({
|
|
326
476
|
level: "WARN",
|
|
327
|
-
message: `Response Validation Warnings for platform > Order >
|
|
477
|
+
message: `Response Validation Warnings for platform > Order > getQuestions \n ${res_error}`,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
return response;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @param {OrderPlatformApplicationValidator.GetRuleByIdParam} arg - Arg object
|
|
487
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
488
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
489
|
+
* @returns {Promise<OrderPlatformModel.RuleResponse>} - Success response
|
|
490
|
+
* @name getRuleById
|
|
491
|
+
* @summary: Get a specific rule by ID
|
|
492
|
+
* @description: Get a specific rule by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRuleById/).
|
|
493
|
+
*/
|
|
494
|
+
async getRuleById(
|
|
495
|
+
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
496
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
497
|
+
) {
|
|
498
|
+
const { error } = OrderPlatformApplicationValidator.getRuleById().validate(
|
|
499
|
+
{
|
|
500
|
+
ruleId,
|
|
501
|
+
},
|
|
502
|
+
{ abortEarly: false, allowUnknown: true }
|
|
503
|
+
);
|
|
504
|
+
if (error) {
|
|
505
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// Showing warrnings if extra unknown parameters are found
|
|
509
|
+
const {
|
|
510
|
+
error: warrning,
|
|
511
|
+
} = OrderPlatformApplicationValidator.getRuleById().validate(
|
|
512
|
+
{
|
|
513
|
+
ruleId,
|
|
514
|
+
},
|
|
515
|
+
{ abortEarly: false, allowUnknown: false }
|
|
516
|
+
);
|
|
517
|
+
if (warrning) {
|
|
518
|
+
Logger({
|
|
519
|
+
level: "WARN",
|
|
520
|
+
message: `Parameter Validation warrnings for platform > Order > getRuleById \n ${warrning}`,
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const query_params = {};
|
|
525
|
+
|
|
526
|
+
const response = await PlatformAPIClient.execute(
|
|
527
|
+
this.config,
|
|
528
|
+
"get",
|
|
529
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule/${ruleId}`,
|
|
530
|
+
query_params,
|
|
531
|
+
undefined,
|
|
532
|
+
requestHeaders,
|
|
533
|
+
{ responseHeaders }
|
|
534
|
+
);
|
|
535
|
+
|
|
536
|
+
let responseData = response;
|
|
537
|
+
if (responseHeaders) {
|
|
538
|
+
responseData = response[0];
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
const {
|
|
542
|
+
error: res_error,
|
|
543
|
+
} = OrderPlatformModel.RuleResponse().validate(responseData, {
|
|
544
|
+
abortEarly: false,
|
|
545
|
+
allowUnknown: true,
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
if (res_error) {
|
|
549
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
550
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
551
|
+
} else {
|
|
552
|
+
Logger({
|
|
553
|
+
level: "WARN",
|
|
554
|
+
message: `Response Validation Warnings for platform > Order > getRuleById \n ${res_error}`,
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
return response;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* @param {OrderPlatformApplicationValidator.GetRuleLaneConfigParam} arg - Arg object
|
|
564
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
565
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
566
|
+
* @returns {Promise<OrderPlatformModel.RuleLaneConfigResponse>} - Success response
|
|
567
|
+
* @name getRuleLaneConfig
|
|
568
|
+
* @summary: Retrieve rule lane configurations
|
|
569
|
+
* @description: Retrieve rule lane configurations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRuleLaneConfig/).
|
|
570
|
+
*/
|
|
571
|
+
async getRuleLaneConfig(
|
|
572
|
+
{ searchValue, requestHeaders } = { requestHeaders: {} },
|
|
573
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
574
|
+
) {
|
|
575
|
+
const {
|
|
576
|
+
error,
|
|
577
|
+
} = OrderPlatformApplicationValidator.getRuleLaneConfig().validate(
|
|
578
|
+
{
|
|
579
|
+
searchValue,
|
|
580
|
+
},
|
|
581
|
+
{ abortEarly: false, allowUnknown: true }
|
|
582
|
+
);
|
|
583
|
+
if (error) {
|
|
584
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// Showing warrnings if extra unknown parameters are found
|
|
588
|
+
const {
|
|
589
|
+
error: warrning,
|
|
590
|
+
} = OrderPlatformApplicationValidator.getRuleLaneConfig().validate(
|
|
591
|
+
{
|
|
592
|
+
searchValue,
|
|
593
|
+
},
|
|
594
|
+
{ abortEarly: false, allowUnknown: false }
|
|
595
|
+
);
|
|
596
|
+
if (warrning) {
|
|
597
|
+
Logger({
|
|
598
|
+
level: "WARN",
|
|
599
|
+
message: `Parameter Validation warrnings for platform > Order > getRuleLaneConfig \n ${warrning}`,
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
const query_params = {};
|
|
604
|
+
query_params["search_value"] = searchValue;
|
|
605
|
+
|
|
606
|
+
const response = await PlatformAPIClient.execute(
|
|
607
|
+
this.config,
|
|
608
|
+
"get",
|
|
609
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule-lane-config`,
|
|
610
|
+
query_params,
|
|
611
|
+
undefined,
|
|
612
|
+
requestHeaders,
|
|
613
|
+
{ responseHeaders }
|
|
614
|
+
);
|
|
615
|
+
|
|
616
|
+
let responseData = response;
|
|
617
|
+
if (responseHeaders) {
|
|
618
|
+
responseData = response[0];
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
const {
|
|
622
|
+
error: res_error,
|
|
623
|
+
} = OrderPlatformModel.RuleLaneConfigResponse().validate(responseData, {
|
|
624
|
+
abortEarly: false,
|
|
625
|
+
allowUnknown: true,
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
if (res_error) {
|
|
629
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
630
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
631
|
+
} else {
|
|
632
|
+
Logger({
|
|
633
|
+
level: "WARN",
|
|
634
|
+
message: `Response Validation Warnings for platform > Order > getRuleLaneConfig \n ${res_error}`,
|
|
328
635
|
});
|
|
329
636
|
}
|
|
330
637
|
}
|
|
@@ -333,19 +640,19 @@ class Order {
|
|
|
333
640
|
}
|
|
334
641
|
|
|
335
642
|
/**
|
|
336
|
-
* @param {OrderPlatformApplicationValidator.
|
|
643
|
+
* @param {OrderPlatformApplicationValidator.GetRuleListParam} arg - Arg object
|
|
337
644
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
338
645
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
339
|
-
* @returns {Promise<OrderPlatformModel.
|
|
340
|
-
* @name
|
|
341
|
-
* @summary:
|
|
342
|
-
* @description:
|
|
646
|
+
* @returns {Promise<OrderPlatformModel.RuleListResponse>} - Success response
|
|
647
|
+
* @name getRuleList
|
|
648
|
+
* @summary: Get a list of rules
|
|
649
|
+
* @description: Get a list of rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRuleList/).
|
|
343
650
|
*/
|
|
344
|
-
async
|
|
651
|
+
async getRuleList(
|
|
345
652
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
346
653
|
{ responseHeaders } = { responseHeaders: false }
|
|
347
654
|
) {
|
|
348
|
-
const { error } = OrderPlatformApplicationValidator.
|
|
655
|
+
const { error } = OrderPlatformApplicationValidator.getRuleList().validate(
|
|
349
656
|
{
|
|
350
657
|
body,
|
|
351
658
|
},
|
|
@@ -358,7 +665,7 @@ class Order {
|
|
|
358
665
|
// Showing warrnings if extra unknown parameters are found
|
|
359
666
|
const {
|
|
360
667
|
error: warrning,
|
|
361
|
-
} = OrderPlatformApplicationValidator.
|
|
668
|
+
} = OrderPlatformApplicationValidator.getRuleList().validate(
|
|
362
669
|
{
|
|
363
670
|
body,
|
|
364
671
|
},
|
|
@@ -367,7 +674,7 @@ class Order {
|
|
|
367
674
|
if (warrning) {
|
|
368
675
|
Logger({
|
|
369
676
|
level: "WARN",
|
|
370
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
677
|
+
message: `Parameter Validation warrnings for platform > Order > getRuleList \n ${warrning}`,
|
|
371
678
|
});
|
|
372
679
|
}
|
|
373
680
|
|
|
@@ -390,7 +697,82 @@ class Order {
|
|
|
390
697
|
|
|
391
698
|
const {
|
|
392
699
|
error: res_error,
|
|
393
|
-
} = OrderPlatformModel.
|
|
700
|
+
} = OrderPlatformModel.RuleListResponse().validate(responseData, {
|
|
701
|
+
abortEarly: false,
|
|
702
|
+
allowUnknown: true,
|
|
703
|
+
});
|
|
704
|
+
|
|
705
|
+
if (res_error) {
|
|
706
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
707
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
708
|
+
} else {
|
|
709
|
+
Logger({
|
|
710
|
+
level: "WARN",
|
|
711
|
+
message: `Response Validation Warnings for platform > Order > getRuleList \n ${res_error}`,
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
return response;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* @param {OrderPlatformApplicationValidator.GetRuleParametersParam} arg - Arg object
|
|
721
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
722
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
723
|
+
* @returns {Promise<OrderPlatformModel.RuleParametersResponse>} - Success response
|
|
724
|
+
* @name getRuleParameters
|
|
725
|
+
* @summary: Get available rule parameters
|
|
726
|
+
* @description: Get available rule parameters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRuleParameters/).
|
|
727
|
+
*/
|
|
728
|
+
async getRuleParameters(
|
|
729
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
730
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
731
|
+
) {
|
|
732
|
+
const {
|
|
733
|
+
error,
|
|
734
|
+
} = OrderPlatformApplicationValidator.getRuleParameters().validate(
|
|
735
|
+
{},
|
|
736
|
+
{ abortEarly: false, allowUnknown: true }
|
|
737
|
+
);
|
|
738
|
+
if (error) {
|
|
739
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Showing warrnings if extra unknown parameters are found
|
|
743
|
+
const {
|
|
744
|
+
error: warrning,
|
|
745
|
+
} = OrderPlatformApplicationValidator.getRuleParameters().validate(
|
|
746
|
+
{},
|
|
747
|
+
{ abortEarly: false, allowUnknown: false }
|
|
748
|
+
);
|
|
749
|
+
if (warrning) {
|
|
750
|
+
Logger({
|
|
751
|
+
level: "WARN",
|
|
752
|
+
message: `Parameter Validation warrnings for platform > Order > getRuleParameters \n ${warrning}`,
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
const query_params = {};
|
|
757
|
+
|
|
758
|
+
const response = await PlatformAPIClient.execute(
|
|
759
|
+
this.config,
|
|
760
|
+
"get",
|
|
761
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule-parameters`,
|
|
762
|
+
query_params,
|
|
763
|
+
undefined,
|
|
764
|
+
requestHeaders,
|
|
765
|
+
{ responseHeaders }
|
|
766
|
+
);
|
|
767
|
+
|
|
768
|
+
let responseData = response;
|
|
769
|
+
if (responseHeaders) {
|
|
770
|
+
responseData = response[0];
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
const {
|
|
774
|
+
error: res_error,
|
|
775
|
+
} = OrderPlatformModel.RuleParametersResponse().validate(responseData, {
|
|
394
776
|
abortEarly: false,
|
|
395
777
|
allowUnknown: true,
|
|
396
778
|
});
|
|
@@ -401,7 +783,7 @@ class Order {
|
|
|
401
783
|
} else {
|
|
402
784
|
Logger({
|
|
403
785
|
level: "WARN",
|
|
404
|
-
message: `Response Validation Warnings for platform > Order >
|
|
786
|
+
message: `Response Validation Warnings for platform > Order > getRuleParameters \n ${res_error}`,
|
|
405
787
|
});
|
|
406
788
|
}
|
|
407
789
|
}
|
|
@@ -417,11 +799,11 @@ class Order {
|
|
|
417
799
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
418
800
|
* @returns {Promise<OrderPlatformModel.ShipmentBagReasons>} - Success response
|
|
419
801
|
* @name getShipmentBagReasons
|
|
420
|
-
* @summary:
|
|
421
|
-
* @description:
|
|
802
|
+
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
803
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/).
|
|
422
804
|
*/
|
|
423
805
|
async getShipmentBagReasons(
|
|
424
|
-
{ shipmentId, lineNumber, requestHeaders } = { requestHeaders: {} },
|
|
806
|
+
{ shipmentId, lineNumber, bagId, requestHeaders } = { requestHeaders: {} },
|
|
425
807
|
{ responseHeaders } = { responseHeaders: false }
|
|
426
808
|
) {
|
|
427
809
|
const {
|
|
@@ -430,6 +812,7 @@ class Order {
|
|
|
430
812
|
{
|
|
431
813
|
shipmentId,
|
|
432
814
|
lineNumber,
|
|
815
|
+
bagId,
|
|
433
816
|
},
|
|
434
817
|
{ abortEarly: false, allowUnknown: true }
|
|
435
818
|
);
|
|
@@ -444,6 +827,7 @@ class Order {
|
|
|
444
827
|
{
|
|
445
828
|
shipmentId,
|
|
446
829
|
lineNumber,
|
|
830
|
+
bagId,
|
|
447
831
|
},
|
|
448
832
|
{ abortEarly: false, allowUnknown: false }
|
|
449
833
|
);
|
|
@@ -455,6 +839,7 @@ class Order {
|
|
|
455
839
|
}
|
|
456
840
|
|
|
457
841
|
const query_params = {};
|
|
842
|
+
query_params["bag_id"] = bagId;
|
|
458
843
|
|
|
459
844
|
const response = await PlatformAPIClient.execute(
|
|
460
845
|
this.config,
|
|
@@ -501,7 +886,7 @@ class Order {
|
|
|
501
886
|
* @returns {Promise<OrderPlatformModel.PlatformShipmentTrack>} - Success response
|
|
502
887
|
* @name trackShipmentPlatform
|
|
503
888
|
* @summary: Track shipment
|
|
504
|
-
* @description: Track
|
|
889
|
+
* @description: Track Shipment by shipment id, for application based on application Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipmentPlatform/).
|
|
505
890
|
*/
|
|
506
891
|
async trackShipmentPlatform(
|
|
507
892
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -572,6 +957,164 @@ class Order {
|
|
|
572
957
|
|
|
573
958
|
return response;
|
|
574
959
|
}
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* @param {OrderPlatformApplicationValidator.UpdateRuleParam} arg - Arg object
|
|
963
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
964
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
965
|
+
* @returns {Promise<OrderPlatformModel.RuleSuccessResponse>} - Success response
|
|
966
|
+
* @name updateRule
|
|
967
|
+
* @summary: Update a specific rule by ID
|
|
968
|
+
* @description: Update a specific rule by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateRule/).
|
|
969
|
+
*/
|
|
970
|
+
async updateRule(
|
|
971
|
+
{ ruleId, body, requestHeaders } = { requestHeaders: {} },
|
|
972
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
973
|
+
) {
|
|
974
|
+
const { error } = OrderPlatformApplicationValidator.updateRule().validate(
|
|
975
|
+
{
|
|
976
|
+
ruleId,
|
|
977
|
+
body,
|
|
978
|
+
},
|
|
979
|
+
{ abortEarly: false, allowUnknown: true }
|
|
980
|
+
);
|
|
981
|
+
if (error) {
|
|
982
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
// Showing warrnings if extra unknown parameters are found
|
|
986
|
+
const {
|
|
987
|
+
error: warrning,
|
|
988
|
+
} = OrderPlatformApplicationValidator.updateRule().validate(
|
|
989
|
+
{
|
|
990
|
+
ruleId,
|
|
991
|
+
body,
|
|
992
|
+
},
|
|
993
|
+
{ abortEarly: false, allowUnknown: false }
|
|
994
|
+
);
|
|
995
|
+
if (warrning) {
|
|
996
|
+
Logger({
|
|
997
|
+
level: "WARN",
|
|
998
|
+
message: `Parameter Validation warrnings for platform > Order > updateRule \n ${warrning}`,
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
const query_params = {};
|
|
1003
|
+
|
|
1004
|
+
const response = await PlatformAPIClient.execute(
|
|
1005
|
+
this.config,
|
|
1006
|
+
"put",
|
|
1007
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule/${ruleId}`,
|
|
1008
|
+
query_params,
|
|
1009
|
+
body,
|
|
1010
|
+
requestHeaders,
|
|
1011
|
+
{ responseHeaders }
|
|
1012
|
+
);
|
|
1013
|
+
|
|
1014
|
+
let responseData = response;
|
|
1015
|
+
if (responseHeaders) {
|
|
1016
|
+
responseData = response[0];
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
const {
|
|
1020
|
+
error: res_error,
|
|
1021
|
+
} = OrderPlatformModel.RuleSuccessResponse().validate(responseData, {
|
|
1022
|
+
abortEarly: false,
|
|
1023
|
+
allowUnknown: true,
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
if (res_error) {
|
|
1027
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1028
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1029
|
+
} else {
|
|
1030
|
+
Logger({
|
|
1031
|
+
level: "WARN",
|
|
1032
|
+
message: `Response Validation Warnings for platform > Order > updateRule \n ${res_error}`,
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
return response;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* @param {OrderPlatformApplicationValidator.UpdateRulePositionParam} arg - Arg object
|
|
1042
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1043
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1044
|
+
* @returns {Promise<OrderPlatformModel.RuleListResponse>} - Success response
|
|
1045
|
+
* @name updateRulePosition
|
|
1046
|
+
* @summary: Update the position of a rule
|
|
1047
|
+
* @description: Update the position of a rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateRulePosition/).
|
|
1048
|
+
*/
|
|
1049
|
+
async updateRulePosition(
|
|
1050
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1051
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1052
|
+
) {
|
|
1053
|
+
const {
|
|
1054
|
+
error,
|
|
1055
|
+
} = OrderPlatformApplicationValidator.updateRulePosition().validate(
|
|
1056
|
+
{
|
|
1057
|
+
body,
|
|
1058
|
+
},
|
|
1059
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1060
|
+
);
|
|
1061
|
+
if (error) {
|
|
1062
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1066
|
+
const {
|
|
1067
|
+
error: warrning,
|
|
1068
|
+
} = OrderPlatformApplicationValidator.updateRulePosition().validate(
|
|
1069
|
+
{
|
|
1070
|
+
body,
|
|
1071
|
+
},
|
|
1072
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1073
|
+
);
|
|
1074
|
+
if (warrning) {
|
|
1075
|
+
Logger({
|
|
1076
|
+
level: "WARN",
|
|
1077
|
+
message: `Parameter Validation warrnings for platform > Order > updateRulePosition \n ${warrning}`,
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
const query_params = {};
|
|
1082
|
+
|
|
1083
|
+
const response = await PlatformAPIClient.execute(
|
|
1084
|
+
this.config,
|
|
1085
|
+
"post",
|
|
1086
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule-position`,
|
|
1087
|
+
query_params,
|
|
1088
|
+
body,
|
|
1089
|
+
requestHeaders,
|
|
1090
|
+
{ responseHeaders }
|
|
1091
|
+
);
|
|
1092
|
+
|
|
1093
|
+
let responseData = response;
|
|
1094
|
+
if (responseHeaders) {
|
|
1095
|
+
responseData = response[0];
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
const {
|
|
1099
|
+
error: res_error,
|
|
1100
|
+
} = OrderPlatformModel.RuleListResponse().validate(responseData, {
|
|
1101
|
+
abortEarly: false,
|
|
1102
|
+
allowUnknown: true,
|
|
1103
|
+
});
|
|
1104
|
+
|
|
1105
|
+
if (res_error) {
|
|
1106
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1107
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1108
|
+
} else {
|
|
1109
|
+
Logger({
|
|
1110
|
+
level: "WARN",
|
|
1111
|
+
message: `Response Validation Warnings for platform > Order > updateRulePosition \n ${res_error}`,
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
return response;
|
|
1117
|
+
}
|
|
575
1118
|
}
|
|
576
1119
|
|
|
577
1120
|
module.exports = Order;
|