@gofynd/fdk-client-javascript 1.4.15-beta.1 → 1.4.15-beta.10

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 (154) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.js +0 -18
  8. package/sdk/application/Cart/CartApplicationClient.d.ts +55 -90
  9. package/sdk/application/Cart/CartApplicationClient.js +60 -1185
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -142
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1293
  12. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
  13. package/sdk/application/Common/CommonApplicationClient.js +5 -89
  14. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  15. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -718
  18. package/sdk/application/Content/ContentApplicationClient.d.ts +46 -78
  19. package/sdk/application/Content/ContentApplicationClient.js +77 -914
  20. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -12
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.js +22 -125
  22. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
  23. package/sdk/application/Lead/LeadApplicationClient.js +32 -202
  24. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -39
  25. package/sdk/application/Logistic/LogisticApplicationClient.js +50 -478
  26. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -42
  27. package/sdk/application/Order/OrderApplicationClient.js +86 -472
  28. package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -212
  29. package/sdk/application/Payment/PaymentApplicationClient.js +57 -2102
  30. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -28
  31. package/sdk/application/Rewards/RewardsApplicationClient.js +16 -305
  32. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  33. package/sdk/application/Share/ShareApplicationClient.js +34 -294
  34. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  35. package/sdk/application/Theme/ThemeApplicationClient.js +28 -162
  36. package/sdk/application/User/UserApplicationClient.d.ts +85 -136
  37. package/sdk/application/User/UserApplicationClient.js +45 -1815
  38. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +2 -5
  39. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -47
  40. package/sdk/application/index.d.ts +0 -18
  41. package/sdk/application/index.js +0 -33
  42. package/sdk/common/Utility.d.ts +1 -1
  43. package/sdk/common/Utility.js +10 -7
  44. package/sdk/common/Validator.d.ts +1 -0
  45. package/sdk/common/Validator.js +20 -0
  46. package/sdk/common/utils.d.ts +0 -1
  47. package/sdk/common/utils.js +0 -14
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +2 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -0
  50. package/sdk/partner/OAuthClient.js +1 -0
  51. package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
  52. package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -0
  54. package/sdk/platform/Cart/CartPlatformModel.js +12 -0
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +0 -7
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +1 -4
  57. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +14 -0
  58. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +6 -0
  59. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -1
  60. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +3 -0
  61. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -1
  62. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +3 -0
  63. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -1
  64. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -0
  65. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
  66. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
  67. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  68. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  69. package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
  70. package/sdk/platform/Order/OrderPlatformClient.js +99 -0
  71. package/sdk/platform/Order/OrderPlatformModel.d.ts +7 -0
  72. package/sdk/platform/Order/OrderPlatformModel.js +3 -0
  73. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  74. package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
  75. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  76. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
  77. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +56 -19
  78. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +42 -18
  79. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +3 -3
  80. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -2
  81. package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
  82. package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
  83. package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -2
  84. package/sdk/public/Content/ContentPublicClient.d.ts +1 -1
  85. package/sdk/public/Content/ContentPublicClient.js +14 -2
  86. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  87. package/sdk/public/Partner/PartnerPublicClient.js +14 -2
  88. package/sdk/public/Webhook/WebhookPublicClient.js +5 -2
  89. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
  90. package/sdk/application/Cart/CartApplicationModel.js +0 -2497
  91. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
  92. package/sdk/application/Cart/CartApplicationValidator.js +0 -530
  93. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
  94. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
  95. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  96. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  97. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  98. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  99. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  100. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  101. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  102. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  103. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  104. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  105. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
  106. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
  107. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  108. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  109. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
  110. package/sdk/application/Content/ContentApplicationModel.js +0 -1589
  111. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
  112. package/sdk/application/Content/ContentApplicationValidator.js +0 -264
  113. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
  114. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
  115. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  116. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  117. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  118. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  119. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  120. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  121. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
  122. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
  123. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
  124. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
  125. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
  126. package/sdk/application/Order/OrderApplicationModel.js +0 -1471
  127. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
  128. package/sdk/application/Order/OrderApplicationValidator.js +0 -197
  129. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
  130. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
  131. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  132. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  133. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  134. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  135. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  136. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  137. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  138. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  139. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  140. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  141. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
  142. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
  143. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
  144. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
  145. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  146. package/sdk/application/User/UserApplicationModel.js +0 -1382
  147. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  148. package/sdk/application/User/UserApplicationValidator.js +0 -573
  149. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
  150. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
  151. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  152. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  153. package/sdk/common/Clickstream.d.ts +0 -1
  154. package/sdk/common/Clickstream.js +0 -464
