@gofynd/fdk-client-javascript 1.4.16-beta.4 → 1.4.16-beta.5
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 +68 -48
- package/sdk/application/Cart/CartApplicationClient.js +118 -27
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +59 -58
- package/sdk/application/Catalog/CatalogApplicationClient.js +30 -29
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -30
- package/sdk/application/Content/ContentApplicationClient.js +161 -56
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +35 -15
- package/sdk/application/Logistic/LogisticApplicationClient.js +101 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -12
- package/sdk/application/Order/OrderApplicationClient.js +56 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
- package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +4 -2
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +6 -6
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- 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 -21
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -16
- 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 +1200 -167
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
- 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 +419 -115
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5070 -1296
- package/sdk/platform/Cart/CartPlatformModel.js +1992 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6512 -1770
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3228 -1687
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +204 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1076 -478
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +253 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +256 -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 +1372 -400
- package/sdk/platform/Content/ContentPlatformModel.js +631 -394
- 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 +95 -39
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -63
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -22
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -24
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -116
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -104
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +416 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7607 -1267
- package/sdk/platform/Order/OrderPlatformModel.js +3929 -1269
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1842 -609
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +886 -554
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +46 -7
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- 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 +810 -6
- 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
|
@@ -2,65 +2,74 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef CouponDateMeta
|
|
5
|
-
* @property {string} [modified_on]
|
|
6
|
-
* @property {string} [created_on]
|
|
5
|
+
* @property {string} [modified_on] - Date time format when the coupon last modified
|
|
6
|
+
* @property {string} [created_on] - Date time format when the coupon created
|
|
7
|
+
* @property {string} [approved_on] - Date time format when the coupon approved
|
|
8
|
+
* @property {string} [rejected_on] - Date time format when the coupon rejected
|
|
9
|
+
* @property {string} [reviewed_on] - Date time format when the coupon reviewed
|
|
7
10
|
*/
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* @typedef Ownership
|
|
11
|
-
* @property {string} payable_category
|
|
12
|
-
* @property {string} payable_by
|
|
14
|
+
* @property {string} payable_category - Coupon amount payable category
|
|
15
|
+
* @property {string} [payable_by] - Coupon amount bearable party
|
|
13
16
|
*/
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* @typedef CouponAuthor
|
|
17
|
-
* @property {string} [created_by]
|
|
18
|
-
* @property {string} [modified_by]
|
|
20
|
+
* @property {string} [created_by] - The user id of user, who has created the coupon
|
|
21
|
+
* @property {string} [modified_by] - The user id of user, who has modified the coupon
|
|
22
|
+
* @property {string} [approved_by] - The user id of user, who has approved the coupon
|
|
23
|
+
* @property {string} [rejected_by] - The user id of user, who has rejected the coupon
|
|
24
|
+
* @property {string} [reviewed_by] - The user id of user, who has reviewed the coupon
|
|
19
25
|
*/
|
|
20
26
|
|
|
21
27
|
/**
|
|
22
28
|
* @typedef State
|
|
23
|
-
* @property {boolean} [is_archived]
|
|
24
|
-
* @property {boolean} [is_display]
|
|
25
|
-
* @property {boolean} [is_public]
|
|
29
|
+
* @property {boolean} [is_archived] - Publish or unpublish the coupon
|
|
30
|
+
* @property {boolean} [is_display] - Coupon needs to display or not
|
|
31
|
+
* @property {boolean} [is_public] - Coupon is publicaly available or not
|
|
26
32
|
*/
|
|
27
33
|
|
|
28
34
|
/**
|
|
29
35
|
* @typedef PaymentAllowValue
|
|
30
|
-
* @property {number} [max]
|
|
36
|
+
* @property {number} [max] - Maximum value need to allow for payment
|
|
31
37
|
*/
|
|
32
38
|
|
|
33
39
|
/**
|
|
34
40
|
* @typedef PaymentModes
|
|
35
|
-
* @property {string[]} [codes]
|
|
36
|
-
*
|
|
37
|
-
* @property {string[]} [
|
|
38
|
-
* @property {string[]} [
|
|
41
|
+
* @property {string[]} [codes] - Identifier used by payment gateway for a given
|
|
42
|
+
* payment mode, e.g. NB_ICIC, PAYTM
|
|
43
|
+
* @property {string[]} [iins] - Debit/Credit card prefix (first 6 digit)
|
|
44
|
+
* @property {string[]} [types] - Card type, e.g. Credit, Debit
|
|
45
|
+
* @property {string[]} [networks] - Credit/Debit card issuer, e.g. VISA,
|
|
46
|
+
* MASTERCARD, RUPAY
|
|
39
47
|
* @property {PaymentAllowValue} [uses]
|
|
40
48
|
*/
|
|
41
49
|
|
|
42
50
|
/**
|
|
43
51
|
* @typedef PriceRange
|
|
44
|
-
* @property {number} [max]
|
|
45
|
-
* @property {number} [min]
|
|
52
|
+
* @property {number} [max] - Max price valid for article in coupon
|
|
53
|
+
* @property {number} [min] - Min price valid for article in coupon
|
|
46
54
|
*/
|
|
47
55
|
|
|
48
56
|
/**
|
|
49
57
|
* @typedef PostOrder
|
|
50
|
-
* @property {boolean} [cancellation_allowed]
|
|
51
|
-
* @property {boolean} [return_allowed]
|
|
58
|
+
* @property {boolean} [cancellation_allowed] - Cancellation allowed in coupon
|
|
59
|
+
* @property {boolean} [return_allowed] - Return allowed in coupon
|
|
52
60
|
*/
|
|
53
61
|
|
|
54
62
|
/**
|
|
55
63
|
* @typedef BulkBundleRestriction
|
|
56
|
-
* @property {boolean} multi_store_allowed
|
|
64
|
+
* @property {boolean} multi_store_allowed - Multi store allowed in bulk bundle
|
|
65
|
+
* coupon or not
|
|
57
66
|
*/
|
|
58
67
|
|
|
59
68
|
/**
|
|
60
69
|
* @typedef UsesRemaining
|
|
61
|
-
* @property {number} [user]
|
|
62
|
-
* @property {number} [total]
|
|
63
|
-
* @property {number} [app]
|
|
70
|
+
* @property {number} [user] - Define total coupon count per user
|
|
71
|
+
* @property {number} [total] - Define total coupon counts
|
|
72
|
+
* @property {number} [app] - Define coupon counts associated with application id
|
|
64
73
|
*/
|
|
65
74
|
|
|
66
75
|
/**
|
|
@@ -71,115 +80,131 @@ const Joi = require("joi");
|
|
|
71
80
|
|
|
72
81
|
/**
|
|
73
82
|
* @typedef Restrictions
|
|
74
|
-
* @property {
|
|
83
|
+
* @property {PaymentModes} [payments]
|
|
75
84
|
* @property {string} [user_type]
|
|
76
85
|
* @property {PriceRange} [price_range]
|
|
77
|
-
* @property {string[]} [platforms]
|
|
86
|
+
* @property {string[]} [platforms] - List of platform on which coupon allowed
|
|
87
|
+
* like web, android
|
|
78
88
|
* @property {PostOrder} [post_order]
|
|
79
89
|
* @property {BulkBundleRestriction} [bulk_bundle]
|
|
80
|
-
* @property {number[]} [user_groups]
|
|
81
|
-
* @property {boolean} [coupon_allowed]
|
|
90
|
+
* @property {number[]} [user_groups] - List of user group on which coupon allowed
|
|
91
|
+
* @property {boolean} [coupon_allowed] - Allow applying normal coupon if bulk
|
|
92
|
+
* coupon is applied
|
|
82
93
|
* @property {UsesRestriction} [uses]
|
|
83
|
-
* @property {number[]} [ordering_stores]
|
|
94
|
+
* @property {number[]} [ordering_stores] - List of store id on which coupon allowed
|
|
84
95
|
*/
|
|
85
96
|
|
|
86
97
|
/**
|
|
87
98
|
* @typedef Validation
|
|
88
|
-
* @property {string[]} [app_id]
|
|
89
|
-
* @property {boolean} [anonymous]
|
|
90
|
-
* @property {string} [user_registered_after]
|
|
99
|
+
* @property {string[]} [app_id] - List of sales channel's application id
|
|
100
|
+
* @property {boolean} [anonymous] - Coupon applicable for guest user or not
|
|
101
|
+
* @property {string} [user_registered_after] - Coupon applicable for user which
|
|
102
|
+
* is registered after Date Format
|
|
91
103
|
*/
|
|
92
104
|
|
|
93
105
|
/**
|
|
94
106
|
* @typedef CouponAction
|
|
95
|
-
* @property {string} [action_date]
|
|
96
|
-
* @property {string} [txn_mode]
|
|
107
|
+
* @property {string} [action_date] - Coupon transaction mode's date time format
|
|
108
|
+
* @property {string} [txn_mode] - Coupon transaction mode like cash, coupon etc
|
|
97
109
|
*/
|
|
98
110
|
|
|
99
111
|
/**
|
|
100
112
|
* @typedef CouponSchedule
|
|
101
|
-
* @property {string} [end]
|
|
102
|
-
* @property {string} [start]
|
|
103
|
-
* @property {Object[]} [next_schedule]
|
|
104
|
-
*
|
|
105
|
-
* @property {
|
|
113
|
+
* @property {string} [end] - The end date of coupon
|
|
114
|
+
* @property {string} [start] - The start date of coupon
|
|
115
|
+
* @property {Object[]} [next_schedule] - List of date time, which we will
|
|
116
|
+
* schedule the promotion
|
|
117
|
+
* @property {string} [cron] - Schedule the cron to run your job periodically
|
|
118
|
+
* @property {string} [status] - Coupon status like draft, review
|
|
119
|
+
* @property {number} [duration] - Time in minutes for execution
|
|
106
120
|
*/
|
|
107
121
|
|
|
108
122
|
/**
|
|
109
123
|
* @typedef Rule
|
|
110
|
-
* @property {number} [key]
|
|
111
|
-
*
|
|
112
|
-
* @property {number} [
|
|
113
|
-
* @property {number} [
|
|
114
|
-
* @property {number} [
|
|
124
|
+
* @property {number} [key] - Key defines the number of product should be buy
|
|
125
|
+
* for applicability of cart
|
|
126
|
+
* @property {number} [value] - Value defines discount percentage in coupon
|
|
127
|
+
* @property {number} [max] - Max defines maximum number of discount amount in coupon
|
|
128
|
+
* @property {number} [discount_qty] - Discount_qty defines free quantity as
|
|
129
|
+
* discount in coupon
|
|
130
|
+
* @property {number} [min] - Min defines minimum number of discount amount in coupon
|
|
115
131
|
*/
|
|
116
132
|
|
|
117
133
|
/**
|
|
118
134
|
* @typedef DisplayMetaDict
|
|
119
|
-
* @property {string} [title]
|
|
120
|
-
* @property {string} [subtitle]
|
|
135
|
+
* @property {string} [title] - Coupon title which is used to display
|
|
136
|
+
* @property {string} [subtitle] - Coupon sub title which is used to display
|
|
121
137
|
*/
|
|
122
138
|
|
|
123
139
|
/**
|
|
124
140
|
* @typedef DisplayMeta
|
|
125
|
-
* @property {string} [title]
|
|
141
|
+
* @property {string} [title] - Coupon title which is used to display
|
|
126
142
|
* @property {DisplayMetaDict} [auto]
|
|
127
143
|
* @property {DisplayMetaDict} [apply]
|
|
128
144
|
* @property {DisplayMetaDict} [remove]
|
|
129
|
-
* @property {string} [subtitle]
|
|
130
|
-
* @property {string} [description]
|
|
145
|
+
* @property {string} [subtitle] - Coupon sub title which is used to display
|
|
146
|
+
* @property {string} [description] - Detail about the offers in coupon
|
|
131
147
|
*/
|
|
132
148
|
|
|
133
149
|
/**
|
|
134
150
|
* @typedef Identifier
|
|
135
|
-
* @property {number[]} [brand_id]
|
|
136
|
-
* @property {string[]} [email_domain]
|
|
137
|
-
* @property {number[]} [company_id]
|
|
138
|
-
* @property {number[]} [store_id]
|
|
139
|
-
* @property {string[]} [collection_id]
|
|
140
|
-
* @property {number[]} [item_id]
|
|
141
|
-
* @property {string[]} [user_id]
|
|
142
|
-
* @property {number[]} [category_id]
|
|
143
|
-
* @property {string[]} [article_id]
|
|
144
|
-
* @property {number[]} [exclude_brand_id]
|
|
151
|
+
* @property {number[]} [brand_id] - List of brand id available for coupon
|
|
152
|
+
* @property {string[]} [email_domain] - List of email domain available for coupon
|
|
153
|
+
* @property {number[]} [company_id] - List of company id available for coupon
|
|
154
|
+
* @property {number[]} [store_id] - List of store id available for coupon
|
|
155
|
+
* @property {string[]} [collection_id] - List of collection id available for coupon
|
|
156
|
+
* @property {number[]} [item_id] - List of item id available for coupon
|
|
157
|
+
* @property {string[]} [user_id] - List of user id available for coupon
|
|
158
|
+
* @property {number[]} [category_id] - List of category id available for coupon
|
|
159
|
+
* @property {string[]} [article_id] - List of article id available for coupon
|
|
160
|
+
* @property {number[]} [exclude_brand_id] - List of brand id should not be
|
|
161
|
+
* available for coupon
|
|
145
162
|
*/
|
|
146
163
|
|
|
147
164
|
/**
|
|
148
165
|
* @typedef Validity
|
|
149
|
-
* @property {number} [priority]
|
|
166
|
+
* @property {number} [priority] - Priority of coupon to show in list
|
|
150
167
|
*/
|
|
151
168
|
|
|
152
169
|
/**
|
|
153
170
|
* @typedef RuleDefinition
|
|
154
|
-
* @property {string} [currency_code]
|
|
155
|
-
* @property {boolean} [auto_apply]
|
|
156
|
-
* @property {string} type
|
|
157
|
-
* @property {boolean} [is_exact]
|
|
158
|
-
*
|
|
159
|
-
* @property {string}
|
|
160
|
-
*
|
|
161
|
-
* @property {string
|
|
171
|
+
* @property {string} [currency_code] - Currency code like INR
|
|
172
|
+
* @property {boolean} [auto_apply] - Coupon should be auto apply or not
|
|
173
|
+
* @property {string} [type] - Type of coupon like absolute, percentage etc.
|
|
174
|
+
* @property {boolean} [is_exact] - Flag is true then use coupon applicable
|
|
175
|
+
* articles for calculation
|
|
176
|
+
* @property {string} [applicable_on] - Coupon will be applicable on either
|
|
177
|
+
* amount or quantity
|
|
178
|
+
* @property {string} [calculate_on] - Article Price on which coupon calculated
|
|
179
|
+
* like effective price or marked price
|
|
180
|
+
* @property {string} [value_type] - Define the type of coupon value
|
|
181
|
+
* @property {string[]} [scope] - List of item level rule applicable for coupon
|
|
162
182
|
*/
|
|
163
183
|
|
|
164
184
|
/**
|
|
165
185
|
* @typedef CouponAdd
|
|
166
186
|
* @property {CouponDateMeta} [date_meta]
|
|
167
|
-
* @property {Ownership} ownership
|
|
187
|
+
* @property {Ownership} [ownership]
|
|
168
188
|
* @property {CouponAuthor} [author]
|
|
169
189
|
* @property {State} [state]
|
|
170
190
|
* @property {Restrictions} [restrictions]
|
|
171
191
|
* @property {Validation} [validation]
|
|
172
192
|
* @property {CouponAction} [action]
|
|
173
|
-
* @property {string
|
|
193
|
+
* @property {string} [coupon_type] - The type of coupon like bulk or single
|
|
194
|
+
* @property {string} [coupon_prefix] - Bulk coupon code prefix string
|
|
195
|
+
* @property {number} [coupon_counts] - Counts of bulk coupon
|
|
196
|
+
* @property {string[]} [tags] - List of tags specify to platform
|
|
174
197
|
* @property {CouponSchedule} [_schedule]
|
|
175
|
-
* @property {Rule[]} rule
|
|
176
|
-
* @property {DisplayMeta} display_meta
|
|
177
|
-
* @property {string} code
|
|
178
|
-
* @property {string} type_slug
|
|
179
|
-
* @property {Identifier} identifiers
|
|
180
|
-
* @property {Validity} validity
|
|
181
|
-
* @property {RuleDefinition} rule_definition
|
|
182
|
-
* @property {string} [_id] -
|
|
198
|
+
* @property {Rule[]} [rule]
|
|
199
|
+
* @property {DisplayMeta} [display_meta]
|
|
200
|
+
* @property {string} code - Unique code of coupon
|
|
201
|
+
* @property {string} type_slug - The type slug of coupon discount
|
|
202
|
+
* @property {Identifier} [identifiers]
|
|
203
|
+
* @property {Validity} [validity]
|
|
204
|
+
* @property {RuleDefinition} [rule_definition]
|
|
205
|
+
* @property {string} [_id] - Unique identifier of coupon
|
|
206
|
+
* @property {boolean} [is_archived] - Indicates if the coupon is in archived
|
|
207
|
+
* state or not.
|
|
183
208
|
*/
|
|
184
209
|
|
|
185
210
|
/**
|
|
@@ -194,42 +219,46 @@ const Joi = require("joi");
|
|
|
194
219
|
*/
|
|
195
220
|
|
|
196
221
|
/**
|
|
197
|
-
* @typedef
|
|
198
|
-
* @property {CouponAdd[]} [items]
|
|
222
|
+
* @typedef CouponsResult
|
|
223
|
+
* @property {CouponAdd[]} [items] - Coupons list for sales channel
|
|
199
224
|
* @property {Page} [page]
|
|
200
225
|
*/
|
|
201
226
|
|
|
202
227
|
/**
|
|
203
228
|
* @typedef SuccessMessage
|
|
204
|
-
* @property {boolean} [success]
|
|
205
|
-
* @property {string} [message]
|
|
229
|
+
* @property {boolean} [success] - Whether the request was successful (true/false).
|
|
230
|
+
* @property {string} [message] - Response message needs to display
|
|
206
231
|
*/
|
|
207
232
|
|
|
208
233
|
/**
|
|
209
|
-
* @typedef
|
|
210
|
-
* @property {boolean} [success]
|
|
211
|
-
* @property {string} [message]
|
|
212
|
-
* @property {string} [error]
|
|
234
|
+
* @typedef OperationErrorResult
|
|
235
|
+
* @property {boolean} [success] - Whether the request was successful (true/false).
|
|
236
|
+
* @property {string} [message] - Response message needs to display
|
|
237
|
+
* @property {string} [error] - Response error message in detail
|
|
213
238
|
*/
|
|
214
239
|
|
|
215
240
|
/**
|
|
216
241
|
* @typedef CouponUpdate
|
|
217
242
|
* @property {CouponDateMeta} [date_meta]
|
|
218
|
-
* @property {Ownership} ownership
|
|
243
|
+
* @property {Ownership} [ownership]
|
|
219
244
|
* @property {CouponAuthor} [author]
|
|
220
245
|
* @property {State} [state]
|
|
221
246
|
* @property {Restrictions} [restrictions]
|
|
222
247
|
* @property {Validation} [validation]
|
|
223
248
|
* @property {CouponAction} [action]
|
|
224
|
-
* @property {string[]} [tags]
|
|
249
|
+
* @property {string[]} [tags] - List of tags specify to platform
|
|
225
250
|
* @property {CouponSchedule} [_schedule]
|
|
226
|
-
* @property {Rule[]} rule
|
|
227
|
-
* @property {DisplayMeta} display_meta
|
|
228
|
-
* @property {string} code
|
|
229
|
-
* @property {string}
|
|
230
|
-
* @property {
|
|
231
|
-
* @property {
|
|
232
|
-
* @property {
|
|
251
|
+
* @property {Rule[]} [rule]
|
|
252
|
+
* @property {DisplayMeta} [display_meta]
|
|
253
|
+
* @property {string} code - Unique code that is used to apply coupon
|
|
254
|
+
* @property {string} [coupon_type] - The type of coupon like bulk or single
|
|
255
|
+
* @property {string} [coupon_prefix] - Bulk coupon code prefix string
|
|
256
|
+
* @property {number} [coupon_counts] - Counts of culk coupon
|
|
257
|
+
* @property {string} [reason] - Coupon rejection reason added by reviewer
|
|
258
|
+
* @property {string} type_slug - The type slug of coupon discount
|
|
259
|
+
* @property {Identifier} [identifiers]
|
|
260
|
+
* @property {Validity} [validity]
|
|
261
|
+
* @property {RuleDefinition} [rule_definition]
|
|
233
262
|
*/
|
|
234
263
|
|
|
235
264
|
/**
|
|
@@ -238,110 +267,150 @@ const Joi = require("joi");
|
|
|
238
267
|
* @property {CouponSchedule} [schedule]
|
|
239
268
|
*/
|
|
240
269
|
|
|
270
|
+
/**
|
|
271
|
+
* @typedef CouponCreateResult
|
|
272
|
+
* @property {boolean} [success] - Whether the request was successful (true/false)
|
|
273
|
+
* @property {string} [message] - Create coupon response message that can shown
|
|
274
|
+
* to creator user
|
|
275
|
+
* @property {string} [_id] - Unique identifier for coupon created
|
|
276
|
+
*/
|
|
277
|
+
|
|
241
278
|
/**
|
|
242
279
|
* @typedef DisplayMeta1
|
|
243
|
-
* @property {string} [description]
|
|
244
|
-
* @property {string} [offer_label]
|
|
245
|
-
* @property {string} [name]
|
|
246
|
-
* @property {string} [offer_text]
|
|
280
|
+
* @property {string} [description] - Define details about the offer in promotion
|
|
281
|
+
* @property {string} [offer_label] - Offer label of promotion that needs to display
|
|
282
|
+
* @property {string} [name] - Name of promotion that needs to display
|
|
283
|
+
* @property {string} [offer_text] - Promotion offer text used to display
|
|
247
284
|
*/
|
|
248
285
|
|
|
249
286
|
/**
|
|
250
287
|
* @typedef Ownership1
|
|
251
|
-
* @property {string} payable_category
|
|
252
|
-
* @property {string} payable_by
|
|
288
|
+
* @property {string} [payable_category] - Promotion amount payable category
|
|
289
|
+
* @property {string} [payable_by] - Promotion amount bearable party
|
|
253
290
|
*/
|
|
254
291
|
|
|
255
292
|
/**
|
|
256
293
|
* @typedef CompareObject
|
|
257
|
-
* @property {number} [equals]
|
|
258
|
-
* @property {number} [greater_than]
|
|
259
|
-
*
|
|
260
|
-
* @property {number} [
|
|
261
|
-
*
|
|
294
|
+
* @property {number} [equals] - Nummeric value must be equal to cart level rules
|
|
295
|
+
* @property {number} [greater_than] - Nummeric value must be greater than cart
|
|
296
|
+
* level rules
|
|
297
|
+
* @property {number} [less_than_equals] - Nummeric value must be less than or
|
|
298
|
+
* equal to cart level rules
|
|
299
|
+
* @property {number} [less_than] - Nummeric value must be less than cart level rules
|
|
300
|
+
* @property {number} [greater_than_equals] - Nummeric value must be greater
|
|
301
|
+
* than or equal to cart level rules
|
|
302
|
+
*/
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @typedef ItemSizeMapping
|
|
306
|
+
* @property {Object} [item_size_mapping] - Item size mapping in promotion
|
|
262
307
|
*/
|
|
263
308
|
|
|
264
309
|
/**
|
|
265
310
|
* @typedef ItemCriteria
|
|
266
311
|
* @property {CompareObject} [cart_quantity]
|
|
267
|
-
* @property {string[]} [available_zones]
|
|
268
|
-
*
|
|
269
|
-
* @property {number[]} [
|
|
270
|
-
*
|
|
312
|
+
* @property {string[]} [available_zones] - List of all zones on which promotion
|
|
313
|
+
* is applicable
|
|
314
|
+
* @property {number[]} [item_exclude_company] - List of all company id on which
|
|
315
|
+
* promotion is not applicable
|
|
316
|
+
* @property {number[]} [item_id] - List of all item ids on which promotion is applicable
|
|
317
|
+
* @property {number[]} [item_l1_category] - List of all L1 category on which
|
|
318
|
+
* promotion is applicable
|
|
271
319
|
* @property {CompareObject} [cart_total]
|
|
272
320
|
* @property {CompareObject} [cart_unique_item_quantity]
|
|
273
321
|
* @property {CompareObject} [cart_unique_item_amount]
|
|
274
|
-
* @property {number[]} [item_exclude_id]
|
|
275
|
-
*
|
|
276
|
-
* @property {
|
|
277
|
-
*
|
|
278
|
-
* @property {number[]} [
|
|
279
|
-
*
|
|
280
|
-
* @property {
|
|
281
|
-
*
|
|
282
|
-
* @property {number[]} [
|
|
283
|
-
*
|
|
284
|
-
* @property {
|
|
285
|
-
*
|
|
322
|
+
* @property {number[]} [item_exclude_id] - List of all item ids on which
|
|
323
|
+
* promotion is not applicable
|
|
324
|
+
* @property {boolean} [all_items] - Boolean flag set true to applicable the
|
|
325
|
+
* promotion for all products
|
|
326
|
+
* @property {number[]} [item_exclude_l1_category] - List of all item ids on
|
|
327
|
+
* which promotion is not applicable
|
|
328
|
+
* @property {string[]} [item_size] - List of all item sizes on which promotion
|
|
329
|
+
* is applicable
|
|
330
|
+
* @property {number[]} [item_store] - List of all item store ids on which
|
|
331
|
+
* promotion is applicable
|
|
332
|
+
* @property {string[]} [item_exclude_sku] - List of all item sku on which
|
|
333
|
+
* promotion is not applicable
|
|
334
|
+
* @property {number[]} [item_department] - List of all departments ids on which
|
|
335
|
+
* promotion is applicable
|
|
336
|
+
* @property {number[]} [item_exclude_store] - List of all item store ids on
|
|
337
|
+
* which promotion is not applicable
|
|
338
|
+
* @property {number[]} [item_brand] - List of all brand ids on which promotion
|
|
339
|
+
* is applicable
|
|
340
|
+
* @property {number[]} [item_exclude_department] - List of all department ids
|
|
341
|
+
* on which promotion is not applicable
|
|
342
|
+
* @property {number[]} [item_exclude_category] - List of all L3 category on
|
|
343
|
+
* which promotion is not applicable
|
|
344
|
+
* @property {number[]} [item_category] - List of all L3 category on which
|
|
345
|
+
* promotion is applicable
|
|
286
346
|
* @property {string[]} [buy_rules]
|
|
287
|
-
* @property {number[]} [item_exclude_brand]
|
|
288
|
-
*
|
|
289
|
-
* @property {number[]} [
|
|
290
|
-
*
|
|
291
|
-
* @property {number[]} [
|
|
292
|
-
*
|
|
347
|
+
* @property {number[]} [item_exclude_brand] - List of all brand ids on which
|
|
348
|
+
* promotion is not applicable
|
|
349
|
+
* @property {number[]} [item_l2_category] - List of all L2 category on which
|
|
350
|
+
* promotion is applicable
|
|
351
|
+
* @property {number[]} [item_company] - List of all company ids on which
|
|
352
|
+
* promotion is applicable
|
|
353
|
+
* @property {string[]} [item_tags] - List of all product tags on which
|
|
354
|
+
* promotion is applicable
|
|
355
|
+
* @property {number[]} [item_exclude_l2_category] - List of all L2 category on
|
|
356
|
+
* which promotion is not applicable
|
|
357
|
+
* @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
|
|
358
|
+
* @property {string[]} [item_exclude_product_tags]
|
|
293
359
|
*/
|
|
294
360
|
|
|
295
361
|
/**
|
|
296
362
|
* @typedef DiscountOffer
|
|
297
|
-
* @property {number} [max_discount_amount]
|
|
298
|
-
* @property {number} [discount_price]
|
|
299
|
-
* @property {boolean} [apportion_discount]
|
|
300
|
-
* @property {boolean} [partial_can_ret]
|
|
301
|
-
* @property {number} [max_usage_per_transaction]
|
|
302
|
-
*
|
|
303
|
-
* @property {
|
|
304
|
-
* @property {
|
|
305
|
-
* @property {number} [
|
|
306
|
-
* @property {number} [
|
|
363
|
+
* @property {number} [max_discount_amount] - Maximum discount amount in promotion
|
|
364
|
+
* @property {number} [discount_price] - Discount price in promotion
|
|
365
|
+
* @property {boolean} [apportion_discount] - Flag to distribute discount for each article
|
|
366
|
+
* @property {boolean} [partial_can_ret] - Flag indicated return the product partially
|
|
367
|
+
* @property {number} [max_usage_per_transaction] - Maximum usage per
|
|
368
|
+
* transaction in promotion
|
|
369
|
+
* @property {number} [min_offer_quantity] - Minimum quantity of offer in promotion
|
|
370
|
+
* @property {string} [code] - Unique code of promotion
|
|
371
|
+
* @property {number} [discount_amount] - Discount amount in promotion
|
|
372
|
+
* @property {number} [discount_percentage] - Discount percentage in promotion
|
|
373
|
+
* @property {number} [max_offer_quantity] - Maximum quantity of product in promotion
|
|
307
374
|
*/
|
|
308
375
|
|
|
309
376
|
/**
|
|
310
377
|
* @typedef DiscountRule
|
|
311
|
-
* @property {string} discount_type
|
|
312
|
-
* @property {string} buy_condition
|
|
378
|
+
* @property {string} discount_type - The type of discount in promotion
|
|
379
|
+
* @property {string} buy_condition - Promotion buy rules in offer level
|
|
313
380
|
* @property {ItemCriteria} item_criteria
|
|
381
|
+
* @property {ItemSizeMapping} [meta]
|
|
314
382
|
* @property {DiscountOffer} offer
|
|
315
383
|
*/
|
|
316
384
|
|
|
317
385
|
/**
|
|
318
386
|
* @typedef PaymentAllowValue1
|
|
319
|
-
* @property {number} [max]
|
|
387
|
+
* @property {number} [max] - Maximum value need to allow for payment in promotion
|
|
320
388
|
*/
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
* @typedef PromotionPaymentModes
|
|
324
|
-
* @property {string} type
|
|
392
|
+
* @property {string} [type] - Define the type of payment
|
|
325
393
|
* @property {PaymentAllowValue1} [uses]
|
|
326
|
-
* @property {string[]} [codes]
|
|
394
|
+
* @property {string[]} [codes] - List of codes associated with payment options
|
|
327
395
|
*/
|
|
328
396
|
|
|
329
397
|
/**
|
|
330
398
|
* @typedef UserRegistered
|
|
331
|
-
* @property {string} [end]
|
|
332
|
-
* @property {string} [start]
|
|
399
|
+
* @property {string} [end] - End date time format till the user is registerd
|
|
400
|
+
* @property {string} [start] - Start date time format when user is registerd
|
|
333
401
|
*/
|
|
334
402
|
|
|
335
403
|
/**
|
|
336
404
|
* @typedef PostOrder1
|
|
337
|
-
* @property {boolean} [cancellation_allowed]
|
|
338
|
-
*
|
|
405
|
+
* @property {boolean} [cancellation_allowed] - Cancellation allowed in
|
|
406
|
+
* promotion after order
|
|
407
|
+
* @property {boolean} [return_allowed] - Return allowed in promotion after order
|
|
339
408
|
*/
|
|
340
409
|
|
|
341
410
|
/**
|
|
342
411
|
* @typedef UsesRemaining1
|
|
343
|
-
* @property {number} [user]
|
|
344
|
-
* @property {number} [total]
|
|
412
|
+
* @property {number} [user] - Define total promotion count per user
|
|
413
|
+
* @property {number} [total] - Define total promotions count
|
|
345
414
|
*/
|
|
346
415
|
|
|
347
416
|
/**
|
|
@@ -352,62 +421,75 @@ const Joi = require("joi");
|
|
|
352
421
|
|
|
353
422
|
/**
|
|
354
423
|
* @typedef Restrictions1
|
|
355
|
-
* @property {
|
|
424
|
+
* @property {PaymentModes} [payments]
|
|
356
425
|
* @property {UserRegistered} [user_registered]
|
|
357
|
-
* @property {string[]} [platforms]
|
|
426
|
+
* @property {string[]} [platforms] - List of platform on which promotion is
|
|
427
|
+
* applicable like android, ios
|
|
358
428
|
* @property {PostOrder1} [post_order]
|
|
359
|
-
* @property {number[]} [user_groups]
|
|
360
|
-
*
|
|
361
|
-
* @property {
|
|
362
|
-
* @property {
|
|
363
|
-
*
|
|
364
|
-
* @property {
|
|
429
|
+
* @property {number[]} [user_groups] - List of user groups on which promotion
|
|
430
|
+
* is applicable
|
|
431
|
+
* @property {number} [order_quantity] - Prmomotion max order count
|
|
432
|
+
* @property {boolean} [anonymous_users] - Set true, if promotion is applicable
|
|
433
|
+
* for guest user
|
|
434
|
+
* @property {string[]} [user_id] - List of user id on which promotion is applicable
|
|
435
|
+
* @property {UsesRestriction1} [uses]
|
|
436
|
+
* @property {number[]} [ordering_stores] - List of store id on which promotion
|
|
437
|
+
* is applicable
|
|
365
438
|
*/
|
|
366
439
|
|
|
367
440
|
/**
|
|
368
441
|
* @typedef PromotionSchedule
|
|
369
|
-
* @property {string} end
|
|
370
|
-
* @property {string} start
|
|
371
|
-
* @property {
|
|
372
|
-
* @property {
|
|
373
|
-
* @property {
|
|
374
|
-
*
|
|
442
|
+
* @property {string} [end] - Then end date of promotion till valid
|
|
443
|
+
* @property {string} [start] - Then start date of promotion is valid
|
|
444
|
+
* @property {string} [status] - Promotion status like draft, review
|
|
445
|
+
* @property {boolean} [published] - The status of promotion is published or not
|
|
446
|
+
* @property {Object[]} [next_schedule] - List of date time, which we will
|
|
447
|
+
* schedule the promotion
|
|
448
|
+
* @property {string} [cron] - Schedule the cron to run your job periodically
|
|
449
|
+
* @property {number} [duration] - Time in minutes for execution
|
|
375
450
|
*/
|
|
376
451
|
|
|
377
452
|
/**
|
|
378
453
|
* @typedef PromotionAction
|
|
379
|
-
* @property {string} action_date
|
|
380
|
-
* @property {string} action_type
|
|
454
|
+
* @property {string} [action_date] - Date time format in promotion
|
|
455
|
+
* @property {string} [action_type] - The action type of promotion
|
|
381
456
|
*/
|
|
382
457
|
|
|
383
458
|
/**
|
|
384
459
|
* @typedef PromotionAuthor
|
|
385
|
-
* @property {string} [created_by]
|
|
386
|
-
* @property {string} [modified_by]
|
|
460
|
+
* @property {string} [created_by] - The user id of user, who has created the promotion
|
|
461
|
+
* @property {string} [modified_by] - The user id of user, who has modified the promotion
|
|
462
|
+
* @property {string} [approved_by] - The user id of user, who has approved the promotion
|
|
463
|
+
* @property {string} [rejected_by] - The user id of user, who has rejected the promotion
|
|
464
|
+
* @property {string} [reviewed_by] - The user id of user, who has reviewed the promotion
|
|
387
465
|
*/
|
|
388
466
|
|
|
389
467
|
/**
|
|
390
468
|
* @typedef Visibility
|
|
391
|
-
* @property {boolean} coupon_list
|
|
392
|
-
* @property {boolean} pdp
|
|
469
|
+
* @property {boolean} [coupon_list] - Flag to show promotion on Coupon list
|
|
470
|
+
* @property {boolean} [pdp] - Flag to show promotion on PDP page
|
|
393
471
|
*/
|
|
394
472
|
|
|
395
473
|
/**
|
|
396
474
|
* @typedef PromotionDateMeta
|
|
397
|
-
* @property {string} [modified_on]
|
|
398
|
-
* @property {string} [created_on]
|
|
475
|
+
* @property {string} [modified_on] - Date time format when the promotion last modified
|
|
476
|
+
* @property {string} [created_on] - Date time format when the promotion created
|
|
477
|
+
* @property {string} [approved_on] - Date time format when the promotion approved
|
|
478
|
+
* @property {string} [rejected_on] - Date time format when the promotion rejected
|
|
479
|
+
* @property {string} [reviewed_on] - Date time format when the promotion reviewed
|
|
399
480
|
*/
|
|
400
481
|
|
|
401
482
|
/**
|
|
402
483
|
* @typedef PromotionListItem
|
|
403
484
|
* @property {boolean} [stackable] - Allows more than one promotion to get
|
|
404
485
|
* combined benefits
|
|
405
|
-
* @property {string} [calculate_on] -
|
|
406
|
-
*
|
|
486
|
+
* @property {string} [calculate_on] - Article Price on which promotion
|
|
487
|
+
* calculated like effective price or marked price. Only available for
|
|
488
|
+
* Contract pricing and Ladder pricing promotion type
|
|
407
489
|
* @property {string} [apply_exclusive] - Doesn't allow other promotion after
|
|
408
490
|
* current promotion applied on cart or article
|
|
409
491
|
* @property {string} promo_group - Group into which promotion fall
|
|
410
|
-
* @property {string} mode - Promotion mode
|
|
492
|
+
* @property {string} mode - Promotion mode, like coupon or promotion
|
|
411
493
|
* @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
|
|
412
494
|
* @property {DisplayMeta1} display_meta
|
|
413
495
|
* @property {Ownership1} ownership
|
|
@@ -416,81 +498,166 @@ const Joi = require("joi");
|
|
|
416
498
|
* promotion will be applied
|
|
417
499
|
* @property {Restrictions1} [restrictions]
|
|
418
500
|
* @property {string} [currency] - Currency used for promotion
|
|
419
|
-
* @property {
|
|
501
|
+
* @property {boolean} [is_processed] - Flag to verify if promotion is ready to
|
|
502
|
+
* be applied on cart and ready to update promotion
|
|
503
|
+
* @property {string} [code] - Unique code of promotion
|
|
420
504
|
* @property {PromotionSchedule} [_schedule]
|
|
421
505
|
* @property {PromotionAction} [post_order_action]
|
|
422
506
|
* @property {number} [apply_priority] - Priority based on which promotion are
|
|
423
507
|
* applied on articles
|
|
424
508
|
* @property {PromotionAuthor} [author]
|
|
425
509
|
* @property {Visibility} [visiblility]
|
|
426
|
-
* @property {string} application_id -
|
|
427
|
-
* @property {
|
|
510
|
+
* @property {string} application_id - Application id in which promotion will be used
|
|
511
|
+
* @property {ItemCriteria} buy_rules
|
|
428
512
|
* @property {Object} [_custom_json] - Custom data stored in promotion
|
|
429
513
|
* @property {PromotionDateMeta} [date_meta]
|
|
430
|
-
* @property {string} [_id] -
|
|
431
|
-
* @property {string[]} [tags]
|
|
514
|
+
* @property {string} [_id] - Unique identifier of promotion
|
|
515
|
+
* @property {string[]} [tags] - List of tags on which promotion is applicable
|
|
516
|
+
* @property {boolean} [is_archived] - Indicates if the promotion is in archived
|
|
517
|
+
* state or not.
|
|
432
518
|
*/
|
|
433
519
|
|
|
434
520
|
/**
|
|
435
|
-
* @typedef
|
|
436
|
-
* @property {PromotionListItem[]} [items]
|
|
521
|
+
* @typedef PromotionsResult
|
|
522
|
+
* @property {PromotionListItem[]} [items] - List of promotions
|
|
437
523
|
* @property {Page} [page]
|
|
438
524
|
*/
|
|
439
525
|
|
|
440
526
|
/**
|
|
441
527
|
* @typedef PromotionAdd
|
|
442
|
-
* @property {boolean} [stackable]
|
|
443
|
-
* @property {string} [calculate_on] -
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* @property {string}
|
|
447
|
-
*
|
|
448
|
-
* @property {
|
|
449
|
-
* @property {
|
|
450
|
-
* @property {
|
|
451
|
-
* @property {
|
|
452
|
-
* @property {
|
|
528
|
+
* @property {boolean} [stackable] - Boolean value set true to apply other promotions also
|
|
529
|
+
* @property {string} [calculate_on] - Article Price on which promotion
|
|
530
|
+
* calculated like effective price or marked price. Only available for
|
|
531
|
+
* Contract pricing and Ladder pricing promotion type
|
|
532
|
+
* @property {string} [apply_exclusive] - Promotion should apply on either
|
|
533
|
+
* article or cart.
|
|
534
|
+
* @property {string} promo_group - The type of promotion group
|
|
535
|
+
* @property {string} mode - Promotion mode, like coupon or promotion
|
|
536
|
+
* @property {boolean} [apply_all_discount] - True means to apply all discount offers
|
|
537
|
+
* @property {DisplayMeta1} [display_meta]
|
|
538
|
+
* @property {Ownership1} [ownership]
|
|
539
|
+
* @property {string} promotion_type - Type of promotion
|
|
540
|
+
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
541
|
+
* their applicable conditions
|
|
453
542
|
* @property {Restrictions1} [restrictions]
|
|
454
|
-
* @property {string} [currency]
|
|
455
|
-
* @property {string} [code]
|
|
543
|
+
* @property {string} [currency] - Promotion Currency code like INR
|
|
544
|
+
* @property {string} [code] - Promotion unique code
|
|
456
545
|
* @property {PromotionSchedule} [_schedule]
|
|
457
546
|
* @property {PromotionAction} [post_order_action]
|
|
458
|
-
* @property {number} [apply_priority]
|
|
547
|
+
* @property {number} [apply_priority] - Promotion applicable priority
|
|
459
548
|
* @property {PromotionAuthor} [author]
|
|
460
549
|
* @property {Visibility} [visiblility]
|
|
461
|
-
* @property {string} application_id
|
|
462
|
-
* @property {
|
|
463
|
-
* @property {Object} [_custom_json]
|
|
550
|
+
* @property {string} application_id - Current application id of sales channel
|
|
551
|
+
* @property {ItemCriteria} [buy_rules]
|
|
552
|
+
* @property {Object} [_custom_json] - Set extra properties in promotion
|
|
464
553
|
* @property {PromotionDateMeta} [date_meta]
|
|
465
|
-
* @property {string[]} [tags]
|
|
554
|
+
* @property {string[]} [tags] - List of tags applicable for promotion
|
|
555
|
+
* @property {string} [_id] - Unique Identifier for promotion.
|
|
556
|
+
*/
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* @typedef PromotionAddResult
|
|
560
|
+
* @property {boolean} [stackable] - Boolean value set true to apply other promotions also
|
|
561
|
+
* @property {string} [calculate_on] - Article Price on which promotion
|
|
562
|
+
* calculated like effective price or marked price. Only available for
|
|
563
|
+
* Contract pricing and Ladder pricing promotion type
|
|
564
|
+
* @property {string} [apply_exclusive] - Promotion should apply on either
|
|
565
|
+
* article or cart.
|
|
566
|
+
* @property {string} promo_group - The type of promotion group
|
|
567
|
+
* @property {string} mode - Promotion mode, like coupon or promotion
|
|
568
|
+
* @property {boolean} [is_processed] - Flag to verify if promotion is ready to
|
|
569
|
+
* be applied on cart and ready to update promotion
|
|
570
|
+
* @property {boolean} [apply_all_discount] - True means to apply all discount offers
|
|
571
|
+
* @property {DisplayMeta1} [display_meta]
|
|
572
|
+
* @property {Ownership1} [ownership]
|
|
573
|
+
* @property {string} promotion_type - Type of promotion
|
|
574
|
+
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
575
|
+
* their applicable conditions
|
|
576
|
+
* @property {Restrictions1} [restrictions]
|
|
577
|
+
* @property {string} [currency] - Promotion Currency code like INR
|
|
578
|
+
* @property {string} [code] - Promotion unique code
|
|
579
|
+
* @property {PromotionSchedule} [_schedule]
|
|
580
|
+
* @property {PromotionAction} [post_order_action]
|
|
581
|
+
* @property {number} [apply_priority] - Promotion applicable priority
|
|
582
|
+
* @property {PromotionAuthor} [author]
|
|
583
|
+
* @property {Visibility} [visiblility]
|
|
584
|
+
* @property {string} application_id - Current application id of sales channel
|
|
585
|
+
* @property {ItemCriteria} [buy_rules]
|
|
586
|
+
* @property {Object} [_custom_json] - Set extra properties in promotion
|
|
587
|
+
* @property {PromotionDateMeta} [date_meta]
|
|
588
|
+
* @property {string[]} [tags] - List of tags applicable for promotion
|
|
589
|
+
* @property {boolean} [is_archived] - Indicates if the promotion is in archived
|
|
590
|
+
* state or not.
|
|
466
591
|
*/
|
|
467
592
|
|
|
468
593
|
/**
|
|
469
594
|
* @typedef PromotionUpdate
|
|
470
|
-
* @property {boolean} [stackable]
|
|
471
|
-
* @property {string} [calculate_on] -
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* @property {string}
|
|
475
|
-
*
|
|
476
|
-
* @property {
|
|
477
|
-
* @property {
|
|
478
|
-
* @property {
|
|
479
|
-
* @property {
|
|
480
|
-
* @property {
|
|
595
|
+
* @property {boolean} [stackable] - Set true to apply other promotions in cart
|
|
596
|
+
* @property {string} [calculate_on] - Article Price on which promotion
|
|
597
|
+
* calculated like effective price or marked price. Only available for
|
|
598
|
+
* Contract pricing and Ladder pricing promotion type
|
|
599
|
+
* @property {string} [apply_exclusive] - Promotion should apply on either
|
|
600
|
+
* article or cart.
|
|
601
|
+
* @property {string} [reason] - Promotion rejection reason added by reviewer
|
|
602
|
+
* @property {string} promo_group - The type of promotion group
|
|
603
|
+
* @property {string} mode - Promotion mode
|
|
604
|
+
* @property {boolean} [apply_all_discount] - True means to apply all discount offers
|
|
605
|
+
* @property {DisplayMeta1} [display_meta]
|
|
606
|
+
* @property {Ownership1} [ownership]
|
|
607
|
+
* @property {string} promotion_type - The Promotion type like amount, bogo and
|
|
608
|
+
* percentage etc.
|
|
609
|
+
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
610
|
+
* their applicable conditions
|
|
481
611
|
* @property {Restrictions1} [restrictions]
|
|
482
|
-
* @property {string} [currency]
|
|
483
|
-
* @property {string} [code]
|
|
612
|
+
* @property {string} [currency] - Promotion Currency code like INR
|
|
613
|
+
* @property {string} [code] - Promotion unique code
|
|
484
614
|
* @property {PromotionSchedule} [_schedule]
|
|
485
615
|
* @property {PromotionAction} [post_order_action]
|
|
486
|
-
* @property {number} [apply_priority]
|
|
616
|
+
* @property {number} [apply_priority] - Promotion applicable priority
|
|
487
617
|
* @property {PromotionAuthor} [author]
|
|
488
618
|
* @property {Visibility} [visiblility]
|
|
489
|
-
* @property {string} application_id
|
|
490
|
-
* @property {
|
|
491
|
-
* @property {Object} [_custom_json]
|
|
619
|
+
* @property {string} application_id - Current application id of sales channel
|
|
620
|
+
* @property {ItemCriteria} [buy_rules]
|
|
621
|
+
* @property {Object} [_custom_json] - Set extra properties in promotion
|
|
492
622
|
* @property {PromotionDateMeta} [date_meta]
|
|
493
|
-
* @property {string[]} [tags]
|
|
623
|
+
* @property {string[]} [tags] - List of tags applicable for promotion
|
|
624
|
+
*/
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* @typedef PromotionUpdateResult
|
|
628
|
+
* @property {boolean} [stackable] - Set true to apply other promotions in cart
|
|
629
|
+
* @property {string} [calculate_on] - Article Price on which promotion
|
|
630
|
+
* calculated like effective price or marked price. Only available for
|
|
631
|
+
* Contract pricing and Ladder pricing promotion type
|
|
632
|
+
* @property {string} [apply_exclusive] - Promotion should apply on either
|
|
633
|
+
* article or cart.
|
|
634
|
+
* @property {string} [reason] - Promotion rejection reason added by reviewer
|
|
635
|
+
* @property {boolean} [is_processed] - Flag to verify if promotion is ready to
|
|
636
|
+
* be applied on cart and ready to update promotion
|
|
637
|
+
* @property {string} promo_group - The type of promotion group
|
|
638
|
+
* @property {string} mode - Promotion mode
|
|
639
|
+
* @property {boolean} [apply_all_discount] - True means to apply all discount offers
|
|
640
|
+
* @property {DisplayMeta1} [display_meta]
|
|
641
|
+
* @property {Ownership1} [ownership]
|
|
642
|
+
* @property {string} promotion_type - The Promotion type like amount, bogo and
|
|
643
|
+
* percentage etc.
|
|
644
|
+
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
645
|
+
* their applicable conditions
|
|
646
|
+
* @property {Restrictions1} [restrictions]
|
|
647
|
+
* @property {string} [currency] - Promotion Currency code like INR
|
|
648
|
+
* @property {string} [code] - Promotion unique code
|
|
649
|
+
* @property {PromotionSchedule} [_schedule]
|
|
650
|
+
* @property {PromotionAction} [post_order_action]
|
|
651
|
+
* @property {number} [apply_priority] - Promotion applicable priority
|
|
652
|
+
* @property {PromotionAuthor} [author]
|
|
653
|
+
* @property {Visibility} [visiblility]
|
|
654
|
+
* @property {string} application_id - Current application id of sales channel
|
|
655
|
+
* @property {ItemCriteria} [buy_rules]
|
|
656
|
+
* @property {Object} [_custom_json] - Set extra properties in promotion
|
|
657
|
+
* @property {PromotionDateMeta} [date_meta]
|
|
658
|
+
* @property {string[]} [tags] - List of tags applicable for promotion
|
|
659
|
+
* @property {boolean} [is_archived] - Indicates if the promotion is in archived
|
|
660
|
+
* state or not.
|
|
494
661
|
*/
|
|
495
662
|
|
|
496
663
|
/**
|
|
@@ -500,56 +667,60 @@ const Joi = require("joi");
|
|
|
500
667
|
*/
|
|
501
668
|
|
|
502
669
|
/**
|
|
503
|
-
* @typedef
|
|
504
|
-
* @property {string} [entity_slug]
|
|
505
|
-
*
|
|
506
|
-
* @property {string} [
|
|
670
|
+
* @typedef ActivePromosResult
|
|
671
|
+
* @property {string} [entity_slug] - A short, human-readable, URL-friendly
|
|
672
|
+
* identifier of Promotion or coupon
|
|
673
|
+
* @property {string} [title] - Name of the promotion or coupon
|
|
674
|
+
* @property {string} [modified_on] - Coupon or promotion modification date
|
|
507
675
|
* @property {string} [example] - Discount offers examples
|
|
508
676
|
* @property {string} [entity_type] - Type of entity to be selected from :
|
|
509
677
|
* ['coupon', 'promotion']
|
|
510
|
-
* @property {string} [created_on] - Coupon creation date
|
|
678
|
+
* @property {string} [created_on] - Coupon or modification creation date
|
|
511
679
|
* @property {boolean} [is_hidden] - If the promo is active or not
|
|
512
|
-
* @property {string} [type] - Coupon type
|
|
680
|
+
* @property {string} [type] - Coupon or promotion type
|
|
513
681
|
* @property {string} [subtitle] - Small description of the current offer
|
|
514
682
|
* @property {string} [description] - The description of the offer in the form of an HTML
|
|
515
683
|
*/
|
|
516
684
|
|
|
517
685
|
/**
|
|
518
686
|
* @typedef Charges
|
|
519
|
-
* @property {number} [charges]
|
|
520
|
-
* @property {number} [threshold]
|
|
687
|
+
* @property {number} [charges] - Delivery chanrges applied on the product of cart
|
|
688
|
+
* @property {number} [threshold] - Threshold of cart value on which the charge
|
|
689
|
+
* should be applied
|
|
521
690
|
*/
|
|
522
691
|
|
|
523
692
|
/**
|
|
524
693
|
* @typedef DeliveryCharges
|
|
525
|
-
* @property {Charges[]} [charges]
|
|
526
|
-
* @property {boolean} [enabled]
|
|
694
|
+
* @property {Charges[]} [charges] - List of delivery changes information of the cart
|
|
695
|
+
* @property {boolean} [enabled] - Enable or disable delivery charge on cart
|
|
527
696
|
*/
|
|
528
697
|
|
|
529
698
|
/**
|
|
530
699
|
* @typedef CartMetaConfigUpdate
|
|
531
|
-
* @property {number} [min_cart_value]
|
|
532
|
-
* @property {number} [max_cart_value]
|
|
533
|
-
* @property {boolean} [bulk_coupons]
|
|
534
|
-
* @property {number} [max_cart_items]
|
|
535
|
-
* @property {string} [gift_display_text]
|
|
700
|
+
* @property {number} [min_cart_value] - Minimum order value to checkout
|
|
701
|
+
* @property {number} [max_cart_value] - Maximum order value to checkout
|
|
702
|
+
* @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart
|
|
703
|
+
* @property {number} [max_cart_items] - Maximum cart items to checkout
|
|
704
|
+
* @property {string} [gift_display_text] - Free gift charges text to show
|
|
536
705
|
* @property {DeliveryCharges} [delivery_charges]
|
|
537
|
-
* @property {boolean} [revenue_engine_coupon]
|
|
538
|
-
*
|
|
539
|
-
* @property {
|
|
706
|
+
* @property {boolean} [revenue_engine_coupon] - It define credit coupon
|
|
707
|
+
* applicable for cart
|
|
708
|
+
* @property {number} [gift_pricing] - Free gift charges per product
|
|
709
|
+
* @property {boolean} [enabled] - Enabled flag for cart configuration
|
|
540
710
|
*/
|
|
541
711
|
|
|
542
712
|
/**
|
|
543
713
|
* @typedef CartMetaConfigAdd
|
|
544
|
-
* @property {number} [min_cart_value]
|
|
545
|
-
* @property {number} [max_cart_value]
|
|
546
|
-
* @property {boolean} [bulk_coupons]
|
|
547
|
-
* @property {number} [max_cart_items]
|
|
548
|
-
* @property {string} [gift_display_text]
|
|
714
|
+
* @property {number} [min_cart_value] - Minimum order value to checkout
|
|
715
|
+
* @property {number} [max_cart_value] - Maximum order value to checkout
|
|
716
|
+
* @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart
|
|
717
|
+
* @property {number} [max_cart_items] - Maximum cart items to checkout
|
|
718
|
+
* @property {string} [gift_display_text] - Free gift charges text to show
|
|
549
719
|
* @property {DeliveryCharges} [delivery_charges]
|
|
550
|
-
* @property {boolean} [revenue_engine_coupon]
|
|
551
|
-
*
|
|
552
|
-
* @property {
|
|
720
|
+
* @property {boolean} [revenue_engine_coupon] - It define credit coupon
|
|
721
|
+
* applicable for cart
|
|
722
|
+
* @property {number} [gift_pricing] - Free gift charges per product
|
|
723
|
+
* @property {boolean} [enabled] - Enabled flag for cart configuration
|
|
553
724
|
*/
|
|
554
725
|
|
|
555
726
|
/**
|
|
@@ -557,10 +728,10 @@ const Joi = require("joi");
|
|
|
557
728
|
* @property {number} [value] - Value of price adjustment for article
|
|
558
729
|
* @property {string} [code] - Code to identify price adjustment on article
|
|
559
730
|
* @property {string} [type] - Type of price adjusment
|
|
560
|
-
* @property {string} article_id -
|
|
731
|
+
* @property {string} article_id - Unique identifier of article
|
|
561
732
|
* @property {number} [quantity] - Total quantity of the article to be
|
|
562
733
|
* considered (currently used only in discount type)
|
|
563
|
-
* @property {Object} [meta] - Meta related to article
|
|
734
|
+
* @property {Object} [meta] - Meta data related to article
|
|
564
735
|
*/
|
|
565
736
|
|
|
566
737
|
/**
|
|
@@ -571,14 +742,14 @@ const Joi = require("joi");
|
|
|
571
742
|
|
|
572
743
|
/**
|
|
573
744
|
* @typedef Collection
|
|
574
|
-
* @property {string} refund_by
|
|
575
|
-
* @property {string} collected_by
|
|
745
|
+
* @property {string} refund_by - Bearable party who is refunding the amount
|
|
746
|
+
* @property {string} collected_by - The party who is collecting the amount
|
|
576
747
|
*/
|
|
577
748
|
|
|
578
749
|
/**
|
|
579
750
|
* @typedef PriceAdjustmentUpdate
|
|
580
751
|
* @property {string} [modified_by] - The entity that modified the field
|
|
581
|
-
* @property {number} value
|
|
752
|
+
* @property {number} value - The amount applied on the cart
|
|
582
753
|
* @property {string} message - The message associated with the price adjustment
|
|
583
754
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
584
755
|
* @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
|
|
@@ -587,7 +758,7 @@ const Joi = require("joi");
|
|
|
587
758
|
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
588
759
|
* distribution should is done at the article level
|
|
589
760
|
* @property {Collection} collection
|
|
590
|
-
* @property {string} type - Type of price adjusment
|
|
761
|
+
* @property {string} type - Type of price adjusment like charge, mop, discount etc.
|
|
591
762
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
592
763
|
* allowed (default: False)
|
|
593
764
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
@@ -595,47 +766,49 @@ const Joi = require("joi");
|
|
|
595
766
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
596
767
|
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
597
768
|
* type price adjustment.
|
|
598
|
-
* @property {Object} [meta]
|
|
599
|
-
* @property {string} cart_id -
|
|
769
|
+
* @property {Object} [meta] - Additional information regarding price adjustment
|
|
770
|
+
* @property {string} cart_id - Unique identifier of the cart
|
|
771
|
+
* @property {DistributionLogic} [distribution_logic]
|
|
600
772
|
*/
|
|
601
773
|
|
|
602
774
|
/**
|
|
603
775
|
* @typedef PriceAdjustment
|
|
604
|
-
* @property {number} value
|
|
776
|
+
* @property {number} value - The amount applied on the cart
|
|
605
777
|
* @property {string} message - The message associated with the price adjustment
|
|
606
778
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
607
|
-
* @property {PriceAdjustmentRestrictions} [restrictions] - This field
|
|
608
|
-
* the restrictions
|
|
609
|
-
*
|
|
779
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - This field specifies
|
|
780
|
+
* the restrictions for this item or service, such as whether cancellation and
|
|
781
|
+
* return are permitted, except for `charge` type.
|
|
610
782
|
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
611
783
|
* distribution should is done at the article level
|
|
612
|
-
* @property {string} [id]
|
|
784
|
+
* @property {string} [id] - Unique identifier of Price adjustment
|
|
613
785
|
* @property {Collection} collection
|
|
614
|
-
* @property {string} type - Type of price adjusment
|
|
786
|
+
* @property {string} type - Type of price adjusment like charge, discount, mop etc.
|
|
615
787
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
616
|
-
* allowed (default: False)
|
|
788
|
+
* allowed (default: False) expect for `charge` type
|
|
617
789
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
618
790
|
* authenticated
|
|
619
791
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
620
792
|
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
621
793
|
* type price adjustment.
|
|
622
|
-
* @property {Object} [meta]
|
|
623
|
-
* @property {string} cart_id -
|
|
794
|
+
* @property {Object} [meta] - Additional information regarding price adjustment
|
|
795
|
+
* @property {string} cart_id - Unique identifier of the cart
|
|
796
|
+
* @property {DistributionLogic} [distribution_logic]
|
|
624
797
|
*/
|
|
625
798
|
|
|
626
799
|
/**
|
|
627
|
-
* @typedef
|
|
800
|
+
* @typedef PriceAdjustmentResult
|
|
628
801
|
* @property {PriceAdjustment} [data]
|
|
629
802
|
*/
|
|
630
803
|
|
|
631
804
|
/**
|
|
632
|
-
* @typedef
|
|
805
|
+
* @typedef GetPriceAdjustmentResult
|
|
633
806
|
* @property {PriceAdjustment[]} [data]
|
|
634
807
|
*/
|
|
635
808
|
|
|
636
809
|
/**
|
|
637
810
|
* @typedef PriceAdjustmentAdd
|
|
638
|
-
* @property {number} value
|
|
811
|
+
* @property {number} value - The amount applied on the cart
|
|
639
812
|
* @property {string} message - The message associated with the price adjustment
|
|
640
813
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
641
814
|
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
@@ -651,100 +824,134 @@ const Joi = require("joi");
|
|
|
651
824
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
652
825
|
* authenticated
|
|
653
826
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
654
|
-
* @property {Object} [meta]
|
|
655
|
-
* @property {string} cart_id -
|
|
827
|
+
* @property {Object} [meta] - Additional information regarding price adjustment
|
|
828
|
+
* @property {string} cart_id - Unique identifier of the cart
|
|
656
829
|
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
657
830
|
* type price adjustment.
|
|
831
|
+
* @property {DistributionLogic} [distribution_logic]
|
|
832
|
+
*/
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* @typedef DistributionRule
|
|
836
|
+
* @property {Object} [conditions] - This field defines the distribution conditions
|
|
837
|
+
*/
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* @typedef Distribution
|
|
841
|
+
* @property {string} [type] - This field defines the distribution type allowed
|
|
842
|
+
* values('multi', 'single')
|
|
843
|
+
* @property {string} [logic] - This field defines the distribution logic
|
|
844
|
+
* allowed values('apportion', 'weighted', 'equally')
|
|
845
|
+
* @property {DistributionRule} [rule]
|
|
846
|
+
*/
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* @typedef DistributionLogic
|
|
850
|
+
* @property {string} [distribution_level] - This field defines the distribution
|
|
851
|
+
* level, currently allowed distribution level is (shipment)
|
|
852
|
+
* @property {Distribution} [distribution]
|
|
658
853
|
*/
|
|
659
854
|
|
|
660
855
|
/**
|
|
661
856
|
* @typedef CartItem
|
|
662
|
-
* @property {number} [quantity]
|
|
663
|
-
* @property {string} product_id
|
|
664
|
-
* @property {string} size
|
|
857
|
+
* @property {number} [quantity] - Quantity of product in cart
|
|
858
|
+
* @property {string} product_id - Unique identifier of product in cart
|
|
859
|
+
* @property {string} size - Size of product in cart
|
|
665
860
|
*/
|
|
666
861
|
|
|
667
862
|
/**
|
|
668
|
-
* @typedef
|
|
669
|
-
* @property {CartItem[]} cart_items
|
|
863
|
+
* @typedef OpenapiCartDetailsCreation
|
|
864
|
+
* @property {CartItem[]} cart_items - List of products in cart
|
|
670
865
|
*/
|
|
671
866
|
|
|
672
867
|
/**
|
|
673
868
|
* @typedef CouponBreakup
|
|
674
|
-
* @property {string} [title]
|
|
675
|
-
*
|
|
676
|
-
* @property {number} [value
|
|
677
|
-
*
|
|
678
|
-
* @property {
|
|
679
|
-
* @property {
|
|
680
|
-
*
|
|
681
|
-
* @property {
|
|
682
|
-
* @property {string} [
|
|
683
|
-
* @property {string} [
|
|
684
|
-
*
|
|
685
|
-
* @property {
|
|
686
|
-
* @property {string} [
|
|
869
|
+
* @property {string} [title] - Coupon Title of the coupon applied denotes name
|
|
870
|
+
* of the coupon
|
|
871
|
+
* @property {number} [max_discount_value] - Maximum discount value of the
|
|
872
|
+
* coupon applied to cart
|
|
873
|
+
* @property {number} [value] - Coupon value of the coupon applied to cart
|
|
874
|
+
* @property {boolean} [is_applied] - Applied flag which denotes if any coupon
|
|
875
|
+
* is applied to cart
|
|
876
|
+
* @property {string} [uid] - Unique identifier of the coupon applied to cart
|
|
877
|
+
* @property {string} [coupon_type] - Type of the coupon applied to cart
|
|
878
|
+
* @property {string} [sub_title] - Coupon subtitle of the coupon applied to
|
|
879
|
+
* cart which is used to display
|
|
880
|
+
* @property {number} [coupon_value] - Value of the coupon applied to cart
|
|
881
|
+
* @property {string} [code] - Coupon code of the coupon applied
|
|
882
|
+
* @property {string} [type] - Type of the coupon applied to cart
|
|
883
|
+
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
884
|
+
* applied to cart
|
|
885
|
+
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
886
|
+
* @property {string} [description] - Coupon description of the coupon applied to cart.
|
|
687
887
|
*/
|
|
688
888
|
|
|
689
889
|
/**
|
|
690
890
|
* @typedef DisplayBreakup
|
|
691
|
-
* @property {string} [key]
|
|
692
|
-
* @property {number} [value]
|
|
693
|
-
* @property {string} [currency_code]
|
|
694
|
-
* @property {string} [currency_symbol]
|
|
695
|
-
* @property {string} [display]
|
|
696
|
-
* @property {string[]} [message]
|
|
891
|
+
* @property {string} [key] - Key of the price like total_mrp, total, subtotal etc
|
|
892
|
+
* @property {number} [value] - Numeric value for the price
|
|
893
|
+
* @property {string} [currency_code] - Currency code for the price
|
|
894
|
+
* @property {string} [currency_symbol] - Currency symbol for the price
|
|
895
|
+
* @property {string} [display] - Display key field that to be shown against the value
|
|
896
|
+
* @property {string[]} [message] - List of message at price level to be displayed
|
|
697
897
|
*/
|
|
698
898
|
|
|
699
899
|
/**
|
|
700
900
|
* @typedef LoyaltyPoints
|
|
701
|
-
* @property {boolean} [is_applied]
|
|
702
|
-
* @property {number} [total]
|
|
703
|
-
* @property {number} [applicable]
|
|
704
|
-
*
|
|
901
|
+
* @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart
|
|
902
|
+
* @property {number} [total] - Total loyalty points available with user
|
|
903
|
+
* @property {number} [applicable] - Whether the loyalty points are applicable
|
|
904
|
+
* for the cart
|
|
905
|
+
* @property {string} [description] - Description for loyalty points
|
|
705
906
|
*/
|
|
706
907
|
|
|
707
908
|
/**
|
|
708
909
|
* @typedef RawBreakup
|
|
709
|
-
* @property {number} [coupon]
|
|
710
|
-
* @property {number} [gst_charges]
|
|
711
|
-
* @property {number} [mrp_total]
|
|
712
|
-
* @property {number} [fynd_cash]
|
|
713
|
-
* @property {number} [vog]
|
|
714
|
-
*
|
|
715
|
-
* @property {number} [
|
|
716
|
-
* @property {number} [
|
|
717
|
-
*
|
|
718
|
-
* @property {number} [
|
|
719
|
-
* @property {number} [
|
|
720
|
-
* @property {number} [
|
|
721
|
-
* @property {number} [
|
|
910
|
+
* @property {number} [coupon] - Coupon amount applied to cart
|
|
911
|
+
* @property {number} [gst_charges] - GST charges applied on cart
|
|
912
|
+
* @property {number} [mrp_total] - Maximum price total amount of all products in cart
|
|
913
|
+
* @property {number} [fynd_cash] - Loyalty points applied on cart
|
|
914
|
+
* @property {number} [vog] - Total value of goods after all discount, coupons
|
|
915
|
+
* and promotion applied of all products in cart
|
|
916
|
+
* @property {number} [gift_card] - Gift cart amount applied on cart
|
|
917
|
+
* @property {number} [cod_charge] - Cod charge value applied to cart. This is
|
|
918
|
+
* applied when user select payment mode as COD
|
|
919
|
+
* @property {number} [total] - Total payable amount by the customer
|
|
920
|
+
* @property {number} [discount] - Discount amount recieved on cart
|
|
921
|
+
* @property {number} [delivery_charge] - Delivery charge applied to cart
|
|
922
|
+
* @property {number} [you_saved] - Total amount will be saved if customer
|
|
923
|
+
* places the order
|
|
924
|
+
* @property {number} [subtotal] - Selling price amount of all products in cart
|
|
925
|
+
* @property {number} [convenience_fee] - Convenience fee amount applied to cart
|
|
722
926
|
*/
|
|
723
927
|
|
|
724
928
|
/**
|
|
725
929
|
* @typedef CartBreakup
|
|
726
930
|
* @property {CouponBreakup} [coupon]
|
|
727
|
-
* @property {DisplayBreakup[]} [display]
|
|
931
|
+
* @property {DisplayBreakup[]} [display] - List of breakup data which is used
|
|
932
|
+
* to display the breakup to the customer like MRP total, Discount, Sub total,
|
|
933
|
+
* coupon value, promotion value and final total
|
|
728
934
|
* @property {LoyaltyPoints} [loyalty_points]
|
|
729
935
|
* @property {RawBreakup} [raw]
|
|
730
936
|
*/
|
|
731
937
|
|
|
732
938
|
/**
|
|
733
939
|
* @typedef ProductImage
|
|
734
|
-
* @property {string} [secure_url]
|
|
735
|
-
* @property {string} [url]
|
|
736
|
-
* @property {string} [aspect_ratio]
|
|
940
|
+
* @property {string} [secure_url] - Secured url of the product image
|
|
941
|
+
* @property {string} [url] - Bucket link url for product image
|
|
942
|
+
* @property {string} [aspect_ratio] - Aspect ratio of the product image
|
|
737
943
|
*/
|
|
738
944
|
|
|
739
945
|
/**
|
|
740
946
|
* @typedef Tags
|
|
741
|
-
* @property {Object} [tags]
|
|
947
|
+
* @property {Object} [tags] - Tags is a lable or batch that is attached to a
|
|
948
|
+
* product in cart
|
|
742
949
|
*/
|
|
743
950
|
|
|
744
951
|
/**
|
|
745
952
|
* @typedef BaseInfo
|
|
746
|
-
* @property {number} [uid]
|
|
747
|
-
* @property {string} [name]
|
|
953
|
+
* @property {number} [uid] - Unique identifier of entities like brand or seller
|
|
954
|
+
* @property {string} [name] - Name of entities like brand or seller
|
|
748
955
|
*/
|
|
749
956
|
|
|
750
957
|
/**
|
|
@@ -752,43 +959,62 @@ const Joi = require("joi");
|
|
|
752
959
|
* @property {string[]} [product_slug] - Contains list of product slug
|
|
753
960
|
*/
|
|
754
961
|
|
|
962
|
+
/**
|
|
963
|
+
* @typedef ProductActionParams
|
|
964
|
+
* @property {string[]} [slug] - Unique product url name generated via product
|
|
965
|
+
* name and other meta data.
|
|
966
|
+
*/
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* @typedef ProductActionPage
|
|
970
|
+
* @property {string} [type] - Entity of page to be redirected on click
|
|
971
|
+
* @property {ProductActionParams} [params]
|
|
972
|
+
*/
|
|
973
|
+
|
|
755
974
|
/**
|
|
756
975
|
* @typedef ProductAction
|
|
757
|
-
* @property {string} [type]
|
|
758
|
-
* @property {string} [url]
|
|
976
|
+
* @property {string} [type] - Type of action
|
|
977
|
+
* @property {string} [url] - Url of the product to render the product
|
|
759
978
|
* @property {ActionQuery} [query]
|
|
979
|
+
* @property {ProductActionPage} [page]
|
|
760
980
|
*/
|
|
761
981
|
|
|
762
982
|
/**
|
|
763
983
|
* @typedef CategoryInfo
|
|
764
|
-
* @property {number} [uid] - Product Category
|
|
765
|
-
* @property {string} [name]
|
|
984
|
+
* @property {number} [uid] - Unique identifier of Product Category
|
|
985
|
+
* @property {string} [name] - Category name of the product
|
|
766
986
|
*/
|
|
767
987
|
|
|
768
988
|
/**
|
|
769
989
|
* @typedef CartProduct
|
|
770
990
|
* @property {string} [slug] - Unique product url name generated via product
|
|
771
991
|
* name and other meta data
|
|
772
|
-
* @property {ProductImage[]} [images]
|
|
992
|
+
* @property {ProductImage[]} [images] - Product Images urls of different types
|
|
993
|
+
* like secure url, aspect ration url and url
|
|
773
994
|
* @property {Tags} [teaser_tag]
|
|
774
995
|
* @property {BaseInfo} [brand]
|
|
775
996
|
* @property {ProductAction} [action]
|
|
776
|
-
* @property {number} [uid]
|
|
777
|
-
* @property {string[]} [tags]
|
|
778
|
-
*
|
|
779
|
-
* @property {
|
|
780
|
-
* @property {string} [
|
|
781
|
-
* @property {string} [
|
|
782
|
-
*
|
|
783
|
-
* @property {
|
|
997
|
+
* @property {number} [uid] - Unique identifier of the product in cart
|
|
998
|
+
* @property {string[]} [tags] - Products tags that are added to each product to
|
|
999
|
+
* identify the set of products
|
|
1000
|
+
* @property {Object} [_custom_json] - Field to add custom json of the product in cart
|
|
1001
|
+
* @property {string} [type] - Type of product in cart
|
|
1002
|
+
* @property {string} [name] - Product name of the product in cart which is
|
|
1003
|
+
* defined on platform
|
|
1004
|
+
* @property {string} [item_code] - Product code of the product while defining
|
|
1005
|
+
* product on platform
|
|
1006
|
+
* @property {CategoryInfo[]} [categories] - Product category information which
|
|
1007
|
+
* incldes category name and category id
|
|
1008
|
+
* @property {Object} [attributes] - Product attributes defined on platform
|
|
784
1009
|
*/
|
|
785
1010
|
|
|
786
1011
|
/**
|
|
787
1012
|
* @typedef BasePrice
|
|
788
|
-
* @property {number} [effective]
|
|
789
|
-
*
|
|
790
|
-
* @property {string} [
|
|
791
|
-
* @property {
|
|
1013
|
+
* @property {number} [effective] - Current per unit price of product after
|
|
1014
|
+
* existing deductions
|
|
1015
|
+
* @property {string} [currency_code] - Currency code for all amounts
|
|
1016
|
+
* @property {string} [currency_symbol] - Currency symbol of the currncy used for price
|
|
1017
|
+
* @property {number} [marked] - Original price of product
|
|
792
1018
|
*/
|
|
793
1019
|
|
|
794
1020
|
/**
|
|
@@ -799,43 +1025,54 @@ const Joi = require("joi");
|
|
|
799
1025
|
|
|
800
1026
|
/**
|
|
801
1027
|
* @typedef StoreInfo
|
|
802
|
-
* @property {number} [uid]
|
|
803
|
-
*
|
|
804
|
-
* @property {string} [
|
|
1028
|
+
* @property {number} [uid] - Unique identifiers of the store from where product
|
|
1029
|
+
* is fulfileld
|
|
1030
|
+
* @property {string} [name] - Store name of the store from where the product is fulfiled
|
|
1031
|
+
* @property {string} [store_code] - A unique code or identifier for the store,
|
|
1032
|
+
* often used for internal reference
|
|
805
1033
|
*/
|
|
806
1034
|
|
|
807
1035
|
/**
|
|
808
1036
|
* @typedef ProductArticle
|
|
809
|
-
* @property {string} [seller_identifier]
|
|
810
|
-
*
|
|
1037
|
+
* @property {string} [seller_identifier] - List of identifiers used by sellers
|
|
1038
|
+
* for the product size.
|
|
1039
|
+
* @property {number} [quantity] - Quantity of the article added in cart
|
|
811
1040
|
* @property {BaseInfo} [seller]
|
|
812
|
-
* @property {Object} [cart_item_meta]
|
|
813
|
-
* @property {Object} [parent_item_identifiers]
|
|
814
|
-
*
|
|
815
|
-
* @property {
|
|
816
|
-
*
|
|
817
|
-
* @property {string
|
|
818
|
-
*
|
|
819
|
-
* @property {
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
* @property {
|
|
1041
|
+
* @property {Object} [cart_item_meta] - Meta details of the article added from cart
|
|
1042
|
+
* @property {Object} [parent_item_identifiers] - Fields to determine parent
|
|
1043
|
+
* product of the product
|
|
1044
|
+
* @property {boolean} [is_gift_visible] - Whether the product can be purchased
|
|
1045
|
+
* as a gift. It is true if the product is available for gifting and false otherwise.
|
|
1046
|
+
* @property {string} [uid] - This unique identifier is assigned to the specific
|
|
1047
|
+
* article. This represents item x size x location.
|
|
1048
|
+
* @property {Object} [gift_card] - Gift card detail if gift card applied to the
|
|
1049
|
+
* product which indicates gift price, gift applicable flag and display
|
|
1050
|
+
* message for the gift
|
|
1051
|
+
* @property {string[]} [product_group_tags] - List fot the unique identifier
|
|
1052
|
+
* for the product grouping.
|
|
1053
|
+
* @property {Object} [identifier] - Unique identifier of the article
|
|
1054
|
+
* @property {number} [mto_quantity] - Quantity of the product which will
|
|
1055
|
+
* specially manufactured as not available in stock
|
|
1056
|
+
* @property {Object} [extra_meta] - Field to update extra meta of the article in cart
|
|
1057
|
+
* @property {string} [type] - Type of the data sent in response. Possible value
|
|
1058
|
+
* is article
|
|
1059
|
+
* @property {Object} [_custom_json] - Field to update custom json of the article in cart
|
|
823
1060
|
* @property {ArticlePriceInfo} [price]
|
|
824
|
-
* @property {Object} [meta]
|
|
825
|
-
* @property {string} [size]
|
|
1061
|
+
* @property {Object} [meta] - Meta data of article in cart
|
|
1062
|
+
* @property {string} [size] - Size of the article added in cart
|
|
826
1063
|
* @property {StoreInfo} [store]
|
|
827
1064
|
* @property {string[]} [tags] - A list of article tags
|
|
828
1065
|
*/
|
|
829
1066
|
|
|
830
1067
|
/**
|
|
831
1068
|
* @typedef Ownership2
|
|
832
|
-
* @property {string} [payable_category] -
|
|
833
|
-
* @property {string} [payable_by] -
|
|
1069
|
+
* @property {string} [payable_category] - Promotion amount payable category
|
|
1070
|
+
* @property {string} [payable_by] - Promotion amount bearable party
|
|
834
1071
|
*/
|
|
835
1072
|
|
|
836
1073
|
/**
|
|
837
1074
|
* @typedef DiscountRulesApp
|
|
838
|
-
* @property {Object} [offer] - Offer for promotion
|
|
1075
|
+
* @property {Object} [offer] - Offer detail for promotion
|
|
839
1076
|
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
840
1077
|
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
841
1078
|
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
@@ -844,9 +1081,10 @@ const Joi = require("joi");
|
|
|
844
1081
|
/**
|
|
845
1082
|
* @typedef AppliedFreeArticles
|
|
846
1083
|
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
847
|
-
* @property {number} [quantity] - Free article quantity
|
|
848
|
-
* @property {string} [article_id] -
|
|
1084
|
+
* @property {number} [quantity] - Free article quantity in promotion
|
|
1085
|
+
* @property {string} [article_id] - Unique identifier of free article
|
|
849
1086
|
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
|
|
1087
|
+
* in promotion
|
|
850
1088
|
*/
|
|
851
1089
|
|
|
852
1090
|
/**
|
|
@@ -874,15 +1112,15 @@ const Joi = require("joi");
|
|
|
874
1112
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
875
1113
|
* product MRP or ESP
|
|
876
1114
|
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
877
|
-
* @property {string} [promo_id] - Promotion
|
|
1115
|
+
* @property {string} [promo_id] - Promotion unique identifier
|
|
878
1116
|
* @property {Object} [meta] - Meta object for extra data
|
|
879
|
-
* @property {string} [code] - Promotion code
|
|
1117
|
+
* @property {string} [code] - Promotion unique code
|
|
880
1118
|
*/
|
|
881
1119
|
|
|
882
1120
|
/**
|
|
883
1121
|
* @typedef PromiseFormatted
|
|
884
|
-
* @property {string} [max]
|
|
885
|
-
* @property {string} [min]
|
|
1122
|
+
* @property {string} [max] - Maximum Delivery promise formatted timestamp
|
|
1123
|
+
* @property {string} [min] - Minimum Delivery promise formatted timestamp
|
|
886
1124
|
*/
|
|
887
1125
|
|
|
888
1126
|
/**
|
|
@@ -893,8 +1131,8 @@ const Joi = require("joi");
|
|
|
893
1131
|
|
|
894
1132
|
/**
|
|
895
1133
|
* @typedef PromiseTimestamp
|
|
896
|
-
* @property {number} [max]
|
|
897
|
-
* @property {number} [min]
|
|
1134
|
+
* @property {number} [max] - Maximum Promise for the shipment
|
|
1135
|
+
* @property {number} [min] - Minimum delivery promise time for the shipment
|
|
898
1136
|
*/
|
|
899
1137
|
|
|
900
1138
|
/**
|
|
@@ -906,19 +1144,23 @@ const Joi = require("joi");
|
|
|
906
1144
|
|
|
907
1145
|
/**
|
|
908
1146
|
* @typedef CouponDetails
|
|
909
|
-
* @property {number} [discount_total_quantity]
|
|
910
|
-
*
|
|
911
|
-
* @property {
|
|
1147
|
+
* @property {number} [discount_total_quantity] - Total discount earned from
|
|
1148
|
+
* coupon applied to cart
|
|
1149
|
+
* @property {number} [discount_single_quantity] - Discout amount applied from
|
|
1150
|
+
* coupon for single quantity of the product
|
|
1151
|
+
* @property {string} [code] - Coupon code of the coupon applied
|
|
912
1152
|
*/
|
|
913
1153
|
|
|
914
1154
|
/**
|
|
915
1155
|
* @typedef ProductPrice
|
|
916
|
-
* @property {number} [marked]
|
|
917
|
-
* @property {number} [add_on]
|
|
918
|
-
*
|
|
919
|
-
* @property {string} [
|
|
920
|
-
* @property {
|
|
921
|
-
*
|
|
1156
|
+
* @property {number} [marked] - Maximum price of the product
|
|
1157
|
+
* @property {number} [add_on] - Price before promotion and coupon amount
|
|
1158
|
+
* applied for calculation
|
|
1159
|
+
* @property {string} [currency_code] - Currency code of the price defined for the product
|
|
1160
|
+
* @property {string} [currency_symbol] - Currency symbol of the price defined
|
|
1161
|
+
* for the product
|
|
1162
|
+
* @property {number} [effective] - Selling price of the product
|
|
1163
|
+
* @property {number} [selling] - Selling price of the product
|
|
922
1164
|
*/
|
|
923
1165
|
|
|
924
1166
|
/**
|
|
@@ -934,226 +1176,259 @@ const Joi = require("joi");
|
|
|
934
1176
|
|
|
935
1177
|
/**
|
|
936
1178
|
* @typedef ProductAvailabilitySize
|
|
937
|
-
* @property {string} [display]
|
|
938
|
-
* @property {string} [value]
|
|
939
|
-
* @property {boolean} [is_available]
|
|
1179
|
+
* @property {string} [display] - Display size of the product
|
|
1180
|
+
* @property {string} [value] - Actual value of the size
|
|
1181
|
+
* @property {boolean} [is_available] - Available flag for the size of the
|
|
1182
|
+
* product if that is available
|
|
940
1183
|
*/
|
|
941
1184
|
|
|
942
1185
|
/**
|
|
943
1186
|
* @typedef ProductAvailability
|
|
944
|
-
* @property {boolean} [is_valid]
|
|
945
|
-
*
|
|
946
|
-
* @property {
|
|
947
|
-
*
|
|
948
|
-
* @property {boolean} [
|
|
949
|
-
*
|
|
1187
|
+
* @property {boolean} [is_valid] - Valid flag for the product if the product
|
|
1188
|
+
* added in cart is valid to place the order
|
|
1189
|
+
* @property {number} [other_store_quantity] - Quantity of the product available
|
|
1190
|
+
* on other store
|
|
1191
|
+
* @property {boolean} [deliverable] - Deliverable flag denotes if the product
|
|
1192
|
+
* is deliverable or not
|
|
1193
|
+
* @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability
|
|
1194
|
+
* @property {boolean} [out_of_stock] - Denotes if the product is available in stock
|
|
1195
|
+
* @property {string[]} [sizes] - All sizes of the product
|
|
950
1196
|
*/
|
|
951
1197
|
|
|
952
1198
|
/**
|
|
953
1199
|
* @typedef PromoMeta
|
|
954
|
-
* @property {string} [message]
|
|
1200
|
+
* @property {string} [message] - Loyalty points message denotes how much
|
|
1201
|
+
* loyalty points and applied and how much left with the user
|
|
955
1202
|
*/
|
|
956
1203
|
|
|
957
1204
|
/**
|
|
958
1205
|
* @typedef CartProductInfo
|
|
959
|
-
* @property {number} [quantity]
|
|
1206
|
+
* @property {number} [quantity] - Quantity of the product added in cart
|
|
960
1207
|
* @property {CartProduct} [product]
|
|
961
|
-
* @property {string} [product_ean_id]
|
|
962
|
-
*
|
|
963
|
-
* @property {
|
|
1208
|
+
* @property {string} [product_ean_id] - European Article Number of the product
|
|
1209
|
+
* (limited upto 50 EAN identifier in a single request)
|
|
1210
|
+
* @property {Object} [parent_item_identifiers] - Parent item information of the
|
|
1211
|
+
* product which identifies the parent of the product in cart
|
|
1212
|
+
* @property {boolean} [is_set] - Whether or not the product is a set of items
|
|
964
1213
|
* @property {ProductArticle} [article]
|
|
965
|
-
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1214
|
+
* @property {AppliedPromotion[]} [promotions_applied] - List of applicable
|
|
1215
|
+
* promotion for the product in cart
|
|
966
1216
|
* @property {ShipmentPromise} [delivery_promise]
|
|
967
|
-
* @property {string} [key]
|
|
1217
|
+
* @property {string} [key] - The attribute key associated with the size
|
|
968
1218
|
* @property {CouponDetails} [coupon]
|
|
969
|
-
* @property {Object} [bulk_offer]
|
|
1219
|
+
* @property {Object} [bulk_offer] - Bulk offer information for the product
|
|
1220
|
+
* which denotes if any bulk offer is applied to the product in cart
|
|
970
1221
|
* @property {ProductPriceInfo} [price]
|
|
971
|
-
* @property {string} [coupon_message]
|
|
1222
|
+
* @property {string} [coupon_message] - Message for the coupon denotes which
|
|
1223
|
+
* coupon is applied and empty if not applied
|
|
972
1224
|
* @property {CartProductIdentifer} identifiers
|
|
973
|
-
* @property {string} [message]
|
|
974
|
-
*
|
|
1225
|
+
* @property {string} [message] - Product level message which denotes error
|
|
1226
|
+
* information to display over the product in cart
|
|
1227
|
+
* @property {string} [discount] - Discount amount of the product in cart
|
|
975
1228
|
* @property {ProductAvailability} [availability]
|
|
976
|
-
* @property {Object} [moq]
|
|
1229
|
+
* @property {Object} [moq] - An Integer indication the Minimum Order Quantity
|
|
1230
|
+
* of a product, e.g. 100.
|
|
977
1231
|
* @property {ProductPriceInfo} [price_per_unit]
|
|
978
1232
|
* @property {PromoMeta} [promo_meta]
|
|
979
|
-
* @property {Object} [custom_order]
|
|
1233
|
+
* @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
|
|
980
1234
|
*/
|
|
981
1235
|
|
|
982
1236
|
/**
|
|
983
|
-
* @typedef
|
|
984
|
-
* @property {boolean} [is_valid]
|
|
985
|
-
*
|
|
1237
|
+
* @typedef OpenapiCartDetailsResult
|
|
1238
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
1239
|
+
* response is valid or not
|
|
1240
|
+
* @property {string} [message] - Message of the cart Open API cart detail response
|
|
986
1241
|
* @property {CartBreakup} [breakup_values]
|
|
987
|
-
* @property {CartProductInfo[]} [items]
|
|
1242
|
+
* @property {CartProductInfo[]} [items] - Items details in cart
|
|
988
1243
|
*/
|
|
989
1244
|
|
|
990
1245
|
/**
|
|
991
|
-
* @typedef
|
|
992
|
-
* @property {boolean} [success]
|
|
993
|
-
* @property {string} [message]
|
|
1246
|
+
* @typedef OpenApiErrorResult
|
|
1247
|
+
* @property {boolean} [success] - Success flag for cart detail open api response
|
|
1248
|
+
* @property {string} [message] - Error message of the Open API cart detail response
|
|
994
1249
|
* @property {Object} [errors] - Contains field name which has error as key and
|
|
995
1250
|
* error message as value
|
|
996
1251
|
*/
|
|
997
1252
|
|
|
998
1253
|
/**
|
|
999
1254
|
* @typedef ShippingAddress
|
|
1000
|
-
* @property {string} [country]
|
|
1001
|
-
* @property {string} [state]
|
|
1002
|
-
* @property {string} [city]
|
|
1003
|
-
* @property {number} [phone]
|
|
1004
|
-
* @property {string} area_code
|
|
1005
|
-
* @property {string} [country_iso_code]
|
|
1006
|
-
* @property {string} [country_phone_code]
|
|
1007
|
-
* @property {Object} [meta]
|
|
1008
|
-
* @property {string} [address_type]
|
|
1009
|
-
* @property {string} [area]
|
|
1010
|
-
* @property {string} [area_code_slug]
|
|
1011
|
-
*
|
|
1012
|
-
* @property {string} [
|
|
1013
|
-
* @property {string} [
|
|
1014
|
-
* @property {string} [
|
|
1015
|
-
* @property {
|
|
1016
|
-
* @property {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
* @
|
|
1255
|
+
* @property {string} [country] - Country of address
|
|
1256
|
+
* @property {string} [state] - State of the address
|
|
1257
|
+
* @property {string} [city] - City of the address
|
|
1258
|
+
* @property {number} [phone] - Phone number for address
|
|
1259
|
+
* @property {string} area_code - Area code of the address
|
|
1260
|
+
* @property {string} [country_iso_code] - Country iso code for address
|
|
1261
|
+
* @property {string} [country_phone_code] - Country phone code for address
|
|
1262
|
+
* @property {Object} [meta] - Metadata of the address
|
|
1263
|
+
* @property {string} [address_type] - Address type of address
|
|
1264
|
+
* @property {string} [area] - Area description for address
|
|
1265
|
+
* @property {string} [area_code_slug] - Area code slug for address. example
|
|
1266
|
+
* pincode is slug for India
|
|
1267
|
+
* @property {string} [name] - Name of person in address data to whom it belongs to
|
|
1268
|
+
* @property {string} [landmark] - Landmark of address
|
|
1269
|
+
* @property {string} [email] - Email address for address data
|
|
1270
|
+
* @property {string} [country_code] - Country code of address
|
|
1271
|
+
* @property {number} [pincode] - Pincode for address data
|
|
1272
|
+
* @property {string} [address] - Address description for address data
|
|
1273
|
+
*/
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* @typedef OpenApiCartServiceabilityCreation
|
|
1277
|
+
* @property {CartItem[]} cart_items - List of items in open api cart response
|
|
1022
1278
|
* @property {ShippingAddress} shipping_address
|
|
1023
1279
|
*/
|
|
1024
1280
|
|
|
1025
1281
|
/**
|
|
1026
|
-
* @typedef
|
|
1027
|
-
* @property {boolean} [is_valid]
|
|
1028
|
-
*
|
|
1282
|
+
* @typedef OpenApiCartServiceabilityResult
|
|
1283
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
1284
|
+
* response is valid or not
|
|
1285
|
+
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
1286
|
+
* includes item id, item size, store id, available sizes and rest of the item
|
|
1287
|
+
* related data
|
|
1029
1288
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1030
|
-
* @property {string} [message]
|
|
1289
|
+
* @property {string} [message] - Message of the cart detail API response
|
|
1031
1290
|
* @property {CartBreakup} [breakup_values]
|
|
1032
1291
|
*/
|
|
1033
1292
|
|
|
1034
1293
|
/**
|
|
1035
1294
|
* @typedef OpenApiFiles
|
|
1036
|
-
* @property {string} key
|
|
1037
|
-
* @property {string[]} values
|
|
1295
|
+
* @property {string} key - Key represents name of file
|
|
1296
|
+
* @property {string[]} values - List of urls path
|
|
1038
1297
|
*/
|
|
1039
1298
|
|
|
1040
1299
|
/**
|
|
1041
1300
|
* @typedef CartItemMeta
|
|
1042
|
-
* @property {boolean} [primary_item]
|
|
1043
|
-
* @property {string} [group_id]
|
|
1301
|
+
* @property {boolean} [primary_item] - Flags indicates item is primary or not
|
|
1302
|
+
* @property {string} [group_id] - Fields to determine group id of the product
|
|
1044
1303
|
*/
|
|
1045
1304
|
|
|
1046
1305
|
/**
|
|
1047
1306
|
* @typedef MultiTenderPaymentMeta
|
|
1048
|
-
* @property {string} [payment_id]
|
|
1049
|
-
* @property {string} [payment_gateway]
|
|
1050
|
-
* @property {Object} [extra_meta]
|
|
1051
|
-
*
|
|
1052
|
-
* @property {string} [
|
|
1307
|
+
* @property {string} [payment_id] - Payment gateway identifier
|
|
1308
|
+
* @property {string} [payment_gateway] - Payment gateway used to do the payment
|
|
1309
|
+
* @property {Object} [extra_meta] - Payment extra meta for the payment mode to
|
|
1310
|
+
* do the payment
|
|
1311
|
+
* @property {string} [current_status] - Current status of the payment
|
|
1312
|
+
* @property {string} [order_id] - Payment gateway order id
|
|
1053
1313
|
*/
|
|
1054
1314
|
|
|
1055
1315
|
/**
|
|
1056
1316
|
* @typedef MultiTenderPaymentMethod
|
|
1057
|
-
* @property {string} mode
|
|
1058
|
-
* @property {number} amount -
|
|
1317
|
+
* @property {string} mode - Payment mode of payment method used to make payment
|
|
1318
|
+
* @property {number} amount - Amount of the payment mode to be paid
|
|
1059
1319
|
* @property {MultiTenderPaymentMeta} [meta]
|
|
1060
|
-
* @property {string} [name] -
|
|
1320
|
+
* @property {string} [name] - Name of the payment mode used to make payment
|
|
1061
1321
|
*/
|
|
1062
1322
|
|
|
1063
1323
|
/**
|
|
1064
1324
|
* @typedef OpenApiOrderItem
|
|
1065
|
-
* @property {number} cashback_applied
|
|
1066
|
-
* @property {number} [quantity]
|
|
1067
|
-
* @property {string} size
|
|
1068
|
-
* @property {number} coupon_effective_discount
|
|
1069
|
-
*
|
|
1070
|
-
* @property {number}
|
|
1071
|
-
* @property {number}
|
|
1072
|
-
* @property {
|
|
1325
|
+
* @property {number} cashback_applied - Cashback applied on user cart
|
|
1326
|
+
* @property {number} [quantity] - Article quantity in user cart
|
|
1327
|
+
* @property {string} size - Size of the article added in cart
|
|
1328
|
+
* @property {number} coupon_effective_discount - Coupon discount applied on
|
|
1329
|
+
* article in user cart
|
|
1330
|
+
* @property {number} amount_paid - Amount needs to paid for article in cart
|
|
1331
|
+
* @property {number} delivery_charges - Delivery charges applied on article in cart
|
|
1332
|
+
* @property {number} price_marked - Original price of product
|
|
1333
|
+
* @property {OpenApiFiles[]} [files] - List of file url
|
|
1073
1334
|
* @property {CartItemMeta} [meta]
|
|
1074
|
-
* @property {Object} [extra_meta]
|
|
1075
|
-
* @property {number} product_id
|
|
1076
|
-
* @property {number} [loyalty_discount]
|
|
1077
|
-
* @property {number} discount
|
|
1078
|
-
* @property {number} price_effective
|
|
1079
|
-
*
|
|
1080
|
-
* @property {
|
|
1081
|
-
*
|
|
1335
|
+
* @property {Object} [extra_meta] - Extra meta of the article in cart
|
|
1336
|
+
* @property {number} product_id - Product id associated with article in cart
|
|
1337
|
+
* @property {number} [loyalty_discount] - Loyalty points applied on cart
|
|
1338
|
+
* @property {number} discount - Discount value applied on article in cart
|
|
1339
|
+
* @property {number} price_effective - Current per unit price of product after
|
|
1340
|
+
* existing deductions
|
|
1341
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
|
|
1342
|
+
* used to make the payment
|
|
1343
|
+
* @property {number} [employee_discount] - Employee discount value applied on
|
|
1344
|
+
* article in cart
|
|
1345
|
+
* @property {number} cod_charges - Cash On Delivery charges applied on article in cart
|
|
1082
1346
|
*/
|
|
1083
1347
|
|
|
1084
1348
|
/**
|
|
1085
1349
|
* @typedef OpenApiPlatformCheckoutReq
|
|
1086
|
-
* @property {string} [payment_mode]
|
|
1087
|
-
*
|
|
1088
|
-
* @property {
|
|
1350
|
+
* @property {string} [payment_mode] - Payment mode from which the payment to be
|
|
1351
|
+
* done for the order
|
|
1352
|
+
* @property {number} cart_value - Total amount of user cart
|
|
1353
|
+
* @property {OpenApiOrderItem[]} cart_items - List of items in user cart
|
|
1089
1354
|
* @property {ShippingAddress} [shipping_address]
|
|
1090
|
-
* @property {number} [loyalty_discount]
|
|
1091
|
-
* @property {string} [comment]
|
|
1092
|
-
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1093
|
-
*
|
|
1094
|
-
* @property {
|
|
1095
|
-
* @property {
|
|
1096
|
-
* @property {
|
|
1355
|
+
* @property {number} [loyalty_discount] - Loyalty points applied on cart
|
|
1356
|
+
* @property {string} [comment] - Comment message added in cart after order placed
|
|
1357
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
|
|
1358
|
+
* used to make the payment
|
|
1359
|
+
* @property {Object} [employee_discount] - Employee discount value applied on user cart
|
|
1360
|
+
* @property {string} [coupon] - Coupon text of coupon applied on user cart
|
|
1361
|
+
* @property {number} cashback_applied - Cashback applied on user cart
|
|
1362
|
+
* @property {string} [gstin] - GSTIN number added in cart
|
|
1097
1363
|
* @property {ShippingAddress} billing_address
|
|
1098
|
-
* @property {string} coupon_code
|
|
1099
|
-
* @property {number} coupon_value
|
|
1100
|
-
* @property {number} delivery_charges
|
|
1101
|
-
*
|
|
1102
|
-
* @property {string} [
|
|
1103
|
-
* @property {string} [
|
|
1104
|
-
* @property {
|
|
1105
|
-
* @property {
|
|
1364
|
+
* @property {string} coupon_code - Coupon code to be applied to cart
|
|
1365
|
+
* @property {number} coupon_value - Value of the coupon applied to cart
|
|
1366
|
+
* @property {number} delivery_charges - Delivery charges of the order placed
|
|
1367
|
+
* via checkout API
|
|
1368
|
+
* @property {string} [affiliate_order_id] - Order id generated after placing order
|
|
1369
|
+
* @property {string} [currency_code] - Currency code for the price
|
|
1370
|
+
* @property {string} [order_id] - Order id generated after placing order
|
|
1371
|
+
* @property {OpenApiFiles[]} [files] - List of file url
|
|
1372
|
+
* @property {number} cod_charges - Cash On Delivery charges of the user cart
|
|
1106
1373
|
*/
|
|
1107
1374
|
|
|
1108
1375
|
/**
|
|
1109
|
-
* @typedef
|
|
1110
|
-
* @property {boolean} [success]
|
|
1111
|
-
* @property {string} [message]
|
|
1376
|
+
* @typedef OpenApiCheckoutResult
|
|
1377
|
+
* @property {boolean} [success] - The request success is defined
|
|
1378
|
+
* @property {string} [message] - Message of the api response
|
|
1112
1379
|
* @property {string} [order_ref_id] - Order id sent in request
|
|
1113
1380
|
* @property {string} order_id - Fynd order id
|
|
1114
1381
|
*/
|
|
1115
1382
|
|
|
1116
1383
|
/**
|
|
1117
1384
|
* @typedef AbandonedCart
|
|
1118
|
-
* @property {string} expire_at
|
|
1119
|
-
* @property {Object} [promotion]
|
|
1120
|
-
*
|
|
1121
|
-
* @property {
|
|
1122
|
-
* @property {
|
|
1123
|
-
* @property {Object}
|
|
1124
|
-
* @property {
|
|
1125
|
-
*
|
|
1126
|
-
* @property {
|
|
1127
|
-
*
|
|
1128
|
-
* @property {string}
|
|
1129
|
-
* @property {
|
|
1130
|
-
* @property {
|
|
1131
|
-
* @property {
|
|
1132
|
-
* @property {
|
|
1133
|
-
* @property {Object
|
|
1134
|
-
* @property {Object} [
|
|
1135
|
-
* @property {
|
|
1136
|
-
*
|
|
1137
|
-
* @property {
|
|
1138
|
-
*
|
|
1139
|
-
* @property {
|
|
1140
|
-
*
|
|
1141
|
-
* @property {
|
|
1142
|
-
* @property {
|
|
1143
|
-
* @property {
|
|
1144
|
-
* @property {
|
|
1145
|
-
* @property {
|
|
1146
|
-
* @property {string}
|
|
1147
|
-
* @property {Object} [
|
|
1148
|
-
* @property {boolean} [
|
|
1149
|
-
*
|
|
1150
|
-
* @property {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
* @
|
|
1155
|
-
* @property {
|
|
1156
|
-
* @property {
|
|
1385
|
+
* @property {string} expire_at - Expire details of user cart
|
|
1386
|
+
* @property {Object} [promotion] - Promotion object details like amount, mode,
|
|
1387
|
+
* currency and list of promotions in user cart
|
|
1388
|
+
* @property {boolean} is_default - User cart default status
|
|
1389
|
+
* @property {string} [comment] - Comment message to be added in user cart
|
|
1390
|
+
* @property {Object[]} articles - List of articles in user cart
|
|
1391
|
+
* @property {Object} [coupon] - Coupon data of user cart which denotes if
|
|
1392
|
+
* coupon is applied, coupon code, coupon amount, coupon title and coupon message
|
|
1393
|
+
* @property {number} [bulk_coupon_discount] - Total bulk discount amount
|
|
1394
|
+
* applied in user cart
|
|
1395
|
+
* @property {string} _id - Unique identifier of the user cart
|
|
1396
|
+
* @property {Object} [fynd_credits] - Fynd credit points applied in user cart
|
|
1397
|
+
* @property {number[]} [fc_index_map] - Flat article index in user cart
|
|
1398
|
+
* @property {string} [order_id] - Order id generated in user cart
|
|
1399
|
+
* @property {number} [discount] - Discount amount of the product in cart
|
|
1400
|
+
* @property {Object} [cod_charges] - Cash On Delivery charges of the user cart
|
|
1401
|
+
* @property {Object} [payments] - Payment object selected in user cart
|
|
1402
|
+
* @property {string} [payment_mode] - Payment mode of the payment selected to
|
|
1403
|
+
* do the payment
|
|
1404
|
+
* @property {Object[]} [shipments] - Shipment details for the items in a cart,
|
|
1405
|
+
* specific to the selected address.
|
|
1406
|
+
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
1407
|
+
* customer pickup at store
|
|
1408
|
+
* @property {number} uid - Unique Identifier of user cart
|
|
1409
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart
|
|
1410
|
+
* @property {number} [cart_value] - Total amount of user cart
|
|
1411
|
+
* @property {boolean} [is_archive] - Flag to indicate cart is archived or not
|
|
1412
|
+
* @property {string} created_on - Date time format when user cart created
|
|
1413
|
+
* @property {string} last_modified - Date time format when user cart last modified
|
|
1414
|
+
* @property {Object} [meta] - Extra meta data of user cart
|
|
1415
|
+
* @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
|
|
1416
|
+
* is doing fast checkout for the cart using buy now
|
|
1417
|
+
* @property {boolean} [is_active] - Flag indicates user cart is active or not
|
|
1418
|
+
* @property {Object} cashback - Cart level cashback data which denotes cashback
|
|
1419
|
+
* amount and cashback message
|
|
1420
|
+
* @property {Object[]} [payment_methods] - Payment methods list used to make the payment
|
|
1421
|
+
* @property {string} [gstin] - GSTIN added in user cart
|
|
1422
|
+
* @property {Object} [delivery_charges] - Delivery charges of user cart
|
|
1423
|
+
* @property {boolean} [merge_qty] - Flag indicates cart has merged article or not
|
|
1424
|
+
* @property {string} user_id - User Id of user cart
|
|
1425
|
+
* @property {string} [app_id] - Application id of user cart
|
|
1426
|
+
*/
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* @typedef AbandonedCartResult
|
|
1430
|
+
* @property {AbandonedCart[]} [items] - List of items in abandon cart
|
|
1431
|
+
* @property {Object} [result] - Define the list of items with updated status
|
|
1157
1432
|
* @property {Page} [page]
|
|
1158
1433
|
* @property {boolean} [success] - The request success is defined
|
|
1159
1434
|
* @property {string} [message] - Message of the response
|
|
@@ -1161,47 +1436,54 @@ const Joi = require("joi");
|
|
|
1161
1436
|
|
|
1162
1437
|
/**
|
|
1163
1438
|
* @typedef PaymentSelectionLock
|
|
1164
|
-
* @property {string} [payment_identifier]
|
|
1165
|
-
* @property {string} [default_options]
|
|
1166
|
-
* @property {boolean} [enabled]
|
|
1439
|
+
* @property {string} [payment_identifier] - Identifier for Payment Mode
|
|
1440
|
+
* @property {string} [default_options] - Default Selection Payment Mode
|
|
1441
|
+
* @property {boolean} [enabled] - Denotes if default payment selection is enable
|
|
1167
1442
|
*/
|
|
1168
1443
|
|
|
1169
1444
|
/**
|
|
1170
1445
|
* @typedef CartCurrency
|
|
1171
1446
|
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
1172
|
-
* @property {string} [symbol]
|
|
1447
|
+
* @property {string} [symbol] - Currency symbol for currency of user cart prices
|
|
1173
1448
|
*/
|
|
1174
1449
|
|
|
1175
1450
|
/**
|
|
1176
1451
|
* @typedef CartDetailCoupon
|
|
1177
|
-
* @property {number} [cashback_amount]
|
|
1178
|
-
* @property {string} [cashback_message_primary]
|
|
1179
|
-
*
|
|
1180
|
-
* @property {string} [
|
|
1181
|
-
*
|
|
1182
|
-
* @property {string} [
|
|
1183
|
-
* @property {string} [
|
|
1184
|
-
*
|
|
1185
|
-
* @property {string} [
|
|
1186
|
-
* @property {
|
|
1187
|
-
* @property {
|
|
1188
|
-
* @property {
|
|
1189
|
-
* @property {
|
|
1190
|
-
* @property {number} [
|
|
1191
|
-
* @property {
|
|
1192
|
-
*
|
|
1452
|
+
* @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart
|
|
1453
|
+
* @property {string} [cashback_message_primary] - Primary cashback message for
|
|
1454
|
+
* coupon applied to cart
|
|
1455
|
+
* @property {string} [cashback_message_secondary] - Secondary cashback message
|
|
1456
|
+
* for coupon applied to cart
|
|
1457
|
+
* @property {string} [coupon_code] - Coupon code to be applied to cart
|
|
1458
|
+
* @property {string} [coupon_description] - Coupon description of the coupon
|
|
1459
|
+
* applied to cart
|
|
1460
|
+
* @property {string} [coupon_id] - Unique identifier of the coupon applied to cart
|
|
1461
|
+
* @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart
|
|
1462
|
+
* @property {string} [coupon_title] - Coupon title of the coupon applied
|
|
1463
|
+
* @property {string} [coupon_type] - Type of the coupon applied to cart
|
|
1464
|
+
* @property {number} [coupon_value] - Value of the coupon applied to cart
|
|
1465
|
+
* @property {number} [discount] - Total discount earned from coupon applied to cart
|
|
1466
|
+
* @property {boolean} [is_applied] - Flag to determine where the coupon is
|
|
1467
|
+
* applied to cart or not
|
|
1468
|
+
* @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid
|
|
1469
|
+
* @property {number} [maximum_discount_value] - Maximum discount value of the
|
|
1470
|
+
* coupon applied to cart
|
|
1471
|
+
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
1472
|
+
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
1473
|
+
* applied to cart
|
|
1193
1474
|
*/
|
|
1194
1475
|
|
|
1195
1476
|
/**
|
|
1196
1477
|
* @typedef ChargesThreshold
|
|
1197
|
-
* @property {number} [charges]
|
|
1198
|
-
* @property {number} [threshold]
|
|
1478
|
+
* @property {number} [charges] - Charges amount to be applied on cart
|
|
1479
|
+
* @property {number} [threshold] - Threshold of cart value on which the charge
|
|
1480
|
+
* should be applied
|
|
1199
1481
|
*/
|
|
1200
1482
|
|
|
1201
1483
|
/**
|
|
1202
1484
|
* @typedef DeliveryChargesConfig
|
|
1203
|
-
* @property {boolean} [enabled]
|
|
1204
|
-
* @property {ChargesThreshold[]} [charges]
|
|
1485
|
+
* @property {boolean} [enabled] - Delivery charge enabled for the cart or not
|
|
1486
|
+
* @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold
|
|
1205
1487
|
*/
|
|
1206
1488
|
|
|
1207
1489
|
/**
|
|
@@ -1210,546 +1492,734 @@ const Joi = require("joi");
|
|
|
1210
1492
|
*/
|
|
1211
1493
|
|
|
1212
1494
|
/**
|
|
1213
|
-
* @typedef
|
|
1214
|
-
* @property {number} [cart_id]
|
|
1215
|
-
* @property {string} [uid]
|
|
1216
|
-
* @property {string} [coupon_text]
|
|
1217
|
-
* @property {string} [id]
|
|
1218
|
-
* @property {Object} [pan_config]
|
|
1495
|
+
* @typedef CartDetailResult
|
|
1496
|
+
* @property {number} [cart_id] - Unique identifier of the user cart
|
|
1497
|
+
* @property {string} [uid] - Unique identifier of the user cart
|
|
1498
|
+
* @property {string} [coupon_text] - Coupon text of coupon applied on cart
|
|
1499
|
+
* @property {string} [id] - Unique identifier of the user cart
|
|
1500
|
+
* @property {Object} [pan_config] - Pan card config states at what condition
|
|
1501
|
+
* user should enter the pan card
|
|
1219
1502
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1220
|
-
* @property {string} [comment]
|
|
1221
|
-
* @property {CartProductInfo[]} [items]
|
|
1503
|
+
* @property {string} [comment] - Comment message to be added in user cart
|
|
1504
|
+
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
1505
|
+
* includes item id, item size, store id, available sizes and rest of the item
|
|
1506
|
+
* related data
|
|
1222
1507
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1223
|
-
* @property {string} [delivery_charge_info]
|
|
1508
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
1509
|
+
* message on shipment
|
|
1224
1510
|
* @property {CartCommonConfig} [common_config]
|
|
1225
1511
|
* @property {CartDetailCoupon} [coupon]
|
|
1226
|
-
* @property {boolean} [restrict_checkout]
|
|
1227
|
-
*
|
|
1228
|
-
* @property {
|
|
1229
|
-
* @property {
|
|
1230
|
-
*
|
|
1512
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
1513
|
+
* the checkout process
|
|
1514
|
+
* @property {string} [message] - Message of the cart detail API response
|
|
1515
|
+
* @property {Object} [notification] - Notification object which denotes
|
|
1516
|
+
* notification data for user cart
|
|
1517
|
+
* @property {string} [staff_user_id] - Staff employee user id if cart is
|
|
1518
|
+
* created by staff employee for the customer
|
|
1519
|
+
* @property {boolean} [success] - Success flag of get cart detail API response
|
|
1231
1520
|
* @property {CartBreakup} [breakup_values]
|
|
1232
|
-
* @property {boolean} [is_valid]
|
|
1521
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
1522
|
+
* response is valid or not
|
|
1233
1523
|
* @property {CartCurrency} [currency]
|
|
1234
|
-
* @property {string} [checkout_mode]
|
|
1235
|
-
* @property {string} [last_modified]
|
|
1236
|
-
* @property {boolean} [buy_now]
|
|
1237
|
-
*
|
|
1238
|
-
* @property {
|
|
1239
|
-
* @property {
|
|
1240
|
-
*
|
|
1524
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart
|
|
1525
|
+
* @property {string} [last_modified] - Last modified timestamp of cart
|
|
1526
|
+
* @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
|
|
1527
|
+
* is doing fast checkout for the cart using buy now
|
|
1528
|
+
* @property {string} [gstin] - GSTIN added in user cart
|
|
1529
|
+
* @property {AppliedPromotion[]} [applied_promo_details] - List of applied
|
|
1530
|
+
* promotions data to cart which includes promotion id, promotion name, offer
|
|
1531
|
+
* text, description, buy rules, discount rules and promotion type
|
|
1532
|
+
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
1533
|
+
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
1534
|
+
* checkout API payload
|
|
1241
1535
|
*/
|
|
1242
1536
|
|
|
1243
1537
|
/**
|
|
1244
1538
|
* @typedef AddProductCart
|
|
1245
|
-
* @property {number} [quantity]
|
|
1246
|
-
*
|
|
1247
|
-
* @property {
|
|
1248
|
-
* @property {
|
|
1249
|
-
*
|
|
1250
|
-
* @property {
|
|
1251
|
-
*
|
|
1252
|
-
* @property {
|
|
1253
|
-
*
|
|
1254
|
-
* @property {
|
|
1255
|
-
* @property {Object} [
|
|
1256
|
-
*
|
|
1257
|
-
* @property {
|
|
1258
|
-
*
|
|
1539
|
+
* @property {number} [quantity] - Field to specify the product quantity that
|
|
1540
|
+
* user wants to buy
|
|
1541
|
+
* @property {string} [item_size] - Field to determine size of the product
|
|
1542
|
+
* @property {number} [seller_id] - Unique identifier of the seller selected by
|
|
1543
|
+
* the user from which user want to buy a product
|
|
1544
|
+
* @property {Object[]} [parent_item_identifiers] - Fields to determine parent
|
|
1545
|
+
* product of the product
|
|
1546
|
+
* @property {string[]} [product_group_tags] - Field to specify the product
|
|
1547
|
+
* groups of the product that the user is trying to add in cart
|
|
1548
|
+
* @property {string} [article_id] - Unique identifier of an article
|
|
1549
|
+
* @property {Object} [article_assignment] - Field to determine how article
|
|
1550
|
+
* assignment should happen by article assignment level and strategy
|
|
1551
|
+
* @property {number} [store_id] - Unique identifier of the store selected by
|
|
1552
|
+
* the user from which user want to buy a product
|
|
1553
|
+
* @property {string} [display] - Display field at article level
|
|
1554
|
+
* @property {number} [item_id] - Unique identifier to identify product
|
|
1555
|
+
* @property {Object} [extra_meta] - Extra meta data to be added at article
|
|
1556
|
+
* level while add items to cart
|
|
1557
|
+
* @property {Object} [_custom_json] - Field to add custom json at article level
|
|
1558
|
+
* while add items to cart
|
|
1559
|
+
* @property {Object} [meta] - Field to add meta data at article level
|
|
1560
|
+
* @property {boolean} [pos] - Filed to determine whether user is making request
|
|
1561
|
+
* from pos or not
|
|
1259
1562
|
* @property {string} [seller_identifier] - Add items using seller identifier for store os
|
|
1260
1563
|
*/
|
|
1261
1564
|
|
|
1262
1565
|
/**
|
|
1263
|
-
* @typedef
|
|
1264
|
-
* @property {boolean} [new_cart]
|
|
1265
|
-
*
|
|
1566
|
+
* @typedef AddCartCreation
|
|
1567
|
+
* @property {boolean} [new_cart] - Field to create to new cart whille user adds
|
|
1568
|
+
* item to cart
|
|
1569
|
+
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
1570
|
+
* added to cart like item id, item size, and item quantity
|
|
1266
1571
|
*/
|
|
1267
1572
|
|
|
1268
1573
|
/**
|
|
1269
|
-
* @typedef
|
|
1574
|
+
* @typedef AddCartDetailResult
|
|
1270
1575
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1271
1576
|
* False if partially added or not added.
|
|
1272
|
-
* @property {
|
|
1577
|
+
* @property {CartDetailResult} [cart]
|
|
1273
1578
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
1274
1579
|
* added. True if only few are added.
|
|
1275
|
-
* @property {string} [message]
|
|
1580
|
+
* @property {string} [message] - Message of add cart API response
|
|
1276
1581
|
*/
|
|
1277
1582
|
|
|
1278
1583
|
/**
|
|
1279
1584
|
* @typedef UpdateProductCart
|
|
1280
|
-
* @property {number} [quantity]
|
|
1281
|
-
* @property {string} [item_size]
|
|
1282
|
-
* @property {Object} [parent_item_identifiers]
|
|
1283
|
-
*
|
|
1284
|
-
* @property {Object} [
|
|
1285
|
-
* @property {Object} [
|
|
1286
|
-
* @property {
|
|
1287
|
-
* @property {number} [
|
|
1585
|
+
* @property {number} [quantity] - Field to update the quantity of the item in cart
|
|
1586
|
+
* @property {string} [item_size] - Field to update the size of the product in cart
|
|
1587
|
+
* @property {Object} [parent_item_identifiers] - Field to update parent product
|
|
1588
|
+
* of the item in cart
|
|
1589
|
+
* @property {Object} [meta] - Field to update meta of the item in cart
|
|
1590
|
+
* @property {Object} [extra_meta] - Field to update extra meta of the product in cart
|
|
1591
|
+
* @property {Object} [_custom_json] - Field to update custom json of the product in cart
|
|
1592
|
+
* @property {number} [item_id] - Item id of the product that needs to be updated
|
|
1593
|
+
* @property {number} [item_index] - Item index determines on which index the
|
|
1594
|
+
* product falls to be updated
|
|
1288
1595
|
* @property {CartProductIdentifer} identifiers
|
|
1289
|
-
* @property {string} [article_id]
|
|
1596
|
+
* @property {string} [article_id] - Article id of the product in cart
|
|
1290
1597
|
*/
|
|
1291
1598
|
|
|
1292
1599
|
/**
|
|
1293
|
-
* @typedef
|
|
1600
|
+
* @typedef FreeGiftItemCreation
|
|
1601
|
+
* @property {string} promotion_id - Unique identifier of the free gift promotion.
|
|
1602
|
+
* @property {string} item_id - Unique identifier of the selected free gift item.
|
|
1603
|
+
* @property {string} item_size - Size of the selected free gift item.
|
|
1604
|
+
*/
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* @typedef UpdateCartCreation
|
|
1294
1608
|
* @property {UpdateProductCart[]} [items]
|
|
1295
|
-
* @property {
|
|
1609
|
+
* @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
|
|
1610
|
+
* items with updated sizes.
|
|
1611
|
+
* @property {string} operation - Cart opertaion type
|
|
1296
1612
|
*/
|
|
1297
1613
|
|
|
1298
1614
|
/**
|
|
1299
|
-
* @typedef
|
|
1615
|
+
* @typedef UpdateCartDetailResult
|
|
1300
1616
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1301
1617
|
* False if partially added or not added.
|
|
1302
|
-
* @property {
|
|
1303
|
-
* @property {string} [message]
|
|
1618
|
+
* @property {CartDetailResult} [cart]
|
|
1619
|
+
* @property {string} [message] - Message of update cart API response
|
|
1304
1620
|
*/
|
|
1305
1621
|
|
|
1306
1622
|
/**
|
|
1307
1623
|
* @typedef OverrideCartItemPromo
|
|
1308
|
-
* @property {string} promo_id
|
|
1309
|
-
* @property {string} promo_amount
|
|
1310
|
-
* @property {string} [promo_desc]
|
|
1624
|
+
* @property {string} promo_id - Promotion id applied on product
|
|
1625
|
+
* @property {string} promo_amount - Promotion amount applied on product
|
|
1626
|
+
* @property {string} [promo_desc] - Promotion description applied on product
|
|
1311
1627
|
* @property {string} [rwrd_tndr]
|
|
1312
|
-
* @property {Object[]} [item_list]
|
|
1313
|
-
* @property {string} [parent_promo_id]
|
|
1628
|
+
* @property {Object[]} [item_list] - List of items
|
|
1629
|
+
* @property {string} [parent_promo_id] - Parent promotion unique identifier
|
|
1314
1630
|
*/
|
|
1315
1631
|
|
|
1316
1632
|
/**
|
|
1317
1633
|
* @typedef OverrideCartItem
|
|
1318
|
-
* @property {string} [seller_identifier]
|
|
1319
|
-
* @property {number} [quantity]
|
|
1320
|
-
* @property {string} size
|
|
1321
|
-
* @property {number} price_marked
|
|
1322
|
-
* @property {number} amount_paid
|
|
1323
|
-
* @property {OverrideCartItemPromo[]} [promo_list]
|
|
1324
|
-
* @property {Object} [extra_meta]
|
|
1325
|
-
* @property {number} item_id
|
|
1326
|
-
* @property {number} discount
|
|
1327
|
-
* @property {number} price_effective
|
|
1634
|
+
* @property {string} [seller_identifier] - Seller identifiers of the product size.
|
|
1635
|
+
* @property {number} [quantity] - Item quantity, which you have added into cart
|
|
1636
|
+
* @property {string} size - Item size, which you have added into cart
|
|
1637
|
+
* @property {number} price_marked - Original price of product
|
|
1638
|
+
* @property {number} amount_paid - Amount needs to paid for item
|
|
1639
|
+
* @property {OverrideCartItemPromo[]} [promo_list] - List of promotion applied on item
|
|
1640
|
+
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order
|
|
1641
|
+
* @property {number} item_id - Item unique id in user cart
|
|
1642
|
+
* @property {number} discount - Discount amount applied on item
|
|
1643
|
+
* @property {number} price_effective - Current per unit price of product after
|
|
1644
|
+
* existing deductions
|
|
1328
1645
|
*/
|
|
1329
1646
|
|
|
1330
1647
|
/**
|
|
1331
1648
|
* @typedef OverrideCheckoutReq
|
|
1332
|
-
* @property {string} cart_id
|
|
1333
|
-
* @property {string} payment_mode
|
|
1334
|
-
*
|
|
1335
|
-
* @property {
|
|
1336
|
-
*
|
|
1337
|
-
*
|
|
1338
|
-
* @property {string}
|
|
1339
|
-
*
|
|
1340
|
-
* @property {string}
|
|
1341
|
-
*
|
|
1342
|
-
* @property {
|
|
1343
|
-
* @property {
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
*
|
|
1348
|
-
* @property {
|
|
1349
|
-
*
|
|
1350
|
-
* @property {
|
|
1351
|
-
*
|
|
1352
|
-
* @property {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1649
|
+
* @property {string} cart_id - The cart id of user cart
|
|
1650
|
+
* @property {string} payment_mode - Payment mode from which the payment to be
|
|
1651
|
+
* done for the order
|
|
1652
|
+
* @property {Object} [billing_address] - Billing address json which includes
|
|
1653
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
1654
|
+
* customer landmark and customer name
|
|
1655
|
+
* @property {string} merchant_code - Merchant code of the payment mode selected
|
|
1656
|
+
* to do the payment
|
|
1657
|
+
* @property {string} payment_identifier - Payment identifier of the payment
|
|
1658
|
+
* mode selected to do the payment
|
|
1659
|
+
* @property {string} currency_code - Currency code for the price
|
|
1660
|
+
* @property {string} aggregator - Aggregator name of the payment gateway
|
|
1661
|
+
* @property {string} order_type - Order type of the order being placed like
|
|
1662
|
+
* pickAtStore or HomeDelivery
|
|
1663
|
+
* @property {string} [callback_url] - Callback url to be redirected after
|
|
1664
|
+
* payment received/failed
|
|
1665
|
+
* @property {OverrideCartItem[]} cart_items - List of items which includes
|
|
1666
|
+
* their size, id, discount and promo details
|
|
1667
|
+
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
1668
|
+
* which the order is getting placed
|
|
1669
|
+
* @property {Object} [shipping_address] - Shipping address json which includes
|
|
1670
|
+
* name, area, address, phone, area_code, state, country, country code and email
|
|
1671
|
+
*/
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* @typedef OverrideCheckoutResult
|
|
1675
|
+
* @property {Object} data - Data of the user cart checkout includes cart data,
|
|
1676
|
+
* address, user id, order type etc
|
|
1677
|
+
* @property {Object} cart - Cart details in API response which included cart
|
|
1678
|
+
* id, items in cart, promise, order type, breakup values etc.
|
|
1679
|
+
* @property {string} success - Success flag of cart override checkout API response
|
|
1680
|
+
* @property {string} order_id - Order id generated after placing order
|
|
1681
|
+
* @property {string} message - Message of the cart override checkout API response
|
|
1682
|
+
*/
|
|
1683
|
+
|
|
1684
|
+
/**
|
|
1685
|
+
* @typedef GetShareCartLinkCreation
|
|
1357
1686
|
* @property {string} [id] - Cart uid for generating sharing
|
|
1358
1687
|
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
1359
1688
|
* data will be used to generate link as well as sent as shared details.
|
|
1360
1689
|
*/
|
|
1361
1690
|
|
|
1362
1691
|
/**
|
|
1363
|
-
* @typedef
|
|
1364
|
-
* @property {string} [token] - Short url unique id
|
|
1365
|
-
*
|
|
1692
|
+
* @typedef GetShareCartLinkResult
|
|
1693
|
+
* @property {string} [token] - Short url unique id of the cart which is opted
|
|
1694
|
+
* to share with other user
|
|
1695
|
+
* @property {string} [share_url] - Short shareable final url which can populate
|
|
1696
|
+
* shared cart items in one's cart or replaced one's cart with shared cart items
|
|
1366
1697
|
*/
|
|
1367
1698
|
|
|
1368
1699
|
/**
|
|
1369
1700
|
* @typedef SharedCartDetails
|
|
1370
1701
|
* @property {Object} [source] - Share link device and other source information
|
|
1371
1702
|
* @property {Object} [user] - User details of who generated share link
|
|
1372
|
-
* @property {string} [token] - Short link id
|
|
1373
|
-
* @property {string} [created_on]
|
|
1703
|
+
* @property {string} [token] - Short link id of the user cart that needs to be shared
|
|
1704
|
+
* @property {string} [created_on] - Created on timestamp of user cart
|
|
1374
1705
|
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
1375
1706
|
*/
|
|
1376
1707
|
|
|
1377
1708
|
/**
|
|
1378
1709
|
* @typedef SharedCart
|
|
1379
|
-
* @property {string} [coupon_text]
|
|
1380
|
-
* @property {string} [id]
|
|
1710
|
+
* @property {string} [coupon_text] - Coupon text of the applied coupon on user cart
|
|
1711
|
+
* @property {string} [id] - Cart id of shared cart
|
|
1381
1712
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1382
|
-
* @property {string} [comment]
|
|
1383
|
-
* @property {CartProductInfo[]} [items]
|
|
1713
|
+
* @property {string} [comment] - Comment message added in user cart
|
|
1714
|
+
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
1715
|
+
* includes item id, item size, store id, available sizes and rest of the item
|
|
1716
|
+
* related data
|
|
1384
1717
|
* @property {SharedCartDetails} [shared_cart_details]
|
|
1385
1718
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1386
|
-
* @property {string} [delivery_charge_info]
|
|
1387
|
-
*
|
|
1388
|
-
* @property {
|
|
1719
|
+
* @property {string} [delivery_charge_info] - Delivery charge info message of
|
|
1720
|
+
* the user cart
|
|
1721
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
1722
|
+
* the checkout process
|
|
1723
|
+
* @property {string} [message] - Message of the get shared cart API response
|
|
1389
1724
|
* @property {CartBreakup} [breakup_values]
|
|
1390
|
-
* @property {boolean} [is_valid]
|
|
1391
|
-
* @property {string} [uid]
|
|
1392
|
-
* @property {string} [checkout_mode]
|
|
1725
|
+
* @property {boolean} [is_valid] - Valid flag for get shared cart detail API
|
|
1726
|
+
* @property {string} [uid] - Cart id of the user cart
|
|
1727
|
+
* @property {string} [checkout_mode] - Checkout mode of address on which
|
|
1728
|
+
* address to be used for which checkout mode of cart
|
|
1393
1729
|
* @property {CartCurrency} [currency]
|
|
1394
|
-
* @property {string} [last_modified]
|
|
1395
|
-
* @property {boolean} [buy_now]
|
|
1396
|
-
* @property {number} [cart_id]
|
|
1397
|
-
* @property {string} [gstin]
|
|
1398
|
-
* @property {Object} [custom_cart_meta]
|
|
1730
|
+
* @property {string} [last_modified] - Last modified timestamp of user cart
|
|
1731
|
+
* @property {boolean} [buy_now] - Buy now flag of user cart
|
|
1732
|
+
* @property {number} [cart_id] - Cart id of user cart for generating cart sharing token
|
|
1733
|
+
* @property {string} [gstin] - GSTIN added in user cart
|
|
1734
|
+
* @property {Object} [custom_cart_meta] - Custom cart meta of user cart added
|
|
1735
|
+
* via update cart meta API
|
|
1399
1736
|
*/
|
|
1400
1737
|
|
|
1401
1738
|
/**
|
|
1402
|
-
* @typedef
|
|
1739
|
+
* @typedef SharedCartResult
|
|
1403
1740
|
* @property {SharedCart} [cart]
|
|
1404
|
-
* @property {string} [error]
|
|
1741
|
+
* @property {string} [error] - Error details if any error occurs which includes
|
|
1742
|
+
* type of error, error code and error message
|
|
1405
1743
|
*/
|
|
1406
1744
|
|
|
1407
1745
|
/**
|
|
1408
1746
|
* @typedef CartList
|
|
1409
|
-
* @property {string} [cart_id]
|
|
1410
|
-
* @property {Object} [pick_up_customer_details]
|
|
1411
|
-
*
|
|
1412
|
-
* @property {
|
|
1413
|
-
* @property {string} [
|
|
1414
|
-
* @property {string} [
|
|
1415
|
-
* @property {
|
|
1747
|
+
* @property {string} [cart_id] - The cart id of user
|
|
1748
|
+
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
1749
|
+
* customer pickup at store
|
|
1750
|
+
* @property {number} [cart_value] - Total amount of cart
|
|
1751
|
+
* @property {string} [created_on] - Date format when cart created
|
|
1752
|
+
* @property {string} [user_id] - User id which is associated with cart
|
|
1753
|
+
* @property {string} [currency_code] - Active cart currency code
|
|
1754
|
+
* @property {number} [item_counts] - Article total count in cart
|
|
1416
1755
|
*/
|
|
1417
1756
|
|
|
1418
1757
|
/**
|
|
1419
|
-
* @typedef
|
|
1420
|
-
* @property {boolean} [success]
|
|
1421
|
-
* @property {CartList[]} [data]
|
|
1758
|
+
* @typedef MultiCartResult
|
|
1759
|
+
* @property {boolean} [success] - True if get list of cart successfully.
|
|
1760
|
+
* @property {CartList[]} [data] - List of active carts and their item's count
|
|
1422
1761
|
*/
|
|
1423
1762
|
|
|
1424
1763
|
/**
|
|
1425
1764
|
* @typedef UpdateUserCartMapping
|
|
1426
|
-
* @property {string} user_id
|
|
1765
|
+
* @property {string} user_id - User Id of user for which we map with the cart
|
|
1427
1766
|
*/
|
|
1428
1767
|
|
|
1429
1768
|
/**
|
|
1430
1769
|
* @typedef UserInfo
|
|
1431
|
-
* @property {string} [gender]
|
|
1432
|
-
* @property {string} [modified_on]
|
|
1433
|
-
* @property {string} [_id]
|
|
1434
|
-
* @property {string} [uid]
|
|
1435
|
-
* @property {string} [external_id]
|
|
1436
|
-
* @property {string} [mobile]
|
|
1437
|
-
* @property {string} [last_name]
|
|
1438
|
-
* @property {string} [created_at]
|
|
1439
|
-
* @property {string} [first_name]
|
|
1770
|
+
* @property {string} [gender] - User gender
|
|
1771
|
+
* @property {string} [modified_on] - Date format of user when user last modified
|
|
1772
|
+
* @property {string} [_id] - Unique Identifier of user
|
|
1773
|
+
* @property {string} [uid] - Unique UID of user
|
|
1774
|
+
* @property {string} [external_id] - Unique external id
|
|
1775
|
+
* @property {string} [mobile] - 10 digit Mobile number of user
|
|
1776
|
+
* @property {string} [last_name] - Last name of user
|
|
1777
|
+
* @property {string} [created_at] - Date format of user when user registered
|
|
1778
|
+
* @property {string} [first_name] - First name of user
|
|
1440
1779
|
*/
|
|
1441
1780
|
|
|
1442
1781
|
/**
|
|
1443
|
-
* @typedef
|
|
1444
|
-
* @property {string} [coupon_text]
|
|
1782
|
+
* @typedef UserCartMappingResult
|
|
1783
|
+
* @property {string} [coupon_text] - Coupon text of coupon applied on cart
|
|
1445
1784
|
* @property {UserInfo} [user]
|
|
1446
|
-
* @property {string} [id]
|
|
1447
|
-
* @property {Object} [pan_config]
|
|
1785
|
+
* @property {string} [id] - Unique identifier of the user cart
|
|
1786
|
+
* @property {Object} [pan_config] - Pan card config states at what condition
|
|
1787
|
+
* user should enter the pan card
|
|
1448
1788
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1449
|
-
* @property {string} [comment]
|
|
1450
|
-
* @property {CartProductInfo[]} [items]
|
|
1789
|
+
* @property {string} [comment] - Comment message to be added in user cart
|
|
1790
|
+
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
1791
|
+
* includes item id, item size, store id, available sizes and rest of the item
|
|
1792
|
+
* related data
|
|
1451
1793
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1452
|
-
* @property {string} [delivery_charge_info]
|
|
1453
|
-
*
|
|
1454
|
-
* @property {
|
|
1794
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
1795
|
+
* message on shipment
|
|
1796
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
1797
|
+
* the checkout process
|
|
1798
|
+
* @property {string} [message] - Message of the get cart detail API response
|
|
1455
1799
|
* @property {CartBreakup} [breakup_values]
|
|
1456
|
-
* @property {boolean} [is_valid]
|
|
1800
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
1801
|
+
* response is valid or not
|
|
1457
1802
|
* @property {CartCurrency} [currency]
|
|
1458
|
-
* @property {string} [checkout_mode]
|
|
1459
|
-
* @property {string} [last_modified]
|
|
1460
|
-
* @property {boolean} [buy_now]
|
|
1461
|
-
*
|
|
1462
|
-
* @property {
|
|
1463
|
-
* @property {
|
|
1464
|
-
*
|
|
1803
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart
|
|
1804
|
+
* @property {string} [last_modified] - Last modified timestamp of cart
|
|
1805
|
+
* @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
|
|
1806
|
+
* is doing fast checkout for the cart using buy now
|
|
1807
|
+
* @property {string} [gstin] - GSTIN added in user cart
|
|
1808
|
+
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
1809
|
+
* checkout API payload
|
|
1810
|
+
* @property {AppliedPromotion[]} [applied_promo_details] - List of applied
|
|
1811
|
+
* promotions data to cart which includes promotion id, promotion name, offer
|
|
1812
|
+
* text, description, buy rules, discount rules and promotion type
|
|
1813
|
+
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
1465
1814
|
*/
|
|
1466
1815
|
|
|
1467
1816
|
/**
|
|
1468
|
-
* @typedef
|
|
1469
|
-
* @property {string} [user_id]
|
|
1470
|
-
*
|
|
1471
|
-
* @property {
|
|
1817
|
+
* @typedef PlatformAddCartDetails
|
|
1818
|
+
* @property {string} [user_id] - The user id of user, for which we need to add
|
|
1819
|
+
* item into cart
|
|
1820
|
+
* @property {boolean} [new_cart] - Field to create to new cart whille user adds
|
|
1821
|
+
* item to cart
|
|
1822
|
+
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
1823
|
+
* added to cart like item id, item size, and item quantity
|
|
1472
1824
|
*/
|
|
1473
1825
|
|
|
1474
1826
|
/**
|
|
1475
|
-
* @typedef
|
|
1476
|
-
* @property {string} [user_id]
|
|
1477
|
-
*
|
|
1478
|
-
* @property {
|
|
1827
|
+
* @typedef PlatformUpdateCartDetails
|
|
1828
|
+
* @property {string} [user_id] - The user id of user, for which we need to
|
|
1829
|
+
* update the cart
|
|
1830
|
+
* @property {UpdateProductCart[]} [items] - List items data that needs to be
|
|
1831
|
+
* updated in cart
|
|
1832
|
+
* @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
|
|
1833
|
+
* items with updated sizes.
|
|
1834
|
+
* @property {string} operation - Field to determine if item to be removed from
|
|
1835
|
+
* cart or it needs to be updated
|
|
1479
1836
|
*/
|
|
1480
1837
|
|
|
1481
1838
|
/**
|
|
1482
|
-
* @typedef
|
|
1483
|
-
* @property {string[]} [cart_id_list]
|
|
1839
|
+
* @typedef DeleteCartDetails
|
|
1840
|
+
* @property {string[]} [cart_id_list] - List of all cart ids, which need to delete
|
|
1484
1841
|
*/
|
|
1485
1842
|
|
|
1486
1843
|
/**
|
|
1487
|
-
* @typedef
|
|
1844
|
+
* @typedef DeleteCartDetailResult
|
|
1488
1845
|
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
1489
1846
|
* if not archived.
|
|
1490
|
-
* @property {string} [message]
|
|
1847
|
+
* @property {string} [message] - Message for delete cart response
|
|
1491
1848
|
*/
|
|
1492
1849
|
|
|
1493
1850
|
/**
|
|
1494
|
-
* @typedef
|
|
1851
|
+
* @typedef CartItemCountResult
|
|
1495
1852
|
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
1496
1853
|
*/
|
|
1497
1854
|
|
|
1498
1855
|
/**
|
|
1499
1856
|
* @typedef Coupon
|
|
1500
|
-
* @property {string} [title]
|
|
1501
|
-
*
|
|
1502
|
-
* @property {
|
|
1503
|
-
*
|
|
1504
|
-
* @property {string} [
|
|
1505
|
-
* @property {
|
|
1506
|
-
*
|
|
1507
|
-
* @property {string} [
|
|
1508
|
-
* @property {
|
|
1509
|
-
* @property {
|
|
1510
|
-
* @property {string} [
|
|
1511
|
-
*
|
|
1512
|
-
* @property {
|
|
1513
|
-
*
|
|
1514
|
-
* @property {
|
|
1857
|
+
* @property {string} [title] - Coupon Title of the coupon applied denotes name
|
|
1858
|
+
* of the coupon
|
|
1859
|
+
* @property {number} [max_discount_value] - Maximum discount value of the
|
|
1860
|
+
* coupon applied to cart
|
|
1861
|
+
* @property {string} [coupon_code] - Coupon code of the coupon applied on cart
|
|
1862
|
+
* @property {boolean} [is_applied] - Flag to determine where the coupon is
|
|
1863
|
+
* applied to cart or not
|
|
1864
|
+
* @property {string} [coupon_type] - Type of the coupon applied to cart
|
|
1865
|
+
* @property {string} [expires_on] - Message to display to user for expiry of the coupon
|
|
1866
|
+
* @property {number} [coupon_value] - Coupon value of the coupon applied to cart
|
|
1867
|
+
* @property {string} [sub_title] - Coupon subtitle of the coupon applied to
|
|
1868
|
+
* cart which is used to display
|
|
1869
|
+
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
1870
|
+
* applied to cart
|
|
1871
|
+
* @property {boolean} [is_applicable] - Flag to determine where the coupon is
|
|
1872
|
+
* applicable to cart or not
|
|
1873
|
+
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
1874
|
+
* @property {string} [description] - Coupon description of the coupon applied to cart
|
|
1875
|
+
* @property {string} [start_date] - Start date of the coupon when the coupon
|
|
1876
|
+
* will be live for the users to apply on cart
|
|
1877
|
+
* @property {string} [end_date] - End date of the coupon on which the coupon expires
|
|
1878
|
+
* @property {string} [coupon_applicable_message] - Message which is used to
|
|
1879
|
+
* display to the customer if the coupon is applied successfully
|
|
1515
1880
|
*/
|
|
1516
1881
|
|
|
1517
1882
|
/**
|
|
1518
1883
|
* @typedef PageCoupon
|
|
1519
|
-
* @property {boolean} [has_next]
|
|
1520
|
-
* @property {number} [current]
|
|
1521
|
-
* @property {number} [total]
|
|
1522
|
-
* @property {number} [total_item_count]
|
|
1523
|
-
* @property {boolean} [has_previous]
|
|
1884
|
+
* @property {boolean} [has_next] - Denotes if next page of coupon is available
|
|
1885
|
+
* @property {number} [current] - Current page number
|
|
1886
|
+
* @property {number} [total] - Total pages of coupon availalbe
|
|
1887
|
+
* @property {number} [total_item_count] - Total coupons are available for the cart
|
|
1888
|
+
* @property {boolean} [has_previous] - Denotes if previous page of the coupon
|
|
1889
|
+
* is available
|
|
1524
1890
|
*/
|
|
1525
1891
|
|
|
1526
1892
|
/**
|
|
1527
|
-
* @typedef
|
|
1528
|
-
* @property {Coupon[]} [available_coupon_list]
|
|
1893
|
+
* @typedef GetCouponResult
|
|
1894
|
+
* @property {Coupon[]} [available_coupon_list] - List of available coupon which
|
|
1895
|
+
* can be applied on cart
|
|
1529
1896
|
* @property {PageCoupon} [page]
|
|
1530
1897
|
*/
|
|
1531
1898
|
|
|
1532
1899
|
/**
|
|
1533
|
-
* @typedef
|
|
1900
|
+
* @typedef ApplyCouponDetails
|
|
1534
1901
|
* @property {string} coupon_code - Coupon code to be applied
|
|
1535
1902
|
*/
|
|
1536
1903
|
|
|
1537
1904
|
/**
|
|
1538
1905
|
* @typedef GeoLocation
|
|
1539
|
-
* @property {number} [longitude]
|
|
1540
|
-
* @property {number} [latitude]
|
|
1906
|
+
* @property {number} [longitude] - Longitude coordinate for address
|
|
1907
|
+
* @property {number} [latitude] - Latitude coordinate for address
|
|
1541
1908
|
*/
|
|
1542
1909
|
|
|
1543
1910
|
/**
|
|
1544
1911
|
* @typedef PlatformAddress
|
|
1545
|
-
* @property {string} [phone]
|
|
1546
|
-
* @property {string} [id]
|
|
1547
|
-
* @property {string} [area_code_slug]
|
|
1548
|
-
*
|
|
1912
|
+
* @property {string} [phone] - Phone number for address
|
|
1913
|
+
* @property {string} [id] - Id of the address
|
|
1914
|
+
* @property {string} [area_code_slug] - Area code slug for address. example
|
|
1915
|
+
* pincode is slug for India
|
|
1916
|
+
* @property {string} [country_code] - Country code of address
|
|
1549
1917
|
* @property {GeoLocation} [geo_location]
|
|
1550
|
-
* @property {string} [country]
|
|
1551
|
-
* @property {string} [state]
|
|
1552
|
-
* @property {boolean} [is_default_address]
|
|
1553
|
-
*
|
|
1554
|
-
* @property {string} [
|
|
1555
|
-
* @property {string} [
|
|
1556
|
-
* @property {string} [
|
|
1557
|
-
* @property {string} [
|
|
1558
|
-
* @property {string} [
|
|
1559
|
-
* @property {
|
|
1560
|
-
*
|
|
1561
|
-
* @property {
|
|
1562
|
-
* @property {
|
|
1563
|
-
* @property {string} [
|
|
1564
|
-
* @property {
|
|
1565
|
-
* @property {string} [
|
|
1918
|
+
* @property {string} [country] - Country of address
|
|
1919
|
+
* @property {string} [state] - State of the address
|
|
1920
|
+
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
1921
|
+
* selected then this should be the default address selected
|
|
1922
|
+
* @property {string[]} [tags] - Tags of address from which it can be identified
|
|
1923
|
+
* @property {string} [created_by_user_id] - Created by user id of address
|
|
1924
|
+
* @property {string} [landmark] - Landmark of address
|
|
1925
|
+
* @property {string} [email] - Email address for address data
|
|
1926
|
+
* @property {string} [area_code] - Area code of the address
|
|
1927
|
+
* @property {string} [checkout_mode] - Checkout mode of address on which
|
|
1928
|
+
* address to be used for which checkout mode of cart
|
|
1929
|
+
* @property {Object} [meta] - Metadata of the address
|
|
1930
|
+
* @property {boolean} [is_active] - States whether address is active or not
|
|
1931
|
+
* @property {string} [name] - Name of person in address data to whom it belongs to
|
|
1932
|
+
* @property {Object} [google_map_point] - Google map point of the address
|
|
1933
|
+
* @property {string} [cart_id] - The cart id of user cart
|
|
1934
|
+
* @property {string} [city] - City of the address
|
|
1935
|
+
* @property {string} [sector] - Sector of the address
|
|
1566
1936
|
* @property {string} [state_code] - State code for international address
|
|
1567
|
-
* @property {string} [area]
|
|
1568
|
-
* @property {string} [user_id]
|
|
1569
|
-
* @property {string} [address_type]
|
|
1570
|
-
* @property {string} [address]
|
|
1571
|
-
* @property {string} [country_phone_code]
|
|
1572
|
-
* @property {string} [country_iso_code]
|
|
1573
|
-
* @property {Object} [_custom_json]
|
|
1937
|
+
* @property {string} [area] - Area description for address
|
|
1938
|
+
* @property {string} [user_id] - User id of address for which address is created
|
|
1939
|
+
* @property {string} [address_type] - Address type of address
|
|
1940
|
+
* @property {string} [address] - Address description for address data
|
|
1941
|
+
* @property {string} [country_phone_code] - Country phone code for address
|
|
1942
|
+
* @property {string} [country_iso_code] - Country iso code for address
|
|
1943
|
+
* @property {Object} [_custom_json] - Custom json of the address
|
|
1574
1944
|
*/
|
|
1575
1945
|
|
|
1576
1946
|
/**
|
|
1577
|
-
* @typedef
|
|
1578
|
-
* @property {
|
|
1947
|
+
* @typedef ValidationConfig
|
|
1948
|
+
* @property {number} address_max_limit - The maximum number of addresses a user can have.
|
|
1949
|
+
* @property {number} user_address_count - The total number of addresses saved by a user.
|
|
1579
1950
|
*/
|
|
1580
1951
|
|
|
1581
1952
|
/**
|
|
1582
|
-
* @typedef
|
|
1583
|
-
* @property {
|
|
1584
|
-
* @property {
|
|
1585
|
-
* @property {boolean} [is_default_address]
|
|
1953
|
+
* @typedef PlatformGetAddressesDetails
|
|
1954
|
+
* @property {PlatformAddress[]} [address] - List of all address saved by customer
|
|
1955
|
+
* @property {ValidationConfig} [validation_config]
|
|
1586
1956
|
*/
|
|
1587
1957
|
|
|
1588
1958
|
/**
|
|
1589
|
-
* @typedef
|
|
1590
|
-
* @property {string} [id]
|
|
1591
|
-
* @property {boolean} [
|
|
1592
|
-
* @property {boolean} [
|
|
1593
|
-
*
|
|
1959
|
+
* @typedef SaveAddressDetails
|
|
1960
|
+
* @property {string} [id] - Id of the address
|
|
1961
|
+
* @property {boolean} [success] - Success flag of save address Response
|
|
1962
|
+
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
1963
|
+
* selected then this should be the default address selected
|
|
1594
1964
|
*/
|
|
1595
1965
|
|
|
1596
1966
|
/**
|
|
1597
|
-
* @typedef
|
|
1598
|
-
* @property {string} [id]
|
|
1599
|
-
* @property {boolean} [
|
|
1967
|
+
* @typedef UpdateAddressDetails
|
|
1968
|
+
* @property {string} [id] - ID of an address
|
|
1969
|
+
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
1970
|
+
* selected then this should be the default address selected
|
|
1971
|
+
* @property {boolean} [success] - Success flag of update address response
|
|
1972
|
+
* @property {boolean} [is_updated] - Updated flag for update address operation
|
|
1973
|
+
* if the address updated or not
|
|
1600
1974
|
*/
|
|
1601
1975
|
|
|
1602
1976
|
/**
|
|
1603
|
-
* @typedef
|
|
1604
|
-
* @property {string} [
|
|
1605
|
-
* @property {
|
|
1606
|
-
*
|
|
1607
|
-
* @property {string} [id]
|
|
1608
|
-
* @property {string} [user_id]
|
|
1977
|
+
* @typedef DeleteAddressResult
|
|
1978
|
+
* @property {string} [id] - Id of the address
|
|
1979
|
+
* @property {boolean} [is_deleted] - Deleted flag in delete address response
|
|
1980
|
+
* states whether the address was deleted or not
|
|
1609
1981
|
*/
|
|
1610
1982
|
|
|
1611
1983
|
/**
|
|
1612
|
-
* @typedef
|
|
1613
|
-
* @property {string} [
|
|
1614
|
-
*
|
|
1615
|
-
* @property {string} [
|
|
1984
|
+
* @typedef PlatformSelectCartAddress
|
|
1985
|
+
* @property {string} [cart_id] - Cart id of the user cart for which the select
|
|
1986
|
+
* address operation performed
|
|
1987
|
+
* @property {string} [billing_address_id] - Billing address id selected by user
|
|
1988
|
+
* on which shipment bill to be generated
|
|
1989
|
+
* @property {string} [checkout_mode] - The checkout mode in cart
|
|
1990
|
+
* @property {string} [id] - Address is selected by user on which shipment to be delivered
|
|
1991
|
+
* @property {string} [user_id] - Unique Identifier of user
|
|
1616
1992
|
*/
|
|
1617
1993
|
|
|
1618
1994
|
/**
|
|
1619
|
-
* @typedef
|
|
1620
|
-
* @property {
|
|
1621
|
-
* @property {
|
|
1622
|
-
* @property {
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
* @
|
|
1995
|
+
* @typedef ShipmentArticle
|
|
1996
|
+
* @property {string} [meta] - Article meta data for shipment
|
|
1997
|
+
* @property {string} [quantity] - Article quantity for shipment
|
|
1998
|
+
* @property {string} [article_id] - Article unique id for shipment
|
|
1999
|
+
*/
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* @typedef PlatformShipmentDetails
|
|
2003
|
+
* @property {number} [shipments] - Count of shipments that will be shipped
|
|
2004
|
+
* @property {number} [fulfillment_id] - Fulfilment id of the shipment
|
|
2005
|
+
* @property {CartProductInfo[]} [items] - Item details in the shipment
|
|
2006
|
+
* @property {Object} [dp_options] - Delivery partner options that are available
|
|
2007
|
+
* to deliver the shipment
|
|
2008
|
+
* @property {string} [shipment_type] - Shipment type of the shipment returned
|
|
2009
|
+
* in get shipments API like single_shipment or multiple shipment. Single
|
|
2010
|
+
* Shipment means 1 item in 1 shipment and vice versa in the other one
|
|
2011
|
+
* @property {string} [order_type] - Order type of the shipment like pickAtStore
|
|
2012
|
+
* or HomeDelivery
|
|
2013
|
+
* @property {string} [box_type] - Box type of the shipment in which the
|
|
2014
|
+
* shipment will be delivered
|
|
1627
2015
|
* @property {ShipmentPromise} [promise]
|
|
1628
|
-
* @property {string} [dp_id]
|
|
1629
|
-
* @property {string} [fulfillment_type]
|
|
1630
|
-
* @property {ShipmentArticle[]} [articles]
|
|
2016
|
+
* @property {string} [dp_id] - Delivery partner id of the shipment
|
|
2017
|
+
* @property {string} [fulfillment_type] - Fulfilment type of shipment
|
|
2018
|
+
* @property {ShipmentArticle[]} [articles] - List of articles in shipment
|
|
1631
2019
|
*/
|
|
1632
2020
|
|
|
1633
2021
|
/**
|
|
1634
|
-
* @typedef
|
|
1635
|
-
* @property {string} [coupon_text]
|
|
1636
|
-
* @property {string} [id]
|
|
1637
|
-
* @property {Object} [pan_config]
|
|
2022
|
+
* @typedef PlatformCartShipmentsResult
|
|
2023
|
+
* @property {string} [coupon_text] - Coupon text of coupon applied on cart
|
|
2024
|
+
* @property {string} [id] - Cart id of the user cart
|
|
2025
|
+
* @property {Object} [pan_config] - Pan card config states at what condition
|
|
2026
|
+
* user should enter the pan card
|
|
1638
2027
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1639
|
-
* @property {string} [comment]
|
|
1640
|
-
* @property {CartProductInfo[]} [items]
|
|
2028
|
+
* @property {string} [comment] - Comment message added in cart
|
|
2029
|
+
* @property {CartProductInfo[]} [items] - List of items in cart
|
|
1641
2030
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1642
|
-
* @property {string} [delivery_charge_info]
|
|
1643
|
-
*
|
|
1644
|
-
* @property {
|
|
2031
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
2032
|
+
* message on shipment
|
|
2033
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
2034
|
+
* the checkout process
|
|
2035
|
+
* @property {string} [message] - Response message of get shipments API
|
|
1645
2036
|
* @property {CartBreakup} [breakup_values]
|
|
1646
|
-
* @property {string} [staff_user_id]
|
|
1647
|
-
*
|
|
1648
|
-
* @property {
|
|
2037
|
+
* @property {string} [staff_user_id] - Staff employee user id if cart is
|
|
2038
|
+
* created by staff employee for the customer
|
|
2039
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
2040
|
+
* response is valid or not
|
|
2041
|
+
* @property {PlatformShipmentDetails[]} [shipments] - List of shipments that
|
|
2042
|
+
* will be shipped
|
|
1649
2043
|
* @property {CartCurrency} [currency]
|
|
1650
|
-
* @property {string} [checkout_mode]
|
|
1651
|
-
* @property {string} [last_modified]
|
|
1652
|
-
* @property {boolean} [buy_now]
|
|
1653
|
-
* @property {string} [gstin]
|
|
1654
|
-
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
* @property {
|
|
2044
|
+
* @property {string} [checkout_mode] - Checkout mode of cart
|
|
2045
|
+
* @property {string} [last_modified] - Last modified timestamp of cart
|
|
2046
|
+
* @property {boolean} [buy_now] - Buy now flag of user cart
|
|
2047
|
+
* @property {string} [gstin] - GSTIN number added in cart
|
|
2048
|
+
* @property {AppliedPromotion[]} [applied_promo_details] - List of applied
|
|
2049
|
+
* promotions data to cart which includes promotion id, promotion name, offer
|
|
2050
|
+
* text, description, buy rules, discount rules and promotion type
|
|
2051
|
+
* @property {boolean} [error] - Error details if any error occurs which
|
|
2052
|
+
* includes type of error, error code and error message
|
|
2053
|
+
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
2054
|
+
* @property {Object} [custom_cart_meta] - Custom cart meta details added in cart
|
|
1658
2055
|
*/
|
|
1659
2056
|
|
|
1660
2057
|
/**
|
|
1661
2058
|
* @typedef UpdateCartShipmentItem
|
|
1662
2059
|
* @property {number} [quantity] - Quantity of product in shipment
|
|
1663
2060
|
* @property {string} shipment_type - Shipment delivery type
|
|
1664
|
-
* @property {string} article_uid - Article
|
|
2061
|
+
* @property {string} article_uid - Article unique id for shipment
|
|
1665
2062
|
*/
|
|
1666
2063
|
|
|
1667
2064
|
/**
|
|
1668
|
-
* @typedef
|
|
1669
|
-
* @property {UpdateCartShipmentItem[]} shipments
|
|
2065
|
+
* @typedef UpdateCartShipmentCreation
|
|
2066
|
+
* @property {UpdateCartShipmentItem[]} shipments - List of Shipments which
|
|
2067
|
+
* includes shipment data like shipment items, shipment promise, Shipment
|
|
2068
|
+
* type, shipment order type, shipment dp options etc
|
|
1670
2069
|
*/
|
|
1671
2070
|
|
|
1672
2071
|
/**
|
|
1673
|
-
* @typedef
|
|
1674
|
-
* @property {string} [gstin]
|
|
2072
|
+
* @typedef PlatformCartMetaCreation
|
|
2073
|
+
* @property {string} [gstin] - GSTIN number to be added in user cart
|
|
1675
2074
|
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
1676
2075
|
* customer pickup at store
|
|
1677
|
-
* @property {string} [checkout_mode]
|
|
1678
|
-
* @property {Object} [gift_details]
|
|
1679
|
-
*
|
|
1680
|
-
* @property {string} [
|
|
2076
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart
|
|
2077
|
+
* @property {Object} [gift_details] - Gift details is open json which can
|
|
2078
|
+
* include gift message
|
|
2079
|
+
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
2080
|
+
* @property {string} [comment] - Comment message to be added in user cart
|
|
1681
2081
|
* @property {string} [staff_user_id] - Staff user id
|
|
1682
2082
|
*/
|
|
1683
2083
|
|
|
1684
2084
|
/**
|
|
1685
|
-
* @typedef
|
|
1686
|
-
* @property {boolean} [is_valid]
|
|
1687
|
-
* @property {string} [message]
|
|
2085
|
+
* @typedef CartMetaDetails
|
|
2086
|
+
* @property {boolean} [is_valid] - Whether added meta was vaild
|
|
2087
|
+
* @property {string} [message] - Detailed message that used to display
|
|
1688
2088
|
*/
|
|
1689
2089
|
|
|
1690
2090
|
/**
|
|
1691
|
-
* @typedef
|
|
1692
|
-
* @property {string[]} [errors]
|
|
2091
|
+
* @typedef CartMetaMissingDetails
|
|
2092
|
+
* @property {string[]} [errors] - Detailed errors for invalid cart meta request
|
|
1693
2093
|
*/
|
|
1694
2094
|
|
|
1695
2095
|
/**
|
|
1696
2096
|
* @typedef StaffCheckout
|
|
1697
|
-
* @property {string} [employee_code]
|
|
1698
|
-
*
|
|
1699
|
-
* @property {string}
|
|
1700
|
-
* @property {string}
|
|
1701
|
-
*
|
|
2097
|
+
* @property {string} [employee_code] - Employee code of staff who does checkout
|
|
2098
|
+
* on behalf of customer
|
|
2099
|
+
* @property {string} _id - Id of staff who does checkout on behalf of customer
|
|
2100
|
+
* @property {string} user - User id of the employee who does checkout on behalf
|
|
2101
|
+
* of customer
|
|
2102
|
+
* @property {string} last_name - Last name of staff employee who does checkout
|
|
2103
|
+
* on behalf of customer
|
|
2104
|
+
* @property {string} first_name - First name of staff emplyee who does checkout
|
|
2105
|
+
* on behalf of customer
|
|
1702
2106
|
*/
|
|
1703
2107
|
|
|
1704
2108
|
/**
|
|
1705
2109
|
* @typedef CustomerDetails
|
|
1706
|
-
* @property {string} [name]
|
|
1707
|
-
*
|
|
1708
|
-
* @property {string}
|
|
2110
|
+
* @property {string} [name] - Name of customer to be added in customer detail
|
|
2111
|
+
* while checkout
|
|
2112
|
+
* @property {string} [email] - Email address of the customer to be added in
|
|
2113
|
+
* customer detail while checkout
|
|
2114
|
+
* @property {string} mobile - Mobile number of customer to be added in customer
|
|
2115
|
+
* detail while checkout
|
|
1709
2116
|
*/
|
|
1710
2117
|
|
|
1711
2118
|
/**
|
|
1712
2119
|
* @typedef Files
|
|
1713
|
-
* @property {string} key
|
|
1714
|
-
* @property {string[]} values
|
|
2120
|
+
* @property {string} key - Key represents name of file
|
|
2121
|
+
* @property {string[]} values - List of urls path
|
|
2122
|
+
*/
|
|
2123
|
+
|
|
2124
|
+
/**
|
|
2125
|
+
* @typedef CartCheckoutCustomMeta
|
|
2126
|
+
* @property {string} key - Key name of custom meta
|
|
2127
|
+
* @property {string} value - Value to be added in key
|
|
2128
|
+
*/
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* @typedef PlatformCartCheckoutDetailCreation
|
|
2132
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
2133
|
+
* @property {string} [address_id]
|
|
2134
|
+
* @property {string} [payment_identifier]
|
|
2135
|
+
* @property {Object} [payment_params]
|
|
2136
|
+
* @property {boolean} [payment_auto_confirm]
|
|
2137
|
+
* @property {string} id
|
|
2138
|
+
* @property {boolean} [pos]
|
|
2139
|
+
* @property {string} [billing_address_id]
|
|
2140
|
+
* @property {string} [merchant_code]
|
|
2141
|
+
* @property {string} [aggregator]
|
|
2142
|
+
* @property {number} [pick_at_store_uid]
|
|
2143
|
+
* @property {string} [device_id]
|
|
2144
|
+
* @property {Object} [delivery_address]
|
|
2145
|
+
* @property {string} payment_mode
|
|
2146
|
+
* @property {string} [checkout_mode]
|
|
2147
|
+
* @property {CustomerDetails} [customer_details] - Customer details
|
|
2148
|
+
* @property {Object} [meta]
|
|
2149
|
+
* @property {StaffCheckout} [staff]
|
|
2150
|
+
* @property {string} [employee_code]
|
|
2151
|
+
* @property {Object} [billing_address]
|
|
2152
|
+
* @property {string} [callback_url]
|
|
2153
|
+
* @property {string} [user_id]
|
|
2154
|
+
* @property {Object} [extra_meta]
|
|
2155
|
+
* @property {string} order_type
|
|
2156
|
+
* @property {Files[]} [files] - List of file url
|
|
2157
|
+
* @property {number} [ordering_store]
|
|
2158
|
+
* @property {Object} [payment_extra_identifiers]
|
|
2159
|
+
* @property {string} [iin]
|
|
2160
|
+
* @property {string} [network]
|
|
2161
|
+
* @property {string} [type]
|
|
2162
|
+
* @property {string} [card_id]
|
|
1715
2163
|
*/
|
|
1716
2164
|
|
|
1717
2165
|
/**
|
|
1718
2166
|
* @typedef CheckCart
|
|
1719
|
-
* @property {string} [coupon_text]
|
|
1720
|
-
* @property {string} [cod_message]
|
|
1721
|
-
* @property {string} [id]
|
|
1722
|
-
* @property {string} [store_code]
|
|
2167
|
+
* @property {string} [coupon_text] - Coupon text of the applied coupon on order placed
|
|
2168
|
+
* @property {string} [cod_message] - Cash On Delivery message for the order placed
|
|
2169
|
+
* @property {string} [id] - Cart id of the user cart
|
|
2170
|
+
* @property {string} [store_code] - Store code from which the order placed
|
|
1723
2171
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1724
|
-
* @property {string} [comment]
|
|
1725
|
-
* @property {string} [user_type]
|
|
1726
|
-
* @property {CartProductInfo[]} [items]
|
|
1727
|
-
* @property {string} [error_message]
|
|
1728
|
-
*
|
|
2172
|
+
* @property {string} [comment] - Comment message added in cart after order placed
|
|
2173
|
+
* @property {string} [user_type] - User type of the cart who places the order
|
|
2174
|
+
* @property {CartProductInfo[]} [items] - Items details in cart after order placed
|
|
2175
|
+
* @property {string} [error_message] - Error details if any error occurs which
|
|
2176
|
+
* includes type of error, error code and error message
|
|
2177
|
+
* @property {boolean} [success] - Success flag of checkout cart API response
|
|
1729
2178
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1730
|
-
* @property {string} [delivery_charge_info]
|
|
1731
|
-
*
|
|
1732
|
-
* @property {
|
|
1733
|
-
*
|
|
2179
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
2180
|
+
* message on shipment
|
|
2181
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
2182
|
+
* the checkout process
|
|
2183
|
+
* @property {string} [order_id] - Order id generated after placing order
|
|
2184
|
+
* @property {string} [message] - Message of the cart checkout API response
|
|
1734
2185
|
* @property {CartBreakup} [breakup_values]
|
|
1735
|
-
* @property {number} [cod_charges]
|
|
1736
|
-
* @property {boolean} [is_valid]
|
|
1737
|
-
*
|
|
1738
|
-
* @property {string} [
|
|
2186
|
+
* @property {number} [cod_charges] - Cash On Delivery charges of the user cart
|
|
2187
|
+
* @property {boolean} [is_valid] - Valid flag fotr the checkout response if
|
|
2188
|
+
* order placed was valid
|
|
2189
|
+
* @property {string} [uid] - Cart id of user cart
|
|
2190
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart
|
|
1739
2191
|
* @property {CartCurrency} [currency]
|
|
1740
|
-
* @property {string} [last_modified]
|
|
1741
|
-
* @property {boolean} [buy_now]
|
|
1742
|
-
* @property {number} [delivery_charge_order_value]
|
|
1743
|
-
* @property {number} [cart_id]
|
|
1744
|
-
* @property {Object[]} [store_emps]
|
|
1745
|
-
* @property {string} [gstin]
|
|
1746
|
-
* @property {boolean} [cod_available]
|
|
1747
|
-
* @property {number} [delivery_charges]
|
|
1748
|
-
*
|
|
2192
|
+
* @property {string} [last_modified] - Last modified timestamp of cart
|
|
2193
|
+
* @property {boolean} [buy_now] - Buy now flag of user cart
|
|
2194
|
+
* @property {number} [delivery_charge_order_value] - Delivery charge order value
|
|
2195
|
+
* @property {number} [cart_id] - Cart id of the user cart for which the order placed
|
|
2196
|
+
* @property {Object[]} [store_emps] - Store employees data
|
|
2197
|
+
* @property {string} [gstin] - GSTIN number added in cart
|
|
2198
|
+
* @property {boolean} [cod_available] - Whether Cash On Delivery available
|
|
2199
|
+
* @property {number} [delivery_charges] - Delivery charges of the order placed
|
|
2200
|
+
* via checkout API
|
|
2201
|
+
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
2202
|
+
* checkout API payload
|
|
2203
|
+
*/
|
|
2204
|
+
|
|
2205
|
+
/**
|
|
2206
|
+
* @typedef CartCheckoutDetails
|
|
2207
|
+
* @property {string} [app_intercept_url] - App intercept url which is used to
|
|
2208
|
+
* redirect on app after payment in confirmed/failed
|
|
2209
|
+
* @property {Object} [data] - Data of the user cart checkout includes cart
|
|
2210
|
+
* data, address, user id, order type etc
|
|
2211
|
+
* @property {CheckCart} [cart]
|
|
2212
|
+
* @property {boolean} [success] - Success flag of cart checkout API response
|
|
2213
|
+
* @property {string} [callback_url] - Callback url to be redirected after
|
|
2214
|
+
* payment received/failed
|
|
2215
|
+
* @property {string} [payment_confirm_url] - Payment confirm url used to
|
|
2216
|
+
* redirect after payment is confirmed
|
|
2217
|
+
* @property {string} [order_id] - Order id generated after placing order
|
|
2218
|
+
* @property {string} [message] - Message of the cart checkout v2 API response
|
|
1749
2219
|
*/
|
|
1750
2220
|
|
|
1751
2221
|
/**
|
|
1752
|
-
* @typedef
|
|
2222
|
+
* @typedef CartCheckoutResult
|
|
1753
2223
|
* @property {string} [app_intercept_url]
|
|
1754
2224
|
* @property {Object} [data]
|
|
1755
2225
|
* @property {CheckCart} [cart]
|
|
@@ -1761,196 +2231,256 @@ const Joi = require("joi");
|
|
|
1761
2231
|
*/
|
|
1762
2232
|
|
|
1763
2233
|
/**
|
|
1764
|
-
* @typedef
|
|
2234
|
+
* @typedef CartDeliveryModesDetails
|
|
1765
2235
|
* @property {number[]} [pickup_stores] - Store pick up available store uids
|
|
1766
2236
|
* @property {string[]} [available_modes] - Available delivery modes
|
|
1767
2237
|
*/
|
|
1768
2238
|
|
|
1769
2239
|
/**
|
|
1770
2240
|
* @typedef PickupStoreDetail
|
|
1771
|
-
* @property {string} [country]
|
|
1772
|
-
* @property {string} [state]
|
|
1773
|
-
* @property {string} [city]
|
|
1774
|
-
* @property {string} [phone]
|
|
1775
|
-
* @property {string} [area_code]
|
|
1776
|
-
* @property {number} [uid]
|
|
1777
|
-
* @property {string} [area_code_slug]
|
|
1778
|
-
*
|
|
1779
|
-
* @property {string} [
|
|
1780
|
-
* @property {
|
|
1781
|
-
* @property {
|
|
1782
|
-
* @property {string} [
|
|
1783
|
-
* @property {string} [
|
|
1784
|
-
* @property {string} [
|
|
1785
|
-
* @property {string} [
|
|
1786
|
-
* @property {
|
|
1787
|
-
* @property {
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
* @
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
* @
|
|
1798
|
-
* @property {string} [
|
|
1799
|
-
*
|
|
1800
|
-
* @property {string} [
|
|
1801
|
-
*
|
|
1802
|
-
* @property {string} [
|
|
2241
|
+
* @property {string} [country] - Country of address
|
|
2242
|
+
* @property {string} [state] - State of the address
|
|
2243
|
+
* @property {string} [city] - City of the address
|
|
2244
|
+
* @property {string} [phone] - Phone number for address
|
|
2245
|
+
* @property {string} [area_code] - Area code of the address
|
|
2246
|
+
* @property {number} [uid] - Uid of the address
|
|
2247
|
+
* @property {string} [area_code_slug] - Area code slug for address. example
|
|
2248
|
+
* pincode is slug for India
|
|
2249
|
+
* @property {string} [address_type] - Address type of address
|
|
2250
|
+
* @property {string} [area] - Area description for address
|
|
2251
|
+
* @property {number} [id] - Id of the address
|
|
2252
|
+
* @property {string} [store_manager_name] - Name of store manager
|
|
2253
|
+
* @property {string} [name] - Name of person in address data to whom it belongs to
|
|
2254
|
+
* @property {string} [store_code] - Store code from which the order placed
|
|
2255
|
+
* @property {string} [landmark] - Landmark of address
|
|
2256
|
+
* @property {string} [email] - Email address for address data
|
|
2257
|
+
* @property {number} [pincode] - Address pincode
|
|
2258
|
+
* @property {string} [address] - Address description for address data
|
|
2259
|
+
*/
|
|
2260
|
+
|
|
2261
|
+
/**
|
|
2262
|
+
* @typedef StoreDetails
|
|
2263
|
+
* @property {PickupStoreDetail[]} [items] - List of items need to pickup from store
|
|
2264
|
+
*/
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* @typedef CartPaymentUpdate
|
|
2268
|
+
* @property {string} [address_id] - Address id of the user on which the order
|
|
2269
|
+
* to be delivered
|
|
2270
|
+
* @property {string} [payment_mode] - Payment mode from which the payment to be
|
|
2271
|
+
* done for the order
|
|
2272
|
+
* @property {string} [aggregator_name] - Aggregator name of the payment gateway
|
|
2273
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2274
|
+
* selected to do the payment
|
|
2275
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2276
|
+
* mode selected to do the payment
|
|
2277
|
+
* @property {string} [id] - Cart id of the user cart
|
|
1803
2278
|
*/
|
|
1804
2279
|
|
|
1805
2280
|
/**
|
|
1806
2281
|
* @typedef CouponValidity
|
|
1807
|
-
* @property {string} [title]
|
|
1808
|
-
* @property {boolean} [next_validation_required]
|
|
1809
|
-
*
|
|
1810
|
-
* @property {
|
|
1811
|
-
*
|
|
1812
|
-
* @property {
|
|
2282
|
+
* @property {string} [title] - Coupon Title of the coupon applied
|
|
2283
|
+
* @property {boolean} [next_validation_required] - Flag for coupon validation
|
|
2284
|
+
* required on next page or not
|
|
2285
|
+
* @property {boolean} [valid] - Valid flag which denotes if the applied coupon
|
|
2286
|
+
* is valid or not
|
|
2287
|
+
* @property {string} [display_message_en] - Display message for coupon validity
|
|
2288
|
+
* @property {string} [code] - Coupon code of the coupon applied
|
|
2289
|
+
* @property {number} [discount] - Coupon discount value of the coupon applied
|
|
2290
|
+
* @property {string} [error_en] - Error message for the selected payment mode.
|
|
1813
2291
|
*/
|
|
1814
2292
|
|
|
1815
2293
|
/**
|
|
1816
2294
|
* @typedef PaymentCouponValidate
|
|
1817
|
-
* @property {boolean} success
|
|
1818
|
-
* @property {string} [message]
|
|
2295
|
+
* @property {boolean} success - Success flag of coupon payment mode validity API response
|
|
2296
|
+
* @property {string} [message] - Payment mode valid message for coupon
|
|
1819
2297
|
* @property {CouponValidity} [coupon_validity]
|
|
1820
2298
|
*/
|
|
1821
2299
|
|
|
1822
2300
|
/**
|
|
1823
2301
|
* @typedef PaymentMeta
|
|
1824
|
-
* @property {string} [payment_gateway]
|
|
1825
|
-
* @property {string} [type]
|
|
1826
|
-
* @property {string} [payment_identifier]
|
|
1827
|
-
*
|
|
2302
|
+
* @property {string} [payment_gateway] - Payment gateway used to do the payment
|
|
2303
|
+
* @property {string} [type] - Type of card if payment mode is card to do the payment
|
|
2304
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2305
|
+
* mode selected to do the payment
|
|
2306
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2307
|
+
* selected to do the payment
|
|
1828
2308
|
*/
|
|
1829
2309
|
|
|
1830
2310
|
/**
|
|
1831
2311
|
* @typedef PaymentMethod
|
|
1832
|
-
* @property {string} mode
|
|
1833
|
-
* @property {string} [payment]
|
|
2312
|
+
* @property {string} mode - Payment mode of payment method used to make payment
|
|
2313
|
+
* @property {string} [payment] - Payment name of payment method used to make payment
|
|
1834
2314
|
* @property {PaymentMeta} payment_meta
|
|
1835
|
-
* @property {number} [amount]
|
|
1836
|
-
* @property {string} [name]
|
|
1837
|
-
* @property {Object} [payment_extra_identifiers]
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
* @
|
|
1843
|
-
* @property {string} [
|
|
1844
|
-
*
|
|
1845
|
-
* @property {
|
|
1846
|
-
*
|
|
1847
|
-
* @property {
|
|
1848
|
-
*
|
|
1849
|
-
* @property {
|
|
1850
|
-
*
|
|
1851
|
-
* @property {
|
|
1852
|
-
*
|
|
1853
|
-
* @property {string}
|
|
1854
|
-
* @property {
|
|
1855
|
-
*
|
|
1856
|
-
* @property {string} [
|
|
1857
|
-
*
|
|
1858
|
-
* @property {
|
|
1859
|
-
*
|
|
2315
|
+
* @property {number} [amount] - Amount of the payment mode to be paid
|
|
2316
|
+
* @property {string} [name] - Name of the payment mode used to make payment
|
|
2317
|
+
* @property {Object} [payment_extra_identifiers] - Payment extra identifier for
|
|
2318
|
+
* the payment mode to do the payment
|
|
2319
|
+
*/
|
|
2320
|
+
|
|
2321
|
+
/**
|
|
2322
|
+
* @typedef PlatformCartCheckoutDetailV2Creation
|
|
2323
|
+
* @property {string} [address_id] - Address id of the user on which the order
|
|
2324
|
+
* to be delivered
|
|
2325
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2326
|
+
* mode selected to do the payment
|
|
2327
|
+
* @property {Object} [payment_params] - Payment params which includes payment
|
|
2328
|
+
* identifier and merchant code
|
|
2329
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
|
|
2330
|
+
* added in order
|
|
2331
|
+
* @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
|
|
2332
|
+
* payment need not to be collected from user
|
|
2333
|
+
* @property {string} id - Cart id of the user cart
|
|
2334
|
+
* @property {boolean} [pos] - Filed to determine whether user is making request
|
|
2335
|
+
* from pos or not
|
|
2336
|
+
* @property {string} [billing_address_id] - Billing address id of the customer
|
|
2337
|
+
* on which the invoice to be generated after the order is placed
|
|
2338
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2339
|
+
* selected to do the payment
|
|
2340
|
+
* @property {string} [aggregator] - Aggregator name of the payment gateway
|
|
2341
|
+
* @property {number} [pick_at_store_uid] - Store id where we have to pick product
|
|
2342
|
+
* @property {string} [device_id] - Device id
|
|
2343
|
+
* @property {Object} [delivery_address] - Delivery address data which includes
|
|
2344
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
2345
|
+
* customer landmark and customer name
|
|
2346
|
+
* @property {string} [payment_mode] - Payment mode from which the payment to be
|
|
2347
|
+
* done for the order
|
|
2348
|
+
* @property {string} [checkout_mode] - Mode of checkout used in cart
|
|
2349
|
+
* @property {CustomerDetails} [customer_details]
|
|
2350
|
+
* @property {Object} [meta] - Meta data to be added in order
|
|
2351
|
+
* @property {PaymentMethod[]} payment_methods - Payment methods list used to
|
|
2352
|
+
* make the payment
|
|
1860
2353
|
* @property {StaffCheckout} [staff]
|
|
1861
|
-
* @property {string} [employee_code]
|
|
1862
|
-
*
|
|
1863
|
-
* @property {
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
* @property {string}
|
|
2354
|
+
* @property {string} [employee_code] - Employee code of staff who does checkout
|
|
2355
|
+
* on behalf of customer
|
|
2356
|
+
* @property {Object} [billing_address] - Billing address json which includes
|
|
2357
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
2358
|
+
* customer landmark and customer name
|
|
2359
|
+
* @property {string} [callback_url] - Callback url after payment received/failed
|
|
2360
|
+
* @property {string} user_id - The user id of user cart
|
|
2361
|
+
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order
|
|
2362
|
+
* @property {string} order_type - Order type of the order being placed like
|
|
2363
|
+
* pickAtStore or HomeDelivery
|
|
1867
2364
|
* @property {Files[]} [files] - List of file url
|
|
1868
|
-
* @property {number} [ordering_store]
|
|
1869
|
-
*
|
|
1870
|
-
* @property {string} [
|
|
1871
|
-
*
|
|
1872
|
-
* @property {string} [
|
|
2365
|
+
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
2366
|
+
* which the order is getting placed
|
|
2367
|
+
* @property {string} [iin] - Issuer Identification Number number of card if
|
|
2368
|
+
* payment mode is card to do the payment
|
|
2369
|
+
* @property {string} [network] - Network of card if payment mode is card to do
|
|
2370
|
+
* the payment
|
|
2371
|
+
* @property {string} [type] - Type of cart if payment mode is card to do the payment
|
|
2372
|
+
* @property {string} [card_id] - Saved card id if payment mode is card to do the payment
|
|
1873
2373
|
*/
|
|
1874
2374
|
|
|
1875
2375
|
/**
|
|
1876
2376
|
* @typedef UpdateCartPaymentRequestV2
|
|
1877
|
-
* @property {string} [address_id]
|
|
1878
|
-
*
|
|
1879
|
-
* @property {string} [
|
|
1880
|
-
*
|
|
1881
|
-
* @property {string} [
|
|
1882
|
-
* @property {string} [
|
|
2377
|
+
* @property {string} [address_id] - Address id of the user address selected to
|
|
2378
|
+
* deliver the shipment
|
|
2379
|
+
* @property {string} [payment_mode] - Payment mode of the payment selected to
|
|
2380
|
+
* do the payment
|
|
2381
|
+
* @property {string} [aggregator_name] - Aggregator name of the payment gateway
|
|
2382
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2383
|
+
* selected to do the payment
|
|
2384
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2385
|
+
* mode selected to do the payment
|
|
2386
|
+
* @property {string} [id] - Cart id of the user cart for which the update cart
|
|
2387
|
+
* payment operation performed
|
|
1883
2388
|
* @property {PaymentMethod[]} [payment_methods]
|
|
1884
2389
|
*/
|
|
1885
2390
|
|
|
1886
2391
|
/**
|
|
1887
2392
|
* @typedef PriceMinMax
|
|
1888
|
-
* @property {number} [min]
|
|
1889
|
-
* @property {number} [max]
|
|
2393
|
+
* @property {number} [min] - Min price of article added in user cart
|
|
2394
|
+
* @property {number} [max] - Max price of article added in user cart
|
|
1890
2395
|
*/
|
|
1891
2396
|
|
|
1892
2397
|
/**
|
|
1893
2398
|
* @typedef ItemPriceDetails
|
|
1894
2399
|
* @property {PriceMinMax} [marked]
|
|
1895
2400
|
* @property {PriceMinMax} [effective]
|
|
1896
|
-
* @property {string} [currency]
|
|
2401
|
+
* @property {string} [currency] - The currency code for price
|
|
2402
|
+
*/
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* @typedef ArticlePriceDetails
|
|
2406
|
+
* @property {number} [marked] - The Marked Price refers to the initial price of
|
|
2407
|
+
* the free gift article before product discount.
|
|
2408
|
+
* @property {number} [effective] - The Effective Price refers to the final
|
|
2409
|
+
* amount of the free gift article after applying the product discount.
|
|
1897
2410
|
*/
|
|
1898
2411
|
|
|
1899
2412
|
/**
|
|
1900
2413
|
* @typedef FreeGiftItems
|
|
1901
|
-
* @property {string} [item_slug] -
|
|
1902
|
-
* @property {string} [item_name] -
|
|
2414
|
+
* @property {string} [item_slug] - Free gift product slug
|
|
2415
|
+
* @property {string} [item_name] - Free gift product name
|
|
1903
2416
|
* @property {ItemPriceDetails} [item_price_details]
|
|
1904
|
-
* @property {
|
|
1905
|
-
* @property {
|
|
1906
|
-
* @property {
|
|
2417
|
+
* @property {ArticlePriceDetails} [article_price]
|
|
2418
|
+
* @property {string} [item_brand_name] - Free gift product brand name
|
|
2419
|
+
* @property {number} [item_id] - Free gift product id
|
|
2420
|
+
* @property {string[]} [available_sizes] - Available sizes for the free gift item.
|
|
2421
|
+
* @property {string} [size] - Selected size for the free gift item.
|
|
2422
|
+
* @property {string[]} [item_images_url] - List of free gift product images URL
|
|
1907
2423
|
*/
|
|
1908
2424
|
|
|
1909
2425
|
/**
|
|
1910
2426
|
* @typedef PromotionOffer
|
|
1911
|
-
* @property {string} [id] - Promotion
|
|
2427
|
+
* @property {string} [id] - Promotion unique identifier
|
|
1912
2428
|
* @property {Object} [buy_rules] - Buy rules of promotions
|
|
1913
|
-
* @property {string} [offer_text] - Offer title
|
|
1914
|
-
* @property {string} [promotion_type] - Promotion
|
|
2429
|
+
* @property {string} [offer_text] - Offer title of promotion that used to display
|
|
2430
|
+
* @property {string} [promotion_type] - Type of Promotion like percentage,
|
|
2431
|
+
* amount, bogo etc.
|
|
1915
2432
|
* @property {string} [promotion_name] - Name of the promotion
|
|
1916
2433
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
1917
2434
|
* @property {string} [valid_till] - Datetime ISOString for promotion end date
|
|
1918
2435
|
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
1919
2436
|
* @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
|
|
1920
2437
|
* @property {string} [description] - Offer details including T&C
|
|
2438
|
+
* @property {boolean} [is_bank_offer] - Indicates whether the promotion is
|
|
2439
|
+
* associated with a bank offer.
|
|
1921
2440
|
*/
|
|
1922
2441
|
|
|
1923
2442
|
/**
|
|
1924
|
-
* @typedef
|
|
1925
|
-
* @property {PromotionOffer[]} [available_promotions]
|
|
2443
|
+
* @typedef PromotionOffersDetails
|
|
2444
|
+
* @property {PromotionOffer[]} [available_promotions] - List of available
|
|
2445
|
+
* promotion for product
|
|
1926
2446
|
*/
|
|
1927
2447
|
|
|
1928
2448
|
/**
|
|
1929
2449
|
* @typedef PromotionPaymentOffer
|
|
1930
|
-
* @property {string} [application_id] - Application id
|
|
2450
|
+
* @property {string} [application_id] - Application id of the sales channel
|
|
1931
2451
|
* @property {Object[]} [buy_rules] - Buy rules of promotions
|
|
1932
2452
|
* @property {string} [calculate_on] - Price on which promotion calculated
|
|
1933
2453
|
* @property {string} [description] - Offer details including T&C
|
|
1934
2454
|
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
1935
|
-
* @property {string} [id] - Promotion
|
|
1936
|
-
* @property {string} [offer_text] - Offer title
|
|
2455
|
+
* @property {string} [id] - Promotion unique identifier
|
|
2456
|
+
* @property {string} [offer_text] - Offer title of promotion that used to display
|
|
1937
2457
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
1938
|
-
* @property {string} [promotion_type] - Promotion
|
|
2458
|
+
* @property {string} [promotion_type] - Type of Promotion like bogo, amount,
|
|
2459
|
+
* percentage etc.
|
|
1939
2460
|
* @property {string} [promotion_name] - Name of the promotion
|
|
1940
2461
|
*/
|
|
1941
2462
|
|
|
1942
2463
|
/**
|
|
1943
|
-
* @typedef
|
|
1944
|
-
* @property {boolean} [success]
|
|
2464
|
+
* @typedef PromotionPaymentOffersDetails
|
|
2465
|
+
* @property {boolean} [success] - Indicates if operation is successful or not.
|
|
1945
2466
|
* @property {PromotionPaymentOffer[]} [promotions]
|
|
1946
2467
|
*/
|
|
1947
2468
|
|
|
2469
|
+
/**
|
|
2470
|
+
* @typedef ValidationError
|
|
2471
|
+
* @property {string} message - A brief description of the error encountered.
|
|
2472
|
+
* @property {string} field - The field in the request that caused the error.
|
|
2473
|
+
*/
|
|
2474
|
+
|
|
1948
2475
|
class CartPlatformModel {
|
|
1949
2476
|
/** @returns {CouponDateMeta} */
|
|
1950
2477
|
static CouponDateMeta() {
|
|
1951
2478
|
return Joi.object({
|
|
1952
2479
|
modified_on: Joi.string().allow("").allow(null),
|
|
1953
2480
|
created_on: Joi.string().allow("").allow(null),
|
|
2481
|
+
approved_on: Joi.string().allow("").allow(null),
|
|
2482
|
+
rejected_on: Joi.string().allow("").allow(null),
|
|
2483
|
+
reviewed_on: Joi.string().allow("").allow(null),
|
|
1954
2484
|
});
|
|
1955
2485
|
}
|
|
1956
2486
|
|
|
@@ -1958,7 +2488,7 @@ class CartPlatformModel {
|
|
|
1958
2488
|
static Ownership() {
|
|
1959
2489
|
return Joi.object({
|
|
1960
2490
|
payable_category: Joi.string().allow("").required(),
|
|
1961
|
-
payable_by: Joi.string().allow("").
|
|
2491
|
+
payable_by: Joi.string().allow("").allow(null),
|
|
1962
2492
|
});
|
|
1963
2493
|
}
|
|
1964
2494
|
|
|
@@ -1967,6 +2497,9 @@ class CartPlatformModel {
|
|
|
1967
2497
|
return Joi.object({
|
|
1968
2498
|
created_by: Joi.string().allow("").allow(null),
|
|
1969
2499
|
modified_by: Joi.string().allow("").allow(null),
|
|
2500
|
+
approved_by: Joi.string().allow("").allow(null),
|
|
2501
|
+
rejected_by: Joi.string().allow("").allow(null),
|
|
2502
|
+
reviewed_by: Joi.string().allow("").allow(null),
|
|
1970
2503
|
});
|
|
1971
2504
|
}
|
|
1972
2505
|
|
|
@@ -2040,7 +2573,7 @@ class CartPlatformModel {
|
|
|
2040
2573
|
/** @returns {Restrictions} */
|
|
2041
2574
|
static Restrictions() {
|
|
2042
2575
|
return Joi.object({
|
|
2043
|
-
payments:
|
|
2576
|
+
payments: CartPlatformModel.PaymentModes(),
|
|
2044
2577
|
user_type: Joi.string().allow(""),
|
|
2045
2578
|
price_range: CartPlatformModel.PriceRange(),
|
|
2046
2579
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
@@ -2074,9 +2607,10 @@ class CartPlatformModel {
|
|
|
2074
2607
|
static CouponSchedule() {
|
|
2075
2608
|
return Joi.object({
|
|
2076
2609
|
end: Joi.string().allow("").allow(null),
|
|
2077
|
-
start: Joi.string().allow(""),
|
|
2610
|
+
start: Joi.string().allow("").allow(null),
|
|
2078
2611
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2079
2612
|
cron: Joi.string().allow("").allow(null),
|
|
2613
|
+
status: Joi.string().allow(""),
|
|
2080
2614
|
duration: Joi.number().allow(null),
|
|
2081
2615
|
});
|
|
2082
2616
|
}
|
|
@@ -2140,11 +2674,11 @@ class CartPlatformModel {
|
|
|
2140
2674
|
return Joi.object({
|
|
2141
2675
|
currency_code: Joi.string().allow(""),
|
|
2142
2676
|
auto_apply: Joi.boolean(),
|
|
2143
|
-
type: Joi.string().allow("")
|
|
2677
|
+
type: Joi.string().allow(""),
|
|
2144
2678
|
is_exact: Joi.boolean(),
|
|
2145
|
-
applicable_on: Joi.string().allow("")
|
|
2146
|
-
calculate_on: Joi.string().allow("")
|
|
2147
|
-
value_type: Joi.string().allow("")
|
|
2679
|
+
applicable_on: Joi.string().allow(""),
|
|
2680
|
+
calculate_on: Joi.string().allow(""),
|
|
2681
|
+
value_type: Joi.string().allow(""),
|
|
2148
2682
|
scope: Joi.array().items(Joi.string().allow("")),
|
|
2149
2683
|
});
|
|
2150
2684
|
}
|
|
@@ -2153,22 +2687,26 @@ class CartPlatformModel {
|
|
|
2153
2687
|
static CouponAdd() {
|
|
2154
2688
|
return Joi.object({
|
|
2155
2689
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2156
|
-
ownership: CartPlatformModel.Ownership()
|
|
2690
|
+
ownership: CartPlatformModel.Ownership(),
|
|
2157
2691
|
author: CartPlatformModel.CouponAuthor(),
|
|
2158
2692
|
state: CartPlatformModel.State(),
|
|
2159
2693
|
restrictions: CartPlatformModel.Restrictions(),
|
|
2160
2694
|
validation: CartPlatformModel.Validation(),
|
|
2161
2695
|
action: CartPlatformModel.CouponAction(),
|
|
2696
|
+
coupon_type: Joi.string().allow(""),
|
|
2697
|
+
coupon_prefix: Joi.string().allow("").allow(null),
|
|
2698
|
+
coupon_counts: Joi.number(),
|
|
2162
2699
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2163
2700
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2164
|
-
rule: Joi.array().items(CartPlatformModel.Rule())
|
|
2165
|
-
display_meta: CartPlatformModel.DisplayMeta()
|
|
2701
|
+
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2702
|
+
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2166
2703
|
code: Joi.string().allow("").required(),
|
|
2167
2704
|
type_slug: Joi.string().allow("").required(),
|
|
2168
|
-
identifiers: CartPlatformModel.Identifier()
|
|
2169
|
-
validity: CartPlatformModel.Validity()
|
|
2170
|
-
rule_definition: CartPlatformModel.RuleDefinition()
|
|
2705
|
+
identifiers: CartPlatformModel.Identifier(),
|
|
2706
|
+
validity: CartPlatformModel.Validity(),
|
|
2707
|
+
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2171
2708
|
_id: Joi.string().allow(""),
|
|
2709
|
+
is_archived: Joi.boolean(),
|
|
2172
2710
|
});
|
|
2173
2711
|
}
|
|
2174
2712
|
|
|
@@ -2185,8 +2723,8 @@ class CartPlatformModel {
|
|
|
2185
2723
|
});
|
|
2186
2724
|
}
|
|
2187
2725
|
|
|
2188
|
-
/** @returns {
|
|
2189
|
-
static
|
|
2726
|
+
/** @returns {CouponsResult} */
|
|
2727
|
+
static CouponsResult() {
|
|
2190
2728
|
return Joi.object({
|
|
2191
2729
|
items: Joi.array().items(CartPlatformModel.CouponAdd()),
|
|
2192
2730
|
page: CartPlatformModel.Page(),
|
|
@@ -2201,8 +2739,8 @@ class CartPlatformModel {
|
|
|
2201
2739
|
});
|
|
2202
2740
|
}
|
|
2203
2741
|
|
|
2204
|
-
/** @returns {
|
|
2205
|
-
static
|
|
2742
|
+
/** @returns {OperationErrorResult} */
|
|
2743
|
+
static OperationErrorResult() {
|
|
2206
2744
|
return Joi.object({
|
|
2207
2745
|
success: Joi.boolean(),
|
|
2208
2746
|
message: Joi.string().allow(""),
|
|
@@ -2214,7 +2752,7 @@ class CartPlatformModel {
|
|
|
2214
2752
|
static CouponUpdate() {
|
|
2215
2753
|
return Joi.object({
|
|
2216
2754
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2217
|
-
ownership: CartPlatformModel.Ownership()
|
|
2755
|
+
ownership: CartPlatformModel.Ownership(),
|
|
2218
2756
|
author: CartPlatformModel.CouponAuthor(),
|
|
2219
2757
|
state: CartPlatformModel.State(),
|
|
2220
2758
|
restrictions: CartPlatformModel.Restrictions(),
|
|
@@ -2222,13 +2760,17 @@ class CartPlatformModel {
|
|
|
2222
2760
|
action: CartPlatformModel.CouponAction(),
|
|
2223
2761
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2224
2762
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2225
|
-
rule: Joi.array().items(CartPlatformModel.Rule())
|
|
2226
|
-
display_meta: CartPlatformModel.DisplayMeta()
|
|
2763
|
+
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2764
|
+
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2227
2765
|
code: Joi.string().allow("").required(),
|
|
2766
|
+
coupon_type: Joi.string().allow(""),
|
|
2767
|
+
coupon_prefix: Joi.string().allow("").allow(null),
|
|
2768
|
+
coupon_counts: Joi.number(),
|
|
2769
|
+
reason: Joi.string().allow("").allow(null),
|
|
2228
2770
|
type_slug: Joi.string().allow("").required(),
|
|
2229
|
-
identifiers: CartPlatformModel.Identifier()
|
|
2230
|
-
validity: CartPlatformModel.Validity()
|
|
2231
|
-
rule_definition: CartPlatformModel.RuleDefinition()
|
|
2771
|
+
identifiers: CartPlatformModel.Identifier(),
|
|
2772
|
+
validity: CartPlatformModel.Validity(),
|
|
2773
|
+
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2232
2774
|
});
|
|
2233
2775
|
}
|
|
2234
2776
|
|
|
@@ -2240,32 +2782,48 @@ class CartPlatformModel {
|
|
|
2240
2782
|
});
|
|
2241
2783
|
}
|
|
2242
2784
|
|
|
2785
|
+
/** @returns {CouponCreateResult} */
|
|
2786
|
+
static CouponCreateResult() {
|
|
2787
|
+
return Joi.object({
|
|
2788
|
+
success: Joi.boolean(),
|
|
2789
|
+
message: Joi.string().allow(""),
|
|
2790
|
+
_id: Joi.string().allow(""),
|
|
2791
|
+
});
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2243
2794
|
/** @returns {DisplayMeta1} */
|
|
2244
2795
|
static DisplayMeta1() {
|
|
2245
2796
|
return Joi.object({
|
|
2246
|
-
description: Joi.string().allow(""),
|
|
2797
|
+
description: Joi.string().allow("").allow(null),
|
|
2247
2798
|
offer_label: Joi.string().allow(""),
|
|
2248
|
-
name: Joi.string().allow(""),
|
|
2249
|
-
offer_text: Joi.string().allow(""),
|
|
2799
|
+
name: Joi.string().allow("").allow(null),
|
|
2800
|
+
offer_text: Joi.string().allow("").allow(null),
|
|
2250
2801
|
});
|
|
2251
2802
|
}
|
|
2252
2803
|
|
|
2253
2804
|
/** @returns {Ownership1} */
|
|
2254
2805
|
static Ownership1() {
|
|
2255
2806
|
return Joi.object({
|
|
2256
|
-
payable_category: Joi.string().allow("")
|
|
2257
|
-
payable_by: Joi.string().allow("")
|
|
2807
|
+
payable_category: Joi.string().allow(""),
|
|
2808
|
+
payable_by: Joi.string().allow(""),
|
|
2258
2809
|
});
|
|
2259
2810
|
}
|
|
2260
2811
|
|
|
2261
2812
|
/** @returns {CompareObject} */
|
|
2262
2813
|
static CompareObject() {
|
|
2263
2814
|
return Joi.object({
|
|
2264
|
-
equals: Joi.number(),
|
|
2265
|
-
greater_than: Joi.number(),
|
|
2266
|
-
less_than_equals: Joi.number(),
|
|
2267
|
-
less_than: Joi.number(),
|
|
2268
|
-
greater_than_equals: Joi.number(),
|
|
2815
|
+
equals: Joi.number().allow(null),
|
|
2816
|
+
greater_than: Joi.number().allow(null),
|
|
2817
|
+
less_than_equals: Joi.number().allow(null),
|
|
2818
|
+
less_than: Joi.number().allow(null),
|
|
2819
|
+
greater_than_equals: Joi.number().allow(null),
|
|
2820
|
+
});
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
/** @returns {ItemSizeMapping} */
|
|
2824
|
+
static ItemSizeMapping() {
|
|
2825
|
+
return Joi.object({
|
|
2826
|
+
item_size_mapping: Joi.object().pattern(/\S/, Joi.any()),
|
|
2269
2827
|
});
|
|
2270
2828
|
}
|
|
2271
2829
|
|
|
@@ -2299,6 +2857,7 @@ class CartPlatformModel {
|
|
|
2299
2857
|
item_tags: Joi.array().items(Joi.string().allow("")),
|
|
2300
2858
|
item_exclude_l2_category: Joi.array().items(Joi.number()),
|
|
2301
2859
|
item_sku: Joi.array().items(Joi.string().allow("")),
|
|
2860
|
+
item_exclude_product_tags: Joi.array().items(Joi.string().allow("")),
|
|
2302
2861
|
});
|
|
2303
2862
|
}
|
|
2304
2863
|
|
|
@@ -2309,7 +2868,7 @@ class CartPlatformModel {
|
|
|
2309
2868
|
discount_price: Joi.number(),
|
|
2310
2869
|
apportion_discount: Joi.boolean(),
|
|
2311
2870
|
partial_can_ret: Joi.boolean(),
|
|
2312
|
-
max_usage_per_transaction: Joi.number(),
|
|
2871
|
+
max_usage_per_transaction: Joi.number().allow(null),
|
|
2313
2872
|
min_offer_quantity: Joi.number(),
|
|
2314
2873
|
code: Joi.string().allow(""),
|
|
2315
2874
|
discount_amount: Joi.number(),
|
|
@@ -2324,6 +2883,7 @@ class CartPlatformModel {
|
|
|
2324
2883
|
discount_type: Joi.string().allow("").required(),
|
|
2325
2884
|
buy_condition: Joi.string().allow("").required(),
|
|
2326
2885
|
item_criteria: CartPlatformModel.ItemCriteria().required(),
|
|
2886
|
+
meta: CartPlatformModel.ItemSizeMapping(),
|
|
2327
2887
|
offer: CartPlatformModel.DiscountOffer().required(),
|
|
2328
2888
|
});
|
|
2329
2889
|
}
|
|
@@ -2338,7 +2898,7 @@ class CartPlatformModel {
|
|
|
2338
2898
|
/** @returns {PromotionPaymentModes} */
|
|
2339
2899
|
static PromotionPaymentModes() {
|
|
2340
2900
|
return Joi.object({
|
|
2341
|
-
type: Joi.string().allow("")
|
|
2901
|
+
type: Joi.string().allow(""),
|
|
2342
2902
|
uses: CartPlatformModel.PaymentAllowValue1(),
|
|
2343
2903
|
codes: Joi.array().items(Joi.string().allow("")),
|
|
2344
2904
|
});
|
|
@@ -2379,7 +2939,7 @@ class CartPlatformModel {
|
|
|
2379
2939
|
/** @returns {Restrictions1} */
|
|
2380
2940
|
static Restrictions1() {
|
|
2381
2941
|
return Joi.object({
|
|
2382
|
-
payments:
|
|
2942
|
+
payments: CartPlatformModel.PaymentModes(),
|
|
2383
2943
|
user_registered: CartPlatformModel.UserRegistered(),
|
|
2384
2944
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
2385
2945
|
post_order: CartPlatformModel.PostOrder1(),
|
|
@@ -2387,7 +2947,7 @@ class CartPlatformModel {
|
|
|
2387
2947
|
order_quantity: Joi.number(),
|
|
2388
2948
|
anonymous_users: Joi.boolean(),
|
|
2389
2949
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
2390
|
-
uses: CartPlatformModel.UsesRestriction1()
|
|
2950
|
+
uses: CartPlatformModel.UsesRestriction1(),
|
|
2391
2951
|
ordering_stores: Joi.array().items(Joi.number()),
|
|
2392
2952
|
});
|
|
2393
2953
|
}
|
|
@@ -2395,9 +2955,10 @@ class CartPlatformModel {
|
|
|
2395
2955
|
/** @returns {PromotionSchedule} */
|
|
2396
2956
|
static PromotionSchedule() {
|
|
2397
2957
|
return Joi.object({
|
|
2398
|
-
end: Joi.string().allow("").
|
|
2399
|
-
start: Joi.string().allow("").
|
|
2400
|
-
|
|
2958
|
+
end: Joi.string().allow("").allow(null),
|
|
2959
|
+
start: Joi.string().allow("").allow(null),
|
|
2960
|
+
status: Joi.string().allow(""),
|
|
2961
|
+
published: Joi.boolean(),
|
|
2401
2962
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2402
2963
|
cron: Joi.string().allow("").allow(null),
|
|
2403
2964
|
duration: Joi.number().allow(null),
|
|
@@ -2407,8 +2968,8 @@ class CartPlatformModel {
|
|
|
2407
2968
|
/** @returns {PromotionAction} */
|
|
2408
2969
|
static PromotionAction() {
|
|
2409
2970
|
return Joi.object({
|
|
2410
|
-
action_date: Joi.string().allow("").allow(null)
|
|
2411
|
-
action_type: Joi.string().allow("").
|
|
2971
|
+
action_date: Joi.string().allow("").allow(null),
|
|
2972
|
+
action_type: Joi.string().allow("").allow(null),
|
|
2412
2973
|
});
|
|
2413
2974
|
}
|
|
2414
2975
|
|
|
@@ -2417,14 +2978,17 @@ class CartPlatformModel {
|
|
|
2417
2978
|
return Joi.object({
|
|
2418
2979
|
created_by: Joi.string().allow("").allow(null),
|
|
2419
2980
|
modified_by: Joi.string().allow("").allow(null),
|
|
2981
|
+
approved_by: Joi.string().allow("").allow(null),
|
|
2982
|
+
rejected_by: Joi.string().allow("").allow(null),
|
|
2983
|
+
reviewed_by: Joi.string().allow("").allow(null),
|
|
2420
2984
|
});
|
|
2421
2985
|
}
|
|
2422
2986
|
|
|
2423
2987
|
/** @returns {Visibility} */
|
|
2424
2988
|
static Visibility() {
|
|
2425
2989
|
return Joi.object({
|
|
2426
|
-
coupon_list: Joi.boolean()
|
|
2427
|
-
pdp: Joi.boolean()
|
|
2990
|
+
coupon_list: Joi.boolean(),
|
|
2991
|
+
pdp: Joi.boolean(),
|
|
2428
2992
|
});
|
|
2429
2993
|
}
|
|
2430
2994
|
|
|
@@ -2433,6 +2997,9 @@ class CartPlatformModel {
|
|
|
2433
2997
|
return Joi.object({
|
|
2434
2998
|
modified_on: Joi.string().allow("").allow(null),
|
|
2435
2999
|
created_on: Joi.string().allow("").allow(null),
|
|
3000
|
+
approved_on: Joi.string().allow("").allow(null),
|
|
3001
|
+
rejected_on: Joi.string().allow("").allow(null),
|
|
3002
|
+
reviewed_on: Joi.string().allow("").allow(null),
|
|
2436
3003
|
});
|
|
2437
3004
|
}
|
|
2438
3005
|
|
|
@@ -2453,6 +3020,7 @@ class CartPlatformModel {
|
|
|
2453
3020
|
.required(),
|
|
2454
3021
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
2455
3022
|
currency: Joi.string().allow(""),
|
|
3023
|
+
is_processed: Joi.boolean(),
|
|
2456
3024
|
code: Joi.string().allow(""),
|
|
2457
3025
|
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
2458
3026
|
post_order_action: CartPlatformModel.PromotionAction(),
|
|
@@ -2460,18 +3028,17 @@ class CartPlatformModel {
|
|
|
2460
3028
|
author: CartPlatformModel.PromotionAuthor(),
|
|
2461
3029
|
visiblility: CartPlatformModel.Visibility(),
|
|
2462
3030
|
application_id: Joi.string().allow("").required(),
|
|
2463
|
-
buy_rules:
|
|
2464
|
-
|
|
2465
|
-
.required(),
|
|
2466
|
-
_custom_json: Joi.any(),
|
|
3031
|
+
buy_rules: CartPlatformModel.ItemCriteria().required(),
|
|
3032
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
2467
3033
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
2468
3034
|
_id: Joi.string().allow(""),
|
|
2469
3035
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3036
|
+
is_archived: Joi.boolean(),
|
|
2470
3037
|
});
|
|
2471
3038
|
}
|
|
2472
3039
|
|
|
2473
|
-
/** @returns {
|
|
2474
|
-
static
|
|
3040
|
+
/** @returns {PromotionsResult} */
|
|
3041
|
+
static PromotionsResult() {
|
|
2475
3042
|
return Joi.object({
|
|
2476
3043
|
items: Joi.array().items(CartPlatformModel.PromotionListItem()),
|
|
2477
3044
|
page: CartPlatformModel.Page(),
|
|
@@ -2487,12 +3054,10 @@ class CartPlatformModel {
|
|
|
2487
3054
|
promo_group: Joi.string().allow("").required(),
|
|
2488
3055
|
mode: Joi.string().allow("").required(),
|
|
2489
3056
|
apply_all_discount: Joi.boolean(),
|
|
2490
|
-
display_meta: CartPlatformModel.DisplayMeta1()
|
|
2491
|
-
ownership: CartPlatformModel.Ownership1()
|
|
3057
|
+
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3058
|
+
ownership: CartPlatformModel.Ownership1(),
|
|
2492
3059
|
promotion_type: Joi.string().allow("").required(),
|
|
2493
|
-
discount_rules: Joi.array()
|
|
2494
|
-
.items(CartPlatformModel.DiscountRule())
|
|
2495
|
-
.required(),
|
|
3060
|
+
discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
|
|
2496
3061
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
2497
3062
|
currency: Joi.string().allow(""),
|
|
2498
3063
|
code: Joi.string().allow(""),
|
|
@@ -2502,12 +3067,42 @@ class CartPlatformModel {
|
|
|
2502
3067
|
author: CartPlatformModel.PromotionAuthor(),
|
|
2503
3068
|
visiblility: CartPlatformModel.Visibility(),
|
|
2504
3069
|
application_id: Joi.string().allow("").required(),
|
|
2505
|
-
buy_rules:
|
|
2506
|
-
|
|
2507
|
-
.required(),
|
|
2508
|
-
_custom_json: Joi.any(),
|
|
3070
|
+
buy_rules: CartPlatformModel.ItemCriteria(),
|
|
3071
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
2509
3072
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
2510
3073
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3074
|
+
_id: Joi.string().allow(""),
|
|
3075
|
+
});
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
/** @returns {PromotionAddResult} */
|
|
3079
|
+
static PromotionAddResult() {
|
|
3080
|
+
return Joi.object({
|
|
3081
|
+
stackable: Joi.boolean(),
|
|
3082
|
+
calculate_on: Joi.string().allow(""),
|
|
3083
|
+
apply_exclusive: Joi.string().allow("").allow(null),
|
|
3084
|
+
promo_group: Joi.string().allow("").required(),
|
|
3085
|
+
mode: Joi.string().allow("").required(),
|
|
3086
|
+
is_processed: Joi.boolean(),
|
|
3087
|
+
apply_all_discount: Joi.boolean(),
|
|
3088
|
+
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3089
|
+
ownership: CartPlatformModel.Ownership1(),
|
|
3090
|
+
promotion_type: Joi.string().allow("").required(),
|
|
3091
|
+
discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
|
|
3092
|
+
restrictions: CartPlatformModel.Restrictions1(),
|
|
3093
|
+
currency: Joi.string().allow(""),
|
|
3094
|
+
code: Joi.string().allow(""),
|
|
3095
|
+
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
3096
|
+
post_order_action: CartPlatformModel.PromotionAction(),
|
|
3097
|
+
apply_priority: Joi.number(),
|
|
3098
|
+
author: CartPlatformModel.PromotionAuthor(),
|
|
3099
|
+
visiblility: CartPlatformModel.Visibility(),
|
|
3100
|
+
application_id: Joi.string().allow("").required(),
|
|
3101
|
+
buy_rules: CartPlatformModel.ItemCriteria(),
|
|
3102
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
3103
|
+
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3104
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
3105
|
+
is_archived: Joi.boolean(),
|
|
2511
3106
|
});
|
|
2512
3107
|
}
|
|
2513
3108
|
|
|
@@ -2517,15 +3112,14 @@ class CartPlatformModel {
|
|
|
2517
3112
|
stackable: Joi.boolean(),
|
|
2518
3113
|
calculate_on: Joi.string().allow(""),
|
|
2519
3114
|
apply_exclusive: Joi.string().allow("").allow(null),
|
|
3115
|
+
reason: Joi.string().allow("").allow(null),
|
|
2520
3116
|
promo_group: Joi.string().allow("").required(),
|
|
2521
3117
|
mode: Joi.string().allow("").required(),
|
|
2522
3118
|
apply_all_discount: Joi.boolean(),
|
|
2523
|
-
display_meta: CartPlatformModel.DisplayMeta1()
|
|
2524
|
-
ownership: CartPlatformModel.Ownership1()
|
|
3119
|
+
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3120
|
+
ownership: CartPlatformModel.Ownership1(),
|
|
2525
3121
|
promotion_type: Joi.string().allow("").required(),
|
|
2526
|
-
discount_rules: Joi.array()
|
|
2527
|
-
.items(CartPlatformModel.DiscountRule())
|
|
2528
|
-
.required(),
|
|
3122
|
+
discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
|
|
2529
3123
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
2530
3124
|
currency: Joi.string().allow(""),
|
|
2531
3125
|
code: Joi.string().allow(""),
|
|
@@ -2535,15 +3129,45 @@ class CartPlatformModel {
|
|
|
2535
3129
|
author: CartPlatformModel.PromotionAuthor(),
|
|
2536
3130
|
visiblility: CartPlatformModel.Visibility(),
|
|
2537
3131
|
application_id: Joi.string().allow("").required(),
|
|
2538
|
-
buy_rules:
|
|
2539
|
-
|
|
2540
|
-
.required(),
|
|
2541
|
-
_custom_json: Joi.any(),
|
|
3132
|
+
buy_rules: CartPlatformModel.ItemCriteria(),
|
|
3133
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
2542
3134
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
2543
3135
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2544
3136
|
});
|
|
2545
3137
|
}
|
|
2546
3138
|
|
|
3139
|
+
/** @returns {PromotionUpdateResult} */
|
|
3140
|
+
static PromotionUpdateResult() {
|
|
3141
|
+
return Joi.object({
|
|
3142
|
+
stackable: Joi.boolean(),
|
|
3143
|
+
calculate_on: Joi.string().allow(""),
|
|
3144
|
+
apply_exclusive: Joi.string().allow("").allow(null),
|
|
3145
|
+
reason: Joi.string().allow("").allow(null),
|
|
3146
|
+
is_processed: Joi.boolean(),
|
|
3147
|
+
promo_group: Joi.string().allow("").required(),
|
|
3148
|
+
mode: Joi.string().allow("").required(),
|
|
3149
|
+
apply_all_discount: Joi.boolean(),
|
|
3150
|
+
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3151
|
+
ownership: CartPlatformModel.Ownership1(),
|
|
3152
|
+
promotion_type: Joi.string().allow("").required(),
|
|
3153
|
+
discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
|
|
3154
|
+
restrictions: CartPlatformModel.Restrictions1(),
|
|
3155
|
+
currency: Joi.string().allow(""),
|
|
3156
|
+
code: Joi.string().allow(""),
|
|
3157
|
+
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
3158
|
+
post_order_action: CartPlatformModel.PromotionAction(),
|
|
3159
|
+
apply_priority: Joi.number(),
|
|
3160
|
+
author: CartPlatformModel.PromotionAuthor(),
|
|
3161
|
+
visiblility: CartPlatformModel.Visibility(),
|
|
3162
|
+
application_id: Joi.string().allow("").required(),
|
|
3163
|
+
buy_rules: CartPlatformModel.ItemCriteria(),
|
|
3164
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
3165
|
+
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3166
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
3167
|
+
is_archived: Joi.boolean(),
|
|
3168
|
+
});
|
|
3169
|
+
}
|
|
3170
|
+
|
|
2547
3171
|
/** @returns {PromotionPartialUpdate} */
|
|
2548
3172
|
static PromotionPartialUpdate() {
|
|
2549
3173
|
return Joi.object({
|
|
@@ -2552,8 +3176,8 @@ class CartPlatformModel {
|
|
|
2552
3176
|
});
|
|
2553
3177
|
}
|
|
2554
3178
|
|
|
2555
|
-
/** @returns {
|
|
2556
|
-
static
|
|
3179
|
+
/** @returns {ActivePromosResult} */
|
|
3180
|
+
static ActivePromosResult() {
|
|
2557
3181
|
return Joi.object({
|
|
2558
3182
|
entity_slug: Joi.string().allow(""),
|
|
2559
3183
|
title: Joi.string().allow(""),
|
|
@@ -2622,14 +3246,14 @@ class CartPlatformModel {
|
|
|
2622
3246
|
type: Joi.string().allow(""),
|
|
2623
3247
|
article_id: Joi.string().allow("").required(),
|
|
2624
3248
|
quantity: Joi.number(),
|
|
2625
|
-
meta: Joi.any(),
|
|
3249
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2626
3250
|
});
|
|
2627
3251
|
}
|
|
2628
3252
|
|
|
2629
3253
|
/** @returns {PriceAdjustmentRestrictions} */
|
|
2630
3254
|
static PriceAdjustmentRestrictions() {
|
|
2631
3255
|
return Joi.object({
|
|
2632
|
-
post_order: Joi.any(),
|
|
3256
|
+
post_order: Joi.object().pattern(/\S/, Joi.any()),
|
|
2633
3257
|
});
|
|
2634
3258
|
}
|
|
2635
3259
|
|
|
@@ -2656,8 +3280,9 @@ class CartPlatformModel {
|
|
|
2656
3280
|
is_authenticated: Joi.boolean().required(),
|
|
2657
3281
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
2658
3282
|
auto_remove: Joi.boolean(),
|
|
2659
|
-
meta: Joi.any(),
|
|
3283
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2660
3284
|
cart_id: Joi.string().allow("").required(),
|
|
3285
|
+
distribution_logic: CartPlatformModel.DistributionLogic(),
|
|
2661
3286
|
});
|
|
2662
3287
|
}
|
|
2663
3288
|
|
|
@@ -2676,20 +3301,21 @@ class CartPlatformModel {
|
|
|
2676
3301
|
is_authenticated: Joi.boolean().required(),
|
|
2677
3302
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
2678
3303
|
auto_remove: Joi.boolean(),
|
|
2679
|
-
meta: Joi.any(),
|
|
3304
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2680
3305
|
cart_id: Joi.string().allow("").required(),
|
|
3306
|
+
distribution_logic: CartPlatformModel.DistributionLogic(),
|
|
2681
3307
|
});
|
|
2682
3308
|
}
|
|
2683
3309
|
|
|
2684
|
-
/** @returns {
|
|
2685
|
-
static
|
|
3310
|
+
/** @returns {PriceAdjustmentResult} */
|
|
3311
|
+
static PriceAdjustmentResult() {
|
|
2686
3312
|
return Joi.object({
|
|
2687
3313
|
data: CartPlatformModel.PriceAdjustment(),
|
|
2688
3314
|
});
|
|
2689
3315
|
}
|
|
2690
3316
|
|
|
2691
|
-
/** @returns {
|
|
2692
|
-
static
|
|
3317
|
+
/** @returns {GetPriceAdjustmentResult} */
|
|
3318
|
+
static GetPriceAdjustmentResult() {
|
|
2693
3319
|
return Joi.object({
|
|
2694
3320
|
data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
|
|
2695
3321
|
});
|
|
@@ -2709,9 +3335,34 @@ class CartPlatformModel {
|
|
|
2709
3335
|
allowed_refund: Joi.boolean(),
|
|
2710
3336
|
is_authenticated: Joi.boolean().required(),
|
|
2711
3337
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
2712
|
-
meta: Joi.any(),
|
|
3338
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2713
3339
|
cart_id: Joi.string().allow("").required(),
|
|
2714
3340
|
auto_remove: Joi.boolean(),
|
|
3341
|
+
distribution_logic: CartPlatformModel.DistributionLogic(),
|
|
3342
|
+
});
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
/** @returns {DistributionRule} */
|
|
3346
|
+
static DistributionRule() {
|
|
3347
|
+
return Joi.object({
|
|
3348
|
+
conditions: Joi.object().pattern(/\S/, Joi.any()),
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3351
|
+
|
|
3352
|
+
/** @returns {Distribution} */
|
|
3353
|
+
static Distribution() {
|
|
3354
|
+
return Joi.object({
|
|
3355
|
+
type: Joi.string().allow(""),
|
|
3356
|
+
logic: Joi.string().allow(""),
|
|
3357
|
+
rule: CartPlatformModel.DistributionRule(),
|
|
3358
|
+
});
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
/** @returns {DistributionLogic} */
|
|
3362
|
+
static DistributionLogic() {
|
|
3363
|
+
return Joi.object({
|
|
3364
|
+
distribution_level: Joi.string().allow(""),
|
|
3365
|
+
distribution: CartPlatformModel.Distribution(),
|
|
2715
3366
|
});
|
|
2716
3367
|
}
|
|
2717
3368
|
|
|
@@ -2724,8 +3375,8 @@ class CartPlatformModel {
|
|
|
2724
3375
|
});
|
|
2725
3376
|
}
|
|
2726
3377
|
|
|
2727
|
-
/** @returns {
|
|
2728
|
-
static
|
|
3378
|
+
/** @returns {OpenapiCartDetailsCreation} */
|
|
3379
|
+
static OpenapiCartDetailsCreation() {
|
|
2729
3380
|
return Joi.object({
|
|
2730
3381
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
2731
3382
|
});
|
|
@@ -2813,7 +3464,7 @@ class CartPlatformModel {
|
|
|
2813
3464
|
/** @returns {Tags} */
|
|
2814
3465
|
static Tags() {
|
|
2815
3466
|
return Joi.object({
|
|
2816
|
-
tags: Joi.any(),
|
|
3467
|
+
tags: Joi.object().pattern(/\S/, Joi.any()),
|
|
2817
3468
|
});
|
|
2818
3469
|
}
|
|
2819
3470
|
|
|
@@ -2832,12 +3483,28 @@ class CartPlatformModel {
|
|
|
2832
3483
|
});
|
|
2833
3484
|
}
|
|
2834
3485
|
|
|
3486
|
+
/** @returns {ProductActionParams} */
|
|
3487
|
+
static ProductActionParams() {
|
|
3488
|
+
return Joi.object({
|
|
3489
|
+
slug: Joi.array().items(Joi.string().allow("")),
|
|
3490
|
+
});
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
/** @returns {ProductActionPage} */
|
|
3494
|
+
static ProductActionPage() {
|
|
3495
|
+
return Joi.object({
|
|
3496
|
+
type: Joi.string().allow(""),
|
|
3497
|
+
params: CartPlatformModel.ProductActionParams(),
|
|
3498
|
+
});
|
|
3499
|
+
}
|
|
3500
|
+
|
|
2835
3501
|
/** @returns {ProductAction} */
|
|
2836
3502
|
static ProductAction() {
|
|
2837
3503
|
return Joi.object({
|
|
2838
3504
|
type: Joi.string().allow(""),
|
|
2839
3505
|
url: Joi.string().allow(""),
|
|
2840
3506
|
query: CartPlatformModel.ActionQuery(),
|
|
3507
|
+
page: CartPlatformModel.ProductActionPage(),
|
|
2841
3508
|
});
|
|
2842
3509
|
}
|
|
2843
3510
|
|
|
@@ -2859,12 +3526,12 @@ class CartPlatformModel {
|
|
|
2859
3526
|
action: CartPlatformModel.ProductAction(),
|
|
2860
3527
|
uid: Joi.number(),
|
|
2861
3528
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2862
|
-
_custom_json: Joi.any(),
|
|
3529
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
2863
3530
|
type: Joi.string().allow(""),
|
|
2864
3531
|
name: Joi.string().allow(""),
|
|
2865
3532
|
item_code: Joi.string().allow("").allow(null),
|
|
2866
3533
|
categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
|
|
2867
|
-
attributes: Joi.any(),
|
|
3534
|
+
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
2868
3535
|
});
|
|
2869
3536
|
}
|
|
2870
3537
|
|
|
@@ -2901,19 +3568,19 @@ class CartPlatformModel {
|
|
|
2901
3568
|
seller_identifier: Joi.string().allow(""),
|
|
2902
3569
|
quantity: Joi.number(),
|
|
2903
3570
|
seller: CartPlatformModel.BaseInfo(),
|
|
2904
|
-
cart_item_meta: Joi.any(),
|
|
2905
|
-
parent_item_identifiers: Joi.any(),
|
|
3571
|
+
cart_item_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3572
|
+
parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
2906
3573
|
is_gift_visible: Joi.boolean(),
|
|
2907
3574
|
uid: Joi.string().allow(""),
|
|
2908
|
-
gift_card: Joi.any(),
|
|
3575
|
+
gift_card: Joi.object().pattern(/\S/, Joi.any()),
|
|
2909
3576
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
2910
|
-
identifier: Joi.any(),
|
|
3577
|
+
identifier: Joi.object().pattern(/\S/, Joi.any()),
|
|
2911
3578
|
mto_quantity: Joi.number(),
|
|
2912
|
-
extra_meta: Joi.any(),
|
|
3579
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2913
3580
|
type: Joi.string().allow(""),
|
|
2914
|
-
_custom_json: Joi.any(),
|
|
3581
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
2915
3582
|
price: CartPlatformModel.ArticlePriceInfo(),
|
|
2916
|
-
meta: Joi.any(),
|
|
3583
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2917
3584
|
size: Joi.string().allow(""),
|
|
2918
3585
|
store: CartPlatformModel.StoreInfo(),
|
|
2919
3586
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -2931,9 +3598,9 @@ class CartPlatformModel {
|
|
|
2931
3598
|
/** @returns {DiscountRulesApp} */
|
|
2932
3599
|
static DiscountRulesApp() {
|
|
2933
3600
|
return Joi.object({
|
|
2934
|
-
offer: Joi.any(),
|
|
2935
|
-
raw_offer: Joi.any(),
|
|
2936
|
-
item_criteria: Joi.any(),
|
|
3601
|
+
offer: Joi.object().pattern(/\S/, Joi.any()),
|
|
3602
|
+
raw_offer: Joi.object().pattern(/\S/, Joi.any()),
|
|
3603
|
+
item_criteria: Joi.object().pattern(/\S/, Joi.any()),
|
|
2937
3604
|
matched_buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
2938
3605
|
});
|
|
2939
3606
|
}
|
|
@@ -2951,8 +3618,8 @@ class CartPlatformModel {
|
|
|
2951
3618
|
/** @returns {BuyRules} */
|
|
2952
3619
|
static BuyRules() {
|
|
2953
3620
|
return Joi.object({
|
|
2954
|
-
cart_conditions: Joi.any(),
|
|
2955
|
-
item_criteria: Joi.any(),
|
|
3621
|
+
cart_conditions: Joi.object().pattern(/\S/, Joi.any()),
|
|
3622
|
+
item_criteria: Joi.object().pattern(/\S/, Joi.any()),
|
|
2956
3623
|
});
|
|
2957
3624
|
}
|
|
2958
3625
|
|
|
@@ -2975,7 +3642,7 @@ class CartPlatformModel {
|
|
|
2975
3642
|
mrp_promotion: Joi.boolean(),
|
|
2976
3643
|
promotion_group: Joi.string().allow(""),
|
|
2977
3644
|
promo_id: Joi.string().allow(""),
|
|
2978
|
-
meta: Joi.any(),
|
|
3645
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
2979
3646
|
code: Joi.string().allow("").allow(null),
|
|
2980
3647
|
});
|
|
2981
3648
|
}
|
|
@@ -3085,7 +3752,7 @@ class CartPlatformModel {
|
|
|
3085
3752
|
quantity: Joi.number(),
|
|
3086
3753
|
product: CartPlatformModel.CartProduct(),
|
|
3087
3754
|
product_ean_id: Joi.string().allow(""),
|
|
3088
|
-
parent_item_identifiers: Joi.any(),
|
|
3755
|
+
parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
3089
3756
|
is_set: Joi.boolean(),
|
|
3090
3757
|
article: CartPlatformModel.ProductArticle(),
|
|
3091
3758
|
promotions_applied: Joi.array().items(
|
|
@@ -3094,22 +3761,22 @@ class CartPlatformModel {
|
|
|
3094
3761
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3095
3762
|
key: Joi.string().allow(""),
|
|
3096
3763
|
coupon: CartPlatformModel.CouponDetails(),
|
|
3097
|
-
bulk_offer: Joi.any(),
|
|
3764
|
+
bulk_offer: Joi.object().pattern(/\S/, Joi.any()),
|
|
3098
3765
|
price: CartPlatformModel.ProductPriceInfo(),
|
|
3099
3766
|
coupon_message: Joi.string().allow(""),
|
|
3100
3767
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
3101
3768
|
message: Joi.string().allow(""),
|
|
3102
3769
|
discount: Joi.string().allow(""),
|
|
3103
3770
|
availability: CartPlatformModel.ProductAvailability(),
|
|
3104
|
-
moq: Joi.any(),
|
|
3771
|
+
moq: Joi.object().pattern(/\S/, Joi.any()),
|
|
3105
3772
|
price_per_unit: CartPlatformModel.ProductPriceInfo(),
|
|
3106
3773
|
promo_meta: CartPlatformModel.PromoMeta(),
|
|
3107
|
-
custom_order: Joi.any(),
|
|
3774
|
+
custom_order: Joi.object().pattern(/\S/, Joi.any()),
|
|
3108
3775
|
});
|
|
3109
3776
|
}
|
|
3110
3777
|
|
|
3111
|
-
/** @returns {
|
|
3112
|
-
static
|
|
3778
|
+
/** @returns {OpenapiCartDetailsResult} */
|
|
3779
|
+
static OpenapiCartDetailsResult() {
|
|
3113
3780
|
return Joi.object({
|
|
3114
3781
|
is_valid: Joi.boolean(),
|
|
3115
3782
|
message: Joi.string().allow(""),
|
|
@@ -3118,12 +3785,12 @@ class CartPlatformModel {
|
|
|
3118
3785
|
});
|
|
3119
3786
|
}
|
|
3120
3787
|
|
|
3121
|
-
/** @returns {
|
|
3122
|
-
static
|
|
3788
|
+
/** @returns {OpenApiErrorResult} */
|
|
3789
|
+
static OpenApiErrorResult() {
|
|
3123
3790
|
return Joi.object({
|
|
3124
3791
|
success: Joi.boolean(),
|
|
3125
3792
|
message: Joi.string().allow(""),
|
|
3126
|
-
errors: Joi.any(),
|
|
3793
|
+
errors: Joi.object().pattern(/\S/, Joi.any()),
|
|
3127
3794
|
});
|
|
3128
3795
|
}
|
|
3129
3796
|
|
|
@@ -3137,7 +3804,7 @@ class CartPlatformModel {
|
|
|
3137
3804
|
area_code: Joi.string().allow("").required(),
|
|
3138
3805
|
country_iso_code: Joi.string().allow(""),
|
|
3139
3806
|
country_phone_code: Joi.string().allow(""),
|
|
3140
|
-
meta: Joi.any(),
|
|
3807
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3141
3808
|
address_type: Joi.string().allow(""),
|
|
3142
3809
|
area: Joi.string().allow(""),
|
|
3143
3810
|
area_code_slug: Joi.string().allow(""),
|
|
@@ -3150,16 +3817,16 @@ class CartPlatformModel {
|
|
|
3150
3817
|
});
|
|
3151
3818
|
}
|
|
3152
3819
|
|
|
3153
|
-
/** @returns {
|
|
3154
|
-
static
|
|
3820
|
+
/** @returns {OpenApiCartServiceabilityCreation} */
|
|
3821
|
+
static OpenApiCartServiceabilityCreation() {
|
|
3155
3822
|
return Joi.object({
|
|
3156
3823
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3157
3824
|
shipping_address: CartPlatformModel.ShippingAddress().required(),
|
|
3158
3825
|
});
|
|
3159
3826
|
}
|
|
3160
3827
|
|
|
3161
|
-
/** @returns {
|
|
3162
|
-
static
|
|
3828
|
+
/** @returns {OpenApiCartServiceabilityResult} */
|
|
3829
|
+
static OpenApiCartServiceabilityResult() {
|
|
3163
3830
|
return Joi.object({
|
|
3164
3831
|
is_valid: Joi.boolean(),
|
|
3165
3832
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3190,7 +3857,7 @@ class CartPlatformModel {
|
|
|
3190
3857
|
return Joi.object({
|
|
3191
3858
|
payment_id: Joi.string().allow("").allow(null),
|
|
3192
3859
|
payment_gateway: Joi.string().allow("").allow(null),
|
|
3193
|
-
extra_meta: Joi.any().allow(null),
|
|
3860
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
3194
3861
|
current_status: Joi.string().allow("").allow(null),
|
|
3195
3862
|
order_id: Joi.string().allow("").allow(null),
|
|
3196
3863
|
});
|
|
@@ -3218,7 +3885,7 @@ class CartPlatformModel {
|
|
|
3218
3885
|
price_marked: Joi.number().required(),
|
|
3219
3886
|
files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
|
|
3220
3887
|
meta: CartPlatformModel.CartItemMeta(),
|
|
3221
|
-
extra_meta: Joi.any(),
|
|
3888
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3222
3889
|
product_id: Joi.number().required(),
|
|
3223
3890
|
loyalty_discount: Joi.number(),
|
|
3224
3891
|
discount: Joi.number().required(),
|
|
@@ -3245,7 +3912,7 @@ class CartPlatformModel {
|
|
|
3245
3912
|
payment_methods: Joi.array()
|
|
3246
3913
|
.items(CartPlatformModel.MultiTenderPaymentMethod())
|
|
3247
3914
|
.required(),
|
|
3248
|
-
employee_discount: Joi.any(),
|
|
3915
|
+
employee_discount: Joi.object().pattern(/\S/, Joi.any()),
|
|
3249
3916
|
coupon: Joi.string().allow(""),
|
|
3250
3917
|
cashback_applied: Joi.number().required(),
|
|
3251
3918
|
gstin: Joi.string().allow("").allow(null),
|
|
@@ -3261,8 +3928,8 @@ class CartPlatformModel {
|
|
|
3261
3928
|
});
|
|
3262
3929
|
}
|
|
3263
3930
|
|
|
3264
|
-
/** @returns {
|
|
3265
|
-
static
|
|
3931
|
+
/** @returns {OpenApiCheckoutResult} */
|
|
3932
|
+
static OpenApiCheckoutResult() {
|
|
3266
3933
|
return Joi.object({
|
|
3267
3934
|
success: Joi.boolean(),
|
|
3268
3935
|
message: Joi.string().allow(""),
|
|
@@ -3275,46 +3942,48 @@ class CartPlatformModel {
|
|
|
3275
3942
|
static AbandonedCart() {
|
|
3276
3943
|
return Joi.object({
|
|
3277
3944
|
expire_at: Joi.string().allow("").required(),
|
|
3278
|
-
promotion: Joi.any(),
|
|
3945
|
+
promotion: Joi.object().pattern(/\S/, Joi.any()),
|
|
3279
3946
|
is_default: Joi.boolean().required(),
|
|
3280
3947
|
comment: Joi.string().allow("").allow(null),
|
|
3281
3948
|
articles: Joi.array().items(Joi.any()).required(),
|
|
3282
|
-
coupon: Joi.any().allow(null),
|
|
3949
|
+
coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
3283
3950
|
bulk_coupon_discount: Joi.number().allow(null),
|
|
3284
3951
|
_id: Joi.string().allow("").required(),
|
|
3285
|
-
fynd_credits: Joi.any(),
|
|
3952
|
+
fynd_credits: Joi.object().pattern(/\S/, Joi.any()),
|
|
3286
3953
|
fc_index_map: Joi.array().items(Joi.number()),
|
|
3287
3954
|
order_id: Joi.string().allow(""),
|
|
3288
3955
|
discount: Joi.number(),
|
|
3289
|
-
cod_charges: Joi.any(),
|
|
3290
|
-
payments: Joi.any().allow(null),
|
|
3956
|
+
cod_charges: Joi.object().pattern(/\S/, Joi.any()),
|
|
3957
|
+
payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
3291
3958
|
payment_mode: Joi.string().allow("").allow(null),
|
|
3292
3959
|
shipments: Joi.array().items(Joi.any()),
|
|
3293
|
-
pick_up_customer_details: Joi.
|
|
3960
|
+
pick_up_customer_details: Joi.object()
|
|
3961
|
+
.pattern(/\S/, Joi.any())
|
|
3962
|
+
.allow(null, ""),
|
|
3294
3963
|
uid: Joi.number().required(),
|
|
3295
3964
|
checkout_mode: Joi.string().allow(""),
|
|
3296
3965
|
cart_value: Joi.number(),
|
|
3297
3966
|
is_archive: Joi.boolean(),
|
|
3298
3967
|
created_on: Joi.string().allow("").required(),
|
|
3299
3968
|
last_modified: Joi.string().allow("").required(),
|
|
3300
|
-
meta: Joi.any().allow(null),
|
|
3969
|
+
meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
3301
3970
|
buy_now: Joi.boolean(),
|
|
3302
3971
|
is_active: Joi.boolean(),
|
|
3303
|
-
cashback: Joi.any().required(),
|
|
3972
|
+
cashback: Joi.object().pattern(/\S/, Joi.any()).required(),
|
|
3304
3973
|
payment_methods: Joi.array().items(Joi.any()),
|
|
3305
3974
|
gstin: Joi.string().allow("").allow(null),
|
|
3306
|
-
delivery_charges: Joi.any(),
|
|
3975
|
+
delivery_charges: Joi.object().pattern(/\S/, Joi.any()),
|
|
3307
3976
|
merge_qty: Joi.boolean().allow(null),
|
|
3308
3977
|
user_id: Joi.string().allow("").required(),
|
|
3309
3978
|
app_id: Joi.string().allow(""),
|
|
3310
3979
|
});
|
|
3311
3980
|
}
|
|
3312
3981
|
|
|
3313
|
-
/** @returns {
|
|
3314
|
-
static
|
|
3982
|
+
/** @returns {AbandonedCartResult} */
|
|
3983
|
+
static AbandonedCartResult() {
|
|
3315
3984
|
return Joi.object({
|
|
3316
3985
|
items: Joi.array().items(CartPlatformModel.AbandonedCart()),
|
|
3317
|
-
result: Joi.any(),
|
|
3986
|
+
result: Joi.object().pattern(/\S/, Joi.any()),
|
|
3318
3987
|
page: CartPlatformModel.Page(),
|
|
3319
3988
|
success: Joi.boolean(),
|
|
3320
3989
|
message: Joi.string().allow(""),
|
|
@@ -3383,14 +4052,14 @@ class CartPlatformModel {
|
|
|
3383
4052
|
});
|
|
3384
4053
|
}
|
|
3385
4054
|
|
|
3386
|
-
/** @returns {
|
|
3387
|
-
static
|
|
4055
|
+
/** @returns {CartDetailResult} */
|
|
4056
|
+
static CartDetailResult() {
|
|
3388
4057
|
return Joi.object({
|
|
3389
4058
|
cart_id: Joi.number(),
|
|
3390
4059
|
uid: Joi.string().allow(""),
|
|
3391
4060
|
coupon_text: Joi.string().allow(""),
|
|
3392
4061
|
id: Joi.string().allow(""),
|
|
3393
|
-
pan_config: Joi.any(),
|
|
4062
|
+
pan_config: Joi.object().pattern(/\S/, Joi.any()),
|
|
3394
4063
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3395
4064
|
comment: Joi.string().allow(""),
|
|
3396
4065
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3400,7 +4069,7 @@ class CartPlatformModel {
|
|
|
3400
4069
|
coupon: CartPlatformModel.CartDetailCoupon(),
|
|
3401
4070
|
restrict_checkout: Joi.boolean(),
|
|
3402
4071
|
message: Joi.string().allow(""),
|
|
3403
|
-
notification: Joi.any(),
|
|
4072
|
+
notification: Joi.object().pattern(/\S/, Joi.any()),
|
|
3404
4073
|
staff_user_id: Joi.string().allow(""),
|
|
3405
4074
|
success: Joi.boolean(),
|
|
3406
4075
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
@@ -3414,7 +4083,7 @@ class CartPlatformModel {
|
|
|
3414
4083
|
CartPlatformModel.AppliedPromotion()
|
|
3415
4084
|
),
|
|
3416
4085
|
pan_no: Joi.string().allow(""),
|
|
3417
|
-
custom_cart_meta: Joi.any(),
|
|
4086
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3418
4087
|
});
|
|
3419
4088
|
}
|
|
3420
4089
|
|
|
@@ -3429,31 +4098,31 @@ class CartPlatformModel {
|
|
|
3429
4098
|
),
|
|
3430
4099
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
3431
4100
|
article_id: Joi.string().allow(""),
|
|
3432
|
-
article_assignment: Joi.any(),
|
|
4101
|
+
article_assignment: Joi.object().pattern(/\S/, Joi.any()),
|
|
3433
4102
|
store_id: Joi.number(),
|
|
3434
4103
|
display: Joi.string().allow(""),
|
|
3435
4104
|
item_id: Joi.number(),
|
|
3436
|
-
extra_meta: Joi.any(),
|
|
3437
|
-
_custom_json: Joi.any(),
|
|
3438
|
-
meta: Joi.any(),
|
|
4105
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4106
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
4107
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3439
4108
|
pos: Joi.boolean(),
|
|
3440
4109
|
seller_identifier: Joi.string().allow(""),
|
|
3441
4110
|
});
|
|
3442
4111
|
}
|
|
3443
4112
|
|
|
3444
|
-
/** @returns {
|
|
3445
|
-
static
|
|
4113
|
+
/** @returns {AddCartCreation} */
|
|
4114
|
+
static AddCartCreation() {
|
|
3446
4115
|
return Joi.object({
|
|
3447
4116
|
new_cart: Joi.boolean(),
|
|
3448
4117
|
items: Joi.array().items(CartPlatformModel.AddProductCart()),
|
|
3449
4118
|
});
|
|
3450
4119
|
}
|
|
3451
4120
|
|
|
3452
|
-
/** @returns {
|
|
3453
|
-
static
|
|
4121
|
+
/** @returns {AddCartDetailResult} */
|
|
4122
|
+
static AddCartDetailResult() {
|
|
3454
4123
|
return Joi.object({
|
|
3455
4124
|
success: Joi.boolean(),
|
|
3456
|
-
cart: CartPlatformModel.
|
|
4125
|
+
cart: CartPlatformModel.CartDetailResult(),
|
|
3457
4126
|
partial: Joi.boolean(),
|
|
3458
4127
|
message: Joi.string().allow(""),
|
|
3459
4128
|
});
|
|
@@ -3464,10 +4133,10 @@ class CartPlatformModel {
|
|
|
3464
4133
|
return Joi.object({
|
|
3465
4134
|
quantity: Joi.number(),
|
|
3466
4135
|
item_size: Joi.string().allow(""),
|
|
3467
|
-
parent_item_identifiers: Joi.any(),
|
|
3468
|
-
meta: Joi.any(),
|
|
3469
|
-
extra_meta: Joi.any(),
|
|
3470
|
-
_custom_json: Joi.any(),
|
|
4136
|
+
parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
4137
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4138
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4139
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
3471
4140
|
item_id: Joi.number(),
|
|
3472
4141
|
item_index: Joi.number(),
|
|
3473
4142
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
@@ -3475,19 +4144,31 @@ class CartPlatformModel {
|
|
|
3475
4144
|
});
|
|
3476
4145
|
}
|
|
3477
4146
|
|
|
3478
|
-
/** @returns {
|
|
3479
|
-
static
|
|
4147
|
+
/** @returns {FreeGiftItemCreation} */
|
|
4148
|
+
static FreeGiftItemCreation() {
|
|
4149
|
+
return Joi.object({
|
|
4150
|
+
promotion_id: Joi.string().allow("").required(),
|
|
4151
|
+
item_id: Joi.string().allow("").required(),
|
|
4152
|
+
item_size: Joi.string().allow("").required(),
|
|
4153
|
+
});
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
/** @returns {UpdateCartCreation} */
|
|
4157
|
+
static UpdateCartCreation() {
|
|
3480
4158
|
return Joi.object({
|
|
3481
4159
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4160
|
+
free_gift_items: Joi.array().items(
|
|
4161
|
+
CartPlatformModel.FreeGiftItemCreation()
|
|
4162
|
+
),
|
|
3482
4163
|
operation: Joi.string().allow("").required(),
|
|
3483
4164
|
});
|
|
3484
4165
|
}
|
|
3485
4166
|
|
|
3486
|
-
/** @returns {
|
|
3487
|
-
static
|
|
4167
|
+
/** @returns {UpdateCartDetailResult} */
|
|
4168
|
+
static UpdateCartDetailResult() {
|
|
3488
4169
|
return Joi.object({
|
|
3489
4170
|
success: Joi.boolean(),
|
|
3490
|
-
cart: CartPlatformModel.
|
|
4171
|
+
cart: CartPlatformModel.CartDetailResult(),
|
|
3491
4172
|
message: Joi.string().allow(""),
|
|
3492
4173
|
});
|
|
3493
4174
|
}
|
|
@@ -3513,7 +4194,7 @@ class CartPlatformModel {
|
|
|
3513
4194
|
price_marked: Joi.number().required(),
|
|
3514
4195
|
amount_paid: Joi.number().required(),
|
|
3515
4196
|
promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
|
|
3516
|
-
extra_meta: Joi.any(),
|
|
4197
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3517
4198
|
item_id: Joi.number().required(),
|
|
3518
4199
|
discount: Joi.number().required(),
|
|
3519
4200
|
price_effective: Joi.number().required(),
|
|
@@ -3525,9 +4206,9 @@ class CartPlatformModel {
|
|
|
3525
4206
|
return Joi.object({
|
|
3526
4207
|
cart_id: Joi.string().allow("").required(),
|
|
3527
4208
|
payment_mode: Joi.string().allow("").required(),
|
|
3528
|
-
billing_address: Joi.any(),
|
|
4209
|
+
billing_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
3529
4210
|
merchant_code: Joi.string().allow("").required(),
|
|
3530
|
-
payment_identifier: Joi.string().allow("").
|
|
4211
|
+
payment_identifier: Joi.string().allow("").required(),
|
|
3531
4212
|
currency_code: Joi.string().allow("").required(),
|
|
3532
4213
|
aggregator: Joi.string().allow("").required(),
|
|
3533
4214
|
order_type: Joi.string().allow("").required(),
|
|
@@ -3536,31 +4217,31 @@ class CartPlatformModel {
|
|
|
3536
4217
|
.items(CartPlatformModel.OverrideCartItem())
|
|
3537
4218
|
.required(),
|
|
3538
4219
|
ordering_store: Joi.number().allow(null),
|
|
3539
|
-
shipping_address: Joi.any(),
|
|
4220
|
+
shipping_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
3540
4221
|
});
|
|
3541
4222
|
}
|
|
3542
4223
|
|
|
3543
|
-
/** @returns {
|
|
3544
|
-
static
|
|
4224
|
+
/** @returns {OverrideCheckoutResult} */
|
|
4225
|
+
static OverrideCheckoutResult() {
|
|
3545
4226
|
return Joi.object({
|
|
3546
|
-
data: Joi.any().required(),
|
|
3547
|
-
cart: Joi.any().required(),
|
|
4227
|
+
data: Joi.object().pattern(/\S/, Joi.any()).required(),
|
|
4228
|
+
cart: Joi.object().pattern(/\S/, Joi.any()).required(),
|
|
3548
4229
|
success: Joi.string().allow("").required(),
|
|
3549
4230
|
order_id: Joi.string().allow("").required(),
|
|
3550
4231
|
message: Joi.string().allow("").required(),
|
|
3551
4232
|
});
|
|
3552
4233
|
}
|
|
3553
4234
|
|
|
3554
|
-
/** @returns {
|
|
3555
|
-
static
|
|
4235
|
+
/** @returns {GetShareCartLinkCreation} */
|
|
4236
|
+
static GetShareCartLinkCreation() {
|
|
3556
4237
|
return Joi.object({
|
|
3557
4238
|
id: Joi.string().allow(""),
|
|
3558
|
-
meta: Joi.any(),
|
|
4239
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3559
4240
|
});
|
|
3560
4241
|
}
|
|
3561
4242
|
|
|
3562
|
-
/** @returns {
|
|
3563
|
-
static
|
|
4243
|
+
/** @returns {GetShareCartLinkResult} */
|
|
4244
|
+
static GetShareCartLinkResult() {
|
|
3564
4245
|
return Joi.object({
|
|
3565
4246
|
token: Joi.string().allow(""),
|
|
3566
4247
|
share_url: Joi.string().allow(""),
|
|
@@ -3570,11 +4251,11 @@ class CartPlatformModel {
|
|
|
3570
4251
|
/** @returns {SharedCartDetails} */
|
|
3571
4252
|
static SharedCartDetails() {
|
|
3572
4253
|
return Joi.object({
|
|
3573
|
-
source: Joi.any(),
|
|
3574
|
-
user: Joi.any(),
|
|
4254
|
+
source: Joi.object().pattern(/\S/, Joi.any()),
|
|
4255
|
+
user: Joi.object().pattern(/\S/, Joi.any()),
|
|
3575
4256
|
token: Joi.string().allow(""),
|
|
3576
4257
|
created_on: Joi.string().allow(""),
|
|
3577
|
-
meta: Joi.any(),
|
|
4258
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3578
4259
|
});
|
|
3579
4260
|
}
|
|
3580
4261
|
|
|
@@ -3600,12 +4281,12 @@ class CartPlatformModel {
|
|
|
3600
4281
|
buy_now: Joi.boolean(),
|
|
3601
4282
|
cart_id: Joi.number(),
|
|
3602
4283
|
gstin: Joi.string().allow(""),
|
|
3603
|
-
custom_cart_meta: Joi.any(),
|
|
4284
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3604
4285
|
});
|
|
3605
4286
|
}
|
|
3606
4287
|
|
|
3607
|
-
/** @returns {
|
|
3608
|
-
static
|
|
4288
|
+
/** @returns {SharedCartResult} */
|
|
4289
|
+
static SharedCartResult() {
|
|
3609
4290
|
return Joi.object({
|
|
3610
4291
|
cart: CartPlatformModel.SharedCart(),
|
|
3611
4292
|
error: Joi.string().allow(""),
|
|
@@ -3616,7 +4297,7 @@ class CartPlatformModel {
|
|
|
3616
4297
|
static CartList() {
|
|
3617
4298
|
return Joi.object({
|
|
3618
4299
|
cart_id: Joi.string().allow(""),
|
|
3619
|
-
pick_up_customer_details: Joi.any(),
|
|
4300
|
+
pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
|
|
3620
4301
|
cart_value: Joi.number(),
|
|
3621
4302
|
created_on: Joi.string().allow(""),
|
|
3622
4303
|
user_id: Joi.string().allow(""),
|
|
@@ -3625,8 +4306,8 @@ class CartPlatformModel {
|
|
|
3625
4306
|
});
|
|
3626
4307
|
}
|
|
3627
4308
|
|
|
3628
|
-
/** @returns {
|
|
3629
|
-
static
|
|
4309
|
+
/** @returns {MultiCartResult} */
|
|
4310
|
+
static MultiCartResult() {
|
|
3630
4311
|
return Joi.object({
|
|
3631
4312
|
success: Joi.boolean(),
|
|
3632
4313
|
data: Joi.array().items(CartPlatformModel.CartList()),
|
|
@@ -3655,13 +4336,13 @@ class CartPlatformModel {
|
|
|
3655
4336
|
});
|
|
3656
4337
|
}
|
|
3657
4338
|
|
|
3658
|
-
/** @returns {
|
|
3659
|
-
static
|
|
4339
|
+
/** @returns {UserCartMappingResult} */
|
|
4340
|
+
static UserCartMappingResult() {
|
|
3660
4341
|
return Joi.object({
|
|
3661
4342
|
coupon_text: Joi.string().allow(""),
|
|
3662
4343
|
user: CartPlatformModel.UserInfo(),
|
|
3663
4344
|
id: Joi.string().allow(""),
|
|
3664
|
-
pan_config: Joi.any(),
|
|
4345
|
+
pan_config: Joi.object().pattern(/\S/, Joi.any()),
|
|
3665
4346
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3666
4347
|
comment: Joi.string().allow(""),
|
|
3667
4348
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3676,7 +4357,7 @@ class CartPlatformModel {
|
|
|
3676
4357
|
last_modified: Joi.string().allow(""),
|
|
3677
4358
|
buy_now: Joi.boolean(),
|
|
3678
4359
|
gstin: Joi.string().allow(""),
|
|
3679
|
-
custom_cart_meta: Joi.any(),
|
|
4360
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3680
4361
|
applied_promo_details: Joi.array().items(
|
|
3681
4362
|
CartPlatformModel.AppliedPromotion()
|
|
3682
4363
|
),
|
|
@@ -3684,8 +4365,8 @@ class CartPlatformModel {
|
|
|
3684
4365
|
});
|
|
3685
4366
|
}
|
|
3686
4367
|
|
|
3687
|
-
/** @returns {
|
|
3688
|
-
static
|
|
4368
|
+
/** @returns {PlatformAddCartDetails} */
|
|
4369
|
+
static PlatformAddCartDetails() {
|
|
3689
4370
|
return Joi.object({
|
|
3690
4371
|
user_id: Joi.string().allow(""),
|
|
3691
4372
|
new_cart: Joi.boolean(),
|
|
@@ -3693,32 +4374,35 @@ class CartPlatformModel {
|
|
|
3693
4374
|
});
|
|
3694
4375
|
}
|
|
3695
4376
|
|
|
3696
|
-
/** @returns {
|
|
3697
|
-
static
|
|
4377
|
+
/** @returns {PlatformUpdateCartDetails} */
|
|
4378
|
+
static PlatformUpdateCartDetails() {
|
|
3698
4379
|
return Joi.object({
|
|
3699
4380
|
user_id: Joi.string().allow(""),
|
|
3700
4381
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4382
|
+
free_gift_items: Joi.array().items(
|
|
4383
|
+
CartPlatformModel.FreeGiftItemCreation()
|
|
4384
|
+
),
|
|
3701
4385
|
operation: Joi.string().allow("").required(),
|
|
3702
4386
|
});
|
|
3703
4387
|
}
|
|
3704
4388
|
|
|
3705
|
-
/** @returns {
|
|
3706
|
-
static
|
|
4389
|
+
/** @returns {DeleteCartDetails} */
|
|
4390
|
+
static DeleteCartDetails() {
|
|
3707
4391
|
return Joi.object({
|
|
3708
4392
|
cart_id_list: Joi.array().items(Joi.string().allow("")),
|
|
3709
4393
|
});
|
|
3710
4394
|
}
|
|
3711
4395
|
|
|
3712
|
-
/** @returns {
|
|
3713
|
-
static
|
|
4396
|
+
/** @returns {DeleteCartDetailResult} */
|
|
4397
|
+
static DeleteCartDetailResult() {
|
|
3714
4398
|
return Joi.object({
|
|
3715
4399
|
success: Joi.boolean(),
|
|
3716
4400
|
message: Joi.string().allow(""),
|
|
3717
4401
|
});
|
|
3718
4402
|
}
|
|
3719
4403
|
|
|
3720
|
-
/** @returns {
|
|
3721
|
-
static
|
|
4404
|
+
/** @returns {CartItemCountResult} */
|
|
4405
|
+
static CartItemCountResult() {
|
|
3722
4406
|
return Joi.object({
|
|
3723
4407
|
user_cart_items_count: Joi.number(),
|
|
3724
4408
|
});
|
|
@@ -3756,16 +4440,16 @@ class CartPlatformModel {
|
|
|
3756
4440
|
});
|
|
3757
4441
|
}
|
|
3758
4442
|
|
|
3759
|
-
/** @returns {
|
|
3760
|
-
static
|
|
4443
|
+
/** @returns {GetCouponResult} */
|
|
4444
|
+
static GetCouponResult() {
|
|
3761
4445
|
return Joi.object({
|
|
3762
4446
|
available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
|
|
3763
4447
|
page: CartPlatformModel.PageCoupon(),
|
|
3764
4448
|
});
|
|
3765
4449
|
}
|
|
3766
4450
|
|
|
3767
|
-
/** @returns {
|
|
3768
|
-
static
|
|
4451
|
+
/** @returns {ApplyCouponDetails} */
|
|
4452
|
+
static ApplyCouponDetails() {
|
|
3769
4453
|
return Joi.object({
|
|
3770
4454
|
coupon_code: Joi.string().allow("").required(),
|
|
3771
4455
|
});
|
|
@@ -3796,10 +4480,10 @@ class CartPlatformModel {
|
|
|
3796
4480
|
email: Joi.string().allow(""),
|
|
3797
4481
|
area_code: Joi.string().allow(""),
|
|
3798
4482
|
checkout_mode: Joi.string().allow(""),
|
|
3799
|
-
meta: Joi.any(),
|
|
4483
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3800
4484
|
is_active: Joi.boolean(),
|
|
3801
4485
|
name: Joi.string().allow(""),
|
|
3802
|
-
google_map_point: Joi.any(),
|
|
4486
|
+
google_map_point: Joi.object().pattern(/\S/, Joi.any()),
|
|
3803
4487
|
cart_id: Joi.string().allow(""),
|
|
3804
4488
|
city: Joi.string().allow(""),
|
|
3805
4489
|
sector: Joi.string().allow(""),
|
|
@@ -3810,19 +4494,28 @@ class CartPlatformModel {
|
|
|
3810
4494
|
address: Joi.string().allow(""),
|
|
3811
4495
|
country_phone_code: Joi.string().allow(""),
|
|
3812
4496
|
country_iso_code: Joi.string().allow(""),
|
|
3813
|
-
_custom_json: Joi.any(),
|
|
4497
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
4498
|
+
});
|
|
4499
|
+
}
|
|
4500
|
+
|
|
4501
|
+
/** @returns {ValidationConfig} */
|
|
4502
|
+
static ValidationConfig() {
|
|
4503
|
+
return Joi.object({
|
|
4504
|
+
address_max_limit: Joi.number().required(),
|
|
4505
|
+
user_address_count: Joi.number().required(),
|
|
3814
4506
|
});
|
|
3815
4507
|
}
|
|
3816
4508
|
|
|
3817
|
-
/** @returns {
|
|
3818
|
-
static
|
|
4509
|
+
/** @returns {PlatformGetAddressesDetails} */
|
|
4510
|
+
static PlatformGetAddressesDetails() {
|
|
3819
4511
|
return Joi.object({
|
|
3820
4512
|
address: Joi.array().items(CartPlatformModel.PlatformAddress()),
|
|
4513
|
+
validation_config: CartPlatformModel.ValidationConfig(),
|
|
3821
4514
|
});
|
|
3822
4515
|
}
|
|
3823
4516
|
|
|
3824
|
-
/** @returns {
|
|
3825
|
-
static
|
|
4517
|
+
/** @returns {SaveAddressDetails} */
|
|
4518
|
+
static SaveAddressDetails() {
|
|
3826
4519
|
return Joi.object({
|
|
3827
4520
|
id: Joi.string().allow(""),
|
|
3828
4521
|
success: Joi.boolean(),
|
|
@@ -3830,8 +4523,8 @@ class CartPlatformModel {
|
|
|
3830
4523
|
});
|
|
3831
4524
|
}
|
|
3832
4525
|
|
|
3833
|
-
/** @returns {
|
|
3834
|
-
static
|
|
4526
|
+
/** @returns {UpdateAddressDetails} */
|
|
4527
|
+
static UpdateAddressDetails() {
|
|
3835
4528
|
return Joi.object({
|
|
3836
4529
|
id: Joi.string().allow(""),
|
|
3837
4530
|
is_default_address: Joi.boolean(),
|
|
@@ -3840,16 +4533,16 @@ class CartPlatformModel {
|
|
|
3840
4533
|
});
|
|
3841
4534
|
}
|
|
3842
4535
|
|
|
3843
|
-
/** @returns {
|
|
3844
|
-
static
|
|
4536
|
+
/** @returns {DeleteAddressResult} */
|
|
4537
|
+
static DeleteAddressResult() {
|
|
3845
4538
|
return Joi.object({
|
|
3846
4539
|
id: Joi.string().allow(""),
|
|
3847
4540
|
is_deleted: Joi.boolean(),
|
|
3848
4541
|
});
|
|
3849
4542
|
}
|
|
3850
4543
|
|
|
3851
|
-
/** @returns {
|
|
3852
|
-
static
|
|
4544
|
+
/** @returns {PlatformSelectCartAddress} */
|
|
4545
|
+
static PlatformSelectCartAddress() {
|
|
3853
4546
|
return Joi.object({
|
|
3854
4547
|
cart_id: Joi.string().allow(""),
|
|
3855
4548
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -3868,13 +4561,13 @@ class CartPlatformModel {
|
|
|
3868
4561
|
});
|
|
3869
4562
|
}
|
|
3870
4563
|
|
|
3871
|
-
/** @returns {
|
|
3872
|
-
static
|
|
4564
|
+
/** @returns {PlatformShipmentDetails} */
|
|
4565
|
+
static PlatformShipmentDetails() {
|
|
3873
4566
|
return Joi.object({
|
|
3874
4567
|
shipments: Joi.number(),
|
|
3875
4568
|
fulfillment_id: Joi.number(),
|
|
3876
4569
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
3877
|
-
dp_options: Joi.any().allow(null),
|
|
4570
|
+
dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
3878
4571
|
shipment_type: Joi.string().allow(""),
|
|
3879
4572
|
order_type: Joi.string().allow(""),
|
|
3880
4573
|
box_type: Joi.string().allow("").allow(null),
|
|
@@ -3885,12 +4578,12 @@ class CartPlatformModel {
|
|
|
3885
4578
|
});
|
|
3886
4579
|
}
|
|
3887
4580
|
|
|
3888
|
-
/** @returns {
|
|
3889
|
-
static
|
|
4581
|
+
/** @returns {PlatformCartShipmentsResult} */
|
|
4582
|
+
static PlatformCartShipmentsResult() {
|
|
3890
4583
|
return Joi.object({
|
|
3891
4584
|
coupon_text: Joi.string().allow(""),
|
|
3892
4585
|
id: Joi.string().allow(""),
|
|
3893
|
-
pan_config: Joi.any(),
|
|
4586
|
+
pan_config: Joi.object().pattern(/\S/, Joi.any()),
|
|
3894
4587
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3895
4588
|
comment: Joi.string().allow(""),
|
|
3896
4589
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3901,9 +4594,7 @@ class CartPlatformModel {
|
|
|
3901
4594
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
3902
4595
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
3903
4596
|
is_valid: Joi.boolean(),
|
|
3904
|
-
shipments: Joi.array().items(
|
|
3905
|
-
CartPlatformModel.PlatformShipmentResponse()
|
|
3906
|
-
),
|
|
4597
|
+
shipments: Joi.array().items(CartPlatformModel.PlatformShipmentDetails()),
|
|
3907
4598
|
currency: CartPlatformModel.CartCurrency(),
|
|
3908
4599
|
checkout_mode: Joi.string().allow(""),
|
|
3909
4600
|
last_modified: Joi.string().allow(""),
|
|
@@ -3914,7 +4605,7 @@ class CartPlatformModel {
|
|
|
3914
4605
|
),
|
|
3915
4606
|
error: Joi.boolean(),
|
|
3916
4607
|
pan_no: Joi.string().allow(""),
|
|
3917
|
-
custom_cart_meta: Joi.any(),
|
|
4608
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3918
4609
|
});
|
|
3919
4610
|
}
|
|
3920
4611
|
|
|
@@ -3927,8 +4618,8 @@ class CartPlatformModel {
|
|
|
3927
4618
|
});
|
|
3928
4619
|
}
|
|
3929
4620
|
|
|
3930
|
-
/** @returns {
|
|
3931
|
-
static
|
|
4621
|
+
/** @returns {UpdateCartShipmentCreation} */
|
|
4622
|
+
static UpdateCartShipmentCreation() {
|
|
3932
4623
|
return Joi.object({
|
|
3933
4624
|
shipments: Joi.array()
|
|
3934
4625
|
.items(CartPlatformModel.UpdateCartShipmentItem())
|
|
@@ -3936,29 +4627,29 @@ class CartPlatformModel {
|
|
|
3936
4627
|
});
|
|
3937
4628
|
}
|
|
3938
4629
|
|
|
3939
|
-
/** @returns {
|
|
3940
|
-
static
|
|
4630
|
+
/** @returns {PlatformCartMetaCreation} */
|
|
4631
|
+
static PlatformCartMetaCreation() {
|
|
3941
4632
|
return Joi.object({
|
|
3942
4633
|
gstin: Joi.string().allow(""),
|
|
3943
|
-
pick_up_customer_details: Joi.any(),
|
|
4634
|
+
pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
|
|
3944
4635
|
checkout_mode: Joi.string().allow(""),
|
|
3945
|
-
gift_details: Joi.any().allow(null),
|
|
4636
|
+
gift_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
3946
4637
|
pan_no: Joi.string().allow(""),
|
|
3947
4638
|
comment: Joi.string().allow(""),
|
|
3948
4639
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
3949
4640
|
});
|
|
3950
4641
|
}
|
|
3951
4642
|
|
|
3952
|
-
/** @returns {
|
|
3953
|
-
static
|
|
4643
|
+
/** @returns {CartMetaDetails} */
|
|
4644
|
+
static CartMetaDetails() {
|
|
3954
4645
|
return Joi.object({
|
|
3955
4646
|
is_valid: Joi.boolean(),
|
|
3956
4647
|
message: Joi.string().allow(""),
|
|
3957
4648
|
});
|
|
3958
4649
|
}
|
|
3959
4650
|
|
|
3960
|
-
/** @returns {
|
|
3961
|
-
static
|
|
4651
|
+
/** @returns {CartMetaMissingDetails} */
|
|
4652
|
+
static CartMetaMissingDetails() {
|
|
3962
4653
|
return Joi.object({
|
|
3963
4654
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
3964
4655
|
});
|
|
@@ -3992,6 +4683,53 @@ class CartPlatformModel {
|
|
|
3992
4683
|
});
|
|
3993
4684
|
}
|
|
3994
4685
|
|
|
4686
|
+
/** @returns {CartCheckoutCustomMeta} */
|
|
4687
|
+
static CartCheckoutCustomMeta() {
|
|
4688
|
+
return Joi.object({
|
|
4689
|
+
key: Joi.string().allow("").required(),
|
|
4690
|
+
value: Joi.string().allow("").required(),
|
|
4691
|
+
});
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
/** @returns {PlatformCartCheckoutDetailCreation} */
|
|
4695
|
+
static PlatformCartCheckoutDetailCreation() {
|
|
4696
|
+
return Joi.object({
|
|
4697
|
+
custom_meta: Joi.array().items(
|
|
4698
|
+
CartPlatformModel.CartCheckoutCustomMeta()
|
|
4699
|
+
),
|
|
4700
|
+
address_id: Joi.string().allow(""),
|
|
4701
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
4702
|
+
payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
4703
|
+
payment_auto_confirm: Joi.boolean(),
|
|
4704
|
+
id: Joi.string().allow("").required(),
|
|
4705
|
+
pos: Joi.boolean(),
|
|
4706
|
+
billing_address_id: Joi.string().allow(""),
|
|
4707
|
+
merchant_code: Joi.string().allow(""),
|
|
4708
|
+
aggregator: Joi.string().allow(""),
|
|
4709
|
+
pick_at_store_uid: Joi.number().allow(null),
|
|
4710
|
+
device_id: Joi.string().allow("").allow(null),
|
|
4711
|
+
delivery_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
4712
|
+
payment_mode: Joi.string().allow("").required(),
|
|
4713
|
+
checkout_mode: Joi.string().allow(""),
|
|
4714
|
+
customer_details: CartPlatformModel.CustomerDetails(),
|
|
4715
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4716
|
+
staff: CartPlatformModel.StaffCheckout(),
|
|
4717
|
+
employee_code: Joi.string().allow("").allow(null),
|
|
4718
|
+
billing_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
4719
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
4720
|
+
user_id: Joi.string().allow("").allow(null),
|
|
4721
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4722
|
+
order_type: Joi.string().allow("").required(),
|
|
4723
|
+
files: Joi.array().items(CartPlatformModel.Files()),
|
|
4724
|
+
ordering_store: Joi.number().allow(null),
|
|
4725
|
+
payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
4726
|
+
iin: Joi.string().allow(""),
|
|
4727
|
+
network: Joi.string().allow(""),
|
|
4728
|
+
type: Joi.string().allow(""),
|
|
4729
|
+
card_id: Joi.string().allow(""),
|
|
4730
|
+
});
|
|
4731
|
+
}
|
|
4732
|
+
|
|
3995
4733
|
/** @returns {CheckCart} */
|
|
3996
4734
|
static CheckCart() {
|
|
3997
4735
|
return Joi.object({
|
|
@@ -4024,15 +4762,15 @@ class CartPlatformModel {
|
|
|
4024
4762
|
gstin: Joi.string().allow(""),
|
|
4025
4763
|
cod_available: Joi.boolean(),
|
|
4026
4764
|
delivery_charges: Joi.number(),
|
|
4027
|
-
custom_cart_meta: Joi.any(),
|
|
4765
|
+
custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4028
4766
|
});
|
|
4029
4767
|
}
|
|
4030
4768
|
|
|
4031
|
-
/** @returns {
|
|
4032
|
-
static
|
|
4769
|
+
/** @returns {CartCheckoutDetails} */
|
|
4770
|
+
static CartCheckoutDetails() {
|
|
4033
4771
|
return Joi.object({
|
|
4034
4772
|
app_intercept_url: Joi.string().allow(""),
|
|
4035
|
-
data: Joi.any(),
|
|
4773
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
4036
4774
|
cart: CartPlatformModel.CheckCart(),
|
|
4037
4775
|
success: Joi.boolean(),
|
|
4038
4776
|
callback_url: Joi.string().allow(""),
|
|
@@ -4042,8 +4780,22 @@ class CartPlatformModel {
|
|
|
4042
4780
|
});
|
|
4043
4781
|
}
|
|
4044
4782
|
|
|
4045
|
-
/** @returns {
|
|
4046
|
-
static
|
|
4783
|
+
/** @returns {CartCheckoutResult} */
|
|
4784
|
+
static CartCheckoutResult() {
|
|
4785
|
+
return Joi.object({
|
|
4786
|
+
app_intercept_url: Joi.string().allow(""),
|
|
4787
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
4788
|
+
cart: CartPlatformModel.CheckCart(),
|
|
4789
|
+
success: Joi.boolean(),
|
|
4790
|
+
callback_url: Joi.string().allow(""),
|
|
4791
|
+
payment_confirm_url: Joi.string().allow(""),
|
|
4792
|
+
order_id: Joi.string().allow(""),
|
|
4793
|
+
message: Joi.string().allow(""),
|
|
4794
|
+
});
|
|
4795
|
+
}
|
|
4796
|
+
|
|
4797
|
+
/** @returns {CartDeliveryModesDetails} */
|
|
4798
|
+
static CartDeliveryModesDetails() {
|
|
4047
4799
|
return Joi.object({
|
|
4048
4800
|
pickup_stores: Joi.array().items(Joi.number()),
|
|
4049
4801
|
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
@@ -4073,15 +4825,15 @@ class CartPlatformModel {
|
|
|
4073
4825
|
});
|
|
4074
4826
|
}
|
|
4075
4827
|
|
|
4076
|
-
/** @returns {
|
|
4077
|
-
static
|
|
4828
|
+
/** @returns {StoreDetails} */
|
|
4829
|
+
static StoreDetails() {
|
|
4078
4830
|
return Joi.object({
|
|
4079
4831
|
items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
|
|
4080
4832
|
});
|
|
4081
4833
|
}
|
|
4082
4834
|
|
|
4083
|
-
/** @returns {
|
|
4084
|
-
static
|
|
4835
|
+
/** @returns {CartPaymentUpdate} */
|
|
4836
|
+
static CartPaymentUpdate() {
|
|
4085
4837
|
return Joi.object({
|
|
4086
4838
|
address_id: Joi.string().allow(""),
|
|
4087
4839
|
payment_mode: Joi.string().allow(""),
|
|
@@ -4101,6 +4853,7 @@ class CartPlatformModel {
|
|
|
4101
4853
|
display_message_en: Joi.string().allow("").allow(null),
|
|
4102
4854
|
code: Joi.string().allow("").allow(null),
|
|
4103
4855
|
discount: Joi.number(),
|
|
4856
|
+
error_en: Joi.string().allow("").allow(null),
|
|
4104
4857
|
});
|
|
4105
4858
|
}
|
|
4106
4859
|
|
|
@@ -4131,17 +4884,19 @@ class CartPlatformModel {
|
|
|
4131
4884
|
payment_meta: CartPlatformModel.PaymentMeta().required(),
|
|
4132
4885
|
amount: Joi.number().allow(null),
|
|
4133
4886
|
name: Joi.string().allow(""),
|
|
4134
|
-
payment_extra_identifiers: Joi.any(),
|
|
4887
|
+
payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
4135
4888
|
});
|
|
4136
4889
|
}
|
|
4137
4890
|
|
|
4138
|
-
/** @returns {
|
|
4139
|
-
static
|
|
4891
|
+
/** @returns {PlatformCartCheckoutDetailV2Creation} */
|
|
4892
|
+
static PlatformCartCheckoutDetailV2Creation() {
|
|
4140
4893
|
return Joi.object({
|
|
4141
4894
|
address_id: Joi.string().allow(""),
|
|
4142
4895
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
4143
|
-
payment_params: Joi.any().allow(null),
|
|
4144
|
-
custom_meta: Joi.
|
|
4896
|
+
payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
4897
|
+
custom_meta: Joi.array().items(
|
|
4898
|
+
CartPlatformModel.CartCheckoutCustomMeta()
|
|
4899
|
+
),
|
|
4145
4900
|
payment_auto_confirm: Joi.boolean(),
|
|
4146
4901
|
id: Joi.string().allow("").required(),
|
|
4147
4902
|
pos: Joi.boolean(),
|
|
@@ -4150,20 +4905,20 @@ class CartPlatformModel {
|
|
|
4150
4905
|
aggregator: Joi.string().allow(""),
|
|
4151
4906
|
pick_at_store_uid: Joi.number().allow(null),
|
|
4152
4907
|
device_id: Joi.string().allow("").allow(null),
|
|
4153
|
-
delivery_address: Joi.any(),
|
|
4908
|
+
delivery_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
4154
4909
|
payment_mode: Joi.string().allow(""),
|
|
4155
4910
|
checkout_mode: Joi.string().allow(""),
|
|
4156
|
-
customer_details:
|
|
4157
|
-
meta: Joi.any(),
|
|
4911
|
+
customer_details: CartPlatformModel.CustomerDetails(),
|
|
4912
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4158
4913
|
payment_methods: Joi.array()
|
|
4159
4914
|
.items(CartPlatformModel.PaymentMethod())
|
|
4160
4915
|
.required(),
|
|
4161
4916
|
staff: CartPlatformModel.StaffCheckout(),
|
|
4162
4917
|
employee_code: Joi.string().allow("").allow(null),
|
|
4163
|
-
billing_address: Joi.any(),
|
|
4918
|
+
billing_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
4164
4919
|
callback_url: Joi.string().allow("").allow(null),
|
|
4165
|
-
user_id: Joi.string().allow("").
|
|
4166
|
-
extra_meta: Joi.any(),
|
|
4920
|
+
user_id: Joi.string().allow("").required(),
|
|
4921
|
+
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4167
4922
|
order_type: Joi.string().allow("").required(),
|
|
4168
4923
|
files: Joi.array().items(CartPlatformModel.Files()),
|
|
4169
4924
|
ordering_store: Joi.number().allow(null),
|
|
@@ -4204,14 +4959,25 @@ class CartPlatformModel {
|
|
|
4204
4959
|
});
|
|
4205
4960
|
}
|
|
4206
4961
|
|
|
4962
|
+
/** @returns {ArticlePriceDetails} */
|
|
4963
|
+
static ArticlePriceDetails() {
|
|
4964
|
+
return Joi.object({
|
|
4965
|
+
marked: Joi.number(),
|
|
4966
|
+
effective: Joi.number(),
|
|
4967
|
+
});
|
|
4968
|
+
}
|
|
4969
|
+
|
|
4207
4970
|
/** @returns {FreeGiftItems} */
|
|
4208
4971
|
static FreeGiftItems() {
|
|
4209
4972
|
return Joi.object({
|
|
4210
4973
|
item_slug: Joi.string().allow(""),
|
|
4211
4974
|
item_name: Joi.string().allow(""),
|
|
4212
4975
|
item_price_details: CartPlatformModel.ItemPriceDetails(),
|
|
4976
|
+
article_price: CartPlatformModel.ArticlePriceDetails(),
|
|
4213
4977
|
item_brand_name: Joi.string().allow(""),
|
|
4214
4978
|
item_id: Joi.number(),
|
|
4979
|
+
available_sizes: Joi.array().items(Joi.string().allow("")),
|
|
4980
|
+
size: Joi.string().allow(""),
|
|
4215
4981
|
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
4216
4982
|
});
|
|
4217
4983
|
}
|
|
@@ -4220,7 +4986,7 @@ class CartPlatformModel {
|
|
|
4220
4986
|
static PromotionOffer() {
|
|
4221
4987
|
return Joi.object({
|
|
4222
4988
|
id: Joi.string().allow(""),
|
|
4223
|
-
buy_rules: Joi.any(),
|
|
4989
|
+
buy_rules: Joi.object().pattern(/\S/, Joi.any()),
|
|
4224
4990
|
offer_text: Joi.string().allow(""),
|
|
4225
4991
|
promotion_type: Joi.string().allow(""),
|
|
4226
4992
|
promotion_name: Joi.string().allow(""),
|
|
@@ -4229,11 +4995,12 @@ class CartPlatformModel {
|
|
|
4229
4995
|
discount_rules: Joi.array().items(Joi.any()),
|
|
4230
4996
|
free_gift_items: Joi.array().items(CartPlatformModel.FreeGiftItems()),
|
|
4231
4997
|
description: Joi.string().allow(""),
|
|
4998
|
+
is_bank_offer: Joi.boolean(),
|
|
4232
4999
|
});
|
|
4233
5000
|
}
|
|
4234
5001
|
|
|
4235
|
-
/** @returns {
|
|
4236
|
-
static
|
|
5002
|
+
/** @returns {PromotionOffersDetails} */
|
|
5003
|
+
static PromotionOffersDetails() {
|
|
4237
5004
|
return Joi.object({
|
|
4238
5005
|
available_promotions: Joi.array().items(
|
|
4239
5006
|
CartPlatformModel.PromotionOffer()
|
|
@@ -4257,12 +5024,20 @@ class CartPlatformModel {
|
|
|
4257
5024
|
});
|
|
4258
5025
|
}
|
|
4259
5026
|
|
|
4260
|
-
/** @returns {
|
|
4261
|
-
static
|
|
5027
|
+
/** @returns {PromotionPaymentOffersDetails} */
|
|
5028
|
+
static PromotionPaymentOffersDetails() {
|
|
4262
5029
|
return Joi.object({
|
|
4263
5030
|
success: Joi.boolean(),
|
|
4264
5031
|
promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
|
|
4265
5032
|
});
|
|
4266
5033
|
}
|
|
5034
|
+
|
|
5035
|
+
/** @returns {ValidationError} */
|
|
5036
|
+
static ValidationError() {
|
|
5037
|
+
return Joi.object({
|
|
5038
|
+
message: Joi.string().allow("").required(),
|
|
5039
|
+
field: Joi.string().allow("").required(),
|
|
5040
|
+
});
|
|
5041
|
+
}
|
|
4267
5042
|
}
|
|
4268
5043
|
module.exports = CartPlatformModel;
|