@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.1
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 +1304 -4979
- package/sdk/platform/Cart/CartPlatformModel.js +1217 -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 +341 -602
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +284 -483
- 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,51 @@ 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 {Object} [meta]
|
|
758
|
-
* @property {string} cart_id -
|
|
596
|
+
* @property {Object} [meta]
|
|
597
|
+
* @property {string} cart_id - The ID of the cart
|
|
759
598
|
*/
|
|
760
599
|
|
|
761
600
|
/**
|
|
762
601
|
* @typedef PriceAdjustment
|
|
763
|
-
* @property {number} value
|
|
602
|
+
* @property {number} value
|
|
764
603
|
* @property {string} message - The message associated with the price adjustment
|
|
765
604
|
* @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
|
|
605
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
606
|
+
* the restrictions applied to this particular item or service, including
|
|
607
|
+
* whether or not cancellation and return are allowed, etc
|
|
769
608
|
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
770
609
|
* distribution should is done at the article level
|
|
771
|
-
* @property {string} [id]
|
|
610
|
+
* @property {string} [id]
|
|
772
611
|
* @property {Collection} collection
|
|
773
|
-
* @property {string} type - Type of price adjusment
|
|
612
|
+
* @property {string} type - Type of price adjusment
|
|
774
613
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
775
|
-
* allowed (default: False)
|
|
614
|
+
* allowed (default: False)
|
|
776
615
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
777
616
|
* authenticated
|
|
778
617
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
779
|
-
* @property {Object} [meta]
|
|
780
|
-
* @property {string} cart_id -
|
|
618
|
+
* @property {Object} [meta]
|
|
619
|
+
* @property {string} cart_id - The ID of the cart
|
|
781
620
|
*/
|
|
782
621
|
|
|
783
622
|
/**
|
|
784
|
-
* @typedef
|
|
623
|
+
* @typedef PriceAdjustmentResponse
|
|
785
624
|
* @property {PriceAdjustment} [data]
|
|
786
625
|
*/
|
|
787
626
|
|
|
788
627
|
/**
|
|
789
|
-
* @typedef
|
|
628
|
+
* @typedef GetPriceAdjustmentResponse
|
|
790
629
|
* @property {PriceAdjustment[]} [data]
|
|
791
630
|
*/
|
|
792
631
|
|
|
793
632
|
/**
|
|
794
633
|
* @typedef PriceAdjustmentAdd
|
|
795
|
-
* @property {number} value
|
|
634
|
+
* @property {number} value
|
|
796
635
|
* @property {string} message - The message associated with the price adjustment
|
|
797
636
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
798
637
|
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
@@ -808,110 +647,98 @@ const Joi = require("joi");
|
|
|
808
647
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
809
648
|
* authenticated
|
|
810
649
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
811
|
-
* @property {Object} [meta]
|
|
812
|
-
* @property {string} cart_id -
|
|
650
|
+
* @property {Object} [meta]
|
|
651
|
+
* @property {string} cart_id - The ID of the cart
|
|
813
652
|
*/
|
|
814
653
|
|
|
815
654
|
/**
|
|
816
655
|
* @typedef CartItem
|
|
817
|
-
* @property {number} [quantity]
|
|
818
|
-
* @property {string} product_id
|
|
819
|
-
* @property {string} size
|
|
656
|
+
* @property {number} [quantity]
|
|
657
|
+
* @property {string} product_id
|
|
658
|
+
* @property {string} size
|
|
820
659
|
*/
|
|
821
660
|
|
|
822
661
|
/**
|
|
823
|
-
* @typedef
|
|
824
|
-
* @property {CartItem[]} cart_items
|
|
662
|
+
* @typedef OpenapiCartDetailsRequest
|
|
663
|
+
* @property {CartItem[]} cart_items
|
|
825
664
|
*/
|
|
826
665
|
|
|
827
666
|
/**
|
|
828
667
|
* @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.
|
|
668
|
+
* @property {string} [title]
|
|
669
|
+
* @property {number} [max_discount_value]
|
|
670
|
+
* @property {number} [value]
|
|
671
|
+
* @property {boolean} [is_applied]
|
|
672
|
+
* @property {string} [uid]
|
|
673
|
+
* @property {string} [coupon_type]
|
|
674
|
+
* @property {string} [sub_title]
|
|
675
|
+
* @property {number} [coupon_value]
|
|
676
|
+
* @property {string} [code]
|
|
677
|
+
* @property {string} [type]
|
|
678
|
+
* @property {number} [minimum_cart_value]
|
|
679
|
+
* @property {string} [message]
|
|
680
|
+
* @property {string} [description]
|
|
847
681
|
*/
|
|
848
682
|
|
|
849
683
|
/**
|
|
850
684
|
* @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]
|
|
685
|
+
* @property {string} [key]
|
|
686
|
+
* @property {number} [value]
|
|
687
|
+
* @property {string} [currency_code]
|
|
688
|
+
* @property {string} [currency_symbol]
|
|
689
|
+
* @property {string} [display]
|
|
690
|
+
* @property {string[]} [message]
|
|
857
691
|
*/
|
|
858
692
|
|
|
859
693
|
/**
|
|
860
694
|
* @typedef LoyaltyPoints
|
|
861
|
-
* @property {boolean} [is_applied]
|
|
862
|
-
* @property {number} [total]
|
|
863
|
-
* @property {number} [applicable]
|
|
864
|
-
*
|
|
865
|
-
* @property {string} [description] - Description for loyalty points
|
|
695
|
+
* @property {boolean} [is_applied]
|
|
696
|
+
* @property {number} [total]
|
|
697
|
+
* @property {number} [applicable]
|
|
698
|
+
* @property {string} [description]
|
|
866
699
|
*/
|
|
867
700
|
|
|
868
701
|
/**
|
|
869
702
|
* @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
|
|
703
|
+
* @property {number} [coupon]
|
|
704
|
+
* @property {number} [gst_charges]
|
|
705
|
+
* @property {number} [mrp_total]
|
|
706
|
+
* @property {number} [fynd_cash]
|
|
707
|
+
* @property {number} [vog]
|
|
708
|
+
* @property {number} [gift_card]
|
|
709
|
+
* @property {number} [cod_charge]
|
|
710
|
+
* @property {number} [total]
|
|
711
|
+
* @property {number} [discount]
|
|
712
|
+
* @property {number} [delivery_charge]
|
|
713
|
+
* @property {number} [you_saved]
|
|
714
|
+
* @property {number} [subtotal]
|
|
715
|
+
* @property {number} [convenience_fee]
|
|
886
716
|
*/
|
|
887
717
|
|
|
888
718
|
/**
|
|
889
719
|
* @typedef CartBreakup
|
|
890
720
|
* @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
|
|
721
|
+
* @property {DisplayBreakup[]} [display]
|
|
894
722
|
* @property {LoyaltyPoints} [loyalty_points]
|
|
895
723
|
* @property {RawBreakup} [raw]
|
|
896
724
|
*/
|
|
897
725
|
|
|
898
726
|
/**
|
|
899
727
|
* @typedef ProductImage
|
|
900
|
-
* @property {string} [secure_url]
|
|
901
|
-
* @property {string} [url]
|
|
902
|
-
* @property {string} [aspect_ratio]
|
|
728
|
+
* @property {string} [secure_url]
|
|
729
|
+
* @property {string} [url]
|
|
730
|
+
* @property {string} [aspect_ratio]
|
|
903
731
|
*/
|
|
904
732
|
|
|
905
733
|
/**
|
|
906
734
|
* @typedef Tags
|
|
907
|
-
* @property {Object} [tags]
|
|
908
|
-
* product in cart
|
|
735
|
+
* @property {Object} [tags]
|
|
909
736
|
*/
|
|
910
737
|
|
|
911
738
|
/**
|
|
912
739
|
* @typedef BaseInfo
|
|
913
|
-
* @property {number} [uid]
|
|
914
|
-
* @property {string} [name]
|
|
740
|
+
* @property {number} [uid]
|
|
741
|
+
* @property {string} [name]
|
|
915
742
|
*/
|
|
916
743
|
|
|
917
744
|
/**
|
|
@@ -919,62 +746,43 @@ const Joi = require("joi");
|
|
|
919
746
|
* @property {string[]} [product_slug] - Contains list of product slug
|
|
920
747
|
*/
|
|
921
748
|
|
|
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
749
|
/**
|
|
935
750
|
* @typedef ProductAction
|
|
936
|
-
* @property {string} [type]
|
|
937
|
-
* @property {string} [url]
|
|
751
|
+
* @property {string} [type]
|
|
752
|
+
* @property {string} [url]
|
|
938
753
|
* @property {ActionQuery} [query]
|
|
939
|
-
* @property {ProductActionPage} [page]
|
|
940
754
|
*/
|
|
941
755
|
|
|
942
756
|
/**
|
|
943
757
|
* @typedef CategoryInfo
|
|
944
|
-
* @property {number} [uid] -
|
|
945
|
-
* @property {string} [name]
|
|
758
|
+
* @property {number} [uid] - Product Category Id
|
|
759
|
+
* @property {string} [name]
|
|
946
760
|
*/
|
|
947
761
|
|
|
948
762
|
/**
|
|
949
763
|
* @typedef CartProduct
|
|
950
764
|
* @property {string} [slug] - Unique product url name generated via product
|
|
951
765
|
* name and other meta data
|
|
952
|
-
* @property {ProductImage[]} [images]
|
|
953
|
-
* like secure url, aspect ration url and url
|
|
766
|
+
* @property {ProductImage[]} [images]
|
|
954
767
|
* @property {Tags} [teaser_tag]
|
|
955
768
|
* @property {BaseInfo} [brand]
|
|
956
769
|
* @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
|
|
770
|
+
* @property {number} [uid]
|
|
771
|
+
* @property {string[]} [tags]
|
|
772
|
+
* @property {Object} [_custom_json]
|
|
773
|
+
* @property {string} [type]
|
|
774
|
+
* @property {string} [name]
|
|
775
|
+
* @property {string} [item_code]
|
|
776
|
+
* @property {CategoryInfo[]} [categories]
|
|
777
|
+
* @property {Object} [attributes]
|
|
969
778
|
*/
|
|
970
779
|
|
|
971
780
|
/**
|
|
972
781
|
* @typedef BasePrice
|
|
973
|
-
* @property {number} [effective]
|
|
974
|
-
*
|
|
975
|
-
* @property {string} [
|
|
976
|
-
* @property {
|
|
977
|
-
* @property {number} [marked] - Original price of product
|
|
782
|
+
* @property {number} [effective]
|
|
783
|
+
* @property {string} [currency_code]
|
|
784
|
+
* @property {string} [currency_symbol]
|
|
785
|
+
* @property {number} [marked]
|
|
978
786
|
*/
|
|
979
787
|
|
|
980
788
|
/**
|
|
@@ -985,54 +793,43 @@ const Joi = require("joi");
|
|
|
985
793
|
|
|
986
794
|
/**
|
|
987
795
|
* @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
|
|
796
|
+
* @property {number} [uid]
|
|
797
|
+
* @property {string} [name]
|
|
798
|
+
* @property {string} [store_code]
|
|
993
799
|
*/
|
|
994
800
|
|
|
995
801
|
/**
|
|
996
802
|
* @typedef ProductArticle
|
|
997
|
-
* @property {string} [seller_identifier]
|
|
998
|
-
*
|
|
999
|
-
* @property {number} [quantity] - Quantity of the article added in cart
|
|
803
|
+
* @property {string} [seller_identifier]
|
|
804
|
+
* @property {number} [quantity]
|
|
1000
805
|
* @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
|
|
806
|
+
* @property {Object} [cart_item_meta]
|
|
807
|
+
* @property {Object} [parent_item_identifiers]
|
|
808
|
+
* @property {boolean} [is_gift_visible]
|
|
809
|
+
* @property {string} [uid]
|
|
810
|
+
* @property {Object} [gift_card]
|
|
811
|
+
* @property {string[]} [product_group_tags]
|
|
812
|
+
* @property {Object} [identifier]
|
|
813
|
+
* @property {number} [mto_quantity]
|
|
814
|
+
* @property {Object} [extra_meta]
|
|
815
|
+
* @property {string} [type]
|
|
816
|
+
* @property {Object} [_custom_json]
|
|
1020
817
|
* @property {ArticlePriceInfo} [price]
|
|
1021
|
-
* @property {Object} [meta]
|
|
1022
|
-
* @property {string} [size]
|
|
818
|
+
* @property {Object} [meta]
|
|
819
|
+
* @property {string} [size]
|
|
1023
820
|
* @property {StoreInfo} [store]
|
|
1024
821
|
* @property {string[]} [tags] - A list of article tags
|
|
1025
822
|
*/
|
|
1026
823
|
|
|
1027
824
|
/**
|
|
1028
825
|
* @typedef Ownership2
|
|
1029
|
-
* @property {string} [payable_category] -
|
|
1030
|
-
* @property {string} [payable_by] -
|
|
826
|
+
* @property {string} [payable_category] - Promo amount payable category
|
|
827
|
+
* @property {string} [payable_by] - Promo amount bearable party
|
|
1031
828
|
*/
|
|
1032
829
|
|
|
1033
830
|
/**
|
|
1034
831
|
* @typedef DiscountRulesApp
|
|
1035
|
-
* @property {Object} [offer] - Offer
|
|
832
|
+
* @property {Object} [offer] - Offer for promotion
|
|
1036
833
|
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
1037
834
|
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
1038
835
|
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
@@ -1041,10 +838,9 @@ const Joi = require("joi");
|
|
|
1041
838
|
/**
|
|
1042
839
|
* @typedef AppliedFreeArticles
|
|
1043
840
|
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
1044
|
-
* @property {number} [quantity] - Free article quantity
|
|
1045
|
-
* @property {string} [article_id] -
|
|
841
|
+
* @property {number} [quantity] - Free article quantity
|
|
842
|
+
* @property {string} [article_id] - Free article id
|
|
1046
843
|
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
|
|
1047
|
-
* in promotion
|
|
1048
844
|
*/
|
|
1049
845
|
|
|
1050
846
|
/**
|
|
@@ -1070,15 +866,15 @@ const Joi = require("joi");
|
|
|
1070
866
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
1071
867
|
* product MRP or ESP
|
|
1072
868
|
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
1073
|
-
* @property {string} [promo_id] - Promotion
|
|
869
|
+
* @property {string} [promo_id] - Promotion id
|
|
1074
870
|
* @property {Object} [meta] - Meta object for extra data
|
|
1075
|
-
* @property {string} [code] - Promotion
|
|
871
|
+
* @property {string} [code] - Promotion code
|
|
1076
872
|
*/
|
|
1077
873
|
|
|
1078
874
|
/**
|
|
1079
875
|
* @typedef PromiseFormatted
|
|
1080
|
-
* @property {string} [max]
|
|
1081
|
-
* @property {string} [min]
|
|
876
|
+
* @property {string} [max]
|
|
877
|
+
* @property {string} [min]
|
|
1082
878
|
*/
|
|
1083
879
|
|
|
1084
880
|
/**
|
|
@@ -1089,8 +885,8 @@ const Joi = require("joi");
|
|
|
1089
885
|
|
|
1090
886
|
/**
|
|
1091
887
|
* @typedef PromiseTimestamp
|
|
1092
|
-
* @property {number} [max]
|
|
1093
|
-
* @property {number} [min]
|
|
888
|
+
* @property {number} [max]
|
|
889
|
+
* @property {number} [min]
|
|
1094
890
|
*/
|
|
1095
891
|
|
|
1096
892
|
/**
|
|
@@ -1102,23 +898,19 @@ const Joi = require("joi");
|
|
|
1102
898
|
|
|
1103
899
|
/**
|
|
1104
900
|
* @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
|
|
901
|
+
* @property {number} [discount_total_quantity]
|
|
902
|
+
* @property {number} [discount_single_quantity]
|
|
903
|
+
* @property {string} [code]
|
|
1110
904
|
*/
|
|
1111
905
|
|
|
1112
906
|
/**
|
|
1113
907
|
* @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
|
|
908
|
+
* @property {number} [marked]
|
|
909
|
+
* @property {number} [add_on]
|
|
910
|
+
* @property {string} [currency_code]
|
|
911
|
+
* @property {string} [currency_symbol]
|
|
912
|
+
* @property {number} [effective]
|
|
913
|
+
* @property {number} [selling]
|
|
1122
914
|
*/
|
|
1123
915
|
|
|
1124
916
|
/**
|
|
@@ -1134,259 +926,226 @@ const Joi = require("joi");
|
|
|
1134
926
|
|
|
1135
927
|
/**
|
|
1136
928
|
* @typedef ProductAvailabilitySize
|
|
1137
|
-
* @property {string} [display]
|
|
1138
|
-
* @property {string} [value]
|
|
1139
|
-
* @property {boolean} [is_available]
|
|
1140
|
-
* product if that is available
|
|
929
|
+
* @property {string} [display]
|
|
930
|
+
* @property {string} [value]
|
|
931
|
+
* @property {boolean} [is_available]
|
|
1141
932
|
*/
|
|
1142
933
|
|
|
1143
934
|
/**
|
|
1144
935
|
* @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
|
|
936
|
+
* @property {boolean} [is_valid]
|
|
937
|
+
* @property {number} [other_store_quantity]
|
|
938
|
+
* @property {boolean} [deliverable]
|
|
939
|
+
* @property {ProductAvailabilitySize[]} [available_sizes]
|
|
940
|
+
* @property {boolean} [out_of_stock]
|
|
941
|
+
* @property {string[]} [sizes]
|
|
1154
942
|
*/
|
|
1155
943
|
|
|
1156
944
|
/**
|
|
1157
945
|
* @typedef PromoMeta
|
|
1158
|
-
* @property {string} [message]
|
|
1159
|
-
* loyalty points and applied and how much left with the user
|
|
946
|
+
* @property {string} [message]
|
|
1160
947
|
*/
|
|
1161
948
|
|
|
1162
949
|
/**
|
|
1163
950
|
* @typedef CartProductInfo
|
|
1164
|
-
* @property {number} [quantity]
|
|
951
|
+
* @property {number} [quantity]
|
|
1165
952
|
* @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
|
|
953
|
+
* @property {string} [product_ean_id]
|
|
954
|
+
* @property {Object} [parent_item_identifiers]
|
|
955
|
+
* @property {boolean} [is_set]
|
|
1171
956
|
* @property {ProductArticle} [article]
|
|
1172
|
-
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1173
|
-
* promotion for the product in cart
|
|
957
|
+
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1174
958
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1175
|
-
* @property {string} [key]
|
|
959
|
+
* @property {string} [key]
|
|
1176
960
|
* @property {CouponDetails} [coupon]
|
|
1177
|
-
* @property {Object} [bulk_offer]
|
|
1178
|
-
* which denotes if any bulk offer is applied to the product in cart
|
|
961
|
+
* @property {Object} [bulk_offer]
|
|
1179
962
|
* @property {ProductPriceInfo} [price]
|
|
1180
|
-
* @property {string} [coupon_message]
|
|
1181
|
-
* coupon is applied and empty if not applied
|
|
963
|
+
* @property {string} [coupon_message]
|
|
1182
964
|
* @property {CartProductIdentifer} identifiers
|
|
1183
|
-
* @property {string} [message]
|
|
1184
|
-
*
|
|
1185
|
-
* @property {string} [discount] - Discount amount of the product in cart
|
|
965
|
+
* @property {string} [message]
|
|
966
|
+
* @property {string} [discount]
|
|
1186
967
|
* @property {ProductAvailability} [availability]
|
|
1187
|
-
* @property {Object} [moq]
|
|
1188
|
-
* of a product, e.g. 100.
|
|
968
|
+
* @property {Object} [moq]
|
|
1189
969
|
* @property {ProductPriceInfo} [price_per_unit]
|
|
1190
970
|
* @property {PromoMeta} [promo_meta]
|
|
1191
|
-
* @property {Object} [custom_order]
|
|
971
|
+
* @property {Object} [custom_order]
|
|
1192
972
|
*/
|
|
1193
973
|
|
|
1194
974
|
/**
|
|
1195
|
-
* @typedef
|
|
1196
|
-
* @property {boolean} [is_valid]
|
|
1197
|
-
*
|
|
1198
|
-
* @property {string} [message] - Message of the cart Open API cart detail response
|
|
975
|
+
* @typedef OpenapiCartDetailsResponse
|
|
976
|
+
* @property {boolean} [is_valid]
|
|
977
|
+
* @property {string} [message]
|
|
1199
978
|
* @property {CartBreakup} [breakup_values]
|
|
1200
|
-
* @property {CartProductInfo[]} [items]
|
|
979
|
+
* @property {CartProductInfo[]} [items]
|
|
1201
980
|
*/
|
|
1202
981
|
|
|
1203
982
|
/**
|
|
1204
|
-
* @typedef
|
|
1205
|
-
* @property {boolean} [success]
|
|
1206
|
-
* @property {string} [message]
|
|
983
|
+
* @typedef OpenApiErrorResponse
|
|
984
|
+
* @property {boolean} [success]
|
|
985
|
+
* @property {string} [message]
|
|
1207
986
|
* @property {Object} [errors] - Contains field name which has error as key and
|
|
1208
987
|
* error message as value
|
|
1209
988
|
*/
|
|
1210
989
|
|
|
1211
990
|
/**
|
|
1212
991
|
* @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
|
|
992
|
+
* @property {string} [country]
|
|
993
|
+
* @property {string} [state]
|
|
994
|
+
* @property {string} [city]
|
|
995
|
+
* @property {number} [phone]
|
|
996
|
+
* @property {string} area_code
|
|
997
|
+
* @property {string} [country_iso_code]
|
|
998
|
+
* @property {string} [country_phone_code]
|
|
999
|
+
* @property {Object} [meta]
|
|
1000
|
+
* @property {string} [address_type]
|
|
1001
|
+
* @property {string} [area]
|
|
1002
|
+
* @property {string} [area_code_slug]
|
|
1003
|
+
* @property {string} [name]
|
|
1004
|
+
* @property {string} [landmark]
|
|
1005
|
+
* @property {string} [email]
|
|
1006
|
+
* @property {string} [country_code]
|
|
1007
|
+
* @property {number} [pincode]
|
|
1008
|
+
* @property {string} [address]
|
|
1009
|
+
*/
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* @typedef OpenApiCartServiceabilityRequest
|
|
1013
|
+
* @property {CartItem[]} cart_items
|
|
1236
1014
|
* @property {ShippingAddress} shipping_address
|
|
1237
1015
|
*/
|
|
1238
1016
|
|
|
1239
1017
|
/**
|
|
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
|
|
1018
|
+
* @typedef OpenApiCartServiceabilityResponse
|
|
1019
|
+
* @property {boolean} [is_valid]
|
|
1020
|
+
* @property {CartProductInfo[]} [items]
|
|
1246
1021
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1247
|
-
* @property {string} [message]
|
|
1022
|
+
* @property {string} [message]
|
|
1248
1023
|
* @property {CartBreakup} [breakup_values]
|
|
1249
1024
|
*/
|
|
1250
1025
|
|
|
1251
1026
|
/**
|
|
1252
1027
|
* @typedef OpenApiFiles
|
|
1253
|
-
* @property {string} key
|
|
1254
|
-
* @property {string[]} values
|
|
1028
|
+
* @property {string} key
|
|
1029
|
+
* @property {string[]} values
|
|
1255
1030
|
*/
|
|
1256
1031
|
|
|
1257
1032
|
/**
|
|
1258
1033
|
* @typedef CartItemMeta
|
|
1259
|
-
* @property {boolean} [primary_item]
|
|
1260
|
-
* @property {string} [group_id]
|
|
1034
|
+
* @property {boolean} [primary_item]
|
|
1035
|
+
* @property {string} [group_id]
|
|
1261
1036
|
*/
|
|
1262
1037
|
|
|
1263
1038
|
/**
|
|
1264
1039
|
* @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
|
|
1040
|
+
* @property {string} [payment_id]
|
|
1041
|
+
* @property {string} [payment_gateway]
|
|
1042
|
+
* @property {Object} [extra_meta]
|
|
1043
|
+
* @property {string} [current_status]
|
|
1044
|
+
* @property {string} [order_id]
|
|
1271
1045
|
*/
|
|
1272
1046
|
|
|
1273
1047
|
/**
|
|
1274
1048
|
* @typedef MultiTenderPaymentMethod
|
|
1275
|
-
* @property {string} mode
|
|
1276
|
-
* @property {number} amount -
|
|
1049
|
+
* @property {string} mode
|
|
1050
|
+
* @property {number} amount - Payment amount
|
|
1277
1051
|
* @property {MultiTenderPaymentMeta} [meta]
|
|
1278
|
-
* @property {string} [name] -
|
|
1052
|
+
* @property {string} [name] - Payment mode name
|
|
1279
1053
|
*/
|
|
1280
1054
|
|
|
1281
1055
|
/**
|
|
1282
1056
|
* @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
|
|
1057
|
+
* @property {number} cashback_applied
|
|
1058
|
+
* @property {number} [quantity]
|
|
1059
|
+
* @property {string} size
|
|
1060
|
+
* @property {number} coupon_effective_discount
|
|
1061
|
+
* @property {number} amount_paid
|
|
1062
|
+
* @property {number} delivery_charges
|
|
1063
|
+
* @property {number} price_marked
|
|
1064
|
+
* @property {OpenApiFiles[]} [files]
|
|
1292
1065
|
* @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
|
|
1066
|
+
* @property {Object} [extra_meta]
|
|
1067
|
+
* @property {number} product_id
|
|
1068
|
+
* @property {number} [loyalty_discount]
|
|
1069
|
+
* @property {number} discount
|
|
1070
|
+
* @property {number} price_effective
|
|
1071
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1072
|
+
* @property {number} [employee_discount]
|
|
1073
|
+
* @property {number} cod_charges
|
|
1304
1074
|
*/
|
|
1305
1075
|
|
|
1306
1076
|
/**
|
|
1307
1077
|
* @typedef OpenApiPlatformCheckoutReq
|
|
1308
|
-
* @property {string} [payment_mode]
|
|
1309
|
-
*
|
|
1310
|
-
* @property {
|
|
1311
|
-
* @property {OpenApiOrderItem[]} cart_items - List of items in user cart
|
|
1078
|
+
* @property {string} [payment_mode]
|
|
1079
|
+
* @property {number} cart_value
|
|
1080
|
+
* @property {OpenApiOrderItem[]} cart_items
|
|
1312
1081
|
* @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
|
|
1082
|
+
* @property {number} [loyalty_discount]
|
|
1083
|
+
* @property {string} [comment]
|
|
1084
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1085
|
+
* @property {Object} [employee_discount]
|
|
1086
|
+
* @property {string} [coupon]
|
|
1087
|
+
* @property {number} cashback_applied
|
|
1088
|
+
* @property {string} [gstin]
|
|
1321
1089
|
* @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
|
|
1090
|
+
* @property {string} coupon_code
|
|
1091
|
+
* @property {number} coupon_value
|
|
1092
|
+
* @property {number} delivery_charges
|
|
1093
|
+
* @property {string} [affiliate_order_id]
|
|
1094
|
+
* @property {string} [currency_code]
|
|
1095
|
+
* @property {string} [order_id]
|
|
1096
|
+
* @property {OpenApiFiles[]} [files]
|
|
1097
|
+
* @property {number} cod_charges
|
|
1331
1098
|
*/
|
|
1332
1099
|
|
|
1333
1100
|
/**
|
|
1334
|
-
* @typedef
|
|
1335
|
-
* @property {boolean} [success]
|
|
1336
|
-
* @property {string} [message]
|
|
1101
|
+
* @typedef OpenApiCheckoutResponse
|
|
1102
|
+
* @property {boolean} [success]
|
|
1103
|
+
* @property {string} [message]
|
|
1337
1104
|
* @property {string} [order_ref_id] - Order id sent in request
|
|
1338
1105
|
* @property {string} order_id - Fynd order id
|
|
1339
1106
|
*/
|
|
1340
1107
|
|
|
1341
1108
|
/**
|
|
1342
1109
|
* @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
|
|
1110
|
+
* @property {string} expire_at
|
|
1111
|
+
* @property {Object} [promotion]
|
|
1112
|
+
* @property {boolean} is_default
|
|
1113
|
+
* @property {string} [comment]
|
|
1114
|
+
* @property {Object[]} articles
|
|
1115
|
+
* @property {Object} [coupon]
|
|
1116
|
+
* @property {number} [bulk_coupon_discount]
|
|
1117
|
+
* @property {string} _id
|
|
1118
|
+
* @property {Object} [fynd_credits]
|
|
1119
|
+
* @property {number[]} [fc_index_map]
|
|
1120
|
+
* @property {string} [order_id]
|
|
1121
|
+
* @property {number} [discount]
|
|
1122
|
+
* @property {Object} [cod_charges]
|
|
1123
|
+
* @property {Object} [payments]
|
|
1124
|
+
* @property {string} [payment_mode]
|
|
1125
|
+
* @property {Object[]} [shipments]
|
|
1126
|
+
* @property {Object} [pick_up_customer_details]
|
|
1127
|
+
* @property {number} uid
|
|
1128
|
+
* @property {string} [checkout_mode]
|
|
1129
|
+
* @property {number} [cart_value]
|
|
1130
|
+
* @property {boolean} [is_archive]
|
|
1131
|
+
* @property {string} created_on
|
|
1132
|
+
* @property {string} last_modified
|
|
1133
|
+
* @property {Object} [meta]
|
|
1134
|
+
* @property {boolean} [buy_now]
|
|
1135
|
+
* @property {boolean} [is_active]
|
|
1136
|
+
* @property {Object} cashback
|
|
1137
|
+
* @property {Object[]} [payment_methods]
|
|
1138
|
+
* @property {string} [gstin]
|
|
1139
|
+
* @property {Object} [delivery_charges]
|
|
1140
|
+
* @property {boolean} [merge_qty]
|
|
1141
|
+
* @property {string} user_id
|
|
1142
|
+
* @property {string} [app_id]
|
|
1143
|
+
*/
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* @typedef AbandonedCartResponse
|
|
1147
|
+
* @property {AbandonedCart[]} [items]
|
|
1148
|
+
* @property {Object} [result]
|
|
1390
1149
|
* @property {Page} [page]
|
|
1391
1150
|
* @property {boolean} [success] - The request success is defined
|
|
1392
1151
|
* @property {string} [message] - Message of the response
|
|
@@ -1394,54 +1153,47 @@ const Joi = require("joi");
|
|
|
1394
1153
|
|
|
1395
1154
|
/**
|
|
1396
1155
|
* @typedef PaymentSelectionLock
|
|
1397
|
-
* @property {string} [payment_identifier]
|
|
1398
|
-
* @property {string} [default_options]
|
|
1399
|
-
* @property {boolean} [enabled]
|
|
1156
|
+
* @property {string} [payment_identifier]
|
|
1157
|
+
* @property {string} [default_options]
|
|
1158
|
+
* @property {boolean} [enabled]
|
|
1400
1159
|
*/
|
|
1401
1160
|
|
|
1402
1161
|
/**
|
|
1403
1162
|
* @typedef CartCurrency
|
|
1404
1163
|
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
1405
|
-
* @property {string} [symbol]
|
|
1164
|
+
* @property {string} [symbol]
|
|
1406
1165
|
*/
|
|
1407
1166
|
|
|
1408
1167
|
/**
|
|
1409
1168
|
* @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
|
|
1169
|
+
* @property {number} [cashback_amount]
|
|
1170
|
+
* @property {string} [cashback_message_primary]
|
|
1171
|
+
* @property {string} [cashback_message_secondary]
|
|
1172
|
+
* @property {string} [coupon_code]
|
|
1173
|
+
* @property {string} [coupon_description]
|
|
1174
|
+
* @property {string} [coupon_id]
|
|
1175
|
+
* @property {string} [coupon_subtitle]
|
|
1176
|
+
* @property {string} [coupon_title]
|
|
1177
|
+
* @property {string} [coupon_type]
|
|
1178
|
+
* @property {number} [coupon_value]
|
|
1179
|
+
* @property {number} [discount]
|
|
1180
|
+
* @property {boolean} [is_applied]
|
|
1181
|
+
* @property {boolean} [is_valid]
|
|
1182
|
+
* @property {number} [maximum_discount_value]
|
|
1183
|
+
* @property {string} [message]
|
|
1184
|
+
* @property {number} [minimum_cart_value]
|
|
1432
1185
|
*/
|
|
1433
1186
|
|
|
1434
1187
|
/**
|
|
1435
1188
|
* @typedef ChargesThreshold
|
|
1436
|
-
* @property {number} [charges]
|
|
1437
|
-
* @property {number} [threshold]
|
|
1438
|
-
* should be applied
|
|
1189
|
+
* @property {number} [charges]
|
|
1190
|
+
* @property {number} [threshold]
|
|
1439
1191
|
*/
|
|
1440
1192
|
|
|
1441
1193
|
/**
|
|
1442
1194
|
* @typedef DeliveryChargesConfig
|
|
1443
|
-
* @property {boolean} [enabled]
|
|
1444
|
-
* @property {ChargesThreshold[]} [charges]
|
|
1195
|
+
* @property {boolean} [enabled]
|
|
1196
|
+
* @property {ChargesThreshold[]} [charges]
|
|
1445
1197
|
*/
|
|
1446
1198
|
|
|
1447
1199
|
/**
|
|
@@ -1450,734 +1202,546 @@ const Joi = require("joi");
|
|
|
1450
1202
|
*/
|
|
1451
1203
|
|
|
1452
1204
|
/**
|
|
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
|
|
1205
|
+
* @typedef CartDetailResponse
|
|
1206
|
+
* @property {number} [cart_id]
|
|
1207
|
+
* @property {string} [uid]
|
|
1208
|
+
* @property {string} [coupon_text]
|
|
1209
|
+
* @property {string} [id]
|
|
1210
|
+
* @property {Object} [pan_config]
|
|
1460
1211
|
* @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
|
|
1212
|
+
* @property {string} [comment]
|
|
1213
|
+
* @property {CartProductInfo[]} [items]
|
|
1465
1214
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1466
|
-
* @property {string} [delivery_charge_info]
|
|
1467
|
-
* message on shipment
|
|
1215
|
+
* @property {string} [delivery_charge_info]
|
|
1468
1216
|
* @property {CartCommonConfig} [common_config]
|
|
1469
1217
|
* @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
|
|
1218
|
+
* @property {boolean} [restrict_checkout]
|
|
1219
|
+
* @property {string} [message]
|
|
1220
|
+
* @property {Object} [notification]
|
|
1221
|
+
* @property {string} [staff_user_id]
|
|
1222
|
+
* @property {boolean} [success]
|
|
1478
1223
|
* @property {CartBreakup} [breakup_values]
|
|
1479
|
-
* @property {boolean} [is_valid]
|
|
1480
|
-
* response is valid or not
|
|
1224
|
+
* @property {boolean} [is_valid]
|
|
1481
1225
|
* @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
|
|
1226
|
+
* @property {string} [checkout_mode]
|
|
1227
|
+
* @property {string} [last_modified]
|
|
1228
|
+
* @property {boolean} [buy_now]
|
|
1229
|
+
* @property {string} [gstin]
|
|
1230
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1231
|
+
* @property {string} [pan_no]
|
|
1232
|
+
* @property {Object} [custom_cart_meta]
|
|
1493
1233
|
*/
|
|
1494
1234
|
|
|
1495
1235
|
/**
|
|
1496
1236
|
* @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
|
|
1237
|
+
* @property {number} [quantity]
|
|
1238
|
+
* @property {string} [item_size]
|
|
1239
|
+
* @property {number} [seller_id]
|
|
1240
|
+
* @property {Object[]} [parent_item_identifiers]
|
|
1241
|
+
* @property {string[]} [product_group_tags]
|
|
1242
|
+
* @property {string} [article_id]
|
|
1243
|
+
* @property {Object} [article_assignment]
|
|
1244
|
+
* @property {number} [store_id]
|
|
1245
|
+
* @property {string} [display]
|
|
1246
|
+
* @property {number} [item_id]
|
|
1247
|
+
* @property {Object} [extra_meta]
|
|
1248
|
+
* @property {Object} [_custom_json]
|
|
1249
|
+
* @property {Object} [meta]
|
|
1250
|
+
* @property {boolean} [pos]
|
|
1520
1251
|
* @property {string} [seller_identifier] - Add items using seller identifier for store os
|
|
1521
1252
|
*/
|
|
1522
1253
|
|
|
1523
1254
|
/**
|
|
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
|
|
1255
|
+
* @typedef AddCartRequest
|
|
1256
|
+
* @property {boolean} [new_cart]
|
|
1257
|
+
* @property {AddProductCart[]} [items]
|
|
1529
1258
|
*/
|
|
1530
1259
|
|
|
1531
1260
|
/**
|
|
1532
|
-
* @typedef
|
|
1261
|
+
* @typedef AddCartDetailResponse
|
|
1533
1262
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1534
1263
|
* False if partially added or not added.
|
|
1535
|
-
* @property {
|
|
1264
|
+
* @property {CartDetailResponse} [cart]
|
|
1536
1265
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
1537
1266
|
* added. True if only few are added.
|
|
1538
|
-
* @property {string} [message]
|
|
1267
|
+
* @property {string} [message]
|
|
1539
1268
|
*/
|
|
1540
1269
|
|
|
1541
1270
|
/**
|
|
1542
1271
|
* @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
|
|
1272
|
+
* @property {number} [quantity]
|
|
1273
|
+
* @property {string} [item_size]
|
|
1274
|
+
* @property {Object} [parent_item_identifiers]
|
|
1275
|
+
* @property {Object} [meta]
|
|
1276
|
+
* @property {Object} [extra_meta]
|
|
1277
|
+
* @property {Object} [_custom_json]
|
|
1278
|
+
* @property {number} [item_id]
|
|
1279
|
+
* @property {number} [item_index]
|
|
1553
1280
|
* @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.
|
|
1281
|
+
* @property {string} [article_id]
|
|
1562
1282
|
*/
|
|
1563
1283
|
|
|
1564
1284
|
/**
|
|
1565
|
-
* @typedef
|
|
1285
|
+
* @typedef UpdateCartRequest
|
|
1566
1286
|
* @property {UpdateProductCart[]} [items]
|
|
1567
|
-
* @property {
|
|
1568
|
-
* items with updated sizes.
|
|
1569
|
-
* @property {string} operation - Cart opertaion type
|
|
1287
|
+
* @property {string} operation
|
|
1570
1288
|
*/
|
|
1571
1289
|
|
|
1572
1290
|
/**
|
|
1573
|
-
* @typedef
|
|
1291
|
+
* @typedef UpdateCartDetailResponse
|
|
1574
1292
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1575
1293
|
* False if partially added or not added.
|
|
1576
|
-
* @property {
|
|
1577
|
-
* @property {string} [message]
|
|
1294
|
+
* @property {CartDetailResponse} [cart]
|
|
1295
|
+
* @property {string} [message]
|
|
1578
1296
|
*/
|
|
1579
1297
|
|
|
1580
1298
|
/**
|
|
1581
1299
|
* @typedef OverrideCartItemPromo
|
|
1582
|
-
* @property {string} promo_id
|
|
1583
|
-
* @property {string} promo_amount
|
|
1584
|
-
* @property {string} [promo_desc]
|
|
1300
|
+
* @property {string} promo_id
|
|
1301
|
+
* @property {string} promo_amount
|
|
1302
|
+
* @property {string} [promo_desc]
|
|
1585
1303
|
* @property {string} [rwrd_tndr]
|
|
1586
|
-
* @property {Object[]} [item_list]
|
|
1587
|
-
* @property {string} [parent_promo_id]
|
|
1304
|
+
* @property {Object[]} [item_list]
|
|
1305
|
+
* @property {string} [parent_promo_id]
|
|
1588
1306
|
*/
|
|
1589
1307
|
|
|
1590
1308
|
/**
|
|
1591
1309
|
* @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
|
|
1310
|
+
* @property {string} [seller_identifier]
|
|
1311
|
+
* @property {number} [quantity]
|
|
1312
|
+
* @property {string} size
|
|
1313
|
+
* @property {number} price_marked
|
|
1314
|
+
* @property {number} amount_paid
|
|
1315
|
+
* @property {OverrideCartItemPromo[]} [promo_list]
|
|
1316
|
+
* @property {Object} [extra_meta]
|
|
1317
|
+
* @property {number} item_id
|
|
1318
|
+
* @property {number} discount
|
|
1319
|
+
* @property {number} price_effective
|
|
1603
1320
|
*/
|
|
1604
1321
|
|
|
1605
1322
|
/**
|
|
1606
1323
|
* @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
|
|
1324
|
+
* @property {string} cart_id
|
|
1325
|
+
* @property {string} payment_mode
|
|
1326
|
+
* @property {Object} [billing_address]
|
|
1327
|
+
* @property {string} merchant_code
|
|
1328
|
+
* @property {string} payment_identifier
|
|
1329
|
+
* @property {string} currency_code
|
|
1330
|
+
* @property {string} aggregator
|
|
1331
|
+
* @property {string} order_type
|
|
1332
|
+
* @property {string} [callback_url]
|
|
1333
|
+
* @property {OverrideCartItem[]} cart_items
|
|
1334
|
+
* @property {number} [ordering_store]
|
|
1335
|
+
* @property {Object} [shipping_address]
|
|
1336
|
+
*/
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* @typedef OverrideCheckoutResponse
|
|
1340
|
+
* @property {Object} data
|
|
1341
|
+
* @property {Object} cart
|
|
1342
|
+
* @property {string} success
|
|
1343
|
+
* @property {string} order_id
|
|
1344
|
+
* @property {string} message
|
|
1345
|
+
*/
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* @typedef GetShareCartLinkRequest
|
|
1644
1349
|
* @property {string} [id] - Cart uid for generating sharing
|
|
1645
1350
|
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
1646
1351
|
* data will be used to generate link as well as sent as shared details.
|
|
1647
1352
|
*/
|
|
1648
1353
|
|
|
1649
1354
|
/**
|
|
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
|
|
1355
|
+
* @typedef GetShareCartLinkResponse
|
|
1356
|
+
* @property {string} [token] - Short url unique id
|
|
1357
|
+
* @property {string} [share_url] - Short shareable final url
|
|
1655
1358
|
*/
|
|
1656
1359
|
|
|
1657
1360
|
/**
|
|
1658
1361
|
* @typedef SharedCartDetails
|
|
1659
1362
|
* @property {Object} [source] - Share link device and other source information
|
|
1660
1363
|
* @property {Object} [user] - User details of who generated share link
|
|
1661
|
-
* @property {string} [token] - Short link id
|
|
1662
|
-
* @property {string} [created_on]
|
|
1364
|
+
* @property {string} [token] - Short link id
|
|
1365
|
+
* @property {string} [created_on]
|
|
1663
1366
|
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
1664
1367
|
*/
|
|
1665
1368
|
|
|
1666
1369
|
/**
|
|
1667
1370
|
* @typedef SharedCart
|
|
1668
|
-
* @property {string} [coupon_text]
|
|
1669
|
-
* @property {string} [id]
|
|
1371
|
+
* @property {string} [coupon_text]
|
|
1372
|
+
* @property {string} [id]
|
|
1670
1373
|
* @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
|
|
1374
|
+
* @property {string} [comment]
|
|
1375
|
+
* @property {CartProductInfo[]} [items]
|
|
1675
1376
|
* @property {SharedCartDetails} [shared_cart_details]
|
|
1676
1377
|
* @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
|
|
1378
|
+
* @property {string} [delivery_charge_info]
|
|
1379
|
+
* @property {boolean} [restrict_checkout]
|
|
1380
|
+
* @property {string} [message]
|
|
1682
1381
|
* @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
|
|
1382
|
+
* @property {boolean} [is_valid]
|
|
1383
|
+
* @property {string} [uid]
|
|
1384
|
+
* @property {string} [checkout_mode]
|
|
1687
1385
|
* @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
|
|
1386
|
+
* @property {string} [last_modified]
|
|
1387
|
+
* @property {boolean} [buy_now]
|
|
1388
|
+
* @property {number} [cart_id]
|
|
1389
|
+
* @property {string} [gstin]
|
|
1390
|
+
* @property {Object} [custom_cart_meta]
|
|
1694
1391
|
*/
|
|
1695
1392
|
|
|
1696
1393
|
/**
|
|
1697
|
-
* @typedef
|
|
1394
|
+
* @typedef SharedCartResponse
|
|
1698
1395
|
* @property {SharedCart} [cart]
|
|
1699
|
-
* @property {string} [error]
|
|
1700
|
-
* type of error, error code and error message
|
|
1396
|
+
* @property {string} [error]
|
|
1701
1397
|
*/
|
|
1702
1398
|
|
|
1703
1399
|
/**
|
|
1704
1400
|
* @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
|
|
1401
|
+
* @property {string} [cart_id]
|
|
1402
|
+
* @property {Object} [pick_up_customer_details]
|
|
1403
|
+
* @property {number} [cart_value]
|
|
1404
|
+
* @property {string} [created_on]
|
|
1405
|
+
* @property {string} [user_id]
|
|
1406
|
+
* @property {string} [currency_code]
|
|
1407
|
+
* @property {number} [item_counts]
|
|
1713
1408
|
*/
|
|
1714
1409
|
|
|
1715
1410
|
/**
|
|
1716
|
-
* @typedef
|
|
1717
|
-
* @property {boolean} [success]
|
|
1718
|
-
* @property {CartList[]} [data]
|
|
1411
|
+
* @typedef MultiCartResponse
|
|
1412
|
+
* @property {boolean} [success]
|
|
1413
|
+
* @property {CartList[]} [data]
|
|
1719
1414
|
*/
|
|
1720
1415
|
|
|
1721
1416
|
/**
|
|
1722
1417
|
* @typedef UpdateUserCartMapping
|
|
1723
|
-
* @property {string} user_id
|
|
1418
|
+
* @property {string} user_id
|
|
1724
1419
|
*/
|
|
1725
1420
|
|
|
1726
1421
|
/**
|
|
1727
1422
|
* @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]
|
|
1423
|
+
* @property {string} [gender]
|
|
1424
|
+
* @property {string} [modified_on]
|
|
1425
|
+
* @property {string} [_id]
|
|
1426
|
+
* @property {string} [uid]
|
|
1427
|
+
* @property {string} [external_id]
|
|
1428
|
+
* @property {string} [mobile]
|
|
1429
|
+
* @property {string} [last_name]
|
|
1430
|
+
* @property {string} [created_at]
|
|
1431
|
+
* @property {string} [first_name]
|
|
1737
1432
|
*/
|
|
1738
1433
|
|
|
1739
1434
|
/**
|
|
1740
|
-
* @typedef
|
|
1741
|
-
* @property {string} [coupon_text]
|
|
1435
|
+
* @typedef UserCartMappingResponse
|
|
1436
|
+
* @property {string} [coupon_text]
|
|
1742
1437
|
* @property {UserInfo} [user]
|
|
1743
|
-
* @property {string} [id]
|
|
1744
|
-
* @property {Object} [pan_config]
|
|
1745
|
-
* user should enter the pan card
|
|
1438
|
+
* @property {string} [id]
|
|
1439
|
+
* @property {Object} [pan_config]
|
|
1746
1440
|
* @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
|
|
1441
|
+
* @property {string} [comment]
|
|
1442
|
+
* @property {CartProductInfo[]} [items]
|
|
1751
1443
|
* @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
|
|
1444
|
+
* @property {string} [delivery_charge_info]
|
|
1445
|
+
* @property {boolean} [restrict_checkout]
|
|
1446
|
+
* @property {string} [message]
|
|
1757
1447
|
* @property {CartBreakup} [breakup_values]
|
|
1758
|
-
* @property {boolean} [is_valid]
|
|
1759
|
-
* response is valid or not
|
|
1448
|
+
* @property {boolean} [is_valid]
|
|
1760
1449
|
* @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
|
|
1450
|
+
* @property {string} [checkout_mode]
|
|
1451
|
+
* @property {string} [last_modified]
|
|
1452
|
+
* @property {boolean} [buy_now]
|
|
1453
|
+
* @property {string} [gstin]
|
|
1454
|
+
* @property {Object} [custom_cart_meta]
|
|
1455
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1456
|
+
* @property {string} [pan_no]
|
|
1772
1457
|
*/
|
|
1773
1458
|
|
|
1774
1459
|
/**
|
|
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
|
|
1460
|
+
* @typedef PlatformAddCartRequest
|
|
1461
|
+
* @property {string} [user_id]
|
|
1462
|
+
* @property {boolean} [new_cart]
|
|
1463
|
+
* @property {AddProductCart[]} [items]
|
|
1782
1464
|
*/
|
|
1783
1465
|
|
|
1784
1466
|
/**
|
|
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
|
|
1467
|
+
* @typedef PlatformUpdateCartRequest
|
|
1468
|
+
* @property {string} [user_id]
|
|
1469
|
+
* @property {UpdateProductCart[]} [items]
|
|
1470
|
+
* @property {string} operation
|
|
1794
1471
|
*/
|
|
1795
1472
|
|
|
1796
1473
|
/**
|
|
1797
|
-
* @typedef
|
|
1798
|
-
* @property {string[]} [cart_id_list]
|
|
1474
|
+
* @typedef DeleteCartRequest
|
|
1475
|
+
* @property {string[]} [cart_id_list]
|
|
1799
1476
|
*/
|
|
1800
1477
|
|
|
1801
1478
|
/**
|
|
1802
|
-
* @typedef
|
|
1479
|
+
* @typedef DeleteCartDetailResponse
|
|
1803
1480
|
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
1804
1481
|
* if not archived.
|
|
1805
|
-
* @property {string} [message]
|
|
1482
|
+
* @property {string} [message]
|
|
1806
1483
|
*/
|
|
1807
1484
|
|
|
1808
1485
|
/**
|
|
1809
|
-
* @typedef
|
|
1486
|
+
* @typedef CartItemCountResponse
|
|
1810
1487
|
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
1811
1488
|
*/
|
|
1812
1489
|
|
|
1813
1490
|
/**
|
|
1814
1491
|
* @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
|
|
1492
|
+
* @property {string} [title]
|
|
1493
|
+
* @property {number} [max_discount_value]
|
|
1494
|
+
* @property {string} [coupon_code]
|
|
1495
|
+
* @property {boolean} [is_applied]
|
|
1496
|
+
* @property {string} [coupon_type]
|
|
1497
|
+
* @property {string} [expires_on]
|
|
1498
|
+
* @property {number} [coupon_value]
|
|
1499
|
+
* @property {string} [sub_title]
|
|
1500
|
+
* @property {number} [minimum_cart_value]
|
|
1501
|
+
* @property {boolean} [is_applicable]
|
|
1502
|
+
* @property {string} [message]
|
|
1503
|
+
* @property {string} [description]
|
|
1504
|
+
* @property {string} [start_date]
|
|
1505
|
+
* @property {string} [end_date]
|
|
1506
|
+
* @property {string} [coupon_applicable_message]
|
|
1838
1507
|
*/
|
|
1839
1508
|
|
|
1840
1509
|
/**
|
|
1841
1510
|
* @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
|
|
1511
|
+
* @property {boolean} [has_next]
|
|
1512
|
+
* @property {number} [current]
|
|
1513
|
+
* @property {number} [total]
|
|
1514
|
+
* @property {number} [total_item_count]
|
|
1515
|
+
* @property {boolean} [has_previous]
|
|
1848
1516
|
*/
|
|
1849
1517
|
|
|
1850
1518
|
/**
|
|
1851
|
-
* @typedef
|
|
1852
|
-
* @property {Coupon[]} [available_coupon_list]
|
|
1853
|
-
* can be applied on cart
|
|
1519
|
+
* @typedef GetCouponResponse
|
|
1520
|
+
* @property {Coupon[]} [available_coupon_list]
|
|
1854
1521
|
* @property {PageCoupon} [page]
|
|
1855
1522
|
*/
|
|
1856
1523
|
|
|
1857
1524
|
/**
|
|
1858
|
-
* @typedef
|
|
1525
|
+
* @typedef ApplyCouponRequest
|
|
1859
1526
|
* @property {string} coupon_code - Coupon code to be applied
|
|
1860
1527
|
*/
|
|
1861
1528
|
|
|
1862
1529
|
/**
|
|
1863
1530
|
* @typedef GeoLocation
|
|
1864
|
-
* @property {number} [longitude]
|
|
1865
|
-
* @property {number} [latitude]
|
|
1531
|
+
* @property {number} [longitude]
|
|
1532
|
+
* @property {number} [latitude]
|
|
1866
1533
|
*/
|
|
1867
1534
|
|
|
1868
1535
|
/**
|
|
1869
1536
|
* @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
|
|
1537
|
+
* @property {string} [phone]
|
|
1538
|
+
* @property {string} [id]
|
|
1539
|
+
* @property {string} [area_code_slug]
|
|
1540
|
+
* @property {string} [country_code]
|
|
1875
1541
|
* @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
|
|
1542
|
+
* @property {string} [country]
|
|
1543
|
+
* @property {string} [state]
|
|
1544
|
+
* @property {boolean} [is_default_address]
|
|
1545
|
+
* @property {string[]} [tags]
|
|
1546
|
+
* @property {string} [created_by_user_id]
|
|
1547
|
+
* @property {string} [landmark]
|
|
1548
|
+
* @property {string} [email]
|
|
1549
|
+
* @property {string} [area_code]
|
|
1550
|
+
* @property {string} [checkout_mode]
|
|
1551
|
+
* @property {Object} [meta]
|
|
1552
|
+
* @property {boolean} [is_active]
|
|
1553
|
+
* @property {string} [name]
|
|
1554
|
+
* @property {Object} [google_map_point]
|
|
1555
|
+
* @property {string} [cart_id]
|
|
1556
|
+
* @property {string} [city]
|
|
1557
|
+
* @property {string} [sector]
|
|
1894
1558
|
* @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]
|
|
1559
|
+
* @property {string} [area]
|
|
1560
|
+
* @property {string} [user_id]
|
|
1561
|
+
* @property {string} [address_type]
|
|
1562
|
+
* @property {string} [address]
|
|
1563
|
+
* @property {string} [country_phone_code]
|
|
1564
|
+
* @property {string} [country_iso_code]
|
|
1565
|
+
* @property {Object} [_custom_json]
|
|
1902
1566
|
*/
|
|
1903
1567
|
|
|
1904
1568
|
/**
|
|
1905
|
-
* @typedef
|
|
1906
|
-
* @property {
|
|
1907
|
-
* @property {number} user_address_count - The total number of addresses saved by a user.
|
|
1569
|
+
* @typedef PlatformGetAddressesResponse
|
|
1570
|
+
* @property {PlatformAddress[]} [address]
|
|
1908
1571
|
*/
|
|
1909
1572
|
|
|
1910
1573
|
/**
|
|
1911
|
-
* @typedef
|
|
1912
|
-
* @property {
|
|
1913
|
-
* @property {
|
|
1574
|
+
* @typedef SaveAddressResponse
|
|
1575
|
+
* @property {string} [id]
|
|
1576
|
+
* @property {boolean} [success]
|
|
1577
|
+
* @property {boolean} [is_default_address]
|
|
1914
1578
|
*/
|
|
1915
1579
|
|
|
1916
1580
|
/**
|
|
1917
|
-
* @typedef
|
|
1918
|
-
* @property {string} [id]
|
|
1919
|
-
* @property {boolean} [
|
|
1920
|
-
* @property {boolean} [
|
|
1921
|
-
*
|
|
1581
|
+
* @typedef UpdateAddressResponse
|
|
1582
|
+
* @property {string} [id]
|
|
1583
|
+
* @property {boolean} [is_default_address]
|
|
1584
|
+
* @property {boolean} [success]
|
|
1585
|
+
* @property {boolean} [is_updated]
|
|
1922
1586
|
*/
|
|
1923
1587
|
|
|
1924
1588
|
/**
|
|
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
|
|
1589
|
+
* @typedef DeleteAddressResponse
|
|
1590
|
+
* @property {string} [id]
|
|
1591
|
+
* @property {boolean} [is_deleted]
|
|
1932
1592
|
*/
|
|
1933
1593
|
|
|
1934
1594
|
/**
|
|
1935
|
-
* @typedef
|
|
1936
|
-
* @property {string} [
|
|
1937
|
-
* @property {
|
|
1938
|
-
*
|
|
1595
|
+
* @typedef PlatformSelectCartAddressRequest
|
|
1596
|
+
* @property {string} [cart_id]
|
|
1597
|
+
* @property {string} [billing_address_id]
|
|
1598
|
+
* @property {string} [checkout_mode]
|
|
1599
|
+
* @property {string} [id]
|
|
1600
|
+
* @property {string} [user_id]
|
|
1939
1601
|
*/
|
|
1940
1602
|
|
|
1941
1603
|
/**
|
|
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
|
|
1604
|
+
* @typedef ShipmentArticle
|
|
1605
|
+
* @property {string} [meta]
|
|
1606
|
+
* @property {string} [quantity]
|
|
1607
|
+
* @property {string} [article_id]
|
|
1950
1608
|
*/
|
|
1951
1609
|
|
|
1952
1610
|
/**
|
|
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
|
|
1611
|
+
* @typedef PlatformShipmentResponse
|
|
1612
|
+
* @property {number} [shipments]
|
|
1613
|
+
* @property {number} [fulfillment_id]
|
|
1614
|
+
* @property {CartProductInfo[]} [items]
|
|
1615
|
+
* @property {Object} [dp_options]
|
|
1616
|
+
* @property {string} [shipment_type]
|
|
1617
|
+
* @property {string} [order_type]
|
|
1618
|
+
* @property {string} [box_type]
|
|
1973
1619
|
* @property {ShipmentPromise} [promise]
|
|
1974
|
-
* @property {string} [dp_id]
|
|
1975
|
-
* @property {string} [fulfillment_type]
|
|
1976
|
-
* @property {ShipmentArticle[]} [articles]
|
|
1620
|
+
* @property {string} [dp_id]
|
|
1621
|
+
* @property {string} [fulfillment_type]
|
|
1622
|
+
* @property {ShipmentArticle[]} [articles]
|
|
1977
1623
|
*/
|
|
1978
1624
|
|
|
1979
1625
|
/**
|
|
1980
|
-
* @typedef
|
|
1981
|
-
* @property {string} [coupon_text]
|
|
1982
|
-
* @property {string} [id]
|
|
1983
|
-
* @property {Object} [pan_config]
|
|
1984
|
-
* user should enter the pan card
|
|
1626
|
+
* @typedef PlatformCartShipmentsResponse
|
|
1627
|
+
* @property {string} [coupon_text]
|
|
1628
|
+
* @property {string} [id]
|
|
1629
|
+
* @property {Object} [pan_config]
|
|
1985
1630
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1986
|
-
* @property {string} [comment]
|
|
1987
|
-
* @property {CartProductInfo[]} [items]
|
|
1631
|
+
* @property {string} [comment]
|
|
1632
|
+
* @property {CartProductInfo[]} [items]
|
|
1988
1633
|
* @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
|
|
1634
|
+
* @property {string} [delivery_charge_info]
|
|
1635
|
+
* @property {boolean} [restrict_checkout]
|
|
1636
|
+
* @property {string} [message]
|
|
1994
1637
|
* @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
|
|
1638
|
+
* @property {string} [staff_user_id]
|
|
1639
|
+
* @property {boolean} [is_valid]
|
|
1640
|
+
* @property {PlatformShipmentResponse[]} [shipments]
|
|
2001
1641
|
* @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
|
|
1642
|
+
* @property {string} [checkout_mode]
|
|
1643
|
+
* @property {string} [last_modified]
|
|
1644
|
+
* @property {boolean} [buy_now]
|
|
1645
|
+
* @property {string} [gstin]
|
|
1646
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1647
|
+
* @property {boolean} [error]
|
|
1648
|
+
* @property {string} [pan_no]
|
|
1649
|
+
* @property {Object} [custom_cart_meta]
|
|
2013
1650
|
*/
|
|
2014
1651
|
|
|
2015
1652
|
/**
|
|
2016
1653
|
* @typedef UpdateCartShipmentItem
|
|
2017
1654
|
* @property {number} [quantity] - Quantity of product in shipment
|
|
2018
1655
|
* @property {string} shipment_type - Shipment delivery type
|
|
2019
|
-
* @property {string} article_uid - Article
|
|
1656
|
+
* @property {string} article_uid - Article mongo id
|
|
2020
1657
|
*/
|
|
2021
1658
|
|
|
2022
1659
|
/**
|
|
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
|
|
1660
|
+
* @typedef UpdateCartShipmentRequest
|
|
1661
|
+
* @property {UpdateCartShipmentItem[]} shipments
|
|
2027
1662
|
*/
|
|
2028
1663
|
|
|
2029
1664
|
/**
|
|
2030
|
-
* @typedef
|
|
2031
|
-
* @property {string} [gstin]
|
|
1665
|
+
* @typedef PlatformCartMetaRequest
|
|
1666
|
+
* @property {string} [gstin]
|
|
2032
1667
|
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
2033
1668
|
* 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
|
|
1669
|
+
* @property {string} [checkout_mode]
|
|
1670
|
+
* @property {Object} [gift_details]
|
|
1671
|
+
* @property {string} [pan_no]
|
|
1672
|
+
* @property {string} [comment]
|
|
2039
1673
|
* @property {string} [staff_user_id] - Staff user id
|
|
2040
1674
|
*/
|
|
2041
1675
|
|
|
2042
1676
|
/**
|
|
2043
|
-
* @typedef
|
|
2044
|
-
* @property {boolean} [is_valid]
|
|
2045
|
-
* @property {string} [message]
|
|
1677
|
+
* @typedef CartMetaResponse
|
|
1678
|
+
* @property {boolean} [is_valid]
|
|
1679
|
+
* @property {string} [message]
|
|
2046
1680
|
*/
|
|
2047
1681
|
|
|
2048
1682
|
/**
|
|
2049
|
-
* @typedef
|
|
2050
|
-
* @property {string[]} [errors]
|
|
1683
|
+
* @typedef CartMetaMissingResponse
|
|
1684
|
+
* @property {string[]} [errors]
|
|
2051
1685
|
*/
|
|
2052
1686
|
|
|
2053
1687
|
/**
|
|
2054
1688
|
* @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
|
|
1689
|
+
* @property {string} [employee_code]
|
|
1690
|
+
* @property {string} _id
|
|
1691
|
+
* @property {string} user
|
|
1692
|
+
* @property {string} last_name
|
|
1693
|
+
* @property {string} first_name
|
|
2064
1694
|
*/
|
|
2065
1695
|
|
|
2066
1696
|
/**
|
|
2067
1697
|
* @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
|
|
1698
|
+
* @property {string} [name]
|
|
1699
|
+
* @property {string} [email]
|
|
1700
|
+
* @property {string} mobile
|
|
2074
1701
|
*/
|
|
2075
1702
|
|
|
2076
1703
|
/**
|
|
2077
1704
|
* @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]
|
|
1705
|
+
* @property {string} key
|
|
1706
|
+
* @property {string[]} values
|
|
2121
1707
|
*/
|
|
2122
1708
|
|
|
2123
1709
|
/**
|
|
2124
1710
|
* @typedef CheckCart
|
|
2125
|
-
* @property {string} [coupon_text]
|
|
2126
|
-
* @property {string} [cod_message]
|
|
2127
|
-
* @property {string} [id]
|
|
2128
|
-
* @property {string} [store_code]
|
|
1711
|
+
* @property {string} [coupon_text]
|
|
1712
|
+
* @property {string} [cod_message]
|
|
1713
|
+
* @property {string} [id]
|
|
1714
|
+
* @property {string} [store_code]
|
|
2129
1715
|
* @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
|
|
1716
|
+
* @property {string} [comment]
|
|
1717
|
+
* @property {string} [user_type]
|
|
1718
|
+
* @property {CartProductInfo[]} [items]
|
|
1719
|
+
* @property {string} [error_message]
|
|
1720
|
+
* @property {boolean} [success]
|
|
2136
1721
|
* @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
|
|
1722
|
+
* @property {string} [delivery_charge_info]
|
|
1723
|
+
* @property {boolean} [restrict_checkout]
|
|
1724
|
+
* @property {string} [order_id]
|
|
1725
|
+
* @property {string} [message]
|
|
2143
1726
|
* @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
|
|
1727
|
+
* @property {number} [cod_charges]
|
|
1728
|
+
* @property {boolean} [is_valid]
|
|
1729
|
+
* @property {string} [uid]
|
|
1730
|
+
* @property {string} [checkout_mode]
|
|
2149
1731
|
* @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
|
|
1732
|
+
* @property {string} [last_modified]
|
|
1733
|
+
* @property {boolean} [buy_now]
|
|
1734
|
+
* @property {number} [delivery_charge_order_value]
|
|
1735
|
+
* @property {number} [cart_id]
|
|
1736
|
+
* @property {Object[]} [store_emps]
|
|
1737
|
+
* @property {string} [gstin]
|
|
1738
|
+
* @property {boolean} [cod_available]
|
|
1739
|
+
* @property {number} [delivery_charges]
|
|
1740
|
+
* @property {Object} [custom_cart_meta]
|
|
2177
1741
|
*/
|
|
2178
1742
|
|
|
2179
1743
|
/**
|
|
2180
|
-
* @typedef
|
|
1744
|
+
* @typedef CartCheckoutResponse
|
|
2181
1745
|
* @property {string} [app_intercept_url]
|
|
2182
1746
|
* @property {Object} [data]
|
|
2183
1747
|
* @property {CheckCart} [cart]
|
|
@@ -2189,204 +1753,157 @@ const Joi = require("joi");
|
|
|
2189
1753
|
*/
|
|
2190
1754
|
|
|
2191
1755
|
/**
|
|
2192
|
-
* @typedef
|
|
1756
|
+
* @typedef CartDeliveryModesResponse
|
|
2193
1757
|
* @property {number[]} [pickup_stores] - Store pick up available store uids
|
|
2194
1758
|
* @property {string[]} [available_modes] - Available delivery modes
|
|
2195
1759
|
*/
|
|
2196
1760
|
|
|
2197
1761
|
/**
|
|
2198
1762
|
* @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
|
|
1763
|
+
* @property {string} [country]
|
|
1764
|
+
* @property {string} [state]
|
|
1765
|
+
* @property {string} [city]
|
|
1766
|
+
* @property {string} [phone]
|
|
1767
|
+
* @property {string} [area_code]
|
|
1768
|
+
* @property {number} [uid]
|
|
1769
|
+
* @property {string} [area_code_slug]
|
|
1770
|
+
* @property {string} [address_type]
|
|
1771
|
+
* @property {string} [area]
|
|
1772
|
+
* @property {number} [id]
|
|
1773
|
+
* @property {string} [store_manager_name]
|
|
1774
|
+
* @property {string} [name]
|
|
1775
|
+
* @property {string} [store_code]
|
|
1776
|
+
* @property {string} [landmark]
|
|
1777
|
+
* @property {string} [email]
|
|
1778
|
+
* @property {number} [pincode]
|
|
1779
|
+
* @property {string} [address]
|
|
1780
|
+
*/
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* @typedef StoreDetailsResponse
|
|
1784
|
+
* @property {PickupStoreDetail[]} [items]
|
|
1785
|
+
*/
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* @typedef UpdateCartPaymentRequest
|
|
1789
|
+
* @property {string} [address_id]
|
|
1790
|
+
* @property {string} [payment_mode]
|
|
1791
|
+
* @property {string} [aggregator_name]
|
|
1792
|
+
* @property {string} [merchant_code]
|
|
1793
|
+
* @property {string} [payment_identifier]
|
|
1794
|
+
* @property {string} [id]
|
|
2236
1795
|
*/
|
|
2237
1796
|
|
|
2238
1797
|
/**
|
|
2239
1798
|
* @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.
|
|
1799
|
+
* @property {string} [title]
|
|
1800
|
+
* @property {boolean} [next_validation_required]
|
|
1801
|
+
* @property {boolean} [valid]
|
|
1802
|
+
* @property {string} [display_message_en]
|
|
1803
|
+
* @property {string} [code]
|
|
1804
|
+
* @property {number} [discount]
|
|
2249
1805
|
*/
|
|
2250
1806
|
|
|
2251
1807
|
/**
|
|
2252
1808
|
* @typedef PaymentCouponValidate
|
|
2253
|
-
* @property {boolean} success
|
|
2254
|
-
* @property {string} [message]
|
|
1809
|
+
* @property {boolean} success
|
|
1810
|
+
* @property {string} [message]
|
|
2255
1811
|
* @property {CouponValidity} [coupon_validity]
|
|
2256
1812
|
*/
|
|
2257
1813
|
|
|
2258
1814
|
/**
|
|
2259
1815
|
* @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
|
|
1816
|
+
* @property {string} [payment_gateway]
|
|
1817
|
+
* @property {string} [type]
|
|
1818
|
+
* @property {string} [payment_identifier]
|
|
1819
|
+
* @property {string} [merchant_code]
|
|
2266
1820
|
*/
|
|
2267
1821
|
|
|
2268
1822
|
/**
|
|
2269
1823
|
* @typedef PaymentMethod
|
|
2270
|
-
* @property {string} mode
|
|
2271
|
-
* @property {string} [payment]
|
|
1824
|
+
* @property {string} mode
|
|
1825
|
+
* @property {string} [payment]
|
|
2272
1826
|
* @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
|
|
1827
|
+
* @property {number} [amount]
|
|
1828
|
+
* @property {string} [name]
|
|
1829
|
+
* @property {Object} [payment_extra_identifiers]
|
|
1830
|
+
*/
|
|
1831
|
+
|
|
1832
|
+
/**
|
|
1833
|
+
* @typedef PlatformCartCheckoutDetailV2Request
|
|
1834
|
+
* @property {string} [address_id]
|
|
1835
|
+
* @property {string} [payment_identifier]
|
|
1836
|
+
* @property {Object} [payment_params]
|
|
1837
|
+
* @property {Object} [custom_meta]
|
|
1838
|
+
* @property {boolean} [payment_auto_confirm]
|
|
1839
|
+
* @property {string} id
|
|
1840
|
+
* @property {boolean} [pos]
|
|
1841
|
+
* @property {string} [billing_address_id]
|
|
1842
|
+
* @property {string} [merchant_code]
|
|
1843
|
+
* @property {string} [aggregator]
|
|
1844
|
+
* @property {number} [pick_at_store_uid]
|
|
1845
|
+
* @property {string} [device_id]
|
|
1846
|
+
* @property {Object} [delivery_address]
|
|
1847
|
+
* @property {string} [payment_mode]
|
|
1848
|
+
* @property {string} [checkout_mode]
|
|
1849
|
+
* @property {Object} [customer_details] - Customer details
|
|
1850
|
+
* @property {Object} [meta]
|
|
1851
|
+
* @property {PaymentMethod[]} payment_methods
|
|
2311
1852
|
* @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
|
|
1853
|
+
* @property {string} [employee_code]
|
|
1854
|
+
* @property {Object} [billing_address]
|
|
1855
|
+
* @property {string} [callback_url]
|
|
1856
|
+
* @property {string} user_id
|
|
1857
|
+
* @property {Object} [extra_meta]
|
|
1858
|
+
* @property {string} order_type
|
|
2322
1859
|
* @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
|
|
1860
|
+
* @property {number} [ordering_store]
|
|
1861
|
+
* @property {string} [iin]
|
|
1862
|
+
* @property {string} [network]
|
|
1863
|
+
* @property {string} [type]
|
|
1864
|
+
* @property {string} [card_id]
|
|
2331
1865
|
*/
|
|
2332
1866
|
|
|
2333
1867
|
/**
|
|
2334
1868
|
* @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
|
|
1869
|
+
* @property {string} [address_id]
|
|
1870
|
+
* @property {string} [payment_mode]
|
|
1871
|
+
* @property {string} [aggregator_name]
|
|
1872
|
+
* @property {string} [merchant_code]
|
|
1873
|
+
* @property {string} [payment_identifier]
|
|
1874
|
+
* @property {string} [id]
|
|
2346
1875
|
* @property {PaymentMethod[]} [payment_methods]
|
|
2347
1876
|
*/
|
|
2348
1877
|
|
|
2349
1878
|
/**
|
|
2350
1879
|
* @typedef PriceMinMax
|
|
2351
|
-
* @property {number} [min]
|
|
2352
|
-
* @property {number} [max]
|
|
1880
|
+
* @property {number} [min]
|
|
1881
|
+
* @property {number} [max]
|
|
2353
1882
|
*/
|
|
2354
1883
|
|
|
2355
1884
|
/**
|
|
2356
1885
|
* @typedef ItemPriceDetails
|
|
2357
1886
|
* @property {PriceMinMax} [marked]
|
|
2358
1887
|
* @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.
|
|
1888
|
+
* @property {string} [currency]
|
|
2368
1889
|
*/
|
|
2369
1890
|
|
|
2370
1891
|
/**
|
|
2371
1892
|
* @typedef FreeGiftItems
|
|
2372
|
-
* @property {string} [item_slug] -
|
|
2373
|
-
* @property {string} [item_name] -
|
|
1893
|
+
* @property {string} [item_slug] - Item slug
|
|
1894
|
+
* @property {string} [item_name] - Item name
|
|
2374
1895
|
* @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
|
|
1896
|
+
* @property {string} [item_brand_name] - Item brand name
|
|
1897
|
+
* @property {number} [item_id] - Item id
|
|
1898
|
+
* @property {string[]} [item_images_url] - Item images URL
|
|
2381
1899
|
*/
|
|
2382
1900
|
|
|
2383
1901
|
/**
|
|
2384
1902
|
* @typedef PromotionOffer
|
|
2385
|
-
* @property {string} [id] - Promotion
|
|
1903
|
+
* @property {string} [id] - Promotion id
|
|
2386
1904
|
* @property {Object} [buy_rules] - Buy rules of promotions
|
|
2387
|
-
* @property {string} [offer_text] - Offer title
|
|
2388
|
-
* @property {string} [promotion_type] -
|
|
2389
|
-
* amount, bogo etc.
|
|
1905
|
+
* @property {string} [offer_text] - Offer title
|
|
1906
|
+
* @property {string} [promotion_type] - Promotion type
|
|
2390
1907
|
* @property {string} [promotion_name] - Name of the promotion
|
|
2391
1908
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
2392
1909
|
* @property {string} [valid_till] - Datetime ISOString for promotion end date
|
|
@@ -2396,47 +1913,36 @@ const Joi = require("joi");
|
|
|
2396
1913
|
*/
|
|
2397
1914
|
|
|
2398
1915
|
/**
|
|
2399
|
-
* @typedef
|
|
2400
|
-
* @property {PromotionOffer[]} [available_promotions]
|
|
2401
|
-
* promotion for product
|
|
1916
|
+
* @typedef PromotionOffersResponse
|
|
1917
|
+
* @property {PromotionOffer[]} [available_promotions]
|
|
2402
1918
|
*/
|
|
2403
1919
|
|
|
2404
1920
|
/**
|
|
2405
1921
|
* @typedef PromotionPaymentOffer
|
|
2406
|
-
* @property {string} [application_id] - Application id
|
|
1922
|
+
* @property {string} [application_id] - Application id
|
|
2407
1923
|
* @property {Object[]} [buy_rules] - Buy rules of promotions
|
|
2408
1924
|
* @property {string} [calculate_on] - Price on which promotion calculated
|
|
2409
1925
|
* @property {string} [description] - Offer details including T&C
|
|
2410
1926
|
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
2411
|
-
* @property {string} [id] - Promotion
|
|
2412
|
-
* @property {string} [offer_text] - Offer title
|
|
1927
|
+
* @property {string} [id] - Promotion id
|
|
1928
|
+
* @property {string} [offer_text] - Offer title
|
|
2413
1929
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
2414
|
-
* @property {string} [promotion_type] -
|
|
2415
|
-
* percentage etc.
|
|
1930
|
+
* @property {string} [promotion_type] - Promotion type
|
|
2416
1931
|
* @property {string} [promotion_name] - Name of the promotion
|
|
2417
1932
|
*/
|
|
2418
1933
|
|
|
2419
1934
|
/**
|
|
2420
|
-
* @typedef
|
|
2421
|
-
* @property {boolean} [success]
|
|
1935
|
+
* @typedef PromotionPaymentOffersResponse
|
|
1936
|
+
* @property {boolean} [success]
|
|
2422
1937
|
* @property {PromotionPaymentOffer[]} [promotions]
|
|
2423
1938
|
*/
|
|
2424
1939
|
|
|
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
1940
|
class CartPlatformModel {
|
|
2432
1941
|
/** @returns {CouponDateMeta} */
|
|
2433
1942
|
static CouponDateMeta() {
|
|
2434
1943
|
return Joi.object({
|
|
2435
1944
|
modified_on: Joi.string().allow("").allow(null),
|
|
2436
1945
|
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
1946
|
});
|
|
2441
1947
|
}
|
|
2442
1948
|
|
|
@@ -2444,7 +1950,7 @@ class CartPlatformModel {
|
|
|
2444
1950
|
static Ownership() {
|
|
2445
1951
|
return Joi.object({
|
|
2446
1952
|
payable_category: Joi.string().allow("").required(),
|
|
2447
|
-
payable_by: Joi.string().allow("").
|
|
1953
|
+
payable_by: Joi.string().allow("").required(),
|
|
2448
1954
|
});
|
|
2449
1955
|
}
|
|
2450
1956
|
|
|
@@ -2453,9 +1959,6 @@ class CartPlatformModel {
|
|
|
2453
1959
|
return Joi.object({
|
|
2454
1960
|
created_by: Joi.string().allow("").allow(null),
|
|
2455
1961
|
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
1962
|
});
|
|
2460
1963
|
}
|
|
2461
1964
|
|
|
@@ -2529,7 +2032,7 @@ class CartPlatformModel {
|
|
|
2529
2032
|
/** @returns {Restrictions} */
|
|
2530
2033
|
static Restrictions() {
|
|
2531
2034
|
return Joi.object({
|
|
2532
|
-
payments: CartPlatformModel.PaymentModes(),
|
|
2035
|
+
payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
|
|
2533
2036
|
user_type: Joi.string().allow(""),
|
|
2534
2037
|
price_range: CartPlatformModel.PriceRange(),
|
|
2535
2038
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
@@ -2563,10 +2066,9 @@ class CartPlatformModel {
|
|
|
2563
2066
|
static CouponSchedule() {
|
|
2564
2067
|
return Joi.object({
|
|
2565
2068
|
end: Joi.string().allow("").allow(null),
|
|
2566
|
-
start: Joi.string().allow("")
|
|
2069
|
+
start: Joi.string().allow(""),
|
|
2567
2070
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2568
2071
|
cron: Joi.string().allow("").allow(null),
|
|
2569
|
-
status: Joi.string().allow(""),
|
|
2570
2072
|
duration: Joi.number().allow(null),
|
|
2571
2073
|
});
|
|
2572
2074
|
}
|
|
@@ -2630,11 +2132,11 @@ class CartPlatformModel {
|
|
|
2630
2132
|
return Joi.object({
|
|
2631
2133
|
currency_code: Joi.string().allow(""),
|
|
2632
2134
|
auto_apply: Joi.boolean(),
|
|
2633
|
-
type: Joi.string().allow(""),
|
|
2135
|
+
type: Joi.string().allow("").required(),
|
|
2634
2136
|
is_exact: Joi.boolean(),
|
|
2635
|
-
applicable_on: Joi.string().allow(""),
|
|
2636
|
-
calculate_on: Joi.string().allow(""),
|
|
2637
|
-
value_type: Joi.string().allow(""),
|
|
2137
|
+
applicable_on: Joi.string().allow("").required(),
|
|
2138
|
+
calculate_on: Joi.string().allow("").required(),
|
|
2139
|
+
value_type: Joi.string().allow("").required(),
|
|
2638
2140
|
scope: Joi.array().items(Joi.string().allow("")),
|
|
2639
2141
|
});
|
|
2640
2142
|
}
|
|
@@ -2643,24 +2145,21 @@ class CartPlatformModel {
|
|
|
2643
2145
|
static CouponAdd() {
|
|
2644
2146
|
return Joi.object({
|
|
2645
2147
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2646
|
-
ownership: CartPlatformModel.Ownership(),
|
|
2148
|
+
ownership: CartPlatformModel.Ownership().required(),
|
|
2647
2149
|
author: CartPlatformModel.CouponAuthor(),
|
|
2648
2150
|
state: CartPlatformModel.State(),
|
|
2649
2151
|
restrictions: CartPlatformModel.Restrictions(),
|
|
2650
2152
|
validation: CartPlatformModel.Validation(),
|
|
2651
2153
|
action: CartPlatformModel.CouponAction(),
|
|
2652
|
-
coupon_type: Joi.string().allow(""),
|
|
2653
|
-
coupon_prefix: Joi.string().allow("").allow(null),
|
|
2654
|
-
coupon_counts: Joi.number(),
|
|
2655
2154
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2656
2155
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2657
|
-
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2658
|
-
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2156
|
+
rule: Joi.array().items(CartPlatformModel.Rule()).required(),
|
|
2157
|
+
display_meta: CartPlatformModel.DisplayMeta().required(),
|
|
2659
2158
|
code: Joi.string().allow("").required(),
|
|
2660
2159
|
type_slug: Joi.string().allow("").required(),
|
|
2661
|
-
identifiers: CartPlatformModel.Identifier(),
|
|
2662
|
-
validity: CartPlatformModel.Validity(),
|
|
2663
|
-
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2160
|
+
identifiers: CartPlatformModel.Identifier().required(),
|
|
2161
|
+
validity: CartPlatformModel.Validity().required(),
|
|
2162
|
+
rule_definition: CartPlatformModel.RuleDefinition().required(),
|
|
2664
2163
|
_id: Joi.string().allow(""),
|
|
2665
2164
|
});
|
|
2666
2165
|
}
|
|
@@ -2678,8 +2177,8 @@ class CartPlatformModel {
|
|
|
2678
2177
|
});
|
|
2679
2178
|
}
|
|
2680
2179
|
|
|
2681
|
-
/** @returns {
|
|
2682
|
-
static
|
|
2180
|
+
/** @returns {CouponsResponse} */
|
|
2181
|
+
static CouponsResponse() {
|
|
2683
2182
|
return Joi.object({
|
|
2684
2183
|
items: Joi.array().items(CartPlatformModel.CouponAdd()),
|
|
2685
2184
|
page: CartPlatformModel.Page(),
|
|
@@ -2694,8 +2193,8 @@ class CartPlatformModel {
|
|
|
2694
2193
|
});
|
|
2695
2194
|
}
|
|
2696
2195
|
|
|
2697
|
-
/** @returns {
|
|
2698
|
-
static
|
|
2196
|
+
/** @returns {OperationErrorResponse} */
|
|
2197
|
+
static OperationErrorResponse() {
|
|
2699
2198
|
return Joi.object({
|
|
2700
2199
|
success: Joi.boolean(),
|
|
2701
2200
|
message: Joi.string().allow(""),
|
|
@@ -2707,7 +2206,7 @@ class CartPlatformModel {
|
|
|
2707
2206
|
static CouponUpdate() {
|
|
2708
2207
|
return Joi.object({
|
|
2709
2208
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2710
|
-
ownership: CartPlatformModel.Ownership(),
|
|
2209
|
+
ownership: CartPlatformModel.Ownership().required(),
|
|
2711
2210
|
author: CartPlatformModel.CouponAuthor(),
|
|
2712
2211
|
state: CartPlatformModel.State(),
|
|
2713
2212
|
restrictions: CartPlatformModel.Restrictions(),
|
|
@@ -2715,17 +2214,13 @@ class CartPlatformModel {
|
|
|
2715
2214
|
action: CartPlatformModel.CouponAction(),
|
|
2716
2215
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2717
2216
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2718
|
-
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2719
|
-
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2217
|
+
rule: Joi.array().items(CartPlatformModel.Rule()).required(),
|
|
2218
|
+
display_meta: CartPlatformModel.DisplayMeta().required(),
|
|
2720
2219
|
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
2220
|
type_slug: Joi.string().allow("").required(),
|
|
2726
|
-
identifiers: CartPlatformModel.Identifier(),
|
|
2727
|
-
validity: CartPlatformModel.Validity(),
|
|
2728
|
-
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2221
|
+
identifiers: CartPlatformModel.Identifier().required(),
|
|
2222
|
+
validity: CartPlatformModel.Validity().required(),
|
|
2223
|
+
rule_definition: CartPlatformModel.RuleDefinition().required(),
|
|
2729
2224
|
});
|
|
2730
2225
|
}
|
|
2731
2226
|
|
|
@@ -2737,48 +2232,32 @@ class CartPlatformModel {
|
|
|
2737
2232
|
});
|
|
2738
2233
|
}
|
|
2739
2234
|
|
|
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
2235
|
/** @returns {DisplayMeta1} */
|
|
2750
2236
|
static DisplayMeta1() {
|
|
2751
2237
|
return Joi.object({
|
|
2752
|
-
description: Joi.string().allow("")
|
|
2238
|
+
description: Joi.string().allow(""),
|
|
2753
2239
|
offer_label: Joi.string().allow(""),
|
|
2754
|
-
name: Joi.string().allow("")
|
|
2755
|
-
offer_text: Joi.string().allow("")
|
|
2240
|
+
name: Joi.string().allow(""),
|
|
2241
|
+
offer_text: Joi.string().allow(""),
|
|
2756
2242
|
});
|
|
2757
2243
|
}
|
|
2758
2244
|
|
|
2759
2245
|
/** @returns {Ownership1} */
|
|
2760
2246
|
static Ownership1() {
|
|
2761
2247
|
return Joi.object({
|
|
2762
|
-
payable_category: Joi.string().allow(""),
|
|
2763
|
-
payable_by: Joi.string().allow(""),
|
|
2248
|
+
payable_category: Joi.string().allow("").required(),
|
|
2249
|
+
payable_by: Joi.string().allow("").required(),
|
|
2764
2250
|
});
|
|
2765
2251
|
}
|
|
2766
2252
|
|
|
2767
2253
|
/** @returns {CompareObject} */
|
|
2768
2254
|
static CompareObject() {
|
|
2769
2255
|
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()),
|
|
2256
|
+
equals: Joi.number(),
|
|
2257
|
+
greater_than: Joi.number(),
|
|
2258
|
+
less_than_equals: Joi.number(),
|
|
2259
|
+
less_than: Joi.number(),
|
|
2260
|
+
greater_than_equals: Joi.number(),
|
|
2782
2261
|
});
|
|
2783
2262
|
}
|
|
2784
2263
|
|
|
@@ -2822,7 +2301,7 @@ class CartPlatformModel {
|
|
|
2822
2301
|
discount_price: Joi.number(),
|
|
2823
2302
|
apportion_discount: Joi.boolean(),
|
|
2824
2303
|
partial_can_ret: Joi.boolean(),
|
|
2825
|
-
max_usage_per_transaction: Joi.number()
|
|
2304
|
+
max_usage_per_transaction: Joi.number(),
|
|
2826
2305
|
min_offer_quantity: Joi.number(),
|
|
2827
2306
|
code: Joi.string().allow(""),
|
|
2828
2307
|
discount_amount: Joi.number(),
|
|
@@ -2837,7 +2316,6 @@ class CartPlatformModel {
|
|
|
2837
2316
|
discount_type: Joi.string().allow("").required(),
|
|
2838
2317
|
buy_condition: Joi.string().allow("").required(),
|
|
2839
2318
|
item_criteria: CartPlatformModel.ItemCriteria().required(),
|
|
2840
|
-
meta: CartPlatformModel.ItemSizeMapping(),
|
|
2841
2319
|
offer: CartPlatformModel.DiscountOffer().required(),
|
|
2842
2320
|
});
|
|
2843
2321
|
}
|
|
@@ -2852,7 +2330,7 @@ class CartPlatformModel {
|
|
|
2852
2330
|
/** @returns {PromotionPaymentModes} */
|
|
2853
2331
|
static PromotionPaymentModes() {
|
|
2854
2332
|
return Joi.object({
|
|
2855
|
-
type: Joi.string().allow(""),
|
|
2333
|
+
type: Joi.string().allow("").required(),
|
|
2856
2334
|
uses: CartPlatformModel.PaymentAllowValue1(),
|
|
2857
2335
|
codes: Joi.array().items(Joi.string().allow("")),
|
|
2858
2336
|
});
|
|
@@ -2893,7 +2371,7 @@ class CartPlatformModel {
|
|
|
2893
2371
|
/** @returns {Restrictions1} */
|
|
2894
2372
|
static Restrictions1() {
|
|
2895
2373
|
return Joi.object({
|
|
2896
|
-
payments: CartPlatformModel.PaymentModes(),
|
|
2374
|
+
payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
|
|
2897
2375
|
user_registered: CartPlatformModel.UserRegistered(),
|
|
2898
2376
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
2899
2377
|
post_order: CartPlatformModel.PostOrder1(),
|
|
@@ -2901,7 +2379,7 @@ class CartPlatformModel {
|
|
|
2901
2379
|
order_quantity: Joi.number(),
|
|
2902
2380
|
anonymous_users: Joi.boolean(),
|
|
2903
2381
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
2904
|
-
uses: CartPlatformModel.UsesRestriction1(),
|
|
2382
|
+
uses: CartPlatformModel.UsesRestriction1().required(),
|
|
2905
2383
|
ordering_stores: Joi.array().items(Joi.number()),
|
|
2906
2384
|
});
|
|
2907
2385
|
}
|
|
@@ -2909,10 +2387,9 @@ class CartPlatformModel {
|
|
|
2909
2387
|
/** @returns {PromotionSchedule} */
|
|
2910
2388
|
static PromotionSchedule() {
|
|
2911
2389
|
return Joi.object({
|
|
2912
|
-
end: Joi.string().allow("").
|
|
2913
|
-
start: Joi.string().allow("").
|
|
2914
|
-
|
|
2915
|
-
published: Joi.boolean(),
|
|
2390
|
+
end: Joi.string().allow("").required(),
|
|
2391
|
+
start: Joi.string().allow("").required(),
|
|
2392
|
+
published: Joi.boolean().required(),
|
|
2916
2393
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2917
2394
|
cron: Joi.string().allow("").allow(null),
|
|
2918
2395
|
duration: Joi.number().allow(null),
|
|
@@ -2922,8 +2399,8 @@ class CartPlatformModel {
|
|
|
2922
2399
|
/** @returns {PromotionAction} */
|
|
2923
2400
|
static PromotionAction() {
|
|
2924
2401
|
return Joi.object({
|
|
2925
|
-
action_date: Joi.string().allow("").allow(null),
|
|
2926
|
-
action_type: Joi.string().allow(""),
|
|
2402
|
+
action_date: Joi.string().allow("").allow(null).required(),
|
|
2403
|
+
action_type: Joi.string().allow("").required(),
|
|
2927
2404
|
});
|
|
2928
2405
|
}
|
|
2929
2406
|
|
|
@@ -2932,17 +2409,14 @@ class CartPlatformModel {
|
|
|
2932
2409
|
return Joi.object({
|
|
2933
2410
|
created_by: Joi.string().allow("").allow(null),
|
|
2934
2411
|
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
2412
|
});
|
|
2939
2413
|
}
|
|
2940
2414
|
|
|
2941
2415
|
/** @returns {Visibility} */
|
|
2942
2416
|
static Visibility() {
|
|
2943
2417
|
return Joi.object({
|
|
2944
|
-
coupon_list: Joi.boolean(),
|
|
2945
|
-
pdp: Joi.boolean(),
|
|
2418
|
+
coupon_list: Joi.boolean().required(),
|
|
2419
|
+
pdp: Joi.boolean().required(),
|
|
2946
2420
|
});
|
|
2947
2421
|
}
|
|
2948
2422
|
|
|
@@ -2951,9 +2425,6 @@ class CartPlatformModel {
|
|
|
2951
2425
|
return Joi.object({
|
|
2952
2426
|
modified_on: Joi.string().allow("").allow(null),
|
|
2953
2427
|
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
2428
|
});
|
|
2958
2429
|
}
|
|
2959
2430
|
|
|
@@ -2974,7 +2445,6 @@ class CartPlatformModel {
|
|
|
2974
2445
|
.required(),
|
|
2975
2446
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
2976
2447
|
currency: Joi.string().allow(""),
|
|
2977
|
-
is_processed: Joi.boolean(),
|
|
2978
2448
|
code: Joi.string().allow(""),
|
|
2979
2449
|
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
2980
2450
|
post_order_action: CartPlatformModel.PromotionAction(),
|
|
@@ -2982,16 +2452,18 @@ class CartPlatformModel {
|
|
|
2982
2452
|
author: CartPlatformModel.PromotionAuthor(),
|
|
2983
2453
|
visiblility: CartPlatformModel.Visibility(),
|
|
2984
2454
|
application_id: Joi.string().allow("").required(),
|
|
2985
|
-
buy_rules:
|
|
2986
|
-
|
|
2455
|
+
buy_rules: Joi.object()
|
|
2456
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2457
|
+
.required(),
|
|
2458
|
+
_custom_json: Joi.any(),
|
|
2987
2459
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
2988
2460
|
_id: Joi.string().allow(""),
|
|
2989
2461
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2990
2462
|
});
|
|
2991
2463
|
}
|
|
2992
2464
|
|
|
2993
|
-
/** @returns {
|
|
2994
|
-
static
|
|
2465
|
+
/** @returns {PromotionsResponse} */
|
|
2466
|
+
static PromotionsResponse() {
|
|
2995
2467
|
return Joi.object({
|
|
2996
2468
|
items: Joi.array().items(CartPlatformModel.PromotionListItem()),
|
|
2997
2469
|
page: CartPlatformModel.Page(),
|
|
@@ -3007,40 +2479,12 @@ class CartPlatformModel {
|
|
|
3007
2479
|
promo_group: Joi.string().allow("").required(),
|
|
3008
2480
|
mode: Joi.string().allow("").required(),
|
|
3009
2481
|
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(),
|
|
2482
|
+
display_meta: CartPlatformModel.DisplayMeta1().required(),
|
|
2483
|
+
ownership: CartPlatformModel.Ownership1().required(),
|
|
3042
2484
|
promotion_type: Joi.string().allow("").required(),
|
|
3043
|
-
discount_rules: Joi.array()
|
|
2485
|
+
discount_rules: Joi.array()
|
|
2486
|
+
.items(CartPlatformModel.DiscountRule())
|
|
2487
|
+
.required(),
|
|
3044
2488
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
3045
2489
|
currency: Joi.string().allow(""),
|
|
3046
2490
|
code: Joi.string().allow(""),
|
|
@@ -3050,8 +2494,10 @@ class CartPlatformModel {
|
|
|
3050
2494
|
author: CartPlatformModel.PromotionAuthor(),
|
|
3051
2495
|
visiblility: CartPlatformModel.Visibility(),
|
|
3052
2496
|
application_id: Joi.string().allow("").required(),
|
|
3053
|
-
buy_rules:
|
|
3054
|
-
|
|
2497
|
+
buy_rules: Joi.object()
|
|
2498
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2499
|
+
.required(),
|
|
2500
|
+
_custom_json: Joi.any(),
|
|
3055
2501
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3056
2502
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3057
2503
|
});
|
|
@@ -3063,45 +2509,15 @@ class CartPlatformModel {
|
|
|
3063
2509
|
stackable: Joi.boolean(),
|
|
3064
2510
|
calculate_on: Joi.string().allow(""),
|
|
3065
2511
|
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
2512
|
promo_group: Joi.string().allow("").required(),
|
|
3099
2513
|
mode: Joi.string().allow("").required(),
|
|
3100
2514
|
apply_all_discount: Joi.boolean(),
|
|
3101
|
-
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3102
|
-
ownership: CartPlatformModel.Ownership1(),
|
|
2515
|
+
display_meta: CartPlatformModel.DisplayMeta1().required(),
|
|
2516
|
+
ownership: CartPlatformModel.Ownership1().required(),
|
|
3103
2517
|
promotion_type: Joi.string().allow("").required(),
|
|
3104
|
-
discount_rules: Joi.array()
|
|
2518
|
+
discount_rules: Joi.array()
|
|
2519
|
+
.items(CartPlatformModel.DiscountRule())
|
|
2520
|
+
.required(),
|
|
3105
2521
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
3106
2522
|
currency: Joi.string().allow(""),
|
|
3107
2523
|
code: Joi.string().allow(""),
|
|
@@ -3111,8 +2527,10 @@ class CartPlatformModel {
|
|
|
3111
2527
|
author: CartPlatformModel.PromotionAuthor(),
|
|
3112
2528
|
visiblility: CartPlatformModel.Visibility(),
|
|
3113
2529
|
application_id: Joi.string().allow("").required(),
|
|
3114
|
-
buy_rules:
|
|
3115
|
-
|
|
2530
|
+
buy_rules: Joi.object()
|
|
2531
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2532
|
+
.required(),
|
|
2533
|
+
_custom_json: Joi.any(),
|
|
3116
2534
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3117
2535
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3118
2536
|
});
|
|
@@ -3126,8 +2544,8 @@ class CartPlatformModel {
|
|
|
3126
2544
|
});
|
|
3127
2545
|
}
|
|
3128
2546
|
|
|
3129
|
-
/** @returns {
|
|
3130
|
-
static
|
|
2547
|
+
/** @returns {ActivePromosResponse} */
|
|
2548
|
+
static ActivePromosResponse() {
|
|
3131
2549
|
return Joi.object({
|
|
3132
2550
|
entity_slug: Joi.string().allow(""),
|
|
3133
2551
|
title: Joi.string().allow(""),
|
|
@@ -3196,14 +2614,14 @@ class CartPlatformModel {
|
|
|
3196
2614
|
type: Joi.string().allow(""),
|
|
3197
2615
|
article_id: Joi.string().allow("").required(),
|
|
3198
2616
|
quantity: Joi.number(),
|
|
3199
|
-
meta: Joi.
|
|
2617
|
+
meta: Joi.any(),
|
|
3200
2618
|
});
|
|
3201
2619
|
}
|
|
3202
2620
|
|
|
3203
2621
|
/** @returns {PriceAdjustmentRestrictions} */
|
|
3204
2622
|
static PriceAdjustmentRestrictions() {
|
|
3205
2623
|
return Joi.object({
|
|
3206
|
-
post_order: Joi.
|
|
2624
|
+
post_order: Joi.any(),
|
|
3207
2625
|
});
|
|
3208
2626
|
}
|
|
3209
2627
|
|
|
@@ -3229,7 +2647,7 @@ class CartPlatformModel {
|
|
|
3229
2647
|
allowed_refund: Joi.boolean(),
|
|
3230
2648
|
is_authenticated: Joi.boolean().required(),
|
|
3231
2649
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3232
|
-
meta: Joi.
|
|
2650
|
+
meta: Joi.any(),
|
|
3233
2651
|
cart_id: Joi.string().allow("").required(),
|
|
3234
2652
|
});
|
|
3235
2653
|
}
|
|
@@ -3248,20 +2666,20 @@ class CartPlatformModel {
|
|
|
3248
2666
|
allowed_refund: Joi.boolean(),
|
|
3249
2667
|
is_authenticated: Joi.boolean().required(),
|
|
3250
2668
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3251
|
-
meta: Joi.
|
|
2669
|
+
meta: Joi.any(),
|
|
3252
2670
|
cart_id: Joi.string().allow("").required(),
|
|
3253
2671
|
});
|
|
3254
2672
|
}
|
|
3255
2673
|
|
|
3256
|
-
/** @returns {
|
|
3257
|
-
static
|
|
2674
|
+
/** @returns {PriceAdjustmentResponse} */
|
|
2675
|
+
static PriceAdjustmentResponse() {
|
|
3258
2676
|
return Joi.object({
|
|
3259
2677
|
data: CartPlatformModel.PriceAdjustment(),
|
|
3260
2678
|
});
|
|
3261
2679
|
}
|
|
3262
2680
|
|
|
3263
|
-
/** @returns {
|
|
3264
|
-
static
|
|
2681
|
+
/** @returns {GetPriceAdjustmentResponse} */
|
|
2682
|
+
static GetPriceAdjustmentResponse() {
|
|
3265
2683
|
return Joi.object({
|
|
3266
2684
|
data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
|
|
3267
2685
|
});
|
|
@@ -3281,7 +2699,7 @@ class CartPlatformModel {
|
|
|
3281
2699
|
allowed_refund: Joi.boolean(),
|
|
3282
2700
|
is_authenticated: Joi.boolean().required(),
|
|
3283
2701
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3284
|
-
meta: Joi.
|
|
2702
|
+
meta: Joi.any(),
|
|
3285
2703
|
cart_id: Joi.string().allow("").required(),
|
|
3286
2704
|
});
|
|
3287
2705
|
}
|
|
@@ -3295,8 +2713,8 @@ class CartPlatformModel {
|
|
|
3295
2713
|
});
|
|
3296
2714
|
}
|
|
3297
2715
|
|
|
3298
|
-
/** @returns {
|
|
3299
|
-
static
|
|
2716
|
+
/** @returns {OpenapiCartDetailsRequest} */
|
|
2717
|
+
static OpenapiCartDetailsRequest() {
|
|
3300
2718
|
return Joi.object({
|
|
3301
2719
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3302
2720
|
});
|
|
@@ -3384,7 +2802,7 @@ class CartPlatformModel {
|
|
|
3384
2802
|
/** @returns {Tags} */
|
|
3385
2803
|
static Tags() {
|
|
3386
2804
|
return Joi.object({
|
|
3387
|
-
tags: Joi.
|
|
2805
|
+
tags: Joi.any(),
|
|
3388
2806
|
});
|
|
3389
2807
|
}
|
|
3390
2808
|
|
|
@@ -3403,28 +2821,12 @@ class CartPlatformModel {
|
|
|
3403
2821
|
});
|
|
3404
2822
|
}
|
|
3405
2823
|
|
|
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
2824
|
/** @returns {ProductAction} */
|
|
3422
2825
|
static ProductAction() {
|
|
3423
2826
|
return Joi.object({
|
|
3424
2827
|
type: Joi.string().allow(""),
|
|
3425
2828
|
url: Joi.string().allow(""),
|
|
3426
2829
|
query: CartPlatformModel.ActionQuery(),
|
|
3427
|
-
page: CartPlatformModel.ProductActionPage(),
|
|
3428
2830
|
});
|
|
3429
2831
|
}
|
|
3430
2832
|
|
|
@@ -3446,12 +2848,12 @@ class CartPlatformModel {
|
|
|
3446
2848
|
action: CartPlatformModel.ProductAction(),
|
|
3447
2849
|
uid: Joi.number(),
|
|
3448
2850
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3449
|
-
_custom_json: Joi.
|
|
2851
|
+
_custom_json: Joi.any(),
|
|
3450
2852
|
type: Joi.string().allow(""),
|
|
3451
2853
|
name: Joi.string().allow(""),
|
|
3452
2854
|
item_code: Joi.string().allow("").allow(null),
|
|
3453
2855
|
categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
|
|
3454
|
-
attributes: Joi.
|
|
2856
|
+
attributes: Joi.any(),
|
|
3455
2857
|
});
|
|
3456
2858
|
}
|
|
3457
2859
|
|
|
@@ -3488,19 +2890,19 @@ class CartPlatformModel {
|
|
|
3488
2890
|
seller_identifier: Joi.string().allow(""),
|
|
3489
2891
|
quantity: Joi.number(),
|
|
3490
2892
|
seller: CartPlatformModel.BaseInfo(),
|
|
3491
|
-
cart_item_meta: Joi.
|
|
3492
|
-
parent_item_identifiers: Joi.
|
|
2893
|
+
cart_item_meta: Joi.any(),
|
|
2894
|
+
parent_item_identifiers: Joi.any(),
|
|
3493
2895
|
is_gift_visible: Joi.boolean(),
|
|
3494
2896
|
uid: Joi.string().allow(""),
|
|
3495
|
-
gift_card: Joi.
|
|
2897
|
+
gift_card: Joi.any(),
|
|
3496
2898
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
3497
|
-
identifier: Joi.
|
|
2899
|
+
identifier: Joi.any(),
|
|
3498
2900
|
mto_quantity: Joi.number(),
|
|
3499
|
-
extra_meta: Joi.
|
|
2901
|
+
extra_meta: Joi.any(),
|
|
3500
2902
|
type: Joi.string().allow(""),
|
|
3501
|
-
_custom_json: Joi.
|
|
2903
|
+
_custom_json: Joi.any(),
|
|
3502
2904
|
price: CartPlatformModel.ArticlePriceInfo(),
|
|
3503
|
-
meta: Joi.
|
|
2905
|
+
meta: Joi.any(),
|
|
3504
2906
|
size: Joi.string().allow(""),
|
|
3505
2907
|
store: CartPlatformModel.StoreInfo(),
|
|
3506
2908
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -3518,9 +2920,9 @@ class CartPlatformModel {
|
|
|
3518
2920
|
/** @returns {DiscountRulesApp} */
|
|
3519
2921
|
static DiscountRulesApp() {
|
|
3520
2922
|
return Joi.object({
|
|
3521
|
-
offer: Joi.
|
|
3522
|
-
raw_offer: Joi.
|
|
3523
|
-
item_criteria: Joi.
|
|
2923
|
+
offer: Joi.any(),
|
|
2924
|
+
raw_offer: Joi.any(),
|
|
2925
|
+
item_criteria: Joi.any(),
|
|
3524
2926
|
matched_buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
3525
2927
|
});
|
|
3526
2928
|
}
|
|
@@ -3538,8 +2940,8 @@ class CartPlatformModel {
|
|
|
3538
2940
|
/** @returns {BuyRules} */
|
|
3539
2941
|
static BuyRules() {
|
|
3540
2942
|
return Joi.object({
|
|
3541
|
-
cart_conditions: Joi.
|
|
3542
|
-
item_criteria: Joi.
|
|
2943
|
+
cart_conditions: Joi.any(),
|
|
2944
|
+
item_criteria: Joi.any(),
|
|
3543
2945
|
});
|
|
3544
2946
|
}
|
|
3545
2947
|
|
|
@@ -3561,7 +2963,7 @@ class CartPlatformModel {
|
|
|
3561
2963
|
mrp_promotion: Joi.boolean(),
|
|
3562
2964
|
promotion_group: Joi.string().allow(""),
|
|
3563
2965
|
promo_id: Joi.string().allow(""),
|
|
3564
|
-
meta: Joi.
|
|
2966
|
+
meta: Joi.any(),
|
|
3565
2967
|
code: Joi.string().allow("").allow(null),
|
|
3566
2968
|
});
|
|
3567
2969
|
}
|
|
@@ -3671,7 +3073,7 @@ class CartPlatformModel {
|
|
|
3671
3073
|
quantity: Joi.number(),
|
|
3672
3074
|
product: CartPlatformModel.CartProduct(),
|
|
3673
3075
|
product_ean_id: Joi.string().allow(""),
|
|
3674
|
-
parent_item_identifiers: Joi.
|
|
3076
|
+
parent_item_identifiers: Joi.any(),
|
|
3675
3077
|
is_set: Joi.boolean(),
|
|
3676
3078
|
article: CartPlatformModel.ProductArticle(),
|
|
3677
3079
|
promotions_applied: Joi.array().items(
|
|
@@ -3680,22 +3082,22 @@ class CartPlatformModel {
|
|
|
3680
3082
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3681
3083
|
key: Joi.string().allow(""),
|
|
3682
3084
|
coupon: CartPlatformModel.CouponDetails(),
|
|
3683
|
-
bulk_offer: Joi.
|
|
3085
|
+
bulk_offer: Joi.any(),
|
|
3684
3086
|
price: CartPlatformModel.ProductPriceInfo(),
|
|
3685
3087
|
coupon_message: Joi.string().allow(""),
|
|
3686
3088
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
3687
3089
|
message: Joi.string().allow(""),
|
|
3688
3090
|
discount: Joi.string().allow(""),
|
|
3689
3091
|
availability: CartPlatformModel.ProductAvailability(),
|
|
3690
|
-
moq: Joi.
|
|
3092
|
+
moq: Joi.any(),
|
|
3691
3093
|
price_per_unit: CartPlatformModel.ProductPriceInfo(),
|
|
3692
3094
|
promo_meta: CartPlatformModel.PromoMeta(),
|
|
3693
|
-
custom_order: Joi.
|
|
3095
|
+
custom_order: Joi.any(),
|
|
3694
3096
|
});
|
|
3695
3097
|
}
|
|
3696
3098
|
|
|
3697
|
-
/** @returns {
|
|
3698
|
-
static
|
|
3099
|
+
/** @returns {OpenapiCartDetailsResponse} */
|
|
3100
|
+
static OpenapiCartDetailsResponse() {
|
|
3699
3101
|
return Joi.object({
|
|
3700
3102
|
is_valid: Joi.boolean(),
|
|
3701
3103
|
message: Joi.string().allow(""),
|
|
@@ -3704,12 +3106,12 @@ class CartPlatformModel {
|
|
|
3704
3106
|
});
|
|
3705
3107
|
}
|
|
3706
3108
|
|
|
3707
|
-
/** @returns {
|
|
3708
|
-
static
|
|
3109
|
+
/** @returns {OpenApiErrorResponse} */
|
|
3110
|
+
static OpenApiErrorResponse() {
|
|
3709
3111
|
return Joi.object({
|
|
3710
3112
|
success: Joi.boolean(),
|
|
3711
3113
|
message: Joi.string().allow(""),
|
|
3712
|
-
errors: Joi.
|
|
3114
|
+
errors: Joi.any(),
|
|
3713
3115
|
});
|
|
3714
3116
|
}
|
|
3715
3117
|
|
|
@@ -3723,7 +3125,7 @@ class CartPlatformModel {
|
|
|
3723
3125
|
area_code: Joi.string().allow("").required(),
|
|
3724
3126
|
country_iso_code: Joi.string().allow(""),
|
|
3725
3127
|
country_phone_code: Joi.string().allow(""),
|
|
3726
|
-
meta: Joi.
|
|
3128
|
+
meta: Joi.any(),
|
|
3727
3129
|
address_type: Joi.string().allow(""),
|
|
3728
3130
|
area: Joi.string().allow(""),
|
|
3729
3131
|
area_code_slug: Joi.string().allow(""),
|
|
@@ -3736,16 +3138,16 @@ class CartPlatformModel {
|
|
|
3736
3138
|
});
|
|
3737
3139
|
}
|
|
3738
3140
|
|
|
3739
|
-
/** @returns {
|
|
3740
|
-
static
|
|
3141
|
+
/** @returns {OpenApiCartServiceabilityRequest} */
|
|
3142
|
+
static OpenApiCartServiceabilityRequest() {
|
|
3741
3143
|
return Joi.object({
|
|
3742
3144
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3743
3145
|
shipping_address: CartPlatformModel.ShippingAddress().required(),
|
|
3744
3146
|
});
|
|
3745
3147
|
}
|
|
3746
3148
|
|
|
3747
|
-
/** @returns {
|
|
3748
|
-
static
|
|
3149
|
+
/** @returns {OpenApiCartServiceabilityResponse} */
|
|
3150
|
+
static OpenApiCartServiceabilityResponse() {
|
|
3749
3151
|
return Joi.object({
|
|
3750
3152
|
is_valid: Joi.boolean(),
|
|
3751
3153
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3776,7 +3178,7 @@ class CartPlatformModel {
|
|
|
3776
3178
|
return Joi.object({
|
|
3777
3179
|
payment_id: Joi.string().allow("").allow(null),
|
|
3778
3180
|
payment_gateway: Joi.string().allow("").allow(null),
|
|
3779
|
-
extra_meta: Joi.
|
|
3181
|
+
extra_meta: Joi.any().allow(null),
|
|
3780
3182
|
current_status: Joi.string().allow("").allow(null),
|
|
3781
3183
|
order_id: Joi.string().allow("").allow(null),
|
|
3782
3184
|
});
|
|
@@ -3804,7 +3206,7 @@ class CartPlatformModel {
|
|
|
3804
3206
|
price_marked: Joi.number().required(),
|
|
3805
3207
|
files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
|
|
3806
3208
|
meta: CartPlatformModel.CartItemMeta(),
|
|
3807
|
-
extra_meta: Joi.
|
|
3209
|
+
extra_meta: Joi.any(),
|
|
3808
3210
|
product_id: Joi.number().required(),
|
|
3809
3211
|
loyalty_discount: Joi.number(),
|
|
3810
3212
|
discount: Joi.number().required(),
|
|
@@ -3831,7 +3233,7 @@ class CartPlatformModel {
|
|
|
3831
3233
|
payment_methods: Joi.array()
|
|
3832
3234
|
.items(CartPlatformModel.MultiTenderPaymentMethod())
|
|
3833
3235
|
.required(),
|
|
3834
|
-
employee_discount: Joi.
|
|
3236
|
+
employee_discount: Joi.any(),
|
|
3835
3237
|
coupon: Joi.string().allow(""),
|
|
3836
3238
|
cashback_applied: Joi.number().required(),
|
|
3837
3239
|
gstin: Joi.string().allow("").allow(null),
|
|
@@ -3847,8 +3249,8 @@ class CartPlatformModel {
|
|
|
3847
3249
|
});
|
|
3848
3250
|
}
|
|
3849
3251
|
|
|
3850
|
-
/** @returns {
|
|
3851
|
-
static
|
|
3252
|
+
/** @returns {OpenApiCheckoutResponse} */
|
|
3253
|
+
static OpenApiCheckoutResponse() {
|
|
3852
3254
|
return Joi.object({
|
|
3853
3255
|
success: Joi.boolean(),
|
|
3854
3256
|
message: Joi.string().allow(""),
|
|
@@ -3861,48 +3263,46 @@ class CartPlatformModel {
|
|
|
3861
3263
|
static AbandonedCart() {
|
|
3862
3264
|
return Joi.object({
|
|
3863
3265
|
expire_at: Joi.string().allow("").required(),
|
|
3864
|
-
promotion: Joi.
|
|
3266
|
+
promotion: Joi.any(),
|
|
3865
3267
|
is_default: Joi.boolean().required(),
|
|
3866
3268
|
comment: Joi.string().allow("").allow(null),
|
|
3867
3269
|
articles: Joi.array().items(Joi.any()).required(),
|
|
3868
|
-
coupon: Joi.
|
|
3270
|
+
coupon: Joi.any().allow(null),
|
|
3869
3271
|
bulk_coupon_discount: Joi.number().allow(null),
|
|
3870
3272
|
_id: Joi.string().allow("").required(),
|
|
3871
|
-
fynd_credits: Joi.
|
|
3273
|
+
fynd_credits: Joi.any(),
|
|
3872
3274
|
fc_index_map: Joi.array().items(Joi.number()),
|
|
3873
3275
|
order_id: Joi.string().allow(""),
|
|
3874
3276
|
discount: Joi.number(),
|
|
3875
|
-
cod_charges: Joi.
|
|
3876
|
-
payments: Joi.
|
|
3277
|
+
cod_charges: Joi.any(),
|
|
3278
|
+
payments: Joi.any().allow(null),
|
|
3877
3279
|
payment_mode: Joi.string().allow("").allow(null),
|
|
3878
3280
|
shipments: Joi.array().items(Joi.any()),
|
|
3879
|
-
pick_up_customer_details: Joi.
|
|
3880
|
-
.pattern(/\S/, Joi.any())
|
|
3881
|
-
.allow(null, ""),
|
|
3281
|
+
pick_up_customer_details: Joi.any().allow(null),
|
|
3882
3282
|
uid: Joi.number().required(),
|
|
3883
3283
|
checkout_mode: Joi.string().allow(""),
|
|
3884
3284
|
cart_value: Joi.number(),
|
|
3885
3285
|
is_archive: Joi.boolean(),
|
|
3886
3286
|
created_on: Joi.string().allow("").required(),
|
|
3887
3287
|
last_modified: Joi.string().allow("").required(),
|
|
3888
|
-
meta: Joi.
|
|
3288
|
+
meta: Joi.any().allow(null),
|
|
3889
3289
|
buy_now: Joi.boolean(),
|
|
3890
3290
|
is_active: Joi.boolean(),
|
|
3891
|
-
cashback: Joi.
|
|
3291
|
+
cashback: Joi.any().required(),
|
|
3892
3292
|
payment_methods: Joi.array().items(Joi.any()),
|
|
3893
3293
|
gstin: Joi.string().allow("").allow(null),
|
|
3894
|
-
delivery_charges: Joi.
|
|
3294
|
+
delivery_charges: Joi.any(),
|
|
3895
3295
|
merge_qty: Joi.boolean().allow(null),
|
|
3896
3296
|
user_id: Joi.string().allow("").required(),
|
|
3897
3297
|
app_id: Joi.string().allow(""),
|
|
3898
3298
|
});
|
|
3899
3299
|
}
|
|
3900
3300
|
|
|
3901
|
-
/** @returns {
|
|
3902
|
-
static
|
|
3301
|
+
/** @returns {AbandonedCartResponse} */
|
|
3302
|
+
static AbandonedCartResponse() {
|
|
3903
3303
|
return Joi.object({
|
|
3904
3304
|
items: Joi.array().items(CartPlatformModel.AbandonedCart()),
|
|
3905
|
-
result: Joi.
|
|
3305
|
+
result: Joi.any(),
|
|
3906
3306
|
page: CartPlatformModel.Page(),
|
|
3907
3307
|
success: Joi.boolean(),
|
|
3908
3308
|
message: Joi.string().allow(""),
|
|
@@ -3971,14 +3371,14 @@ class CartPlatformModel {
|
|
|
3971
3371
|
});
|
|
3972
3372
|
}
|
|
3973
3373
|
|
|
3974
|
-
/** @returns {
|
|
3975
|
-
static
|
|
3374
|
+
/** @returns {CartDetailResponse} */
|
|
3375
|
+
static CartDetailResponse() {
|
|
3976
3376
|
return Joi.object({
|
|
3977
3377
|
cart_id: Joi.number(),
|
|
3978
3378
|
uid: Joi.string().allow(""),
|
|
3979
3379
|
coupon_text: Joi.string().allow(""),
|
|
3980
3380
|
id: Joi.string().allow(""),
|
|
3981
|
-
pan_config: Joi.
|
|
3381
|
+
pan_config: Joi.any(),
|
|
3982
3382
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3983
3383
|
comment: Joi.string().allow(""),
|
|
3984
3384
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3988,7 +3388,7 @@ class CartPlatformModel {
|
|
|
3988
3388
|
coupon: CartPlatformModel.CartDetailCoupon(),
|
|
3989
3389
|
restrict_checkout: Joi.boolean(),
|
|
3990
3390
|
message: Joi.string().allow(""),
|
|
3991
|
-
notification: Joi.
|
|
3391
|
+
notification: Joi.any(),
|
|
3992
3392
|
staff_user_id: Joi.string().allow(""),
|
|
3993
3393
|
success: Joi.boolean(),
|
|
3994
3394
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
@@ -4002,7 +3402,7 @@ class CartPlatformModel {
|
|
|
4002
3402
|
CartPlatformModel.AppliedPromotion()
|
|
4003
3403
|
),
|
|
4004
3404
|
pan_no: Joi.string().allow(""),
|
|
4005
|
-
custom_cart_meta: Joi.
|
|
3405
|
+
custom_cart_meta: Joi.any(),
|
|
4006
3406
|
});
|
|
4007
3407
|
}
|
|
4008
3408
|
|
|
@@ -4017,31 +3417,31 @@ class CartPlatformModel {
|
|
|
4017
3417
|
),
|
|
4018
3418
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
4019
3419
|
article_id: Joi.string().allow(""),
|
|
4020
|
-
article_assignment: Joi.
|
|
3420
|
+
article_assignment: Joi.any(),
|
|
4021
3421
|
store_id: Joi.number(),
|
|
4022
3422
|
display: Joi.string().allow(""),
|
|
4023
3423
|
item_id: Joi.number(),
|
|
4024
|
-
extra_meta: Joi.
|
|
4025
|
-
_custom_json: Joi.
|
|
4026
|
-
meta: Joi.
|
|
3424
|
+
extra_meta: Joi.any(),
|
|
3425
|
+
_custom_json: Joi.any(),
|
|
3426
|
+
meta: Joi.any(),
|
|
4027
3427
|
pos: Joi.boolean(),
|
|
4028
3428
|
seller_identifier: Joi.string().allow(""),
|
|
4029
3429
|
});
|
|
4030
3430
|
}
|
|
4031
3431
|
|
|
4032
|
-
/** @returns {
|
|
4033
|
-
static
|
|
3432
|
+
/** @returns {AddCartRequest} */
|
|
3433
|
+
static AddCartRequest() {
|
|
4034
3434
|
return Joi.object({
|
|
4035
3435
|
new_cart: Joi.boolean(),
|
|
4036
3436
|
items: Joi.array().items(CartPlatformModel.AddProductCart()),
|
|
4037
3437
|
});
|
|
4038
3438
|
}
|
|
4039
3439
|
|
|
4040
|
-
/** @returns {
|
|
4041
|
-
static
|
|
3440
|
+
/** @returns {AddCartDetailResponse} */
|
|
3441
|
+
static AddCartDetailResponse() {
|
|
4042
3442
|
return Joi.object({
|
|
4043
3443
|
success: Joi.boolean(),
|
|
4044
|
-
cart: CartPlatformModel.
|
|
3444
|
+
cart: CartPlatformModel.CartDetailResponse(),
|
|
4045
3445
|
partial: Joi.boolean(),
|
|
4046
3446
|
message: Joi.string().allow(""),
|
|
4047
3447
|
});
|
|
@@ -4052,10 +3452,10 @@ class CartPlatformModel {
|
|
|
4052
3452
|
return Joi.object({
|
|
4053
3453
|
quantity: Joi.number(),
|
|
4054
3454
|
item_size: Joi.string().allow(""),
|
|
4055
|
-
parent_item_identifiers: Joi.
|
|
4056
|
-
meta: Joi.
|
|
4057
|
-
extra_meta: Joi.
|
|
4058
|
-
_custom_json: Joi.
|
|
3455
|
+
parent_item_identifiers: Joi.any(),
|
|
3456
|
+
meta: Joi.any(),
|
|
3457
|
+
extra_meta: Joi.any(),
|
|
3458
|
+
_custom_json: Joi.any(),
|
|
4059
3459
|
item_id: Joi.number(),
|
|
4060
3460
|
item_index: Joi.number(),
|
|
4061
3461
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
@@ -4063,31 +3463,19 @@ class CartPlatformModel {
|
|
|
4063
3463
|
});
|
|
4064
3464
|
}
|
|
4065
3465
|
|
|
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() {
|
|
3466
|
+
/** @returns {UpdateCartRequest} */
|
|
3467
|
+
static UpdateCartRequest() {
|
|
4077
3468
|
return Joi.object({
|
|
4078
3469
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4079
|
-
free_gift_items: Joi.array().items(
|
|
4080
|
-
CartPlatformModel.FreeGiftItemCreation()
|
|
4081
|
-
),
|
|
4082
3470
|
operation: Joi.string().allow("").required(),
|
|
4083
3471
|
});
|
|
4084
3472
|
}
|
|
4085
3473
|
|
|
4086
|
-
/** @returns {
|
|
4087
|
-
static
|
|
3474
|
+
/** @returns {UpdateCartDetailResponse} */
|
|
3475
|
+
static UpdateCartDetailResponse() {
|
|
4088
3476
|
return Joi.object({
|
|
4089
3477
|
success: Joi.boolean(),
|
|
4090
|
-
cart: CartPlatformModel.
|
|
3478
|
+
cart: CartPlatformModel.CartDetailResponse(),
|
|
4091
3479
|
message: Joi.string().allow(""),
|
|
4092
3480
|
});
|
|
4093
3481
|
}
|
|
@@ -4113,7 +3501,7 @@ class CartPlatformModel {
|
|
|
4113
3501
|
price_marked: Joi.number().required(),
|
|
4114
3502
|
amount_paid: Joi.number().required(),
|
|
4115
3503
|
promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
|
|
4116
|
-
extra_meta: Joi.
|
|
3504
|
+
extra_meta: Joi.any(),
|
|
4117
3505
|
item_id: Joi.number().required(),
|
|
4118
3506
|
discount: Joi.number().required(),
|
|
4119
3507
|
price_effective: Joi.number().required(),
|
|
@@ -4125,9 +3513,9 @@ class CartPlatformModel {
|
|
|
4125
3513
|
return Joi.object({
|
|
4126
3514
|
cart_id: Joi.string().allow("").required(),
|
|
4127
3515
|
payment_mode: Joi.string().allow("").required(),
|
|
4128
|
-
billing_address: Joi.
|
|
3516
|
+
billing_address: Joi.any(),
|
|
4129
3517
|
merchant_code: Joi.string().allow("").required(),
|
|
4130
|
-
payment_identifier: Joi.string().allow("").required(),
|
|
3518
|
+
payment_identifier: Joi.string().allow("").allow(null).required(),
|
|
4131
3519
|
currency_code: Joi.string().allow("").required(),
|
|
4132
3520
|
aggregator: Joi.string().allow("").required(),
|
|
4133
3521
|
order_type: Joi.string().allow("").required(),
|
|
@@ -4136,31 +3524,31 @@ class CartPlatformModel {
|
|
|
4136
3524
|
.items(CartPlatformModel.OverrideCartItem())
|
|
4137
3525
|
.required(),
|
|
4138
3526
|
ordering_store: Joi.number().allow(null),
|
|
4139
|
-
shipping_address: Joi.
|
|
3527
|
+
shipping_address: Joi.any(),
|
|
4140
3528
|
});
|
|
4141
3529
|
}
|
|
4142
3530
|
|
|
4143
|
-
/** @returns {
|
|
4144
|
-
static
|
|
3531
|
+
/** @returns {OverrideCheckoutResponse} */
|
|
3532
|
+
static OverrideCheckoutResponse() {
|
|
4145
3533
|
return Joi.object({
|
|
4146
|
-
data: Joi.
|
|
4147
|
-
cart: Joi.
|
|
3534
|
+
data: Joi.any().required(),
|
|
3535
|
+
cart: Joi.any().required(),
|
|
4148
3536
|
success: Joi.string().allow("").required(),
|
|
4149
3537
|
order_id: Joi.string().allow("").required(),
|
|
4150
3538
|
message: Joi.string().allow("").required(),
|
|
4151
3539
|
});
|
|
4152
3540
|
}
|
|
4153
3541
|
|
|
4154
|
-
/** @returns {
|
|
4155
|
-
static
|
|
3542
|
+
/** @returns {GetShareCartLinkRequest} */
|
|
3543
|
+
static GetShareCartLinkRequest() {
|
|
4156
3544
|
return Joi.object({
|
|
4157
3545
|
id: Joi.string().allow(""),
|
|
4158
|
-
meta: Joi.
|
|
3546
|
+
meta: Joi.any(),
|
|
4159
3547
|
});
|
|
4160
3548
|
}
|
|
4161
3549
|
|
|
4162
|
-
/** @returns {
|
|
4163
|
-
static
|
|
3550
|
+
/** @returns {GetShareCartLinkResponse} */
|
|
3551
|
+
static GetShareCartLinkResponse() {
|
|
4164
3552
|
return Joi.object({
|
|
4165
3553
|
token: Joi.string().allow(""),
|
|
4166
3554
|
share_url: Joi.string().allow(""),
|
|
@@ -4170,11 +3558,11 @@ class CartPlatformModel {
|
|
|
4170
3558
|
/** @returns {SharedCartDetails} */
|
|
4171
3559
|
static SharedCartDetails() {
|
|
4172
3560
|
return Joi.object({
|
|
4173
|
-
source: Joi.
|
|
4174
|
-
user: Joi.
|
|
3561
|
+
source: Joi.any(),
|
|
3562
|
+
user: Joi.any(),
|
|
4175
3563
|
token: Joi.string().allow(""),
|
|
4176
3564
|
created_on: Joi.string().allow(""),
|
|
4177
|
-
meta: Joi.
|
|
3565
|
+
meta: Joi.any(),
|
|
4178
3566
|
});
|
|
4179
3567
|
}
|
|
4180
3568
|
|
|
@@ -4200,12 +3588,12 @@ class CartPlatformModel {
|
|
|
4200
3588
|
buy_now: Joi.boolean(),
|
|
4201
3589
|
cart_id: Joi.number(),
|
|
4202
3590
|
gstin: Joi.string().allow(""),
|
|
4203
|
-
custom_cart_meta: Joi.
|
|
3591
|
+
custom_cart_meta: Joi.any(),
|
|
4204
3592
|
});
|
|
4205
3593
|
}
|
|
4206
3594
|
|
|
4207
|
-
/** @returns {
|
|
4208
|
-
static
|
|
3595
|
+
/** @returns {SharedCartResponse} */
|
|
3596
|
+
static SharedCartResponse() {
|
|
4209
3597
|
return Joi.object({
|
|
4210
3598
|
cart: CartPlatformModel.SharedCart(),
|
|
4211
3599
|
error: Joi.string().allow(""),
|
|
@@ -4216,7 +3604,7 @@ class CartPlatformModel {
|
|
|
4216
3604
|
static CartList() {
|
|
4217
3605
|
return Joi.object({
|
|
4218
3606
|
cart_id: Joi.string().allow(""),
|
|
4219
|
-
pick_up_customer_details: Joi.
|
|
3607
|
+
pick_up_customer_details: Joi.any(),
|
|
4220
3608
|
cart_value: Joi.number(),
|
|
4221
3609
|
created_on: Joi.string().allow(""),
|
|
4222
3610
|
user_id: Joi.string().allow(""),
|
|
@@ -4225,8 +3613,8 @@ class CartPlatformModel {
|
|
|
4225
3613
|
});
|
|
4226
3614
|
}
|
|
4227
3615
|
|
|
4228
|
-
/** @returns {
|
|
4229
|
-
static
|
|
3616
|
+
/** @returns {MultiCartResponse} */
|
|
3617
|
+
static MultiCartResponse() {
|
|
4230
3618
|
return Joi.object({
|
|
4231
3619
|
success: Joi.boolean(),
|
|
4232
3620
|
data: Joi.array().items(CartPlatformModel.CartList()),
|
|
@@ -4255,13 +3643,13 @@ class CartPlatformModel {
|
|
|
4255
3643
|
});
|
|
4256
3644
|
}
|
|
4257
3645
|
|
|
4258
|
-
/** @returns {
|
|
4259
|
-
static
|
|
3646
|
+
/** @returns {UserCartMappingResponse} */
|
|
3647
|
+
static UserCartMappingResponse() {
|
|
4260
3648
|
return Joi.object({
|
|
4261
3649
|
coupon_text: Joi.string().allow(""),
|
|
4262
3650
|
user: CartPlatformModel.UserInfo(),
|
|
4263
3651
|
id: Joi.string().allow(""),
|
|
4264
|
-
pan_config: Joi.
|
|
3652
|
+
pan_config: Joi.any(),
|
|
4265
3653
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
4266
3654
|
comment: Joi.string().allow(""),
|
|
4267
3655
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -4276,7 +3664,7 @@ class CartPlatformModel {
|
|
|
4276
3664
|
last_modified: Joi.string().allow(""),
|
|
4277
3665
|
buy_now: Joi.boolean(),
|
|
4278
3666
|
gstin: Joi.string().allow(""),
|
|
4279
|
-
custom_cart_meta: Joi.
|
|
3667
|
+
custom_cart_meta: Joi.any(),
|
|
4280
3668
|
applied_promo_details: Joi.array().items(
|
|
4281
3669
|
CartPlatformModel.AppliedPromotion()
|
|
4282
3670
|
),
|
|
@@ -4284,8 +3672,8 @@ class CartPlatformModel {
|
|
|
4284
3672
|
});
|
|
4285
3673
|
}
|
|
4286
3674
|
|
|
4287
|
-
/** @returns {
|
|
4288
|
-
static
|
|
3675
|
+
/** @returns {PlatformAddCartRequest} */
|
|
3676
|
+
static PlatformAddCartRequest() {
|
|
4289
3677
|
return Joi.object({
|
|
4290
3678
|
user_id: Joi.string().allow(""),
|
|
4291
3679
|
new_cart: Joi.boolean(),
|
|
@@ -4293,35 +3681,32 @@ class CartPlatformModel {
|
|
|
4293
3681
|
});
|
|
4294
3682
|
}
|
|
4295
3683
|
|
|
4296
|
-
/** @returns {
|
|
4297
|
-
static
|
|
3684
|
+
/** @returns {PlatformUpdateCartRequest} */
|
|
3685
|
+
static PlatformUpdateCartRequest() {
|
|
4298
3686
|
return Joi.object({
|
|
4299
3687
|
user_id: Joi.string().allow(""),
|
|
4300
3688
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4301
|
-
free_gift_items: Joi.array().items(
|
|
4302
|
-
CartPlatformModel.FreeGiftItemCreation()
|
|
4303
|
-
),
|
|
4304
3689
|
operation: Joi.string().allow("").required(),
|
|
4305
3690
|
});
|
|
4306
3691
|
}
|
|
4307
3692
|
|
|
4308
|
-
/** @returns {
|
|
4309
|
-
static
|
|
3693
|
+
/** @returns {DeleteCartRequest} */
|
|
3694
|
+
static DeleteCartRequest() {
|
|
4310
3695
|
return Joi.object({
|
|
4311
3696
|
cart_id_list: Joi.array().items(Joi.string().allow("")),
|
|
4312
3697
|
});
|
|
4313
3698
|
}
|
|
4314
3699
|
|
|
4315
|
-
/** @returns {
|
|
4316
|
-
static
|
|
3700
|
+
/** @returns {DeleteCartDetailResponse} */
|
|
3701
|
+
static DeleteCartDetailResponse() {
|
|
4317
3702
|
return Joi.object({
|
|
4318
3703
|
success: Joi.boolean(),
|
|
4319
3704
|
message: Joi.string().allow(""),
|
|
4320
3705
|
});
|
|
4321
3706
|
}
|
|
4322
3707
|
|
|
4323
|
-
/** @returns {
|
|
4324
|
-
static
|
|
3708
|
+
/** @returns {CartItemCountResponse} */
|
|
3709
|
+
static CartItemCountResponse() {
|
|
4325
3710
|
return Joi.object({
|
|
4326
3711
|
user_cart_items_count: Joi.number(),
|
|
4327
3712
|
});
|
|
@@ -4359,16 +3744,16 @@ class CartPlatformModel {
|
|
|
4359
3744
|
});
|
|
4360
3745
|
}
|
|
4361
3746
|
|
|
4362
|
-
/** @returns {
|
|
4363
|
-
static
|
|
3747
|
+
/** @returns {GetCouponResponse} */
|
|
3748
|
+
static GetCouponResponse() {
|
|
4364
3749
|
return Joi.object({
|
|
4365
3750
|
available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
|
|
4366
3751
|
page: CartPlatformModel.PageCoupon(),
|
|
4367
3752
|
});
|
|
4368
3753
|
}
|
|
4369
3754
|
|
|
4370
|
-
/** @returns {
|
|
4371
|
-
static
|
|
3755
|
+
/** @returns {ApplyCouponRequest} */
|
|
3756
|
+
static ApplyCouponRequest() {
|
|
4372
3757
|
return Joi.object({
|
|
4373
3758
|
coupon_code: Joi.string().allow("").required(),
|
|
4374
3759
|
});
|
|
@@ -4399,10 +3784,10 @@ class CartPlatformModel {
|
|
|
4399
3784
|
email: Joi.string().allow(""),
|
|
4400
3785
|
area_code: Joi.string().allow(""),
|
|
4401
3786
|
checkout_mode: Joi.string().allow(""),
|
|
4402
|
-
meta: Joi.
|
|
3787
|
+
meta: Joi.any(),
|
|
4403
3788
|
is_active: Joi.boolean(),
|
|
4404
3789
|
name: Joi.string().allow(""),
|
|
4405
|
-
google_map_point: Joi.
|
|
3790
|
+
google_map_point: Joi.any(),
|
|
4406
3791
|
cart_id: Joi.string().allow(""),
|
|
4407
3792
|
city: Joi.string().allow(""),
|
|
4408
3793
|
sector: Joi.string().allow(""),
|
|
@@ -4413,28 +3798,19 @@ class CartPlatformModel {
|
|
|
4413
3798
|
address: Joi.string().allow(""),
|
|
4414
3799
|
country_phone_code: Joi.string().allow(""),
|
|
4415
3800
|
country_iso_code: Joi.string().allow(""),
|
|
4416
|
-
_custom_json: Joi.
|
|
3801
|
+
_custom_json: Joi.any(),
|
|
4417
3802
|
});
|
|
4418
3803
|
}
|
|
4419
3804
|
|
|
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() {
|
|
3805
|
+
/** @returns {PlatformGetAddressesResponse} */
|
|
3806
|
+
static PlatformGetAddressesResponse() {
|
|
4430
3807
|
return Joi.object({
|
|
4431
3808
|
address: Joi.array().items(CartPlatformModel.PlatformAddress()),
|
|
4432
|
-
validation_config: CartPlatformModel.ValidationConfig(),
|
|
4433
3809
|
});
|
|
4434
3810
|
}
|
|
4435
3811
|
|
|
4436
|
-
/** @returns {
|
|
4437
|
-
static
|
|
3812
|
+
/** @returns {SaveAddressResponse} */
|
|
3813
|
+
static SaveAddressResponse() {
|
|
4438
3814
|
return Joi.object({
|
|
4439
3815
|
id: Joi.string().allow(""),
|
|
4440
3816
|
success: Joi.boolean(),
|
|
@@ -4442,8 +3818,8 @@ class CartPlatformModel {
|
|
|
4442
3818
|
});
|
|
4443
3819
|
}
|
|
4444
3820
|
|
|
4445
|
-
/** @returns {
|
|
4446
|
-
static
|
|
3821
|
+
/** @returns {UpdateAddressResponse} */
|
|
3822
|
+
static UpdateAddressResponse() {
|
|
4447
3823
|
return Joi.object({
|
|
4448
3824
|
id: Joi.string().allow(""),
|
|
4449
3825
|
is_default_address: Joi.boolean(),
|
|
@@ -4452,16 +3828,16 @@ class CartPlatformModel {
|
|
|
4452
3828
|
});
|
|
4453
3829
|
}
|
|
4454
3830
|
|
|
4455
|
-
/** @returns {
|
|
4456
|
-
static
|
|
3831
|
+
/** @returns {DeleteAddressResponse} */
|
|
3832
|
+
static DeleteAddressResponse() {
|
|
4457
3833
|
return Joi.object({
|
|
4458
3834
|
id: Joi.string().allow(""),
|
|
4459
3835
|
is_deleted: Joi.boolean(),
|
|
4460
3836
|
});
|
|
4461
3837
|
}
|
|
4462
3838
|
|
|
4463
|
-
/** @returns {
|
|
4464
|
-
static
|
|
3839
|
+
/** @returns {PlatformSelectCartAddressRequest} */
|
|
3840
|
+
static PlatformSelectCartAddressRequest() {
|
|
4465
3841
|
return Joi.object({
|
|
4466
3842
|
cart_id: Joi.string().allow(""),
|
|
4467
3843
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -4480,13 +3856,13 @@ class CartPlatformModel {
|
|
|
4480
3856
|
});
|
|
4481
3857
|
}
|
|
4482
3858
|
|
|
4483
|
-
/** @returns {
|
|
4484
|
-
static
|
|
3859
|
+
/** @returns {PlatformShipmentResponse} */
|
|
3860
|
+
static PlatformShipmentResponse() {
|
|
4485
3861
|
return Joi.object({
|
|
4486
3862
|
shipments: Joi.number(),
|
|
4487
3863
|
fulfillment_id: Joi.number(),
|
|
4488
3864
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
4489
|
-
dp_options: Joi.
|
|
3865
|
+
dp_options: Joi.any().allow(null),
|
|
4490
3866
|
shipment_type: Joi.string().allow(""),
|
|
4491
3867
|
order_type: Joi.string().allow(""),
|
|
4492
3868
|
box_type: Joi.string().allow("").allow(null),
|
|
@@ -4497,12 +3873,12 @@ class CartPlatformModel {
|
|
|
4497
3873
|
});
|
|
4498
3874
|
}
|
|
4499
3875
|
|
|
4500
|
-
/** @returns {
|
|
4501
|
-
static
|
|
3876
|
+
/** @returns {PlatformCartShipmentsResponse} */
|
|
3877
|
+
static PlatformCartShipmentsResponse() {
|
|
4502
3878
|
return Joi.object({
|
|
4503
3879
|
coupon_text: Joi.string().allow(""),
|
|
4504
3880
|
id: Joi.string().allow(""),
|
|
4505
|
-
pan_config: Joi.
|
|
3881
|
+
pan_config: Joi.any(),
|
|
4506
3882
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
4507
3883
|
comment: Joi.string().allow(""),
|
|
4508
3884
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -4513,7 +3889,9 @@ class CartPlatformModel {
|
|
|
4513
3889
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
4514
3890
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
4515
3891
|
is_valid: Joi.boolean(),
|
|
4516
|
-
shipments: Joi.array().items(
|
|
3892
|
+
shipments: Joi.array().items(
|
|
3893
|
+
CartPlatformModel.PlatformShipmentResponse()
|
|
3894
|
+
),
|
|
4517
3895
|
currency: CartPlatformModel.CartCurrency(),
|
|
4518
3896
|
checkout_mode: Joi.string().allow(""),
|
|
4519
3897
|
last_modified: Joi.string().allow(""),
|
|
@@ -4524,7 +3902,7 @@ class CartPlatformModel {
|
|
|
4524
3902
|
),
|
|
4525
3903
|
error: Joi.boolean(),
|
|
4526
3904
|
pan_no: Joi.string().allow(""),
|
|
4527
|
-
custom_cart_meta: Joi.
|
|
3905
|
+
custom_cart_meta: Joi.any(),
|
|
4528
3906
|
});
|
|
4529
3907
|
}
|
|
4530
3908
|
|
|
@@ -4537,8 +3915,8 @@ class CartPlatformModel {
|
|
|
4537
3915
|
});
|
|
4538
3916
|
}
|
|
4539
3917
|
|
|
4540
|
-
/** @returns {
|
|
4541
|
-
static
|
|
3918
|
+
/** @returns {UpdateCartShipmentRequest} */
|
|
3919
|
+
static UpdateCartShipmentRequest() {
|
|
4542
3920
|
return Joi.object({
|
|
4543
3921
|
shipments: Joi.array()
|
|
4544
3922
|
.items(CartPlatformModel.UpdateCartShipmentItem())
|
|
@@ -4546,29 +3924,29 @@ class CartPlatformModel {
|
|
|
4546
3924
|
});
|
|
4547
3925
|
}
|
|
4548
3926
|
|
|
4549
|
-
/** @returns {
|
|
4550
|
-
static
|
|
3927
|
+
/** @returns {PlatformCartMetaRequest} */
|
|
3928
|
+
static PlatformCartMetaRequest() {
|
|
4551
3929
|
return Joi.object({
|
|
4552
3930
|
gstin: Joi.string().allow(""),
|
|
4553
|
-
pick_up_customer_details: Joi.
|
|
3931
|
+
pick_up_customer_details: Joi.any(),
|
|
4554
3932
|
checkout_mode: Joi.string().allow(""),
|
|
4555
|
-
gift_details: Joi.
|
|
3933
|
+
gift_details: Joi.any().allow(null),
|
|
4556
3934
|
pan_no: Joi.string().allow(""),
|
|
4557
3935
|
comment: Joi.string().allow(""),
|
|
4558
3936
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
4559
3937
|
});
|
|
4560
3938
|
}
|
|
4561
3939
|
|
|
4562
|
-
/** @returns {
|
|
4563
|
-
static
|
|
3940
|
+
/** @returns {CartMetaResponse} */
|
|
3941
|
+
static CartMetaResponse() {
|
|
4564
3942
|
return Joi.object({
|
|
4565
3943
|
is_valid: Joi.boolean(),
|
|
4566
3944
|
message: Joi.string().allow(""),
|
|
4567
3945
|
});
|
|
4568
3946
|
}
|
|
4569
3947
|
|
|
4570
|
-
/** @returns {
|
|
4571
|
-
static
|
|
3948
|
+
/** @returns {CartMetaMissingResponse} */
|
|
3949
|
+
static CartMetaMissingResponse() {
|
|
4572
3950
|
return Joi.object({
|
|
4573
3951
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
4574
3952
|
});
|
|
@@ -4602,53 +3980,6 @@ class CartPlatformModel {
|
|
|
4602
3980
|
});
|
|
4603
3981
|
}
|
|
4604
3982
|
|
|
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
3983
|
/** @returns {CheckCart} */
|
|
4653
3984
|
static CheckCart() {
|
|
4654
3985
|
return Joi.object({
|
|
@@ -4681,15 +4012,15 @@ class CartPlatformModel {
|
|
|
4681
4012
|
gstin: Joi.string().allow(""),
|
|
4682
4013
|
cod_available: Joi.boolean(),
|
|
4683
4014
|
delivery_charges: Joi.number(),
|
|
4684
|
-
custom_cart_meta: Joi.
|
|
4015
|
+
custom_cart_meta: Joi.any(),
|
|
4685
4016
|
});
|
|
4686
4017
|
}
|
|
4687
4018
|
|
|
4688
|
-
/** @returns {
|
|
4689
|
-
static
|
|
4019
|
+
/** @returns {CartCheckoutResponse} */
|
|
4020
|
+
static CartCheckoutResponse() {
|
|
4690
4021
|
return Joi.object({
|
|
4691
4022
|
app_intercept_url: Joi.string().allow(""),
|
|
4692
|
-
data: Joi.
|
|
4023
|
+
data: Joi.any(),
|
|
4693
4024
|
cart: CartPlatformModel.CheckCart(),
|
|
4694
4025
|
success: Joi.boolean(),
|
|
4695
4026
|
callback_url: Joi.string().allow(""),
|
|
@@ -4699,22 +4030,8 @@ class CartPlatformModel {
|
|
|
4699
4030
|
});
|
|
4700
4031
|
}
|
|
4701
4032
|
|
|
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() {
|
|
4033
|
+
/** @returns {CartDeliveryModesResponse} */
|
|
4034
|
+
static CartDeliveryModesResponse() {
|
|
4718
4035
|
return Joi.object({
|
|
4719
4036
|
pickup_stores: Joi.array().items(Joi.number()),
|
|
4720
4037
|
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
@@ -4744,15 +4061,15 @@ class CartPlatformModel {
|
|
|
4744
4061
|
});
|
|
4745
4062
|
}
|
|
4746
4063
|
|
|
4747
|
-
/** @returns {
|
|
4748
|
-
static
|
|
4064
|
+
/** @returns {StoreDetailsResponse} */
|
|
4065
|
+
static StoreDetailsResponse() {
|
|
4749
4066
|
return Joi.object({
|
|
4750
4067
|
items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
|
|
4751
4068
|
});
|
|
4752
4069
|
}
|
|
4753
4070
|
|
|
4754
|
-
/** @returns {
|
|
4755
|
-
static
|
|
4071
|
+
/** @returns {UpdateCartPaymentRequest} */
|
|
4072
|
+
static UpdateCartPaymentRequest() {
|
|
4756
4073
|
return Joi.object({
|
|
4757
4074
|
address_id: Joi.string().allow(""),
|
|
4758
4075
|
payment_mode: Joi.string().allow(""),
|
|
@@ -4772,7 +4089,6 @@ class CartPlatformModel {
|
|
|
4772
4089
|
display_message_en: Joi.string().allow("").allow(null),
|
|
4773
4090
|
code: Joi.string().allow("").allow(null),
|
|
4774
4091
|
discount: Joi.number(),
|
|
4775
|
-
error_en: Joi.string().allow("").allow(null),
|
|
4776
4092
|
});
|
|
4777
4093
|
}
|
|
4778
4094
|
|
|
@@ -4803,19 +4119,17 @@ class CartPlatformModel {
|
|
|
4803
4119
|
payment_meta: CartPlatformModel.PaymentMeta().required(),
|
|
4804
4120
|
amount: Joi.number().allow(null),
|
|
4805
4121
|
name: Joi.string().allow(""),
|
|
4806
|
-
payment_extra_identifiers: Joi.
|
|
4122
|
+
payment_extra_identifiers: Joi.any(),
|
|
4807
4123
|
});
|
|
4808
4124
|
}
|
|
4809
4125
|
|
|
4810
|
-
/** @returns {
|
|
4811
|
-
static
|
|
4126
|
+
/** @returns {PlatformCartCheckoutDetailV2Request} */
|
|
4127
|
+
static PlatformCartCheckoutDetailV2Request() {
|
|
4812
4128
|
return Joi.object({
|
|
4813
4129
|
address_id: Joi.string().allow(""),
|
|
4814
4130
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
4815
|
-
payment_params: Joi.
|
|
4816
|
-
custom_meta: Joi.
|
|
4817
|
-
CartPlatformModel.CartCheckoutCustomMeta()
|
|
4818
|
-
),
|
|
4131
|
+
payment_params: Joi.any().allow(null),
|
|
4132
|
+
custom_meta: Joi.any(),
|
|
4819
4133
|
payment_auto_confirm: Joi.boolean(),
|
|
4820
4134
|
id: Joi.string().allow("").required(),
|
|
4821
4135
|
pos: Joi.boolean(),
|
|
@@ -4824,20 +4138,20 @@ class CartPlatformModel {
|
|
|
4824
4138
|
aggregator: Joi.string().allow(""),
|
|
4825
4139
|
pick_at_store_uid: Joi.number().allow(null),
|
|
4826
4140
|
device_id: Joi.string().allow("").allow(null),
|
|
4827
|
-
delivery_address: Joi.
|
|
4141
|
+
delivery_address: Joi.any(),
|
|
4828
4142
|
payment_mode: Joi.string().allow(""),
|
|
4829
4143
|
checkout_mode: Joi.string().allow(""),
|
|
4830
|
-
customer_details:
|
|
4831
|
-
meta: Joi.
|
|
4144
|
+
customer_details: Joi.any().allow(null),
|
|
4145
|
+
meta: Joi.any(),
|
|
4832
4146
|
payment_methods: Joi.array()
|
|
4833
4147
|
.items(CartPlatformModel.PaymentMethod())
|
|
4834
4148
|
.required(),
|
|
4835
4149
|
staff: CartPlatformModel.StaffCheckout(),
|
|
4836
4150
|
employee_code: Joi.string().allow("").allow(null),
|
|
4837
|
-
billing_address: Joi.
|
|
4151
|
+
billing_address: Joi.any(),
|
|
4838
4152
|
callback_url: Joi.string().allow("").allow(null),
|
|
4839
|
-
user_id: Joi.string().allow("").required(),
|
|
4840
|
-
extra_meta: Joi.
|
|
4153
|
+
user_id: Joi.string().allow("").allow(null).required(),
|
|
4154
|
+
extra_meta: Joi.any(),
|
|
4841
4155
|
order_type: Joi.string().allow("").required(),
|
|
4842
4156
|
files: Joi.array().items(CartPlatformModel.Files()),
|
|
4843
4157
|
ordering_store: Joi.number().allow(null),
|
|
@@ -4878,25 +4192,14 @@ class CartPlatformModel {
|
|
|
4878
4192
|
});
|
|
4879
4193
|
}
|
|
4880
4194
|
|
|
4881
|
-
/** @returns {ArticlePriceDetails} */
|
|
4882
|
-
static ArticlePriceDetails() {
|
|
4883
|
-
return Joi.object({
|
|
4884
|
-
marked: Joi.number(),
|
|
4885
|
-
effective: Joi.number(),
|
|
4886
|
-
});
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
4195
|
/** @returns {FreeGiftItems} */
|
|
4890
4196
|
static FreeGiftItems() {
|
|
4891
4197
|
return Joi.object({
|
|
4892
4198
|
item_slug: Joi.string().allow(""),
|
|
4893
4199
|
item_name: Joi.string().allow(""),
|
|
4894
4200
|
item_price_details: CartPlatformModel.ItemPriceDetails(),
|
|
4895
|
-
article_price: CartPlatformModel.ArticlePriceDetails(),
|
|
4896
4201
|
item_brand_name: Joi.string().allow(""),
|
|
4897
4202
|
item_id: Joi.number(),
|
|
4898
|
-
available_sizes: Joi.array().items(Joi.string().allow("")),
|
|
4899
|
-
size: Joi.string().allow(""),
|
|
4900
4203
|
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
4901
4204
|
});
|
|
4902
4205
|
}
|
|
@@ -4905,7 +4208,7 @@ class CartPlatformModel {
|
|
|
4905
4208
|
static PromotionOffer() {
|
|
4906
4209
|
return Joi.object({
|
|
4907
4210
|
id: Joi.string().allow(""),
|
|
4908
|
-
buy_rules: Joi.
|
|
4211
|
+
buy_rules: Joi.any(),
|
|
4909
4212
|
offer_text: Joi.string().allow(""),
|
|
4910
4213
|
promotion_type: Joi.string().allow(""),
|
|
4911
4214
|
promotion_name: Joi.string().allow(""),
|
|
@@ -4917,8 +4220,8 @@ class CartPlatformModel {
|
|
|
4917
4220
|
});
|
|
4918
4221
|
}
|
|
4919
4222
|
|
|
4920
|
-
/** @returns {
|
|
4921
|
-
static
|
|
4223
|
+
/** @returns {PromotionOffersResponse} */
|
|
4224
|
+
static PromotionOffersResponse() {
|
|
4922
4225
|
return Joi.object({
|
|
4923
4226
|
available_promotions: Joi.array().items(
|
|
4924
4227
|
CartPlatformModel.PromotionOffer()
|
|
@@ -4942,20 +4245,12 @@ class CartPlatformModel {
|
|
|
4942
4245
|
});
|
|
4943
4246
|
}
|
|
4944
4247
|
|
|
4945
|
-
/** @returns {
|
|
4946
|
-
static
|
|
4248
|
+
/** @returns {PromotionPaymentOffersResponse} */
|
|
4249
|
+
static PromotionPaymentOffersResponse() {
|
|
4947
4250
|
return Joi.object({
|
|
4948
4251
|
success: Joi.boolean(),
|
|
4949
4252
|
promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
|
|
4950
4253
|
});
|
|
4951
4254
|
}
|
|
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
4255
|
}
|
|
4961
4256
|
module.exports = CartPlatformModel;
|