@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.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 +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +93 -113
- package/sdk/application/Cart/CartApplicationClient.js +157 -530
- 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 +65 -55
- package/sdk/application/Content/ContentApplicationClient.js +211 -341
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
- 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 +32 -87
- package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
- 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 +18 -62
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
- 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 +15 -406
- package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
- package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
- package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
- package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
- 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 +236 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
- 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 +314 -422
- package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
- 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 -68
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
- 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 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
- 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 +565 -1282
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
- 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 -246
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
- 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 +2374 -877
- package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
- 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 +421 -418
- package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
- package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
- package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
- 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 +934 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -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 +1327 -3529
- package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
- 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 -513
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
- 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 -4
- package/sdk/platform/Share/SharePlatformModel.js +45 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
- 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 -2
- package/sdk/public/PublicClient.js +2 -2
- 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 -1
- package/sdk/public/index.js +1 -1
- 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
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Cart {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -23,18 +24,14 @@ class Cart {
|
|
|
23
24
|
getBulkDiscountOffers: "/service/application/cart/v1.0/bulk-price",
|
|
24
25
|
getCart: "/service/application/cart/v1.0/detail",
|
|
25
26
|
getCartLastModified: "/service/application/cart/v1.0/detail",
|
|
26
|
-
getCartMetaConfig:
|
|
27
|
-
"/service/application/cart/v1.0/cart/configuration/{cart_meta_id}",
|
|
28
|
-
getCartMetaConfigs: "/service/application/cart/v1.0/cart/configuration",
|
|
29
27
|
getCartShareLink: "/service/application/cart/v1.0/share-cart",
|
|
30
28
|
getCartSharedItems: "/service/application/cart/v1.0/share-cart/{token}",
|
|
31
29
|
getCoupons: "/service/application/cart/v1.0/coupon",
|
|
32
30
|
getItemCount: "/service/application/cart/v1.0/basic",
|
|
33
|
-
getItemCountV2: "/service/application/cart/v2.0/basic",
|
|
34
31
|
getLadderOffers: "/service/application/cart/v1.0/available-ladder-prices",
|
|
35
|
-
getPaymentPromotionOffers:
|
|
36
|
-
"/service/application/cart/v1.0/available-payment-offers",
|
|
37
32
|
getPromotionOffers: "/service/application/cart/v1.0/available-promotions",
|
|
33
|
+
getPromotionPaymentOffers:
|
|
34
|
+
"/service/application/cart/v1.0/available-payment-offers",
|
|
38
35
|
getShipments: "/service/application/cart/v1.0/shipment",
|
|
39
36
|
removeAddress: "/service/application/cart/v1.0/address/{id}",
|
|
40
37
|
removeCoupon: "/service/application/cart/v1.0/coupon",
|
|
@@ -42,6 +39,7 @@ class Cart {
|
|
|
42
39
|
selectPaymentMode: "/service/application/cart/v1.0/payment",
|
|
43
40
|
updateAddress: "/service/application/cart/v1.0/address/{id}",
|
|
44
41
|
updateCart: "/service/application/cart/v1.0/detail",
|
|
42
|
+
updateCartBreakup: "/service/application/cart/v1.0/detail",
|
|
45
43
|
updateCartMeta: "/service/application/cart/v1.0/meta",
|
|
46
44
|
updateCartWithSharedItems:
|
|
47
45
|
"/service/application/cart/v1.0/share-cart/{token}/{action}",
|
|
@@ -67,23 +65,15 @@ class Cart {
|
|
|
67
65
|
/**
|
|
68
66
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
69
67
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
70
|
-
* @returns {Promise<
|
|
68
|
+
* @returns {Promise<SaveAddressResult>} - Success response
|
|
71
69
|
* @name addAddress
|
|
72
|
-
* @summary:
|
|
70
|
+
* @summary: Creates a new address for a customer
|
|
73
71
|
* @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
|
|
74
72
|
*/
|
|
75
73
|
async addAddress(
|
|
76
74
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
77
75
|
{ responseHeaders } = { responseHeaders: false }
|
|
78
76
|
) {
|
|
79
|
-
let invalidInput = [];
|
|
80
|
-
if (invalidInput.length) {
|
|
81
|
-
const error = new Error();
|
|
82
|
-
error.message = "Missing required field";
|
|
83
|
-
error.details = invalidInput;
|
|
84
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
77
|
const query_params = {};
|
|
88
78
|
|
|
89
79
|
const xHeaders = {};
|
|
@@ -112,40 +102,23 @@ class Cart {
|
|
|
112
102
|
/**
|
|
113
103
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
114
104
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
115
|
-
* @returns {Promise<
|
|
105
|
+
* @returns {Promise<AddCartDetailResult>} - Success response
|
|
116
106
|
* @name addItems
|
|
117
107
|
* @summary: Add items to a cart
|
|
118
108
|
* @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addItems/).
|
|
119
109
|
*/
|
|
120
110
|
async addItems(
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
b,
|
|
125
|
-
areaCode,
|
|
126
|
-
buyNow,
|
|
127
|
-
id,
|
|
128
|
-
cartType,
|
|
129
|
-
orderType,
|
|
130
|
-
requestHeaders,
|
|
131
|
-
} = { requestHeaders: {} },
|
|
111
|
+
{ body, i, b, areaCode, buyNow, id, orderType, requestHeaders } = {
|
|
112
|
+
requestHeaders: {},
|
|
113
|
+
},
|
|
132
114
|
{ responseHeaders } = { responseHeaders: false }
|
|
133
115
|
) {
|
|
134
|
-
let invalidInput = [];
|
|
135
|
-
if (invalidInput.length) {
|
|
136
|
-
const error = new Error();
|
|
137
|
-
error.message = "Missing required field";
|
|
138
|
-
error.details = invalidInput;
|
|
139
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
116
|
const query_params = {};
|
|
143
117
|
query_params["i"] = i;
|
|
144
118
|
query_params["b"] = b;
|
|
145
119
|
query_params["area_code"] = areaCode;
|
|
146
120
|
query_params["buy_now"] = buyNow;
|
|
147
121
|
query_params["id"] = id;
|
|
148
|
-
query_params["cart_type"] = cartType;
|
|
149
122
|
query_params["order_type"] = orderType;
|
|
150
123
|
|
|
151
124
|
const xHeaders = {};
|
|
@@ -174,9 +147,9 @@ class Cart {
|
|
|
174
147
|
/**
|
|
175
148
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
176
149
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
177
|
-
* @returns {Promise<
|
|
150
|
+
* @returns {Promise<CartDetailResult>} - Success response
|
|
178
151
|
* @name applyCoupon
|
|
179
|
-
* @summary: Apply coupon
|
|
152
|
+
* @summary: Apply coupon
|
|
180
153
|
* @description: Apply a coupon code to the cart to trigger discounts on eligible items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyCoupon/).
|
|
181
154
|
*/
|
|
182
155
|
async applyCoupon(
|
|
@@ -185,14 +158,6 @@ class Cart {
|
|
|
185
158
|
},
|
|
186
159
|
{ responseHeaders } = { responseHeaders: false }
|
|
187
160
|
) {
|
|
188
|
-
let invalidInput = [];
|
|
189
|
-
if (invalidInput.length) {
|
|
190
|
-
const error = new Error();
|
|
191
|
-
error.message = "Missing required field";
|
|
192
|
-
error.details = invalidInput;
|
|
193
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
161
|
const query_params = {};
|
|
197
162
|
query_params["i"] = i;
|
|
198
163
|
query_params["b"] = b;
|
|
@@ -227,31 +192,20 @@ class Cart {
|
|
|
227
192
|
/**
|
|
228
193
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
229
194
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
230
|
-
* @returns {Promise<
|
|
195
|
+
* @returns {Promise<CartDetailResult>} - Success response
|
|
231
196
|
* @name applyRewardPoints
|
|
232
|
-
* @summary: Use reward points
|
|
197
|
+
* @summary: Use reward points
|
|
233
198
|
* @description: Users can redeem their accumulated reward points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyRewardPoints/).
|
|
234
199
|
*/
|
|
235
200
|
async applyRewardPoints(
|
|
236
|
-
{ body, id, i, b, buyNow,
|
|
237
|
-
requestHeaders: {},
|
|
238
|
-
},
|
|
201
|
+
{ body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
239
202
|
{ responseHeaders } = { responseHeaders: false }
|
|
240
203
|
) {
|
|
241
|
-
let invalidInput = [];
|
|
242
|
-
if (invalidInput.length) {
|
|
243
|
-
const error = new Error();
|
|
244
|
-
error.message = "Missing required field";
|
|
245
|
-
error.details = invalidInput;
|
|
246
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
247
|
-
}
|
|
248
|
-
|
|
249
204
|
const query_params = {};
|
|
250
205
|
query_params["id"] = id;
|
|
251
206
|
query_params["i"] = i;
|
|
252
207
|
query_params["b"] = b;
|
|
253
208
|
query_params["buy_now"] = buyNow;
|
|
254
|
-
query_params["cart_type"] = cartType;
|
|
255
209
|
|
|
256
210
|
const xHeaders = {};
|
|
257
211
|
|
|
@@ -279,7 +233,7 @@ class Cart {
|
|
|
279
233
|
/**
|
|
280
234
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
281
235
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
282
|
-
* @returns {Promise<
|
|
236
|
+
* @returns {Promise<CartCheckoutResult>} - Success response
|
|
283
237
|
* @name checkoutCart
|
|
284
238
|
* @summary: Checkout cart
|
|
285
239
|
* @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCart/).
|
|
@@ -288,14 +242,6 @@ class Cart {
|
|
|
288
242
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
289
243
|
{ responseHeaders } = { responseHeaders: false }
|
|
290
244
|
) {
|
|
291
|
-
let invalidInput = [];
|
|
292
|
-
if (invalidInput.length) {
|
|
293
|
-
const error = new Error();
|
|
294
|
-
error.message = "Missing required field";
|
|
295
|
-
error.details = invalidInput;
|
|
296
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
297
|
-
}
|
|
298
|
-
|
|
299
245
|
const query_params = {};
|
|
300
246
|
query_params["buy_now"] = buyNow;
|
|
301
247
|
query_params["cart_type"] = cartType;
|
|
@@ -326,23 +272,15 @@ class Cart {
|
|
|
326
272
|
/**
|
|
327
273
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
328
274
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
329
|
-
* @returns {Promise<
|
|
275
|
+
* @returns {Promise<CartCheckoutResult>} - Success response
|
|
330
276
|
* @name checkoutCartV2
|
|
331
|
-
* @summary:
|
|
332
|
-
* @description:
|
|
277
|
+
* @summary: Checkout cart
|
|
278
|
+
* @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
|
|
333
279
|
*/
|
|
334
280
|
async checkoutCartV2(
|
|
335
281
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
336
282
|
{ responseHeaders } = { responseHeaders: false }
|
|
337
283
|
) {
|
|
338
|
-
let invalidInput = [];
|
|
339
|
-
if (invalidInput.length) {
|
|
340
|
-
const error = new Error();
|
|
341
|
-
error.message = "Missing required field";
|
|
342
|
-
error.details = invalidInput;
|
|
343
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
344
|
-
}
|
|
345
|
-
|
|
346
284
|
const query_params = {};
|
|
347
285
|
query_params["buy_now"] = buyNow;
|
|
348
286
|
query_params["cart_type"] = cartType;
|
|
@@ -373,26 +311,17 @@ class Cart {
|
|
|
373
311
|
/**
|
|
374
312
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
375
313
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
376
|
-
* @returns {Promise<
|
|
314
|
+
* @returns {Promise<DeleteCartDetailResult>} - Success response
|
|
377
315
|
* @name deleteCart
|
|
378
|
-
* @summary:
|
|
316
|
+
* @summary: Delete a cart
|
|
379
317
|
* @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/deleteCart/).
|
|
380
318
|
*/
|
|
381
319
|
async deleteCart(
|
|
382
|
-
{
|
|
320
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
383
321
|
{ responseHeaders } = { responseHeaders: false }
|
|
384
322
|
) {
|
|
385
|
-
let invalidInput = [];
|
|
386
|
-
if (invalidInput.length) {
|
|
387
|
-
const error = new Error();
|
|
388
|
-
error.message = "Missing required field";
|
|
389
|
-
error.details = invalidInput;
|
|
390
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
391
|
-
}
|
|
392
|
-
|
|
393
323
|
const query_params = {};
|
|
394
324
|
query_params["id"] = id;
|
|
395
|
-
query_params["cart_type"] = cartType;
|
|
396
325
|
|
|
397
326
|
const xHeaders = {};
|
|
398
327
|
|
|
@@ -404,7 +333,7 @@ class Cart {
|
|
|
404
333
|
params: {},
|
|
405
334
|
}),
|
|
406
335
|
query_params,
|
|
407
|
-
|
|
336
|
+
undefined,
|
|
408
337
|
{ ...xHeaders, ...requestHeaders },
|
|
409
338
|
{ responseHeaders }
|
|
410
339
|
);
|
|
@@ -422,7 +351,7 @@ class Cart {
|
|
|
422
351
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
423
352
|
* @returns {Promise<Address>} - Success response
|
|
424
353
|
* @name getAddressById
|
|
425
|
-
* @summary:
|
|
354
|
+
* @summary: Get details for a single customer address
|
|
426
355
|
* @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
|
|
427
356
|
*/
|
|
428
357
|
async getAddressById(
|
|
@@ -434,23 +363,16 @@ class Cart {
|
|
|
434
363
|
checkoutMode,
|
|
435
364
|
tags,
|
|
436
365
|
isDefault,
|
|
437
|
-
userId,
|
|
438
366
|
requestHeaders,
|
|
439
367
|
} = { requestHeaders: {} },
|
|
440
368
|
{ responseHeaders } = { responseHeaders: false }
|
|
441
369
|
) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
path: ["id"],
|
|
370
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
371
|
+
if (errors.length > 0) {
|
|
372
|
+
const error = new FDKClientValidationError({
|
|
373
|
+
message: "Missing required field",
|
|
374
|
+
details: errors,
|
|
448
375
|
});
|
|
449
|
-
}
|
|
450
|
-
if (invalidInput.length) {
|
|
451
|
-
const error = new Error();
|
|
452
|
-
error.message = "Missing required field";
|
|
453
|
-
error.details = invalidInput;
|
|
454
376
|
return Promise.reject(new FDKClientValidationError(error));
|
|
455
377
|
}
|
|
456
378
|
|
|
@@ -461,7 +383,6 @@ class Cart {
|
|
|
461
383
|
query_params["checkout_mode"] = checkoutMode;
|
|
462
384
|
query_params["tags"] = tags;
|
|
463
385
|
query_params["is_default"] = isDefault;
|
|
464
|
-
query_params["user_id"] = userId;
|
|
465
386
|
|
|
466
387
|
const xHeaders = {};
|
|
467
388
|
|
|
@@ -489,9 +410,9 @@ class Cart {
|
|
|
489
410
|
/**
|
|
490
411
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
491
412
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
492
|
-
* @returns {Promise<
|
|
413
|
+
* @returns {Promise<GetAddressesResult>} - Success response
|
|
493
414
|
* @name getAddresses
|
|
494
|
-
* @summary: Get
|
|
415
|
+
* @summary: Get a list of addresses for a customer
|
|
495
416
|
* @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
|
|
496
417
|
*/
|
|
497
418
|
async getAddresses(
|
|
@@ -502,19 +423,10 @@ class Cart {
|
|
|
502
423
|
checkoutMode,
|
|
503
424
|
tags,
|
|
504
425
|
isDefault,
|
|
505
|
-
userId,
|
|
506
426
|
requestHeaders,
|
|
507
427
|
} = { requestHeaders: {} },
|
|
508
428
|
{ responseHeaders } = { responseHeaders: false }
|
|
509
429
|
) {
|
|
510
|
-
let invalidInput = [];
|
|
511
|
-
if (invalidInput.length) {
|
|
512
|
-
const error = new Error();
|
|
513
|
-
error.message = "Missing required field";
|
|
514
|
-
error.details = invalidInput;
|
|
515
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
516
|
-
}
|
|
517
|
-
|
|
518
430
|
const query_params = {};
|
|
519
431
|
query_params["cart_id"] = cartId;
|
|
520
432
|
query_params["buy_now"] = buyNow;
|
|
@@ -522,7 +434,6 @@ class Cart {
|
|
|
522
434
|
query_params["checkout_mode"] = checkoutMode;
|
|
523
435
|
query_params["tags"] = tags;
|
|
524
436
|
query_params["is_default"] = isDefault;
|
|
525
|
-
query_params["user_id"] = userId;
|
|
526
437
|
|
|
527
438
|
const xHeaders = {};
|
|
528
439
|
|
|
@@ -550,31 +461,20 @@ class Cart {
|
|
|
550
461
|
/**
|
|
551
462
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
552
463
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
553
|
-
* @returns {Promise<
|
|
464
|
+
* @returns {Promise<BulkPriceResult>} - Success response
|
|
554
465
|
* @name getBulkDiscountOffers
|
|
555
|
-
* @summary:
|
|
466
|
+
* @summary: List bulk discounts
|
|
556
467
|
* @description: List offer discounts with information about quantity and seller. One offer is marked with a "best" flag, indicating it as the best offer among the list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/).
|
|
557
468
|
*/
|
|
558
469
|
async getBulkDiscountOffers(
|
|
559
|
-
{ itemId, articleId, uid, slug,
|
|
560
|
-
requestHeaders: {},
|
|
561
|
-
},
|
|
470
|
+
{ itemId, articleId, uid, slug, requestHeaders } = { requestHeaders: {} },
|
|
562
471
|
{ responseHeaders } = { responseHeaders: false }
|
|
563
472
|
) {
|
|
564
|
-
let invalidInput = [];
|
|
565
|
-
if (invalidInput.length) {
|
|
566
|
-
const error = new Error();
|
|
567
|
-
error.message = "Missing required field";
|
|
568
|
-
error.details = invalidInput;
|
|
569
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
570
|
-
}
|
|
571
|
-
|
|
572
473
|
const query_params = {};
|
|
573
474
|
query_params["item_id"] = itemId;
|
|
574
475
|
query_params["article_id"] = articleId;
|
|
575
476
|
query_params["uid"] = uid;
|
|
576
477
|
query_params["slug"] = slug;
|
|
577
|
-
query_params["cart_type"] = cartType;
|
|
578
478
|
|
|
579
479
|
const xHeaders = {};
|
|
580
480
|
|
|
@@ -602,9 +502,9 @@ class Cart {
|
|
|
602
502
|
/**
|
|
603
503
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
604
504
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
605
|
-
* @returns {Promise<
|
|
505
|
+
* @returns {Promise<CartDetailResult>} - Success response
|
|
606
506
|
* @name getCart
|
|
607
|
-
* @summary:
|
|
507
|
+
* @summary: Get a cart
|
|
608
508
|
* @description: Get details of a cart linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCart/).
|
|
609
509
|
*/
|
|
610
510
|
async getCart(
|
|
@@ -616,20 +516,11 @@ class Cart {
|
|
|
616
516
|
assignCardId,
|
|
617
517
|
areaCode,
|
|
618
518
|
buyNow,
|
|
619
|
-
cartType,
|
|
620
519
|
orderType,
|
|
621
520
|
requestHeaders,
|
|
622
521
|
} = { requestHeaders: {} },
|
|
623
522
|
{ responseHeaders } = { responseHeaders: false }
|
|
624
523
|
) {
|
|
625
|
-
let invalidInput = [];
|
|
626
|
-
if (invalidInput.length) {
|
|
627
|
-
const error = new Error();
|
|
628
|
-
error.message = "Missing required field";
|
|
629
|
-
error.details = invalidInput;
|
|
630
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
631
|
-
}
|
|
632
|
-
|
|
633
524
|
const query_params = {};
|
|
634
525
|
query_params["id"] = id;
|
|
635
526
|
query_params["i"] = i;
|
|
@@ -638,7 +529,6 @@ class Cart {
|
|
|
638
529
|
query_params["assign_card_id"] = assignCardId;
|
|
639
530
|
query_params["area_code"] = areaCode;
|
|
640
531
|
query_params["buy_now"] = buyNow;
|
|
641
|
-
query_params["cart_type"] = cartType;
|
|
642
532
|
query_params["order_type"] = orderType;
|
|
643
533
|
|
|
644
534
|
const xHeaders = {};
|
|
@@ -676,14 +566,6 @@ class Cart {
|
|
|
676
566
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
677
567
|
{ responseHeaders } = { responseHeaders: false }
|
|
678
568
|
) {
|
|
679
|
-
let invalidInput = [];
|
|
680
|
-
if (invalidInput.length) {
|
|
681
|
-
const error = new Error();
|
|
682
|
-
error.message = "Missing required field";
|
|
683
|
-
error.details = invalidInput;
|
|
684
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
685
|
-
}
|
|
686
|
-
|
|
687
569
|
const query_params = {};
|
|
688
570
|
query_params["id"] = id;
|
|
689
571
|
|
|
@@ -713,120 +595,15 @@ class Cart {
|
|
|
713
595
|
/**
|
|
714
596
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
715
597
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
716
|
-
* @returns {Promise<
|
|
717
|
-
* @name getCartMetaConfig
|
|
718
|
-
* @summary: Get cart configuration by id
|
|
719
|
-
* @description: Get cart configuration by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartMetaConfig/).
|
|
720
|
-
*/
|
|
721
|
-
async getCartMetaConfig(
|
|
722
|
-
{ cartMetaId, requestHeaders } = { requestHeaders: {} },
|
|
723
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
724
|
-
) {
|
|
725
|
-
let invalidInput = [];
|
|
726
|
-
|
|
727
|
-
if (!cartMetaId) {
|
|
728
|
-
invalidInput.push({
|
|
729
|
-
message: `The 'cartMetaId' field is required.`,
|
|
730
|
-
path: ["cartMetaId"],
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
if (invalidInput.length) {
|
|
734
|
-
const error = new Error();
|
|
735
|
-
error.message = "Missing required field";
|
|
736
|
-
error.details = invalidInput;
|
|
737
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
const query_params = {};
|
|
741
|
-
|
|
742
|
-
const xHeaders = {};
|
|
743
|
-
|
|
744
|
-
const response = await ApplicationAPIClient.execute(
|
|
745
|
-
this._conf,
|
|
746
|
-
"get",
|
|
747
|
-
constructUrl({
|
|
748
|
-
url: this._urls["getCartMetaConfig"],
|
|
749
|
-
params: { cartMetaId },
|
|
750
|
-
}),
|
|
751
|
-
query_params,
|
|
752
|
-
undefined,
|
|
753
|
-
{ ...xHeaders, ...requestHeaders },
|
|
754
|
-
{ responseHeaders }
|
|
755
|
-
);
|
|
756
|
-
|
|
757
|
-
let responseData = response;
|
|
758
|
-
if (responseHeaders) {
|
|
759
|
-
responseData = response[0];
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
return response;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
767
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
768
|
-
* @returns {Promise<CartMetaConfigListResponse>} - Success response
|
|
769
|
-
* @name getCartMetaConfigs
|
|
770
|
-
* @summary: Get cart configuration
|
|
771
|
-
* @description: Get cart configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartMetaConfigs/).
|
|
772
|
-
*/
|
|
773
|
-
async getCartMetaConfigs(
|
|
774
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
775
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
776
|
-
) {
|
|
777
|
-
let invalidInput = [];
|
|
778
|
-
if (invalidInput.length) {
|
|
779
|
-
const error = new Error();
|
|
780
|
-
error.message = "Missing required field";
|
|
781
|
-
error.details = invalidInput;
|
|
782
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
const query_params = {};
|
|
786
|
-
|
|
787
|
-
const xHeaders = {};
|
|
788
|
-
|
|
789
|
-
const response = await ApplicationAPIClient.execute(
|
|
790
|
-
this._conf,
|
|
791
|
-
"get",
|
|
792
|
-
constructUrl({
|
|
793
|
-
url: this._urls["getCartMetaConfigs"],
|
|
794
|
-
params: {},
|
|
795
|
-
}),
|
|
796
|
-
query_params,
|
|
797
|
-
undefined,
|
|
798
|
-
{ ...xHeaders, ...requestHeaders },
|
|
799
|
-
{ responseHeaders }
|
|
800
|
-
);
|
|
801
|
-
|
|
802
|
-
let responseData = response;
|
|
803
|
-
if (responseHeaders) {
|
|
804
|
-
responseData = response[0];
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
return response;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
812
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
813
|
-
* @returns {Promise<GetShareCartLinkResponse>} - Success response
|
|
598
|
+
* @returns {Promise<GetShareCartLinkResult>} - Success response
|
|
814
599
|
* @name getCartShareLink
|
|
815
|
-
* @summary:
|
|
600
|
+
* @summary: Create share cart link
|
|
816
601
|
* @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/).
|
|
817
602
|
*/
|
|
818
603
|
async getCartShareLink(
|
|
819
604
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
820
605
|
{ responseHeaders } = { responseHeaders: false }
|
|
821
606
|
) {
|
|
822
|
-
let invalidInput = [];
|
|
823
|
-
if (invalidInput.length) {
|
|
824
|
-
const error = new Error();
|
|
825
|
-
error.message = "Missing required field";
|
|
826
|
-
error.details = invalidInput;
|
|
827
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
828
|
-
}
|
|
829
|
-
|
|
830
607
|
const query_params = {};
|
|
831
608
|
|
|
832
609
|
const xHeaders = {};
|
|
@@ -855,27 +632,21 @@ class Cart {
|
|
|
855
632
|
/**
|
|
856
633
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
857
634
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
858
|
-
* @returns {Promise<
|
|
635
|
+
* @returns {Promise<SharedCartResult>} - Success response
|
|
859
636
|
* @name getCartSharedItems
|
|
860
|
-
* @summary:
|
|
637
|
+
* @summary: List shared cart items
|
|
861
638
|
* @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
|
|
862
639
|
*/
|
|
863
640
|
async getCartSharedItems(
|
|
864
641
|
{ token, requestHeaders } = { requestHeaders: {} },
|
|
865
642
|
{ responseHeaders } = { responseHeaders: false }
|
|
866
643
|
) {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
path: ["token"],
|
|
644
|
+
const errors = validateRequiredParams(arguments[0], ["token"]);
|
|
645
|
+
if (errors.length > 0) {
|
|
646
|
+
const error = new FDKClientValidationError({
|
|
647
|
+
message: "Missing required field",
|
|
648
|
+
details: errors,
|
|
873
649
|
});
|
|
874
|
-
}
|
|
875
|
-
if (invalidInput.length) {
|
|
876
|
-
const error = new Error();
|
|
877
|
-
error.message = "Missing required field";
|
|
878
|
-
error.details = invalidInput;
|
|
879
650
|
return Promise.reject(new FDKClientValidationError(error));
|
|
880
651
|
}
|
|
881
652
|
|
|
@@ -907,23 +678,15 @@ class Cart {
|
|
|
907
678
|
/**
|
|
908
679
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
909
680
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
910
|
-
* @returns {Promise<
|
|
681
|
+
* @returns {Promise<GetCouponResult>} - Success response
|
|
911
682
|
* @name getCoupons
|
|
912
|
-
* @summary: List available coupons
|
|
683
|
+
* @summary: List available coupons
|
|
913
684
|
* @description: List all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/).
|
|
914
685
|
*/
|
|
915
686
|
async getCoupons(
|
|
916
687
|
{ id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
917
688
|
{ responseHeaders } = { responseHeaders: false }
|
|
918
689
|
) {
|
|
919
|
-
let invalidInput = [];
|
|
920
|
-
if (invalidInput.length) {
|
|
921
|
-
const error = new Error();
|
|
922
|
-
error.message = "Missing required field";
|
|
923
|
-
error.details = invalidInput;
|
|
924
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
925
|
-
}
|
|
926
|
-
|
|
927
690
|
const query_params = {};
|
|
928
691
|
query_params["id"] = id;
|
|
929
692
|
query_params["buy_now"] = buyNow;
|
|
@@ -956,23 +719,15 @@ class Cart {
|
|
|
956
719
|
/**
|
|
957
720
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
958
721
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
959
|
-
* @returns {Promise<
|
|
722
|
+
* @returns {Promise<CartItemCountResult>} - Success response
|
|
960
723
|
* @name getItemCount
|
|
961
|
-
* @summary:
|
|
724
|
+
* @summary: Get a cart items count
|
|
962
725
|
* @description: Get total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCount/).
|
|
963
726
|
*/
|
|
964
727
|
async getItemCount(
|
|
965
728
|
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
966
729
|
{ responseHeaders } = { responseHeaders: false }
|
|
967
730
|
) {
|
|
968
|
-
let invalidInput = [];
|
|
969
|
-
if (invalidInput.length) {
|
|
970
|
-
const error = new Error();
|
|
971
|
-
error.message = "Missing required field";
|
|
972
|
-
error.details = invalidInput;
|
|
973
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
974
|
-
}
|
|
975
|
-
|
|
976
731
|
const query_params = {};
|
|
977
732
|
query_params["id"] = id;
|
|
978
733
|
query_params["buy_now"] = buyNow;
|
|
@@ -1000,59 +755,12 @@ class Cart {
|
|
|
1000
755
|
return response;
|
|
1001
756
|
}
|
|
1002
757
|
|
|
1003
|
-
/**
|
|
1004
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1005
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1006
|
-
* @returns {Promise<CartItemCountResponseV2>} - Success response
|
|
1007
|
-
* @name getItemCountV2
|
|
1008
|
-
* @summary: Count items in the cart according to cart_type
|
|
1009
|
-
* @description: Use this API to get the total number of items present in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCountV2/).
|
|
1010
|
-
*/
|
|
1011
|
-
async getItemCountV2(
|
|
1012
|
-
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1013
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1014
|
-
) {
|
|
1015
|
-
let invalidInput = [];
|
|
1016
|
-
if (invalidInput.length) {
|
|
1017
|
-
const error = new Error();
|
|
1018
|
-
error.message = "Missing required field";
|
|
1019
|
-
error.details = invalidInput;
|
|
1020
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
const query_params = {};
|
|
1024
|
-
query_params["id"] = id;
|
|
1025
|
-
query_params["buy_now"] = buyNow;
|
|
1026
|
-
|
|
1027
|
-
const xHeaders = {};
|
|
1028
|
-
|
|
1029
|
-
const response = await ApplicationAPIClient.execute(
|
|
1030
|
-
this._conf,
|
|
1031
|
-
"get",
|
|
1032
|
-
constructUrl({
|
|
1033
|
-
url: this._urls["getItemCountV2"],
|
|
1034
|
-
params: {},
|
|
1035
|
-
}),
|
|
1036
|
-
query_params,
|
|
1037
|
-
undefined,
|
|
1038
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1039
|
-
{ responseHeaders }
|
|
1040
|
-
);
|
|
1041
|
-
|
|
1042
|
-
let responseData = response;
|
|
1043
|
-
if (responseHeaders) {
|
|
1044
|
-
responseData = response[0];
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
return response;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
758
|
/**
|
|
1051
759
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1052
760
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1053
761
|
* @returns {Promise<LadderPriceOffers>} - Success response
|
|
1054
762
|
* @name getLadderOffers
|
|
1055
|
-
* @summary:
|
|
763
|
+
* @summary: List ladder offers
|
|
1056
764
|
* @description: Get ladder offers associated for the items in the cart. Ladder offers provide discounts or special pricing based on item quantity, allowing users to benefit from bulk purchases or promotional deals. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getLadderOffers/).
|
|
1057
765
|
*/
|
|
1058
766
|
async getLadderOffers(
|
|
@@ -1061,21 +769,6 @@ class Cart {
|
|
|
1061
769
|
},
|
|
1062
770
|
{ responseHeaders } = { responseHeaders: false }
|
|
1063
771
|
) {
|
|
1064
|
-
let invalidInput = [];
|
|
1065
|
-
|
|
1066
|
-
if (!slug) {
|
|
1067
|
-
invalidInput.push({
|
|
1068
|
-
message: `The 'slug' field is required.`,
|
|
1069
|
-
path: ["slug"],
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
if (invalidInput.length) {
|
|
1073
|
-
const error = new Error();
|
|
1074
|
-
error.message = "Missing required field";
|
|
1075
|
-
error.details = invalidInput;
|
|
1076
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
772
|
const query_params = {};
|
|
1080
773
|
query_params["slug"] = slug;
|
|
1081
774
|
query_params["store_id"] = storeId;
|
|
@@ -1108,26 +801,23 @@ class Cart {
|
|
|
1108
801
|
/**
|
|
1109
802
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1110
803
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1111
|
-
* @returns {Promise<
|
|
1112
|
-
* @name
|
|
1113
|
-
* @summary:
|
|
1114
|
-
* @description:
|
|
804
|
+
* @returns {Promise<PromotionOffersResult>} - Success response
|
|
805
|
+
* @name getPromotionOffers
|
|
806
|
+
* @summary: List available promotion offers
|
|
807
|
+
* @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/).
|
|
1115
808
|
*/
|
|
1116
|
-
async
|
|
1117
|
-
{
|
|
809
|
+
async getPromotionOffers(
|
|
810
|
+
{ slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = {
|
|
811
|
+
requestHeaders: {},
|
|
812
|
+
},
|
|
1118
813
|
{ responseHeaders } = { responseHeaders: false }
|
|
1119
814
|
) {
|
|
1120
|
-
let invalidInput = [];
|
|
1121
|
-
if (invalidInput.length) {
|
|
1122
|
-
const error = new Error();
|
|
1123
|
-
error.message = "Missing required field";
|
|
1124
|
-
error.details = invalidInput;
|
|
1125
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
815
|
const query_params = {};
|
|
1129
|
-
query_params["
|
|
1130
|
-
query_params["
|
|
816
|
+
query_params["slug"] = slug;
|
|
817
|
+
query_params["page_size"] = pageSize;
|
|
818
|
+
query_params["promotion_group"] = promotionGroup;
|
|
819
|
+
query_params["store_id"] = storeId;
|
|
820
|
+
query_params["cart_type"] = cartType;
|
|
1131
821
|
|
|
1132
822
|
const xHeaders = {};
|
|
1133
823
|
|
|
@@ -1135,7 +825,7 @@ class Cart {
|
|
|
1135
825
|
this._conf,
|
|
1136
826
|
"get",
|
|
1137
827
|
constructUrl({
|
|
1138
|
-
url: this._urls["
|
|
828
|
+
url: this._urls["getPromotionOffers"],
|
|
1139
829
|
params: {},
|
|
1140
830
|
}),
|
|
1141
831
|
query_params,
|
|
@@ -1155,30 +845,18 @@ class Cart {
|
|
|
1155
845
|
/**
|
|
1156
846
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1157
847
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1158
|
-
* @returns {Promise<
|
|
1159
|
-
* @name
|
|
1160
|
-
* @summary:
|
|
1161
|
-
* @description:
|
|
848
|
+
* @returns {Promise<PromotionPaymentOffersResult>} - Success response
|
|
849
|
+
* @name getPromotionPaymentOffers
|
|
850
|
+
* @summary: Fetch available promotions payment offers
|
|
851
|
+
* @description: Use this API to get top 5 payment offers available for current product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionPaymentOffers/).
|
|
1162
852
|
*/
|
|
1163
|
-
async
|
|
1164
|
-
{
|
|
1165
|
-
requestHeaders: {},
|
|
1166
|
-
},
|
|
853
|
+
async getPromotionPaymentOffers(
|
|
854
|
+
{ id, uid, requestHeaders } = { requestHeaders: {} },
|
|
1167
855
|
{ responseHeaders } = { responseHeaders: false }
|
|
1168
856
|
) {
|
|
1169
|
-
let invalidInput = [];
|
|
1170
|
-
if (invalidInput.length) {
|
|
1171
|
-
const error = new Error();
|
|
1172
|
-
error.message = "Missing required field";
|
|
1173
|
-
error.details = invalidInput;
|
|
1174
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
857
|
const query_params = {};
|
|
1178
|
-
query_params["
|
|
1179
|
-
query_params["
|
|
1180
|
-
query_params["promotion_group"] = promotionGroup;
|
|
1181
|
-
query_params["store_id"] = storeId;
|
|
858
|
+
query_params["id"] = id;
|
|
859
|
+
query_params["uid"] = uid;
|
|
1182
860
|
|
|
1183
861
|
const xHeaders = {};
|
|
1184
862
|
|
|
@@ -1186,7 +864,7 @@ class Cart {
|
|
|
1186
864
|
this._conf,
|
|
1187
865
|
"get",
|
|
1188
866
|
constructUrl({
|
|
1189
|
-
url: this._urls["
|
|
867
|
+
url: this._urls["getPromotionPaymentOffers"],
|
|
1190
868
|
params: {},
|
|
1191
869
|
}),
|
|
1192
870
|
query_params,
|
|
@@ -1206,38 +884,18 @@ class Cart {
|
|
|
1206
884
|
/**
|
|
1207
885
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1208
886
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1209
|
-
* @returns {Promise<
|
|
887
|
+
* @returns {Promise<CartShipmentsResult>} - Success response
|
|
1210
888
|
* @name getShipments
|
|
1211
|
-
* @summary: List shipments
|
|
889
|
+
* @summary: List shipments
|
|
1212
890
|
* @description: Get shipment details for the items in a cart, specific to the selected address. Shipment details include delivery promises, seller information, item details, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getShipments/).
|
|
1213
891
|
*/
|
|
1214
892
|
async getShipments(
|
|
1215
|
-
{
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
i,
|
|
1219
|
-
p,
|
|
1220
|
-
id,
|
|
1221
|
-
buyNow,
|
|
1222
|
-
addressId,
|
|
1223
|
-
areaCode,
|
|
1224
|
-
orderType,
|
|
1225
|
-
requestHeaders,
|
|
1226
|
-
} = { requestHeaders: {} },
|
|
893
|
+
{ p, id, buyNow, addressId, areaCode, orderType, requestHeaders } = {
|
|
894
|
+
requestHeaders: {},
|
|
895
|
+
},
|
|
1227
896
|
{ responseHeaders } = { responseHeaders: false }
|
|
1228
897
|
) {
|
|
1229
|
-
let invalidInput = [];
|
|
1230
|
-
if (invalidInput.length) {
|
|
1231
|
-
const error = new Error();
|
|
1232
|
-
error.message = "Missing required field";
|
|
1233
|
-
error.details = invalidInput;
|
|
1234
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
898
|
const query_params = {};
|
|
1238
|
-
query_params["pick_at_store_uid"] = pickAtStoreUid;
|
|
1239
|
-
query_params["ordering_store_id"] = orderingStoreId;
|
|
1240
|
-
query_params["i"] = i;
|
|
1241
899
|
query_params["p"] = p;
|
|
1242
900
|
query_params["id"] = id;
|
|
1243
901
|
query_params["buy_now"] = buyNow;
|
|
@@ -1271,27 +929,21 @@ class Cart {
|
|
|
1271
929
|
/**
|
|
1272
930
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1273
931
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1274
|
-
* @returns {Promise<
|
|
932
|
+
* @returns {Promise<DeleteAddressResult>} - Success response
|
|
1275
933
|
* @name removeAddress
|
|
1276
|
-
* @summary:
|
|
934
|
+
* @summary: Removes an address from a customer's address list
|
|
1277
935
|
* @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
|
|
1278
936
|
*/
|
|
1279
937
|
async removeAddress(
|
|
1280
938
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1281
939
|
{ responseHeaders } = { responseHeaders: false }
|
|
1282
940
|
) {
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
path: ["id"],
|
|
941
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
942
|
+
if (errors.length > 0) {
|
|
943
|
+
const error = new FDKClientValidationError({
|
|
944
|
+
message: "Missing required field",
|
|
945
|
+
details: errors,
|
|
1289
946
|
});
|
|
1290
|
-
}
|
|
1291
|
-
if (invalidInput.length) {
|
|
1292
|
-
const error = new Error();
|
|
1293
|
-
error.message = "Missing required field";
|
|
1294
|
-
error.details = invalidInput;
|
|
1295
947
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1296
948
|
}
|
|
1297
949
|
|
|
@@ -1323,27 +975,18 @@ class Cart {
|
|
|
1323
975
|
/**
|
|
1324
976
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1325
977
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1326
|
-
* @returns {Promise<
|
|
978
|
+
* @returns {Promise<CartDetailResult>} - Success response
|
|
1327
979
|
* @name removeCoupon
|
|
1328
|
-
* @summary: Remove coupon
|
|
980
|
+
* @summary: Remove coupon
|
|
1329
981
|
* @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeCoupon/).
|
|
1330
982
|
*/
|
|
1331
983
|
async removeCoupon(
|
|
1332
|
-
{ id, buyNow,
|
|
984
|
+
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1333
985
|
{ responseHeaders } = { responseHeaders: false }
|
|
1334
986
|
) {
|
|
1335
|
-
let invalidInput = [];
|
|
1336
|
-
if (invalidInput.length) {
|
|
1337
|
-
const error = new Error();
|
|
1338
|
-
error.message = "Missing required field";
|
|
1339
|
-
error.details = invalidInput;
|
|
1340
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
987
|
const query_params = {};
|
|
1344
988
|
query_params["id"] = id;
|
|
1345
989
|
query_params["buy_now"] = buyNow;
|
|
1346
|
-
query_params["cart_type"] = cartType;
|
|
1347
990
|
|
|
1348
991
|
const xHeaders = {};
|
|
1349
992
|
|
|
@@ -1371,23 +1014,15 @@ class Cart {
|
|
|
1371
1014
|
/**
|
|
1372
1015
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1373
1016
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1374
|
-
* @returns {Promise<
|
|
1017
|
+
* @returns {Promise<CartDetailResult>} - Success response
|
|
1375
1018
|
* @name selectAddress
|
|
1376
|
-
* @summary: Select
|
|
1019
|
+
* @summary: Select customer address for order processing
|
|
1377
1020
|
* @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/).
|
|
1378
1021
|
*/
|
|
1379
1022
|
async selectAddress(
|
|
1380
1023
|
{ body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
|
|
1381
1024
|
{ responseHeaders } = { responseHeaders: false }
|
|
1382
1025
|
) {
|
|
1383
|
-
let invalidInput = [];
|
|
1384
|
-
if (invalidInput.length) {
|
|
1385
|
-
const error = new Error();
|
|
1386
|
-
error.message = "Missing required field";
|
|
1387
|
-
error.details = invalidInput;
|
|
1388
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
1026
|
const query_params = {};
|
|
1392
1027
|
query_params["cart_id"] = cartId;
|
|
1393
1028
|
query_params["buy_now"] = buyNow;
|
|
@@ -1420,27 +1055,18 @@ class Cart {
|
|
|
1420
1055
|
/**
|
|
1421
1056
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1422
1057
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1423
|
-
* @returns {Promise<
|
|
1058
|
+
* @returns {Promise<CartDetailResult>} - Success response
|
|
1424
1059
|
* @name selectPaymentMode
|
|
1425
|
-
* @summary:
|
|
1060
|
+
* @summary: Select payment mode
|
|
1426
1061
|
* @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/).
|
|
1427
1062
|
*/
|
|
1428
1063
|
async selectPaymentMode(
|
|
1429
|
-
{ body, id, buyNow,
|
|
1064
|
+
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1430
1065
|
{ responseHeaders } = { responseHeaders: false }
|
|
1431
1066
|
) {
|
|
1432
|
-
let invalidInput = [];
|
|
1433
|
-
if (invalidInput.length) {
|
|
1434
|
-
const error = new Error();
|
|
1435
|
-
error.message = "Missing required field";
|
|
1436
|
-
error.details = invalidInput;
|
|
1437
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
1067
|
const query_params = {};
|
|
1441
1068
|
query_params["id"] = id;
|
|
1442
1069
|
query_params["buy_now"] = buyNow;
|
|
1443
|
-
query_params["order_type"] = orderType;
|
|
1444
1070
|
|
|
1445
1071
|
const xHeaders = {};
|
|
1446
1072
|
|
|
@@ -1468,27 +1094,21 @@ class Cart {
|
|
|
1468
1094
|
/**
|
|
1469
1095
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1470
1096
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1471
|
-
* @returns {Promise<
|
|
1097
|
+
* @returns {Promise<UpdateAddressResult>} - Success response
|
|
1472
1098
|
* @name updateAddress
|
|
1473
|
-
* @summary:
|
|
1099
|
+
* @summary: Updates an existing customer address
|
|
1474
1100
|
* @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
|
|
1475
1101
|
*/
|
|
1476
1102
|
async updateAddress(
|
|
1477
1103
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
1478
1104
|
{ responseHeaders } = { responseHeaders: false }
|
|
1479
1105
|
) {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
path: ["id"],
|
|
1106
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
1107
|
+
if (errors.length > 0) {
|
|
1108
|
+
const error = new FDKClientValidationError({
|
|
1109
|
+
message: "Missing required field",
|
|
1110
|
+
details: errors,
|
|
1486
1111
|
});
|
|
1487
|
-
}
|
|
1488
|
-
if (invalidInput.length) {
|
|
1489
|
-
const error = new Error();
|
|
1490
|
-
error.message = "Missing required field";
|
|
1491
|
-
error.details = invalidInput;
|
|
1492
1112
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1493
1113
|
}
|
|
1494
1114
|
|
|
@@ -1520,9 +1140,9 @@ class Cart {
|
|
|
1520
1140
|
/**
|
|
1521
1141
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1522
1142
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1523
|
-
* @returns {Promise<
|
|
1143
|
+
* @returns {Promise<UpdateCartDetailResult>} - Success response
|
|
1524
1144
|
* @name updateCart
|
|
1525
|
-
* @summary: Update items
|
|
1145
|
+
* @summary: Update cart items
|
|
1526
1146
|
* @description: Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCart/).
|
|
1527
1147
|
*/
|
|
1528
1148
|
async updateCart(
|
|
@@ -1539,14 +1159,6 @@ class Cart {
|
|
|
1539
1159
|
} = { requestHeaders: {} },
|
|
1540
1160
|
{ responseHeaders } = { responseHeaders: false }
|
|
1541
1161
|
) {
|
|
1542
|
-
let invalidInput = [];
|
|
1543
|
-
if (invalidInput.length) {
|
|
1544
|
-
const error = new Error();
|
|
1545
|
-
error.message = "Missing required field";
|
|
1546
|
-
error.details = invalidInput;
|
|
1547
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
1162
|
const query_params = {};
|
|
1551
1163
|
query_params["id"] = id;
|
|
1552
1164
|
query_params["i"] = i;
|
|
@@ -1582,23 +1194,59 @@ class Cart {
|
|
|
1582
1194
|
/**
|
|
1583
1195
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1584
1196
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1585
|
-
* @returns {Promise<
|
|
1197
|
+
* @returns {Promise<UpdateCartDetailResult>} - Success response
|
|
1198
|
+
* @name updateCartBreakup
|
|
1199
|
+
* @summary: Update store credits into cart and their items
|
|
1200
|
+
* @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartBreakup/).
|
|
1201
|
+
*/
|
|
1202
|
+
async updateCartBreakup(
|
|
1203
|
+
{ body, id, i, b, buyNow, cartType, requestHeaders } = {
|
|
1204
|
+
requestHeaders: {},
|
|
1205
|
+
},
|
|
1206
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1207
|
+
) {
|
|
1208
|
+
const query_params = {};
|
|
1209
|
+
query_params["id"] = id;
|
|
1210
|
+
query_params["i"] = i;
|
|
1211
|
+
query_params["b"] = b;
|
|
1212
|
+
query_params["buy_now"] = buyNow;
|
|
1213
|
+
query_params["cart_type"] = cartType;
|
|
1214
|
+
|
|
1215
|
+
const xHeaders = {};
|
|
1216
|
+
|
|
1217
|
+
const response = await ApplicationAPIClient.execute(
|
|
1218
|
+
this._conf,
|
|
1219
|
+
"patch",
|
|
1220
|
+
constructUrl({
|
|
1221
|
+
url: this._urls["updateCartBreakup"],
|
|
1222
|
+
params: {},
|
|
1223
|
+
}),
|
|
1224
|
+
query_params,
|
|
1225
|
+
body,
|
|
1226
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1227
|
+
{ responseHeaders }
|
|
1228
|
+
);
|
|
1229
|
+
|
|
1230
|
+
let responseData = response;
|
|
1231
|
+
if (responseHeaders) {
|
|
1232
|
+
responseData = response[0];
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
return response;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1240
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1241
|
+
* @returns {Promise<CartMetaResult>} - Success response
|
|
1586
1242
|
* @name updateCartMeta
|
|
1587
|
-
* @summary: Update cart metadata
|
|
1243
|
+
* @summary: Update cart metadata
|
|
1588
1244
|
* @description: Update metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartMeta/).
|
|
1589
1245
|
*/
|
|
1590
1246
|
async updateCartMeta(
|
|
1591
1247
|
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1592
1248
|
{ responseHeaders } = { responseHeaders: false }
|
|
1593
1249
|
) {
|
|
1594
|
-
let invalidInput = [];
|
|
1595
|
-
if (invalidInput.length) {
|
|
1596
|
-
const error = new Error();
|
|
1597
|
-
error.message = "Missing required field";
|
|
1598
|
-
error.details = invalidInput;
|
|
1599
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
1250
|
const query_params = {};
|
|
1603
1251
|
query_params["id"] = id;
|
|
1604
1252
|
query_params["buy_now"] = buyNow;
|
|
@@ -1629,38 +1277,25 @@ class Cart {
|
|
|
1629
1277
|
/**
|
|
1630
1278
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1631
1279
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1632
|
-
* @returns {Promise<
|
|
1280
|
+
* @returns {Promise<SharedCartResult>} - Success response
|
|
1633
1281
|
* @name updateCartWithSharedItems
|
|
1634
|
-
* @summary:
|
|
1282
|
+
* @summary: Update with shared items
|
|
1635
1283
|
* @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
|
|
1636
1284
|
*/
|
|
1637
1285
|
async updateCartWithSharedItems(
|
|
1638
|
-
{ token, action,
|
|
1286
|
+
{ token, action, requestHeaders } = { requestHeaders: {} },
|
|
1639
1287
|
{ responseHeaders } = { responseHeaders: false }
|
|
1640
1288
|
) {
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
path: ["token"],
|
|
1289
|
+
const errors = validateRequiredParams(arguments[0], ["token", "action"]);
|
|
1290
|
+
if (errors.length > 0) {
|
|
1291
|
+
const error = new FDKClientValidationError({
|
|
1292
|
+
message: "Missing required field",
|
|
1293
|
+
details: errors,
|
|
1647
1294
|
});
|
|
1648
|
-
}
|
|
1649
|
-
if (!action) {
|
|
1650
|
-
invalidInput.push({
|
|
1651
|
-
message: `The 'action' field is required.`,
|
|
1652
|
-
path: ["action"],
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
if (invalidInput.length) {
|
|
1656
|
-
const error = new Error();
|
|
1657
|
-
error.message = "Missing required field";
|
|
1658
|
-
error.details = invalidInput;
|
|
1659
1295
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1660
1296
|
}
|
|
1661
1297
|
|
|
1662
1298
|
const query_params = {};
|
|
1663
|
-
query_params["cart_id"] = cartId;
|
|
1664
1299
|
|
|
1665
1300
|
const xHeaders = {};
|
|
1666
1301
|
|
|
@@ -1690,7 +1325,7 @@ class Cart {
|
|
|
1690
1325
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1691
1326
|
* @returns {Promise<PaymentCouponValidate>} - Success response
|
|
1692
1327
|
* @name validateCouponForPayment
|
|
1693
|
-
* @summary: Validate coupon
|
|
1328
|
+
* @summary: Validate applied coupon
|
|
1694
1329
|
* @description: Validate the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/validateCouponForPayment/).
|
|
1695
1330
|
*/
|
|
1696
1331
|
async validateCouponForPayment(
|
|
@@ -1711,14 +1346,6 @@ class Cart {
|
|
|
1711
1346
|
} = { requestHeaders: {} },
|
|
1712
1347
|
{ responseHeaders } = { responseHeaders: false }
|
|
1713
1348
|
) {
|
|
1714
|
-
let invalidInput = [];
|
|
1715
|
-
if (invalidInput.length) {
|
|
1716
|
-
const error = new Error();
|
|
1717
|
-
error.message = "Missing required field";
|
|
1718
|
-
error.details = invalidInput;
|
|
1719
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
1349
|
const query_params = {};
|
|
1723
1350
|
query_params["id"] = id;
|
|
1724
1351
|
query_params["buy_now"] = buyNow;
|