@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
- package/sdk/application/Cart/CartApplicationClient.js +60 -1262
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
- package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
- package/sdk/application/Common/CommonApplicationClient.js +5 -90
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
- package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
- package/sdk/application/Content/ContentApplicationClient.js +126 -942
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
- package/sdk/application/Lead/LeadApplicationClient.js +32 -201
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
- package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
- package/sdk/application/Order/OrderApplicationClient.js +86 -555
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
- package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
- package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +34 -294
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +47 -1817
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
- package/sdk/application/index.d.ts +0 -19
- package/sdk/application/index.js +0 -35
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -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/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
- package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
- 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 +1328 -4975
- package/sdk/platform/Cart/CartPlatformModel.js +1229 -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 +1744 -1501
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
- 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 +138 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -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 +39 -95
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -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 +22 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -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 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
- package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
- package/sdk/platform/Order/OrderPlatformClient.js +275 -528
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
- package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
- package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
- 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 +68 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
- 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 +13 -76
- package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
- 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 +10 -8
- 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 +19 -793
- 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/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +14 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
- 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/Cart/CartApplicationModel.d.ts +0 -4340
- package/sdk/application/Cart/CartApplicationModel.js +0 -2718
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
- package/sdk/application/Cart/CartApplicationValidator.js +0 -546
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
- package/sdk/application/Content/ContentApplicationModel.js +0 -1640
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
- package/sdk/application/Content/ContentApplicationValidator.js +0 -269
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- 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
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
- package/sdk/application/Order/OrderApplicationModel.js +0 -1669
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
- package/sdk/application/Order/OrderApplicationValidator.js +0 -210
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
|
@@ -2,74 +2,65 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef CouponDateMeta
|
|
5
|
-
* @property {string} [modified_on]
|
|
6
|
-
* @property {string} [created_on]
|
|
7
|
-
* @property {string} [approved_on] - Date time format when the coupon approved
|
|
8
|
-
* @property {string} [rejected_on] - Date time format when the coupon rejected
|
|
9
|
-
* @property {string} [reviewed_on] - Date time format when the coupon reviewed
|
|
5
|
+
* @property {string} [modified_on]
|
|
6
|
+
* @property {string} [created_on]
|
|
10
7
|
*/
|
|
11
8
|
|
|
12
9
|
/**
|
|
13
10
|
* @typedef Ownership
|
|
14
|
-
* @property {string} payable_category
|
|
15
|
-
* @property {string}
|
|
11
|
+
* @property {string} payable_category
|
|
12
|
+
* @property {string} payable_by
|
|
16
13
|
*/
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* @typedef CouponAuthor
|
|
20
|
-
* @property {string} [created_by]
|
|
21
|
-
* @property {string} [modified_by]
|
|
22
|
-
* @property {string} [approved_by] - The user id of user, who has approved the coupon
|
|
23
|
-
* @property {string} [rejected_by] - The user id of user, who has rejected the coupon
|
|
24
|
-
* @property {string} [reviewed_by] - The user id of user, who has reviewed the coupon
|
|
17
|
+
* @property {string} [created_by]
|
|
18
|
+
* @property {string} [modified_by]
|
|
25
19
|
*/
|
|
26
20
|
|
|
27
21
|
/**
|
|
28
22
|
* @typedef State
|
|
29
|
-
* @property {boolean} [is_archived]
|
|
30
|
-
* @property {boolean} [is_display]
|
|
31
|
-
* @property {boolean} [is_public]
|
|
23
|
+
* @property {boolean} [is_archived]
|
|
24
|
+
* @property {boolean} [is_display]
|
|
25
|
+
* @property {boolean} [is_public]
|
|
32
26
|
*/
|
|
33
27
|
|
|
34
28
|
/**
|
|
35
29
|
* @typedef PaymentAllowValue
|
|
36
|
-
* @property {number} [max]
|
|
30
|
+
* @property {number} [max]
|
|
37
31
|
*/
|
|
38
32
|
|
|
39
33
|
/**
|
|
40
34
|
* @typedef PaymentModes
|
|
41
|
-
* @property {string[]} [codes]
|
|
42
|
-
*
|
|
43
|
-
* @property {string[]} [
|
|
44
|
-
* @property {string[]} [
|
|
45
|
-
* @property {string[]} [networks] - Credit/Debit card issuer, e.g. VISA,
|
|
46
|
-
* MASTERCARD, RUPAY
|
|
35
|
+
* @property {string[]} [codes]
|
|
36
|
+
* @property {string[]} [iins]
|
|
37
|
+
* @property {string[]} [types]
|
|
38
|
+
* @property {string[]} [networks]
|
|
47
39
|
* @property {PaymentAllowValue} [uses]
|
|
48
40
|
*/
|
|
49
41
|
|
|
50
42
|
/**
|
|
51
43
|
* @typedef PriceRange
|
|
52
|
-
* @property {number} [max]
|
|
53
|
-
* @property {number} [min]
|
|
44
|
+
* @property {number} [max]
|
|
45
|
+
* @property {number} [min]
|
|
54
46
|
*/
|
|
55
47
|
|
|
56
48
|
/**
|
|
57
49
|
* @typedef PostOrder
|
|
58
|
-
* @property {boolean} [cancellation_allowed]
|
|
59
|
-
* @property {boolean} [return_allowed]
|
|
50
|
+
* @property {boolean} [cancellation_allowed]
|
|
51
|
+
* @property {boolean} [return_allowed]
|
|
60
52
|
*/
|
|
61
53
|
|
|
62
54
|
/**
|
|
63
55
|
* @typedef BulkBundleRestriction
|
|
64
|
-
* @property {boolean} multi_store_allowed
|
|
65
|
-
* coupon or not
|
|
56
|
+
* @property {boolean} multi_store_allowed
|
|
66
57
|
*/
|
|
67
58
|
|
|
68
59
|
/**
|
|
69
60
|
* @typedef UsesRemaining
|
|
70
|
-
* @property {number} [user]
|
|
71
|
-
* @property {number} [total]
|
|
72
|
-
* @property {number} [app]
|
|
61
|
+
* @property {number} [user]
|
|
62
|
+
* @property {number} [total]
|
|
63
|
+
* @property {number} [app]
|
|
73
64
|
*/
|
|
74
65
|
|
|
75
66
|
/**
|
|
@@ -80,129 +71,115 @@ const Joi = require("joi");
|
|
|
80
71
|
|
|
81
72
|
/**
|
|
82
73
|
* @typedef Restrictions
|
|
83
|
-
* @property {
|
|
74
|
+
* @property {Object} [payments]
|
|
84
75
|
* @property {string} [user_type]
|
|
85
76
|
* @property {PriceRange} [price_range]
|
|
86
|
-
* @property {string[]} [platforms]
|
|
87
|
-
* like web, android
|
|
77
|
+
* @property {string[]} [platforms]
|
|
88
78
|
* @property {PostOrder} [post_order]
|
|
89
79
|
* @property {BulkBundleRestriction} [bulk_bundle]
|
|
90
|
-
* @property {number[]} [user_groups]
|
|
91
|
-
* @property {boolean} [coupon_allowed]
|
|
92
|
-
* coupon is applied
|
|
80
|
+
* @property {number[]} [user_groups]
|
|
81
|
+
* @property {boolean} [coupon_allowed]
|
|
93
82
|
* @property {UsesRestriction} [uses]
|
|
94
|
-
* @property {number[]} [ordering_stores]
|
|
83
|
+
* @property {number[]} [ordering_stores]
|
|
95
84
|
*/
|
|
96
85
|
|
|
97
86
|
/**
|
|
98
87
|
* @typedef Validation
|
|
99
|
-
* @property {string[]} [app_id]
|
|
100
|
-
* @property {boolean} [anonymous]
|
|
101
|
-
* @property {string} [user_registered_after]
|
|
102
|
-
* is registered after Date Format
|
|
88
|
+
* @property {string[]} [app_id]
|
|
89
|
+
* @property {boolean} [anonymous]
|
|
90
|
+
* @property {string} [user_registered_after]
|
|
103
91
|
*/
|
|
104
92
|
|
|
105
93
|
/**
|
|
106
94
|
* @typedef CouponAction
|
|
107
|
-
* @property {string} [action_date]
|
|
108
|
-
* @property {string} [txn_mode]
|
|
95
|
+
* @property {string} [action_date]
|
|
96
|
+
* @property {string} [txn_mode]
|
|
109
97
|
*/
|
|
110
98
|
|
|
111
99
|
/**
|
|
112
100
|
* @typedef CouponSchedule
|
|
113
|
-
* @property {string} [end]
|
|
114
|
-
* @property {string} [start]
|
|
115
|
-
* @property {Object[]} [next_schedule]
|
|
116
|
-
*
|
|
117
|
-
* @property {
|
|
118
|
-
* @property {string} [status] - Coupon status like draft, review
|
|
119
|
-
* @property {number} [duration] - Time in minutes for execution
|
|
101
|
+
* @property {string} [end]
|
|
102
|
+
* @property {string} [start]
|
|
103
|
+
* @property {Object[]} [next_schedule]
|
|
104
|
+
* @property {string} [cron]
|
|
105
|
+
* @property {number} [duration]
|
|
120
106
|
*/
|
|
121
107
|
|
|
122
108
|
/**
|
|
123
109
|
* @typedef Rule
|
|
124
|
-
* @property {number} [key]
|
|
125
|
-
*
|
|
126
|
-
* @property {number} [
|
|
127
|
-
* @property {number} [
|
|
128
|
-
* @property {number} [
|
|
129
|
-
* discount in coupon
|
|
130
|
-
* @property {number} [min] - Min defines minimum number of discount amount in coupon
|
|
110
|
+
* @property {number} [key]
|
|
111
|
+
* @property {number} [value]
|
|
112
|
+
* @property {number} [max]
|
|
113
|
+
* @property {number} [discount_qty]
|
|
114
|
+
* @property {number} [min]
|
|
131
115
|
*/
|
|
132
116
|
|
|
133
117
|
/**
|
|
134
118
|
* @typedef DisplayMetaDict
|
|
135
|
-
* @property {string} [title]
|
|
136
|
-
* @property {string} [subtitle]
|
|
119
|
+
* @property {string} [title]
|
|
120
|
+
* @property {string} [subtitle]
|
|
137
121
|
*/
|
|
138
122
|
|
|
139
123
|
/**
|
|
140
124
|
* @typedef DisplayMeta
|
|
141
|
-
* @property {string} [title]
|
|
125
|
+
* @property {string} [title]
|
|
142
126
|
* @property {DisplayMetaDict} [auto]
|
|
143
127
|
* @property {DisplayMetaDict} [apply]
|
|
144
128
|
* @property {DisplayMetaDict} [remove]
|
|
145
|
-
* @property {string} [subtitle]
|
|
146
|
-
* @property {string} [description]
|
|
129
|
+
* @property {string} [subtitle]
|
|
130
|
+
* @property {string} [description]
|
|
147
131
|
*/
|
|
148
132
|
|
|
149
133
|
/**
|
|
150
134
|
* @typedef Identifier
|
|
151
|
-
* @property {number[]} [brand_id]
|
|
152
|
-
* @property {string[]} [email_domain]
|
|
153
|
-
* @property {number[]} [company_id]
|
|
154
|
-
* @property {number[]} [store_id]
|
|
155
|
-
* @property {string[]} [collection_id]
|
|
156
|
-
* @property {number[]} [item_id]
|
|
157
|
-
* @property {string[]} [user_id]
|
|
158
|
-
* @property {number[]} [category_id]
|
|
159
|
-
* @property {string[]} [article_id]
|
|
160
|
-
* @property {number[]} [exclude_brand_id]
|
|
161
|
-
* available for coupon
|
|
135
|
+
* @property {number[]} [brand_id]
|
|
136
|
+
* @property {string[]} [email_domain]
|
|
137
|
+
* @property {number[]} [company_id]
|
|
138
|
+
* @property {number[]} [store_id]
|
|
139
|
+
* @property {string[]} [collection_id]
|
|
140
|
+
* @property {number[]} [item_id]
|
|
141
|
+
* @property {string[]} [user_id]
|
|
142
|
+
* @property {number[]} [category_id]
|
|
143
|
+
* @property {string[]} [article_id]
|
|
144
|
+
* @property {number[]} [exclude_brand_id]
|
|
162
145
|
*/
|
|
163
146
|
|
|
164
147
|
/**
|
|
165
148
|
* @typedef Validity
|
|
166
|
-
* @property {number} [priority]
|
|
149
|
+
* @property {number} [priority]
|
|
167
150
|
*/
|
|
168
151
|
|
|
169
152
|
/**
|
|
170
153
|
* @typedef RuleDefinition
|
|
171
|
-
* @property {string} [currency_code]
|
|
172
|
-
* @property {boolean} [auto_apply]
|
|
173
|
-
* @property {string}
|
|
174
|
-
* @property {boolean} [is_exact]
|
|
175
|
-
*
|
|
176
|
-
* @property {string}
|
|
177
|
-
*
|
|
178
|
-
* @property {string} [
|
|
179
|
-
* like effective price or marked price
|
|
180
|
-
* @property {string} [value_type] - Define the type of coupon value
|
|
181
|
-
* @property {string[]} [scope] - List of item level rule applicable for coupon
|
|
154
|
+
* @property {string} [currency_code]
|
|
155
|
+
* @property {boolean} [auto_apply]
|
|
156
|
+
* @property {string} type
|
|
157
|
+
* @property {boolean} [is_exact]
|
|
158
|
+
* @property {string} applicable_on
|
|
159
|
+
* @property {string} calculate_on
|
|
160
|
+
* @property {string} value_type
|
|
161
|
+
* @property {string[]} [scope]
|
|
182
162
|
*/
|
|
183
163
|
|
|
184
164
|
/**
|
|
185
165
|
* @typedef CouponAdd
|
|
186
166
|
* @property {CouponDateMeta} [date_meta]
|
|
187
|
-
* @property {Ownership}
|
|
167
|
+
* @property {Ownership} ownership
|
|
188
168
|
* @property {CouponAuthor} [author]
|
|
189
169
|
* @property {State} [state]
|
|
190
170
|
* @property {Restrictions} [restrictions]
|
|
191
171
|
* @property {Validation} [validation]
|
|
192
172
|
* @property {CouponAction} [action]
|
|
193
|
-
* @property {string} [
|
|
194
|
-
* @property {string} [coupon_prefix] - Bulk coupon code prefix string
|
|
195
|
-
* @property {number} [coupon_counts] - Counts of bulk coupon
|
|
196
|
-
* @property {string[]} [tags] - List of tags specify to platform
|
|
173
|
+
* @property {string[]} [tags]
|
|
197
174
|
* @property {CouponSchedule} [_schedule]
|
|
198
|
-
* @property {Rule[]}
|
|
199
|
-
* @property {DisplayMeta}
|
|
200
|
-
* @property {string} code
|
|
201
|
-
* @property {string} type_slug
|
|
202
|
-
* @property {Identifier}
|
|
203
|
-
* @property {Validity}
|
|
204
|
-
* @property {RuleDefinition}
|
|
205
|
-
* @property {string} [_id] -
|
|
175
|
+
* @property {Rule[]} rule
|
|
176
|
+
* @property {DisplayMeta} display_meta
|
|
177
|
+
* @property {string} code
|
|
178
|
+
* @property {string} type_slug
|
|
179
|
+
* @property {Identifier} identifiers
|
|
180
|
+
* @property {Validity} validity
|
|
181
|
+
* @property {RuleDefinition} rule_definition
|
|
182
|
+
* @property {string} [_id] - Coupon id
|
|
206
183
|
*/
|
|
207
184
|
|
|
208
185
|
/**
|
|
@@ -217,46 +194,42 @@ const Joi = require("joi");
|
|
|
217
194
|
*/
|
|
218
195
|
|
|
219
196
|
/**
|
|
220
|
-
* @typedef
|
|
221
|
-
* @property {CouponAdd[]} [items]
|
|
197
|
+
* @typedef CouponsResponse
|
|
198
|
+
* @property {CouponAdd[]} [items]
|
|
222
199
|
* @property {Page} [page]
|
|
223
200
|
*/
|
|
224
201
|
|
|
225
202
|
/**
|
|
226
203
|
* @typedef SuccessMessage
|
|
227
|
-
* @property {boolean} [success]
|
|
228
|
-
* @property {string} [message]
|
|
204
|
+
* @property {boolean} [success]
|
|
205
|
+
* @property {string} [message]
|
|
229
206
|
*/
|
|
230
207
|
|
|
231
208
|
/**
|
|
232
|
-
* @typedef
|
|
233
|
-
* @property {boolean} [success]
|
|
234
|
-
* @property {string} [message]
|
|
235
|
-
* @property {string} [error]
|
|
209
|
+
* @typedef OperationErrorResponse
|
|
210
|
+
* @property {boolean} [success]
|
|
211
|
+
* @property {string} [message]
|
|
212
|
+
* @property {string} [error]
|
|
236
213
|
*/
|
|
237
214
|
|
|
238
215
|
/**
|
|
239
216
|
* @typedef CouponUpdate
|
|
240
217
|
* @property {CouponDateMeta} [date_meta]
|
|
241
|
-
* @property {Ownership}
|
|
218
|
+
* @property {Ownership} ownership
|
|
242
219
|
* @property {CouponAuthor} [author]
|
|
243
220
|
* @property {State} [state]
|
|
244
221
|
* @property {Restrictions} [restrictions]
|
|
245
222
|
* @property {Validation} [validation]
|
|
246
223
|
* @property {CouponAction} [action]
|
|
247
|
-
* @property {string[]} [tags]
|
|
224
|
+
* @property {string[]} [tags]
|
|
248
225
|
* @property {CouponSchedule} [_schedule]
|
|
249
|
-
* @property {Rule[]}
|
|
250
|
-
* @property {DisplayMeta}
|
|
251
|
-
* @property {string} code
|
|
252
|
-
* @property {string}
|
|
253
|
-
* @property {
|
|
254
|
-
* @property {
|
|
255
|
-
* @property {
|
|
256
|
-
* @property {string} type_slug - The type slug of coupon discount
|
|
257
|
-
* @property {Identifier} [identifiers]
|
|
258
|
-
* @property {Validity} [validity]
|
|
259
|
-
* @property {RuleDefinition} [rule_definition]
|
|
226
|
+
* @property {Rule[]} rule
|
|
227
|
+
* @property {DisplayMeta} display_meta
|
|
228
|
+
* @property {string} code
|
|
229
|
+
* @property {string} type_slug
|
|
230
|
+
* @property {Identifier} identifiers
|
|
231
|
+
* @property {Validity} validity
|
|
232
|
+
* @property {RuleDefinition} rule_definition
|
|
260
233
|
*/
|
|
261
234
|
|
|
262
235
|
/**
|
|
@@ -265,149 +238,110 @@ const Joi = require("joi");
|
|
|
265
238
|
* @property {CouponSchedule} [schedule]
|
|
266
239
|
*/
|
|
267
240
|
|
|
268
|
-
/**
|
|
269
|
-
* @typedef CouponCreateResult
|
|
270
|
-
* @property {boolean} [success] - Whether the request was successful (true/false)
|
|
271
|
-
* @property {string} [message] - Create coupon response message that can shown
|
|
272
|
-
* to creator user
|
|
273
|
-
* @property {string} [_id] - Unique identifier for coupon created
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
241
|
/**
|
|
277
242
|
* @typedef DisplayMeta1
|
|
278
|
-
* @property {string} [description]
|
|
279
|
-
* @property {string} [offer_label]
|
|
280
|
-
* @property {string} [name]
|
|
281
|
-
* @property {string} [offer_text]
|
|
243
|
+
* @property {string} [description]
|
|
244
|
+
* @property {string} [offer_label]
|
|
245
|
+
* @property {string} [name]
|
|
246
|
+
* @property {string} [offer_text]
|
|
282
247
|
*/
|
|
283
248
|
|
|
284
249
|
/**
|
|
285
250
|
* @typedef Ownership1
|
|
286
|
-
* @property {string}
|
|
287
|
-
* @property {string}
|
|
251
|
+
* @property {string} payable_category
|
|
252
|
+
* @property {string} payable_by
|
|
288
253
|
*/
|
|
289
254
|
|
|
290
255
|
/**
|
|
291
256
|
* @typedef CompareObject
|
|
292
|
-
* @property {number} [equals]
|
|
293
|
-
* @property {number} [greater_than]
|
|
294
|
-
*
|
|
295
|
-
* @property {number} [
|
|
296
|
-
*
|
|
297
|
-
* @property {number} [less_than] - Nummeric value must be less than cart level rules
|
|
298
|
-
* @property {number} [greater_than_equals] - Nummeric value must be greater
|
|
299
|
-
* than or equal to cart level rules
|
|
300
|
-
*/
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* @typedef ItemSizeMapping
|
|
304
|
-
* @property {Object} [item_size_mapping] - Item size mapping in promotion
|
|
257
|
+
* @property {number} [equals]
|
|
258
|
+
* @property {number} [greater_than]
|
|
259
|
+
* @property {number} [less_than_equals]
|
|
260
|
+
* @property {number} [less_than]
|
|
261
|
+
* @property {number} [greater_than_equals]
|
|
305
262
|
*/
|
|
306
263
|
|
|
307
264
|
/**
|
|
308
265
|
* @typedef ItemCriteria
|
|
309
266
|
* @property {CompareObject} [cart_quantity]
|
|
310
|
-
* @property {string[]} [available_zones]
|
|
311
|
-
*
|
|
312
|
-
* @property {number[]} [
|
|
313
|
-
*
|
|
314
|
-
* @property {number[]} [item_id] - List of all item ids on which promotion is applicable
|
|
315
|
-
* @property {number[]} [item_l1_category] - List of all L1 category on which
|
|
316
|
-
* promotion is applicable
|
|
267
|
+
* @property {string[]} [available_zones]
|
|
268
|
+
* @property {number[]} [item_exclude_company]
|
|
269
|
+
* @property {number[]} [item_id]
|
|
270
|
+
* @property {number[]} [item_l1_category]
|
|
317
271
|
* @property {CompareObject} [cart_total]
|
|
318
272
|
* @property {CompareObject} [cart_unique_item_quantity]
|
|
319
273
|
* @property {CompareObject} [cart_unique_item_amount]
|
|
320
|
-
* @property {number[]} [item_exclude_id]
|
|
321
|
-
*
|
|
322
|
-
* @property {
|
|
323
|
-
*
|
|
324
|
-
* @property {number[]} [
|
|
325
|
-
*
|
|
326
|
-
* @property {
|
|
327
|
-
*
|
|
328
|
-
* @property {number[]} [
|
|
329
|
-
*
|
|
330
|
-
* @property {
|
|
331
|
-
*
|
|
332
|
-
* @property {number[]} [item_department] - List of all departments ids on which
|
|
333
|
-
* promotion is applicable
|
|
334
|
-
* @property {number[]} [item_exclude_store] - List of all item store ids on
|
|
335
|
-
* which promotion is not applicable
|
|
336
|
-
* @property {number[]} [item_brand] - List of all brand ids on which promotion
|
|
337
|
-
* is applicable
|
|
338
|
-
* @property {number[]} [item_exclude_department] - List of all department ids
|
|
339
|
-
* on which promotion is not applicable
|
|
340
|
-
* @property {number[]} [item_exclude_category] - List of all L3 category on
|
|
341
|
-
* which promotion is not applicable
|
|
342
|
-
* @property {number[]} [item_category] - List of all L3 category on which
|
|
343
|
-
* promotion is applicable
|
|
274
|
+
* @property {number[]} [item_exclude_id]
|
|
275
|
+
* @property {boolean} [all_items]
|
|
276
|
+
* @property {number[]} [item_exclude_l1_category]
|
|
277
|
+
* @property {string[]} [item_size]
|
|
278
|
+
* @property {number[]} [item_store]
|
|
279
|
+
* @property {string[]} [item_exclude_sku]
|
|
280
|
+
* @property {number[]} [item_department]
|
|
281
|
+
* @property {number[]} [item_exclude_store]
|
|
282
|
+
* @property {number[]} [item_brand]
|
|
283
|
+
* @property {number[]} [item_exclude_department]
|
|
284
|
+
* @property {number[]} [item_exclude_category]
|
|
285
|
+
* @property {number[]} [item_category]
|
|
344
286
|
* @property {string[]} [buy_rules]
|
|
345
|
-
* @property {number[]} [item_exclude_brand]
|
|
346
|
-
*
|
|
347
|
-
* @property {number[]} [
|
|
348
|
-
*
|
|
349
|
-
* @property {number[]} [
|
|
350
|
-
*
|
|
351
|
-
* @property {string[]} [item_tags] - List of all product tags on which
|
|
352
|
-
* promotion is applicable
|
|
353
|
-
* @property {number[]} [item_exclude_l2_category] - List of all L2 category on
|
|
354
|
-
* which promotion is not applicable
|
|
355
|
-
* @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
|
|
287
|
+
* @property {number[]} [item_exclude_brand]
|
|
288
|
+
* @property {number[]} [item_l2_category]
|
|
289
|
+
* @property {number[]} [item_company]
|
|
290
|
+
* @property {string[]} [item_tags]
|
|
291
|
+
* @property {number[]} [item_exclude_l2_category]
|
|
292
|
+
* @property {string[]} [item_sku]
|
|
356
293
|
*/
|
|
357
294
|
|
|
358
295
|
/**
|
|
359
296
|
* @typedef DiscountOffer
|
|
360
|
-
* @property {number} [max_discount_amount]
|
|
361
|
-
* @property {number} [discount_price]
|
|
362
|
-
* @property {boolean} [apportion_discount]
|
|
363
|
-
* @property {boolean} [partial_can_ret]
|
|
364
|
-
* @property {number} [max_usage_per_transaction]
|
|
365
|
-
*
|
|
366
|
-
* @property {
|
|
367
|
-
* @property {
|
|
368
|
-
* @property {number} [
|
|
369
|
-
* @property {number} [
|
|
370
|
-
* @property {number} [max_offer_quantity] - Maximum quantity of product in promotion
|
|
297
|
+
* @property {number} [max_discount_amount]
|
|
298
|
+
* @property {number} [discount_price]
|
|
299
|
+
* @property {boolean} [apportion_discount]
|
|
300
|
+
* @property {boolean} [partial_can_ret]
|
|
301
|
+
* @property {number} [max_usage_per_transaction]
|
|
302
|
+
* @property {number} [min_offer_quantity]
|
|
303
|
+
* @property {string} [code]
|
|
304
|
+
* @property {number} [discount_amount]
|
|
305
|
+
* @property {number} [discount_percentage]
|
|
306
|
+
* @property {number} [max_offer_quantity]
|
|
371
307
|
*/
|
|
372
308
|
|
|
373
309
|
/**
|
|
374
310
|
* @typedef DiscountRule
|
|
375
|
-
* @property {string} discount_type
|
|
376
|
-
* @property {string} buy_condition
|
|
311
|
+
* @property {string} discount_type
|
|
312
|
+
* @property {string} buy_condition
|
|
377
313
|
* @property {ItemCriteria} item_criteria
|
|
378
|
-
* @property {ItemSizeMapping} [meta]
|
|
379
314
|
* @property {DiscountOffer} offer
|
|
380
315
|
*/
|
|
381
316
|
|
|
382
317
|
/**
|
|
383
318
|
* @typedef PaymentAllowValue1
|
|
384
|
-
* @property {number} [max]
|
|
319
|
+
* @property {number} [max]
|
|
385
320
|
*/
|
|
386
321
|
|
|
387
322
|
/**
|
|
388
323
|
* @typedef PromotionPaymentModes
|
|
389
|
-
* @property {string}
|
|
324
|
+
* @property {string} type
|
|
390
325
|
* @property {PaymentAllowValue1} [uses]
|
|
391
|
-
* @property {string[]} [codes]
|
|
326
|
+
* @property {string[]} [codes]
|
|
392
327
|
*/
|
|
393
328
|
|
|
394
329
|
/**
|
|
395
330
|
* @typedef UserRegistered
|
|
396
|
-
* @property {string} [end]
|
|
397
|
-
* @property {string} [start]
|
|
331
|
+
* @property {string} [end]
|
|
332
|
+
* @property {string} [start]
|
|
398
333
|
*/
|
|
399
334
|
|
|
400
335
|
/**
|
|
401
336
|
* @typedef PostOrder1
|
|
402
|
-
* @property {boolean} [cancellation_allowed]
|
|
403
|
-
*
|
|
404
|
-
* @property {boolean} [return_allowed] - Return allowed in promotion after order
|
|
337
|
+
* @property {boolean} [cancellation_allowed]
|
|
338
|
+
* @property {boolean} [return_allowed]
|
|
405
339
|
*/
|
|
406
340
|
|
|
407
341
|
/**
|
|
408
342
|
* @typedef UsesRemaining1
|
|
409
|
-
* @property {number} [user]
|
|
410
|
-
* @property {number} [total]
|
|
343
|
+
* @property {number} [user]
|
|
344
|
+
* @property {number} [total]
|
|
411
345
|
*/
|
|
412
346
|
|
|
413
347
|
/**
|
|
@@ -418,75 +352,62 @@ const Joi = require("joi");
|
|
|
418
352
|
|
|
419
353
|
/**
|
|
420
354
|
* @typedef Restrictions1
|
|
421
|
-
* @property {
|
|
355
|
+
* @property {Object} [payments]
|
|
422
356
|
* @property {UserRegistered} [user_registered]
|
|
423
|
-
* @property {string[]} [platforms]
|
|
424
|
-
* applicable like android, ios
|
|
357
|
+
* @property {string[]} [platforms]
|
|
425
358
|
* @property {PostOrder1} [post_order]
|
|
426
|
-
* @property {number[]} [user_groups]
|
|
427
|
-
*
|
|
428
|
-
* @property {
|
|
429
|
-
* @property {
|
|
430
|
-
*
|
|
431
|
-
* @property {
|
|
432
|
-
* @property {UsesRestriction1} [uses]
|
|
433
|
-
* @property {number[]} [ordering_stores] - List of store id on which promotion
|
|
434
|
-
* is applicable
|
|
359
|
+
* @property {number[]} [user_groups]
|
|
360
|
+
* @property {number} [order_quantity]
|
|
361
|
+
* @property {boolean} [anonymous_users]
|
|
362
|
+
* @property {string[]} [user_id]
|
|
363
|
+
* @property {UsesRestriction1} uses
|
|
364
|
+
* @property {number[]} [ordering_stores]
|
|
435
365
|
*/
|
|
436
366
|
|
|
437
367
|
/**
|
|
438
368
|
* @typedef PromotionSchedule
|
|
439
|
-
* @property {string}
|
|
440
|
-
* @property {string}
|
|
441
|
-
* @property {
|
|
442
|
-
* @property {
|
|
443
|
-
* @property {
|
|
444
|
-
*
|
|
445
|
-
* @property {string} [cron] - Schedule the cron to run your job periodically
|
|
446
|
-
* @property {number} [duration] - Time in minutes for execution
|
|
369
|
+
* @property {string} end
|
|
370
|
+
* @property {string} start
|
|
371
|
+
* @property {boolean} published
|
|
372
|
+
* @property {Object[]} [next_schedule]
|
|
373
|
+
* @property {string} [cron]
|
|
374
|
+
* @property {number} [duration]
|
|
447
375
|
*/
|
|
448
376
|
|
|
449
377
|
/**
|
|
450
378
|
* @typedef PromotionAction
|
|
451
|
-
* @property {string}
|
|
452
|
-
* @property {string}
|
|
379
|
+
* @property {string} action_date
|
|
380
|
+
* @property {string} action_type
|
|
453
381
|
*/
|
|
454
382
|
|
|
455
383
|
/**
|
|
456
384
|
* @typedef PromotionAuthor
|
|
457
|
-
* @property {string} [created_by]
|
|
458
|
-
* @property {string} [modified_by]
|
|
459
|
-
* @property {string} [approved_by] - The user id of user, who has approved the promotion
|
|
460
|
-
* @property {string} [rejected_by] - The user id of user, who has rejected the promotion
|
|
461
|
-
* @property {string} [reviewed_by] - The user id of user, who has reviewed the promotion
|
|
385
|
+
* @property {string} [created_by]
|
|
386
|
+
* @property {string} [modified_by]
|
|
462
387
|
*/
|
|
463
388
|
|
|
464
389
|
/**
|
|
465
390
|
* @typedef Visibility
|
|
466
|
-
* @property {boolean}
|
|
467
|
-
* @property {boolean}
|
|
391
|
+
* @property {boolean} coupon_list
|
|
392
|
+
* @property {boolean} pdp
|
|
468
393
|
*/
|
|
469
394
|
|
|
470
395
|
/**
|
|
471
396
|
* @typedef PromotionDateMeta
|
|
472
|
-
* @property {string} [modified_on]
|
|
473
|
-
* @property {string} [created_on]
|
|
474
|
-
* @property {string} [approved_on] - Date time format when the promotion approved
|
|
475
|
-
* @property {string} [rejected_on] - Date time format when the promotion rejected
|
|
476
|
-
* @property {string} [reviewed_on] - Date time format when the promotion reviewed
|
|
397
|
+
* @property {string} [modified_on]
|
|
398
|
+
* @property {string} [created_on]
|
|
477
399
|
*/
|
|
478
400
|
|
|
479
401
|
/**
|
|
480
402
|
* @typedef PromotionListItem
|
|
481
403
|
* @property {boolean} [stackable] - Allows more than one promotion to get
|
|
482
404
|
* combined benefits
|
|
483
|
-
* @property {string} [calculate_on] -
|
|
484
|
-
*
|
|
485
|
-
* Contract pricing and Ladder pricing promotion type
|
|
405
|
+
* @property {string} [calculate_on] - Only available for Contract pricing and
|
|
406
|
+
* Ladder pricing promotion type
|
|
486
407
|
* @property {string} [apply_exclusive] - Doesn't allow other promotion after
|
|
487
408
|
* current promotion applied on cart or article
|
|
488
409
|
* @property {string} promo_group - Group into which promotion fall
|
|
489
|
-
* @property {string} mode - Promotion mode
|
|
410
|
+
* @property {string} mode - Promotion mode
|
|
490
411
|
* @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
|
|
491
412
|
* @property {DisplayMeta1} display_meta
|
|
492
413
|
* @property {Ownership1} ownership
|
|
@@ -495,159 +416,81 @@ const Joi = require("joi");
|
|
|
495
416
|
* promotion will be applied
|
|
496
417
|
* @property {Restrictions1} [restrictions]
|
|
497
418
|
* @property {string} [currency] - Currency used for promotion
|
|
498
|
-
* @property {
|
|
499
|
-
* be applied on cart and ready to update promotion
|
|
500
|
-
* @property {string} [code] - Unique code of promotion
|
|
419
|
+
* @property {string} [code] - Promotion code
|
|
501
420
|
* @property {PromotionSchedule} [_schedule]
|
|
502
421
|
* @property {PromotionAction} [post_order_action]
|
|
503
422
|
* @property {number} [apply_priority] - Priority based on which promotion are
|
|
504
423
|
* applied on articles
|
|
505
424
|
* @property {PromotionAuthor} [author]
|
|
506
425
|
* @property {Visibility} [visiblility]
|
|
507
|
-
* @property {string} application_id -
|
|
508
|
-
* @property {
|
|
426
|
+
* @property {string} application_id - App id in which promotion will be used
|
|
427
|
+
* @property {Object} buy_rules - Buy rules for the promotion
|
|
509
428
|
* @property {Object} [_custom_json] - Custom data stored in promotion
|
|
510
429
|
* @property {PromotionDateMeta} [date_meta]
|
|
511
|
-
* @property {string} [_id] -
|
|
512
|
-
* @property {string[]} [tags]
|
|
430
|
+
* @property {string} [_id] - Promotion id
|
|
431
|
+
* @property {string[]} [tags]
|
|
513
432
|
*/
|
|
514
433
|
|
|
515
434
|
/**
|
|
516
|
-
* @typedef
|
|
517
|
-
* @property {PromotionListItem[]} [items]
|
|
435
|
+
* @typedef PromotionsResponse
|
|
436
|
+
* @property {PromotionListItem[]} [items]
|
|
518
437
|
* @property {Page} [page]
|
|
519
438
|
*/
|
|
520
439
|
|
|
521
440
|
/**
|
|
522
441
|
* @typedef PromotionAdd
|
|
523
|
-
* @property {boolean} [stackable]
|
|
524
|
-
* @property {string} [calculate_on] -
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
* @property {string}
|
|
528
|
-
*
|
|
529
|
-
* @property {
|
|
530
|
-
* @property {
|
|
531
|
-
* @property {
|
|
532
|
-
* @property {
|
|
533
|
-
* @property {
|
|
534
|
-
* @property {string} promotion_type - Type of promotion
|
|
535
|
-
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
536
|
-
* their applicable conditions
|
|
537
|
-
* @property {Restrictions1} [restrictions]
|
|
538
|
-
* @property {string} [currency] - Promotion Currency code like INR
|
|
539
|
-
* @property {string} [code] - Promotion unique code
|
|
540
|
-
* @property {PromotionSchedule} [_schedule]
|
|
541
|
-
* @property {PromotionAction} [post_order_action]
|
|
542
|
-
* @property {number} [apply_priority] - Promotion applicable priority
|
|
543
|
-
* @property {PromotionAuthor} [author]
|
|
544
|
-
* @property {Visibility} [visiblility]
|
|
545
|
-
* @property {string} application_id - Current application id of sales channel
|
|
546
|
-
* @property {ItemCriteria} [buy_rules]
|
|
547
|
-
* @property {Object} [_custom_json] - Set extra properties in promotion
|
|
548
|
-
* @property {PromotionDateMeta} [date_meta]
|
|
549
|
-
* @property {string[]} [tags] - List of tags applicable for promotion
|
|
550
|
-
*/
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* @typedef PromotionAddResult
|
|
554
|
-
* @property {boolean} [stackable] - Boolean value set true to apply other promotions also
|
|
555
|
-
* @property {string} [calculate_on] - Article Price on which promotion
|
|
556
|
-
* calculated like effective price or marked price. Only available for
|
|
557
|
-
* Contract pricing and Ladder pricing promotion type
|
|
558
|
-
* @property {string} [apply_exclusive] - Promotion should apply on either
|
|
559
|
-
* article or cart.
|
|
560
|
-
* @property {string} promo_group - The type of promotion group
|
|
561
|
-
* @property {string} mode - Promotion mode, like coupon or promotion
|
|
562
|
-
* @property {boolean} [is_processed] - Flag to verify if promotion is ready to
|
|
563
|
-
* be applied on cart and ready to update promotion
|
|
564
|
-
* @property {boolean} [apply_all_discount] - True means to apply all discount offers
|
|
565
|
-
* @property {DisplayMeta1} [display_meta]
|
|
566
|
-
* @property {Ownership1} [ownership]
|
|
567
|
-
* @property {string} promotion_type - Type of promotion
|
|
568
|
-
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
569
|
-
* their applicable conditions
|
|
442
|
+
* @property {boolean} [stackable]
|
|
443
|
+
* @property {string} [calculate_on] - Only available for Contract pricing and
|
|
444
|
+
* Ladder pricing promotion type
|
|
445
|
+
* @property {string} [apply_exclusive]
|
|
446
|
+
* @property {string} promo_group
|
|
447
|
+
* @property {string} mode
|
|
448
|
+
* @property {boolean} [apply_all_discount]
|
|
449
|
+
* @property {DisplayMeta1} display_meta
|
|
450
|
+
* @property {Ownership1} ownership
|
|
451
|
+
* @property {string} promotion_type
|
|
452
|
+
* @property {DiscountRule[]} discount_rules
|
|
570
453
|
* @property {Restrictions1} [restrictions]
|
|
571
|
-
* @property {string} [currency]
|
|
572
|
-
* @property {string} [code]
|
|
454
|
+
* @property {string} [currency]
|
|
455
|
+
* @property {string} [code]
|
|
573
456
|
* @property {PromotionSchedule} [_schedule]
|
|
574
457
|
* @property {PromotionAction} [post_order_action]
|
|
575
|
-
* @property {number} [apply_priority]
|
|
458
|
+
* @property {number} [apply_priority]
|
|
576
459
|
* @property {PromotionAuthor} [author]
|
|
577
460
|
* @property {Visibility} [visiblility]
|
|
578
|
-
* @property {string} application_id
|
|
579
|
-
* @property {
|
|
580
|
-
* @property {Object} [_custom_json]
|
|
461
|
+
* @property {string} application_id
|
|
462
|
+
* @property {Object} buy_rules
|
|
463
|
+
* @property {Object} [_custom_json]
|
|
581
464
|
* @property {PromotionDateMeta} [date_meta]
|
|
582
|
-
* @property {string[]} [tags]
|
|
465
|
+
* @property {string[]} [tags]
|
|
583
466
|
*/
|
|
584
467
|
|
|
585
468
|
/**
|
|
586
469
|
* @typedef PromotionUpdate
|
|
587
|
-
* @property {boolean} [stackable]
|
|
588
|
-
* @property {string} [calculate_on] -
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
* @property {string}
|
|
592
|
-
*
|
|
593
|
-
* @property {
|
|
594
|
-
* @property {
|
|
595
|
-
* @property {
|
|
596
|
-
* @property {
|
|
597
|
-
* @property {
|
|
598
|
-
* @property {Ownership1} [ownership]
|
|
599
|
-
* @property {string} promotion_type - The Promotion type like amount, bogo and
|
|
600
|
-
* percentage etc.
|
|
601
|
-
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
602
|
-
* their applicable conditions
|
|
603
|
-
* @property {Restrictions1} [restrictions]
|
|
604
|
-
* @property {string} [currency] - Promotion Currency code like INR
|
|
605
|
-
* @property {string} [code] - Promotion unique code
|
|
606
|
-
* @property {PromotionSchedule} [_schedule]
|
|
607
|
-
* @property {PromotionAction} [post_order_action]
|
|
608
|
-
* @property {number} [apply_priority] - Promotion applicable priority
|
|
609
|
-
* @property {PromotionAuthor} [author]
|
|
610
|
-
* @property {Visibility} [visiblility]
|
|
611
|
-
* @property {string} application_id - Current application id of sales channel
|
|
612
|
-
* @property {ItemCriteria} [buy_rules]
|
|
613
|
-
* @property {Object} [_custom_json] - Set extra properties in promotion
|
|
614
|
-
* @property {PromotionDateMeta} [date_meta]
|
|
615
|
-
* @property {string[]} [tags] - List of tags applicable for promotion
|
|
616
|
-
*/
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* @typedef PromotionUpdateResult
|
|
620
|
-
* @property {boolean} [stackable] - Set true to apply other promotions in cart
|
|
621
|
-
* @property {string} [calculate_on] - Article Price on which promotion
|
|
622
|
-
* calculated like effective price or marked price. Only available for
|
|
623
|
-
* Contract pricing and Ladder pricing promotion type
|
|
624
|
-
* @property {string} [apply_exclusive] - Promotion should apply on either
|
|
625
|
-
* article or cart.
|
|
626
|
-
* @property {string} [reason] - Promotion rejection reason added by reviewer
|
|
627
|
-
* @property {boolean} [is_processed] - Flag to verify if promotion is ready to
|
|
628
|
-
* be applied on cart and ready to update promotion
|
|
629
|
-
* @property {string} promo_group - The type of promotion group
|
|
630
|
-
* @property {string} mode - Promotion mode
|
|
631
|
-
* @property {boolean} [apply_all_discount] - True means to apply all discount offers
|
|
632
|
-
* @property {DisplayMeta1} [display_meta]
|
|
633
|
-
* @property {Ownership1} [ownership]
|
|
634
|
-
* @property {string} promotion_type - The Promotion type like amount, bogo and
|
|
635
|
-
* percentage etc.
|
|
636
|
-
* @property {DiscountRule[]} [discount_rules] - List of discount offers and
|
|
637
|
-
* their applicable conditions
|
|
470
|
+
* @property {boolean} [stackable]
|
|
471
|
+
* @property {string} [calculate_on] - Only available for Contract pricing and
|
|
472
|
+
* Ladder pricing promotion type
|
|
473
|
+
* @property {string} [apply_exclusive]
|
|
474
|
+
* @property {string} promo_group
|
|
475
|
+
* @property {string} mode
|
|
476
|
+
* @property {boolean} [apply_all_discount]
|
|
477
|
+
* @property {DisplayMeta1} display_meta
|
|
478
|
+
* @property {Ownership1} ownership
|
|
479
|
+
* @property {string} promotion_type
|
|
480
|
+
* @property {DiscountRule[]} discount_rules
|
|
638
481
|
* @property {Restrictions1} [restrictions]
|
|
639
|
-
* @property {string} [currency]
|
|
640
|
-
* @property {string} [code]
|
|
482
|
+
* @property {string} [currency]
|
|
483
|
+
* @property {string} [code]
|
|
641
484
|
* @property {PromotionSchedule} [_schedule]
|
|
642
485
|
* @property {PromotionAction} [post_order_action]
|
|
643
|
-
* @property {number} [apply_priority]
|
|
486
|
+
* @property {number} [apply_priority]
|
|
644
487
|
* @property {PromotionAuthor} [author]
|
|
645
488
|
* @property {Visibility} [visiblility]
|
|
646
|
-
* @property {string} application_id
|
|
647
|
-
* @property {
|
|
648
|
-
* @property {Object} [_custom_json]
|
|
489
|
+
* @property {string} application_id
|
|
490
|
+
* @property {Object} buy_rules
|
|
491
|
+
* @property {Object} [_custom_json]
|
|
649
492
|
* @property {PromotionDateMeta} [date_meta]
|
|
650
|
-
* @property {string[]} [tags]
|
|
493
|
+
* @property {string[]} [tags]
|
|
651
494
|
*/
|
|
652
495
|
|
|
653
496
|
/**
|
|
@@ -657,60 +500,56 @@ const Joi = require("joi");
|
|
|
657
500
|
*/
|
|
658
501
|
|
|
659
502
|
/**
|
|
660
|
-
* @typedef
|
|
661
|
-
* @property {string} [entity_slug]
|
|
662
|
-
*
|
|
663
|
-
* @property {string} [
|
|
664
|
-
* @property {string} [modified_on] - Coupon or promotion modification date
|
|
503
|
+
* @typedef ActivePromosResponse
|
|
504
|
+
* @property {string} [entity_slug]
|
|
505
|
+
* @property {string} [title] - Name of the promotion
|
|
506
|
+
* @property {string} [modified_on] - Coupon modification date
|
|
665
507
|
* @property {string} [example] - Discount offers examples
|
|
666
508
|
* @property {string} [entity_type] - Type of entity to be selected from :
|
|
667
509
|
* ['coupon', 'promotion']
|
|
668
|
-
* @property {string} [created_on] - Coupon
|
|
510
|
+
* @property {string} [created_on] - Coupon creation date
|
|
669
511
|
* @property {boolean} [is_hidden] - If the promo is active or not
|
|
670
|
-
* @property {string} [type] - Coupon
|
|
512
|
+
* @property {string} [type] - Coupon type
|
|
671
513
|
* @property {string} [subtitle] - Small description of the current offer
|
|
672
514
|
* @property {string} [description] - The description of the offer in the form of an HTML
|
|
673
515
|
*/
|
|
674
516
|
|
|
675
517
|
/**
|
|
676
518
|
* @typedef Charges
|
|
677
|
-
* @property {number} [charges]
|
|
678
|
-
* @property {number} [threshold]
|
|
679
|
-
* should be applied
|
|
519
|
+
* @property {number} [charges]
|
|
520
|
+
* @property {number} [threshold]
|
|
680
521
|
*/
|
|
681
522
|
|
|
682
523
|
/**
|
|
683
524
|
* @typedef DeliveryCharges
|
|
684
|
-
* @property {Charges[]} [charges]
|
|
685
|
-
* @property {boolean} [enabled]
|
|
525
|
+
* @property {Charges[]} [charges]
|
|
526
|
+
* @property {boolean} [enabled]
|
|
686
527
|
*/
|
|
687
528
|
|
|
688
529
|
/**
|
|
689
530
|
* @typedef CartMetaConfigUpdate
|
|
690
|
-
* @property {number} [min_cart_value]
|
|
691
|
-
* @property {number} [max_cart_value]
|
|
692
|
-
* @property {boolean} [bulk_coupons]
|
|
693
|
-
* @property {number} [max_cart_items]
|
|
694
|
-
* @property {string} [gift_display_text]
|
|
531
|
+
* @property {number} [min_cart_value]
|
|
532
|
+
* @property {number} [max_cart_value]
|
|
533
|
+
* @property {boolean} [bulk_coupons]
|
|
534
|
+
* @property {number} [max_cart_items]
|
|
535
|
+
* @property {string} [gift_display_text]
|
|
695
536
|
* @property {DeliveryCharges} [delivery_charges]
|
|
696
|
-
* @property {boolean} [revenue_engine_coupon]
|
|
697
|
-
*
|
|
698
|
-
* @property {
|
|
699
|
-
* @property {boolean} [enabled] - Enabled flag for cart configuration
|
|
537
|
+
* @property {boolean} [revenue_engine_coupon]
|
|
538
|
+
* @property {number} [gift_pricing]
|
|
539
|
+
* @property {boolean} [enabled]
|
|
700
540
|
*/
|
|
701
541
|
|
|
702
542
|
/**
|
|
703
543
|
* @typedef CartMetaConfigAdd
|
|
704
|
-
* @property {number} [min_cart_value]
|
|
705
|
-
* @property {number} [max_cart_value]
|
|
706
|
-
* @property {boolean} [bulk_coupons]
|
|
707
|
-
* @property {number} [max_cart_items]
|
|
708
|
-
* @property {string} [gift_display_text]
|
|
544
|
+
* @property {number} [min_cart_value]
|
|
545
|
+
* @property {number} [max_cart_value]
|
|
546
|
+
* @property {boolean} [bulk_coupons]
|
|
547
|
+
* @property {number} [max_cart_items]
|
|
548
|
+
* @property {string} [gift_display_text]
|
|
709
549
|
* @property {DeliveryCharges} [delivery_charges]
|
|
710
|
-
* @property {boolean} [revenue_engine_coupon]
|
|
711
|
-
*
|
|
712
|
-
* @property {
|
|
713
|
-
* @property {boolean} [enabled] - Enabled flag for cart configuration
|
|
550
|
+
* @property {boolean} [revenue_engine_coupon]
|
|
551
|
+
* @property {number} [gift_pricing]
|
|
552
|
+
* @property {boolean} [enabled]
|
|
714
553
|
*/
|
|
715
554
|
|
|
716
555
|
/**
|
|
@@ -718,10 +557,10 @@ const Joi = require("joi");
|
|
|
718
557
|
* @property {number} [value] - Value of price adjustment for article
|
|
719
558
|
* @property {string} [code] - Code to identify price adjustment on article
|
|
720
559
|
* @property {string} [type] - Type of price adjusment
|
|
721
|
-
* @property {string} article_id -
|
|
560
|
+
* @property {string} article_id - Id of article
|
|
722
561
|
* @property {number} [quantity] - Total quantity of the article to be
|
|
723
562
|
* considered (currently used only in discount type)
|
|
724
|
-
* @property {Object} [meta] - Meta
|
|
563
|
+
* @property {Object} [meta] - Meta related to article
|
|
725
564
|
*/
|
|
726
565
|
|
|
727
566
|
/**
|
|
@@ -732,14 +571,14 @@ const Joi = require("joi");
|
|
|
732
571
|
|
|
733
572
|
/**
|
|
734
573
|
* @typedef Collection
|
|
735
|
-
* @property {string} refund_by
|
|
736
|
-
* @property {string} collected_by
|
|
574
|
+
* @property {string} refund_by
|
|
575
|
+
* @property {string} collected_by
|
|
737
576
|
*/
|
|
738
577
|
|
|
739
578
|
/**
|
|
740
579
|
* @typedef PriceAdjustmentUpdate
|
|
741
580
|
* @property {string} [modified_by] - The entity that modified the field
|
|
742
|
-
* @property {number} value
|
|
581
|
+
* @property {number} value
|
|
743
582
|
* @property {string} message - The message associated with the price adjustment
|
|
744
583
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
745
584
|
* @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
|
|
@@ -748,51 +587,55 @@ const Joi = require("joi");
|
|
|
748
587
|
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
749
588
|
* distribution should is done at the article level
|
|
750
589
|
* @property {Collection} collection
|
|
751
|
-
* @property {string} type - Type of price adjusment
|
|
590
|
+
* @property {string} type - Type of price adjusment
|
|
752
591
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
753
592
|
* allowed (default: False)
|
|
754
593
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
755
594
|
* authenticated
|
|
756
595
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
757
|
-
* @property {
|
|
758
|
-
*
|
|
596
|
+
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
597
|
+
* type price adjustment.
|
|
598
|
+
* @property {Object} [meta]
|
|
599
|
+
* @property {string} cart_id - The ID of the cart
|
|
759
600
|
*/
|
|
760
601
|
|
|
761
602
|
/**
|
|
762
603
|
* @typedef PriceAdjustment
|
|
763
|
-
* @property {number} value
|
|
604
|
+
* @property {number} value
|
|
764
605
|
* @property {string} message - The message associated with the price adjustment
|
|
765
606
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
766
|
-
* @property {PriceAdjustmentRestrictions} [restrictions] - This field
|
|
767
|
-
* the restrictions
|
|
768
|
-
* return are
|
|
607
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
608
|
+
* the restrictions applied to this particular item or service, including
|
|
609
|
+
* whether or not cancellation and return are allowed, etc
|
|
769
610
|
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
770
611
|
* distribution should is done at the article level
|
|
771
|
-
* @property {string} [id]
|
|
612
|
+
* @property {string} [id]
|
|
772
613
|
* @property {Collection} collection
|
|
773
|
-
* @property {string} type - Type of price adjusment
|
|
614
|
+
* @property {string} type - Type of price adjusment
|
|
774
615
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
775
|
-
* allowed (default: False)
|
|
616
|
+
* allowed (default: False)
|
|
776
617
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
777
618
|
* authenticated
|
|
778
619
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
779
|
-
* @property {
|
|
780
|
-
*
|
|
620
|
+
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
621
|
+
* type price adjustment.
|
|
622
|
+
* @property {Object} [meta]
|
|
623
|
+
* @property {string} cart_id - The ID of the cart
|
|
781
624
|
*/
|
|
782
625
|
|
|
783
626
|
/**
|
|
784
|
-
* @typedef
|
|
627
|
+
* @typedef PriceAdjustmentResponse
|
|
785
628
|
* @property {PriceAdjustment} [data]
|
|
786
629
|
*/
|
|
787
630
|
|
|
788
631
|
/**
|
|
789
|
-
* @typedef
|
|
632
|
+
* @typedef GetPriceAdjustmentResponse
|
|
790
633
|
* @property {PriceAdjustment[]} [data]
|
|
791
634
|
*/
|
|
792
635
|
|
|
793
636
|
/**
|
|
794
637
|
* @typedef PriceAdjustmentAdd
|
|
795
|
-
* @property {number} value
|
|
638
|
+
* @property {number} value
|
|
796
639
|
* @property {string} message - The message associated with the price adjustment
|
|
797
640
|
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
798
641
|
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
@@ -808,110 +651,100 @@ const Joi = require("joi");
|
|
|
808
651
|
* @property {boolean} is_authenticated - Flag indicating whether the user is
|
|
809
652
|
* authenticated
|
|
810
653
|
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
811
|
-
* @property {Object} [meta]
|
|
812
|
-
* @property {string} cart_id -
|
|
654
|
+
* @property {Object} [meta]
|
|
655
|
+
* @property {string} cart_id - The ID of the cart
|
|
656
|
+
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
657
|
+
* type price adjustment.
|
|
813
658
|
*/
|
|
814
659
|
|
|
815
660
|
/**
|
|
816
661
|
* @typedef CartItem
|
|
817
|
-
* @property {number} [quantity]
|
|
818
|
-
* @property {string} product_id
|
|
819
|
-
* @property {string} size
|
|
662
|
+
* @property {number} [quantity]
|
|
663
|
+
* @property {string} product_id
|
|
664
|
+
* @property {string} size
|
|
820
665
|
*/
|
|
821
666
|
|
|
822
667
|
/**
|
|
823
|
-
* @typedef
|
|
824
|
-
* @property {CartItem[]} cart_items
|
|
668
|
+
* @typedef OpenapiCartDetailsRequest
|
|
669
|
+
* @property {CartItem[]} cart_items
|
|
825
670
|
*/
|
|
826
671
|
|
|
827
672
|
/**
|
|
828
673
|
* @typedef CouponBreakup
|
|
829
|
-
* @property {string} [title]
|
|
830
|
-
*
|
|
831
|
-
* @property {number} [
|
|
832
|
-
*
|
|
833
|
-
* @property {
|
|
834
|
-
* @property {
|
|
835
|
-
*
|
|
836
|
-
* @property {
|
|
837
|
-
* @property {string} [
|
|
838
|
-
* @property {string} [
|
|
839
|
-
*
|
|
840
|
-
* @property {
|
|
841
|
-
* @property {string} [
|
|
842
|
-
* @property {string} [type] - Type of the coupon applied to cart
|
|
843
|
-
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
844
|
-
* applied to cart
|
|
845
|
-
* @property {string} [message] - Coupon message of the coupon applied to cart
|
|
846
|
-
* @property {string} [description] - Coupon description of the coupon applied to cart.
|
|
674
|
+
* @property {string} [title]
|
|
675
|
+
* @property {number} [max_discount_value]
|
|
676
|
+
* @property {number} [value]
|
|
677
|
+
* @property {boolean} [is_applied]
|
|
678
|
+
* @property {string} [uid]
|
|
679
|
+
* @property {string} [coupon_type]
|
|
680
|
+
* @property {string} [sub_title]
|
|
681
|
+
* @property {number} [coupon_value]
|
|
682
|
+
* @property {string} [code]
|
|
683
|
+
* @property {string} [type]
|
|
684
|
+
* @property {number} [minimum_cart_value]
|
|
685
|
+
* @property {string} [message]
|
|
686
|
+
* @property {string} [description]
|
|
847
687
|
*/
|
|
848
688
|
|
|
849
689
|
/**
|
|
850
690
|
* @typedef DisplayBreakup
|
|
851
|
-
* @property {string} [key]
|
|
852
|
-
* @property {number} [value]
|
|
853
|
-
* @property {string} [currency_code]
|
|
854
|
-
* @property {string} [currency_symbol]
|
|
855
|
-
* @property {string} [display]
|
|
856
|
-
* @property {string[]} [message]
|
|
691
|
+
* @property {string} [key]
|
|
692
|
+
* @property {number} [value]
|
|
693
|
+
* @property {string} [currency_code]
|
|
694
|
+
* @property {string} [currency_symbol]
|
|
695
|
+
* @property {string} [display]
|
|
696
|
+
* @property {string[]} [message]
|
|
857
697
|
*/
|
|
858
698
|
|
|
859
699
|
/**
|
|
860
700
|
* @typedef LoyaltyPoints
|
|
861
|
-
* @property {boolean} [is_applied]
|
|
862
|
-
* @property {number} [total]
|
|
863
|
-
* @property {number} [applicable]
|
|
864
|
-
*
|
|
865
|
-
* @property {string} [description] - Description for loyalty points
|
|
701
|
+
* @property {boolean} [is_applied]
|
|
702
|
+
* @property {number} [total]
|
|
703
|
+
* @property {number} [applicable]
|
|
704
|
+
* @property {string} [description]
|
|
866
705
|
*/
|
|
867
706
|
|
|
868
707
|
/**
|
|
869
708
|
* @typedef RawBreakup
|
|
870
|
-
* @property {number} [coupon]
|
|
871
|
-
* @property {number} [gst_charges]
|
|
872
|
-
* @property {number} [mrp_total]
|
|
873
|
-
* @property {number} [fynd_cash]
|
|
874
|
-
* @property {number} [vog]
|
|
875
|
-
*
|
|
876
|
-
* @property {number} [
|
|
877
|
-
* @property {number} [
|
|
878
|
-
*
|
|
879
|
-
* @property {number} [
|
|
880
|
-
* @property {number} [
|
|
881
|
-
* @property {number} [
|
|
882
|
-
* @property {number} [
|
|
883
|
-
* places the order
|
|
884
|
-
* @property {number} [subtotal] - Selling price amount of all products in cart
|
|
885
|
-
* @property {number} [convenience_fee] - Convenience fee amount applied to cart
|
|
709
|
+
* @property {number} [coupon]
|
|
710
|
+
* @property {number} [gst_charges]
|
|
711
|
+
* @property {number} [mrp_total]
|
|
712
|
+
* @property {number} [fynd_cash]
|
|
713
|
+
* @property {number} [vog]
|
|
714
|
+
* @property {number} [gift_card]
|
|
715
|
+
* @property {number} [cod_charge]
|
|
716
|
+
* @property {number} [total]
|
|
717
|
+
* @property {number} [discount]
|
|
718
|
+
* @property {number} [delivery_charge]
|
|
719
|
+
* @property {number} [you_saved]
|
|
720
|
+
* @property {number} [subtotal]
|
|
721
|
+
* @property {number} [convenience_fee]
|
|
886
722
|
*/
|
|
887
723
|
|
|
888
724
|
/**
|
|
889
725
|
* @typedef CartBreakup
|
|
890
726
|
* @property {CouponBreakup} [coupon]
|
|
891
|
-
* @property {DisplayBreakup[]} [display]
|
|
892
|
-
* to display the breakup to the customer like MRP total, Discount, Sub total,
|
|
893
|
-
* coupon value, promotion value and final total
|
|
727
|
+
* @property {DisplayBreakup[]} [display]
|
|
894
728
|
* @property {LoyaltyPoints} [loyalty_points]
|
|
895
729
|
* @property {RawBreakup} [raw]
|
|
896
730
|
*/
|
|
897
731
|
|
|
898
732
|
/**
|
|
899
733
|
* @typedef ProductImage
|
|
900
|
-
* @property {string} [secure_url]
|
|
901
|
-
* @property {string} [url]
|
|
902
|
-
* @property {string} [aspect_ratio]
|
|
734
|
+
* @property {string} [secure_url]
|
|
735
|
+
* @property {string} [url]
|
|
736
|
+
* @property {string} [aspect_ratio]
|
|
903
737
|
*/
|
|
904
738
|
|
|
905
739
|
/**
|
|
906
740
|
* @typedef Tags
|
|
907
|
-
* @property {Object} [tags]
|
|
908
|
-
* product in cart
|
|
741
|
+
* @property {Object} [tags]
|
|
909
742
|
*/
|
|
910
743
|
|
|
911
744
|
/**
|
|
912
745
|
* @typedef BaseInfo
|
|
913
|
-
* @property {number} [uid]
|
|
914
|
-
* @property {string} [name]
|
|
746
|
+
* @property {number} [uid]
|
|
747
|
+
* @property {string} [name]
|
|
915
748
|
*/
|
|
916
749
|
|
|
917
750
|
/**
|
|
@@ -919,62 +752,43 @@ const Joi = require("joi");
|
|
|
919
752
|
* @property {string[]} [product_slug] - Contains list of product slug
|
|
920
753
|
*/
|
|
921
754
|
|
|
922
|
-
/**
|
|
923
|
-
* @typedef ProductActionParams
|
|
924
|
-
* @property {string[]} [slug] - Unique product url name generated via product
|
|
925
|
-
* name and other meta data.
|
|
926
|
-
*/
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* @typedef ProductActionPage
|
|
930
|
-
* @property {string} [type] - Entity of page to be redirected on click
|
|
931
|
-
* @property {ProductActionParams} [params]
|
|
932
|
-
*/
|
|
933
|
-
|
|
934
755
|
/**
|
|
935
756
|
* @typedef ProductAction
|
|
936
|
-
* @property {string} [type]
|
|
937
|
-
* @property {string} [url]
|
|
757
|
+
* @property {string} [type]
|
|
758
|
+
* @property {string} [url]
|
|
938
759
|
* @property {ActionQuery} [query]
|
|
939
|
-
* @property {ProductActionPage} [page]
|
|
940
760
|
*/
|
|
941
761
|
|
|
942
762
|
/**
|
|
943
763
|
* @typedef CategoryInfo
|
|
944
|
-
* @property {number} [uid] -
|
|
945
|
-
* @property {string} [name]
|
|
764
|
+
* @property {number} [uid] - Product Category Id
|
|
765
|
+
* @property {string} [name]
|
|
946
766
|
*/
|
|
947
767
|
|
|
948
768
|
/**
|
|
949
769
|
* @typedef CartProduct
|
|
950
770
|
* @property {string} [slug] - Unique product url name generated via product
|
|
951
771
|
* name and other meta data
|
|
952
|
-
* @property {ProductImage[]} [images]
|
|
953
|
-
* like secure url, aspect ration url and url
|
|
772
|
+
* @property {ProductImage[]} [images]
|
|
954
773
|
* @property {Tags} [teaser_tag]
|
|
955
774
|
* @property {BaseInfo} [brand]
|
|
956
775
|
* @property {ProductAction} [action]
|
|
957
|
-
* @property {number} [uid]
|
|
958
|
-
* @property {string[]} [tags]
|
|
959
|
-
*
|
|
960
|
-
* @property {
|
|
961
|
-
* @property {string} [
|
|
962
|
-
* @property {string} [
|
|
963
|
-
*
|
|
964
|
-
* @property {
|
|
965
|
-
* product on platform
|
|
966
|
-
* @property {CategoryInfo[]} [categories] - Product category information which
|
|
967
|
-
* incldes category name and category id
|
|
968
|
-
* @property {Object} [attributes] - Product attributes defined on platform
|
|
776
|
+
* @property {number} [uid]
|
|
777
|
+
* @property {string[]} [tags]
|
|
778
|
+
* @property {Object} [_custom_json]
|
|
779
|
+
* @property {string} [type]
|
|
780
|
+
* @property {string} [name]
|
|
781
|
+
* @property {string} [item_code]
|
|
782
|
+
* @property {CategoryInfo[]} [categories]
|
|
783
|
+
* @property {Object} [attributes]
|
|
969
784
|
*/
|
|
970
785
|
|
|
971
786
|
/**
|
|
972
787
|
* @typedef BasePrice
|
|
973
|
-
* @property {number} [effective]
|
|
974
|
-
*
|
|
975
|
-
* @property {string} [
|
|
976
|
-
* @property {
|
|
977
|
-
* @property {number} [marked] - Original price of product
|
|
788
|
+
* @property {number} [effective]
|
|
789
|
+
* @property {string} [currency_code]
|
|
790
|
+
* @property {string} [currency_symbol]
|
|
791
|
+
* @property {number} [marked]
|
|
978
792
|
*/
|
|
979
793
|
|
|
980
794
|
/**
|
|
@@ -985,54 +799,43 @@ const Joi = require("joi");
|
|
|
985
799
|
|
|
986
800
|
/**
|
|
987
801
|
* @typedef StoreInfo
|
|
988
|
-
* @property {number} [uid]
|
|
989
|
-
*
|
|
990
|
-
* @property {string} [
|
|
991
|
-
* @property {string} [store_code] - A unique code or identifier for the store,
|
|
992
|
-
* often used for internal reference
|
|
802
|
+
* @property {number} [uid]
|
|
803
|
+
* @property {string} [name]
|
|
804
|
+
* @property {string} [store_code]
|
|
993
805
|
*/
|
|
994
806
|
|
|
995
807
|
/**
|
|
996
808
|
* @typedef ProductArticle
|
|
997
|
-
* @property {string} [seller_identifier]
|
|
998
|
-
*
|
|
999
|
-
* @property {number} [quantity] - Quantity of the article added in cart
|
|
809
|
+
* @property {string} [seller_identifier]
|
|
810
|
+
* @property {number} [quantity]
|
|
1000
811
|
* @property {BaseInfo} [seller]
|
|
1001
|
-
* @property {Object} [cart_item_meta]
|
|
1002
|
-
* @property {Object} [parent_item_identifiers]
|
|
1003
|
-
*
|
|
1004
|
-
* @property {
|
|
1005
|
-
*
|
|
1006
|
-
* @property {string} [
|
|
1007
|
-
*
|
|
1008
|
-
* @property {
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
* @property {
|
|
1012
|
-
* for the product grouping.
|
|
1013
|
-
* @property {Object} [identifier] - Unique identifier of the article
|
|
1014
|
-
* @property {number} [mto_quantity] - Quantity of the product which will
|
|
1015
|
-
* specially manufactured as not available in stock
|
|
1016
|
-
* @property {Object} [extra_meta] - Field to update extra meta of the article in cart
|
|
1017
|
-
* @property {string} [type] - Type of the data sent in response. Possible value
|
|
1018
|
-
* is article
|
|
1019
|
-
* @property {Object} [_custom_json] - Field to update custom json of the article in cart
|
|
812
|
+
* @property {Object} [cart_item_meta]
|
|
813
|
+
* @property {Object} [parent_item_identifiers]
|
|
814
|
+
* @property {boolean} [is_gift_visible]
|
|
815
|
+
* @property {string} [uid]
|
|
816
|
+
* @property {Object} [gift_card]
|
|
817
|
+
* @property {string[]} [product_group_tags]
|
|
818
|
+
* @property {Object} [identifier]
|
|
819
|
+
* @property {number} [mto_quantity]
|
|
820
|
+
* @property {Object} [extra_meta]
|
|
821
|
+
* @property {string} [type]
|
|
822
|
+
* @property {Object} [_custom_json]
|
|
1020
823
|
* @property {ArticlePriceInfo} [price]
|
|
1021
|
-
* @property {Object} [meta]
|
|
1022
|
-
* @property {string} [size]
|
|
824
|
+
* @property {Object} [meta]
|
|
825
|
+
* @property {string} [size]
|
|
1023
826
|
* @property {StoreInfo} [store]
|
|
1024
827
|
* @property {string[]} [tags] - A list of article tags
|
|
1025
828
|
*/
|
|
1026
829
|
|
|
1027
830
|
/**
|
|
1028
831
|
* @typedef Ownership2
|
|
1029
|
-
* @property {string} [payable_category] -
|
|
1030
|
-
* @property {string} [payable_by] -
|
|
832
|
+
* @property {string} [payable_category] - Promo amount payable category
|
|
833
|
+
* @property {string} [payable_by] - Promo amount bearable party
|
|
1031
834
|
*/
|
|
1032
835
|
|
|
1033
836
|
/**
|
|
1034
837
|
* @typedef DiscountRulesApp
|
|
1035
|
-
* @property {Object} [offer] - Offer
|
|
838
|
+
* @property {Object} [offer] - Offer for promotion
|
|
1036
839
|
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
1037
840
|
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
1038
841
|
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
@@ -1041,10 +844,9 @@ const Joi = require("joi");
|
|
|
1041
844
|
/**
|
|
1042
845
|
* @typedef AppliedFreeArticles
|
|
1043
846
|
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
1044
|
-
* @property {number} [quantity] - Free article quantity
|
|
1045
|
-
* @property {string} [article_id] -
|
|
847
|
+
* @property {number} [quantity] - Free article quantity
|
|
848
|
+
* @property {string} [article_id] - Free article id
|
|
1046
849
|
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
|
|
1047
|
-
* in promotion
|
|
1048
850
|
*/
|
|
1049
851
|
|
|
1050
852
|
/**
|
|
@@ -1066,19 +868,21 @@ const Joi = require("joi");
|
|
|
1066
868
|
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
1067
869
|
* @property {string} [offer_text] - Offer text of current promotion
|
|
1068
870
|
* @property {number} [amount] - Per unit discount amount applied with current promotion
|
|
871
|
+
* @property {string} [float_amount] - Per unit discount amount with decimal
|
|
872
|
+
* values applied with current promotion.
|
|
1069
873
|
* @property {string} [promotion_type] - Promotion type of current promotion
|
|
1070
874
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
1071
875
|
* product MRP or ESP
|
|
1072
876
|
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
1073
|
-
* @property {string} [promo_id] - Promotion
|
|
877
|
+
* @property {string} [promo_id] - Promotion id
|
|
1074
878
|
* @property {Object} [meta] - Meta object for extra data
|
|
1075
|
-
* @property {string} [code] - Promotion
|
|
879
|
+
* @property {string} [code] - Promotion code
|
|
1076
880
|
*/
|
|
1077
881
|
|
|
1078
882
|
/**
|
|
1079
883
|
* @typedef PromiseFormatted
|
|
1080
|
-
* @property {string} [max]
|
|
1081
|
-
* @property {string} [min]
|
|
884
|
+
* @property {string} [max]
|
|
885
|
+
* @property {string} [min]
|
|
1082
886
|
*/
|
|
1083
887
|
|
|
1084
888
|
/**
|
|
@@ -1089,8 +893,8 @@ const Joi = require("joi");
|
|
|
1089
893
|
|
|
1090
894
|
/**
|
|
1091
895
|
* @typedef PromiseTimestamp
|
|
1092
|
-
* @property {number} [max]
|
|
1093
|
-
* @property {number} [min]
|
|
896
|
+
* @property {number} [max]
|
|
897
|
+
* @property {number} [min]
|
|
1094
898
|
*/
|
|
1095
899
|
|
|
1096
900
|
/**
|
|
@@ -1102,23 +906,19 @@ const Joi = require("joi");
|
|
|
1102
906
|
|
|
1103
907
|
/**
|
|
1104
908
|
* @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
|
|
909
|
+
* @property {number} [discount_total_quantity]
|
|
910
|
+
* @property {number} [discount_single_quantity]
|
|
911
|
+
* @property {string} [code]
|
|
1110
912
|
*/
|
|
1111
913
|
|
|
1112
914
|
/**
|
|
1113
915
|
* @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
|
|
916
|
+
* @property {number} [marked]
|
|
917
|
+
* @property {number} [add_on]
|
|
918
|
+
* @property {string} [currency_code]
|
|
919
|
+
* @property {string} [currency_symbol]
|
|
920
|
+
* @property {number} [effective]
|
|
921
|
+
* @property {number} [selling]
|
|
1122
922
|
*/
|
|
1123
923
|
|
|
1124
924
|
/**
|
|
@@ -1134,259 +934,226 @@ const Joi = require("joi");
|
|
|
1134
934
|
|
|
1135
935
|
/**
|
|
1136
936
|
* @typedef ProductAvailabilitySize
|
|
1137
|
-
* @property {string} [display]
|
|
1138
|
-
* @property {string} [value]
|
|
1139
|
-
* @property {boolean} [is_available]
|
|
1140
|
-
* product if that is available
|
|
937
|
+
* @property {string} [display]
|
|
938
|
+
* @property {string} [value]
|
|
939
|
+
* @property {boolean} [is_available]
|
|
1141
940
|
*/
|
|
1142
941
|
|
|
1143
942
|
/**
|
|
1144
943
|
* @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
|
|
944
|
+
* @property {boolean} [is_valid]
|
|
945
|
+
* @property {number} [other_store_quantity]
|
|
946
|
+
* @property {boolean} [deliverable]
|
|
947
|
+
* @property {ProductAvailabilitySize[]} [available_sizes]
|
|
948
|
+
* @property {boolean} [out_of_stock]
|
|
949
|
+
* @property {string[]} [sizes]
|
|
1154
950
|
*/
|
|
1155
951
|
|
|
1156
952
|
/**
|
|
1157
953
|
* @typedef PromoMeta
|
|
1158
|
-
* @property {string} [message]
|
|
1159
|
-
* loyalty points and applied and how much left with the user
|
|
954
|
+
* @property {string} [message]
|
|
1160
955
|
*/
|
|
1161
956
|
|
|
1162
957
|
/**
|
|
1163
958
|
* @typedef CartProductInfo
|
|
1164
|
-
* @property {number} [quantity]
|
|
959
|
+
* @property {number} [quantity]
|
|
1165
960
|
* @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
|
|
961
|
+
* @property {string} [product_ean_id]
|
|
962
|
+
* @property {Object} [parent_item_identifiers]
|
|
963
|
+
* @property {boolean} [is_set]
|
|
1171
964
|
* @property {ProductArticle} [article]
|
|
1172
|
-
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1173
|
-
* promotion for the product in cart
|
|
965
|
+
* @property {AppliedPromotion[]} [promotions_applied]
|
|
1174
966
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1175
|
-
* @property {string} [key]
|
|
967
|
+
* @property {string} [key]
|
|
1176
968
|
* @property {CouponDetails} [coupon]
|
|
1177
|
-
* @property {Object} [bulk_offer]
|
|
1178
|
-
* which denotes if any bulk offer is applied to the product in cart
|
|
969
|
+
* @property {Object} [bulk_offer]
|
|
1179
970
|
* @property {ProductPriceInfo} [price]
|
|
1180
|
-
* @property {string} [coupon_message]
|
|
1181
|
-
* coupon is applied and empty if not applied
|
|
971
|
+
* @property {string} [coupon_message]
|
|
1182
972
|
* @property {CartProductIdentifer} identifiers
|
|
1183
|
-
* @property {string} [message]
|
|
1184
|
-
*
|
|
1185
|
-
* @property {string} [discount] - Discount amount of the product in cart
|
|
973
|
+
* @property {string} [message]
|
|
974
|
+
* @property {string} [discount]
|
|
1186
975
|
* @property {ProductAvailability} [availability]
|
|
1187
|
-
* @property {Object} [moq]
|
|
1188
|
-
* of a product, e.g. 100.
|
|
976
|
+
* @property {Object} [moq]
|
|
1189
977
|
* @property {ProductPriceInfo} [price_per_unit]
|
|
1190
978
|
* @property {PromoMeta} [promo_meta]
|
|
1191
|
-
* @property {Object} [custom_order]
|
|
979
|
+
* @property {Object} [custom_order]
|
|
1192
980
|
*/
|
|
1193
981
|
|
|
1194
982
|
/**
|
|
1195
|
-
* @typedef
|
|
1196
|
-
* @property {boolean} [is_valid]
|
|
1197
|
-
*
|
|
1198
|
-
* @property {string} [message] - Message of the cart Open API cart detail response
|
|
983
|
+
* @typedef OpenapiCartDetailsResponse
|
|
984
|
+
* @property {boolean} [is_valid]
|
|
985
|
+
* @property {string} [message]
|
|
1199
986
|
* @property {CartBreakup} [breakup_values]
|
|
1200
|
-
* @property {CartProductInfo[]} [items]
|
|
987
|
+
* @property {CartProductInfo[]} [items]
|
|
1201
988
|
*/
|
|
1202
989
|
|
|
1203
990
|
/**
|
|
1204
|
-
* @typedef
|
|
1205
|
-
* @property {boolean} [success]
|
|
1206
|
-
* @property {string} [message]
|
|
991
|
+
* @typedef OpenApiErrorResponse
|
|
992
|
+
* @property {boolean} [success]
|
|
993
|
+
* @property {string} [message]
|
|
1207
994
|
* @property {Object} [errors] - Contains field name which has error as key and
|
|
1208
995
|
* error message as value
|
|
1209
996
|
*/
|
|
1210
997
|
|
|
1211
998
|
/**
|
|
1212
999
|
* @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
|
|
1000
|
+
* @property {string} [country]
|
|
1001
|
+
* @property {string} [state]
|
|
1002
|
+
* @property {string} [city]
|
|
1003
|
+
* @property {number} [phone]
|
|
1004
|
+
* @property {string} area_code
|
|
1005
|
+
* @property {string} [country_iso_code]
|
|
1006
|
+
* @property {string} [country_phone_code]
|
|
1007
|
+
* @property {Object} [meta]
|
|
1008
|
+
* @property {string} [address_type]
|
|
1009
|
+
* @property {string} [area]
|
|
1010
|
+
* @property {string} [area_code_slug]
|
|
1011
|
+
* @property {string} [name]
|
|
1012
|
+
* @property {string} [landmark]
|
|
1013
|
+
* @property {string} [email]
|
|
1014
|
+
* @property {string} [country_code]
|
|
1015
|
+
* @property {number} [pincode]
|
|
1016
|
+
* @property {string} [address]
|
|
1017
|
+
*/
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* @typedef OpenApiCartServiceabilityRequest
|
|
1021
|
+
* @property {CartItem[]} cart_items
|
|
1236
1022
|
* @property {ShippingAddress} shipping_address
|
|
1237
1023
|
*/
|
|
1238
1024
|
|
|
1239
1025
|
/**
|
|
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
|
|
1026
|
+
* @typedef OpenApiCartServiceabilityResponse
|
|
1027
|
+
* @property {boolean} [is_valid]
|
|
1028
|
+
* @property {CartProductInfo[]} [items]
|
|
1246
1029
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1247
|
-
* @property {string} [message]
|
|
1030
|
+
* @property {string} [message]
|
|
1248
1031
|
* @property {CartBreakup} [breakup_values]
|
|
1249
1032
|
*/
|
|
1250
1033
|
|
|
1251
1034
|
/**
|
|
1252
1035
|
* @typedef OpenApiFiles
|
|
1253
|
-
* @property {string} key
|
|
1254
|
-
* @property {string[]} values
|
|
1036
|
+
* @property {string} key
|
|
1037
|
+
* @property {string[]} values
|
|
1255
1038
|
*/
|
|
1256
1039
|
|
|
1257
1040
|
/**
|
|
1258
1041
|
* @typedef CartItemMeta
|
|
1259
|
-
* @property {boolean} [primary_item]
|
|
1260
|
-
* @property {string} [group_id]
|
|
1042
|
+
* @property {boolean} [primary_item]
|
|
1043
|
+
* @property {string} [group_id]
|
|
1261
1044
|
*/
|
|
1262
1045
|
|
|
1263
1046
|
/**
|
|
1264
1047
|
* @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
|
|
1048
|
+
* @property {string} [payment_id]
|
|
1049
|
+
* @property {string} [payment_gateway]
|
|
1050
|
+
* @property {Object} [extra_meta]
|
|
1051
|
+
* @property {string} [current_status]
|
|
1052
|
+
* @property {string} [order_id]
|
|
1271
1053
|
*/
|
|
1272
1054
|
|
|
1273
1055
|
/**
|
|
1274
1056
|
* @typedef MultiTenderPaymentMethod
|
|
1275
|
-
* @property {string} mode
|
|
1276
|
-
* @property {number} amount -
|
|
1057
|
+
* @property {string} mode
|
|
1058
|
+
* @property {number} amount - Payment amount
|
|
1277
1059
|
* @property {MultiTenderPaymentMeta} [meta]
|
|
1278
|
-
* @property {string} [name] -
|
|
1060
|
+
* @property {string} [name] - Payment mode name
|
|
1279
1061
|
*/
|
|
1280
1062
|
|
|
1281
1063
|
/**
|
|
1282
1064
|
* @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
|
|
1065
|
+
* @property {number} cashback_applied
|
|
1066
|
+
* @property {number} [quantity]
|
|
1067
|
+
* @property {string} size
|
|
1068
|
+
* @property {number} coupon_effective_discount
|
|
1069
|
+
* @property {number} amount_paid
|
|
1070
|
+
* @property {number} delivery_charges
|
|
1071
|
+
* @property {number} price_marked
|
|
1072
|
+
* @property {OpenApiFiles[]} [files]
|
|
1292
1073
|
* @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
|
|
1074
|
+
* @property {Object} [extra_meta]
|
|
1075
|
+
* @property {number} product_id
|
|
1076
|
+
* @property {number} [loyalty_discount]
|
|
1077
|
+
* @property {number} discount
|
|
1078
|
+
* @property {number} price_effective
|
|
1079
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1080
|
+
* @property {number} [employee_discount]
|
|
1081
|
+
* @property {number} cod_charges
|
|
1304
1082
|
*/
|
|
1305
1083
|
|
|
1306
1084
|
/**
|
|
1307
1085
|
* @typedef OpenApiPlatformCheckoutReq
|
|
1308
|
-
* @property {string} [payment_mode]
|
|
1309
|
-
*
|
|
1310
|
-
* @property {
|
|
1311
|
-
* @property {OpenApiOrderItem[]} cart_items - List of items in user cart
|
|
1086
|
+
* @property {string} [payment_mode]
|
|
1087
|
+
* @property {number} cart_value
|
|
1088
|
+
* @property {OpenApiOrderItem[]} cart_items
|
|
1312
1089
|
* @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
|
|
1090
|
+
* @property {number} [loyalty_discount]
|
|
1091
|
+
* @property {string} [comment]
|
|
1092
|
+
* @property {MultiTenderPaymentMethod[]} payment_methods
|
|
1093
|
+
* @property {Object} [employee_discount]
|
|
1094
|
+
* @property {string} [coupon]
|
|
1095
|
+
* @property {number} cashback_applied
|
|
1096
|
+
* @property {string} [gstin]
|
|
1321
1097
|
* @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
|
|
1098
|
+
* @property {string} coupon_code
|
|
1099
|
+
* @property {number} coupon_value
|
|
1100
|
+
* @property {number} delivery_charges
|
|
1101
|
+
* @property {string} [affiliate_order_id]
|
|
1102
|
+
* @property {string} [currency_code]
|
|
1103
|
+
* @property {string} [order_id]
|
|
1104
|
+
* @property {OpenApiFiles[]} [files]
|
|
1105
|
+
* @property {number} cod_charges
|
|
1331
1106
|
*/
|
|
1332
1107
|
|
|
1333
1108
|
/**
|
|
1334
|
-
* @typedef
|
|
1335
|
-
* @property {boolean} [success]
|
|
1336
|
-
* @property {string} [message]
|
|
1109
|
+
* @typedef OpenApiCheckoutResponse
|
|
1110
|
+
* @property {boolean} [success]
|
|
1111
|
+
* @property {string} [message]
|
|
1337
1112
|
* @property {string} [order_ref_id] - Order id sent in request
|
|
1338
1113
|
* @property {string} order_id - Fynd order id
|
|
1339
1114
|
*/
|
|
1340
1115
|
|
|
1341
1116
|
/**
|
|
1342
1117
|
* @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
|
|
1118
|
+
* @property {string} expire_at
|
|
1119
|
+
* @property {Object} [promotion]
|
|
1120
|
+
* @property {boolean} is_default
|
|
1121
|
+
* @property {string} [comment]
|
|
1122
|
+
* @property {Object[]} articles
|
|
1123
|
+
* @property {Object} [coupon]
|
|
1124
|
+
* @property {number} [bulk_coupon_discount]
|
|
1125
|
+
* @property {string} _id
|
|
1126
|
+
* @property {Object} [fynd_credits]
|
|
1127
|
+
* @property {number[]} [fc_index_map]
|
|
1128
|
+
* @property {string} [order_id]
|
|
1129
|
+
* @property {number} [discount]
|
|
1130
|
+
* @property {Object} [cod_charges]
|
|
1131
|
+
* @property {Object} [payments]
|
|
1132
|
+
* @property {string} [payment_mode]
|
|
1133
|
+
* @property {Object[]} [shipments]
|
|
1134
|
+
* @property {Object} [pick_up_customer_details]
|
|
1135
|
+
* @property {number} uid
|
|
1136
|
+
* @property {string} [checkout_mode]
|
|
1137
|
+
* @property {number} [cart_value]
|
|
1138
|
+
* @property {boolean} [is_archive]
|
|
1139
|
+
* @property {string} created_on
|
|
1140
|
+
* @property {string} last_modified
|
|
1141
|
+
* @property {Object} [meta]
|
|
1142
|
+
* @property {boolean} [buy_now]
|
|
1143
|
+
* @property {boolean} [is_active]
|
|
1144
|
+
* @property {Object} cashback
|
|
1145
|
+
* @property {Object[]} [payment_methods]
|
|
1146
|
+
* @property {string} [gstin]
|
|
1147
|
+
* @property {Object} [delivery_charges]
|
|
1148
|
+
* @property {boolean} [merge_qty]
|
|
1149
|
+
* @property {string} user_id
|
|
1150
|
+
* @property {string} [app_id]
|
|
1151
|
+
*/
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* @typedef AbandonedCartResponse
|
|
1155
|
+
* @property {AbandonedCart[]} [items]
|
|
1156
|
+
* @property {Object} [result]
|
|
1390
1157
|
* @property {Page} [page]
|
|
1391
1158
|
* @property {boolean} [success] - The request success is defined
|
|
1392
1159
|
* @property {string} [message] - Message of the response
|
|
@@ -1394,54 +1161,47 @@ const Joi = require("joi");
|
|
|
1394
1161
|
|
|
1395
1162
|
/**
|
|
1396
1163
|
* @typedef PaymentSelectionLock
|
|
1397
|
-
* @property {string} [payment_identifier]
|
|
1398
|
-
* @property {string} [default_options]
|
|
1399
|
-
* @property {boolean} [enabled]
|
|
1164
|
+
* @property {string} [payment_identifier]
|
|
1165
|
+
* @property {string} [default_options]
|
|
1166
|
+
* @property {boolean} [enabled]
|
|
1400
1167
|
*/
|
|
1401
1168
|
|
|
1402
1169
|
/**
|
|
1403
1170
|
* @typedef CartCurrency
|
|
1404
1171
|
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
1405
|
-
* @property {string} [symbol]
|
|
1172
|
+
* @property {string} [symbol]
|
|
1406
1173
|
*/
|
|
1407
1174
|
|
|
1408
1175
|
/**
|
|
1409
1176
|
* @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
|
|
1177
|
+
* @property {number} [cashback_amount]
|
|
1178
|
+
* @property {string} [cashback_message_primary]
|
|
1179
|
+
* @property {string} [cashback_message_secondary]
|
|
1180
|
+
* @property {string} [coupon_code]
|
|
1181
|
+
* @property {string} [coupon_description]
|
|
1182
|
+
* @property {string} [coupon_id]
|
|
1183
|
+
* @property {string} [coupon_subtitle]
|
|
1184
|
+
* @property {string} [coupon_title]
|
|
1185
|
+
* @property {string} [coupon_type]
|
|
1186
|
+
* @property {number} [coupon_value]
|
|
1187
|
+
* @property {number} [discount]
|
|
1188
|
+
* @property {boolean} [is_applied]
|
|
1189
|
+
* @property {boolean} [is_valid]
|
|
1190
|
+
* @property {number} [maximum_discount_value]
|
|
1191
|
+
* @property {string} [message]
|
|
1192
|
+
* @property {number} [minimum_cart_value]
|
|
1432
1193
|
*/
|
|
1433
1194
|
|
|
1434
1195
|
/**
|
|
1435
1196
|
* @typedef ChargesThreshold
|
|
1436
|
-
* @property {number} [charges]
|
|
1437
|
-
* @property {number} [threshold]
|
|
1438
|
-
* should be applied
|
|
1197
|
+
* @property {number} [charges]
|
|
1198
|
+
* @property {number} [threshold]
|
|
1439
1199
|
*/
|
|
1440
1200
|
|
|
1441
1201
|
/**
|
|
1442
1202
|
* @typedef DeliveryChargesConfig
|
|
1443
|
-
* @property {boolean} [enabled]
|
|
1444
|
-
* @property {ChargesThreshold[]} [charges]
|
|
1203
|
+
* @property {boolean} [enabled]
|
|
1204
|
+
* @property {ChargesThreshold[]} [charges]
|
|
1445
1205
|
*/
|
|
1446
1206
|
|
|
1447
1207
|
/**
|
|
@@ -1450,734 +1210,546 @@ const Joi = require("joi");
|
|
|
1450
1210
|
*/
|
|
1451
1211
|
|
|
1452
1212
|
/**
|
|
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
|
|
1213
|
+
* @typedef CartDetailResponse
|
|
1214
|
+
* @property {number} [cart_id]
|
|
1215
|
+
* @property {string} [uid]
|
|
1216
|
+
* @property {string} [coupon_text]
|
|
1217
|
+
* @property {string} [id]
|
|
1218
|
+
* @property {Object} [pan_config]
|
|
1460
1219
|
* @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
|
|
1220
|
+
* @property {string} [comment]
|
|
1221
|
+
* @property {CartProductInfo[]} [items]
|
|
1465
1222
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
1466
|
-
* @property {string} [delivery_charge_info]
|
|
1467
|
-
* message on shipment
|
|
1223
|
+
* @property {string} [delivery_charge_info]
|
|
1468
1224
|
* @property {CartCommonConfig} [common_config]
|
|
1469
1225
|
* @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
|
|
1226
|
+
* @property {boolean} [restrict_checkout]
|
|
1227
|
+
* @property {string} [message]
|
|
1228
|
+
* @property {Object} [notification]
|
|
1229
|
+
* @property {string} [staff_user_id]
|
|
1230
|
+
* @property {boolean} [success]
|
|
1478
1231
|
* @property {CartBreakup} [breakup_values]
|
|
1479
|
-
* @property {boolean} [is_valid]
|
|
1480
|
-
* response is valid or not
|
|
1232
|
+
* @property {boolean} [is_valid]
|
|
1481
1233
|
* @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
|
|
1234
|
+
* @property {string} [checkout_mode]
|
|
1235
|
+
* @property {string} [last_modified]
|
|
1236
|
+
* @property {boolean} [buy_now]
|
|
1237
|
+
* @property {string} [gstin]
|
|
1238
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1239
|
+
* @property {string} [pan_no]
|
|
1240
|
+
* @property {Object} [custom_cart_meta]
|
|
1493
1241
|
*/
|
|
1494
1242
|
|
|
1495
1243
|
/**
|
|
1496
1244
|
* @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
|
|
1245
|
+
* @property {number} [quantity]
|
|
1246
|
+
* @property {string} [item_size]
|
|
1247
|
+
* @property {number} [seller_id]
|
|
1248
|
+
* @property {Object[]} [parent_item_identifiers]
|
|
1249
|
+
* @property {string[]} [product_group_tags]
|
|
1250
|
+
* @property {string} [article_id]
|
|
1251
|
+
* @property {Object} [article_assignment]
|
|
1252
|
+
* @property {number} [store_id]
|
|
1253
|
+
* @property {string} [display]
|
|
1254
|
+
* @property {number} [item_id]
|
|
1255
|
+
* @property {Object} [extra_meta]
|
|
1256
|
+
* @property {Object} [_custom_json]
|
|
1257
|
+
* @property {Object} [meta]
|
|
1258
|
+
* @property {boolean} [pos]
|
|
1520
1259
|
* @property {string} [seller_identifier] - Add items using seller identifier for store os
|
|
1521
1260
|
*/
|
|
1522
1261
|
|
|
1523
1262
|
/**
|
|
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
|
|
1263
|
+
* @typedef AddCartRequest
|
|
1264
|
+
* @property {boolean} [new_cart]
|
|
1265
|
+
* @property {AddProductCart[]} [items]
|
|
1529
1266
|
*/
|
|
1530
1267
|
|
|
1531
1268
|
/**
|
|
1532
|
-
* @typedef
|
|
1269
|
+
* @typedef AddCartDetailResponse
|
|
1533
1270
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1534
1271
|
* False if partially added or not added.
|
|
1535
|
-
* @property {
|
|
1272
|
+
* @property {CartDetailResponse} [cart]
|
|
1536
1273
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
1537
1274
|
* added. True if only few are added.
|
|
1538
|
-
* @property {string} [message]
|
|
1275
|
+
* @property {string} [message]
|
|
1539
1276
|
*/
|
|
1540
1277
|
|
|
1541
1278
|
/**
|
|
1542
1279
|
* @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
|
|
1280
|
+
* @property {number} [quantity]
|
|
1281
|
+
* @property {string} [item_size]
|
|
1282
|
+
* @property {Object} [parent_item_identifiers]
|
|
1283
|
+
* @property {Object} [meta]
|
|
1284
|
+
* @property {Object} [extra_meta]
|
|
1285
|
+
* @property {Object} [_custom_json]
|
|
1286
|
+
* @property {number} [item_id]
|
|
1287
|
+
* @property {number} [item_index]
|
|
1553
1288
|
* @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.
|
|
1289
|
+
* @property {string} [article_id]
|
|
1562
1290
|
*/
|
|
1563
1291
|
|
|
1564
1292
|
/**
|
|
1565
|
-
* @typedef
|
|
1293
|
+
* @typedef UpdateCartRequest
|
|
1566
1294
|
* @property {UpdateProductCart[]} [items]
|
|
1567
|
-
* @property {
|
|
1568
|
-
* items with updated sizes.
|
|
1569
|
-
* @property {string} operation - Cart opertaion type
|
|
1295
|
+
* @property {string} operation
|
|
1570
1296
|
*/
|
|
1571
1297
|
|
|
1572
1298
|
/**
|
|
1573
|
-
* @typedef
|
|
1299
|
+
* @typedef UpdateCartDetailResponse
|
|
1574
1300
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1575
1301
|
* False if partially added or not added.
|
|
1576
|
-
* @property {
|
|
1577
|
-
* @property {string} [message]
|
|
1302
|
+
* @property {CartDetailResponse} [cart]
|
|
1303
|
+
* @property {string} [message]
|
|
1578
1304
|
*/
|
|
1579
1305
|
|
|
1580
1306
|
/**
|
|
1581
1307
|
* @typedef OverrideCartItemPromo
|
|
1582
|
-
* @property {string} promo_id
|
|
1583
|
-
* @property {string} promo_amount
|
|
1584
|
-
* @property {string} [promo_desc]
|
|
1308
|
+
* @property {string} promo_id
|
|
1309
|
+
* @property {string} promo_amount
|
|
1310
|
+
* @property {string} [promo_desc]
|
|
1585
1311
|
* @property {string} [rwrd_tndr]
|
|
1586
|
-
* @property {Object[]} [item_list]
|
|
1587
|
-
* @property {string} [parent_promo_id]
|
|
1312
|
+
* @property {Object[]} [item_list]
|
|
1313
|
+
* @property {string} [parent_promo_id]
|
|
1588
1314
|
*/
|
|
1589
1315
|
|
|
1590
1316
|
/**
|
|
1591
1317
|
* @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
|
|
1318
|
+
* @property {string} [seller_identifier]
|
|
1319
|
+
* @property {number} [quantity]
|
|
1320
|
+
* @property {string} size
|
|
1321
|
+
* @property {number} price_marked
|
|
1322
|
+
* @property {number} amount_paid
|
|
1323
|
+
* @property {OverrideCartItemPromo[]} [promo_list]
|
|
1324
|
+
* @property {Object} [extra_meta]
|
|
1325
|
+
* @property {number} item_id
|
|
1326
|
+
* @property {number} discount
|
|
1327
|
+
* @property {number} price_effective
|
|
1603
1328
|
*/
|
|
1604
1329
|
|
|
1605
1330
|
/**
|
|
1606
1331
|
* @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
|
|
1332
|
+
* @property {string} cart_id
|
|
1333
|
+
* @property {string} payment_mode
|
|
1334
|
+
* @property {Object} [billing_address]
|
|
1335
|
+
* @property {string} merchant_code
|
|
1336
|
+
* @property {string} payment_identifier
|
|
1337
|
+
* @property {string} currency_code
|
|
1338
|
+
* @property {string} aggregator
|
|
1339
|
+
* @property {string} order_type
|
|
1340
|
+
* @property {string} [callback_url]
|
|
1341
|
+
* @property {OverrideCartItem[]} cart_items
|
|
1342
|
+
* @property {number} [ordering_store]
|
|
1343
|
+
* @property {Object} [shipping_address]
|
|
1344
|
+
*/
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* @typedef OverrideCheckoutResponse
|
|
1348
|
+
* @property {Object} data
|
|
1349
|
+
* @property {Object} cart
|
|
1350
|
+
* @property {string} success
|
|
1351
|
+
* @property {string} order_id
|
|
1352
|
+
* @property {string} message
|
|
1353
|
+
*/
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* @typedef GetShareCartLinkRequest
|
|
1644
1357
|
* @property {string} [id] - Cart uid for generating sharing
|
|
1645
1358
|
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
1646
1359
|
* data will be used to generate link as well as sent as shared details.
|
|
1647
1360
|
*/
|
|
1648
1361
|
|
|
1649
1362
|
/**
|
|
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
|
|
1363
|
+
* @typedef GetShareCartLinkResponse
|
|
1364
|
+
* @property {string} [token] - Short url unique id
|
|
1365
|
+
* @property {string} [share_url] - Short shareable final url
|
|
1655
1366
|
*/
|
|
1656
1367
|
|
|
1657
1368
|
/**
|
|
1658
1369
|
* @typedef SharedCartDetails
|
|
1659
1370
|
* @property {Object} [source] - Share link device and other source information
|
|
1660
1371
|
* @property {Object} [user] - User details of who generated share link
|
|
1661
|
-
* @property {string} [token] - Short link id
|
|
1662
|
-
* @property {string} [created_on]
|
|
1372
|
+
* @property {string} [token] - Short link id
|
|
1373
|
+
* @property {string} [created_on]
|
|
1663
1374
|
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
1664
1375
|
*/
|
|
1665
1376
|
|
|
1666
1377
|
/**
|
|
1667
1378
|
* @typedef SharedCart
|
|
1668
|
-
* @property {string} [coupon_text]
|
|
1669
|
-
* @property {string} [id]
|
|
1379
|
+
* @property {string} [coupon_text]
|
|
1380
|
+
* @property {string} [id]
|
|
1670
1381
|
* @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
|
|
1382
|
+
* @property {string} [comment]
|
|
1383
|
+
* @property {CartProductInfo[]} [items]
|
|
1675
1384
|
* @property {SharedCartDetails} [shared_cart_details]
|
|
1676
1385
|
* @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
|
|
1386
|
+
* @property {string} [delivery_charge_info]
|
|
1387
|
+
* @property {boolean} [restrict_checkout]
|
|
1388
|
+
* @property {string} [message]
|
|
1682
1389
|
* @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
|
|
1390
|
+
* @property {boolean} [is_valid]
|
|
1391
|
+
* @property {string} [uid]
|
|
1392
|
+
* @property {string} [checkout_mode]
|
|
1687
1393
|
* @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
|
|
1394
|
+
* @property {string} [last_modified]
|
|
1395
|
+
* @property {boolean} [buy_now]
|
|
1396
|
+
* @property {number} [cart_id]
|
|
1397
|
+
* @property {string} [gstin]
|
|
1398
|
+
* @property {Object} [custom_cart_meta]
|
|
1694
1399
|
*/
|
|
1695
1400
|
|
|
1696
1401
|
/**
|
|
1697
|
-
* @typedef
|
|
1402
|
+
* @typedef SharedCartResponse
|
|
1698
1403
|
* @property {SharedCart} [cart]
|
|
1699
|
-
* @property {string} [error]
|
|
1700
|
-
* type of error, error code and error message
|
|
1404
|
+
* @property {string} [error]
|
|
1701
1405
|
*/
|
|
1702
1406
|
|
|
1703
1407
|
/**
|
|
1704
1408
|
* @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
|
|
1409
|
+
* @property {string} [cart_id]
|
|
1410
|
+
* @property {Object} [pick_up_customer_details]
|
|
1411
|
+
* @property {number} [cart_value]
|
|
1412
|
+
* @property {string} [created_on]
|
|
1413
|
+
* @property {string} [user_id]
|
|
1414
|
+
* @property {string} [currency_code]
|
|
1415
|
+
* @property {number} [item_counts]
|
|
1713
1416
|
*/
|
|
1714
1417
|
|
|
1715
1418
|
/**
|
|
1716
|
-
* @typedef
|
|
1717
|
-
* @property {boolean} [success]
|
|
1718
|
-
* @property {CartList[]} [data]
|
|
1419
|
+
* @typedef MultiCartResponse
|
|
1420
|
+
* @property {boolean} [success]
|
|
1421
|
+
* @property {CartList[]} [data]
|
|
1719
1422
|
*/
|
|
1720
1423
|
|
|
1721
1424
|
/**
|
|
1722
1425
|
* @typedef UpdateUserCartMapping
|
|
1723
|
-
* @property {string} user_id
|
|
1426
|
+
* @property {string} user_id
|
|
1724
1427
|
*/
|
|
1725
1428
|
|
|
1726
1429
|
/**
|
|
1727
1430
|
* @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]
|
|
1431
|
+
* @property {string} [gender]
|
|
1432
|
+
* @property {string} [modified_on]
|
|
1433
|
+
* @property {string} [_id]
|
|
1434
|
+
* @property {string} [uid]
|
|
1435
|
+
* @property {string} [external_id]
|
|
1436
|
+
* @property {string} [mobile]
|
|
1437
|
+
* @property {string} [last_name]
|
|
1438
|
+
* @property {string} [created_at]
|
|
1439
|
+
* @property {string} [first_name]
|
|
1737
1440
|
*/
|
|
1738
1441
|
|
|
1739
1442
|
/**
|
|
1740
|
-
* @typedef
|
|
1741
|
-
* @property {string} [coupon_text]
|
|
1443
|
+
* @typedef UserCartMappingResponse
|
|
1444
|
+
* @property {string} [coupon_text]
|
|
1742
1445
|
* @property {UserInfo} [user]
|
|
1743
|
-
* @property {string} [id]
|
|
1744
|
-
* @property {Object} [pan_config]
|
|
1745
|
-
* user should enter the pan card
|
|
1446
|
+
* @property {string} [id]
|
|
1447
|
+
* @property {Object} [pan_config]
|
|
1746
1448
|
* @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
|
|
1449
|
+
* @property {string} [comment]
|
|
1450
|
+
* @property {CartProductInfo[]} [items]
|
|
1751
1451
|
* @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
|
|
1452
|
+
* @property {string} [delivery_charge_info]
|
|
1453
|
+
* @property {boolean} [restrict_checkout]
|
|
1454
|
+
* @property {string} [message]
|
|
1757
1455
|
* @property {CartBreakup} [breakup_values]
|
|
1758
|
-
* @property {boolean} [is_valid]
|
|
1759
|
-
* response is valid or not
|
|
1456
|
+
* @property {boolean} [is_valid]
|
|
1760
1457
|
* @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
|
|
1458
|
+
* @property {string} [checkout_mode]
|
|
1459
|
+
* @property {string} [last_modified]
|
|
1460
|
+
* @property {boolean} [buy_now]
|
|
1461
|
+
* @property {string} [gstin]
|
|
1462
|
+
* @property {Object} [custom_cart_meta]
|
|
1463
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1464
|
+
* @property {string} [pan_no]
|
|
1772
1465
|
*/
|
|
1773
1466
|
|
|
1774
1467
|
/**
|
|
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
|
|
1468
|
+
* @typedef PlatformAddCartRequest
|
|
1469
|
+
* @property {string} [user_id]
|
|
1470
|
+
* @property {boolean} [new_cart]
|
|
1471
|
+
* @property {AddProductCart[]} [items]
|
|
1782
1472
|
*/
|
|
1783
1473
|
|
|
1784
1474
|
/**
|
|
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
|
|
1475
|
+
* @typedef PlatformUpdateCartRequest
|
|
1476
|
+
* @property {string} [user_id]
|
|
1477
|
+
* @property {UpdateProductCart[]} [items]
|
|
1478
|
+
* @property {string} operation
|
|
1794
1479
|
*/
|
|
1795
1480
|
|
|
1796
1481
|
/**
|
|
1797
|
-
* @typedef
|
|
1798
|
-
* @property {string[]} [cart_id_list]
|
|
1482
|
+
* @typedef DeleteCartRequest
|
|
1483
|
+
* @property {string[]} [cart_id_list]
|
|
1799
1484
|
*/
|
|
1800
1485
|
|
|
1801
1486
|
/**
|
|
1802
|
-
* @typedef
|
|
1487
|
+
* @typedef DeleteCartDetailResponse
|
|
1803
1488
|
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
1804
1489
|
* if not archived.
|
|
1805
|
-
* @property {string} [message]
|
|
1490
|
+
* @property {string} [message]
|
|
1806
1491
|
*/
|
|
1807
1492
|
|
|
1808
1493
|
/**
|
|
1809
|
-
* @typedef
|
|
1494
|
+
* @typedef CartItemCountResponse
|
|
1810
1495
|
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
1811
1496
|
*/
|
|
1812
1497
|
|
|
1813
1498
|
/**
|
|
1814
1499
|
* @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
|
|
1500
|
+
* @property {string} [title]
|
|
1501
|
+
* @property {number} [max_discount_value]
|
|
1502
|
+
* @property {string} [coupon_code]
|
|
1503
|
+
* @property {boolean} [is_applied]
|
|
1504
|
+
* @property {string} [coupon_type]
|
|
1505
|
+
* @property {string} [expires_on]
|
|
1506
|
+
* @property {number} [coupon_value]
|
|
1507
|
+
* @property {string} [sub_title]
|
|
1508
|
+
* @property {number} [minimum_cart_value]
|
|
1509
|
+
* @property {boolean} [is_applicable]
|
|
1510
|
+
* @property {string} [message]
|
|
1511
|
+
* @property {string} [description]
|
|
1512
|
+
* @property {string} [start_date]
|
|
1513
|
+
* @property {string} [end_date]
|
|
1514
|
+
* @property {string} [coupon_applicable_message]
|
|
1838
1515
|
*/
|
|
1839
1516
|
|
|
1840
1517
|
/**
|
|
1841
1518
|
* @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
|
|
1519
|
+
* @property {boolean} [has_next]
|
|
1520
|
+
* @property {number} [current]
|
|
1521
|
+
* @property {number} [total]
|
|
1522
|
+
* @property {number} [total_item_count]
|
|
1523
|
+
* @property {boolean} [has_previous]
|
|
1848
1524
|
*/
|
|
1849
1525
|
|
|
1850
1526
|
/**
|
|
1851
|
-
* @typedef
|
|
1852
|
-
* @property {Coupon[]} [available_coupon_list]
|
|
1853
|
-
* can be applied on cart
|
|
1527
|
+
* @typedef GetCouponResponse
|
|
1528
|
+
* @property {Coupon[]} [available_coupon_list]
|
|
1854
1529
|
* @property {PageCoupon} [page]
|
|
1855
1530
|
*/
|
|
1856
1531
|
|
|
1857
1532
|
/**
|
|
1858
|
-
* @typedef
|
|
1533
|
+
* @typedef ApplyCouponRequest
|
|
1859
1534
|
* @property {string} coupon_code - Coupon code to be applied
|
|
1860
1535
|
*/
|
|
1861
1536
|
|
|
1862
1537
|
/**
|
|
1863
1538
|
* @typedef GeoLocation
|
|
1864
|
-
* @property {number} [longitude]
|
|
1865
|
-
* @property {number} [latitude]
|
|
1539
|
+
* @property {number} [longitude]
|
|
1540
|
+
* @property {number} [latitude]
|
|
1866
1541
|
*/
|
|
1867
1542
|
|
|
1868
1543
|
/**
|
|
1869
1544
|
* @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
|
|
1545
|
+
* @property {string} [phone]
|
|
1546
|
+
* @property {string} [id]
|
|
1547
|
+
* @property {string} [area_code_slug]
|
|
1548
|
+
* @property {string} [country_code]
|
|
1875
1549
|
* @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
|
|
1550
|
+
* @property {string} [country]
|
|
1551
|
+
* @property {string} [state]
|
|
1552
|
+
* @property {boolean} [is_default_address]
|
|
1553
|
+
* @property {string[]} [tags]
|
|
1554
|
+
* @property {string} [created_by_user_id]
|
|
1555
|
+
* @property {string} [landmark]
|
|
1556
|
+
* @property {string} [email]
|
|
1557
|
+
* @property {string} [area_code]
|
|
1558
|
+
* @property {string} [checkout_mode]
|
|
1559
|
+
* @property {Object} [meta]
|
|
1560
|
+
* @property {boolean} [is_active]
|
|
1561
|
+
* @property {string} [name]
|
|
1562
|
+
* @property {Object} [google_map_point]
|
|
1563
|
+
* @property {string} [cart_id]
|
|
1564
|
+
* @property {string} [city]
|
|
1565
|
+
* @property {string} [sector]
|
|
1894
1566
|
* @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]
|
|
1567
|
+
* @property {string} [area]
|
|
1568
|
+
* @property {string} [user_id]
|
|
1569
|
+
* @property {string} [address_type]
|
|
1570
|
+
* @property {string} [address]
|
|
1571
|
+
* @property {string} [country_phone_code]
|
|
1572
|
+
* @property {string} [country_iso_code]
|
|
1573
|
+
* @property {Object} [_custom_json]
|
|
1902
1574
|
*/
|
|
1903
1575
|
|
|
1904
1576
|
/**
|
|
1905
|
-
* @typedef
|
|
1906
|
-
* @property {
|
|
1907
|
-
* @property {number} user_address_count - The total number of addresses saved by a user.
|
|
1577
|
+
* @typedef PlatformGetAddressesResponse
|
|
1578
|
+
* @property {PlatformAddress[]} [address]
|
|
1908
1579
|
*/
|
|
1909
1580
|
|
|
1910
1581
|
/**
|
|
1911
|
-
* @typedef
|
|
1912
|
-
* @property {
|
|
1913
|
-
* @property {
|
|
1582
|
+
* @typedef SaveAddressResponse
|
|
1583
|
+
* @property {string} [id]
|
|
1584
|
+
* @property {boolean} [success]
|
|
1585
|
+
* @property {boolean} [is_default_address]
|
|
1914
1586
|
*/
|
|
1915
1587
|
|
|
1916
1588
|
/**
|
|
1917
|
-
* @typedef
|
|
1918
|
-
* @property {string} [id]
|
|
1919
|
-
* @property {boolean} [
|
|
1920
|
-
* @property {boolean} [
|
|
1921
|
-
*
|
|
1589
|
+
* @typedef UpdateAddressResponse
|
|
1590
|
+
* @property {string} [id]
|
|
1591
|
+
* @property {boolean} [is_default_address]
|
|
1592
|
+
* @property {boolean} [success]
|
|
1593
|
+
* @property {boolean} [is_updated]
|
|
1922
1594
|
*/
|
|
1923
1595
|
|
|
1924
1596
|
/**
|
|
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
|
|
1597
|
+
* @typedef DeleteAddressResponse
|
|
1598
|
+
* @property {string} [id]
|
|
1599
|
+
* @property {boolean} [is_deleted]
|
|
1932
1600
|
*/
|
|
1933
1601
|
|
|
1934
1602
|
/**
|
|
1935
|
-
* @typedef
|
|
1936
|
-
* @property {string} [
|
|
1937
|
-
* @property {
|
|
1938
|
-
*
|
|
1603
|
+
* @typedef PlatformSelectCartAddressRequest
|
|
1604
|
+
* @property {string} [cart_id]
|
|
1605
|
+
* @property {string} [billing_address_id]
|
|
1606
|
+
* @property {string} [checkout_mode]
|
|
1607
|
+
* @property {string} [id]
|
|
1608
|
+
* @property {string} [user_id]
|
|
1939
1609
|
*/
|
|
1940
1610
|
|
|
1941
1611
|
/**
|
|
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
|
|
1612
|
+
* @typedef ShipmentArticle
|
|
1613
|
+
* @property {string} [meta]
|
|
1614
|
+
* @property {string} [quantity]
|
|
1615
|
+
* @property {string} [article_id]
|
|
1950
1616
|
*/
|
|
1951
1617
|
|
|
1952
1618
|
/**
|
|
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
|
|
1619
|
+
* @typedef PlatformShipmentResponse
|
|
1620
|
+
* @property {number} [shipments]
|
|
1621
|
+
* @property {number} [fulfillment_id]
|
|
1622
|
+
* @property {CartProductInfo[]} [items]
|
|
1623
|
+
* @property {Object} [dp_options]
|
|
1624
|
+
* @property {string} [shipment_type]
|
|
1625
|
+
* @property {string} [order_type]
|
|
1626
|
+
* @property {string} [box_type]
|
|
1973
1627
|
* @property {ShipmentPromise} [promise]
|
|
1974
|
-
* @property {string} [dp_id]
|
|
1975
|
-
* @property {string} [fulfillment_type]
|
|
1976
|
-
* @property {ShipmentArticle[]} [articles]
|
|
1628
|
+
* @property {string} [dp_id]
|
|
1629
|
+
* @property {string} [fulfillment_type]
|
|
1630
|
+
* @property {ShipmentArticle[]} [articles]
|
|
1977
1631
|
*/
|
|
1978
1632
|
|
|
1979
1633
|
/**
|
|
1980
|
-
* @typedef
|
|
1981
|
-
* @property {string} [coupon_text]
|
|
1982
|
-
* @property {string} [id]
|
|
1983
|
-
* @property {Object} [pan_config]
|
|
1984
|
-
* user should enter the pan card
|
|
1634
|
+
* @typedef PlatformCartShipmentsResponse
|
|
1635
|
+
* @property {string} [coupon_text]
|
|
1636
|
+
* @property {string} [id]
|
|
1637
|
+
* @property {Object} [pan_config]
|
|
1985
1638
|
* @property {ShipmentPromise} [delivery_promise]
|
|
1986
|
-
* @property {string} [comment]
|
|
1987
|
-
* @property {CartProductInfo[]} [items]
|
|
1639
|
+
* @property {string} [comment]
|
|
1640
|
+
* @property {CartProductInfo[]} [items]
|
|
1988
1641
|
* @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
|
|
1642
|
+
* @property {string} [delivery_charge_info]
|
|
1643
|
+
* @property {boolean} [restrict_checkout]
|
|
1644
|
+
* @property {string} [message]
|
|
1994
1645
|
* @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
|
|
1646
|
+
* @property {string} [staff_user_id]
|
|
1647
|
+
* @property {boolean} [is_valid]
|
|
1648
|
+
* @property {PlatformShipmentResponse[]} [shipments]
|
|
2001
1649
|
* @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
|
|
1650
|
+
* @property {string} [checkout_mode]
|
|
1651
|
+
* @property {string} [last_modified]
|
|
1652
|
+
* @property {boolean} [buy_now]
|
|
1653
|
+
* @property {string} [gstin]
|
|
1654
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
1655
|
+
* @property {boolean} [error]
|
|
1656
|
+
* @property {string} [pan_no]
|
|
1657
|
+
* @property {Object} [custom_cart_meta]
|
|
2013
1658
|
*/
|
|
2014
1659
|
|
|
2015
1660
|
/**
|
|
2016
1661
|
* @typedef UpdateCartShipmentItem
|
|
2017
1662
|
* @property {number} [quantity] - Quantity of product in shipment
|
|
2018
1663
|
* @property {string} shipment_type - Shipment delivery type
|
|
2019
|
-
* @property {string} article_uid - Article
|
|
1664
|
+
* @property {string} article_uid - Article mongo id
|
|
2020
1665
|
*/
|
|
2021
1666
|
|
|
2022
1667
|
/**
|
|
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
|
|
1668
|
+
* @typedef UpdateCartShipmentRequest
|
|
1669
|
+
* @property {UpdateCartShipmentItem[]} shipments
|
|
2027
1670
|
*/
|
|
2028
1671
|
|
|
2029
1672
|
/**
|
|
2030
|
-
* @typedef
|
|
2031
|
-
* @property {string} [gstin]
|
|
1673
|
+
* @typedef PlatformCartMetaRequest
|
|
1674
|
+
* @property {string} [gstin]
|
|
2032
1675
|
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
2033
1676
|
* 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
|
|
1677
|
+
* @property {string} [checkout_mode]
|
|
1678
|
+
* @property {Object} [gift_details]
|
|
1679
|
+
* @property {string} [pan_no]
|
|
1680
|
+
* @property {string} [comment]
|
|
2039
1681
|
* @property {string} [staff_user_id] - Staff user id
|
|
2040
1682
|
*/
|
|
2041
1683
|
|
|
2042
1684
|
/**
|
|
2043
|
-
* @typedef
|
|
2044
|
-
* @property {boolean} [is_valid]
|
|
2045
|
-
* @property {string} [message]
|
|
1685
|
+
* @typedef CartMetaResponse
|
|
1686
|
+
* @property {boolean} [is_valid]
|
|
1687
|
+
* @property {string} [message]
|
|
2046
1688
|
*/
|
|
2047
1689
|
|
|
2048
1690
|
/**
|
|
2049
|
-
* @typedef
|
|
2050
|
-
* @property {string[]} [errors]
|
|
1691
|
+
* @typedef CartMetaMissingResponse
|
|
1692
|
+
* @property {string[]} [errors]
|
|
2051
1693
|
*/
|
|
2052
1694
|
|
|
2053
1695
|
/**
|
|
2054
1696
|
* @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
|
|
1697
|
+
* @property {string} [employee_code]
|
|
1698
|
+
* @property {string} _id
|
|
1699
|
+
* @property {string} user
|
|
1700
|
+
* @property {string} last_name
|
|
1701
|
+
* @property {string} first_name
|
|
2064
1702
|
*/
|
|
2065
1703
|
|
|
2066
1704
|
/**
|
|
2067
1705
|
* @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
|
|
1706
|
+
* @property {string} [name]
|
|
1707
|
+
* @property {string} [email]
|
|
1708
|
+
* @property {string} mobile
|
|
2074
1709
|
*/
|
|
2075
1710
|
|
|
2076
1711
|
/**
|
|
2077
1712
|
* @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]
|
|
1713
|
+
* @property {string} key
|
|
1714
|
+
* @property {string[]} values
|
|
2121
1715
|
*/
|
|
2122
1716
|
|
|
2123
1717
|
/**
|
|
2124
1718
|
* @typedef CheckCart
|
|
2125
|
-
* @property {string} [coupon_text]
|
|
2126
|
-
* @property {string} [cod_message]
|
|
2127
|
-
* @property {string} [id]
|
|
2128
|
-
* @property {string} [store_code]
|
|
1719
|
+
* @property {string} [coupon_text]
|
|
1720
|
+
* @property {string} [cod_message]
|
|
1721
|
+
* @property {string} [id]
|
|
1722
|
+
* @property {string} [store_code]
|
|
2129
1723
|
* @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
|
|
1724
|
+
* @property {string} [comment]
|
|
1725
|
+
* @property {string} [user_type]
|
|
1726
|
+
* @property {CartProductInfo[]} [items]
|
|
1727
|
+
* @property {string} [error_message]
|
|
1728
|
+
* @property {boolean} [success]
|
|
2136
1729
|
* @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
|
|
1730
|
+
* @property {string} [delivery_charge_info]
|
|
1731
|
+
* @property {boolean} [restrict_checkout]
|
|
1732
|
+
* @property {string} [order_id]
|
|
1733
|
+
* @property {string} [message]
|
|
2143
1734
|
* @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
|
|
1735
|
+
* @property {number} [cod_charges]
|
|
1736
|
+
* @property {boolean} [is_valid]
|
|
1737
|
+
* @property {string} [uid]
|
|
1738
|
+
* @property {string} [checkout_mode]
|
|
2149
1739
|
* @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
|
|
1740
|
+
* @property {string} [last_modified]
|
|
1741
|
+
* @property {boolean} [buy_now]
|
|
1742
|
+
* @property {number} [delivery_charge_order_value]
|
|
1743
|
+
* @property {number} [cart_id]
|
|
1744
|
+
* @property {Object[]} [store_emps]
|
|
1745
|
+
* @property {string} [gstin]
|
|
1746
|
+
* @property {boolean} [cod_available]
|
|
1747
|
+
* @property {number} [delivery_charges]
|
|
1748
|
+
* @property {Object} [custom_cart_meta]
|
|
2177
1749
|
*/
|
|
2178
1750
|
|
|
2179
1751
|
/**
|
|
2180
|
-
* @typedef
|
|
1752
|
+
* @typedef CartCheckoutResponse
|
|
2181
1753
|
* @property {string} [app_intercept_url]
|
|
2182
1754
|
* @property {Object} [data]
|
|
2183
1755
|
* @property {CheckCart} [cart]
|
|
@@ -2189,204 +1761,157 @@ const Joi = require("joi");
|
|
|
2189
1761
|
*/
|
|
2190
1762
|
|
|
2191
1763
|
/**
|
|
2192
|
-
* @typedef
|
|
1764
|
+
* @typedef CartDeliveryModesResponse
|
|
2193
1765
|
* @property {number[]} [pickup_stores] - Store pick up available store uids
|
|
2194
1766
|
* @property {string[]} [available_modes] - Available delivery modes
|
|
2195
1767
|
*/
|
|
2196
1768
|
|
|
2197
1769
|
/**
|
|
2198
1770
|
* @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
|
|
1771
|
+
* @property {string} [country]
|
|
1772
|
+
* @property {string} [state]
|
|
1773
|
+
* @property {string} [city]
|
|
1774
|
+
* @property {string} [phone]
|
|
1775
|
+
* @property {string} [area_code]
|
|
1776
|
+
* @property {number} [uid]
|
|
1777
|
+
* @property {string} [area_code_slug]
|
|
1778
|
+
* @property {string} [address_type]
|
|
1779
|
+
* @property {string} [area]
|
|
1780
|
+
* @property {number} [id]
|
|
1781
|
+
* @property {string} [store_manager_name]
|
|
1782
|
+
* @property {string} [name]
|
|
1783
|
+
* @property {string} [store_code]
|
|
1784
|
+
* @property {string} [landmark]
|
|
1785
|
+
* @property {string} [email]
|
|
1786
|
+
* @property {number} [pincode]
|
|
1787
|
+
* @property {string} [address]
|
|
1788
|
+
*/
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* @typedef StoreDetailsResponse
|
|
1792
|
+
* @property {PickupStoreDetail[]} [items]
|
|
1793
|
+
*/
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
* @typedef UpdateCartPaymentRequest
|
|
1797
|
+
* @property {string} [address_id]
|
|
1798
|
+
* @property {string} [payment_mode]
|
|
1799
|
+
* @property {string} [aggregator_name]
|
|
1800
|
+
* @property {string} [merchant_code]
|
|
1801
|
+
* @property {string} [payment_identifier]
|
|
1802
|
+
* @property {string} [id]
|
|
2236
1803
|
*/
|
|
2237
1804
|
|
|
2238
1805
|
/**
|
|
2239
1806
|
* @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.
|
|
1807
|
+
* @property {string} [title]
|
|
1808
|
+
* @property {boolean} [next_validation_required]
|
|
1809
|
+
* @property {boolean} [valid]
|
|
1810
|
+
* @property {string} [display_message_en]
|
|
1811
|
+
* @property {string} [code]
|
|
1812
|
+
* @property {number} [discount]
|
|
2249
1813
|
*/
|
|
2250
1814
|
|
|
2251
1815
|
/**
|
|
2252
1816
|
* @typedef PaymentCouponValidate
|
|
2253
|
-
* @property {boolean} success
|
|
2254
|
-
* @property {string} [message]
|
|
1817
|
+
* @property {boolean} success
|
|
1818
|
+
* @property {string} [message]
|
|
2255
1819
|
* @property {CouponValidity} [coupon_validity]
|
|
2256
1820
|
*/
|
|
2257
1821
|
|
|
2258
1822
|
/**
|
|
2259
1823
|
* @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
|
|
1824
|
+
* @property {string} [payment_gateway]
|
|
1825
|
+
* @property {string} [type]
|
|
1826
|
+
* @property {string} [payment_identifier]
|
|
1827
|
+
* @property {string} [merchant_code]
|
|
2266
1828
|
*/
|
|
2267
1829
|
|
|
2268
1830
|
/**
|
|
2269
1831
|
* @typedef PaymentMethod
|
|
2270
|
-
* @property {string} mode
|
|
2271
|
-
* @property {string} [payment]
|
|
1832
|
+
* @property {string} mode
|
|
1833
|
+
* @property {string} [payment]
|
|
2272
1834
|
* @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
|
|
1835
|
+
* @property {number} [amount]
|
|
1836
|
+
* @property {string} [name]
|
|
1837
|
+
* @property {Object} [payment_extra_identifiers]
|
|
1838
|
+
*/
|
|
1839
|
+
|
|
1840
|
+
/**
|
|
1841
|
+
* @typedef PlatformCartCheckoutDetailV2Request
|
|
1842
|
+
* @property {string} [address_id]
|
|
1843
|
+
* @property {string} [payment_identifier]
|
|
1844
|
+
* @property {Object} [payment_params]
|
|
1845
|
+
* @property {Object} [custom_meta]
|
|
1846
|
+
* @property {boolean} [payment_auto_confirm]
|
|
1847
|
+
* @property {string} id
|
|
1848
|
+
* @property {boolean} [pos]
|
|
1849
|
+
* @property {string} [billing_address_id]
|
|
1850
|
+
* @property {string} [merchant_code]
|
|
1851
|
+
* @property {string} [aggregator]
|
|
1852
|
+
* @property {number} [pick_at_store_uid]
|
|
1853
|
+
* @property {string} [device_id]
|
|
1854
|
+
* @property {Object} [delivery_address]
|
|
1855
|
+
* @property {string} [payment_mode]
|
|
1856
|
+
* @property {string} [checkout_mode]
|
|
1857
|
+
* @property {Object} [customer_details] - Customer details
|
|
1858
|
+
* @property {Object} [meta]
|
|
1859
|
+
* @property {PaymentMethod[]} payment_methods
|
|
2311
1860
|
* @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
|
|
1861
|
+
* @property {string} [employee_code]
|
|
1862
|
+
* @property {Object} [billing_address]
|
|
1863
|
+
* @property {string} [callback_url]
|
|
1864
|
+
* @property {string} user_id
|
|
1865
|
+
* @property {Object} [extra_meta]
|
|
1866
|
+
* @property {string} order_type
|
|
2322
1867
|
* @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
|
|
1868
|
+
* @property {number} [ordering_store]
|
|
1869
|
+
* @property {string} [iin]
|
|
1870
|
+
* @property {string} [network]
|
|
1871
|
+
* @property {string} [type]
|
|
1872
|
+
* @property {string} [card_id]
|
|
2331
1873
|
*/
|
|
2332
1874
|
|
|
2333
1875
|
/**
|
|
2334
1876
|
* @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
|
|
1877
|
+
* @property {string} [address_id]
|
|
1878
|
+
* @property {string} [payment_mode]
|
|
1879
|
+
* @property {string} [aggregator_name]
|
|
1880
|
+
* @property {string} [merchant_code]
|
|
1881
|
+
* @property {string} [payment_identifier]
|
|
1882
|
+
* @property {string} [id]
|
|
2346
1883
|
* @property {PaymentMethod[]} [payment_methods]
|
|
2347
1884
|
*/
|
|
2348
1885
|
|
|
2349
1886
|
/**
|
|
2350
1887
|
* @typedef PriceMinMax
|
|
2351
|
-
* @property {number} [min]
|
|
2352
|
-
* @property {number} [max]
|
|
1888
|
+
* @property {number} [min]
|
|
1889
|
+
* @property {number} [max]
|
|
2353
1890
|
*/
|
|
2354
1891
|
|
|
2355
1892
|
/**
|
|
2356
1893
|
* @typedef ItemPriceDetails
|
|
2357
1894
|
* @property {PriceMinMax} [marked]
|
|
2358
1895
|
* @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.
|
|
1896
|
+
* @property {string} [currency]
|
|
2368
1897
|
*/
|
|
2369
1898
|
|
|
2370
1899
|
/**
|
|
2371
1900
|
* @typedef FreeGiftItems
|
|
2372
|
-
* @property {string} [item_slug] -
|
|
2373
|
-
* @property {string} [item_name] -
|
|
1901
|
+
* @property {string} [item_slug] - Item slug
|
|
1902
|
+
* @property {string} [item_name] - Item name
|
|
2374
1903
|
* @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
|
|
1904
|
+
* @property {string} [item_brand_name] - Item brand name
|
|
1905
|
+
* @property {number} [item_id] - Item id
|
|
1906
|
+
* @property {string[]} [item_images_url] - Item images URL
|
|
2381
1907
|
*/
|
|
2382
1908
|
|
|
2383
1909
|
/**
|
|
2384
1910
|
* @typedef PromotionOffer
|
|
2385
|
-
* @property {string} [id] - Promotion
|
|
1911
|
+
* @property {string} [id] - Promotion id
|
|
2386
1912
|
* @property {Object} [buy_rules] - Buy rules of promotions
|
|
2387
|
-
* @property {string} [offer_text] - Offer title
|
|
2388
|
-
* @property {string} [promotion_type] -
|
|
2389
|
-
* amount, bogo etc.
|
|
1913
|
+
* @property {string} [offer_text] - Offer title
|
|
1914
|
+
* @property {string} [promotion_type] - Promotion type
|
|
2390
1915
|
* @property {string} [promotion_name] - Name of the promotion
|
|
2391
1916
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
2392
1917
|
* @property {string} [valid_till] - Datetime ISOString for promotion end date
|
|
@@ -2396,47 +1921,36 @@ const Joi = require("joi");
|
|
|
2396
1921
|
*/
|
|
2397
1922
|
|
|
2398
1923
|
/**
|
|
2399
|
-
* @typedef
|
|
2400
|
-
* @property {PromotionOffer[]} [available_promotions]
|
|
2401
|
-
* promotion for product
|
|
1924
|
+
* @typedef PromotionOffersResponse
|
|
1925
|
+
* @property {PromotionOffer[]} [available_promotions]
|
|
2402
1926
|
*/
|
|
2403
1927
|
|
|
2404
1928
|
/**
|
|
2405
1929
|
* @typedef PromotionPaymentOffer
|
|
2406
|
-
* @property {string} [application_id] - Application id
|
|
1930
|
+
* @property {string} [application_id] - Application id
|
|
2407
1931
|
* @property {Object[]} [buy_rules] - Buy rules of promotions
|
|
2408
1932
|
* @property {string} [calculate_on] - Price on which promotion calculated
|
|
2409
1933
|
* @property {string} [description] - Offer details including T&C
|
|
2410
1934
|
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
2411
|
-
* @property {string} [id] - Promotion
|
|
2412
|
-
* @property {string} [offer_text] - Offer title
|
|
1935
|
+
* @property {string} [id] - Promotion id
|
|
1936
|
+
* @property {string} [offer_text] - Offer title
|
|
2413
1937
|
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
2414
|
-
* @property {string} [promotion_type] -
|
|
2415
|
-
* percentage etc.
|
|
1938
|
+
* @property {string} [promotion_type] - Promotion type
|
|
2416
1939
|
* @property {string} [promotion_name] - Name of the promotion
|
|
2417
1940
|
*/
|
|
2418
1941
|
|
|
2419
1942
|
/**
|
|
2420
|
-
* @typedef
|
|
2421
|
-
* @property {boolean} [success]
|
|
1943
|
+
* @typedef PromotionPaymentOffersResponse
|
|
1944
|
+
* @property {boolean} [success]
|
|
2422
1945
|
* @property {PromotionPaymentOffer[]} [promotions]
|
|
2423
1946
|
*/
|
|
2424
1947
|
|
|
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
1948
|
class CartPlatformModel {
|
|
2432
1949
|
/** @returns {CouponDateMeta} */
|
|
2433
1950
|
static CouponDateMeta() {
|
|
2434
1951
|
return Joi.object({
|
|
2435
1952
|
modified_on: Joi.string().allow("").allow(null),
|
|
2436
1953
|
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
1954
|
});
|
|
2441
1955
|
}
|
|
2442
1956
|
|
|
@@ -2444,7 +1958,7 @@ class CartPlatformModel {
|
|
|
2444
1958
|
static Ownership() {
|
|
2445
1959
|
return Joi.object({
|
|
2446
1960
|
payable_category: Joi.string().allow("").required(),
|
|
2447
|
-
payable_by: Joi.string().allow("").
|
|
1961
|
+
payable_by: Joi.string().allow("").required(),
|
|
2448
1962
|
});
|
|
2449
1963
|
}
|
|
2450
1964
|
|
|
@@ -2453,9 +1967,6 @@ class CartPlatformModel {
|
|
|
2453
1967
|
return Joi.object({
|
|
2454
1968
|
created_by: Joi.string().allow("").allow(null),
|
|
2455
1969
|
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
1970
|
});
|
|
2460
1971
|
}
|
|
2461
1972
|
|
|
@@ -2529,7 +2040,7 @@ class CartPlatformModel {
|
|
|
2529
2040
|
/** @returns {Restrictions} */
|
|
2530
2041
|
static Restrictions() {
|
|
2531
2042
|
return Joi.object({
|
|
2532
|
-
payments: CartPlatformModel.PaymentModes(),
|
|
2043
|
+
payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
|
|
2533
2044
|
user_type: Joi.string().allow(""),
|
|
2534
2045
|
price_range: CartPlatformModel.PriceRange(),
|
|
2535
2046
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
@@ -2563,10 +2074,9 @@ class CartPlatformModel {
|
|
|
2563
2074
|
static CouponSchedule() {
|
|
2564
2075
|
return Joi.object({
|
|
2565
2076
|
end: Joi.string().allow("").allow(null),
|
|
2566
|
-
start: Joi.string().allow("")
|
|
2077
|
+
start: Joi.string().allow(""),
|
|
2567
2078
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2568
2079
|
cron: Joi.string().allow("").allow(null),
|
|
2569
|
-
status: Joi.string().allow(""),
|
|
2570
2080
|
duration: Joi.number().allow(null),
|
|
2571
2081
|
});
|
|
2572
2082
|
}
|
|
@@ -2630,11 +2140,11 @@ class CartPlatformModel {
|
|
|
2630
2140
|
return Joi.object({
|
|
2631
2141
|
currency_code: Joi.string().allow(""),
|
|
2632
2142
|
auto_apply: Joi.boolean(),
|
|
2633
|
-
type: Joi.string().allow(""),
|
|
2143
|
+
type: Joi.string().allow("").required(),
|
|
2634
2144
|
is_exact: Joi.boolean(),
|
|
2635
|
-
applicable_on: Joi.string().allow(""),
|
|
2636
|
-
calculate_on: Joi.string().allow(""),
|
|
2637
|
-
value_type: Joi.string().allow(""),
|
|
2145
|
+
applicable_on: Joi.string().allow("").required(),
|
|
2146
|
+
calculate_on: Joi.string().allow("").required(),
|
|
2147
|
+
value_type: Joi.string().allow("").required(),
|
|
2638
2148
|
scope: Joi.array().items(Joi.string().allow("")),
|
|
2639
2149
|
});
|
|
2640
2150
|
}
|
|
@@ -2643,24 +2153,21 @@ class CartPlatformModel {
|
|
|
2643
2153
|
static CouponAdd() {
|
|
2644
2154
|
return Joi.object({
|
|
2645
2155
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2646
|
-
ownership: CartPlatformModel.Ownership(),
|
|
2156
|
+
ownership: CartPlatformModel.Ownership().required(),
|
|
2647
2157
|
author: CartPlatformModel.CouponAuthor(),
|
|
2648
2158
|
state: CartPlatformModel.State(),
|
|
2649
2159
|
restrictions: CartPlatformModel.Restrictions(),
|
|
2650
2160
|
validation: CartPlatformModel.Validation(),
|
|
2651
2161
|
action: CartPlatformModel.CouponAction(),
|
|
2652
|
-
coupon_type: Joi.string().allow(""),
|
|
2653
|
-
coupon_prefix: Joi.string().allow("").allow(null),
|
|
2654
|
-
coupon_counts: Joi.number(),
|
|
2655
2162
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2656
2163
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2657
|
-
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2658
|
-
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2164
|
+
rule: Joi.array().items(CartPlatformModel.Rule()).required(),
|
|
2165
|
+
display_meta: CartPlatformModel.DisplayMeta().required(),
|
|
2659
2166
|
code: Joi.string().allow("").required(),
|
|
2660
2167
|
type_slug: Joi.string().allow("").required(),
|
|
2661
|
-
identifiers: CartPlatformModel.Identifier(),
|
|
2662
|
-
validity: CartPlatformModel.Validity(),
|
|
2663
|
-
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2168
|
+
identifiers: CartPlatformModel.Identifier().required(),
|
|
2169
|
+
validity: CartPlatformModel.Validity().required(),
|
|
2170
|
+
rule_definition: CartPlatformModel.RuleDefinition().required(),
|
|
2664
2171
|
_id: Joi.string().allow(""),
|
|
2665
2172
|
});
|
|
2666
2173
|
}
|
|
@@ -2678,8 +2185,8 @@ class CartPlatformModel {
|
|
|
2678
2185
|
});
|
|
2679
2186
|
}
|
|
2680
2187
|
|
|
2681
|
-
/** @returns {
|
|
2682
|
-
static
|
|
2188
|
+
/** @returns {CouponsResponse} */
|
|
2189
|
+
static CouponsResponse() {
|
|
2683
2190
|
return Joi.object({
|
|
2684
2191
|
items: Joi.array().items(CartPlatformModel.CouponAdd()),
|
|
2685
2192
|
page: CartPlatformModel.Page(),
|
|
@@ -2694,8 +2201,8 @@ class CartPlatformModel {
|
|
|
2694
2201
|
});
|
|
2695
2202
|
}
|
|
2696
2203
|
|
|
2697
|
-
/** @returns {
|
|
2698
|
-
static
|
|
2204
|
+
/** @returns {OperationErrorResponse} */
|
|
2205
|
+
static OperationErrorResponse() {
|
|
2699
2206
|
return Joi.object({
|
|
2700
2207
|
success: Joi.boolean(),
|
|
2701
2208
|
message: Joi.string().allow(""),
|
|
@@ -2707,7 +2214,7 @@ class CartPlatformModel {
|
|
|
2707
2214
|
static CouponUpdate() {
|
|
2708
2215
|
return Joi.object({
|
|
2709
2216
|
date_meta: CartPlatformModel.CouponDateMeta(),
|
|
2710
|
-
ownership: CartPlatformModel.Ownership(),
|
|
2217
|
+
ownership: CartPlatformModel.Ownership().required(),
|
|
2711
2218
|
author: CartPlatformModel.CouponAuthor(),
|
|
2712
2219
|
state: CartPlatformModel.State(),
|
|
2713
2220
|
restrictions: CartPlatformModel.Restrictions(),
|
|
@@ -2715,17 +2222,13 @@ class CartPlatformModel {
|
|
|
2715
2222
|
action: CartPlatformModel.CouponAction(),
|
|
2716
2223
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2717
2224
|
_schedule: CartPlatformModel.CouponSchedule(),
|
|
2718
|
-
rule: Joi.array().items(CartPlatformModel.Rule()),
|
|
2719
|
-
display_meta: CartPlatformModel.DisplayMeta(),
|
|
2225
|
+
rule: Joi.array().items(CartPlatformModel.Rule()).required(),
|
|
2226
|
+
display_meta: CartPlatformModel.DisplayMeta().required(),
|
|
2720
2227
|
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
2228
|
type_slug: Joi.string().allow("").required(),
|
|
2726
|
-
identifiers: CartPlatformModel.Identifier(),
|
|
2727
|
-
validity: CartPlatformModel.Validity(),
|
|
2728
|
-
rule_definition: CartPlatformModel.RuleDefinition(),
|
|
2229
|
+
identifiers: CartPlatformModel.Identifier().required(),
|
|
2230
|
+
validity: CartPlatformModel.Validity().required(),
|
|
2231
|
+
rule_definition: CartPlatformModel.RuleDefinition().required(),
|
|
2729
2232
|
});
|
|
2730
2233
|
}
|
|
2731
2234
|
|
|
@@ -2737,48 +2240,32 @@ class CartPlatformModel {
|
|
|
2737
2240
|
});
|
|
2738
2241
|
}
|
|
2739
2242
|
|
|
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
2243
|
/** @returns {DisplayMeta1} */
|
|
2750
2244
|
static DisplayMeta1() {
|
|
2751
2245
|
return Joi.object({
|
|
2752
|
-
description: Joi.string().allow("")
|
|
2246
|
+
description: Joi.string().allow(""),
|
|
2753
2247
|
offer_label: Joi.string().allow(""),
|
|
2754
|
-
name: Joi.string().allow("")
|
|
2755
|
-
offer_text: Joi.string().allow("")
|
|
2248
|
+
name: Joi.string().allow(""),
|
|
2249
|
+
offer_text: Joi.string().allow(""),
|
|
2756
2250
|
});
|
|
2757
2251
|
}
|
|
2758
2252
|
|
|
2759
2253
|
/** @returns {Ownership1} */
|
|
2760
2254
|
static Ownership1() {
|
|
2761
2255
|
return Joi.object({
|
|
2762
|
-
payable_category: Joi.string().allow(""),
|
|
2763
|
-
payable_by: Joi.string().allow(""),
|
|
2256
|
+
payable_category: Joi.string().allow("").required(),
|
|
2257
|
+
payable_by: Joi.string().allow("").required(),
|
|
2764
2258
|
});
|
|
2765
2259
|
}
|
|
2766
2260
|
|
|
2767
2261
|
/** @returns {CompareObject} */
|
|
2768
2262
|
static CompareObject() {
|
|
2769
2263
|
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()),
|
|
2264
|
+
equals: Joi.number(),
|
|
2265
|
+
greater_than: Joi.number(),
|
|
2266
|
+
less_than_equals: Joi.number(),
|
|
2267
|
+
less_than: Joi.number(),
|
|
2268
|
+
greater_than_equals: Joi.number(),
|
|
2782
2269
|
});
|
|
2783
2270
|
}
|
|
2784
2271
|
|
|
@@ -2822,7 +2309,7 @@ class CartPlatformModel {
|
|
|
2822
2309
|
discount_price: Joi.number(),
|
|
2823
2310
|
apportion_discount: Joi.boolean(),
|
|
2824
2311
|
partial_can_ret: Joi.boolean(),
|
|
2825
|
-
max_usage_per_transaction: Joi.number()
|
|
2312
|
+
max_usage_per_transaction: Joi.number(),
|
|
2826
2313
|
min_offer_quantity: Joi.number(),
|
|
2827
2314
|
code: Joi.string().allow(""),
|
|
2828
2315
|
discount_amount: Joi.number(),
|
|
@@ -2837,7 +2324,6 @@ class CartPlatformModel {
|
|
|
2837
2324
|
discount_type: Joi.string().allow("").required(),
|
|
2838
2325
|
buy_condition: Joi.string().allow("").required(),
|
|
2839
2326
|
item_criteria: CartPlatformModel.ItemCriteria().required(),
|
|
2840
|
-
meta: CartPlatformModel.ItemSizeMapping(),
|
|
2841
2327
|
offer: CartPlatformModel.DiscountOffer().required(),
|
|
2842
2328
|
});
|
|
2843
2329
|
}
|
|
@@ -2852,7 +2338,7 @@ class CartPlatformModel {
|
|
|
2852
2338
|
/** @returns {PromotionPaymentModes} */
|
|
2853
2339
|
static PromotionPaymentModes() {
|
|
2854
2340
|
return Joi.object({
|
|
2855
|
-
type: Joi.string().allow(""),
|
|
2341
|
+
type: Joi.string().allow("").required(),
|
|
2856
2342
|
uses: CartPlatformModel.PaymentAllowValue1(),
|
|
2857
2343
|
codes: Joi.array().items(Joi.string().allow("")),
|
|
2858
2344
|
});
|
|
@@ -2893,7 +2379,7 @@ class CartPlatformModel {
|
|
|
2893
2379
|
/** @returns {Restrictions1} */
|
|
2894
2380
|
static Restrictions1() {
|
|
2895
2381
|
return Joi.object({
|
|
2896
|
-
payments: CartPlatformModel.PaymentModes(),
|
|
2382
|
+
payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
|
|
2897
2383
|
user_registered: CartPlatformModel.UserRegistered(),
|
|
2898
2384
|
platforms: Joi.array().items(Joi.string().allow("")),
|
|
2899
2385
|
post_order: CartPlatformModel.PostOrder1(),
|
|
@@ -2901,7 +2387,7 @@ class CartPlatformModel {
|
|
|
2901
2387
|
order_quantity: Joi.number(),
|
|
2902
2388
|
anonymous_users: Joi.boolean(),
|
|
2903
2389
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
2904
|
-
uses: CartPlatformModel.UsesRestriction1(),
|
|
2390
|
+
uses: CartPlatformModel.UsesRestriction1().required(),
|
|
2905
2391
|
ordering_stores: Joi.array().items(Joi.number()),
|
|
2906
2392
|
});
|
|
2907
2393
|
}
|
|
@@ -2909,10 +2395,9 @@ class CartPlatformModel {
|
|
|
2909
2395
|
/** @returns {PromotionSchedule} */
|
|
2910
2396
|
static PromotionSchedule() {
|
|
2911
2397
|
return Joi.object({
|
|
2912
|
-
end: Joi.string().allow("").
|
|
2913
|
-
start: Joi.string().allow("").
|
|
2914
|
-
|
|
2915
|
-
published: Joi.boolean(),
|
|
2398
|
+
end: Joi.string().allow("").required(),
|
|
2399
|
+
start: Joi.string().allow("").required(),
|
|
2400
|
+
published: Joi.boolean().required(),
|
|
2916
2401
|
next_schedule: Joi.array().items(Joi.any()),
|
|
2917
2402
|
cron: Joi.string().allow("").allow(null),
|
|
2918
2403
|
duration: Joi.number().allow(null),
|
|
@@ -2922,8 +2407,8 @@ class CartPlatformModel {
|
|
|
2922
2407
|
/** @returns {PromotionAction} */
|
|
2923
2408
|
static PromotionAction() {
|
|
2924
2409
|
return Joi.object({
|
|
2925
|
-
action_date: Joi.string().allow("").allow(null),
|
|
2926
|
-
action_type: Joi.string().allow(""),
|
|
2410
|
+
action_date: Joi.string().allow("").allow(null).required(),
|
|
2411
|
+
action_type: Joi.string().allow("").required(),
|
|
2927
2412
|
});
|
|
2928
2413
|
}
|
|
2929
2414
|
|
|
@@ -2932,17 +2417,14 @@ class CartPlatformModel {
|
|
|
2932
2417
|
return Joi.object({
|
|
2933
2418
|
created_by: Joi.string().allow("").allow(null),
|
|
2934
2419
|
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
2420
|
});
|
|
2939
2421
|
}
|
|
2940
2422
|
|
|
2941
2423
|
/** @returns {Visibility} */
|
|
2942
2424
|
static Visibility() {
|
|
2943
2425
|
return Joi.object({
|
|
2944
|
-
coupon_list: Joi.boolean(),
|
|
2945
|
-
pdp: Joi.boolean(),
|
|
2426
|
+
coupon_list: Joi.boolean().required(),
|
|
2427
|
+
pdp: Joi.boolean().required(),
|
|
2946
2428
|
});
|
|
2947
2429
|
}
|
|
2948
2430
|
|
|
@@ -2951,9 +2433,6 @@ class CartPlatformModel {
|
|
|
2951
2433
|
return Joi.object({
|
|
2952
2434
|
modified_on: Joi.string().allow("").allow(null),
|
|
2953
2435
|
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
2436
|
});
|
|
2958
2437
|
}
|
|
2959
2438
|
|
|
@@ -2974,7 +2453,6 @@ class CartPlatformModel {
|
|
|
2974
2453
|
.required(),
|
|
2975
2454
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
2976
2455
|
currency: Joi.string().allow(""),
|
|
2977
|
-
is_processed: Joi.boolean(),
|
|
2978
2456
|
code: Joi.string().allow(""),
|
|
2979
2457
|
_schedule: CartPlatformModel.PromotionSchedule(),
|
|
2980
2458
|
post_order_action: CartPlatformModel.PromotionAction(),
|
|
@@ -2982,16 +2460,18 @@ class CartPlatformModel {
|
|
|
2982
2460
|
author: CartPlatformModel.PromotionAuthor(),
|
|
2983
2461
|
visiblility: CartPlatformModel.Visibility(),
|
|
2984
2462
|
application_id: Joi.string().allow("").required(),
|
|
2985
|
-
buy_rules:
|
|
2986
|
-
|
|
2463
|
+
buy_rules: Joi.object()
|
|
2464
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2465
|
+
.required(),
|
|
2466
|
+
_custom_json: Joi.any(),
|
|
2987
2467
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
2988
2468
|
_id: Joi.string().allow(""),
|
|
2989
2469
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2990
2470
|
});
|
|
2991
2471
|
}
|
|
2992
2472
|
|
|
2993
|
-
/** @returns {
|
|
2994
|
-
static
|
|
2473
|
+
/** @returns {PromotionsResponse} */
|
|
2474
|
+
static PromotionsResponse() {
|
|
2995
2475
|
return Joi.object({
|
|
2996
2476
|
items: Joi.array().items(CartPlatformModel.PromotionListItem()),
|
|
2997
2477
|
page: CartPlatformModel.Page(),
|
|
@@ -3007,40 +2487,12 @@ class CartPlatformModel {
|
|
|
3007
2487
|
promo_group: Joi.string().allow("").required(),
|
|
3008
2488
|
mode: Joi.string().allow("").required(),
|
|
3009
2489
|
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(),
|
|
2490
|
+
display_meta: CartPlatformModel.DisplayMeta1().required(),
|
|
2491
|
+
ownership: CartPlatformModel.Ownership1().required(),
|
|
3042
2492
|
promotion_type: Joi.string().allow("").required(),
|
|
3043
|
-
discount_rules: Joi.array()
|
|
2493
|
+
discount_rules: Joi.array()
|
|
2494
|
+
.items(CartPlatformModel.DiscountRule())
|
|
2495
|
+
.required(),
|
|
3044
2496
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
3045
2497
|
currency: Joi.string().allow(""),
|
|
3046
2498
|
code: Joi.string().allow(""),
|
|
@@ -3050,8 +2502,10 @@ class CartPlatformModel {
|
|
|
3050
2502
|
author: CartPlatformModel.PromotionAuthor(),
|
|
3051
2503
|
visiblility: CartPlatformModel.Visibility(),
|
|
3052
2504
|
application_id: Joi.string().allow("").required(),
|
|
3053
|
-
buy_rules:
|
|
3054
|
-
|
|
2505
|
+
buy_rules: Joi.object()
|
|
2506
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2507
|
+
.required(),
|
|
2508
|
+
_custom_json: Joi.any(),
|
|
3055
2509
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3056
2510
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3057
2511
|
});
|
|
@@ -3063,45 +2517,15 @@ class CartPlatformModel {
|
|
|
3063
2517
|
stackable: Joi.boolean(),
|
|
3064
2518
|
calculate_on: Joi.string().allow(""),
|
|
3065
2519
|
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
2520
|
promo_group: Joi.string().allow("").required(),
|
|
3099
2521
|
mode: Joi.string().allow("").required(),
|
|
3100
2522
|
apply_all_discount: Joi.boolean(),
|
|
3101
|
-
display_meta: CartPlatformModel.DisplayMeta1(),
|
|
3102
|
-
ownership: CartPlatformModel.Ownership1(),
|
|
2523
|
+
display_meta: CartPlatformModel.DisplayMeta1().required(),
|
|
2524
|
+
ownership: CartPlatformModel.Ownership1().required(),
|
|
3103
2525
|
promotion_type: Joi.string().allow("").required(),
|
|
3104
|
-
discount_rules: Joi.array()
|
|
2526
|
+
discount_rules: Joi.array()
|
|
2527
|
+
.items(CartPlatformModel.DiscountRule())
|
|
2528
|
+
.required(),
|
|
3105
2529
|
restrictions: CartPlatformModel.Restrictions1(),
|
|
3106
2530
|
currency: Joi.string().allow(""),
|
|
3107
2531
|
code: Joi.string().allow(""),
|
|
@@ -3111,8 +2535,10 @@ class CartPlatformModel {
|
|
|
3111
2535
|
author: CartPlatformModel.PromotionAuthor(),
|
|
3112
2536
|
visiblility: CartPlatformModel.Visibility(),
|
|
3113
2537
|
application_id: Joi.string().allow("").required(),
|
|
3114
|
-
buy_rules:
|
|
3115
|
-
|
|
2538
|
+
buy_rules: Joi.object()
|
|
2539
|
+
.pattern(/\S/, CartPlatformModel.ItemCriteria())
|
|
2540
|
+
.required(),
|
|
2541
|
+
_custom_json: Joi.any(),
|
|
3116
2542
|
date_meta: CartPlatformModel.PromotionDateMeta(),
|
|
3117
2543
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3118
2544
|
});
|
|
@@ -3126,8 +2552,8 @@ class CartPlatformModel {
|
|
|
3126
2552
|
});
|
|
3127
2553
|
}
|
|
3128
2554
|
|
|
3129
|
-
/** @returns {
|
|
3130
|
-
static
|
|
2555
|
+
/** @returns {ActivePromosResponse} */
|
|
2556
|
+
static ActivePromosResponse() {
|
|
3131
2557
|
return Joi.object({
|
|
3132
2558
|
entity_slug: Joi.string().allow(""),
|
|
3133
2559
|
title: Joi.string().allow(""),
|
|
@@ -3196,14 +2622,14 @@ class CartPlatformModel {
|
|
|
3196
2622
|
type: Joi.string().allow(""),
|
|
3197
2623
|
article_id: Joi.string().allow("").required(),
|
|
3198
2624
|
quantity: Joi.number(),
|
|
3199
|
-
meta: Joi.
|
|
2625
|
+
meta: Joi.any(),
|
|
3200
2626
|
});
|
|
3201
2627
|
}
|
|
3202
2628
|
|
|
3203
2629
|
/** @returns {PriceAdjustmentRestrictions} */
|
|
3204
2630
|
static PriceAdjustmentRestrictions() {
|
|
3205
2631
|
return Joi.object({
|
|
3206
|
-
post_order: Joi.
|
|
2632
|
+
post_order: Joi.any(),
|
|
3207
2633
|
});
|
|
3208
2634
|
}
|
|
3209
2635
|
|
|
@@ -3229,7 +2655,8 @@ class CartPlatformModel {
|
|
|
3229
2655
|
allowed_refund: Joi.boolean(),
|
|
3230
2656
|
is_authenticated: Joi.boolean().required(),
|
|
3231
2657
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3232
|
-
|
|
2658
|
+
auto_remove: Joi.boolean(),
|
|
2659
|
+
meta: Joi.any(),
|
|
3233
2660
|
cart_id: Joi.string().allow("").required(),
|
|
3234
2661
|
});
|
|
3235
2662
|
}
|
|
@@ -3248,20 +2675,21 @@ class CartPlatformModel {
|
|
|
3248
2675
|
allowed_refund: Joi.boolean(),
|
|
3249
2676
|
is_authenticated: Joi.boolean().required(),
|
|
3250
2677
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3251
|
-
|
|
2678
|
+
auto_remove: Joi.boolean(),
|
|
2679
|
+
meta: Joi.any(),
|
|
3252
2680
|
cart_id: Joi.string().allow("").required(),
|
|
3253
2681
|
});
|
|
3254
2682
|
}
|
|
3255
2683
|
|
|
3256
|
-
/** @returns {
|
|
3257
|
-
static
|
|
2684
|
+
/** @returns {PriceAdjustmentResponse} */
|
|
2685
|
+
static PriceAdjustmentResponse() {
|
|
3258
2686
|
return Joi.object({
|
|
3259
2687
|
data: CartPlatformModel.PriceAdjustment(),
|
|
3260
2688
|
});
|
|
3261
2689
|
}
|
|
3262
2690
|
|
|
3263
|
-
/** @returns {
|
|
3264
|
-
static
|
|
2691
|
+
/** @returns {GetPriceAdjustmentResponse} */
|
|
2692
|
+
static GetPriceAdjustmentResponse() {
|
|
3265
2693
|
return Joi.object({
|
|
3266
2694
|
data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
|
|
3267
2695
|
});
|
|
@@ -3281,8 +2709,9 @@ class CartPlatformModel {
|
|
|
3281
2709
|
allowed_refund: Joi.boolean(),
|
|
3282
2710
|
is_authenticated: Joi.boolean().required(),
|
|
3283
2711
|
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
3284
|
-
meta: Joi.
|
|
2712
|
+
meta: Joi.any(),
|
|
3285
2713
|
cart_id: Joi.string().allow("").required(),
|
|
2714
|
+
auto_remove: Joi.boolean(),
|
|
3286
2715
|
});
|
|
3287
2716
|
}
|
|
3288
2717
|
|
|
@@ -3295,8 +2724,8 @@ class CartPlatformModel {
|
|
|
3295
2724
|
});
|
|
3296
2725
|
}
|
|
3297
2726
|
|
|
3298
|
-
/** @returns {
|
|
3299
|
-
static
|
|
2727
|
+
/** @returns {OpenapiCartDetailsRequest} */
|
|
2728
|
+
static OpenapiCartDetailsRequest() {
|
|
3300
2729
|
return Joi.object({
|
|
3301
2730
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3302
2731
|
});
|
|
@@ -3384,7 +2813,7 @@ class CartPlatformModel {
|
|
|
3384
2813
|
/** @returns {Tags} */
|
|
3385
2814
|
static Tags() {
|
|
3386
2815
|
return Joi.object({
|
|
3387
|
-
tags: Joi.
|
|
2816
|
+
tags: Joi.any(),
|
|
3388
2817
|
});
|
|
3389
2818
|
}
|
|
3390
2819
|
|
|
@@ -3403,28 +2832,12 @@ class CartPlatformModel {
|
|
|
3403
2832
|
});
|
|
3404
2833
|
}
|
|
3405
2834
|
|
|
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
2835
|
/** @returns {ProductAction} */
|
|
3422
2836
|
static ProductAction() {
|
|
3423
2837
|
return Joi.object({
|
|
3424
2838
|
type: Joi.string().allow(""),
|
|
3425
2839
|
url: Joi.string().allow(""),
|
|
3426
2840
|
query: CartPlatformModel.ActionQuery(),
|
|
3427
|
-
page: CartPlatformModel.ProductActionPage(),
|
|
3428
2841
|
});
|
|
3429
2842
|
}
|
|
3430
2843
|
|
|
@@ -3446,12 +2859,12 @@ class CartPlatformModel {
|
|
|
3446
2859
|
action: CartPlatformModel.ProductAction(),
|
|
3447
2860
|
uid: Joi.number(),
|
|
3448
2861
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
3449
|
-
_custom_json: Joi.
|
|
2862
|
+
_custom_json: Joi.any(),
|
|
3450
2863
|
type: Joi.string().allow(""),
|
|
3451
2864
|
name: Joi.string().allow(""),
|
|
3452
2865
|
item_code: Joi.string().allow("").allow(null),
|
|
3453
2866
|
categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
|
|
3454
|
-
attributes: Joi.
|
|
2867
|
+
attributes: Joi.any(),
|
|
3455
2868
|
});
|
|
3456
2869
|
}
|
|
3457
2870
|
|
|
@@ -3488,19 +2901,19 @@ class CartPlatformModel {
|
|
|
3488
2901
|
seller_identifier: Joi.string().allow(""),
|
|
3489
2902
|
quantity: Joi.number(),
|
|
3490
2903
|
seller: CartPlatformModel.BaseInfo(),
|
|
3491
|
-
cart_item_meta: Joi.
|
|
3492
|
-
parent_item_identifiers: Joi.
|
|
2904
|
+
cart_item_meta: Joi.any(),
|
|
2905
|
+
parent_item_identifiers: Joi.any(),
|
|
3493
2906
|
is_gift_visible: Joi.boolean(),
|
|
3494
2907
|
uid: Joi.string().allow(""),
|
|
3495
|
-
gift_card: Joi.
|
|
2908
|
+
gift_card: Joi.any(),
|
|
3496
2909
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
3497
|
-
identifier: Joi.
|
|
2910
|
+
identifier: Joi.any(),
|
|
3498
2911
|
mto_quantity: Joi.number(),
|
|
3499
|
-
extra_meta: Joi.
|
|
2912
|
+
extra_meta: Joi.any(),
|
|
3500
2913
|
type: Joi.string().allow(""),
|
|
3501
|
-
_custom_json: Joi.
|
|
2914
|
+
_custom_json: Joi.any(),
|
|
3502
2915
|
price: CartPlatformModel.ArticlePriceInfo(),
|
|
3503
|
-
meta: Joi.
|
|
2916
|
+
meta: Joi.any(),
|
|
3504
2917
|
size: Joi.string().allow(""),
|
|
3505
2918
|
store: CartPlatformModel.StoreInfo(),
|
|
3506
2919
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -3518,9 +2931,9 @@ class CartPlatformModel {
|
|
|
3518
2931
|
/** @returns {DiscountRulesApp} */
|
|
3519
2932
|
static DiscountRulesApp() {
|
|
3520
2933
|
return Joi.object({
|
|
3521
|
-
offer: Joi.
|
|
3522
|
-
raw_offer: Joi.
|
|
3523
|
-
item_criteria: Joi.
|
|
2934
|
+
offer: Joi.any(),
|
|
2935
|
+
raw_offer: Joi.any(),
|
|
2936
|
+
item_criteria: Joi.any(),
|
|
3524
2937
|
matched_buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
3525
2938
|
});
|
|
3526
2939
|
}
|
|
@@ -3538,8 +2951,8 @@ class CartPlatformModel {
|
|
|
3538
2951
|
/** @returns {BuyRules} */
|
|
3539
2952
|
static BuyRules() {
|
|
3540
2953
|
return Joi.object({
|
|
3541
|
-
cart_conditions: Joi.
|
|
3542
|
-
item_criteria: Joi.
|
|
2954
|
+
cart_conditions: Joi.any(),
|
|
2955
|
+
item_criteria: Joi.any(),
|
|
3543
2956
|
});
|
|
3544
2957
|
}
|
|
3545
2958
|
|
|
@@ -3557,11 +2970,12 @@ class CartPlatformModel {
|
|
|
3557
2970
|
buy_rules: Joi.array().items(CartPlatformModel.BuyRules()),
|
|
3558
2971
|
offer_text: Joi.string().allow(""),
|
|
3559
2972
|
amount: Joi.number(),
|
|
2973
|
+
float_amount: Joi.string().allow(""),
|
|
3560
2974
|
promotion_type: Joi.string().allow(""),
|
|
3561
2975
|
mrp_promotion: Joi.boolean(),
|
|
3562
2976
|
promotion_group: Joi.string().allow(""),
|
|
3563
2977
|
promo_id: Joi.string().allow(""),
|
|
3564
|
-
meta: Joi.
|
|
2978
|
+
meta: Joi.any(),
|
|
3565
2979
|
code: Joi.string().allow("").allow(null),
|
|
3566
2980
|
});
|
|
3567
2981
|
}
|
|
@@ -3671,7 +3085,7 @@ class CartPlatformModel {
|
|
|
3671
3085
|
quantity: Joi.number(),
|
|
3672
3086
|
product: CartPlatformModel.CartProduct(),
|
|
3673
3087
|
product_ean_id: Joi.string().allow(""),
|
|
3674
|
-
parent_item_identifiers: Joi.
|
|
3088
|
+
parent_item_identifiers: Joi.any(),
|
|
3675
3089
|
is_set: Joi.boolean(),
|
|
3676
3090
|
article: CartPlatformModel.ProductArticle(),
|
|
3677
3091
|
promotions_applied: Joi.array().items(
|
|
@@ -3680,22 +3094,22 @@ class CartPlatformModel {
|
|
|
3680
3094
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3681
3095
|
key: Joi.string().allow(""),
|
|
3682
3096
|
coupon: CartPlatformModel.CouponDetails(),
|
|
3683
|
-
bulk_offer: Joi.
|
|
3097
|
+
bulk_offer: Joi.any(),
|
|
3684
3098
|
price: CartPlatformModel.ProductPriceInfo(),
|
|
3685
3099
|
coupon_message: Joi.string().allow(""),
|
|
3686
3100
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
3687
3101
|
message: Joi.string().allow(""),
|
|
3688
3102
|
discount: Joi.string().allow(""),
|
|
3689
3103
|
availability: CartPlatformModel.ProductAvailability(),
|
|
3690
|
-
moq: Joi.
|
|
3104
|
+
moq: Joi.any(),
|
|
3691
3105
|
price_per_unit: CartPlatformModel.ProductPriceInfo(),
|
|
3692
3106
|
promo_meta: CartPlatformModel.PromoMeta(),
|
|
3693
|
-
custom_order: Joi.
|
|
3107
|
+
custom_order: Joi.any(),
|
|
3694
3108
|
});
|
|
3695
3109
|
}
|
|
3696
3110
|
|
|
3697
|
-
/** @returns {
|
|
3698
|
-
static
|
|
3111
|
+
/** @returns {OpenapiCartDetailsResponse} */
|
|
3112
|
+
static OpenapiCartDetailsResponse() {
|
|
3699
3113
|
return Joi.object({
|
|
3700
3114
|
is_valid: Joi.boolean(),
|
|
3701
3115
|
message: Joi.string().allow(""),
|
|
@@ -3704,12 +3118,12 @@ class CartPlatformModel {
|
|
|
3704
3118
|
});
|
|
3705
3119
|
}
|
|
3706
3120
|
|
|
3707
|
-
/** @returns {
|
|
3708
|
-
static
|
|
3121
|
+
/** @returns {OpenApiErrorResponse} */
|
|
3122
|
+
static OpenApiErrorResponse() {
|
|
3709
3123
|
return Joi.object({
|
|
3710
3124
|
success: Joi.boolean(),
|
|
3711
3125
|
message: Joi.string().allow(""),
|
|
3712
|
-
errors: Joi.
|
|
3126
|
+
errors: Joi.any(),
|
|
3713
3127
|
});
|
|
3714
3128
|
}
|
|
3715
3129
|
|
|
@@ -3723,7 +3137,7 @@ class CartPlatformModel {
|
|
|
3723
3137
|
area_code: Joi.string().allow("").required(),
|
|
3724
3138
|
country_iso_code: Joi.string().allow(""),
|
|
3725
3139
|
country_phone_code: Joi.string().allow(""),
|
|
3726
|
-
meta: Joi.
|
|
3140
|
+
meta: Joi.any(),
|
|
3727
3141
|
address_type: Joi.string().allow(""),
|
|
3728
3142
|
area: Joi.string().allow(""),
|
|
3729
3143
|
area_code_slug: Joi.string().allow(""),
|
|
@@ -3736,16 +3150,16 @@ class CartPlatformModel {
|
|
|
3736
3150
|
});
|
|
3737
3151
|
}
|
|
3738
3152
|
|
|
3739
|
-
/** @returns {
|
|
3740
|
-
static
|
|
3153
|
+
/** @returns {OpenApiCartServiceabilityRequest} */
|
|
3154
|
+
static OpenApiCartServiceabilityRequest() {
|
|
3741
3155
|
return Joi.object({
|
|
3742
3156
|
cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
|
|
3743
3157
|
shipping_address: CartPlatformModel.ShippingAddress().required(),
|
|
3744
3158
|
});
|
|
3745
3159
|
}
|
|
3746
3160
|
|
|
3747
|
-
/** @returns {
|
|
3748
|
-
static
|
|
3161
|
+
/** @returns {OpenApiCartServiceabilityResponse} */
|
|
3162
|
+
static OpenApiCartServiceabilityResponse() {
|
|
3749
3163
|
return Joi.object({
|
|
3750
3164
|
is_valid: Joi.boolean(),
|
|
3751
3165
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3776,7 +3190,7 @@ class CartPlatformModel {
|
|
|
3776
3190
|
return Joi.object({
|
|
3777
3191
|
payment_id: Joi.string().allow("").allow(null),
|
|
3778
3192
|
payment_gateway: Joi.string().allow("").allow(null),
|
|
3779
|
-
extra_meta: Joi.
|
|
3193
|
+
extra_meta: Joi.any().allow(null),
|
|
3780
3194
|
current_status: Joi.string().allow("").allow(null),
|
|
3781
3195
|
order_id: Joi.string().allow("").allow(null),
|
|
3782
3196
|
});
|
|
@@ -3804,7 +3218,7 @@ class CartPlatformModel {
|
|
|
3804
3218
|
price_marked: Joi.number().required(),
|
|
3805
3219
|
files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
|
|
3806
3220
|
meta: CartPlatformModel.CartItemMeta(),
|
|
3807
|
-
extra_meta: Joi.
|
|
3221
|
+
extra_meta: Joi.any(),
|
|
3808
3222
|
product_id: Joi.number().required(),
|
|
3809
3223
|
loyalty_discount: Joi.number(),
|
|
3810
3224
|
discount: Joi.number().required(),
|
|
@@ -3831,7 +3245,7 @@ class CartPlatformModel {
|
|
|
3831
3245
|
payment_methods: Joi.array()
|
|
3832
3246
|
.items(CartPlatformModel.MultiTenderPaymentMethod())
|
|
3833
3247
|
.required(),
|
|
3834
|
-
employee_discount: Joi.
|
|
3248
|
+
employee_discount: Joi.any(),
|
|
3835
3249
|
coupon: Joi.string().allow(""),
|
|
3836
3250
|
cashback_applied: Joi.number().required(),
|
|
3837
3251
|
gstin: Joi.string().allow("").allow(null),
|
|
@@ -3847,8 +3261,8 @@ class CartPlatformModel {
|
|
|
3847
3261
|
});
|
|
3848
3262
|
}
|
|
3849
3263
|
|
|
3850
|
-
/** @returns {
|
|
3851
|
-
static
|
|
3264
|
+
/** @returns {OpenApiCheckoutResponse} */
|
|
3265
|
+
static OpenApiCheckoutResponse() {
|
|
3852
3266
|
return Joi.object({
|
|
3853
3267
|
success: Joi.boolean(),
|
|
3854
3268
|
message: Joi.string().allow(""),
|
|
@@ -3861,48 +3275,46 @@ class CartPlatformModel {
|
|
|
3861
3275
|
static AbandonedCart() {
|
|
3862
3276
|
return Joi.object({
|
|
3863
3277
|
expire_at: Joi.string().allow("").required(),
|
|
3864
|
-
promotion: Joi.
|
|
3278
|
+
promotion: Joi.any(),
|
|
3865
3279
|
is_default: Joi.boolean().required(),
|
|
3866
3280
|
comment: Joi.string().allow("").allow(null),
|
|
3867
3281
|
articles: Joi.array().items(Joi.any()).required(),
|
|
3868
|
-
coupon: Joi.
|
|
3282
|
+
coupon: Joi.any().allow(null),
|
|
3869
3283
|
bulk_coupon_discount: Joi.number().allow(null),
|
|
3870
3284
|
_id: Joi.string().allow("").required(),
|
|
3871
|
-
fynd_credits: Joi.
|
|
3285
|
+
fynd_credits: Joi.any(),
|
|
3872
3286
|
fc_index_map: Joi.array().items(Joi.number()),
|
|
3873
3287
|
order_id: Joi.string().allow(""),
|
|
3874
3288
|
discount: Joi.number(),
|
|
3875
|
-
cod_charges: Joi.
|
|
3876
|
-
payments: Joi.
|
|
3289
|
+
cod_charges: Joi.any(),
|
|
3290
|
+
payments: Joi.any().allow(null),
|
|
3877
3291
|
payment_mode: Joi.string().allow("").allow(null),
|
|
3878
3292
|
shipments: Joi.array().items(Joi.any()),
|
|
3879
|
-
pick_up_customer_details: Joi.
|
|
3880
|
-
.pattern(/\S/, Joi.any())
|
|
3881
|
-
.allow(null, ""),
|
|
3293
|
+
pick_up_customer_details: Joi.any().allow(null),
|
|
3882
3294
|
uid: Joi.number().required(),
|
|
3883
3295
|
checkout_mode: Joi.string().allow(""),
|
|
3884
3296
|
cart_value: Joi.number(),
|
|
3885
3297
|
is_archive: Joi.boolean(),
|
|
3886
3298
|
created_on: Joi.string().allow("").required(),
|
|
3887
3299
|
last_modified: Joi.string().allow("").required(),
|
|
3888
|
-
meta: Joi.
|
|
3300
|
+
meta: Joi.any().allow(null),
|
|
3889
3301
|
buy_now: Joi.boolean(),
|
|
3890
3302
|
is_active: Joi.boolean(),
|
|
3891
|
-
cashback: Joi.
|
|
3303
|
+
cashback: Joi.any().required(),
|
|
3892
3304
|
payment_methods: Joi.array().items(Joi.any()),
|
|
3893
3305
|
gstin: Joi.string().allow("").allow(null),
|
|
3894
|
-
delivery_charges: Joi.
|
|
3306
|
+
delivery_charges: Joi.any(),
|
|
3895
3307
|
merge_qty: Joi.boolean().allow(null),
|
|
3896
3308
|
user_id: Joi.string().allow("").required(),
|
|
3897
3309
|
app_id: Joi.string().allow(""),
|
|
3898
3310
|
});
|
|
3899
3311
|
}
|
|
3900
3312
|
|
|
3901
|
-
/** @returns {
|
|
3902
|
-
static
|
|
3313
|
+
/** @returns {AbandonedCartResponse} */
|
|
3314
|
+
static AbandonedCartResponse() {
|
|
3903
3315
|
return Joi.object({
|
|
3904
3316
|
items: Joi.array().items(CartPlatformModel.AbandonedCart()),
|
|
3905
|
-
result: Joi.
|
|
3317
|
+
result: Joi.any(),
|
|
3906
3318
|
page: CartPlatformModel.Page(),
|
|
3907
3319
|
success: Joi.boolean(),
|
|
3908
3320
|
message: Joi.string().allow(""),
|
|
@@ -3971,14 +3383,14 @@ class CartPlatformModel {
|
|
|
3971
3383
|
});
|
|
3972
3384
|
}
|
|
3973
3385
|
|
|
3974
|
-
/** @returns {
|
|
3975
|
-
static
|
|
3386
|
+
/** @returns {CartDetailResponse} */
|
|
3387
|
+
static CartDetailResponse() {
|
|
3976
3388
|
return Joi.object({
|
|
3977
3389
|
cart_id: Joi.number(),
|
|
3978
3390
|
uid: Joi.string().allow(""),
|
|
3979
3391
|
coupon_text: Joi.string().allow(""),
|
|
3980
3392
|
id: Joi.string().allow(""),
|
|
3981
|
-
pan_config: Joi.
|
|
3393
|
+
pan_config: Joi.any(),
|
|
3982
3394
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
3983
3395
|
comment: Joi.string().allow(""),
|
|
3984
3396
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -3988,7 +3400,7 @@ class CartPlatformModel {
|
|
|
3988
3400
|
coupon: CartPlatformModel.CartDetailCoupon(),
|
|
3989
3401
|
restrict_checkout: Joi.boolean(),
|
|
3990
3402
|
message: Joi.string().allow(""),
|
|
3991
|
-
notification: Joi.
|
|
3403
|
+
notification: Joi.any(),
|
|
3992
3404
|
staff_user_id: Joi.string().allow(""),
|
|
3993
3405
|
success: Joi.boolean(),
|
|
3994
3406
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
@@ -4002,7 +3414,7 @@ class CartPlatformModel {
|
|
|
4002
3414
|
CartPlatformModel.AppliedPromotion()
|
|
4003
3415
|
),
|
|
4004
3416
|
pan_no: Joi.string().allow(""),
|
|
4005
|
-
custom_cart_meta: Joi.
|
|
3417
|
+
custom_cart_meta: Joi.any(),
|
|
4006
3418
|
});
|
|
4007
3419
|
}
|
|
4008
3420
|
|
|
@@ -4017,31 +3429,31 @@ class CartPlatformModel {
|
|
|
4017
3429
|
),
|
|
4018
3430
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
4019
3431
|
article_id: Joi.string().allow(""),
|
|
4020
|
-
article_assignment: Joi.
|
|
3432
|
+
article_assignment: Joi.any(),
|
|
4021
3433
|
store_id: Joi.number(),
|
|
4022
3434
|
display: Joi.string().allow(""),
|
|
4023
3435
|
item_id: Joi.number(),
|
|
4024
|
-
extra_meta: Joi.
|
|
4025
|
-
_custom_json: Joi.
|
|
4026
|
-
meta: Joi.
|
|
3436
|
+
extra_meta: Joi.any(),
|
|
3437
|
+
_custom_json: Joi.any(),
|
|
3438
|
+
meta: Joi.any(),
|
|
4027
3439
|
pos: Joi.boolean(),
|
|
4028
3440
|
seller_identifier: Joi.string().allow(""),
|
|
4029
3441
|
});
|
|
4030
3442
|
}
|
|
4031
3443
|
|
|
4032
|
-
/** @returns {
|
|
4033
|
-
static
|
|
3444
|
+
/** @returns {AddCartRequest} */
|
|
3445
|
+
static AddCartRequest() {
|
|
4034
3446
|
return Joi.object({
|
|
4035
3447
|
new_cart: Joi.boolean(),
|
|
4036
3448
|
items: Joi.array().items(CartPlatformModel.AddProductCart()),
|
|
4037
3449
|
});
|
|
4038
3450
|
}
|
|
4039
3451
|
|
|
4040
|
-
/** @returns {
|
|
4041
|
-
static
|
|
3452
|
+
/** @returns {AddCartDetailResponse} */
|
|
3453
|
+
static AddCartDetailResponse() {
|
|
4042
3454
|
return Joi.object({
|
|
4043
3455
|
success: Joi.boolean(),
|
|
4044
|
-
cart: CartPlatformModel.
|
|
3456
|
+
cart: CartPlatformModel.CartDetailResponse(),
|
|
4045
3457
|
partial: Joi.boolean(),
|
|
4046
3458
|
message: Joi.string().allow(""),
|
|
4047
3459
|
});
|
|
@@ -4052,10 +3464,10 @@ class CartPlatformModel {
|
|
|
4052
3464
|
return Joi.object({
|
|
4053
3465
|
quantity: Joi.number(),
|
|
4054
3466
|
item_size: Joi.string().allow(""),
|
|
4055
|
-
parent_item_identifiers: Joi.
|
|
4056
|
-
meta: Joi.
|
|
4057
|
-
extra_meta: Joi.
|
|
4058
|
-
_custom_json: Joi.
|
|
3467
|
+
parent_item_identifiers: Joi.any(),
|
|
3468
|
+
meta: Joi.any(),
|
|
3469
|
+
extra_meta: Joi.any(),
|
|
3470
|
+
_custom_json: Joi.any(),
|
|
4059
3471
|
item_id: Joi.number(),
|
|
4060
3472
|
item_index: Joi.number(),
|
|
4061
3473
|
identifiers: CartPlatformModel.CartProductIdentifer().required(),
|
|
@@ -4063,31 +3475,19 @@ class CartPlatformModel {
|
|
|
4063
3475
|
});
|
|
4064
3476
|
}
|
|
4065
3477
|
|
|
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() {
|
|
3478
|
+
/** @returns {UpdateCartRequest} */
|
|
3479
|
+
static UpdateCartRequest() {
|
|
4077
3480
|
return Joi.object({
|
|
4078
3481
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4079
|
-
free_gift_items: Joi.array().items(
|
|
4080
|
-
CartPlatformModel.FreeGiftItemCreation()
|
|
4081
|
-
),
|
|
4082
3482
|
operation: Joi.string().allow("").required(),
|
|
4083
3483
|
});
|
|
4084
3484
|
}
|
|
4085
3485
|
|
|
4086
|
-
/** @returns {
|
|
4087
|
-
static
|
|
3486
|
+
/** @returns {UpdateCartDetailResponse} */
|
|
3487
|
+
static UpdateCartDetailResponse() {
|
|
4088
3488
|
return Joi.object({
|
|
4089
3489
|
success: Joi.boolean(),
|
|
4090
|
-
cart: CartPlatformModel.
|
|
3490
|
+
cart: CartPlatformModel.CartDetailResponse(),
|
|
4091
3491
|
message: Joi.string().allow(""),
|
|
4092
3492
|
});
|
|
4093
3493
|
}
|
|
@@ -4113,7 +3513,7 @@ class CartPlatformModel {
|
|
|
4113
3513
|
price_marked: Joi.number().required(),
|
|
4114
3514
|
amount_paid: Joi.number().required(),
|
|
4115
3515
|
promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
|
|
4116
|
-
extra_meta: Joi.
|
|
3516
|
+
extra_meta: Joi.any(),
|
|
4117
3517
|
item_id: Joi.number().required(),
|
|
4118
3518
|
discount: Joi.number().required(),
|
|
4119
3519
|
price_effective: Joi.number().required(),
|
|
@@ -4125,9 +3525,9 @@ class CartPlatformModel {
|
|
|
4125
3525
|
return Joi.object({
|
|
4126
3526
|
cart_id: Joi.string().allow("").required(),
|
|
4127
3527
|
payment_mode: Joi.string().allow("").required(),
|
|
4128
|
-
billing_address: Joi.
|
|
3528
|
+
billing_address: Joi.any(),
|
|
4129
3529
|
merchant_code: Joi.string().allow("").required(),
|
|
4130
|
-
payment_identifier: Joi.string().allow("").required(),
|
|
3530
|
+
payment_identifier: Joi.string().allow("").allow(null).required(),
|
|
4131
3531
|
currency_code: Joi.string().allow("").required(),
|
|
4132
3532
|
aggregator: Joi.string().allow("").required(),
|
|
4133
3533
|
order_type: Joi.string().allow("").required(),
|
|
@@ -4136,31 +3536,31 @@ class CartPlatformModel {
|
|
|
4136
3536
|
.items(CartPlatformModel.OverrideCartItem())
|
|
4137
3537
|
.required(),
|
|
4138
3538
|
ordering_store: Joi.number().allow(null),
|
|
4139
|
-
shipping_address: Joi.
|
|
3539
|
+
shipping_address: Joi.any(),
|
|
4140
3540
|
});
|
|
4141
3541
|
}
|
|
4142
3542
|
|
|
4143
|
-
/** @returns {
|
|
4144
|
-
static
|
|
3543
|
+
/** @returns {OverrideCheckoutResponse} */
|
|
3544
|
+
static OverrideCheckoutResponse() {
|
|
4145
3545
|
return Joi.object({
|
|
4146
|
-
data: Joi.
|
|
4147
|
-
cart: Joi.
|
|
3546
|
+
data: Joi.any().required(),
|
|
3547
|
+
cart: Joi.any().required(),
|
|
4148
3548
|
success: Joi.string().allow("").required(),
|
|
4149
3549
|
order_id: Joi.string().allow("").required(),
|
|
4150
3550
|
message: Joi.string().allow("").required(),
|
|
4151
3551
|
});
|
|
4152
3552
|
}
|
|
4153
3553
|
|
|
4154
|
-
/** @returns {
|
|
4155
|
-
static
|
|
3554
|
+
/** @returns {GetShareCartLinkRequest} */
|
|
3555
|
+
static GetShareCartLinkRequest() {
|
|
4156
3556
|
return Joi.object({
|
|
4157
3557
|
id: Joi.string().allow(""),
|
|
4158
|
-
meta: Joi.
|
|
3558
|
+
meta: Joi.any(),
|
|
4159
3559
|
});
|
|
4160
3560
|
}
|
|
4161
3561
|
|
|
4162
|
-
/** @returns {
|
|
4163
|
-
static
|
|
3562
|
+
/** @returns {GetShareCartLinkResponse} */
|
|
3563
|
+
static GetShareCartLinkResponse() {
|
|
4164
3564
|
return Joi.object({
|
|
4165
3565
|
token: Joi.string().allow(""),
|
|
4166
3566
|
share_url: Joi.string().allow(""),
|
|
@@ -4170,11 +3570,11 @@ class CartPlatformModel {
|
|
|
4170
3570
|
/** @returns {SharedCartDetails} */
|
|
4171
3571
|
static SharedCartDetails() {
|
|
4172
3572
|
return Joi.object({
|
|
4173
|
-
source: Joi.
|
|
4174
|
-
user: Joi.
|
|
3573
|
+
source: Joi.any(),
|
|
3574
|
+
user: Joi.any(),
|
|
4175
3575
|
token: Joi.string().allow(""),
|
|
4176
3576
|
created_on: Joi.string().allow(""),
|
|
4177
|
-
meta: Joi.
|
|
3577
|
+
meta: Joi.any(),
|
|
4178
3578
|
});
|
|
4179
3579
|
}
|
|
4180
3580
|
|
|
@@ -4200,12 +3600,12 @@ class CartPlatformModel {
|
|
|
4200
3600
|
buy_now: Joi.boolean(),
|
|
4201
3601
|
cart_id: Joi.number(),
|
|
4202
3602
|
gstin: Joi.string().allow(""),
|
|
4203
|
-
custom_cart_meta: Joi.
|
|
3603
|
+
custom_cart_meta: Joi.any(),
|
|
4204
3604
|
});
|
|
4205
3605
|
}
|
|
4206
3606
|
|
|
4207
|
-
/** @returns {
|
|
4208
|
-
static
|
|
3607
|
+
/** @returns {SharedCartResponse} */
|
|
3608
|
+
static SharedCartResponse() {
|
|
4209
3609
|
return Joi.object({
|
|
4210
3610
|
cart: CartPlatformModel.SharedCart(),
|
|
4211
3611
|
error: Joi.string().allow(""),
|
|
@@ -4216,7 +3616,7 @@ class CartPlatformModel {
|
|
|
4216
3616
|
static CartList() {
|
|
4217
3617
|
return Joi.object({
|
|
4218
3618
|
cart_id: Joi.string().allow(""),
|
|
4219
|
-
pick_up_customer_details: Joi.
|
|
3619
|
+
pick_up_customer_details: Joi.any(),
|
|
4220
3620
|
cart_value: Joi.number(),
|
|
4221
3621
|
created_on: Joi.string().allow(""),
|
|
4222
3622
|
user_id: Joi.string().allow(""),
|
|
@@ -4225,8 +3625,8 @@ class CartPlatformModel {
|
|
|
4225
3625
|
});
|
|
4226
3626
|
}
|
|
4227
3627
|
|
|
4228
|
-
/** @returns {
|
|
4229
|
-
static
|
|
3628
|
+
/** @returns {MultiCartResponse} */
|
|
3629
|
+
static MultiCartResponse() {
|
|
4230
3630
|
return Joi.object({
|
|
4231
3631
|
success: Joi.boolean(),
|
|
4232
3632
|
data: Joi.array().items(CartPlatformModel.CartList()),
|
|
@@ -4255,13 +3655,13 @@ class CartPlatformModel {
|
|
|
4255
3655
|
});
|
|
4256
3656
|
}
|
|
4257
3657
|
|
|
4258
|
-
/** @returns {
|
|
4259
|
-
static
|
|
3658
|
+
/** @returns {UserCartMappingResponse} */
|
|
3659
|
+
static UserCartMappingResponse() {
|
|
4260
3660
|
return Joi.object({
|
|
4261
3661
|
coupon_text: Joi.string().allow(""),
|
|
4262
3662
|
user: CartPlatformModel.UserInfo(),
|
|
4263
3663
|
id: Joi.string().allow(""),
|
|
4264
|
-
pan_config: Joi.
|
|
3664
|
+
pan_config: Joi.any(),
|
|
4265
3665
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
4266
3666
|
comment: Joi.string().allow(""),
|
|
4267
3667
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -4276,7 +3676,7 @@ class CartPlatformModel {
|
|
|
4276
3676
|
last_modified: Joi.string().allow(""),
|
|
4277
3677
|
buy_now: Joi.boolean(),
|
|
4278
3678
|
gstin: Joi.string().allow(""),
|
|
4279
|
-
custom_cart_meta: Joi.
|
|
3679
|
+
custom_cart_meta: Joi.any(),
|
|
4280
3680
|
applied_promo_details: Joi.array().items(
|
|
4281
3681
|
CartPlatformModel.AppliedPromotion()
|
|
4282
3682
|
),
|
|
@@ -4284,8 +3684,8 @@ class CartPlatformModel {
|
|
|
4284
3684
|
});
|
|
4285
3685
|
}
|
|
4286
3686
|
|
|
4287
|
-
/** @returns {
|
|
4288
|
-
static
|
|
3687
|
+
/** @returns {PlatformAddCartRequest} */
|
|
3688
|
+
static PlatformAddCartRequest() {
|
|
4289
3689
|
return Joi.object({
|
|
4290
3690
|
user_id: Joi.string().allow(""),
|
|
4291
3691
|
new_cart: Joi.boolean(),
|
|
@@ -4293,35 +3693,32 @@ class CartPlatformModel {
|
|
|
4293
3693
|
});
|
|
4294
3694
|
}
|
|
4295
3695
|
|
|
4296
|
-
/** @returns {
|
|
4297
|
-
static
|
|
3696
|
+
/** @returns {PlatformUpdateCartRequest} */
|
|
3697
|
+
static PlatformUpdateCartRequest() {
|
|
4298
3698
|
return Joi.object({
|
|
4299
3699
|
user_id: Joi.string().allow(""),
|
|
4300
3700
|
items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
|
|
4301
|
-
free_gift_items: Joi.array().items(
|
|
4302
|
-
CartPlatformModel.FreeGiftItemCreation()
|
|
4303
|
-
),
|
|
4304
3701
|
operation: Joi.string().allow("").required(),
|
|
4305
3702
|
});
|
|
4306
3703
|
}
|
|
4307
3704
|
|
|
4308
|
-
/** @returns {
|
|
4309
|
-
static
|
|
3705
|
+
/** @returns {DeleteCartRequest} */
|
|
3706
|
+
static DeleteCartRequest() {
|
|
4310
3707
|
return Joi.object({
|
|
4311
3708
|
cart_id_list: Joi.array().items(Joi.string().allow("")),
|
|
4312
3709
|
});
|
|
4313
3710
|
}
|
|
4314
3711
|
|
|
4315
|
-
/** @returns {
|
|
4316
|
-
static
|
|
3712
|
+
/** @returns {DeleteCartDetailResponse} */
|
|
3713
|
+
static DeleteCartDetailResponse() {
|
|
4317
3714
|
return Joi.object({
|
|
4318
3715
|
success: Joi.boolean(),
|
|
4319
3716
|
message: Joi.string().allow(""),
|
|
4320
3717
|
});
|
|
4321
3718
|
}
|
|
4322
3719
|
|
|
4323
|
-
/** @returns {
|
|
4324
|
-
static
|
|
3720
|
+
/** @returns {CartItemCountResponse} */
|
|
3721
|
+
static CartItemCountResponse() {
|
|
4325
3722
|
return Joi.object({
|
|
4326
3723
|
user_cart_items_count: Joi.number(),
|
|
4327
3724
|
});
|
|
@@ -4359,16 +3756,16 @@ class CartPlatformModel {
|
|
|
4359
3756
|
});
|
|
4360
3757
|
}
|
|
4361
3758
|
|
|
4362
|
-
/** @returns {
|
|
4363
|
-
static
|
|
3759
|
+
/** @returns {GetCouponResponse} */
|
|
3760
|
+
static GetCouponResponse() {
|
|
4364
3761
|
return Joi.object({
|
|
4365
3762
|
available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
|
|
4366
3763
|
page: CartPlatformModel.PageCoupon(),
|
|
4367
3764
|
});
|
|
4368
3765
|
}
|
|
4369
3766
|
|
|
4370
|
-
/** @returns {
|
|
4371
|
-
static
|
|
3767
|
+
/** @returns {ApplyCouponRequest} */
|
|
3768
|
+
static ApplyCouponRequest() {
|
|
4372
3769
|
return Joi.object({
|
|
4373
3770
|
coupon_code: Joi.string().allow("").required(),
|
|
4374
3771
|
});
|
|
@@ -4399,10 +3796,10 @@ class CartPlatformModel {
|
|
|
4399
3796
|
email: Joi.string().allow(""),
|
|
4400
3797
|
area_code: Joi.string().allow(""),
|
|
4401
3798
|
checkout_mode: Joi.string().allow(""),
|
|
4402
|
-
meta: Joi.
|
|
3799
|
+
meta: Joi.any(),
|
|
4403
3800
|
is_active: Joi.boolean(),
|
|
4404
3801
|
name: Joi.string().allow(""),
|
|
4405
|
-
google_map_point: Joi.
|
|
3802
|
+
google_map_point: Joi.any(),
|
|
4406
3803
|
cart_id: Joi.string().allow(""),
|
|
4407
3804
|
city: Joi.string().allow(""),
|
|
4408
3805
|
sector: Joi.string().allow(""),
|
|
@@ -4413,28 +3810,19 @@ class CartPlatformModel {
|
|
|
4413
3810
|
address: Joi.string().allow(""),
|
|
4414
3811
|
country_phone_code: Joi.string().allow(""),
|
|
4415
3812
|
country_iso_code: Joi.string().allow(""),
|
|
4416
|
-
_custom_json: Joi.
|
|
3813
|
+
_custom_json: Joi.any(),
|
|
4417
3814
|
});
|
|
4418
3815
|
}
|
|
4419
3816
|
|
|
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() {
|
|
3817
|
+
/** @returns {PlatformGetAddressesResponse} */
|
|
3818
|
+
static PlatformGetAddressesResponse() {
|
|
4430
3819
|
return Joi.object({
|
|
4431
3820
|
address: Joi.array().items(CartPlatformModel.PlatformAddress()),
|
|
4432
|
-
validation_config: CartPlatformModel.ValidationConfig(),
|
|
4433
3821
|
});
|
|
4434
3822
|
}
|
|
4435
3823
|
|
|
4436
|
-
/** @returns {
|
|
4437
|
-
static
|
|
3824
|
+
/** @returns {SaveAddressResponse} */
|
|
3825
|
+
static SaveAddressResponse() {
|
|
4438
3826
|
return Joi.object({
|
|
4439
3827
|
id: Joi.string().allow(""),
|
|
4440
3828
|
success: Joi.boolean(),
|
|
@@ -4442,8 +3830,8 @@ class CartPlatformModel {
|
|
|
4442
3830
|
});
|
|
4443
3831
|
}
|
|
4444
3832
|
|
|
4445
|
-
/** @returns {
|
|
4446
|
-
static
|
|
3833
|
+
/** @returns {UpdateAddressResponse} */
|
|
3834
|
+
static UpdateAddressResponse() {
|
|
4447
3835
|
return Joi.object({
|
|
4448
3836
|
id: Joi.string().allow(""),
|
|
4449
3837
|
is_default_address: Joi.boolean(),
|
|
@@ -4452,16 +3840,16 @@ class CartPlatformModel {
|
|
|
4452
3840
|
});
|
|
4453
3841
|
}
|
|
4454
3842
|
|
|
4455
|
-
/** @returns {
|
|
4456
|
-
static
|
|
3843
|
+
/** @returns {DeleteAddressResponse} */
|
|
3844
|
+
static DeleteAddressResponse() {
|
|
4457
3845
|
return Joi.object({
|
|
4458
3846
|
id: Joi.string().allow(""),
|
|
4459
3847
|
is_deleted: Joi.boolean(),
|
|
4460
3848
|
});
|
|
4461
3849
|
}
|
|
4462
3850
|
|
|
4463
|
-
/** @returns {
|
|
4464
|
-
static
|
|
3851
|
+
/** @returns {PlatformSelectCartAddressRequest} */
|
|
3852
|
+
static PlatformSelectCartAddressRequest() {
|
|
4465
3853
|
return Joi.object({
|
|
4466
3854
|
cart_id: Joi.string().allow(""),
|
|
4467
3855
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -4480,13 +3868,13 @@ class CartPlatformModel {
|
|
|
4480
3868
|
});
|
|
4481
3869
|
}
|
|
4482
3870
|
|
|
4483
|
-
/** @returns {
|
|
4484
|
-
static
|
|
3871
|
+
/** @returns {PlatformShipmentResponse} */
|
|
3872
|
+
static PlatformShipmentResponse() {
|
|
4485
3873
|
return Joi.object({
|
|
4486
3874
|
shipments: Joi.number(),
|
|
4487
3875
|
fulfillment_id: Joi.number(),
|
|
4488
3876
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
4489
|
-
dp_options: Joi.
|
|
3877
|
+
dp_options: Joi.any().allow(null),
|
|
4490
3878
|
shipment_type: Joi.string().allow(""),
|
|
4491
3879
|
order_type: Joi.string().allow(""),
|
|
4492
3880
|
box_type: Joi.string().allow("").allow(null),
|
|
@@ -4497,12 +3885,12 @@ class CartPlatformModel {
|
|
|
4497
3885
|
});
|
|
4498
3886
|
}
|
|
4499
3887
|
|
|
4500
|
-
/** @returns {
|
|
4501
|
-
static
|
|
3888
|
+
/** @returns {PlatformCartShipmentsResponse} */
|
|
3889
|
+
static PlatformCartShipmentsResponse() {
|
|
4502
3890
|
return Joi.object({
|
|
4503
3891
|
coupon_text: Joi.string().allow(""),
|
|
4504
3892
|
id: Joi.string().allow(""),
|
|
4505
|
-
pan_config: Joi.
|
|
3893
|
+
pan_config: Joi.any(),
|
|
4506
3894
|
delivery_promise: CartPlatformModel.ShipmentPromise(),
|
|
4507
3895
|
comment: Joi.string().allow(""),
|
|
4508
3896
|
items: Joi.array().items(CartPlatformModel.CartProductInfo()),
|
|
@@ -4513,7 +3901,9 @@ class CartPlatformModel {
|
|
|
4513
3901
|
breakup_values: CartPlatformModel.CartBreakup(),
|
|
4514
3902
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
4515
3903
|
is_valid: Joi.boolean(),
|
|
4516
|
-
shipments: Joi.array().items(
|
|
3904
|
+
shipments: Joi.array().items(
|
|
3905
|
+
CartPlatformModel.PlatformShipmentResponse()
|
|
3906
|
+
),
|
|
4517
3907
|
currency: CartPlatformModel.CartCurrency(),
|
|
4518
3908
|
checkout_mode: Joi.string().allow(""),
|
|
4519
3909
|
last_modified: Joi.string().allow(""),
|
|
@@ -4524,7 +3914,7 @@ class CartPlatformModel {
|
|
|
4524
3914
|
),
|
|
4525
3915
|
error: Joi.boolean(),
|
|
4526
3916
|
pan_no: Joi.string().allow(""),
|
|
4527
|
-
custom_cart_meta: Joi.
|
|
3917
|
+
custom_cart_meta: Joi.any(),
|
|
4528
3918
|
});
|
|
4529
3919
|
}
|
|
4530
3920
|
|
|
@@ -4537,8 +3927,8 @@ class CartPlatformModel {
|
|
|
4537
3927
|
});
|
|
4538
3928
|
}
|
|
4539
3929
|
|
|
4540
|
-
/** @returns {
|
|
4541
|
-
static
|
|
3930
|
+
/** @returns {UpdateCartShipmentRequest} */
|
|
3931
|
+
static UpdateCartShipmentRequest() {
|
|
4542
3932
|
return Joi.object({
|
|
4543
3933
|
shipments: Joi.array()
|
|
4544
3934
|
.items(CartPlatformModel.UpdateCartShipmentItem())
|
|
@@ -4546,29 +3936,29 @@ class CartPlatformModel {
|
|
|
4546
3936
|
});
|
|
4547
3937
|
}
|
|
4548
3938
|
|
|
4549
|
-
/** @returns {
|
|
4550
|
-
static
|
|
3939
|
+
/** @returns {PlatformCartMetaRequest} */
|
|
3940
|
+
static PlatformCartMetaRequest() {
|
|
4551
3941
|
return Joi.object({
|
|
4552
3942
|
gstin: Joi.string().allow(""),
|
|
4553
|
-
pick_up_customer_details: Joi.
|
|
3943
|
+
pick_up_customer_details: Joi.any(),
|
|
4554
3944
|
checkout_mode: Joi.string().allow(""),
|
|
4555
|
-
gift_details: Joi.
|
|
3945
|
+
gift_details: Joi.any().allow(null),
|
|
4556
3946
|
pan_no: Joi.string().allow(""),
|
|
4557
3947
|
comment: Joi.string().allow(""),
|
|
4558
3948
|
staff_user_id: Joi.string().allow("").allow(null),
|
|
4559
3949
|
});
|
|
4560
3950
|
}
|
|
4561
3951
|
|
|
4562
|
-
/** @returns {
|
|
4563
|
-
static
|
|
3952
|
+
/** @returns {CartMetaResponse} */
|
|
3953
|
+
static CartMetaResponse() {
|
|
4564
3954
|
return Joi.object({
|
|
4565
3955
|
is_valid: Joi.boolean(),
|
|
4566
3956
|
message: Joi.string().allow(""),
|
|
4567
3957
|
});
|
|
4568
3958
|
}
|
|
4569
3959
|
|
|
4570
|
-
/** @returns {
|
|
4571
|
-
static
|
|
3960
|
+
/** @returns {CartMetaMissingResponse} */
|
|
3961
|
+
static CartMetaMissingResponse() {
|
|
4572
3962
|
return Joi.object({
|
|
4573
3963
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
4574
3964
|
});
|
|
@@ -4602,53 +3992,6 @@ class CartPlatformModel {
|
|
|
4602
3992
|
});
|
|
4603
3993
|
}
|
|
4604
3994
|
|
|
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
3995
|
/** @returns {CheckCart} */
|
|
4653
3996
|
static CheckCart() {
|
|
4654
3997
|
return Joi.object({
|
|
@@ -4681,15 +4024,15 @@ class CartPlatformModel {
|
|
|
4681
4024
|
gstin: Joi.string().allow(""),
|
|
4682
4025
|
cod_available: Joi.boolean(),
|
|
4683
4026
|
delivery_charges: Joi.number(),
|
|
4684
|
-
custom_cart_meta: Joi.
|
|
4027
|
+
custom_cart_meta: Joi.any(),
|
|
4685
4028
|
});
|
|
4686
4029
|
}
|
|
4687
4030
|
|
|
4688
|
-
/** @returns {
|
|
4689
|
-
static
|
|
4031
|
+
/** @returns {CartCheckoutResponse} */
|
|
4032
|
+
static CartCheckoutResponse() {
|
|
4690
4033
|
return Joi.object({
|
|
4691
4034
|
app_intercept_url: Joi.string().allow(""),
|
|
4692
|
-
data: Joi.
|
|
4035
|
+
data: Joi.any(),
|
|
4693
4036
|
cart: CartPlatformModel.CheckCart(),
|
|
4694
4037
|
success: Joi.boolean(),
|
|
4695
4038
|
callback_url: Joi.string().allow(""),
|
|
@@ -4699,22 +4042,8 @@ class CartPlatformModel {
|
|
|
4699
4042
|
});
|
|
4700
4043
|
}
|
|
4701
4044
|
|
|
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() {
|
|
4045
|
+
/** @returns {CartDeliveryModesResponse} */
|
|
4046
|
+
static CartDeliveryModesResponse() {
|
|
4718
4047
|
return Joi.object({
|
|
4719
4048
|
pickup_stores: Joi.array().items(Joi.number()),
|
|
4720
4049
|
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
@@ -4744,15 +4073,15 @@ class CartPlatformModel {
|
|
|
4744
4073
|
});
|
|
4745
4074
|
}
|
|
4746
4075
|
|
|
4747
|
-
/** @returns {
|
|
4748
|
-
static
|
|
4076
|
+
/** @returns {StoreDetailsResponse} */
|
|
4077
|
+
static StoreDetailsResponse() {
|
|
4749
4078
|
return Joi.object({
|
|
4750
4079
|
items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
|
|
4751
4080
|
});
|
|
4752
4081
|
}
|
|
4753
4082
|
|
|
4754
|
-
/** @returns {
|
|
4755
|
-
static
|
|
4083
|
+
/** @returns {UpdateCartPaymentRequest} */
|
|
4084
|
+
static UpdateCartPaymentRequest() {
|
|
4756
4085
|
return Joi.object({
|
|
4757
4086
|
address_id: Joi.string().allow(""),
|
|
4758
4087
|
payment_mode: Joi.string().allow(""),
|
|
@@ -4772,7 +4101,6 @@ class CartPlatformModel {
|
|
|
4772
4101
|
display_message_en: Joi.string().allow("").allow(null),
|
|
4773
4102
|
code: Joi.string().allow("").allow(null),
|
|
4774
4103
|
discount: Joi.number(),
|
|
4775
|
-
error_en: Joi.string().allow("").allow(null),
|
|
4776
4104
|
});
|
|
4777
4105
|
}
|
|
4778
4106
|
|
|
@@ -4803,19 +4131,17 @@ class CartPlatformModel {
|
|
|
4803
4131
|
payment_meta: CartPlatformModel.PaymentMeta().required(),
|
|
4804
4132
|
amount: Joi.number().allow(null),
|
|
4805
4133
|
name: Joi.string().allow(""),
|
|
4806
|
-
payment_extra_identifiers: Joi.
|
|
4134
|
+
payment_extra_identifiers: Joi.any(),
|
|
4807
4135
|
});
|
|
4808
4136
|
}
|
|
4809
4137
|
|
|
4810
|
-
/** @returns {
|
|
4811
|
-
static
|
|
4138
|
+
/** @returns {PlatformCartCheckoutDetailV2Request} */
|
|
4139
|
+
static PlatformCartCheckoutDetailV2Request() {
|
|
4812
4140
|
return Joi.object({
|
|
4813
4141
|
address_id: Joi.string().allow(""),
|
|
4814
4142
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
4815
|
-
payment_params: Joi.
|
|
4816
|
-
custom_meta: Joi.
|
|
4817
|
-
CartPlatformModel.CartCheckoutCustomMeta()
|
|
4818
|
-
),
|
|
4143
|
+
payment_params: Joi.any().allow(null),
|
|
4144
|
+
custom_meta: Joi.any(),
|
|
4819
4145
|
payment_auto_confirm: Joi.boolean(),
|
|
4820
4146
|
id: Joi.string().allow("").required(),
|
|
4821
4147
|
pos: Joi.boolean(),
|
|
@@ -4824,20 +4150,20 @@ class CartPlatformModel {
|
|
|
4824
4150
|
aggregator: Joi.string().allow(""),
|
|
4825
4151
|
pick_at_store_uid: Joi.number().allow(null),
|
|
4826
4152
|
device_id: Joi.string().allow("").allow(null),
|
|
4827
|
-
delivery_address: Joi.
|
|
4153
|
+
delivery_address: Joi.any(),
|
|
4828
4154
|
payment_mode: Joi.string().allow(""),
|
|
4829
4155
|
checkout_mode: Joi.string().allow(""),
|
|
4830
|
-
customer_details:
|
|
4831
|
-
meta: Joi.
|
|
4156
|
+
customer_details: Joi.any().allow(null),
|
|
4157
|
+
meta: Joi.any(),
|
|
4832
4158
|
payment_methods: Joi.array()
|
|
4833
4159
|
.items(CartPlatformModel.PaymentMethod())
|
|
4834
4160
|
.required(),
|
|
4835
4161
|
staff: CartPlatformModel.StaffCheckout(),
|
|
4836
4162
|
employee_code: Joi.string().allow("").allow(null),
|
|
4837
|
-
billing_address: Joi.
|
|
4163
|
+
billing_address: Joi.any(),
|
|
4838
4164
|
callback_url: Joi.string().allow("").allow(null),
|
|
4839
|
-
user_id: Joi.string().allow("").required(),
|
|
4840
|
-
extra_meta: Joi.
|
|
4165
|
+
user_id: Joi.string().allow("").allow(null).required(),
|
|
4166
|
+
extra_meta: Joi.any(),
|
|
4841
4167
|
order_type: Joi.string().allow("").required(),
|
|
4842
4168
|
files: Joi.array().items(CartPlatformModel.Files()),
|
|
4843
4169
|
ordering_store: Joi.number().allow(null),
|
|
@@ -4878,25 +4204,14 @@ class CartPlatformModel {
|
|
|
4878
4204
|
});
|
|
4879
4205
|
}
|
|
4880
4206
|
|
|
4881
|
-
/** @returns {ArticlePriceDetails} */
|
|
4882
|
-
static ArticlePriceDetails() {
|
|
4883
|
-
return Joi.object({
|
|
4884
|
-
marked: Joi.number(),
|
|
4885
|
-
effective: Joi.number(),
|
|
4886
|
-
});
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
4207
|
/** @returns {FreeGiftItems} */
|
|
4890
4208
|
static FreeGiftItems() {
|
|
4891
4209
|
return Joi.object({
|
|
4892
4210
|
item_slug: Joi.string().allow(""),
|
|
4893
4211
|
item_name: Joi.string().allow(""),
|
|
4894
4212
|
item_price_details: CartPlatformModel.ItemPriceDetails(),
|
|
4895
|
-
article_price: CartPlatformModel.ArticlePriceDetails(),
|
|
4896
4213
|
item_brand_name: Joi.string().allow(""),
|
|
4897
4214
|
item_id: Joi.number(),
|
|
4898
|
-
available_sizes: Joi.array().items(Joi.string().allow("")),
|
|
4899
|
-
size: Joi.string().allow(""),
|
|
4900
4215
|
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
4901
4216
|
});
|
|
4902
4217
|
}
|
|
@@ -4905,7 +4220,7 @@ class CartPlatformModel {
|
|
|
4905
4220
|
static PromotionOffer() {
|
|
4906
4221
|
return Joi.object({
|
|
4907
4222
|
id: Joi.string().allow(""),
|
|
4908
|
-
buy_rules: Joi.
|
|
4223
|
+
buy_rules: Joi.any(),
|
|
4909
4224
|
offer_text: Joi.string().allow(""),
|
|
4910
4225
|
promotion_type: Joi.string().allow(""),
|
|
4911
4226
|
promotion_name: Joi.string().allow(""),
|
|
@@ -4917,8 +4232,8 @@ class CartPlatformModel {
|
|
|
4917
4232
|
});
|
|
4918
4233
|
}
|
|
4919
4234
|
|
|
4920
|
-
/** @returns {
|
|
4921
|
-
static
|
|
4235
|
+
/** @returns {PromotionOffersResponse} */
|
|
4236
|
+
static PromotionOffersResponse() {
|
|
4922
4237
|
return Joi.object({
|
|
4923
4238
|
available_promotions: Joi.array().items(
|
|
4924
4239
|
CartPlatformModel.PromotionOffer()
|
|
@@ -4942,20 +4257,12 @@ class CartPlatformModel {
|
|
|
4942
4257
|
});
|
|
4943
4258
|
}
|
|
4944
4259
|
|
|
4945
|
-
/** @returns {
|
|
4946
|
-
static
|
|
4260
|
+
/** @returns {PromotionPaymentOffersResponse} */
|
|
4261
|
+
static PromotionPaymentOffersResponse() {
|
|
4947
4262
|
return Joi.object({
|
|
4948
4263
|
success: Joi.boolean(),
|
|
4949
4264
|
promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
|
|
4950
4265
|
});
|
|
4951
4266
|
}
|
|
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
4267
|
}
|
|
4961
4268
|
module.exports = CartPlatformModel;
|