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