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