@gofynd/fdk-client-javascript 1.0.0 → 1.0.2

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.
Files changed (156) hide show
  1. package/documentation/application/CART.md +251 -251
  2. package/documentation/application/CATALOG.md +393 -393
  3. package/documentation/application/CONTENT.md +15 -1
  4. package/documentation/application/ORDER.md +268 -268
  5. package/documentation/application/PAYMENT.md +249 -249
  6. package/documentation/application/POSCART.md +297 -297
  7. package/documentation/platform/CART.md +499 -499
  8. package/documentation/platform/CATALOG.md +3497 -3097
  9. package/documentation/platform/COMPANYPROFILE.md +207 -207
  10. package/documentation/platform/CONTENT.md +123 -1
  11. package/documentation/platform/ORDER.md +1518 -1324
  12. package/documentation/platform/PARTNER.md +7 -7
  13. package/documentation/platform/PAYMENT.md +96 -96
  14. package/index.js +7 -1
  15. package/package.json +1 -1
  16. package/sdk/application/ApplicationConfig.js +1 -1
  17. package/sdk/application/Cart/CartApplicationClient.js +865 -52
  18. package/sdk/application/Cart/CartApplicationModel.d.ts +7 -7
  19. package/sdk/application/Cart/CartApplicationModel.js +335 -335
  20. package/sdk/application/Cart/CartApplicationValidator.js +1 -0
  21. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
  22. package/sdk/application/Catalog/CatalogApplicationClient.js +1034 -60
  23. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +19 -19
  24. package/sdk/application/Catalog/CatalogApplicationModel.js +532 -532
  25. package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
  26. package/sdk/application/Common/CommonApplicationClient.js +66 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +1 -0
  28. package/sdk/application/Communication/CommunicationApplicationClient.js +108 -6
  29. package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
  30. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +1 -1
  31. package/sdk/application/Configuration/ConfigurationApplicationClient.js +558 -32
  32. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  33. package/sdk/application/Content/ContentApplicationClient.js +621 -38
  34. package/sdk/application/Content/ContentApplicationModel.d.ts +1 -0
  35. package/sdk/application/Content/ContentApplicationModel.js +11 -1
  36. package/sdk/application/Content/ContentApplicationValidator.js +1 -0
  37. package/sdk/application/FileStorage/FileStorageApplicationClient.js +101 -6
  38. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
  39. package/sdk/application/Lead/LeadApplicationClient.js +229 -14
  40. package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
  41. package/sdk/application/Logistic/LogisticApplicationClient.js +134 -8
  42. package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
  44. package/sdk/application/Order/OrderApplicationClient.js +403 -24
  45. package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
  46. package/sdk/application/Order/OrderApplicationModel.js +334 -334
  47. package/sdk/application/Order/OrderApplicationValidator.js +1 -0
  48. package/sdk/application/Payment/PaymentApplicationClient.js +1381 -78
  49. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2 -2
  50. package/sdk/application/Payment/PaymentApplicationModel.js +350 -350
  51. package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
  52. package/sdk/application/PosCart/PosCartApplicationClient.js +914 -54
  53. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +15 -15
  54. package/sdk/application/PosCart/PosCartApplicationModel.js +389 -389
  55. package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
  56. package/sdk/application/Rewards/RewardsApplicationClient.js +235 -14
  57. package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
  58. package/sdk/application/Share/ShareApplicationClient.js +226 -14
  59. package/sdk/application/Share/ShareApplicationValidator.js +1 -0
  60. package/sdk/application/Theme/ThemeApplicationClient.js +130 -8
  61. package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
  62. package/sdk/application/User/UserApplicationClient.js +1133 -70
  63. package/sdk/application/User/UserApplicationValidator.js +1 -0
  64. package/sdk/common/AxiosHelper.js +1 -1
  65. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +16 -8
  66. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +287 -16
  67. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
  68. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +153 -8
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +141 -8
  71. package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -12
  72. package/sdk/platform/Billing/BillingPlatformClient.js +429 -24
  73. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -17
  74. package/sdk/platform/Cart/CartPlatformApplicationClient.js +617 -34
  75. package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -35
  76. package/sdk/platform/Cart/CartPlatformModel.js +617 -617
  77. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +191 -138
  78. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2202 -302
  79. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +11 -11
  80. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +45 -45
  81. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +344 -226
  82. package/sdk/platform/Catalog/CatalogPlatformClient.js +3282 -488
  83. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +110 -100
  84. package/sdk/platform/Catalog/CatalogPlatformModel.js +2073 -1795
  85. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +23 -21
  86. package/sdk/platform/Catalog/CatalogPlatformValidator.js +103 -84
  87. package/sdk/platform/Common/CommonPlatformClient.d.ts +4 -2
  88. package/sdk/platform/Common/CommonPlatformClient.js +73 -4
  89. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -40
  90. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1499 -80
  91. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  92. package/sdk/platform/Communication/CommunicationPlatformClient.js +41 -2
  93. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -14
  94. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +486 -26
  95. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +9 -9
  96. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +274 -274
  97. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +56 -28
  98. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1022 -56
  99. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  100. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +693 -36
  101. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +148 -67
  102. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2446 -140
  103. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
  104. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -0
  105. package/sdk/platform/Content/ContentPlatformModel.d.ts +4 -0
  106. package/sdk/platform/Content/ContentPlatformModel.js +43 -1
  107. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +21 -10
  108. package/sdk/platform/Discount/DiscountPlatformClient.js +400 -22
  109. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +8 -4
  110. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +148 -8
  111. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +12 -6
  112. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +214 -12
  113. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +27 -14
  114. package/sdk/platform/Inventory/InventoryPlatformClient.js +449 -24
  115. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +26 -13
  116. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +447 -26
  117. package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -11
  118. package/sdk/platform/Lead/LeadPlatformClient.js +384 -22
  119. package/sdk/platform/OAuthClient.js +8 -8
  120. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -3
  121. package/sdk/platform/Order/OrderPlatformApplicationClient.js +125 -6
  122. package/sdk/platform/Order/OrderPlatformClient.d.ts +108 -47
  123. package/sdk/platform/Order/OrderPlatformClient.js +1641 -100
  124. package/sdk/platform/Order/OrderPlatformModel.d.ts +69 -58
  125. package/sdk/platform/Order/OrderPlatformModel.js +1485 -1493
  126. package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
  127. package/sdk/platform/Order/OrderPlatformValidator.js +15 -4
  128. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
  129. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -4
  130. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  131. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  132. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -11
  133. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +418 -22
  134. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +21 -11
  135. package/sdk/platform/Payment/PaymentPlatformClient.js +374 -20
  136. package/sdk/platform/Payment/PaymentPlatformModel.js +139 -139
  137. package/sdk/platform/PlatformApplicationClient.d.ts +2973 -2827
  138. package/sdk/platform/PlatformApplicationClient.js +3461 -3263
  139. package/sdk/platform/PlatformClient.d.ts +2973 -2827
  140. package/sdk/platform/PlatformClient.js +3461 -3263
  141. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +26 -13
  142. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +449 -26
  143. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +8 -4
  144. package/sdk/platform/Share/SharePlatformApplicationClient.js +139 -8
  145. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +47 -23
  146. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +816 -48
  147. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +24 -12
  148. package/sdk/platform/User/UserPlatformApplicationClient.js +417 -24
  149. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +12 -6
  150. package/sdk/platform/Webhook/WebhookPlatformClient.js +229 -12
  151. package/sdk/public/Configuration/ConfigurationPublicClient.js +72 -4
  152. package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
  153. package/sdk/public/Inventory/InventoryPublicClient.js +210 -12
  154. package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
  155. package/sdk/public/Webhook/WebhookPublicClient.js +74 -4
  156. package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
