@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
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 +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- 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 +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- 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 +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- 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/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- 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 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -15,179 +15,24 @@ class Order {
|
|
|
15
15
|
this.applicationId = applicationId;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* @param {OrderPlatformApplicationValidator.CreateRuleParam} arg - Arg object
|
|
20
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
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
|
-
*/
|
|
27
|
-
async createRule(
|
|
28
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
29
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
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
|
|
42
|
-
const {
|
|
43
|
-
error: warrning,
|
|
44
|
-
} = OrderPlatformApplicationValidator.createRule().validate(
|
|
45
|
-
{
|
|
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,
|
|
111
|
-
},
|
|
112
|
-
{ abortEarly: false, allowUnknown: true }
|
|
113
|
-
);
|
|
114
|
-
if (error) {
|
|
115
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Showing warrnings if extra unknown parameters are found
|
|
119
|
-
const {
|
|
120
|
-
error: warrning,
|
|
121
|
-
} = OrderPlatformApplicationValidator.deleteRule().validate(
|
|
122
|
-
{
|
|
123
|
-
ruleId,
|
|
124
|
-
},
|
|
125
|
-
{ abortEarly: false, allowUnknown: false }
|
|
126
|
-
);
|
|
127
|
-
if (warrning) {
|
|
128
|
-
Logger({
|
|
129
|
-
level: "WARN",
|
|
130
|
-
message: `Parameter Validation warrnings for platform > Order > deleteRule \n ${warrning}`,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const query_params = {};
|
|
135
|
-
|
|
136
|
-
const response = await PlatformAPIClient.execute(
|
|
137
|
-
this.config,
|
|
138
|
-
"delete",
|
|
139
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule/${ruleId}`,
|
|
140
|
-
query_params,
|
|
141
|
-
undefined,
|
|
142
|
-
requestHeaders,
|
|
143
|
-
{ responseHeaders }
|
|
144
|
-
);
|
|
145
|
-
|
|
146
|
-
let responseData = response;
|
|
147
|
-
if (responseHeaders) {
|
|
148
|
-
responseData = response[0];
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const {
|
|
152
|
-
error: res_error,
|
|
153
|
-
} = OrderPlatformModel.RuleSuccessResponse().validate(responseData, {
|
|
154
|
-
abortEarly: false,
|
|
155
|
-
allowUnknown: true,
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
if (res_error) {
|
|
159
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
160
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
161
|
-
} else {
|
|
162
|
-
Logger({
|
|
163
|
-
level: "WARN",
|
|
164
|
-
message: `Response Validation Warnings for platform > Order > deleteRule \n ${res_error}`,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return response;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
18
|
/**
|
|
173
19
|
* @param {OrderPlatformApplicationValidator.GetApplicationShipmentsParam} arg
|
|
174
20
|
* - Arg object
|
|
175
21
|
*
|
|
176
22
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
177
23
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
178
|
-
* @returns {Promise<OrderPlatformModel.
|
|
24
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
|
|
179
25
|
* - Success response
|
|
180
26
|
*
|
|
181
27
|
* @name getApplicationShipments
|
|
182
|
-
* @summary:
|
|
183
|
-
* @description: Get
|
|
28
|
+
* @summary: List sales channel shipments
|
|
29
|
+
* @description: Get shipments of a particular sales channel based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getApplicationShipments/).
|
|
184
30
|
*/
|
|
185
31
|
async getApplicationShipments(
|
|
186
32
|
{
|
|
187
33
|
lane,
|
|
188
34
|
searchType,
|
|
189
35
|
searchId,
|
|
190
|
-
searchValue,
|
|
191
36
|
fromDate,
|
|
192
37
|
toDate,
|
|
193
38
|
dpIds,
|
|
@@ -211,7 +56,6 @@ class Order {
|
|
|
211
56
|
lane,
|
|
212
57
|
searchType,
|
|
213
58
|
searchId,
|
|
214
|
-
searchValue,
|
|
215
59
|
fromDate,
|
|
216
60
|
toDate,
|
|
217
61
|
dpIds,
|
|
@@ -239,7 +83,6 @@ class Order {
|
|
|
239
83
|
lane,
|
|
240
84
|
searchType,
|
|
241
85
|
searchId,
|
|
242
|
-
searchValue,
|
|
243
86
|
fromDate,
|
|
244
87
|
toDate,
|
|
245
88
|
dpIds,
|
|
@@ -266,7 +109,6 @@ class Order {
|
|
|
266
109
|
query_params["lane"] = lane;
|
|
267
110
|
query_params["search_type"] = searchType;
|
|
268
111
|
query_params["search_id"] = searchId;
|
|
269
|
-
query_params["search_value"] = searchValue;
|
|
270
112
|
query_params["from_date"] = fromDate;
|
|
271
113
|
query_params["to_date"] = toDate;
|
|
272
114
|
query_params["dp_ids"] = dpIds;
|
|
@@ -283,7 +125,7 @@ class Order {
|
|
|
283
125
|
const response = await PlatformAPIClient.execute(
|
|
284
126
|
this.config,
|
|
285
127
|
"get",
|
|
286
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments
|
|
128
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments/`,
|
|
287
129
|
query_params,
|
|
288
130
|
undefined,
|
|
289
131
|
requestHeaders,
|
|
@@ -297,7 +139,7 @@ class Order {
|
|
|
297
139
|
|
|
298
140
|
const {
|
|
299
141
|
error: res_error,
|
|
300
|
-
} = OrderPlatformModel.
|
|
142
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate(
|
|
301
143
|
responseData,
|
|
302
144
|
{ abortEarly: false, allowUnknown: true }
|
|
303
145
|
);
|
|
@@ -322,10 +164,11 @@ class Order {
|
|
|
322
164
|
*
|
|
323
165
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
324
166
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
325
|
-
* @returns {Promise<OrderPlatformModel.
|
|
167
|
+
* @returns {Promise<OrderPlatformModel.ShipmentReasonsResponseSchema>} -
|
|
168
|
+
* Success response
|
|
326
169
|
* @name getPlatformShipmentReasons
|
|
327
|
-
* @summary:
|
|
328
|
-
* @description:
|
|
170
|
+
* @summary: List shipment cancellation reasons
|
|
171
|
+
* @description: Get reasons to perform full or partial cancellation of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getPlatformShipmentReasons/).
|
|
329
172
|
*/
|
|
330
173
|
async getPlatformShipmentReasons(
|
|
331
174
|
{ action, requestHeaders } = { requestHeaders: {} },
|
|
@@ -378,252 +221,10 @@ class Order {
|
|
|
378
221
|
|
|
379
222
|
const {
|
|
380
223
|
error: res_error,
|
|
381
|
-
} = OrderPlatformModel.
|
|
382
|
-
|
|
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
|
-
},
|
|
420
|
-
{ abortEarly: false, allowUnknown: true }
|
|
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
|
-
});
|
|
470
|
-
|
|
471
|
-
if (res_error) {
|
|
472
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
473
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
474
|
-
} else {
|
|
475
|
-
Logger({
|
|
476
|
-
level: "WARN",
|
|
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
|
-
},
|
|
224
|
+
} = OrderPlatformModel.ShipmentReasonsResponseSchema().validate(
|
|
225
|
+
responseData,
|
|
581
226
|
{ abortEarly: false, allowUnknown: true }
|
|
582
227
|
);
|
|
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
228
|
|
|
628
229
|
if (res_error) {
|
|
629
230
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -631,7 +232,7 @@ class Order {
|
|
|
631
232
|
} else {
|
|
632
233
|
Logger({
|
|
633
234
|
level: "WARN",
|
|
634
|
-
message: `Response Validation Warnings for platform > Order >
|
|
235
|
+
message: `Response Validation Warnings for platform > Order > getPlatformShipmentReasons \n ${res_error}`,
|
|
635
236
|
});
|
|
636
237
|
}
|
|
637
238
|
}
|
|
@@ -640,19 +241,19 @@ class Order {
|
|
|
640
241
|
}
|
|
641
242
|
|
|
642
243
|
/**
|
|
643
|
-
* @param {OrderPlatformApplicationValidator.
|
|
244
|
+
* @param {OrderPlatformApplicationValidator.GetRulesParam} arg - Arg object
|
|
644
245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
645
246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
646
|
-
* @returns {Promise<OrderPlatformModel.
|
|
647
|
-
* @name
|
|
648
|
-
* @summary:
|
|
649
|
-
* @description:
|
|
247
|
+
* @returns {Promise<OrderPlatformModel.RuleListResponseSchema>} - Success response
|
|
248
|
+
* @name getRules
|
|
249
|
+
* @summary: List of RMA rules based on the given input conditions.
|
|
250
|
+
* @description: Retrieves a comprehensive list of RMA (Return Merchandise Authorization) rules associated with a specific company and application. These rules dictate the processes for handling returns, including actions, reasons, quality control (QC) types, and associated questions. The endpoint allows for filtering and pagination based on input conditions, providing a tailored set of rules that match the criteria specified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRules/).
|
|
650
251
|
*/
|
|
651
|
-
async
|
|
252
|
+
async getRules(
|
|
652
253
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
653
254
|
{ responseHeaders } = { responseHeaders: false }
|
|
654
255
|
) {
|
|
655
|
-
const { error } = OrderPlatformApplicationValidator.
|
|
256
|
+
const { error } = OrderPlatformApplicationValidator.getRules().validate(
|
|
656
257
|
{
|
|
657
258
|
body,
|
|
658
259
|
},
|
|
@@ -665,7 +266,7 @@ class Order {
|
|
|
665
266
|
// Showing warrnings if extra unknown parameters are found
|
|
666
267
|
const {
|
|
667
268
|
error: warrning,
|
|
668
|
-
} = OrderPlatformApplicationValidator.
|
|
269
|
+
} = OrderPlatformApplicationValidator.getRules().validate(
|
|
669
270
|
{
|
|
670
271
|
body,
|
|
671
272
|
},
|
|
@@ -674,7 +275,7 @@ class Order {
|
|
|
674
275
|
if (warrning) {
|
|
675
276
|
Logger({
|
|
676
277
|
level: "WARN",
|
|
677
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
278
|
+
message: `Parameter Validation warrnings for platform > Order > getRules \n ${warrning}`,
|
|
678
279
|
});
|
|
679
280
|
}
|
|
680
281
|
|
|
@@ -697,82 +298,7 @@ class Order {
|
|
|
697
298
|
|
|
698
299
|
const {
|
|
699
300
|
error: res_error,
|
|
700
|
-
} = OrderPlatformModel.
|
|
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, {
|
|
301
|
+
} = OrderPlatformModel.RuleListResponseSchema().validate(responseData, {
|
|
776
302
|
abortEarly: false,
|
|
777
303
|
allowUnknown: true,
|
|
778
304
|
});
|
|
@@ -783,7 +309,7 @@ class Order {
|
|
|
783
309
|
} else {
|
|
784
310
|
Logger({
|
|
785
311
|
level: "WARN",
|
|
786
|
-
message: `Response Validation Warnings for platform > Order >
|
|
312
|
+
message: `Response Validation Warnings for platform > Order > getRules \n ${res_error}`,
|
|
787
313
|
});
|
|
788
314
|
}
|
|
789
315
|
}
|
|
@@ -799,11 +325,11 @@ class Order {
|
|
|
799
325
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
800
326
|
* @returns {Promise<OrderPlatformModel.ShipmentBagReasons>} - Success response
|
|
801
327
|
* @name getShipmentBagReasons
|
|
802
|
-
* @summary:
|
|
803
|
-
* @description:
|
|
328
|
+
* @summary: Retrieve Reasons for Cancellation and Return journey
|
|
329
|
+
* @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/).
|
|
804
330
|
*/
|
|
805
331
|
async getShipmentBagReasons(
|
|
806
|
-
{ shipmentId, lineNumber,
|
|
332
|
+
{ shipmentId, lineNumber, requestHeaders } = { requestHeaders: {} },
|
|
807
333
|
{ responseHeaders } = { responseHeaders: false }
|
|
808
334
|
) {
|
|
809
335
|
const {
|
|
@@ -812,7 +338,6 @@ class Order {
|
|
|
812
338
|
{
|
|
813
339
|
shipmentId,
|
|
814
340
|
lineNumber,
|
|
815
|
-
bagId,
|
|
816
341
|
},
|
|
817
342
|
{ abortEarly: false, allowUnknown: true }
|
|
818
343
|
);
|
|
@@ -827,7 +352,6 @@ class Order {
|
|
|
827
352
|
{
|
|
828
353
|
shipmentId,
|
|
829
354
|
lineNumber,
|
|
830
|
-
bagId,
|
|
831
355
|
},
|
|
832
356
|
{ abortEarly: false, allowUnknown: false }
|
|
833
357
|
);
|
|
@@ -839,7 +363,6 @@ class Order {
|
|
|
839
363
|
}
|
|
840
364
|
|
|
841
365
|
const query_params = {};
|
|
842
|
-
query_params["bag_id"] = bagId;
|
|
843
366
|
|
|
844
367
|
const response = await PlatformAPIClient.execute(
|
|
845
368
|
this.config,
|
|
@@ -886,7 +409,7 @@ class Order {
|
|
|
886
409
|
* @returns {Promise<OrderPlatformModel.PlatformShipmentTrack>} - Success response
|
|
887
410
|
* @name trackShipmentPlatform
|
|
888
411
|
* @summary: Track shipment
|
|
889
|
-
* @description: Track
|
|
412
|
+
* @description: Track shipment by shipment Id for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipmentPlatform/).
|
|
890
413
|
*/
|
|
891
414
|
async trackShipmentPlatform(
|
|
892
415
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -957,164 +480,6 @@ class Order {
|
|
|
957
480
|
|
|
958
481
|
return response;
|
|
959
482
|
}
|
|
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
|
-
}
|
|
1118
483
|
}
|
|
1119
484
|
|
|
1120
485
|
module.exports = Order;
|