@gofynd/fdk-client-javascript 1.4.13 → 1.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +60 -53
- package/sdk/application/Cart/CartApplicationClient.js +130 -53
- package/sdk/application/Cart/CartApplicationModel.d.ts +489 -143
- package/sdk/application/Cart/CartApplicationModel.js +380 -159
- package/sdk/application/Cart/CartApplicationValidator.d.ts +38 -19
- package/sdk/application/Cart/CartApplicationValidator.js +34 -18
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +88 -68
- package/sdk/application/Catalog/CatalogApplicationClient.js +114 -94
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +194 -142
- package/sdk/application/Catalog/CatalogApplicationModel.js +171 -133
- package/sdk/application/Common/CommonApplicationClient.d.ts +3 -2
- package/sdk/application/Common/CommonApplicationClient.js +6 -5
- package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
- package/sdk/application/Common/CommonApplicationModel.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +45 -57
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +35 -47
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +23 -33
- package/sdk/application/Content/ContentApplicationClient.js +54 -75
- package/sdk/application/Content/ContentApplicationModel.d.ts +93 -37
- package/sdk/application/Content/ContentApplicationModel.js +83 -32
- package/sdk/application/Content/ContentApplicationValidator.d.ts +23 -17
- package/sdk/application/Content/ContentApplicationValidator.js +15 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -8
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -25
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +16 -18
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +36 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +202 -0
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +289 -0
- package/sdk/application/Finance/FinanceApplicationModel.js +208 -0
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +25 -0
- package/sdk/application/Finance/FinanceApplicationValidator.js +31 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -3
- package/sdk/application/Lead/LeadApplicationClient.js +2 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
- package/sdk/application/Lead/LeadApplicationModel.js +19 -19
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +39 -16
- package/sdk/application/Logistic/LogisticApplicationClient.js +189 -21
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +532 -173
- package/sdk/application/Logistic/LogisticApplicationModel.js +409 -139
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +54 -9
- package/sdk/application/Logistic/LogisticApplicationValidator.js +42 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -10
- package/sdk/application/Order/OrderApplicationClient.js +96 -13
- package/sdk/application/Order/OrderApplicationModel.d.ts +434 -102
- package/sdk/application/Order/OrderApplicationModel.js +278 -73
- package/sdk/application/Order/OrderApplicationValidator.d.ts +17 -3
- package/sdk/application/Order/OrderApplicationValidator.js +15 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +96 -99
- package/sdk/application/Payment/PaymentApplicationClient.js +111 -114
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +293 -289
- package/sdk/application/Payment/PaymentApplicationModel.js +243 -241
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -16
- package/sdk/application/Rewards/RewardsApplicationClient.js +19 -22
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
- package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
- package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
- package/sdk/application/Share/ShareApplicationModel.js +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -6
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +48 -17
- package/sdk/application/Theme/ThemeApplicationModel.js +42 -22
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +16 -3
- package/sdk/application/Theme/ThemeApplicationValidator.js +9 -2
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +10 -10
- package/sdk/application/User/UserApplicationModel.d.ts +17 -17
- package/sdk/application/User/UserApplicationModel.js +16 -16
- package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
- package/sdk/application/User/UserApplicationValidator.js +2 -2
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +11 -9
- package/sdk/application/Webhook/WebhookApplicationModel.js +8 -6
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
- package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
- package/sdk/application/index.d.ts +1 -0
- package/sdk/application/index.js +2 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +767 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +429 -76
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +120 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4978 -1303
- package/sdk/platform/Cart/CartPlatformModel.js +1922 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +208 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +383 -358
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +122 -126
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +66 -68
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +141 -118
- package/sdk/platform/Catalog/CatalogPlatformClient.js +193 -170
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1516 -1766
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1393 -1224
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1241 -395
- package/sdk/platform/Content/ContentPlatformModel.js +521 -390
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +15 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +83 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +25 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +178 -97
- package/sdk/platform/Order/OrderPlatformClient.js +589 -229
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5447 -3071
- package/sdk/platform/Order/OrderPlatformModel.js +3496 -1653
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +241 -176
- package/sdk/platform/Order/OrderPlatformValidator.js +153 -97
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +327 -313
- package/sdk/platform/Payment/PaymentPlatformModel.js +283 -273
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +45 -35
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +117 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +22 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +24 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +602 -341
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +483 -284
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +791 -5
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -20,6 +20,16 @@ const Joi = require("joi");
|
|
|
20
20
|
* @property {string} [payable_by] - Promotion amount bearable party.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @typedef FreeGiftItem
|
|
25
|
+
* @property {string} [item_slug] - Item slug.
|
|
26
|
+
* @property {string} [item_name] - Item name.
|
|
27
|
+
* @property {Object} [item_price_details] - Item price details.
|
|
28
|
+
* @property {string} [item_brand_name] - Item brand name.
|
|
29
|
+
* @property {number} [item_id] - Item id.
|
|
30
|
+
* @property {string[]} [item_images_url] - Item images URL.
|
|
31
|
+
*/
|
|
32
|
+
|
|
23
33
|
/**
|
|
24
34
|
* @typedef AppliedFreeArticles
|
|
25
35
|
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details.
|
|
@@ -235,11 +245,24 @@ const Joi = require("joi");
|
|
|
235
245
|
* @property {string[]} [product_slug] - Contains list of product slug.
|
|
236
246
|
*/
|
|
237
247
|
|
|
248
|
+
/**
|
|
249
|
+
* @typedef ProductActionParams
|
|
250
|
+
* @property {string[]} [slug] - Unique product url name generated via product
|
|
251
|
+
* name and other meta data.
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @typedef ProductActionPage
|
|
256
|
+
* @property {string} [type] - Entity of page to be redirected on click
|
|
257
|
+
* @property {ProductActionParams} [params]
|
|
258
|
+
*/
|
|
259
|
+
|
|
238
260
|
/**
|
|
239
261
|
* @typedef ProductAction
|
|
240
262
|
* @property {ActionQuery} [query]
|
|
241
|
-
* @property {string} [url] - Url of the product to render the product
|
|
263
|
+
* @property {string} [url] - Url of the product to render the product
|
|
242
264
|
* @property {string} [type] - Type of action.
|
|
265
|
+
* @property {ProductActionPage} [page]
|
|
243
266
|
*/
|
|
244
267
|
|
|
245
268
|
/**
|
|
@@ -454,7 +477,7 @@ const Joi = require("joi");
|
|
|
454
477
|
*/
|
|
455
478
|
|
|
456
479
|
/**
|
|
457
|
-
* @typedef
|
|
480
|
+
* @typedef CartDetailResult
|
|
458
481
|
* @property {number} [cart_id] - Unique identifier of the user cart.
|
|
459
482
|
* @property {string} [uid] - Unique identifier of the user cart.
|
|
460
483
|
* @property {AppliedPromotion[]} [applied_promo_details] - List of applied
|
|
@@ -526,7 +549,7 @@ const Joi = require("joi");
|
|
|
526
549
|
*/
|
|
527
550
|
|
|
528
551
|
/**
|
|
529
|
-
* @typedef
|
|
552
|
+
* @typedef AddCartCreation
|
|
530
553
|
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
531
554
|
* added to cart like item id, item size, and item quantity.
|
|
532
555
|
* @property {boolean} [new_cart] - Field to create to new cart whille user adds
|
|
@@ -534,11 +557,11 @@ const Joi = require("joi");
|
|
|
534
557
|
*/
|
|
535
558
|
|
|
536
559
|
/**
|
|
537
|
-
* @typedef
|
|
560
|
+
* @typedef AddCartDetailResult
|
|
538
561
|
* @property {string} [message] - Message of add to cart API response.
|
|
539
562
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
540
563
|
* added. True if only few are added.
|
|
541
|
-
* @property {
|
|
564
|
+
* @property {CartDetailResult} [cart]
|
|
542
565
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
543
566
|
* False if partially added or not added.
|
|
544
567
|
*/
|
|
@@ -560,30 +583,39 @@ const Joi = require("joi");
|
|
|
560
583
|
*/
|
|
561
584
|
|
|
562
585
|
/**
|
|
563
|
-
* @typedef
|
|
586
|
+
* @typedef FreeGiftItemCreation
|
|
587
|
+
* @property {string} promotion_id - Unique identifier of the free gift promotion.
|
|
588
|
+
* @property {string} item_id - Unique identifier of the selected free gift item.
|
|
589
|
+
* @property {string} item_size - Size of the selected free gift item.
|
|
590
|
+
*/
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* @typedef UpdateCartCreation
|
|
564
594
|
* @property {UpdateProductCart[]} [items] - List items data that needs to be
|
|
565
595
|
* updated in cart.
|
|
596
|
+
* @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
|
|
597
|
+
* items with updated sizes.
|
|
566
598
|
* @property {string} operation - Field to determine if item to be removed from
|
|
567
599
|
* cart or it needs to be updated.
|
|
568
600
|
*/
|
|
569
601
|
|
|
570
602
|
/**
|
|
571
|
-
* @typedef
|
|
603
|
+
* @typedef UpdateCartDetailResult
|
|
572
604
|
* @property {string} [message] - Message of update cart API response.
|
|
573
|
-
* @property {
|
|
605
|
+
* @property {CartDetailResult} [cart]
|
|
574
606
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
575
607
|
* False if partially added or not added.
|
|
576
608
|
*/
|
|
577
609
|
|
|
578
610
|
/**
|
|
579
|
-
* @typedef
|
|
611
|
+
* @typedef DeleteCartDetailResult
|
|
580
612
|
* @property {string} [message] - Message for delete cart response.
|
|
581
613
|
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
582
614
|
* if not archived.
|
|
583
615
|
*/
|
|
584
616
|
|
|
585
617
|
/**
|
|
586
|
-
* @typedef
|
|
618
|
+
* @typedef CartItemCountResult
|
|
587
619
|
* @property {number} [user_cart_items_count] - Item count present in cart.
|
|
588
620
|
*/
|
|
589
621
|
|
|
@@ -630,14 +662,14 @@ const Joi = require("joi");
|
|
|
630
662
|
*/
|
|
631
663
|
|
|
632
664
|
/**
|
|
633
|
-
* @typedef
|
|
665
|
+
* @typedef GetCouponResult
|
|
634
666
|
* @property {PageCoupon} [page]
|
|
635
667
|
* @property {Coupon[]} [available_coupon_list] - List of available coupon which
|
|
636
668
|
* can be applied on cart.
|
|
637
669
|
*/
|
|
638
670
|
|
|
639
671
|
/**
|
|
640
|
-
* @typedef
|
|
672
|
+
* @typedef ApplyCoupon
|
|
641
673
|
* @property {string} coupon_code - Coupon code to be applied.
|
|
642
674
|
*/
|
|
643
675
|
|
|
@@ -682,13 +714,13 @@ const Joi = require("joi");
|
|
|
682
714
|
*/
|
|
683
715
|
|
|
684
716
|
/**
|
|
685
|
-
* @typedef
|
|
717
|
+
* @typedef BulkPriceResult
|
|
686
718
|
* @property {BulkPriceOffer[]} [data] - Actual data to be in response consist
|
|
687
719
|
* of offers from multiple seller.
|
|
688
720
|
*/
|
|
689
721
|
|
|
690
722
|
/**
|
|
691
|
-
* @typedef
|
|
723
|
+
* @typedef RewardPointCreation
|
|
692
724
|
* @property {boolean} points - Points to be applied for cart.
|
|
693
725
|
*/
|
|
694
726
|
|
|
@@ -734,22 +766,29 @@ const Joi = require("joi");
|
|
|
734
766
|
*/
|
|
735
767
|
|
|
736
768
|
/**
|
|
737
|
-
* @typedef
|
|
769
|
+
* @typedef ValidationConfig
|
|
770
|
+
* @property {number} address_max_limit - The maximum number of addresses a user can have.
|
|
771
|
+
* @property {number} user_address_count - The total number of addresses saved by a user.
|
|
772
|
+
*/
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* @typedef GetAddressesResult
|
|
738
776
|
* @property {boolean} [pii_masking] - Personally Identifiable Information
|
|
739
777
|
* masking flag to denote if the user data in address is masked or not.
|
|
740
778
|
* @property {Address[]} [address] - Address description for address data.
|
|
779
|
+
* @property {ValidationConfig} [validation_config]
|
|
741
780
|
*/
|
|
742
781
|
|
|
743
782
|
/**
|
|
744
|
-
* @typedef
|
|
783
|
+
* @typedef SaveAddressResult
|
|
745
784
|
* @property {string} [id] - Id of the address.
|
|
746
|
-
* @property {boolean} [success] - Success flag of save address
|
|
785
|
+
* @property {boolean} [success] - Success flag of save address Result.
|
|
747
786
|
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
748
787
|
* selected then this should be the default address selected.
|
|
749
788
|
*/
|
|
750
789
|
|
|
751
790
|
/**
|
|
752
|
-
* @typedef
|
|
791
|
+
* @typedef UpdateAddressResult
|
|
753
792
|
* @property {boolean} [is_updated] - Updated flag for update address operation
|
|
754
793
|
* if the address updated or not.
|
|
755
794
|
* @property {string} [id] - ID of an address.
|
|
@@ -759,14 +798,14 @@ const Joi = require("joi");
|
|
|
759
798
|
*/
|
|
760
799
|
|
|
761
800
|
/**
|
|
762
|
-
* @typedef
|
|
801
|
+
* @typedef DeleteAddressResult
|
|
763
802
|
* @property {string} [id] - Id of the address.
|
|
764
803
|
* @property {boolean} [is_deleted] - Deleted flag in delete address response
|
|
765
804
|
* states whether the address was deleted or not.
|
|
766
805
|
*/
|
|
767
806
|
|
|
768
807
|
/**
|
|
769
|
-
* @typedef
|
|
808
|
+
* @typedef SelectCartAddressCreation
|
|
770
809
|
* @property {string} [id] - Address is selected by user on which shipment to be
|
|
771
810
|
* delivered.
|
|
772
811
|
* @property {string} [billing_address_id] - Billing address id selected by user
|
|
@@ -776,7 +815,7 @@ const Joi = require("joi");
|
|
|
776
815
|
*/
|
|
777
816
|
|
|
778
817
|
/**
|
|
779
|
-
* @typedef
|
|
818
|
+
* @typedef UpdateCartPaymentCreation
|
|
780
819
|
* @property {string} [id] - Cart id of the user cart for which the update cart
|
|
781
820
|
* payment operation performed.
|
|
782
821
|
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
@@ -800,6 +839,7 @@ const Joi = require("joi");
|
|
|
800
839
|
* is valid or not.
|
|
801
840
|
* @property {string} [display_message_en] - Display message for coupon validity.
|
|
802
841
|
* @property {string} [code] - Coupon code of the coupon applied.
|
|
842
|
+
* @property {string} [error_en] - Error message for the selected payment mode.
|
|
803
843
|
*/
|
|
804
844
|
|
|
805
845
|
/**
|
|
@@ -811,7 +851,7 @@ const Joi = require("joi");
|
|
|
811
851
|
*/
|
|
812
852
|
|
|
813
853
|
/**
|
|
814
|
-
* @typedef
|
|
854
|
+
* @typedef ShipmentResult
|
|
815
855
|
* @property {number} [shipments] - Count of shipments that will be shipped.
|
|
816
856
|
* @property {ShipmentPromise} [promise]
|
|
817
857
|
* @property {string} [order_type] - Order type of the shipment like pickAtStore
|
|
@@ -830,11 +870,11 @@ const Joi = require("joi");
|
|
|
830
870
|
*/
|
|
831
871
|
|
|
832
872
|
/**
|
|
833
|
-
* @typedef
|
|
873
|
+
* @typedef CartShipmentsResult
|
|
834
874
|
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
835
875
|
* message on shipment.
|
|
836
876
|
* @property {string} [checkout_mode] - Checkout mode of cart.
|
|
837
|
-
* @property {string} [message] -
|
|
877
|
+
* @property {string} [message] - Result message of get shipments API.
|
|
838
878
|
* @property {string} [gstin] - GSTIN number added in cart.
|
|
839
879
|
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
840
880
|
* the checkout process.
|
|
@@ -845,7 +885,7 @@ const Joi = require("joi");
|
|
|
845
885
|
* @property {CartBreakup} [breakup_values]
|
|
846
886
|
* @property {CartCurrency} [currency]
|
|
847
887
|
* @property {string} [id] - Cart id of the user cart.
|
|
848
|
-
* @property {
|
|
888
|
+
* @property {ShipmentResult[]} [shipments] - List of Shipments which includes
|
|
849
889
|
* shipment data like shipment items, shipment promise, Shipment type,
|
|
850
890
|
* shipment order type, shipment dp options etc.
|
|
851
891
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
@@ -860,6 +900,12 @@ const Joi = require("joi");
|
|
|
860
900
|
* checkout API payload.
|
|
861
901
|
*/
|
|
862
902
|
|
|
903
|
+
/**
|
|
904
|
+
* @typedef CartCheckoutCustomMeta
|
|
905
|
+
* @property {string} key - Key name of custom meta.
|
|
906
|
+
* @property {string} value - Value to be added in key.
|
|
907
|
+
*/
|
|
908
|
+
|
|
863
909
|
/**
|
|
864
910
|
* @typedef CustomerDetails
|
|
865
911
|
* @property {string} [email] - Email address of the customer to be added in
|
|
@@ -883,6 +929,52 @@ const Joi = require("joi");
|
|
|
883
929
|
* @property {string} _id - Id of staff who does checkout on behalf of customer.
|
|
884
930
|
*/
|
|
885
931
|
|
|
932
|
+
/**
|
|
933
|
+
* @typedef CartCheckoutDetailCreation
|
|
934
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
|
|
935
|
+
* added in order.
|
|
936
|
+
* @property {CustomerDetails} [customer_details] - Customer details to be added in order.
|
|
937
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
938
|
+
* selected to do the payment.
|
|
939
|
+
* @property {string} [id] - Cart id of the user cart.
|
|
940
|
+
* @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
|
|
941
|
+
* payment need not to be collected from user.
|
|
942
|
+
* @property {string} payment_mode - Payment mode from which the payment to be
|
|
943
|
+
* done for the order.
|
|
944
|
+
* @property {string} [aggregator] - Aggregator name of the payment gateway.
|
|
945
|
+
* @property {string} [address_id] - Address id of the user on which the order
|
|
946
|
+
* to be delivered.
|
|
947
|
+
* @property {string} [callback_url] - Callback url to be redirected after
|
|
948
|
+
* payment received/failed.
|
|
949
|
+
* @property {Object} [delivery_address] - Delivery address data which includes
|
|
950
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
951
|
+
* customer landmark and customer name.
|
|
952
|
+
* @property {StaffCheckout} [staff]
|
|
953
|
+
* @property {string} [order_type] - Order type of the order being placed like
|
|
954
|
+
* pickAtStore or HomeDelivery.
|
|
955
|
+
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
956
|
+
* which the order is getting placed.
|
|
957
|
+
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order.
|
|
958
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
959
|
+
* mode selected to do the payment.
|
|
960
|
+
* @property {Object} [billing_address] - Billing address json which includes
|
|
961
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
962
|
+
* customer landmark and customer name.
|
|
963
|
+
* @property {Object} [payment_params] - Payment params which includes payment
|
|
964
|
+
* identifier and merchant code.
|
|
965
|
+
* @property {string} [billing_address_id] - Billing address id of the customer
|
|
966
|
+
* on which the invoice to be generated after the order is placed.
|
|
967
|
+
* @property {Object} [meta] - Meta data to be added in order.
|
|
968
|
+
* @property {Object} [payment_extra_identifiers] - Payment extra identifier for
|
|
969
|
+
* the payment mode to do the payment.
|
|
970
|
+
* @property {string} [iin] - Issuer Identification Number' number of card if
|
|
971
|
+
* payment mode is card.
|
|
972
|
+
* @property {string} [network] - Network of card if payment mode is card to do
|
|
973
|
+
* the payment.
|
|
974
|
+
* @property {string} [type] - Type of cart if payment mode is card to do the payment.
|
|
975
|
+
* @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
|
|
976
|
+
*/
|
|
977
|
+
|
|
886
978
|
/**
|
|
887
979
|
* @typedef CheckCart
|
|
888
980
|
* @property {string} [checkout_mode] - Checkout mode of user cart.
|
|
@@ -919,11 +1011,11 @@ const Joi = require("joi");
|
|
|
919
1011
|
* @property {string} [coupon_text] - Coupon text of the applied coupon on order placed.
|
|
920
1012
|
* @property {boolean} [buy_now] - Buy now flag of user cart.
|
|
921
1013
|
* @property {number} [cod_charges] - Cash On Delivery charges of the user cart.
|
|
922
|
-
* @property {Object} [custom_cart_meta] -
|
|
1014
|
+
* @property {Object} [custom_cart_meta] - Custom cart meta details added in cart.
|
|
923
1015
|
*/
|
|
924
1016
|
|
|
925
1017
|
/**
|
|
926
|
-
* @typedef
|
|
1018
|
+
* @typedef CartCheckoutResult
|
|
927
1019
|
* @property {string} [payment_confirm_url] - Payment confirm url used to
|
|
928
1020
|
* redirect after payment is confirmed.
|
|
929
1021
|
* @property {string} [app_intercept_url] - App intercept url which is used to
|
|
@@ -952,7 +1044,7 @@ const Joi = require("joi");
|
|
|
952
1044
|
*/
|
|
953
1045
|
|
|
954
1046
|
/**
|
|
955
|
-
* @typedef
|
|
1047
|
+
* @typedef CartMetaCreation
|
|
956
1048
|
* @property {Object} [delivery_slots] - Delivery slots details includes article
|
|
957
1049
|
* level time slot when the shipment can be delivered.
|
|
958
1050
|
* @property {ArticleGiftDetail} [gift_details]
|
|
@@ -967,25 +1059,25 @@ const Joi = require("joi");
|
|
|
967
1059
|
*/
|
|
968
1060
|
|
|
969
1061
|
/**
|
|
970
|
-
* @typedef
|
|
1062
|
+
* @typedef CartMetaResult
|
|
971
1063
|
* @property {string} [message] - Detailed message.
|
|
972
1064
|
* @property {boolean} [is_valid] - Whether added meta was vaild.
|
|
973
1065
|
*/
|
|
974
1066
|
|
|
975
1067
|
/**
|
|
976
|
-
* @typedef
|
|
1068
|
+
* @typedef CartMetaMissingResult
|
|
977
1069
|
* @property {string[]} [errors] - Detailed errors for invalid cart meta request.
|
|
978
1070
|
*/
|
|
979
1071
|
|
|
980
1072
|
/**
|
|
981
|
-
* @typedef
|
|
1073
|
+
* @typedef GetShareCartLinkCreation
|
|
982
1074
|
* @property {string} [id] - Cart id of user cart for generating cart sharing token.
|
|
983
1075
|
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
984
1076
|
* data will be used to generate link as well as sent as shared details.
|
|
985
1077
|
*/
|
|
986
1078
|
|
|
987
1079
|
/**
|
|
988
|
-
* @typedef
|
|
1080
|
+
* @typedef GetShareCartLinkResult
|
|
989
1081
|
* @property {string} [token] - Short url unique id of the cart which is opted
|
|
990
1082
|
* to share with other user.
|
|
991
1083
|
* @property {string} [share_url] - Short shareable final url which can populate
|
|
@@ -1032,7 +1124,7 @@ const Joi = require("joi");
|
|
|
1032
1124
|
*/
|
|
1033
1125
|
|
|
1034
1126
|
/**
|
|
1035
|
-
* @typedef
|
|
1127
|
+
* @typedef SharedCartResult
|
|
1036
1128
|
* @property {string} [error] - Error details if any error occurs which includes
|
|
1037
1129
|
* type of error, error code and error message.
|
|
1038
1130
|
* @property {SharedCart} [cart]
|
|
@@ -1051,15 +1143,26 @@ const Joi = require("joi");
|
|
|
1051
1143
|
* @property {string} [currency] - Currency of the article added in cart.
|
|
1052
1144
|
*/
|
|
1053
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* @typedef ArticlePriceDetails
|
|
1148
|
+
* @property {number} [marked] - The Marked Price refers to the initial price of
|
|
1149
|
+
* the free gift article before product discount.
|
|
1150
|
+
* @property {number} [effective] - The Effective Price refers to the final
|
|
1151
|
+
* amount of the free gift article after applying the product discount.
|
|
1152
|
+
*/
|
|
1153
|
+
|
|
1054
1154
|
/**
|
|
1055
1155
|
* @typedef FreeGiftItems
|
|
1056
1156
|
* @property {string} [item_slug] - Slug for an item.
|
|
1057
1157
|
* @property {string} [item_name] - Name of the free gift item received via free
|
|
1058
1158
|
* gift promotion.
|
|
1059
1159
|
* @property {ItemPriceDetails} [item_price_details]
|
|
1160
|
+
* @property {ArticlePriceDetails} [article_price]
|
|
1060
1161
|
* @property {string} [item_brand_name] - Item brand name of the free gift item
|
|
1061
1162
|
* promotion applied on cart.
|
|
1062
1163
|
* @property {number} [item_id] - Item id of the free gift item.
|
|
1164
|
+
* @property {string[]} [available_sizes] - Available sizes for the free gift item.
|
|
1165
|
+
* @property {string} [size] - Selected size for the free gift item.
|
|
1063
1166
|
* @property {string[]} [item_images_url] - Images URLs for free gift items.
|
|
1064
1167
|
*/
|
|
1065
1168
|
|
|
@@ -1087,7 +1190,7 @@ const Joi = require("joi");
|
|
|
1087
1190
|
*/
|
|
1088
1191
|
|
|
1089
1192
|
/**
|
|
1090
|
-
* @typedef
|
|
1193
|
+
* @typedef PromotionOffersResult
|
|
1091
1194
|
* @property {PromotionOffer[]} [available_promotions] - Available promotion
|
|
1092
1195
|
* details which are available on product which includes promotion data like
|
|
1093
1196
|
* promotion id, promotion name, buy rules, discount rules validity dates etc.
|
|
@@ -1115,14 +1218,14 @@ const Joi = require("joi");
|
|
|
1115
1218
|
*/
|
|
1116
1219
|
|
|
1117
1220
|
/**
|
|
1118
|
-
* @typedef
|
|
1221
|
+
* @typedef PromotionPaymentOffersResult
|
|
1119
1222
|
* @property {boolean} [success] - Success flag of get payment offers API response.
|
|
1120
1223
|
* @property {PromotionPaymentOffer[]} [promotions] - List of promotions data
|
|
1121
1224
|
* which are applicable on cart/product.
|
|
1122
1225
|
*/
|
|
1123
1226
|
|
|
1124
1227
|
/**
|
|
1125
|
-
* @typedef
|
|
1228
|
+
* @typedef OperationErrorResult
|
|
1126
1229
|
* @property {string} [message] - Message of get payment offer API response.
|
|
1127
1230
|
* @property {boolean} [success] - Success flag of get payment offer API response.
|
|
1128
1231
|
*/
|
|
@@ -1204,9 +1307,10 @@ const Joi = require("joi");
|
|
|
1204
1307
|
*/
|
|
1205
1308
|
|
|
1206
1309
|
/**
|
|
1207
|
-
* @typedef
|
|
1208
|
-
* @property {
|
|
1209
|
-
*
|
|
1310
|
+
* @typedef CartCheckoutDetailV2Creation
|
|
1311
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
|
|
1312
|
+
* added in order.
|
|
1313
|
+
* @property {CustomerDetails} [customer_details]
|
|
1210
1314
|
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
1211
1315
|
* selected to do the payment.
|
|
1212
1316
|
* @property {string} [cart_id] - Cart id of the user cart.
|
|
@@ -1248,12 +1352,18 @@ const Joi = require("joi");
|
|
|
1248
1352
|
* @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
|
|
1249
1353
|
*/
|
|
1250
1354
|
|
|
1355
|
+
/**
|
|
1356
|
+
* @typedef ValidationError
|
|
1357
|
+
* @property {string} message - A brief description of the error encountered.
|
|
1358
|
+
* @property {string} field - The field in the request that caused the error.
|
|
1359
|
+
*/
|
|
1360
|
+
|
|
1251
1361
|
class CartApplicationModel {
|
|
1252
1362
|
/** @returns {BuyRules} */
|
|
1253
1363
|
static BuyRules() {
|
|
1254
1364
|
return Joi.object({
|
|
1255
|
-
item_criteria: Joi.any(),
|
|
1256
|
-
cart_conditions: Joi.any(),
|
|
1365
|
+
item_criteria: Joi.object().pattern(/\S/, Joi.any()),
|
|
1366
|
+
cart_conditions: Joi.object().pattern(/\S/, Joi.any()),
|
|
1257
1367
|
});
|
|
1258
1368
|
}
|
|
1259
1369
|
|
|
@@ -1261,9 +1371,9 @@ class CartApplicationModel {
|
|
|
1261
1371
|
static DiscountRulesApp() {
|
|
1262
1372
|
return Joi.object({
|
|
1263
1373
|
matched_buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
1264
|
-
raw_offer: Joi.any(),
|
|
1265
|
-
offer: Joi.any(),
|
|
1266
|
-
item_criteria: Joi.any(),
|
|
1374
|
+
raw_offer: Joi.object().pattern(/\S/, Joi.any()),
|
|
1375
|
+
offer: Joi.object().pattern(/\S/, Joi.any()),
|
|
1376
|
+
item_criteria: Joi.object().pattern(/\S/, Joi.any()),
|
|
1267
1377
|
});
|
|
1268
1378
|
}
|
|
1269
1379
|
|
|
@@ -1275,6 +1385,18 @@ class CartApplicationModel {
|
|
|
1275
1385
|
});
|
|
1276
1386
|
}
|
|
1277
1387
|
|
|
1388
|
+
/** @returns {FreeGiftItem} */
|
|
1389
|
+
static FreeGiftItem() {
|
|
1390
|
+
return Joi.object({
|
|
1391
|
+
item_slug: Joi.string().allow(""),
|
|
1392
|
+
item_name: Joi.string().allow(""),
|
|
1393
|
+
item_price_details: Joi.object().pattern(/\S/, Joi.any()),
|
|
1394
|
+
item_brand_name: Joi.string().allow(""),
|
|
1395
|
+
item_id: Joi.number(),
|
|
1396
|
+
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1278
1400
|
/** @returns {AppliedFreeArticles} */
|
|
1279
1401
|
static AppliedFreeArticles() {
|
|
1280
1402
|
return Joi.object({
|
|
@@ -1304,7 +1426,7 @@ class CartApplicationModel {
|
|
|
1304
1426
|
CartApplicationModel.AppliedFreeArticles()
|
|
1305
1427
|
),
|
|
1306
1428
|
promotion_type: Joi.string().allow(""),
|
|
1307
|
-
meta: Joi.any(),
|
|
1429
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1308
1430
|
code: Joi.string().allow("").allow(null),
|
|
1309
1431
|
});
|
|
1310
1432
|
}
|
|
@@ -1391,20 +1513,20 @@ class CartApplicationModel {
|
|
|
1391
1513
|
return Joi.object({
|
|
1392
1514
|
price: CartApplicationModel.ArticlePriceInfo(),
|
|
1393
1515
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
1394
|
-
extra_meta: Joi.any(),
|
|
1516
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1395
1517
|
quantity: Joi.number(),
|
|
1396
|
-
_custom_json: Joi.any(),
|
|
1397
|
-
meta: Joi.any(),
|
|
1518
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1519
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1398
1520
|
size: Joi.string().allow(""),
|
|
1399
1521
|
mto_quantity: Joi.number(),
|
|
1400
1522
|
seller: CartApplicationModel.BaseInfo(),
|
|
1401
1523
|
seller_identifier: Joi.string().allow(""),
|
|
1402
|
-
parent_item_identifiers: Joi.any(),
|
|
1403
|
-
identifier: Joi.any(),
|
|
1524
|
+
parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
1525
|
+
identifier: Joi.object().pattern(/\S/, Joi.any()),
|
|
1404
1526
|
store: CartApplicationModel.StoreInfo(),
|
|
1405
|
-
cart_item_meta: Joi.any(),
|
|
1527
|
+
cart_item_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1406
1528
|
uid: Joi.string().allow(""),
|
|
1407
|
-
gift_card: Joi.any(),
|
|
1529
|
+
gift_card: Joi.object().pattern(/\S/, Joi.any()),
|
|
1408
1530
|
is_gift_visible: Joi.boolean(),
|
|
1409
1531
|
type: Joi.string().allow(""),
|
|
1410
1532
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1436,7 +1558,7 @@ class CartApplicationModel {
|
|
|
1436
1558
|
/** @returns {Charges} */
|
|
1437
1559
|
static Charges() {
|
|
1438
1560
|
return Joi.object({
|
|
1439
|
-
meta: Joi.any(),
|
|
1561
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1440
1562
|
amount: CartApplicationModel.ChargesAmount(),
|
|
1441
1563
|
name: Joi.string().allow(""),
|
|
1442
1564
|
allow_refund: Joi.boolean(),
|
|
@@ -1515,19 +1637,35 @@ class CartApplicationModel {
|
|
|
1515
1637
|
});
|
|
1516
1638
|
}
|
|
1517
1639
|
|
|
1640
|
+
/** @returns {ProductActionParams} */
|
|
1641
|
+
static ProductActionParams() {
|
|
1642
|
+
return Joi.object({
|
|
1643
|
+
slug: Joi.array().items(Joi.string().allow("")),
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
/** @returns {ProductActionPage} */
|
|
1648
|
+
static ProductActionPage() {
|
|
1649
|
+
return Joi.object({
|
|
1650
|
+
type: Joi.string().allow(""),
|
|
1651
|
+
params: CartApplicationModel.ProductActionParams(),
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1518
1655
|
/** @returns {ProductAction} */
|
|
1519
1656
|
static ProductAction() {
|
|
1520
1657
|
return Joi.object({
|
|
1521
1658
|
query: CartApplicationModel.ActionQuery(),
|
|
1522
1659
|
url: Joi.string().allow(""),
|
|
1523
1660
|
type: Joi.string().allow(""),
|
|
1661
|
+
page: CartApplicationModel.ProductActionPage(),
|
|
1524
1662
|
});
|
|
1525
1663
|
}
|
|
1526
1664
|
|
|
1527
1665
|
/** @returns {Tags} */
|
|
1528
1666
|
static Tags() {
|
|
1529
1667
|
return Joi.object({
|
|
1530
|
-
tags: Joi.any(),
|
|
1668
|
+
tags: Joi.object().pattern(/\S/, Joi.any()),
|
|
1531
1669
|
});
|
|
1532
1670
|
}
|
|
1533
1671
|
|
|
@@ -1551,7 +1689,7 @@ class CartApplicationModel {
|
|
|
1551
1689
|
/** @returns {CartProduct} */
|
|
1552
1690
|
static CartProduct() {
|
|
1553
1691
|
return Joi.object({
|
|
1554
|
-
_custom_json: Joi.any(),
|
|
1692
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1555
1693
|
brand: CartApplicationModel.BaseInfo(),
|
|
1556
1694
|
action: CartApplicationModel.ProductAction(),
|
|
1557
1695
|
teaser_tag: CartApplicationModel.Tags(),
|
|
@@ -1563,7 +1701,7 @@ class CartApplicationModel {
|
|
|
1563
1701
|
categories: Joi.array().items(CartApplicationModel.CategoryInfo()),
|
|
1564
1702
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1565
1703
|
type: Joi.string().allow(""),
|
|
1566
|
-
attributes: Joi.any(),
|
|
1704
|
+
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
1567
1705
|
});
|
|
1568
1706
|
}
|
|
1569
1707
|
|
|
@@ -1580,7 +1718,7 @@ class CartApplicationModel {
|
|
|
1580
1718
|
static CartProductInfo() {
|
|
1581
1719
|
return Joi.object({
|
|
1582
1720
|
article: CartApplicationModel.ProductArticle(),
|
|
1583
|
-
moq: Joi.any(),
|
|
1721
|
+
moq: Joi.object().pattern(/\S/, Joi.any()),
|
|
1584
1722
|
identifiers: CartApplicationModel.CartProductIdentifer().required(),
|
|
1585
1723
|
promo_meta: CartApplicationModel.PromoMeta(),
|
|
1586
1724
|
price: CartApplicationModel.ProductPriceInfo(),
|
|
@@ -1591,10 +1729,10 @@ class CartApplicationModel {
|
|
|
1591
1729
|
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
1592
1730
|
product: CartApplicationModel.CartProduct(),
|
|
1593
1731
|
product_ean_id: Joi.string().allow(""),
|
|
1594
|
-
bulk_offer: Joi.any(),
|
|
1595
|
-
parent_item_identifiers: Joi.any(),
|
|
1732
|
+
bulk_offer: Joi.object().pattern(/\S/, Joi.any()),
|
|
1733
|
+
parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
1596
1734
|
coupon: CartApplicationModel.CouponDetails(),
|
|
1597
|
-
custom_order: Joi.any(),
|
|
1735
|
+
custom_order: Joi.object().pattern(/\S/, Joi.any()),
|
|
1598
1736
|
coupon_message: Joi.string().allow(""),
|
|
1599
1737
|
key: Joi.string().allow(""),
|
|
1600
1738
|
message: Joi.string().allow(""),
|
|
@@ -1732,8 +1870,8 @@ class CartApplicationModel {
|
|
|
1732
1870
|
});
|
|
1733
1871
|
}
|
|
1734
1872
|
|
|
1735
|
-
/** @returns {
|
|
1736
|
-
static
|
|
1873
|
+
/** @returns {CartDetailResult} */
|
|
1874
|
+
static CartDetailResult() {
|
|
1737
1875
|
return Joi.object({
|
|
1738
1876
|
cart_id: Joi.number(),
|
|
1739
1877
|
uid: Joi.string().allow(""),
|
|
@@ -1752,7 +1890,7 @@ class CartApplicationModel {
|
|
|
1752
1890
|
common_config: CartApplicationModel.CartCommonConfig(),
|
|
1753
1891
|
coupon: CartApplicationModel.CartDetailCoupon(),
|
|
1754
1892
|
message: Joi.string().allow(""),
|
|
1755
|
-
notification: Joi.any(),
|
|
1893
|
+
notification: Joi.object().pattern(/\S/, Joi.any()),
|
|
1756
1894
|
staff_user_id: Joi.string().allow(""),
|
|
1757
1895
|
success: Joi.boolean(),
|
|
1758
1896
|
gstin: Joi.string().allow(""),
|
|
@@ -1762,19 +1900,19 @@ class CartApplicationModel {
|
|
|
1762
1900
|
currency: CartApplicationModel.CartCurrency(),
|
|
1763
1901
|
coupon_text: Joi.string().allow(""),
|
|
1764
1902
|
buy_now: Joi.boolean(),
|
|
1765
|
-
pan_config: Joi.any(),
|
|
1766
|
-
custom_cart_meta: Joi.any(),
|
|
1903
|
+
pan_config: Joi.object().pattern(/\S/, Joi.any()),
|
|
1904
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1767
1905
|
});
|
|
1768
1906
|
}
|
|
1769
1907
|
|
|
1770
1908
|
/** @returns {AddProductCart} */
|
|
1771
1909
|
static AddProductCart() {
|
|
1772
1910
|
return Joi.object({
|
|
1773
|
-
article_assignment: Joi.any(),
|
|
1911
|
+
article_assignment: Joi.object().pattern(/\S/, Joi.any()),
|
|
1774
1912
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
1775
|
-
extra_meta: Joi.any(),
|
|
1913
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1776
1914
|
quantity: Joi.number(),
|
|
1777
|
-
_custom_json: Joi.any(),
|
|
1915
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1778
1916
|
item_size: Joi.string().allow(""),
|
|
1779
1917
|
store_id: Joi.number(),
|
|
1780
1918
|
display: Joi.string().allow(""),
|
|
@@ -1785,25 +1923,25 @@ class CartApplicationModel {
|
|
|
1785
1923
|
seller_id: Joi.number(),
|
|
1786
1924
|
pos: Joi.boolean(),
|
|
1787
1925
|
item_id: Joi.number(),
|
|
1788
|
-
meta: Joi.any(),
|
|
1926
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1789
1927
|
seller_identifier: Joi.string().allow(""),
|
|
1790
1928
|
});
|
|
1791
1929
|
}
|
|
1792
1930
|
|
|
1793
|
-
/** @returns {
|
|
1794
|
-
static
|
|
1931
|
+
/** @returns {AddCartCreation} */
|
|
1932
|
+
static AddCartCreation() {
|
|
1795
1933
|
return Joi.object({
|
|
1796
1934
|
items: Joi.array().items(CartApplicationModel.AddProductCart()),
|
|
1797
1935
|
new_cart: Joi.boolean(),
|
|
1798
1936
|
});
|
|
1799
1937
|
}
|
|
1800
1938
|
|
|
1801
|
-
/** @returns {
|
|
1802
|
-
static
|
|
1939
|
+
/** @returns {AddCartDetailResult} */
|
|
1940
|
+
static AddCartDetailResult() {
|
|
1803
1941
|
return Joi.object({
|
|
1804
1942
|
message: Joi.string().allow(""),
|
|
1805
1943
|
partial: Joi.boolean(),
|
|
1806
|
-
cart: CartApplicationModel.
|
|
1944
|
+
cart: CartApplicationModel.CartDetailResult(),
|
|
1807
1945
|
success: Joi.boolean(),
|
|
1808
1946
|
});
|
|
1809
1947
|
}
|
|
@@ -1811,46 +1949,58 @@ class CartApplicationModel {
|
|
|
1811
1949
|
/** @returns {UpdateProductCart} */
|
|
1812
1950
|
static UpdateProductCart() {
|
|
1813
1951
|
return Joi.object({
|
|
1814
|
-
extra_meta: Joi.any(),
|
|
1815
|
-
_custom_json: Joi.any(),
|
|
1952
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1953
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1816
1954
|
quantity: Joi.number(),
|
|
1817
1955
|
item_size: Joi.string().allow(""),
|
|
1818
1956
|
item_index: Joi.number(),
|
|
1819
1957
|
identifiers: CartApplicationModel.CartProductIdentifer().required(),
|
|
1820
1958
|
article_id: Joi.string().allow(""),
|
|
1821
|
-
parent_item_identifiers: Joi.any(),
|
|
1959
|
+
parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
1822
1960
|
item_id: Joi.number(),
|
|
1823
|
-
meta: Joi.any(),
|
|
1961
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1824
1962
|
});
|
|
1825
1963
|
}
|
|
1826
1964
|
|
|
1827
|
-
/** @returns {
|
|
1828
|
-
static
|
|
1965
|
+
/** @returns {FreeGiftItemCreation} */
|
|
1966
|
+
static FreeGiftItemCreation() {
|
|
1967
|
+
return Joi.object({
|
|
1968
|
+
promotion_id: Joi.string().allow("").required(),
|
|
1969
|
+
item_id: Joi.string().allow("").required(),
|
|
1970
|
+
item_size: Joi.string().allow("").required(),
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
/** @returns {UpdateCartCreation} */
|
|
1975
|
+
static UpdateCartCreation() {
|
|
1829
1976
|
return Joi.object({
|
|
1830
1977
|
items: Joi.array().items(CartApplicationModel.UpdateProductCart()),
|
|
1978
|
+
free_gift_items: Joi.array().items(
|
|
1979
|
+
CartApplicationModel.FreeGiftItemCreation()
|
|
1980
|
+
),
|
|
1831
1981
|
operation: Joi.string().allow("").required(),
|
|
1832
1982
|
});
|
|
1833
1983
|
}
|
|
1834
1984
|
|
|
1835
|
-
/** @returns {
|
|
1836
|
-
static
|
|
1985
|
+
/** @returns {UpdateCartDetailResult} */
|
|
1986
|
+
static UpdateCartDetailResult() {
|
|
1837
1987
|
return Joi.object({
|
|
1838
1988
|
message: Joi.string().allow(""),
|
|
1839
|
-
cart: CartApplicationModel.
|
|
1989
|
+
cart: CartApplicationModel.CartDetailResult(),
|
|
1840
1990
|
success: Joi.boolean(),
|
|
1841
1991
|
});
|
|
1842
1992
|
}
|
|
1843
1993
|
|
|
1844
|
-
/** @returns {
|
|
1845
|
-
static
|
|
1994
|
+
/** @returns {DeleteCartDetailResult} */
|
|
1995
|
+
static DeleteCartDetailResult() {
|
|
1846
1996
|
return Joi.object({
|
|
1847
1997
|
message: Joi.string().allow(""),
|
|
1848
1998
|
success: Joi.boolean(),
|
|
1849
1999
|
});
|
|
1850
2000
|
}
|
|
1851
2001
|
|
|
1852
|
-
/** @returns {
|
|
1853
|
-
static
|
|
2002
|
+
/** @returns {CartItemCountResult} */
|
|
2003
|
+
static CartItemCountResult() {
|
|
1854
2004
|
return Joi.object({
|
|
1855
2005
|
user_cart_items_count: Joi.number(),
|
|
1856
2006
|
});
|
|
@@ -1891,16 +2041,16 @@ class CartApplicationModel {
|
|
|
1891
2041
|
});
|
|
1892
2042
|
}
|
|
1893
2043
|
|
|
1894
|
-
/** @returns {
|
|
1895
|
-
static
|
|
2044
|
+
/** @returns {GetCouponResult} */
|
|
2045
|
+
static GetCouponResult() {
|
|
1896
2046
|
return Joi.object({
|
|
1897
2047
|
page: CartApplicationModel.PageCoupon(),
|
|
1898
2048
|
available_coupon_list: Joi.array().items(CartApplicationModel.Coupon()),
|
|
1899
2049
|
});
|
|
1900
2050
|
}
|
|
1901
2051
|
|
|
1902
|
-
/** @returns {
|
|
1903
|
-
static
|
|
2052
|
+
/** @returns {ApplyCoupon} */
|
|
2053
|
+
static ApplyCoupon() {
|
|
1904
2054
|
return Joi.object({
|
|
1905
2055
|
coupon_code: Joi.string().allow("").required(),
|
|
1906
2056
|
});
|
|
@@ -1946,15 +2096,15 @@ class CartApplicationModel {
|
|
|
1946
2096
|
});
|
|
1947
2097
|
}
|
|
1948
2098
|
|
|
1949
|
-
/** @returns {
|
|
1950
|
-
static
|
|
2099
|
+
/** @returns {BulkPriceResult} */
|
|
2100
|
+
static BulkPriceResult() {
|
|
1951
2101
|
return Joi.object({
|
|
1952
2102
|
data: Joi.array().items(CartApplicationModel.BulkPriceOffer()),
|
|
1953
2103
|
});
|
|
1954
2104
|
}
|
|
1955
2105
|
|
|
1956
|
-
/** @returns {
|
|
1957
|
-
static
|
|
2106
|
+
/** @returns {RewardPointCreation} */
|
|
2107
|
+
static RewardPointCreation() {
|
|
1958
2108
|
return Joi.object({
|
|
1959
2109
|
points: Joi.boolean().required(),
|
|
1960
2110
|
});
|
|
@@ -1980,7 +2130,7 @@ class CartApplicationModel {
|
|
|
1980
2130
|
area_code_slug: Joi.string().allow(""),
|
|
1981
2131
|
geo_location: CartApplicationModel.GeoLocation(),
|
|
1982
2132
|
id: Joi.string().allow(""),
|
|
1983
|
-
_custom_json: Joi.any(),
|
|
2133
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1984
2134
|
city: Joi.string().allow(""),
|
|
1985
2135
|
sector: Joi.string().allow(""),
|
|
1986
2136
|
state_code: Joi.string().allow(""),
|
|
@@ -1988,7 +2138,7 @@ class CartApplicationModel {
|
|
|
1988
2138
|
landmark: Joi.string().allow(""),
|
|
1989
2139
|
user_id: Joi.string().allow(""),
|
|
1990
2140
|
name: Joi.string().allow(""),
|
|
1991
|
-
google_map_point: Joi.any(),
|
|
2141
|
+
google_map_point: Joi.object().pattern(/\S/, Joi.any()),
|
|
1992
2142
|
is_active: Joi.boolean(),
|
|
1993
2143
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1994
2144
|
country_code: Joi.string().allow(""),
|
|
@@ -1998,20 +2148,29 @@ class CartApplicationModel {
|
|
|
1998
2148
|
area_code: Joi.string().allow(""),
|
|
1999
2149
|
email: Joi.string().allow(""),
|
|
2000
2150
|
state: Joi.string().allow(""),
|
|
2001
|
-
meta: Joi.any(),
|
|
2151
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2002
2152
|
});
|
|
2003
2153
|
}
|
|
2004
2154
|
|
|
2005
|
-
/** @returns {
|
|
2006
|
-
static
|
|
2155
|
+
/** @returns {ValidationConfig} */
|
|
2156
|
+
static ValidationConfig() {
|
|
2157
|
+
return Joi.object({
|
|
2158
|
+
address_max_limit: Joi.number().required(),
|
|
2159
|
+
user_address_count: Joi.number().required(),
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
/** @returns {GetAddressesResult} */
|
|
2164
|
+
static GetAddressesResult() {
|
|
2007
2165
|
return Joi.object({
|
|
2008
2166
|
pii_masking: Joi.boolean(),
|
|
2009
2167
|
address: Joi.array().items(CartApplicationModel.Address()),
|
|
2168
|
+
validation_config: CartApplicationModel.ValidationConfig(),
|
|
2010
2169
|
});
|
|
2011
2170
|
}
|
|
2012
2171
|
|
|
2013
|
-
/** @returns {
|
|
2014
|
-
static
|
|
2172
|
+
/** @returns {SaveAddressResult} */
|
|
2173
|
+
static SaveAddressResult() {
|
|
2015
2174
|
return Joi.object({
|
|
2016
2175
|
id: Joi.string().allow(""),
|
|
2017
2176
|
success: Joi.boolean(),
|
|
@@ -2019,8 +2178,8 @@ class CartApplicationModel {
|
|
|
2019
2178
|
});
|
|
2020
2179
|
}
|
|
2021
2180
|
|
|
2022
|
-
/** @returns {
|
|
2023
|
-
static
|
|
2181
|
+
/** @returns {UpdateAddressResult} */
|
|
2182
|
+
static UpdateAddressResult() {
|
|
2024
2183
|
return Joi.object({
|
|
2025
2184
|
is_updated: Joi.boolean(),
|
|
2026
2185
|
id: Joi.string().allow(""),
|
|
@@ -2029,16 +2188,16 @@ class CartApplicationModel {
|
|
|
2029
2188
|
});
|
|
2030
2189
|
}
|
|
2031
2190
|
|
|
2032
|
-
/** @returns {
|
|
2033
|
-
static
|
|
2191
|
+
/** @returns {DeleteAddressResult} */
|
|
2192
|
+
static DeleteAddressResult() {
|
|
2034
2193
|
return Joi.object({
|
|
2035
2194
|
id: Joi.string().allow(""),
|
|
2036
2195
|
is_deleted: Joi.boolean(),
|
|
2037
2196
|
});
|
|
2038
2197
|
}
|
|
2039
2198
|
|
|
2040
|
-
/** @returns {
|
|
2041
|
-
static
|
|
2199
|
+
/** @returns {SelectCartAddressCreation} */
|
|
2200
|
+
static SelectCartAddressCreation() {
|
|
2042
2201
|
return Joi.object({
|
|
2043
2202
|
id: Joi.string().allow(""),
|
|
2044
2203
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -2046,8 +2205,8 @@ class CartApplicationModel {
|
|
|
2046
2205
|
});
|
|
2047
2206
|
}
|
|
2048
2207
|
|
|
2049
|
-
/** @returns {
|
|
2050
|
-
static
|
|
2208
|
+
/** @returns {UpdateCartPaymentCreation} */
|
|
2209
|
+
static UpdateCartPaymentCreation() {
|
|
2051
2210
|
return Joi.object({
|
|
2052
2211
|
id: Joi.string().allow(""),
|
|
2053
2212
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
@@ -2067,6 +2226,7 @@ class CartApplicationModel {
|
|
|
2067
2226
|
valid: Joi.boolean(),
|
|
2068
2227
|
display_message_en: Joi.string().allow("").allow(null),
|
|
2069
2228
|
code: Joi.string().allow("").allow(null),
|
|
2229
|
+
error_en: Joi.string().allow("").allow(null),
|
|
2070
2230
|
});
|
|
2071
2231
|
}
|
|
2072
2232
|
|
|
@@ -2079,15 +2239,15 @@ class CartApplicationModel {
|
|
|
2079
2239
|
});
|
|
2080
2240
|
}
|
|
2081
2241
|
|
|
2082
|
-
/** @returns {
|
|
2083
|
-
static
|
|
2242
|
+
/** @returns {ShipmentResult} */
|
|
2243
|
+
static ShipmentResult() {
|
|
2084
2244
|
return Joi.object({
|
|
2085
2245
|
shipments: Joi.number(),
|
|
2086
2246
|
promise: CartApplicationModel.ShipmentPromise(),
|
|
2087
2247
|
order_type: Joi.string().allow(""),
|
|
2088
2248
|
box_type: Joi.string().allow("").allow(null),
|
|
2089
2249
|
shipment_type: Joi.string().allow(""),
|
|
2090
|
-
dp_options: Joi.any().allow(null),
|
|
2250
|
+
dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
2091
2251
|
dp_id: Joi.string().allow("").allow(null),
|
|
2092
2252
|
items: Joi.array().items(CartApplicationModel.CartProductInfo()),
|
|
2093
2253
|
fulfillment_type: Joi.string().allow(""),
|
|
@@ -2095,8 +2255,8 @@ class CartApplicationModel {
|
|
|
2095
2255
|
});
|
|
2096
2256
|
}
|
|
2097
2257
|
|
|
2098
|
-
/** @returns {
|
|
2099
|
-
static
|
|
2258
|
+
/** @returns {CartShipmentsResult} */
|
|
2259
|
+
static CartShipmentsResult() {
|
|
2100
2260
|
return Joi.object({
|
|
2101
2261
|
delivery_charge_info: Joi.string().allow(""),
|
|
2102
2262
|
checkout_mode: Joi.string().allow(""),
|
|
@@ -2109,7 +2269,7 @@ class CartApplicationModel {
|
|
|
2109
2269
|
breakup_values: CartApplicationModel.CartBreakup(),
|
|
2110
2270
|
currency: CartApplicationModel.CartCurrency(),
|
|
2111
2271
|
id: Joi.string().allow(""),
|
|
2112
|
-
shipments: Joi.array().items(CartApplicationModel.
|
|
2272
|
+
shipments: Joi.array().items(CartApplicationModel.ShipmentResult()),
|
|
2113
2273
|
payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
|
|
2114
2274
|
coupon_text: Joi.string().allow(""),
|
|
2115
2275
|
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
@@ -2117,7 +2277,15 @@ class CartApplicationModel {
|
|
|
2117
2277
|
comment: Joi.string().allow(""),
|
|
2118
2278
|
buy_now: Joi.boolean(),
|
|
2119
2279
|
uid: Joi.string().allow(""),
|
|
2120
|
-
custom_cart_meta: Joi.any(),
|
|
2280
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
/** @returns {CartCheckoutCustomMeta} */
|
|
2285
|
+
static CartCheckoutCustomMeta() {
|
|
2286
|
+
return Joi.object({
|
|
2287
|
+
key: Joi.string().allow("").required(),
|
|
2288
|
+
value: Joi.string().allow("").required(),
|
|
2121
2289
|
});
|
|
2122
2290
|
}
|
|
2123
2291
|
|
|
@@ -2141,6 +2309,38 @@ class CartApplicationModel {
|
|
|
2141
2309
|
});
|
|
2142
2310
|
}
|
|
2143
2311
|
|
|
2312
|
+
/** @returns {CartCheckoutDetailCreation} */
|
|
2313
|
+
static CartCheckoutDetailCreation() {
|
|
2314
|
+
return Joi.object({
|
|
2315
|
+
custom_meta: Joi.array().items(
|
|
2316
|
+
CartApplicationModel.CartCheckoutCustomMeta()
|
|
2317
|
+
),
|
|
2318
|
+
customer_details: CartApplicationModel.CustomerDetails(),
|
|
2319
|
+
merchant_code: Joi.string().allow(""),
|
|
2320
|
+
id: Joi.string().allow(""),
|
|
2321
|
+
payment_auto_confirm: Joi.boolean(),
|
|
2322
|
+
payment_mode: Joi.string().allow("").required(),
|
|
2323
|
+
aggregator: Joi.string().allow(""),
|
|
2324
|
+
address_id: Joi.string().allow(""),
|
|
2325
|
+
callback_url: Joi.string().allow(""),
|
|
2326
|
+
delivery_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
2327
|
+
staff: CartApplicationModel.StaffCheckout(),
|
|
2328
|
+
order_type: Joi.string().allow(""),
|
|
2329
|
+
ordering_store: Joi.number(),
|
|
2330
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2331
|
+
payment_identifier: Joi.string().allow(""),
|
|
2332
|
+
billing_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
2333
|
+
payment_params: Joi.object().pattern(/\S/, Joi.any()),
|
|
2334
|
+
billing_address_id: Joi.string().allow(""),
|
|
2335
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2336
|
+
payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
2337
|
+
iin: Joi.string().allow(""),
|
|
2338
|
+
network: Joi.string().allow(""),
|
|
2339
|
+
type: Joi.string().allow(""),
|
|
2340
|
+
card_id: Joi.string().allow(""),
|
|
2341
|
+
});
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2144
2344
|
/** @returns {CheckCart} */
|
|
2145
2345
|
static CheckCart() {
|
|
2146
2346
|
return Joi.object({
|
|
@@ -2173,19 +2373,19 @@ class CartApplicationModel {
|
|
|
2173
2373
|
coupon_text: Joi.string().allow(""),
|
|
2174
2374
|
buy_now: Joi.boolean(),
|
|
2175
2375
|
cod_charges: Joi.number(),
|
|
2176
|
-
custom_cart_meta: Joi.any(),
|
|
2376
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2177
2377
|
});
|
|
2178
2378
|
}
|
|
2179
2379
|
|
|
2180
|
-
/** @returns {
|
|
2181
|
-
static
|
|
2380
|
+
/** @returns {CartCheckoutResult} */
|
|
2381
|
+
static CartCheckoutResult() {
|
|
2182
2382
|
return Joi.object({
|
|
2183
2383
|
payment_confirm_url: Joi.string().allow(""),
|
|
2184
2384
|
app_intercept_url: Joi.string().allow(""),
|
|
2185
2385
|
success: Joi.boolean(),
|
|
2186
2386
|
callback_url: Joi.string().allow(""),
|
|
2187
2387
|
message: Joi.string().allow(""),
|
|
2188
|
-
data: Joi.any(),
|
|
2388
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
2189
2389
|
order_id: Joi.string().allow(""),
|
|
2190
2390
|
cart: CartApplicationModel.CheckCart(),
|
|
2191
2391
|
});
|
|
@@ -2206,44 +2406,44 @@ class CartApplicationModel {
|
|
|
2206
2406
|
});
|
|
2207
2407
|
}
|
|
2208
2408
|
|
|
2209
|
-
/** @returns {
|
|
2210
|
-
static
|
|
2409
|
+
/** @returns {CartMetaCreation} */
|
|
2410
|
+
static CartMetaCreation() {
|
|
2211
2411
|
return Joi.object({
|
|
2212
|
-
delivery_slots: Joi.any(),
|
|
2412
|
+
delivery_slots: Joi.object().pattern(/\S/, Joi.any()),
|
|
2213
2413
|
gift_details: CartApplicationModel.ArticleGiftDetail(),
|
|
2214
|
-
pick_up_customer_details: Joi.any(),
|
|
2414
|
+
pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
|
|
2215
2415
|
checkout_mode: Joi.string().allow(""),
|
|
2216
2416
|
comment: Joi.string().allow(""),
|
|
2217
2417
|
gstin: Joi.string().allow(""),
|
|
2218
|
-
custom_cart_meta: Joi.any(),
|
|
2418
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2219
2419
|
});
|
|
2220
2420
|
}
|
|
2221
2421
|
|
|
2222
|
-
/** @returns {
|
|
2223
|
-
static
|
|
2422
|
+
/** @returns {CartMetaResult} */
|
|
2423
|
+
static CartMetaResult() {
|
|
2224
2424
|
return Joi.object({
|
|
2225
2425
|
message: Joi.string().allow(""),
|
|
2226
2426
|
is_valid: Joi.boolean(),
|
|
2227
2427
|
});
|
|
2228
2428
|
}
|
|
2229
2429
|
|
|
2230
|
-
/** @returns {
|
|
2231
|
-
static
|
|
2430
|
+
/** @returns {CartMetaMissingResult} */
|
|
2431
|
+
static CartMetaMissingResult() {
|
|
2232
2432
|
return Joi.object({
|
|
2233
2433
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
2234
2434
|
});
|
|
2235
2435
|
}
|
|
2236
2436
|
|
|
2237
|
-
/** @returns {
|
|
2238
|
-
static
|
|
2437
|
+
/** @returns {GetShareCartLinkCreation} */
|
|
2438
|
+
static GetShareCartLinkCreation() {
|
|
2239
2439
|
return Joi.object({
|
|
2240
2440
|
id: Joi.string().allow(""),
|
|
2241
|
-
meta: Joi.any(),
|
|
2441
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2242
2442
|
});
|
|
2243
2443
|
}
|
|
2244
2444
|
|
|
2245
|
-
/** @returns {
|
|
2246
|
-
static
|
|
2445
|
+
/** @returns {GetShareCartLinkResult} */
|
|
2446
|
+
static GetShareCartLinkResult() {
|
|
2247
2447
|
return Joi.object({
|
|
2248
2448
|
token: Joi.string().allow(""),
|
|
2249
2449
|
share_url: Joi.string().allow(""),
|
|
@@ -2254,10 +2454,10 @@ class CartApplicationModel {
|
|
|
2254
2454
|
static SharedCartDetails() {
|
|
2255
2455
|
return Joi.object({
|
|
2256
2456
|
token: Joi.string().allow(""),
|
|
2257
|
-
user: Joi.any(),
|
|
2457
|
+
user: Joi.object().pattern(/\S/, Joi.any()),
|
|
2258
2458
|
created_on: Joi.string().allow(""),
|
|
2259
|
-
source: Joi.any(),
|
|
2260
|
-
meta: Joi.any(),
|
|
2459
|
+
source: Joi.object().pattern(/\S/, Joi.any()),
|
|
2460
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2261
2461
|
});
|
|
2262
2462
|
}
|
|
2263
2463
|
|
|
@@ -2283,12 +2483,12 @@ class CartApplicationModel {
|
|
|
2283
2483
|
currency: CartApplicationModel.CartCurrency(),
|
|
2284
2484
|
coupon_text: Joi.string().allow(""),
|
|
2285
2485
|
buy_now: Joi.boolean(),
|
|
2286
|
-
custom_cart_meta: Joi.any(),
|
|
2486
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2287
2487
|
});
|
|
2288
2488
|
}
|
|
2289
2489
|
|
|
2290
|
-
/** @returns {
|
|
2291
|
-
static
|
|
2490
|
+
/** @returns {SharedCartResult} */
|
|
2491
|
+
static SharedCartResult() {
|
|
2292
2492
|
return Joi.object({
|
|
2293
2493
|
error: Joi.string().allow(""),
|
|
2294
2494
|
cart: CartApplicationModel.SharedCart(),
|
|
@@ -2312,14 +2512,25 @@ class CartApplicationModel {
|
|
|
2312
2512
|
});
|
|
2313
2513
|
}
|
|
2314
2514
|
|
|
2515
|
+
/** @returns {ArticlePriceDetails} */
|
|
2516
|
+
static ArticlePriceDetails() {
|
|
2517
|
+
return Joi.object({
|
|
2518
|
+
marked: Joi.number(),
|
|
2519
|
+
effective: Joi.number(),
|
|
2520
|
+
});
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2315
2523
|
/** @returns {FreeGiftItems} */
|
|
2316
2524
|
static FreeGiftItems() {
|
|
2317
2525
|
return Joi.object({
|
|
2318
2526
|
item_slug: Joi.string().allow(""),
|
|
2319
2527
|
item_name: Joi.string().allow(""),
|
|
2320
2528
|
item_price_details: CartApplicationModel.ItemPriceDetails(),
|
|
2529
|
+
article_price: CartApplicationModel.ArticlePriceDetails(),
|
|
2321
2530
|
item_brand_name: Joi.string().allow(""),
|
|
2322
2531
|
item_id: Joi.number(),
|
|
2532
|
+
available_sizes: Joi.array().items(Joi.string().allow("")),
|
|
2533
|
+
size: Joi.string().allow(""),
|
|
2323
2534
|
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
2324
2535
|
});
|
|
2325
2536
|
}
|
|
@@ -2328,7 +2539,7 @@ class CartApplicationModel {
|
|
|
2328
2539
|
static PromotionOffer() {
|
|
2329
2540
|
return Joi.object({
|
|
2330
2541
|
id: Joi.string().allow(""),
|
|
2331
|
-
buy_rules: Joi.any(),
|
|
2542
|
+
buy_rules: Joi.object().pattern(/\S/, Joi.any()),
|
|
2332
2543
|
offer_text: Joi.string().allow(""),
|
|
2333
2544
|
promotion_type: Joi.string().allow(""),
|
|
2334
2545
|
promotion_name: Joi.string().allow(""),
|
|
@@ -2340,8 +2551,8 @@ class CartApplicationModel {
|
|
|
2340
2551
|
});
|
|
2341
2552
|
}
|
|
2342
2553
|
|
|
2343
|
-
/** @returns {
|
|
2344
|
-
static
|
|
2554
|
+
/** @returns {PromotionOffersResult} */
|
|
2555
|
+
static PromotionOffersResult() {
|
|
2345
2556
|
return Joi.object({
|
|
2346
2557
|
available_promotions: Joi.array().items(
|
|
2347
2558
|
CartApplicationModel.PromotionOffer()
|
|
@@ -2365,8 +2576,8 @@ class CartApplicationModel {
|
|
|
2365
2576
|
});
|
|
2366
2577
|
}
|
|
2367
2578
|
|
|
2368
|
-
/** @returns {
|
|
2369
|
-
static
|
|
2579
|
+
/** @returns {PromotionPaymentOffersResult} */
|
|
2580
|
+
static PromotionPaymentOffersResult() {
|
|
2370
2581
|
return Joi.object({
|
|
2371
2582
|
success: Joi.boolean(),
|
|
2372
2583
|
promotions: Joi.array().items(
|
|
@@ -2375,8 +2586,8 @@ class CartApplicationModel {
|
|
|
2375
2586
|
});
|
|
2376
2587
|
}
|
|
2377
2588
|
|
|
2378
|
-
/** @returns {
|
|
2379
|
-
static
|
|
2589
|
+
/** @returns {OperationErrorResult} */
|
|
2590
|
+
static OperationErrorResult() {
|
|
2380
2591
|
return Joi.object({
|
|
2381
2592
|
message: Joi.string().allow(""),
|
|
2382
2593
|
success: Joi.boolean(),
|
|
@@ -2409,7 +2620,7 @@ class CartApplicationModel {
|
|
|
2409
2620
|
static LadderPriceOffer() {
|
|
2410
2621
|
return Joi.object({
|
|
2411
2622
|
id: Joi.string().allow(""),
|
|
2412
|
-
buy_rules: Joi.any(),
|
|
2623
|
+
buy_rules: Joi.object().pattern(/\S/, Joi.any()),
|
|
2413
2624
|
calculate_on: Joi.string().allow(""),
|
|
2414
2625
|
offer_text: Joi.string().allow(""),
|
|
2415
2626
|
promotion_group: Joi.string().allow(""),
|
|
@@ -2457,15 +2668,17 @@ class CartApplicationModel {
|
|
|
2457
2668
|
payment: Joi.string().allow(""),
|
|
2458
2669
|
amount: Joi.number().allow(null),
|
|
2459
2670
|
name: Joi.string().allow(""),
|
|
2460
|
-
payment_extra_identifiers: Joi.any(),
|
|
2671
|
+
payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
2461
2672
|
});
|
|
2462
2673
|
}
|
|
2463
2674
|
|
|
2464
|
-
/** @returns {
|
|
2465
|
-
static
|
|
2675
|
+
/** @returns {CartCheckoutDetailV2Creation} */
|
|
2676
|
+
static CartCheckoutDetailV2Creation() {
|
|
2466
2677
|
return Joi.object({
|
|
2467
|
-
custom_meta: Joi.
|
|
2468
|
-
|
|
2678
|
+
custom_meta: Joi.array().items(
|
|
2679
|
+
CartApplicationModel.CartCheckoutCustomMeta()
|
|
2680
|
+
),
|
|
2681
|
+
customer_details: CartApplicationModel.CustomerDetails(),
|
|
2469
2682
|
merchant_code: Joi.string().allow(""),
|
|
2470
2683
|
cart_id: Joi.string().allow(""),
|
|
2471
2684
|
id: Joi.string().allow("").allow(null),
|
|
@@ -2477,21 +2690,29 @@ class CartApplicationModel {
|
|
|
2477
2690
|
aggregator: Joi.string().allow(""),
|
|
2478
2691
|
address_id: Joi.string().allow(""),
|
|
2479
2692
|
callback_url: Joi.string().allow("").allow(null),
|
|
2480
|
-
delivery_address: Joi.any(),
|
|
2693
|
+
delivery_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
2481
2694
|
staff: CartApplicationModel.StaffCheckout(),
|
|
2482
2695
|
order_type: Joi.string().allow(""),
|
|
2483
2696
|
ordering_store: Joi.number().allow(null),
|
|
2484
|
-
extra_meta: Joi.any(),
|
|
2697
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2485
2698
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
2486
|
-
billing_address: Joi.any(),
|
|
2487
|
-
payment_params: Joi.any().allow(null),
|
|
2699
|
+
billing_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
2700
|
+
payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
2488
2701
|
billing_address_id: Joi.string().allow(""),
|
|
2489
|
-
meta: Joi.any(),
|
|
2702
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2490
2703
|
iin: Joi.string().allow(""),
|
|
2491
2704
|
network: Joi.string().allow(""),
|
|
2492
2705
|
type: Joi.string().allow(""),
|
|
2493
2706
|
card_id: Joi.string().allow(""),
|
|
2494
2707
|
});
|
|
2495
2708
|
}
|
|
2709
|
+
|
|
2710
|
+
/** @returns {ValidationError} */
|
|
2711
|
+
static ValidationError() {
|
|
2712
|
+
return Joi.object({
|
|
2713
|
+
message: Joi.string().allow("").required(),
|
|
2714
|
+
field: Joi.string().allow("").required(),
|
|
2715
|
+
});
|
|
2716
|
+
}
|
|
2496
2717
|
}
|
|
2497
2718
|
module.exports = CartApplicationModel;
|