@@ -1,21 +1,35 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  class CartModel {
4
- static PaymentSelectionLock() {
4
+ static CartCurrency() {
5
5
  return Joi.object({
6
- enabled: Joi.boolean(),
6
+ code: Joi.string().allow(""),
7
+
8
+ symbol: Joi.string().allow(""),
9
+ });
10
+ }
7
11
 
12
+ static PaymentSelectionLock() {
13
+ return Joi.object({
8
14
  payment_identifier: Joi.string().allow(""),
9
15
 
16
+ enabled: Joi.boolean(),
17
+
10
18
  default_options: Joi.string().allow(""),
11
19
  });
12
20
  }
13
21
 
14
- static CartCurrency() {
22
+ static ProductAvailability() {
15
23
  return Joi.object({
16
- code: Joi.string().allow(""),
24
+ sizes: Joi.array().items(Joi.string().allow("")),
17
25
 
18
- symbol: Joi.string().allow(""),
26
+ is_valid: Joi.boolean(),
27
+
28
+ deliverable: Joi.boolean(),
29
+
30
+ other_store_quantity: Joi.number(),
31
+
32
+ out_of_stock: Joi.boolean(),
19
33
  });
20
34
  }
21
35
 
@@ -23,61 +37,61 @@ class CartModel {
23
37
  return Joi.object({
24
38
  aspect_ratio: Joi.string().allow(""),
25
39
 
26
- secure_url: Joi.string().allow(""),
27
-
28
40
  url: Joi.string().allow(""),
41
+
42
+ secure_url: Joi.string().allow(""),
29
43
  });
30
44
  }
31
45
 
32
- static ActionQuery() {
46
+ static BaseInfo() {
33
47
  return Joi.object({
34
- product_slug: Joi.array().items(Joi.string().allow("")),
48
+ name: Joi.string().allow(""),
49
+
50
+ uid: Joi.number(),
35
51
  });
36
52
  }
37
53
 
38
- static ProductAction() {
54
+ static CategoryInfo() {
39
55
  return Joi.object({
40
- url: Joi.string().allow(""),
41
-
42
- type: Joi.string().allow(""),
56
+ name: Joi.string().allow(""),
43
57
 
44
- query: CartModel.ActionQuery(),
58
+ uid: Joi.number(),
45
59
  });
46
60
  }
47
61
 
48
- static BaseInfo() {
62
+ static ActionQuery() {
49
63
  return Joi.object({
50
- uid: Joi.number(),
51
-
52
- name: Joi.string().allow(""),
64
+ product_slug: Joi.array().items(Joi.string().allow("")),
53
65
  });
54
66
  }
55
67
 
56
- static CategoryInfo() {
68
+ static ProductAction() {
57
69
  return Joi.object({
58
- uid: Joi.number(),
70
+ url: Joi.string().allow(""),
59
71
 
60
- name: Joi.string().allow(""),
72
+ query: CartModel.ActionQuery(),
73
+
74
+ type: Joi.string().allow(""),
61
75
  });
62
76
  }
63
77
 
64
78
  static CartProduct() {
65
79
  return Joi.object({
80
+ name: Joi.string().allow(""),
81
+
66
82
  images: Joi.array().items(CartModel.ProductImage()),
67
83
 
68
84
  uid: Joi.number(),
69
85
 
70
- action: CartModel.ProductAction(),
71
-
72
- type: Joi.string().allow(""),
86
+ brand: CartModel.BaseInfo(),
73
87
 
74
- name: Joi.string().allow(""),
88
+ categories: Joi.array().items(CartModel.CategoryInfo()),
75
89
 
76
- brand: CartModel.BaseInfo(),
90
+ action: CartModel.ProductAction(),
77
91
 
78
92
  slug: Joi.string().allow(""),
79
93
 
80
- categories: Joi.array().items(CartModel.CategoryInfo()),
94
+ type: Joi.string().allow(""),
81
95
  });
82
96
  }
83
97
 
@@ -85,13 +99,13 @@ class CartModel {
85
99
  return Joi.object({
86
100
  currency_code: Joi.string().allow(""),
87
101
 
88
- marked: Joi.number(),
102
+ effective: Joi.number(),
89
103
 
90
- currency_symbol: Joi.string().allow(""),
104
+ marked: Joi.number(),
91
105
 
92
106
  selling: Joi.number(),
93
107
 
94
- effective: Joi.number(),
108
+ currency_symbol: Joi.string().allow(""),
95
109
 
96
110
  add_on: Joi.number(),
97
111
  });
@@ -105,29 +119,15 @@ class CartModel {
105
119
  });
106
120
  }
107
121
 
108
- static ProductAvailability() {
109
- return Joi.object({
110
- is_valid: Joi.boolean(),
111
-
112
- sizes: Joi.array().items(Joi.string().allow("")),
113
-
114
- deliverable: Joi.boolean(),
115
-
116
- other_store_quantity: Joi.number(),
117
-
118
- out_of_stock: Joi.boolean(),
119
- });
120
- }
121
-
122
122
  static BasePrice() {
123
123
  return Joi.object({
124
124
  marked: Joi.number(),
125
125
 
126
- effective: Joi.number(),
126
+ currency_code: Joi.string().allow(""),
127
127
 
128
128
  currency_symbol: Joi.string().allow(""),
129
129
 
130
- currency_code: Joi.string().allow(""),
130
+ effective: Joi.number(),
131
131
  });
132
132
  }
133
133
 
@@ -141,27 +141,27 @@ class CartModel {
141
141
 
142
142
  static ProductArticle() {
143
143
  return Joi.object({
144
- parent_item_identifiers: Joi.any(),
144
+ store: CartModel.BaseInfo(),
145
145
 
146
- price: CartModel.ArticlePriceInfo(),
146
+ product_group_tags: Joi.array().items(Joi.string().allow("")),
147
147
 
148
148
  extra_meta: Joi.any(),
149
149
 
150
- uid: Joi.string().allow(""),
151
-
152
150
  size: Joi.string().allow(""),
153
151
 
154
- type: Joi.string().allow(""),
152
+ price: CartModel.ArticlePriceInfo(),
153
+
154
+ uid: Joi.string().allow(""),
155
155
 
156
156
  _custom_json: Joi.any(),
157
157
 
158
- product_group_tags: Joi.array().items(Joi.string().allow("")),
158
+ seller: CartModel.BaseInfo(),
159
159
 
160
160
  quantity: Joi.number(),
161
161
 
162
- seller: CartModel.BaseInfo(),
162
+ parent_item_identifiers: Joi.any(),
163
163
 
164
- store: CartModel.BaseInfo(),
164
+ type: Joi.string().allow(""),
165
165
  });
166
166
  }
167
167
 
@@ -187,63 +187,55 @@ class CartModel {
187
187
 
188
188
  static AppliedPromotion() {
189
189
  return Joi.object({
190
- offer_text: Joi.string().allow(""),
190
+ amount: Joi.number(),
191
191
 
192
- article_quantity: Joi.number(),
192
+ mrp_promotion: Joi.boolean(),
193
193
 
194
- promotion_type: Joi.string().allow(""),
194
+ promo_id: Joi.string().allow(""),
195
195
 
196
- ownership: CartModel.Ownership(),
196
+ offer_text: Joi.string().allow(""),
197
197
 
198
- mrp_promotion: Joi.boolean(),
198
+ promotion_type: Joi.string().allow(""),
199
199
 
200
- amount: Joi.number(),
200
+ ownership: CartModel.Ownership(),
201
201
 
202
- promo_id: Joi.string().allow(""),
202
+ article_quantity: Joi.number(),
203
203
  });
204
204
  }
205
205
 
206
206
  static CartProductInfo() {
207
207
  return Joi.object({
208
- is_set: Joi.boolean(),
209
-
210
- product: CartModel.CartProduct(),
211
-
212
- parent_item_identifiers: Joi.any(),
213
-
214
- price: CartModel.ProductPriceInfo(),
215
-
216
- key: Joi.string().allow(""),
217
-
218
- message: Joi.string().allow(""),
208
+ discount: Joi.string().allow(""),
219
209
 
220
210
  coupon_message: Joi.string().allow(""),
221
211
 
222
212
  availability: CartModel.ProductAvailability(),
223
213
 
224
- discount: Joi.string().allow(""),
214
+ product: CartModel.CartProduct(),
225
215
 
226
216
  price_per_unit: CartModel.ProductPriceInfo(),
227
217
 
228
218
  article: CartModel.ProductArticle(),
229
219
 
220
+ price: CartModel.ProductPriceInfo(),
221
+
222
+ is_set: Joi.boolean(),
223
+
224
+ bulk_offer: Joi.any(),
225
+
230
226
  identifiers: CartModel.CartProductIdentifer().required(),
231
227
 
232
228
  promo_meta: CartModel.PromoMeta(),
233
229
 
234
- bulk_offer: Joi.any(),
230
+ message: Joi.string().allow(""),
235
231
 
236
232
  quantity: Joi.number(),
237
233
 
238
234
  promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
239
- });
240
- }
241
235
 
242
- static PromiseTimestamp() {
243
- return Joi.object({
244
- max: Joi.number(),
236
+ parent_item_identifiers: Joi.any(),
245
237
 
246
- min: Joi.number(),
238
+ key: Joi.string().allow(""),
247
239
  });
248
240
  }
249
241
 
@@ -255,11 +247,19 @@ class CartModel {
255
247
  });
256
248
  }
257
249
 
258
- static ShipmentPromise() {
250
+ static PromiseTimestamp() {
259
251
  return Joi.object({
260
- timestamp: CartModel.PromiseTimestamp(),
252
+ max: Joi.number(),
253
+
254
+ min: Joi.number(),
255
+ });
256
+ }
261
257
 
258
+ static ShipmentPromise() {
259
+ return Joi.object({
262
260
  formatted: CartModel.PromiseFormatted(),
261
+
262
+ timestamp: CartModel.PromiseTimestamp(),
263
263
  });
264
264
  }
265
265
 
@@ -267,39 +267,39 @@ class CartModel {
267
267
  return Joi.object({
268
268
  convenience_fee: Joi.number(),
269
269
 
270
- fynd_cash: Joi.number(),
271
-
272
270
  coupon: Joi.number(),
273
271
 
274
- subtotal: Joi.number(),
272
+ discount: Joi.number(),
275
273
 
276
- gst_charges: Joi.number(),
274
+ cod_charge: Joi.number(),
277
275
 
278
- vog: Joi.number(),
276
+ mrp_total: Joi.number(),
279
277
 
280
- cod_charge: Joi.number(),
278
+ gst_charges: Joi.number(),
279
+
280
+ delivery_charge: Joi.number(),
281
281
 
282
282
  you_saved: Joi.number(),
283
283
 
284
- discount: Joi.number(),
284
+ vog: Joi.number(),
285
285
 
286
- delivery_charge: Joi.number(),
286
+ subtotal: Joi.number(),
287
287
 
288
288
  total: Joi.number(),
289
289
 
290
- mrp_total: Joi.number(),
290
+ fynd_cash: Joi.number(),
291
291
  });
292
292
  }
293
293
 
294
294
  static LoyaltyPoints() {
295
295
  return Joi.object({
296
- is_applied: Joi.boolean(),
297
-
298
- description: Joi.string().allow(""),
296
+ total: Joi.number(),
299
297
 
300
298
  applicable: Joi.number(),
301
299
 
302
- total: Joi.number(),
300
+ description: Joi.string().allow(""),
301
+
302
+ is_applied: Joi.boolean(),
303
303
  });
304
304
  }
305
305
 
@@ -307,28 +307,28 @@ class CartModel {
307
307
  return Joi.object({
308
308
  currency_code: Joi.string().allow(""),
309
309
 
310
- message: Joi.array().items(Joi.string().allow("")),
311
-
312
- key: Joi.string().allow(""),
310
+ value: Joi.number(),
313
311
 
314
312
  currency_symbol: Joi.string().allow(""),
315
313
 
316
- value: Joi.number(),
314
+ message: Joi.array().items(Joi.string().allow("")),
317
315
 
318
316
  display: Joi.string().allow(""),
317
+
318
+ key: Joi.string().allow(""),
319
319
  });
320
320
  }
321
321
 
322
322
  static CouponBreakup() {
323
323
  return Joi.object({
324
- is_applied: Joi.boolean(),
325
-
326
- message: Joi.string().allow(""),
327
-
328
324
  uid: Joi.string().allow(""),
329
325
 
326
+ is_applied: Joi.boolean(),
327
+
330
328
  value: Joi.number(),
331
329
 
330
+ message: Joi.string().allow(""),
331
+
332
332
  code: Joi.string().allow(""),
333
333
 
334
334
  type: Joi.string().allow(""),
@@ -349,67 +349,67 @@ class CartModel {
349
349
 
350
350
  static CartDetailResponse() {
351
351
  return Joi.object({
352
- is_valid: Joi.boolean(),
352
+ id: Joi.string().allow(""),
353
353
 
354
- message: Joi.string().allow(""),
354
+ checkout_mode: Joi.string().allow(""),
355
355
 
356
- id: Joi.string().allow(""),
356
+ is_valid: Joi.boolean(),
357
357
 
358
- payment_selection_lock: CartModel.PaymentSelectionLock(),
358
+ comment: Joi.string().allow(""),
359
359
 
360
360
  restrict_checkout: Joi.boolean(),
361
361
 
362
- last_modified: Joi.string().allow(""),
363
-
364
362
  currency: CartModel.CartCurrency(),
365
363
 
366
- items: Joi.array().items(CartModel.CartProductInfo()),
367
-
368
- comment: Joi.string().allow(""),
369
-
370
- delivery_promise: CartModel.ShipmentPromise(),
364
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
371
365
 
372
366
  delivery_charge_info: Joi.string().allow(""),
373
367
 
374
- checkout_mode: Joi.string().allow(""),
368
+ items: Joi.array().items(CartModel.CartProductInfo()),
369
+
370
+ last_modified: Joi.string().allow(""),
375
371
 
376
372
  buy_now: Joi.boolean(),
377
373
 
378
- breakup_values: CartModel.CartBreakup(),
374
+ message: Joi.string().allow(""),
379
375
 
380
- gstin: Joi.string().allow(""),
376
+ delivery_promise: CartModel.ShipmentPromise(),
381
377
 
382
378
  coupon_text: Joi.string().allow(""),
379
+
380
+ gstin: Joi.string().allow(""),
381
+
382
+ breakup_values: CartModel.CartBreakup(),
383
383
  });
384
384
  }
385
385
 
386
386
  static AddProductCart() {
387
387
  return Joi.object({
388
- parent_item_identifiers: Joi.any(),
388
+ product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
389
389
 
390
390
  store_id: Joi.number(),
391
391
 
392
- item_size: Joi.string().allow(""),
393
-
394
392
  extra_meta: Joi.any(),
395
393
 
396
- article_assignment: Joi.any(),
397
-
398
- item_id: Joi.number(),
399
-
400
394
  seller_id: Joi.number(),
401
395
 
402
- display: Joi.string().allow(""),
396
+ article_assignment: Joi.any(),
397
+
398
+ item_size: Joi.string().allow(""),
403
399
 
404
400
  _custom_json: Joi.any(),
405
401
 
406
- product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
402
+ item_id: Joi.number(),
403
+
404
+ pos: Joi.boolean(),
407
405
 
408
406
  article_id: Joi.string().allow(""),
409
407
 
410
408
  quantity: Joi.number(),
411
409
 
412
- pos: Joi.boolean(),
410
+ display: Joi.string().allow(""),
411
+
412
+ parent_item_identifiers: Joi.any(),
413
413
  });
414
414
  }
415
415
 
@@ -421,11 +421,11 @@ class CartModel {
421
421
 
422
422
  static AddCartDetailResponse() {
423
423
  return Joi.object({
424
- success: Joi.boolean(),
424
+ message: Joi.string().allow(""),
425
425
 
426
426
  partial: Joi.boolean(),
427
427
 
428
- message: Joi.string().allow(""),
428
+ success: Joi.boolean(),
429
429
 
430
430
  cart: CartModel.CartDetailResponse(),
431
431
  });
@@ -433,40 +433,40 @@ class CartModel {
433
433
 
434
434
  static UpdateProductCart() {
435
435
  return Joi.object({
436
- parent_item_identifiers: Joi.any(),
436
+ extra_meta: Joi.any(),
437
437
 
438
438
  item_size: Joi.string().allow(""),
439
439
 
440
- extra_meta: Joi.any(),
440
+ _custom_json: Joi.any(),
441
441
 
442
442
  item_id: Joi.number(),
443
443
 
444
444
  identifiers: CartModel.CartProductIdentifer().required(),
445
445
 
446
- _custom_json: Joi.any(),
447
-
448
- item_index: Joi.number(),
449
-
450
446
  article_id: Joi.string().allow(""),
451
447
 
452
448
  quantity: Joi.number(),
449
+
450
+ item_index: Joi.number(),
451
+
452
+ parent_item_identifiers: Joi.any(),
453
453
  });
454
454
  }
455
455
 
456
456
  static UpdateCartRequest() {
457
457
  return Joi.object({
458
- operation: Joi.string().allow("").required(),
459
-
460
458
  items: Joi.array().items(CartModel.UpdateProductCart()),
459
+
460
+ operation: Joi.string().allow("").required(),
461
461
  });
462
462
  }
463
463
 
464
464
  static UpdateCartDetailResponse() {
465
465
  return Joi.object({
466
- success: Joi.boolean(),
467
-
468
466
  message: Joi.string().allow(""),
469
467
 
468
+ success: Joi.boolean(),
469
+
470
470
  cart: CartModel.CartDetailResponse(),
471
471
  });
472
472
  }
@@ -481,37 +481,37 @@ class CartModel {
481
481
  return Joi.object({
482
482
  has_previous: Joi.boolean(),
483
483
 
484
- current: Joi.number(),
485
-
486
- total: Joi.number(),
484
+ has_next: Joi.boolean(),
487
485
 
488
486
  total_item_count: Joi.number(),
489
487
 
490
- has_next: Joi.boolean(),
488
+ current: Joi.number(),
489
+
490
+ total: Joi.number(),
491
491
  });
492
492
  }
493
493
 
494
494
  static Coupon() {
495
495
  return Joi.object({
496
- is_applied: Joi.boolean(),
497
-
498
- message: Joi.string().allow(""),
499
-
500
496
  max_discount_value: Joi.number(),
501
497
 
502
- sub_title: Joi.string().allow(""),
498
+ minimum_cart_value: Joi.number(),
503
499
 
504
- is_applicable: Joi.boolean(),
500
+ is_applied: Joi.boolean(),
501
+
502
+ title: Joi.string().allow(""),
505
503
 
506
504
  coupon_code: Joi.string().allow(""),
507
505
 
508
- minimum_cart_value: Joi.number(),
506
+ sub_title: Joi.string().allow(""),
509
507
 
510
- coupon_value: Joi.number(),
508
+ message: Joi.string().allow(""),
511
509
 
512
510
  expires_on: Joi.string().allow(""),
513
511
 
514
- title: Joi.string().allow(""),
512
+ is_applicable: Joi.boolean(),
513
+
514
+ coupon_value: Joi.number(),
515
515
  });
516
516
  }
517
517
 
@@ -529,51 +529,51 @@ class CartModel {
529
529
  });
530
530
  }
531
531
 
532
- static OfferSeller() {
533
- return Joi.object({
534
- uid: Joi.number(),
535
-
536
- name: Joi.string().allow(""),
537
- });
538
- }
539
-
540
532
  static OfferPrice() {
541
533
  return Joi.object({
542
534
  currency_code: Joi.string().allow(""),
543
535
 
544
- marked: Joi.number(),
545
-
546
- currency_symbol: Joi.string().allow(""),
547
-
548
536
  effective: Joi.number(),
549
537
 
538
+ marked: Joi.number(),
539
+
550
540
  bulk_effective: Joi.number(),
541
+
542
+ currency_symbol: Joi.string().allow(""),
551
543
  });
552
544
  }
553
545
 
554
546
  static OfferItem() {
555
547
  return Joi.object({
556
- price: CartModel.OfferPrice(),
548
+ best: Joi.boolean(),
557
549
 
558
- type: Joi.string().allow(""),
550
+ price: CartModel.OfferPrice(),
559
551
 
560
552
  margin: Joi.number(),
561
553
 
562
- best: Joi.boolean(),
554
+ quantity: Joi.number(),
563
555
 
564
556
  total: Joi.number(),
565
557
 
566
- quantity: Joi.number(),
567
-
568
558
  auto_applied: Joi.boolean(),
559
+
560
+ type: Joi.string().allow(""),
569
561
  });
570
562
  }
571
563
 
572
- static BulkPriceOffer() {
564
+ static OfferSeller() {
573
565
  return Joi.object({
574
- seller: CartModel.OfferSeller(),
566
+ name: Joi.string().allow(""),
575
567
 
568
+ uid: Joi.number(),
569
+ });
570
+ }
571
+
572
+ static BulkPriceOffer() {
573
+ return Joi.object({
576
574
  offers: Joi.array().items(CartModel.OfferItem()),
575
+
576
+ seller: CartModel.OfferSeller(),
577
577
  });
578
578
  }
579
579
 
@@ -591,61 +591,61 @@ class CartModel {
591
591
 
592
592
  static GeoLocation() {
593
593
  return Joi.object({
594
- latitude: Joi.number(),
595
-
596
594
  longitude: Joi.number(),
595
+
596
+ latitude: Joi.number(),
597
597
  });
598
598
  }
599
599
 
600
600
  static Address() {
601
601
  return Joi.object({
602
- country_phone_code: Joi.string().allow(""),
602
+ name: Joi.string().allow(""),
603
603
 
604
- google_map_point: Joi.any(),
604
+ is_default_address: Joi.boolean(),
605
605
 
606
- area: Joi.string().allow(""),
606
+ country_code: Joi.string().allow(""),
607
607
 
608
- area_code_slug: Joi.string().allow(""),
608
+ geo_location: CartModel.GeoLocation(),
609
609
 
610
- address: Joi.string().allow(""),
610
+ user_id: Joi.string().allow(""),
611
611
 
612
- city: Joi.string().allow(""),
612
+ area_code: Joi.string().allow(""),
613
613
 
614
- id: Joi.string().allow(""),
614
+ tags: Joi.array().items(Joi.string().allow("")),
615
615
 
616
- is_active: Joi.boolean(),
616
+ area: Joi.string().allow(""),
617
617
 
618
- country_iso_code: Joi.string().allow(""),
618
+ meta: Joi.any(),
619
619
 
620
- area_code: Joi.string().allow(""),
620
+ country: Joi.string().allow(""),
621
621
 
622
- user_id: Joi.string().allow(""),
622
+ address: Joi.string().allow(""),
623
623
 
624
- name: Joi.string().allow(""),
624
+ state: Joi.string().allow(""),
625
625
 
626
- landmark: Joi.string().allow(""),
626
+ checkout_mode: Joi.string().allow(""),
627
627
 
628
- geo_location: CartModel.GeoLocation(),
628
+ is_active: Joi.boolean(),
629
629
 
630
- country: Joi.string().allow(""),
630
+ phone: Joi.string().allow(""),
631
631
 
632
- country_code: Joi.string().allow(""),
632
+ google_map_point: Joi.any(),
633
633
 
634
- email: Joi.string().allow(""),
634
+ id: Joi.string().allow(""),
635
635
 
636
- state: Joi.string().allow(""),
636
+ address_type: Joi.string().allow(""),
637
637
 
638
- meta: Joi.any(),
638
+ area_code_slug: Joi.string().allow(""),
639
639
 
640
- is_default_address: Joi.boolean(),
640
+ country_iso_code: Joi.string().allow(""),
641
641
 
642
- phone: Joi.string().allow(""),
642
+ city: Joi.string().allow(""),
643
643
 
644
- checkout_mode: Joi.string().allow(""),
644
+ country_phone_code: Joi.string().allow(""),
645
645
 
646
- tags: Joi.array().items(Joi.string().allow("")),
646
+ email: Joi.string().allow(""),
647
647
 
648
- address_type: Joi.string().allow(""),
648
+ landmark: Joi.string().allow(""),
649
649
  });
650
650
  }
651
651
 
@@ -669,11 +669,11 @@ class CartModel {
669
669
  return Joi.object({
670
670
  id: Joi.string().allow(""),
671
671
 
672
- is_updated: Joi.boolean(),
673
-
674
672
  is_default_address: Joi.boolean(),
675
673
 
676
674
  success: Joi.boolean(),
675
+
676
+ is_updated: Joi.boolean(),
677
677
  });
678
678
  }
679
679
 
@@ -687,10 +687,10 @@ class CartModel {
687
687
 
688
688
  static SelectCartAddressRequest() {
689
689
  return Joi.object({
690
- billing_address_id: Joi.string().allow(""),
691
-
692
690
  id: Joi.string().allow(""),
693
691
 
692
+ billing_address_id: Joi.string().allow(""),
693
+
694
694
  cart_id: Joi.string().allow(""),
695
695
  });
696
696
  }
@@ -699,243 +699,243 @@ class CartModel {
699
699
  return Joi.object({
700
700
  id: Joi.string().allow(""),
701
701
 
702
- aggregator_name: Joi.string().allow(""),
703
-
704
- merchant_code: Joi.string().allow(""),
702
+ payment_mode: Joi.string().allow(""),
705
703
 
706
704
  payment_identifier: Joi.string().allow("").allow(null),
707
705
 
708
- payment_mode: Joi.string().allow(""),
706
+ aggregator_name: Joi.string().allow(""),
709
707
 
710
708
  address_id: Joi.string().allow(""),
709
+
710
+ merchant_code: Joi.string().allow(""),
711
711
  });
712
712
  }
713
713
 
714
714
  static CouponValidity() {
715
715
  return Joi.object({
716
- display_message_en: Joi.string().allow("").allow(null),
716
+ valid: Joi.boolean(),
717
717
 
718
718
  discount: Joi.number(),
719
719
 
720
- valid: Joi.boolean(),
720
+ title: Joi.string().allow(""),
721
721
 
722
- code: Joi.string().allow("").allow(null),
722
+ display_message_en: Joi.string().allow("").allow(null),
723
723
 
724
- title: Joi.string().allow(""),
724
+ code: Joi.string().allow("").allow(null),
725
725
  });
726
726
  }
727
727
 
728
728
  static PaymentCouponValidate() {
729
729
  return Joi.object({
730
+ message: Joi.string().allow(""),
731
+
730
732
  coupon_validity: CartModel.CouponValidity(),
731
733
 
732
734
  success: Joi.boolean().required(),
733
-
734
- message: Joi.string().allow(""),
735
735
  });
736
736
  }
737
737
 
738
738
  static ShipmentResponse() {
739
739
  return Joi.object({
740
- box_type: Joi.string().allow("").allow(null),
741
-
742
- promise: CartModel.ShipmentPromise(),
740
+ fulfillment_type: Joi.string().allow(""),
743
741
 
744
742
  dp_options: Joi.any().allow(null),
745
743
 
746
- dp_id: Joi.string().allow("").allow(null),
744
+ shipment_type: Joi.string().allow(""),
747
745
 
748
- items: Joi.array().items(CartModel.CartProductInfo()),
746
+ order_type: Joi.string().allow(""),
749
747
 
750
- shipment_type: Joi.string().allow(""),
748
+ promise: CartModel.ShipmentPromise(),
751
749
 
752
- fulfillment_type: Joi.string().allow(""),
750
+ items: Joi.array().items(CartModel.CartProductInfo()),
753
751
 
754
- fulfillment_id: Joi.number(),
752
+ box_type: Joi.string().allow("").allow(null),
755
753
 
756
- order_type: Joi.string().allow(""),
754
+ dp_id: Joi.string().allow("").allow(null),
757
755
 
758
756
  shipments: Joi.number(),
757
+
758
+ fulfillment_id: Joi.number(),
759
759
  });
760
760
  }
761
761
 
762
762
  static CartShipmentsResponse() {
763
763
  return Joi.object({
764
- is_valid: Joi.boolean(),
765
-
766
- message: Joi.string().allow(""),
764
+ checkout_mode: Joi.string().allow(""),
767
765
 
768
- payment_selection_lock: CartModel.PaymentSelectionLock(),
766
+ is_valid: Joi.boolean(),
769
767
 
770
- uid: Joi.string().allow(""),
768
+ comment: Joi.string().allow(""),
771
769
 
772
770
  restrict_checkout: Joi.boolean(),
773
771
 
774
- last_modified: Joi.string().allow(""),
775
-
776
- comment: Joi.string().allow(""),
772
+ currency: CartModel.CartCurrency(),
777
773
 
778
- delivery_charge_info: Joi.string().allow(""),
774
+ uid: Joi.string().allow(""),
779
775
 
780
776
  buy_now: Joi.boolean(),
781
777
 
782
- breakup_values: CartModel.CartBreakup(),
778
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
783
779
 
784
- gstin: Joi.string().allow(""),
780
+ message: Joi.string().allow(""),
785
781
 
786
- id: Joi.string().allow(""),
782
+ delivery_promise: CartModel.ShipmentPromise(),
787
783
 
788
- cart_id: Joi.number(),
784
+ shipments: Joi.array().items(CartModel.ShipmentResponse()),
789
785
 
790
- currency: CartModel.CartCurrency(),
786
+ id: Joi.string().allow(""),
791
787
 
792
788
  error: Joi.boolean(),
793
789
 
794
- delivery_promise: CartModel.ShipmentPromise(),
790
+ delivery_charge_info: Joi.string().allow(""),
795
791
 
796
- checkout_mode: Joi.string().allow(""),
792
+ last_modified: Joi.string().allow(""),
797
793
 
798
- shipments: Joi.array().items(CartModel.ShipmentResponse()),
794
+ cart_id: Joi.number(),
799
795
 
800
796
  coupon_text: Joi.string().allow(""),
801
- });
802
- }
803
797
 
804
- static CartCheckoutCustomMeta() {
805
- return Joi.object({
806
- value: Joi.string().allow("").required(),
798
+ gstin: Joi.string().allow(""),
807
799
 
808
- key: Joi.string().allow("").required(),
800
+ breakup_values: CartModel.CartBreakup(),
809
801
  });
810
802
  }
811
803
 
812
804
  static StaffCheckout() {
813
805
  return Joi.object({
806
+ last_name: Joi.string().allow("").required(),
807
+
808
+ employee_code: Joi.string().allow(""),
809
+
810
+ user: Joi.string().allow("").required(),
811
+
814
812
  _id: Joi.string().allow("").required(),
815
813
 
816
814
  first_name: Joi.string().allow("").required(),
815
+ });
816
+ }
817
817
 
818
- employee_code: Joi.string().allow(""),
819
-
820
- last_name: Joi.string().allow("").required(),
818
+ static CartCheckoutCustomMeta() {
819
+ return Joi.object({
820
+ value: Joi.string().allow("").required(),
821
821
 
822
- user: Joi.string().allow("").required(),
822
+ key: Joi.string().allow("").required(),
823
823
  });
824
824
  }
825
825
 
826
826
  static CartCheckoutDetailRequest() {
827
827
  return Joi.object({
828
- ordering_store: Joi.number().allow(null),
828
+ delivery_address: Joi.any(),
829
829
 
830
- custom_meta: Joi.array().items(CartModel.CartCheckoutCustomMeta()),
830
+ payment_mode: Joi.string().allow("").required(),
831
831
 
832
- aggregator: Joi.string().allow(""),
832
+ meta: Joi.any(),
833
833
 
834
834
  extra_meta: Joi.any(),
835
835
 
836
- meta: Joi.any(),
836
+ staff: CartModel.StaffCheckout(),
837
837
 
838
- billing_address_id: Joi.string().allow(""),
838
+ aggregator: Joi.string().allow(""),
839
839
 
840
- payment_params: Joi.any().allow(null),
840
+ payment_identifier: Joi.string().allow("").allow(null),
841
841
 
842
- delivery_address: Joi.any(),
842
+ ordering_store: Joi.number().allow(null),
843
+
844
+ payment_params: Joi.any().allow(null),
843
845
 
844
846
  callback_url: Joi.string().allow("").allow(null),
845
847
 
846
- merchant_code: Joi.string().allow(""),
848
+ address_id: Joi.string().allow(""),
847
849
 
848
- payment_identifier: Joi.string().allow("").allow(null),
850
+ billing_address_id: Joi.string().allow(""),
849
851
 
850
- billing_address: Joi.any(),
852
+ custom_meta: Joi.array().items(CartModel.CartCheckoutCustomMeta()),
851
853
 
852
- payment_mode: Joi.string().allow("").required(),
854
+ billing_address: Joi.any(),
853
855
 
854
- staff: CartModel.StaffCheckout(),
856
+ merchant_code: Joi.string().allow(""),
855
857
 
856
858
  payment_auto_confirm: Joi.boolean(),
857
-
858
- address_id: Joi.string().allow(""),
859
859
  });
860
860
  }
861
861
 
862
862
  static CheckCart() {
863
863
  return Joi.object({
864
- payment_selection_lock: CartModel.PaymentSelectionLock(),
864
+ is_valid: Joi.boolean(),
865
865
 
866
- uid: Joi.string().allow(""),
866
+ error_message: Joi.string().allow(""),
867
867
 
868
- items: Joi.array().items(CartModel.CartProductInfo()),
868
+ restrict_checkout: Joi.boolean(),
869
869
 
870
- delivery_charge_info: Joi.string().allow(""),
870
+ currency: CartModel.CartCurrency(),
871
871
 
872
- delivery_charge_order_value: Joi.number(),
872
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
873
873
 
874
- breakup_values: CartModel.CartBreakup(),
874
+ cod_available: Joi.boolean(),
875
875
 
876
876
  cod_charges: Joi.number(),
877
877
 
878
- id: Joi.string().allow(""),
879
-
880
- cart_id: Joi.number(),
878
+ store_emps: Joi.array().items(Joi.any()),
881
879
 
882
880
  cod_message: Joi.string().allow(""),
883
881
 
884
- error_message: Joi.string().allow(""),
882
+ store_code: Joi.string().allow(""),
885
883
 
886
- currency: CartModel.CartCurrency(),
884
+ delivery_charge_info: Joi.string().allow(""),
887
885
 
888
- store_emps: Joi.array().items(Joi.any()),
886
+ coupon_text: Joi.string().allow(""),
887
+
888
+ checkout_mode: Joi.string().allow(""),
889
+
890
+ comment: Joi.string().allow(""),
889
891
 
890
892
  delivery_charges: Joi.number(),
891
893
 
892
- is_valid: Joi.boolean(),
894
+ uid: Joi.string().allow(""),
893
895
 
894
- message: Joi.string().allow(""),
896
+ buy_now: Joi.boolean(),
895
897
 
896
- coupon_text: Joi.string().allow(""),
898
+ message: Joi.string().allow(""),
897
899
 
898
- restrict_checkout: Joi.boolean(),
900
+ delivery_promise: CartModel.ShipmentPromise(),
899
901
 
900
- last_modified: Joi.string().allow(""),
902
+ user_type: Joi.string().allow(""),
901
903
 
902
- comment: Joi.string().allow(""),
904
+ id: Joi.string().allow(""),
903
905
 
904
906
  success: Joi.boolean(),
905
907
 
906
- buy_now: Joi.boolean(),
907
-
908
- gstin: Joi.string().allow(""),
908
+ delivery_charge_order_value: Joi.number(),
909
909
 
910
- order_id: Joi.string().allow(""),
910
+ items: Joi.array().items(CartModel.CartProductInfo()),
911
911
 
912
- cod_available: Joi.boolean(),
912
+ last_modified: Joi.string().allow(""),
913
913
 
914
- checkout_mode: Joi.string().allow(""),
914
+ order_id: Joi.string().allow(""),
915
915
 
916
- user_type: Joi.string().allow(""),
916
+ cart_id: Joi.number(),
917
917
 
918
- store_code: Joi.string().allow(""),
918
+ gstin: Joi.string().allow(""),
919
919
 
920
- delivery_promise: CartModel.ShipmentPromise(),
920
+ breakup_values: CartModel.CartBreakup(),
921
921
  });
922
922
  }
923
923
 
924
924
  static CartCheckoutResponse() {
925
925
  return Joi.object({
926
- message: Joi.string().allow(""),
927
-
928
- order_id: Joi.string().allow(""),
929
-
930
- data: Joi.any(),
926
+ success: Joi.boolean(),
931
927
 
932
928
  callback_url: Joi.string().allow(""),
933
929
 
934
930
  app_intercept_url: Joi.string().allow(""),
935
931
 
932
+ order_id: Joi.string().allow(""),
933
+
936
934
  payment_confirm_url: Joi.string().allow(""),
937
935
 
938
- success: Joi.boolean(),
936
+ message: Joi.string().allow(""),
937
+
938
+ data: Joi.any(),
939
939
 
940
940
  cart: CartModel.CheckCart(),
941
941
  });
@@ -943,13 +943,13 @@ class CartModel {
943
943
 
944
944
  static CartMetaRequest() {
945
945
  return Joi.object({
946
- comment: Joi.string().allow(""),
947
-
948
946
  checkout_mode: Joi.string().allow(""),
949
947
 
950
- pick_up_customer_details: Joi.any(),
948
+ comment: Joi.string().allow(""),
951
949
 
952
950
  gstin: Joi.string().allow(""),
951
+
952
+ pick_up_customer_details: Joi.any(),
953
953
  });
954
954
  }
955
955
 
@@ -967,9 +967,9 @@ class CartModel {
967
967
 
968
968
  static GetShareCartLinkRequest() {
969
969
  return Joi.object({
970
- meta: Joi.any(),
971
-
972
970
  id: Joi.string().allow(""),
971
+
972
+ meta: Joi.any(),
973
973
  });
974
974
  }
975
975
 
@@ -987,53 +987,53 @@ class CartModel {
987
987
 
988
988
  token: Joi.string().allow(""),
989
989
 
990
+ user: Joi.any(),
991
+
990
992
  source: Joi.any(),
991
993
 
992
994
  created_on: Joi.string().allow(""),
993
-
994
- user: Joi.any(),
995
995
  });
996
996
  }
997
997
 
998
998
  static SharedCart() {
999
999
  return Joi.object({
1000
- payment_selection_lock: CartModel.PaymentSelectionLock(),
1000
+ is_valid: Joi.boolean(),
1001
1001
 
1002
- uid: Joi.string().allow(""),
1002
+ restrict_checkout: Joi.boolean(),
1003
1003
 
1004
- items: Joi.array().items(CartModel.CartProductInfo()),
1004
+ currency: CartModel.CartCurrency(),
1005
+
1006
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
1007
+
1008
+ shared_cart_details: CartModel.SharedCartDetails(),
1005
1009
 
1006
1010
  delivery_charge_info: Joi.string().allow(""),
1007
1011
 
1008
- breakup_values: CartModel.CartBreakup(),
1012
+ coupon_text: Joi.string().allow(""),
1009
1013
 
1010
- id: Joi.string().allow(""),
1014
+ checkout_mode: Joi.string().allow(""),
1011
1015
 
1012
- cart_id: Joi.number(),
1016
+ comment: Joi.string().allow(""),
1013
1017
 
1014
- currency: CartModel.CartCurrency(),
1018
+ uid: Joi.string().allow(""),
1015
1019
 
1016
- is_valid: Joi.boolean(),
1020
+ buy_now: Joi.boolean(),
1017
1021
 
1018
1022
  message: Joi.string().allow(""),
1019
1023
 
1020
- coupon_text: Joi.string().allow(""),
1021
-
1022
- restrict_checkout: Joi.boolean(),
1024
+ delivery_promise: CartModel.ShipmentPromise(),
1023
1025
 
1024
- last_modified: Joi.string().allow(""),
1026
+ id: Joi.string().allow(""),
1025
1027
 
1026
- comment: Joi.string().allow(""),
1028
+ items: Joi.array().items(CartModel.CartProductInfo()),
1027
1029
 
1028
- shared_cart_details: CartModel.SharedCartDetails(),
1030
+ last_modified: Joi.string().allow(""),
1029
1031
 
1030
- buy_now: Joi.boolean(),
1032
+ cart_id: Joi.number(),
1031
1033
 
1032
1034
  gstin: Joi.string().allow(""),
1033
1035
 
1034
- checkout_mode: Joi.string().allow(""),
1035
-
1036
- delivery_promise: CartModel.ShipmentPromise(),
1036
+ breakup_values: CartModel.CartBreakup(),
1037
1037
  });
1038
1038
  }
1039
1039
 
@@ -1047,14 +1047,14 @@ class CartModel {
1047
1047
 
1048
1048
  static PromotionOffer() {
1049
1049
  return Joi.object({
1050
- offer_text: Joi.string().allow(""),
1051
-
1052
- promotion_group: Joi.string().allow(""),
1053
-
1054
1050
  id: Joi.string().allow(""),
1055
1051
 
1052
+ offer_text: Joi.string().allow(""),
1053
+
1056
1054
  description: Joi.string().allow(""),
1057
1055
 
1056
+ promotion_group: Joi.string().allow(""),
1057
+
1058
1058
  valid_till: Joi.string().allow(""),
1059
1059
  });
1060
1060
  }
@@ -1067,9 +1067,9 @@ class CartModel {
1067
1067
 
1068
1068
  static OperationErrorResponse() {
1069
1069
  return Joi.object({
1070
- success: Joi.boolean(),
1071
-
1072
1070
  message: Joi.string().allow(""),
1071
+
1072
+ success: Joi.boolean(),
1073
1073
  });
1074
1074
  }
1075
1075
 
@@ -1085,42 +1085,42 @@ class CartModel {
1085
1085
  return Joi.object({
1086
1086
  currency_code: Joi.string().allow(""),
1087
1087
 
1088
- offer_price: Joi.number(),
1088
+ effective: Joi.number(),
1089
1089
 
1090
1090
  marked: Joi.number(),
1091
1091
 
1092
1092
  currency_symbol: Joi.string().allow(""),
1093
1093
 
1094
- effective: Joi.number(),
1094
+ offer_price: Joi.number(),
1095
1095
  });
1096
1096
  }
1097
1097
 
1098
1098
  static LadderOfferItem() {
1099
1099
  return Joi.object({
1100
+ max_quantity: Joi.number(),
1101
+
1100
1102
  price: CartModel.LadderPrice(),
1101
1103
 
1102
- min_quantity: Joi.number(),
1104
+ margin: Joi.number(),
1103
1105
 
1104
- max_quantity: Joi.number(),
1106
+ min_quantity: Joi.number(),
1105
1107
 
1106
1108
  type: Joi.string().allow(""),
1107
-
1108
- margin: Joi.number(),
1109
1109
  });
1110
1110
  }
1111
1111
 
1112
1112
  static LadderPriceOffer() {
1113
1113
  return Joi.object({
1114
- offer_text: Joi.string().allow(""),
1115
-
1116
- promotion_group: Joi.string().allow(""),
1117
-
1118
1114
  id: Joi.string().allow(""),
1119
1115
 
1120
1116
  offer_prices: Joi.array().items(CartModel.LadderOfferItem()),
1121
1117
 
1118
+ offer_text: Joi.string().allow(""),
1119
+
1122
1120
  description: Joi.string().allow(""),
1123
1121
 
1122
+ promotion_group: Joi.string().allow(""),
1123
+
1124
1124
  valid_till: Joi.string().allow(""),
1125
1125
  });
1126
1126
  }