@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.2
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 +53 -60
- package/sdk/application/Cart/CartApplicationClient.js +53 -130
- package/sdk/application/Cart/CartApplicationModel.d.ts +143 -489
- package/sdk/application/Cart/CartApplicationModel.js +159 -380
- package/sdk/application/Cart/CartApplicationValidator.d.ts +19 -38
- package/sdk/application/Cart/CartApplicationValidator.js +18 -34
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +68 -88
- package/sdk/application/Catalog/CatalogApplicationClient.js +94 -114
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +142 -194
- package/sdk/application/Catalog/CatalogApplicationModel.js +133 -171
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -3
- package/sdk/application/Common/CommonApplicationClient.js +5 -6
- package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
- package/sdk/application/Common/CommonApplicationModel.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +27 -34
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +27 -34
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +57 -45
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +47 -35
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +33 -23
- package/sdk/application/Content/ContentApplicationClient.js +75 -54
- package/sdk/application/Content/ContentApplicationModel.d.ts +37 -93
- package/sdk/application/Content/ContentApplicationModel.js +32 -83
- package/sdk/application/Content/ContentApplicationValidator.d.ts +17 -23
- package/sdk/application/Content/ContentApplicationValidator.js +10 -15
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -9
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +13 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +25 -23
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +18 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -2
- package/sdk/application/Lead/LeadApplicationClient.js +3 -2
- package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
- package/sdk/application/Lead/LeadApplicationModel.js +19 -19
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +21 -189
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +173 -532
- package/sdk/application/Logistic/LogisticApplicationModel.js +139 -409
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +9 -54
- package/sdk/application/Logistic/LogisticApplicationValidator.js +8 -42
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -24
- package/sdk/application/Order/OrderApplicationClient.js +13 -96
- package/sdk/application/Order/OrderApplicationModel.d.ts +120 -436
- package/sdk/application/Order/OrderApplicationModel.js +81 -279
- package/sdk/application/Order/OrderApplicationValidator.d.ts +3 -17
- package/sdk/application/Order/OrderApplicationValidator.js +2 -15
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +99 -96
- package/sdk/application/Payment/PaymentApplicationClient.js +114 -111
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +289 -293
- package/sdk/application/Payment/PaymentApplicationModel.js +241 -243
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +22 -19
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
- package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
- package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
- package/sdk/application/Share/ShareApplicationModel.js +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +6 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +17 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +22 -42
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +3 -16
- package/sdk/application/Theme/ThemeApplicationValidator.js +2 -9
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +10 -10
- package/sdk/application/User/UserApplicationModel.d.ts +17 -17
- package/sdk/application/User/UserApplicationModel.js +16 -16
- package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
- package/sdk/application/User/UserApplicationValidator.js +2 -2
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +9 -11
- package/sdk/application/Webhook/WebhookApplicationModel.js +6 -8
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
- package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
- package/sdk/application/index.d.ts +0 -1
- package/sdk/application/index.js +0 -2
- 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 +85 -767
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
- 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 +112 -407
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1321 -4975
- package/sdk/platform/Cart/CartPlatformModel.js +1226 -1922
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
- package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1751 -1501
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1224 -1393
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- 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 +124 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +94 -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 +4 -15
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -83
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -25
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -16
- package/sdk/platform/Order/OrderPlatformClient.d.ts +97 -178
- package/sdk/platform/Order/OrderPlatformClient.js +245 -597
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3071 -5449
- package/sdk/platform/Order/OrderPlatformModel.js +1656 -3501
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +190 -237
- package/sdk/platform/Order/OrderPlatformValidator.js +105 -153
- 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 +106 -94
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
- package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
- package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
- 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 +35 -45
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +64 -58
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +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 -36
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
- package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
- package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
|
@@ -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,51 +587,55 @@ 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
|
|
755
594
|
* authenticated
|
|
756
595
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
757
|
-
* @property {
|
|
758
|
-
*
|
|
596
|
+
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
597
|
+
* type price adjustment.
|
|
598
|
+
* @property {Object} [meta]
|
|
599
|
+
* @property {string} cart_id - The ID of the cart
|
|
759
600
|
*/
|
|
760
601
|
|
|
761
602
|
/**
|
|
762
603
|
* @typedef PriceAdjustment
|
|
763
|
-
* @property {number} value
|
|
604
|
+
* @property {number} value
|
|
764
605
|
* @property {string} message - The message associated with the price adjustment
|
|
765
606
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
766
|
-
* @property {PriceAdjustmentRestrictions} [restrictions] - This field
|
|
767
|
-
* the restrictions
|
|
768
|
-
* 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
|
|
769
610
|
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
770
611
|
* distribution should is done at the article level
|
|
771
|
-
* @property {string} [id]
|
|
612
|
+
* @property {string} [id]
|
|
772
613
|
* @property {Collection} collection
|
|
773
|
-
* @property {string} type - Type of price adjusment
|
|
614
|
+
* @property {string} type - Type of price adjusment
|
|
774
615
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
775
|
-
* allowed (default: False)
|
|
616
|
+
* allowed (default: False)
|
|
776
617
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
777
618
|
* authenticated
|
|
778
619
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
779
|
-
* @property {
|
|
780
|
-
*
|
|
620
|
+
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
621
|
+
* type price adjustment.
|
|
622
|
+
* @property {Object} [meta]
|
|
623
|
+
* @property {string} cart_id - The ID of the cart
|
|
781
624
|
*/
|
|
782
625
|
|
|
783
626
|
/**
|
|
784
|
-
* @typedef
|
|
627
|
+
* @typedef PriceAdjustmentResponse
|
|
785
628
|
* @property {PriceAdjustment} [data]
|
|
786
629
|
*/
|
|
787
630
|
|
|
788
631
|
/**
|
|
789
|
-
* @typedef
|
|
632
|
+
* @typedef GetPriceAdjustmentResponse
|
|
790
633
|
* @property {PriceAdjustment[]} [data]
|
|
791
634
|
*/
|
|
792
635
|
|
|
793
636
|
/**
|
|
794
637
|
* @typedef PriceAdjustmentAdd
|
|
795
|
-
* @property {number} value
|
|
638
|
+
* @property {number} value
|
|
796
639
|
* @property {string} message - The message associated with the price adjustment
|
|
797
640
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
798
641
|
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
@@ -808,110 +651,100 @@ const Joi = require("joi");
|
|
|
808
651
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
809
652
|
* authenticated
|
|
810
653
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
811
|
-
* @property {Object} [meta]
|
|
812
|
-
* @property {string} cart_id -
|
|
654
|
+
* @property {Object} [meta]
|
|
655
|
+
* @property {string} cart_id - The ID of the cart
|
|
656
|
+
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
657
|
+
* type price adjustment.
|
|
813
658
|
*/
|
|
814
659
|
|
|
815
660
|
/**
|
|
816
661
|
* @typedef CartItem
|
|
817
|
-
* @property {number} [quantity]
|
|
818
|
-
* @property {string} product_id
|
|
819
|
-
* @property {string} size
|
|
662
|
+
* @property {number} [quantity]
|
|
663
|
+
* @property {string} product_id
|
|
664
|
+
* @property {string} size
|
|
820
665
|
*/
|
|
821
666
|
|
|
822
667
|
/**
|
|
823
|
-
* @typedef
|
|
824
|
-
* @property {CartItem[]} cart_items
|
|
668
|
+
* @typedef OpenapiCartDetailsRequest
|
|
669
|
+
* @property {CartItem[]} cart_items
|
|
825
670
|
*/
|
|
826
671
|
|
|
827
672
|
/**
|
|
828
673
|
* @typedef CouponBreakup
|
|
829
|
-
* @property {string} [title]
|
|
830
|
-
*
|
|
831
|
-
* @property {number} [
|
|
832
|
-
*
|
|
833
|
-
* @property {
|
|
834
|
-
* @property {
|
|
835
|
-
*
|
|
836
|
-
* @property {
|
|
837
|
-
* @property {string} [
|
|
838
|
-
* @property {string} [
|
|
839
|
-
*
|
|
840
|
-
* @property {
|
|
841
|
-
* @property {string} [
|
|
842
|
-
* @property {string} [type] - Type of the coupon applied to cart
|
|
843
|
-
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
844
|
-
* applied to cart
|
|
845
|
-
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
846
|
-
* @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]
|
|
847
687
|
*/
|
|
848
688
|
|
|
849
689
|
/**
|
|
850
690
|
* @typedef DisplayBreakup
|
|
851
|
-
* @property {string} [key]
|
|
852
|
-
* @property {number} [value]
|
|
853
|
-
* @property {string} [currency_code]
|
|
854
|
-
* @property {string} [currency_symbol]
|
|
855
|
-
* @property {string} [display]
|
|
856
|
-
* @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]
|
|
857
697
|
*/
|
|
858
698
|
|
|
859
699
|
/**
|
|
860
700
|
* @typedef LoyaltyPoints
|
|
861
|
-
* @property {boolean} [is_applied]
|
|
862
|
-
* @property {number} [total]
|
|
863
|
-
* @property {number} [applicable]
|
|
864
|
-
*
|
|
865
|
-
* @property {string} [description] - Description for loyalty points
|
|
701
|
+
* @property {boolean} [is_applied]
|
|
702
|
+
* @property {number} [total]
|
|
703
|
+
* @property {number} [applicable]
|
|
704
|
+
* @property {string} [description]
|
|
866
705
|
*/
|
|
867
706
|
|
|
868
707
|
/**
|
|
869
708
|
* @typedef RawBreakup
|
|
870
|
-
* @property {number} [coupon]
|
|
871
|
-
* @property {number} [gst_charges]
|
|
872
|
-
* @property {number} [mrp_total]
|
|
873
|
-
* @property {number} [fynd_cash]
|
|
874
|
-
* @property {number} [vog]
|
|
875
|
-
*
|
|
876
|
-
* @property {number} [
|
|
877
|
-
* @property {number} [
|
|
878
|
-
*
|
|
879
|
-
* @property {number} [
|
|
880
|
-
* @property {number} [
|
|
881
|
-
* @property {number} [
|
|
882
|
-
* @property {number} [
|
|
883
|
-
* places the order
|
|
884
|
-
* @property {number} [subtotal] - Selling price amount of all products in cart
|
|
885
|
-
* @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]
|
|
886
722
|
*/
|
|
887
723
|
|
|
888
724
|
/**
|
|
889
725
|
* @typedef CartBreakup
|
|
890
726
|
* @property {CouponBreakup} [coupon]
|
|
891
|
-
* @property {DisplayBreakup[]} [display]
|
|
892
|
-
* to display the breakup to the customer like MRP total, Discount, Sub total,
|
|
893
|
-
* coupon value, promotion value and final total
|
|
727
|
+
* @property {DisplayBreakup[]} [display]
|
|
894
728
|
* @property {LoyaltyPoints} [loyalty_points]
|
|
895
729
|
* @property {RawBreakup} [raw]
|
|
896
730
|
*/
|
|
897
731
|
|
|
898
732
|
/**
|
|
899
733
|
* @typedef ProductImage
|
|
900
|
-
* @property {string} [secure_url]
|
|
901
|
-
* @property {string} [url]
|
|
902
|
-
* @property {string} [aspect_ratio]
|
|
734
|
+
* @property {string} [secure_url]
|
|
735
|
+
* @property {string} [url]
|
|
736
|
+
* @property {string} [aspect_ratio]
|
|
903
737
|
*/
|
|
904
738
|
|
|
905
739
|
/**
|
|
906
740
|
* @typedef Tags
|
|
907
|
-
* @property {Object} [tags]
|
|
908
|
-
* product in cart
|
|
741
|
+
* @property {Object} [tags]
|
|
909
742
|
*/
|
|
910
743
|
|
|
911
744
|
/**
|
|
912
745
|
* @typedef BaseInfo
|
|
913
|
-
* @property {number} [uid]
|
|
914
|
-
* @property {string} [name]
|
|
746
|
+
* @property {number} [uid]
|
|
747
|
+
* @property {string} [name]
|
|
915
748
|
*/
|
|
916
749
|
|
|
917
750
|
/**
|
|
@@ -919,62 +752,43 @@ const Joi = require("joi");
|
|
|
919
752
|
* @property {string[]} [product_slug] - Contains list of product slug
|
|
920
753
|
*/
|
|
921
754
|
|
|
922
|
-
/**
|
|
923
|
-
* @typedef ProductActionParams
|
|
924
|
-
* @property {string[]} [slug] - Unique product url name generated via product
|
|
925
|
-
* name and other meta data.
|
|
926
|
-
*/
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* @typedef ProductActionPage
|
|
930
|
-
* @property {string} [type] - Entity of page to be redirected on click
|
|
931
|
-
* @property {ProductActionParams} [params]
|
|
932
|
-
*/
|
|
933
|
-
|
|
934
755
|
/**
|
|
935
756
|
* @typedef ProductAction
|
|
936
|
-
* @property {string} [type]
|
|
937
|
-
* @property {string} [url]
|
|
757
|
+
* @property {string} [type]
|
|
758
|
+
* @property {string} [url]
|
|
938
759
|
* @property {ActionQuery} [query]
|
|
939
|
-
* @property {ProductActionPage} [page]
|
|
940
760
|
*/
|
|
941
761
|
|
|
942
762
|
/**
|
|
943
763
|
* @typedef CategoryInfo
|
|
944
|
-
* @property {number} [uid] -
|
|
945
|
-
* @property {string} [name]
|
|
764
|
+
* @property {number} [uid] - Product Category Id
|
|
765
|
+
* @property {string} [name]
|
|
946
766
|
*/
|
|
947
767
|
|
|
948
768
|
/**
|
|
949
769
|
* @typedef CartProduct
|
|
950
770
|
* @property {string} [slug] - Unique product url name generated via product
|
|
951
771
|
* name and other meta data
|
|
952
|
-
* @property {ProductImage[]} [images]
|
|
953
|
-
* like secure url, aspect ration url and url
|
|
772
|
+
* @property {ProductImage[]} [images]
|
|
954
773
|
* @property {Tags} [teaser_tag]
|
|
955
774
|
* @property {BaseInfo} [brand]
|
|
956
775
|
* @property {ProductAction} [action]
|
|
957
|
-
* @property {number} [uid]
|
|
958
|
-
* @property {string[]} [tags]
|
|
959
|
-
*
|
|
960
|
-
* @property {
|
|
961
|
-
* @property {string} [
|
|
962
|
-
* @property {string} [
|
|
963
|
-
*
|
|
964
|
-
* @property {
|
|
965
|
-
* product on platform
|
|
966
|
-
* @property {CategoryInfo[]} [categories] - Product category information which
|
|
967
|
-
* incldes category name and category id
|
|
968
|
-
* @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]
|
|
969
784
|
*/
|
|
970
785
|
|
|
971
786
|
/**
|
|
972
787
|
* @typedef BasePrice
|
|
973
|
-
* @property {number} [effective]
|
|
974
|
-
*
|
|
975
|
-
* @property {string} [
|
|
976
|
-
* @property {
|
|
977
|
-
* @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]
|
|
978
792
|
*/
|
|
979
793
|
|
|
980
794
|
/**
|
|
@@ -985,54 +799,43 @@ const Joi = require("joi");
|
|
|
985
799
|
|
|
986
800
|
/**
|
|
987
801
|
* @typedef StoreInfo
|
|
988
|
-
* @property {number} [uid]
|
|
989
|
-
*
|
|
990
|
-
* @property {string} [
|
|
991
|
-
* @property {string} [store_code] - A unique code or identifier for the store,
|
|
992
|
-
* often used for internal reference
|
|
802
|
+
* @property {number} [uid]
|
|
803
|
+
* @property {string} [name]
|
|
804
|
+
* @property {string} [store_code]
|
|
993
805
|
*/
|
|
994
806
|
|
|
995
807
|
/**
|
|
996
808
|
* @typedef ProductArticle
|
|
997
|
-
* @property {string} [seller_identifier]
|
|
998
|
-
*
|
|
999
|
-
* @property {number} [quantity] - Quantity of the article added in cart
|
|
809
|
+
* @property {string} [seller_identifier]
|
|
810
|
+
* @property {number} [quantity]
|
|
1000
811
|
* @property {BaseInfo} [seller]
|
|
1001
|
-
* @property {Object} [cart_item_meta]
|
|
1002
|
-
* @property {Object} [parent_item_identifiers]
|
|
1003
|
-
*
|
|
1004
|
-
* @property {
|
|
1005
|
-
*
|
|
1006
|
-
* @property {string} [
|
|
1007
|
-
*
|
|
1008
|
-
* @property {
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
* @property {
|
|
1012
|
-
* for the product grouping.
|
|
1013
|
-
* @property {Object} [identifier] - Unique identifier of the article
|
|
1014
|
-
* @property {number} [mto_quantity] - Quantity of the product which will
|
|
1015
|
-
* specially manufactured as not available in stock
|
|
1016
|
-
* @property {Object} [extra_meta] - Field to update extra meta of the article in cart
|
|
1017
|
-
* @property {string} [type] - Type of the data sent in response. Possible value
|
|
1018
|
-
* is article
|
|
1019
|
-
* @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]
|
|
1020
823
|
* @property {ArticlePriceInfo} [price]
|
|
1021
|
-
* @property {Object} [meta]
|
|
1022
|
-
* @property {string} [size]
|
|
824
|
+
* @property {Object} [meta]
|
|
825
|
+
* @property {string} [size]
|
|
1023
826
|
* @property {StoreInfo} [store]
|
|
1024
827
|
* @property {string[]} [tags] - A list of article tags
|
|
1025
828
|
*/
|
|
1026
829
|
|
|
1027
830
|
/**
|
|
1028
831
|
* @typedef Ownership2
|
|
1029
|
-
* @property {string} [payable_category] -
|
|
1030
|
-
* @property {string} [payable_by] -
|
|
832
|
+
* @property {string} [payable_category] - Promo amount payable category
|
|
833
|
+
* @property {string} [payable_by] - Promo amount bearable party
|
|
1031
834
|
*/
|
|
1032
835
|
|
|
1033
836
|
/**
|
|
1034
837
|
* @typedef DiscountRulesApp
|
|
1035
|
-
* @property {Object} [offer] - Offer
|
|
838
|
+
* @property {Object} [offer] - Offer for promotion
|
|
1036
839
|
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
1037
840
|
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
1038
841
|
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
@@ -1041,10 +844,9 @@ const Joi = require("joi");
|
|
|
1041
844
|
/**
|
|
1042
845
|
* @typedef AppliedFreeArticles
|
|
1043
846
|
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
1044
|
-
* @property {number} [quantity] - Free article quantity
|
|
1045
|
-
* @property {string} [article_id] -
|
|
847
|
+
* @property {number} [quantity] - Free article quantity
|
|
848
|
+
* @property {string} [article_id] - Free article id
|
|
1046
849
|
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
|
|
1047
|
-
* in promotion
|
|
1048
850
|
*/
|
|
1049
851
|
|
|
1050
852
|
/**
|
|
@@ -1070,15 +872,15 @@ const Joi = require("joi");
|
|
|
1070
872
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
1071
873
|
* product MRP or ESP
|
|
1072
874
|
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
1073
|
-
* @property {string} [promo_id] - Promotion
|
|
875
|
+
* @property {string} [promo_id] - Promotion id
|
|
1074
876
|
* @property {Object} [meta] - Meta object for extra data
|
|
1075
|
-
* @property {string} [code] - Promotion
|
|
877
|
+
* @property {string} [code] - Promotion code
|
|
1076
878
|
*/
|
|
1077
879
|
|
|
1078
880
|
/**
|
|
1079
881
|
* @typedef PromiseFormatted
|
|
1080
|
-
* @property {string} [max]
|
|
1081
|
-
* @property {string} [min]
|
|
882
|
+
* @property {string} [max]
|
|
883
|
+
* @property {string} [min]
|
|
1082
884
|
*/
|
|
1083
885
|
|
|
1084
886
|
/**
|
|
@@ -1089,8 +891,8 @@ const Joi = require("joi");
|
|
|
1089
891
|
|
|
1090
892
|
/**
|
|
1091
893
|
* @typedef PromiseTimestamp
|
|
1092
|
-
* @property {number} [max]
|
|
1093
|
-
* @property {number} [min]
|
|
894
|
+
* @property {number} [max]
|
|
895
|
+
* @property {number} [min]
|
|
1094
896
|
*/
|
|
1095
897
|
|
|
1096
898
|
/**
|
|
@@ -1102,23 +904,19 @@ const Joi = require("joi");
|
|
|
1102
904
|
|
|
1103
905
|
/**
|
|
1104
906
|
* @typedef CouponDetails
|
|
1105
|
-
* @property {number} [discount_total_quantity]
|
|
1106
|
-
*
|
|
1107
|
-
* @property {
|
|
1108
|
-
* coupon for single quantity of the product
|
|
1109
|
-
* @property {string} [code] - Coupon code of the coupon applied
|
|
907
|
+
* @property {number} [discount_total_quantity]
|
|
908
|
+
* @property {number} [discount_single_quantity]
|
|
909
|
+
* @property {string} [code]
|
|
1110
910
|
*/
|
|
1111
911
|
|
|
1112
912
|
/**
|
|
1113
913
|
* @typedef ProductPrice
|
|
1114
|
-
* @property {number} [marked]
|
|
1115
|
-
* @property {number} [add_on]
|
|
1116
|
-
*
|
|
1117
|
-
* @property {string} [
|
|
1118
|
-
* @property {
|
|
1119
|
-
*
|
|
1120
|
-
* @property {number} [effective] - Selling price of the product
|
|
1121
|
-
* @property {number} [selling] - Selling price of the product
|
|
914
|
+
* @property {number} [marked]
|
|
915
|
+
* @property {number} [add_on]
|
|
916
|
+
* @property {string} [currency_code]
|
|
917
|
+
* @property {string} [currency_symbol]
|
|
918
|
+
* @property {number} [effective]
|
|
919
|
+
* @property {number} [selling]
|
|
1122
920
|
*/
|
|
1123
921
|
|
|
1124
922
|
/**
|
|
@@ -1134,259 +932,226 @@ const Joi = require("joi");
|
|
|
1134
932
|
|
|
1135
933
|
/**
|
|
1136
934
|
* @typedef ProductAvailabilitySize
|
|
1137
|
-
* @property {string} [display]
|
|
1138
|
-
* @property {string} [value]
|
|
1139
|
-
* @property {boolean} [is_available]
|
|
1140
|
-
* product if that is available
|
|
935
|
+
* @property {string} [display]
|
|
936
|
+
* @property {string} [value]
|
|
937
|
+
* @property {boolean} [is_available]
|
|
1141
938
|
*/
|
|
1142
939
|
|
|
1143
940
|
/**
|
|
1144
941
|
* @typedef ProductAvailability
|
|
1145
|
-
* @property {boolean} [is_valid]
|
|
1146
|
-
*
|
|
1147
|
-
* @property {
|
|
1148
|
-
*
|
|
1149
|
-
* @property {boolean} [
|
|
1150
|
-
*
|
|
1151
|
-
* @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability
|
|
1152
|
-
* @property {boolean} [out_of_stock] - Denotes if the product is available in stock
|
|
1153
|
-
* @property {string[]} [sizes] - All sizes of the product
|
|
942
|
+
* @property {boolean} [is_valid]
|
|
943
|
+
* @property {number} [other_store_quantity]
|
|
944
|
+
* @property {boolean} [deliverable]
|
|
945
|
+
* @property {ProductAvailabilitySize[]} [available_sizes]
|
|
946
|
+
* @property {boolean} [out_of_stock]
|
|
947
|
+
* @property {string[]} [sizes]
|
|
1154
948
|
*/
|
|
1155
949
|
|
|
1156
950
|
/**
|
|
1157
951
|
* @typedef PromoMeta
|
|
1158
|
-
* @property {string} [message]
|
|
1159
|
-
* loyalty points and applied and how much left with the user
|
|
952
|
+
* @property {string} [message]
|
|
1160
953
|
*/
|
|
1161
954
|
|
|
1162
955
|
/**
|
|
1163
956
|
* @typedef CartProductInfo
|
|
1164
|
-
* @property {number} [quantity]
|
|
957
|
+
* @property {number} [quantity]
|
|
1165
958
|
* @property {CartProduct} [product]
|
|
1166
|
-
* @property {string} [product_ean_id]
|
|
1167
|
-
*
|
|
1168
|
-
* @property {
|
|
1169
|
-
* product which identifies the parent of the product in cart
|
|
1170
|
-
* @property {boolean} [is_set] - Whether or not the product is a set of items
|
|
959
|
+
* @property {string} [product_ean_id]
|
|
960
|
+
* @property {Object} [parent_item_identifiers]
|
|
961
|
+
* @property {boolean} [is_set]
|
|
1171
962
|
* @property {ProductArticle} [article]
|
|
1172
|
-
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1173
|
-
* promotion for the product in cart
|
|
963
|
+
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1174
964
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1175
|
-
* @property {string} [key]
|
|
965
|
+
* @property {string} [key]
|
|
1176
966
|
* @property {CouponDetails} [coupon]
|
|
1177
|
-
* @property {Object} [bulk_offer]
|
|
1178
|
-
* which denotes if any bulk offer is applied to the product in cart
|
|
967
|
+
* @property {Object} [bulk_offer]
|
|
1179
968
|
* @property {ProductPriceInfo} [price]
|
|
1180
|
-
* @property {string} [coupon_message]
|
|
1181
|
-
* coupon is applied and empty if not applied
|
|
969
|
+
* @property {string} [coupon_message]
|
|
1182
970
|
* @property {CartProductIdentifer} identifiers
|
|
1183
|
-
* @property {string} [message]
|
|
1184
|
-
*
|
|
1185
|
-
* @property {string} [discount] - Discount amount of the product in cart
|
|
971
|
+
* @property {string} [message]
|
|
972
|
+
* @property {string} [discount]
|
|
1186
973
|
* @property {ProductAvailability} [availability]
|
|
1187
|
-
* @property {Object} [moq]
|
|
1188
|
-
* of a product, e.g. 100.
|
|
974
|
+
* @property {Object} [moq]
|
|
1189
975
|
* @property {ProductPriceInfo} [price_per_unit]
|
|
1190
976
|
* @property {PromoMeta} [promo_meta]
|
|
1191
|
-
* @property {Object} [custom_order]
|
|
977
|
+
* @property {Object} [custom_order]
|
|
1192
978
|
*/
|
|
1193
979
|
|
|
1194
980
|
/**
|
|
1195
|
-
* @typedef
|
|
1196
|
-
* @property {boolean} [is_valid]
|
|
1197
|
-
*
|
|
1198
|
-
* @property {string} [message] - Message of the cart Open API cart detail response
|
|
981
|
+
* @typedef OpenapiCartDetailsResponse
|
|
982
|
+
* @property {boolean} [is_valid]
|
|
983
|
+
* @property {string} [message]
|
|
1199
984
|
* @property {CartBreakup} [breakup_values]
|
|
1200
|
-
* @property {CartProductInfo[]} [items]
|
|
985
|
+
* @property {CartProductInfo[]} [items]
|
|
1201
986
|
*/
|
|
1202
987
|
|
|
1203
988
|
/**
|
|
1204
|
-
* @typedef
|
|
1205
|
-
* @property {boolean} [success]
|
|
1206
|
-
* @property {string} [message]
|
|
989
|
+
* @typedef OpenApiErrorResponse
|
|
990
|
+
* @property {boolean} [success]
|
|
991
|
+
* @property {string} [message]
|
|
1207
992
|
* @property {Object} [errors] - Contains field name which has error as key and
|
|
1208
993
|
* error message as value
|
|
1209
994
|
*/
|
|
1210
995
|
|
|
1211
996
|
/**
|
|
1212
997
|
* @typedef ShippingAddress
|
|
1213
|
-
* @property {string} [country]
|
|
1214
|
-
* @property {string} [state]
|
|
1215
|
-
* @property {string} [city]
|
|
1216
|
-
* @property {number} [phone]
|
|
1217
|
-
* @property {string} area_code
|
|
1218
|
-
* @property {string} [country_iso_code]
|
|
1219
|
-
* @property {string} [country_phone_code]
|
|
1220
|
-
* @property {Object} [meta]
|
|
1221
|
-
* @property {string} [address_type]
|
|
1222
|
-
* @property {string} [area]
|
|
1223
|
-
* @property {string} [area_code_slug]
|
|
1224
|
-
*
|
|
1225
|
-
* @property {string} [
|
|
1226
|
-
* @property {string} [
|
|
1227
|
-
* @property {string} [
|
|
1228
|
-
* @property {
|
|
1229
|
-
* @property {
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
* @
|
|
1235
|
-
* @property {CartItem[]} cart_items - List of items in open api cart response
|
|
998
|
+
* @property {string} [country]
|
|
999
|
+
* @property {string} [state]
|
|
1000
|
+
* @property {string} [city]
|
|
1001
|
+
* @property {number} [phone]
|
|
1002
|
+
* @property {string} area_code
|
|
1003
|
+
* @property {string} [country_iso_code]
|
|
1004
|
+
* @property {string} [country_phone_code]
|
|
1005
|
+
* @property {Object} [meta]
|
|
1006
|
+
* @property {string} [address_type]
|
|
1007
|
+
* @property {string} [area]
|
|
1008
|
+
* @property {string} [area_code_slug]
|
|
1009
|
+
* @property {string} [name]
|
|
1010
|
+
* @property {string} [landmark]
|
|
1011
|
+
* @property {string} [email]
|
|
1012
|
+
* @property {string} [country_code]
|
|
1013
|
+
* @property {number} [pincode]
|
|
1014
|
+
* @property {string} [address]
|
|
1015
|
+
*/
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* @typedef OpenApiCartServiceabilityRequest
|
|
1019
|
+
* @property {CartItem[]} cart_items
|
|
1236
1020
|
* @property {ShippingAddress} shipping_address
|
|
1237
1021
|
*/
|
|
1238
1022
|
|
|
1239
1023
|
/**
|
|
1240
|
-
* @typedef
|
|
1241
|
-
* @property {boolean} [is_valid]
|
|
1242
|
-
*
|
|
1243
|
-
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
1244
|
-
* includes item id, item size, store id, available sizes and rest of the item
|
|
1245
|
-
* related data
|
|
1024
|
+
* @typedef OpenApiCartServiceabilityResponse
|
|
1025
|
+
* @property {boolean} [is_valid]
|
|
1026
|
+
* @property {CartProductInfo[]} [items]
|
|
1246
1027
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1247
|
-
* @property {string} [message]
|
|
1028
|
+
* @property {string} [message]
|
|
1248
1029
|
* @property {CartBreakup} [breakup_values]
|
|
1249
1030
|
*/
|
|
1250
1031
|
|
|
1251
1032
|
/**
|
|
1252
1033
|
* @typedef OpenApiFiles
|
|
1253
|
-
* @property {string} key
|
|
1254
|
-
* @property {string[]} values
|
|
1034
|
+
* @property {string} key
|
|
1035
|
+
* @property {string[]} values
|
|
1255
1036
|
*/
|
|
1256
1037
|
|
|
1257
1038
|
/**
|
|
1258
1039
|
* @typedef CartItemMeta
|
|
1259
|
-
* @property {boolean} [primary_item]
|
|
1260
|
-
* @property {string} [group_id]
|
|
1040
|
+
* @property {boolean} [primary_item]
|
|
1041
|
+
* @property {string} [group_id]
|
|
1261
1042
|
*/
|
|
1262
1043
|
|
|
1263
1044
|
/**
|
|
1264
1045
|
* @typedef MultiTenderPaymentMeta
|
|
1265
|
-
* @property {string} [payment_id]
|
|
1266
|
-
* @property {string} [payment_gateway]
|
|
1267
|
-
* @property {Object} [extra_meta]
|
|
1268
|
-
*
|
|
1269
|
-
* @property {string} [
|
|
1270
|
-
* @property {string} [order_id] - Payment gateway order id
|
|
1046
|
+
* @property {string} [payment_id]
|
|
1047
|
+
* @property {string} [payment_gateway]
|
|
1048
|
+
* @property {Object} [extra_meta]
|
|
1049
|
+
* @property {string} [current_status]
|
|
1050
|
+
* @property {string} [order_id]
|
|
1271
1051
|
*/
|
|
1272
1052
|
|
|
1273
1053
|
/**
|
|
1274
1054
|
* @typedef MultiTenderPaymentMethod
|
|
1275
|
-
* @property {string} mode
|
|
1276
|
-
* @property {number} amount -
|
|
1055
|
+
* @property {string} mode
|
|
1056
|
+
* @property {number} amount - Payment amount
|
|
1277
1057
|
* @property {MultiTenderPaymentMeta} [meta]
|
|
1278
|
-
* @property {string} [name] -
|
|
1058
|
+
* @property {string} [name] - Payment mode name
|
|
1279
1059
|
*/
|
|
1280
1060
|
|
|
1281
1061
|
/**
|
|
1282
1062
|
* @typedef OpenApiOrderItem
|
|
1283
|
-
* @property {number} cashback_applied
|
|
1284
|
-
* @property {number} [quantity]
|
|
1285
|
-
* @property {string} size
|
|
1286
|
-
* @property {number} coupon_effective_discount
|
|
1287
|
-
*
|
|
1288
|
-
* @property {number}
|
|
1289
|
-
* @property {number}
|
|
1290
|
-
* @property {
|
|
1291
|
-
* @property {OpenApiFiles[]} [files] - List of file url
|
|
1063
|
+
* @property {number} cashback_applied
|
|
1064
|
+
* @property {number} [quantity]
|
|
1065
|
+
* @property {string} size
|
|
1066
|
+
* @property {number} coupon_effective_discount
|
|
1067
|
+
* @property {number} amount_paid
|
|
1068
|
+
* @property {number} delivery_charges
|
|
1069
|
+
* @property {number} price_marked
|
|
1070
|
+
* @property {OpenApiFiles[]} [files]
|
|
1292
1071
|
* @property {CartItemMeta} [meta]
|
|
1293
|
-
* @property {Object} [extra_meta]
|
|
1294
|
-
* @property {number} product_id
|
|
1295
|
-
* @property {number} [loyalty_discount]
|
|
1296
|
-
* @property {number} discount
|
|
1297
|
-
* @property {number} price_effective
|
|
1298
|
-
*
|
|
1299
|
-
* @property {
|
|
1300
|
-
*
|
|
1301
|
-
* @property {number} [employee_discount] - Employee discount value applied on
|
|
1302
|
-
* article in cart
|
|
1303
|
-
* @property {number} cod_charges - Cash On Delivery charges applied on article in cart
|
|
1072
|
+
* @property {Object} [extra_meta]
|
|
1073
|
+
* @property {number} product_id
|
|
1074
|
+
* @property {number} [loyalty_discount]
|
|
1075
|
+
* @property {number} discount
|
|
1076
|
+
* @property {number} price_effective
|
|
1077
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1078
|
+
* @property {number} [employee_discount]
|
|
1079
|
+
* @property {number} cod_charges
|
|
1304
1080
|
*/
|
|
1305
1081
|
|
|
1306
1082
|
/**
|
|
1307
1083
|
* @typedef OpenApiPlatformCheckoutReq
|
|
1308
|
-
* @property {string} [payment_mode]
|
|
1309
|
-
*
|
|
1310
|
-
* @property {
|
|
1311
|
-
* @property {OpenApiOrderItem[]} cart_items - List of items in user cart
|
|
1084
|
+
* @property {string} [payment_mode]
|
|
1085
|
+
* @property {number} cart_value
|
|
1086
|
+
* @property {OpenApiOrderItem[]} cart_items
|
|
1312
1087
|
* @property {ShippingAddress} [shipping_address]
|
|
1313
|
-
* @property {number} [loyalty_discount]
|
|
1314
|
-
* @property {string} [comment]
|
|
1315
|
-
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1316
|
-
*
|
|
1317
|
-
* @property {
|
|
1318
|
-
* @property {
|
|
1319
|
-
* @property {
|
|
1320
|
-
* @property {string} [gstin] - GSTIN number added in cart
|
|
1088
|
+
* @property {number} [loyalty_discount]
|
|
1089
|
+
* @property {string} [comment]
|
|
1090
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1091
|
+
* @property {Object} [employee_discount]
|
|
1092
|
+
* @property {string} [coupon]
|
|
1093
|
+
* @property {number} cashback_applied
|
|
1094
|
+
* @property {string} [gstin]
|
|
1321
1095
|
* @property {ShippingAddress} billing_address
|
|
1322
|
-
* @property {string} coupon_code
|
|
1323
|
-
* @property {number} coupon_value
|
|
1324
|
-
* @property {number} delivery_charges
|
|
1325
|
-
*
|
|
1326
|
-
* @property {string} [
|
|
1327
|
-
* @property {string} [
|
|
1328
|
-
* @property {
|
|
1329
|
-
* @property {
|
|
1330
|
-
* @property {number} cod_charges - Cash On Delivery charges of the user cart
|
|
1096
|
+
* @property {string} coupon_code
|
|
1097
|
+
* @property {number} coupon_value
|
|
1098
|
+
* @property {number} delivery_charges
|
|
1099
|
+
* @property {string} [affiliate_order_id]
|
|
1100
|
+
* @property {string} [currency_code]
|
|
1101
|
+
* @property {string} [order_id]
|
|
1102
|
+
* @property {OpenApiFiles[]} [files]
|
|
1103
|
+
* @property {number} cod_charges
|
|
1331
1104
|
*/
|
|
1332
1105
|
|
|
1333
1106
|
/**
|
|
1334
|
-
* @typedef
|
|
1335
|
-
* @property {boolean} [success]
|
|
1336
|
-
* @property {string} [message]
|
|
1107
|
+
* @typedef OpenApiCheckoutResponse
|
|
1108
|
+
* @property {boolean} [success]
|
|
1109
|
+
* @property {string} [message]
|
|
1337
1110
|
* @property {string} [order_ref_id] - Order id sent in request
|
|
1338
1111
|
* @property {string} order_id - Fynd order id
|
|
1339
1112
|
*/
|
|
1340
1113
|
|
|
1341
1114
|
/**
|
|
1342
1115
|
* @typedef AbandonedCart
|
|
1343
|
-
* @property {string} expire_at
|
|
1344
|
-
* @property {Object} [promotion]
|
|
1345
|
-
*
|
|
1346
|
-
* @property {
|
|
1347
|
-
* @property {
|
|
1348
|
-
* @property {Object[]
|
|
1349
|
-
* @property {
|
|
1350
|
-
*
|
|
1351
|
-
* @property {
|
|
1352
|
-
*
|
|
1353
|
-
* @property {string}
|
|
1354
|
-
* @property {
|
|
1355
|
-
* @property {
|
|
1356
|
-
* @property {
|
|
1357
|
-
* @property {
|
|
1358
|
-
* @property {Object} [
|
|
1359
|
-
* @property {Object} [
|
|
1360
|
-
* @property {
|
|
1361
|
-
*
|
|
1362
|
-
* @property {
|
|
1363
|
-
*
|
|
1364
|
-
* @property {
|
|
1365
|
-
*
|
|
1366
|
-
* @property {
|
|
1367
|
-
* @property {
|
|
1368
|
-
* @property {
|
|
1369
|
-
* @property {
|
|
1370
|
-
* @property {
|
|
1371
|
-
* @property {string}
|
|
1372
|
-
* @property {Object} [
|
|
1373
|
-
* @property {boolean} [
|
|
1374
|
-
*
|
|
1375
|
-
* @property {
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
* @
|
|
1380
|
-
* @property {
|
|
1381
|
-
* @property {
|
|
1382
|
-
* @property {string} user_id - User Id of user cart
|
|
1383
|
-
* @property {string} [app_id] - Application id of user cart
|
|
1384
|
-
*/
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* @typedef AbandonedCartResult
|
|
1388
|
-
* @property {AbandonedCart[]} [items] - List of items in abandon cart
|
|
1389
|
-
* @property {Object} [result] - Define the list of items with updated status
|
|
1116
|
+
* @property {string} expire_at
|
|
1117
|
+
* @property {Object} [promotion]
|
|
1118
|
+
* @property {boolean} is_default
|
|
1119
|
+
* @property {string} [comment]
|
|
1120
|
+
* @property {Object[]} articles
|
|
1121
|
+
* @property {Object} [coupon]
|
|
1122
|
+
* @property {number} [bulk_coupon_discount]
|
|
1123
|
+
* @property {string} _id
|
|
1124
|
+
* @property {Object} [fynd_credits]
|
|
1125
|
+
* @property {number[]} [fc_index_map]
|
|
1126
|
+
* @property {string} [order_id]
|
|
1127
|
+
* @property {number} [discount]
|
|
1128
|
+
* @property {Object} [cod_charges]
|
|
1129
|
+
* @property {Object} [payments]
|
|
1130
|
+
* @property {string} [payment_mode]
|
|
1131
|
+
* @property {Object[]} [shipments]
|
|
1132
|
+
* @property {Object} [pick_up_customer_details]
|
|
1133
|
+
* @property {number} uid
|
|
1134
|
+
* @property {string} [checkout_mode]
|
|
1135
|
+
* @property {number} [cart_value]
|
|
1136
|
+
* @property {boolean} [is_archive]
|
|
1137
|
+
* @property {string} created_on
|
|
1138
|
+
* @property {string} last_modified
|
|
1139
|
+
* @property {Object} [meta]
|
|
1140
|
+
* @property {boolean} [buy_now]
|
|
1141
|
+
* @property {boolean} [is_active]
|
|
1142
|
+
* @property {Object} cashback
|
|
1143
|
+
* @property {Object[]} [payment_methods]
|
|
1144
|
+
* @property {string} [gstin]
|
|
1145
|
+
* @property {Object} [delivery_charges]
|
|
1146
|
+
* @property {boolean} [merge_qty]
|
|
1147
|
+
* @property {string} user_id
|
|
1148
|
+
* @property {string} [app_id]
|
|
1149
|
+
*/
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* @typedef AbandonedCartResponse
|
|
1153
|
+
* @property {AbandonedCart[]} [items]
|
|
1154
|
+
* @property {Object} [result]
|
|
1390
1155
|
* @property {Page} [page]
|
|
1391
1156
|
* @property {boolean} [success] - The request success is defined
|
|
1392
1157
|
* @property {string} [message] - Message of the response
|
|
@@ -1394,54 +1159,47 @@ const Joi = require("joi");
|
|
|
1394
1159
|
|
|
1395
1160
|
/**
|
|
1396
1161
|
* @typedef PaymentSelectionLock
|
|
1397
|
-
* @property {string} [payment_identifier]
|
|
1398
|
-
* @property {string} [default_options]
|
|
1399
|
-
* @property {boolean} [enabled]
|
|
1162
|
+
* @property {string} [payment_identifier]
|
|
1163
|
+
* @property {string} [default_options]
|
|
1164
|
+
* @property {boolean} [enabled]
|
|
1400
1165
|
*/
|
|
1401
1166
|
|
|
1402
1167
|
/**
|
|
1403
1168
|
* @typedef CartCurrency
|
|
1404
1169
|
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
1405
|
-
* @property {string} [symbol]
|
|
1170
|
+
* @property {string} [symbol]
|
|
1406
1171
|
*/
|
|
1407
1172
|
|
|
1408
1173
|
/**
|
|
1409
1174
|
* @typedef CartDetailCoupon
|
|
1410
|
-
* @property {number} [cashback_amount]
|
|
1411
|
-
* @property {string} [cashback_message_primary]
|
|
1412
|
-
*
|
|
1413
|
-
* @property {string} [
|
|
1414
|
-
*
|
|
1415
|
-
* @property {string} [
|
|
1416
|
-
* @property {string} [
|
|
1417
|
-
*
|
|
1418
|
-
* @property {string} [
|
|
1419
|
-
* @property {
|
|
1420
|
-
* @property {
|
|
1421
|
-
* @property {
|
|
1422
|
-
* @property {
|
|
1423
|
-
* @property {number} [
|
|
1424
|
-
* @property {
|
|
1425
|
-
*
|
|
1426
|
-
* @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid
|
|
1427
|
-
* @property {number} [maximum_discount_value] - Maximum discount value of the
|
|
1428
|
-
* coupon applied to cart
|
|
1429
|
-
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
1430
|
-
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
1431
|
-
* applied to cart
|
|
1175
|
+
* @property {number} [cashback_amount]
|
|
1176
|
+
* @property {string} [cashback_message_primary]
|
|
1177
|
+
* @property {string} [cashback_message_secondary]
|
|
1178
|
+
* @property {string} [coupon_code]
|
|
1179
|
+
* @property {string} [coupon_description]
|
|
1180
|
+
* @property {string} [coupon_id]
|
|
1181
|
+
* @property {string} [coupon_subtitle]
|
|
1182
|
+
* @property {string} [coupon_title]
|
|
1183
|
+
* @property {string} [coupon_type]
|
|
1184
|
+
* @property {number} [coupon_value]
|
|
1185
|
+
* @property {number} [discount]
|
|
1186
|
+
* @property {boolean} [is_applied]
|
|
1187
|
+
* @property {boolean} [is_valid]
|
|
1188
|
+
* @property {number} [maximum_discount_value]
|
|
1189
|
+
* @property {string} [message]
|
|
1190
|
+
* @property {number} [minimum_cart_value]
|
|
1432
1191
|
*/
|
|
1433
1192
|
|
|
1434
1193
|
/**
|
|
1435
1194
|
* @typedef ChargesThreshold
|
|
1436
|
-
* @property {number} [charges]
|
|
1437
|
-
* @property {number} [threshold]
|
|
1438
|
-
* should be applied
|
|
1195
|
+
* @property {number} [charges]
|
|
1196
|
+
* @property {number} [threshold]
|
|
1439
1197
|
*/
|
|
1440
1198
|
|
|
1441
1199
|
/**
|
|
1442
1200
|
* @typedef DeliveryChargesConfig
|
|
1443
|
-
* @property {boolean} [enabled]
|
|
1444
|
-
* @property {ChargesThreshold[]} [charges]
|
|
1201
|
+
* @property {boolean} [enabled]
|
|
1202
|
+
* @property {ChargesThreshold[]} [charges]
|
|
1445
1203
|
*/
|
|
1446
1204
|
|
|
1447
1205
|
/**
|
|
@@ -1450,734 +1208,546 @@ const Joi = require("joi");
|
|
|
1450
1208
|
*/
|
|
1451
1209
|
|
|
1452
1210
|
/**
|
|
1453
|
-
* @typedef
|
|
1454
|
-
* @property {number} [cart_id]
|
|
1455
|
-
* @property {string} [uid]
|
|
1456
|
-
* @property {string} [coupon_text]
|
|
1457
|
-
* @property {string} [id]
|
|
1458
|
-
* @property {Object} [pan_config]
|
|
1459
|
-
* user should enter the pan card
|
|
1211
|
+
* @typedef CartDetailResponse
|
|
1212
|
+
* @property {number} [cart_id]
|
|
1213
|
+
* @property {string} [uid]
|
|
1214
|
+
* @property {string} [coupon_text]
|
|
1215
|
+
* @property {string} [id]
|
|
1216
|
+
* @property {Object} [pan_config]
|
|
1460
1217
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1461
|
-
* @property {string} [comment]
|
|
1462
|
-
* @property {CartProductInfo[]} [items]
|
|
1463
|
-
* includes item id, item size, store id, available sizes and rest of the item
|
|
1464
|
-
* related data
|
|
1218
|
+
* @property {string} [comment]
|
|
1219
|
+
* @property {CartProductInfo[]} [items]
|
|
1465
1220
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1466
|
-
* @property {string} [delivery_charge_info]
|
|
1467
|
-
* message on shipment
|
|
1221
|
+
* @property {string} [delivery_charge_info]
|
|
1468
1222
|
* @property {CartCommonConfig} [common_config]
|
|
1469
1223
|
* @property {CartDetailCoupon} [coupon]
|
|
1470
|
-
* @property {boolean} [restrict_checkout]
|
|
1471
|
-
*
|
|
1472
|
-
* @property {
|
|
1473
|
-
* @property {
|
|
1474
|
-
*
|
|
1475
|
-
* @property {string} [staff_user_id] - Staff employee user id if cart is
|
|
1476
|
-
* created by staff employee for the customer
|
|
1477
|
-
* @property {boolean} [success] - Success flag of get cart detail API response
|
|
1224
|
+
* @property {boolean} [restrict_checkout]
|
|
1225
|
+
* @property {string} [message]
|
|
1226
|
+
* @property {Object} [notification]
|
|
1227
|
+
* @property {string} [staff_user_id]
|
|
1228
|
+
* @property {boolean} [success]
|
|
1478
1229
|
* @property {CartBreakup} [breakup_values]
|
|
1479
|
-
* @property {boolean} [is_valid]
|
|
1480
|
-
* response is valid or not
|
|
1230
|
+
* @property {boolean} [is_valid]
|
|
1481
1231
|
* @property {CartCurrency} [currency]
|
|
1482
|
-
* @property {string} [checkout_mode]
|
|
1483
|
-
* @property {string} [last_modified]
|
|
1484
|
-
* @property {boolean} [buy_now]
|
|
1485
|
-
*
|
|
1486
|
-
* @property {
|
|
1487
|
-
* @property {
|
|
1488
|
-
*
|
|
1489
|
-
* text, description, buy rules, discount rules and promotion type
|
|
1490
|
-
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
1491
|
-
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
1492
|
-
* checkout API payload
|
|
1232
|
+
* @property {string} [checkout_mode]
|
|
1233
|
+
* @property {string} [last_modified]
|
|
1234
|
+
* @property {boolean} [buy_now]
|
|
1235
|
+
* @property {string} [gstin]
|
|
1236
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1237
|
+
* @property {string} [pan_no]
|
|
1238
|
+
* @property {Object} [custom_cart_meta]
|
|
1493
1239
|
*/
|
|
1494
1240
|
|
|
1495
1241
|
/**
|
|
1496
1242
|
* @typedef AddProductCart
|
|
1497
|
-
* @property {number} [quantity]
|
|
1498
|
-
*
|
|
1499
|
-
* @property {
|
|
1500
|
-
* @property {
|
|
1501
|
-
*
|
|
1502
|
-
* @property {
|
|
1503
|
-
*
|
|
1504
|
-
* @property {
|
|
1505
|
-
*
|
|
1506
|
-
* @property {
|
|
1507
|
-
* @property {Object} [
|
|
1508
|
-
*
|
|
1509
|
-
* @property {
|
|
1510
|
-
*
|
|
1511
|
-
* @property {string} [display] - Display field at article level
|
|
1512
|
-
* @property {number} [item_id] - Unique identifier to identify product
|
|
1513
|
-
* @property {Object} [extra_meta] - Extra meta data to be added at article
|
|
1514
|
-
* level while add items to cart
|
|
1515
|
-
* @property {Object} [_custom_json] - Field to add custom json at article level
|
|
1516
|
-
* while add items to cart
|
|
1517
|
-
* @property {Object} [meta] - Field to add meta data at article level
|
|
1518
|
-
* @property {boolean} [pos] - Filed to determine whether user is making request
|
|
1519
|
-
* from pos or not
|
|
1243
|
+
* @property {number} [quantity]
|
|
1244
|
+
* @property {string} [item_size]
|
|
1245
|
+
* @property {number} [seller_id]
|
|
1246
|
+
* @property {Object[]} [parent_item_identifiers]
|
|
1247
|
+
* @property {string[]} [product_group_tags]
|
|
1248
|
+
* @property {string} [article_id]
|
|
1249
|
+
* @property {Object} [article_assignment]
|
|
1250
|
+
* @property {number} [store_id]
|
|
1251
|
+
* @property {string} [display]
|
|
1252
|
+
* @property {number} [item_id]
|
|
1253
|
+
* @property {Object} [extra_meta]
|
|
1254
|
+
* @property {Object} [_custom_json]
|
|
1255
|
+
* @property {Object} [meta]
|
|
1256
|
+
* @property {boolean} [pos]
|
|
1520
1257
|
* @property {string} [seller_identifier] - Add items using seller identifier for store os
|
|
1521
1258
|
*/
|
|
1522
1259
|
|
|
1523
1260
|
/**
|
|
1524
|
-
* @typedef
|
|
1525
|
-
* @property {boolean} [new_cart]
|
|
1526
|
-
*
|
|
1527
|
-
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
1528
|
-
* added to cart like item id, item size, and item quantity
|
|
1261
|
+
* @typedef AddCartRequest
|
|
1262
|
+
* @property {boolean} [new_cart]
|
|
1263
|
+
* @property {AddProductCart[]} [items]
|
|
1529
1264
|
*/
|
|
1530
1265
|
|
|
1531
1266
|
/**
|
|
1532
|
-
* @typedef
|
|
1267
|
+
* @typedef AddCartDetailResponse
|
|
1533
1268
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1534
1269
|
* False if partially added or not added.
|
|
1535
|
-
* @property {
|
|
1270
|
+
* @property {CartDetailResponse} [cart]
|
|
1536
1271
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
1537
1272
|
* added. True if only few are added.
|
|
1538
|
-
* @property {string} [message]
|
|
1273
|
+
* @property {string} [message]
|
|
1539
1274
|
*/
|
|
1540
1275
|
|
|
1541
1276
|
/**
|
|
1542
1277
|
* @typedef UpdateProductCart
|
|
1543
|
-
* @property {number} [quantity]
|
|
1544
|
-
* @property {string} [item_size]
|
|
1545
|
-
* @property {Object} [parent_item_identifiers]
|
|
1546
|
-
*
|
|
1547
|
-
* @property {Object} [
|
|
1548
|
-
* @property {Object} [
|
|
1549
|
-
* @property {
|
|
1550
|
-
* @property {number} [
|
|
1551
|
-
* @property {number} [item_index] - Item index determines on which index the
|
|
1552
|
-
* product falls to be updated
|
|
1278
|
+
* @property {number} [quantity]
|
|
1279
|
+
* @property {string} [item_size]
|
|
1280
|
+
* @property {Object} [parent_item_identifiers]
|
|
1281
|
+
* @property {Object} [meta]
|
|
1282
|
+
* @property {Object} [extra_meta]
|
|
1283
|
+
* @property {Object} [_custom_json]
|
|
1284
|
+
* @property {number} [item_id]
|
|
1285
|
+
* @property {number} [item_index]
|
|
1553
1286
|
* @property {CartProductIdentifer} identifiers
|
|
1554
|
-
* @property {string} [article_id]
|
|
1555
|
-
*/
|
|
1556
|
-
|
|
1557
|
-
/**
|
|
1558
|
-
* @typedef FreeGiftItemCreation
|
|
1559
|
-
* @property {string} promotion_id - Unique identifier of the free gift promotion.
|
|
1560
|
-
* @property {string} item_id - Unique identifier of the selected free gift item.
|
|
1561
|
-
* @property {string} item_size - Size of the selected free gift item.
|
|
1287
|
+
* @property {string} [article_id]
|
|
1562
1288
|
*/
|
|
1563
1289
|
|
|
1564
1290
|
/**
|
|
1565
|
-
* @typedef
|
|
1291
|
+
* @typedef UpdateCartRequest
|
|
1566
1292
|
* @property {UpdateProductCart[]} [items]
|
|
1567
|
-
* @property {
|
|
1568
|
-
* items with updated sizes.
|
|
1569
|
-
* @property {string} operation - Cart opertaion type
|
|
1293
|
+
* @property {string} operation
|
|
1570
1294
|
*/
|
|
1571
1295
|
|
|
1572
1296
|
/**
|
|
1573
|
-
* @typedef
|
|
1297
|
+
* @typedef UpdateCartDetailResponse
|
|
1574
1298
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1575
1299
|
* False if partially added or not added.
|
|
1576
|
-
* @property {
|
|
1577
|
-
* @property {string} [message]
|
|
1300
|
+
* @property {CartDetailResponse} [cart]
|
|
1301
|
+
* @property {string} [message]
|
|
1578
1302
|
*/
|
|
1579
1303
|
|
|
1580
1304
|
/**
|
|
1581
1305
|
* @typedef OverrideCartItemPromo
|
|
1582
|
-
* @property {string} promo_id
|
|
1583
|
-
* @property {string} promo_amount
|
|
1584
|
-
* @property {string} [promo_desc]
|
|
1306
|
+
* @property {string} promo_id
|
|
1307
|
+
* @property {string} promo_amount
|
|
1308
|
+
* @property {string} [promo_desc]
|
|
1585
1309
|
* @property {string} [rwrd_tndr]
|
|
1586
|
-
* @property {Object[]} [item_list]
|
|
1587
|
-
* @property {string} [parent_promo_id]
|
|
1310
|
+
* @property {Object[]} [item_list]
|
|
1311
|
+
* @property {string} [parent_promo_id]
|
|
1588
1312
|
*/
|
|
1589
1313
|
|
|
1590
1314
|
/**
|
|
1591
1315
|
* @typedef OverrideCartItem
|
|
1592
|
-
* @property {string} [seller_identifier]
|
|
1593
|
-
* @property {number} [quantity]
|
|
1594
|
-
* @property {string} size
|
|
1595
|
-
* @property {number} price_marked
|
|
1596
|
-
* @property {number} amount_paid
|
|
1597
|
-
* @property {OverrideCartItemPromo[]} [promo_list]
|
|
1598
|
-
* @property {Object} [extra_meta]
|
|
1599
|
-
* @property {number} item_id
|
|
1600
|
-
* @property {number} discount
|
|
1601
|
-
* @property {number} price_effective
|
|
1602
|
-
* existing deductions
|
|
1316
|
+
* @property {string} [seller_identifier]
|
|
1317
|
+
* @property {number} [quantity]
|
|
1318
|
+
* @property {string} size
|
|
1319
|
+
* @property {number} price_marked
|
|
1320
|
+
* @property {number} amount_paid
|
|
1321
|
+
* @property {OverrideCartItemPromo[]} [promo_list]
|
|
1322
|
+
* @property {Object} [extra_meta]
|
|
1323
|
+
* @property {number} item_id
|
|
1324
|
+
* @property {number} discount
|
|
1325
|
+
* @property {number} price_effective
|
|
1603
1326
|
*/
|
|
1604
1327
|
|
|
1605
1328
|
/**
|
|
1606
1329
|
* @typedef OverrideCheckoutReq
|
|
1607
|
-
* @property {string} cart_id
|
|
1608
|
-
* @property {string} payment_mode
|
|
1609
|
-
*
|
|
1610
|
-
* @property {
|
|
1611
|
-
*
|
|
1612
|
-
*
|
|
1613
|
-
* @property {string}
|
|
1614
|
-
*
|
|
1615
|
-
* @property {string}
|
|
1616
|
-
*
|
|
1617
|
-
* @property {
|
|
1618
|
-
* @property {
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
*
|
|
1623
|
-
* @property {
|
|
1624
|
-
*
|
|
1625
|
-
* @property {
|
|
1626
|
-
*
|
|
1627
|
-
* @property {
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
* @typedef OverrideCheckoutResult
|
|
1633
|
-
* @property {Object} data - Data of the user cart checkout includes cart data,
|
|
1634
|
-
* address, user id, order type etc
|
|
1635
|
-
* @property {Object} cart - Cart details in API response which included cart
|
|
1636
|
-
* id, items in cart, promise, order type, breakup values etc.
|
|
1637
|
-
* @property {string} success - Success flag of cart override checkout API response
|
|
1638
|
-
* @property {string} order_id - Order id generated after placing order
|
|
1639
|
-
* @property {string} message - Message of the cart override checkout API response
|
|
1640
|
-
*/
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* @typedef GetShareCartLinkCreation
|
|
1330
|
+
* @property {string} cart_id
|
|
1331
|
+
* @property {string} payment_mode
|
|
1332
|
+
* @property {Object} [billing_address]
|
|
1333
|
+
* @property {string} merchant_code
|
|
1334
|
+
* @property {string} payment_identifier
|
|
1335
|
+
* @property {string} currency_code
|
|
1336
|
+
* @property {string} aggregator
|
|
1337
|
+
* @property {string} order_type
|
|
1338
|
+
* @property {string} [callback_url]
|
|
1339
|
+
* @property {OverrideCartItem[]} cart_items
|
|
1340
|
+
* @property {number} [ordering_store]
|
|
1341
|
+
* @property {Object} [shipping_address]
|
|
1342
|
+
*/
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* @typedef OverrideCheckoutResponse
|
|
1346
|
+
* @property {Object} data
|
|
1347
|
+
* @property {Object} cart
|
|
1348
|
+
* @property {string} success
|
|
1349
|
+
* @property {string} order_id
|
|
1350
|
+
* @property {string} message
|
|
1351
|
+
*/
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* @typedef GetShareCartLinkRequest
|
|
1644
1355
|
* @property {string} [id] - Cart uid for generating sharing
|
|
1645
1356
|
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
1646
1357
|
* data will be used to generate link as well as sent as shared details.
|
|
1647
1358
|
*/
|
|
1648
1359
|
|
|
1649
1360
|
/**
|
|
1650
|
-
* @typedef
|
|
1651
|
-
* @property {string} [token] - Short url unique id
|
|
1652
|
-
*
|
|
1653
|
-
* @property {string} [share_url] - Short shareable final url which can populate
|
|
1654
|
-
* shared cart items in one's cart or replaced one's cart with shared cart items
|
|
1361
|
+
* @typedef GetShareCartLinkResponse
|
|
1362
|
+
* @property {string} [token] - Short url unique id
|
|
1363
|
+
* @property {string} [share_url] - Short shareable final url
|
|
1655
1364
|
*/
|
|
1656
1365
|
|
|
1657
1366
|
/**
|
|
1658
1367
|
* @typedef SharedCartDetails
|
|
1659
1368
|
* @property {Object} [source] - Share link device and other source information
|
|
1660
1369
|
* @property {Object} [user] - User details of who generated share link
|
|
1661
|
-
* @property {string} [token] - Short link id
|
|
1662
|
-
* @property {string} [created_on]
|
|
1370
|
+
* @property {string} [token] - Short link id
|
|
1371
|
+
* @property {string} [created_on]
|
|
1663
1372
|
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
1664
1373
|
*/
|
|
1665
1374
|
|
|
1666
1375
|
/**
|
|
1667
1376
|
* @typedef SharedCart
|
|
1668
|
-
* @property {string} [coupon_text]
|
|
1669
|
-
* @property {string} [id]
|
|
1377
|
+
* @property {string} [coupon_text]
|
|
1378
|
+
* @property {string} [id]
|
|
1670
1379
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1671
|
-
* @property {string} [comment]
|
|
1672
|
-
* @property {CartProductInfo[]} [items]
|
|
1673
|
-
* includes item id, item size, store id, available sizes and rest of the item
|
|
1674
|
-
* related data
|
|
1380
|
+
* @property {string} [comment]
|
|
1381
|
+
* @property {CartProductInfo[]} [items]
|
|
1675
1382
|
* @property {SharedCartDetails} [shared_cart_details]
|
|
1676
1383
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1677
|
-
* @property {string} [delivery_charge_info]
|
|
1678
|
-
*
|
|
1679
|
-
* @property {
|
|
1680
|
-
* the checkout process
|
|
1681
|
-
* @property {string} [message] - Message of the get shared cart API response
|
|
1384
|
+
* @property {string} [delivery_charge_info]
|
|
1385
|
+
* @property {boolean} [restrict_checkout]
|
|
1386
|
+
* @property {string} [message]
|
|
1682
1387
|
* @property {CartBreakup} [breakup_values]
|
|
1683
|
-
* @property {boolean} [is_valid]
|
|
1684
|
-
* @property {string} [uid]
|
|
1685
|
-
* @property {string} [checkout_mode]
|
|
1686
|
-
* address to be used for which checkout mode of cart
|
|
1388
|
+
* @property {boolean} [is_valid]
|
|
1389
|
+
* @property {string} [uid]
|
|
1390
|
+
* @property {string} [checkout_mode]
|
|
1687
1391
|
* @property {CartCurrency} [currency]
|
|
1688
|
-
* @property {string} [last_modified]
|
|
1689
|
-
* @property {boolean} [buy_now]
|
|
1690
|
-
* @property {number} [cart_id]
|
|
1691
|
-
* @property {string} [gstin]
|
|
1692
|
-
* @property {Object} [custom_cart_meta]
|
|
1693
|
-
* via update cart meta API
|
|
1392
|
+
* @property {string} [last_modified]
|
|
1393
|
+
* @property {boolean} [buy_now]
|
|
1394
|
+
* @property {number} [cart_id]
|
|
1395
|
+
* @property {string} [gstin]
|
|
1396
|
+
* @property {Object} [custom_cart_meta]
|
|
1694
1397
|
*/
|
|
1695
1398
|
|
|
1696
1399
|
/**
|
|
1697
|
-
* @typedef
|
|
1400
|
+
* @typedef SharedCartResponse
|
|
1698
1401
|
* @property {SharedCart} [cart]
|
|
1699
|
-
* @property {string} [error]
|
|
1700
|
-
* type of error, error code and error message
|
|
1402
|
+
* @property {string} [error]
|
|
1701
1403
|
*/
|
|
1702
1404
|
|
|
1703
1405
|
/**
|
|
1704
1406
|
* @typedef CartList
|
|
1705
|
-
* @property {string} [cart_id]
|
|
1706
|
-
* @property {Object} [pick_up_customer_details]
|
|
1707
|
-
*
|
|
1708
|
-
* @property {
|
|
1709
|
-
* @property {string} [
|
|
1710
|
-
* @property {string} [
|
|
1711
|
-
* @property {
|
|
1712
|
-
* @property {number} [item_counts] - Article total count in cart
|
|
1407
|
+
* @property {string} [cart_id]
|
|
1408
|
+
* @property {Object} [pick_up_customer_details]
|
|
1409
|
+
* @property {number} [cart_value]
|
|
1410
|
+
* @property {string} [created_on]
|
|
1411
|
+
* @property {string} [user_id]
|
|
1412
|
+
* @property {string} [currency_code]
|
|
1413
|
+
* @property {number} [item_counts]
|
|
1713
1414
|
*/
|
|
1714
1415
|
|
|
1715
1416
|
/**
|
|
1716
|
-
* @typedef
|
|
1717
|
-
* @property {boolean} [success]
|
|
1718
|
-
* @property {CartList[]} [data]
|
|
1417
|
+
* @typedef MultiCartResponse
|
|
1418
|
+
* @property {boolean} [success]
|
|
1419
|
+
* @property {CartList[]} [data]
|
|
1719
1420
|
*/
|
|
1720
1421
|
|
|
1721
1422
|
/**
|
|
1722
1423
|
* @typedef UpdateUserCartMapping
|
|
1723
|
-
* @property {string} user_id
|
|
1424
|
+
* @property {string} user_id
|
|
1724
1425
|
*/
|
|
1725
1426
|
|
|
1726
1427
|
/**
|
|
1727
1428
|
* @typedef UserInfo
|
|
1728
|
-
* @property {string} [gender]
|
|
1729
|
-
* @property {string} [modified_on]
|
|
1730
|
-
* @property {string} [_id]
|
|
1731
|
-
* @property {string} [uid]
|
|
1732
|
-
* @property {string} [external_id]
|
|
1733
|
-
* @property {string} [mobile]
|
|
1734
|
-
* @property {string} [last_name]
|
|
1735
|
-
* @property {string} [created_at]
|
|
1736
|
-
* @property {string} [first_name]
|
|
1429
|
+
* @property {string} [gender]
|
|
1430
|
+
* @property {string} [modified_on]
|
|
1431
|
+
* @property {string} [_id]
|
|
1432
|
+
* @property {string} [uid]
|
|
1433
|
+
* @property {string} [external_id]
|
|
1434
|
+
* @property {string} [mobile]
|
|
1435
|
+
* @property {string} [last_name]
|
|
1436
|
+
* @property {string} [created_at]
|
|
1437
|
+
* @property {string} [first_name]
|
|
1737
1438
|
*/
|
|
1738
1439
|
|
|
1739
1440
|
/**
|
|
1740
|
-
* @typedef
|
|
1741
|
-
* @property {string} [coupon_text]
|
|
1441
|
+
* @typedef UserCartMappingResponse
|
|
1442
|
+
* @property {string} [coupon_text]
|
|
1742
1443
|
* @property {UserInfo} [user]
|
|
1743
|
-
* @property {string} [id]
|
|
1744
|
-
* @property {Object} [pan_config]
|
|
1745
|
-
* user should enter the pan card
|
|
1444
|
+
* @property {string} [id]
|
|
1445
|
+
* @property {Object} [pan_config]
|
|
1746
1446
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1747
|
-
* @property {string} [comment]
|
|
1748
|
-
* @property {CartProductInfo[]} [items]
|
|
1749
|
-
* includes item id, item size, store id, available sizes and rest of the item
|
|
1750
|
-
* related data
|
|
1447
|
+
* @property {string} [comment]
|
|
1448
|
+
* @property {CartProductInfo[]} [items]
|
|
1751
1449
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1752
|
-
* @property {string} [delivery_charge_info]
|
|
1753
|
-
*
|
|
1754
|
-
* @property {
|
|
1755
|
-
* the checkout process
|
|
1756
|
-
* @property {string} [message] - Message of the get cart detail API response
|
|
1450
|
+
* @property {string} [delivery_charge_info]
|
|
1451
|
+
* @property {boolean} [restrict_checkout]
|
|
1452
|
+
* @property {string} [message]
|
|
1757
1453
|
* @property {CartBreakup} [breakup_values]
|
|
1758
|
-
* @property {boolean} [is_valid]
|
|
1759
|
-
* response is valid or not
|
|
1454
|
+
* @property {boolean} [is_valid]
|
|
1760
1455
|
* @property {CartCurrency} [currency]
|
|
1761
|
-
* @property {string} [checkout_mode]
|
|
1762
|
-
* @property {string} [last_modified]
|
|
1763
|
-
* @property {boolean} [buy_now]
|
|
1764
|
-
*
|
|
1765
|
-
* @property {
|
|
1766
|
-
* @property {
|
|
1767
|
-
*
|
|
1768
|
-
* @property {AppliedPromotion[]} [applied_promo_details] - List of applied
|
|
1769
|
-
* promotions data to cart which includes promotion id, promotion name, offer
|
|
1770
|
-
* text, description, buy rules, discount rules and promotion type
|
|
1771
|
-
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
1456
|
+
* @property {string} [checkout_mode]
|
|
1457
|
+
* @property {string} [last_modified]
|
|
1458
|
+
* @property {boolean} [buy_now]
|
|
1459
|
+
* @property {string} [gstin]
|
|
1460
|
+
* @property {Object} [custom_cart_meta]
|
|
1461
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1462
|
+
* @property {string} [pan_no]
|
|
1772
1463
|
*/
|
|
1773
1464
|
|
|
1774
1465
|
/**
|
|
1775
|
-
* @typedef
|
|
1776
|
-
* @property {string} [user_id]
|
|
1777
|
-
*
|
|
1778
|
-
* @property {
|
|
1779
|
-
* item to cart
|
|
1780
|
-
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
1781
|
-
* added to cart like item id, item size, and item quantity
|
|
1466
|
+
* @typedef PlatformAddCartRequest
|
|
1467
|
+
* @property {string} [user_id]
|
|
1468
|
+
* @property {boolean} [new_cart]
|
|
1469
|
+
* @property {AddProductCart[]} [items]
|
|
1782
1470
|
*/
|
|
1783
1471
|
|
|
1784
1472
|
/**
|
|
1785
|
-
* @typedef
|
|
1786
|
-
* @property {string} [user_id]
|
|
1787
|
-
*
|
|
1788
|
-
* @property {
|
|
1789
|
-
* updated in cart
|
|
1790
|
-
* @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
|
|
1791
|
-
* items with updated sizes.
|
|
1792
|
-
* @property {string} operation - Field to determine if item to be removed from
|
|
1793
|
-
* cart or it needs to be updated
|
|
1473
|
+
* @typedef PlatformUpdateCartRequest
|
|
1474
|
+
* @property {string} [user_id]
|
|
1475
|
+
* @property {UpdateProductCart[]} [items]
|
|
1476
|
+
* @property {string} operation
|
|
1794
1477
|
*/
|
|
1795
1478
|
|
|
1796
1479
|
/**
|
|
1797
|
-
* @typedef
|
|
1798
|
-
* @property {string[]} [cart_id_list]
|
|
1480
|
+
* @typedef DeleteCartRequest
|
|
1481
|
+
* @property {string[]} [cart_id_list]
|
|
1799
1482
|
*/
|
|
1800
1483
|
|
|
1801
1484
|
/**
|
|
1802
|
-
* @typedef
|
|
1485
|
+
* @typedef DeleteCartDetailResponse
|
|
1803
1486
|
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
1804
1487
|
* if not archived.
|
|
1805
|
-
* @property {string} [message]
|
|
1488
|
+
* @property {string} [message]
|
|
1806
1489
|
*/
|
|
1807
1490
|
|
|
1808
1491
|
/**
|
|
1809
|
-
* @typedef
|
|
1492
|
+
* @typedef CartItemCountResponse
|
|
1810
1493
|
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
1811
1494
|
*/
|
|
1812
1495
|
|
|
1813
1496
|
/**
|
|
1814
1497
|
* @typedef Coupon
|
|
1815
|
-
* @property {string} [title]
|
|
1816
|
-
*
|
|
1817
|
-
* @property {
|
|
1818
|
-
*
|
|
1819
|
-
* @property {string} [
|
|
1820
|
-
* @property {
|
|
1821
|
-
*
|
|
1822
|
-
* @property {string} [
|
|
1823
|
-
* @property {
|
|
1824
|
-
* @property {
|
|
1825
|
-
* @property {string} [
|
|
1826
|
-
*
|
|
1827
|
-
* @property {
|
|
1828
|
-
*
|
|
1829
|
-
* @property {
|
|
1830
|
-
* applicable to cart or not
|
|
1831
|
-
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
1832
|
-
* @property {string} [description] - Coupon description of the coupon applied to cart
|
|
1833
|
-
* @property {string} [start_date] - Start date of the coupon when the coupon
|
|
1834
|
-
* will be live for the users to apply on cart
|
|
1835
|
-
* @property {string} [end_date] - End date of the coupon on which the coupon expires
|
|
1836
|
-
* @property {string} [coupon_applicable_message] - Message which is used to
|
|
1837
|
-
* display to the customer if the coupon is applied successfully
|
|
1498
|
+
* @property {string} [title]
|
|
1499
|
+
* @property {number} [max_discount_value]
|
|
1500
|
+
* @property {string} [coupon_code]
|
|
1501
|
+
* @property {boolean} [is_applied]
|
|
1502
|
+
* @property {string} [coupon_type]
|
|
1503
|
+
* @property {string} [expires_on]
|
|
1504
|
+
* @property {number} [coupon_value]
|
|
1505
|
+
* @property {string} [sub_title]
|
|
1506
|
+
* @property {number} [minimum_cart_value]
|
|
1507
|
+
* @property {boolean} [is_applicable]
|
|
1508
|
+
* @property {string} [message]
|
|
1509
|
+
* @property {string} [description]
|
|
1510
|
+
* @property {string} [start_date]
|
|
1511
|
+
* @property {string} [end_date]
|
|
1512
|
+
* @property {string} [coupon_applicable_message]
|
|
1838
1513
|
*/
|
|
1839
1514
|
|
|
1840
1515
|
/**
|
|
1841
1516
|
* @typedef PageCoupon
|
|
1842
|
-
* @property {boolean} [has_next]
|
|
1843
|
-
* @property {number} [current]
|
|
1844
|
-
* @property {number} [total]
|
|
1845
|
-
* @property {number} [total_item_count]
|
|
1846
|
-
* @property {boolean} [has_previous]
|
|
1847
|
-
* is available
|
|
1517
|
+
* @property {boolean} [has_next]
|
|
1518
|
+
* @property {number} [current]
|
|
1519
|
+
* @property {number} [total]
|
|
1520
|
+
* @property {number} [total_item_count]
|
|
1521
|
+
* @property {boolean} [has_previous]
|
|
1848
1522
|
*/
|
|
1849
1523
|
|
|
1850
1524
|
/**
|
|
1851
|
-
* @typedef
|
|
1852
|
-
* @property {Coupon[]} [available_coupon_list]
|
|
1853
|
-
* can be applied on cart
|
|
1525
|
+
* @typedef GetCouponResponse
|
|
1526
|
+
* @property {Coupon[]} [available_coupon_list]
|
|
1854
1527
|
* @property {PageCoupon} [page]
|
|
1855
1528
|
*/
|
|
1856
1529
|
|
|
1857
1530
|
/**
|
|
1858
|
-
* @typedef
|
|
1531
|
+
* @typedef ApplyCouponRequest
|
|
1859
1532
|
* @property {string} coupon_code - Coupon code to be applied
|
|
1860
1533
|
*/
|
|
1861
1534
|
|
|
1862
1535
|
/**
|
|
1863
1536
|
* @typedef GeoLocation
|
|
1864
|
-
* @property {number} [longitude]
|
|
1865
|
-
* @property {number} [latitude]
|
|
1537
|
+
* @property {number} [longitude]
|
|
1538
|
+
* @property {number} [latitude]
|
|
1866
1539
|
*/
|
|
1867
1540
|
|
|
1868
1541
|
/**
|
|
1869
1542
|
* @typedef PlatformAddress
|
|
1870
|
-
* @property {string} [phone]
|
|
1871
|
-
* @property {string} [id]
|
|
1872
|
-
* @property {string} [area_code_slug]
|
|
1873
|
-
*
|
|
1874
|
-
* @property {string} [country_code] - Country code of address
|
|
1543
|
+
* @property {string} [phone]
|
|
1544
|
+
* @property {string} [id]
|
|
1545
|
+
* @property {string} [area_code_slug]
|
|
1546
|
+
* @property {string} [country_code]
|
|
1875
1547
|
* @property {GeoLocation} [geo_location]
|
|
1876
|
-
* @property {string} [country]
|
|
1877
|
-
* @property {string} [state]
|
|
1878
|
-
* @property {boolean} [is_default_address]
|
|
1879
|
-
*
|
|
1880
|
-
* @property {string
|
|
1881
|
-
* @property {string} [
|
|
1882
|
-
* @property {string} [
|
|
1883
|
-
* @property {string} [
|
|
1884
|
-
* @property {string} [
|
|
1885
|
-
* @property {
|
|
1886
|
-
*
|
|
1887
|
-
* @property {
|
|
1888
|
-
* @property {
|
|
1889
|
-
* @property {string} [
|
|
1890
|
-
* @property {
|
|
1891
|
-
* @property {string} [
|
|
1892
|
-
* @property {string} [city] - City of the address
|
|
1893
|
-
* @property {string} [sector] - Sector of the address
|
|
1548
|
+
* @property {string} [country]
|
|
1549
|
+
* @property {string} [state]
|
|
1550
|
+
* @property {boolean} [is_default_address]
|
|
1551
|
+
* @property {string[]} [tags]
|
|
1552
|
+
* @property {string} [created_by_user_id]
|
|
1553
|
+
* @property {string} [landmark]
|
|
1554
|
+
* @property {string} [email]
|
|
1555
|
+
* @property {string} [area_code]
|
|
1556
|
+
* @property {string} [checkout_mode]
|
|
1557
|
+
* @property {Object} [meta]
|
|
1558
|
+
* @property {boolean} [is_active]
|
|
1559
|
+
* @property {string} [name]
|
|
1560
|
+
* @property {Object} [google_map_point]
|
|
1561
|
+
* @property {string} [cart_id]
|
|
1562
|
+
* @property {string} [city]
|
|
1563
|
+
* @property {string} [sector]
|
|
1894
1564
|
* @property {string} [state_code] - State code for international address
|
|
1895
|
-
* @property {string} [area]
|
|
1896
|
-
* @property {string} [user_id]
|
|
1897
|
-
* @property {string} [address_type]
|
|
1898
|
-
* @property {string} [address]
|
|
1899
|
-
* @property {string} [country_phone_code]
|
|
1900
|
-
* @property {string} [country_iso_code]
|
|
1901
|
-
* @property {Object} [_custom_json]
|
|
1565
|
+
* @property {string} [area]
|
|
1566
|
+
* @property {string} [user_id]
|
|
1567
|
+
* @property {string} [address_type]
|
|
1568
|
+
* @property {string} [address]
|
|
1569
|
+
* @property {string} [country_phone_code]
|
|
1570
|
+
* @property {string} [country_iso_code]
|
|
1571
|
+
* @property {Object} [_custom_json]
|
|
1902
1572
|
*/
|
|
1903
1573
|
|
|
1904
1574
|
/**
|
|
1905
|
-
* @typedef
|
|
1906
|
-
* @property {
|
|
1907
|
-
* @property {number} user_address_count - The total number of addresses saved by a user.
|
|
1575
|
+
* @typedef PlatformGetAddressesResponse
|
|
1576
|
+
* @property {PlatformAddress[]} [address]
|
|
1908
1577
|
*/
|
|
1909
1578
|
|
|
1910
1579
|
/**
|
|
1911
|
-
* @typedef
|
|
1912
|
-
* @property {
|
|
1913
|
-
* @property {
|
|
1580
|
+
* @typedef SaveAddressResponse
|
|
1581
|
+
* @property {string} [id]
|
|
1582
|
+
* @property {boolean} [success]
|
|
1583
|
+
* @property {boolean} [is_default_address]
|
|
1914
1584
|
*/
|
|
1915
1585
|
|
|
1916
1586
|
/**
|
|
1917
|
-
* @typedef
|
|
1918
|
-
* @property {string} [id]
|
|
1919
|
-
* @property {boolean} [
|
|
1920
|
-
* @property {boolean} [
|
|
1921
|
-
*
|
|
1587
|
+
* @typedef UpdateAddressResponse
|
|
1588
|
+
* @property {string} [id]
|
|
1589
|
+
* @property {boolean} [is_default_address]
|
|
1590
|
+
* @property {boolean} [success]
|
|
1591
|
+
* @property {boolean} [is_updated]
|
|
1922
1592
|
*/
|
|
1923
1593
|
|
|
1924
1594
|
/**
|
|
1925
|
-
* @typedef
|
|
1926
|
-
* @property {string} [id]
|
|
1927
|
-
* @property {boolean} [
|
|
1928
|
-
* selected then this should be the default address selected
|
|
1929
|
-
* @property {boolean} [success] - Success flag of update address response
|
|
1930
|
-
* @property {boolean} [is_updated] - Updated flag for update address operation
|
|
1931
|
-
* if the address updated or not
|
|
1595
|
+
* @typedef DeleteAddressResponse
|
|
1596
|
+
* @property {string} [id]
|
|
1597
|
+
* @property {boolean} [is_deleted]
|
|
1932
1598
|
*/
|
|
1933
1599
|
|
|
1934
1600
|
/**
|
|
1935
|
-
* @typedef
|
|
1936
|
-
* @property {string} [
|
|
1937
|
-
* @property {
|
|
1938
|
-
*
|
|
1601
|
+
* @typedef PlatformSelectCartAddressRequest
|
|
1602
|
+
* @property {string} [cart_id]
|
|
1603
|
+
* @property {string} [billing_address_id]
|
|
1604
|
+
* @property {string} [checkout_mode]
|
|
1605
|
+
* @property {string} [id]
|
|
1606
|
+
* @property {string} [user_id]
|
|
1939
1607
|
*/
|
|
1940
1608
|
|
|
1941
1609
|
/**
|
|
1942
|
-
* @typedef
|
|
1943
|
-
* @property {string} [
|
|
1944
|
-
*
|
|
1945
|
-
* @property {string} [
|
|
1946
|
-
* on which shipment bill to be generated
|
|
1947
|
-
* @property {string} [checkout_mode] - The checkout mode in cart
|
|
1948
|
-
* @property {string} [id] - Address is selected by user on which shipment to be delivered
|
|
1949
|
-
* @property {string} [user_id] - Unique Identifier of user
|
|
1610
|
+
* @typedef ShipmentArticle
|
|
1611
|
+
* @property {string} [meta]
|
|
1612
|
+
* @property {string} [quantity]
|
|
1613
|
+
* @property {string} [article_id]
|
|
1950
1614
|
*/
|
|
1951
1615
|
|
|
1952
1616
|
/**
|
|
1953
|
-
* @typedef
|
|
1954
|
-
* @property {
|
|
1955
|
-
* @property {
|
|
1956
|
-
* @property {
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
* @
|
|
1961
|
-
* @property {number} [shipments] - Count of shipments that will be shipped
|
|
1962
|
-
* @property {number} [fulfillment_id] - Fulfilment id of the shipment
|
|
1963
|
-
* @property {CartProductInfo[]} [items] - Item details in the shipment
|
|
1964
|
-
* @property {Object} [dp_options] - Delivery partner options that are available
|
|
1965
|
-
* to deliver the shipment
|
|
1966
|
-
* @property {string} [shipment_type] - Shipment type of the shipment returned
|
|
1967
|
-
* in get shipments API like single_shipment or multiple shipment. Single
|
|
1968
|
-
* Shipment means 1 item in 1 shipment and vice versa in the other one
|
|
1969
|
-
* @property {string} [order_type] - Order type of the shipment like pickAtStore
|
|
1970
|
-
* or HomeDelivery
|
|
1971
|
-
* @property {string} [box_type] - Box type of the shipment in which the
|
|
1972
|
-
* shipment will be delivered
|
|
1617
|
+
* @typedef PlatformShipmentResponse
|
|
1618
|
+
* @property {number} [shipments]
|
|
1619
|
+
* @property {number} [fulfillment_id]
|
|
1620
|
+
* @property {CartProductInfo[]} [items]
|
|
1621
|
+
* @property {Object} [dp_options]
|
|
1622
|
+
* @property {string} [shipment_type]
|
|
1623
|
+
* @property {string} [order_type]
|
|
1624
|
+
* @property {string} [box_type]
|
|
1973
1625
|
* @property {ShipmentPromise} [promise]
|
|
1974
|
-
* @property {string} [dp_id]
|
|
1975
|
-
* @property {string} [fulfillment_type]
|
|
1976
|
-
* @property {ShipmentArticle[]} [articles]
|
|
1626
|
+
* @property {string} [dp_id]
|
|
1627
|
+
* @property {string} [fulfillment_type]
|
|
1628
|
+
* @property {ShipmentArticle[]} [articles]
|
|
1977
1629
|
*/
|
|
1978
1630
|
|
|
1979
1631
|
/**
|
|
1980
|
-
* @typedef
|
|
1981
|
-
* @property {string} [coupon_text]
|
|
1982
|
-
* @property {string} [id]
|
|
1983
|
-
* @property {Object} [pan_config]
|
|
1984
|
-
* user should enter the pan card
|
|
1632
|
+
* @typedef PlatformCartShipmentsResponse
|
|
1633
|
+
* @property {string} [coupon_text]
|
|
1634
|
+
* @property {string} [id]
|
|
1635
|
+
* @property {Object} [pan_config]
|
|
1985
1636
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1986
|
-
* @property {string} [comment]
|
|
1987
|
-
* @property {CartProductInfo[]} [items]
|
|
1637
|
+
* @property {string} [comment]
|
|
1638
|
+
* @property {CartProductInfo[]} [items]
|
|
1988
1639
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1989
|
-
* @property {string} [delivery_charge_info]
|
|
1990
|
-
*
|
|
1991
|
-
* @property {
|
|
1992
|
-
* the checkout process
|
|
1993
|
-
* @property {string} [message] - Response message of get shipments API
|
|
1640
|
+
* @property {string} [delivery_charge_info]
|
|
1641
|
+
* @property {boolean} [restrict_checkout]
|
|
1642
|
+
* @property {string} [message]
|
|
1994
1643
|
* @property {CartBreakup} [breakup_values]
|
|
1995
|
-
* @property {string} [staff_user_id]
|
|
1996
|
-
*
|
|
1997
|
-
* @property {
|
|
1998
|
-
* response is valid or not
|
|
1999
|
-
* @property {PlatformShipmentDetails[]} [shipments] - List of shipments that
|
|
2000
|
-
* will be shipped
|
|
1644
|
+
* @property {string} [staff_user_id]
|
|
1645
|
+
* @property {boolean} [is_valid]
|
|
1646
|
+
* @property {PlatformShipmentResponse[]} [shipments]
|
|
2001
1647
|
* @property {CartCurrency} [currency]
|
|
2002
|
-
* @property {string} [checkout_mode]
|
|
2003
|
-
* @property {string} [last_modified]
|
|
2004
|
-
* @property {boolean} [buy_now]
|
|
2005
|
-
* @property {string} [gstin]
|
|
2006
|
-
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
2007
|
-
*
|
|
2008
|
-
*
|
|
2009
|
-
* @property {
|
|
2010
|
-
* includes type of error, error code and error message
|
|
2011
|
-
* @property {string} [pan_no] - Permanent Account Number of the user
|
|
2012
|
-
* @property {Object} [custom_cart_meta] - Custom cart meta details added in cart
|
|
1648
|
+
* @property {string} [checkout_mode]
|
|
1649
|
+
* @property {string} [last_modified]
|
|
1650
|
+
* @property {boolean} [buy_now]
|
|
1651
|
+
* @property {string} [gstin]
|
|
1652
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1653
|
+
* @property {boolean} [error]
|
|
1654
|
+
* @property {string} [pan_no]
|
|
1655
|
+
* @property {Object} [custom_cart_meta]
|
|
2013
1656
|
*/
|
|
2014
1657
|
|
|
2015
1658
|
/**
|
|
2016
1659
|
* @typedef UpdateCartShipmentItem
|
|
2017
1660
|
* @property {number} [quantity] - Quantity of product in shipment
|
|
2018
1661
|
* @property {string} shipment_type - Shipment delivery type
|
|
2019
|
-
* @property {string} article_uid - Article
|
|
1662
|
+
* @property {string} article_uid - Article mongo id
|
|
2020
1663
|
*/
|
|
2021
1664
|
|
|
2022
1665
|
/**
|
|
2023
|
-
* @typedef
|
|
2024
|
-
* @property {UpdateCartShipmentItem[]} shipments
|
|
2025
|
-
* includes shipment data like shipment items, shipment promise, Shipment
|
|
2026
|
-
* type, shipment order type, shipment dp options etc
|
|
1666
|
+
* @typedef UpdateCartShipmentRequest
|
|
1667
|
+
* @property {UpdateCartShipmentItem[]} shipments
|
|
2027
1668
|
*/
|
|
2028
1669
|
|
|
2029
1670
|
/**
|
|
2030
|
-
* @typedef
|
|
2031
|
-
* @property {string} [gstin]
|
|
1671
|
+
* @typedef PlatformCartMetaRequest
|
|
1672
|
+
* @property {string} [gstin]
|
|
2032
1673
|
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
2033
1674
|
* customer pickup at store
|
|
2034
|
-
* @property {string} [checkout_mode]
|
|
2035
|
-
* @property {Object} [gift_details]
|
|
2036
|
-
*
|
|
2037
|
-
* @property {string} [
|
|
2038
|
-
* @property {string} [comment] - Comment message to be added in user cart
|
|
1675
|
+
* @property {string} [checkout_mode]
|
|
1676
|
+
* @property {Object} [gift_details]
|
|
1677
|
+
* @property {string} [pan_no]
|
|
1678
|
+
* @property {string} [comment]
|
|
2039
1679
|
* @property {string} [staff_user_id] - Staff user id
|
|
2040
1680
|
*/
|
|
2041
1681
|
|
|
2042
1682
|
/**
|
|
2043
|
-
* @typedef
|
|
2044
|
-
* @property {boolean} [is_valid]
|
|
2045
|
-
* @property {string} [message]
|
|
1683
|
+
* @typedef CartMetaResponse
|
|
1684
|
+
* @property {boolean} [is_valid]
|
|
1685
|
+
* @property {string} [message]
|
|
2046
1686
|
*/
|
|
2047
1687
|
|
|
2048
1688
|
/**
|
|
2049
|
-
* @typedef
|
|
2050
|
-
* @property {string[]} [errors]
|
|
1689
|
+
* @typedef CartMetaMissingResponse
|
|
1690
|
+
* @property {string[]} [errors]
|
|
2051
1691
|
*/
|
|
2052
1692
|
|
|
2053
1693
|
/**
|
|
2054
1694
|
* @typedef StaffCheckout
|
|
2055
|
-
* @property {string} [employee_code]
|
|
2056
|
-
*
|
|
2057
|
-
* @property {string}
|
|
2058
|
-
* @property {string}
|
|
2059
|
-
*
|
|
2060
|
-
* @property {string} last_name - Last name of staff employee who does checkout
|
|
2061
|
-
* on behalf of customer
|
|
2062
|
-
* @property {string} first_name - First name of staff emplyee who does checkout
|
|
2063
|
-
* on behalf of customer
|
|
1695
|
+
* @property {string} [employee_code]
|
|
1696
|
+
* @property {string} _id
|
|
1697
|
+
* @property {string} user
|
|
1698
|
+
* @property {string} last_name
|
|
1699
|
+
* @property {string} first_name
|
|
2064
1700
|
*/
|
|
2065
1701
|
|
|
2066
1702
|
/**
|
|
2067
1703
|
* @typedef CustomerDetails
|
|
2068
|
-
* @property {string} [name]
|
|
2069
|
-
*
|
|
2070
|
-
* @property {string}
|
|
2071
|
-
* customer detail while checkout
|
|
2072
|
-
* @property {string} mobile - Mobile number of customer to be added in customer
|
|
2073
|
-
* detail while checkout
|
|
1704
|
+
* @property {string} [name]
|
|
1705
|
+
* @property {string} [email]
|
|
1706
|
+
* @property {string} mobile
|
|
2074
1707
|
*/
|
|
2075
1708
|
|
|
2076
1709
|
/**
|
|
2077
1710
|
* @typedef Files
|
|
2078
|
-
* @property {string} key
|
|
2079
|
-
* @property {string[]} values
|
|
2080
|
-
*/
|
|
2081
|
-
|
|
2082
|
-
/**
|
|
2083
|
-
* @typedef CartCheckoutCustomMeta
|
|
2084
|
-
* @property {string} key - Key name of custom meta
|
|
2085
|
-
* @property {string} value - Value to be added in key
|
|
2086
|
-
*/
|
|
2087
|
-
|
|
2088
|
-
/**
|
|
2089
|
-
* @typedef PlatformCartCheckoutDetailCreation
|
|
2090
|
-
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
2091
|
-
* @property {string} [address_id]
|
|
2092
|
-
* @property {string} [payment_identifier]
|
|
2093
|
-
* @property {Object} [payment_params]
|
|
2094
|
-
* @property {boolean} [payment_auto_confirm]
|
|
2095
|
-
* @property {string} id
|
|
2096
|
-
* @property {boolean} [pos]
|
|
2097
|
-
* @property {string} [billing_address_id]
|
|
2098
|
-
* @property {string} [merchant_code]
|
|
2099
|
-
* @property {string} [aggregator]
|
|
2100
|
-
* @property {number} [pick_at_store_uid]
|
|
2101
|
-
* @property {string} [device_id]
|
|
2102
|
-
* @property {Object} [delivery_address]
|
|
2103
|
-
* @property {string} payment_mode
|
|
2104
|
-
* @property {string} [checkout_mode]
|
|
2105
|
-
* @property {CustomerDetails} [customer_details] - Customer details
|
|
2106
|
-
* @property {Object} [meta]
|
|
2107
|
-
* @property {StaffCheckout} [staff]
|
|
2108
|
-
* @property {string} [employee_code]
|
|
2109
|
-
* @property {Object} [billing_address]
|
|
2110
|
-
* @property {string} [callback_url]
|
|
2111
|
-
* @property {string} [user_id]
|
|
2112
|
-
* @property {Object} [extra_meta]
|
|
2113
|
-
* @property {string} order_type
|
|
2114
|
-
* @property {Files[]} [files] - List of file url
|
|
2115
|
-
* @property {number} [ordering_store]
|
|
2116
|
-
* @property {Object} [payment_extra_identifiers]
|
|
2117
|
-
* @property {string} [iin]
|
|
2118
|
-
* @property {string} [network]
|
|
2119
|
-
* @property {string} [type]
|
|
2120
|
-
* @property {string} [card_id]
|
|
1711
|
+
* @property {string} key
|
|
1712
|
+
* @property {string[]} values
|
|
2121
1713
|
*/
|
|
2122
1714
|
|
|
2123
1715
|
/**
|
|
2124
1716
|
* @typedef CheckCart
|
|
2125
|
-
* @property {string} [coupon_text]
|
|
2126
|
-
* @property {string} [cod_message]
|
|
2127
|
-
* @property {string} [id]
|
|
2128
|
-
* @property {string} [store_code]
|
|
1717
|
+
* @property {string} [coupon_text]
|
|
1718
|
+
* @property {string} [cod_message]
|
|
1719
|
+
* @property {string} [id]
|
|
1720
|
+
* @property {string} [store_code]
|
|
2129
1721
|
* @property {ShipmentPromise} [delivery_promise]
|
|
2130
|
-
* @property {string} [comment]
|
|
2131
|
-
* @property {string} [user_type]
|
|
2132
|
-
* @property {CartProductInfo[]} [items]
|
|
2133
|
-
* @property {string} [error_message]
|
|
2134
|
-
*
|
|
2135
|
-
* @property {boolean} [success] - Success flag of checkout cart API response
|
|
1722
|
+
* @property {string} [comment]
|
|
1723
|
+
* @property {string} [user_type]
|
|
1724
|
+
* @property {CartProductInfo[]} [items]
|
|
1725
|
+
* @property {string} [error_message]
|
|
1726
|
+
* @property {boolean} [success]
|
|
2136
1727
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
2137
|
-
* @property {string} [delivery_charge_info]
|
|
2138
|
-
*
|
|
2139
|
-
* @property {
|
|
2140
|
-
*
|
|
2141
|
-
* @property {string} [order_id] - Order id generated after placing order
|
|
2142
|
-
* @property {string} [message] - Message of the cart checkout API response
|
|
1728
|
+
* @property {string} [delivery_charge_info]
|
|
1729
|
+
* @property {boolean} [restrict_checkout]
|
|
1730
|
+
* @property {string} [order_id]
|
|
1731
|
+
* @property {string} [message]
|
|
2143
1732
|
* @property {CartBreakup} [breakup_values]
|
|
2144
|
-
* @property {number} [cod_charges]
|
|
2145
|
-
* @property {boolean} [is_valid]
|
|
2146
|
-
*
|
|
2147
|
-
* @property {string} [
|
|
2148
|
-
* @property {string} [checkout_mode] - Checkout mode of user cart
|
|
1733
|
+
* @property {number} [cod_charges]
|
|
1734
|
+
* @property {boolean} [is_valid]
|
|
1735
|
+
* @property {string} [uid]
|
|
1736
|
+
* @property {string} [checkout_mode]
|
|
2149
1737
|
* @property {CartCurrency} [currency]
|
|
2150
|
-
* @property {string} [last_modified]
|
|
2151
|
-
* @property {boolean} [buy_now]
|
|
2152
|
-
* @property {number} [delivery_charge_order_value]
|
|
2153
|
-
* @property {number} [cart_id]
|
|
2154
|
-
* @property {Object[]} [store_emps]
|
|
2155
|
-
* @property {string} [gstin]
|
|
2156
|
-
* @property {boolean} [cod_available]
|
|
2157
|
-
* @property {number} [delivery_charges]
|
|
2158
|
-
*
|
|
2159
|
-
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
2160
|
-
* checkout API payload
|
|
2161
|
-
*/
|
|
2162
|
-
|
|
2163
|
-
/**
|
|
2164
|
-
* @typedef CartCheckoutDetails
|
|
2165
|
-
* @property {string} [app_intercept_url] - App intercept url which is used to
|
|
2166
|
-
* redirect on app after payment in confirmed/failed
|
|
2167
|
-
* @property {Object} [data] - Data of the user cart checkout includes cart
|
|
2168
|
-
* data, address, user id, order type etc
|
|
2169
|
-
* @property {CheckCart} [cart]
|
|
2170
|
-
* @property {boolean} [success] - Success flag of cart checkout API response
|
|
2171
|
-
* @property {string} [callback_url] - Callback url to be redirected after
|
|
2172
|
-
* payment received/failed
|
|
2173
|
-
* @property {string} [payment_confirm_url] - Payment confirm url used to
|
|
2174
|
-
* redirect after payment is confirmed
|
|
2175
|
-
* @property {string} [order_id] - Order id generated after placing order
|
|
2176
|
-
* @property {string} [message] - Message of the cart checkout v2 API response
|
|
1738
|
+
* @property {string} [last_modified]
|
|
1739
|
+
* @property {boolean} [buy_now]
|
|
1740
|
+
* @property {number} [delivery_charge_order_value]
|
|
1741
|
+
* @property {number} [cart_id]
|
|
1742
|
+
* @property {Object[]} [store_emps]
|
|
1743
|
+
* @property {string} [gstin]
|
|
1744
|
+
* @property {boolean} [cod_available]
|
|
1745
|
+
* @property {number} [delivery_charges]
|
|
1746
|
+
* @property {Object} [custom_cart_meta]
|
|
2177
1747
|
*/
|
|
2178
1748
|
|
|
2179
1749
|
/**
|
|
2180
|
-
* @typedef
|
|
1750
|
+
* @typedef CartCheckoutResponse
|
|
2181
1751
|
* @property {string} [app_intercept_url]
|
|
2182
1752
|
* @property {Object} [data]
|
|
2183
1753
|
* @property {CheckCart} [cart]
|
|
@@ -2189,204 +1759,157 @@ const Joi = require("joi");
|
|
|
2189
1759
|
*/
|
|
2190
1760
|
|
|
2191
1761
|
/**
|
|
2192
|
-
* @typedef
|
|
1762
|
+
* @typedef CartDeliveryModesResponse
|
|
2193
1763
|
* @property {number[]} [pickup_stores] - Store pick up available store uids
|
|
2194
1764
|
* @property {string[]} [available_modes] - Available delivery modes
|
|
2195
1765
|
*/
|
|
2196
1766
|
|
|
2197
1767
|
/**
|
|
2198
1768
|
* @typedef PickupStoreDetail
|
|
2199
|
-
* @property {string} [country]
|
|
2200
|
-
* @property {string} [state]
|
|
2201
|
-
* @property {string} [city]
|
|
2202
|
-
* @property {string} [phone]
|
|
2203
|
-
* @property {string} [area_code]
|
|
2204
|
-
* @property {number} [uid]
|
|
2205
|
-
* @property {string} [area_code_slug]
|
|
2206
|
-
*
|
|
2207
|
-
* @property {string} [
|
|
2208
|
-
* @property {
|
|
2209
|
-
* @property {
|
|
2210
|
-
* @property {string} [
|
|
2211
|
-
* @property {string} [
|
|
2212
|
-
* @property {string} [
|
|
2213
|
-
* @property {string} [
|
|
2214
|
-
* @property {
|
|
2215
|
-
* @property {
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
* @
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
* @
|
|
2226
|
-
* @property {string} [
|
|
2227
|
-
*
|
|
2228
|
-
* @property {string} [
|
|
2229
|
-
*
|
|
2230
|
-
* @property {string} [
|
|
2231
|
-
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2232
|
-
* selected to do the payment
|
|
2233
|
-
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2234
|
-
* mode selected to do the payment
|
|
2235
|
-
* @property {string} [id] - Cart id of the user cart
|
|
1769
|
+
* @property {string} [country]
|
|
1770
|
+
* @property {string} [state]
|
|
1771
|
+
* @property {string} [city]
|
|
1772
|
+
* @property {string} [phone]
|
|
1773
|
+
* @property {string} [area_code]
|
|
1774
|
+
* @property {number} [uid]
|
|
1775
|
+
* @property {string} [area_code_slug]
|
|
1776
|
+
* @property {string} [address_type]
|
|
1777
|
+
* @property {string} [area]
|
|
1778
|
+
* @property {number} [id]
|
|
1779
|
+
* @property {string} [store_manager_name]
|
|
1780
|
+
* @property {string} [name]
|
|
1781
|
+
* @property {string} [store_code]
|
|
1782
|
+
* @property {string} [landmark]
|
|
1783
|
+
* @property {string} [email]
|
|
1784
|
+
* @property {number} [pincode]
|
|
1785
|
+
* @property {string} [address]
|
|
1786
|
+
*/
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* @typedef StoreDetailsResponse
|
|
1790
|
+
* @property {PickupStoreDetail[]} [items]
|
|
1791
|
+
*/
|
|
1792
|
+
|
|
1793
|
+
/**
|
|
1794
|
+
* @typedef UpdateCartPaymentRequest
|
|
1795
|
+
* @property {string} [address_id]
|
|
1796
|
+
* @property {string} [payment_mode]
|
|
1797
|
+
* @property {string} [aggregator_name]
|
|
1798
|
+
* @property {string} [merchant_code]
|
|
1799
|
+
* @property {string} [payment_identifier]
|
|
1800
|
+
* @property {string} [id]
|
|
2236
1801
|
*/
|
|
2237
1802
|
|
|
2238
1803
|
/**
|
|
2239
1804
|
* @typedef CouponValidity
|
|
2240
|
-
* @property {string} [title]
|
|
2241
|
-
* @property {boolean} [next_validation_required]
|
|
2242
|
-
*
|
|
2243
|
-
* @property {
|
|
2244
|
-
*
|
|
2245
|
-
* @property {
|
|
2246
|
-
* @property {string} [code] - Coupon code of the coupon applied
|
|
2247
|
-
* @property {number} [discount] - Coupon discount value of the coupon applied
|
|
2248
|
-
* @property {string} [error_en] - Error message for the selected payment mode.
|
|
1805
|
+
* @property {string} [title]
|
|
1806
|
+
* @property {boolean} [next_validation_required]
|
|
1807
|
+
* @property {boolean} [valid]
|
|
1808
|
+
* @property {string} [display_message_en]
|
|
1809
|
+
* @property {string} [code]
|
|
1810
|
+
* @property {number} [discount]
|
|
2249
1811
|
*/
|
|
2250
1812
|
|
|
2251
1813
|
/**
|
|
2252
1814
|
* @typedef PaymentCouponValidate
|
|
2253
|
-
* @property {boolean} success
|
|
2254
|
-
* @property {string} [message]
|
|
1815
|
+
* @property {boolean} success
|
|
1816
|
+
* @property {string} [message]
|
|
2255
1817
|
* @property {CouponValidity} [coupon_validity]
|
|
2256
1818
|
*/
|
|
2257
1819
|
|
|
2258
1820
|
/**
|
|
2259
1821
|
* @typedef PaymentMeta
|
|
2260
|
-
* @property {string} [payment_gateway]
|
|
2261
|
-
* @property {string} [type]
|
|
2262
|
-
* @property {string} [payment_identifier]
|
|
2263
|
-
*
|
|
2264
|
-
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2265
|
-
* selected to do the payment
|
|
1822
|
+
* @property {string} [payment_gateway]
|
|
1823
|
+
* @property {string} [type]
|
|
1824
|
+
* @property {string} [payment_identifier]
|
|
1825
|
+
* @property {string} [merchant_code]
|
|
2266
1826
|
*/
|
|
2267
1827
|
|
|
2268
1828
|
/**
|
|
2269
1829
|
* @typedef PaymentMethod
|
|
2270
|
-
* @property {string} mode
|
|
2271
|
-
* @property {string} [payment]
|
|
1830
|
+
* @property {string} mode
|
|
1831
|
+
* @property {string} [payment]
|
|
2272
1832
|
* @property {PaymentMeta} payment_meta
|
|
2273
|
-
* @property {number} [amount]
|
|
2274
|
-
* @property {string} [name]
|
|
2275
|
-
* @property {Object} [payment_extra_identifiers]
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
* @
|
|
2281
|
-
* @property {string} [
|
|
2282
|
-
*
|
|
2283
|
-
* @property {
|
|
2284
|
-
*
|
|
2285
|
-
* @property {
|
|
2286
|
-
*
|
|
2287
|
-
* @property {
|
|
2288
|
-
*
|
|
2289
|
-
* @property {
|
|
2290
|
-
*
|
|
2291
|
-
* @property {string}
|
|
2292
|
-
* @property {
|
|
2293
|
-
*
|
|
2294
|
-
* @property {string} [
|
|
2295
|
-
*
|
|
2296
|
-
* @property {
|
|
2297
|
-
*
|
|
2298
|
-
* @property {string} [aggregator] - Aggregator name of the payment gateway
|
|
2299
|
-
* @property {number} [pick_at_store_uid] - Store id where we have to pick product
|
|
2300
|
-
* @property {string} [device_id] - Device id
|
|
2301
|
-
* @property {Object} [delivery_address] - Delivery address data which includes
|
|
2302
|
-
* customer address, customer phone, customer email, customer pincode,
|
|
2303
|
-
* customer landmark and customer name
|
|
2304
|
-
* @property {string} [payment_mode] - Payment mode from which the payment to be
|
|
2305
|
-
* done for the order
|
|
2306
|
-
* @property {string} [checkout_mode] - Mode of checkout used in cart
|
|
2307
|
-
* @property {CustomerDetails} [customer_details]
|
|
2308
|
-
* @property {Object} [meta] - Meta data to be added in order
|
|
2309
|
-
* @property {PaymentMethod[]} payment_methods - Payment methods list used to
|
|
2310
|
-
* make the payment
|
|
1833
|
+
* @property {number} [amount]
|
|
1834
|
+
* @property {string} [name]
|
|
1835
|
+
* @property {Object} [payment_extra_identifiers]
|
|
1836
|
+
*/
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* @typedef PlatformCartCheckoutDetailV2Request
|
|
1840
|
+
* @property {string} [address_id]
|
|
1841
|
+
* @property {string} [payment_identifier]
|
|
1842
|
+
* @property {Object} [payment_params]
|
|
1843
|
+
* @property {Object} [custom_meta]
|
|
1844
|
+
* @property {boolean} [payment_auto_confirm]
|
|
1845
|
+
* @property {string} id
|
|
1846
|
+
* @property {boolean} [pos]
|
|
1847
|
+
* @property {string} [billing_address_id]
|
|
1848
|
+
* @property {string} [merchant_code]
|
|
1849
|
+
* @property {string} [aggregator]
|
|
1850
|
+
* @property {number} [pick_at_store_uid]
|
|
1851
|
+
* @property {string} [device_id]
|
|
1852
|
+
* @property {Object} [delivery_address]
|
|
1853
|
+
* @property {string} [payment_mode]
|
|
1854
|
+
* @property {string} [checkout_mode]
|
|
1855
|
+
* @property {Object} [customer_details] - Customer details
|
|
1856
|
+
* @property {Object} [meta]
|
|
1857
|
+
* @property {PaymentMethod[]} payment_methods
|
|
2311
1858
|
* @property {StaffCheckout} [staff]
|
|
2312
|
-
* @property {string} [employee_code]
|
|
2313
|
-
*
|
|
2314
|
-
* @property {
|
|
2315
|
-
*
|
|
2316
|
-
*
|
|
2317
|
-
* @property {string}
|
|
2318
|
-
* @property {string} user_id - The user id of user cart
|
|
2319
|
-
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order
|
|
2320
|
-
* @property {string} order_type - Order type of the order being placed like
|
|
2321
|
-
* pickAtStore or HomeDelivery
|
|
1859
|
+
* @property {string} [employee_code]
|
|
1860
|
+
* @property {Object} [billing_address]
|
|
1861
|
+
* @property {string} [callback_url]
|
|
1862
|
+
* @property {string} user_id
|
|
1863
|
+
* @property {Object} [extra_meta]
|
|
1864
|
+
* @property {string} order_type
|
|
2322
1865
|
* @property {Files[]} [files] - List of file url
|
|
2323
|
-
* @property {number} [ordering_store]
|
|
2324
|
-
*
|
|
2325
|
-
* @property {string} [
|
|
2326
|
-
*
|
|
2327
|
-
* @property {string} [
|
|
2328
|
-
* the payment
|
|
2329
|
-
* @property {string} [type] - Type of cart if payment mode is card to do the payment
|
|
2330
|
-
* @property {string} [card_id] - Saved card id if payment mode is card to do the payment
|
|
1866
|
+
* @property {number} [ordering_store]
|
|
1867
|
+
* @property {string} [iin]
|
|
1868
|
+
* @property {string} [network]
|
|
1869
|
+
* @property {string} [type]
|
|
1870
|
+
* @property {string} [card_id]
|
|
2331
1871
|
*/
|
|
2332
1872
|
|
|
2333
1873
|
/**
|
|
2334
1874
|
* @typedef UpdateCartPaymentRequestV2
|
|
2335
|
-
* @property {string} [address_id]
|
|
2336
|
-
*
|
|
2337
|
-
* @property {string} [
|
|
2338
|
-
*
|
|
2339
|
-
* @property {string} [
|
|
2340
|
-
* @property {string} [
|
|
2341
|
-
* selected to do the payment
|
|
2342
|
-
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2343
|
-
* mode selected to do the payment
|
|
2344
|
-
* @property {string} [id] - Cart id of the user cart for which the update cart
|
|
2345
|
-
* payment operation performed
|
|
1875
|
+
* @property {string} [address_id]
|
|
1876
|
+
* @property {string} [payment_mode]
|
|
1877
|
+
* @property {string} [aggregator_name]
|
|
1878
|
+
* @property {string} [merchant_code]
|
|
1879
|
+
* @property {string} [payment_identifier]
|
|
1880
|
+
* @property {string} [id]
|
|
2346
1881
|
* @property {PaymentMethod[]} [payment_methods]
|
|
2347
1882
|
*/
|
|
2348
1883
|
|
|
2349
1884
|
/**
|
|
2350
1885
|
* @typedef PriceMinMax
|
|
2351
|
-
* @property {number} [min]
|
|
2352
|
-
* @property {number} [max]
|
|
1886
|
+
* @property {number} [min]
|
|
1887
|
+
* @property {number} [max]
|
|
2353
1888
|
*/
|
|
2354
1889
|
|
|
2355
1890
|
/**
|
|
2356
1891
|
* @typedef ItemPriceDetails
|
|
2357
1892
|
* @property {PriceMinMax} [marked]
|
|
2358
1893
|
* @property {PriceMinMax} [effective]
|
|
2359
|
-
* @property {string} [currency]
|
|
2360
|
-
*/
|
|
2361
|
-
|
|
2362
|
-
/**
|
|
2363
|
-
* @typedef ArticlePriceDetails
|
|
2364
|
-
* @property {number} [marked] - The Marked Price refers to the initial price of
|
|
2365
|
-
* the free gift article before product discount.
|
|
2366
|
-
* @property {number} [effective] - The Effective Price refers to the final
|
|
2367
|
-
* amount of the free gift article after applying the product discount.
|
|
1894
|
+
* @property {string} [currency]
|
|
2368
1895
|
*/
|
|
2369
1896
|
|
|
2370
1897
|
/**
|
|
2371
1898
|
* @typedef FreeGiftItems
|
|
2372
|
-
* @property {string} [item_slug] -
|
|
2373
|
-
* @property {string} [item_name] -
|
|
1899
|
+
* @property {string} [item_slug] - Item slug
|
|
1900
|
+
* @property {string} [item_name] - Item name
|
|
2374
1901
|
* @property {ItemPriceDetails} [item_price_details]
|
|
2375
|
-
* @property {
|
|
2376
|
-
* @property {
|
|
2377
|
-
* @property {
|
|
2378
|
-
* @property {string[]} [available_sizes] - Available sizes for the free gift item.
|
|
2379
|
-
* @property {string} [size] - Selected size for the free gift item.
|
|
2380
|
-
* @property {string[]} [item_images_url] - List of free gift product images URL
|
|
1902
|
+
* @property {string} [item_brand_name] - Item brand name
|
|
1903
|
+
* @property {number} [item_id] - Item id
|
|
1904
|
+
* @property {string[]} [item_images_url] - Item images URL
|
|
2381
1905
|
*/
|
|
2382
1906
|
|
|
2383
1907
|
/**
|
|
2384
1908
|
* @typedef PromotionOffer
|
|
2385
|
-
* @property {string} [id] - Promotion
|
|
1909
|
+
* @property {string} [id] - Promotion id
|
|
2386
1910
|
* @property {Object} [buy_rules] - Buy rules of promotions
|
|
2387
|
-
* @property {string} [offer_text] - Offer title
|
|
2388
|
-
* @property {string} [promotion_type] -
|
|
2389
|
-
* amount, bogo etc.
|
|
1911
|
+
* @property {string} [offer_text] - Offer title
|
|
1912
|
+
* @property {string} [promotion_type] - Promotion type
|
|
2390
1913
|
* @property {string} [promotion_name] - Name of the promotion
|
|
2391
1914
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
2392
1915
|
* @property {string} [valid_till] - Datetime ISOString for promotion end date
|
|
@@ -2396,47 +1919,36 @@ const Joi = require("joi");
|
|
|
2396
1919
|
*/
|
|
2397
1920
|
|
|
2398
1921
|
/**
|
|
2399
|
-
* @typedef
|
|
2400
|
-
* @property {PromotionOffer[]} [available_promotions]
|
|
2401
|
-
* promotion for product
|
|
1922
|
+
* @typedef PromotionOffersResponse
|
|
1923
|
+
* @property {PromotionOffer[]} [available_promotions]
|
|
2402
1924
|
*/
|
|
2403
1925
|
|
|
2404
1926
|
/**
|
|
2405
1927
|
* @typedef PromotionPaymentOffer
|
|
2406
|
-
* @property {string} [application_id] - Application id
|
|
1928
|
+
* @property {string} [application_id] - Application id
|
|
2407
1929
|
* @property {Object[]} [buy_rules] - Buy rules of promotions
|
|
2408
1930
|
* @property {string} [calculate_on] - Price on which promotion calculated
|
|
2409
1931
|
* @property {string} [description] - Offer details including T&C
|
|
2410
1932
|
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
2411
|
-
* @property {string} [id] - Promotion
|
|
2412
|
-
* @property {string} [offer_text] - Offer title
|
|
1933
|
+
* @property {string} [id] - Promotion id
|
|
1934
|
+
* @property {string} [offer_text] - Offer title
|
|
2413
1935
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
2414
|
-
* @property {string} [promotion_type] -
|
|
2415
|
-
* percentage etc.
|
|
1936
|
+
* @property {string} [promotion_type] - Promotion type
|
|
2416
1937
|
* @property {string} [promotion_name] - Name of the promotion
|
|
2417
1938
|
*/
|
|
2418
1939
|
|
|
2419
1940
|
/**
|
|
2420
|
-
* @typedef
|
|
2421
|
-
* @property {boolean} [success]
|
|
1941
|
+
* @typedef PromotionPaymentOffersResponse
|
|
1942
|
+
* @property {boolean} [success]
|
|
2422
1943
|
* @property {PromotionPaymentOffer[]} [promotions]
|
|
2423
1944
|
*/
|
|
2424
1945
|
|
|
2425
|
-
/**
|
|
2426
|
-
* @typedef ValidationError
|
|
2427
|
-
* @property {string} message - A brief description of the error encountered.
|
|
2428
|
-
* @property {string} field - The field in the request that caused the error.
|
|
2429
|
-
*/
|
|
2430
|
-
|
|
2431
1946
|
class CartPlatformModel {
|
|
2432
1947
|
/** @returns {CouponDateMeta} */
|
|
2433
1948
|
static CouponDateMeta() {
|
|
2434
1949
|
return Joi.object({
|
|
2435
1950
|
modified_on: Joi.string().allow("").allow(null),
|
|
2436
1951
|
created_on: Joi.string().allow("").allow(null),
|
|
2437
|
-
approved_on: Joi.string().allow("").allow(null),
|
|
2438
|
-
rejected_on: Joi.string().allow("").allow(null),
|
|
2439
|
-
reviewed_on: Joi.string().allow("").allow(null),
|
|
2440
1952
|
});
|
|
2441
1953
|
}
|
|
2442
1954
|
|
|
@@ -2444,7 +1956,7 @@ class CartPlatformModel {
|
|
|
2444
1956
|
static Ownership() {
|
|
2445
1957
|
return Joi.object({
|
|
2446
1958
|
payable_category: Joi.string().allow("").required(),
|
|
2447
|
-
payable_by: Joi.string().allow("").
|
|
1959
|
+
payable_by: Joi.string().allow("").required(),
|
|
2448
1960
|
});
|
|
2449
1961
|
}
|
|
2450
1962
|
|
|
@@ -2453,9 +1965,6 @@ class CartPlatformModel {
|
|
|
2453
1965
|
return Joi.object({
|
|
2454
1966
|
created_by: Joi.string().allow("").allow(null),
|
|
2455
1967
|
modified_by: Joi.string().allow("").allow(null),
|
|
2456
|
-
approved_by: Joi.string().allow("").allow(null),
|
|
2457
|
-
rejected_by: Joi.string().allow("").allow(null),
|
|
2458
|
-
reviewed_by: Joi.string().allow("").allow(null),
|
|
2459
1968
|
});
|
|
2460
1969
|
}
|
|
2461
1970
|
|
|
@@ -2529,7 +2038,7 @@ class CartPlatformModel {
|
|
|
2529
2038
|
/** @returns {Restrictions} */
|
|
2530
2039
|
static Restrictions() {
|
|
2531
2040
|
return Joi.object({
|
|
2532
|
-
payments: CartPlatformModel.PaymentModes(),
|
|
2041
|
+
payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
|
|
2533
2042
|
user_type: Joi.string().allow(""),
|
|
2534
2043
|
price_range: CartPlatformModel.PriceRange(),
|
|
2535
2044
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
@@ -2563,10 +2072,9 @@ class CartPlatformModel {
|
|
|
2563
2072
|
static CouponSchedule() {
|
|
2564
2073
|
return Joi.object({
|
|
2565
2074
|
end: Joi.string().allow("").allow(null),
|
|
2566
|
-
start: Joi.string().allow("")
|
|
2075
|
+
start: Joi.string().allow(""),
|
|
2567
2076
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2568
2077
|
cron: Joi.string().allow("").allow(null),
|
|
2569
|
-
status: Joi.string().allow(""),
|
|
2570
2078
|
duration: Joi.number().allow(null),
|
|
2571
2079
|
});
|
|
2572
2080
|
}
|
|
@@ -2630,11 +2138,11 @@ class CartPlatformModel {
|
|
|
2630
2138
|
return Joi.object({
|
|
2631
2139
|
currency_code: Joi.string().allow(""),
|
|
2632
2140
|
auto_apply: Joi.boolean(),
|
|
2633
|
-
type: Joi.string().allow(""),
|
|
2141
|
+
type: Joi.string().allow("").required(),
|
|
2634
2142
|
is_exact: Joi.boolean(),
|
|
2635
|
-
applicable_on: Joi.string().allow(""),
|
|
2636
|
-
calculate_on: Joi.string().allow(""),
|
|
2637
|
-
value_type: Joi.string().allow(""),
|
|
2143
|
+
applicable_on: Joi.string().allow("").required(),
|
|
2144
|
+
calculate_on: Joi.string().allow("").required(),
|
|
2145
|
+
value_type: Joi.string().allow("").required(),
|
|
2638
2146
|
scope: Joi.array().items(Joi.string().allow("")),
|
|
2639
2147
|
});
|
|
2640
2148
|
}
|
|
@@ -2643,24 +2151,21 @@ class CartPlatformModel {
|
|
|
2643
2151
|
static CouponAdd() {
|
|
2644
2152
|
return Joi.object({
|
|
2645
2153
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2646
|
-
ownership: CartPlatformModel.Ownership(),
|
|
2154
|
+
ownership: CartPlatformModel.Ownership().required(),
|
|
2647
2155
|
author: CartPlatformModel.CouponAuthor(),
|
|
2648
2156
|
state: CartPlatformModel.State(),
|
|
2649
2157
|
restrictions: CartPlatformModel.Restrictions(),
|
|
2650
2158
|
validation: CartPlatformModel.Validation(),
|
|
2651
2159
|
action: CartPlatformModel.CouponAction(),
|
|
2652
|
-
coupon_type: Joi.string().allow(""),
|
|
2653
|
-
coupon_prefix: Joi.string().allow("").allow(null),
|
|
2654
|
-
coupon_counts: Joi.number(),
|
|
2655
2160
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2656
2161
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2657
|
-
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2658
|
-
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2162
|
+
rule: Joi.array().items(CartPlatformModel.Rule()).required(),
|
|
2163
|
+
display_meta: CartPlatformModel.DisplayMeta().required(),
|
|
2659
2164
|
code: Joi.string().allow("").required(),
|
|
2660
2165
|
type_slug: Joi.string().allow("").required(),
|
|
2661
|
-
identifiers: CartPlatformModel.Identifier(),
|
|
2662
|
-
validity: CartPlatformModel.Validity(),
|
|
2663
|
-
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2166
|
+
identifiers: CartPlatformModel.Identifier().required(),
|
|
2167
|
+
validity: CartPlatformModel.Validity().required(),
|
|
2168
|
+
rule_definition: CartPlatformModel.RuleDefinition().required(),
|
|
2664
2169
|
_id: Joi.string().allow(""),
|
|
2665
2170
|
});
|
|
2666
2171
|
}
|
|
@@ -2678,8 +2183,8 @@ class CartPlatformModel {
|
|
|
2678
2183
|
});
|
|
2679
2184
|
}
|
|
2680
2185
|
|
|
2681
|
-
/** @returns {
|
|
2682
|
-
static
|
|
2186
|
+
/** @returns {CouponsResponse} */
|
|
2187
|
+
static CouponsResponse() {
|
|
2683
2188
|
return Joi.object({
|
|
2684
2189
|
items: Joi.array().items(CartPlatformModel.CouponAdd()),
|
|
2685
2190
|
page: CartPlatformModel.Page(),
|
|
@@ -2694,8 +2199,8 @@ class CartPlatformModel {
|
|
|
2694
2199
|
});
|
|
2695
2200
|
}
|
|
2696
2201
|
|
|
2697
|
-
/** @returns {
|
|
2698
|
-
static
|
|
2202
|
+
/** @returns {OperationErrorResponse} */
|
|
2203
|
+
static OperationErrorResponse() {
|
|
2699
2204
|
return Joi.object({
|
|
2700
2205
|
success: Joi.boolean(),
|
|
2701
2206
|
message: Joi.string().allow(""),
|
|
@@ -2707,7 +2212,7 @@ class CartPlatformModel {
|
|
|
2707
2212
|
static CouponUpdate() {
|
|
2708
2213
|
return Joi.object({
|
|
2709
2214
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2710
|
-
ownership: CartPlatformModel.Ownership(),
|
|
2215
|
+
ownership: CartPlatformModel.Ownership().required(),
|
|
2711
2216
|
author: CartPlatformModel.CouponAuthor(),
|
|
2712
2217
|
state: CartPlatformModel.State(),
|
|
2713
2218
|
restrictions: CartPlatformModel.Restrictions(),
|
|
@@ -2715,17 +2220,13 @@ class CartPlatformModel {
|
|
|
2715
2220
|
action: CartPlatformModel.CouponAction(),
|
|
2716
2221
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2717
2222
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2718
|
-
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2719
|
-
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2223
|
+
rule: Joi.array().items(CartPlatformModel.Rule()).required(),
|
|
2224
|
+
display_meta: CartPlatformModel.DisplayMeta().required(),
|
|
2720
2225
|
code: Joi.string().allow("").required(),
|
|
2721
|
-
coupon_type: Joi.string().allow(""),
|
|
2722
|
-
coupon_prefix: Joi.string().allow("").allow(null),
|
|
2723
|
-
coupon_counts: Joi.number(),
|
|
2724
|
-
reason: Joi.string().allow("").allow(null),
|
|
2725
2226
|
type_slug: Joi.string().allow("").required(),
|
|
2726
|
-
identifiers: CartPlatformModel.Identifier(),
|
|
2727
|
-
validity: CartPlatformModel.Validity(),
|
|
2728
|
-
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2227
|
+
identifiers: CartPlatformModel.Identifier().required(),
|
|
2228
|
+
validity: CartPlatformModel.Validity().required(),
|
|
2229
|
+
rule_definition: CartPlatformModel.RuleDefinition().required(),
|
|
2729
2230
|
});
|
|
2730
2231
|
}
|
|
2731
2232
|
|
|
@@ -2737,48 +2238,32 @@ class CartPlatformModel {
|
|
|
2737
2238
|
});
|
|
2738
2239
|
}
|
|
2739
2240
|
|
|
2740
|
-
/** @returns {CouponCreateResult} */
|
|
2741
|
-
static CouponCreateResult() {
|
|
2742
|
-
return Joi.object({
|
|
2743
|
-
success: Joi.boolean(),
|
|
2744
|
-
message: Joi.string().allow(""),
|
|
2745
|
-
_id: Joi.string().allow(""),
|
|
2746
|
-
});
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2749
2241
|
/** @returns {DisplayMeta1} */
|
|
2750
2242
|
static DisplayMeta1() {
|
|
2751
2243
|
return Joi.object({
|
|
2752
|
-
description: Joi.string().allow("")
|
|
2244
|
+
description: Joi.string().allow(""),
|
|
2753
2245
|
offer_label: Joi.string().allow(""),
|
|
2754
|
-
name: Joi.string().allow("")
|
|
2755
|
-
offer_text: Joi.string().allow("")
|
|
2246
|
+
name: Joi.string().allow(""),
|
|
2247
|
+
offer_text: Joi.string().allow(""),
|
|
2756
2248
|
});
|
|
2757
2249
|
}
|
|
2758
2250
|
|
|
2759
2251
|
/** @returns {Ownership1} */
|
|
2760
2252
|
static Ownership1() {
|
|
2761
2253
|
return Joi.object({
|
|
2762
|
-
payable_category: Joi.string().allow(""),
|
|
2763
|
-
payable_by: Joi.string().allow(""),
|
|
2254
|
+
payable_category: Joi.string().allow("").required(),
|
|
2255
|
+
payable_by: Joi.string().allow("").required(),
|
|
2764
2256
|
});
|
|
2765
2257
|
}
|
|
2766
2258
|
|
|
2767
2259
|
/** @returns {CompareObject} */
|
|
2768
2260
|
static CompareObject() {
|
|
2769
2261
|
return Joi.object({
|
|
2770
|
-
equals: Joi.number()
|
|
2771
|
-
greater_than: Joi.number()
|
|
2772
|
-
less_than_equals: Joi.number()
|
|
2773
|
-
less_than: Joi.number()
|
|
2774
|
-
greater_than_equals: Joi.number()
|
|
2775
|
-
});
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
/** @returns {ItemSizeMapping} */
|
|
2779
|
-
static ItemSizeMapping() {
|
|
2780
|
-
return Joi.object({
|
|
2781
|
-
item_size_mapping: Joi.object().pattern(/\S/, Joi.any()),
|
|
2262
|
+
equals: Joi.number(),
|
|
2263
|
+
greater_than: Joi.number(),
|
|
2264
|
+
less_than_equals: Joi.number(),
|
|
2265
|
+
less_than: Joi.number(),
|
|
2266
|
+
greater_than_equals: Joi.number(),
|
|
2782
2267
|
});
|
|
2783
2268
|
}
|
|
2784
2269
|
|
|
@@ -2822,7 +2307,7 @@ class CartPlatformModel {
|
|
|
2822
2307
|
discount_price: Joi.number(),
|
|
2823
2308
|
apportion_discount: Joi.boolean(),
|
|
2824
2309
|
partial_can_ret: Joi.boolean(),
|
|
2825
|
-
max_usage_per_transaction: Joi.number()
|
|
2310
|
+
max_usage_per_transaction: Joi.number(),
|
|
2826
2311
|
min_offer_quantity: Joi.number(),
|
|
2827
2312
|
code: Joi.string().allow(""),
|
|
2828
2313
|
discount_amount: Joi.number(),
|
|
@@ -2837,7 +2322,6 @@ class CartPlatformModel {
|
|
|
2837
2322
|
discount_type: Joi.string().allow("").required(),
|
|
2838
2323
|
buy_condition: Joi.string().allow("").required(),
|
|
2839
2324
|
item_criteria: CartPlatformModel.ItemCriteria().required(),
|
|
2840
|
-
meta: CartPlatformModel.ItemSizeMapping(),
|
|
2841
2325
|
offer: CartPlatformModel.DiscountOffer().required(),
|
|
2842
2326
|
});
|
|
2843
2327
|
}
|
|
@@ -2852,7 +2336,7 @@ class CartPlatformModel {
|
|
|
2852
2336
|
/** @returns {PromotionPaymentModes} */
|
|
2853
2337
|
static PromotionPaymentModes() {
|
|
2854
2338
|
return Joi.object({
|
|
2855
|
-
type: Joi.string().allow(""),
|
|
2339
|
+
type: Joi.string().allow("").required(),
|
|
2856
2340
|
uses: CartPlatformModel.PaymentAllowValue1(),
|
|
2857
2341
|
codes: Joi.array().items(Joi.string().allow("")),
|
|
2858
2342
|
});
|
|
@@ -2893,7 +2377,7 @@ class CartPlatformModel {
|
|
|
2893
2377
|
/** @returns {Restrictions1} */
|
|
2894
2378
|
static Restrictions1() {
|
|
2895
2379
|
return Joi.object({
|
|
2896
|
-
payments: CartPlatformModel.PaymentModes(),
|
|
2380
|
+
payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
|
|
2897
2381
|
user_registered: CartPlatformModel.UserRegistered(),
|
|
2898
2382
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
2899
2383
|
post_order: CartPlatformModel.PostOrder1(),
|
|
@@ -2901,7 +2385,7 @@ class CartPlatformModel {
|
|
|
2901
2385
|
order_quantity: Joi.number(),
|
|
2902
2386
|
anonymous_users: Joi.boolean(),
|
|
2903
2387
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
2904
|
-
uses: CartPlatformModel.UsesRestriction1(),
|
|
2388
|
+
uses: CartPlatformModel.UsesRestriction1().required(),
|
|
2905
2389
|
ordering_stores: Joi.array().items(Joi.number()),
|
|
2906
2390
|
});
|
|
2907
2391
|
}
|
|
@@ -2909,10 +2393,9 @@ class CartPlatformModel {
|
|
|
2909
2393
|
/** @returns {PromotionSchedule} */
|
|
2910
2394
|
static PromotionSchedule() {
|
|
2911
2395
|
return Joi.object({
|
|
2912
|
-
end: Joi.string().allow("").
|
|
2913
|
-
start: Joi.string().allow("").
|
|
2914
|
-
|
|
2915
|
-
published: Joi.boolean(),
|
|
2396
|
+
end: Joi.string().allow("").required(),
|
|
2397
|
+
start: Joi.string().allow("").required(),
|
|
2398
|
+
published: Joi.boolean().required(),
|
|
2916
2399
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2917
2400
|
cron: Joi.string().allow("").allow(null),
|
|
2918
2401
|
duration: Joi.number().allow(null),
|
|
@@ -2922,8 +2405,8 @@ class CartPlatformModel {
|
|
|
2922
2405
|
/** @returns {PromotionAction} */
|
|
2923
2406
|
static PromotionAction() {
|
|
2924
2407
|
return Joi.object({
|
|
2925
|
-
action_date: Joi.string().allow("").allow(null),
|
|
2926
|
-
action_type: Joi.string().allow(""),
|
|
2408
|
+
action_date: Joi.string().allow("").allow(null).required(),
|
|
2409
|
+
action_type: Joi.string().allow("").required(),
|
|
2927
2410
|
});
|
|
2928
2411
|
}
|
|
2929
2412
|
|
|
@@ -2932,17 +2415,14 @@ class CartPlatformModel {
|
|
|
2932
2415
|
return Joi.object({
|
|
2933
2416
|
created_by: Joi.string().allow("").allow(null),
|
|
2934
2417
|
modified_by: Joi.string().allow("").allow(null),
|
|
2935
|
-
approved_by: Joi.string().allow("").allow(null),
|
|
2936
|
-
rejected_by: Joi.string().allow("").allow(null),
|
|
2937
|
-
reviewed_by: Joi.string().allow("").allow(null),
|
|
2938
2418
|
});
|
|
2939
2419
|
}
|
|
2940
2420
|
|
|
2941
2421
|
/** @returns {Visibility} */
|
|
2942
2422
|
static Visibility() {
|
|
2943
2423
|
return Joi.object({
|
|
2944
|
-
coupon_list: Joi.boolean(),
|
|
2945
|
-
pdp: Joi.boolean(),
|
|
2424
|
+
coupon_list: Joi.boolean().required(),
|
|
2425
|
+
pdp: Joi.boolean().required(),
|
|
2946
2426
|
});
|
|
2947
2427
|
}
|
|
2948
2428
|
|
|
@@ -2951,9 +2431,6 @@ class CartPlatformModel {
|
|
|
2951
2431
|
return Joi.object({
|
|
2952
2432
|
modified_on: Joi.string().allow("").allow(null),
|
|
2953
2433
|
created_on: Joi.string().allow("").allow(null),
|
|
2954
|
-
approved_on: Joi.string().allow("").allow(null),
|
|
2955
|
-
rejected_on: Joi.string().allow("").allow(null),
|
|
2956
|
-
reviewed_on: Joi.string().allow("").allow(null),
|
|
2957
2434
|
});
|
|
2958
2435
|
}
|
|
2959
2436
|
|
|
@@ -2974,7 +2451,6 @@ class CartPlatformModel {
|
|
|
2974
2451
|
.required(),
|
|
2975
2452
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
2976
2453
|
currency: Joi.string().allow(""),
|
|
2977
|
-
is_processed: Joi.boolean(),
|
|
2978
2454
|
code: Joi.string().allow(""),
|
|
2979
2455
|
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
2980
2456
|
post_order_action: CartPlatformModel.PromotionAction(),
|
|
@@ -2982,16 +2458,18 @@ class CartPlatformModel {
|
|
|
2982
2458
|
author: CartPlatformModel.PromotionAuthor(),
|
|
2983
2459
|
visiblility: CartPlatformModel.Visibility(),
|
|
2984
2460
|
application_id: Joi.string().allow("").required(),
|
|
2985
|
-
buy_rules:
|
|
2986
|
-
|
|
2461
|
+
buy_rules: Joi.object()
|
|
2462
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2463
|
+
.required(),
|
|
2464
|
+
_custom_json: Joi.any(),
|
|
2987
2465
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
2988
2466
|
_id: Joi.string().allow(""),
|
|
2989
2467
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2990
2468
|
});
|
|
2991
2469
|
}
|
|
2992
2470
|
|
|
2993
|
-
/** @returns {
|
|
2994
|
-
static
|
|
2471
|
+
/** @returns {PromotionsResponse} */
|
|
2472
|
+
static PromotionsResponse() {
|
|
2995
2473
|
return Joi.object({
|
|
2996
2474
|
items: Joi.array().items(CartPlatformModel.PromotionListItem()),
|
|
2997
2475
|
page: CartPlatformModel.Page(),
|
|
@@ -3007,40 +2485,12 @@ class CartPlatformModel {
|
|
|
3007
2485
|
promo_group: Joi.string().allow("").required(),
|
|
3008
2486
|
mode: Joi.string().allow("").required(),
|
|
3009
2487
|
apply_all_discount: Joi.boolean(),
|
|
3010
|
-
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3011
|
-
ownership: CartPlatformModel.Ownership1(),
|
|
3012
|
-
promotion_type: Joi.string().allow("").required(),
|
|
3013
|
-
discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
|
|
3014
|
-
restrictions: CartPlatformModel.Restrictions1(),
|
|
3015
|
-
currency: Joi.string().allow(""),
|
|
3016
|
-
code: Joi.string().allow(""),
|
|
3017
|
-
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
3018
|
-
post_order_action: CartPlatformModel.PromotionAction(),
|
|
3019
|
-
apply_priority: Joi.number(),
|
|
3020
|
-
author: CartPlatformModel.PromotionAuthor(),
|
|
3021
|
-
visiblility: CartPlatformModel.Visibility(),
|
|
3022
|
-
application_id: Joi.string().allow("").required(),
|
|
3023
|
-
buy_rules: CartPlatformModel.ItemCriteria(),
|
|
3024
|
-
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
3025
|
-
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3026
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
3027
|
-
});
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
/** @returns {PromotionAddResult} */
|
|
3031
|
-
static PromotionAddResult() {
|
|
3032
|
-
return Joi.object({
|
|
3033
|
-
stackable: Joi.boolean(),
|
|
3034
|
-
calculate_on: Joi.string().allow(""),
|
|
3035
|
-
apply_exclusive: Joi.string().allow("").allow(null),
|
|
3036
|
-
promo_group: Joi.string().allow("").required(),
|
|
3037
|
-
mode: Joi.string().allow("").required(),
|
|
3038
|
-
is_processed: Joi.boolean(),
|
|
3039
|
-
apply_all_discount: Joi.boolean(),
|
|
3040
|
-
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3041
|
-
ownership: CartPlatformModel.Ownership1(),
|
|
2488
|
+
display_meta: CartPlatformModel.DisplayMeta1().required(),
|
|
2489
|
+
ownership: CartPlatformModel.Ownership1().required(),
|
|
3042
2490
|
promotion_type: Joi.string().allow("").required(),
|
|
3043
|
-
discount_rules: Joi.array()
|
|
2491
|
+
discount_rules: Joi.array()
|
|
2492
|
+
.items(CartPlatformModel.DiscountRule())
|
|
2493
|
+
.required(),
|
|
3044
2494
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
3045
2495
|
currency: Joi.string().allow(""),
|
|
3046
2496
|
code: Joi.string().allow(""),
|
|
@@ -3050,8 +2500,10 @@ class CartPlatformModel {
|
|
|
3050
2500
|
author: CartPlatformModel.PromotionAuthor(),
|
|
3051
2501
|
visiblility: CartPlatformModel.Visibility(),
|
|
3052
2502
|
application_id: Joi.string().allow("").required(),
|
|
3053
|
-
buy_rules:
|
|
3054
|
-
|
|
2503
|
+
buy_rules: Joi.object()
|
|
2504
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2505
|
+
.required(),
|
|
2506
|
+
_custom_json: Joi.any(),
|
|
3055
2507
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3056
2508
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3057
2509
|
});
|
|
@@ -3063,45 +2515,15 @@ class CartPlatformModel {
|
|
|
3063
2515
|
stackable: Joi.boolean(),
|
|
3064
2516
|
calculate_on: Joi.string().allow(""),
|
|
3065
2517
|
apply_exclusive: Joi.string().allow("").allow(null),
|
|
3066
|
-
reason: Joi.string().allow("").allow(null),
|
|
3067
|
-
promo_group: Joi.string().allow("").required(),
|
|
3068
|
-
mode: Joi.string().allow("").required(),
|
|
3069
|
-
apply_all_discount: Joi.boolean(),
|
|
3070
|
-
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3071
|
-
ownership: CartPlatformModel.Ownership1(),
|
|
3072
|
-
promotion_type: Joi.string().allow("").required(),
|
|
3073
|
-
discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
|
|
3074
|
-
restrictions: CartPlatformModel.Restrictions1(),
|
|
3075
|
-
currency: Joi.string().allow(""),
|
|
3076
|
-
code: Joi.string().allow(""),
|
|
3077
|
-
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
3078
|
-
post_order_action: CartPlatformModel.PromotionAction(),
|
|
3079
|
-
apply_priority: Joi.number(),
|
|
3080
|
-
author: CartPlatformModel.PromotionAuthor(),
|
|
3081
|
-
visiblility: CartPlatformModel.Visibility(),
|
|
3082
|
-
application_id: Joi.string().allow("").required(),
|
|
3083
|
-
buy_rules: CartPlatformModel.ItemCriteria(),
|
|
3084
|
-
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
3085
|
-
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3086
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
3087
|
-
});
|
|
3088
|
-
}
|
|
3089
|
-
|
|
3090
|
-
/** @returns {PromotionUpdateResult} */
|
|
3091
|
-
static PromotionUpdateResult() {
|
|
3092
|
-
return Joi.object({
|
|
3093
|
-
stackable: Joi.boolean(),
|
|
3094
|
-
calculate_on: Joi.string().allow(""),
|
|
3095
|
-
apply_exclusive: Joi.string().allow("").allow(null),
|
|
3096
|
-
reason: Joi.string().allow("").allow(null),
|
|
3097
|
-
is_processed: Joi.boolean(),
|
|
3098
2518
|
promo_group: Joi.string().allow("").required(),
|
|
3099
2519
|
mode: Joi.string().allow("").required(),
|
|
3100
2520
|
apply_all_discount: Joi.boolean(),
|
|
3101
|
-
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3102
|
-
ownership: CartPlatformModel.Ownership1(),
|
|
2521
|
+
display_meta: CartPlatformModel.DisplayMeta1().required(),
|
|
2522
|
+
ownership: CartPlatformModel.Ownership1().required(),
|
|
3103
2523
|
promotion_type: Joi.string().allow("").required(),
|
|
3104
|
-
discount_rules: Joi.array()
|
|
2524
|
+
discount_rules: Joi.array()
|
|
2525
|
+
.items(CartPlatformModel.DiscountRule())
|
|
2526
|
+
.required(),
|
|
3105
2527
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
3106
2528
|
currency: Joi.string().allow(""),
|
|
3107
2529
|
code: Joi.string().allow(""),
|
|
@@ -3111,8 +2533,10 @@ class CartPlatformModel {
|
|
|
3111
2533
|
author: CartPlatformModel.PromotionAuthor(),
|
|
3112
2534
|
visiblility: CartPlatformModel.Visibility(),
|
|
3113
2535
|
application_id: Joi.string().allow("").required(),
|
|
3114
|
-
buy_rules:
|
|
3115
|
-
|
|
2536
|
+
buy_rules: Joi.object()
|
|
2537
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2538
|
+
.required(),
|
|
2539
|
+
_custom_json: Joi.any(),
|
|
3116
2540
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3117
2541
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3118
2542
|
});
|
|
@@ -3126,8 +2550,8 @@ class CartPlatformModel {
|
|
|
3126
2550
|
});
|
|
3127
2551
|
}
|
|
3128
2552
|
|
|
3129
|
-
/** @returns {
|
|
3130
|
-
static
|
|
2553
|
+
/** @returns {ActivePromosResponse} */
|
|
2554
|
+
static ActivePromosResponse() {
|
|
3131
2555
|
return Joi.object({
|
|
3132
2556
|
entity_slug: Joi.string().allow(""),
|
|
3133
2557
|
title: Joi.string().allow(""),
|
|
@@ -3196,14 +2620,14 @@ class CartPlatformModel {
|
|
|
3196
2620
|
type: Joi.string().allow(""),
|
|
3197
2621
|
article_id: Joi.string().allow("").required(),
|
|
3198
2622
|
quantity: Joi.number(),
|
|
3199
|
-
meta: Joi.
|
|
2623
|
+
meta: Joi.any(),
|
|
3200
2624
|
});
|
|
3201
2625
|
}
|
|
3202
2626
|
|
|
3203
2627
|
/** @returns {PriceAdjustmentRestrictions} */
|
|
3204
2628
|
static PriceAdjustmentRestrictions() {
|
|
3205
2629
|
return Joi.object({
|
|
3206
|
-
post_order: Joi.
|
|
2630
|
+
post_order: Joi.any(),
|
|
3207
2631
|
});
|
|
3208
2632
|
}
|
|
3209
2633
|
|
|
@@ -3229,7 +2653,8 @@ class CartPlatformModel {
|
|
|
3229
2653
|
allowed_refund: Joi.boolean(),
|
|
3230
2654
|
is_authenticated: Joi.boolean().required(),
|
|
3231
2655
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3232
|
-
|
|
2656
|
+
auto_remove: Joi.boolean(),
|
|
2657
|
+
meta: Joi.any(),
|
|
3233
2658
|
cart_id: Joi.string().allow("").required(),
|
|
3234
2659
|
});
|
|
3235
2660
|
}
|
|
@@ -3248,20 +2673,21 @@ class CartPlatformModel {
|
|
|
3248
2673
|
allowed_refund: Joi.boolean(),
|
|
3249
2674
|
is_authenticated: Joi.boolean().required(),
|
|
3250
2675
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3251
|
-
|
|
2676
|
+
auto_remove: Joi.boolean(),
|
|
2677
|
+
meta: Joi.any(),
|
|
3252
2678
|
cart_id: Joi.string().allow("").required(),
|
|
3253
2679
|
});
|
|
3254
2680
|
}
|
|
3255
2681
|
|
|
3256
|
-
/** @returns {
|
|
3257
|
-
static
|
|
2682
|
+
/** @returns {PriceAdjustmentResponse} */
|
|
2683
|
+
static PriceAdjustmentResponse() {
|
|
3258
2684
|
return Joi.object({
|
|
3259
2685
|
data: CartPlatformModel.PriceAdjustment(),
|
|
3260
2686
|
});
|
|
3261
2687
|
}
|
|
3262
2688
|
|
|
3263
|
-
/** @returns {
|
|
3264
|
-
static
|
|
2689
|
+
/** @returns {GetPriceAdjustmentResponse} */
|
|
2690
|
+
static GetPriceAdjustmentResponse() {
|
|
3265
2691
|
return Joi.object({
|
|
3266
2692
|
data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
|
|
3267
2693
|
});
|
|
@@ -3281,8 +2707,9 @@ class CartPlatformModel {
|
|
|
3281
2707
|
allowed_refund: Joi.boolean(),
|
|
3282
2708
|
is_authenticated: Joi.boolean().required(),
|
|
3283
2709
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3284
|
-
meta: Joi.
|
|
2710
|
+
meta: Joi.any(),
|
|
3285
2711
|
cart_id: Joi.string().allow("").required(),
|
|
2712
|
+
auto_remove: Joi.boolean(),
|
|
3286
2713
|
});
|
|
3287
2714
|
}
|
|
3288
2715
|
|
|
@@ -3295,8 +2722,8 @@ class CartPlatformModel {
|
|
|
3295
2722
|
});
|
|
3296
2723
|
}
|
|
3297
2724
|
|
|
3298
|
-
/** @returns {
|
|
3299
|
-
static
|
|
2725
|
+
/** @returns {OpenapiCartDetailsRequest} */
|
|
2726
|
+
static OpenapiCartDetailsRequest() {
|
|
3300
2727
|
return Joi.object({
|
|
3301
2728
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3302
2729
|
});
|
|
@@ -3384,7 +2811,7 @@ class CartPlatformModel {
|
|
|
3384
2811
|
/** @returns {Tags} */
|
|
3385
2812
|
static Tags() {
|
|
3386
2813
|
return Joi.object({
|
|
3387
|
-
tags: Joi.
|
|
2814
|
+
tags: Joi.any(),
|
|
3388
2815
|
});
|
|
3389
2816
|
}
|
|
3390
2817
|
|
|
@@ -3403,28 +2830,12 @@ class CartPlatformModel {
|
|
|
3403
2830
|
});
|
|
3404
2831
|
}
|
|
3405
2832
|
|
|
3406
|
-
/** @returns {ProductActionParams} */
|
|
3407
|
-
static ProductActionParams() {
|
|
3408
|
-
return Joi.object({
|
|
3409
|
-
slug: Joi.array().items(Joi.string().allow("")),
|
|
3410
|
-
});
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
/** @returns {ProductActionPage} */
|
|
3414
|
-
static ProductActionPage() {
|
|
3415
|
-
return Joi.object({
|
|
3416
|
-
type: Joi.string().allow(""),
|
|
3417
|
-
params: CartPlatformModel.ProductActionParams(),
|
|
3418
|
-
});
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
2833
|
/** @returns {ProductAction} */
|
|
3422
2834
|
static ProductAction() {
|
|
3423
2835
|
return Joi.object({
|
|
3424
2836
|
type: Joi.string().allow(""),
|
|
3425
2837
|
url: Joi.string().allow(""),
|
|
3426
2838
|
query: CartPlatformModel.ActionQuery(),
|
|
3427
|
-
page: CartPlatformModel.ProductActionPage(),
|
|
3428
2839
|
});
|
|
3429
2840
|
}
|
|
3430
2841
|
|
|
@@ -3446,12 +2857,12 @@ class CartPlatformModel {
|
|
|
3446
2857
|
action: CartPlatformModel.ProductAction(),
|
|
3447
2858
|
uid: Joi.number(),
|
|
3448
2859
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3449
|
-
_custom_json: Joi.
|
|
2860
|
+
_custom_json: Joi.any(),
|
|
3450
2861
|
type: Joi.string().allow(""),
|
|
3451
2862
|
name: Joi.string().allow(""),
|
|
3452
2863
|
item_code: Joi.string().allow("").allow(null),
|
|
3453
2864
|
categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
|
|
3454
|
-
attributes: Joi.
|
|
2865
|
+
attributes: Joi.any(),
|
|
3455
2866
|
});
|
|
3456
2867
|
}
|
|
3457
2868
|
|
|
@@ -3488,19 +2899,19 @@ class CartPlatformModel {
|
|
|
3488
2899
|
seller_identifier: Joi.string().allow(""),
|
|
3489
2900
|
quantity: Joi.number(),
|
|
3490
2901
|
seller: CartPlatformModel.BaseInfo(),
|
|
3491
|
-
cart_item_meta: Joi.
|
|
3492
|
-
parent_item_identifiers: Joi.
|
|
2902
|
+
cart_item_meta: Joi.any(),
|
|
2903
|
+
parent_item_identifiers: Joi.any(),
|
|
3493
2904
|
is_gift_visible: Joi.boolean(),
|
|
3494
2905
|
uid: Joi.string().allow(""),
|
|
3495
|
-
gift_card: Joi.
|
|
2906
|
+
gift_card: Joi.any(),
|
|
3496
2907
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
3497
|
-
identifier: Joi.
|
|
2908
|
+
identifier: Joi.any(),
|
|
3498
2909
|
mto_quantity: Joi.number(),
|
|
3499
|
-
extra_meta: Joi.
|
|
2910
|
+
extra_meta: Joi.any(),
|
|
3500
2911
|
type: Joi.string().allow(""),
|
|
3501
|
-
_custom_json: Joi.
|
|
2912
|
+
_custom_json: Joi.any(),
|
|
3502
2913
|
price: CartPlatformModel.ArticlePriceInfo(),
|
|
3503
|
-
meta: Joi.
|
|
2914
|
+
meta: Joi.any(),
|
|
3504
2915
|
size: Joi.string().allow(""),
|
|
3505
2916
|
store: CartPlatformModel.StoreInfo(),
|
|
3506
2917
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -3518,9 +2929,9 @@ class CartPlatformModel {
|
|
|
3518
2929
|
/** @returns {DiscountRulesApp} */
|
|
3519
2930
|
static DiscountRulesApp() {
|
|
3520
2931
|
return Joi.object({
|
|
3521
|
-
offer: Joi.
|
|
3522
|
-
raw_offer: Joi.
|
|
3523
|
-
item_criteria: Joi.
|
|
2932
|
+
offer: Joi.any(),
|
|
2933
|
+
raw_offer: Joi.any(),
|
|
2934
|
+
item_criteria: Joi.any(),
|
|
3524
2935
|
matched_buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
3525
2936
|
});
|
|
3526
2937
|
}
|
|
@@ -3538,8 +2949,8 @@ class CartPlatformModel {
|
|
|
3538
2949
|
/** @returns {BuyRules} */
|
|
3539
2950
|
static BuyRules() {
|
|
3540
2951
|
return Joi.object({
|
|
3541
|
-
cart_conditions: Joi.
|
|
3542
|
-
item_criteria: Joi.
|
|
2952
|
+
cart_conditions: Joi.any(),
|
|
2953
|
+
item_criteria: Joi.any(),
|
|
3543
2954
|
});
|
|
3544
2955
|
}
|
|
3545
2956
|
|
|
@@ -3561,7 +2972,7 @@ class CartPlatformModel {
|
|
|
3561
2972
|
mrp_promotion: Joi.boolean(),
|
|
3562
2973
|
promotion_group: Joi.string().allow(""),
|
|
3563
2974
|
promo_id: Joi.string().allow(""),
|
|
3564
|
-
meta: Joi.
|
|
2975
|
+
meta: Joi.any(),
|
|
3565
2976
|
code: Joi.string().allow("").allow(null),
|
|
3566
2977
|
});
|
|
3567
2978
|
}
|
|
@@ -3671,7 +3082,7 @@ class CartPlatformModel {
|
|
|
3671
3082
|
quantity: Joi.number(),
|
|
3672
3083
|
product: CartPlatformModel.CartProduct(),
|
|
3673
3084
|
product_ean_id: Joi.string().allow(""),
|
|
3674
|
-
parent_item_identifiers: Joi.
|
|
3085
|
+
parent_item_identifiers: Joi.any(),
|
|
3675
3086
|
is_set: Joi.boolean(),
|
|
3676
3087
|
article: CartPlatformModel.ProductArticle(),
|
|
3677
3088
|
promotions_applied: Joi.array().items(
|
|
@@ -3680,22 +3091,22 @@ class CartPlatformModel {
|
|
|
3680
3091
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3681
3092
|
key: Joi.string().allow(""),
|
|
3682
3093
|
coupon: CartPlatformModel.CouponDetails(),
|
|
3683
|
-
bulk_offer: Joi.
|
|
3094
|
+
bulk_offer: Joi.any(),
|
|
3684
3095
|
price: CartPlatformModel.ProductPriceInfo(),
|
|
3685
3096
|
coupon_message: Joi.string().allow(""),
|
|
3686
3097
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
3687
3098
|
message: Joi.string().allow(""),
|
|
3688
3099
|
discount: Joi.string().allow(""),
|
|
3689
3100
|
availability: CartPlatformModel.ProductAvailability(),
|
|
3690
|
-
moq: Joi.
|
|
3101
|
+
moq: Joi.any(),
|
|
3691
3102
|
price_per_unit: CartPlatformModel.ProductPriceInfo(),
|
|
3692
3103
|
promo_meta: CartPlatformModel.PromoMeta(),
|
|
3693
|
-
custom_order: Joi.
|
|
3104
|
+
custom_order: Joi.any(),
|
|
3694
3105
|
});
|
|
3695
3106
|
}
|
|
3696
3107
|
|
|
3697
|
-
/** @returns {
|
|
3698
|
-
static
|
|
3108
|
+
/** @returns {OpenapiCartDetailsResponse} */
|
|
3109
|
+
static OpenapiCartDetailsResponse() {
|
|
3699
3110
|
return Joi.object({
|
|
3700
3111
|
is_valid: Joi.boolean(),
|
|
3701
3112
|
message: Joi.string().allow(""),
|
|
@@ -3704,12 +3115,12 @@ class CartPlatformModel {
|
|
|
3704
3115
|
});
|
|
3705
3116
|
}
|
|
3706
3117
|
|
|
3707
|
-
/** @returns {
|
|
3708
|
-
static
|
|
3118
|
+
/** @returns {OpenApiErrorResponse} */
|
|
3119
|
+
static OpenApiErrorResponse() {
|
|
3709
3120
|
return Joi.object({
|
|
3710
3121
|
success: Joi.boolean(),
|
|
3711
3122
|
message: Joi.string().allow(""),
|
|
3712
|
-
errors: Joi.
|
|
3123
|
+
errors: Joi.any(),
|
|
3713
3124
|
});
|
|
3714
3125
|
}
|
|
3715
3126
|
|
|
@@ -3723,7 +3134,7 @@ class CartPlatformModel {
|
|
|
3723
3134
|
area_code: Joi.string().allow("").required(),
|
|
3724
3135
|
country_iso_code: Joi.string().allow(""),
|
|
3725
3136
|
country_phone_code: Joi.string().allow(""),
|
|
3726
|
-
meta: Joi.
|
|
3137
|
+
meta: Joi.any(),
|
|
3727
3138
|
address_type: Joi.string().allow(""),
|
|
3728
3139
|
area: Joi.string().allow(""),
|
|
3729
3140
|
area_code_slug: Joi.string().allow(""),
|
|
@@ -3736,16 +3147,16 @@ class CartPlatformModel {
|
|
|
3736
3147
|
});
|
|
3737
3148
|
}
|
|
3738
3149
|
|
|
3739
|
-
/** @returns {
|
|
3740
|
-
static
|
|
3150
|
+
/** @returns {OpenApiCartServiceabilityRequest} */
|
|
3151
|
+
static OpenApiCartServiceabilityRequest() {
|
|
3741
3152
|
return Joi.object({
|
|
3742
3153
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3743
3154
|
shipping_address: CartPlatformModel.ShippingAddress().required(),
|
|
3744
3155
|
});
|
|
3745
3156
|
}
|
|
3746
3157
|
|
|
3747
|
-
/** @returns {
|
|
3748
|
-
static
|
|
3158
|
+
/** @returns {OpenApiCartServiceabilityResponse} */
|
|
3159
|
+
static OpenApiCartServiceabilityResponse() {
|
|
3749
3160
|
return Joi.object({
|
|
3750
3161
|
is_valid: Joi.boolean(),
|
|
3751
3162
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3776,7 +3187,7 @@ class CartPlatformModel {
|
|
|
3776
3187
|
return Joi.object({
|
|
3777
3188
|
payment_id: Joi.string().allow("").allow(null),
|
|
3778
3189
|
payment_gateway: Joi.string().allow("").allow(null),
|
|
3779
|
-
extra_meta: Joi.
|
|
3190
|
+
extra_meta: Joi.any().allow(null),
|
|
3780
3191
|
current_status: Joi.string().allow("").allow(null),
|
|
3781
3192
|
order_id: Joi.string().allow("").allow(null),
|
|
3782
3193
|
});
|
|
@@ -3804,7 +3215,7 @@ class CartPlatformModel {
|
|
|
3804
3215
|
price_marked: Joi.number().required(),
|
|
3805
3216
|
files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
|
|
3806
3217
|
meta: CartPlatformModel.CartItemMeta(),
|
|
3807
|
-
extra_meta: Joi.
|
|
3218
|
+
extra_meta: Joi.any(),
|
|
3808
3219
|
product_id: Joi.number().required(),
|
|
3809
3220
|
loyalty_discount: Joi.number(),
|
|
3810
3221
|
discount: Joi.number().required(),
|
|
@@ -3831,7 +3242,7 @@ class CartPlatformModel {
|
|
|
3831
3242
|
payment_methods: Joi.array()
|
|
3832
3243
|
.items(CartPlatformModel.MultiTenderPaymentMethod())
|
|
3833
3244
|
.required(),
|
|
3834
|
-
employee_discount: Joi.
|
|
3245
|
+
employee_discount: Joi.any(),
|
|
3835
3246
|
coupon: Joi.string().allow(""),
|
|
3836
3247
|
cashback_applied: Joi.number().required(),
|
|
3837
3248
|
gstin: Joi.string().allow("").allow(null),
|
|
@@ -3847,8 +3258,8 @@ class CartPlatformModel {
|
|
|
3847
3258
|
});
|
|
3848
3259
|
}
|
|
3849
3260
|
|
|
3850
|
-
/** @returns {
|
|
3851
|
-
static
|
|
3261
|
+
/** @returns {OpenApiCheckoutResponse} */
|
|
3262
|
+
static OpenApiCheckoutResponse() {
|
|
3852
3263
|
return Joi.object({
|
|
3853
3264
|
success: Joi.boolean(),
|
|
3854
3265
|
message: Joi.string().allow(""),
|
|
@@ -3861,48 +3272,46 @@ class CartPlatformModel {
|
|
|
3861
3272
|
static AbandonedCart() {
|
|
3862
3273
|
return Joi.object({
|
|
3863
3274
|
expire_at: Joi.string().allow("").required(),
|
|
3864
|
-
promotion: Joi.
|
|
3275
|
+
promotion: Joi.any(),
|
|
3865
3276
|
is_default: Joi.boolean().required(),
|
|
3866
3277
|
comment: Joi.string().allow("").allow(null),
|
|
3867
3278
|
articles: Joi.array().items(Joi.any()).required(),
|
|
3868
|
-
coupon: Joi.
|
|
3279
|
+
coupon: Joi.any().allow(null),
|
|
3869
3280
|
bulk_coupon_discount: Joi.number().allow(null),
|
|
3870
3281
|
_id: Joi.string().allow("").required(),
|
|
3871
|
-
fynd_credits: Joi.
|
|
3282
|
+
fynd_credits: Joi.any(),
|
|
3872
3283
|
fc_index_map: Joi.array().items(Joi.number()),
|
|
3873
3284
|
order_id: Joi.string().allow(""),
|
|
3874
3285
|
discount: Joi.number(),
|
|
3875
|
-
cod_charges: Joi.
|
|
3876
|
-
payments: Joi.
|
|
3286
|
+
cod_charges: Joi.any(),
|
|
3287
|
+
payments: Joi.any().allow(null),
|
|
3877
3288
|
payment_mode: Joi.string().allow("").allow(null),
|
|
3878
3289
|
shipments: Joi.array().items(Joi.any()),
|
|
3879
|
-
pick_up_customer_details: Joi.
|
|
3880
|
-
.pattern(/\S/, Joi.any())
|
|
3881
|
-
.allow(null, ""),
|
|
3290
|
+
pick_up_customer_details: Joi.any().allow(null),
|
|
3882
3291
|
uid: Joi.number().required(),
|
|
3883
3292
|
checkout_mode: Joi.string().allow(""),
|
|
3884
3293
|
cart_value: Joi.number(),
|
|
3885
3294
|
is_archive: Joi.boolean(),
|
|
3886
3295
|
created_on: Joi.string().allow("").required(),
|
|
3887
3296
|
last_modified: Joi.string().allow("").required(),
|
|
3888
|
-
meta: Joi.
|
|
3297
|
+
meta: Joi.any().allow(null),
|
|
3889
3298
|
buy_now: Joi.boolean(),
|
|
3890
3299
|
is_active: Joi.boolean(),
|
|
3891
|
-
cashback: Joi.
|
|
3300
|
+
cashback: Joi.any().required(),
|
|
3892
3301
|
payment_methods: Joi.array().items(Joi.any()),
|
|
3893
3302
|
gstin: Joi.string().allow("").allow(null),
|
|
3894
|
-
delivery_charges: Joi.
|
|
3303
|
+
delivery_charges: Joi.any(),
|
|
3895
3304
|
merge_qty: Joi.boolean().allow(null),
|
|
3896
3305
|
user_id: Joi.string().allow("").required(),
|
|
3897
3306
|
app_id: Joi.string().allow(""),
|
|
3898
3307
|
});
|
|
3899
3308
|
}
|
|
3900
3309
|
|
|
3901
|
-
/** @returns {
|
|
3902
|
-
static
|
|
3310
|
+
/** @returns {AbandonedCartResponse} */
|
|
3311
|
+
static AbandonedCartResponse() {
|
|
3903
3312
|
return Joi.object({
|
|
3904
3313
|
items: Joi.array().items(CartPlatformModel.AbandonedCart()),
|
|
3905
|
-
result: Joi.
|
|
3314
|
+
result: Joi.any(),
|
|
3906
3315
|
page: CartPlatformModel.Page(),
|
|
3907
3316
|
success: Joi.boolean(),
|
|
3908
3317
|
message: Joi.string().allow(""),
|
|
@@ -3971,14 +3380,14 @@ class CartPlatformModel {
|
|
|
3971
3380
|
});
|
|
3972
3381
|
}
|
|
3973
3382
|
|
|
3974
|
-
/** @returns {
|
|
3975
|
-
static
|
|
3383
|
+
/** @returns {CartDetailResponse} */
|
|
3384
|
+
static CartDetailResponse() {
|
|
3976
3385
|
return Joi.object({
|
|
3977
3386
|
cart_id: Joi.number(),
|
|
3978
3387
|
uid: Joi.string().allow(""),
|
|
3979
3388
|
coupon_text: Joi.string().allow(""),
|
|
3980
3389
|
id: Joi.string().allow(""),
|
|
3981
|
-
pan_config: Joi.
|
|
3390
|
+
pan_config: Joi.any(),
|
|
3982
3391
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3983
3392
|
comment: Joi.string().allow(""),
|
|
3984
3393
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3988,7 +3397,7 @@ class CartPlatformModel {
|
|
|
3988
3397
|
coupon: CartPlatformModel.CartDetailCoupon(),
|
|
3989
3398
|
restrict_checkout: Joi.boolean(),
|
|
3990
3399
|
message: Joi.string().allow(""),
|
|
3991
|
-
notification: Joi.
|
|
3400
|
+
notification: Joi.any(),
|
|
3992
3401
|
staff_user_id: Joi.string().allow(""),
|
|
3993
3402
|
success: Joi.boolean(),
|
|
3994
3403
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
@@ -4002,7 +3411,7 @@ class CartPlatformModel {
|
|
|
4002
3411
|
CartPlatformModel.AppliedPromotion()
|
|
4003
3412
|
),
|
|
4004
3413
|
pan_no: Joi.string().allow(""),
|
|
4005
|
-
custom_cart_meta: Joi.
|
|
3414
|
+
custom_cart_meta: Joi.any(),
|
|
4006
3415
|
});
|
|
4007
3416
|
}
|
|
4008
3417
|
|
|
@@ -4017,31 +3426,31 @@ class CartPlatformModel {
|
|
|
4017
3426
|
),
|
|
4018
3427
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
4019
3428
|
article_id: Joi.string().allow(""),
|
|
4020
|
-
article_assignment: Joi.
|
|
3429
|
+
article_assignment: Joi.any(),
|
|
4021
3430
|
store_id: Joi.number(),
|
|
4022
3431
|
display: Joi.string().allow(""),
|
|
4023
3432
|
item_id: Joi.number(),
|
|
4024
|
-
extra_meta: Joi.
|
|
4025
|
-
_custom_json: Joi.
|
|
4026
|
-
meta: Joi.
|
|
3433
|
+
extra_meta: Joi.any(),
|
|
3434
|
+
_custom_json: Joi.any(),
|
|
3435
|
+
meta: Joi.any(),
|
|
4027
3436
|
pos: Joi.boolean(),
|
|
4028
3437
|
seller_identifier: Joi.string().allow(""),
|
|
4029
3438
|
});
|
|
4030
3439
|
}
|
|
4031
3440
|
|
|
4032
|
-
/** @returns {
|
|
4033
|
-
static
|
|
3441
|
+
/** @returns {AddCartRequest} */
|
|
3442
|
+
static AddCartRequest() {
|
|
4034
3443
|
return Joi.object({
|
|
4035
3444
|
new_cart: Joi.boolean(),
|
|
4036
3445
|
items: Joi.array().items(CartPlatformModel.AddProductCart()),
|
|
4037
3446
|
});
|
|
4038
3447
|
}
|
|
4039
3448
|
|
|
4040
|
-
/** @returns {
|
|
4041
|
-
static
|
|
3449
|
+
/** @returns {AddCartDetailResponse} */
|
|
3450
|
+
static AddCartDetailResponse() {
|
|
4042
3451
|
return Joi.object({
|
|
4043
3452
|
success: Joi.boolean(),
|
|
4044
|
-
cart: CartPlatformModel.
|
|
3453
|
+
cart: CartPlatformModel.CartDetailResponse(),
|
|
4045
3454
|
partial: Joi.boolean(),
|
|
4046
3455
|
message: Joi.string().allow(""),
|
|
4047
3456
|
});
|
|
@@ -4052,10 +3461,10 @@ class CartPlatformModel {
|
|
|
4052
3461
|
return Joi.object({
|
|
4053
3462
|
quantity: Joi.number(),
|
|
4054
3463
|
item_size: Joi.string().allow(""),
|
|
4055
|
-
parent_item_identifiers: Joi.
|
|
4056
|
-
meta: Joi.
|
|
4057
|
-
extra_meta: Joi.
|
|
4058
|
-
_custom_json: Joi.
|
|
3464
|
+
parent_item_identifiers: Joi.any(),
|
|
3465
|
+
meta: Joi.any(),
|
|
3466
|
+
extra_meta: Joi.any(),
|
|
3467
|
+
_custom_json: Joi.any(),
|
|
4059
3468
|
item_id: Joi.number(),
|
|
4060
3469
|
item_index: Joi.number(),
|
|
4061
3470
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
@@ -4063,31 +3472,19 @@ class CartPlatformModel {
|
|
|
4063
3472
|
});
|
|
4064
3473
|
}
|
|
4065
3474
|
|
|
4066
|
-
/** @returns {
|
|
4067
|
-
static
|
|
4068
|
-
return Joi.object({
|
|
4069
|
-
promotion_id: Joi.string().allow("").required(),
|
|
4070
|
-
item_id: Joi.string().allow("").required(),
|
|
4071
|
-
item_size: Joi.string().allow("").required(),
|
|
4072
|
-
});
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4075
|
-
/** @returns {UpdateCartCreation} */
|
|
4076
|
-
static UpdateCartCreation() {
|
|
3475
|
+
/** @returns {UpdateCartRequest} */
|
|
3476
|
+
static UpdateCartRequest() {
|
|
4077
3477
|
return Joi.object({
|
|
4078
3478
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4079
|
-
free_gift_items: Joi.array().items(
|
|
4080
|
-
CartPlatformModel.FreeGiftItemCreation()
|
|
4081
|
-
),
|
|
4082
3479
|
operation: Joi.string().allow("").required(),
|
|
4083
3480
|
});
|
|
4084
3481
|
}
|
|
4085
3482
|
|
|
4086
|
-
/** @returns {
|
|
4087
|
-
static
|
|
3483
|
+
/** @returns {UpdateCartDetailResponse} */
|
|
3484
|
+
static UpdateCartDetailResponse() {
|
|
4088
3485
|
return Joi.object({
|
|
4089
3486
|
success: Joi.boolean(),
|
|
4090
|
-
cart: CartPlatformModel.
|
|
3487
|
+
cart: CartPlatformModel.CartDetailResponse(),
|
|
4091
3488
|
message: Joi.string().allow(""),
|
|
4092
3489
|
});
|
|
4093
3490
|
}
|
|
@@ -4113,7 +3510,7 @@ class CartPlatformModel {
|
|
|
4113
3510
|
price_marked: Joi.number().required(),
|
|
4114
3511
|
amount_paid: Joi.number().required(),
|
|
4115
3512
|
promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
|
|
4116
|
-
extra_meta: Joi.
|
|
3513
|
+
extra_meta: Joi.any(),
|
|
4117
3514
|
item_id: Joi.number().required(),
|
|
4118
3515
|
discount: Joi.number().required(),
|
|
4119
3516
|
price_effective: Joi.number().required(),
|
|
@@ -4125,9 +3522,9 @@ class CartPlatformModel {
|
|
|
4125
3522
|
return Joi.object({
|
|
4126
3523
|
cart_id: Joi.string().allow("").required(),
|
|
4127
3524
|
payment_mode: Joi.string().allow("").required(),
|
|
4128
|
-
billing_address: Joi.
|
|
3525
|
+
billing_address: Joi.any(),
|
|
4129
3526
|
merchant_code: Joi.string().allow("").required(),
|
|
4130
|
-
payment_identifier: Joi.string().allow("").required(),
|
|
3527
|
+
payment_identifier: Joi.string().allow("").allow(null).required(),
|
|
4131
3528
|
currency_code: Joi.string().allow("").required(),
|
|
4132
3529
|
aggregator: Joi.string().allow("").required(),
|
|
4133
3530
|
order_type: Joi.string().allow("").required(),
|
|
@@ -4136,31 +3533,31 @@ class CartPlatformModel {
|
|
|
4136
3533
|
.items(CartPlatformModel.OverrideCartItem())
|
|
4137
3534
|
.required(),
|
|
4138
3535
|
ordering_store: Joi.number().allow(null),
|
|
4139
|
-
shipping_address: Joi.
|
|
3536
|
+
shipping_address: Joi.any(),
|
|
4140
3537
|
});
|
|
4141
3538
|
}
|
|
4142
3539
|
|
|
4143
|
-
/** @returns {
|
|
4144
|
-
static
|
|
3540
|
+
/** @returns {OverrideCheckoutResponse} */
|
|
3541
|
+
static OverrideCheckoutResponse() {
|
|
4145
3542
|
return Joi.object({
|
|
4146
|
-
data: Joi.
|
|
4147
|
-
cart: Joi.
|
|
3543
|
+
data: Joi.any().required(),
|
|
3544
|
+
cart: Joi.any().required(),
|
|
4148
3545
|
success: Joi.string().allow("").required(),
|
|
4149
3546
|
order_id: Joi.string().allow("").required(),
|
|
4150
3547
|
message: Joi.string().allow("").required(),
|
|
4151
3548
|
});
|
|
4152
3549
|
}
|
|
4153
3550
|
|
|
4154
|
-
/** @returns {
|
|
4155
|
-
static
|
|
3551
|
+
/** @returns {GetShareCartLinkRequest} */
|
|
3552
|
+
static GetShareCartLinkRequest() {
|
|
4156
3553
|
return Joi.object({
|
|
4157
3554
|
id: Joi.string().allow(""),
|
|
4158
|
-
meta: Joi.
|
|
3555
|
+
meta: Joi.any(),
|
|
4159
3556
|
});
|
|
4160
3557
|
}
|
|
4161
3558
|
|
|
4162
|
-
/** @returns {
|
|
4163
|
-
static
|
|
3559
|
+
/** @returns {GetShareCartLinkResponse} */
|
|
3560
|
+
static GetShareCartLinkResponse() {
|
|
4164
3561
|
return Joi.object({
|
|
4165
3562
|
token: Joi.string().allow(""),
|
|
4166
3563
|
share_url: Joi.string().allow(""),
|
|
@@ -4170,11 +3567,11 @@ class CartPlatformModel {
|
|
|
4170
3567
|
/** @returns {SharedCartDetails} */
|
|
4171
3568
|
static SharedCartDetails() {
|
|
4172
3569
|
return Joi.object({
|
|
4173
|
-
source: Joi.
|
|
4174
|
-
user: Joi.
|
|
3570
|
+
source: Joi.any(),
|
|
3571
|
+
user: Joi.any(),
|
|
4175
3572
|
token: Joi.string().allow(""),
|
|
4176
3573
|
created_on: Joi.string().allow(""),
|
|
4177
|
-
meta: Joi.
|
|
3574
|
+
meta: Joi.any(),
|
|
4178
3575
|
});
|
|
4179
3576
|
}
|
|
4180
3577
|
|
|
@@ -4200,12 +3597,12 @@ class CartPlatformModel {
|
|
|
4200
3597
|
buy_now: Joi.boolean(),
|
|
4201
3598
|
cart_id: Joi.number(),
|
|
4202
3599
|
gstin: Joi.string().allow(""),
|
|
4203
|
-
custom_cart_meta: Joi.
|
|
3600
|
+
custom_cart_meta: Joi.any(),
|
|
4204
3601
|
});
|
|
4205
3602
|
}
|
|
4206
3603
|
|
|
4207
|
-
/** @returns {
|
|
4208
|
-
static
|
|
3604
|
+
/** @returns {SharedCartResponse} */
|
|
3605
|
+
static SharedCartResponse() {
|
|
4209
3606
|
return Joi.object({
|
|
4210
3607
|
cart: CartPlatformModel.SharedCart(),
|
|
4211
3608
|
error: Joi.string().allow(""),
|
|
@@ -4216,7 +3613,7 @@ class CartPlatformModel {
|
|
|
4216
3613
|
static CartList() {
|
|
4217
3614
|
return Joi.object({
|
|
4218
3615
|
cart_id: Joi.string().allow(""),
|
|
4219
|
-
pick_up_customer_details: Joi.
|
|
3616
|
+
pick_up_customer_details: Joi.any(),
|
|
4220
3617
|
cart_value: Joi.number(),
|
|
4221
3618
|
created_on: Joi.string().allow(""),
|
|
4222
3619
|
user_id: Joi.string().allow(""),
|
|
@@ -4225,8 +3622,8 @@ class CartPlatformModel {
|
|
|
4225
3622
|
});
|
|
4226
3623
|
}
|
|
4227
3624
|
|
|
4228
|
-
/** @returns {
|
|
4229
|
-
static
|
|
3625
|
+
/** @returns {MultiCartResponse} */
|
|
3626
|
+
static MultiCartResponse() {
|
|
4230
3627
|
return Joi.object({
|
|
4231
3628
|
success: Joi.boolean(),
|
|
4232
3629
|
data: Joi.array().items(CartPlatformModel.CartList()),
|
|
@@ -4255,13 +3652,13 @@ class CartPlatformModel {
|
|
|
4255
3652
|
});
|
|
4256
3653
|
}
|
|
4257
3654
|
|
|
4258
|
-
/** @returns {
|
|
4259
|
-
static
|
|
3655
|
+
/** @returns {UserCartMappingResponse} */
|
|
3656
|
+
static UserCartMappingResponse() {
|
|
4260
3657
|
return Joi.object({
|
|
4261
3658
|
coupon_text: Joi.string().allow(""),
|
|
4262
3659
|
user: CartPlatformModel.UserInfo(),
|
|
4263
3660
|
id: Joi.string().allow(""),
|
|
4264
|
-
pan_config: Joi.
|
|
3661
|
+
pan_config: Joi.any(),
|
|
4265
3662
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
4266
3663
|
comment: Joi.string().allow(""),
|
|
4267
3664
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -4276,7 +3673,7 @@ class CartPlatformModel {
|
|
|
4276
3673
|
last_modified: Joi.string().allow(""),
|
|
4277
3674
|
buy_now: Joi.boolean(),
|
|
4278
3675
|
gstin: Joi.string().allow(""),
|
|
4279
|
-
custom_cart_meta: Joi.
|
|
3676
|
+
custom_cart_meta: Joi.any(),
|
|
4280
3677
|
applied_promo_details: Joi.array().items(
|
|
4281
3678
|
CartPlatformModel.AppliedPromotion()
|
|
4282
3679
|
),
|
|
@@ -4284,8 +3681,8 @@ class CartPlatformModel {
|
|
|
4284
3681
|
});
|
|
4285
3682
|
}
|
|
4286
3683
|
|
|
4287
|
-
/** @returns {
|
|
4288
|
-
static
|
|
3684
|
+
/** @returns {PlatformAddCartRequest} */
|
|
3685
|
+
static PlatformAddCartRequest() {
|
|
4289
3686
|
return Joi.object({
|
|
4290
3687
|
user_id: Joi.string().allow(""),
|
|
4291
3688
|
new_cart: Joi.boolean(),
|
|
@@ -4293,35 +3690,32 @@ class CartPlatformModel {
|
|
|
4293
3690
|
});
|
|
4294
3691
|
}
|
|
4295
3692
|
|
|
4296
|
-
/** @returns {
|
|
4297
|
-
static
|
|
3693
|
+
/** @returns {PlatformUpdateCartRequest} */
|
|
3694
|
+
static PlatformUpdateCartRequest() {
|
|
4298
3695
|
return Joi.object({
|
|
4299
3696
|
user_id: Joi.string().allow(""),
|
|
4300
3697
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4301
|
-
free_gift_items: Joi.array().items(
|
|
4302
|
-
CartPlatformModel.FreeGiftItemCreation()
|
|
4303
|
-
),
|
|
4304
3698
|
operation: Joi.string().allow("").required(),
|
|
4305
3699
|
});
|
|
4306
3700
|
}
|
|
4307
3701
|
|
|
4308
|
-
/** @returns {
|
|
4309
|
-
static
|
|
3702
|
+
/** @returns {DeleteCartRequest} */
|
|
3703
|
+
static DeleteCartRequest() {
|
|
4310
3704
|
return Joi.object({
|
|
4311
3705
|
cart_id_list: Joi.array().items(Joi.string().allow("")),
|
|
4312
3706
|
});
|
|
4313
3707
|
}
|
|
4314
3708
|
|
|
4315
|
-
/** @returns {
|
|
4316
|
-
static
|
|
3709
|
+
/** @returns {DeleteCartDetailResponse} */
|
|
3710
|
+
static DeleteCartDetailResponse() {
|
|
4317
3711
|
return Joi.object({
|
|
4318
3712
|
success: Joi.boolean(),
|
|
4319
3713
|
message: Joi.string().allow(""),
|
|
4320
3714
|
});
|
|
4321
3715
|
}
|
|
4322
3716
|
|
|
4323
|
-
/** @returns {
|
|
4324
|
-
static
|
|
3717
|
+
/** @returns {CartItemCountResponse} */
|
|
3718
|
+
static CartItemCountResponse() {
|
|
4325
3719
|
return Joi.object({
|
|
4326
3720
|
user_cart_items_count: Joi.number(),
|
|
4327
3721
|
});
|
|
@@ -4359,16 +3753,16 @@ class CartPlatformModel {
|
|
|
4359
3753
|
});
|
|
4360
3754
|
}
|
|
4361
3755
|
|
|
4362
|
-
/** @returns {
|
|
4363
|
-
static
|
|
3756
|
+
/** @returns {GetCouponResponse} */
|
|
3757
|
+
static GetCouponResponse() {
|
|
4364
3758
|
return Joi.object({
|
|
4365
3759
|
available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
|
|
4366
3760
|
page: CartPlatformModel.PageCoupon(),
|
|
4367
3761
|
});
|
|
4368
3762
|
}
|
|
4369
3763
|
|
|
4370
|
-
/** @returns {
|
|
4371
|
-
static
|
|
3764
|
+
/** @returns {ApplyCouponRequest} */
|
|
3765
|
+
static ApplyCouponRequest() {
|
|
4372
3766
|
return Joi.object({
|
|
4373
3767
|
coupon_code: Joi.string().allow("").required(),
|
|
4374
3768
|
});
|
|
@@ -4399,10 +3793,10 @@ class CartPlatformModel {
|
|
|
4399
3793
|
email: Joi.string().allow(""),
|
|
4400
3794
|
area_code: Joi.string().allow(""),
|
|
4401
3795
|
checkout_mode: Joi.string().allow(""),
|
|
4402
|
-
meta: Joi.
|
|
3796
|
+
meta: Joi.any(),
|
|
4403
3797
|
is_active: Joi.boolean(),
|
|
4404
3798
|
name: Joi.string().allow(""),
|
|
4405
|
-
google_map_point: Joi.
|
|
3799
|
+
google_map_point: Joi.any(),
|
|
4406
3800
|
cart_id: Joi.string().allow(""),
|
|
4407
3801
|
city: Joi.string().allow(""),
|
|
4408
3802
|
sector: Joi.string().allow(""),
|
|
@@ -4413,28 +3807,19 @@ class CartPlatformModel {
|
|
|
4413
3807
|
address: Joi.string().allow(""),
|
|
4414
3808
|
country_phone_code: Joi.string().allow(""),
|
|
4415
3809
|
country_iso_code: Joi.string().allow(""),
|
|
4416
|
-
_custom_json: Joi.
|
|
3810
|
+
_custom_json: Joi.any(),
|
|
4417
3811
|
});
|
|
4418
3812
|
}
|
|
4419
3813
|
|
|
4420
|
-
/** @returns {
|
|
4421
|
-
static
|
|
4422
|
-
return Joi.object({
|
|
4423
|
-
address_max_limit: Joi.number().required(),
|
|
4424
|
-
user_address_count: Joi.number().required(),
|
|
4425
|
-
});
|
|
4426
|
-
}
|
|
4427
|
-
|
|
4428
|
-
/** @returns {PlatformGetAddressesDetails} */
|
|
4429
|
-
static PlatformGetAddressesDetails() {
|
|
3814
|
+
/** @returns {PlatformGetAddressesResponse} */
|
|
3815
|
+
static PlatformGetAddressesResponse() {
|
|
4430
3816
|
return Joi.object({
|
|
4431
3817
|
address: Joi.array().items(CartPlatformModel.PlatformAddress()),
|
|
4432
|
-
validation_config: CartPlatformModel.ValidationConfig(),
|
|
4433
3818
|
});
|
|
4434
3819
|
}
|
|
4435
3820
|
|
|
4436
|
-
/** @returns {
|
|
4437
|
-
static
|
|
3821
|
+
/** @returns {SaveAddressResponse} */
|
|
3822
|
+
static SaveAddressResponse() {
|
|
4438
3823
|
return Joi.object({
|
|
4439
3824
|
id: Joi.string().allow(""),
|
|
4440
3825
|
success: Joi.boolean(),
|
|
@@ -4442,8 +3827,8 @@ class CartPlatformModel {
|
|
|
4442
3827
|
});
|
|
4443
3828
|
}
|
|
4444
3829
|
|
|
4445
|
-
/** @returns {
|
|
4446
|
-
static
|
|
3830
|
+
/** @returns {UpdateAddressResponse} */
|
|
3831
|
+
static UpdateAddressResponse() {
|
|
4447
3832
|
return Joi.object({
|
|
4448
3833
|
id: Joi.string().allow(""),
|
|
4449
3834
|
is_default_address: Joi.boolean(),
|
|
@@ -4452,16 +3837,16 @@ class CartPlatformModel {
|
|
|
4452
3837
|
});
|
|
4453
3838
|
}
|
|
4454
3839
|
|
|
4455
|
-
/** @returns {
|
|
4456
|
-
static
|
|
3840
|
+
/** @returns {DeleteAddressResponse} */
|
|
3841
|
+
static DeleteAddressResponse() {
|
|
4457
3842
|
return Joi.object({
|
|
4458
3843
|
id: Joi.string().allow(""),
|
|
4459
3844
|
is_deleted: Joi.boolean(),
|
|
4460
3845
|
});
|
|
4461
3846
|
}
|
|
4462
3847
|
|
|
4463
|
-
/** @returns {
|
|
4464
|
-
static
|
|
3848
|
+
/** @returns {PlatformSelectCartAddressRequest} */
|
|
3849
|
+
static PlatformSelectCartAddressRequest() {
|
|
4465
3850
|
return Joi.object({
|
|
4466
3851
|
cart_id: Joi.string().allow(""),
|
|
4467
3852
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -4480,13 +3865,13 @@ class CartPlatformModel {
|
|
|
4480
3865
|
});
|
|
4481
3866
|
}
|
|
4482
3867
|
|
|
4483
|
-
/** @returns {
|
|
4484
|
-
static
|
|
3868
|
+
/** @returns {PlatformShipmentResponse} */
|
|
3869
|
+
static PlatformShipmentResponse() {
|
|
4485
3870
|
return Joi.object({
|
|
4486
3871
|
shipments: Joi.number(),
|
|
4487
3872
|
fulfillment_id: Joi.number(),
|
|
4488
3873
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
4489
|
-
dp_options: Joi.
|
|
3874
|
+
dp_options: Joi.any().allow(null),
|
|
4490
3875
|
shipment_type: Joi.string().allow(""),
|
|
4491
3876
|
order_type: Joi.string().allow(""),
|
|
4492
3877
|
box_type: Joi.string().allow("").allow(null),
|
|
@@ -4497,12 +3882,12 @@ class CartPlatformModel {
|
|
|
4497
3882
|
});
|
|
4498
3883
|
}
|
|
4499
3884
|
|
|
4500
|
-
/** @returns {
|
|
4501
|
-
static
|
|
3885
|
+
/** @returns {PlatformCartShipmentsResponse} */
|
|
3886
|
+
static PlatformCartShipmentsResponse() {
|
|
4502
3887
|
return Joi.object({
|
|
4503
3888
|
coupon_text: Joi.string().allow(""),
|
|
4504
3889
|
id: Joi.string().allow(""),
|
|
4505
|
-
pan_config: Joi.
|
|
3890
|
+
pan_config: Joi.any(),
|
|
4506
3891
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
4507
3892
|
comment: Joi.string().allow(""),
|
|
4508
3893
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -4513,7 +3898,9 @@ class CartPlatformModel {
|
|
|
4513
3898
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
4514
3899
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
4515
3900
|
is_valid: Joi.boolean(),
|
|
4516
|
-
shipments: Joi.array().items(
|
|
3901
|
+
shipments: Joi.array().items(
|
|
3902
|
+
CartPlatformModel.PlatformShipmentResponse()
|
|
3903
|
+
),
|
|
4517
3904
|
currency: CartPlatformModel.CartCurrency(),
|
|
4518
3905
|
checkout_mode: Joi.string().allow(""),
|
|
4519
3906
|
last_modified: Joi.string().allow(""),
|
|
@@ -4524,7 +3911,7 @@ class CartPlatformModel {
|
|
|
4524
3911
|
),
|
|
4525
3912
|
error: Joi.boolean(),
|
|
4526
3913
|
pan_no: Joi.string().allow(""),
|
|
4527
|
-
custom_cart_meta: Joi.
|
|
3914
|
+
custom_cart_meta: Joi.any(),
|
|
4528
3915
|
});
|
|
4529
3916
|
}
|
|
4530
3917
|
|
|
@@ -4537,8 +3924,8 @@ class CartPlatformModel {
|
|
|
4537
3924
|
});
|
|
4538
3925
|
}
|
|
4539
3926
|
|
|
4540
|
-
/** @returns {
|
|
4541
|
-
static
|
|
3927
|
+
/** @returns {UpdateCartShipmentRequest} */
|
|
3928
|
+
static UpdateCartShipmentRequest() {
|
|
4542
3929
|
return Joi.object({
|
|
4543
3930
|
shipments: Joi.array()
|
|
4544
3931
|
.items(CartPlatformModel.UpdateCartShipmentItem())
|
|
@@ -4546,29 +3933,29 @@ class CartPlatformModel {
|
|
|
4546
3933
|
});
|
|
4547
3934
|
}
|
|
4548
3935
|
|
|
4549
|
-
/** @returns {
|
|
4550
|
-
static
|
|
3936
|
+
/** @returns {PlatformCartMetaRequest} */
|
|
3937
|
+
static PlatformCartMetaRequest() {
|
|
4551
3938
|
return Joi.object({
|
|
4552
3939
|
gstin: Joi.string().allow(""),
|
|
4553
|
-
pick_up_customer_details: Joi.
|
|
3940
|
+
pick_up_customer_details: Joi.any(),
|
|
4554
3941
|
checkout_mode: Joi.string().allow(""),
|
|
4555
|
-
gift_details: Joi.
|
|
3942
|
+
gift_details: Joi.any().allow(null),
|
|
4556
3943
|
pan_no: Joi.string().allow(""),
|
|
4557
3944
|
comment: Joi.string().allow(""),
|
|
4558
3945
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
4559
3946
|
});
|
|
4560
3947
|
}
|
|
4561
3948
|
|
|
4562
|
-
/** @returns {
|
|
4563
|
-
static
|
|
3949
|
+
/** @returns {CartMetaResponse} */
|
|
3950
|
+
static CartMetaResponse() {
|
|
4564
3951
|
return Joi.object({
|
|
4565
3952
|
is_valid: Joi.boolean(),
|
|
4566
3953
|
message: Joi.string().allow(""),
|
|
4567
3954
|
});
|
|
4568
3955
|
}
|
|
4569
3956
|
|
|
4570
|
-
/** @returns {
|
|
4571
|
-
static
|
|
3957
|
+
/** @returns {CartMetaMissingResponse} */
|
|
3958
|
+
static CartMetaMissingResponse() {
|
|
4572
3959
|
return Joi.object({
|
|
4573
3960
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
4574
3961
|
});
|
|
@@ -4602,53 +3989,6 @@ class CartPlatformModel {
|
|
|
4602
3989
|
});
|
|
4603
3990
|
}
|
|
4604
3991
|
|
|
4605
|
-
/** @returns {CartCheckoutCustomMeta} */
|
|
4606
|
-
static CartCheckoutCustomMeta() {
|
|
4607
|
-
return Joi.object({
|
|
4608
|
-
key: Joi.string().allow("").required(),
|
|
4609
|
-
value: Joi.string().allow("").required(),
|
|
4610
|
-
});
|
|
4611
|
-
}
|
|
4612
|
-
|
|
4613
|
-
/** @returns {PlatformCartCheckoutDetailCreation} */
|
|
4614
|
-
static PlatformCartCheckoutDetailCreation() {
|
|
4615
|
-
return Joi.object({
|
|
4616
|
-
custom_meta: Joi.array().items(
|
|
4617
|
-
CartPlatformModel.CartCheckoutCustomMeta()
|
|
4618
|
-
),
|
|
4619
|
-
address_id: Joi.string().allow(""),
|
|
4620
|
-
payment_identifier: Joi.string().allow("").allow(null),
|
|
4621
|
-
payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
4622
|
-
payment_auto_confirm: Joi.boolean(),
|
|
4623
|
-
id: Joi.string().allow("").required(),
|
|
4624
|
-
pos: Joi.boolean(),
|
|
4625
|
-
billing_address_id: Joi.string().allow(""),
|
|
4626
|
-
merchant_code: Joi.string().allow(""),
|
|
4627
|
-
aggregator: Joi.string().allow(""),
|
|
4628
|
-
pick_at_store_uid: Joi.number().allow(null),
|
|
4629
|
-
device_id: Joi.string().allow("").allow(null),
|
|
4630
|
-
delivery_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
4631
|
-
payment_mode: Joi.string().allow("").required(),
|
|
4632
|
-
checkout_mode: Joi.string().allow(""),
|
|
4633
|
-
customer_details: CartPlatformModel.CustomerDetails(),
|
|
4634
|
-
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4635
|
-
staff: CartPlatformModel.StaffCheckout(),
|
|
4636
|
-
employee_code: Joi.string().allow("").allow(null),
|
|
4637
|
-
billing_address: Joi.object().pattern(/\S/, Joi.any()),
|
|
4638
|
-
callback_url: Joi.string().allow("").allow(null),
|
|
4639
|
-
user_id: Joi.string().allow("").allow(null),
|
|
4640
|
-
extra_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4641
|
-
order_type: Joi.string().allow("").required(),
|
|
4642
|
-
files: Joi.array().items(CartPlatformModel.Files()),
|
|
4643
|
-
ordering_store: Joi.number().allow(null),
|
|
4644
|
-
payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
|
|
4645
|
-
iin: Joi.string().allow(""),
|
|
4646
|
-
network: Joi.string().allow(""),
|
|
4647
|
-
type: Joi.string().allow(""),
|
|
4648
|
-
card_id: Joi.string().allow(""),
|
|
4649
|
-
});
|
|
4650
|
-
}
|
|
4651
|
-
|
|
4652
3992
|
/** @returns {CheckCart} */
|
|
4653
3993
|
static CheckCart() {
|
|
4654
3994
|
return Joi.object({
|
|
@@ -4681,15 +4021,15 @@ class CartPlatformModel {
|
|
|
4681
4021
|
gstin: Joi.string().allow(""),
|
|
4682
4022
|
cod_available: Joi.boolean(),
|
|
4683
4023
|
delivery_charges: Joi.number(),
|
|
4684
|
-
custom_cart_meta: Joi.
|
|
4024
|
+
custom_cart_meta: Joi.any(),
|
|
4685
4025
|
});
|
|
4686
4026
|
}
|
|
4687
4027
|
|
|
4688
|
-
/** @returns {
|
|
4689
|
-
static
|
|
4028
|
+
/** @returns {CartCheckoutResponse} */
|
|
4029
|
+
static CartCheckoutResponse() {
|
|
4690
4030
|
return Joi.object({
|
|
4691
4031
|
app_intercept_url: Joi.string().allow(""),
|
|
4692
|
-
data: Joi.
|
|
4032
|
+
data: Joi.any(),
|
|
4693
4033
|
cart: CartPlatformModel.CheckCart(),
|
|
4694
4034
|
success: Joi.boolean(),
|
|
4695
4035
|
callback_url: Joi.string().allow(""),
|
|
@@ -4699,22 +4039,8 @@ class CartPlatformModel {
|
|
|
4699
4039
|
});
|
|
4700
4040
|
}
|
|
4701
4041
|
|
|
4702
|
-
/** @returns {
|
|
4703
|
-
static
|
|
4704
|
-
return Joi.object({
|
|
4705
|
-
app_intercept_url: Joi.string().allow(""),
|
|
4706
|
-
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
4707
|
-
cart: CartPlatformModel.CheckCart(),
|
|
4708
|
-
success: Joi.boolean(),
|
|
4709
|
-
callback_url: Joi.string().allow(""),
|
|
4710
|
-
payment_confirm_url: Joi.string().allow(""),
|
|
4711
|
-
order_id: Joi.string().allow(""),
|
|
4712
|
-
message: Joi.string().allow(""),
|
|
4713
|
-
});
|
|
4714
|
-
}
|
|
4715
|
-
|
|
4716
|
-
/** @returns {CartDeliveryModesDetails} */
|
|
4717
|
-
static CartDeliveryModesDetails() {
|
|
4042
|
+
/** @returns {CartDeliveryModesResponse} */
|
|
4043
|
+
static CartDeliveryModesResponse() {
|
|
4718
4044
|
return Joi.object({
|
|
4719
4045
|
pickup_stores: Joi.array().items(Joi.number()),
|
|
4720
4046
|
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
@@ -4744,15 +4070,15 @@ class CartPlatformModel {
|
|
|
4744
4070
|
});
|
|
4745
4071
|
}
|
|
4746
4072
|
|
|
4747
|
-
/** @returns {
|
|
4748
|
-
static
|
|
4073
|
+
/** @returns {StoreDetailsResponse} */
|
|
4074
|
+
static StoreDetailsResponse() {
|
|
4749
4075
|
return Joi.object({
|
|
4750
4076
|
items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
|
|
4751
4077
|
});
|
|
4752
4078
|
}
|
|
4753
4079
|
|
|
4754
|
-
/** @returns {
|
|
4755
|
-
static
|
|
4080
|
+
/** @returns {UpdateCartPaymentRequest} */
|
|
4081
|
+
static UpdateCartPaymentRequest() {
|
|
4756
4082
|
return Joi.object({
|
|
4757
4083
|
address_id: Joi.string().allow(""),
|
|
4758
4084
|
payment_mode: Joi.string().allow(""),
|
|
@@ -4772,7 +4098,6 @@ class CartPlatformModel {
|
|
|
4772
4098
|
display_message_en: Joi.string().allow("").allow(null),
|
|
4773
4099
|
code: Joi.string().allow("").allow(null),
|
|
4774
4100
|
discount: Joi.number(),
|
|
4775
|
-
error_en: Joi.string().allow("").allow(null),
|
|
4776
4101
|
});
|
|
4777
4102
|
}
|
|
4778
4103
|
|
|
@@ -4803,19 +4128,17 @@ class CartPlatformModel {
|
|
|
4803
4128
|
payment_meta: CartPlatformModel.PaymentMeta().required(),
|
|
4804
4129
|
amount: Joi.number().allow(null),
|
|
4805
4130
|
name: Joi.string().allow(""),
|
|
4806
|
-
payment_extra_identifiers: Joi.
|
|
4131
|
+
payment_extra_identifiers: Joi.any(),
|
|
4807
4132
|
});
|
|
4808
4133
|
}
|
|
4809
4134
|
|
|
4810
|
-
/** @returns {
|
|
4811
|
-
static
|
|
4135
|
+
/** @returns {PlatformCartCheckoutDetailV2Request} */
|
|
4136
|
+
static PlatformCartCheckoutDetailV2Request() {
|
|
4812
4137
|
return Joi.object({
|
|
4813
4138
|
address_id: Joi.string().allow(""),
|
|
4814
4139
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
4815
|
-
payment_params: Joi.
|
|
4816
|
-
custom_meta: Joi.
|
|
4817
|
-
CartPlatformModel.CartCheckoutCustomMeta()
|
|
4818
|
-
),
|
|
4140
|
+
payment_params: Joi.any().allow(null),
|
|
4141
|
+
custom_meta: Joi.any(),
|
|
4819
4142
|
payment_auto_confirm: Joi.boolean(),
|
|
4820
4143
|
id: Joi.string().allow("").required(),
|
|
4821
4144
|
pos: Joi.boolean(),
|
|
@@ -4824,20 +4147,20 @@ class CartPlatformModel {
|
|
|
4824
4147
|
aggregator: Joi.string().allow(""),
|
|
4825
4148
|
pick_at_store_uid: Joi.number().allow(null),
|
|
4826
4149
|
device_id: Joi.string().allow("").allow(null),
|
|
4827
|
-
delivery_address: Joi.
|
|
4150
|
+
delivery_address: Joi.any(),
|
|
4828
4151
|
payment_mode: Joi.string().allow(""),
|
|
4829
4152
|
checkout_mode: Joi.string().allow(""),
|
|
4830
|
-
customer_details:
|
|
4831
|
-
meta: Joi.
|
|
4153
|
+
customer_details: Joi.any().allow(null),
|
|
4154
|
+
meta: Joi.any(),
|
|
4832
4155
|
payment_methods: Joi.array()
|
|
4833
4156
|
.items(CartPlatformModel.PaymentMethod())
|
|
4834
4157
|
.required(),
|
|
4835
4158
|
staff: CartPlatformModel.StaffCheckout(),
|
|
4836
4159
|
employee_code: Joi.string().allow("").allow(null),
|
|
4837
|
-
billing_address: Joi.
|
|
4160
|
+
billing_address: Joi.any(),
|
|
4838
4161
|
callback_url: Joi.string().allow("").allow(null),
|
|
4839
|
-
user_id: Joi.string().allow("").required(),
|
|
4840
|
-
extra_meta: Joi.
|
|
4162
|
+
user_id: Joi.string().allow("").allow(null).required(),
|
|
4163
|
+
extra_meta: Joi.any(),
|
|
4841
4164
|
order_type: Joi.string().allow("").required(),
|
|
4842
4165
|
files: Joi.array().items(CartPlatformModel.Files()),
|
|
4843
4166
|
ordering_store: Joi.number().allow(null),
|
|
@@ -4878,25 +4201,14 @@ class CartPlatformModel {
|
|
|
4878
4201
|
});
|
|
4879
4202
|
}
|
|
4880
4203
|
|
|
4881
|
-
/** @returns {ArticlePriceDetails} */
|
|
4882
|
-
static ArticlePriceDetails() {
|
|
4883
|
-
return Joi.object({
|
|
4884
|
-
marked: Joi.number(),
|
|
4885
|
-
effective: Joi.number(),
|
|
4886
|
-
});
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
4204
|
/** @returns {FreeGiftItems} */
|
|
4890
4205
|
static FreeGiftItems() {
|
|
4891
4206
|
return Joi.object({
|
|
4892
4207
|
item_slug: Joi.string().allow(""),
|
|
4893
4208
|
item_name: Joi.string().allow(""),
|
|
4894
4209
|
item_price_details: CartPlatformModel.ItemPriceDetails(),
|
|
4895
|
-
article_price: CartPlatformModel.ArticlePriceDetails(),
|
|
4896
4210
|
item_brand_name: Joi.string().allow(""),
|
|
4897
4211
|
item_id: Joi.number(),
|
|
4898
|
-
available_sizes: Joi.array().items(Joi.string().allow("")),
|
|
4899
|
-
size: Joi.string().allow(""),
|
|
4900
4212
|
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
4901
4213
|
});
|
|
4902
4214
|
}
|
|
@@ -4905,7 +4217,7 @@ class CartPlatformModel {
|
|
|
4905
4217
|
static PromotionOffer() {
|
|
4906
4218
|
return Joi.object({
|
|
4907
4219
|
id: Joi.string().allow(""),
|
|
4908
|
-
buy_rules: Joi.
|
|
4220
|
+
buy_rules: Joi.any(),
|
|
4909
4221
|
offer_text: Joi.string().allow(""),
|
|
4910
4222
|
promotion_type: Joi.string().allow(""),
|
|
4911
4223
|
promotion_name: Joi.string().allow(""),
|
|
@@ -4917,8 +4229,8 @@ class CartPlatformModel {
|
|
|
4917
4229
|
});
|
|
4918
4230
|
}
|
|
4919
4231
|
|
|
4920
|
-
/** @returns {
|
|
4921
|
-
static
|
|
4232
|
+
/** @returns {PromotionOffersResponse} */
|
|
4233
|
+
static PromotionOffersResponse() {
|
|
4922
4234
|
return Joi.object({
|
|
4923
4235
|
available_promotions: Joi.array().items(
|
|
4924
4236
|
CartPlatformModel.PromotionOffer()
|
|
@@ -4942,20 +4254,12 @@ class CartPlatformModel {
|
|
|
4942
4254
|
});
|
|
4943
4255
|
}
|
|
4944
4256
|
|
|
4945
|
-
/** @returns {
|
|
4946
|
-
static
|
|
4257
|
+
/** @returns {PromotionPaymentOffersResponse} */
|
|
4258
|
+
static PromotionPaymentOffersResponse() {
|
|
4947
4259
|
return Joi.object({
|
|
4948
4260
|
success: Joi.boolean(),
|
|
4949
4261
|
promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
|
|
4950
4262
|
});
|
|
4951
4263
|
}
|
|
4952
|
-
|
|
4953
|
-
/** @returns {ValidationError} */
|
|
4954
|
-
static ValidationError() {
|
|
4955
|
-
return Joi.object({
|
|
4956
|
-
message: Joi.string().allow("").required(),
|
|
4957
|
-
field: Joi.string().allow("").required(),
|
|
4958
|
-
});
|
|
4959
|
-
}
|
|
4960
4264
|
}
|
|
4961
4265
|
module.exports = CartPlatformModel;
|