@@ -1,1471 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- /**
4
- * @typedef OrderPage
5
- * @property {string} [type] - Specifies type of pagination. If it is 'cursor'
6
- * based or 'number' based.
7
- * @property {number} [item_total] - Total number of items available across all
8
- * pages. It provides a count of all the items that match the query criteria,
9
- * regardless of pagination.
10
- * @property {number} [current] - Specifies the current page number. It helps in
11
- * identifying the position within the paginated results.
12
- * @property {number} [size] - Represents the number of items on the current
13
- * page. It indicates how many items are included in each page of the
14
- * paginated response.
15
- * @property {boolean} [has_next] - Indicates whether there is a next page
16
- * available. It is true if a next page exists and false if the current page
17
- * is the last one.
18
- */
19
-
20
- /**
21
- * @typedef UserInfo
22
- * @property {string} [first_name] - First name of the user.
23
- * @property {string} [gender] - Gender of the user.
24
- * @property {string} [name] - Full name of the user (including first and last names).
25
- * @property {string} [last_name] - Last name of the user.
26
- * @property {string} [mobile] - Mobile number of the user.
27
- * @property {string} [email] - Email address of the user.
28
- */
29
-
30
- /**
31
- * @typedef BreakupValues
32
- * @property {number} [value] - The numerical value associated with the entity.
33
- * @property {string} [currency_symbol] - Symbol representing the currency used
34
- * for the value.
35
- * @property {string} [name] - The official name of the entity.
36
- * @property {string} [display] - The name of the entity as it should be displayed.
37
- * @property {string} [currency_code] - The international currency code
38
- * representing the currency used for the value.
39
- */
40
-
41
- /**
42
- * @typedef ShipmentPayment
43
- * @property {string} [mop] - Abbreviation or code for the payment mode.
44
- * @property {string} [payment_mode] - The specific payment mode used.
45
- * @property {string} [status] - The current status of the payment.
46
- * @property {string} [mode] - The payment mode.
47
- * @property {string} [logo] - URL of the logo representing the payment mode.
48
- * @property {string} [display_name] - The name to be displayed for the payment mode.
49
- */
50
-
51
- /**
52
- * @typedef ShipmentPaymentInfo
53
- * @property {string} [mop] - Stands for "Mode of Payment". This is a short code
54
- * (like "COD" for Cash On Delivery) that represents the payment method used.
55
- * @property {string} [payment_mode] - Information about the payment mode,
56
- * indicates whether COD or PREPAID.
57
- * @property {string} [status] - Indicates the current status of the payment,
58
- * Paid or Unpaid.
59
- * @property {string} [mode] - Information about the payment source. For eg, NB_ICICI.
60
- * @property {string} [logo] - A URL to an image representing the payment method.
61
- * @property {string} [display_name] - The name of the payment method as it
62
- * should be displayed to the user.
63
- * @property {number} [amount] - Amount paid using this payment method.
64
- */
65
-
66
- /**
67
- * @typedef ShipmentUserInfo
68
- * @property {string} [first_name] - The unique identifier of the store.
69
- * @property {string} [gender] - A code associated with the store.
70
- * @property {string} [name] - The name of the store.
71
- * @property {string} [last_name] - The name of the company associated with the store.
72
- * @property {string} [mobile] - The identifier of the company associated with the store.
73
- * @property {string} [email] - Email address of the user.
74
- */
75
-
76
- /**
77
- * @typedef FulfillingStore
78
- * @property {number} [id] - The unique identifier of the store.
79
- * @property {string} [code] - A code associated with the store.
80
- * @property {string} [name] - The name of the store.
81
- * @property {string} [company_name] - The name of the company associated with the store.
82
- * @property {number} [company_id] - The identifier of the company associated
83
- * with the store.
84
- */
85
-
86
- /**
87
- * @typedef ShipmentStatus
88
- * @property {string} [value] - The internal or code value representing the
89
- * shipment status.
90
- * @property {string} [title] - The title or display name representing the
91
- * shipment status.
92
- * @property {string} [hex_code] - The hexadecimal color code associated with
93
- * the shipment status.
94
- */
95
-
96
- /**
97
- * @typedef Invoice
98
- * @property {string} [invoice_url] - URL providing access to the invoice.
99
- * @property {string} [updated_date] - The date and time when the invoice was
100
- * last updated.
101
- * @property {string} [label_url] - URL providing access to the invoice label.
102
- */
103
-
104
- /**
105
- * @typedef NestedTrackingDetails
106
- * @property {boolean} [is_passed] - Indicates whether the tracking event has
107
- * passed or occurred.
108
- * @property {string} [time] - The time associated with the tracking event.
109
- * @property {boolean} [is_current] - Indicates whether the tracking event is
110
- * the current or active status.
111
- * @property {string} [status] - The status of the tracking event.
112
- */
113
-
114
- /**
115
- * @typedef TrackingDetails
116
- * @property {string} [value] - Current value or state of the process.
117
- * @property {boolean} [is_current] - Indicates whether the tracking event is
118
- * the current or active status.
119
- * @property {boolean} [is_passed] - Indicates whether the tracking event has
120
- * passed or occurred.
121
- * @property {string} [status] - The status of the tracking event.
122
- * @property {string} [time] - The time associated with the tracking event.
123
- * @property {string} [created_ts] - Timestamp when this status was created.
124
- * @property {NestedTrackingDetails[]} [tracking_details] - Nested tracking details.
125
- */
126
-
127
- /**
128
- * @typedef TimeStampData
129
- * @property {string} [min] - The minimum timestamp value.
130
- * @property {string} [max] - The maximum timestamp value.
131
- */
132
-
133
- /**
134
- * @typedef Promise
135
- * @property {boolean} [show_promise] - Indicates whether the promise details
136
- * should be shown.
137
- * @property {TimeStampData} [timestamp]
138
- */
139
-
140
- /**
141
- * @typedef ShipmentTotalDetails
142
- * @property {number} [pieces] - The total number of pieces included.
143
- * @property {number} [total_price] - The total price of the order or item.
144
- * @property {number} [sizes] - The number of different sizes included.
145
- */
146
-
147
- /**
148
- * @typedef Prices
149
- * @property {number} [delivery_charge] - The delivery charge for the order.
150
- * @property {number} [coupon_value] - The value of the coupon applied.
151
- * @property {number} [brand_calculated_amount] - The amount calculated by the brand.
152
- * @property {number} [value_of_good] - The value of the goods before tax and
153
- * other charges.
154
- * @property {number} [price_marked] - The original marked price of the item.
155
- * @property {number} [coupon_effective_discount] - The effective discount from coupons.
156
- * @property {string} [currency_symbol] - The symbol of the currency used.
157
- * @property {number} [discount] - The discount applied to the item.
158
- * @property {number} [gst_tax_percentage] - The GST tax percentage applied.
159
- * @property {number} [cod_charges] - The cash on delivery charges, if applicable.
160
- * @property {number} [amount_paid] - The total amount paid by the customer.
161
- * @property {boolean} [added_to_fynd_cash] - Indicates if the refund amount was
162
- * added to Fynd Cash.
163
- * @property {number} [transfer_price] - The transfer price of the item.
164
- * @property {number} [cashback_applied] - The amount of cashback applied.
165
- * @property {number} [price_effective] - The effective price after all adjustments.
166
- * @property {number} [cashback] - The cashback amount earned.
167
- * @property {number} [refund_credit] - The amount credited for refund .
168
- * @property {number} [amount_paid_roundoff] - The rounded-off amount paid by
169
- * the customer.
170
- * @property {number} [promotion_effective_discount] - The effective discount
171
- * from promotions.
172
- * @property {number} [refund_amount] - The amount refunded to the customer.
173
- * @property {string} [currency_code] - The code of the currency used.
174
- * @property {number} [fynd_credits] - The amount of Fynd credits used.
175
- * @property {number} [amount_to_be_collected] - The total amount that needs to
176
- * be collected from the customer.
177
- */
178
-
179
- /**
180
- * @typedef ItemBrand
181
- * @property {string} [logo] - The URL of the brand's logo.
182
- * @property {string} [name] - The name of the brand.
183
- */
184
-
185
- /**
186
- * @typedef Item
187
- * @property {string[]} [image] - An array of URLs pointing to images of the item.
188
- * @property {string[]} [l1_categories] - An array of level 1 categories to
189
- * which the item belongs.
190
- * @property {string[]} [l2_category] - An array of level 2 categories to which
191
- * the item belongs.
192
- * @property {number} [l2_category_id] - ID representing the level 2 category
193
- * classification of the item
194
- * @property {ItemBrand} [brand]
195
- * @property {string} [seller_identifier] - The identifier for the seller .
196
- * @property {string} [code] - The code or SKU of the item.
197
- * @property {number} [id] - The unique identifier of the item.
198
- * @property {string} [name] - The name of the item.
199
- * @property {string} [l3_category_name] - The level 3 category name.
200
- * @property {string} [slug_key] - A unique key or identifier for the item slug.
201
- * @property {string[]} [l2_categories] - An array of level 2 categories the
202
- * item belongs to.
203
- * @property {string} [size] - The size of the item.
204
- * @property {Object} [attributes] - An object containing various attributes of the item.
205
- */
206
-
207
- /**
208
- * @typedef AppliedFreeArticles
209
- * @property {string} [article_id] - The unique identifier for the article.
210
- * @property {Object} [free_gift_item_details] - An object containing details
211
- * about the free gift item.
212
- * @property {string} [parent_item_identifier] - The identifier for the parent
213
- * item to which this free article is related.
214
- * @property {number} [quantity] - The quantity of the free article.
215
- */
216
-
217
- /**
218
- * @typedef AppliedPromos
219
- * @property {boolean} [mrp_promotion] - Indicates if the promotion is applied to the MRP.
220
- * @property {string} [promotion_name] - The name of the promotion .
221
- * @property {number} [article_quantity] - The quantity of articles required to
222
- * qualify for the promotion.
223
- * @property {string} [promo_id] - The unique identifier for the promotion.
224
- * @property {number} [amount] - The discount amount provided by the promotion.
225
- * @property {string} [promotion_type] - The type of promotion.
226
- * @property {AppliedFreeArticles[]} [applied_free_articles] - An array
227
- * containing details of free articles applied under the promotion.
228
- */
229
-
230
- /**
231
- * @typedef Identifiers
232
- * @property {string} [ean] - The European Article Number (EAN) of the item.
233
- * @property {string} [sku_code] - The Stock Keeping Unit (SKU) code of the item.
234
- */
235
-
236
- /**
237
- * @typedef FinancialBreakup
238
- * @property {number} [coupon_value] - The value of the coupon applied.
239
- * @property {number} [delivery_charge] - The delivery charge for the order.
240
- * @property {number} [brand_calculated_amount] - The amount calculated by the brand.
241
- * @property {number} [value_of_good] - The value of the goods before tax and
242
- * other charges.
243
- * @property {number} [price_marked] - The original marked price of the item.
244
- * @property {number} [coupon_effective_discount] - The effective discount from coupons.
245
- * @property {string} [hsn_code] - The HSN (Harmonized System of Nomenclature)
246
- * code of the item.
247
- * @property {number} [discount] - The discount applied to the item.
248
- * @property {number} [gst_tax_percentage] - The GST tax percentage applied .
249
- * @property {number} [cod_charges] - The cash on delivery charges, if applicable.
250
- * @property {number} [amount_paid] - The total amount paid by the customer.
251
- * @property {boolean} [added_to_fynd_cash] - Indicates if the refund amount was
252
- * added to Fynd Cash.
253
- * @property {string} [size] - The size of the item .
254
- * @property {number} [transfer_price] - The transfer price of the item.
255
- * @property {number} [cashback_applied] - The amount of cashback applied.
256
- * @property {number} [price_effective] - The effective price after all adjustments.
257
- * @property {number} [cashback] - The cashback amount earned.
258
- * @property {number} [refund_credit] - The amount credited for refund .
259
- * @property {number} [amount_paid_roundoff] - The rounded-off amount paid by
260
- * the customer.
261
- * @property {number} [total_units] - The total number of units purchased.
262
- * @property {Identifiers} [identifiers]
263
- * @property {string} [gst_tag] - The GST tag indicating the type of GST applied.
264
- * @property {string} [item_name] - The name of the item.
265
- * @property {number} [promotion_effective_discount] - The effective discount
266
- * from promotions.
267
- * @property {number} [gst_fee] - The GST fee applied to the item.
268
- * @property {number} [refund_amount] - The amount refunded to the customer.
269
- * @property {number} [fynd_credits] - The amount of Fynd credits used.
270
- * @property {number} [amount_to_be_collected] - The total amount that needs to
271
- * be collected from the customer.
272
- */
273
-
274
- /**
275
- * @typedef CurrentStatus
276
- * @property {string} [updated_at] - The date and time when the status was last updated.
277
- * @property {string} [name] - The name or label indicating the current state or status.
278
- * @property {string} [status] - The current status of the bag.
279
- * @property {string} [journey_type] - The type of journey for the shipment,
280
- * indicating the direction of the shipment.
281
- */
282
-
283
- /**
284
- * @typedef Bags
285
- * @property {string} [delivery_date] - The date and time when the item is
286
- * expected to be delivered .
287
- * @property {number} [line_number] - The line number of the item in the order.
288
- * @property {string} [currency_symbol] - The symbol of the currency used.
289
- * @property {Item} [item]
290
- * @property {AppliedPromos[]} [applied_promos] - An array containing
291
- * information about applied promotions.
292
- * @property {number} [quantity] - The quantity of the item.
293
- * @property {Prices} [prices]
294
- * @property {boolean} [can_cancel] - Indicates if the item can be canceled.
295
- * @property {boolean} [can_return] - Indicates if the item can be returned.
296
- * @property {number} [id] - The unique identifier for the order item.
297
- * @property {string} [returnable_date] - The last date and time by which the
298
- * item can be returned.
299
- * @property {FinancialBreakup[]} [financial_breakup] - An array containing
300
- * financial details of the item.
301
- * @property {Object} [parent_promo_bags] - An object containing details of
302
- * parent promotional bags.
303
- * @property {Object} [meta] - An object containing metadata for the item.
304
- * @property {string} [currency_code] - The code of the currency used.
305
- * @property {string} [seller_identifier] - The identifier for the seller.
306
- * @property {CurrentStatus} [current_status]
307
- * @property {Article} [article]
308
- */
309
-
310
- /**
311
- * @typedef FulfillingCompany
312
- * @property {number} [id] - The unique identifier for the fulfilling company.
313
- * @property {string} [name] - The name of the fulfilling company.
314
- */
315
-
316
- /**
317
- * @typedef Article
318
- * @property {string[]} [tags] - An array of tags associated with the article.
319
- */
320
-
321
- /**
322
- * @typedef Address
323
- * @property {string} [pincode] - The postal code of the address.
324
- * @property {string} [phone] - The phone number of the person associated with
325
- * the address.
326
- * @property {number} [latitude] - The latitude coordinate.
327
- * @property {string} [address2] - The secondary line of the address.
328
- * @property {string} [landmark] - A nearby landmark.
329
- * @property {string} [area] - The area or locality.
330
- * @property {string} [city] - The city of the address.
331
- * @property {string} [address] - The full address.
332
- * @property {string} [address_type] - The type of address.
333
- * @property {number} [longitude] - The longitude coordinate.
334
- * @property {string} [country_iso_code] - The ISO code for the country.
335
- * @property {string} [state] - The state of the address.
336
- * @property {string} [created_at] - The date and time when the address was created.
337
- * @property {string} [address1] - The primary line of the address.
338
- * @property {string} [display_address] - The formatted display address,
339
- * typically used for printing or displaying in user interfaces.
340
- * @property {string} [name] - The name of the person associated with the address.
341
- * @property {string} [contact_person] - The name of the contact person.
342
- * @property {string} [address_category] - The category of the address.
343
- * @property {string} [email] - The email address.
344
- * @property {string} [country_phone_code] - The country phone code.
345
- * @property {string} [version] - The version of the address format.
346
- * @property {string} [updated_at] - The date and time when the address was last updated .
347
- * @property {string} [country] - The country of the address.
348
- */
349
-
350
- /**
351
- * @typedef Shipments
352
- * @property {ShipmentPayment} [payment]
353
- * @property {ShipmentPaymentInfo[]} [payment_info] - Array of objects
354
- * containing payment methods used for placing an order. Each object will
355
- * provide information about corresponding payment method with relevant details.
356
- * @property {string} [order_type] - The type of order.
357
- * @property {string} [gstin_code] - The GSTIN code for the shipment.
358
- * @property {boolean} [show_download_invoice] - Indicates if the download
359
- * invoice option should be shown.
360
- * @property {boolean} [can_cancel] - Indicates if the shipment can be canceled.
361
- * @property {ShipmentUserInfo} [user_info]
362
- * @property {string} [shipment_id] - The unique identifier for the shipment.
363
- * @property {FulfillingStore} [fulfilling_store]
364
- * @property {Object[]} [custom_meta] - An object containing custom metadata for
365
- * the shipment.
366
- * @property {ShipmentStatus} [shipment_status]
367
- * @property {string} [comment] - Any comments related to the shipment.
368
- * @property {Invoice} [invoice]
369
- * @property {boolean} [show_track_link] - Indicates if the track link should be shown.
370
- * @property {Object} [refund_details] - An object containing details of any refunds.
371
- * @property {BreakupValues[]} [breakup_values] - An array containing the
372
- * breakup of various charges and discounts.
373
- * @property {Object} [can_break] - An object containing details about the
374
- * breakability of the shipment.
375
- * @property {string} [traking_no] - The tracking number for the shipment.
376
- * @property {TrackingDetails[]} [tracking_details] - An array containing
377
- * details of the tracking history of the shipment.
378
- * @property {Promise} [promise]
379
- * @property {number} [total_bags] - The total number of bags in the shipment.
380
- * @property {ShipmentTotalDetails} [total_details]
381
- * @property {Prices} [prices]
382
- * @property {string} [returnable_date] - The last date by which the item can be returned.
383
- * @property {string} [shipment_created_at] - The date and time when the
384
- * shipment was created.
385
- * @property {string} [shipment_created_ts] - The timestamp when the shipment was created.
386
- * @property {Object} [size_info] - An object containing size information for
387
- * the items in the shipment.
388
- * @property {Bags[]} [bags] - An array containing details about the individual
389
- * bags in the shipment.
390
- * @property {string} [dp_name] - The name of the delivery partner.
391
- * @property {string} [awb_no] - The airway bill number for the shipment.
392
- * @property {boolean} [beneficiary_details] - Indicates if there are any
393
- * beneficiary details.
394
- * @property {FulfillingCompany} [fulfilling_company]
395
- * @property {boolean} [can_return] - Indicates if the shipment can be returned.
396
- * @property {Address} [delivery_address]
397
- * @property {Address} [billing_address]
398
- * @property {string} [track_url] - The URL for tracking the shipment.
399
- * @property {string} [order_id] - The unique identifier for the order.
400
- * @property {string} [need_help_url] - The URL for customer support or help.
401
- * @property {Object} [return_meta] - An object containing metadata about the
402
- * return process.
403
- * @property {string} [delivery_date] - The expected delivery date.
404
- * @property {OrderRequest} [order]
405
- */
406
-
407
- /**
408
- * @typedef BagsForReorderArticleAssignment
409
- * @property {string} [strategy] - The strategy used for article assignment.
410
- * @property {string} [level] - The level at which the article assignment is made.
411
- */
412
-
413
- /**
414
- * @typedef BagsForReorder
415
- * @property {string} [item_size] - The size of the item.
416
- * @property {number} [quantity] - The quantity of the item.
417
- * @property {number} [store_id] - The identifier for the store.
418
- * @property {BagsForReorderArticleAssignment} [article_assignment]
419
- * @property {number} [seller_id] - The identifier for the seller.
420
- * @property {number} [item_id] - The unique identifier for the item.
421
- */
422
-
423
- /**
424
- * @typedef OrderSchema
425
- * @property {number} [total_shipments_in_order] - The total number of shipments
426
- * in the order.
427
- * @property {string} [gstin_code] - The GSTIN code for the shipment.
428
- * @property {UserInfo} [user_info]
429
- * @property {BreakupValues[]} [breakup_values] - An array containing the
430
- * breakup of various charges and discounts.
431
- * @property {string} [order_created_time] - The date and time when the order was created.
432
- * @property {string} [order_created_ts] - The timestamp when the order was created.
433
- * @property {string} [order_id] - The unique identifier for the order.
434
- * @property {Shipments[]} [shipments] - An array containing details of
435
- * individual shipments within the order.
436
- * @property {BagsForReorder[]} [bags_for_reorder] - An array containing details
437
- * of bags available for reorder.
438
- * @property {Object} [meta] - An object containing additional metadata for the order.
439
- */
440
-
441
- /**
442
- * @typedef OrderStatuses
443
- * @property {number} [value] - The value representing the selection.
444
- * @property {boolean} [is_selected] - Indicates whether this option is
445
- * currently selected.
446
- * @property {string} [display] - The text to display .
447
- */
448
-
449
- /**
450
- * @typedef OrderFilters
451
- * @property {OrderStatuses[]} [statuses] - An array containing the order statuses.
452
- */
453
-
454
- /**
455
- * @typedef OrderList
456
- * @property {OrderPage} [page]
457
- * @property {OrderSchema[]} [items] - List of orders, each containing detailed
458
- * information about individual orders and their respective shipments.
459
- * @property {OrderFilters} [filters]
460
- */
461
-
462
- /**
463
- * @typedef ApefaceApiError
464
- * @property {string} [message] - Contains any message related to the operation.
465
- * @property {boolean} [success] - Indicates if the operation was successful.
466
- */
467
-
468
- /**
469
- * @typedef OrderById
470
- * @property {OrderSchema} [order]
471
- */
472
-
473
- /**
474
- * @typedef ShipmentById
475
- * @property {Shipments} [shipment]
476
- */
477
-
478
- /**
479
- * @typedef ResponseGetInvoiceShipment
480
- * @property {string} presigned_type - Type of presigned URL.
481
- * @property {boolean} success - Indicates if the operation was successful .
482
- * @property {string} shipment_id - Identifier for the shipment.
483
- * @property {string} presigned_url - The presigned URL for accessing the
484
- * shipment data, obtained from the response data.
485
- */
486
-
487
- /**
488
- * @typedef Track
489
- * @property {string} [account_name] - The name of the account handling the shipment.
490
- * @property {string} [shipment_type] - The type of shipment.
491
- * @property {string} [status] - The current status of the shipment.
492
- * @property {string} [last_location_recieved_at] - The last known location of
493
- * the shipment.
494
- * @property {string} [updated_time] - The timestamp of the last update.
495
- * @property {string} [updated_at] - The date and time when the shipment was last updated.
496
- * @property {string} [reason] - The reason or additional information about the shipment.
497
- * @property {string} [awb] - The Air Waybill (AWB) number for the shipment.
498
- */
499
-
500
- /**
501
- * @typedef ShipmentTrack
502
- * @property {Track[]} [results] - A array containing tracking details.
503
- */
504
-
505
- /**
506
- * @typedef CustomerDetailsResponse
507
- * @property {string} [phone] - Customer's phone number.
508
- * @property {string} [shipment_id] - Unique identifier of the shipment.
509
- * @property {string} [name] - Customer's name.
510
- * @property {string} [order_id] - Unique identifier of the order.
511
- * @property {string} [country] - Country of the customer.
512
- */
513
-
514
- /**
515
- * @typedef SendOtpToCustomerResponse
516
- * @property {string} [request_id] - Unique identifier for the request.
517
- * @property {string} [message] - Message indicating the result of the request.
518
- * @property {boolean} [success] - Indicates whether the request was successful.
519
- * @property {number} [resend_timer] - Time in seconds before the OTP can be resent.
520
- */
521
-
522
- /**
523
- * @typedef VerifyOtp
524
- * @property {string} [otp_code] - The OTP code provided by the user for verification.
525
- * @property {string} [request_id] - Unique identifier for the request.
526
- */
527
-
528
- /**
529
- * @typedef VerifyOtpResponse
530
- * @property {boolean} [success] - Indicates whether the request was successful.
531
- */
532
-
533
- /**
534
- * @typedef BagReasonMeta
535
- * @property {boolean} [show_text_area] - Indicates whether to display a text
536
- * box on the front end.
537
- */
538
-
539
- /**
540
- * @typedef QuestionSet
541
- * @property {number} [id] - The unique identifier for the question.
542
- * @property {string} [display_name] - The text displayed for the question.
543
- */
544
-
545
- /**
546
- * @typedef BagReasons
547
- * @property {string[]} [qc_type] - A list of quality check types.
548
- * @property {number} [id] - The unique identifier.
549
- * @property {string} [display_name] - The text displayed.
550
- * @property {BagReasonMeta} [meta]
551
- * @property {QuestionSet[]} [question_set] - A list of questions for delivery partner.
552
- * @property {BagReasons[]} [reasons] - A list of reasons.
553
- */
554
-
555
- /**
556
- * @typedef ShipmentBagReasons
557
- * @property {BagReasons[]} [reasons] - A list of shipment's bag reasons.
558
- * @property {boolean} [success] - Indicates if the operation was successful.
559
- */
560
-
561
- /**
562
- * @typedef ShipmentReason
563
- * @property {number} [priority] - The priority level of the reason.
564
- * @property {boolean} [show_text_area] - A flag indicating whether to show a
565
- * textbox on the frontend.
566
- * @property {number} [reason_id] - The unique identifier for the reason.
567
- * @property {string} [feedback_type] - The type of feedback.
568
- * @property {string} [reason_text] - The text describing the reason.
569
- * @property {string} [flow] - The process flow related to the reason.
570
- */
571
-
572
- /**
573
- * @typedef ShipmentReasons
574
- * @property {ShipmentReason[]} [reasons] - A list of shipment reasons.
575
- */
576
-
577
- /**
578
- * @typedef ProductsReasonsData
579
- * @property {number} [reason_id] - The unique identifier for the reason.
580
- * @property {string} [reason_text] - The text describing the reason.
581
- */
582
-
583
- /**
584
- * @typedef ProductsReasonsFilters
585
- * @property {number} [line_number] - The specific line item of bag.
586
- * @property {number} [quantity] - The quantity of the product.
587
- * @property {string} [identifier] - The unique identifier for the product.
588
- */
589
-
590
- /**
591
- * @typedef ProductsReasons
592
- * @property {ProductsReasonsData} [data]
593
- * @property {ProductsReasonsFilters[]} [filters] - Criteria applied to filter
594
- * the products.
595
- */
596
-
597
- /**
598
- * @typedef EntityReasonData
599
- * @property {number} [reason_id] - The unique identifier for the reason.
600
- * @property {string} [reason_text] - The text describing the reason.
601
- */
602
-
603
- /**
604
- * @typedef EntitiesReasons
605
- * @property {EntityReasonData} [data]
606
- * @property {Object[]} [filters] - Criteria applied to filter the shipment.
607
- */
608
-
609
- /**
610
- * @typedef ReasonsData
611
- * @property {ProductsReasons[]} [products] - Reasons data for bags.
612
- * @property {EntitiesReasons[]} [entities] - Reasons data for shipments.
613
- */
614
-
615
- /**
616
- * @typedef Products
617
- * @property {number} [line_number] - The specific line item of bag.
618
- * @property {number} [quantity] - The quantity of the product.
619
- * @property {string} [identifier] - The unique identifier for the product.
620
- */
621
-
622
- /**
623
- * @typedef ProductsDataUpdatesFilters
624
- * @property {number} [line_number] - The specific line item of bag.
625
- * @property {string} [identifier] - The quantity of the product.
626
- */
627
-
628
- /**
629
- * @typedef ProductsDataUpdates
630
- * @property {Object} [data] - Information about the data to be updated.
631
- * @property {ProductsDataUpdatesFilters[]} [filters] - Criteria applied to
632
- * filter the products.
633
- */
634
-
635
- /**
636
- * @typedef EntitiesDataUpdates
637
- * @property {Object} [data] - Information about the data to be updated.
638
- * @property {Object[]} [filters] - Criteria applied to filter the shipments.
639
- */
640
-
641
- /**
642
- * @typedef DataUpdates
643
- * @property {ProductsDataUpdates[]} [products] - Data updates for bags.
644
- * @property {EntitiesDataUpdates[]} [entities] - Data updates for shipments.
645
- */
646
-
647
- /**
648
- * @typedef ShipmentsRequest
649
- * @property {ReasonsData} [reasons]
650
- * @property {Products[]} [products] - Specific bag to be updated.
651
- * @property {DataUpdates} [data_updates]
652
- * @property {string} identifier - The unique identifier for request which is
653
- * the shipment_id.
654
- */
655
-
656
- /**
657
- * @typedef StatuesRequest
658
- * @property {ShipmentsRequest[]} [shipments] - A list containing information
659
- * about shipments.
660
- * @property {string} [exclude_bags_next_state] - State to be change for
661
- * Remaining Bag/Products.
662
- * @property {string} [status] - The status to which the entity is to be transitioned.
663
- */
664
-
665
- /**
666
- * @typedef OrderRequest
667
- * @property {Object} [meta] - Metadata for the order.
668
- */
669
-
670
- /**
671
- * @typedef UpdateShipmentStatusRequest
672
- * @property {StatuesRequest[]} [statuses] - An array containing different status details.
673
- * @property {boolean} [task] - Indicates whether the task is active or required.
674
- * @property {boolean} [lock_after_transition] - Indicates whether the status
675
- * should be locked after the transition.
676
- * @property {boolean} [force_transition] - Indicates whether the transition
677
- * should be forced.
678
- * @property {boolean} [unlock_before_transition] - Indicates whether the status
679
- * should be unlocked before the transition.
680
- */
681
-
682
- /**
683
- * @typedef StatusesBodyResponse
684
- * @property {Object[]} [shipments] - List of shipments.
685
- */
686
-
687
- /**
688
- * @typedef ShipmentApplicationStatusResponse
689
- * @property {StatusesBodyResponse[]} [statuses] - An array containing different
690
- * status options of shipments.
691
- */
692
-
693
- /**
694
- * @typedef ErrorResponse
695
- * @property {string} [code] - The HTTP status code of the response.
696
- * @property {string} [message] - A message providing details about the response.
697
- * @property {number} [status] - An additional code providing more context about
698
- * the response.
699
- * @property {string} [exception] - Details of any exception that occurred.
700
- * @property {string} [stack_trace] - The stack trace of any exception that occurred.
701
- */
702
-
703
- class OrderApplicationModel {
704
- /** @returns {OrderPage} */
705
- static OrderPage() {
706
- return Joi.object({
707
- type: Joi.string().allow(""),
708
- item_total: Joi.number(),
709
- current: Joi.number(),
710
- size: Joi.number(),
711
- has_next: Joi.boolean(),
712
- });
713
- }
714
-
715
- /** @returns {UserInfo} */
716
- static UserInfo() {
717
- return Joi.object({
718
- first_name: Joi.string().allow(""),
719
- gender: Joi.string().allow(""),
720
- name: Joi.string().allow(""),
721
- last_name: Joi.string().allow(""),
722
- mobile: Joi.string().allow(""),
723
- email: Joi.string().allow(""),
724
- });
725
- }
726
-
727
- /** @returns {BreakupValues} */
728
- static BreakupValues() {
729
- return Joi.object({
730
- value: Joi.number(),
731
- currency_symbol: Joi.string().allow(""),
732
- name: Joi.string().allow(""),
733
- display: Joi.string().allow(""),
734
- currency_code: Joi.string().allow(""),
735
- });
736
- }
737
-
738
- /** @returns {ShipmentPayment} */
739
- static ShipmentPayment() {
740
- return Joi.object({
741
- mop: Joi.string().allow(""),
742
- payment_mode: Joi.string().allow(""),
743
- status: Joi.string().allow(""),
744
- mode: Joi.string().allow(""),
745
- logo: Joi.string().allow(""),
746
- display_name: Joi.string().allow(""),
747
- });
748
- }
749
-
750
- /** @returns {ShipmentPaymentInfo} */
751
- static ShipmentPaymentInfo() {
752
- return Joi.object({
753
- mop: Joi.string().allow(""),
754
- payment_mode: Joi.string().allow(""),
755
- status: Joi.string().allow(""),
756
- mode: Joi.string().allow(""),
757
- logo: Joi.string().allow(""),
758
- display_name: Joi.string().allow(""),
759
- amount: Joi.number(),
760
- });
761
- }
762
-
763
- /** @returns {ShipmentUserInfo} */
764
- static ShipmentUserInfo() {
765
- return Joi.object({
766
- first_name: Joi.string().allow(""),
767
- gender: Joi.string().allow(""),
768
- name: Joi.string().allow(""),
769
- last_name: Joi.string().allow(""),
770
- mobile: Joi.string().allow(""),
771
- email: Joi.string().allow(""),
772
- });
773
- }
774
-
775
- /** @returns {FulfillingStore} */
776
- static FulfillingStore() {
777
- return Joi.object({
778
- id: Joi.number(),
779
- code: Joi.string().allow(""),
780
- name: Joi.string().allow(""),
781
- company_name: Joi.string().allow(""),
782
- company_id: Joi.number(),
783
- });
784
- }
785
-
786
- /** @returns {ShipmentStatus} */
787
- static ShipmentStatus() {
788
- return Joi.object({
789
- value: Joi.string().allow("").allow(null),
790
- title: Joi.string().allow(""),
791
- hex_code: Joi.string().allow(""),
792
- });
793
- }
794
-
795
- /** @returns {Invoice} */
796
- static Invoice() {
797
- return Joi.object({
798
- invoice_url: Joi.string().allow(""),
799
- updated_date: Joi.string().allow(""),
800
- label_url: Joi.string().allow(""),
801
- });
802
- }
803
-
804
- /** @returns {NestedTrackingDetails} */
805
- static NestedTrackingDetails() {
806
- return Joi.object({
807
- is_passed: Joi.boolean(),
808
- time: Joi.string().allow(""),
809
- is_current: Joi.boolean(),
810
- status: Joi.string().allow(""),
811
- });
812
- }
813
-
814
- /** @returns {TrackingDetails} */
815
- static TrackingDetails() {
816
- return Joi.object({
817
- value: Joi.string().allow("").allow(null),
818
- is_current: Joi.boolean(),
819
- is_passed: Joi.boolean(),
820
- status: Joi.string().allow(""),
821
- time: Joi.string().allow(""),
822
- created_ts: Joi.string().allow(""),
823
- tracking_details: Joi.array().items(
824
- OrderApplicationModel.NestedTrackingDetails()
825
- ),
826
- });
827
- }
828
-
829
- /** @returns {TimeStampData} */
830
- static TimeStampData() {
831
- return Joi.object({
832
- min: Joi.string().allow(""),
833
- max: Joi.string().allow(""),
834
- });
835
- }
836
-
837
- /** @returns {Promise} */
838
- static Promise() {
839
- return Joi.object({
840
- show_promise: Joi.boolean(),
841
- timestamp: OrderApplicationModel.TimeStampData(),
842
- });
843
- }
844
-
845
- /** @returns {ShipmentTotalDetails} */
846
- static ShipmentTotalDetails() {
847
- return Joi.object({
848
- pieces: Joi.number(),
849
- total_price: Joi.number(),
850
- sizes: Joi.number(),
851
- });
852
- }
853
-
854
- /** @returns {Prices} */
855
- static Prices() {
856
- return Joi.object({
857
- delivery_charge: Joi.number(),
858
- coupon_value: Joi.number(),
859
- brand_calculated_amount: Joi.number(),
860
- value_of_good: Joi.number(),
861
- price_marked: Joi.number(),
862
- coupon_effective_discount: Joi.number(),
863
- currency_symbol: Joi.string().allow(""),
864
- discount: Joi.number(),
865
- gst_tax_percentage: Joi.number(),
866
- cod_charges: Joi.number(),
867
- amount_paid: Joi.number(),
868
- added_to_fynd_cash: Joi.boolean(),
869
- transfer_price: Joi.number(),
870
- cashback_applied: Joi.number(),
871
- price_effective: Joi.number(),
872
- cashback: Joi.number(),
873
- refund_credit: Joi.number(),
874
- amount_paid_roundoff: Joi.number(),
875
- promotion_effective_discount: Joi.number(),
876
- refund_amount: Joi.number(),
877
- currency_code: Joi.string().allow(""),
878
- fynd_credits: Joi.number(),
879
- amount_to_be_collected: Joi.number(),
880
- });
881
- }
882
-
883
- /** @returns {ItemBrand} */
884
- static ItemBrand() {
885
- return Joi.object({
886
- logo: Joi.string().allow(""),
887
- name: Joi.string().allow(""),
888
- });
889
- }
890
-
891
- /** @returns {Item} */
892
- static Item() {
893
- return Joi.object({
894
- image: Joi.array().items(Joi.string().allow("")),
895
- l1_categories: Joi.array().items(Joi.string().allow("")),
896
- l2_category: Joi.array().items(Joi.string().allow("")),
897
- l2_category_id: Joi.number(),
898
- brand: OrderApplicationModel.ItemBrand(),
899
- seller_identifier: Joi.string().allow(""),
900
- code: Joi.string().allow(""),
901
- id: Joi.number(),
902
- name: Joi.string().allow(""),
903
- l3_category_name: Joi.string().allow(""),
904
- slug_key: Joi.string().allow(""),
905
- l2_categories: Joi.array().items(Joi.string().allow("")),
906
- size: Joi.string().allow(""),
907
- attributes: Joi.object().pattern(/\S/, Joi.any()),
908
- });
909
- }
910
-
911
- /** @returns {AppliedFreeArticles} */
912
- static AppliedFreeArticles() {
913
- return Joi.object({
914
- article_id: Joi.string().allow(""),
915
- free_gift_item_details: Joi.any(),
916
- parent_item_identifier: Joi.string().allow(""),
917
- quantity: Joi.number(),
918
- });
919
- }
920
-
921
- /** @returns {AppliedPromos} */
922
- static AppliedPromos() {
923
- return Joi.object({
924
- mrp_promotion: Joi.boolean(),
925
- promotion_name: Joi.string().allow(""),
926
- article_quantity: Joi.number(),
927
- promo_id: Joi.string().allow(""),
928
- amount: Joi.number(),
929
- promotion_type: Joi.string().allow(""),
930
- applied_free_articles: Joi.array().items(
931
- OrderApplicationModel.AppliedFreeArticles()
932
- ),
933
- });
934
- }
935
-
936
- /** @returns {Identifiers} */
937
- static Identifiers() {
938
- return Joi.object({
939
- ean: Joi.string().allow(""),
940
- sku_code: Joi.string().allow(""),
941
- });
942
- }
943
-
944
- /** @returns {FinancialBreakup} */
945
- static FinancialBreakup() {
946
- return Joi.object({
947
- coupon_value: Joi.number(),
948
- delivery_charge: Joi.number(),
949
- brand_calculated_amount: Joi.number(),
950
- value_of_good: Joi.number(),
951
- price_marked: Joi.number(),
952
- coupon_effective_discount: Joi.number(),
953
- hsn_code: Joi.string().allow(""),
954
- discount: Joi.number(),
955
- gst_tax_percentage: Joi.number(),
956
- cod_charges: Joi.number(),
957
- amount_paid: Joi.number(),
958
- added_to_fynd_cash: Joi.boolean(),
959
- size: Joi.string().allow(""),
960
- transfer_price: Joi.number(),
961
- cashback_applied: Joi.number(),
962
- price_effective: Joi.number(),
963
- cashback: Joi.number(),
964
- refund_credit: Joi.number(),
965
- amount_paid_roundoff: Joi.number(),
966
- total_units: Joi.number(),
967
- identifiers: OrderApplicationModel.Identifiers(),
968
- gst_tag: Joi.string().allow(""),
969
- item_name: Joi.string().allow(""),
970
- promotion_effective_discount: Joi.number(),
971
- gst_fee: Joi.number(),
972
- refund_amount: Joi.number(),
973
- fynd_credits: Joi.number(),
974
- amount_to_be_collected: Joi.number(),
975
- });
976
- }
977
-
978
- /** @returns {CurrentStatus} */
979
- static CurrentStatus() {
980
- return Joi.object({
981
- updated_at: Joi.string().allow(""),
982
- name: Joi.string().allow(""),
983
- status: Joi.string().allow(""),
984
- journey_type: Joi.string().allow("").allow(null),
985
- });
986
- }
987
-
988
- /** @returns {Bags} */
989
- static Bags() {
990
- return Joi.object({
991
- delivery_date: Joi.string().allow("").allow(null),
992
- line_number: Joi.number(),
993
- currency_symbol: Joi.string().allow(""),
994
- item: OrderApplicationModel.Item(),
995
- applied_promos: Joi.array().items(OrderApplicationModel.AppliedPromos()),
996
- quantity: Joi.number(),
997
- prices: OrderApplicationModel.Prices(),
998
- can_cancel: Joi.boolean(),
999
- can_return: Joi.boolean(),
1000
- id: Joi.number(),
1001
- returnable_date: Joi.string().allow("").allow(null),
1002
- financial_breakup: Joi.array().items(
1003
- OrderApplicationModel.FinancialBreakup()
1004
- ),
1005
- parent_promo_bags: Joi.any(),
1006
- meta: Joi.any(),
1007
- currency_code: Joi.string().allow(""),
1008
- seller_identifier: Joi.string().allow(""),
1009
- current_status: OrderApplicationModel.CurrentStatus(),
1010
- article: OrderApplicationModel.Article(),
1011
- });
1012
- }
1013
-
1014
- /** @returns {FulfillingCompany} */
1015
- static FulfillingCompany() {
1016
- return Joi.object({
1017
- id: Joi.number(),
1018
- name: Joi.string().allow(""),
1019
- });
1020
- }
1021
-
1022
- /** @returns {Article} */
1023
- static Article() {
1024
- return Joi.object({
1025
- tags: Joi.array().items(Joi.string().allow("")),
1026
- }).allow(null);
1027
- }
1028
-
1029
- /** @returns {Address} */
1030
- static Address() {
1031
- return Joi.object({
1032
- pincode: Joi.string().allow(""),
1033
- phone: Joi.string().allow(""),
1034
- latitude: Joi.number().allow(null),
1035
- address2: Joi.string().allow(""),
1036
- landmark: Joi.string().allow(""),
1037
- area: Joi.string().allow(""),
1038
- city: Joi.string().allow(""),
1039
- address: Joi.string().allow(""),
1040
- address_type: Joi.string().allow(""),
1041
- longitude: Joi.number().allow(null),
1042
- country_iso_code: Joi.string().allow(""),
1043
- state: Joi.string().allow(""),
1044
- created_at: Joi.string().allow(""),
1045
- address1: Joi.string().allow(""),
1046
- display_address: Joi.string().allow(""),
1047
- name: Joi.string().allow(""),
1048
- contact_person: Joi.string().allow(""),
1049
- address_category: Joi.string().allow(""),
1050
- email: Joi.string().allow(""),
1051
- country_phone_code: Joi.string().allow(""),
1052
- version: Joi.string().allow(""),
1053
- updated_at: Joi.string().allow(""),
1054
- country: Joi.string().allow(""),
1055
- });
1056
- }
1057
-
1058
- /** @returns {Shipments} */
1059
- static Shipments() {
1060
- return Joi.object({
1061
- payment: OrderApplicationModel.ShipmentPayment(),
1062
- payment_info: Joi.array().items(
1063
- OrderApplicationModel.ShipmentPaymentInfo()
1064
- ),
1065
- order_type: Joi.string().allow("").allow(null),
1066
- gstin_code: Joi.string().allow(""),
1067
- show_download_invoice: Joi.boolean(),
1068
- can_cancel: Joi.boolean(),
1069
- user_info: OrderApplicationModel.ShipmentUserInfo(),
1070
- shipment_id: Joi.string().allow(""),
1071
- fulfilling_store: OrderApplicationModel.FulfillingStore(),
1072
- custom_meta: Joi.array().items(Joi.any()),
1073
- shipment_status: OrderApplicationModel.ShipmentStatus(),
1074
- comment: Joi.string().allow(""),
1075
- invoice: OrderApplicationModel.Invoice(),
1076
- show_track_link: Joi.boolean(),
1077
- refund_details: Joi.any(),
1078
- breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()),
1079
- can_break: Joi.any(),
1080
- traking_no: Joi.string().allow(""),
1081
- tracking_details: Joi.array().items(
1082
- OrderApplicationModel.TrackingDetails()
1083
- ),
1084
- promise: OrderApplicationModel.Promise(),
1085
- total_bags: Joi.number(),
1086
- total_details: OrderApplicationModel.ShipmentTotalDetails(),
1087
- prices: OrderApplicationModel.Prices(),
1088
- returnable_date: Joi.string().allow("").allow(null),
1089
- shipment_created_at: Joi.string().allow(""),
1090
- shipment_created_ts: Joi.string().allow(""),
1091
- size_info: Joi.any(),
1092
- bags: Joi.array().items(OrderApplicationModel.Bags()),
1093
- dp_name: Joi.string().allow(""),
1094
- awb_no: Joi.string().allow(""),
1095
- beneficiary_details: Joi.boolean(),
1096
- fulfilling_company: OrderApplicationModel.FulfillingCompany(),
1097
- can_return: Joi.boolean(),
1098
- delivery_address: OrderApplicationModel.Address(),
1099
- billing_address: OrderApplicationModel.Address(),
1100
- track_url: Joi.string().allow(""),
1101
- order_id: Joi.string().allow(""),
1102
- need_help_url: Joi.string().allow(""),
1103
- return_meta: Joi.any(),
1104
- delivery_date: Joi.string().allow("").allow(null),
1105
- order: OrderApplicationModel.OrderRequest(),
1106
- });
1107
- }
1108
-
1109
- /** @returns {BagsForReorderArticleAssignment} */
1110
- static BagsForReorderArticleAssignment() {
1111
- return Joi.object({
1112
- strategy: Joi.string().allow(""),
1113
- level: Joi.string().allow(""),
1114
- });
1115
- }
1116
-
1117
- /** @returns {BagsForReorder} */
1118
- static BagsForReorder() {
1119
- return Joi.object({
1120
- item_size: Joi.string().allow(""),
1121
- quantity: Joi.number(),
1122
- store_id: Joi.number(),
1123
- article_assignment: OrderApplicationModel.BagsForReorderArticleAssignment(),
1124
- seller_id: Joi.number(),
1125
- item_id: Joi.number(),
1126
- });
1127
- }
1128
-
1129
- /** @returns {OrderSchema} */
1130
- static OrderSchema() {
1131
- return Joi.object({
1132
- total_shipments_in_order: Joi.number(),
1133
- gstin_code: Joi.string().allow(""),
1134
- user_info: OrderApplicationModel.UserInfo(),
1135
- breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()),
1136
- order_created_time: Joi.string().allow(""),
1137
- order_created_ts: Joi.string().allow(""),
1138
- order_id: Joi.string().allow(""),
1139
- shipments: Joi.array().items(OrderApplicationModel.Shipments()),
1140
- bags_for_reorder: Joi.array().items(
1141
- OrderApplicationModel.BagsForReorder()
1142
- ),
1143
- meta: Joi.object().pattern(/\S/, Joi.any()),
1144
- });
1145
- }
1146
-
1147
- /** @returns {OrderStatuses} */
1148
- static OrderStatuses() {
1149
- return Joi.object({
1150
- value: Joi.number(),
1151
- is_selected: Joi.boolean(),
1152
- display: Joi.string().allow(""),
1153
- });
1154
- }
1155
-
1156
- /** @returns {OrderFilters} */
1157
- static OrderFilters() {
1158
- return Joi.object({
1159
- statuses: Joi.array().items(OrderApplicationModel.OrderStatuses()),
1160
- });
1161
- }
1162
-
1163
- /** @returns {OrderList} */
1164
- static OrderList() {
1165
- return Joi.object({
1166
- page: OrderApplicationModel.OrderPage(),
1167
- items: Joi.array().items(OrderApplicationModel.OrderSchema()),
1168
- filters: OrderApplicationModel.OrderFilters(),
1169
- });
1170
- }
1171
-
1172
- /** @returns {ApefaceApiError} */
1173
- static ApefaceApiError() {
1174
- return Joi.object({
1175
- message: Joi.string().allow(""),
1176
- success: Joi.boolean(),
1177
- });
1178
- }
1179
-
1180
- /** @returns {OrderById} */
1181
- static OrderById() {
1182
- return Joi.object({
1183
- order: OrderApplicationModel.OrderSchema(),
1184
- });
1185
- }
1186
-
1187
- /** @returns {ShipmentById} */
1188
- static ShipmentById() {
1189
- return Joi.object({
1190
- shipment: OrderApplicationModel.Shipments(),
1191
- });
1192
- }
1193
-
1194
- /** @returns {ResponseGetInvoiceShipment} */
1195
- static ResponseGetInvoiceShipment() {
1196
- return Joi.object({
1197
- presigned_type: Joi.string().allow("").required(),
1198
- success: Joi.boolean().required(),
1199
- shipment_id: Joi.string().allow("").required(),
1200
- presigned_url: Joi.string().allow("").required(),
1201
- });
1202
- }
1203
-
1204
- /** @returns {Track} */
1205
- static Track() {
1206
- return Joi.object({
1207
- account_name: Joi.string().allow(""),
1208
- shipment_type: Joi.string().allow(""),
1209
- status: Joi.string().allow(""),
1210
- last_location_recieved_at: Joi.string().allow(""),
1211
- updated_time: Joi.string().allow(""),
1212
- updated_at: Joi.string().allow(""),
1213
- reason: Joi.string().allow(""),
1214
- awb: Joi.string().allow(""),
1215
- });
1216
- }
1217
-
1218
- /** @returns {ShipmentTrack} */
1219
- static ShipmentTrack() {
1220
- return Joi.object({
1221
- results: Joi.array().items(OrderApplicationModel.Track()),
1222
- });
1223
- }
1224
-
1225
- /** @returns {CustomerDetailsResponse} */
1226
- static CustomerDetailsResponse() {
1227
- return Joi.object({
1228
- phone: Joi.string().allow(""),
1229
- shipment_id: Joi.string().allow(""),
1230
- name: Joi.string().allow(""),
1231
- order_id: Joi.string().allow(""),
1232
- country: Joi.string().allow(""),
1233
- });
1234
- }
1235
-
1236
- /** @returns {SendOtpToCustomerResponse} */
1237
- static SendOtpToCustomerResponse() {
1238
- return Joi.object({
1239
- request_id: Joi.string().allow(""),
1240
- message: Joi.string().allow(""),
1241
- success: Joi.boolean(),
1242
- resend_timer: Joi.number(),
1243
- });
1244
- }
1245
-
1246
- /** @returns {VerifyOtp} */
1247
- static VerifyOtp() {
1248
- return Joi.object({
1249
- otp_code: Joi.string().allow(""),
1250
- request_id: Joi.string().allow(""),
1251
- });
1252
- }
1253
-
1254
- /** @returns {VerifyOtpResponse} */
1255
- static VerifyOtpResponse() {
1256
- return Joi.object({
1257
- success: Joi.boolean(),
1258
- });
1259
- }
1260
-
1261
- /** @returns {BagReasonMeta} */
1262
- static BagReasonMeta() {
1263
- return Joi.object({
1264
- show_text_area: Joi.boolean(),
1265
- });
1266
- }
1267
-
1268
- /** @returns {QuestionSet} */
1269
- static QuestionSet() {
1270
- return Joi.object({
1271
- id: Joi.number(),
1272
- display_name: Joi.string().allow(""),
1273
- });
1274
- }
1275
-
1276
- /** @returns {BagReasons} */
1277
- static BagReasons() {
1278
- return Joi.object({
1279
- qc_type: Joi.array().items(Joi.string().allow("")),
1280
- id: Joi.number(),
1281
- display_name: Joi.string().allow(""),
1282
- meta: OrderApplicationModel.BagReasonMeta(),
1283
- question_set: Joi.array().items(OrderApplicationModel.QuestionSet()),
1284
- reasons: Joi.array().items(Joi.link("#BagReasons")),
1285
- }).id("BagReasons");
1286
- }
1287
-
1288
- /** @returns {ShipmentBagReasons} */
1289
- static ShipmentBagReasons() {
1290
- return Joi.object({
1291
- reasons: Joi.array().items(OrderApplicationModel.BagReasons()),
1292
- success: Joi.boolean(),
1293
- });
1294
- }
1295
-
1296
- /** @returns {ShipmentReason} */
1297
- static ShipmentReason() {
1298
- return Joi.object({
1299
- priority: Joi.number(),
1300
- show_text_area: Joi.boolean(),
1301
- reason_id: Joi.number(),
1302
- feedback_type: Joi.string().allow(""),
1303
- reason_text: Joi.string().allow(""),
1304
- flow: Joi.string().allow(""),
1305
- });
1306
- }
1307
-
1308
- /** @returns {ShipmentReasons} */
1309
- static ShipmentReasons() {
1310
- return Joi.object({
1311
- reasons: Joi.array().items(OrderApplicationModel.ShipmentReason()),
1312
- });
1313
- }
1314
-
1315
- /** @returns {ProductsReasonsData} */
1316
- static ProductsReasonsData() {
1317
- return Joi.object({
1318
- reason_id: Joi.number(),
1319
- reason_text: Joi.string().allow(""),
1320
- });
1321
- }
1322
-
1323
- /** @returns {ProductsReasonsFilters} */
1324
- static ProductsReasonsFilters() {
1325
- return Joi.object({
1326
- line_number: Joi.number(),
1327
- quantity: Joi.number(),
1328
- identifier: Joi.string().allow(""),
1329
- });
1330
- }
1331
-
1332
- /** @returns {ProductsReasons} */
1333
- static ProductsReasons() {
1334
- return Joi.object({
1335
- data: OrderApplicationModel.ProductsReasonsData(),
1336
- filters: Joi.array().items(
1337
- OrderApplicationModel.ProductsReasonsFilters()
1338
- ),
1339
- });
1340
- }
1341
-
1342
- /** @returns {EntityReasonData} */
1343
- static EntityReasonData() {
1344
- return Joi.object({
1345
- reason_id: Joi.number(),
1346
- reason_text: Joi.string().allow(""),
1347
- });
1348
- }
1349
-
1350
- /** @returns {EntitiesReasons} */
1351
- static EntitiesReasons() {
1352
- return Joi.object({
1353
- data: OrderApplicationModel.EntityReasonData(),
1354
- filters: Joi.array().items(Joi.any()),
1355
- });
1356
- }
1357
-
1358
- /** @returns {ReasonsData} */
1359
- static ReasonsData() {
1360
- return Joi.object({
1361
- products: Joi.array().items(OrderApplicationModel.ProductsReasons()),
1362
- entities: Joi.array().items(OrderApplicationModel.EntitiesReasons()),
1363
- });
1364
- }
1365
-
1366
- /** @returns {Products} */
1367
- static Products() {
1368
- return Joi.object({
1369
- line_number: Joi.number(),
1370
- quantity: Joi.number(),
1371
- identifier: Joi.string().allow(""),
1372
- });
1373
- }
1374
-
1375
- /** @returns {ProductsDataUpdatesFilters} */
1376
- static ProductsDataUpdatesFilters() {
1377
- return Joi.object({
1378
- line_number: Joi.number(),
1379
- identifier: Joi.string().allow(""),
1380
- });
1381
- }
1382
-
1383
- /** @returns {ProductsDataUpdates} */
1384
- static ProductsDataUpdates() {
1385
- return Joi.object({
1386
- data: Joi.any(),
1387
- filters: Joi.array().items(
1388
- OrderApplicationModel.ProductsDataUpdatesFilters()
1389
- ),
1390
- });
1391
- }
1392
-
1393
- /** @returns {EntitiesDataUpdates} */
1394
- static EntitiesDataUpdates() {
1395
- return Joi.object({
1396
- data: Joi.any(),
1397
- filters: Joi.array().items(Joi.any()),
1398
- });
1399
- }
1400
-
1401
- /** @returns {DataUpdates} */
1402
- static DataUpdates() {
1403
- return Joi.object({
1404
- products: Joi.array().items(OrderApplicationModel.ProductsDataUpdates()),
1405
- entities: Joi.array().items(OrderApplicationModel.EntitiesDataUpdates()),
1406
- });
1407
- }
1408
-
1409
- /** @returns {ShipmentsRequest} */
1410
- static ShipmentsRequest() {
1411
- return Joi.object({
1412
- reasons: OrderApplicationModel.ReasonsData(),
1413
- products: Joi.array().items(OrderApplicationModel.Products()),
1414
- data_updates: OrderApplicationModel.DataUpdates(),
1415
- identifier: Joi.string().allow("").required(),
1416
- });
1417
- }
1418
-
1419
- /** @returns {StatuesRequest} */
1420
- static StatuesRequest() {
1421
- return Joi.object({
1422
- shipments: Joi.array().items(OrderApplicationModel.ShipmentsRequest()),
1423
- exclude_bags_next_state: Joi.string().allow(""),
1424
- status: Joi.string().allow(""),
1425
- });
1426
- }
1427
-
1428
- /** @returns {OrderRequest} */
1429
- static OrderRequest() {
1430
- return Joi.object({
1431
- meta: Joi.any(),
1432
- });
1433
- }
1434
-
1435
- /** @returns {UpdateShipmentStatusRequest} */
1436
- static UpdateShipmentStatusRequest() {
1437
- return Joi.object({
1438
- statuses: Joi.array().items(OrderApplicationModel.StatuesRequest()),
1439
- task: Joi.boolean(),
1440
- lock_after_transition: Joi.boolean(),
1441
- force_transition: Joi.boolean(),
1442
- unlock_before_transition: Joi.boolean(),
1443
- });
1444
- }
1445
-
1446
- /** @returns {StatusesBodyResponse} */
1447
- static StatusesBodyResponse() {
1448
- return Joi.object({
1449
- shipments: Joi.array().items(Joi.any()),
1450
- });
1451
- }
1452
-
1453
- /** @returns {ShipmentApplicationStatusResponse} */
1454
- static ShipmentApplicationStatusResponse() {
1455
- return Joi.object({
1456
- statuses: Joi.array().items(OrderApplicationModel.StatusesBodyResponse()),
1457
- });
1458
- }
1459
-
1460
- /** @returns {ErrorResponse} */
1461
- static ErrorResponse() {
1462
- return Joi.object({
1463
- code: Joi.string().allow("").allow(null),
1464
- message: Joi.string().allow("").allow(null),
1465
- status: Joi.number(),
1466
- exception: Joi.string().allow("").allow(null),
1467
- stack_trace: Joi.string().allow("").allow(null),
1468
- });
1469
- }
1470
- }
1471
- module.exports = OrderApplicationModel;