@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,127 +1,83 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  class CartModel {
4
- static Ownership() {
5
- return Joi.object({
6
- payable_category: Joi.string().allow("").required(),
7
-
8
- payable_by: Joi.string().allow("").required(),
9
- });
10
- }
11
-
12
- static DisplayMetaDict() {
13
- return Joi.object({
14
- title: Joi.string().allow(""),
15
-
16
- subtitle: Joi.string().allow(""),
17
- });
18
- }
19
-
20
- static DisplayMeta() {
4
+ static Page() {
21
5
  return Joi.object({
22
- apply: CartModel.DisplayMetaDict(),
6
+ item_total: Joi.number(),
23
7
 
24
- description: Joi.string().allow(""),
8
+ next_id: Joi.string().allow(""),
25
9
 
26
- remove: CartModel.DisplayMetaDict(),
10
+ has_previous: Joi.boolean(),
27
11
 
28
- title: Joi.string().allow(""),
12
+ has_next: Joi.boolean(),
29
13
 
30
- subtitle: Joi.string().allow(""),
14
+ current: Joi.number(),
31
15
 
32
- auto: CartModel.DisplayMetaDict(),
33
- });
34
- }
16
+ type: Joi.string().allow("").required(),
35
17
 
36
- static Validity() {
37
- return Joi.object({
38
- priority: Joi.number(),
18
+ size: Joi.number(),
39
19
  });
40
20
  }
41
21
 
42
- static CouponSchedule() {
22
+ static Validation() {
43
23
  return Joi.object({
44
- start: Joi.string().allow(""),
45
-
46
- next_schedule: Joi.array().items(Joi.any()),
47
-
48
- duration: Joi.number().allow(null),
24
+ user_registered_after: Joi.string().allow("").allow(null),
49
25
 
50
- end: Joi.string().allow("").allow(null),
26
+ anonymous: Joi.boolean(),
51
27
 
52
- cron: Joi.string().allow("").allow(null),
28
+ app_id: Joi.array().items(Joi.string().allow("")),
53
29
  });
54
30
  }
55
31
 
56
- static Rule() {
32
+ static RuleDefinition() {
57
33
  return Joi.object({
58
- max: Joi.number(),
59
-
60
- min: Joi.number(),
61
-
62
- discount_qty: Joi.number(),
34
+ type: Joi.string().allow("").required(),
63
35
 
64
- key: Joi.number(),
36
+ currency_code: Joi.string().allow(""),
65
37
 
66
- value: Joi.number(),
67
- });
68
- }
38
+ scope: Joi.array().items(Joi.string().allow("")),
69
39
 
70
- static RuleDefinition() {
71
- return Joi.object({
72
- applicable_on: Joi.string().allow("").required(),
40
+ calculate_on: Joi.string().allow("").required(),
73
41
 
74
42
  is_exact: Joi.boolean(),
75
43
 
76
- currency_code: Joi.string().allow(""),
44
+ auto_apply: Joi.boolean(),
77
45
 
78
46
  value_type: Joi.string().allow("").required(),
79
47
 
80
- scope: Joi.array().items(Joi.string().allow("")),
48
+ applicable_on: Joi.string().allow("").required(),
49
+ });
50
+ }
81
51
 
82
- auto_apply: Joi.boolean(),
52
+ static State() {
53
+ return Joi.object({
54
+ is_display: Joi.boolean(),
83
55
 
84
- calculate_on: Joi.string().allow("").required(),
56
+ is_public: Joi.boolean(),
85
57
 
86
- type: Joi.string().allow("").required(),
58
+ is_archived: Joi.boolean(),
87
59
  });
88
60
  }
89
61
 
90
- static CouponAction() {
62
+ static CouponAuthor() {
91
63
  return Joi.object({
92
- txn_mode: Joi.string().allow(""),
64
+ created_by: Joi.string().allow("").allow(null),
93
65
 
94
- action_date: Joi.string().allow("").allow(null),
66
+ modified_by: Joi.string().allow("").allow(null),
95
67
  });
96
68
  }
97
69
 
98
- static CouponDateMeta() {
70
+ static Validity() {
99
71
  return Joi.object({
100
- modified_on: Joi.string().allow("").allow(null),
101
-
102
- created_on: Joi.string().allow("").allow(null),
72
+ priority: Joi.number(),
103
73
  });
104
74
  }
105
75
 
106
- static Identifier() {
76
+ static CouponDateMeta() {
107
77
  return Joi.object({
108
- item_id: Joi.array().items(Joi.number()),
109
-
110
- user_id: Joi.array().items(Joi.string().allow("")),
111
-
112
- collection_id: Joi.array().items(Joi.string().allow("")),
113
-
114
- store_id: Joi.array().items(Joi.number()),
115
-
116
- brand_id: Joi.array().items(Joi.number()),
117
-
118
- category_id: Joi.array().items(Joi.number()),
119
-
120
- article_id: Joi.array().items(Joi.string().allow("")),
121
-
122
- exclude_brand_id: Joi.array().items(Joi.number()),
78
+ modified_on: Joi.string().allow("").allow(null),
123
79
 
124
- company_id: Joi.array().items(Joi.number()),
80
+ created_on: Joi.string().allow("").allow(null),
125
81
  });
126
82
  }
127
83
 
@@ -133,31 +89,45 @@ class CartModel {
133
89
 
134
90
  static PaymentModes() {
135
91
  return Joi.object({
136
- codes: Joi.array().items(Joi.string().allow("")),
137
-
138
92
  uses: CartModel.PaymentAllowValue(),
139
93
 
94
+ codes: Joi.array().items(Joi.string().allow("")),
95
+
140
96
  networks: Joi.array().items(Joi.string().allow("")),
141
97
 
142
98
  types: Joi.array().items(Joi.string().allow("")),
143
99
  });
144
100
  }
145
101
 
146
- static UsesRemaining() {
102
+ static BulkBundleRestriction() {
147
103
  return Joi.object({
148
- app: Joi.number(),
104
+ multi_store_allowed: Joi.boolean().required(),
105
+ });
106
+ }
149
107
 
108
+ static UsesRemaining() {
109
+ return Joi.object({
150
110
  total: Joi.number(),
151
111
 
152
112
  user: Joi.number(),
113
+
114
+ app: Joi.number(),
153
115
  });
154
116
  }
155
117
 
156
118
  static UsesRestriction() {
157
119
  return Joi.object({
120
+ maximum: CartModel.UsesRemaining(),
121
+
158
122
  remaining: CartModel.UsesRemaining(),
123
+ });
124
+ }
159
125
 
160
- maximum: CartModel.UsesRemaining(),
126
+ static PostOrder() {
127
+ return Joi.object({
128
+ return_allowed: Joi.boolean(),
129
+
130
+ cancellation_allowed: Joi.boolean(),
161
131
  });
162
132
  }
163
133
 
@@ -169,229 +139,293 @@ class CartModel {
169
139
  });
170
140
  }
171
141
 
172
- static BulkBundleRestriction() {
142
+ static Restrictions() {
173
143
  return Joi.object({
174
- multi_store_allowed: Joi.boolean().required(),
144
+ payments: Joi.object().pattern(/\S/, this.PaymentModes()),
145
+
146
+ bulk_bundle: CartModel.BulkBundleRestriction(),
147
+
148
+ uses: CartModel.UsesRestriction(),
149
+
150
+ platforms: Joi.array().items(Joi.string().allow("")),
151
+
152
+ post_order: CartModel.PostOrder(),
153
+
154
+ coupon_allowed: Joi.boolean(),
155
+
156
+ ordering_stores: Joi.array().items(Joi.number()),
157
+
158
+ user_groups: Joi.array().items(Joi.number()),
159
+
160
+ price_range: CartModel.PriceRange(),
175
161
  });
176
162
  }
177
163
 
178
- static PostOrder() {
164
+ static CouponAction() {
179
165
  return Joi.object({
180
- return_allowed: Joi.boolean(),
166
+ action_date: Joi.string().allow("").allow(null),
181
167
 
182
- cancellation_allowed: Joi.boolean(),
168
+ txn_mode: Joi.string().allow(""),
183
169
  });
184
170
  }
185
171
 
186
- static Restrictions() {
172
+ static CouponSchedule() {
187
173
  return Joi.object({
188
- ordering_stores: Joi.array().items(Joi.number()),
174
+ cron: Joi.string().allow("").allow(null),
189
175
 
190
- user_groups: Joi.array().items(Joi.number()),
176
+ start: Joi.string().allow(""),
191
177
 
192
- payments: Joi.object().pattern(/\S/, this.PaymentModes()),
178
+ end: Joi.string().allow("").allow(null),
193
179
 
194
- platforms: Joi.array().items(Joi.string().allow("")),
180
+ duration: Joi.number().allow(null),
195
181
 
196
- uses: CartModel.UsesRestriction(),
182
+ next_schedule: Joi.array().items(Joi.any()),
183
+ });
184
+ }
197
185
 
198
- price_range: CartModel.PriceRange(),
186
+ static Rule() {
187
+ return Joi.object({
188
+ value: Joi.number(),
199
189
 
200
- coupon_allowed: Joi.boolean(),
190
+ key: Joi.number(),
201
191
 
202
- bulk_bundle: CartModel.BulkBundleRestriction(),
192
+ max: Joi.number(),
203
193
 
204
- post_order: CartModel.PostOrder(),
194
+ min: Joi.number(),
195
+
196
+ discount_qty: Joi.number(),
205
197
  });
206
198
  }
207
199
 
208
- static CouponAuthor() {
200
+ static Ownership() {
209
201
  return Joi.object({
210
- created_by: Joi.string().allow("").allow(null),
202
+ payable_by: Joi.string().allow("").required(),
211
203
 
212
- modified_by: Joi.string().allow("").allow(null),
204
+ payable_category: Joi.string().allow("").required(),
213
205
  });
214
206
  }
215
207
 
216
- static State() {
208
+ static DisplayMetaDict() {
217
209
  return Joi.object({
218
- is_public: Joi.boolean(),
219
-
220
- is_archived: Joi.boolean(),
210
+ subtitle: Joi.string().allow(""),
221
211
 
222
- is_display: Joi.boolean(),
212
+ title: Joi.string().allow(""),
223
213
  });
224
214
  }
225
215
 
226
- static Validation() {
216
+ static DisplayMeta() {
227
217
  return Joi.object({
228
- anonymous: Joi.boolean(),
218
+ apply: CartModel.DisplayMetaDict(),
229
219
 
230
- user_registered_after: Joi.string().allow("").allow(null),
220
+ auto: CartModel.DisplayMetaDict(),
231
221
 
232
- app_id: Joi.array().items(Joi.string().allow("")),
222
+ remove: CartModel.DisplayMetaDict(),
223
+
224
+ title: Joi.string().allow(""),
225
+
226
+ description: Joi.string().allow(""),
227
+
228
+ subtitle: Joi.string().allow(""),
233
229
  });
234
230
  }
235
231
 
236
- static CouponAdd() {
232
+ static Identifier() {
237
233
  return Joi.object({
238
- ownership: CartModel.Ownership().required(),
234
+ exclude_brand_id: Joi.array().items(Joi.number()),
239
235
 
240
- display_meta: CartModel.DisplayMeta().required(),
236
+ item_id: Joi.array().items(Joi.number()),
241
237
 
242
- validity: CartModel.Validity().required(),
238
+ brand_id: Joi.array().items(Joi.number()),
243
239
 
244
- _schedule: CartModel.CouponSchedule(),
240
+ user_id: Joi.array().items(Joi.string().allow("")),
245
241
 
246
- rule: Joi.array().items(CartModel.Rule()).required(),
242
+ category_id: Joi.array().items(Joi.number()),
247
243
 
248
- rule_definition: CartModel.RuleDefinition().required(),
244
+ company_id: Joi.array().items(Joi.number()),
249
245
 
250
- code: Joi.string().allow("").required(),
246
+ article_id: Joi.array().items(Joi.string().allow("")),
251
247
 
252
- action: CartModel.CouponAction(),
248
+ store_id: Joi.array().items(Joi.number()),
253
249
 
254
- date_meta: CartModel.CouponDateMeta(),
250
+ collection_id: Joi.array().items(Joi.string().allow("")),
251
+ });
252
+ }
255
253
 
256
- identifiers: CartModel.Identifier().required(),
254
+ static CouponAdd() {
255
+ return Joi.object({
256
+ validation: CartModel.Validation(),
257
257
 
258
- type_slug: Joi.string().allow("").required(),
258
+ rule_definition: CartModel.RuleDefinition().required(),
259
259
 
260
- restrictions: CartModel.Restrictions(),
260
+ state: CartModel.State(),
261
+
262
+ tags: Joi.array().items(Joi.string().allow("")),
263
+
264
+ code: Joi.string().allow("").required(),
261
265
 
262
266
  author: CartModel.CouponAuthor(),
263
267
 
264
- state: CartModel.State(),
268
+ validity: CartModel.Validity().required(),
265
269
 
266
- validation: CartModel.Validation(),
270
+ date_meta: CartModel.CouponDateMeta(),
267
271
 
268
- tags: Joi.array().items(Joi.string().allow("")),
269
- });
270
- }
272
+ restrictions: CartModel.Restrictions(),
271
273
 
272
- static Page() {
273
- return Joi.object({
274
- item_total: Joi.number(),
274
+ action: CartModel.CouponAction(),
275
275
 
276
- next_id: Joi.string().allow(""),
276
+ _schedule: CartModel.CouponSchedule(),
277
277
 
278
- has_previous: Joi.boolean(),
278
+ rule: Joi.array().items(CartModel.Rule()).required(),
279
279
 
280
- has_next: Joi.boolean(),
280
+ ownership: CartModel.Ownership().required(),
281
281
 
282
- current: Joi.number(),
282
+ display_meta: CartModel.DisplayMeta().required(),
283
283
 
284
- type: Joi.string().allow("").required(),
284
+ type_slug: Joi.string().allow("").required(),
285
285
 
286
- size: Joi.number(),
286
+ identifiers: CartModel.Identifier().required(),
287
287
  });
288
288
  }
289
289
 
290
290
  static CouponsResponse() {
291
291
  return Joi.object({
292
- items: CartModel.CouponAdd(),
293
-
294
292
  page: CartModel.Page(),
293
+
294
+ items: CartModel.CouponAdd(),
295
295
  });
296
296
  }
297
297
 
298
298
  static SuccessMessage() {
299
299
  return Joi.object({
300
- success: Joi.boolean(),
301
-
302
300
  message: Joi.string().allow(""),
301
+
302
+ success: Joi.boolean(),
303
303
  });
304
304
  }
305
305
 
306
306
  static OperationErrorResponse() {
307
307
  return Joi.object({
308
- success: Joi.boolean(),
309
-
310
308
  message: Joi.string().allow(""),
309
+
310
+ success: Joi.boolean(),
311
311
  });
312
312
  }
313
313
 
314
314
  static CouponUpdate() {
315
315
  return Joi.object({
316
- ownership: CartModel.Ownership().required(),
317
-
318
- display_meta: CartModel.DisplayMeta().required(),
319
-
320
- validity: CartModel.Validity().required(),
316
+ validation: CartModel.Validation(),
321
317
 
322
- _schedule: CartModel.CouponSchedule(),
318
+ rule_definition: CartModel.RuleDefinition().required(),
323
319
 
324
- rule: Joi.array().items(CartModel.Rule()).required(),
320
+ state: CartModel.State(),
325
321
 
326
- rule_definition: CartModel.RuleDefinition().required(),
322
+ tags: Joi.array().items(Joi.string().allow("")),
327
323
 
328
324
  code: Joi.string().allow("").required(),
329
325
 
330
- action: CartModel.CouponAction(),
326
+ author: CartModel.CouponAuthor(),
327
+
328
+ validity: CartModel.Validity().required(),
331
329
 
332
330
  date_meta: CartModel.CouponDateMeta(),
333
331
 
334
- identifiers: CartModel.Identifier().required(),
332
+ restrictions: CartModel.Restrictions(),
335
333
 
336
- type_slug: Joi.string().allow("").required(),
334
+ action: CartModel.CouponAction(),
337
335
 
338
- restrictions: CartModel.Restrictions(),
336
+ _schedule: CartModel.CouponSchedule(),
339
337
 
340
- author: CartModel.CouponAuthor(),
338
+ rule: Joi.array().items(CartModel.Rule()).required(),
341
339
 
342
- state: CartModel.State(),
340
+ ownership: CartModel.Ownership().required(),
343
341
 
344
- validation: CartModel.Validation(),
342
+ display_meta: CartModel.DisplayMeta().required(),
345
343
 
346
- tags: Joi.array().items(Joi.string().allow("")),
344
+ type_slug: Joi.string().allow("").required(),
345
+
346
+ identifiers: CartModel.Identifier().required(),
347
347
  });
348
348
  }
349
349
 
350
350
  static CouponPartialUpdate() {
351
351
  return Joi.object({
352
+ archive: Joi.boolean(),
353
+
352
354
  schedule: CartModel.CouponSchedule(),
355
+ });
356
+ }
353
357
 
354
- archive: Joi.boolean(),
358
+ static CompareObject() {
359
+ return Joi.object({
360
+ greater_than: Joi.number(),
361
+
362
+ less_than_equals: Joi.number(),
363
+
364
+ equals: Joi.number(),
365
+
366
+ less_than: Joi.number(),
367
+
368
+ greater_than_equals: Joi.number(),
355
369
  });
356
370
  }
357
371
 
358
- static PromotionSchedule() {
372
+ static ItemCriteria() {
359
373
  return Joi.object({
360
- start: Joi.string().allow("").required(),
374
+ buy_rules: Joi.array().items(Joi.string().allow("")),
361
375
 
362
- next_schedule: Joi.array().items(Joi.any()),
376
+ item_exclude_brand: Joi.array().items(Joi.number()),
363
377
 
364
- duration: Joi.number().allow(null),
378
+ item_exclude_category: Joi.array().items(Joi.number()),
365
379
 
366
- end: Joi.string().allow("").allow(null),
380
+ item_category: Joi.array().items(Joi.number()),
367
381
 
368
- published: Joi.boolean().required(),
382
+ item_exclude_sku: Joi.array().items(Joi.string().allow("")),
369
383
 
370
- cron: Joi.string().allow("").allow(null),
384
+ all_items: Joi.boolean(),
385
+
386
+ item_id: Joi.array().items(Joi.number()),
387
+
388
+ item_store: Joi.array().items(Joi.number()),
389
+
390
+ cart_quantity: CartModel.CompareObject(),
391
+
392
+ cart_total: CartModel.CompareObject(),
393
+
394
+ item_brand: Joi.array().items(Joi.number()),
395
+
396
+ item_company: Joi.array().items(Joi.number()),
397
+
398
+ item_sku: Joi.array().items(Joi.string().allow("")),
399
+
400
+ item_exclude_store: Joi.array().items(Joi.number()),
401
+
402
+ item_exclude_company: Joi.array().items(Joi.number()),
403
+
404
+ item_size: Joi.array().items(Joi.string().allow("")),
371
405
  });
372
406
  }
373
407
 
374
- static PromotionAuthor() {
408
+ static Ownership1() {
375
409
  return Joi.object({
376
- created_by: Joi.string().allow("").allow(null),
410
+ payable_by: Joi.string().allow("").required(),
377
411
 
378
- modified_by: Joi.string().allow("").allow(null),
412
+ payable_category: Joi.string().allow("").required(),
379
413
  });
380
414
  }
381
415
 
382
- static Visibility() {
416
+ static PromotionAction() {
383
417
  return Joi.object({
384
- pdp: Joi.boolean().required(),
418
+ action_type: Joi.string().allow("").required(),
385
419
 
386
- coupon_list: Joi.boolean().required(),
420
+ action_date: Joi.string().allow("").allow(null).required(),
387
421
  });
388
422
  }
389
423
 
390
- static UserRegistered() {
424
+ static PromotionAuthor() {
391
425
  return Joi.object({
392
- start: Joi.string().allow("").allow(null),
426
+ created_by: Joi.string().allow("").allow(null),
393
427
 
394
- end: Joi.string().allow("").allow(null),
428
+ modified_by: Joi.string().allow("").allow(null),
395
429
  });
396
430
  }
397
431
 
@@ -403,11 +437,11 @@ class CartModel {
403
437
 
404
438
  static PromotionPaymentModes() {
405
439
  return Joi.object({
406
- codes: Joi.array().items(Joi.string().allow("")),
407
-
408
440
  uses: CartModel.PaymentAllowValue1(),
409
441
 
410
442
  type: Joi.string().allow("").required(),
443
+
444
+ codes: Joi.array().items(Joi.string().allow("")),
411
445
  });
412
446
  }
413
447
 
@@ -421,9 +455,17 @@ class CartModel {
421
455
 
422
456
  static UsesRestriction1() {
423
457
  return Joi.object({
458
+ maximum: CartModel.UsesRemaining1(),
459
+
424
460
  remaining: CartModel.UsesRemaining1(),
461
+ });
462
+ }
425
463
 
426
- maximum: CartModel.UsesRemaining1(),
464
+ static UserRegistered() {
465
+ return Joi.object({
466
+ start: Joi.string().allow("").allow(null),
467
+
468
+ end: Joi.string().allow("").allow(null),
427
469
  });
428
470
  }
429
471
 
@@ -437,111 +479,53 @@ class CartModel {
437
479
 
438
480
  static Restrictions1() {
439
481
  return Joi.object({
440
- user_registered: CartModel.UserRegistered(),
441
-
442
- user_groups: Joi.array().items(Joi.number()),
443
-
444
- user_id: Joi.array().items(Joi.string().allow("")),
445
-
446
482
  payments: Joi.array().items(CartModel.PromotionPaymentModes()),
447
483
 
448
- platforms: Joi.array().items(Joi.string().allow("")),
449
-
450
484
  uses: CartModel.UsesRestriction1().required(),
451
485
 
452
- order_quantity: Joi.number(),
453
-
454
- anonymous_users: Joi.boolean(),
455
-
456
- post_order: CartModel.PostOrder1(),
457
- });
458
- }
459
-
460
- static PromotionAction() {
461
- return Joi.object({
462
- action_type: Joi.string().allow("").required(),
463
-
464
- action_date: Joi.string().allow("").allow(null).required(),
465
- });
466
- }
467
-
468
- static CompareObject() {
469
- return Joi.object({
470
- greater_than: Joi.number(),
471
-
472
- less_than: Joi.number(),
473
-
474
- equals: Joi.number(),
475
-
476
- greater_than_equals: Joi.number(),
477
-
478
- less_than_equals: Joi.number(),
479
- });
480
- }
481
-
482
- static ItemCriteria() {
483
- return Joi.object({
484
- cart_quantity: CartModel.CompareObject(),
485
-
486
- item_exclude_company: Joi.array().items(Joi.number()),
487
-
488
- item_brand: Joi.array().items(Joi.number()),
489
-
490
- item_sku: Joi.array().items(Joi.string().allow("")),
491
-
492
- item_id: Joi.array().items(Joi.number()),
493
-
494
- item_company: Joi.array().items(Joi.number()),
495
-
496
- item_exclude_sku: Joi.array().items(Joi.string().allow("")),
497
-
498
- buy_rules: Joi.array().items(Joi.string().allow("")),
499
-
500
- item_exclude_store: Joi.array().items(Joi.number()),
501
-
502
- item_size: Joi.array().items(Joi.string().allow("")),
486
+ platforms: Joi.array().items(Joi.string().allow("")),
503
487
 
504
- item_category: Joi.array().items(Joi.number()),
488
+ user_id: Joi.array().items(Joi.string().allow("")),
505
489
 
506
- item_exclude_category: Joi.array().items(Joi.number()),
490
+ user_registered: CartModel.UserRegistered(),
507
491
 
508
- cart_total: CartModel.CompareObject(),
492
+ order_quantity: Joi.number(),
509
493
 
510
- all_items: Joi.boolean(),
494
+ post_order: CartModel.PostOrder1(),
511
495
 
512
- item_exclude_brand: Joi.array().items(Joi.number()),
496
+ user_groups: Joi.array().items(Joi.number()),
513
497
 
514
- item_store: Joi.array().items(Joi.number()),
498
+ anonymous_users: Joi.boolean(),
515
499
  });
516
500
  }
517
501
 
518
502
  static DiscountOffer() {
519
503
  return Joi.object({
520
- discount_percentage: Joi.number(),
504
+ discount_price: Joi.number(),
521
505
 
522
- max_offer_quantity: Joi.number(),
506
+ min_offer_quantity: Joi.number(),
523
507
 
524
- max_discount_amount: Joi.number(),
508
+ discount_percentage: Joi.number(),
525
509
 
526
510
  code: Joi.string().allow(""),
527
511
 
528
- min_offer_quantity: Joi.number(),
512
+ max_discount_amount: Joi.number(),
529
513
 
530
- discount_amount: Joi.number(),
514
+ max_offer_quantity: Joi.number(),
531
515
 
532
- discount_price: Joi.number(),
516
+ discount_amount: Joi.number(),
533
517
  });
534
518
  }
535
519
 
536
520
  static DiscountRule() {
537
521
  return Joi.object({
538
- item_criteria: CartModel.ItemCriteria().required(),
539
-
540
522
  buy_condition: Joi.string().allow("").required(),
541
523
 
542
- offer: CartModel.DiscountOffer().required(),
524
+ item_criteria: CartModel.ItemCriteria().required(),
543
525
 
544
526
  discount_type: Joi.string().allow("").required(),
527
+
528
+ offer: CartModel.DiscountOffer().required(),
545
529
  });
546
530
  }
547
531
 
@@ -553,11 +537,27 @@ class CartModel {
553
537
  });
554
538
  }
555
539
 
556
- static Ownership1() {
540
+ static Visibility() {
557
541
  return Joi.object({
558
- payable_category: Joi.string().allow("").required(),
542
+ coupon_list: Joi.boolean().required(),
559
543
 
560
- payable_by: Joi.string().allow("").required(),
544
+ pdp: Joi.boolean().required(),
545
+ });
546
+ }
547
+
548
+ static PromotionSchedule() {
549
+ return Joi.object({
550
+ cron: Joi.string().allow("").allow(null),
551
+
552
+ start: Joi.string().allow("").required(),
553
+
554
+ end: Joi.string().allow("").allow(null),
555
+
556
+ duration: Joi.number().allow(null),
557
+
558
+ next_schedule: Joi.array().items(Joi.any()),
559
+
560
+ published: Joi.boolean().required(),
561
561
  });
562
562
  }
563
563
 
@@ -565,163 +565,163 @@ class CartModel {
565
565
  return Joi.object({
566
566
  offer_text: Joi.string().allow(""),
567
567
 
568
- name: Joi.string().allow(""),
569
-
570
568
  description: Joi.string().allow(""),
569
+
570
+ name: Joi.string().allow(""),
571
571
  });
572
572
  }
573
573
 
574
574
  static PromotionListItem() {
575
575
  return Joi.object({
576
- _schedule: CartModel.PromotionSchedule(),
577
-
578
- apply_all_discount: Joi.boolean(),
576
+ buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
579
577
 
580
- application_id: Joi.string().allow("").required(),
578
+ _custom_json: Joi.any(),
581
579
 
582
- author: CartModel.PromotionAuthor(),
580
+ ownership: CartModel.Ownership1().required(),
583
581
 
584
582
  apply_priority: Joi.number(),
585
583
 
586
- stackable: Joi.boolean(),
584
+ post_order_action: CartModel.PromotionAction(),
587
585
 
588
- visiblility: CartModel.Visibility(),
586
+ promotion_type: Joi.string().allow("").required(),
589
587
 
590
- restrictions: CartModel.Restrictions1(),
588
+ apply_all_discount: Joi.boolean(),
591
589
 
592
- _custom_json: Joi.any(),
590
+ application_id: Joi.string().allow("").required(),
593
591
 
594
- mode: Joi.string().allow("").required(),
592
+ currency: Joi.string().allow(""),
595
593
 
596
- post_order_action: CartModel.PromotionAction(),
594
+ author: CartModel.PromotionAuthor(),
595
+
596
+ restrictions: CartModel.Restrictions1(),
597
597
 
598
598
  discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
599
599
 
600
- buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
600
+ mode: Joi.string().allow("").required(),
601
601
 
602
- code: Joi.string().allow(""),
602
+ apply_exclusive: Joi.string().allow("").allow(null),
603
603
 
604
604
  date_meta: CartModel.PromotionDateMeta(),
605
605
 
606
- ownership: CartModel.Ownership1().required(),
606
+ stackable: Joi.boolean(),
607
607
 
608
- display_meta: CartModel.DisplayMeta1().required(),
608
+ promo_group: Joi.string().allow("").required(),
609
609
 
610
- currency: Joi.string().allow(""),
610
+ code: Joi.string().allow(""),
611
611
 
612
- promo_group: Joi.string().allow("").required(),
612
+ visiblility: CartModel.Visibility(),
613
613
 
614
- apply_exclusive: Joi.string().allow("").allow(null),
614
+ _schedule: CartModel.PromotionSchedule(),
615
615
 
616
- promotion_type: Joi.string().allow("").required(),
616
+ display_meta: CartModel.DisplayMeta1().required(),
617
617
  });
618
618
  }
619
619
 
620
620
  static PromotionsResponse() {
621
621
  return Joi.object({
622
- items: CartModel.PromotionListItem(),
623
-
624
622
  page: CartModel.Page(),
623
+
624
+ items: CartModel.PromotionListItem(),
625
625
  });
626
626
  }
627
627
 
628
628
  static PromotionAdd() {
629
629
  return Joi.object({
630
- _schedule: CartModel.PromotionSchedule(),
631
-
632
- apply_all_discount: Joi.boolean(),
630
+ buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
633
631
 
634
- application_id: Joi.string().allow("").required(),
632
+ _custom_json: Joi.any(),
635
633
 
636
- author: CartModel.PromotionAuthor(),
634
+ ownership: CartModel.Ownership1().required(),
637
635
 
638
636
  apply_priority: Joi.number(),
639
637
 
640
- stackable: Joi.boolean(),
638
+ post_order_action: CartModel.PromotionAction(),
641
639
 
642
- visiblility: CartModel.Visibility(),
640
+ promotion_type: Joi.string().allow("").required(),
643
641
 
644
- restrictions: CartModel.Restrictions1(),
642
+ apply_all_discount: Joi.boolean(),
645
643
 
646
- _custom_json: Joi.any(),
644
+ application_id: Joi.string().allow("").required(),
647
645
 
648
- mode: Joi.string().allow("").required(),
646
+ currency: Joi.string().allow(""),
649
647
 
650
- post_order_action: CartModel.PromotionAction(),
648
+ author: CartModel.PromotionAuthor(),
649
+
650
+ restrictions: CartModel.Restrictions1(),
651
651
 
652
652
  discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
653
653
 
654
- buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
654
+ mode: Joi.string().allow("").required(),
655
655
 
656
- code: Joi.string().allow(""),
656
+ apply_exclusive: Joi.string().allow("").allow(null),
657
657
 
658
658
  date_meta: CartModel.PromotionDateMeta(),
659
659
 
660
- ownership: CartModel.Ownership1().required(),
660
+ stackable: Joi.boolean(),
661
661
 
662
- display_meta: CartModel.DisplayMeta1().required(),
662
+ promo_group: Joi.string().allow("").required(),
663
663
 
664
- currency: Joi.string().allow(""),
664
+ code: Joi.string().allow(""),
665
665
 
666
- promo_group: Joi.string().allow("").required(),
666
+ visiblility: CartModel.Visibility(),
667
667
 
668
- apply_exclusive: Joi.string().allow("").allow(null),
668
+ _schedule: CartModel.PromotionSchedule(),
669
669
 
670
- promotion_type: Joi.string().allow("").required(),
670
+ display_meta: CartModel.DisplayMeta1().required(),
671
671
  });
672
672
  }
673
673
 
674
674
  static PromotionUpdate() {
675
675
  return Joi.object({
676
- _schedule: CartModel.PromotionSchedule(),
677
-
678
- apply_all_discount: Joi.boolean(),
676
+ buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
679
677
 
680
- application_id: Joi.string().allow("").required(),
678
+ _custom_json: Joi.any(),
681
679
 
682
- author: CartModel.PromotionAuthor(),
680
+ ownership: CartModel.Ownership1().required(),
683
681
 
684
682
  apply_priority: Joi.number(),
685
683
 
686
- stackable: Joi.boolean(),
684
+ post_order_action: CartModel.PromotionAction(),
687
685
 
688
- visiblility: CartModel.Visibility(),
686
+ promotion_type: Joi.string().allow("").required(),
689
687
 
690
- restrictions: CartModel.Restrictions1(),
688
+ apply_all_discount: Joi.boolean(),
691
689
 
692
- _custom_json: Joi.any(),
690
+ application_id: Joi.string().allow("").required(),
693
691
 
694
- mode: Joi.string().allow("").required(),
692
+ currency: Joi.string().allow(""),
695
693
 
696
- post_order_action: CartModel.PromotionAction(),
694
+ author: CartModel.PromotionAuthor(),
695
+
696
+ restrictions: CartModel.Restrictions1(),
697
697
 
698
698
  discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
699
699
 
700
- buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
700
+ mode: Joi.string().allow("").required(),
701
701
 
702
- code: Joi.string().allow(""),
702
+ apply_exclusive: Joi.string().allow("").allow(null),
703
703
 
704
704
  date_meta: CartModel.PromotionDateMeta(),
705
705
 
706
- ownership: CartModel.Ownership1().required(),
706
+ stackable: Joi.boolean(),
707
707
 
708
- display_meta: CartModel.DisplayMeta1().required(),
708
+ promo_group: Joi.string().allow("").required(),
709
709
 
710
- currency: Joi.string().allow(""),
710
+ code: Joi.string().allow(""),
711
711
 
712
- promo_group: Joi.string().allow("").required(),
712
+ visiblility: CartModel.Visibility(),
713
713
 
714
- apply_exclusive: Joi.string().allow("").allow(null),
714
+ _schedule: CartModel.PromotionSchedule(),
715
715
 
716
- promotion_type: Joi.string().allow("").required(),
716
+ display_meta: CartModel.DisplayMeta1().required(),
717
717
  });
718
718
  }
719
719
 
720
720
  static PromotionPartialUpdate() {
721
721
  return Joi.object({
722
- schedule: CartModel.PromotionSchedule(),
723
-
724
722
  archive: Joi.boolean(),
723
+
724
+ schedule: CartModel.PromotionSchedule(),
725
725
  });
726
726
  }
727
727
 
@@ -729,9 +729,9 @@ class CartModel {
729
729
  return Joi.object({
730
730
  size: Joi.string().allow("").required(),
731
731
 
732
- quantity: Joi.number(),
733
-
734
732
  product_id: Joi.string().allow("").required(),
733
+
734
+ quantity: Joi.number(),
735
735
  });
736
736
  }
737
737
 
@@ -741,85 +741,77 @@ class CartModel {
741
741
  });
742
742
  }
743
743
 
744
- static ProductPrice() {
744
+ static ProductImage() {
745
745
  return Joi.object({
746
- currency_symbol: Joi.string().allow(""),
747
-
748
- marked: Joi.number(),
749
-
750
- currency_code: Joi.string().allow(""),
751
-
752
- add_on: Joi.number(),
746
+ secure_url: Joi.string().allow(""),
753
747
 
754
- effective: Joi.number(),
748
+ aspect_ratio: Joi.string().allow(""),
755
749
 
756
- selling: Joi.number(),
750
+ url: Joi.string().allow(""),
757
751
  });
758
752
  }
759
753
 
760
- static ProductPriceInfo() {
754
+ static ActionQuery() {
761
755
  return Joi.object({
762
- converted: CartModel.ProductPrice(),
763
-
764
- base: CartModel.ProductPrice(),
756
+ product_slug: Joi.array().items(Joi.string().allow("")),
765
757
  });
766
758
  }
767
759
 
768
- static Ownership2() {
760
+ static ProductAction() {
769
761
  return Joi.object({
770
- payable_category: Joi.string().allow(""),
762
+ query: CartModel.ActionQuery(),
771
763
 
772
- payable_by: Joi.string().allow(""),
764
+ type: Joi.string().allow(""),
765
+
766
+ url: Joi.string().allow(""),
773
767
  });
774
768
  }
775
769
 
776
- static AppliedPromotion() {
770
+ static CategoryInfo() {
777
771
  return Joi.object({
778
- article_quantity: Joi.number(),
779
-
780
- ownership: CartModel.Ownership2(),
781
-
782
- promo_id: Joi.string().allow(""),
783
-
784
- amount: Joi.number(),
785
-
786
- promotion_type: Joi.string().allow(""),
787
-
788
- mrp_promotion: Joi.boolean(),
772
+ uid: Joi.number(),
789
773
 
790
- offer_text: Joi.string().allow(""),
774
+ name: Joi.string().allow(""),
791
775
  });
792
776
  }
793
777
 
794
- static PromoMeta() {
778
+ static BaseInfo() {
795
779
  return Joi.object({
796
- message: Joi.string().allow(""),
797
- });
798
- }
780
+ uid: Joi.number(),
799
781
 
800
- static CartProductIdentifer() {
801
- return Joi.object({
802
- identifier: Joi.string().allow(""),
782
+ name: Joi.string().allow(""),
803
783
  });
804
784
  }
805
785
 
806
- static BaseInfo() {
786
+ static CartProduct() {
807
787
  return Joi.object({
788
+ images: Joi.array().items(CartModel.ProductImage()),
789
+
808
790
  name: Joi.string().allow(""),
809
791
 
792
+ type: Joi.string().allow(""),
793
+
810
794
  uid: Joi.number(),
795
+
796
+ action: CartModel.ProductAction(),
797
+
798
+ categories: Joi.array().items(CartModel.CategoryInfo()),
799
+
800
+ brand: CartModel.BaseInfo(),
801
+
802
+ slug: Joi.string().allow(""),
811
803
  });
812
804
  }
813
805
 
814
806
  static BasePrice() {
815
807
  return Joi.object({
816
- effective: Joi.number(),
817
-
818
- currency_symbol: Joi.string().allow(""),
808
+ currency_code: Joi.string().allow(""),
819
809
 
820
810
  marked: Joi.number(),
821
811
 
822
- currency_code: Joi.string().allow(""),
812
+ effective: Joi.number(),
813
+
814
+ currency_symbol: Joi.string().allow(""),
823
815
  });
824
816
  }
825
817
 
@@ -833,203 +825,211 @@ class CartModel {
833
825
 
834
826
  static ProductArticle() {
835
827
  return Joi.object({
836
- extra_meta: Joi.any(),
828
+ size: Joi.string().allow(""),
837
829
 
838
- quantity: Joi.number(),
830
+ parent_item_identifiers: Joi.any(),
839
831
 
840
832
  product_group_tags: Joi.array().items(Joi.string().allow("")),
841
833
 
842
- store: CartModel.BaseInfo(),
834
+ _custom_json: Joi.any(),
843
835
 
844
- seller: CartModel.BaseInfo(),
836
+ type: Joi.string().allow(""),
845
837
 
846
- price: CartModel.ArticlePriceInfo(),
838
+ store: CartModel.BaseInfo(),
847
839
 
848
- size: Joi.string().allow(""),
840
+ extra_meta: Joi.any(),
849
841
 
850
842
  uid: Joi.string().allow(""),
851
843
 
852
- _custom_json: Joi.any(),
844
+ price: CartModel.ArticlePriceInfo(),
853
845
 
854
- parent_item_identifiers: Joi.any(),
846
+ seller: CartModel.BaseInfo(),
855
847
 
856
- type: Joi.string().allow(""),
848
+ quantity: Joi.number(),
857
849
  });
858
850
  }
859
851
 
860
- static CategoryInfo() {
852
+ static ProductAvailability() {
861
853
  return Joi.object({
862
- name: Joi.string().allow(""),
854
+ deliverable: Joi.boolean(),
863
855
 
864
- uid: Joi.number(),
856
+ other_store_quantity: Joi.number(),
857
+
858
+ sizes: Joi.array().items(Joi.string().allow("")),
859
+
860
+ is_valid: Joi.boolean(),
861
+
862
+ out_of_stock: Joi.boolean(),
865
863
  });
866
864
  }
867
865
 
868
- static ActionQuery() {
866
+ static PromoMeta() {
869
867
  return Joi.object({
870
- product_slug: Joi.array().items(Joi.string().allow("")),
868
+ message: Joi.string().allow(""),
871
869
  });
872
870
  }
873
871
 
874
- static ProductAction() {
872
+ static Ownership2() {
875
873
  return Joi.object({
876
- url: Joi.string().allow(""),
877
-
878
- query: CartModel.ActionQuery(),
874
+ payable_by: Joi.string().allow(""),
879
875
 
880
- type: Joi.string().allow(""),
876
+ payable_category: Joi.string().allow(""),
881
877
  });
882
878
  }
883
879
 
884
- static ProductImage() {
880
+ static AppliedPromotion() {
885
881
  return Joi.object({
886
- url: Joi.string().allow(""),
882
+ amount: Joi.number(),
887
883
 
888
- secure_url: Joi.string().allow(""),
884
+ offer_text: Joi.string().allow(""),
889
885
 
890
- aspect_ratio: Joi.string().allow(""),
886
+ promotion_type: Joi.string().allow(""),
887
+
888
+ ownership: CartModel.Ownership2(),
889
+
890
+ article_quantity: Joi.number(),
891
+
892
+ mrp_promotion: Joi.boolean(),
893
+
894
+ promo_id: Joi.string().allow(""),
891
895
  });
892
896
  }
893
897
 
894
- static CartProduct() {
898
+ static ProductPrice() {
895
899
  return Joi.object({
896
- categories: Joi.array().items(CartModel.CategoryInfo()),
897
-
898
- action: CartModel.ProductAction(),
899
-
900
- images: Joi.array().items(CartModel.ProductImage()),
900
+ selling: Joi.number(),
901
901
 
902
- slug: Joi.string().allow(""),
902
+ currency_code: Joi.string().allow(""),
903
903
 
904
- uid: Joi.number(),
904
+ add_on: Joi.number(),
905
905
 
906
- name: Joi.string().allow(""),
906
+ currency_symbol: Joi.string().allow(""),
907
907
 
908
- brand: CartModel.BaseInfo(),
908
+ marked: Joi.number(),
909
909
 
910
- type: Joi.string().allow(""),
910
+ effective: Joi.number(),
911
911
  });
912
912
  }
913
913
 
914
- static ProductAvailability() {
914
+ static ProductPriceInfo() {
915
915
  return Joi.object({
916
- out_of_stock: Joi.boolean(),
917
-
918
- other_store_quantity: Joi.number(),
919
-
920
- deliverable: Joi.boolean(),
916
+ converted: CartModel.ProductPrice(),
921
917
 
922
- is_valid: Joi.boolean(),
918
+ base: CartModel.ProductPrice(),
919
+ });
920
+ }
923
921
 
924
- sizes: Joi.array().items(Joi.string().allow("")),
922
+ static CartProductIdentifer() {
923
+ return Joi.object({
924
+ identifier: Joi.string().allow(""),
925
925
  });
926
926
  }
927
927
 
928
928
  static CartProductInfo() {
929
929
  return Joi.object({
930
- price_per_unit: CartModel.ProductPriceInfo(),
930
+ parent_item_identifiers: Joi.any(),
931
931
 
932
- coupon_message: Joi.string().allow(""),
932
+ product: CartModel.CartProduct(),
933
933
 
934
- is_set: Joi.boolean(),
934
+ article: CartModel.ProductArticle(),
935
935
 
936
- promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
936
+ bulk_offer: Joi.any(),
937
937
 
938
- quantity: Joi.number(),
938
+ availability: CartModel.ProductAvailability(),
939
939
 
940
- discount: Joi.string().allow(""),
940
+ coupon_message: Joi.string().allow(""),
941
941
 
942
942
  promo_meta: CartModel.PromoMeta(),
943
943
 
944
- price: CartModel.ProductPriceInfo(),
944
+ key: Joi.string().allow(""),
945
945
 
946
- identifiers: CartModel.CartProductIdentifer().required(),
946
+ is_set: Joi.boolean(),
947
947
 
948
- article: CartModel.ProductArticle(),
948
+ discount: Joi.string().allow(""),
949
949
 
950
- message: Joi.string().allow(""),
950
+ promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
951
951
 
952
- bulk_offer: Joi.any(),
952
+ price: CartModel.ProductPriceInfo(),
953
953
 
954
- product: CartModel.CartProduct(),
954
+ message: Joi.string().allow(""),
955
955
 
956
- key: Joi.string().allow(""),
956
+ price_per_unit: CartModel.ProductPriceInfo(),
957
957
 
958
- parent_item_identifiers: Joi.any(),
958
+ quantity: Joi.number(),
959
959
 
960
- availability: CartModel.ProductAvailability(),
960
+ identifiers: CartModel.CartProductIdentifer().required(),
961
961
  });
962
962
  }
963
963
 
964
964
  static LoyaltyPoints() {
965
965
  return Joi.object({
966
- is_applied: Joi.boolean(),
967
-
968
- applicable: Joi.number(),
966
+ total: Joi.number(),
969
967
 
970
968
  description: Joi.string().allow(""),
971
969
 
972
- total: Joi.number(),
970
+ applicable: Joi.number(),
971
+
972
+ is_applied: Joi.boolean(),
973
973
  });
974
974
  }
975
975
 
976
- static DisplayBreakup() {
976
+ static RawBreakup() {
977
977
  return Joi.object({
978
- currency_symbol: Joi.string().allow(""),
978
+ coupon: Joi.number(),
979
979
 
980
- currency_code: Joi.string().allow(""),
980
+ total: Joi.number(),
981
981
 
982
- display: Joi.string().allow(""),
982
+ delivery_charge: Joi.number(),
983
983
 
984
- message: Joi.array().items(Joi.string().allow("")),
984
+ mrp_total: Joi.number(),
985
985
 
986
- key: Joi.string().allow(""),
986
+ convenience_fee: Joi.number(),
987
987
 
988
- value: Joi.number(),
989
- });
990
- }
988
+ discount: Joi.number(),
991
989
 
992
- static RawBreakup() {
993
- return Joi.object({
994
- subtotal: Joi.number(),
990
+ you_saved: Joi.number(),
995
991
 
996
- discount: Joi.number(),
992
+ vog: Joi.number(),
997
993
 
998
994
  gst_charges: Joi.number(),
999
995
 
1000
- total: Joi.number(),
996
+ cod_charge: Joi.number(),
1001
997
 
1002
- vog: Joi.number(),
998
+ fynd_cash: Joi.number(),
1003
999
 
1004
- you_saved: Joi.number(),
1000
+ subtotal: Joi.number(),
1001
+ });
1002
+ }
1005
1003
 
1006
- fynd_cash: Joi.number(),
1004
+ static DisplayBreakup() {
1005
+ return Joi.object({
1006
+ value: Joi.number(),
1007
1007
 
1008
- coupon: Joi.number(),
1008
+ display: Joi.string().allow(""),
1009
1009
 
1010
- cod_charge: Joi.number(),
1010
+ currency_code: Joi.string().allow(""),
1011
1011
 
1012
- delivery_charge: Joi.number(),
1012
+ key: Joi.string().allow(""),
1013
1013
 
1014
- mrp_total: Joi.number(),
1014
+ message: Joi.array().items(Joi.string().allow("")),
1015
1015
 
1016
- convenience_fee: Joi.number(),
1016
+ currency_symbol: Joi.string().allow(""),
1017
1017
  });
1018
1018
  }
1019
1019
 
1020
1020
  static CouponBreakup() {
1021
1021
  return Joi.object({
1022
- code: Joi.string().allow(""),
1022
+ value: Joi.number(),
1023
1023
 
1024
- message: Joi.string().allow(""),
1024
+ type: Joi.string().allow(""),
1025
1025
 
1026
- is_applied: Joi.boolean(),
1026
+ code: Joi.string().allow(""),
1027
1027
 
1028
1028
  uid: Joi.string().allow(""),
1029
1029
 
1030
- value: Joi.number(),
1030
+ message: Joi.string().allow(""),
1031
1031
 
1032
- type: Joi.string().allow(""),
1032
+ is_applied: Joi.boolean(),
1033
1033
  });
1034
1034
  }
1035
1035
 
@@ -1037,32 +1037,32 @@ class CartModel {
1037
1037
  return Joi.object({
1038
1038
  loyalty_points: CartModel.LoyaltyPoints(),
1039
1039
 
1040
- display: Joi.array().items(CartModel.DisplayBreakup()),
1041
-
1042
1040
  raw: CartModel.RawBreakup(),
1043
1041
 
1042
+ display: Joi.array().items(CartModel.DisplayBreakup()),
1043
+
1044
1044
  coupon: CartModel.CouponBreakup(),
1045
1045
  });
1046
1046
  }
1047
1047
 
1048
1048
  static OpenapiCartDetailsResponse() {
1049
1049
  return Joi.object({
1050
- items: Joi.array().items(CartModel.CartProductInfo()),
1051
-
1052
1050
  is_valid: Joi.boolean(),
1053
1051
 
1054
- breakup_values: CartModel.CartBreakup(),
1055
-
1056
1052
  message: Joi.string().allow(""),
1053
+
1054
+ items: Joi.array().items(CartModel.CartProductInfo()),
1055
+
1056
+ breakup_values: CartModel.CartBreakup(),
1057
1057
  });
1058
1058
  }
1059
1059
 
1060
1060
  static OpenApiErrorResponse() {
1061
1061
  return Joi.object({
1062
- success: Joi.boolean(),
1063
-
1064
1062
  message: Joi.string().allow(""),
1065
1063
 
1064
+ success: Joi.boolean(),
1065
+
1066
1066
  errors: Joi.any(),
1067
1067
  });
1068
1068
  }
@@ -1073,114 +1073,114 @@ class CartModel {
1073
1073
 
1074
1074
  phone: Joi.number(),
1075
1075
 
1076
- pincode: Joi.number(),
1077
-
1078
- area: Joi.string().allow(""),
1079
-
1080
- country: Joi.string().allow("").allow(null),
1076
+ name: Joi.string().allow(""),
1081
1077
 
1082
- email: Joi.string().allow(""),
1078
+ address: Joi.string().allow(""),
1083
1079
 
1084
- meta: Joi.any(),
1080
+ pincode: Joi.number(),
1085
1081
 
1086
1082
  landmark: Joi.string().allow(""),
1087
1083
 
1088
- area_code_slug: Joi.string().allow(""),
1089
-
1090
1084
  area_code: Joi.string().allow("").required(),
1091
1085
 
1092
- city: Joi.string().allow("").allow(null),
1086
+ state: Joi.string().allow("").allow(null),
1087
+
1088
+ country: Joi.string().allow("").allow(null),
1093
1089
 
1094
1090
  country_code: Joi.string().allow(""),
1095
1091
 
1096
- state: Joi.string().allow("").allow(null),
1092
+ area_code_slug: Joi.string().allow(""),
1097
1093
 
1098
- name: Joi.string().allow(""),
1094
+ meta: Joi.any(),
1099
1095
 
1100
- address: Joi.string().allow(""),
1096
+ area: Joi.string().allow(""),
1097
+
1098
+ email: Joi.string().allow(""),
1099
+
1100
+ city: Joi.string().allow("").allow(null),
1101
1101
  });
1102
1102
  }
1103
1103
 
1104
1104
  static OpenApiCartServiceabilityRequest() {
1105
1105
  return Joi.object({
1106
- shipping_address: CartModel.ShippingAddress().required(),
1107
-
1108
1106
  cart_items: CartModel.CartItem(),
1107
+
1108
+ shipping_address: CartModel.ShippingAddress().required(),
1109
1109
  });
1110
1110
  }
1111
1111
 
1112
- static PromiseTimestamp() {
1112
+ static PromiseFormatted() {
1113
1113
  return Joi.object({
1114
- min: Joi.number(),
1114
+ min: Joi.string().allow(""),
1115
1115
 
1116
- max: Joi.number(),
1116
+ max: Joi.string().allow(""),
1117
1117
  });
1118
1118
  }
1119
1119
 
1120
- static PromiseFormatted() {
1120
+ static PromiseTimestamp() {
1121
1121
  return Joi.object({
1122
- min: Joi.string().allow(""),
1122
+ min: Joi.number(),
1123
1123
 
1124
- max: Joi.string().allow(""),
1124
+ max: Joi.number(),
1125
1125
  });
1126
1126
  }
1127
1127
 
1128
1128
  static ShipmentPromise() {
1129
1129
  return Joi.object({
1130
- timestamp: CartModel.PromiseTimestamp(),
1131
-
1132
1130
  formatted: CartModel.PromiseFormatted(),
1131
+
1132
+ timestamp: CartModel.PromiseTimestamp(),
1133
1133
  });
1134
1134
  }
1135
1135
 
1136
1136
  static OpenApiCartServiceabilityResponse() {
1137
1137
  return Joi.object({
1138
- items: Joi.array().items(CartModel.CartProductInfo()),
1138
+ breakup_values: CartModel.CartBreakup(),
1139
1139
 
1140
- delivery_promise: CartModel.ShipmentPromise(),
1140
+ items: Joi.array().items(CartModel.CartProductInfo()),
1141
1141
 
1142
1142
  message: Joi.string().allow(""),
1143
1143
 
1144
- breakup_values: CartModel.CartBreakup(),
1144
+ delivery_promise: CartModel.ShipmentPromise(),
1145
1145
 
1146
1146
  is_valid: Joi.boolean(),
1147
1147
  });
1148
1148
  }
1149
1149
 
1150
- static OpenApiFiles() {
1151
- return Joi.object({
1152
- key: Joi.string().allow("").required(),
1153
-
1154
- values: Joi.array().items(Joi.string().allow("")).required(),
1155
- });
1156
- }
1157
-
1158
1150
  static MultiTenderPaymentMeta() {
1159
1151
  return Joi.object({
1160
- payment_gateway: Joi.string().allow("").allow(null),
1152
+ order_id: Joi.string().allow("").allow(null),
1153
+
1154
+ payment_id: Joi.string().allow("").allow(null),
1161
1155
 
1162
1156
  extra_meta: Joi.any().allow(null),
1163
1157
 
1164
- payment_id: Joi.string().allow("").allow(null),
1158
+ payment_gateway: Joi.string().allow("").allow(null),
1165
1159
 
1166
1160
  current_status: Joi.string().allow("").allow(null),
1167
-
1168
- order_id: Joi.string().allow("").allow(null),
1169
1161
  });
1170
1162
  }
1171
1163
 
1172
1164
  static MultiTenderPaymentMethod() {
1173
1165
  return Joi.object({
1174
- name: Joi.string().allow(""),
1175
-
1176
1166
  amount: Joi.number().required(),
1177
1167
 
1178
1168
  mode: Joi.string().allow("").required(),
1179
1169
 
1170
+ name: Joi.string().allow(""),
1171
+
1180
1172
  meta: CartModel.MultiTenderPaymentMeta(),
1181
1173
  });
1182
1174
  }
1183
1175
 
1176
+ static OpenApiFiles() {
1177
+ return Joi.object({
1178
+ key: Joi.string().allow("").required(),
1179
+
1180
+ values: Joi.array().items(Joi.string().allow("")).required(),
1181
+ });
1182
+ }
1183
+
1184
1184
  static CartItemMeta() {
1185
1185
  return Joi.object({
1186
1186
  primary_item: Joi.boolean(),
@@ -1191,49 +1191,55 @@ class CartModel {
1191
1191
 
1192
1192
  static OpenApiOrderItem() {
1193
1193
  return Joi.object({
1194
- coupon_effective_discount: Joi.number().required(),
1195
-
1196
- cashback_applied: Joi.number().required(),
1194
+ amount_paid: Joi.number().required(),
1197
1195
 
1198
- product_id: Joi.number().required(),
1196
+ extra_meta: Joi.any(),
1199
1197
 
1200
- files: Joi.array().items(CartModel.OpenApiFiles()),
1198
+ loyalty_discount: Joi.number(),
1201
1199
 
1202
- cod_charges: Joi.number().required(),
1200
+ payment_methods: Joi.array()
1201
+ .items(CartModel.MultiTenderPaymentMethod())
1202
+ .required(),
1203
1203
 
1204
- extra_meta: Joi.any(),
1204
+ product_id: Joi.number().required(),
1205
1205
 
1206
- quantity: Joi.number(),
1206
+ delivery_charges: Joi.number().required(),
1207
1207
 
1208
1208
  discount: Joi.number().required(),
1209
1209
 
1210
- size: Joi.string().allow("").required(),
1210
+ price_marked: Joi.number().required(),
1211
1211
 
1212
1212
  employee_discount: Joi.number(),
1213
1213
 
1214
- meta: CartModel.CartItemMeta(),
1214
+ files: Joi.array().items(CartModel.OpenApiFiles()),
1215
1215
 
1216
- payment_methods: Joi.array()
1217
- .items(CartModel.MultiTenderPaymentMethod())
1218
- .required(),
1216
+ cashback_applied: Joi.number().required(),
1219
1217
 
1220
- price_effective: Joi.number().required(),
1218
+ cod_charges: Joi.number().required(),
1221
1219
 
1222
- price_marked: Joi.number().required(),
1220
+ meta: CartModel.CartItemMeta(),
1223
1221
 
1224
- delivery_charges: Joi.number().required(),
1222
+ price_effective: Joi.number().required(),
1225
1223
 
1226
- amount_paid: Joi.number().required(),
1224
+ coupon_effective_discount: Joi.number().required(),
1227
1225
 
1228
- loyalty_discount: Joi.number(),
1226
+ quantity: Joi.number(),
1227
+
1228
+ size: Joi.string().allow("").required(),
1229
1229
  });
1230
1230
  }
1231
1231
 
1232
1232
  static OpenApiPlatformCheckoutReq() {
1233
1233
  return Joi.object({
1234
- cod_charges: Joi.number().required(),
1234
+ order_id: Joi.string().allow(""),
1235
1235
 
1236
- affiliate_order_id: Joi.string().allow(""),
1236
+ currency_code: Joi.string().allow(""),
1237
+
1238
+ cart_items: Joi.array().items(CartModel.OpenApiOrderItem()).required(),
1239
+
1240
+ delivery_charges: Joi.number().required(),
1241
+
1242
+ files: Joi.array().items(CartModel.OpenApiFiles()),
1237
1243
 
1238
1244
  comment: Joi.string().allow("").allow(null),
1239
1245
 
@@ -1241,130 +1247,124 @@ class CartModel {
1241
1247
 
1242
1248
  coupon_value: Joi.number().required(),
1243
1249
 
1244
- shipping_address: CartModel.ShippingAddress(),
1250
+ affiliate_order_id: Joi.string().allow(""),
1245
1251
 
1246
- gstin: Joi.string().allow("").allow(null),
1252
+ payment_mode: Joi.string().allow(""),
1247
1253
 
1248
- delivery_charges: Joi.number().required(),
1254
+ cart_value: Joi.number().required(),
1249
1255
 
1250
- coupon_code: Joi.string().allow("").required(),
1256
+ payment_methods: Joi.array()
1257
+ .items(CartModel.MultiTenderPaymentMethod())
1258
+ .required(),
1251
1259
 
1252
1260
  loyalty_discount: Joi.number(),
1253
1261
 
1254
- payment_mode: Joi.string().allow(""),
1255
-
1256
- cashback_applied: Joi.number().required(),
1257
-
1258
- files: Joi.array().items(CartModel.OpenApiFiles()),
1259
-
1260
- currency_code: Joi.string().allow(""),
1262
+ billing_address: CartModel.ShippingAddress().required(),
1261
1263
 
1262
- order_id: Joi.string().allow(""),
1264
+ employee_discount: Joi.any(),
1263
1265
 
1264
- cart_value: Joi.number().required(),
1266
+ cashback_applied: Joi.number().required(),
1265
1267
 
1266
- employee_discount: Joi.any(),
1268
+ cod_charges: Joi.number().required(),
1267
1269
 
1268
- payment_methods: Joi.array()
1269
- .items(CartModel.MultiTenderPaymentMethod())
1270
- .required(),
1270
+ coupon_code: Joi.string().allow("").required(),
1271
1271
 
1272
- cart_items: Joi.array().items(CartModel.OpenApiOrderItem()).required(),
1272
+ shipping_address: CartModel.ShippingAddress(),
1273
1273
 
1274
- billing_address: CartModel.ShippingAddress().required(),
1274
+ gstin: Joi.string().allow("").allow(null),
1275
1275
  });
1276
1276
  }
1277
1277
 
1278
1278
  static OpenApiCheckoutResponse() {
1279
1279
  return Joi.object({
1280
- success: Joi.boolean(),
1281
-
1282
- order_id: Joi.string().allow("").required(),
1280
+ order_ref_id: Joi.string().allow(""),
1283
1281
 
1284
1282
  message: Joi.string().allow(""),
1285
1283
 
1286
- order_ref_id: Joi.string().allow(""),
1284
+ success: Joi.boolean(),
1285
+
1286
+ order_id: Joi.string().allow("").required(),
1287
1287
  });
1288
1288
  }
1289
1289
 
1290
1290
  static AbandonedCart() {
1291
1291
  return Joi.object({
1292
- cod_charges: Joi.any(),
1292
+ buy_now: Joi.boolean(),
1293
1293
 
1294
- checkout_mode: Joi.string().allow(""),
1294
+ uid: Joi.number().required(),
1295
1295
 
1296
- coupon: Joi.any().allow(null),
1296
+ created_on: Joi.string().allow("").required(),
1297
1297
 
1298
- meta: Joi.any().allow(null),
1298
+ articles: Joi.array().items(Joi.any()).required(),
1299
1299
 
1300
- gstin: Joi.string().allow("").allow(null),
1300
+ coupon: Joi.any().allow(null),
1301
1301
 
1302
- user_id: Joi.string().allow("").required(),
1302
+ promotion: Joi.any(),
1303
1303
 
1304
- discount: Joi.number(),
1304
+ payment_methods: Joi.array().items(Joi.any()),
1305
1305
 
1306
1306
  fynd_credits: Joi.any(),
1307
1307
 
1308
- is_archive: Joi.boolean(),
1308
+ app_id: Joi.string().allow(""),
1309
1309
 
1310
- cart_value: Joi.number(),
1310
+ checkout_mode: Joi.string().allow(""),
1311
1311
 
1312
1312
  order_id: Joi.string().allow(""),
1313
1313
 
1314
- expire_at: Joi.string().allow("").required(),
1315
-
1316
- app_id: Joi.string().allow(""),
1314
+ payments: Joi.any().allow(null),
1317
1315
 
1318
1316
  merge_qty: Joi.boolean().allow(null),
1319
1317
 
1320
- last_modified: Joi.string().allow("").required(),
1321
-
1322
- _id: Joi.string().allow("").required(),
1318
+ delivery_charges: Joi.any(),
1323
1319
 
1324
- created_on: Joi.string().allow("").required(),
1320
+ bulk_coupon_discount: Joi.number().allow(null),
1325
1321
 
1326
- articles: Joi.array().items(Joi.any()).required(),
1322
+ is_archive: Joi.boolean(),
1327
1323
 
1328
1324
  comment: Joi.string().allow("").allow(null),
1329
1325
 
1330
- is_active: Joi.boolean(),
1326
+ pick_up_customer_details: Joi.any().allow(null),
1331
1327
 
1332
- delivery_charges: Joi.any(),
1328
+ _id: Joi.string().allow("").required(),
1333
1329
 
1334
- cashback: Joi.any().required(),
1330
+ is_active: Joi.boolean(),
1335
1331
 
1336
1332
  payment_mode: Joi.string().allow("").allow(null),
1337
1333
 
1338
- bulk_coupon_discount: Joi.number().allow(null),
1334
+ last_modified: Joi.string().allow("").required(),
1339
1335
 
1340
- fc_index_map: Joi.array().items(Joi.number()),
1336
+ cart_value: Joi.number(),
1341
1337
 
1342
- payments: Joi.any().allow(null),
1338
+ is_default: Joi.boolean().required(),
1343
1339
 
1344
- promotion: Joi.any(),
1340
+ discount: Joi.number(),
1345
1341
 
1346
- payment_methods: Joi.array().items(Joi.any()),
1342
+ user_id: Joi.string().allow("").required(),
1343
+
1344
+ cashback: Joi.any().required(),
1345
+
1346
+ fc_index_map: Joi.array().items(Joi.number()),
1347
1347
 
1348
1348
  shipments: Joi.array().items(Joi.any()),
1349
1349
 
1350
- uid: Joi.number().required(),
1350
+ cod_charges: Joi.any(),
1351
1351
 
1352
- pick_up_customer_details: Joi.any().allow(null),
1352
+ expire_at: Joi.string().allow("").required(),
1353
1353
 
1354
- is_default: Joi.boolean().required(),
1354
+ meta: Joi.any().allow(null),
1355
1355
 
1356
- buy_now: Joi.boolean(),
1356
+ gstin: Joi.string().allow("").allow(null),
1357
1357
  });
1358
1358
  }
1359
1359
 
1360
1360
  static AbandonedCartResponse() {
1361
1361
  return Joi.object({
1362
+ page: CartModel.Page(),
1363
+
1362
1364
  items: Joi.array().items(CartModel.AbandonedCart()),
1363
1365
 
1364
1366
  message: Joi.string().allow(""),
1365
1367
 
1366
- page: CartModel.Page(),
1367
-
1368
1368
  success: Joi.boolean(),
1369
1369
 
1370
1370
  result: Joi.any(),
@@ -1381,77 +1381,77 @@ class CartModel {
1381
1381
 
1382
1382
  static PaymentSelectionLock() {
1383
1383
  return Joi.object({
1384
+ default_options: Joi.string().allow(""),
1385
+
1384
1386
  payment_identifier: Joi.string().allow(""),
1385
1387
 
1386
1388
  enabled: Joi.boolean(),
1387
-
1388
- default_options: Joi.string().allow(""),
1389
1389
  });
1390
1390
  }
1391
1391
 
1392
1392
  static CartDetailResponse() {
1393
1393
  return Joi.object({
1394
- currency: CartModel.CartCurrency(),
1394
+ coupon_text: Joi.string().allow(""),
1395
+
1396
+ checkout_mode: Joi.string().allow(""),
1395
1397
 
1396
1398
  last_modified: Joi.string().allow(""),
1397
1399
 
1398
- delivery_charge_info: Joi.string().allow(""),
1400
+ breakup_values: CartModel.CartBreakup(),
1401
+
1402
+ buy_now: Joi.boolean(),
1399
1403
 
1400
1404
  items: Joi.array().items(CartModel.CartProductInfo()),
1401
1405
 
1402
- checkout_mode: Joi.string().allow(""),
1406
+ message: Joi.string().allow(""),
1407
+
1408
+ delivery_charge_info: Joi.string().allow(""),
1409
+
1410
+ restrict_checkout: Joi.boolean(),
1403
1411
 
1404
1412
  comment: Joi.string().allow(""),
1405
1413
 
1406
1414
  delivery_promise: CartModel.ShipmentPromise(),
1407
1415
 
1408
- payment_selection_lock: CartModel.PaymentSelectionLock(),
1416
+ currency: CartModel.CartCurrency(),
1409
1417
 
1410
1418
  is_valid: Joi.boolean(),
1411
1419
 
1412
- message: Joi.string().allow(""),
1413
-
1414
- restrict_checkout: Joi.boolean(),
1415
-
1416
- coupon_text: Joi.string().allow(""),
1417
-
1418
- breakup_values: CartModel.CartBreakup(),
1419
-
1420
- id: Joi.string().allow(""),
1420
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
1421
1421
 
1422
1422
  gstin: Joi.string().allow(""),
1423
1423
 
1424
- buy_now: Joi.boolean(),
1424
+ id: Joi.string().allow(""),
1425
1425
  });
1426
1426
  }
1427
1427
 
1428
1428
  static AddProductCart() {
1429
1429
  return Joi.object({
1430
- seller_id: Joi.number(),
1430
+ parent_item_identifiers: Joi.any(),
1431
1431
 
1432
- item_id: Joi.number(),
1432
+ product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
1433
1433
 
1434
- extra_meta: Joi.any(),
1434
+ _custom_json: Joi.any(),
1435
1435
 
1436
- quantity: Joi.number(),
1436
+ display: Joi.string().allow(""),
1437
1437
 
1438
- product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
1438
+ extra_meta: Joi.any(),
1439
1439
 
1440
- item_size: Joi.string().allow(""),
1440
+ item_id: Joi.number(),
1441
1441
 
1442
- display: Joi.string().allow(""),
1442
+ article_assignment: Joi.any(),
1443
1443
 
1444
1444
  store_id: Joi.number(),
1445
1445
 
1446
- _custom_json: Joi.any(),
1447
-
1448
- parent_item_identifiers: Joi.any(),
1446
+ seller_id: Joi.number(),
1449
1447
 
1450
1448
  article_id: Joi.string().allow(""),
1451
1449
 
1452
1450
  pos: Joi.boolean(),
1453
1451
 
1454
- article_assignment: Joi.any(),
1452
+ quantity: Joi.number(),
1453
+
1454
+ item_size: Joi.string().allow(""),
1455
1455
  });
1456
1456
  }
1457
1457
 
@@ -1463,53 +1463,53 @@ class CartModel {
1463
1463
 
1464
1464
  static AddCartDetailResponse() {
1465
1465
  return Joi.object({
1466
- success: Joi.boolean(),
1467
-
1468
- partial: Joi.boolean(),
1466
+ message: Joi.string().allow(""),
1469
1467
 
1470
1468
  cart: CartModel.CartDetailResponse(),
1471
1469
 
1472
- message: Joi.string().allow(""),
1470
+ success: Joi.boolean(),
1471
+
1472
+ partial: Joi.boolean(),
1473
1473
  });
1474
1474
  }
1475
1475
 
1476
1476
  static UpdateProductCart() {
1477
1477
  return Joi.object({
1478
- item_id: Joi.number(),
1479
-
1480
- extra_meta: Joi.any(),
1478
+ parent_item_identifiers: Joi.any(),
1481
1479
 
1482
- quantity: Joi.number(),
1480
+ _custom_json: Joi.any(),
1483
1481
 
1484
- item_size: Joi.string().allow(""),
1482
+ extra_meta: Joi.any(),
1485
1483
 
1486
- identifiers: CartModel.CartProductIdentifer().required(),
1484
+ item_id: Joi.number(),
1487
1485
 
1488
1486
  item_index: Joi.number(),
1489
1487
 
1490
- _custom_json: Joi.any(),
1488
+ article_id: Joi.string().allow(""),
1491
1489
 
1492
- parent_item_identifiers: Joi.any(),
1490
+ quantity: Joi.number(),
1493
1491
 
1494
- article_id: Joi.string().allow(""),
1492
+ item_size: Joi.string().allow(""),
1493
+
1494
+ identifiers: CartModel.CartProductIdentifer().required(),
1495
1495
  });
1496
1496
  }
1497
1497
 
1498
1498
  static UpdateCartRequest() {
1499
1499
  return Joi.object({
1500
- items: Joi.array().items(CartModel.UpdateProductCart()),
1501
-
1502
1500
  operation: Joi.string().allow("").required(),
1501
+
1502
+ items: Joi.array().items(CartModel.UpdateProductCart()),
1503
1503
  });
1504
1504
  }
1505
1505
 
1506
1506
  static UpdateCartDetailResponse() {
1507
1507
  return Joi.object({
1508
- success: Joi.boolean(),
1508
+ message: Joi.string().allow(""),
1509
1509
 
1510
1510
  cart: CartModel.CartDetailResponse(),
1511
1511
 
1512
- message: Joi.string().allow(""),
1512
+ success: Joi.boolean(),
1513
1513
  });
1514
1514
  }
1515
1515
  }