@gofynd/fdk-client-javascript 1.4.4 → 1.4.6
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 +1 -1
- package/application.d.ts +3 -3
- package/common.d.ts +3 -3
- package/index.d.ts +15 -15
- package/package.json +1 -1
- package/partner.d.ts +3 -3
- package/platform.d.ts +3 -3
- package/public.d.ts +2 -2
- package/sdk/application/ApplicationAPIClient.d.ts +1 -1
- package/sdk/application/ApplicationClient.d.ts +16 -18
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/ApplicationConfig.d.ts +3 -3
- package/sdk/application/Cart/CartApplicationClient.d.ts +2 -2
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +8 -8
- package/sdk/application/Catalog/CatalogApplicationClient.js +5 -5
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.d.ts +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +2 -2
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +1 -1
- package/sdk/application/Order/OrderApplicationValidator.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationValidator.js +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +23 -17
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +2 -2
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +1 -1
- package/sdk/application/Share/ShareApplicationClient.d.ts +2 -2
- package/sdk/application/Share/ShareApplicationModel.d.ts +2 -0
- package/sdk/application/Share/ShareApplicationModel.js +2 -0
- package/sdk/application/Share/ShareApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -1
- package/sdk/application/index.d.ts +17 -18
- package/sdk/application/index.js +0 -2
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -1
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +1 -1
- package/sdk/partner/OAuthClient.d.ts +4 -4
- package/sdk/partner/PartnerAPIClient.d.ts +1 -1
- package/sdk/partner/PartnerClient.d.ts +6 -6
- package/sdk/partner/PartnerConfig.d.ts +4 -4
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +1 -1
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +1 -1
- package/sdk/partner/Webhook/WebhookPartnerModel.js +1 -1
- package/sdk/partner/index.d.ts +7 -7
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +2 -2
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +28 -5
- package/sdk/platform/Catalog/CatalogPlatformClient.js +69 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +2 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +16 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +60 -1
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +25 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +3 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +34 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +35 -5
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -5
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformClient.d.ts +2 -2
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +1 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +1 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +2 -2
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -1
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -1
- package/sdk/platform/OAuthClient.d.ts +3 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformModel.js +65 -41
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +22 -16
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +1 -1
- package/sdk/platform/PlatformAPIClient.d.ts +1 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +16 -16
- package/sdk/platform/PlatformClient.d.ts +19 -19
- package/sdk/platform/PlatformConfig.d.ts +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +2 -2
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +1 -1
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +1 -1
- package/sdk/platform/index.d.ts +24 -24
- package/sdk/public/Billing/BillingPublicClient.d.ts +2 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -2
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -2
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +2 -2
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.d.ts +2 -2
- package/sdk/public/PublicAPIClient.d.ts +1 -1
- package/sdk/public/PublicClient.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
- package/sdk/public/Webhook/WebhookPublicModel.js +1 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -1
- package/sdk/public/index.d.ts +8 -8
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +0 -323
- package/sdk/application/PosCart/PosCartApplicationClient.js +0 -2364
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +0 -1857
- package/sdk/application/PosCart/PosCartApplicationModel.js +0 -1906
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +0 -483
- package/sdk/application/PosCart/PosCartApplicationValidator.js +0 -492
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
const PosCartApplicationModel = require("./PosCartApplicationModel");
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @typedef AddAddressParam
|
|
7
|
-
* @property {PosCartApplicationModel.Address} body
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @typedef AddItemsParam
|
|
12
|
-
* @property {boolean} [i]
|
|
13
|
-
* @property {boolean} [b]
|
|
14
|
-
* @property {string} [areaCode]
|
|
15
|
-
* @property {boolean} [buyNow]
|
|
16
|
-
* @property {string} [id]
|
|
17
|
-
* @property {PosCartApplicationModel.AddCartRequest} body
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @typedef ApplyCouponParam
|
|
22
|
-
* @property {boolean} [i]
|
|
23
|
-
* @property {boolean} [b]
|
|
24
|
-
* @property {boolean} [p]
|
|
25
|
-
* @property {string} [id]
|
|
26
|
-
* @property {boolean} [buyNow]
|
|
27
|
-
* @property {PosCartApplicationModel.ApplyCouponRequest} body
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @typedef ApplyRewardPointsParam
|
|
32
|
-
* @property {string} [id]
|
|
33
|
-
* @property {boolean} [i]
|
|
34
|
-
* @property {boolean} [b]
|
|
35
|
-
* @property {boolean} [buyNow]
|
|
36
|
-
* @property {PosCartApplicationModel.RewardPointRequest} body
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @typedef CheckoutCartParam
|
|
41
|
-
* @property {string} [id]
|
|
42
|
-
* @property {PosCartApplicationModel.CartPosCheckoutDetailRequest} body
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @typedef GetAddressByIdParam
|
|
47
|
-
* @property {string} id
|
|
48
|
-
* @property {string} [cartId]
|
|
49
|
-
* @property {boolean} [buyNow]
|
|
50
|
-
* @property {string} [mobileNo]
|
|
51
|
-
* @property {string} [checkoutMode]
|
|
52
|
-
* @property {string} [tags]
|
|
53
|
-
* @property {boolean} [isDefault]
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @typedef GetAddressesParam
|
|
58
|
-
* @property {string} [cartId]
|
|
59
|
-
* @property {boolean} [buyNow]
|
|
60
|
-
* @property {string} [mobileNo]
|
|
61
|
-
* @property {string} [checkoutMode]
|
|
62
|
-
* @property {string} [tags]
|
|
63
|
-
* @property {boolean} [isDefault]
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @typedef GetAvailableDeliveryModesParam
|
|
68
|
-
* @property {string} areaCode
|
|
69
|
-
* @property {string} [id]
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @typedef GetBulkDiscountOffersParam
|
|
74
|
-
* @property {number} [itemId] - The Item ID of the product
|
|
75
|
-
* @property {string} [articleId] - Article Mongo ID
|
|
76
|
-
* @property {number} [uid] - UID of the product
|
|
77
|
-
* @property {string} [slug] - A short, human-readable, URL-friendly identifier
|
|
78
|
-
* of a product. You can get slug value from the endpoint
|
|
79
|
-
* /service/application/catalog/v1.0/products/
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @typedef GetCartParam
|
|
84
|
-
* @property {string} [id]
|
|
85
|
-
* @property {boolean} [i]
|
|
86
|
-
* @property {boolean} [b]
|
|
87
|
-
* @property {boolean} [c]
|
|
88
|
-
* @property {number} [assignCardId]
|
|
89
|
-
* @property {string} [areaCode]
|
|
90
|
-
* @property {boolean} [buyNow]
|
|
91
|
-
*/
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @typedef GetCartLastModifiedParam
|
|
95
|
-
* @property {string} [id]
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @typedef GetCartShareLinkParam
|
|
100
|
-
* @property {PosCartApplicationModel.GetShareCartLinkRequest} body
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @typedef GetCartSharedItemsParam
|
|
105
|
-
* @property {string} token - Token of the shared short link
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @typedef GetCouponsParam
|
|
110
|
-
* @property {string} [id]
|
|
111
|
-
* @property {boolean} [buyNow]
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @typedef GetItemCountParam
|
|
116
|
-
* @property {string} [id] - The unique identifier of the cart.
|
|
117
|
-
* @property {boolean} [buyNow]
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* @typedef GetShipmentsParam
|
|
122
|
-
* @property {number} [pickAtStoreUid]
|
|
123
|
-
* @property {number} [orderingStoreId]
|
|
124
|
-
* @property {boolean} [p] - This is a boolean value. Select `true` for getting
|
|
125
|
-
* a payment option in response.
|
|
126
|
-
* @property {string} [id] - The unique identifier of the cart
|
|
127
|
-
* @property {string} [addressId] - ID allotted to the selected address
|
|
128
|
-
* @property {string} [areaCode] - The PIN Code of the destination address, e.g. 400059
|
|
129
|
-
* @property {string} [orderType] - The order type of shipment HomeDelivery - If
|
|
130
|
-
* the customer wants the order home-delivered PickAtStore - If the customer
|
|
131
|
-
* wants the handover of an order at the store itself.
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* @typedef GetStoreAddressByUidParam
|
|
136
|
-
* @property {number} storeUid
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @typedef RemoveAddressParam
|
|
141
|
-
* @property {string} id - ID allotted to the selected address
|
|
142
|
-
*/
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @typedef RemoveCouponParam
|
|
146
|
-
* @property {string} [id]
|
|
147
|
-
* @property {boolean} [buyNow]
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* @typedef SelectAddressParam
|
|
152
|
-
* @property {string} [cartId]
|
|
153
|
-
* @property {boolean} [buyNow]
|
|
154
|
-
* @property {boolean} [i]
|
|
155
|
-
* @property {boolean} [b]
|
|
156
|
-
* @property {PosCartApplicationModel.SelectCartAddressRequest} body
|
|
157
|
-
*/
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @typedef SelectPaymentModeParam
|
|
161
|
-
* @property {string} [id]
|
|
162
|
-
* @property {boolean} [buyNow]
|
|
163
|
-
* @property {PosCartApplicationModel.UpdateCartPaymentRequest} body
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @typedef UpdateAddressParam
|
|
168
|
-
* @property {string} id - ID allotted to the selected address
|
|
169
|
-
* @property {PosCartApplicationModel.Address} body
|
|
170
|
-
*/
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @typedef UpdateCartParam
|
|
174
|
-
* @property {string} [id]
|
|
175
|
-
* @property {boolean} [i]
|
|
176
|
-
* @property {boolean} [b]
|
|
177
|
-
* @property {string} [areaCode]
|
|
178
|
-
* @property {boolean} [buyNow]
|
|
179
|
-
* @property {PosCartApplicationModel.UpdateCartRequest} body
|
|
180
|
-
*/
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* @typedef UpdateCartMetaParam
|
|
184
|
-
* @property {string} [id]
|
|
185
|
-
* @property {boolean} [buyNow]
|
|
186
|
-
* @property {PosCartApplicationModel.CartMetaRequest} body
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @typedef UpdateCartWithSharedItemsParam
|
|
191
|
-
* @property {string} token - Token of the shared short link
|
|
192
|
-
* @property {string} action - Operation to perform on the existing cart merge or replace.
|
|
193
|
-
*/
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @typedef UpdateShipmentsParam
|
|
197
|
-
* @property {boolean} [i] - This is a boolean value. Select `true` to retrieve
|
|
198
|
-
* all the items added in the cart.
|
|
199
|
-
* @property {boolean} [p] - This is a boolean value. Select `true` for getting
|
|
200
|
-
* a payment option in response.
|
|
201
|
-
* @property {string} [id] - The unique identifier of the cart
|
|
202
|
-
* @property {string} [addressId] - ID allotted to an address
|
|
203
|
-
* @property {string} [areaCode] - The PIN Code of the destination address, e.g. 400059
|
|
204
|
-
* @property {string} [orderType] - The order type of shipment HomeDelivery - If
|
|
205
|
-
* the customer wants the order home-delivered PickAtStore - If the customer
|
|
206
|
-
* wants the handover of an order at the store itself.
|
|
207
|
-
* @property {PosCartApplicationModel.UpdateCartShipmentRequest} body
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* @typedef ValidateCouponForPaymentParam
|
|
212
|
-
* @property {string} [id]
|
|
213
|
-
* @property {boolean} [buyNow]
|
|
214
|
-
* @property {string} [addressId]
|
|
215
|
-
* @property {string} [paymentMode]
|
|
216
|
-
* @property {string} [paymentIdentifier]
|
|
217
|
-
* @property {string} [aggregatorName]
|
|
218
|
-
* @property {string} [merchantCode]
|
|
219
|
-
* @property {string} [iin]
|
|
220
|
-
* @property {string} [network]
|
|
221
|
-
* @property {string} [type]
|
|
222
|
-
* @property {string} [cardId]
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
class PosCartApplicationValidator {
|
|
226
|
-
/** @returns {AddAddressParam} */
|
|
227
|
-
static addAddress() {
|
|
228
|
-
return Joi.object({
|
|
229
|
-
body: PosCartApplicationModel.Address().required(),
|
|
230
|
-
}).required();
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** @returns {AddItemsParam} */
|
|
234
|
-
static addItems() {
|
|
235
|
-
return Joi.object({
|
|
236
|
-
i: Joi.boolean(),
|
|
237
|
-
b: Joi.boolean(),
|
|
238
|
-
areaCode: Joi.string().allow(""),
|
|
239
|
-
buyNow: Joi.boolean(),
|
|
240
|
-
id: Joi.string().allow(""),
|
|
241
|
-
body: PosCartApplicationModel.AddCartRequest().required(),
|
|
242
|
-
}).required();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/** @returns {ApplyCouponParam} */
|
|
246
|
-
static applyCoupon() {
|
|
247
|
-
return Joi.object({
|
|
248
|
-
i: Joi.boolean(),
|
|
249
|
-
b: Joi.boolean(),
|
|
250
|
-
p: Joi.boolean(),
|
|
251
|
-
id: Joi.string().allow(""),
|
|
252
|
-
buyNow: Joi.boolean(),
|
|
253
|
-
body: PosCartApplicationModel.ApplyCouponRequest().required(),
|
|
254
|
-
}).required();
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/** @returns {ApplyRewardPointsParam} */
|
|
258
|
-
static applyRewardPoints() {
|
|
259
|
-
return Joi.object({
|
|
260
|
-
id: Joi.string().allow(""),
|
|
261
|
-
i: Joi.boolean(),
|
|
262
|
-
b: Joi.boolean(),
|
|
263
|
-
buyNow: Joi.boolean(),
|
|
264
|
-
body: PosCartApplicationModel.RewardPointRequest().required(),
|
|
265
|
-
}).required();
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/** @returns {CheckoutCartParam} */
|
|
269
|
-
static checkoutCart() {
|
|
270
|
-
return Joi.object({
|
|
271
|
-
id: Joi.string().allow(""),
|
|
272
|
-
body: PosCartApplicationModel.CartPosCheckoutDetailRequest().required(),
|
|
273
|
-
}).required();
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/** @returns {GetAddressByIdParam} */
|
|
277
|
-
static getAddressById() {
|
|
278
|
-
return Joi.object({
|
|
279
|
-
id: Joi.string().allow("").required(),
|
|
280
|
-
cartId: Joi.string().allow(""),
|
|
281
|
-
buyNow: Joi.boolean(),
|
|
282
|
-
mobileNo: Joi.string().allow(""),
|
|
283
|
-
checkoutMode: Joi.string().allow(""),
|
|
284
|
-
tags: Joi.string().allow(""),
|
|
285
|
-
isDefault: Joi.boolean(),
|
|
286
|
-
}).required();
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/** @returns {GetAddressesParam} */
|
|
290
|
-
static getAddresses() {
|
|
291
|
-
return Joi.object({
|
|
292
|
-
cartId: Joi.string().allow(""),
|
|
293
|
-
buyNow: Joi.boolean(),
|
|
294
|
-
mobileNo: Joi.string().allow(""),
|
|
295
|
-
checkoutMode: Joi.string().allow(""),
|
|
296
|
-
tags: Joi.string().allow(""),
|
|
297
|
-
isDefault: Joi.boolean(),
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/** @returns {GetAvailableDeliveryModesParam} */
|
|
302
|
-
static getAvailableDeliveryModes() {
|
|
303
|
-
return Joi.object({
|
|
304
|
-
areaCode: Joi.string().allow("").required(),
|
|
305
|
-
id: Joi.string().allow(""),
|
|
306
|
-
}).required();
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/** @returns {GetBulkDiscountOffersParam} */
|
|
310
|
-
static getBulkDiscountOffers() {
|
|
311
|
-
return Joi.object({
|
|
312
|
-
itemId: Joi.number(),
|
|
313
|
-
articleId: Joi.string().allow(""),
|
|
314
|
-
uid: Joi.number(),
|
|
315
|
-
slug: Joi.string().allow(""),
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/** @returns {GetCartParam} */
|
|
320
|
-
static getCart() {
|
|
321
|
-
return Joi.object({
|
|
322
|
-
id: Joi.string().allow(""),
|
|
323
|
-
i: Joi.boolean(),
|
|
324
|
-
b: Joi.boolean(),
|
|
325
|
-
c: Joi.boolean(),
|
|
326
|
-
assignCardId: Joi.number(),
|
|
327
|
-
areaCode: Joi.string().allow(""),
|
|
328
|
-
buyNow: Joi.boolean(),
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/** @returns {GetCartLastModifiedParam} */
|
|
333
|
-
static getCartLastModified() {
|
|
334
|
-
return Joi.object({
|
|
335
|
-
id: Joi.string().allow(""),
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/** @returns {GetCartShareLinkParam} */
|
|
340
|
-
static getCartShareLink() {
|
|
341
|
-
return Joi.object({
|
|
342
|
-
body: PosCartApplicationModel.GetShareCartLinkRequest().required(),
|
|
343
|
-
}).required();
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/** @returns {GetCartSharedItemsParam} */
|
|
347
|
-
static getCartSharedItems() {
|
|
348
|
-
return Joi.object({
|
|
349
|
-
token: Joi.string().allow("").required(),
|
|
350
|
-
}).required();
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/** @returns {GetCouponsParam} */
|
|
354
|
-
static getCoupons() {
|
|
355
|
-
return Joi.object({
|
|
356
|
-
id: Joi.string().allow(""),
|
|
357
|
-
buyNow: Joi.boolean(),
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/** @returns {GetItemCountParam} */
|
|
362
|
-
static getItemCount() {
|
|
363
|
-
return Joi.object({
|
|
364
|
-
id: Joi.string().allow(""),
|
|
365
|
-
buyNow: Joi.boolean(),
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/** @returns {GetShipmentsParam} */
|
|
370
|
-
static getShipments() {
|
|
371
|
-
return Joi.object({
|
|
372
|
-
pickAtStoreUid: Joi.number(),
|
|
373
|
-
orderingStoreId: Joi.number(),
|
|
374
|
-
p: Joi.boolean(),
|
|
375
|
-
id: Joi.string().allow(""),
|
|
376
|
-
addressId: Joi.string().allow(""),
|
|
377
|
-
areaCode: Joi.string().allow(""),
|
|
378
|
-
orderType: Joi.string().allow(""),
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/** @returns {GetStoreAddressByUidParam} */
|
|
383
|
-
static getStoreAddressByUid() {
|
|
384
|
-
return Joi.object({
|
|
385
|
-
storeUid: Joi.number().required(),
|
|
386
|
-
}).required();
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/** @returns {RemoveAddressParam} */
|
|
390
|
-
static removeAddress() {
|
|
391
|
-
return Joi.object({
|
|
392
|
-
id: Joi.string().allow("").required(),
|
|
393
|
-
}).required();
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/** @returns {RemoveCouponParam} */
|
|
397
|
-
static removeCoupon() {
|
|
398
|
-
return Joi.object({
|
|
399
|
-
id: Joi.string().allow(""),
|
|
400
|
-
buyNow: Joi.boolean(),
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/** @returns {SelectAddressParam} */
|
|
405
|
-
static selectAddress() {
|
|
406
|
-
return Joi.object({
|
|
407
|
-
cartId: Joi.string().allow(""),
|
|
408
|
-
buyNow: Joi.boolean(),
|
|
409
|
-
i: Joi.boolean(),
|
|
410
|
-
b: Joi.boolean(),
|
|
411
|
-
body: PosCartApplicationModel.SelectCartAddressRequest().required(),
|
|
412
|
-
}).required();
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/** @returns {SelectPaymentModeParam} */
|
|
416
|
-
static selectPaymentMode() {
|
|
417
|
-
return Joi.object({
|
|
418
|
-
id: Joi.string().allow(""),
|
|
419
|
-
buyNow: Joi.boolean(),
|
|
420
|
-
body: PosCartApplicationModel.UpdateCartPaymentRequest().required(),
|
|
421
|
-
}).required();
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/** @returns {UpdateAddressParam} */
|
|
425
|
-
static updateAddress() {
|
|
426
|
-
return Joi.object({
|
|
427
|
-
id: Joi.string().allow("").required(),
|
|
428
|
-
body: PosCartApplicationModel.Address().required(),
|
|
429
|
-
}).required();
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/** @returns {UpdateCartParam} */
|
|
433
|
-
static updateCart() {
|
|
434
|
-
return Joi.object({
|
|
435
|
-
id: Joi.string().allow(""),
|
|
436
|
-
i: Joi.boolean(),
|
|
437
|
-
b: Joi.boolean(),
|
|
438
|
-
areaCode: Joi.string().allow(""),
|
|
439
|
-
buyNow: Joi.boolean(),
|
|
440
|
-
body: PosCartApplicationModel.UpdateCartRequest().required(),
|
|
441
|
-
}).required();
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/** @returns {UpdateCartMetaParam} */
|
|
445
|
-
static updateCartMeta() {
|
|
446
|
-
return Joi.object({
|
|
447
|
-
id: Joi.string().allow(""),
|
|
448
|
-
buyNow: Joi.boolean(),
|
|
449
|
-
body: PosCartApplicationModel.CartMetaRequest().required(),
|
|
450
|
-
}).required();
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
/** @returns {UpdateCartWithSharedItemsParam} */
|
|
454
|
-
static updateCartWithSharedItems() {
|
|
455
|
-
return Joi.object({
|
|
456
|
-
token: Joi.string().allow("").required(),
|
|
457
|
-
action: Joi.string().allow("").required(),
|
|
458
|
-
}).required();
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/** @returns {UpdateShipmentsParam} */
|
|
462
|
-
static updateShipments() {
|
|
463
|
-
return Joi.object({
|
|
464
|
-
i: Joi.boolean(),
|
|
465
|
-
p: Joi.boolean(),
|
|
466
|
-
id: Joi.string().allow(""),
|
|
467
|
-
addressId: Joi.string().allow(""),
|
|
468
|
-
areaCode: Joi.string().allow(""),
|
|
469
|
-
orderType: Joi.string().allow(""),
|
|
470
|
-
body: PosCartApplicationModel.UpdateCartShipmentRequest().required(),
|
|
471
|
-
}).required();
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/** @returns {ValidateCouponForPaymentParam} */
|
|
475
|
-
static validateCouponForPayment() {
|
|
476
|
-
return Joi.object({
|
|
477
|
-
id: Joi.string().allow(""),
|
|
478
|
-
buyNow: Joi.boolean(),
|
|
479
|
-
addressId: Joi.string().allow(""),
|
|
480
|
-
paymentMode: Joi.string().allow(""),
|
|
481
|
-
paymentIdentifier: Joi.string().allow(""),
|
|
482
|
-
aggregatorName: Joi.string().allow(""),
|
|
483
|
-
merchantCode: Joi.string().allow(""),
|
|
484
|
-
iin: Joi.string().allow(""),
|
|
485
|
-
network: Joi.string().allow(""),
|
|
486
|
-
type: Joi.string().allow(""),
|
|
487
|
-
cardId: Joi.string().allow(""),
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
module.exports = PosCartApplicationValidator;
|