@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +75 -90
- package/sdk/application/Cart/CartApplicationClient.js +108 -1199
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +81 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +41 -1344
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +2 -92
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
- package/sdk/application/Content/ContentApplicationClient.d.ts +48 -111
- package/sdk/application/Content/ContentApplicationClient.js +43 -1065
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -13
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -138
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +105 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +5 -217
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +42 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +91 -493
- package/sdk/application/Order/OrderApplicationClient.d.ts +36 -46
- package/sdk/application/Order/OrderApplicationClient.js +52 -507
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +103 -213
- package/sdk/application/Payment/PaymentApplicationClient.js +84 -2105
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -29
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -312
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +7 -309
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -176
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +44 -1820
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -52
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +157 -30
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1177 -56
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1662 -249
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +774 -162
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +141 -12
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5060 -1300
- package/sdk/platform/Cart/CartPlatformModel.js +1985 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +178 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +468 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6554 -1772
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3264 -1690
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +116 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +85 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +122 -191
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +447 -831
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +174 -220
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +164 -199
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1233 -476
- package/sdk/platform/Content/ContentPlatformModel.js +514 -487
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +424 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7747 -1342
- package/sdk/platform/Order/OrderPlatformModel.js +3960 -1262
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +292 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +145 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +132 -44
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +681 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2458 -650
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1266 -572
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +176 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -7
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +795 -7
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Partner/PartnerPublicClient.js +4 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +12 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
- package/sdk/application/Cart/CartApplicationModel.js +0 -2497
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
- package/sdk/application/Cart/CartApplicationValidator.js +0 -530
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
- package/sdk/application/Content/ContentApplicationModel.js +0 -1589
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
- package/sdk/application/Content/ContentApplicationValidator.js +0 -264
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
- package/sdk/application/Order/OrderApplicationModel.js +0 -1471
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
- package/sdk/application/Order/OrderApplicationValidator.js +0 -197
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
2
|
const constructUrl = require("../constructUrl");
|
|
7
3
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const OrderApplicationValidator = require("./OrderApplicationValidator");
|
|
9
|
-
const OrderApplicationModel = require("./OrderApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
12
4
|
|
|
13
5
|
class Order {
|
|
14
6
|
constructor(_conf) {
|
|
@@ -20,6 +12,8 @@ class Order {
|
|
|
20
12
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
|
|
21
13
|
getOrderById: "/service/application/order/v1.0/orders/{order_id}",
|
|
22
14
|
getOrders: "/service/application/order/v1.0/orders",
|
|
15
|
+
getPosOrderById:
|
|
16
|
+
"/service/application/order/v1.0/orders/pos-order/{order_id}",
|
|
23
17
|
getShipmentBagReasons:
|
|
24
18
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",
|
|
25
19
|
getShipmentById:
|
|
@@ -52,13 +46,9 @@ class Order {
|
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
/**
|
|
55
|
-
* @param {OrderApplicationValidator.GetCustomerDetailsByShipmentIdParam} arg
|
|
56
|
-
* - Arg object.
|
|
57
|
-
*
|
|
58
49
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
59
50
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
60
|
-
* @returns {Promise<
|
|
61
|
-
* Success response
|
|
51
|
+
* @returns {Promise<CustomerDetailsResponseSchema>} - Success response
|
|
62
52
|
* @name getCustomerDetailsByShipmentId
|
|
63
53
|
* @summary: Get shipment's customer
|
|
64
54
|
* @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
@@ -67,30 +57,6 @@ class Order {
|
|
|
67
57
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
68
58
|
{ responseHeaders } = { responseHeaders: false }
|
|
69
59
|
) {
|
|
70
|
-
const {
|
|
71
|
-
error,
|
|
72
|
-
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
73
|
-
{ orderId, shipmentId },
|
|
74
|
-
{ abortEarly: false, allowUnknown: true }
|
|
75
|
-
);
|
|
76
|
-
if (error) {
|
|
77
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Showing warrnings if extra unknown parameters are found
|
|
81
|
-
const {
|
|
82
|
-
error: warrning,
|
|
83
|
-
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
84
|
-
{ orderId, shipmentId },
|
|
85
|
-
{ abortEarly: false, allowUnknown: false }
|
|
86
|
-
);
|
|
87
|
-
if (warrning) {
|
|
88
|
-
Logger({
|
|
89
|
-
level: "WARN",
|
|
90
|
-
message: `Parameter Validation warrnings for application > Order > getCustomerDetailsByShipmentId \n ${warrning}`,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
60
|
const query_params = {};
|
|
95
61
|
|
|
96
62
|
const xHeaders = {};
|
|
@@ -113,33 +79,13 @@ class Order {
|
|
|
113
79
|
responseData = response[0];
|
|
114
80
|
}
|
|
115
81
|
|
|
116
|
-
const {
|
|
117
|
-
error: res_error,
|
|
118
|
-
} = OrderApplicationModel.CustomerDetailsResponse().validate(responseData, {
|
|
119
|
-
abortEarly: false,
|
|
120
|
-
allowUnknown: true,
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
if (res_error) {
|
|
124
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
125
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
126
|
-
} else {
|
|
127
|
-
Logger({
|
|
128
|
-
level: "WARN",
|
|
129
|
-
message: `Response Validation Warnings for application > Order > getCustomerDetailsByShipmentId \n ${res_error}`,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
82
|
return response;
|
|
135
83
|
}
|
|
136
84
|
|
|
137
85
|
/**
|
|
138
|
-
* @param {OrderApplicationValidator.GetInvoiceByShipmentIdParam} arg - Arg object.
|
|
139
86
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
140
87
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
141
|
-
* @returns {Promise<
|
|
142
|
-
* Success response
|
|
88
|
+
* @returns {Promise<ResponseGetInvoiceShipment>} - Success response
|
|
143
89
|
* @name getInvoiceByShipmentId
|
|
144
90
|
* @summary: Retrieves invoice for shipment
|
|
145
91
|
* @description: Get invoice corresponding to a specific shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
|
|
@@ -148,30 +94,6 @@ class Order {
|
|
|
148
94
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
149
95
|
{ responseHeaders } = { responseHeaders: false }
|
|
150
96
|
) {
|
|
151
|
-
const {
|
|
152
|
-
error,
|
|
153
|
-
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
154
|
-
{ shipmentId },
|
|
155
|
-
{ abortEarly: false, allowUnknown: true }
|
|
156
|
-
);
|
|
157
|
-
if (error) {
|
|
158
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Showing warrnings if extra unknown parameters are found
|
|
162
|
-
const {
|
|
163
|
-
error: warrning,
|
|
164
|
-
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
165
|
-
{ shipmentId },
|
|
166
|
-
{ abortEarly: false, allowUnknown: false }
|
|
167
|
-
);
|
|
168
|
-
if (warrning) {
|
|
169
|
-
Logger({
|
|
170
|
-
level: "WARN",
|
|
171
|
-
message: `Parameter Validation warrnings for application > Order > getInvoiceByShipmentId \n ${warrning}`,
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
97
|
const query_params = {};
|
|
176
98
|
|
|
177
99
|
const xHeaders = {};
|
|
@@ -194,32 +116,13 @@ class Order {
|
|
|
194
116
|
responseData = response[0];
|
|
195
117
|
}
|
|
196
118
|
|
|
197
|
-
const {
|
|
198
|
-
error: res_error,
|
|
199
|
-
} = OrderApplicationModel.ResponseGetInvoiceShipment().validate(
|
|
200
|
-
responseData,
|
|
201
|
-
{ abortEarly: false, allowUnknown: true }
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
if (res_error) {
|
|
205
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
206
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
207
|
-
} else {
|
|
208
|
-
Logger({
|
|
209
|
-
level: "WARN",
|
|
210
|
-
message: `Response Validation Warnings for application > Order > getInvoiceByShipmentId \n ${res_error}`,
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
119
|
return response;
|
|
216
120
|
}
|
|
217
121
|
|
|
218
122
|
/**
|
|
219
|
-
* @param {OrderApplicationValidator.GetOrderByIdParam} arg - Arg object.
|
|
220
123
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
221
124
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
222
|
-
* @returns {Promise<
|
|
125
|
+
* @returns {Promise<OrderById>} - Success response
|
|
223
126
|
* @name getOrderById
|
|
224
127
|
* @summary: Get an order
|
|
225
128
|
* @description: Get order details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
@@ -228,28 +131,6 @@ class Order {
|
|
|
228
131
|
{ orderId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
229
132
|
{ responseHeaders } = { responseHeaders: false }
|
|
230
133
|
) {
|
|
231
|
-
const { error } = OrderApplicationValidator.getOrderById().validate(
|
|
232
|
-
{ orderId, allowInactive },
|
|
233
|
-
{ abortEarly: false, allowUnknown: true }
|
|
234
|
-
);
|
|
235
|
-
if (error) {
|
|
236
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// Showing warrnings if extra unknown parameters are found
|
|
240
|
-
const {
|
|
241
|
-
error: warrning,
|
|
242
|
-
} = OrderApplicationValidator.getOrderById().validate(
|
|
243
|
-
{ orderId, allowInactive },
|
|
244
|
-
{ abortEarly: false, allowUnknown: false }
|
|
245
|
-
);
|
|
246
|
-
if (warrning) {
|
|
247
|
-
Logger({
|
|
248
|
-
level: "WARN",
|
|
249
|
-
message: `Parameter Validation warrnings for application > Order > getOrderById \n ${warrning}`,
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
134
|
const query_params = {};
|
|
254
135
|
query_params["allow_inactive"] = allowInactive;
|
|
255
136
|
|
|
@@ -273,32 +154,13 @@ class Order {
|
|
|
273
154
|
responseData = response[0];
|
|
274
155
|
}
|
|
275
156
|
|
|
276
|
-
const {
|
|
277
|
-
error: res_error,
|
|
278
|
-
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
279
|
-
abortEarly: false,
|
|
280
|
-
allowUnknown: true,
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
if (res_error) {
|
|
284
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
285
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
286
|
-
} else {
|
|
287
|
-
Logger({
|
|
288
|
-
level: "WARN",
|
|
289
|
-
message: `Response Validation Warnings for application > Order > getOrderById \n ${res_error}`,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
157
|
return response;
|
|
295
158
|
}
|
|
296
159
|
|
|
297
160
|
/**
|
|
298
|
-
* @param {OrderApplicationValidator.GetOrdersParam} arg - Arg object.
|
|
299
161
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
300
162
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
301
|
-
* @returns {Promise<
|
|
163
|
+
* @returns {Promise<OrderList>} - Success response
|
|
302
164
|
* @name getOrders
|
|
303
165
|
* @summary: List customer orders
|
|
304
166
|
* @description: Get all orders associated with a customer account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/).
|
|
@@ -318,46 +180,6 @@ class Order {
|
|
|
318
180
|
} = { requestHeaders: {} },
|
|
319
181
|
{ responseHeaders } = { responseHeaders: false }
|
|
320
182
|
) {
|
|
321
|
-
const { error } = OrderApplicationValidator.getOrders().validate(
|
|
322
|
-
{
|
|
323
|
-
status,
|
|
324
|
-
pageNo,
|
|
325
|
-
pageSize,
|
|
326
|
-
fromDate,
|
|
327
|
-
toDate,
|
|
328
|
-
startDate,
|
|
329
|
-
endDate,
|
|
330
|
-
customMeta,
|
|
331
|
-
allowInactive,
|
|
332
|
-
},
|
|
333
|
-
{ abortEarly: false, allowUnknown: true }
|
|
334
|
-
);
|
|
335
|
-
if (error) {
|
|
336
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Showing warrnings if extra unknown parameters are found
|
|
340
|
-
const { error: warrning } = OrderApplicationValidator.getOrders().validate(
|
|
341
|
-
{
|
|
342
|
-
status,
|
|
343
|
-
pageNo,
|
|
344
|
-
pageSize,
|
|
345
|
-
fromDate,
|
|
346
|
-
toDate,
|
|
347
|
-
startDate,
|
|
348
|
-
endDate,
|
|
349
|
-
customMeta,
|
|
350
|
-
allowInactive,
|
|
351
|
-
},
|
|
352
|
-
{ abortEarly: false, allowUnknown: false }
|
|
353
|
-
);
|
|
354
|
-
if (warrning) {
|
|
355
|
-
Logger({
|
|
356
|
-
level: "WARN",
|
|
357
|
-
message: `Parameter Validation warrnings for application > Order > getOrders \n ${warrning}`,
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
|
|
361
183
|
const query_params = {};
|
|
362
184
|
query_params["status"] = status;
|
|
363
185
|
query_params["page_no"] = pageNo;
|
|
@@ -389,64 +211,58 @@ class Order {
|
|
|
389
211
|
responseData = response[0];
|
|
390
212
|
}
|
|
391
213
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
214
|
+
return response;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
219
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
220
|
+
* @returns {Promise<OrderById>} - Success response
|
|
221
|
+
* @name getPosOrderById
|
|
222
|
+
* @summary: Retrieves POS order details
|
|
223
|
+
* @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/).
|
|
224
|
+
*/
|
|
225
|
+
async getPosOrderById(
|
|
226
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
227
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
228
|
+
) {
|
|
229
|
+
const query_params = {};
|
|
230
|
+
|
|
231
|
+
const xHeaders = {};
|
|
232
|
+
|
|
233
|
+
const response = await ApplicationAPIClient.execute(
|
|
234
|
+
this._conf,
|
|
235
|
+
"get",
|
|
236
|
+
constructUrl({
|
|
237
|
+
url: this._urls["getPosOrderById"],
|
|
238
|
+
params: { orderId },
|
|
239
|
+
}),
|
|
240
|
+
query_params,
|
|
241
|
+
undefined,
|
|
242
|
+
{ ...xHeaders, ...requestHeaders },
|
|
243
|
+
{ responseHeaders }
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
let responseData = response;
|
|
247
|
+
if (responseHeaders) {
|
|
248
|
+
responseData = response[0];
|
|
408
249
|
}
|
|
409
250
|
|
|
410
251
|
return response;
|
|
411
252
|
}
|
|
412
253
|
|
|
413
254
|
/**
|
|
414
|
-
* @param {OrderApplicationValidator.GetShipmentBagReasonsParam} arg - Arg object.
|
|
415
255
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
416
256
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
417
|
-
* @returns {Promise<
|
|
257
|
+
* @returns {Promise<ShipmentBagReasons>} - Success response
|
|
418
258
|
* @name getShipmentBagReasons
|
|
419
|
-
* @summary:
|
|
420
|
-
* @description:
|
|
259
|
+
* @summary: Retrieve Reasons for Cancellation and Return journey
|
|
260
|
+
* @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/application/order/getShipmentBagReasons/).
|
|
421
261
|
*/
|
|
422
262
|
async getShipmentBagReasons(
|
|
423
263
|
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
424
264
|
{ responseHeaders } = { responseHeaders: false }
|
|
425
265
|
) {
|
|
426
|
-
const {
|
|
427
|
-
error,
|
|
428
|
-
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
429
|
-
{ shipmentId, bagId },
|
|
430
|
-
{ abortEarly: false, allowUnknown: true }
|
|
431
|
-
);
|
|
432
|
-
if (error) {
|
|
433
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
// Showing warrnings if extra unknown parameters are found
|
|
437
|
-
const {
|
|
438
|
-
error: warrning,
|
|
439
|
-
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
440
|
-
{ shipmentId, bagId },
|
|
441
|
-
{ abortEarly: false, allowUnknown: false }
|
|
442
|
-
);
|
|
443
|
-
if (warrning) {
|
|
444
|
-
Logger({
|
|
445
|
-
level: "WARN",
|
|
446
|
-
message: `Parameter Validation warrnings for application > Order > getShipmentBagReasons \n ${warrning}`,
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
|
|
450
266
|
const query_params = {};
|
|
451
267
|
|
|
452
268
|
const xHeaders = {};
|
|
@@ -469,32 +285,13 @@ class Order {
|
|
|
469
285
|
responseData = response[0];
|
|
470
286
|
}
|
|
471
287
|
|
|
472
|
-
const {
|
|
473
|
-
error: res_error,
|
|
474
|
-
} = OrderApplicationModel.ShipmentBagReasons().validate(responseData, {
|
|
475
|
-
abortEarly: false,
|
|
476
|
-
allowUnknown: true,
|
|
477
|
-
});
|
|
478
|
-
|
|
479
|
-
if (res_error) {
|
|
480
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
481
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
482
|
-
} else {
|
|
483
|
-
Logger({
|
|
484
|
-
level: "WARN",
|
|
485
|
-
message: `Response Validation Warnings for application > Order > getShipmentBagReasons \n ${res_error}`,
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
288
|
return response;
|
|
491
289
|
}
|
|
492
290
|
|
|
493
291
|
/**
|
|
494
|
-
* @param {OrderApplicationValidator.GetShipmentByIdParam} arg - Arg object.
|
|
495
292
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
496
293
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
497
|
-
* @returns {Promise<
|
|
294
|
+
* @returns {Promise<ShipmentById>} - Success response
|
|
498
295
|
* @name getShipmentById
|
|
499
296
|
* @summary: Get a Shipment
|
|
500
297
|
* @description: Get shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/).
|
|
@@ -503,28 +300,6 @@ class Order {
|
|
|
503
300
|
{ shipmentId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
504
301
|
{ responseHeaders } = { responseHeaders: false }
|
|
505
302
|
) {
|
|
506
|
-
const { error } = OrderApplicationValidator.getShipmentById().validate(
|
|
507
|
-
{ shipmentId, allowInactive },
|
|
508
|
-
{ abortEarly: false, allowUnknown: true }
|
|
509
|
-
);
|
|
510
|
-
if (error) {
|
|
511
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// Showing warrnings if extra unknown parameters are found
|
|
515
|
-
const {
|
|
516
|
-
error: warrning,
|
|
517
|
-
} = OrderApplicationValidator.getShipmentById().validate(
|
|
518
|
-
{ shipmentId, allowInactive },
|
|
519
|
-
{ abortEarly: false, allowUnknown: false }
|
|
520
|
-
);
|
|
521
|
-
if (warrning) {
|
|
522
|
-
Logger({
|
|
523
|
-
level: "WARN",
|
|
524
|
-
message: `Parameter Validation warrnings for application > Order > getShipmentById \n ${warrning}`,
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
|
|
528
303
|
const query_params = {};
|
|
529
304
|
query_params["allow_inactive"] = allowInactive;
|
|
530
305
|
|
|
@@ -548,32 +323,13 @@ class Order {
|
|
|
548
323
|
responseData = response[0];
|
|
549
324
|
}
|
|
550
325
|
|
|
551
|
-
const {
|
|
552
|
-
error: res_error,
|
|
553
|
-
} = OrderApplicationModel.ShipmentById().validate(responseData, {
|
|
554
|
-
abortEarly: false,
|
|
555
|
-
allowUnknown: true,
|
|
556
|
-
});
|
|
557
|
-
|
|
558
|
-
if (res_error) {
|
|
559
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
560
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
561
|
-
} else {
|
|
562
|
-
Logger({
|
|
563
|
-
level: "WARN",
|
|
564
|
-
message: `Response Validation Warnings for application > Order > getShipmentById \n ${res_error}`,
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
326
|
return response;
|
|
570
327
|
}
|
|
571
328
|
|
|
572
329
|
/**
|
|
573
|
-
* @param {OrderApplicationValidator.GetShipmentReasonsParam} arg - Arg object.
|
|
574
330
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
575
331
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
576
|
-
* @returns {Promise<
|
|
332
|
+
* @returns {Promise<ShipmentReasons>} - Success response
|
|
577
333
|
* @name getShipmentReasons
|
|
578
334
|
* @summary: List shipment cancellation reasons
|
|
579
335
|
* @description: Get reasons to perform full or partial cancellation of a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
|
|
@@ -582,28 +338,6 @@ class Order {
|
|
|
582
338
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
583
339
|
{ responseHeaders } = { responseHeaders: false }
|
|
584
340
|
) {
|
|
585
|
-
const { error } = OrderApplicationValidator.getShipmentReasons().validate(
|
|
586
|
-
{ shipmentId },
|
|
587
|
-
{ abortEarly: false, allowUnknown: true }
|
|
588
|
-
);
|
|
589
|
-
if (error) {
|
|
590
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
// Showing warrnings if extra unknown parameters are found
|
|
594
|
-
const {
|
|
595
|
-
error: warrning,
|
|
596
|
-
} = OrderApplicationValidator.getShipmentReasons().validate(
|
|
597
|
-
{ shipmentId },
|
|
598
|
-
{ abortEarly: false, allowUnknown: false }
|
|
599
|
-
);
|
|
600
|
-
if (warrning) {
|
|
601
|
-
Logger({
|
|
602
|
-
level: "WARN",
|
|
603
|
-
message: `Parameter Validation warrnings for application > Order > getShipmentReasons \n ${warrning}`,
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
|
|
607
341
|
const query_params = {};
|
|
608
342
|
|
|
609
343
|
const xHeaders = {};
|
|
@@ -626,33 +360,13 @@ class Order {
|
|
|
626
360
|
responseData = response[0];
|
|
627
361
|
}
|
|
628
362
|
|
|
629
|
-
const {
|
|
630
|
-
error: res_error,
|
|
631
|
-
} = OrderApplicationModel.ShipmentReasons().validate(responseData, {
|
|
632
|
-
abortEarly: false,
|
|
633
|
-
allowUnknown: true,
|
|
634
|
-
});
|
|
635
|
-
|
|
636
|
-
if (res_error) {
|
|
637
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
638
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
639
|
-
} else {
|
|
640
|
-
Logger({
|
|
641
|
-
level: "WARN",
|
|
642
|
-
message: `Response Validation Warnings for application > Order > getShipmentReasons \n ${res_error}`,
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
|
|
647
363
|
return response;
|
|
648
364
|
}
|
|
649
365
|
|
|
650
366
|
/**
|
|
651
|
-
* @param {OrderApplicationValidator.SendOtpToShipmentCustomerParam} arg - Arg object.
|
|
652
367
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
653
368
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
654
|
-
* @returns {Promise<
|
|
655
|
-
* Success response
|
|
369
|
+
* @returns {Promise<SendOtpToCustomerResponseSchema>} - Success response
|
|
656
370
|
* @name sendOtpToShipmentCustomer
|
|
657
371
|
* @summary: Send OTP to customer
|
|
658
372
|
* @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
@@ -661,30 +375,6 @@ class Order {
|
|
|
661
375
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
662
376
|
{ responseHeaders } = { responseHeaders: false }
|
|
663
377
|
) {
|
|
664
|
-
const {
|
|
665
|
-
error,
|
|
666
|
-
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
667
|
-
{ orderId, shipmentId },
|
|
668
|
-
{ abortEarly: false, allowUnknown: true }
|
|
669
|
-
);
|
|
670
|
-
if (error) {
|
|
671
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
// Showing warrnings if extra unknown parameters are found
|
|
675
|
-
const {
|
|
676
|
-
error: warrning,
|
|
677
|
-
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
678
|
-
{ orderId, shipmentId },
|
|
679
|
-
{ abortEarly: false, allowUnknown: false }
|
|
680
|
-
);
|
|
681
|
-
if (warrning) {
|
|
682
|
-
Logger({
|
|
683
|
-
level: "WARN",
|
|
684
|
-
message: `Parameter Validation warrnings for application > Order > sendOtpToShipmentCustomer \n ${warrning}`,
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
|
|
688
378
|
const query_params = {};
|
|
689
379
|
|
|
690
380
|
const xHeaders = {};
|
|
@@ -707,32 +397,13 @@ class Order {
|
|
|
707
397
|
responseData = response[0];
|
|
708
398
|
}
|
|
709
399
|
|
|
710
|
-
const {
|
|
711
|
-
error: res_error,
|
|
712
|
-
} = OrderApplicationModel.SendOtpToCustomerResponse().validate(
|
|
713
|
-
responseData,
|
|
714
|
-
{ abortEarly: false, allowUnknown: true }
|
|
715
|
-
);
|
|
716
|
-
|
|
717
|
-
if (res_error) {
|
|
718
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
719
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
720
|
-
} else {
|
|
721
|
-
Logger({
|
|
722
|
-
level: "WARN",
|
|
723
|
-
message: `Response Validation Warnings for application > Order > sendOtpToShipmentCustomer \n ${res_error}`,
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
|
|
728
400
|
return response;
|
|
729
401
|
}
|
|
730
402
|
|
|
731
403
|
/**
|
|
732
|
-
* @param {OrderApplicationValidator.TrackShipmentParam} arg - Arg object.
|
|
733
404
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
734
405
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
735
|
-
* @returns {Promise<
|
|
406
|
+
* @returns {Promise<ShipmentTrack>} - Success response
|
|
736
407
|
* @name trackShipment
|
|
737
408
|
* @summary: Track shipment status
|
|
738
409
|
* @description: Track Shipment by shipment id, for application based on application Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/trackShipment/).
|
|
@@ -741,28 +412,6 @@ class Order {
|
|
|
741
412
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
742
413
|
{ responseHeaders } = { responseHeaders: false }
|
|
743
414
|
) {
|
|
744
|
-
const { error } = OrderApplicationValidator.trackShipment().validate(
|
|
745
|
-
{ shipmentId },
|
|
746
|
-
{ abortEarly: false, allowUnknown: true }
|
|
747
|
-
);
|
|
748
|
-
if (error) {
|
|
749
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
// Showing warrnings if extra unknown parameters are found
|
|
753
|
-
const {
|
|
754
|
-
error: warrning,
|
|
755
|
-
} = OrderApplicationValidator.trackShipment().validate(
|
|
756
|
-
{ shipmentId },
|
|
757
|
-
{ abortEarly: false, allowUnknown: false }
|
|
758
|
-
);
|
|
759
|
-
if (warrning) {
|
|
760
|
-
Logger({
|
|
761
|
-
level: "WARN",
|
|
762
|
-
message: `Parameter Validation warrnings for application > Order > trackShipment \n ${warrning}`,
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
|
|
766
415
|
const query_params = {};
|
|
767
416
|
|
|
768
417
|
const xHeaders = {};
|
|
@@ -785,64 +434,21 @@ class Order {
|
|
|
785
434
|
responseData = response[0];
|
|
786
435
|
}
|
|
787
436
|
|
|
788
|
-
const {
|
|
789
|
-
error: res_error,
|
|
790
|
-
} = OrderApplicationModel.ShipmentTrack().validate(responseData, {
|
|
791
|
-
abortEarly: false,
|
|
792
|
-
allowUnknown: true,
|
|
793
|
-
});
|
|
794
|
-
|
|
795
|
-
if (res_error) {
|
|
796
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
797
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
798
|
-
} else {
|
|
799
|
-
Logger({
|
|
800
|
-
level: "WARN",
|
|
801
|
-
message: `Response Validation Warnings for application > Order > trackShipment \n ${res_error}`,
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
|
|
806
437
|
return response;
|
|
807
438
|
}
|
|
808
439
|
|
|
809
440
|
/**
|
|
810
|
-
* @param {OrderApplicationValidator.UpdateShipmentStatusParam} arg - Arg object.
|
|
811
441
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
812
442
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
813
|
-
* @returns {Promise<
|
|
814
|
-
* - Success response
|
|
815
|
-
*
|
|
443
|
+
* @returns {Promise<ShipmentApplicationStatusResponseSchema>} - Success response
|
|
816
444
|
* @name updateShipmentStatus
|
|
817
445
|
* @summary: Updates shipment status
|
|
818
|
-
* @description:
|
|
446
|
+
* @description: This operation allows for updating the status and properties of a shipment. For example, it allows users to initiate a return by providing reasons and uploading quality check images. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
819
447
|
*/
|
|
820
448
|
async updateShipmentStatus(
|
|
821
449
|
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
822
450
|
{ responseHeaders } = { responseHeaders: false }
|
|
823
451
|
) {
|
|
824
|
-
const { error } = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
825
|
-
{ shipmentId, body },
|
|
826
|
-
{ abortEarly: false, allowUnknown: true }
|
|
827
|
-
);
|
|
828
|
-
if (error) {
|
|
829
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
// Showing warrnings if extra unknown parameters are found
|
|
833
|
-
const {
|
|
834
|
-
error: warrning,
|
|
835
|
-
} = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
836
|
-
{ shipmentId, body },
|
|
837
|
-
{ abortEarly: false, allowUnknown: false }
|
|
838
|
-
);
|
|
839
|
-
if (warrning) {
|
|
840
|
-
Logger({
|
|
841
|
-
level: "WARN",
|
|
842
|
-
message: `Parameter Validation warrnings for application > Order > updateShipmentStatus \n ${warrning}`,
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
|
|
846
452
|
const query_params = {};
|
|
847
453
|
|
|
848
454
|
const xHeaders = {};
|
|
@@ -865,64 +471,21 @@ class Order {
|
|
|
865
471
|
responseData = response[0];
|
|
866
472
|
}
|
|
867
473
|
|
|
868
|
-
const {
|
|
869
|
-
error: res_error,
|
|
870
|
-
} = OrderApplicationModel.ShipmentApplicationStatusResponse().validate(
|
|
871
|
-
responseData,
|
|
872
|
-
{ abortEarly: false, allowUnknown: true }
|
|
873
|
-
);
|
|
874
|
-
|
|
875
|
-
if (res_error) {
|
|
876
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
877
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
878
|
-
} else {
|
|
879
|
-
Logger({
|
|
880
|
-
level: "WARN",
|
|
881
|
-
message: `Response Validation Warnings for application > Order > updateShipmentStatus \n ${res_error}`,
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
|
|
886
474
|
return response;
|
|
887
475
|
}
|
|
888
476
|
|
|
889
477
|
/**
|
|
890
|
-
* @param {OrderApplicationValidator.VerifyOtpShipmentCustomerParam} arg - Arg object.
|
|
891
478
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
892
479
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
893
|
-
* @returns {Promise<
|
|
480
|
+
* @returns {Promise<VerifyOtpResponseSchema>} - Success response
|
|
894
481
|
* @name verifyOtpShipmentCustomer
|
|
895
482
|
* @summary: Verifies OTP
|
|
896
|
-
* @description: Verify OTP
|
|
483
|
+
* @description: Verify OTP for getting shipment details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
897
484
|
*/
|
|
898
485
|
async verifyOtpShipmentCustomer(
|
|
899
486
|
{ orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
900
487
|
{ responseHeaders } = { responseHeaders: false }
|
|
901
488
|
) {
|
|
902
|
-
const {
|
|
903
|
-
error,
|
|
904
|
-
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
905
|
-
{ orderId, shipmentId, body },
|
|
906
|
-
{ abortEarly: false, allowUnknown: true }
|
|
907
|
-
);
|
|
908
|
-
if (error) {
|
|
909
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
// Showing warrnings if extra unknown parameters are found
|
|
913
|
-
const {
|
|
914
|
-
error: warrning,
|
|
915
|
-
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
916
|
-
{ orderId, shipmentId, body },
|
|
917
|
-
{ abortEarly: false, allowUnknown: false }
|
|
918
|
-
);
|
|
919
|
-
if (warrning) {
|
|
920
|
-
Logger({
|
|
921
|
-
level: "WARN",
|
|
922
|
-
message: `Parameter Validation warrnings for application > Order > verifyOtpShipmentCustomer \n ${warrning}`,
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
|
|
926
489
|
const query_params = {};
|
|
927
490
|
|
|
928
491
|
const xHeaders = {};
|
|
@@ -945,24 +508,6 @@ class Order {
|
|
|
945
508
|
responseData = response[0];
|
|
946
509
|
}
|
|
947
510
|
|
|
948
|
-
const {
|
|
949
|
-
error: res_error,
|
|
950
|
-
} = OrderApplicationModel.VerifyOtpResponse().validate(responseData, {
|
|
951
|
-
abortEarly: false,
|
|
952
|
-
allowUnknown: true,
|
|
953
|
-
});
|
|
954
|
-
|
|
955
|
-
if (res_error) {
|
|
956
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
957
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
958
|
-
} else {
|
|
959
|
-
Logger({
|
|
960
|
-
level: "WARN",
|
|
961
|
-
message: `Response Validation Warnings for application > Order > verifyOtpShipmentCustomer \n ${res_error}`,
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
|
|
966
511
|
return response;
|
|
967
512
|
}
|
|
968
513
|
}
|