@gofynd/fdk-client-javascript 1.4.8-beta.2 → 1.4.8
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 +26 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +8 -0
- package/sdk/application/ApplicationClient.js +14 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +20 -20
- package/sdk/application/Cart/CartApplicationClient.js +20 -20
- package/sdk/application/Cart/CartApplicationModel.d.ts +2446 -664
- package/sdk/application/Cart/CartApplicationModel.js +783 -552
- package/sdk/application/Cart/CartApplicationValidator.d.ts +268 -194
- package/sdk/application/Cart/CartApplicationValidator.js +100 -114
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +53 -53
- package/sdk/application/Catalog/CatalogApplicationClient.js +53 -53
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2012 -503
- package/sdk/application/Catalog/CatalogApplicationModel.js +603 -453
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +64 -64
- package/sdk/application/Catalog/CatalogApplicationValidator.js +32 -32
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +2 -2
- package/sdk/application/Common/CommonApplicationModel.d.ts +170 -90
- package/sdk/application/Common/CommonApplicationModel.js +59 -58
- package/sdk/application/Common/CommonApplicationValidator.d.ts +8 -5
- package/sdk/application/Common/CommonApplicationValidator.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
- package/sdk/application/Communication/CommunicationApplicationClient.js +2 -2
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +170 -35
- package/sdk/application/Communication/CommunicationApplicationModel.js +54 -33
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +624 -443
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +259 -248
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +32 -24
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +14 -13
- package/sdk/application/Content/ContentApplicationClient.d.ts +16 -16
- package/sdk/application/Content/ContentApplicationClient.js +16 -16
- package/sdk/application/Content/ContentApplicationModel.d.ts +1206 -281
- package/sdk/application/Content/ContentApplicationModel.js +342 -276
- package/sdk/application/Content/ContentApplicationValidator.d.ts +28 -17
- package/sdk/application/Content/ContentApplicationValidator.js +11 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +146 -37
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +38 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +195 -134
- package/sdk/application/Lead/LeadApplicationModel.js +110 -67
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +8 -8
- package/sdk/application/Lead/LeadApplicationValidator.js +4 -4
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -10
- package/sdk/application/Logistic/LogisticApplicationClient.js +10 -10
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +1039 -221
- package/sdk/application/Logistic/LogisticApplicationModel.js +342 -199
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +76 -82
- package/sdk/application/Logistic/LogisticApplicationValidator.js +38 -41
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
- package/sdk/application/Order/OrderApplicationClient.js +10 -10
- package/sdk/application/Order/OrderApplicationModel.d.ts +1401 -324
- package/sdk/application/Order/OrderApplicationModel.js +392 -316
- package/sdk/application/Order/OrderApplicationValidator.d.ts +32 -30
- package/sdk/application/Order/OrderApplicationValidator.js +15 -14
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +43 -43
- package/sdk/application/Payment/PaymentApplicationClient.js +43 -43
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1111 -1022
- package/sdk/application/Payment/PaymentApplicationModel.js +537 -521
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +82 -49
- package/sdk/application/Payment/PaymentApplicationValidator.js +30 -30
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +28 -7
- package/sdk/application/Rewards/RewardsApplicationModel.js +7 -7
- package/sdk/application/Share/ShareApplicationModel.d.ts +178 -38
- package/sdk/application/Share/ShareApplicationModel.js +53 -37
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -2
- package/sdk/application/Share/ShareApplicationValidator.js +2 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +14 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +528 -287
- package/sdk/application/Theme/ThemeApplicationModel.js +208 -172
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +17 -12
- package/sdk/application/Theme/ThemeApplicationValidator.js +8 -6
- package/sdk/application/User/UserApplicationClient.d.ts +36 -36
- package/sdk/application/User/UserApplicationClient.js +36 -36
- package/sdk/application/User/UserApplicationModel.d.ts +1062 -255
- package/sdk/application/User/UserApplicationModel.js +298 -244
- package/sdk/application/User/UserApplicationValidator.d.ts +80 -80
- package/sdk/application/User/UserApplicationValidator.js +40 -40
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +20 -5
- package/sdk/application/Webhook/WebhookApplicationModel.js +5 -5
- package/sdk/common/Clickstream.js +95 -15
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/common/Utility.js +19 -0
- package/sdk/common/utils.js +8 -1
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +28 -7
- package/sdk/partner/Lead/LeadPartnerModel.js +7 -7
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +75 -8
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +59 -7
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +2 -2
- package/sdk/partner/PartnerClient.d.ts +8 -0
- package/sdk/partner/PartnerClient.js +14 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
- package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
- package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +21 -10
- package/sdk/platform/Billing/BillingPlatformClient.js +167 -83
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +2849 -565
- package/sdk/platform/Billing/BillingPlatformModel.js +935 -556
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +30 -14
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -16
- package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
- package/sdk/platform/Cart/CartPlatformModel.js +8 -8
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +20 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
- package/sdk/platform/Content/ContentPlatformModel.d.ts +60 -17
- package/sdk/platform/Content/ContentPlatformModel.js +30 -15
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +30 -30
- package/sdk/platform/Finance/FinancePlatformClient.js +30 -30
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1601 -348
- package/sdk/platform/Finance/FinancePlatformModel.js +488 -352
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
- package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
- package/sdk/platform/Order/OrderPlatformClient.js +165 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +631 -39
- package/sdk/platform/Order/OrderPlatformModel.js +367 -41
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
- package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
- package/sdk/platform/PlatformClient.d.ts +8 -0
- package/sdk/platform/PlatformClient.js +14 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
- package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +139 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +98 -21
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
- package/sdk/platform/Share/SharePlatformModel.js +7 -7
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
- package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
- package/sdk/platform/User/UserPlatformModel.d.ts +18 -20
- package/sdk/platform/User/UserPlatformModel.js +9 -11
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +54 -33
- package/sdk/platform/Webhook/WebhookPlatformModel.js +33 -33
- package/sdk/public/Billing/BillingPublicClient.d.ts +11 -0
- package/sdk/public/Billing/BillingPublicClient.js +80 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +584 -99
- package/sdk/public/Billing/BillingPublicModel.js +252 -87
- package/sdk/public/Billing/BillingPublicValidator.d.ts +10 -1
- package/sdk/public/Billing/BillingPublicValidator.js +12 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
- package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
- package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
- package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
|
@@ -2,64 +2,64 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef BuyRules
|
|
5
|
-
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
6
|
-
* @property {Object} [cart_conditions] - Cart conditions details for promotion
|
|
5
|
+
* @property {Object} [item_criteria] - Item criteria of promotion.
|
|
6
|
+
* @property {Object} [cart_conditions] - Cart conditions details for promotion.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @typedef DiscountRulesApp
|
|
11
|
-
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
|
|
12
|
-
* @property {Object} [raw_offer] - Raw offer details for promotion
|
|
13
|
-
* @property {Object} [offer] - Offer for promotion
|
|
14
|
-
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
11
|
+
* @property {string[]} [matched_buy_rules] - Matched buy rules for promotion.
|
|
12
|
+
* @property {Object} [raw_offer] - Raw offer details for promotion.
|
|
13
|
+
* @property {Object} [offer] - Offer for promotion.
|
|
14
|
+
* @property {Object} [item_criteria] - Item criteria of promotion.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @typedef Ownership
|
|
19
|
-
* @property {string} [payable_category] -
|
|
20
|
-
* @property {string} [payable_by] -
|
|
19
|
+
* @property {string} [payable_category] - Promotion amount payable category.
|
|
20
|
+
* @property {string} [payable_by] - Promotion amount bearable party.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @typedef AppliedFreeArticles
|
|
25
|
-
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
|
|
26
|
-
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
27
|
-
* @property {number} [quantity] -
|
|
28
|
-
* @property {string} [article_id] -
|
|
25
|
+
* @property {FreeGiftItems} [free_gift_item_details] - Free gift items details.
|
|
26
|
+
* @property {string} [parent_item_identifier] - Parent item identifier for free article.
|
|
27
|
+
* @property {number} [quantity] - Quantity of free articles.
|
|
28
|
+
* @property {string} [article_id] - IDs of free articles.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* @typedef AppliedPromotion
|
|
33
|
-
* @property {string} [promo_id] - Promotion id
|
|
34
|
-
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
35
|
-
* @property {string} [offer_text] - Offer text of current promotion
|
|
36
|
-
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
33
|
+
* @property {string} [promo_id] - Promotion id.
|
|
34
|
+
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions.
|
|
35
|
+
* @property {string} [offer_text] - Offer text of current promotion.
|
|
36
|
+
* @property {string} [promotion_group] - Promotion group for the promotion.
|
|
37
37
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
38
|
-
* product MRP or ESP
|
|
39
|
-
* @property {string} [promotion_name] - Promotion name of current promotion
|
|
40
|
-
* @property {number} [amount] - Per unit discount amount applied with current promotion
|
|
41
|
-
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
42
|
-
* @property {Ownership} [ownership] - Ownership of promotion
|
|
38
|
+
* product MRP or ESP.
|
|
39
|
+
* @property {string} [promotion_name] - Promotion name of current promotion.
|
|
40
|
+
* @property {number} [amount] - Per unit discount amount applied with current promotion.
|
|
41
|
+
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions.
|
|
42
|
+
* @property {Ownership} [ownership] - Ownership of promotion.
|
|
43
43
|
* @property {number} [article_quantity] - Quantity of article on which
|
|
44
|
-
* promotion is applicable
|
|
44
|
+
* promotion is applicable.
|
|
45
45
|
* @property {AppliedFreeArticles[]} [applied_free_articles] - Applied free
|
|
46
|
-
* article for free gift item promotions
|
|
47
|
-
* @property {string} [promotion_type] - Promotion type of current promotion
|
|
48
|
-
* @property {Object} [meta] - Meta object for extra data
|
|
49
|
-
* @property {string} [code] - Promotion code
|
|
46
|
+
* article for free gift item promotions.
|
|
47
|
+
* @property {string} [promotion_type] - Promotion type of current promotion.
|
|
48
|
+
* @property {Object} [meta] - Meta object for extra data.
|
|
49
|
+
* @property {string} [code] - Promotion code.
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* @typedef PaymentSelectionLock
|
|
54
|
-
* @property {boolean} [enabled]
|
|
55
|
-
* @property {string} [default_options]
|
|
56
|
-
* @property {string} [payment_identifier]
|
|
54
|
+
* @property {boolean} [enabled] - Denotes if default payment selection is enable.
|
|
55
|
+
* @property {string} [default_options] - Default Selection Payment Mode.
|
|
56
|
+
* @property {string} [payment_identifier] - Identifier for Payment Mode.
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* @typedef PromiseFormatted
|
|
61
|
-
* @property {string} [max]
|
|
62
|
-
* @property {string} [min]
|
|
61
|
+
* @property {string} [max] - Maximum Delivery promise formatted timestamp.
|
|
62
|
+
* @property {string} [min] - Minimum Delivery promise formatted timestamp.
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
65
|
/**
|
|
@@ -70,8 +70,8 @@ const Joi = require("joi");
|
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @typedef PromiseTimestamp
|
|
73
|
-
* @property {number} [max]
|
|
74
|
-
* @property {number} [min]
|
|
73
|
+
* @property {number} [max] - Maximum Promise for the shipment.
|
|
74
|
+
* @property {number} [min] - Minimum delivery promise time for the shipment.
|
|
75
75
|
*/
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -83,10 +83,11 @@ const Joi = require("joi");
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* @typedef BasePrice
|
|
86
|
-
* @property {number} [effective]
|
|
87
|
-
*
|
|
88
|
-
* @property {
|
|
89
|
-
* @property {
|
|
86
|
+
* @property {number} [effective] - Current per unit price of product after
|
|
87
|
+
* existing deductions.
|
|
88
|
+
* @property {string} [currency_symbol] - Currency symbol of the currncy used for price.
|
|
89
|
+
* @property {number} [marked] - Original price of product.
|
|
90
|
+
* @property {string} [currency_code] - Currency code for all amounts.
|
|
90
91
|
*/
|
|
91
92
|
|
|
92
93
|
/**
|
|
@@ -97,76 +98,90 @@ const Joi = require("joi");
|
|
|
97
98
|
|
|
98
99
|
/**
|
|
99
100
|
* @typedef BaseInfo
|
|
100
|
-
* @property {number} [uid]
|
|
101
|
-
* @property {string} [name]
|
|
101
|
+
* @property {number} [uid] - Unique identifier of entities like brand or seller.
|
|
102
|
+
* @property {string} [name] - Name of entities like brand or seller.
|
|
102
103
|
*/
|
|
103
104
|
|
|
104
105
|
/**
|
|
105
106
|
* @typedef StoreInfo
|
|
106
|
-
* @property {string} [store_code]
|
|
107
|
-
*
|
|
108
|
-
* @property {
|
|
107
|
+
* @property {string} [store_code] - A unique code or identifier for the store,
|
|
108
|
+
* often used for internal reference.
|
|
109
|
+
* @property {number} [uid] - Unique identifiers of the store from where product
|
|
110
|
+
* is fulfileld.
|
|
111
|
+
* @property {string} [name] - Store name of the store from where the product is
|
|
112
|
+
* fulfiled .
|
|
109
113
|
*/
|
|
110
114
|
|
|
111
115
|
/**
|
|
112
116
|
* @typedef ProductArticle
|
|
113
117
|
* @property {ArticlePriceInfo} [price]
|
|
114
|
-
* @property {string[]} [product_group_tags]
|
|
115
|
-
*
|
|
116
|
-
* @property {
|
|
117
|
-
* @property {
|
|
118
|
-
* @property {Object} [
|
|
119
|
-
* @property {
|
|
120
|
-
* @property {
|
|
118
|
+
* @property {string[]} [product_group_tags] - List fot the unique identifier
|
|
119
|
+
* for the product grouping.
|
|
120
|
+
* @property {Object} [extra_meta] - Field to update extra meta of the article in cart.
|
|
121
|
+
* @property {number} [quantity] - Quantity of the article added in cart.
|
|
122
|
+
* @property {Object} [_custom_json] - Field to update custom json of the article in cart.
|
|
123
|
+
* @property {Object} [meta] - Article meta data.
|
|
124
|
+
* @property {string} [size] - Size of the article added in cart.
|
|
125
|
+
* @property {number} [mto_quantity] - Quantity of the product which will
|
|
126
|
+
* specially manufactured as not available in stock.
|
|
121
127
|
* @property {BaseInfo} [seller]
|
|
122
|
-
* @property {string} [seller_identifier]
|
|
123
|
-
*
|
|
124
|
-
* @property {Object} [
|
|
128
|
+
* @property {string} [seller_identifier] - List of identifiers used by sellers
|
|
129
|
+
* for the product size.
|
|
130
|
+
* @property {Object} [parent_item_identifiers] - Fields to determine parent
|
|
131
|
+
* product of the product.
|
|
132
|
+
* @property {Object} [identifier] - Unique identifier of the article.
|
|
125
133
|
* @property {StoreInfo} [store]
|
|
126
|
-
* @property {Object} [cart_item_meta]
|
|
127
|
-
* @property {string} [uid]
|
|
128
|
-
*
|
|
129
|
-
* @property {
|
|
130
|
-
*
|
|
131
|
-
*
|
|
134
|
+
* @property {Object} [cart_item_meta] - Meta details of the article added from cart.
|
|
135
|
+
* @property {string} [uid] - This unique identifier is assigned to the specific
|
|
136
|
+
* article. This represents item x size x location.
|
|
137
|
+
* @property {Object} [gift_card] - Gift card detail if gift card applied to the
|
|
138
|
+
* product which indicates gift price, gift applicable flag and display
|
|
139
|
+
* message for the gift.
|
|
140
|
+
* @property {boolean} [is_gift_visible] - Whether the product can be purchased
|
|
141
|
+
* as a gift. It is true if the product is available for gifting and false otherwise.
|
|
142
|
+
* @property {string} [type] - Type of the data sent in response. Possible value
|
|
143
|
+
* is article.
|
|
144
|
+
* @property {string[]} [tags] - A list of article tags.
|
|
132
145
|
*/
|
|
133
146
|
|
|
134
147
|
/**
|
|
135
148
|
* @typedef CartProductIdentifer
|
|
136
|
-
* @property {string} [identifier] - Article idenfier generated by cart
|
|
149
|
+
* @property {string} [identifier] - Article idenfier generated by cart.
|
|
137
150
|
*/
|
|
138
151
|
|
|
139
152
|
/**
|
|
140
153
|
* @typedef PromoMeta
|
|
141
|
-
* @property {string} [message]
|
|
154
|
+
* @property {string} [message] - Loyalty points message denotes how much
|
|
155
|
+
* loyalty points and applied and how much left with the user.
|
|
142
156
|
*/
|
|
143
157
|
|
|
144
158
|
/**
|
|
145
159
|
* @typedef ChargesAmount
|
|
146
|
-
* @property {number} [value] - This is the value of amount added
|
|
147
|
-
* @property {string} [currency] - This is destination currency of value
|
|
160
|
+
* @property {number} [value] - This is the value of amount added.
|
|
161
|
+
* @property {string} [currency] - This is destination currency of value.
|
|
148
162
|
*/
|
|
149
163
|
|
|
150
164
|
/**
|
|
151
165
|
* @typedef Charges
|
|
152
|
-
* @property {Object} [meta] -
|
|
153
|
-
* charges price adjustment
|
|
166
|
+
* @property {Object} [meta] - Meta data realted to charges price adjustment.
|
|
154
167
|
* @property {ChargesAmount} [amount]
|
|
155
|
-
* @property {string} [name] -
|
|
156
|
-
* @property {boolean} [allow_refund] -
|
|
157
|
-
*
|
|
158
|
-
* @property {string} [
|
|
159
|
-
* @property {string} [type] - This is the type of the charge applied
|
|
168
|
+
* @property {string} [name] - Name of the charge applied.
|
|
169
|
+
* @property {boolean} [allow_refund] - Whether refund is allowed or not for the charge.
|
|
170
|
+
* @property {string} [code] - Code of the charge applied.
|
|
171
|
+
* @property {string} [type] - Type of the charge applied.
|
|
160
172
|
*/
|
|
161
173
|
|
|
162
174
|
/**
|
|
163
175
|
* @typedef ProductPrice
|
|
164
|
-
* @property {string} [currency_symbol]
|
|
165
|
-
*
|
|
166
|
-
* @property {
|
|
167
|
-
* @property {
|
|
168
|
-
*
|
|
169
|
-
* @property {number} [
|
|
176
|
+
* @property {string} [currency_symbol] - Currency symbol of the price defined
|
|
177
|
+
* for the product.
|
|
178
|
+
* @property {number} [selling] - Selling price of the product .
|
|
179
|
+
* @property {string} [currency_code] - Currency code of the price defined for
|
|
180
|
+
* the product.
|
|
181
|
+
* @property {number} [add_on] - Price before promotion and coupon amount
|
|
182
|
+
* applied for calculation.
|
|
183
|
+
* @property {number} [effective] - Selling price of the product .
|
|
184
|
+
* @property {number} [marked] - Maximum price of the product .
|
|
170
185
|
*/
|
|
171
186
|
|
|
172
187
|
/**
|
|
@@ -177,12 +192,15 @@ const Joi = require("joi");
|
|
|
177
192
|
|
|
178
193
|
/**
|
|
179
194
|
* @typedef ProductPricePerUnit
|
|
180
|
-
* @property {string} [currency_symbol]
|
|
181
|
-
*
|
|
182
|
-
* @property {
|
|
183
|
-
* @property {
|
|
184
|
-
*
|
|
185
|
-
* @property {number} [
|
|
195
|
+
* @property {string} [currency_symbol] - Currency symbol of the price defined
|
|
196
|
+
* for the product.
|
|
197
|
+
* @property {number} [selling_price] - Selling price of the product .
|
|
198
|
+
* @property {string} [currency_code] - Currency code of the price defined for
|
|
199
|
+
* the product.
|
|
200
|
+
* @property {number} [add_on] - Price before promotion and coupon amount
|
|
201
|
+
* applied for calculation.
|
|
202
|
+
* @property {number} [effective] - Selling price of the product .
|
|
203
|
+
* @property {number} [marked] - Maximum price of the product .
|
|
186
204
|
*/
|
|
187
205
|
|
|
188
206
|
/**
|
|
@@ -193,160 +211,193 @@ const Joi = require("joi");
|
|
|
193
211
|
|
|
194
212
|
/**
|
|
195
213
|
* @typedef ProductAvailabilitySize
|
|
196
|
-
* @property {string} [display]
|
|
197
|
-
* @property {string} [value]
|
|
198
|
-
* @property {boolean} [is_available]
|
|
214
|
+
* @property {string} [display] - Display size of the product.
|
|
215
|
+
* @property {string} [value] - Actual value of the size.
|
|
216
|
+
* @property {boolean} [is_available] - Available flag for the size of the
|
|
217
|
+
* product if that is available.
|
|
199
218
|
*/
|
|
200
219
|
|
|
201
220
|
/**
|
|
202
221
|
* @typedef ProductAvailability
|
|
203
|
-
* @property {boolean} [out_of_stock]
|
|
204
|
-
* @property {boolean} [deliverable]
|
|
205
|
-
*
|
|
206
|
-
* @property {
|
|
207
|
-
* @property {
|
|
208
|
-
*
|
|
222
|
+
* @property {boolean} [out_of_stock] - Denotes if the product is available in stock.
|
|
223
|
+
* @property {boolean} [deliverable] - Deliverable flag denotes if the product
|
|
224
|
+
* is deliverable or not.
|
|
225
|
+
* @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability.
|
|
226
|
+
* @property {boolean} [is_valid] - Valid flag for the product if the product
|
|
227
|
+
* added in cart is valid to place the order.
|
|
228
|
+
* @property {number} [other_store_quantity] - Quantity of the product available
|
|
229
|
+
* on other store.
|
|
230
|
+
* @property {string[]} [sizes] - All sizes of the product.
|
|
209
231
|
*/
|
|
210
232
|
|
|
211
233
|
/**
|
|
212
234
|
* @typedef ActionQuery
|
|
213
|
-
* @property {string[]} [product_slug] - Contains list of product slug
|
|
235
|
+
* @property {string[]} [product_slug] - Contains list of product slug.
|
|
214
236
|
*/
|
|
215
237
|
|
|
216
238
|
/**
|
|
217
239
|
* @typedef ProductAction
|
|
218
240
|
* @property {ActionQuery} [query]
|
|
219
|
-
* @property {string} [url]
|
|
220
|
-
* @property {string} [type]
|
|
241
|
+
* @property {string} [url] - Url of the product to render the product .
|
|
242
|
+
* @property {string} [type] - Type of action.
|
|
221
243
|
*/
|
|
222
244
|
|
|
223
245
|
/**
|
|
224
246
|
* @typedef Tags
|
|
225
|
-
* @property {Object} [tags]
|
|
247
|
+
* @property {Object} [tags] - Tags is a lable or batch that is attached to a
|
|
248
|
+
* product in cart.
|
|
226
249
|
*/
|
|
227
250
|
|
|
228
251
|
/**
|
|
229
252
|
* @typedef ProductImage
|
|
230
|
-
* @property {string} [secure_url]
|
|
231
|
-
* @property {string} [aspect_ratio]
|
|
232
|
-
* @property {string} [url]
|
|
253
|
+
* @property {string} [secure_url] - Secured url of the product image.
|
|
254
|
+
* @property {string} [aspect_ratio] - Aspect ratio of the product image.
|
|
255
|
+
* @property {string} [url] - Bucket link url for product image.
|
|
233
256
|
*/
|
|
234
257
|
|
|
235
258
|
/**
|
|
236
259
|
* @typedef CategoryInfo
|
|
237
|
-
* @property {number} [uid] - Product Category Id
|
|
238
|
-
* @property {string} [name]
|
|
260
|
+
* @property {number} [uid] - Product Category Id.
|
|
261
|
+
* @property {string} [name] - Category name of the product .
|
|
239
262
|
*/
|
|
240
263
|
|
|
241
264
|
/**
|
|
242
265
|
* @typedef CartProduct
|
|
243
|
-
* @property {Object} [_custom_json]
|
|
266
|
+
* @property {Object} [_custom_json] - Field to add custom json of the product in cart.
|
|
244
267
|
* @property {BaseInfo} [brand]
|
|
245
268
|
* @property {ProductAction} [action]
|
|
246
269
|
* @property {Tags} [teaser_tag]
|
|
247
270
|
* @property {string} [slug] - Unique product url name generated via product
|
|
248
|
-
* name and other meta data
|
|
249
|
-
* @property {ProductImage[]} [images]
|
|
250
|
-
*
|
|
251
|
-
* @property {
|
|
252
|
-
* @property {string} [
|
|
253
|
-
*
|
|
254
|
-
* @property {string
|
|
255
|
-
*
|
|
256
|
-
* @property {
|
|
271
|
+
* name and other meta data.
|
|
272
|
+
* @property {ProductImage[]} [images] - Product Images urls of different types
|
|
273
|
+
* like secure url, aspect ration url and url.
|
|
274
|
+
* @property {number} [uid] - Unique identifier of the product in cart.
|
|
275
|
+
* @property {string} [name] - Product name of the product in cart which is
|
|
276
|
+
* defined on platform.
|
|
277
|
+
* @property {string} [item_code] - Product code of the product while defining
|
|
278
|
+
* product on platform.
|
|
279
|
+
* @property {CategoryInfo[]} [categories] - Product category information which
|
|
280
|
+
* incldes category name and category id.
|
|
281
|
+
* @property {string[]} [tags] - Products tags that are added to each product to
|
|
282
|
+
* identify the set of products.
|
|
283
|
+
* @property {string} [type] - Type of product in cart.
|
|
284
|
+
* @property {Object} [attributes] - Product attributes defined on platform.
|
|
257
285
|
*/
|
|
258
286
|
|
|
259
287
|
/**
|
|
260
288
|
* @typedef CouponDetails
|
|
261
|
-
* @property {number} [discount_single_quantity]
|
|
262
|
-
*
|
|
263
|
-
* @property {
|
|
289
|
+
* @property {number} [discount_single_quantity] - Discout amount applied from
|
|
290
|
+
* coupon for single quantity of the product.
|
|
291
|
+
* @property {string} [code] - Coupon code of the coupon applied.
|
|
292
|
+
* @property {number} [discount_total_quantity] - Total discount earned from
|
|
293
|
+
* coupon applied to cart.
|
|
264
294
|
*/
|
|
265
295
|
|
|
266
296
|
/**
|
|
267
297
|
* @typedef CartProductInfo
|
|
268
298
|
* @property {ProductArticle} [article]
|
|
269
|
-
* @property {Object} [moq]
|
|
299
|
+
* @property {Object} [moq] - An Integer indication the Minimum Order Quantity
|
|
300
|
+
* of a product, e.g. 100.
|
|
270
301
|
* @property {CartProductIdentifer} identifiers
|
|
271
302
|
* @property {PromoMeta} [promo_meta]
|
|
272
303
|
* @property {ProductPriceInfo} [price]
|
|
273
|
-
* @property {number} [quantity]
|
|
274
|
-
* @property {Charges[]} [charges]
|
|
275
|
-
*
|
|
304
|
+
* @property {number} [quantity] - Quantity of the product added in cart.
|
|
305
|
+
* @property {Charges[]} [charges] - Charges information which denotes types of
|
|
306
|
+
* charges and amount of charge applied to that product in cart.
|
|
307
|
+
* @property {string} [discount] - Discount amount of the product in cart.
|
|
276
308
|
* @property {ProductAvailability} [availability]
|
|
277
309
|
* @property {ShipmentPromise} [delivery_promise]
|
|
278
310
|
* @property {CartProduct} [product]
|
|
279
|
-
* @property {string} [product_ean_id]
|
|
280
|
-
*
|
|
281
|
-
* @property {Object} [
|
|
311
|
+
* @property {string} [product_ean_id] - European Article Number of the product
|
|
312
|
+
* (limited upto 50 EAN identifier in a single request).
|
|
313
|
+
* @property {Object} [bulk_offer] - Bulk offer information for the product
|
|
314
|
+
* which denotes if any bulk offer is applied to the product in cart.
|
|
315
|
+
* @property {Object} [parent_item_identifiers] - Parent item information of the
|
|
316
|
+
* product which identifies the parent of the product in cart.
|
|
282
317
|
* @property {CouponDetails} [coupon]
|
|
283
|
-
* @property {Object} [custom_order]
|
|
284
|
-
* @property {string} [coupon_message]
|
|
285
|
-
*
|
|
286
|
-
* @property {string} [
|
|
287
|
-
* @property {
|
|
318
|
+
* @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
|
|
319
|
+
* @property {string} [coupon_message] - Message for the coupon denotes which
|
|
320
|
+
* coupon is applied and empty if not applied.
|
|
321
|
+
* @property {string} [key] - The attribute key associated with the size.
|
|
322
|
+
* @property {string} [message] - Product level message which denotes error
|
|
323
|
+
* information to display over the product in cart.
|
|
324
|
+
* @property {boolean} [is_set] - Whether or not the product is a set of items.
|
|
288
325
|
* @property {ProductPricePerUnitInfo} [price_per_unit]
|
|
289
|
-
* @property {AppliedPromotion[]} [promotions_applied]
|
|
326
|
+
* @property {AppliedPromotion[]} [promotions_applied] - List of applicable
|
|
327
|
+
* promotion for the product in cart.
|
|
290
328
|
*/
|
|
291
329
|
|
|
292
330
|
/**
|
|
293
331
|
* @typedef DisplayBreakup
|
|
294
|
-
* @property {string} [currency_symbol]
|
|
295
|
-
* @property {string} [key]
|
|
296
|
-
* @property {string} [display]
|
|
297
|
-
* @property {string[]} [message]
|
|
298
|
-
* @property {string} [currency_code]
|
|
299
|
-
* @property {number} [value]
|
|
300
|
-
* @property {number} [preset]
|
|
332
|
+
* @property {string} [currency_symbol] - Currency symbol for the price.
|
|
333
|
+
* @property {string} [key] - Key of the price like total_mrp, total, subtotal etc.
|
|
334
|
+
* @property {string} [display] - Display key field that to be shown against the value.
|
|
335
|
+
* @property {string[]} [message] - List of message at price level to be displayed.
|
|
336
|
+
* @property {string} [currency_code] - Currency code for the price .
|
|
337
|
+
* @property {number} [value] - Numeric value of the price.
|
|
338
|
+
* @property {number} [preset] - Value for the price which is set from platform
|
|
339
|
+
* if applicable.
|
|
301
340
|
*/
|
|
302
341
|
|
|
303
342
|
/**
|
|
304
343
|
* @typedef RawBreakup
|
|
305
|
-
* @property {number} [vog]
|
|
306
|
-
*
|
|
307
|
-
* @property {number} [
|
|
308
|
-
* @property {number} [
|
|
309
|
-
* @property {number} [
|
|
310
|
-
* @property {number} [
|
|
311
|
-
* @property {number} [
|
|
312
|
-
* @property {number} [
|
|
313
|
-
* @property {number} [
|
|
314
|
-
* @property {number} [
|
|
315
|
-
*
|
|
316
|
-
* @property {number} [
|
|
317
|
-
* @property {number} [
|
|
318
|
-
* @property {number} [
|
|
319
|
-
* @property {number} [
|
|
344
|
+
* @property {number} [vog] - Total value of goods after all discount, coupons
|
|
345
|
+
* and promotion applied of all products in cart.
|
|
346
|
+
* @property {number} [subtotal] - Selling price amount of all products in cart.
|
|
347
|
+
* @property {number} [fynd_cash] - Loyalty points applied on cart.
|
|
348
|
+
* @property {number} [discount] - Discount amount recieved on cart.
|
|
349
|
+
* @property {number} [convenience_fee] - Convenience fee amount applied to cart.
|
|
350
|
+
* @property {number} [delivery_charge] - Delivery charge applied to cart.
|
|
351
|
+
* @property {number} [gst_charges] - GST charges applied on cart.
|
|
352
|
+
* @property {number} [mrp_total] - Maximum price total amount of all products in cart.
|
|
353
|
+
* @property {number} [mop_total] - Total of payment modes by which payment is
|
|
354
|
+
* going to be done.
|
|
355
|
+
* @property {number} [total_charge] - Total amount of charges applied on cart.
|
|
356
|
+
* @property {number} [coupon] - Coupon amount applied to cart.
|
|
357
|
+
* @property {number} [total] - Total payable amount by the customer.
|
|
358
|
+
* @property {number} [gift_card] - Gift cart amount applied on cart.
|
|
359
|
+
* @property {number} [you_saved] - Total amount will be saved if customer
|
|
360
|
+
* places the order.
|
|
361
|
+
* @property {number} [cod_charge] - Cod charge value applied to cart. This is
|
|
362
|
+
* applied when user select payment mode as COD.
|
|
320
363
|
*/
|
|
321
364
|
|
|
322
365
|
/**
|
|
323
366
|
* @typedef CouponBreakup
|
|
324
|
-
* @property {number} [coupon_value]
|
|
325
|
-
* @property {string} [title]
|
|
326
|
-
*
|
|
327
|
-
* @property {
|
|
328
|
-
*
|
|
329
|
-
* @property {
|
|
330
|
-
*
|
|
331
|
-
* @property {
|
|
332
|
-
* @property {
|
|
333
|
-
* @property {
|
|
334
|
-
* @property {
|
|
335
|
-
* @property {
|
|
336
|
-
*
|
|
367
|
+
* @property {number} [coupon_value] - Value of the coupon applied to cart.
|
|
368
|
+
* @property {string} [title] - Coupon Title of the coupon applied denotes name
|
|
369
|
+
* of the coupon.
|
|
370
|
+
* @property {string} [sub_title] - Coupon subtitle of the coupon applied to
|
|
371
|
+
* cart which is used to display.
|
|
372
|
+
* @property {number} [minimum_cart_value] - Minumum cart value of cart after
|
|
373
|
+
* which the coupon can be applied.
|
|
374
|
+
* @property {string} [message] - Coupon message of the coupon applied to cart.
|
|
375
|
+
* @property {string} [coupon_type] - Type of the coupon applied to cart.
|
|
376
|
+
* @property {string} [uid] - Unique identifier of the coupon applied to cart.
|
|
377
|
+
* @property {number} [value] - Coupon value of the coupon applied to cart.
|
|
378
|
+
* @property {number} [max_discount_value] - Maximum discount value of the
|
|
379
|
+
* coupon applied to cart.
|
|
380
|
+
* @property {boolean} [is_applied] - Applied flag which denotes if any coupon
|
|
381
|
+
* is applied to cart.
|
|
382
|
+
* @property {string} [description] - Coupon description of the coupon applied to cart.
|
|
383
|
+
* @property {string} [code] - Coupon code of the coupon applied.
|
|
384
|
+
* @property {string} [type] - Type of the coupon applied to cart.
|
|
337
385
|
*/
|
|
338
386
|
|
|
339
387
|
/**
|
|
340
388
|
* @typedef LoyaltyPoints
|
|
341
|
-
* @property {number} [total]
|
|
342
|
-
* @property {string} [description]
|
|
343
|
-
* @property {number} [applicable]
|
|
344
|
-
*
|
|
389
|
+
* @property {number} [total] - Total loyalty points available with user.
|
|
390
|
+
* @property {string} [description] - Description for loyalty points.
|
|
391
|
+
* @property {number} [applicable] - Whether the loyalty points are applicable
|
|
392
|
+
* for the cart .
|
|
393
|
+
* @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart .
|
|
345
394
|
*/
|
|
346
395
|
|
|
347
396
|
/**
|
|
348
397
|
* @typedef CartBreakup
|
|
349
|
-
* @property {DisplayBreakup[]} [display]
|
|
398
|
+
* @property {DisplayBreakup[]} [display] - List of breakup data which is used
|
|
399
|
+
* to display the breakup to the customer like MRP total, Discount, Sub total,
|
|
400
|
+
* coupon value, promotion value and final total.
|
|
350
401
|
* @property {RawBreakup} [raw]
|
|
351
402
|
* @property {CouponBreakup} [coupon]
|
|
352
403
|
* @property {LoyaltyPoints} [loyalty_points]
|
|
@@ -354,40 +405,47 @@ const Joi = require("joi");
|
|
|
354
405
|
|
|
355
406
|
/**
|
|
356
407
|
* @typedef CartCurrency
|
|
357
|
-
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
358
|
-
* @property {string} [symbol]
|
|
408
|
+
* @property {string} [code] - Currency code defined by ISO 4217:2015.
|
|
409
|
+
* @property {string} [symbol] - Currency symbol for currency of user cart prices.
|
|
359
410
|
*/
|
|
360
411
|
|
|
361
412
|
/**
|
|
362
413
|
* @typedef CartDetailCoupon
|
|
363
|
-
* @property {number} [cashback_amount]
|
|
364
|
-
* @property {string} [cashback_message_primary]
|
|
365
|
-
*
|
|
366
|
-
* @property {string} [
|
|
367
|
-
*
|
|
368
|
-
* @property {string} [
|
|
369
|
-
* @property {string} [
|
|
370
|
-
*
|
|
371
|
-
* @property {string} [
|
|
372
|
-
* @property {
|
|
373
|
-
* @property {
|
|
374
|
-
* @property {
|
|
375
|
-
* @property {
|
|
376
|
-
* @property {number} [
|
|
377
|
-
* @property {
|
|
378
|
-
*
|
|
414
|
+
* @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart.
|
|
415
|
+
* @property {string} [cashback_message_primary] - Primary cashback message for
|
|
416
|
+
* coupon applied to cart.
|
|
417
|
+
* @property {string} [cashback_message_secondary] - Secondary cashback message
|
|
418
|
+
* for coupon applied to cart.
|
|
419
|
+
* @property {string} [coupon_code] - Coupon code to be applied to cart.
|
|
420
|
+
* @property {string} [coupon_description] - Coupon description of the coupon
|
|
421
|
+
* applied to cart.
|
|
422
|
+
* @property {string} [coupon_id] - Unique identifier of the coupon applied to cart.
|
|
423
|
+
* @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart.
|
|
424
|
+
* @property {string} [coupon_title] - Coupon Title of the coupon applied.
|
|
425
|
+
* @property {string} [coupon_type] - Type of the coupon applied to cart.
|
|
426
|
+
* @property {number} [coupon_value] - Value of the coupon applied to cart.
|
|
427
|
+
* @property {number} [discount] - Total discount earned from coupon applied to cart.
|
|
428
|
+
* @property {boolean} [is_applied] - Flag to determine where the coupon is
|
|
429
|
+
* applied to cart or not.
|
|
430
|
+
* @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid.
|
|
431
|
+
* @property {number} [maximum_discount_value] - Maximum discount value of the
|
|
432
|
+
* coupon applied to cart.
|
|
433
|
+
* @property {string} [message] - Coupon message of the coupon applied to cart.
|
|
434
|
+
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
435
|
+
* applied to cart.
|
|
379
436
|
*/
|
|
380
437
|
|
|
381
438
|
/**
|
|
382
439
|
* @typedef ChargesThreshold
|
|
383
|
-
* @property {number} [charges]
|
|
384
|
-
* @property {number} [threshold]
|
|
440
|
+
* @property {number} [charges] - Charges amount to be applied on cart.
|
|
441
|
+
* @property {number} [threshold] - Threshold of cart value on which the charge
|
|
442
|
+
* should be applied .
|
|
385
443
|
*/
|
|
386
444
|
|
|
387
445
|
/**
|
|
388
446
|
* @typedef DeliveryChargesConfig
|
|
389
|
-
* @property {boolean} [enabled]
|
|
390
|
-
* @property {ChargesThreshold[]} [charges]
|
|
447
|
+
* @property {boolean} [enabled] - Delivery charge enabled for the cart or not.
|
|
448
|
+
* @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold.
|
|
391
449
|
*/
|
|
392
450
|
|
|
393
451
|
/**
|
|
@@ -397,63 +455,87 @@ const Joi = require("joi");
|
|
|
397
455
|
|
|
398
456
|
/**
|
|
399
457
|
* @typedef CartDetailResponse
|
|
400
|
-
* @property {number} [cart_id]
|
|
401
|
-
* @property {string} [uid]
|
|
402
|
-
* @property {AppliedPromotion[]} [applied_promo_details]
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
* @property {
|
|
406
|
-
* @property {string} [
|
|
458
|
+
* @property {number} [cart_id] - Unique identifier of the user cart.
|
|
459
|
+
* @property {string} [uid] - Unique identifier of the user cart.
|
|
460
|
+
* @property {AppliedPromotion[]} [applied_promo_details] - List of applied
|
|
461
|
+
* promotions data to cart which includes promotion id, promotion name, offer
|
|
462
|
+
* text, description, buy rules, discount rules and promotion type.
|
|
463
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart.
|
|
464
|
+
* @property {string} [pan_no] - Permanent Account Number of the user.
|
|
465
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
466
|
+
* response is valid or not.
|
|
467
|
+
* @property {string} [id] - Unique identifier of the user cart.
|
|
407
468
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
408
469
|
* @property {ShipmentPromise} [delivery_promise]
|
|
409
|
-
* @property {string} [comment]
|
|
410
|
-
* @property {CartProductInfo[]} [items]
|
|
411
|
-
*
|
|
470
|
+
* @property {string} [comment] - Comment message to be added in user cart.
|
|
471
|
+
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
472
|
+
* includes item id, item size, store id, available sizes and rest of the item
|
|
473
|
+
* related data.
|
|
474
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
475
|
+
* message on shipment .
|
|
412
476
|
* @property {CartCommonConfig} [common_config]
|
|
413
477
|
* @property {CartDetailCoupon} [coupon]
|
|
414
|
-
* @property {string} [message]
|
|
415
|
-
* @property {Object} [notification]
|
|
416
|
-
*
|
|
417
|
-
* @property {
|
|
418
|
-
*
|
|
419
|
-
* @property {boolean} [
|
|
420
|
-
* @property {string} [
|
|
478
|
+
* @property {string} [message] - Message of the get cart detail API response.
|
|
479
|
+
* @property {Object} [notification] - Notification object which denotes
|
|
480
|
+
* notification data for user cart.
|
|
481
|
+
* @property {string} [staff_user_id] - Staff employee user id if cart is
|
|
482
|
+
* created by staff employee for the customer.
|
|
483
|
+
* @property {boolean} [success] - Success flag of get cart detail API response.
|
|
484
|
+
* @property {string} [gstin] - GSTIN added in user cart.
|
|
485
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
486
|
+
* the checkout process.
|
|
487
|
+
* @property {string} [last_modified] - Last modified timestamp of cart.
|
|
421
488
|
* @property {CartBreakup} [breakup_values]
|
|
422
489
|
* @property {CartCurrency} [currency]
|
|
423
|
-
* @property {string} [coupon_text]
|
|
424
|
-
* @property {boolean} [buy_now]
|
|
425
|
-
*
|
|
426
|
-
* @property {Object} [
|
|
490
|
+
* @property {string} [coupon_text] - Coupon text of coupon applied on cart.
|
|
491
|
+
* @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
|
|
492
|
+
* is doing fast checkout for the cart using buy now.
|
|
493
|
+
* @property {Object} [pan_config] - Pan card config states at what condition
|
|
494
|
+
* user should enter the pan card.
|
|
495
|
+
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
496
|
+
* checkout API payload .
|
|
427
497
|
*/
|
|
428
498
|
|
|
429
499
|
/**
|
|
430
500
|
* @typedef AddProductCart
|
|
431
|
-
* @property {Object} [article_assignment]
|
|
432
|
-
*
|
|
433
|
-
* @property {
|
|
434
|
-
*
|
|
435
|
-
* @property {Object} [
|
|
436
|
-
*
|
|
437
|
-
* @property {number} [
|
|
438
|
-
*
|
|
439
|
-
* @property {
|
|
440
|
-
*
|
|
441
|
-
* @property {
|
|
442
|
-
* @property {
|
|
443
|
-
*
|
|
444
|
-
* @property {
|
|
445
|
-
* @property {string} [
|
|
501
|
+
* @property {Object} [article_assignment] - Field to determine how article
|
|
502
|
+
* assignment should happen by article assignment level and strategy.
|
|
503
|
+
* @property {string[]} [product_group_tags] - Field to specify the product
|
|
504
|
+
* groups of the product that the user is trying to add in cart.
|
|
505
|
+
* @property {Object} [extra_meta] - Extra meta data to be added at article
|
|
506
|
+
* level while add items to cart.
|
|
507
|
+
* @property {number} [quantity] - Field to specify the product quantity that
|
|
508
|
+
* user wants to buy.
|
|
509
|
+
* @property {Object} [_custom_json] - Field to add custom json at article level
|
|
510
|
+
* while add items to cart .
|
|
511
|
+
* @property {string} [item_size] - Field to determine size of the product.
|
|
512
|
+
* @property {number} [store_id] - Unique identifier of the store selected by
|
|
513
|
+
* the user from which user want to buy a product.
|
|
514
|
+
* @property {string} [display] - Display field at article level .
|
|
515
|
+
* @property {string} [article_id] - Unique identifier of an article .
|
|
516
|
+
* @property {Object[]} [parent_item_identifiers] - Fields to determine parent
|
|
517
|
+
* product of the product.
|
|
518
|
+
* @property {number} [seller_id] - Unique idetifier of the seller selected by
|
|
519
|
+
* the user from which user want to buy a product .
|
|
520
|
+
* @property {boolean} [pos] - Filed to determine whether user is making request
|
|
521
|
+
* from pos or not.
|
|
522
|
+
* @property {number} [item_id] - Unique identifier to identify product.
|
|
523
|
+
* @property {Object} [meta] - Field to add meta data at article level.
|
|
524
|
+
* @property {string} [seller_identifier] - Add items using seller identifier
|
|
525
|
+
* for store os.
|
|
446
526
|
*/
|
|
447
527
|
|
|
448
528
|
/**
|
|
449
529
|
* @typedef AddCartRequest
|
|
450
|
-
* @property {AddProductCart[]} [items]
|
|
451
|
-
*
|
|
530
|
+
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
531
|
+
* added to cart like item id, item size, and item quantity.
|
|
532
|
+
* @property {boolean} [new_cart] - Field to create to new cart whille user adds
|
|
533
|
+
* item to cart.
|
|
452
534
|
*/
|
|
453
535
|
|
|
454
536
|
/**
|
|
455
537
|
* @typedef AddCartDetailResponse
|
|
456
|
-
* @property {string} [message]
|
|
538
|
+
* @property {string} [message] - Message of add to cart API response.
|
|
457
539
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
458
540
|
* added. True if only few are added.
|
|
459
541
|
* @property {CartDetailResponse} [cart]
|
|
@@ -463,27 +545,31 @@ const Joi = require("joi");
|
|
|
463
545
|
|
|
464
546
|
/**
|
|
465
547
|
* @typedef UpdateProductCart
|
|
466
|
-
* @property {Object} [extra_meta]
|
|
467
|
-
* @property {Object} [_custom_json]
|
|
468
|
-
* @property {number} [quantity]
|
|
469
|
-
* @property {string} [item_size]
|
|
470
|
-
* @property {number} [item_index]
|
|
548
|
+
* @property {Object} [extra_meta] - Field to update extra meta of the product in cart.
|
|
549
|
+
* @property {Object} [_custom_json] - Field to update custom json of the product in cart.
|
|
550
|
+
* @property {number} [quantity] - Field to update the quantity of the item in cart.
|
|
551
|
+
* @property {string} [item_size] - Field to update the size of the product in cart.
|
|
552
|
+
* @property {number} [item_index] - Item index determines on which index the
|
|
553
|
+
* product falls to be updated.
|
|
471
554
|
* @property {CartProductIdentifer} identifiers
|
|
472
|
-
* @property {string} [article_id]
|
|
473
|
-
* @property {Object} [parent_item_identifiers]
|
|
474
|
-
*
|
|
475
|
-
* @property {
|
|
555
|
+
* @property {string} [article_id] - Article id of the product in cart.
|
|
556
|
+
* @property {Object} [parent_item_identifiers] - Field to update parent product
|
|
557
|
+
* of the item in cart.
|
|
558
|
+
* @property {number} [item_id] - Item id of the product that needs to be updated.
|
|
559
|
+
* @property {Object} [meta] - Field to update meta of the item in cart.
|
|
476
560
|
*/
|
|
477
561
|
|
|
478
562
|
/**
|
|
479
563
|
* @typedef UpdateCartRequest
|
|
480
|
-
* @property {UpdateProductCart[]} [items]
|
|
481
|
-
*
|
|
564
|
+
* @property {UpdateProductCart[]} [items] - List items data that needs to be
|
|
565
|
+
* updated in cart.
|
|
566
|
+
* @property {string} operation - Field to determine if item to be removed from
|
|
567
|
+
* cart or it needs to be updated.
|
|
482
568
|
*/
|
|
483
569
|
|
|
484
570
|
/**
|
|
485
571
|
* @typedef UpdateCartDetailResponse
|
|
486
|
-
* @property {string} [message]
|
|
572
|
+
* @property {string} [message] - Message of update cart API response.
|
|
487
573
|
* @property {CartDetailResponse} [cart]
|
|
488
574
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
489
575
|
* False if partially added or not added.
|
|
@@ -491,340 +577,425 @@ const Joi = require("joi");
|
|
|
491
577
|
|
|
492
578
|
/**
|
|
493
579
|
* @typedef DeleteCartDetailResponse
|
|
494
|
-
* @property {string} [message]
|
|
580
|
+
* @property {string} [message] - Message for delete cart response.
|
|
495
581
|
* @property {boolean} [success] - True if cart is archived successfully. False
|
|
496
582
|
* if not archived.
|
|
497
583
|
*/
|
|
498
584
|
|
|
499
585
|
/**
|
|
500
586
|
* @typedef CartItemCountResponse
|
|
501
|
-
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
587
|
+
* @property {number} [user_cart_items_count] - Item count present in cart.
|
|
502
588
|
*/
|
|
503
589
|
|
|
504
590
|
/**
|
|
505
591
|
* @typedef PageCoupon
|
|
506
|
-
* @property {number} [total_item_count]
|
|
507
|
-
* @property {boolean} [has_next]
|
|
508
|
-
* @property {number} [total]
|
|
509
|
-
* @property {number} [current]
|
|
510
|
-
* @property {boolean} [has_previous]
|
|
592
|
+
* @property {number} [total_item_count] - Total coupons are available for the cart.
|
|
593
|
+
* @property {boolean} [has_next] - Denotes if next page of coupon is available.
|
|
594
|
+
* @property {number} [total] - Total pages of coupon availalbe.
|
|
595
|
+
* @property {number} [current] - Current page number.
|
|
596
|
+
* @property {boolean} [has_previous] - Denotes if previous page of the coupon
|
|
597
|
+
* is available.
|
|
511
598
|
*/
|
|
512
599
|
|
|
513
600
|
/**
|
|
514
601
|
* @typedef Coupon
|
|
515
|
-
* @property {number} [coupon_amount] - The amount based on cart value
|
|
516
|
-
* @property {number} [coupon_value]
|
|
517
|
-
* @property {string} [title]
|
|
518
|
-
*
|
|
519
|
-
* @property {
|
|
520
|
-
*
|
|
521
|
-
* @property {string} [
|
|
522
|
-
*
|
|
523
|
-
* @property {
|
|
524
|
-
* @property {string} [
|
|
525
|
-
* @property {
|
|
526
|
-
* @property {
|
|
527
|
-
*
|
|
528
|
-
* @property {string} [
|
|
529
|
-
* @property {
|
|
530
|
-
*
|
|
531
|
-
* @property {string} [
|
|
532
|
-
* @property {boolean} [
|
|
602
|
+
* @property {number} [coupon_amount] - The amount based on cart value.
|
|
603
|
+
* @property {number} [coupon_value] - Coupon value of the coupon applied to cart.
|
|
604
|
+
* @property {string} [title] - Coupon Title of the coupon applied denotes name
|
|
605
|
+
* of the coupon.
|
|
606
|
+
* @property {number} [minimum_cart_value] - Minimum cart value of the coupon
|
|
607
|
+
* applied to cart.
|
|
608
|
+
* @property {string} [sub_title] - Coupon subtitle of the coupon applied to
|
|
609
|
+
* cart which is used to display.
|
|
610
|
+
* @property {string} [expires_on] - Message to display to user for expiry of the coupon .
|
|
611
|
+
* @property {string} [message] - Coupon message of the coupon applied to cart.
|
|
612
|
+
* @property {string} [coupon_type] - Type of the coupon applied to cart.
|
|
613
|
+
* @property {number} [max_discount_value] - Maximum discount value of the
|
|
614
|
+
* coupon applied to cart.
|
|
615
|
+
* @property {string} [coupon_code] - Coupon code of the coupon applied on cart.
|
|
616
|
+
* @property {boolean} [is_applicable] - Flag to determine where the coupon is
|
|
617
|
+
* applicable to cart or not.
|
|
618
|
+
* @property {string} [description] - Coupon description of the coupon applied to cart.
|
|
619
|
+
* @property {boolean} [is_applied] - Flag to determine where the coupon is
|
|
620
|
+
* applied to cart or not.
|
|
621
|
+
* @property {string} [start_date] - Start date of the coupon when the coupon
|
|
622
|
+
* will be live for the users to apply on cart.
|
|
623
|
+
* @property {string} [end_date] - End date of the coupon on which the coupon expires.
|
|
624
|
+
* @property {string} [coupon_applicable_message] - Message which is used to
|
|
625
|
+
* display to the customer if the coupon is applied successfully.
|
|
626
|
+
* @property {string} [offer_text] - Offer text of the coupon which highligts
|
|
627
|
+
* coupon offer defined while creating coupon .
|
|
628
|
+
* @property {boolean} [is_bank_offer] - Bank offer flag for the coupon if the
|
|
629
|
+
* coupon is applicable for only if payment done by bank or mode specified in coupon.
|
|
533
630
|
*/
|
|
534
631
|
|
|
535
632
|
/**
|
|
536
633
|
* @typedef GetCouponResponse
|
|
537
634
|
* @property {PageCoupon} [page]
|
|
538
|
-
* @property {Coupon[]} [available_coupon_list]
|
|
635
|
+
* @property {Coupon[]} [available_coupon_list] - List of available coupon which
|
|
636
|
+
* can be applied on cart.
|
|
539
637
|
*/
|
|
540
638
|
|
|
541
639
|
/**
|
|
542
640
|
* @typedef ApplyCouponRequest
|
|
543
|
-
* @property {string} coupon_code - Coupon code to be applied
|
|
641
|
+
* @property {string} coupon_code - Coupon code to be applied.
|
|
544
642
|
*/
|
|
545
643
|
|
|
546
644
|
/**
|
|
547
645
|
* @typedef OfferPrice
|
|
548
|
-
* @property {string} [currency_symbol] - Currency symbol for currency
|
|
646
|
+
* @property {string} [currency_symbol] - Currency symbol for currency.
|
|
549
647
|
* @property {number} [bulk_effective] - Discounted per unit price for current
|
|
550
|
-
* offer object
|
|
551
|
-
* @property {string} [currency_code] -
|
|
552
|
-
*
|
|
553
|
-
*
|
|
554
|
-
* @property {number} [
|
|
648
|
+
* offer object.
|
|
649
|
+
* @property {string} [currency_code] - The currency code for an offer price is
|
|
650
|
+
* the three-letter code that corresponds to the currency in which the offer
|
|
651
|
+
* price is denominated.
|
|
652
|
+
* @property {number} [effective] - The "effective price" is the actual price
|
|
653
|
+
* paid by the consumer after accounting for product discounts. It represents
|
|
654
|
+
* the true cost of a product or service after all adjustments have been made.
|
|
655
|
+
* @property {number} [marked] - The price at which the product is sold to the
|
|
656
|
+
* end consumer, typically the original price before discounts.
|
|
555
657
|
*/
|
|
556
658
|
|
|
557
659
|
/**
|
|
558
660
|
* @typedef OfferItem
|
|
559
661
|
* @property {OfferPrice} [price]
|
|
560
|
-
* @property {number} [margin] - Percentage value of discount
|
|
561
|
-
* @property {number} [quantity] - Quantity on which offer is applicable
|
|
662
|
+
* @property {number} [margin] - Percentage value of discount.
|
|
663
|
+
* @property {number} [quantity] - Quantity on which offer is applicable.
|
|
562
664
|
* @property {boolean} [best] - Is true for best offer from all offers present
|
|
563
|
-
* for all sellers
|
|
564
|
-
* @property {number} [total] - Total price of offer quantity with discount
|
|
565
|
-
* @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart
|
|
566
|
-
* @property {string} [type] -
|
|
665
|
+
* for all sellers.
|
|
666
|
+
* @property {number} [total] - Total price of offer quantity with discount.
|
|
667
|
+
* @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart.
|
|
668
|
+
* @property {string} [type] - Type of the offer.
|
|
567
669
|
*/
|
|
568
670
|
|
|
569
671
|
/**
|
|
570
672
|
* @typedef OfferSeller
|
|
571
|
-
* @property {number} [uid] -
|
|
572
|
-
* @property {string} [name]
|
|
673
|
+
* @property {number} [uid] - Unique identifier for a seller.
|
|
674
|
+
* @property {string} [name] - Name of a seller.
|
|
573
675
|
*/
|
|
574
676
|
|
|
575
677
|
/**
|
|
576
678
|
* @typedef BulkPriceOffer
|
|
577
|
-
* @property {OfferItem[]} [offers]
|
|
679
|
+
* @property {OfferItem[]} [offers] - Offers is the list of Offer item, which
|
|
680
|
+
* consists of margin percentage, price, quantity, offer type and offer price.
|
|
578
681
|
* @property {OfferSeller} [seller]
|
|
579
682
|
*/
|
|
580
683
|
|
|
581
684
|
/**
|
|
582
685
|
* @typedef BulkPriceResponse
|
|
583
|
-
* @property {BulkPriceOffer[]} [data] -
|
|
686
|
+
* @property {BulkPriceOffer[]} [data] - Actual data to be in response consist
|
|
687
|
+
* of offers from multiple seller.
|
|
584
688
|
*/
|
|
585
689
|
|
|
586
690
|
/**
|
|
587
691
|
* @typedef RewardPointRequest
|
|
588
|
-
* @property {boolean} points
|
|
692
|
+
* @property {boolean} points - Points to be applied for cart.
|
|
589
693
|
*/
|
|
590
694
|
|
|
591
695
|
/**
|
|
592
696
|
* @typedef GeoLocation
|
|
593
|
-
* @property {number} [latitude]
|
|
594
|
-
* @property {number} [longitude]
|
|
697
|
+
* @property {number} [latitude] - Latitude coordinate for address.
|
|
698
|
+
* @property {number} [longitude] - Longitude coordinate for address.
|
|
595
699
|
*/
|
|
596
700
|
|
|
597
701
|
/**
|
|
598
702
|
* @typedef Address
|
|
599
|
-
* @property {string} [country_iso_code]
|
|
600
|
-
* @property {string} [area]
|
|
601
|
-
* @property {string} [phone]
|
|
602
|
-
* @property {string} [country_phone_code]
|
|
603
|
-
* @property {string} [checkout_mode]
|
|
604
|
-
*
|
|
605
|
-
* @property {string} [
|
|
703
|
+
* @property {string} [country_iso_code] - Country iso code for address.
|
|
704
|
+
* @property {string} [area] - Area description for address.
|
|
705
|
+
* @property {string} [phone] - Phone number for address.
|
|
706
|
+
* @property {string} [country_phone_code] - Country phone code for address.
|
|
707
|
+
* @property {string} [checkout_mode] - Checkout mode of address on which
|
|
708
|
+
* address to be used for which checkout mode of cart.
|
|
709
|
+
* @property {string} [address] - Address description for address data.
|
|
710
|
+
* @property {string} [area_code_slug] - Area code slug for address. example
|
|
711
|
+
* pincode is slug for India.
|
|
606
712
|
* @property {GeoLocation} [geo_location]
|
|
607
|
-
* @property {string} [id]
|
|
608
|
-
* @property {Object} [_custom_json]
|
|
609
|
-
* @property {string} [city]
|
|
610
|
-
* @property {string} [sector]
|
|
611
|
-
* @property {string} [state_code] - State code for
|
|
612
|
-
* @property {string} [created_by_user_id]
|
|
613
|
-
* @property {string} [landmark]
|
|
614
|
-
* @property {string} [user_id]
|
|
615
|
-
* @property {string} [name]
|
|
616
|
-
* @property {Object} [google_map_point]
|
|
617
|
-
* @property {boolean} [is_active]
|
|
618
|
-
* @property {string[]} [tags]
|
|
619
|
-
* @property {string} [country_code]
|
|
620
|
-
* @property {string} [address_type]
|
|
621
|
-
* @property {string} [country]
|
|
622
|
-
* @property {boolean} [is_default_address]
|
|
623
|
-
*
|
|
624
|
-
* @property {string} [
|
|
625
|
-
* @property {string} [
|
|
626
|
-
* @property {
|
|
713
|
+
* @property {string} [id] - Id of the address.
|
|
714
|
+
* @property {Object} [_custom_json] - Custom json of the address.
|
|
715
|
+
* @property {string} [city] - City of the address.
|
|
716
|
+
* @property {string} [sector] - Sector of the address.
|
|
717
|
+
* @property {string} [state_code] - State code for address.
|
|
718
|
+
* @property {string} [created_by_user_id] - Created by user id of address.
|
|
719
|
+
* @property {string} [landmark] - Landmark of address.
|
|
720
|
+
* @property {string} [user_id] - User id of address for which address is created.
|
|
721
|
+
* @property {string} [name] - Name of person in address data to whom it belongs to.
|
|
722
|
+
* @property {Object} [google_map_point] - Google map point of the address.
|
|
723
|
+
* @property {boolean} [is_active] - States whether address is active or not.
|
|
724
|
+
* @property {string[]} [tags] - Tags of address from which it can be identified.
|
|
725
|
+
* @property {string} [country_code] - Country code of address.
|
|
726
|
+
* @property {string} [address_type] - Address type of address.
|
|
727
|
+
* @property {string} [country] - Country of address.
|
|
728
|
+
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
729
|
+
* selected then this should be the default address selected.
|
|
730
|
+
* @property {string} [area_code] - Area code of the address.
|
|
731
|
+
* @property {string} [email] - Email address for address data.
|
|
732
|
+
* @property {string} [state] - State of the address.
|
|
733
|
+
* @property {Object} [meta] - Metadata of the address.
|
|
627
734
|
*/
|
|
628
735
|
|
|
629
736
|
/**
|
|
630
737
|
* @typedef GetAddressesResponse
|
|
631
|
-
* @property {boolean} [pii_masking]
|
|
632
|
-
*
|
|
738
|
+
* @property {boolean} [pii_masking] - Personally Identifiable Information
|
|
739
|
+
* masking flag to denote if the user data in address is masked or not.
|
|
740
|
+
* @property {Address[]} [address] - Address description for address data.
|
|
633
741
|
*/
|
|
634
742
|
|
|
635
743
|
/**
|
|
636
744
|
* @typedef SaveAddressResponse
|
|
637
|
-
* @property {string} [id]
|
|
638
|
-
* @property {boolean} [success]
|
|
639
|
-
* @property {boolean} [is_default_address]
|
|
745
|
+
* @property {string} [id] - Id of the address.
|
|
746
|
+
* @property {boolean} [success] - Success flag of save address Response.
|
|
747
|
+
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
748
|
+
* selected then this should be the default address selected.
|
|
640
749
|
*/
|
|
641
750
|
|
|
642
751
|
/**
|
|
643
752
|
* @typedef UpdateAddressResponse
|
|
644
|
-
* @property {boolean} [is_updated]
|
|
645
|
-
*
|
|
646
|
-
* @property {
|
|
647
|
-
* @property {boolean} [
|
|
753
|
+
* @property {boolean} [is_updated] - Updated flag for update address operation
|
|
754
|
+
* if the address updated or not.
|
|
755
|
+
* @property {string} [id] - ID of an address.
|
|
756
|
+
* @property {boolean} [success] - Success flag of update address response.
|
|
757
|
+
* @property {boolean} [is_default_address] - Default address flag if no address
|
|
758
|
+
* selected then this should be the default address selected.
|
|
648
759
|
*/
|
|
649
760
|
|
|
650
761
|
/**
|
|
651
762
|
* @typedef DeleteAddressResponse
|
|
652
|
-
* @property {string} [id]
|
|
653
|
-
* @property {boolean} [is_deleted]
|
|
763
|
+
* @property {string} [id] - Id of the address.
|
|
764
|
+
* @property {boolean} [is_deleted] - Deleted flag in delete address response
|
|
765
|
+
* states whether the address was deleted or not.
|
|
654
766
|
*/
|
|
655
767
|
|
|
656
768
|
/**
|
|
657
769
|
* @typedef SelectCartAddressRequest
|
|
658
|
-
* @property {string} [id]
|
|
659
|
-
*
|
|
660
|
-
* @property {string} [
|
|
770
|
+
* @property {string} [id] - Address is selected by user on which shipment to be
|
|
771
|
+
* delivered.
|
|
772
|
+
* @property {string} [billing_address_id] - Billing address id selected by user
|
|
773
|
+
* on which shipment bill to be generated.
|
|
774
|
+
* @property {string} [cart_id] - Cart id of the user cart for which the select
|
|
775
|
+
* address operation performed.
|
|
661
776
|
*/
|
|
662
777
|
|
|
663
778
|
/**
|
|
664
779
|
* @typedef UpdateCartPaymentRequest
|
|
665
|
-
* @property {string} [id]
|
|
666
|
-
*
|
|
667
|
-
* @property {string} [
|
|
668
|
-
*
|
|
669
|
-
* @property {string} [
|
|
670
|
-
*
|
|
780
|
+
* @property {string} [id] - Cart id of the user cart for which the update cart
|
|
781
|
+
* payment operation performed.
|
|
782
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
783
|
+
* mode selected to do the payment.
|
|
784
|
+
* @property {string} [address_id] - Address id of the user address selected to
|
|
785
|
+
* deliver the shipment.
|
|
786
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
787
|
+
* selected to do the payment.
|
|
788
|
+
* @property {string} [aggregator_name] - Aggregator name of the payment gateway.
|
|
789
|
+
* @property {string} [payment_mode] - Payment mode of the payment selected to
|
|
790
|
+
* do the payment.
|
|
671
791
|
*/
|
|
672
792
|
|
|
673
793
|
/**
|
|
674
794
|
* @typedef CouponValidity
|
|
675
|
-
* @property {string} [title]
|
|
676
|
-
* @property {number} [discount]
|
|
677
|
-
* @property {boolean} [next_validation_required]
|
|
678
|
-
*
|
|
679
|
-
* @property {
|
|
680
|
-
*
|
|
795
|
+
* @property {string} [title] - Coupon Title of the coupon applied.
|
|
796
|
+
* @property {number} [discount] - Coupon discount value of the coupon applied.
|
|
797
|
+
* @property {boolean} [next_validation_required] - Flag for coupon validation
|
|
798
|
+
* required on next page or not.
|
|
799
|
+
* @property {boolean} [valid] - Valid flag which denotes if the applied coupon
|
|
800
|
+
* is valid or not.
|
|
801
|
+
* @property {string} [display_message_en] - Display message for coupon validity.
|
|
802
|
+
* @property {string} [code] - Coupon code of the coupon applied.
|
|
681
803
|
*/
|
|
682
804
|
|
|
683
805
|
/**
|
|
684
806
|
* @typedef PaymentCouponValidate
|
|
685
|
-
* @property {string} [message]
|
|
807
|
+
* @property {string} [message] - Payment mode valid message for coupon.
|
|
686
808
|
* @property {CouponValidity} [coupon_validity]
|
|
687
|
-
* @property {boolean} success
|
|
809
|
+
* @property {boolean} success - Success flag of coupon payment mode validity
|
|
810
|
+
* API response.
|
|
688
811
|
*/
|
|
689
812
|
|
|
690
813
|
/**
|
|
691
814
|
* @typedef ShipmentResponse
|
|
692
|
-
* @property {number} [shipments]
|
|
815
|
+
* @property {number} [shipments] - Count of shipments that will be shipped.
|
|
693
816
|
* @property {ShipmentPromise} [promise]
|
|
694
|
-
* @property {string} [order_type]
|
|
695
|
-
*
|
|
696
|
-
* @property {string} [
|
|
697
|
-
*
|
|
698
|
-
* @property {string} [
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
* @property {
|
|
817
|
+
* @property {string} [order_type] - Order type of the shipment like pickAtStore
|
|
818
|
+
* or HomeDelivery.
|
|
819
|
+
* @property {string} [box_type] - Box type of the shipment in which the
|
|
820
|
+
* shipment will be delivered.
|
|
821
|
+
* @property {string} [shipment_type] - Shipment type of the shipment returned
|
|
822
|
+
* in get shipments API like single_shipment or multiple shipment. Single
|
|
823
|
+
* Shipment means 1 item in 1 shipment and vice versa in the other one.
|
|
824
|
+
* @property {Object} [dp_options] - Delivery partner options that are available
|
|
825
|
+
* to deliver the shipment.
|
|
826
|
+
* @property {string} [dp_id] - Delivery partner id of the shipment.
|
|
827
|
+
* @property {CartProductInfo[]} [items] - Item details in the shipment.
|
|
828
|
+
* @property {string} [fulfillment_type] - Fulfilment type of shipment.
|
|
829
|
+
* @property {number} [fulfillment_id] - Fulfilment id of the shipment.
|
|
702
830
|
*/
|
|
703
831
|
|
|
704
832
|
/**
|
|
705
833
|
* @typedef CartShipmentsResponse
|
|
706
|
-
* @property {string} [delivery_charge_info]
|
|
707
|
-
*
|
|
708
|
-
* @property {string} [
|
|
709
|
-
* @property {string} [
|
|
710
|
-
* @property {
|
|
711
|
-
* @property {
|
|
712
|
-
*
|
|
713
|
-
* @property {
|
|
834
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
835
|
+
* message on shipment.
|
|
836
|
+
* @property {string} [checkout_mode] - Checkout mode of cart.
|
|
837
|
+
* @property {string} [message] - Response message of get shipments API.
|
|
838
|
+
* @property {string} [gstin] - GSTIN number added in cart.
|
|
839
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
840
|
+
* the checkout process.
|
|
841
|
+
* @property {string} [last_modified] - Last modified timestamp of cart.
|
|
842
|
+
* @property {number} [cart_id] - Cart id of the user cart.
|
|
843
|
+
* @property {boolean} [is_valid] - Cart validity flag determines the if the
|
|
844
|
+
* response is valid or not.
|
|
714
845
|
* @property {CartBreakup} [breakup_values]
|
|
715
846
|
* @property {CartCurrency} [currency]
|
|
716
|
-
* @property {string} [id]
|
|
717
|
-
* @property {ShipmentResponse[]} [shipments]
|
|
847
|
+
* @property {string} [id] - Cart id of the user cart.
|
|
848
|
+
* @property {ShipmentResponse[]} [shipments] - List of Shipments which includes
|
|
849
|
+
* shipment data like shipment items, shipment promise, Shipment type,
|
|
850
|
+
* shipment order type, shipment dp options etc.
|
|
718
851
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
719
|
-
* @property {string} [coupon_text]
|
|
852
|
+
* @property {string} [coupon_text] - Coupon text of coupon applied on cart.
|
|
720
853
|
* @property {ShipmentPromise} [delivery_promise]
|
|
721
|
-
* @property {boolean} [error]
|
|
722
|
-
*
|
|
723
|
-
* @property {
|
|
724
|
-
* @property {
|
|
725
|
-
* @property {
|
|
854
|
+
* @property {boolean} [error] - Error details if any error occurs which
|
|
855
|
+
* includes type of error, error code and error message.
|
|
856
|
+
* @property {string} [comment] - Comment message added in cart.
|
|
857
|
+
* @property {boolean} [buy_now] - Buy now flag of user cart.
|
|
858
|
+
* @property {string} [uid] - Cart id of the user cart.
|
|
859
|
+
* @property {Object} [custom_cart_meta] - Custom meta details added cart
|
|
860
|
+
* checkout API payload.
|
|
726
861
|
*/
|
|
727
862
|
|
|
728
863
|
/**
|
|
729
864
|
* @typedef CartCheckoutCustomMeta
|
|
730
|
-
* @property {string} key
|
|
731
|
-
* @property {string} value
|
|
865
|
+
* @property {string} key - Key name of custom meta.
|
|
866
|
+
* @property {string} value - Value to be added in key.
|
|
732
867
|
*/
|
|
733
868
|
|
|
734
869
|
/**
|
|
735
870
|
* @typedef CustomerDetails
|
|
736
|
-
* @property {string} [email]
|
|
737
|
-
*
|
|
738
|
-
* @property {string}
|
|
871
|
+
* @property {string} [email] - Email address of the customer to be added in
|
|
872
|
+
* customer detail while checkout.
|
|
873
|
+
* @property {string} mobile - Mobile number of customer to be added in customer
|
|
874
|
+
* detail while checkout.
|
|
875
|
+
* @property {string} [name] - Name of customer to be added in customer detail
|
|
876
|
+
* while checkout.
|
|
739
877
|
*/
|
|
740
878
|
|
|
741
879
|
/**
|
|
742
880
|
* @typedef StaffCheckout
|
|
743
|
-
* @property {string} [employee_code]
|
|
744
|
-
*
|
|
745
|
-
* @property {string}
|
|
746
|
-
*
|
|
747
|
-
* @property {string}
|
|
881
|
+
* @property {string} [employee_code] - Employee code of staff who does checkout
|
|
882
|
+
* on behalf of customer.
|
|
883
|
+
* @property {string} user - User id of the employee who does checkout on behalf
|
|
884
|
+
* of customer.
|
|
885
|
+
* @property {string} last_name - Last name of staff employee who does checkout
|
|
886
|
+
* on behalf of customer.
|
|
887
|
+
* @property {string} first_name - First name of staff emplyee who does checkout
|
|
888
|
+
* on behalf of customer.
|
|
889
|
+
* @property {string} _id - Id of staff who does checkout on behalf of customer.
|
|
748
890
|
*/
|
|
749
891
|
|
|
750
892
|
/**
|
|
751
893
|
* @typedef CartCheckoutDetailRequest
|
|
752
|
-
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
753
|
-
*
|
|
754
|
-
* @property {
|
|
755
|
-
* @property {string} [
|
|
756
|
-
*
|
|
757
|
-
* @property {string}
|
|
758
|
-
* @property {
|
|
759
|
-
*
|
|
760
|
-
* @property {string}
|
|
761
|
-
*
|
|
894
|
+
* @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
|
|
895
|
+
* added in order.
|
|
896
|
+
* @property {Object} [customer_details] - Customer details to be added in order.
|
|
897
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
898
|
+
* selected to do the payment.
|
|
899
|
+
* @property {string} [id] - Cart id of the user cart.
|
|
900
|
+
* @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
|
|
901
|
+
* payment need not to be collected from user.
|
|
902
|
+
* @property {string} payment_mode - Payment mode from which the payment to be
|
|
903
|
+
* done for the order.
|
|
904
|
+
* @property {string} [aggregator] - Aggregator name of the payment gateway.
|
|
905
|
+
* @property {string} [address_id] - Address id of the user on which the order
|
|
906
|
+
* to be delivered.
|
|
907
|
+
* @property {string} [callback_url] - Callback url to be redirected after
|
|
908
|
+
* payment received/failed.
|
|
909
|
+
* @property {Object} [delivery_address] - Delivery address data which includes
|
|
910
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
911
|
+
* customer landmark and customer name.
|
|
762
912
|
* @property {StaffCheckout} [staff]
|
|
763
|
-
* @property {string} [order_type]
|
|
764
|
-
*
|
|
765
|
-
* @property {
|
|
766
|
-
*
|
|
767
|
-
* @property {Object} [
|
|
768
|
-
* @property {
|
|
769
|
-
*
|
|
770
|
-
* @property {Object} [
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
* @property {
|
|
774
|
-
*
|
|
775
|
-
* @property {string} [
|
|
913
|
+
* @property {string} [order_type] - Order type of the order being placed like
|
|
914
|
+
* pickAtStore or HomeDelivery.
|
|
915
|
+
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
916
|
+
* which the order is getting placed.
|
|
917
|
+
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order.
|
|
918
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
919
|
+
* mode selected to do the payment.
|
|
920
|
+
* @property {Object} [billing_address] - Billing address json which includes
|
|
921
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
922
|
+
* customer landmark and customer name.
|
|
923
|
+
* @property {Object} [payment_params] - Payment params which includes payment
|
|
924
|
+
* identifier and merchant code.
|
|
925
|
+
* @property {string} [billing_address_id] - Billing address id of the customer
|
|
926
|
+
* on which the invoice to be generated after the order is placed.
|
|
927
|
+
* @property {Object} [meta] - Meta data to be added in order.
|
|
928
|
+
* @property {Object} [payment_extra_identifiers] - Payment extra identifier for
|
|
929
|
+
* the payment mode to do the payment.
|
|
930
|
+
* @property {string} [iin] - Issuer Identification Number' number of card if
|
|
931
|
+
* payment mode is card.
|
|
932
|
+
* @property {string} [network] - Network of card if payment mode is card to do
|
|
933
|
+
* the payment.
|
|
934
|
+
* @property {string} [type] - Type of cart if payment mode is card to do the payment.
|
|
935
|
+
* @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
|
|
776
936
|
*/
|
|
777
937
|
|
|
778
938
|
/**
|
|
779
939
|
* @typedef CheckCart
|
|
780
|
-
* @property {string} [checkout_mode]
|
|
781
|
-
* @property {string} [user_type]
|
|
782
|
-
* @property {string} [cod_message]
|
|
783
|
-
* @property {number} [cart_id]
|
|
784
|
-
* @property {boolean} [is_valid]
|
|
785
|
-
*
|
|
786
|
-
* @property {
|
|
940
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart.
|
|
941
|
+
* @property {string} [user_type] - User type of the cart who places the order.
|
|
942
|
+
* @property {string} [cod_message] - Cash On Delivery message for the order placed.
|
|
943
|
+
* @property {number} [cart_id] - Cart id of the user cart for which the order placed.
|
|
944
|
+
* @property {boolean} [is_valid] - Valid flag fotr the checkout response if
|
|
945
|
+
* order placed was valid.
|
|
946
|
+
* @property {number} [delivery_charges] - Delivery charges of the order placed
|
|
947
|
+
* via checkout API.
|
|
948
|
+
* @property {string} [id] - Cart id of the user cart.
|
|
787
949
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
788
|
-
* @property {string} [error_message]
|
|
950
|
+
* @property {string} [error_message] - Error details if any error occurs which
|
|
951
|
+
* includes type of error, error code and error message.
|
|
789
952
|
* @property {ShipmentPromise} [delivery_promise]
|
|
790
|
-
* @property {string} [comment]
|
|
791
|
-
* @property {CartProductInfo[]} [items]
|
|
792
|
-
* @property {string} [uid]
|
|
793
|
-
* @property {number} [delivery_charge_order_value]
|
|
794
|
-
* @property {string} [delivery_charge_info]
|
|
795
|
-
*
|
|
796
|
-
* @property {boolean} [
|
|
797
|
-
* @property {
|
|
798
|
-
* @property {string} [
|
|
799
|
-
* @property {string} [
|
|
800
|
-
* @property {
|
|
801
|
-
* @property {
|
|
802
|
-
*
|
|
953
|
+
* @property {string} [comment] - Comment message added in cart after order placed.
|
|
954
|
+
* @property {CartProductInfo[]} [items] - Items details in cart after order placed.
|
|
955
|
+
* @property {string} [uid] - Cart id of user cart.
|
|
956
|
+
* @property {number} [delivery_charge_order_value] - Delivery charge order value.
|
|
957
|
+
* @property {string} [delivery_charge_info] - Delivery charge in information
|
|
958
|
+
* message on shipment.
|
|
959
|
+
* @property {boolean} [cod_available] - Whether Cash On Delivery available.
|
|
960
|
+
* @property {boolean} [success] - Success flag of checkout cart API response.
|
|
961
|
+
* @property {string} [store_code] - Store code from which the order placed.
|
|
962
|
+
* @property {string} [message] - Message of the cart checkout API response.
|
|
963
|
+
* @property {string} [gstin] - GSTIN number added in cart.
|
|
964
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
965
|
+
* the checkout process.
|
|
966
|
+
* @property {string} [last_modified] - Last modified timestamp of cart.
|
|
967
|
+
* @property {string} [order_id] - Order id generated after placing order.
|
|
803
968
|
* @property {CartBreakup} [breakup_values]
|
|
804
969
|
* @property {CartCurrency} [currency]
|
|
805
|
-
* @property {Object[]} [store_emps]
|
|
806
|
-
* @property {string} [coupon_text]
|
|
807
|
-
* @property {boolean} [buy_now]
|
|
808
|
-
* @property {number} [cod_charges]
|
|
809
|
-
* @property {Object} [custom_cart_meta]
|
|
970
|
+
* @property {Object[]} [store_emps] - Store employees data.
|
|
971
|
+
* @property {string} [coupon_text] - Coupon text of the applied coupon on order placed.
|
|
972
|
+
* @property {boolean} [buy_now] - Buy now flag of user cart.
|
|
973
|
+
* @property {number} [cod_charges] - Cash On Delivery charges of the user cart.
|
|
974
|
+
* @property {Object} [custom_cart_meta] - Meta data for customCart of user.
|
|
810
975
|
*/
|
|
811
976
|
|
|
812
977
|
/**
|
|
813
978
|
* @typedef CartCheckoutResponse
|
|
814
|
-
* @property {string} [payment_confirm_url]
|
|
815
|
-
*
|
|
816
|
-
* @property {
|
|
817
|
-
*
|
|
818
|
-
* @property {
|
|
819
|
-
* @property {
|
|
820
|
-
*
|
|
979
|
+
* @property {string} [payment_confirm_url] - Payment confirm url used to
|
|
980
|
+
* redirect after payment is confirmed.
|
|
981
|
+
* @property {string} [app_intercept_url] - App intercept url which is used to
|
|
982
|
+
* redirect on app after payment in confirmed/failed.
|
|
983
|
+
* @property {boolean} [success] - Success flag of cart checkout API response.
|
|
984
|
+
* @property {string} [callback_url] - Callback url to be redirected after
|
|
985
|
+
* payment received/failed.
|
|
986
|
+
* @property {string} [message] - Message of the cart checkout v2 API response.
|
|
987
|
+
* @property {Object} [data] - Data of the user cart checkout includes cart
|
|
988
|
+
* data, address, user id, order type etc.
|
|
989
|
+
* @property {string} [order_id] - Order id generated after placing order.
|
|
821
990
|
* @property {CheckCart} [cart]
|
|
822
991
|
*/
|
|
823
992
|
|
|
824
993
|
/**
|
|
825
994
|
* @typedef GiftDetail
|
|
826
|
-
* @property {boolean} [is_gift_applied]
|
|
827
|
-
*
|
|
995
|
+
* @property {boolean} [is_gift_applied] - Is gift applied flag which determines
|
|
996
|
+
* if this is a gift oder not.
|
|
997
|
+
* @property {string} [gift_message] - Gift message for the one while receive
|
|
998
|
+
* the delivery of the order with this message.
|
|
828
999
|
*/
|
|
829
1000
|
|
|
830
1001
|
/**
|
|
@@ -834,239 +1005,299 @@ const Joi = require("joi");
|
|
|
834
1005
|
|
|
835
1006
|
/**
|
|
836
1007
|
* @typedef CartMetaRequest
|
|
837
|
-
* @property {Object} [delivery_slots]
|
|
1008
|
+
* @property {Object} [delivery_slots] - Delivery slots details includes article
|
|
1009
|
+
* level time slot when the shipment can be delivered.
|
|
838
1010
|
* @property {ArticleGiftDetail} [gift_details]
|
|
839
1011
|
* @property {Object} [pick_up_customer_details] - Customer contact details for
|
|
840
|
-
* customer pickup at store
|
|
841
|
-
* @property {string} [checkout_mode]
|
|
842
|
-
* @property {string} [comment]
|
|
843
|
-
* @property {string} [gstin]
|
|
844
|
-
* @property {Object} [custom_cart_meta]
|
|
1012
|
+
* customer pickup at store.
|
|
1013
|
+
* @property {string} [checkout_mode] - Checkout mode of user cart.
|
|
1014
|
+
* @property {string} [comment] - Comment message to be added in user cart.
|
|
1015
|
+
* @property {string} [gstin] - GSTIN number to be added in user cart.
|
|
1016
|
+
* @property {Object} [custom_cart_meta] - Custom cart meta json to be added in
|
|
1017
|
+
* order meta which can be further received in cart API response and order
|
|
1018
|
+
* meta in order detail API or webhook.
|
|
845
1019
|
*/
|
|
846
1020
|
|
|
847
1021
|
/**
|
|
848
1022
|
* @typedef CartMetaResponse
|
|
849
|
-
* @property {string} [message]
|
|
850
|
-
* @property {boolean} [is_valid]
|
|
1023
|
+
* @property {string} [message] - Detailed message.
|
|
1024
|
+
* @property {boolean} [is_valid] - Whether added meta was vaild.
|
|
851
1025
|
*/
|
|
852
1026
|
|
|
853
1027
|
/**
|
|
854
1028
|
* @typedef CartMetaMissingResponse
|
|
855
|
-
* @property {string[]} [errors]
|
|
1029
|
+
* @property {string[]} [errors] - Detailed errors for invalid cart meta request.
|
|
856
1030
|
*/
|
|
857
1031
|
|
|
858
1032
|
/**
|
|
859
1033
|
* @typedef GetShareCartLinkRequest
|
|
860
|
-
* @property {string} [id] - Cart
|
|
1034
|
+
* @property {string} [id] - Cart id of user cart for generating cart sharing token.
|
|
861
1035
|
* @property {Object} [meta] - Staff, Ordering store or any other data. This
|
|
862
1036
|
* data will be used to generate link as well as sent as shared details.
|
|
863
1037
|
*/
|
|
864
1038
|
|
|
865
1039
|
/**
|
|
866
1040
|
* @typedef GetShareCartLinkResponse
|
|
867
|
-
* @property {string} [token] - Short url unique id
|
|
868
|
-
*
|
|
1041
|
+
* @property {string} [token] - Short url unique id of the cart which is opted
|
|
1042
|
+
* to share with other user.
|
|
1043
|
+
* @property {string} [share_url] - Short shareable final url which can populate
|
|
1044
|
+
* shared cart items in one's cart or replaced one's cart with shared cart items.
|
|
869
1045
|
*/
|
|
870
1046
|
|
|
871
1047
|
/**
|
|
872
1048
|
* @typedef SharedCartDetails
|
|
873
|
-
* @property {string} [token] - Short link id
|
|
874
|
-
* @property {Object} [user] - User details of who generated share link
|
|
875
|
-
* @property {string} [created_on]
|
|
876
|
-
* @property {Object} [source] - Share link device and other source information
|
|
877
|
-
* @property {Object} [meta] - Meta data sent while generating share cart link
|
|
1049
|
+
* @property {string} [token] - Short link id of the user cart that needs to be shared.
|
|
1050
|
+
* @property {Object} [user] - User details of who generated share link.
|
|
1051
|
+
* @property {string} [created_on] - Created on timestamp of user cart.
|
|
1052
|
+
* @property {Object} [source] - Share link device and other source information.
|
|
1053
|
+
* @property {Object} [meta] - Meta data sent while generating share cart link.
|
|
878
1054
|
*/
|
|
879
1055
|
|
|
880
1056
|
/**
|
|
881
1057
|
* @typedef SharedCart
|
|
882
|
-
* @property {string} [checkout_mode]
|
|
883
|
-
*
|
|
884
|
-
* @property {
|
|
885
|
-
* @property {
|
|
1058
|
+
* @property {string} [checkout_mode] - Checkout mode of address on which
|
|
1059
|
+
* address to be used for which checkout mode of cart.
|
|
1060
|
+
* @property {number} [cart_id] - Cart id of user cart for generating cart sharing token.
|
|
1061
|
+
* @property {boolean} [is_valid] - Valid flag for get shared cart detail API.
|
|
1062
|
+
* @property {string} [id] - Cart id of shared cart.
|
|
886
1063
|
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
887
1064
|
* @property {ShipmentPromise} [delivery_promise]
|
|
888
|
-
* @property {string} [comment]
|
|
889
|
-
* @property {CartProductInfo[]} [items]
|
|
890
|
-
*
|
|
891
|
-
*
|
|
892
|
-
* @property {string} [
|
|
893
|
-
* @property {string} [
|
|
1065
|
+
* @property {string} [comment] - Comment message added in user cart.
|
|
1066
|
+
* @property {CartProductInfo[]} [items] - Items data list in user cart that
|
|
1067
|
+
* includes item id, item size, store id, available sizes and rest of the item
|
|
1068
|
+
* related data.
|
|
1069
|
+
* @property {string} [uid] - Cart id of the user cart.
|
|
1070
|
+
* @property {string} [delivery_charge_info] - Delivery charge info message of
|
|
1071
|
+
* the user cart.
|
|
1072
|
+
* @property {string} [message] - Message of the get shared cart API response.
|
|
1073
|
+
* @property {string} [gstin] - GSTIN added in user cart.
|
|
894
1074
|
* @property {SharedCartDetails} [shared_cart_details]
|
|
895
|
-
* @property {boolean} [restrict_checkout]
|
|
896
|
-
*
|
|
1075
|
+
* @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
|
|
1076
|
+
* the checkout process.
|
|
1077
|
+
* @property {string} [last_modified] - Last modified timestamp of user cart.
|
|
897
1078
|
* @property {CartBreakup} [breakup_values]
|
|
898
1079
|
* @property {CartCurrency} [currency]
|
|
899
|
-
* @property {string} [coupon_text]
|
|
900
|
-
* @property {boolean} [buy_now]
|
|
901
|
-
* @property {Object} [custom_cart_meta]
|
|
1080
|
+
* @property {string} [coupon_text] - Coupon text of the applied coupon on user cart.
|
|
1081
|
+
* @property {boolean} [buy_now] - Buy now flag of user cart.
|
|
1082
|
+
* @property {Object} [custom_cart_meta] - Custom cart meta of user cart added
|
|
1083
|
+
* via update cart meta API.
|
|
902
1084
|
*/
|
|
903
1085
|
|
|
904
1086
|
/**
|
|
905
1087
|
* @typedef SharedCartResponse
|
|
906
|
-
* @property {string} [error]
|
|
1088
|
+
* @property {string} [error] - Error details if any error occurs which includes
|
|
1089
|
+
* type of error, error code and error message.
|
|
907
1090
|
* @property {SharedCart} [cart]
|
|
908
1091
|
*/
|
|
909
1092
|
|
|
910
1093
|
/**
|
|
911
1094
|
* @typedef PriceMinMax
|
|
912
|
-
* @property {number} [min]
|
|
913
|
-
* @property {number} [max]
|
|
1095
|
+
* @property {number} [min] - Min price of article added in user cart.
|
|
1096
|
+
* @property {number} [max] - Max price of article added in user cart.
|
|
914
1097
|
*/
|
|
915
1098
|
|
|
916
1099
|
/**
|
|
917
1100
|
* @typedef ItemPriceDetails
|
|
918
1101
|
* @property {PriceMinMax} [marked]
|
|
919
1102
|
* @property {PriceMinMax} [effective]
|
|
920
|
-
* @property {string} [currency]
|
|
1103
|
+
* @property {string} [currency] - Currency of the article added in cart.
|
|
921
1104
|
*/
|
|
922
1105
|
|
|
923
1106
|
/**
|
|
924
1107
|
* @typedef FreeGiftItems
|
|
925
|
-
* @property {string} [item_slug] -
|
|
926
|
-
* @property {string} [item_name] -
|
|
1108
|
+
* @property {string} [item_slug] - Slug for an item.
|
|
1109
|
+
* @property {string} [item_name] - Name of the free gift item received via free
|
|
1110
|
+
* gift promotion.
|
|
927
1111
|
* @property {ItemPriceDetails} [item_price_details]
|
|
928
|
-
* @property {string} [item_brand_name] - Item brand name
|
|
929
|
-
*
|
|
930
|
-
* @property {
|
|
1112
|
+
* @property {string} [item_brand_name] - Item brand name of the free gift item
|
|
1113
|
+
* promotion applied on cart.
|
|
1114
|
+
* @property {number} [item_id] - Item id of the free gift item.
|
|
1115
|
+
* @property {string[]} [item_images_url] - Images URLs for free gift items.
|
|
931
1116
|
*/
|
|
932
1117
|
|
|
933
1118
|
/**
|
|
934
1119
|
* @typedef PromotionOffer
|
|
935
|
-
* @property {string} [id] - Promotion id
|
|
936
|
-
* @property {Object} [buy_rules] - Buy rules of
|
|
937
|
-
* @property {string} [offer_text] - Offer title
|
|
938
|
-
*
|
|
939
|
-
* @property {string} [
|
|
940
|
-
*
|
|
941
|
-
* @property {string} [
|
|
942
|
-
*
|
|
1120
|
+
* @property {string} [id] - Promotion id of the promotion which is available on product.
|
|
1121
|
+
* @property {Object} [buy_rules] - Buy rules of promotion which is available on product.
|
|
1122
|
+
* @property {string} [offer_text] - Offer title of the promotion which is
|
|
1123
|
+
* available on product.
|
|
1124
|
+
* @property {string} [promotion_type] - Promotion type of the promotion which
|
|
1125
|
+
* is availalbe on product.
|
|
1126
|
+
* @property {string} [promotion_name] - Name of the promotion which is
|
|
1127
|
+
* available on product.
|
|
1128
|
+
* @property {string} [promotion_group] - Group of the promotion which is
|
|
1129
|
+
* available on product.
|
|
1130
|
+
* @property {string} [valid_till] - Datetime ISO String for promotion end date
|
|
1131
|
+
* which is available on product.
|
|
1132
|
+
* @property {Object[]} [discount_rules] - Discount rules of promotions which is
|
|
1133
|
+
* avaiable on product.
|
|
943
1134
|
* @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
|
|
944
|
-
*
|
|
1135
|
+
* which included item id, brand name, item name, item slug, item price and
|
|
1136
|
+
* item image url.
|
|
1137
|
+
* @property {string} [description] - Offer details including T&C of the
|
|
1138
|
+
* promotion which is avaiable on product.
|
|
945
1139
|
*/
|
|
946
1140
|
|
|
947
1141
|
/**
|
|
948
1142
|
* @typedef PromotionOffersResponse
|
|
949
|
-
* @property {PromotionOffer[]} [available_promotions]
|
|
1143
|
+
* @property {PromotionOffer[]} [available_promotions] - Available promotion
|
|
1144
|
+
* details which are available on product which includes promotion data like
|
|
1145
|
+
* promotion id, promotion name, buy rules, discount rules validity dates etc.
|
|
950
1146
|
*/
|
|
951
1147
|
|
|
952
1148
|
/**
|
|
953
1149
|
* @typedef PromotionPaymentOffer
|
|
954
|
-
* @property {string} [application_id] - Application id
|
|
955
|
-
*
|
|
956
|
-
* @property {
|
|
957
|
-
*
|
|
958
|
-
* @property {
|
|
959
|
-
*
|
|
960
|
-
* @property {string} [
|
|
961
|
-
*
|
|
962
|
-
* @property {
|
|
963
|
-
*
|
|
1150
|
+
* @property {string} [application_id] - Application id on which the promotion
|
|
1151
|
+
* was created.
|
|
1152
|
+
* @property {Object[]} [buy_rules] - Buy rules of promotions which denotes if
|
|
1153
|
+
* the rules matches than only promotion is applicable.
|
|
1154
|
+
* @property {string} [calculate_on] - Article Price on which promotion
|
|
1155
|
+
* calculated like effective price or marked price.
|
|
1156
|
+
* @property {string} [description] - Offer details including T&C of the
|
|
1157
|
+
* promotion which is avaiable on cart.
|
|
1158
|
+
* @property {Object[]} [discount_rules] - Discount rules of promotions which is
|
|
1159
|
+
* avaiable on cart.
|
|
1160
|
+
* @property {string} [id] - Promotion id of the promotion which is available on cart.
|
|
1161
|
+
* @property {string} [offer_text] - Offer title of the promotion which is
|
|
1162
|
+
* available on cart.
|
|
1163
|
+
* @property {string} [promotion_group] - Group promotion which is available on cart.
|
|
1164
|
+
* @property {string} [promotion_type] - Promotion type of the promotion which
|
|
1165
|
+
* is availalbe on cart.
|
|
1166
|
+
* @property {string} [promotion_name] - Name of the promotion which is available on cart.
|
|
964
1167
|
*/
|
|
965
1168
|
|
|
966
1169
|
/**
|
|
967
1170
|
* @typedef PromotionPaymentOffersResponse
|
|
968
|
-
* @property {boolean} [success]
|
|
969
|
-
* @property {PromotionPaymentOffer[]} [promotions]
|
|
1171
|
+
* @property {boolean} [success] - Success flag of get payment offers API response.
|
|
1172
|
+
* @property {PromotionPaymentOffer[]} [promotions] - List of promotions data
|
|
1173
|
+
* which are applicable on cart/product.
|
|
970
1174
|
*/
|
|
971
1175
|
|
|
972
1176
|
/**
|
|
973
1177
|
* @typedef OperationErrorResponse
|
|
974
|
-
* @property {string} [message]
|
|
975
|
-
* @property {boolean} [success]
|
|
1178
|
+
* @property {string} [message] - Message of get payment offer API response.
|
|
1179
|
+
* @property {boolean} [success] - Success flag of get payment offer API response.
|
|
976
1180
|
*/
|
|
977
1181
|
|
|
978
1182
|
/**
|
|
979
1183
|
* @typedef LadderPrice
|
|
980
|
-
* @property {string} [currency_symbol] - Currency symbol for currency
|
|
981
|
-
*
|
|
982
|
-
* @property {
|
|
1184
|
+
* @property {string} [currency_symbol] - Currency symbol for currency of ladder
|
|
1185
|
+
* price product.
|
|
1186
|
+
* @property {number} [offer_price] - Discounted per unit price for current offer object.
|
|
1187
|
+
* @property {string} [currency_code] - Currency code for all amounts.
|
|
983
1188
|
* @property {number} [effective] - Current per unit price of product after
|
|
984
|
-
* existing deductions
|
|
985
|
-
* @property {number} [marked] - Original price of product
|
|
1189
|
+
* existing deductions.
|
|
1190
|
+
* @property {number} [marked] - Original price of product.
|
|
986
1191
|
*/
|
|
987
1192
|
|
|
988
1193
|
/**
|
|
989
1194
|
* @typedef LadderOfferItem
|
|
990
1195
|
* @property {LadderPrice} [price]
|
|
991
|
-
* @property {number} [margin] - Percentage value of discount
|
|
1196
|
+
* @property {number} [margin] - Percentage value of discount.
|
|
992
1197
|
* @property {number} [max_quantity] - Minimum quantity upto which offer is
|
|
993
|
-
* applicable. If not present that offer is applicable on all quantities
|
|
994
|
-
* @property {number} [min_quantity] - Minimum quantity from which offer is applicable
|
|
995
|
-
* @property {string} [type] - Offer type
|
|
1198
|
+
* applicable. If not present that offer is applicable on all quantities.
|
|
1199
|
+
* @property {number} [min_quantity] - Minimum quantity from which offer is applicable.
|
|
1200
|
+
* @property {string} [type] - Offer type of the ladder promotion.
|
|
996
1201
|
*/
|
|
997
1202
|
|
|
998
1203
|
/**
|
|
999
1204
|
* @typedef LadderPriceOffer
|
|
1000
|
-
* @property {string} [id] -
|
|
1001
|
-
* @property {Object} [buy_rules] - Buy rules of
|
|
1205
|
+
* @property {string} [id] - ID of the promotion.
|
|
1206
|
+
* @property {Object} [buy_rules] - Buy rules of ladder price promotion
|
|
1207
|
+
* applicable on product.
|
|
1002
1208
|
* @property {string} [calculate_on] - If this ladder offer is to be calculated
|
|
1003
|
-
* on MRP or ESP price
|
|
1004
|
-
* @property {string} [offer_text] - Offer title
|
|
1005
|
-
*
|
|
1006
|
-
* @property {string} [
|
|
1007
|
-
*
|
|
1008
|
-
* @property {
|
|
1009
|
-
* @property {
|
|
1010
|
-
*
|
|
1209
|
+
* on MRP or ESP price.
|
|
1210
|
+
* @property {string} [offer_text] - Offer title of ladder price promotion
|
|
1211
|
+
* applicable on product.
|
|
1212
|
+
* @property {string} [promotion_group] - Group of ladder price promotion
|
|
1213
|
+
* applicable on product.
|
|
1214
|
+
* @property {string} [valid_till] - Datetime ISO String for promotion end date.
|
|
1215
|
+
* @property {Object[]} [discount_rules] - Discount rules of ladder price
|
|
1216
|
+
* promotion applicable on product.
|
|
1217
|
+
* @property {LadderOfferItem[]} [offer_prices] - Offer prices for ladder price
|
|
1218
|
+
* promotion applicable on product.
|
|
1219
|
+
* @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items list.
|
|
1220
|
+
* @property {string} [description] - Offer details including T&C of ladder
|
|
1221
|
+
* price promotion applicable on product.
|
|
1011
1222
|
*/
|
|
1012
1223
|
|
|
1013
1224
|
/**
|
|
1014
1225
|
* @typedef CurrencyInfo
|
|
1015
|
-
* @property {string} [code]
|
|
1016
|
-
* @property {string} [symbol]
|
|
1226
|
+
* @property {string} [code] - Currency code of ladder price promotion.
|
|
1227
|
+
* @property {string} [symbol] - Currency symbol for currency of ladder price product.
|
|
1017
1228
|
*/
|
|
1018
1229
|
|
|
1019
1230
|
/**
|
|
1020
1231
|
* @typedef LadderPriceOffers
|
|
1021
|
-
* @property {LadderPriceOffer[]} [available_offers]
|
|
1232
|
+
* @property {LadderPriceOffer[]} [available_offers] - Available ladder
|
|
1233
|
+
* promotions offers list.
|
|
1022
1234
|
* @property {CurrencyInfo} [currency]
|
|
1023
1235
|
*/
|
|
1024
1236
|
|
|
1025
1237
|
/**
|
|
1026
1238
|
* @typedef PaymentMeta
|
|
1027
|
-
* @property {string} [merchant_code]
|
|
1028
|
-
*
|
|
1029
|
-
* @property {string} [
|
|
1030
|
-
* @property {string} [
|
|
1239
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
1240
|
+
* selected to do the payment.
|
|
1241
|
+
* @property {string} [type] - Type of card if payment mode is card to do the payment.
|
|
1242
|
+
* @property {string} [payment_gateway] - Payment gateway used to do the payment.
|
|
1243
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
1244
|
+
* mode selected to do the payment.
|
|
1031
1245
|
*/
|
|
1032
1246
|
|
|
1033
1247
|
/**
|
|
1034
1248
|
* @typedef PaymentMethod
|
|
1035
1249
|
* @property {PaymentMeta} payment_meta
|
|
1036
|
-
* @property {string} mode
|
|
1037
|
-
* @property {string} [payment]
|
|
1038
|
-
* @property {number} [amount]
|
|
1039
|
-
* @property {string} [name]
|
|
1040
|
-
* @property {Object} [payment_extra_identifiers]
|
|
1250
|
+
* @property {string} mode - Payment mode of payment method used to make payment.
|
|
1251
|
+
* @property {string} [payment] - Payment name of payment method used to make payment.
|
|
1252
|
+
* @property {number} [amount] - Amount of the payment mode to be paid.
|
|
1253
|
+
* @property {string} [name] - Name of the payment mode used to make payment.
|
|
1254
|
+
* @property {Object} [payment_extra_identifiers] - Payment extra identifier for
|
|
1255
|
+
* the payment mode to do the payment.
|
|
1041
1256
|
*/
|
|
1042
1257
|
|
|
1043
1258
|
/**
|
|
1044
1259
|
* @typedef CartCheckoutDetailV2Request
|
|
1045
|
-
* @property {Object} [custom_meta]
|
|
1046
|
-
* @property {Object} [customer_details] - Customer details
|
|
1047
|
-
* @property {string} [merchant_code]
|
|
1048
|
-
*
|
|
1049
|
-
* @property {string} [id
|
|
1050
|
-
* @property {
|
|
1051
|
-
* @property {
|
|
1052
|
-
*
|
|
1053
|
-
* @property {
|
|
1054
|
-
*
|
|
1055
|
-
* @property {string}
|
|
1056
|
-
*
|
|
1260
|
+
* @property {Object} [custom_meta] - Custom meta data to be added in order.
|
|
1261
|
+
* @property {Object} [customer_details] - Customer details to be added in order.
|
|
1262
|
+
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
1263
|
+
* selected to do the payment.
|
|
1264
|
+
* @property {string} [cart_id] - Cart id of the user cart.
|
|
1265
|
+
* @property {string} [id] - Cart id of the user cart.
|
|
1266
|
+
* @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
|
|
1267
|
+
* payment need not to be collected from user.
|
|
1268
|
+
* @property {PaymentMethod[]} payment_methods - Payment methods list used to
|
|
1269
|
+
* make the payment.
|
|
1270
|
+
* @property {string} payment_mode - Payment mode of the payment selected to do
|
|
1271
|
+
* the payment.
|
|
1272
|
+
* @property {string} [aggregator] - Aggregator of payment mode to do the payment.
|
|
1273
|
+
* @property {string} [address_id] - Address id of the user where the order to
|
|
1274
|
+
* be delivered.
|
|
1275
|
+
* @property {string} [callback_url] - Callback url after payment received/failed.
|
|
1276
|
+
* @property {Object} [delivery_address] - Delivery address data which includes
|
|
1277
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
1278
|
+
* customer landmark and customer name.
|
|
1057
1279
|
* @property {StaffCheckout} [staff]
|
|
1058
|
-
* @property {string} [order_type]
|
|
1059
|
-
*
|
|
1060
|
-
* @property {
|
|
1061
|
-
*
|
|
1062
|
-
* @property {Object} [
|
|
1063
|
-
* @property {
|
|
1064
|
-
*
|
|
1065
|
-
* @property {Object} [
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
1068
|
-
* @property {
|
|
1069
|
-
*
|
|
1280
|
+
* @property {string} [order_type] - Order type of the order being placed like
|
|
1281
|
+
* pickAtStore or HomeDelivery.
|
|
1282
|
+
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
1283
|
+
* which the order is getting placed.
|
|
1284
|
+
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order.
|
|
1285
|
+
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
1286
|
+
* mode selected to do the payment.
|
|
1287
|
+
* @property {Object} [billing_address] - Billing address json which includes
|
|
1288
|
+
* customer address, customer phone, customer email, customer pincode,
|
|
1289
|
+
* customer landmark and customer name.
|
|
1290
|
+
* @property {Object} [payment_params] - Payment params which includes payment
|
|
1291
|
+
* identifier and merchant code.
|
|
1292
|
+
* @property {string} [billing_address_id] - Billing address id selected by user
|
|
1293
|
+
* on which shipment bill to be generated.
|
|
1294
|
+
* @property {Object} [meta] - Meta data sent while checkout v2.
|
|
1295
|
+
* @property {string} [iin] - Issuer Identification Number' number of card if
|
|
1296
|
+
* payment mode is card to do the payment.
|
|
1297
|
+
* @property {string} [network] - Network of card if payment mode is card to do
|
|
1298
|
+
* the payment.
|
|
1299
|
+
* @property {string} [type] - Type of cart if payment mode is card to do the payment.
|
|
1300
|
+
* @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
|
|
1070
1301
|
*/
|
|
1071
1302
|
|
|
1072
1303
|
class CartApplicationModel {
|