@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
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 +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -1,25 +1,958 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @typedef ActionQuery
|
|
5
|
+
* @property {string[]} [product_slug] - Contains list of product slug
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef AddCartDetailResponse
|
|
10
|
+
* @property {CartDetailResponse} [cart]
|
|
11
|
+
* @property {string} [message]
|
|
12
|
+
* @property {boolean} [partial] - When adding multiple items check if all
|
|
13
|
+
* added. True if only few are added.
|
|
14
|
+
* @property {boolean} [success] - True if all items are added successfully.
|
|
15
|
+
* False if partially added or not added.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @typedef AddCartRequest
|
|
20
|
+
* @property {AddProductCart[]} [items]
|
|
21
|
+
* @property {boolean} [new_cart]
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @typedef AddProductCart
|
|
26
|
+
* @property {Object} [_custom_json]
|
|
27
|
+
* @property {Object} [article_assignment]
|
|
28
|
+
* @property {string} [article_id]
|
|
29
|
+
* @property {string} [display]
|
|
30
|
+
* @property {Object} [extra_meta]
|
|
31
|
+
* @property {number} [item_id]
|
|
32
|
+
* @property {string} [item_size]
|
|
33
|
+
* @property {Object} [meta]
|
|
34
|
+
* @property {Object[]} [parent_item_identifiers]
|
|
35
|
+
* @property {boolean} [pos]
|
|
36
|
+
* @property {string[]} [product_group_tags]
|
|
37
|
+
* @property {number} [quantity]
|
|
38
|
+
* @property {number} [seller_id]
|
|
39
|
+
* @property {number} [store_id]
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @typedef Address
|
|
44
|
+
* @property {Object} [_custom_json]
|
|
45
|
+
* @property {string} [address]
|
|
46
|
+
* @property {string} [address_type]
|
|
47
|
+
* @property {string} [area]
|
|
48
|
+
* @property {string} [area_code]
|
|
49
|
+
* @property {string} [area_code_slug]
|
|
50
|
+
* @property {string} [checkout_mode]
|
|
51
|
+
* @property {string} [city]
|
|
52
|
+
* @property {string} [country]
|
|
53
|
+
* @property {string} [country_code]
|
|
54
|
+
* @property {string} [country_iso_code]
|
|
55
|
+
* @property {string} [country_phone_code]
|
|
56
|
+
* @property {string} [created_by_user_id]
|
|
57
|
+
* @property {string} [email]
|
|
58
|
+
* @property {GeoLocation} [geo_location]
|
|
59
|
+
* @property {Object} [google_map_point]
|
|
60
|
+
* @property {string} [id]
|
|
61
|
+
* @property {boolean} [is_active]
|
|
62
|
+
* @property {boolean} [is_default_address]
|
|
63
|
+
* @property {string} [landmark]
|
|
64
|
+
* @property {Object} [meta]
|
|
65
|
+
* @property {string} [name]
|
|
66
|
+
* @property {string} [phone]
|
|
67
|
+
* @property {string} [state]
|
|
68
|
+
* @property {string[]} [tags]
|
|
69
|
+
* @property {string} [user_id]
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @typedef AppliedFreeArticles
|
|
74
|
+
* @property {string} [article_id] - Free article id
|
|
75
|
+
* @property {FreeGiftItem} [free_gift_item_details] - Free gift items details
|
|
76
|
+
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
77
|
+
* @property {number} [quantity] - Free article quantity
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @typedef AppliedPromotion
|
|
82
|
+
* @property {number} [amount] - Per unit discount amount applied with current promotion
|
|
83
|
+
* @property {AppliedFreeArticles[]} [applied_free_articles] - Applied free
|
|
84
|
+
* article for free gift item promotions
|
|
85
|
+
* @property {number} [article_quantity] - Quantity of article on which
|
|
86
|
+
* promotion is applicable
|
|
87
|
+
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
88
|
+
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
89
|
+
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
90
|
+
* product MRP or ESP
|
|
91
|
+
* @property {string} [offer_text] - Offer text of current promotion
|
|
92
|
+
* @property {Ownership} [ownership] - Ownership of promotion
|
|
93
|
+
* @property {string} [promo_id] - Promotion id
|
|
94
|
+
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
95
|
+
* @property {string} [promotion_name] - Promotion name of current promotion
|
|
96
|
+
* @property {string} [promotion_type] - Promotion type of current promotion
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @typedef ApplyCouponRequest
|
|
101
|
+
* @property {string} coupon_code - Coupon code to be applied
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @typedef ArticleGiftDetail
|
|
106
|
+
* @property {GiftDetail} [article_id]
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @typedef ArticlePriceInfo
|
|
111
|
+
* @property {BasePrice} [base]
|
|
112
|
+
* @property {BasePrice} [converted]
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @typedef BaseInfo
|
|
117
|
+
* @property {string} [name]
|
|
118
|
+
* @property {number} [uid]
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @typedef BasePrice
|
|
123
|
+
* @property {string} [currency_code]
|
|
124
|
+
* @property {string} [currency_symbol]
|
|
125
|
+
* @property {number} [effective]
|
|
126
|
+
* @property {number} [marked]
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @typedef BulkPriceOffer
|
|
131
|
+
* @property {OfferItem[]} [offers]
|
|
132
|
+
* @property {OfferSeller} [seller]
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @typedef BulkPriceResponse
|
|
137
|
+
* @property {BulkPriceOffer[]} [data] - Consist of offers from multiple seller
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @typedef BuyRules
|
|
142
|
+
* @property {Object} [cart_conditions] - Cart conditions details for promotion
|
|
143
|
+
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @typedef CartBreakup
|
|
148
|
+
* @property {CouponBreakup} [coupon]
|
|
149
|
+
* @property {DisplayBreakup[]} [display]
|
|
150
|
+
* @property {LoyaltyPoints} [loyalty_points]
|
|
151
|
+
* @property {RawBreakup} [raw]
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @typedef CartCheckoutCustomMeta
|
|
156
|
+
* @property {string} key
|
|
157
|
+
* @property {string} value
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @typedef CartCheckoutDetailRequest
|
|
162
|
+
* @property {string} [address_id]
|
|
163
|
+
* @property {string} [aggregator]
|
|
164
|
+
* @property {Object} [billing_address]
|
|
165
|
+
* @property {string} [billing_address_id]
|
|
166
|
+
* @property {string} [callback_url]
|
|
167
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
168
|
+
* @property {CustomerDetails} [customer_details] - Customer details
|
|
169
|
+
* @property {Object} [delivery_address]
|
|
170
|
+
* @property {Object} [extra_meta]
|
|
171
|
+
* @property {string} [id]
|
|
172
|
+
* @property {string} [merchant_code]
|
|
173
|
+
* @property {Object} [meta]
|
|
174
|
+
* @property {string} [order_type]
|
|
175
|
+
* @property {number} [ordering_store]
|
|
176
|
+
* @property {boolean} [payment_auto_confirm]
|
|
177
|
+
* @property {string} [payment_identifier]
|
|
178
|
+
* @property {string} payment_mode
|
|
179
|
+
* @property {Object} [payment_params]
|
|
180
|
+
* @property {StaffCheckout} [staff]
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @typedef CartCheckoutDetailV2Request
|
|
185
|
+
* @property {string} [address_id]
|
|
186
|
+
* @property {string} [aggregator]
|
|
187
|
+
* @property {Object} [billing_address]
|
|
188
|
+
* @property {string} [billing_address_id]
|
|
189
|
+
* @property {string} [callback_url]
|
|
190
|
+
* @property {string} [cart_id]
|
|
191
|
+
* @property {Object} [custom_meta]
|
|
192
|
+
* @property {CustomerDetails} [customer_details] - Customer details
|
|
193
|
+
* @property {Object} [delivery_address]
|
|
194
|
+
* @property {Object} [extra_meta]
|
|
195
|
+
* @property {string} [id]
|
|
196
|
+
* @property {string} [merchant_code]
|
|
197
|
+
* @property {Object} [meta]
|
|
198
|
+
* @property {string} [order_type]
|
|
199
|
+
* @property {number} [ordering_store]
|
|
200
|
+
* @property {boolean} [payment_auto_confirm]
|
|
201
|
+
* @property {string} [payment_identifier]
|
|
202
|
+
* @property {PaymentMethod[]} payment_methods
|
|
203
|
+
* @property {string} payment_mode
|
|
204
|
+
* @property {Object} [payment_params]
|
|
205
|
+
* @property {StaffCheckout} [staff]
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @typedef CartCheckoutResponse
|
|
210
|
+
* @property {string} [app_intercept_url]
|
|
211
|
+
* @property {string} [callback_url]
|
|
212
|
+
* @property {CheckCart} [cart]
|
|
213
|
+
* @property {Object} [data]
|
|
214
|
+
* @property {string} [message]
|
|
215
|
+
* @property {string} [order_id]
|
|
216
|
+
* @property {string} [payment_confirm_url]
|
|
217
|
+
* @property {boolean} [success]
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @typedef CartCurrency
|
|
222
|
+
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
223
|
+
* @property {string} [symbol]
|
|
224
|
+
*/
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @typedef CartDetailResponse
|
|
228
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
229
|
+
* @property {CartBreakup} [breakup_values]
|
|
230
|
+
* @property {boolean} [buy_now]
|
|
231
|
+
* @property {string} [checkout_mode]
|
|
232
|
+
* @property {string} [comment]
|
|
233
|
+
* @property {string} [coupon_text]
|
|
234
|
+
* @property {CartCurrency} [currency]
|
|
235
|
+
* @property {string} [delivery_charge_info]
|
|
236
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
237
|
+
* @property {string} [gstin]
|
|
238
|
+
* @property {string} [id]
|
|
239
|
+
* @property {boolean} [is_valid]
|
|
240
|
+
* @property {CartProductInfo[]} [items]
|
|
241
|
+
* @property {string} [last_modified]
|
|
242
|
+
* @property {string} [message]
|
|
243
|
+
* @property {Object} [pan_config]
|
|
244
|
+
* @property {string} [pan_no]
|
|
245
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
246
|
+
* @property {boolean} [restrict_checkout]
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @typedef CartItemCountResponse
|
|
251
|
+
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @typedef CartMetaMissingResponse
|
|
256
|
+
* @property {string[]} [errors]
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @typedef CartMetaRequest
|
|
261
|
+
* @property {string} [checkout_mode]
|
|
262
|
+
* @property {string} [comment]
|
|
263
|
+
* @property {Object} [delivery_slots]
|
|
264
|
+
* @property {ArticleGiftDetail} [gift_details]
|
|
265
|
+
* @property {string} [gstin]
|
|
266
|
+
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
267
|
+
* customer pickup at store
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @typedef CartMetaResponse
|
|
272
|
+
* @property {boolean} [is_valid]
|
|
273
|
+
* @property {string} [message]
|
|
274
|
+
*/
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @typedef CartProduct
|
|
278
|
+
* @property {Object} [_custom_json]
|
|
279
|
+
* @property {ProductAction} [action]
|
|
280
|
+
* @property {BaseInfo} [brand]
|
|
281
|
+
* @property {CategoryInfo[]} [categories]
|
|
282
|
+
* @property {ProductImage[]} [images]
|
|
283
|
+
* @property {string} [item_code]
|
|
284
|
+
* @property {string} [name]
|
|
285
|
+
* @property {string} [slug] - Unique product url name generated via product
|
|
286
|
+
* name and other meta data
|
|
287
|
+
* @property {string[]} [tags]
|
|
288
|
+
* @property {Tags} [teaser_tag]
|
|
289
|
+
* @property {string} [type]
|
|
290
|
+
* @property {number} [uid]
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @typedef CartProductIdentifer
|
|
295
|
+
* @property {string} [identifier] - Article idenfier generated by cart
|
|
296
|
+
*/
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @typedef CartProductInfo
|
|
300
|
+
* @property {ProductArticle} [article]
|
|
301
|
+
* @property {ProductAvailability} [availability]
|
|
302
|
+
* @property {Object} [bulk_offer]
|
|
303
|
+
* @property {CouponDetails} [coupon]
|
|
304
|
+
* @property {string} [coupon_message]
|
|
305
|
+
* @property {Object} [custom_order]
|
|
306
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
307
|
+
* @property {string} [discount]
|
|
308
|
+
* @property {CartProductIdentifer} identifiers
|
|
309
|
+
* @property {boolean} [is_set]
|
|
310
|
+
* @property {string} [key]
|
|
311
|
+
* @property {string} [message]
|
|
312
|
+
* @property {Object} [moq]
|
|
313
|
+
* @property {Object} [parent_item_identifiers]
|
|
314
|
+
* @property {ProductPriceInfo} [price]
|
|
315
|
+
* @property {ProductPriceInfo} [price_per_unit]
|
|
316
|
+
* @property {CartProduct} [product]
|
|
317
|
+
* @property {PromoMeta} [promo_meta]
|
|
318
|
+
* @property {AppliedPromotion[]} [promotions_applied]
|
|
319
|
+
* @property {number} [quantity]
|
|
320
|
+
*/
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @typedef CartShipmentsResponse
|
|
324
|
+
* @property {CartBreakup} [breakup_values]
|
|
325
|
+
* @property {boolean} [buy_now]
|
|
326
|
+
* @property {number} [cart_id]
|
|
327
|
+
* @property {string} [checkout_mode]
|
|
328
|
+
* @property {string} [comment]
|
|
329
|
+
* @property {string} [coupon_text]
|
|
330
|
+
* @property {CartCurrency} [currency]
|
|
331
|
+
* @property {string} [delivery_charge_info]
|
|
332
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
333
|
+
* @property {boolean} [error]
|
|
334
|
+
* @property {string} [gstin]
|
|
335
|
+
* @property {string} [id]
|
|
336
|
+
* @property {boolean} [is_valid]
|
|
337
|
+
* @property {string} [last_modified]
|
|
338
|
+
* @property {string} [message]
|
|
339
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
340
|
+
* @property {boolean} [restrict_checkout]
|
|
341
|
+
* @property {ShipmentResponse[]} [shipments]
|
|
342
|
+
* @property {string} [uid]
|
|
343
|
+
*/
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @typedef CategoryInfo
|
|
347
|
+
* @property {string} [name]
|
|
348
|
+
* @property {number} [uid] - Product Category Id
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @typedef CheckCart
|
|
353
|
+
* @property {CartBreakup} [breakup_values]
|
|
354
|
+
* @property {boolean} [buy_now]
|
|
355
|
+
* @property {number} [cart_id]
|
|
356
|
+
* @property {string} [checkout_mode]
|
|
357
|
+
* @property {boolean} [cod_available]
|
|
358
|
+
* @property {number} [cod_charges]
|
|
359
|
+
* @property {string} [cod_message]
|
|
360
|
+
* @property {string} [comment]
|
|
361
|
+
* @property {string} [coupon_text]
|
|
362
|
+
* @property {CartCurrency} [currency]
|
|
363
|
+
* @property {string} [delivery_charge_info]
|
|
364
|
+
* @property {number} [delivery_charge_order_value]
|
|
365
|
+
* @property {number} [delivery_charges]
|
|
366
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
367
|
+
* @property {string} [error_message]
|
|
368
|
+
* @property {string} [gstin]
|
|
369
|
+
* @property {string} [id]
|
|
370
|
+
* @property {boolean} [is_valid]
|
|
371
|
+
* @property {CartProductInfo[]} [items]
|
|
372
|
+
* @property {string} [last_modified]
|
|
373
|
+
* @property {string} [message]
|
|
374
|
+
* @property {string} [order_id]
|
|
375
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
376
|
+
* @property {boolean} [restrict_checkout]
|
|
377
|
+
* @property {string} [store_code]
|
|
378
|
+
* @property {Object[]} [store_emps]
|
|
379
|
+
* @property {boolean} [success]
|
|
380
|
+
* @property {string} [uid]
|
|
381
|
+
* @property {string} [user_type]
|
|
382
|
+
*/
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @typedef Coupon
|
|
386
|
+
* @property {string} [coupon_code]
|
|
387
|
+
* @property {string} [coupon_type]
|
|
388
|
+
* @property {number} [coupon_value]
|
|
389
|
+
* @property {string} [description]
|
|
390
|
+
* @property {string} [expires_on]
|
|
391
|
+
* @property {boolean} [is_applicable]
|
|
392
|
+
* @property {boolean} [is_applied]
|
|
393
|
+
* @property {number} [max_discount_value]
|
|
394
|
+
* @property {string} [message]
|
|
395
|
+
* @property {number} [minimum_cart_value]
|
|
396
|
+
* @property {string} [sub_title]
|
|
397
|
+
* @property {string} [title]
|
|
398
|
+
*/
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @typedef CouponBreakup
|
|
402
|
+
* @property {string} [code]
|
|
403
|
+
* @property {string} [coupon_type]
|
|
404
|
+
* @property {number} [coupon_value]
|
|
405
|
+
* @property {string} [description]
|
|
406
|
+
* @property {boolean} [is_applied]
|
|
407
|
+
* @property {number} [max_discount_value]
|
|
408
|
+
* @property {string} [message]
|
|
409
|
+
* @property {number} [minimum_cart_value]
|
|
410
|
+
* @property {string} [sub_title]
|
|
411
|
+
* @property {string} [title]
|
|
412
|
+
* @property {string} [type]
|
|
413
|
+
* @property {string} [uid]
|
|
414
|
+
* @property {number} [value]
|
|
415
|
+
*/
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @typedef CouponDetails
|
|
419
|
+
* @property {string} [code]
|
|
420
|
+
* @property {number} [discount_single_quantity]
|
|
421
|
+
* @property {number} [discount_total_quantity]
|
|
422
|
+
*/
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @typedef CouponValidity
|
|
426
|
+
* @property {string} [code]
|
|
427
|
+
* @property {number} [discount]
|
|
428
|
+
* @property {string} [display_message_en]
|
|
429
|
+
* @property {boolean} [next_validation_required]
|
|
430
|
+
* @property {string} [title]
|
|
431
|
+
* @property {boolean} [valid]
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @typedef CurrencyInfo
|
|
436
|
+
* @property {string} [code]
|
|
437
|
+
* @property {string} [symbol]
|
|
438
|
+
*/
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* @typedef CustomerDetails
|
|
442
|
+
* @property {string} [email]
|
|
443
|
+
* @property {string} mobile
|
|
444
|
+
* @property {string} [name]
|
|
445
|
+
*/
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* @typedef DeleteAddressResponse
|
|
449
|
+
* @property {string} [id]
|
|
450
|
+
* @property {boolean} [is_deleted]
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @typedef DeleteCartDetailResponse
|
|
455
|
+
* @property {string} [message]
|
|
456
|
+
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
457
|
+
* if not archived.
|
|
458
|
+
*/
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @typedef DiscountRulesApp
|
|
462
|
+
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
463
|
+
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
464
|
+
* @property {Object} [offer] - Offer for promotion
|
|
465
|
+
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
466
|
+
*/
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* @typedef DisplayBreakup
|
|
470
|
+
* @property {string} [currency_code]
|
|
471
|
+
* @property {string} [currency_symbol]
|
|
472
|
+
* @property {string} [display]
|
|
473
|
+
* @property {string} [key]
|
|
474
|
+
* @property {string[]} [message]
|
|
475
|
+
* @property {number} [value]
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @typedef FreeGiftItem
|
|
480
|
+
* @property {string} [item_brand_name] - Item brand name
|
|
481
|
+
* @property {number} [item_id] - Item id
|
|
482
|
+
* @property {string[]} [item_images_url] - Item images URL
|
|
483
|
+
* @property {string} [item_name] - Item name
|
|
484
|
+
* @property {Object} [item_price_details] - Item price details
|
|
485
|
+
* @property {string} [item_slug] - Item slug
|
|
486
|
+
*/
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* @typedef FreeGiftItems
|
|
490
|
+
* @property {string} [item_brand_name] - Item brand name
|
|
491
|
+
* @property {number} [item_id] - Item id
|
|
492
|
+
* @property {string[]} [item_images_url] - Item images URL
|
|
493
|
+
* @property {string} [item_name] - Item name
|
|
494
|
+
* @property {Object} [item_price_details] - Item price details
|
|
495
|
+
* @property {string} [item_slug] - Item slug
|
|
496
|
+
*/
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* @typedef GeoLocation
|
|
500
|
+
* @property {number} [latitude]
|
|
501
|
+
* @property {number} [longitude]
|
|
502
|
+
*/
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @typedef GetAddressesResponse
|
|
506
|
+
* @property {Address[]} [address]
|
|
507
|
+
* @property {boolean} [pii_masking]
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @typedef GetCouponResponse
|
|
512
|
+
* @property {Coupon[]} [available_coupon_list]
|
|
513
|
+
* @property {PageCoupon} [page]
|
|
514
|
+
*/
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* @typedef GetShareCartLinkRequest
|
|
518
|
+
* @property {string} [id] - Cart uid for generating sharing
|
|
519
|
+
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
520
|
+
* data will be used to generate link as well as sent as shared details.
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* @typedef GetShareCartLinkResponse
|
|
525
|
+
* @property {string} [share_url] - Short shareable final url
|
|
526
|
+
* @property {string} [token] - Short url unique id
|
|
527
|
+
*/
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @typedef GiftDetail
|
|
531
|
+
* @property {string} [gift_message]
|
|
532
|
+
* @property {boolean} [is_gift_applied]
|
|
533
|
+
*/
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* @typedef LadderOfferItem
|
|
537
|
+
* @property {number} [margin] - Percentage value of discount
|
|
538
|
+
* @property {number} [max_quantity] - Minimum quantity upto which offer is
|
|
539
|
+
* applicable. If not present that offer is applicable on all quantities
|
|
540
|
+
* @property {number} [min_quantity] - Minimum quantity from which offer is applicable
|
|
541
|
+
* @property {LadderPrice} [price]
|
|
542
|
+
* @property {string} [type] - Offer type
|
|
543
|
+
*/
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* @typedef LadderPrice
|
|
547
|
+
* @property {string} [currency_code] - Currency code for all amounts
|
|
548
|
+
* @property {string} [currency_symbol] - Currency symbol for currency
|
|
549
|
+
* @property {number} [effective] - Current per unit price of product after
|
|
550
|
+
* existing deductions
|
|
551
|
+
* @property {number} [marked] - Original price of product
|
|
552
|
+
* @property {number} [offer_price] - Discounted per unit price for current offer object
|
|
553
|
+
*/
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* @typedef LadderPriceOffer
|
|
557
|
+
* @property {Object} [buy_rules] - Buy rules of promotions
|
|
558
|
+
* @property {string} [calculate_on] - If this ladder offer is to be calculated
|
|
559
|
+
* on MRP or ESP price
|
|
560
|
+
* @property {string} [description] - Offer details including T&C
|
|
561
|
+
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
562
|
+
* @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
|
|
563
|
+
* @property {string} [id] - Promotion id
|
|
564
|
+
* @property {LadderOfferItem[]} [offer_prices]
|
|
565
|
+
* @property {string} [offer_text] - Offer title
|
|
566
|
+
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
567
|
+
* @property {string} [valid_till] - Datetime ISOString for promotion end date
|
|
568
|
+
*/
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* @typedef LadderPriceOffers
|
|
572
|
+
* @property {LadderPriceOffer[]} [available_offers]
|
|
573
|
+
* @property {CurrencyInfo} [currency]
|
|
574
|
+
*/
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* @typedef LoyaltyPoints
|
|
578
|
+
* @property {number} [applicable]
|
|
579
|
+
* @property {string} [description]
|
|
580
|
+
* @property {boolean} [is_applied]
|
|
581
|
+
* @property {number} [total]
|
|
582
|
+
*/
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* @typedef OfferItem
|
|
586
|
+
* @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart
|
|
587
|
+
* @property {boolean} [best] - Is true for best offer from all offers present
|
|
588
|
+
* for all sellers
|
|
589
|
+
* @property {number} [margin] - Percentage value of discount
|
|
590
|
+
* @property {OfferPrice} [price]
|
|
591
|
+
* @property {number} [quantity] - Quantity on which offer is applicable
|
|
592
|
+
* @property {number} [total] - Total price of offer quantity with discount
|
|
593
|
+
* @property {string} [type] - Offer type
|
|
594
|
+
*/
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* @typedef OfferPrice
|
|
598
|
+
* @property {number} [bulk_effective] - Discounted per unit price for current
|
|
599
|
+
* offer object
|
|
600
|
+
* @property {string} [currency_code] - Currency code for all amounts
|
|
601
|
+
* @property {string} [currency_symbol] - Currency symbol for currency
|
|
602
|
+
* @property {number} [effective] - Current per unit price of product after
|
|
603
|
+
* existing deductions
|
|
604
|
+
* @property {number} [marked] - Original price of product
|
|
605
|
+
*/
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* @typedef OfferSeller
|
|
609
|
+
* @property {string} [name]
|
|
610
|
+
* @property {number} [uid] - Seller id
|
|
611
|
+
*/
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* @typedef OperationErrorResponse
|
|
615
|
+
* @property {string} [message]
|
|
616
|
+
* @property {boolean} [success]
|
|
617
|
+
*/
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* @typedef Ownership
|
|
621
|
+
* @property {string} [payable_by] - Promo amount bearable party
|
|
622
|
+
* @property {string} [payable_category] - Promo amount payable category
|
|
623
|
+
*/
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* @typedef PageCoupon
|
|
627
|
+
* @property {number} [current]
|
|
628
|
+
* @property {boolean} [has_next]
|
|
629
|
+
* @property {boolean} [has_previous]
|
|
630
|
+
* @property {number} [total]
|
|
631
|
+
* @property {number} [total_item_count]
|
|
632
|
+
*/
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* @typedef PaymentCouponValidate
|
|
636
|
+
* @property {CouponValidity} [coupon_validity]
|
|
637
|
+
* @property {string} [message]
|
|
638
|
+
* @property {boolean} success
|
|
639
|
+
*/
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* @typedef PaymentMeta
|
|
643
|
+
* @property {string} [merchant_code]
|
|
644
|
+
* @property {string} [payment_gateway]
|
|
645
|
+
* @property {string} [payment_identifier]
|
|
646
|
+
* @property {string} [type]
|
|
647
|
+
*/
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* @typedef PaymentMethod
|
|
651
|
+
* @property {number} [amount]
|
|
652
|
+
* @property {string} mode
|
|
653
|
+
* @property {string} [name]
|
|
654
|
+
* @property {string} [payment]
|
|
655
|
+
* @property {PaymentMeta} payment_meta
|
|
656
|
+
*/
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* @typedef PaymentSelectionLock
|
|
660
|
+
* @property {string} [default_options]
|
|
661
|
+
* @property {boolean} [enabled]
|
|
662
|
+
* @property {string} [payment_identifier]
|
|
663
|
+
*/
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* @typedef ProductAction
|
|
667
|
+
* @property {ActionQuery} [query]
|
|
668
|
+
* @property {string} [type]
|
|
669
|
+
* @property {string} [url]
|
|
670
|
+
*/
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* @typedef ProductArticle
|
|
674
|
+
* @property {Object} [_custom_json]
|
|
675
|
+
* @property {Object} [cart_item_meta]
|
|
676
|
+
* @property {Object} [extra_meta]
|
|
677
|
+
* @property {Object} [gift_card]
|
|
678
|
+
* @property {Object} [identifier]
|
|
679
|
+
* @property {boolean} [is_gift_visible]
|
|
680
|
+
* @property {Object} [meta]
|
|
681
|
+
* @property {number} [mto_quantity]
|
|
682
|
+
* @property {Object} [parent_item_identifiers]
|
|
683
|
+
* @property {ArticlePriceInfo} [price]
|
|
684
|
+
* @property {string[]} [product_group_tags]
|
|
685
|
+
* @property {number} [quantity]
|
|
686
|
+
* @property {BaseInfo} [seller]
|
|
687
|
+
* @property {string} [seller_identifier]
|
|
688
|
+
* @property {string} [size]
|
|
689
|
+
* @property {StoreInfo} [store]
|
|
690
|
+
* @property {string} [type]
|
|
691
|
+
* @property {string} [uid]
|
|
692
|
+
*/
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* @typedef ProductAvailability
|
|
696
|
+
* @property {ProductAvailabilitySize[]} [available_sizes]
|
|
697
|
+
* @property {boolean} [deliverable]
|
|
698
|
+
* @property {boolean} [is_valid]
|
|
699
|
+
* @property {number} [other_store_quantity]
|
|
700
|
+
* @property {boolean} [out_of_stock]
|
|
701
|
+
* @property {string[]} [sizes]
|
|
702
|
+
*/
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* @typedef ProductAvailabilitySize
|
|
706
|
+
* @property {string} [display]
|
|
707
|
+
* @property {boolean} [is_available]
|
|
708
|
+
* @property {string} [value]
|
|
709
|
+
*/
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* @typedef ProductImage
|
|
713
|
+
* @property {string} [aspect_ratio]
|
|
714
|
+
* @property {string} [secure_url]
|
|
715
|
+
* @property {string} [url]
|
|
716
|
+
*/
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* @typedef ProductPrice
|
|
720
|
+
* @property {number} [add_on]
|
|
721
|
+
* @property {string} [currency_code]
|
|
722
|
+
* @property {string} [currency_symbol]
|
|
723
|
+
* @property {number} [effective]
|
|
724
|
+
* @property {number} [marked]
|
|
725
|
+
* @property {number} [selling]
|
|
726
|
+
*/
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* @typedef ProductPriceInfo
|
|
730
|
+
* @property {ProductPrice} [base]
|
|
731
|
+
* @property {ProductPrice} [converted]
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* @typedef PromiseFormatted
|
|
736
|
+
* @property {string} [max]
|
|
737
|
+
* @property {string} [min]
|
|
738
|
+
*/
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* @typedef PromiseTimestamp
|
|
742
|
+
* @property {number} [max]
|
|
743
|
+
* @property {number} [min]
|
|
744
|
+
*/
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @typedef PromoMeta
|
|
748
|
+
* @property {string} [message]
|
|
749
|
+
*/
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* @typedef PromotionOffer
|
|
753
|
+
* @property {Object} [buy_rules] - Buy rules of promotions
|
|
754
|
+
* @property {string} [description] - Offer details including T&C
|
|
755
|
+
* @property {Object[]} [discount_rules] - Discount rules of promotions
|
|
756
|
+
* @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
|
|
757
|
+
* @property {string} [id] - Promotion id
|
|
758
|
+
* @property {string} [offer_text] - Offer title
|
|
759
|
+
* @property {string} [promotion_group] - Group of promotion belongs to
|
|
760
|
+
* @property {string} [valid_till] - Datetime ISOString for promotion end date
|
|
761
|
+
*/
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* @typedef PromotionOffersResponse
|
|
765
|
+
* @property {PromotionOffer[]} [available_promotions]
|
|
766
|
+
*/
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @typedef RawBreakup
|
|
770
|
+
* @property {number} [cod_charge]
|
|
771
|
+
* @property {number} [convenience_fee]
|
|
772
|
+
* @property {number} [coupon]
|
|
773
|
+
* @property {number} [delivery_charge]
|
|
774
|
+
* @property {number} [discount]
|
|
775
|
+
* @property {number} [fynd_cash]
|
|
776
|
+
* @property {number} [gift_card]
|
|
777
|
+
* @property {number} [gst_charges]
|
|
778
|
+
* @property {number} [mrp_total]
|
|
779
|
+
* @property {number} [subtotal]
|
|
780
|
+
* @property {number} [total]
|
|
781
|
+
* @property {number} [vog]
|
|
782
|
+
* @property {number} [you_saved]
|
|
783
|
+
*/
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* @typedef RewardPointRequest
|
|
787
|
+
* @property {boolean} points
|
|
788
|
+
*/
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* @typedef SaveAddressResponse
|
|
792
|
+
* @property {string} [id]
|
|
793
|
+
* @property {boolean} [is_default_address]
|
|
794
|
+
* @property {boolean} [success]
|
|
795
|
+
*/
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* @typedef SelectCartAddressRequest
|
|
799
|
+
* @property {string} [billing_address_id]
|
|
800
|
+
* @property {string} [cart_id]
|
|
801
|
+
* @property {string} [id]
|
|
802
|
+
*/
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* @typedef SharedCart
|
|
806
|
+
* @property {CartBreakup} [breakup_values]
|
|
807
|
+
* @property {boolean} [buy_now]
|
|
808
|
+
* @property {number} [cart_id]
|
|
809
|
+
* @property {string} [checkout_mode]
|
|
810
|
+
* @property {string} [comment]
|
|
811
|
+
* @property {string} [coupon_text]
|
|
812
|
+
* @property {CartCurrency} [currency]
|
|
813
|
+
* @property {string} [delivery_charge_info]
|
|
814
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
815
|
+
* @property {string} [gstin]
|
|
816
|
+
* @property {string} [id]
|
|
817
|
+
* @property {boolean} [is_valid]
|
|
818
|
+
* @property {CartProductInfo[]} [items]
|
|
819
|
+
* @property {string} [last_modified]
|
|
820
|
+
* @property {string} [message]
|
|
821
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
822
|
+
* @property {boolean} [restrict_checkout]
|
|
823
|
+
* @property {SharedCartDetails} [shared_cart_details]
|
|
824
|
+
* @property {string} [uid]
|
|
825
|
+
*/
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* @typedef SharedCartDetails
|
|
829
|
+
* @property {string} [created_on]
|
|
830
|
+
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
831
|
+
* @property {Object} [source] - Share link device and other source information
|
|
832
|
+
* @property {string} [token] - Short link id
|
|
833
|
+
* @property {Object} [user] - User details of who generated share link
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* @typedef SharedCartResponse
|
|
838
|
+
* @property {SharedCart} [cart]
|
|
839
|
+
* @property {string} [error]
|
|
840
|
+
*/
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* @typedef ShipmentPromise
|
|
844
|
+
* @property {PromiseFormatted} [formatted]
|
|
845
|
+
* @property {PromiseTimestamp} [timestamp]
|
|
846
|
+
*/
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* @typedef ShipmentResponse
|
|
850
|
+
* @property {string} [box_type]
|
|
851
|
+
* @property {string} [dp_id]
|
|
852
|
+
* @property {Object} [dp_options]
|
|
853
|
+
* @property {number} [fulfillment_id]
|
|
854
|
+
* @property {string} [fulfillment_type]
|
|
855
|
+
* @property {CartProductInfo[]} [items]
|
|
856
|
+
* @property {string} [order_type]
|
|
857
|
+
* @property {ShipmentPromise} [promise]
|
|
858
|
+
* @property {string} [shipment_type]
|
|
859
|
+
* @property {number} [shipments]
|
|
860
|
+
*/
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* @typedef StaffCheckout
|
|
864
|
+
* @property {string} _id
|
|
865
|
+
* @property {string} [employee_code]
|
|
866
|
+
* @property {string} first_name
|
|
867
|
+
* @property {string} last_name
|
|
868
|
+
* @property {string} user
|
|
869
|
+
*/
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* @typedef StoreInfo
|
|
873
|
+
* @property {string} [name]
|
|
874
|
+
* @property {string} [store_code]
|
|
875
|
+
* @property {number} [uid]
|
|
876
|
+
*/
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* @typedef Tags
|
|
880
|
+
* @property {Object} [tags]
|
|
881
|
+
*/
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @typedef UpdateAddressResponse
|
|
885
|
+
* @property {string} [id]
|
|
886
|
+
* @property {boolean} [is_default_address]
|
|
887
|
+
* @property {boolean} [is_updated]
|
|
888
|
+
* @property {boolean} [success]
|
|
889
|
+
*/
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* @typedef UpdateCartDetailResponse
|
|
893
|
+
* @property {CartDetailResponse} [cart]
|
|
894
|
+
* @property {string} [message]
|
|
895
|
+
* @property {boolean} [success] - True if all items are added successfully.
|
|
896
|
+
* False if partially added or not added.
|
|
897
|
+
*/
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @typedef UpdateCartPaymentRequest
|
|
901
|
+
* @property {string} [address_id]
|
|
902
|
+
* @property {string} [aggregator_name]
|
|
903
|
+
* @property {string} [id]
|
|
904
|
+
* @property {string} [merchant_code]
|
|
905
|
+
* @property {string} [payment_identifier]
|
|
906
|
+
* @property {string} [payment_mode]
|
|
907
|
+
*/
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* @typedef UpdateCartRequest
|
|
911
|
+
* @property {UpdateProductCart[]} [items]
|
|
912
|
+
* @property {string} operation
|
|
913
|
+
*/
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* @typedef UpdateProductCart
|
|
917
|
+
* @property {Object} [_custom_json]
|
|
918
|
+
* @property {string} [article_id]
|
|
919
|
+
* @property {Object} [extra_meta]
|
|
920
|
+
* @property {CartProductIdentifer} identifiers
|
|
921
|
+
* @property {number} [item_id]
|
|
922
|
+
* @property {number} [item_index]
|
|
923
|
+
* @property {string} [item_size]
|
|
924
|
+
* @property {Object} [meta]
|
|
925
|
+
* @property {Object} [parent_item_identifiers]
|
|
926
|
+
* @property {number} [quantity]
|
|
927
|
+
*/
|
|
928
|
+
|
|
929
|
+
class CartApplicationModel {
|
|
930
|
+
/** @returns {ActionQuery} */
|
|
4
931
|
static ActionQuery() {
|
|
5
932
|
return Joi.object({
|
|
6
933
|
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
7
934
|
});
|
|
8
935
|
}
|
|
936
|
+
|
|
937
|
+
/** @returns {AddCartDetailResponse} */
|
|
9
938
|
static AddCartDetailResponse() {
|
|
10
939
|
return Joi.object({
|
|
11
|
-
cart:
|
|
940
|
+
cart: CartApplicationModel.CartDetailResponse(),
|
|
12
941
|
message: Joi.string().allow(""),
|
|
13
942
|
partial: Joi.boolean(),
|
|
14
943
|
success: Joi.boolean(),
|
|
15
944
|
});
|
|
16
945
|
}
|
|
946
|
+
|
|
947
|
+
/** @returns {AddCartRequest} */
|
|
17
948
|
static AddCartRequest() {
|
|
18
949
|
return Joi.object({
|
|
19
|
-
items: Joi.array().items(
|
|
950
|
+
items: Joi.array().items(CartApplicationModel.AddProductCart()),
|
|
20
951
|
new_cart: Joi.boolean(),
|
|
21
952
|
});
|
|
22
953
|
}
|
|
954
|
+
|
|
955
|
+
/** @returns {AddProductCart} */
|
|
23
956
|
static AddProductCart() {
|
|
24
957
|
return Joi.object({
|
|
25
958
|
_custom_json: Joi.any(),
|
|
@@ -40,6 +973,8 @@ class CartModel {
|
|
|
40
973
|
store_id: Joi.number(),
|
|
41
974
|
});
|
|
42
975
|
}
|
|
976
|
+
|
|
977
|
+
/** @returns {Address} */
|
|
43
978
|
static Address() {
|
|
44
979
|
return Joi.object({
|
|
45
980
|
_custom_json: Joi.any(),
|
|
@@ -56,7 +991,7 @@ class CartModel {
|
|
|
56
991
|
country_phone_code: Joi.string().allow(""),
|
|
57
992
|
created_by_user_id: Joi.string().allow(""),
|
|
58
993
|
email: Joi.string().allow(""),
|
|
59
|
-
geo_location:
|
|
994
|
+
geo_location: CartApplicationModel.GeoLocation(),
|
|
60
995
|
google_map_point: Joi.any(),
|
|
61
996
|
id: Joi.string().allow(""),
|
|
62
997
|
is_active: Joi.boolean(),
|
|
@@ -70,52 +1005,70 @@ class CartModel {
|
|
|
70
1005
|
user_id: Joi.string().allow(""),
|
|
71
1006
|
});
|
|
72
1007
|
}
|
|
1008
|
+
|
|
1009
|
+
/** @returns {AppliedFreeArticles} */
|
|
73
1010
|
static AppliedFreeArticles() {
|
|
74
1011
|
return Joi.object({
|
|
75
1012
|
article_id: Joi.string().allow(""),
|
|
76
|
-
free_gift_item_details:
|
|
1013
|
+
free_gift_item_details: CartApplicationModel.FreeGiftItem(),
|
|
77
1014
|
parent_item_identifier: Joi.string().allow(""),
|
|
78
1015
|
quantity: Joi.number(),
|
|
79
1016
|
});
|
|
80
1017
|
}
|
|
1018
|
+
|
|
1019
|
+
/** @returns {AppliedPromotion} */
|
|
81
1020
|
static AppliedPromotion() {
|
|
82
1021
|
return Joi.object({
|
|
83
1022
|
amount: Joi.number(),
|
|
84
|
-
applied_free_articles: Joi.array().items(
|
|
1023
|
+
applied_free_articles: Joi.array().items(
|
|
1024
|
+
CartApplicationModel.AppliedFreeArticles()
|
|
1025
|
+
),
|
|
85
1026
|
article_quantity: Joi.number(),
|
|
86
|
-
buy_rules: Joi.array().items(
|
|
87
|
-
discount_rules: Joi.array().items(
|
|
1027
|
+
buy_rules: Joi.array().items(CartApplicationModel.BuyRules()),
|
|
1028
|
+
discount_rules: Joi.array().items(
|
|
1029
|
+
CartApplicationModel.DiscountRulesApp()
|
|
1030
|
+
),
|
|
88
1031
|
mrp_promotion: Joi.boolean(),
|
|
89
1032
|
offer_text: Joi.string().allow(""),
|
|
90
|
-
ownership:
|
|
1033
|
+
ownership: CartApplicationModel.Ownership(),
|
|
91
1034
|
promo_id: Joi.string().allow(""),
|
|
92
1035
|
promotion_group: Joi.string().allow(""),
|
|
93
1036
|
promotion_name: Joi.string().allow(""),
|
|
94
1037
|
promotion_type: Joi.string().allow(""),
|
|
95
1038
|
});
|
|
96
1039
|
}
|
|
1040
|
+
|
|
1041
|
+
/** @returns {ApplyCouponRequest} */
|
|
97
1042
|
static ApplyCouponRequest() {
|
|
98
1043
|
return Joi.object({
|
|
99
1044
|
coupon_code: Joi.string().allow("").required(),
|
|
100
1045
|
});
|
|
101
1046
|
}
|
|
1047
|
+
|
|
1048
|
+
/** @returns {ArticleGiftDetail} */
|
|
102
1049
|
static ArticleGiftDetail() {
|
|
103
1050
|
return Joi.object({
|
|
104
|
-
article_id:
|
|
1051
|
+
article_id: CartApplicationModel.GiftDetail(),
|
|
105
1052
|
});
|
|
106
1053
|
}
|
|
1054
|
+
|
|
1055
|
+
/** @returns {ArticlePriceInfo} */
|
|
107
1056
|
static ArticlePriceInfo() {
|
|
108
1057
|
return Joi.object({
|
|
109
|
-
base:
|
|
110
|
-
converted:
|
|
1058
|
+
base: CartApplicationModel.BasePrice(),
|
|
1059
|
+
converted: CartApplicationModel.BasePrice(),
|
|
111
1060
|
});
|
|
112
1061
|
}
|
|
1062
|
+
|
|
1063
|
+
/** @returns {BaseInfo} */
|
|
113
1064
|
static BaseInfo() {
|
|
114
1065
|
return Joi.object({
|
|
115
1066
|
name: Joi.string().allow(""),
|
|
116
1067
|
uid: Joi.number(),
|
|
117
1068
|
});
|
|
118
1069
|
}
|
|
1070
|
+
|
|
1071
|
+
/** @returns {BasePrice} */
|
|
119
1072
|
static BasePrice() {
|
|
120
1073
|
return Joi.object({
|
|
121
1074
|
currency_code: Joi.string().allow(""),
|
|
@@ -124,37 +1077,49 @@ class CartModel {
|
|
|
124
1077
|
marked: Joi.number(),
|
|
125
1078
|
});
|
|
126
1079
|
}
|
|
1080
|
+
|
|
1081
|
+
/** @returns {BulkPriceOffer} */
|
|
127
1082
|
static BulkPriceOffer() {
|
|
128
1083
|
return Joi.object({
|
|
129
|
-
offers: Joi.array().items(
|
|
130
|
-
seller:
|
|
1084
|
+
offers: Joi.array().items(CartApplicationModel.OfferItem()),
|
|
1085
|
+
seller: CartApplicationModel.OfferSeller(),
|
|
131
1086
|
});
|
|
132
1087
|
}
|
|
1088
|
+
|
|
1089
|
+
/** @returns {BulkPriceResponse} */
|
|
133
1090
|
static BulkPriceResponse() {
|
|
134
1091
|
return Joi.object({
|
|
135
|
-
data: Joi.array().items(
|
|
1092
|
+
data: Joi.array().items(CartApplicationModel.BulkPriceOffer()),
|
|
136
1093
|
});
|
|
137
1094
|
}
|
|
1095
|
+
|
|
1096
|
+
/** @returns {BuyRules} */
|
|
138
1097
|
static BuyRules() {
|
|
139
1098
|
return Joi.object({
|
|
140
1099
|
cart_conditions: Joi.any(),
|
|
141
1100
|
item_criteria: Joi.any(),
|
|
142
1101
|
});
|
|
143
1102
|
}
|
|
1103
|
+
|
|
1104
|
+
/** @returns {CartBreakup} */
|
|
144
1105
|
static CartBreakup() {
|
|
145
1106
|
return Joi.object({
|
|
146
|
-
coupon:
|
|
147
|
-
display: Joi.array().items(
|
|
148
|
-
loyalty_points:
|
|
149
|
-
raw:
|
|
1107
|
+
coupon: CartApplicationModel.CouponBreakup(),
|
|
1108
|
+
display: Joi.array().items(CartApplicationModel.DisplayBreakup()),
|
|
1109
|
+
loyalty_points: CartApplicationModel.LoyaltyPoints(),
|
|
1110
|
+
raw: CartApplicationModel.RawBreakup(),
|
|
150
1111
|
});
|
|
151
1112
|
}
|
|
1113
|
+
|
|
1114
|
+
/** @returns {CartCheckoutCustomMeta} */
|
|
152
1115
|
static CartCheckoutCustomMeta() {
|
|
153
1116
|
return Joi.object({
|
|
154
1117
|
key: Joi.string().allow("").required(),
|
|
155
1118
|
value: Joi.string().allow("").required(),
|
|
156
1119
|
});
|
|
157
1120
|
}
|
|
1121
|
+
|
|
1122
|
+
/** @returns {CartCheckoutDetailRequest} */
|
|
158
1123
|
static CartCheckoutDetailRequest() {
|
|
159
1124
|
return Joi.object({
|
|
160
1125
|
address_id: Joi.string().allow(""),
|
|
@@ -162,8 +1127,10 @@ class CartModel {
|
|
|
162
1127
|
billing_address: Joi.any(),
|
|
163
1128
|
billing_address_id: Joi.string().allow(""),
|
|
164
1129
|
callback_url: Joi.string().allow("").allow(null),
|
|
165
|
-
custom_meta: Joi.array().items(
|
|
166
|
-
|
|
1130
|
+
custom_meta: Joi.array().items(
|
|
1131
|
+
CartApplicationModel.CartCheckoutCustomMeta()
|
|
1132
|
+
),
|
|
1133
|
+
customer_details: CartApplicationModel.CustomerDetails(),
|
|
167
1134
|
delivery_address: Joi.any(),
|
|
168
1135
|
extra_meta: Joi.any(),
|
|
169
1136
|
id: Joi.string().allow("").allow(null),
|
|
@@ -175,9 +1142,11 @@ class CartModel {
|
|
|
175
1142
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
176
1143
|
payment_mode: Joi.string().allow("").required(),
|
|
177
1144
|
payment_params: Joi.any().allow(null),
|
|
178
|
-
staff:
|
|
1145
|
+
staff: CartApplicationModel.StaffCheckout(),
|
|
179
1146
|
});
|
|
180
1147
|
}
|
|
1148
|
+
|
|
1149
|
+
/** @returns {CartCheckoutDetailV2Request} */
|
|
181
1150
|
static CartCheckoutDetailV2Request() {
|
|
182
1151
|
return Joi.object({
|
|
183
1152
|
address_id: Joi.string().allow(""),
|
|
@@ -187,7 +1156,7 @@ class CartModel {
|
|
|
187
1156
|
callback_url: Joi.string().allow("").allow(null),
|
|
188
1157
|
cart_id: Joi.string().allow(""),
|
|
189
1158
|
custom_meta: Joi.any(),
|
|
190
|
-
customer_details:
|
|
1159
|
+
customer_details: CartApplicationModel.CustomerDetails(),
|
|
191
1160
|
delivery_address: Joi.any(),
|
|
192
1161
|
extra_meta: Joi.any(),
|
|
193
1162
|
id: Joi.string().allow("").allow(null),
|
|
@@ -197,17 +1166,21 @@ class CartModel {
|
|
|
197
1166
|
ordering_store: Joi.number().allow(null),
|
|
198
1167
|
payment_auto_confirm: Joi.boolean(),
|
|
199
1168
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
200
|
-
payment_methods: Joi.array()
|
|
1169
|
+
payment_methods: Joi.array()
|
|
1170
|
+
.items(CartApplicationModel.PaymentMethod())
|
|
1171
|
+
.required(),
|
|
201
1172
|
payment_mode: Joi.string().allow("").required(),
|
|
202
1173
|
payment_params: Joi.any().allow(null),
|
|
203
|
-
staff:
|
|
1174
|
+
staff: CartApplicationModel.StaffCheckout(),
|
|
204
1175
|
});
|
|
205
1176
|
}
|
|
1177
|
+
|
|
1178
|
+
/** @returns {CartCheckoutResponse} */
|
|
206
1179
|
static CartCheckoutResponse() {
|
|
207
1180
|
return Joi.object({
|
|
208
1181
|
app_intercept_url: Joi.string().allow(""),
|
|
209
1182
|
callback_url: Joi.string().allow(""),
|
|
210
|
-
cart:
|
|
1183
|
+
cart: CartApplicationModel.CheckCart(),
|
|
211
1184
|
data: Joi.any(),
|
|
212
1185
|
message: Joi.string().allow(""),
|
|
213
1186
|
order_id: Joi.string().allow(""),
|
|
@@ -215,138 +1188,166 @@ class CartModel {
|
|
|
215
1188
|
success: Joi.boolean(),
|
|
216
1189
|
});
|
|
217
1190
|
}
|
|
1191
|
+
|
|
1192
|
+
/** @returns {CartCurrency} */
|
|
218
1193
|
static CartCurrency() {
|
|
219
1194
|
return Joi.object({
|
|
220
1195
|
code: Joi.string().allow(""),
|
|
221
1196
|
symbol: Joi.string().allow(""),
|
|
222
1197
|
});
|
|
223
1198
|
}
|
|
1199
|
+
|
|
1200
|
+
/** @returns {CartDetailResponse} */
|
|
224
1201
|
static CartDetailResponse() {
|
|
225
1202
|
return Joi.object({
|
|
226
|
-
applied_promo_details: Joi.array().items(
|
|
227
|
-
|
|
1203
|
+
applied_promo_details: Joi.array().items(
|
|
1204
|
+
CartApplicationModel.AppliedPromotion()
|
|
1205
|
+
),
|
|
1206
|
+
breakup_values: CartApplicationModel.CartBreakup(),
|
|
228
1207
|
buy_now: Joi.boolean(),
|
|
229
1208
|
checkout_mode: Joi.string().allow(""),
|
|
230
1209
|
comment: Joi.string().allow(""),
|
|
231
1210
|
coupon_text: Joi.string().allow(""),
|
|
232
|
-
currency:
|
|
1211
|
+
currency: CartApplicationModel.CartCurrency(),
|
|
233
1212
|
delivery_charge_info: Joi.string().allow(""),
|
|
234
|
-
delivery_promise:
|
|
1213
|
+
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
235
1214
|
gstin: Joi.string().allow(""),
|
|
236
1215
|
id: Joi.string().allow(""),
|
|
237
1216
|
is_valid: Joi.boolean(),
|
|
238
|
-
items: Joi.array().items(
|
|
1217
|
+
items: Joi.array().items(CartApplicationModel.CartProductInfo()),
|
|
239
1218
|
last_modified: Joi.string().allow(""),
|
|
240
1219
|
message: Joi.string().allow(""),
|
|
241
1220
|
pan_config: Joi.any(),
|
|
242
1221
|
pan_no: Joi.string().allow(""),
|
|
243
|
-
payment_selection_lock:
|
|
1222
|
+
payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
|
|
244
1223
|
restrict_checkout: Joi.boolean(),
|
|
245
1224
|
});
|
|
246
1225
|
}
|
|
1226
|
+
|
|
1227
|
+
/** @returns {CartItemCountResponse} */
|
|
247
1228
|
static CartItemCountResponse() {
|
|
248
1229
|
return Joi.object({
|
|
249
1230
|
user_cart_items_count: Joi.number(),
|
|
250
1231
|
});
|
|
251
1232
|
}
|
|
1233
|
+
|
|
1234
|
+
/** @returns {CartMetaMissingResponse} */
|
|
252
1235
|
static CartMetaMissingResponse() {
|
|
253
1236
|
return Joi.object({
|
|
254
1237
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
255
1238
|
});
|
|
256
1239
|
}
|
|
1240
|
+
|
|
1241
|
+
/** @returns {CartMetaRequest} */
|
|
257
1242
|
static CartMetaRequest() {
|
|
258
1243
|
return Joi.object({
|
|
259
1244
|
checkout_mode: Joi.string().allow(""),
|
|
260
1245
|
comment: Joi.string().allow(""),
|
|
261
1246
|
delivery_slots: Joi.any(),
|
|
262
|
-
gift_details:
|
|
1247
|
+
gift_details: CartApplicationModel.ArticleGiftDetail(),
|
|
263
1248
|
gstin: Joi.string().allow(""),
|
|
264
1249
|
pick_up_customer_details: Joi.any(),
|
|
265
1250
|
});
|
|
266
1251
|
}
|
|
1252
|
+
|
|
1253
|
+
/** @returns {CartMetaResponse} */
|
|
267
1254
|
static CartMetaResponse() {
|
|
268
1255
|
return Joi.object({
|
|
269
1256
|
is_valid: Joi.boolean(),
|
|
270
1257
|
message: Joi.string().allow(""),
|
|
271
1258
|
});
|
|
272
1259
|
}
|
|
1260
|
+
|
|
1261
|
+
/** @returns {CartProduct} */
|
|
273
1262
|
static CartProduct() {
|
|
274
1263
|
return Joi.object({
|
|
275
1264
|
_custom_json: Joi.any(),
|
|
276
|
-
action:
|
|
277
|
-
brand:
|
|
278
|
-
categories: Joi.array().items(
|
|
279
|
-
images: Joi.array().items(
|
|
1265
|
+
action: CartApplicationModel.ProductAction(),
|
|
1266
|
+
brand: CartApplicationModel.BaseInfo(),
|
|
1267
|
+
categories: Joi.array().items(CartApplicationModel.CategoryInfo()),
|
|
1268
|
+
images: Joi.array().items(CartApplicationModel.ProductImage()),
|
|
280
1269
|
item_code: Joi.string().allow("").allow(null),
|
|
281
1270
|
name: Joi.string().allow(""),
|
|
282
1271
|
slug: Joi.string().allow(""),
|
|
283
1272
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
284
|
-
teaser_tag:
|
|
1273
|
+
teaser_tag: CartApplicationModel.Tags(),
|
|
285
1274
|
type: Joi.string().allow(""),
|
|
286
1275
|
uid: Joi.number(),
|
|
287
1276
|
});
|
|
288
1277
|
}
|
|
1278
|
+
|
|
1279
|
+
/** @returns {CartProductIdentifer} */
|
|
289
1280
|
static CartProductIdentifer() {
|
|
290
1281
|
return Joi.object({
|
|
291
1282
|
identifier: Joi.string().allow(""),
|
|
292
1283
|
});
|
|
293
1284
|
}
|
|
1285
|
+
|
|
1286
|
+
/** @returns {CartProductInfo} */
|
|
294
1287
|
static CartProductInfo() {
|
|
295
1288
|
return Joi.object({
|
|
296
|
-
article:
|
|
297
|
-
availability:
|
|
1289
|
+
article: CartApplicationModel.ProductArticle(),
|
|
1290
|
+
availability: CartApplicationModel.ProductAvailability(),
|
|
298
1291
|
bulk_offer: Joi.any(),
|
|
299
|
-
coupon:
|
|
1292
|
+
coupon: CartApplicationModel.CouponDetails(),
|
|
300
1293
|
coupon_message: Joi.string().allow(""),
|
|
301
1294
|
custom_order: Joi.any(),
|
|
302
|
-
delivery_promise:
|
|
1295
|
+
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
303
1296
|
discount: Joi.string().allow(""),
|
|
304
|
-
identifiers:
|
|
1297
|
+
identifiers: CartApplicationModel.CartProductIdentifer().required(),
|
|
305
1298
|
is_set: Joi.boolean(),
|
|
306
1299
|
key: Joi.string().allow(""),
|
|
307
1300
|
message: Joi.string().allow(""),
|
|
308
1301
|
moq: Joi.any(),
|
|
309
1302
|
parent_item_identifiers: Joi.any(),
|
|
310
|
-
price:
|
|
311
|
-
price_per_unit:
|
|
312
|
-
product:
|
|
313
|
-
promo_meta:
|
|
314
|
-
promotions_applied: Joi.array().items(
|
|
1303
|
+
price: CartApplicationModel.ProductPriceInfo(),
|
|
1304
|
+
price_per_unit: CartApplicationModel.ProductPriceInfo(),
|
|
1305
|
+
product: CartApplicationModel.CartProduct(),
|
|
1306
|
+
promo_meta: CartApplicationModel.PromoMeta(),
|
|
1307
|
+
promotions_applied: Joi.array().items(
|
|
1308
|
+
CartApplicationModel.AppliedPromotion()
|
|
1309
|
+
),
|
|
315
1310
|
quantity: Joi.number(),
|
|
316
1311
|
});
|
|
317
1312
|
}
|
|
1313
|
+
|
|
1314
|
+
/** @returns {CartShipmentsResponse} */
|
|
318
1315
|
static CartShipmentsResponse() {
|
|
319
1316
|
return Joi.object({
|
|
320
|
-
breakup_values:
|
|
1317
|
+
breakup_values: CartApplicationModel.CartBreakup(),
|
|
321
1318
|
buy_now: Joi.boolean(),
|
|
322
1319
|
cart_id: Joi.number(),
|
|
323
1320
|
checkout_mode: Joi.string().allow(""),
|
|
324
1321
|
comment: Joi.string().allow(""),
|
|
325
1322
|
coupon_text: Joi.string().allow(""),
|
|
326
|
-
currency:
|
|
1323
|
+
currency: CartApplicationModel.CartCurrency(),
|
|
327
1324
|
delivery_charge_info: Joi.string().allow(""),
|
|
328
|
-
delivery_promise:
|
|
1325
|
+
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
329
1326
|
error: Joi.boolean(),
|
|
330
1327
|
gstin: Joi.string().allow(""),
|
|
331
1328
|
id: Joi.string().allow(""),
|
|
332
1329
|
is_valid: Joi.boolean(),
|
|
333
1330
|
last_modified: Joi.string().allow(""),
|
|
334
1331
|
message: Joi.string().allow(""),
|
|
335
|
-
payment_selection_lock:
|
|
1332
|
+
payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
|
|
336
1333
|
restrict_checkout: Joi.boolean(),
|
|
337
|
-
shipments: Joi.array().items(
|
|
1334
|
+
shipments: Joi.array().items(CartApplicationModel.ShipmentResponse()),
|
|
338
1335
|
uid: Joi.string().allow(""),
|
|
339
1336
|
});
|
|
340
1337
|
}
|
|
1338
|
+
|
|
1339
|
+
/** @returns {CategoryInfo} */
|
|
341
1340
|
static CategoryInfo() {
|
|
342
1341
|
return Joi.object({
|
|
343
1342
|
name: Joi.string().allow(""),
|
|
344
1343
|
uid: Joi.number(),
|
|
345
1344
|
});
|
|
346
1345
|
}
|
|
1346
|
+
|
|
1347
|
+
/** @returns {CheckCart} */
|
|
347
1348
|
static CheckCart() {
|
|
348
1349
|
return Joi.object({
|
|
349
|
-
breakup_values:
|
|
1350
|
+
breakup_values: CartApplicationModel.CartBreakup(),
|
|
350
1351
|
buy_now: Joi.boolean(),
|
|
351
1352
|
cart_id: Joi.number(),
|
|
352
1353
|
checkout_mode: Joi.string().allow(""),
|
|
@@ -355,20 +1356,20 @@ class CartModel {
|
|
|
355
1356
|
cod_message: Joi.string().allow(""),
|
|
356
1357
|
comment: Joi.string().allow(""),
|
|
357
1358
|
coupon_text: Joi.string().allow(""),
|
|
358
|
-
currency:
|
|
1359
|
+
currency: CartApplicationModel.CartCurrency(),
|
|
359
1360
|
delivery_charge_info: Joi.string().allow(""),
|
|
360
1361
|
delivery_charge_order_value: Joi.number(),
|
|
361
1362
|
delivery_charges: Joi.number(),
|
|
362
|
-
delivery_promise:
|
|
1363
|
+
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
363
1364
|
error_message: Joi.string().allow(""),
|
|
364
1365
|
gstin: Joi.string().allow(""),
|
|
365
1366
|
id: Joi.string().allow(""),
|
|
366
1367
|
is_valid: Joi.boolean(),
|
|
367
|
-
items: Joi.array().items(
|
|
1368
|
+
items: Joi.array().items(CartApplicationModel.CartProductInfo()),
|
|
368
1369
|
last_modified: Joi.string().allow(""),
|
|
369
1370
|
message: Joi.string().allow(""),
|
|
370
1371
|
order_id: Joi.string().allow(""),
|
|
371
|
-
payment_selection_lock:
|
|
1372
|
+
payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
|
|
372
1373
|
restrict_checkout: Joi.boolean(),
|
|
373
1374
|
store_code: Joi.string().allow(""),
|
|
374
1375
|
store_emps: Joi.array().items(Joi.any()),
|
|
@@ -377,6 +1378,8 @@ class CartModel {
|
|
|
377
1378
|
user_type: Joi.string().allow(""),
|
|
378
1379
|
});
|
|
379
1380
|
}
|
|
1381
|
+
|
|
1382
|
+
/** @returns {Coupon} */
|
|
380
1383
|
static Coupon() {
|
|
381
1384
|
return Joi.object({
|
|
382
1385
|
coupon_code: Joi.string().allow(""),
|
|
@@ -393,6 +1396,8 @@ class CartModel {
|
|
|
393
1396
|
title: Joi.string().allow(""),
|
|
394
1397
|
});
|
|
395
1398
|
}
|
|
1399
|
+
|
|
1400
|
+
/** @returns {CouponBreakup} */
|
|
396
1401
|
static CouponBreakup() {
|
|
397
1402
|
return Joi.object({
|
|
398
1403
|
code: Joi.string().allow(""),
|
|
@@ -410,6 +1415,8 @@ class CartModel {
|
|
|
410
1415
|
value: Joi.number(),
|
|
411
1416
|
});
|
|
412
1417
|
}
|
|
1418
|
+
|
|
1419
|
+
/** @returns {CouponDetails} */
|
|
413
1420
|
static CouponDetails() {
|
|
414
1421
|
return Joi.object({
|
|
415
1422
|
code: Joi.string().allow(""),
|
|
@@ -417,6 +1424,8 @@ class CartModel {
|
|
|
417
1424
|
discount_total_quantity: Joi.number(),
|
|
418
1425
|
});
|
|
419
1426
|
}
|
|
1427
|
+
|
|
1428
|
+
/** @returns {CouponValidity} */
|
|
420
1429
|
static CouponValidity() {
|
|
421
1430
|
return Joi.object({
|
|
422
1431
|
code: Joi.string().allow("").allow(null),
|
|
@@ -427,12 +1436,16 @@ class CartModel {
|
|
|
427
1436
|
valid: Joi.boolean(),
|
|
428
1437
|
});
|
|
429
1438
|
}
|
|
1439
|
+
|
|
1440
|
+
/** @returns {CurrencyInfo} */
|
|
430
1441
|
static CurrencyInfo() {
|
|
431
1442
|
return Joi.object({
|
|
432
1443
|
code: Joi.string().allow(""),
|
|
433
1444
|
symbol: Joi.string().allow(""),
|
|
434
1445
|
});
|
|
435
1446
|
}
|
|
1447
|
+
|
|
1448
|
+
/** @returns {CustomerDetails} */
|
|
436
1449
|
static CustomerDetails() {
|
|
437
1450
|
return Joi.object({
|
|
438
1451
|
email: Joi.string().allow("").allow(null),
|
|
@@ -440,18 +1453,24 @@ class CartModel {
|
|
|
440
1453
|
name: Joi.string().allow(""),
|
|
441
1454
|
});
|
|
442
1455
|
}
|
|
1456
|
+
|
|
1457
|
+
/** @returns {DeleteAddressResponse} */
|
|
443
1458
|
static DeleteAddressResponse() {
|
|
444
1459
|
return Joi.object({
|
|
445
1460
|
id: Joi.string().allow(""),
|
|
446
1461
|
is_deleted: Joi.boolean(),
|
|
447
1462
|
});
|
|
448
1463
|
}
|
|
1464
|
+
|
|
1465
|
+
/** @returns {DeleteCartDetailResponse} */
|
|
449
1466
|
static DeleteCartDetailResponse() {
|
|
450
1467
|
return Joi.object({
|
|
451
1468
|
message: Joi.string().allow(""),
|
|
452
1469
|
success: Joi.boolean(),
|
|
453
1470
|
});
|
|
454
1471
|
}
|
|
1472
|
+
|
|
1473
|
+
/** @returns {DiscountRulesApp} */
|
|
455
1474
|
static DiscountRulesApp() {
|
|
456
1475
|
return Joi.object({
|
|
457
1476
|
item_criteria: Joi.any(),
|
|
@@ -460,6 +1479,8 @@ class CartModel {
|
|
|
460
1479
|
raw_offer: Joi.any(),
|
|
461
1480
|
});
|
|
462
1481
|
}
|
|
1482
|
+
|
|
1483
|
+
/** @returns {DisplayBreakup} */
|
|
463
1484
|
static DisplayBreakup() {
|
|
464
1485
|
return Joi.object({
|
|
465
1486
|
currency_code: Joi.string().allow(""),
|
|
@@ -470,6 +1491,8 @@ class CartModel {
|
|
|
470
1491
|
value: Joi.number(),
|
|
471
1492
|
});
|
|
472
1493
|
}
|
|
1494
|
+
|
|
1495
|
+
/** @returns {FreeGiftItem} */
|
|
473
1496
|
static FreeGiftItem() {
|
|
474
1497
|
return Joi.object({
|
|
475
1498
|
item_brand_name: Joi.string().allow(""),
|
|
@@ -480,6 +1503,8 @@ class CartModel {
|
|
|
480
1503
|
item_slug: Joi.string().allow(""),
|
|
481
1504
|
});
|
|
482
1505
|
}
|
|
1506
|
+
|
|
1507
|
+
/** @returns {FreeGiftItems} */
|
|
483
1508
|
static FreeGiftItems() {
|
|
484
1509
|
return Joi.object({
|
|
485
1510
|
item_brand_name: Joi.string().allow(""),
|
|
@@ -490,51 +1515,67 @@ class CartModel {
|
|
|
490
1515
|
item_slug: Joi.string().allow(""),
|
|
491
1516
|
});
|
|
492
1517
|
}
|
|
1518
|
+
|
|
1519
|
+
/** @returns {GeoLocation} */
|
|
493
1520
|
static GeoLocation() {
|
|
494
1521
|
return Joi.object({
|
|
495
1522
|
latitude: Joi.number(),
|
|
496
1523
|
longitude: Joi.number(),
|
|
497
1524
|
});
|
|
498
1525
|
}
|
|
1526
|
+
|
|
1527
|
+
/** @returns {GetAddressesResponse} */
|
|
499
1528
|
static GetAddressesResponse() {
|
|
500
1529
|
return Joi.object({
|
|
501
|
-
address: Joi.array().items(
|
|
1530
|
+
address: Joi.array().items(CartApplicationModel.Address()),
|
|
502
1531
|
pii_masking: Joi.boolean(),
|
|
503
1532
|
});
|
|
504
1533
|
}
|
|
1534
|
+
|
|
1535
|
+
/** @returns {GetCouponResponse} */
|
|
505
1536
|
static GetCouponResponse() {
|
|
506
1537
|
return Joi.object({
|
|
507
|
-
available_coupon_list: Joi.array().items(
|
|
508
|
-
page:
|
|
1538
|
+
available_coupon_list: Joi.array().items(CartApplicationModel.Coupon()),
|
|
1539
|
+
page: CartApplicationModel.PageCoupon(),
|
|
509
1540
|
});
|
|
510
1541
|
}
|
|
1542
|
+
|
|
1543
|
+
/** @returns {GetShareCartLinkRequest} */
|
|
511
1544
|
static GetShareCartLinkRequest() {
|
|
512
1545
|
return Joi.object({
|
|
513
1546
|
id: Joi.string().allow(""),
|
|
514
1547
|
meta: Joi.any(),
|
|
515
1548
|
});
|
|
516
1549
|
}
|
|
1550
|
+
|
|
1551
|
+
/** @returns {GetShareCartLinkResponse} */
|
|
517
1552
|
static GetShareCartLinkResponse() {
|
|
518
1553
|
return Joi.object({
|
|
519
1554
|
share_url: Joi.string().allow(""),
|
|
520
1555
|
token: Joi.string().allow(""),
|
|
521
1556
|
});
|
|
522
1557
|
}
|
|
1558
|
+
|
|
1559
|
+
/** @returns {GiftDetail} */
|
|
523
1560
|
static GiftDetail() {
|
|
524
1561
|
return Joi.object({
|
|
525
1562
|
gift_message: Joi.string().allow(""),
|
|
526
1563
|
is_gift_applied: Joi.boolean(),
|
|
527
1564
|
});
|
|
528
1565
|
}
|
|
1566
|
+
|
|
1567
|
+
/** @returns {LadderOfferItem} */
|
|
529
1568
|
static LadderOfferItem() {
|
|
530
1569
|
return Joi.object({
|
|
531
1570
|
margin: Joi.number(),
|
|
532
1571
|
max_quantity: Joi.number(),
|
|
533
1572
|
min_quantity: Joi.number(),
|
|
534
|
-
price:
|
|
1573
|
+
price: CartApplicationModel.LadderPrice(),
|
|
535
1574
|
type: Joi.string().allow(""),
|
|
536
1575
|
});
|
|
537
1576
|
}
|
|
1577
|
+
|
|
1578
|
+
/** @returns {LadderPrice} */
|
|
538
1579
|
static LadderPrice() {
|
|
539
1580
|
return Joi.object({
|
|
540
1581
|
currency_code: Joi.string().allow(""),
|
|
@@ -544,26 +1585,34 @@ class CartModel {
|
|
|
544
1585
|
offer_price: Joi.number(),
|
|
545
1586
|
});
|
|
546
1587
|
}
|
|
1588
|
+
|
|
1589
|
+
/** @returns {LadderPriceOffer} */
|
|
547
1590
|
static LadderPriceOffer() {
|
|
548
1591
|
return Joi.object({
|
|
549
1592
|
buy_rules: Joi.any(),
|
|
550
1593
|
calculate_on: Joi.string().allow(""),
|
|
551
1594
|
description: Joi.string().allow(""),
|
|
552
1595
|
discount_rules: Joi.array().items(Joi.any()),
|
|
553
|
-
free_gift_items: Joi.array().items(
|
|
1596
|
+
free_gift_items: Joi.array().items(CartApplicationModel.FreeGiftItems()),
|
|
554
1597
|
id: Joi.string().allow(""),
|
|
555
|
-
offer_prices: Joi.array().items(
|
|
1598
|
+
offer_prices: Joi.array().items(CartApplicationModel.LadderOfferItem()),
|
|
556
1599
|
offer_text: Joi.string().allow(""),
|
|
557
1600
|
promotion_group: Joi.string().allow(""),
|
|
558
1601
|
valid_till: Joi.string().allow(""),
|
|
559
1602
|
});
|
|
560
1603
|
}
|
|
1604
|
+
|
|
1605
|
+
/** @returns {LadderPriceOffers} */
|
|
561
1606
|
static LadderPriceOffers() {
|
|
562
1607
|
return Joi.object({
|
|
563
|
-
available_offers: Joi.array().items(
|
|
564
|
-
|
|
1608
|
+
available_offers: Joi.array().items(
|
|
1609
|
+
CartApplicationModel.LadderPriceOffer()
|
|
1610
|
+
),
|
|
1611
|
+
currency: CartApplicationModel.CurrencyInfo(),
|
|
565
1612
|
});
|
|
566
1613
|
}
|
|
1614
|
+
|
|
1615
|
+
/** @returns {LoyaltyPoints} */
|
|
567
1616
|
static LoyaltyPoints() {
|
|
568
1617
|
return Joi.object({
|
|
569
1618
|
applicable: Joi.number(),
|
|
@@ -572,17 +1621,21 @@ class CartModel {
|
|
|
572
1621
|
total: Joi.number(),
|
|
573
1622
|
});
|
|
574
1623
|
}
|
|
1624
|
+
|
|
1625
|
+
/** @returns {OfferItem} */
|
|
575
1626
|
static OfferItem() {
|
|
576
1627
|
return Joi.object({
|
|
577
1628
|
auto_applied: Joi.boolean(),
|
|
578
1629
|
best: Joi.boolean(),
|
|
579
1630
|
margin: Joi.number(),
|
|
580
|
-
price:
|
|
1631
|
+
price: CartApplicationModel.OfferPrice(),
|
|
581
1632
|
quantity: Joi.number(),
|
|
582
1633
|
total: Joi.number(),
|
|
583
1634
|
type: Joi.string().allow(""),
|
|
584
1635
|
});
|
|
585
1636
|
}
|
|
1637
|
+
|
|
1638
|
+
/** @returns {OfferPrice} */
|
|
586
1639
|
static OfferPrice() {
|
|
587
1640
|
return Joi.object({
|
|
588
1641
|
bulk_effective: Joi.number(),
|
|
@@ -592,24 +1645,32 @@ class CartModel {
|
|
|
592
1645
|
marked: Joi.number(),
|
|
593
1646
|
});
|
|
594
1647
|
}
|
|
1648
|
+
|
|
1649
|
+
/** @returns {OfferSeller} */
|
|
595
1650
|
static OfferSeller() {
|
|
596
1651
|
return Joi.object({
|
|
597
1652
|
name: Joi.string().allow(""),
|
|
598
1653
|
uid: Joi.number(),
|
|
599
1654
|
});
|
|
600
1655
|
}
|
|
1656
|
+
|
|
1657
|
+
/** @returns {OperationErrorResponse} */
|
|
601
1658
|
static OperationErrorResponse() {
|
|
602
1659
|
return Joi.object({
|
|
603
1660
|
message: Joi.string().allow(""),
|
|
604
1661
|
success: Joi.boolean(),
|
|
605
1662
|
});
|
|
606
1663
|
}
|
|
1664
|
+
|
|
1665
|
+
/** @returns {Ownership} */
|
|
607
1666
|
static Ownership() {
|
|
608
1667
|
return Joi.object({
|
|
609
1668
|
payable_by: Joi.string().allow(""),
|
|
610
1669
|
payable_category: Joi.string().allow(""),
|
|
611
1670
|
});
|
|
612
1671
|
}
|
|
1672
|
+
|
|
1673
|
+
/** @returns {PageCoupon} */
|
|
613
1674
|
static PageCoupon() {
|
|
614
1675
|
return Joi.object({
|
|
615
1676
|
current: Joi.number(),
|
|
@@ -619,13 +1680,17 @@ class CartModel {
|
|
|
619
1680
|
total_item_count: Joi.number(),
|
|
620
1681
|
});
|
|
621
1682
|
}
|
|
1683
|
+
|
|
1684
|
+
/** @returns {PaymentCouponValidate} */
|
|
622
1685
|
static PaymentCouponValidate() {
|
|
623
1686
|
return Joi.object({
|
|
624
|
-
coupon_validity:
|
|
1687
|
+
coupon_validity: CartApplicationModel.CouponValidity(),
|
|
625
1688
|
message: Joi.string().allow(""),
|
|
626
1689
|
success: Joi.boolean().required(),
|
|
627
1690
|
});
|
|
628
1691
|
}
|
|
1692
|
+
|
|
1693
|
+
/** @returns {PaymentMeta} */
|
|
629
1694
|
static PaymentMeta() {
|
|
630
1695
|
return Joi.object({
|
|
631
1696
|
merchant_code: Joi.string().allow(""),
|
|
@@ -634,15 +1699,19 @@ class CartModel {
|
|
|
634
1699
|
type: Joi.string().allow(""),
|
|
635
1700
|
});
|
|
636
1701
|
}
|
|
1702
|
+
|
|
1703
|
+
/** @returns {PaymentMethod} */
|
|
637
1704
|
static PaymentMethod() {
|
|
638
1705
|
return Joi.object({
|
|
639
1706
|
amount: Joi.number().allow(null),
|
|
640
1707
|
mode: Joi.string().allow("").required(),
|
|
641
1708
|
name: Joi.string().allow(""),
|
|
642
1709
|
payment: Joi.string().allow(""),
|
|
643
|
-
payment_meta:
|
|
1710
|
+
payment_meta: CartApplicationModel.PaymentMeta().required(),
|
|
644
1711
|
});
|
|
645
1712
|
}
|
|
1713
|
+
|
|
1714
|
+
/** @returns {PaymentSelectionLock} */
|
|
646
1715
|
static PaymentSelectionLock() {
|
|
647
1716
|
return Joi.object({
|
|
648
1717
|
default_options: Joi.string().allow(""),
|
|
@@ -650,13 +1719,17 @@ class CartModel {
|
|
|
650
1719
|
payment_identifier: Joi.string().allow(""),
|
|
651
1720
|
});
|
|
652
1721
|
}
|
|
1722
|
+
|
|
1723
|
+
/** @returns {ProductAction} */
|
|
653
1724
|
static ProductAction() {
|
|
654
1725
|
return Joi.object({
|
|
655
|
-
query:
|
|
1726
|
+
query: CartApplicationModel.ActionQuery(),
|
|
656
1727
|
type: Joi.string().allow(""),
|
|
657
1728
|
url: Joi.string().allow(""),
|
|
658
1729
|
});
|
|
659
1730
|
}
|
|
1731
|
+
|
|
1732
|
+
/** @returns {ProductArticle} */
|
|
660
1733
|
static ProductArticle() {
|
|
661
1734
|
return Joi.object({
|
|
662
1735
|
_custom_json: Joi.any(),
|
|
@@ -668,20 +1741,24 @@ class CartModel {
|
|
|
668
1741
|
meta: Joi.any(),
|
|
669
1742
|
mto_quantity: Joi.number(),
|
|
670
1743
|
parent_item_identifiers: Joi.any(),
|
|
671
|
-
price:
|
|
1744
|
+
price: CartApplicationModel.ArticlePriceInfo(),
|
|
672
1745
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
673
1746
|
quantity: Joi.number(),
|
|
674
|
-
seller:
|
|
1747
|
+
seller: CartApplicationModel.BaseInfo(),
|
|
675
1748
|
seller_identifier: Joi.string().allow(""),
|
|
676
1749
|
size: Joi.string().allow(""),
|
|
677
|
-
store:
|
|
1750
|
+
store: CartApplicationModel.StoreInfo(),
|
|
678
1751
|
type: Joi.string().allow(""),
|
|
679
1752
|
uid: Joi.string().allow(""),
|
|
680
1753
|
});
|
|
681
1754
|
}
|
|
1755
|
+
|
|
1756
|
+
/** @returns {ProductAvailability} */
|
|
682
1757
|
static ProductAvailability() {
|
|
683
1758
|
return Joi.object({
|
|
684
|
-
available_sizes: Joi.array().items(
|
|
1759
|
+
available_sizes: Joi.array().items(
|
|
1760
|
+
CartApplicationModel.ProductAvailabilitySize()
|
|
1761
|
+
),
|
|
685
1762
|
deliverable: Joi.boolean(),
|
|
686
1763
|
is_valid: Joi.boolean(),
|
|
687
1764
|
other_store_quantity: Joi.number(),
|
|
@@ -689,6 +1766,8 @@ class CartModel {
|
|
|
689
1766
|
sizes: Joi.array().items(Joi.string().allow("")),
|
|
690
1767
|
});
|
|
691
1768
|
}
|
|
1769
|
+
|
|
1770
|
+
/** @returns {ProductAvailabilitySize} */
|
|
692
1771
|
static ProductAvailabilitySize() {
|
|
693
1772
|
return Joi.object({
|
|
694
1773
|
display: Joi.string().allow(""),
|
|
@@ -696,6 +1775,8 @@ class CartModel {
|
|
|
696
1775
|
value: Joi.string().allow(""),
|
|
697
1776
|
});
|
|
698
1777
|
}
|
|
1778
|
+
|
|
1779
|
+
/** @returns {ProductImage} */
|
|
699
1780
|
static ProductImage() {
|
|
700
1781
|
return Joi.object({
|
|
701
1782
|
aspect_ratio: Joi.string().allow(""),
|
|
@@ -703,6 +1784,8 @@ class CartModel {
|
|
|
703
1784
|
url: Joi.string().allow(""),
|
|
704
1785
|
});
|
|
705
1786
|
}
|
|
1787
|
+
|
|
1788
|
+
/** @returns {ProductPrice} */
|
|
706
1789
|
static ProductPrice() {
|
|
707
1790
|
return Joi.object({
|
|
708
1791
|
add_on: Joi.number(),
|
|
@@ -713,46 +1796,62 @@ class CartModel {
|
|
|
713
1796
|
selling: Joi.number(),
|
|
714
1797
|
});
|
|
715
1798
|
}
|
|
1799
|
+
|
|
1800
|
+
/** @returns {ProductPriceInfo} */
|
|
716
1801
|
static ProductPriceInfo() {
|
|
717
1802
|
return Joi.object({
|
|
718
|
-
base:
|
|
719
|
-
converted:
|
|
1803
|
+
base: CartApplicationModel.ProductPrice(),
|
|
1804
|
+
converted: CartApplicationModel.ProductPrice(),
|
|
720
1805
|
});
|
|
721
1806
|
}
|
|
1807
|
+
|
|
1808
|
+
/** @returns {PromiseFormatted} */
|
|
722
1809
|
static PromiseFormatted() {
|
|
723
1810
|
return Joi.object({
|
|
724
1811
|
max: Joi.string().allow(""),
|
|
725
1812
|
min: Joi.string().allow(""),
|
|
726
1813
|
});
|
|
727
1814
|
}
|
|
1815
|
+
|
|
1816
|
+
/** @returns {PromiseTimestamp} */
|
|
728
1817
|
static PromiseTimestamp() {
|
|
729
1818
|
return Joi.object({
|
|
730
1819
|
max: Joi.number(),
|
|
731
1820
|
min: Joi.number(),
|
|
732
1821
|
});
|
|
733
1822
|
}
|
|
1823
|
+
|
|
1824
|
+
/** @returns {PromoMeta} */
|
|
734
1825
|
static PromoMeta() {
|
|
735
1826
|
return Joi.object({
|
|
736
1827
|
message: Joi.string().allow(""),
|
|
737
1828
|
});
|
|
738
1829
|
}
|
|
1830
|
+
|
|
1831
|
+
/** @returns {PromotionOffer} */
|
|
739
1832
|
static PromotionOffer() {
|
|
740
1833
|
return Joi.object({
|
|
741
1834
|
buy_rules: Joi.any(),
|
|
742
1835
|
description: Joi.string().allow(""),
|
|
743
1836
|
discount_rules: Joi.array().items(Joi.any()),
|
|
744
|
-
free_gift_items: Joi.array().items(
|
|
1837
|
+
free_gift_items: Joi.array().items(CartApplicationModel.FreeGiftItems()),
|
|
745
1838
|
id: Joi.string().allow(""),
|
|
746
1839
|
offer_text: Joi.string().allow(""),
|
|
747
1840
|
promotion_group: Joi.string().allow(""),
|
|
748
1841
|
valid_till: Joi.string().allow(""),
|
|
749
1842
|
});
|
|
750
1843
|
}
|
|
1844
|
+
|
|
1845
|
+
/** @returns {PromotionOffersResponse} */
|
|
751
1846
|
static PromotionOffersResponse() {
|
|
752
1847
|
return Joi.object({
|
|
753
|
-
available_promotions: Joi.array().items(
|
|
1848
|
+
available_promotions: Joi.array().items(
|
|
1849
|
+
CartApplicationModel.PromotionOffer()
|
|
1850
|
+
),
|
|
754
1851
|
});
|
|
755
1852
|
}
|
|
1853
|
+
|
|
1854
|
+
/** @returns {RawBreakup} */
|
|
756
1855
|
static RawBreakup() {
|
|
757
1856
|
return Joi.object({
|
|
758
1857
|
cod_charge: Joi.number(),
|
|
@@ -770,11 +1869,15 @@ class CartModel {
|
|
|
770
1869
|
you_saved: Joi.number(),
|
|
771
1870
|
});
|
|
772
1871
|
}
|
|
1872
|
+
|
|
1873
|
+
/** @returns {RewardPointRequest} */
|
|
773
1874
|
static RewardPointRequest() {
|
|
774
1875
|
return Joi.object({
|
|
775
1876
|
points: Joi.boolean().required(),
|
|
776
1877
|
});
|
|
777
1878
|
}
|
|
1879
|
+
|
|
1880
|
+
/** @returns {SaveAddressResponse} */
|
|
778
1881
|
static SaveAddressResponse() {
|
|
779
1882
|
return Joi.object({
|
|
780
1883
|
id: Joi.string().allow(""),
|
|
@@ -782,6 +1885,8 @@ class CartModel {
|
|
|
782
1885
|
success: Joi.boolean(),
|
|
783
1886
|
});
|
|
784
1887
|
}
|
|
1888
|
+
|
|
1889
|
+
/** @returns {SelectCartAddressRequest} */
|
|
785
1890
|
static SelectCartAddressRequest() {
|
|
786
1891
|
return Joi.object({
|
|
787
1892
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -789,29 +1894,33 @@ class CartModel {
|
|
|
789
1894
|
id: Joi.string().allow(""),
|
|
790
1895
|
});
|
|
791
1896
|
}
|
|
1897
|
+
|
|
1898
|
+
/** @returns {SharedCart} */
|
|
792
1899
|
static SharedCart() {
|
|
793
1900
|
return Joi.object({
|
|
794
|
-
breakup_values:
|
|
1901
|
+
breakup_values: CartApplicationModel.CartBreakup(),
|
|
795
1902
|
buy_now: Joi.boolean(),
|
|
796
1903
|
cart_id: Joi.number(),
|
|
797
1904
|
checkout_mode: Joi.string().allow(""),
|
|
798
1905
|
comment: Joi.string().allow(""),
|
|
799
1906
|
coupon_text: Joi.string().allow(""),
|
|
800
|
-
currency:
|
|
1907
|
+
currency: CartApplicationModel.CartCurrency(),
|
|
801
1908
|
delivery_charge_info: Joi.string().allow(""),
|
|
802
|
-
delivery_promise:
|
|
1909
|
+
delivery_promise: CartApplicationModel.ShipmentPromise(),
|
|
803
1910
|
gstin: Joi.string().allow(""),
|
|
804
1911
|
id: Joi.string().allow(""),
|
|
805
1912
|
is_valid: Joi.boolean(),
|
|
806
|
-
items: Joi.array().items(
|
|
1913
|
+
items: Joi.array().items(CartApplicationModel.CartProductInfo()),
|
|
807
1914
|
last_modified: Joi.string().allow(""),
|
|
808
1915
|
message: Joi.string().allow(""),
|
|
809
|
-
payment_selection_lock:
|
|
1916
|
+
payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
|
|
810
1917
|
restrict_checkout: Joi.boolean(),
|
|
811
|
-
shared_cart_details:
|
|
1918
|
+
shared_cart_details: CartApplicationModel.SharedCartDetails(),
|
|
812
1919
|
uid: Joi.string().allow(""),
|
|
813
1920
|
});
|
|
814
1921
|
}
|
|
1922
|
+
|
|
1923
|
+
/** @returns {SharedCartDetails} */
|
|
815
1924
|
static SharedCartDetails() {
|
|
816
1925
|
return Joi.object({
|
|
817
1926
|
created_on: Joi.string().allow(""),
|
|
@@ -821,18 +1930,24 @@ class CartModel {
|
|
|
821
1930
|
user: Joi.any(),
|
|
822
1931
|
});
|
|
823
1932
|
}
|
|
1933
|
+
|
|
1934
|
+
/** @returns {SharedCartResponse} */
|
|
824
1935
|
static SharedCartResponse() {
|
|
825
1936
|
return Joi.object({
|
|
826
|
-
cart:
|
|
1937
|
+
cart: CartApplicationModel.SharedCart(),
|
|
827
1938
|
error: Joi.string().allow(""),
|
|
828
1939
|
});
|
|
829
1940
|
}
|
|
1941
|
+
|
|
1942
|
+
/** @returns {ShipmentPromise} */
|
|
830
1943
|
static ShipmentPromise() {
|
|
831
1944
|
return Joi.object({
|
|
832
|
-
formatted:
|
|
833
|
-
timestamp:
|
|
1945
|
+
formatted: CartApplicationModel.PromiseFormatted(),
|
|
1946
|
+
timestamp: CartApplicationModel.PromiseTimestamp(),
|
|
834
1947
|
});
|
|
835
1948
|
}
|
|
1949
|
+
|
|
1950
|
+
/** @returns {ShipmentResponse} */
|
|
836
1951
|
static ShipmentResponse() {
|
|
837
1952
|
return Joi.object({
|
|
838
1953
|
box_type: Joi.string().allow("").allow(null),
|
|
@@ -840,13 +1955,15 @@ class CartModel {
|
|
|
840
1955
|
dp_options: Joi.any().allow(null),
|
|
841
1956
|
fulfillment_id: Joi.number(),
|
|
842
1957
|
fulfillment_type: Joi.string().allow(""),
|
|
843
|
-
items: Joi.array().items(
|
|
1958
|
+
items: Joi.array().items(CartApplicationModel.CartProductInfo()),
|
|
844
1959
|
order_type: Joi.string().allow(""),
|
|
845
|
-
promise:
|
|
1960
|
+
promise: CartApplicationModel.ShipmentPromise(),
|
|
846
1961
|
shipment_type: Joi.string().allow(""),
|
|
847
1962
|
shipments: Joi.number(),
|
|
848
1963
|
});
|
|
849
1964
|
}
|
|
1965
|
+
|
|
1966
|
+
/** @returns {StaffCheckout} */
|
|
850
1967
|
static StaffCheckout() {
|
|
851
1968
|
return Joi.object({
|
|
852
1969
|
_id: Joi.string().allow("").required(),
|
|
@@ -856,6 +1973,8 @@ class CartModel {
|
|
|
856
1973
|
user: Joi.string().allow("").required(),
|
|
857
1974
|
});
|
|
858
1975
|
}
|
|
1976
|
+
|
|
1977
|
+
/** @returns {StoreInfo} */
|
|
859
1978
|
static StoreInfo() {
|
|
860
1979
|
return Joi.object({
|
|
861
1980
|
name: Joi.string().allow(""),
|
|
@@ -863,11 +1982,15 @@ class CartModel {
|
|
|
863
1982
|
uid: Joi.number(),
|
|
864
1983
|
});
|
|
865
1984
|
}
|
|
1985
|
+
|
|
1986
|
+
/** @returns {Tags} */
|
|
866
1987
|
static Tags() {
|
|
867
1988
|
return Joi.object({
|
|
868
1989
|
tags: Joi.any(),
|
|
869
1990
|
});
|
|
870
1991
|
}
|
|
1992
|
+
|
|
1993
|
+
/** @returns {UpdateAddressResponse} */
|
|
871
1994
|
static UpdateAddressResponse() {
|
|
872
1995
|
return Joi.object({
|
|
873
1996
|
id: Joi.string().allow(""),
|
|
@@ -876,13 +1999,17 @@ class CartModel {
|
|
|
876
1999
|
success: Joi.boolean(),
|
|
877
2000
|
});
|
|
878
2001
|
}
|
|
2002
|
+
|
|
2003
|
+
/** @returns {UpdateCartDetailResponse} */
|
|
879
2004
|
static UpdateCartDetailResponse() {
|
|
880
2005
|
return Joi.object({
|
|
881
|
-
cart:
|
|
2006
|
+
cart: CartApplicationModel.CartDetailResponse(),
|
|
882
2007
|
message: Joi.string().allow(""),
|
|
883
2008
|
success: Joi.boolean(),
|
|
884
2009
|
});
|
|
885
2010
|
}
|
|
2011
|
+
|
|
2012
|
+
/** @returns {UpdateCartPaymentRequest} */
|
|
886
2013
|
static UpdateCartPaymentRequest() {
|
|
887
2014
|
return Joi.object({
|
|
888
2015
|
address_id: Joi.string().allow(""),
|
|
@@ -893,18 +2020,22 @@ class CartModel {
|
|
|
893
2020
|
payment_mode: Joi.string().allow(""),
|
|
894
2021
|
});
|
|
895
2022
|
}
|
|
2023
|
+
|
|
2024
|
+
/** @returns {UpdateCartRequest} */
|
|
896
2025
|
static UpdateCartRequest() {
|
|
897
2026
|
return Joi.object({
|
|
898
|
-
items: Joi.array().items(
|
|
2027
|
+
items: Joi.array().items(CartApplicationModel.UpdateProductCart()),
|
|
899
2028
|
operation: Joi.string().allow("").required(),
|
|
900
2029
|
});
|
|
901
2030
|
}
|
|
2031
|
+
|
|
2032
|
+
/** @returns {UpdateProductCart} */
|
|
902
2033
|
static UpdateProductCart() {
|
|
903
2034
|
return Joi.object({
|
|
904
2035
|
_custom_json: Joi.any(),
|
|
905
2036
|
article_id: Joi.string().allow(""),
|
|
906
2037
|
extra_meta: Joi.any(),
|
|
907
|
-
identifiers:
|
|
2038
|
+
identifiers: CartApplicationModel.CartProductIdentifer().required(),
|
|
908
2039
|
item_id: Joi.number(),
|
|
909
2040
|
item_index: Joi.number(),
|
|
910
2041
|
item_size: Joi.string().allow(""),
|
|
@@ -914,4 +2045,4 @@ class CartModel {
|
|
|
914
2045
|
});
|
|
915
2046
|
}
|
|
916
2047
|
}
|
|
917
|
-
module.exports =
|
|
2048
|
+
module.exports = CartApplicationModel;
|