@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,881 @@
|
|
|
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 CartCheckoutResponse
|
|
162
|
+
* @property {string} [app_intercept_url]
|
|
163
|
+
* @property {string} [callback_url]
|
|
164
|
+
* @property {CheckCart} [cart]
|
|
165
|
+
* @property {Object} [data]
|
|
166
|
+
* @property {string} [message]
|
|
167
|
+
* @property {string} [order_id]
|
|
168
|
+
* @property {string} [payment_confirm_url]
|
|
169
|
+
* @property {boolean} [success]
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @typedef CartCurrency
|
|
174
|
+
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
175
|
+
* @property {string} [symbol]
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @typedef CartDeliveryModesResponse
|
|
180
|
+
* @property {string[]} [available_modes] - Available delivery modes
|
|
181
|
+
* @property {number[]} [pickup_stores] - Store pick up available store uids
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @typedef CartDetailResponse
|
|
186
|
+
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
187
|
+
* @property {CartBreakup} [breakup_values]
|
|
188
|
+
* @property {boolean} [buy_now]
|
|
189
|
+
* @property {string} [checkout_mode]
|
|
190
|
+
* @property {string} [comment]
|
|
191
|
+
* @property {string} [coupon_text]
|
|
192
|
+
* @property {CartCurrency} [currency]
|
|
193
|
+
* @property {string} [delivery_charge_info]
|
|
194
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
195
|
+
* @property {string} [gstin]
|
|
196
|
+
* @property {string} [id]
|
|
197
|
+
* @property {boolean} [is_valid]
|
|
198
|
+
* @property {CartProductInfo[]} [items]
|
|
199
|
+
* @property {string} [last_modified]
|
|
200
|
+
* @property {string} [message]
|
|
201
|
+
* @property {Object} [pan_config]
|
|
202
|
+
* @property {string} [pan_no]
|
|
203
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
204
|
+
* @property {boolean} [restrict_checkout]
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @typedef CartItemCountResponse
|
|
209
|
+
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @typedef CartMetaMissingResponse
|
|
214
|
+
* @property {string[]} [errors]
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @typedef CartMetaRequest
|
|
219
|
+
* @property {string} [checkout_mode]
|
|
220
|
+
* @property {string} [comment]
|
|
221
|
+
* @property {Object} [delivery_slots]
|
|
222
|
+
* @property {ArticleGiftDetail} [gift_details]
|
|
223
|
+
* @property {string} [gstin]
|
|
224
|
+
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
225
|
+
* customer pickup at store
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @typedef CartMetaResponse
|
|
230
|
+
* @property {boolean} [is_valid]
|
|
231
|
+
* @property {string} [message]
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @typedef CartPosCheckoutDetailRequest
|
|
236
|
+
* @property {string} [address_id]
|
|
237
|
+
* @property {string} [aggregator]
|
|
238
|
+
* @property {Object} [billing_address]
|
|
239
|
+
* @property {string} [billing_address_id]
|
|
240
|
+
* @property {string} [callback_url]
|
|
241
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
242
|
+
* @property {CustomerDetails} [customer_details] - Customer details
|
|
243
|
+
* @property {Object} [delivery_address]
|
|
244
|
+
* @property {Object} [extra_meta]
|
|
245
|
+
* @property {Files[]} [files] - List of file url
|
|
246
|
+
* @property {string} [id]
|
|
247
|
+
* @property {string} [merchant_code]
|
|
248
|
+
* @property {Object} [meta]
|
|
249
|
+
* @property {string} order_type
|
|
250
|
+
* @property {number} [ordering_store]
|
|
251
|
+
* @property {boolean} [payment_auto_confirm]
|
|
252
|
+
* @property {string} [payment_identifier]
|
|
253
|
+
* @property {string} payment_mode
|
|
254
|
+
* @property {Object} [payment_params]
|
|
255
|
+
* @property {number} [pick_at_store_uid]
|
|
256
|
+
* @property {boolean} [pos]
|
|
257
|
+
* @property {StaffCheckout} [staff]
|
|
258
|
+
*/
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @typedef CartProduct
|
|
262
|
+
* @property {Object} [_custom_json]
|
|
263
|
+
* @property {ProductAction} [action]
|
|
264
|
+
* @property {BaseInfo} [brand]
|
|
265
|
+
* @property {CategoryInfo[]} [categories]
|
|
266
|
+
* @property {ProductImage[]} [images]
|
|
267
|
+
* @property {string} [item_code]
|
|
268
|
+
* @property {string} [name]
|
|
269
|
+
* @property {string} [slug] - Unique product url name generated via product
|
|
270
|
+
* name and other meta data
|
|
271
|
+
* @property {string[]} [tags]
|
|
272
|
+
* @property {Tags} [teaser_tag]
|
|
273
|
+
* @property {string} [type]
|
|
274
|
+
* @property {number} [uid]
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @typedef CartProductIdentifer
|
|
279
|
+
* @property {string} [identifier] - Article idenfier generated by cart
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @typedef CartProductInfo
|
|
284
|
+
* @property {ProductArticle} [article]
|
|
285
|
+
* @property {ProductAvailability} [availability]
|
|
286
|
+
* @property {Object} [bulk_offer]
|
|
287
|
+
* @property {CouponDetails} [coupon]
|
|
288
|
+
* @property {string} [coupon_message]
|
|
289
|
+
* @property {Object} [custom_order]
|
|
290
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
291
|
+
* @property {string} [discount]
|
|
292
|
+
* @property {CartProductIdentifer} identifiers
|
|
293
|
+
* @property {boolean} [is_set]
|
|
294
|
+
* @property {string} [key]
|
|
295
|
+
* @property {string} [message]
|
|
296
|
+
* @property {Object} [moq]
|
|
297
|
+
* @property {Object} [parent_item_identifiers]
|
|
298
|
+
* @property {ProductPriceInfo} [price]
|
|
299
|
+
* @property {ProductPriceInfo} [price_per_unit]
|
|
300
|
+
* @property {CartProduct} [product]
|
|
301
|
+
* @property {PromoMeta} [promo_meta]
|
|
302
|
+
* @property {AppliedPromotion[]} [promotions_applied]
|
|
303
|
+
* @property {number} [quantity]
|
|
304
|
+
*/
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* @typedef CartShipmentsResponse
|
|
308
|
+
* @property {CartBreakup} [breakup_values]
|
|
309
|
+
* @property {boolean} [buy_now]
|
|
310
|
+
* @property {number} [cart_id]
|
|
311
|
+
* @property {string} [checkout_mode]
|
|
312
|
+
* @property {string} [comment]
|
|
313
|
+
* @property {string} [coupon_text]
|
|
314
|
+
* @property {CartCurrency} [currency]
|
|
315
|
+
* @property {string} [delivery_charge_info]
|
|
316
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
317
|
+
* @property {boolean} [error]
|
|
318
|
+
* @property {string} [gstin]
|
|
319
|
+
* @property {string} [id]
|
|
320
|
+
* @property {boolean} [is_valid]
|
|
321
|
+
* @property {string} [last_modified]
|
|
322
|
+
* @property {string} [message]
|
|
323
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
324
|
+
* @property {boolean} [restrict_checkout]
|
|
325
|
+
* @property {ShipmentResponse[]} [shipments]
|
|
326
|
+
* @property {string} [uid]
|
|
327
|
+
*/
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @typedef CategoryInfo
|
|
331
|
+
* @property {string} [name]
|
|
332
|
+
* @property {number} [uid] - Product Category Id
|
|
333
|
+
*/
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* @typedef CheckCart
|
|
337
|
+
* @property {CartBreakup} [breakup_values]
|
|
338
|
+
* @property {boolean} [buy_now]
|
|
339
|
+
* @property {number} [cart_id]
|
|
340
|
+
* @property {string} [checkout_mode]
|
|
341
|
+
* @property {boolean} [cod_available]
|
|
342
|
+
* @property {number} [cod_charges]
|
|
343
|
+
* @property {string} [cod_message]
|
|
344
|
+
* @property {string} [comment]
|
|
345
|
+
* @property {string} [coupon_text]
|
|
346
|
+
* @property {CartCurrency} [currency]
|
|
347
|
+
* @property {string} [delivery_charge_info]
|
|
348
|
+
* @property {number} [delivery_charge_order_value]
|
|
349
|
+
* @property {number} [delivery_charges]
|
|
350
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
351
|
+
* @property {string} [error_message]
|
|
352
|
+
* @property {string} [gstin]
|
|
353
|
+
* @property {string} [id]
|
|
354
|
+
* @property {boolean} [is_valid]
|
|
355
|
+
* @property {CartProductInfo[]} [items]
|
|
356
|
+
* @property {string} [last_modified]
|
|
357
|
+
* @property {string} [message]
|
|
358
|
+
* @property {string} [order_id]
|
|
359
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
360
|
+
* @property {boolean} [restrict_checkout]
|
|
361
|
+
* @property {string} [store_code]
|
|
362
|
+
* @property {Object[]} [store_emps]
|
|
363
|
+
* @property {boolean} [success]
|
|
364
|
+
* @property {string} [uid]
|
|
365
|
+
* @property {string} [user_type]
|
|
366
|
+
*/
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @typedef Coupon
|
|
370
|
+
* @property {string} [coupon_code]
|
|
371
|
+
* @property {string} [coupon_type]
|
|
372
|
+
* @property {number} [coupon_value]
|
|
373
|
+
* @property {string} [description]
|
|
374
|
+
* @property {string} [expires_on]
|
|
375
|
+
* @property {boolean} [is_applicable]
|
|
376
|
+
* @property {boolean} [is_applied]
|
|
377
|
+
* @property {number} [max_discount_value]
|
|
378
|
+
* @property {string} [message]
|
|
379
|
+
* @property {number} [minimum_cart_value]
|
|
380
|
+
* @property {string} [sub_title]
|
|
381
|
+
* @property {string} [title]
|
|
382
|
+
*/
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @typedef CouponBreakup
|
|
386
|
+
* @property {string} [code]
|
|
387
|
+
* @property {string} [coupon_type]
|
|
388
|
+
* @property {number} [coupon_value]
|
|
389
|
+
* @property {string} [description]
|
|
390
|
+
* @property {boolean} [is_applied]
|
|
391
|
+
* @property {number} [max_discount_value]
|
|
392
|
+
* @property {string} [message]
|
|
393
|
+
* @property {number} [minimum_cart_value]
|
|
394
|
+
* @property {string} [sub_title]
|
|
395
|
+
* @property {string} [title]
|
|
396
|
+
* @property {string} [type]
|
|
397
|
+
* @property {string} [uid]
|
|
398
|
+
* @property {number} [value]
|
|
399
|
+
*/
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* @typedef CouponDetails
|
|
403
|
+
* @property {string} [code]
|
|
404
|
+
* @property {number} [discount_single_quantity]
|
|
405
|
+
* @property {number} [discount_total_quantity]
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* @typedef CouponValidity
|
|
410
|
+
* @property {string} [code]
|
|
411
|
+
* @property {number} [discount]
|
|
412
|
+
* @property {string} [display_message_en]
|
|
413
|
+
* @property {boolean} [next_validation_required]
|
|
414
|
+
* @property {string} [title]
|
|
415
|
+
* @property {boolean} [valid]
|
|
416
|
+
*/
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @typedef CustomerDetails
|
|
420
|
+
* @property {string} [email]
|
|
421
|
+
* @property {string} mobile
|
|
422
|
+
* @property {string} [name]
|
|
423
|
+
*/
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @typedef DeleteAddressResponse
|
|
427
|
+
* @property {string} [id]
|
|
428
|
+
* @property {boolean} [is_deleted]
|
|
429
|
+
*/
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* @typedef DiscountRulesApp
|
|
433
|
+
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
434
|
+
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
435
|
+
* @property {Object} [offer] - Offer for promotion
|
|
436
|
+
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
437
|
+
*/
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @typedef DisplayBreakup
|
|
441
|
+
* @property {string} [currency_code]
|
|
442
|
+
* @property {string} [currency_symbol]
|
|
443
|
+
* @property {string} [display]
|
|
444
|
+
* @property {string} [key]
|
|
445
|
+
* @property {string[]} [message]
|
|
446
|
+
* @property {number} [value]
|
|
447
|
+
*/
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @typedef Files
|
|
451
|
+
* @property {string} key
|
|
452
|
+
* @property {string[]} values
|
|
453
|
+
*/
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* @typedef FreeGiftItem
|
|
457
|
+
* @property {string} [item_brand_name] - Item brand name
|
|
458
|
+
* @property {number} [item_id] - Item id
|
|
459
|
+
* @property {string[]} [item_images_url] - Item images URL
|
|
460
|
+
* @property {string} [item_name] - Item name
|
|
461
|
+
* @property {Object} [item_price_details] - Item price details
|
|
462
|
+
* @property {string} [item_slug] - Item slug
|
|
463
|
+
*/
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* @typedef GeoLocation
|
|
467
|
+
* @property {number} [latitude]
|
|
468
|
+
* @property {number} [longitude]
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* @typedef GetAddressesResponse
|
|
473
|
+
* @property {Address[]} [address]
|
|
474
|
+
* @property {boolean} [pii_masking]
|
|
475
|
+
*/
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @typedef GetCouponResponse
|
|
479
|
+
* @property {Coupon[]} [available_coupon_list]
|
|
480
|
+
* @property {PageCoupon} [page]
|
|
481
|
+
*/
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* @typedef GetShareCartLinkRequest
|
|
485
|
+
* @property {string} [id] - Cart uid for generating sharing
|
|
486
|
+
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
487
|
+
* data will be used to generate link as well as sent as shared details.
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* @typedef GetShareCartLinkResponse
|
|
492
|
+
* @property {string} [share_url] - Short shareable final url
|
|
493
|
+
* @property {string} [token] - Short url unique id
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @typedef GiftDetail
|
|
498
|
+
* @property {string} [gift_message]
|
|
499
|
+
* @property {boolean} [is_gift_applied]
|
|
500
|
+
*/
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* @typedef LoyaltyPoints
|
|
504
|
+
* @property {number} [applicable]
|
|
505
|
+
* @property {string} [description]
|
|
506
|
+
* @property {boolean} [is_applied]
|
|
507
|
+
* @property {number} [total]
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @typedef OfferItem
|
|
512
|
+
* @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart
|
|
513
|
+
* @property {boolean} [best] - Is true for best offer from all offers present
|
|
514
|
+
* for all sellers
|
|
515
|
+
* @property {number} [margin] - Percentage value of discount
|
|
516
|
+
* @property {OfferPrice} [price]
|
|
517
|
+
* @property {number} [quantity] - Quantity on which offer is applicable
|
|
518
|
+
* @property {number} [total] - Total price of offer quantity with discount
|
|
519
|
+
* @property {string} [type] - Offer type
|
|
520
|
+
*/
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @typedef OfferPrice
|
|
524
|
+
* @property {number} [bulk_effective] - Discounted per unit price for current
|
|
525
|
+
* offer object
|
|
526
|
+
* @property {string} [currency_code] - Currency code for all amounts
|
|
527
|
+
* @property {string} [currency_symbol] - Currency symbol for currency
|
|
528
|
+
* @property {number} [effective] - Current per unit price of product after
|
|
529
|
+
* existing deductions
|
|
530
|
+
* @property {number} [marked] - Original price of product
|
|
531
|
+
*/
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* @typedef OfferSeller
|
|
535
|
+
* @property {string} [name]
|
|
536
|
+
* @property {number} [uid] - Seller id
|
|
537
|
+
*/
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* @typedef Ownership
|
|
541
|
+
* @property {string} [payable_by] - Promo amount bearable party
|
|
542
|
+
* @property {string} [payable_category] - Promo amount payable category
|
|
543
|
+
*/
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* @typedef PageCoupon
|
|
547
|
+
* @property {number} [current]
|
|
548
|
+
* @property {boolean} [has_next]
|
|
549
|
+
* @property {boolean} [has_previous]
|
|
550
|
+
* @property {number} [total]
|
|
551
|
+
* @property {number} [total_item_count]
|
|
552
|
+
*/
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* @typedef PaymentCouponValidate
|
|
556
|
+
* @property {CouponValidity} [coupon_validity]
|
|
557
|
+
* @property {string} [message]
|
|
558
|
+
* @property {boolean} success
|
|
559
|
+
*/
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* @typedef PaymentSelectionLock
|
|
563
|
+
* @property {string} [default_options]
|
|
564
|
+
* @property {boolean} [enabled]
|
|
565
|
+
* @property {string} [payment_identifier]
|
|
566
|
+
*/
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* @typedef PickupStoreDetail
|
|
570
|
+
* @property {string} [address]
|
|
571
|
+
* @property {string} [address_type]
|
|
572
|
+
* @property {string} [area]
|
|
573
|
+
* @property {string} [area_code]
|
|
574
|
+
* @property {string} [area_code_slug]
|
|
575
|
+
* @property {string} [city]
|
|
576
|
+
* @property {string} [country]
|
|
577
|
+
* @property {string} [email]
|
|
578
|
+
* @property {number} [id]
|
|
579
|
+
* @property {string} [landmark]
|
|
580
|
+
* @property {string} [name]
|
|
581
|
+
* @property {string} [phone]
|
|
582
|
+
* @property {number} [pincode]
|
|
583
|
+
* @property {string} [state]
|
|
584
|
+
* @property {string} [store_code]
|
|
585
|
+
* @property {number} [uid]
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @typedef ProductAction
|
|
590
|
+
* @property {ActionQuery} [query]
|
|
591
|
+
* @property {string} [type]
|
|
592
|
+
* @property {string} [url]
|
|
593
|
+
*/
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* @typedef ProductArticle
|
|
597
|
+
* @property {Object} [_custom_json]
|
|
598
|
+
* @property {Object} [cart_item_meta]
|
|
599
|
+
* @property {Object} [extra_meta]
|
|
600
|
+
* @property {Object} [gift_card]
|
|
601
|
+
* @property {Object} [identifier]
|
|
602
|
+
* @property {boolean} [is_gift_visible]
|
|
603
|
+
* @property {Object} [meta]
|
|
604
|
+
* @property {number} [mto_quantity]
|
|
605
|
+
* @property {Object} [parent_item_identifiers]
|
|
606
|
+
* @property {ArticlePriceInfo} [price]
|
|
607
|
+
* @property {string[]} [product_group_tags]
|
|
608
|
+
* @property {number} [quantity]
|
|
609
|
+
* @property {BaseInfo} [seller]
|
|
610
|
+
* @property {string} [seller_identifier]
|
|
611
|
+
* @property {string} [size]
|
|
612
|
+
* @property {StoreInfo} [store]
|
|
613
|
+
* @property {string} [type]
|
|
614
|
+
* @property {string} [uid]
|
|
615
|
+
*/
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* @typedef ProductAvailability
|
|
619
|
+
* @property {ProductAvailabilitySize[]} [available_sizes]
|
|
620
|
+
* @property {boolean} [deliverable]
|
|
621
|
+
* @property {boolean} [is_valid]
|
|
622
|
+
* @property {number} [other_store_quantity]
|
|
623
|
+
* @property {boolean} [out_of_stock]
|
|
624
|
+
* @property {string[]} [sizes]
|
|
625
|
+
*/
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* @typedef ProductAvailabilitySize
|
|
629
|
+
* @property {string} [display]
|
|
630
|
+
* @property {boolean} [is_available]
|
|
631
|
+
* @property {string} [value]
|
|
632
|
+
*/
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* @typedef ProductImage
|
|
636
|
+
* @property {string} [aspect_ratio]
|
|
637
|
+
* @property {string} [secure_url]
|
|
638
|
+
* @property {string} [url]
|
|
639
|
+
*/
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* @typedef ProductPrice
|
|
643
|
+
* @property {number} [add_on]
|
|
644
|
+
* @property {string} [currency_code]
|
|
645
|
+
* @property {string} [currency_symbol]
|
|
646
|
+
* @property {number} [effective]
|
|
647
|
+
* @property {number} [marked]
|
|
648
|
+
* @property {number} [selling]
|
|
649
|
+
*/
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* @typedef ProductPriceInfo
|
|
653
|
+
* @property {ProductPrice} [base]
|
|
654
|
+
* @property {ProductPrice} [converted]
|
|
655
|
+
*/
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* @typedef PromiseFormatted
|
|
659
|
+
* @property {string} [max]
|
|
660
|
+
* @property {string} [min]
|
|
661
|
+
*/
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* @typedef PromiseTimestamp
|
|
665
|
+
* @property {number} [max]
|
|
666
|
+
* @property {number} [min]
|
|
667
|
+
*/
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* @typedef PromoMeta
|
|
671
|
+
* @property {string} [message]
|
|
672
|
+
*/
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* @typedef RawBreakup
|
|
676
|
+
* @property {number} [cod_charge]
|
|
677
|
+
* @property {number} [convenience_fee]
|
|
678
|
+
* @property {number} [coupon]
|
|
679
|
+
* @property {number} [delivery_charge]
|
|
680
|
+
* @property {number} [discount]
|
|
681
|
+
* @property {number} [fynd_cash]
|
|
682
|
+
* @property {number} [gift_card]
|
|
683
|
+
* @property {number} [gst_charges]
|
|
684
|
+
* @property {number} [mrp_total]
|
|
685
|
+
* @property {number} [subtotal]
|
|
686
|
+
* @property {number} [total]
|
|
687
|
+
* @property {number} [vog]
|
|
688
|
+
* @property {number} [you_saved]
|
|
689
|
+
*/
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* @typedef RewardPointRequest
|
|
693
|
+
* @property {boolean} points
|
|
694
|
+
*/
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* @typedef SaveAddressResponse
|
|
698
|
+
* @property {string} [id]
|
|
699
|
+
* @property {boolean} [is_default_address]
|
|
700
|
+
* @property {boolean} [success]
|
|
701
|
+
*/
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @typedef SelectCartAddressRequest
|
|
705
|
+
* @property {string} [billing_address_id]
|
|
706
|
+
* @property {string} [cart_id]
|
|
707
|
+
* @property {string} [id]
|
|
708
|
+
*/
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* @typedef SharedCart
|
|
712
|
+
* @property {CartBreakup} [breakup_values]
|
|
713
|
+
* @property {boolean} [buy_now]
|
|
714
|
+
* @property {number} [cart_id]
|
|
715
|
+
* @property {string} [checkout_mode]
|
|
716
|
+
* @property {string} [comment]
|
|
717
|
+
* @property {string} [coupon_text]
|
|
718
|
+
* @property {CartCurrency} [currency]
|
|
719
|
+
* @property {string} [delivery_charge_info]
|
|
720
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
721
|
+
* @property {string} [gstin]
|
|
722
|
+
* @property {string} [id]
|
|
723
|
+
* @property {boolean} [is_valid]
|
|
724
|
+
* @property {CartProductInfo[]} [items]
|
|
725
|
+
* @property {string} [last_modified]
|
|
726
|
+
* @property {string} [message]
|
|
727
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
728
|
+
* @property {boolean} [restrict_checkout]
|
|
729
|
+
* @property {SharedCartDetails} [shared_cart_details]
|
|
730
|
+
* @property {string} [uid]
|
|
731
|
+
*/
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* @typedef SharedCartDetails
|
|
735
|
+
* @property {string} [created_on]
|
|
736
|
+
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
737
|
+
* @property {Object} [source] - Share link device and other source information
|
|
738
|
+
* @property {string} [token] - Short link id
|
|
739
|
+
* @property {Object} [user] - User details of who generated share link
|
|
740
|
+
*/
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* @typedef SharedCartResponse
|
|
744
|
+
* @property {SharedCart} [cart]
|
|
745
|
+
* @property {string} [error]
|
|
746
|
+
*/
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @typedef ShipmentPromise
|
|
750
|
+
* @property {PromiseFormatted} [formatted]
|
|
751
|
+
* @property {PromiseTimestamp} [timestamp]
|
|
752
|
+
*/
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @typedef ShipmentResponse
|
|
756
|
+
* @property {string} [box_type]
|
|
757
|
+
* @property {string} [dp_id]
|
|
758
|
+
* @property {Object} [dp_options]
|
|
759
|
+
* @property {number} [fulfillment_id]
|
|
760
|
+
* @property {string} [fulfillment_type]
|
|
761
|
+
* @property {CartProductInfo[]} [items]
|
|
762
|
+
* @property {string} [order_type]
|
|
763
|
+
* @property {ShipmentPromise} [promise]
|
|
764
|
+
* @property {string} [shipment_type]
|
|
765
|
+
* @property {number} [shipments]
|
|
766
|
+
*/
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @typedef StaffCheckout
|
|
770
|
+
* @property {string} _id
|
|
771
|
+
* @property {string} [employee_code]
|
|
772
|
+
* @property {string} first_name
|
|
773
|
+
* @property {string} last_name
|
|
774
|
+
* @property {string} user
|
|
775
|
+
*/
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* @typedef StoreDetailsResponse
|
|
779
|
+
* @property {PickupStoreDetail[]} [items]
|
|
780
|
+
*/
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* @typedef StoreInfo
|
|
784
|
+
* @property {string} [name]
|
|
785
|
+
* @property {string} [store_code]
|
|
786
|
+
* @property {number} [uid]
|
|
787
|
+
*/
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* @typedef Tags
|
|
791
|
+
* @property {Object} [tags]
|
|
792
|
+
*/
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* @typedef UpdateAddressResponse
|
|
796
|
+
* @property {string} [id]
|
|
797
|
+
* @property {boolean} [is_default_address]
|
|
798
|
+
* @property {boolean} [is_updated]
|
|
799
|
+
* @property {boolean} [success]
|
|
800
|
+
*/
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* @typedef UpdateCartDetailResponse
|
|
804
|
+
* @property {CartDetailResponse} [cart]
|
|
805
|
+
* @property {string} [message]
|
|
806
|
+
* @property {boolean} [success] - True if all items are added successfully.
|
|
807
|
+
* False if partially added or not added.
|
|
808
|
+
*/
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* @typedef UpdateCartPaymentRequest
|
|
812
|
+
* @property {string} [address_id]
|
|
813
|
+
* @property {string} [aggregator_name]
|
|
814
|
+
* @property {string} [id]
|
|
815
|
+
* @property {string} [merchant_code]
|
|
816
|
+
* @property {string} [payment_identifier]
|
|
817
|
+
* @property {string} [payment_mode]
|
|
818
|
+
*/
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* @typedef UpdateCartRequest
|
|
822
|
+
* @property {UpdateProductCart[]} [items]
|
|
823
|
+
* @property {string} operation
|
|
824
|
+
*/
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* @typedef UpdateCartShipmentItem
|
|
828
|
+
* @property {string} article_uid - Article mongo id
|
|
829
|
+
* @property {number} [quantity] - Quantity of product in shipment
|
|
830
|
+
* @property {string} shipment_type - Shipment delivery type
|
|
831
|
+
*/
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* @typedef UpdateCartShipmentRequest
|
|
835
|
+
* @property {UpdateCartShipmentItem[]} shipments
|
|
836
|
+
*/
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* @typedef UpdateProductCart
|
|
840
|
+
* @property {Object} [_custom_json]
|
|
841
|
+
* @property {string} [article_id]
|
|
842
|
+
* @property {Object} [extra_meta]
|
|
843
|
+
* @property {CartProductIdentifer} identifiers
|
|
844
|
+
* @property {number} [item_id]
|
|
845
|
+
* @property {number} [item_index]
|
|
846
|
+
* @property {string} [item_size]
|
|
847
|
+
* @property {Object} [meta]
|
|
848
|
+
* @property {Object} [parent_item_identifiers]
|
|
849
|
+
* @property {number} [quantity]
|
|
850
|
+
*/
|
|
851
|
+
|
|
852
|
+
class PosCartApplicationModel {
|
|
853
|
+
/** @returns {ActionQuery} */
|
|
4
854
|
static ActionQuery() {
|
|
5
855
|
return Joi.object({
|
|
6
856
|
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
7
857
|
});
|
|
8
858
|
}
|
|
859
|
+
|
|
860
|
+
/** @returns {AddCartDetailResponse} */
|
|
9
861
|
static AddCartDetailResponse() {
|
|
10
862
|
return Joi.object({
|
|
11
|
-
cart:
|
|
863
|
+
cart: PosCartApplicationModel.CartDetailResponse(),
|
|
12
864
|
message: Joi.string().allow(""),
|
|
13
865
|
partial: Joi.boolean(),
|
|
14
866
|
success: Joi.boolean(),
|
|
15
867
|
});
|
|
16
868
|
}
|
|
869
|
+
|
|
870
|
+
/** @returns {AddCartRequest} */
|
|
17
871
|
static AddCartRequest() {
|
|
18
872
|
return Joi.object({
|
|
19
|
-
items: Joi.array().items(
|
|
873
|
+
items: Joi.array().items(PosCartApplicationModel.AddProductCart()),
|
|
20
874
|
new_cart: Joi.boolean(),
|
|
21
875
|
});
|
|
22
876
|
}
|
|
877
|
+
|
|
878
|
+
/** @returns {AddProductCart} */
|
|
23
879
|
static AddProductCart() {
|
|
24
880
|
return Joi.object({
|
|
25
881
|
_custom_json: Joi.any(),
|
|
@@ -40,6 +896,8 @@ class PosCartModel {
|
|
|
40
896
|
store_id: Joi.number(),
|
|
41
897
|
});
|
|
42
898
|
}
|
|
899
|
+
|
|
900
|
+
/** @returns {Address} */
|
|
43
901
|
static Address() {
|
|
44
902
|
return Joi.object({
|
|
45
903
|
_custom_json: Joi.any(),
|
|
@@ -56,7 +914,7 @@ class PosCartModel {
|
|
|
56
914
|
country_phone_code: Joi.string().allow(""),
|
|
57
915
|
created_by_user_id: Joi.string().allow(""),
|
|
58
916
|
email: Joi.string().allow(""),
|
|
59
|
-
geo_location:
|
|
917
|
+
geo_location: PosCartApplicationModel.GeoLocation(),
|
|
60
918
|
google_map_point: Joi.any(),
|
|
61
919
|
id: Joi.string().allow(""),
|
|
62
920
|
is_active: Joi.boolean(),
|
|
@@ -70,54 +928,70 @@ class PosCartModel {
|
|
|
70
928
|
user_id: Joi.string().allow(""),
|
|
71
929
|
});
|
|
72
930
|
}
|
|
931
|
+
|
|
932
|
+
/** @returns {AppliedFreeArticles} */
|
|
73
933
|
static AppliedFreeArticles() {
|
|
74
934
|
return Joi.object({
|
|
75
935
|
article_id: Joi.string().allow(""),
|
|
76
|
-
free_gift_item_details:
|
|
936
|
+
free_gift_item_details: PosCartApplicationModel.FreeGiftItem(),
|
|
77
937
|
parent_item_identifier: Joi.string().allow(""),
|
|
78
938
|
quantity: Joi.number(),
|
|
79
939
|
});
|
|
80
940
|
}
|
|
941
|
+
|
|
942
|
+
/** @returns {AppliedPromotion} */
|
|
81
943
|
static AppliedPromotion() {
|
|
82
944
|
return Joi.object({
|
|
83
945
|
amount: Joi.number(),
|
|
84
946
|
applied_free_articles: Joi.array().items(
|
|
85
|
-
|
|
947
|
+
PosCartApplicationModel.AppliedFreeArticles()
|
|
86
948
|
),
|
|
87
949
|
article_quantity: Joi.number(),
|
|
88
|
-
buy_rules: Joi.array().items(
|
|
89
|
-
discount_rules: Joi.array().items(
|
|
950
|
+
buy_rules: Joi.array().items(PosCartApplicationModel.BuyRules()),
|
|
951
|
+
discount_rules: Joi.array().items(
|
|
952
|
+
PosCartApplicationModel.DiscountRulesApp()
|
|
953
|
+
),
|
|
90
954
|
mrp_promotion: Joi.boolean(),
|
|
91
955
|
offer_text: Joi.string().allow(""),
|
|
92
|
-
ownership:
|
|
956
|
+
ownership: PosCartApplicationModel.Ownership(),
|
|
93
957
|
promo_id: Joi.string().allow(""),
|
|
94
958
|
promotion_group: Joi.string().allow(""),
|
|
95
959
|
promotion_name: Joi.string().allow(""),
|
|
96
960
|
promotion_type: Joi.string().allow(""),
|
|
97
961
|
});
|
|
98
962
|
}
|
|
963
|
+
|
|
964
|
+
/** @returns {ApplyCouponRequest} */
|
|
99
965
|
static ApplyCouponRequest() {
|
|
100
966
|
return Joi.object({
|
|
101
967
|
coupon_code: Joi.string().allow("").required(),
|
|
102
968
|
});
|
|
103
969
|
}
|
|
970
|
+
|
|
971
|
+
/** @returns {ArticleGiftDetail} */
|
|
104
972
|
static ArticleGiftDetail() {
|
|
105
973
|
return Joi.object({
|
|
106
|
-
article_id:
|
|
974
|
+
article_id: PosCartApplicationModel.GiftDetail(),
|
|
107
975
|
});
|
|
108
976
|
}
|
|
977
|
+
|
|
978
|
+
/** @returns {ArticlePriceInfo} */
|
|
109
979
|
static ArticlePriceInfo() {
|
|
110
980
|
return Joi.object({
|
|
111
|
-
base:
|
|
112
|
-
converted:
|
|
981
|
+
base: PosCartApplicationModel.BasePrice(),
|
|
982
|
+
converted: PosCartApplicationModel.BasePrice(),
|
|
113
983
|
});
|
|
114
984
|
}
|
|
985
|
+
|
|
986
|
+
/** @returns {BaseInfo} */
|
|
115
987
|
static BaseInfo() {
|
|
116
988
|
return Joi.object({
|
|
117
989
|
name: Joi.string().allow(""),
|
|
118
990
|
uid: Joi.number(),
|
|
119
991
|
});
|
|
120
992
|
}
|
|
993
|
+
|
|
994
|
+
/** @returns {BasePrice} */
|
|
121
995
|
static BasePrice() {
|
|
122
996
|
return Joi.object({
|
|
123
997
|
currency_code: Joi.string().allow(""),
|
|
@@ -126,42 +1000,54 @@ class PosCartModel {
|
|
|
126
1000
|
marked: Joi.number(),
|
|
127
1001
|
});
|
|
128
1002
|
}
|
|
1003
|
+
|
|
1004
|
+
/** @returns {BulkPriceOffer} */
|
|
129
1005
|
static BulkPriceOffer() {
|
|
130
1006
|
return Joi.object({
|
|
131
|
-
offers: Joi.array().items(
|
|
132
|
-
seller:
|
|
1007
|
+
offers: Joi.array().items(PosCartApplicationModel.OfferItem()),
|
|
1008
|
+
seller: PosCartApplicationModel.OfferSeller(),
|
|
133
1009
|
});
|
|
134
1010
|
}
|
|
1011
|
+
|
|
1012
|
+
/** @returns {BulkPriceResponse} */
|
|
135
1013
|
static BulkPriceResponse() {
|
|
136
1014
|
return Joi.object({
|
|
137
|
-
data: Joi.array().items(
|
|
1015
|
+
data: Joi.array().items(PosCartApplicationModel.BulkPriceOffer()),
|
|
138
1016
|
});
|
|
139
1017
|
}
|
|
1018
|
+
|
|
1019
|
+
/** @returns {BuyRules} */
|
|
140
1020
|
static BuyRules() {
|
|
141
1021
|
return Joi.object({
|
|
142
1022
|
cart_conditions: Joi.any(),
|
|
143
1023
|
item_criteria: Joi.any(),
|
|
144
1024
|
});
|
|
145
1025
|
}
|
|
1026
|
+
|
|
1027
|
+
/** @returns {CartBreakup} */
|
|
146
1028
|
static CartBreakup() {
|
|
147
1029
|
return Joi.object({
|
|
148
|
-
coupon:
|
|
149
|
-
display: Joi.array().items(
|
|
150
|
-
loyalty_points:
|
|
151
|
-
raw:
|
|
1030
|
+
coupon: PosCartApplicationModel.CouponBreakup(),
|
|
1031
|
+
display: Joi.array().items(PosCartApplicationModel.DisplayBreakup()),
|
|
1032
|
+
loyalty_points: PosCartApplicationModel.LoyaltyPoints(),
|
|
1033
|
+
raw: PosCartApplicationModel.RawBreakup(),
|
|
152
1034
|
});
|
|
153
1035
|
}
|
|
1036
|
+
|
|
1037
|
+
/** @returns {CartCheckoutCustomMeta} */
|
|
154
1038
|
static CartCheckoutCustomMeta() {
|
|
155
1039
|
return Joi.object({
|
|
156
1040
|
key: Joi.string().allow("").required(),
|
|
157
1041
|
value: Joi.string().allow("").required(),
|
|
158
1042
|
});
|
|
159
1043
|
}
|
|
1044
|
+
|
|
1045
|
+
/** @returns {CartCheckoutResponse} */
|
|
160
1046
|
static CartCheckoutResponse() {
|
|
161
1047
|
return Joi.object({
|
|
162
1048
|
app_intercept_url: Joi.string().allow(""),
|
|
163
1049
|
callback_url: Joi.string().allow(""),
|
|
164
|
-
cart:
|
|
1050
|
+
cart: PosCartApplicationModel.CheckCart(),
|
|
165
1051
|
data: Joi.any(),
|
|
166
1052
|
message: Joi.string().allow(""),
|
|
167
1053
|
order_id: Joi.string().allow(""),
|
|
@@ -169,67 +1055,85 @@ class PosCartModel {
|
|
|
169
1055
|
success: Joi.boolean(),
|
|
170
1056
|
});
|
|
171
1057
|
}
|
|
1058
|
+
|
|
1059
|
+
/** @returns {CartCurrency} */
|
|
172
1060
|
static CartCurrency() {
|
|
173
1061
|
return Joi.object({
|
|
174
1062
|
code: Joi.string().allow(""),
|
|
175
1063
|
symbol: Joi.string().allow(""),
|
|
176
1064
|
});
|
|
177
1065
|
}
|
|
1066
|
+
|
|
1067
|
+
/** @returns {CartDeliveryModesResponse} */
|
|
178
1068
|
static CartDeliveryModesResponse() {
|
|
179
1069
|
return Joi.object({
|
|
180
1070
|
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
181
1071
|
pickup_stores: Joi.array().items(Joi.number()),
|
|
182
1072
|
});
|
|
183
1073
|
}
|
|
1074
|
+
|
|
1075
|
+
/** @returns {CartDetailResponse} */
|
|
184
1076
|
static CartDetailResponse() {
|
|
185
1077
|
return Joi.object({
|
|
186
|
-
applied_promo_details: Joi.array().items(
|
|
187
|
-
|
|
1078
|
+
applied_promo_details: Joi.array().items(
|
|
1079
|
+
PosCartApplicationModel.AppliedPromotion()
|
|
1080
|
+
),
|
|
1081
|
+
breakup_values: PosCartApplicationModel.CartBreakup(),
|
|
188
1082
|
buy_now: Joi.boolean(),
|
|
189
1083
|
checkout_mode: Joi.string().allow(""),
|
|
190
1084
|
comment: Joi.string().allow(""),
|
|
191
1085
|
coupon_text: Joi.string().allow(""),
|
|
192
|
-
currency:
|
|
1086
|
+
currency: PosCartApplicationModel.CartCurrency(),
|
|
193
1087
|
delivery_charge_info: Joi.string().allow(""),
|
|
194
|
-
delivery_promise:
|
|
1088
|
+
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
195
1089
|
gstin: Joi.string().allow(""),
|
|
196
1090
|
id: Joi.string().allow(""),
|
|
197
1091
|
is_valid: Joi.boolean(),
|
|
198
|
-
items: Joi.array().items(
|
|
1092
|
+
items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
|
|
199
1093
|
last_modified: Joi.string().allow(""),
|
|
200
1094
|
message: Joi.string().allow(""),
|
|
201
1095
|
pan_config: Joi.any(),
|
|
202
1096
|
pan_no: Joi.string().allow(""),
|
|
203
|
-
payment_selection_lock:
|
|
1097
|
+
payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
|
|
204
1098
|
restrict_checkout: Joi.boolean(),
|
|
205
1099
|
});
|
|
206
1100
|
}
|
|
1101
|
+
|
|
1102
|
+
/** @returns {CartItemCountResponse} */
|
|
207
1103
|
static CartItemCountResponse() {
|
|
208
1104
|
return Joi.object({
|
|
209
1105
|
user_cart_items_count: Joi.number(),
|
|
210
1106
|
});
|
|
211
1107
|
}
|
|
1108
|
+
|
|
1109
|
+
/** @returns {CartMetaMissingResponse} */
|
|
212
1110
|
static CartMetaMissingResponse() {
|
|
213
1111
|
return Joi.object({
|
|
214
1112
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
215
1113
|
});
|
|
216
1114
|
}
|
|
1115
|
+
|
|
1116
|
+
/** @returns {CartMetaRequest} */
|
|
217
1117
|
static CartMetaRequest() {
|
|
218
1118
|
return Joi.object({
|
|
219
1119
|
checkout_mode: Joi.string().allow(""),
|
|
220
1120
|
comment: Joi.string().allow(""),
|
|
221
1121
|
delivery_slots: Joi.any(),
|
|
222
|
-
gift_details:
|
|
1122
|
+
gift_details: PosCartApplicationModel.ArticleGiftDetail(),
|
|
223
1123
|
gstin: Joi.string().allow(""),
|
|
224
1124
|
pick_up_customer_details: Joi.any(),
|
|
225
1125
|
});
|
|
226
1126
|
}
|
|
1127
|
+
|
|
1128
|
+
/** @returns {CartMetaResponse} */
|
|
227
1129
|
static CartMetaResponse() {
|
|
228
1130
|
return Joi.object({
|
|
229
1131
|
is_valid: Joi.boolean(),
|
|
230
1132
|
message: Joi.string().allow(""),
|
|
231
1133
|
});
|
|
232
1134
|
}
|
|
1135
|
+
|
|
1136
|
+
/** @returns {CartPosCheckoutDetailRequest} */
|
|
233
1137
|
static CartPosCheckoutDetailRequest() {
|
|
234
1138
|
return Joi.object({
|
|
235
1139
|
address_id: Joi.string().allow(""),
|
|
@@ -237,11 +1141,13 @@ class PosCartModel {
|
|
|
237
1141
|
billing_address: Joi.any(),
|
|
238
1142
|
billing_address_id: Joi.string().allow(""),
|
|
239
1143
|
callback_url: Joi.string().allow("").allow(null),
|
|
240
|
-
custom_meta: Joi.array().items(
|
|
241
|
-
|
|
1144
|
+
custom_meta: Joi.array().items(
|
|
1145
|
+
PosCartApplicationModel.CartCheckoutCustomMeta()
|
|
1146
|
+
),
|
|
1147
|
+
customer_details: PosCartApplicationModel.CustomerDetails(),
|
|
242
1148
|
delivery_address: Joi.any(),
|
|
243
1149
|
extra_meta: Joi.any(),
|
|
244
|
-
files: Joi.array().items(
|
|
1150
|
+
files: Joi.array().items(PosCartApplicationModel.Files()),
|
|
245
1151
|
id: Joi.string().allow("").allow(null),
|
|
246
1152
|
merchant_code: Joi.string().allow(""),
|
|
247
1153
|
meta: Joi.any(),
|
|
@@ -253,86 +1159,100 @@ class PosCartModel {
|
|
|
253
1159
|
payment_params: Joi.any().allow(null),
|
|
254
1160
|
pick_at_store_uid: Joi.number().allow(null),
|
|
255
1161
|
pos: Joi.boolean(),
|
|
256
|
-
staff:
|
|
1162
|
+
staff: PosCartApplicationModel.StaffCheckout(),
|
|
257
1163
|
});
|
|
258
1164
|
}
|
|
1165
|
+
|
|
1166
|
+
/** @returns {CartProduct} */
|
|
259
1167
|
static CartProduct() {
|
|
260
1168
|
return Joi.object({
|
|
261
1169
|
_custom_json: Joi.any(),
|
|
262
|
-
action:
|
|
263
|
-
brand:
|
|
264
|
-
categories: Joi.array().items(
|
|
265
|
-
images: Joi.array().items(
|
|
1170
|
+
action: PosCartApplicationModel.ProductAction(),
|
|
1171
|
+
brand: PosCartApplicationModel.BaseInfo(),
|
|
1172
|
+
categories: Joi.array().items(PosCartApplicationModel.CategoryInfo()),
|
|
1173
|
+
images: Joi.array().items(PosCartApplicationModel.ProductImage()),
|
|
266
1174
|
item_code: Joi.string().allow("").allow(null),
|
|
267
1175
|
name: Joi.string().allow(""),
|
|
268
1176
|
slug: Joi.string().allow(""),
|
|
269
1177
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
270
|
-
teaser_tag:
|
|
1178
|
+
teaser_tag: PosCartApplicationModel.Tags(),
|
|
271
1179
|
type: Joi.string().allow(""),
|
|
272
1180
|
uid: Joi.number(),
|
|
273
1181
|
});
|
|
274
1182
|
}
|
|
1183
|
+
|
|
1184
|
+
/** @returns {CartProductIdentifer} */
|
|
275
1185
|
static CartProductIdentifer() {
|
|
276
1186
|
return Joi.object({
|
|
277
1187
|
identifier: Joi.string().allow(""),
|
|
278
1188
|
});
|
|
279
1189
|
}
|
|
1190
|
+
|
|
1191
|
+
/** @returns {CartProductInfo} */
|
|
280
1192
|
static CartProductInfo() {
|
|
281
1193
|
return Joi.object({
|
|
282
|
-
article:
|
|
283
|
-
availability:
|
|
1194
|
+
article: PosCartApplicationModel.ProductArticle(),
|
|
1195
|
+
availability: PosCartApplicationModel.ProductAvailability(),
|
|
284
1196
|
bulk_offer: Joi.any(),
|
|
285
|
-
coupon:
|
|
1197
|
+
coupon: PosCartApplicationModel.CouponDetails(),
|
|
286
1198
|
coupon_message: Joi.string().allow(""),
|
|
287
1199
|
custom_order: Joi.any(),
|
|
288
|
-
delivery_promise:
|
|
1200
|
+
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
289
1201
|
discount: Joi.string().allow(""),
|
|
290
|
-
identifiers:
|
|
1202
|
+
identifiers: PosCartApplicationModel.CartProductIdentifer().required(),
|
|
291
1203
|
is_set: Joi.boolean(),
|
|
292
1204
|
key: Joi.string().allow(""),
|
|
293
1205
|
message: Joi.string().allow(""),
|
|
294
1206
|
moq: Joi.any(),
|
|
295
1207
|
parent_item_identifiers: Joi.any(),
|
|
296
|
-
price:
|
|
297
|
-
price_per_unit:
|
|
298
|
-
product:
|
|
299
|
-
promo_meta:
|
|
300
|
-
promotions_applied: Joi.array().items(
|
|
1208
|
+
price: PosCartApplicationModel.ProductPriceInfo(),
|
|
1209
|
+
price_per_unit: PosCartApplicationModel.ProductPriceInfo(),
|
|
1210
|
+
product: PosCartApplicationModel.CartProduct(),
|
|
1211
|
+
promo_meta: PosCartApplicationModel.PromoMeta(),
|
|
1212
|
+
promotions_applied: Joi.array().items(
|
|
1213
|
+
PosCartApplicationModel.AppliedPromotion()
|
|
1214
|
+
),
|
|
301
1215
|
quantity: Joi.number(),
|
|
302
1216
|
});
|
|
303
1217
|
}
|
|
1218
|
+
|
|
1219
|
+
/** @returns {CartShipmentsResponse} */
|
|
304
1220
|
static CartShipmentsResponse() {
|
|
305
1221
|
return Joi.object({
|
|
306
|
-
breakup_values:
|
|
1222
|
+
breakup_values: PosCartApplicationModel.CartBreakup(),
|
|
307
1223
|
buy_now: Joi.boolean(),
|
|
308
1224
|
cart_id: Joi.number(),
|
|
309
1225
|
checkout_mode: Joi.string().allow(""),
|
|
310
1226
|
comment: Joi.string().allow(""),
|
|
311
1227
|
coupon_text: Joi.string().allow(""),
|
|
312
|
-
currency:
|
|
1228
|
+
currency: PosCartApplicationModel.CartCurrency(),
|
|
313
1229
|
delivery_charge_info: Joi.string().allow(""),
|
|
314
|
-
delivery_promise:
|
|
1230
|
+
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
315
1231
|
error: Joi.boolean(),
|
|
316
1232
|
gstin: Joi.string().allow(""),
|
|
317
1233
|
id: Joi.string().allow(""),
|
|
318
1234
|
is_valid: Joi.boolean(),
|
|
319
1235
|
last_modified: Joi.string().allow(""),
|
|
320
1236
|
message: Joi.string().allow(""),
|
|
321
|
-
payment_selection_lock:
|
|
1237
|
+
payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
|
|
322
1238
|
restrict_checkout: Joi.boolean(),
|
|
323
|
-
shipments: Joi.array().items(
|
|
1239
|
+
shipments: Joi.array().items(PosCartApplicationModel.ShipmentResponse()),
|
|
324
1240
|
uid: Joi.string().allow(""),
|
|
325
1241
|
});
|
|
326
1242
|
}
|
|
1243
|
+
|
|
1244
|
+
/** @returns {CategoryInfo} */
|
|
327
1245
|
static CategoryInfo() {
|
|
328
1246
|
return Joi.object({
|
|
329
1247
|
name: Joi.string().allow(""),
|
|
330
1248
|
uid: Joi.number(),
|
|
331
1249
|
});
|
|
332
1250
|
}
|
|
1251
|
+
|
|
1252
|
+
/** @returns {CheckCart} */
|
|
333
1253
|
static CheckCart() {
|
|
334
1254
|
return Joi.object({
|
|
335
|
-
breakup_values:
|
|
1255
|
+
breakup_values: PosCartApplicationModel.CartBreakup(),
|
|
336
1256
|
buy_now: Joi.boolean(),
|
|
337
1257
|
cart_id: Joi.number(),
|
|
338
1258
|
checkout_mode: Joi.string().allow(""),
|
|
@@ -341,20 +1261,20 @@ class PosCartModel {
|
|
|
341
1261
|
cod_message: Joi.string().allow(""),
|
|
342
1262
|
comment: Joi.string().allow(""),
|
|
343
1263
|
coupon_text: Joi.string().allow(""),
|
|
344
|
-
currency:
|
|
1264
|
+
currency: PosCartApplicationModel.CartCurrency(),
|
|
345
1265
|
delivery_charge_info: Joi.string().allow(""),
|
|
346
1266
|
delivery_charge_order_value: Joi.number(),
|
|
347
1267
|
delivery_charges: Joi.number(),
|
|
348
|
-
delivery_promise:
|
|
1268
|
+
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
349
1269
|
error_message: Joi.string().allow(""),
|
|
350
1270
|
gstin: Joi.string().allow(""),
|
|
351
1271
|
id: Joi.string().allow(""),
|
|
352
1272
|
is_valid: Joi.boolean(),
|
|
353
|
-
items: Joi.array().items(
|
|
1273
|
+
items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
|
|
354
1274
|
last_modified: Joi.string().allow(""),
|
|
355
1275
|
message: Joi.string().allow(""),
|
|
356
1276
|
order_id: Joi.string().allow(""),
|
|
357
|
-
payment_selection_lock:
|
|
1277
|
+
payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
|
|
358
1278
|
restrict_checkout: Joi.boolean(),
|
|
359
1279
|
store_code: Joi.string().allow(""),
|
|
360
1280
|
store_emps: Joi.array().items(Joi.any()),
|
|
@@ -363,6 +1283,8 @@ class PosCartModel {
|
|
|
363
1283
|
user_type: Joi.string().allow(""),
|
|
364
1284
|
});
|
|
365
1285
|
}
|
|
1286
|
+
|
|
1287
|
+
/** @returns {Coupon} */
|
|
366
1288
|
static Coupon() {
|
|
367
1289
|
return Joi.object({
|
|
368
1290
|
coupon_code: Joi.string().allow(""),
|
|
@@ -379,6 +1301,8 @@ class PosCartModel {
|
|
|
379
1301
|
title: Joi.string().allow(""),
|
|
380
1302
|
});
|
|
381
1303
|
}
|
|
1304
|
+
|
|
1305
|
+
/** @returns {CouponBreakup} */
|
|
382
1306
|
static CouponBreakup() {
|
|
383
1307
|
return Joi.object({
|
|
384
1308
|
code: Joi.string().allow(""),
|
|
@@ -396,6 +1320,8 @@ class PosCartModel {
|
|
|
396
1320
|
value: Joi.number(),
|
|
397
1321
|
});
|
|
398
1322
|
}
|
|
1323
|
+
|
|
1324
|
+
/** @returns {CouponDetails} */
|
|
399
1325
|
static CouponDetails() {
|
|
400
1326
|
return Joi.object({
|
|
401
1327
|
code: Joi.string().allow(""),
|
|
@@ -403,6 +1329,8 @@ class PosCartModel {
|
|
|
403
1329
|
discount_total_quantity: Joi.number(),
|
|
404
1330
|
});
|
|
405
1331
|
}
|
|
1332
|
+
|
|
1333
|
+
/** @returns {CouponValidity} */
|
|
406
1334
|
static CouponValidity() {
|
|
407
1335
|
return Joi.object({
|
|
408
1336
|
code: Joi.string().allow("").allow(null),
|
|
@@ -413,6 +1341,8 @@ class PosCartModel {
|
|
|
413
1341
|
valid: Joi.boolean(),
|
|
414
1342
|
});
|
|
415
1343
|
}
|
|
1344
|
+
|
|
1345
|
+
/** @returns {CustomerDetails} */
|
|
416
1346
|
static CustomerDetails() {
|
|
417
1347
|
return Joi.object({
|
|
418
1348
|
email: Joi.string().allow("").allow(null),
|
|
@@ -420,12 +1350,16 @@ class PosCartModel {
|
|
|
420
1350
|
name: Joi.string().allow(""),
|
|
421
1351
|
});
|
|
422
1352
|
}
|
|
1353
|
+
|
|
1354
|
+
/** @returns {DeleteAddressResponse} */
|
|
423
1355
|
static DeleteAddressResponse() {
|
|
424
1356
|
return Joi.object({
|
|
425
1357
|
id: Joi.string().allow(""),
|
|
426
1358
|
is_deleted: Joi.boolean(),
|
|
427
1359
|
});
|
|
428
1360
|
}
|
|
1361
|
+
|
|
1362
|
+
/** @returns {DiscountRulesApp} */
|
|
429
1363
|
static DiscountRulesApp() {
|
|
430
1364
|
return Joi.object({
|
|
431
1365
|
item_criteria: Joi.any(),
|
|
@@ -434,6 +1368,8 @@ class PosCartModel {
|
|
|
434
1368
|
raw_offer: Joi.any(),
|
|
435
1369
|
});
|
|
436
1370
|
}
|
|
1371
|
+
|
|
1372
|
+
/** @returns {DisplayBreakup} */
|
|
437
1373
|
static DisplayBreakup() {
|
|
438
1374
|
return Joi.object({
|
|
439
1375
|
currency_code: Joi.string().allow(""),
|
|
@@ -444,12 +1380,16 @@ class PosCartModel {
|
|
|
444
1380
|
value: Joi.number(),
|
|
445
1381
|
});
|
|
446
1382
|
}
|
|
1383
|
+
|
|
1384
|
+
/** @returns {Files} */
|
|
447
1385
|
static Files() {
|
|
448
1386
|
return Joi.object({
|
|
449
1387
|
key: Joi.string().allow("").required(),
|
|
450
1388
|
values: Joi.array().items(Joi.string().allow("")).required(),
|
|
451
1389
|
});
|
|
452
1390
|
}
|
|
1391
|
+
|
|
1392
|
+
/** @returns {FreeGiftItem} */
|
|
453
1393
|
static FreeGiftItem() {
|
|
454
1394
|
return Joi.object({
|
|
455
1395
|
item_brand_name: Joi.string().allow(""),
|
|
@@ -460,42 +1400,58 @@ class PosCartModel {
|
|
|
460
1400
|
item_slug: Joi.string().allow(""),
|
|
461
1401
|
});
|
|
462
1402
|
}
|
|
1403
|
+
|
|
1404
|
+
/** @returns {GeoLocation} */
|
|
463
1405
|
static GeoLocation() {
|
|
464
1406
|
return Joi.object({
|
|
465
1407
|
latitude: Joi.number(),
|
|
466
1408
|
longitude: Joi.number(),
|
|
467
1409
|
});
|
|
468
1410
|
}
|
|
1411
|
+
|
|
1412
|
+
/** @returns {GetAddressesResponse} */
|
|
469
1413
|
static GetAddressesResponse() {
|
|
470
1414
|
return Joi.object({
|
|
471
|
-
address: Joi.array().items(
|
|
1415
|
+
address: Joi.array().items(PosCartApplicationModel.Address()),
|
|
472
1416
|
pii_masking: Joi.boolean(),
|
|
473
1417
|
});
|
|
474
1418
|
}
|
|
1419
|
+
|
|
1420
|
+
/** @returns {GetCouponResponse} */
|
|
475
1421
|
static GetCouponResponse() {
|
|
476
1422
|
return Joi.object({
|
|
477
|
-
available_coupon_list: Joi.array().items(
|
|
478
|
-
|
|
1423
|
+
available_coupon_list: Joi.array().items(
|
|
1424
|
+
PosCartApplicationModel.Coupon()
|
|
1425
|
+
),
|
|
1426
|
+
page: PosCartApplicationModel.PageCoupon(),
|
|
479
1427
|
});
|
|
480
1428
|
}
|
|
1429
|
+
|
|
1430
|
+
/** @returns {GetShareCartLinkRequest} */
|
|
481
1431
|
static GetShareCartLinkRequest() {
|
|
482
1432
|
return Joi.object({
|
|
483
1433
|
id: Joi.string().allow(""),
|
|
484
1434
|
meta: Joi.any(),
|
|
485
1435
|
});
|
|
486
1436
|
}
|
|
1437
|
+
|
|
1438
|
+
/** @returns {GetShareCartLinkResponse} */
|
|
487
1439
|
static GetShareCartLinkResponse() {
|
|
488
1440
|
return Joi.object({
|
|
489
1441
|
share_url: Joi.string().allow(""),
|
|
490
1442
|
token: Joi.string().allow(""),
|
|
491
1443
|
});
|
|
492
1444
|
}
|
|
1445
|
+
|
|
1446
|
+
/** @returns {GiftDetail} */
|
|
493
1447
|
static GiftDetail() {
|
|
494
1448
|
return Joi.object({
|
|
495
1449
|
gift_message: Joi.string().allow(""),
|
|
496
1450
|
is_gift_applied: Joi.boolean(),
|
|
497
1451
|
});
|
|
498
1452
|
}
|
|
1453
|
+
|
|
1454
|
+
/** @returns {LoyaltyPoints} */
|
|
499
1455
|
static LoyaltyPoints() {
|
|
500
1456
|
return Joi.object({
|
|
501
1457
|
applicable: Joi.number(),
|
|
@@ -504,17 +1460,21 @@ class PosCartModel {
|
|
|
504
1460
|
total: Joi.number(),
|
|
505
1461
|
});
|
|
506
1462
|
}
|
|
1463
|
+
|
|
1464
|
+
/** @returns {OfferItem} */
|
|
507
1465
|
static OfferItem() {
|
|
508
1466
|
return Joi.object({
|
|
509
1467
|
auto_applied: Joi.boolean(),
|
|
510
1468
|
best: Joi.boolean(),
|
|
511
1469
|
margin: Joi.number(),
|
|
512
|
-
price:
|
|
1470
|
+
price: PosCartApplicationModel.OfferPrice(),
|
|
513
1471
|
quantity: Joi.number(),
|
|
514
1472
|
total: Joi.number(),
|
|
515
1473
|
type: Joi.string().allow(""),
|
|
516
1474
|
});
|
|
517
1475
|
}
|
|
1476
|
+
|
|
1477
|
+
/** @returns {OfferPrice} */
|
|
518
1478
|
static OfferPrice() {
|
|
519
1479
|
return Joi.object({
|
|
520
1480
|
bulk_effective: Joi.number(),
|
|
@@ -524,18 +1484,24 @@ class PosCartModel {
|
|
|
524
1484
|
marked: Joi.number(),
|
|
525
1485
|
});
|
|
526
1486
|
}
|
|
1487
|
+
|
|
1488
|
+
/** @returns {OfferSeller} */
|
|
527
1489
|
static OfferSeller() {
|
|
528
1490
|
return Joi.object({
|
|
529
1491
|
name: Joi.string().allow(""),
|
|
530
1492
|
uid: Joi.number(),
|
|
531
1493
|
});
|
|
532
1494
|
}
|
|
1495
|
+
|
|
1496
|
+
/** @returns {Ownership} */
|
|
533
1497
|
static Ownership() {
|
|
534
1498
|
return Joi.object({
|
|
535
1499
|
payable_by: Joi.string().allow(""),
|
|
536
1500
|
payable_category: Joi.string().allow(""),
|
|
537
1501
|
});
|
|
538
1502
|
}
|
|
1503
|
+
|
|
1504
|
+
/** @returns {PageCoupon} */
|
|
539
1505
|
static PageCoupon() {
|
|
540
1506
|
return Joi.object({
|
|
541
1507
|
current: Joi.number(),
|
|
@@ -545,13 +1511,17 @@ class PosCartModel {
|
|
|
545
1511
|
total_item_count: Joi.number(),
|
|
546
1512
|
});
|
|
547
1513
|
}
|
|
1514
|
+
|
|
1515
|
+
/** @returns {PaymentCouponValidate} */
|
|
548
1516
|
static PaymentCouponValidate() {
|
|
549
1517
|
return Joi.object({
|
|
550
|
-
coupon_validity:
|
|
1518
|
+
coupon_validity: PosCartApplicationModel.CouponValidity(),
|
|
551
1519
|
message: Joi.string().allow(""),
|
|
552
1520
|
success: Joi.boolean().required(),
|
|
553
1521
|
});
|
|
554
1522
|
}
|
|
1523
|
+
|
|
1524
|
+
/** @returns {PaymentSelectionLock} */
|
|
555
1525
|
static PaymentSelectionLock() {
|
|
556
1526
|
return Joi.object({
|
|
557
1527
|
default_options: Joi.string().allow(""),
|
|
@@ -559,6 +1529,8 @@ class PosCartModel {
|
|
|
559
1529
|
payment_identifier: Joi.string().allow(""),
|
|
560
1530
|
});
|
|
561
1531
|
}
|
|
1532
|
+
|
|
1533
|
+
/** @returns {PickupStoreDetail} */
|
|
562
1534
|
static PickupStoreDetail() {
|
|
563
1535
|
return Joi.object({
|
|
564
1536
|
address: Joi.string().allow(""),
|
|
@@ -579,13 +1551,17 @@ class PosCartModel {
|
|
|
579
1551
|
uid: Joi.number(),
|
|
580
1552
|
});
|
|
581
1553
|
}
|
|
1554
|
+
|
|
1555
|
+
/** @returns {ProductAction} */
|
|
582
1556
|
static ProductAction() {
|
|
583
1557
|
return Joi.object({
|
|
584
|
-
query:
|
|
1558
|
+
query: PosCartApplicationModel.ActionQuery(),
|
|
585
1559
|
type: Joi.string().allow(""),
|
|
586
1560
|
url: Joi.string().allow(""),
|
|
587
1561
|
});
|
|
588
1562
|
}
|
|
1563
|
+
|
|
1564
|
+
/** @returns {ProductArticle} */
|
|
589
1565
|
static ProductArticle() {
|
|
590
1566
|
return Joi.object({
|
|
591
1567
|
_custom_json: Joi.any(),
|
|
@@ -597,21 +1573,23 @@ class PosCartModel {
|
|
|
597
1573
|
meta: Joi.any(),
|
|
598
1574
|
mto_quantity: Joi.number(),
|
|
599
1575
|
parent_item_identifiers: Joi.any(),
|
|
600
|
-
price:
|
|
1576
|
+
price: PosCartApplicationModel.ArticlePriceInfo(),
|
|
601
1577
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
602
1578
|
quantity: Joi.number(),
|
|
603
|
-
seller:
|
|
1579
|
+
seller: PosCartApplicationModel.BaseInfo(),
|
|
604
1580
|
seller_identifier: Joi.string().allow(""),
|
|
605
1581
|
size: Joi.string().allow(""),
|
|
606
|
-
store:
|
|
1582
|
+
store: PosCartApplicationModel.StoreInfo(),
|
|
607
1583
|
type: Joi.string().allow(""),
|
|
608
1584
|
uid: Joi.string().allow(""),
|
|
609
1585
|
});
|
|
610
1586
|
}
|
|
1587
|
+
|
|
1588
|
+
/** @returns {ProductAvailability} */
|
|
611
1589
|
static ProductAvailability() {
|
|
612
1590
|
return Joi.object({
|
|
613
1591
|
available_sizes: Joi.array().items(
|
|
614
|
-
|
|
1592
|
+
PosCartApplicationModel.ProductAvailabilitySize()
|
|
615
1593
|
),
|
|
616
1594
|
deliverable: Joi.boolean(),
|
|
617
1595
|
is_valid: Joi.boolean(),
|
|
@@ -620,6 +1598,8 @@ class PosCartModel {
|
|
|
620
1598
|
sizes: Joi.array().items(Joi.string().allow("")),
|
|
621
1599
|
});
|
|
622
1600
|
}
|
|
1601
|
+
|
|
1602
|
+
/** @returns {ProductAvailabilitySize} */
|
|
623
1603
|
static ProductAvailabilitySize() {
|
|
624
1604
|
return Joi.object({
|
|
625
1605
|
display: Joi.string().allow(""),
|
|
@@ -627,6 +1607,8 @@ class PosCartModel {
|
|
|
627
1607
|
value: Joi.string().allow(""),
|
|
628
1608
|
});
|
|
629
1609
|
}
|
|
1610
|
+
|
|
1611
|
+
/** @returns {ProductImage} */
|
|
630
1612
|
static ProductImage() {
|
|
631
1613
|
return Joi.object({
|
|
632
1614
|
aspect_ratio: Joi.string().allow(""),
|
|
@@ -634,6 +1616,8 @@ class PosCartModel {
|
|
|
634
1616
|
url: Joi.string().allow(""),
|
|
635
1617
|
});
|
|
636
1618
|
}
|
|
1619
|
+
|
|
1620
|
+
/** @returns {ProductPrice} */
|
|
637
1621
|
static ProductPrice() {
|
|
638
1622
|
return Joi.object({
|
|
639
1623
|
add_on: Joi.number(),
|
|
@@ -644,29 +1628,39 @@ class PosCartModel {
|
|
|
644
1628
|
selling: Joi.number(),
|
|
645
1629
|
});
|
|
646
1630
|
}
|
|
1631
|
+
|
|
1632
|
+
/** @returns {ProductPriceInfo} */
|
|
647
1633
|
static ProductPriceInfo() {
|
|
648
1634
|
return Joi.object({
|
|
649
|
-
base:
|
|
650
|
-
converted:
|
|
1635
|
+
base: PosCartApplicationModel.ProductPrice(),
|
|
1636
|
+
converted: PosCartApplicationModel.ProductPrice(),
|
|
651
1637
|
});
|
|
652
1638
|
}
|
|
1639
|
+
|
|
1640
|
+
/** @returns {PromiseFormatted} */
|
|
653
1641
|
static PromiseFormatted() {
|
|
654
1642
|
return Joi.object({
|
|
655
1643
|
max: Joi.string().allow(""),
|
|
656
1644
|
min: Joi.string().allow(""),
|
|
657
1645
|
});
|
|
658
1646
|
}
|
|
1647
|
+
|
|
1648
|
+
/** @returns {PromiseTimestamp} */
|
|
659
1649
|
static PromiseTimestamp() {
|
|
660
1650
|
return Joi.object({
|
|
661
1651
|
max: Joi.number(),
|
|
662
1652
|
min: Joi.number(),
|
|
663
1653
|
});
|
|
664
1654
|
}
|
|
1655
|
+
|
|
1656
|
+
/** @returns {PromoMeta} */
|
|
665
1657
|
static PromoMeta() {
|
|
666
1658
|
return Joi.object({
|
|
667
1659
|
message: Joi.string().allow(""),
|
|
668
1660
|
});
|
|
669
1661
|
}
|
|
1662
|
+
|
|
1663
|
+
/** @returns {RawBreakup} */
|
|
670
1664
|
static RawBreakup() {
|
|
671
1665
|
return Joi.object({
|
|
672
1666
|
cod_charge: Joi.number(),
|
|
@@ -684,11 +1678,15 @@ class PosCartModel {
|
|
|
684
1678
|
you_saved: Joi.number(),
|
|
685
1679
|
});
|
|
686
1680
|
}
|
|
1681
|
+
|
|
1682
|
+
/** @returns {RewardPointRequest} */
|
|
687
1683
|
static RewardPointRequest() {
|
|
688
1684
|
return Joi.object({
|
|
689
1685
|
points: Joi.boolean().required(),
|
|
690
1686
|
});
|
|
691
1687
|
}
|
|
1688
|
+
|
|
1689
|
+
/** @returns {SaveAddressResponse} */
|
|
692
1690
|
static SaveAddressResponse() {
|
|
693
1691
|
return Joi.object({
|
|
694
1692
|
id: Joi.string().allow(""),
|
|
@@ -696,6 +1694,8 @@ class PosCartModel {
|
|
|
696
1694
|
success: Joi.boolean(),
|
|
697
1695
|
});
|
|
698
1696
|
}
|
|
1697
|
+
|
|
1698
|
+
/** @returns {SelectCartAddressRequest} */
|
|
699
1699
|
static SelectCartAddressRequest() {
|
|
700
1700
|
return Joi.object({
|
|
701
1701
|
billing_address_id: Joi.string().allow(""),
|
|
@@ -703,29 +1703,33 @@ class PosCartModel {
|
|
|
703
1703
|
id: Joi.string().allow(""),
|
|
704
1704
|
});
|
|
705
1705
|
}
|
|
1706
|
+
|
|
1707
|
+
/** @returns {SharedCart} */
|
|
706
1708
|
static SharedCart() {
|
|
707
1709
|
return Joi.object({
|
|
708
|
-
breakup_values:
|
|
1710
|
+
breakup_values: PosCartApplicationModel.CartBreakup(),
|
|
709
1711
|
buy_now: Joi.boolean(),
|
|
710
1712
|
cart_id: Joi.number(),
|
|
711
1713
|
checkout_mode: Joi.string().allow(""),
|
|
712
1714
|
comment: Joi.string().allow(""),
|
|
713
1715
|
coupon_text: Joi.string().allow(""),
|
|
714
|
-
currency:
|
|
1716
|
+
currency: PosCartApplicationModel.CartCurrency(),
|
|
715
1717
|
delivery_charge_info: Joi.string().allow(""),
|
|
716
|
-
delivery_promise:
|
|
1718
|
+
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
717
1719
|
gstin: Joi.string().allow(""),
|
|
718
1720
|
id: Joi.string().allow(""),
|
|
719
1721
|
is_valid: Joi.boolean(),
|
|
720
|
-
items: Joi.array().items(
|
|
1722
|
+
items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
|
|
721
1723
|
last_modified: Joi.string().allow(""),
|
|
722
1724
|
message: Joi.string().allow(""),
|
|
723
|
-
payment_selection_lock:
|
|
1725
|
+
payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
|
|
724
1726
|
restrict_checkout: Joi.boolean(),
|
|
725
|
-
shared_cart_details:
|
|
1727
|
+
shared_cart_details: PosCartApplicationModel.SharedCartDetails(),
|
|
726
1728
|
uid: Joi.string().allow(""),
|
|
727
1729
|
});
|
|
728
1730
|
}
|
|
1731
|
+
|
|
1732
|
+
/** @returns {SharedCartDetails} */
|
|
729
1733
|
static SharedCartDetails() {
|
|
730
1734
|
return Joi.object({
|
|
731
1735
|
created_on: Joi.string().allow(""),
|
|
@@ -735,18 +1739,24 @@ class PosCartModel {
|
|
|
735
1739
|
user: Joi.any(),
|
|
736
1740
|
});
|
|
737
1741
|
}
|
|
1742
|
+
|
|
1743
|
+
/** @returns {SharedCartResponse} */
|
|
738
1744
|
static SharedCartResponse() {
|
|
739
1745
|
return Joi.object({
|
|
740
|
-
cart:
|
|
1746
|
+
cart: PosCartApplicationModel.SharedCart(),
|
|
741
1747
|
error: Joi.string().allow(""),
|
|
742
1748
|
});
|
|
743
1749
|
}
|
|
1750
|
+
|
|
1751
|
+
/** @returns {ShipmentPromise} */
|
|
744
1752
|
static ShipmentPromise() {
|
|
745
1753
|
return Joi.object({
|
|
746
|
-
formatted:
|
|
747
|
-
timestamp:
|
|
1754
|
+
formatted: PosCartApplicationModel.PromiseFormatted(),
|
|
1755
|
+
timestamp: PosCartApplicationModel.PromiseTimestamp(),
|
|
748
1756
|
});
|
|
749
1757
|
}
|
|
1758
|
+
|
|
1759
|
+
/** @returns {ShipmentResponse} */
|
|
750
1760
|
static ShipmentResponse() {
|
|
751
1761
|
return Joi.object({
|
|
752
1762
|
box_type: Joi.string().allow("").allow(null),
|
|
@@ -754,13 +1764,15 @@ class PosCartModel {
|
|
|
754
1764
|
dp_options: Joi.any().allow(null),
|
|
755
1765
|
fulfillment_id: Joi.number(),
|
|
756
1766
|
fulfillment_type: Joi.string().allow(""),
|
|
757
|
-
items: Joi.array().items(
|
|
1767
|
+
items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
|
|
758
1768
|
order_type: Joi.string().allow(""),
|
|
759
|
-
promise:
|
|
1769
|
+
promise: PosCartApplicationModel.ShipmentPromise(),
|
|
760
1770
|
shipment_type: Joi.string().allow(""),
|
|
761
1771
|
shipments: Joi.number(),
|
|
762
1772
|
});
|
|
763
1773
|
}
|
|
1774
|
+
|
|
1775
|
+
/** @returns {StaffCheckout} */
|
|
764
1776
|
static StaffCheckout() {
|
|
765
1777
|
return Joi.object({
|
|
766
1778
|
_id: Joi.string().allow("").required(),
|
|
@@ -770,11 +1782,15 @@ class PosCartModel {
|
|
|
770
1782
|
user: Joi.string().allow("").required(),
|
|
771
1783
|
});
|
|
772
1784
|
}
|
|
1785
|
+
|
|
1786
|
+
/** @returns {StoreDetailsResponse} */
|
|
773
1787
|
static StoreDetailsResponse() {
|
|
774
1788
|
return Joi.object({
|
|
775
|
-
items: Joi.array().items(
|
|
1789
|
+
items: Joi.array().items(PosCartApplicationModel.PickupStoreDetail()),
|
|
776
1790
|
});
|
|
777
1791
|
}
|
|
1792
|
+
|
|
1793
|
+
/** @returns {StoreInfo} */
|
|
778
1794
|
static StoreInfo() {
|
|
779
1795
|
return Joi.object({
|
|
780
1796
|
name: Joi.string().allow(""),
|
|
@@ -782,11 +1798,15 @@ class PosCartModel {
|
|
|
782
1798
|
uid: Joi.number(),
|
|
783
1799
|
});
|
|
784
1800
|
}
|
|
1801
|
+
|
|
1802
|
+
/** @returns {Tags} */
|
|
785
1803
|
static Tags() {
|
|
786
1804
|
return Joi.object({
|
|
787
1805
|
tags: Joi.any(),
|
|
788
1806
|
});
|
|
789
1807
|
}
|
|
1808
|
+
|
|
1809
|
+
/** @returns {UpdateAddressResponse} */
|
|
790
1810
|
static UpdateAddressResponse() {
|
|
791
1811
|
return Joi.object({
|
|
792
1812
|
id: Joi.string().allow(""),
|
|
@@ -795,13 +1815,17 @@ class PosCartModel {
|
|
|
795
1815
|
success: Joi.boolean(),
|
|
796
1816
|
});
|
|
797
1817
|
}
|
|
1818
|
+
|
|
1819
|
+
/** @returns {UpdateCartDetailResponse} */
|
|
798
1820
|
static UpdateCartDetailResponse() {
|
|
799
1821
|
return Joi.object({
|
|
800
|
-
cart:
|
|
1822
|
+
cart: PosCartApplicationModel.CartDetailResponse(),
|
|
801
1823
|
message: Joi.string().allow(""),
|
|
802
1824
|
success: Joi.boolean(),
|
|
803
1825
|
});
|
|
804
1826
|
}
|
|
1827
|
+
|
|
1828
|
+
/** @returns {UpdateCartPaymentRequest} */
|
|
805
1829
|
static UpdateCartPaymentRequest() {
|
|
806
1830
|
return Joi.object({
|
|
807
1831
|
address_id: Joi.string().allow(""),
|
|
@@ -812,12 +1836,16 @@ class PosCartModel {
|
|
|
812
1836
|
payment_mode: Joi.string().allow(""),
|
|
813
1837
|
});
|
|
814
1838
|
}
|
|
1839
|
+
|
|
1840
|
+
/** @returns {UpdateCartRequest} */
|
|
815
1841
|
static UpdateCartRequest() {
|
|
816
1842
|
return Joi.object({
|
|
817
|
-
items: Joi.array().items(
|
|
1843
|
+
items: Joi.array().items(PosCartApplicationModel.UpdateProductCart()),
|
|
818
1844
|
operation: Joi.string().allow("").required(),
|
|
819
1845
|
});
|
|
820
1846
|
}
|
|
1847
|
+
|
|
1848
|
+
/** @returns {UpdateCartShipmentItem} */
|
|
821
1849
|
static UpdateCartShipmentItem() {
|
|
822
1850
|
return Joi.object({
|
|
823
1851
|
article_uid: Joi.string().allow("").required(),
|
|
@@ -825,19 +1853,23 @@ class PosCartModel {
|
|
|
825
1853
|
shipment_type: Joi.string().allow("").required(),
|
|
826
1854
|
});
|
|
827
1855
|
}
|
|
1856
|
+
|
|
1857
|
+
/** @returns {UpdateCartShipmentRequest} */
|
|
828
1858
|
static UpdateCartShipmentRequest() {
|
|
829
1859
|
return Joi.object({
|
|
830
1860
|
shipments: Joi.array()
|
|
831
|
-
.items(
|
|
1861
|
+
.items(PosCartApplicationModel.UpdateCartShipmentItem())
|
|
832
1862
|
.required(),
|
|
833
1863
|
});
|
|
834
1864
|
}
|
|
1865
|
+
|
|
1866
|
+
/** @returns {UpdateProductCart} */
|
|
835
1867
|
static UpdateProductCart() {
|
|
836
1868
|
return Joi.object({
|
|
837
1869
|
_custom_json: Joi.any(),
|
|
838
1870
|
article_id: Joi.string().allow(""),
|
|
839
1871
|
extra_meta: Joi.any(),
|
|
840
|
-
identifiers:
|
|
1872
|
+
identifiers: PosCartApplicationModel.CartProductIdentifer().required(),
|
|
841
1873
|
item_id: Joi.number(),
|
|
842
1874
|
item_index: Joi.number(),
|
|
843
1875
|
item_size: Joi.string().allow(""),
|
|
@@ -847,4 +1879,4 @@ class PosCartModel {
|
|
|
847
1879
|
});
|
|
848
1880
|
}
|
|
849
1881
|
}
|
|
850
|
-
module.exports =
|
|
1882
|
+
module.exports = PosCartApplicationModel;
|