@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.3

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 (106) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +822 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationModel.d.ts +762 -762
  38. package/sdk/application/User/UserApplicationModel.js +738 -738
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  40. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  42. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  43. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  45. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  46. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  50. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  51. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  52. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  54. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
  57. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  58. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  63. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  64. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  65. package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
  66. package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
  67. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  68. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  69. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
  70. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
  71. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  72. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  73. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  74. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  75. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  76. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  77. package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
  78. package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
  79. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  80. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  81. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
  82. package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
  83. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  84. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  85. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
  86. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
  87. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  88. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  89. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  90. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  91. package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
  92. package/sdk/platform/User/UserPlatformModel.js +643 -643
  93. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  94. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  95. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  96. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  97. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  98. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  99. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  100. package/sdk/public/Content/ContentPublicModel.js +28 -28
  101. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  102. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  103. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  104. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  105. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  106. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,27 +1,68 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef CountryEntityResponse
4
+ * @typedef GetStoreResponse
5
+ * @property {StoreItemResponse[]} [items]
6
+ * @property {Page} [page]
7
+ */
8
+
9
+ /**
10
+ * @typedef StoreItemResponse
11
+ * @property {number} [id]
12
+ * @property {string} [store_type]
13
+ * @property {string} [fulfillment_type]
14
+ * @property {number} [processing_time]
15
+ * @property {string[]} [tags]
16
+ * @property {number} [company_id]
17
+ * @property {number} [latitude]
18
+ * @property {number} [longitude]
19
+ */
20
+
21
+ /**
22
+ * @typedef ValidateAddressRequest
23
+ * @property {string} [address] - A string representing the complete address,
24
+ * combining address line 1, address line 2, area, landmark, sector, city,
25
+ * state, and pincode. This provides a comprehensive view of the address details.
26
+ * @property {string} [address1] - A string representing the first line of the
27
+ * address, typically containing street or building information.
28
+ * @property {string} [address2] - A string representing the second line of the
29
+ * address, which can be used for additional address details if needed.
30
+ * @property {string} [area] - A string specifying the locality or area
31
+ * associated with the address.
32
+ * @property {string} [landmark] - A string representing a prominent nearby
33
+ * landmark that aids in locating the address.
34
+ * @property {string} [pincode] - A string indicating the postal code or PIN
35
+ * code of the address area.
36
+ * @property {string} [sector] - A string specifying the sector or district of
37
+ * the address if applicable.
38
+ * @property {string} [city] - A string denoting the city or municipality of the address.
39
+ * @property {string} [state] - A string indicating the state or province of the address.
40
+ * @property {string} [name] - A string representing the recipient's name or the
41
+ * organization name associated with the address.
42
+ * @property {string} [phone] - An integer representing the recipient's contact
43
+ * phone number.
44
+ * @property {string} [email] - A string containing the recipient's email address.
45
+ */
46
+
47
+ /**
48
+ * @typedef PincodeParentsResponse
49
+ * @property {string} [sub_type]
5
50
  * @property {string} [display_name]
6
- * @property {boolean} [is_active]
7
- * @property {LogisticsResponse} [logistics]
8
- * @property {CountryMetaResponse} [meta]
9
51
  * @property {string} [name]
10
- * @property {string} [parent_id]
11
- * @property {string} [sub_type]
12
- * @property {string} [type]
13
52
  * @property {string} [uid]
14
53
  */
15
54
 
16
55
  /**
17
- * @typedef CountryHierarchy
18
- * @property {string} [name]
19
- * @property {string} [slug]
56
+ * @typedef PincodeMetaResponse
57
+ * @property {string} [zone]
58
+ * @property {number} [internal_zone_id]
20
59
  */
21
60
 
22
61
  /**
23
- * @typedef CountryListResponse
24
- * @property {CountryEntityResponse[]} [results]
62
+ * @typedef PincodeErrorSchemaResponse
63
+ * @property {string} [message]
64
+ * @property {string} [value]
65
+ * @property {string} [type]
25
66
  */
26
67
 
27
68
  /**
@@ -31,166 +72,162 @@ const Joi = require("joi");
31
72
  */
32
73
 
33
74
  /**
34
- * @typedef CountryObject
35
- * @property {CurrencyObject} [currency]
36
- * @property {string} [display_name]
37
- * @property {CountryHierarchy[]} [hierarchy]
38
- * @property {string} [id]
39
- * @property {string} [iso2]
40
- * @property {string} [iso3]
41
- * @property {string} [latitude]
42
- * @property {string} [longitude]
43
- * @property {string} [name]
44
- * @property {string} [phone_code]
45
- * @property {string[]} [timezones]
75
+ * @typedef PincodeLatLongData
46
76
  * @property {string} [type]
77
+ * @property {string[]} [coordinates]
47
78
  */
48
79
 
49
80
  /**
50
- * @typedef CurrencyObject
51
- * @property {string} [code]
81
+ * @typedef PincodeDataResponse
82
+ * @property {PincodeParentsResponse[]} [parents]
83
+ * @property {PincodeMetaResponse} [meta]
84
+ * @property {string} [display_name]
85
+ * @property {PincodeErrorSchemaResponse} error
86
+ * @property {CountryMetaResponse} [meta_code]
87
+ * @property {PincodeLatLongData} [lat_long]
88
+ * @property {string} [sub_type]
52
89
  * @property {string} [name]
53
- * @property {string} [symbol]
90
+ * @property {string} [uid]
54
91
  */
55
92
 
56
93
  /**
57
- * @typedef DP
58
- * @property {string} [area_code]
59
- * @property {boolean} [assign_dp_from_sb]
60
- * @property {string} [external_account_id]
61
- * @property {number} fm_priority
62
- * @property {string} [internal_account_id]
63
- * @property {number} lm_priority
64
- * @property {string[]} operations
65
- * @property {string} payment_mode
66
- * @property {number} rvp_priority
67
- * @property {string} [transport_mode]
94
+ * @typedef PincodeApiResponse
95
+ * @property {boolean} success
96
+ * @property {PincodeDataResponse[]} [data]
97
+ * @property {PincodeErrorSchemaResponse} error
68
98
  */
69
99
 
70
100
  /**
71
- * @typedef ErrorResponse
72
- * @property {string} [error]
101
+ * @typedef TATCategoryRequest
102
+ * @property {string} [level]
103
+ * @property {number} [id]
73
104
  */
74
105
 
75
106
  /**
76
- * @typedef FieldValidation
77
- * @property {FieldValidationRegex} [regex]
78
- * @property {string} [type]
107
+ * @typedef TATArticlesRequest
108
+ * @property {TATCategoryRequest} [category]
109
+ * @property {string} [manufacturing_time_unit]
110
+ * @property {number} [manufacturing_time]
79
111
  */
80
112
 
81
113
  /**
82
- * @typedef FieldValidationRegex
83
- * @property {LengthValidation} [length]
84
- * @property {string} [value]
114
+ * @typedef TATLocationDetailsRequest
115
+ * @property {number} [fulfillment_id]
116
+ * @property {string} [from_pincode]
117
+ * @property {TATArticlesRequest[]} [articles]
85
118
  */
86
119
 
87
120
  /**
88
- * @typedef GetCountries
89
- * @property {CountryObject[]} [items]
90
- * @property {Page} [page]
121
+ * @typedef TATViewRequest
122
+ * @property {string} [to_pincode]
123
+ * @property {string} [source]
124
+ * @property {string} [action]
125
+ * @property {string} [identifier]
126
+ * @property {TATLocationDetailsRequest[]} [location_details]
127
+ * @property {string} [journey]
91
128
  */
92
129
 
93
130
  /**
94
- * @typedef GetCountry
95
- * @property {CurrencyObject} [currency]
96
- * @property {string} [display_name]
97
- * @property {GetCountryFields} [fields]
98
- * @property {CountryHierarchy[]} [hierarchy]
99
- * @property {string} [id]
100
- * @property {string} [iso2]
101
- * @property {string} [iso3]
102
- * @property {string} [latitude]
103
- * @property {string} [longitude]
104
- * @property {string} [name]
105
- * @property {string} [phone_code]
106
- * @property {string[]} [timezones]
131
+ * @typedef TATErrorSchemaResponse
132
+ * @property {string} [message]
133
+ * @property {string} [value]
107
134
  * @property {string} [type]
108
135
  */
109
136
 
110
137
  /**
111
- * @typedef GetCountryFields
112
- * @property {GetCountryFieldsAddress[]} address
113
- * @property {GetCountryFieldsAddressTemplate} address_template
114
- * @property {string[]} serviceability_fields
138
+ * @typedef TATTimestampResponse
139
+ * @property {number} [min]
140
+ * @property {number} [max]
115
141
  */
116
142
 
117
143
  /**
118
- * @typedef GetCountryFieldsAddress
119
- * @property {string} display_name
120
- * @property {boolean} [edit]
121
- * @property {string} [error_text]
122
- * @property {string} input
123
- * @property {boolean} required
124
- * @property {string} slug
125
- * @property {FieldValidation} [validation]
126
- * @property {GetCountryFieldsAddressValues} [values]
144
+ * @typedef TATFormattedResponse
145
+ * @property {string} [min]
146
+ * @property {string} [max]
127
147
  */
128
148
 
129
149
  /**
130
- * @typedef GetCountryFieldsAddressTemplate
131
- * @property {string} checkout_form
132
- * @property {string} default_display
133
- * @property {string} store_os_form
150
+ * @typedef TATPromiseResponse
151
+ * @property {TATTimestampResponse} [timestamp]
152
+ * @property {TATFormattedResponse} [formatted]
134
153
  */
135
154
 
136
155
  /**
137
- * @typedef GetCountryFieldsAddressValues
138
- * @property {GetOneOrAll} [get_all]
139
- * @property {GetOneOrAll} [get_one]
156
+ * @typedef TATArticlesResponse
157
+ * @property {string} [manufacturing_time_unit]
158
+ * @property {TATErrorSchemaResponse} [error]
159
+ * @property {boolean} [is_cod_available]
160
+ * @property {TATPromiseResponse} [promise]
161
+ * @property {number} [manufacturing_time]
162
+ * @property {TATCategoryRequest} [category]
163
+ * @property {number} [_manufacturing_time_seconds]
140
164
  */
141
165
 
142
166
  /**
143
- * @typedef GetLocalities
144
- * @property {Localities[]} [items]
145
- * @property {Page} [page]
167
+ * @typedef TATLocationDetailsResponse
168
+ * @property {number} [fulfillment_id]
169
+ * @property {string} [from_pincode]
170
+ * @property {TATArticlesResponse[]} [articles]
146
171
  */
147
172
 
148
173
  /**
149
- * @typedef GetLocality
150
- * @property {string} [display_name]
151
- * @property {string} [id]
152
- * @property {LocalityParent[]} [localities]
153
- * @property {string} [name]
154
- * @property {string[]} [parent_ids]
155
- * @property {string} [type]
174
+ * @typedef TATViewResponse
175
+ * @property {string} [to_pincode]
176
+ * @property {string} [request_uuid]
177
+ * @property {string} [payment_mode]
178
+ * @property {boolean} [success]
179
+ * @property {TATErrorSchemaResponse} [error]
180
+ * @property {boolean} [is_cod_available]
181
+ * @property {string} [source]
182
+ * @property {string} [action]
183
+ * @property {string} [stormbreaker_uuid]
184
+ * @property {string} [to_city]
185
+ * @property {string} [identifier]
186
+ * @property {TATLocationDetailsResponse[]} [location_details]
187
+ * @property {string} [journey]
156
188
  */
157
189
 
158
190
  /**
159
- * @typedef GetOneOrAll
160
- * @property {string} [operation_id]
161
- * @property {GetOneOrAllParams} [params]
191
+ * @typedef DP
192
+ * @property {number} fm_priority
193
+ * @property {number} lm_priority
194
+ * @property {number} rvp_priority
195
+ * @property {string} payment_mode
196
+ * @property {string[]} operations
197
+ * @property {string} [area_code]
198
+ * @property {boolean} [assign_dp_from_sb]
199
+ * @property {string} [internal_account_id]
200
+ * @property {string} [external_account_id]
201
+ * @property {string} [transport_mode]
162
202
  */
163
203
 
164
204
  /**
165
- * @typedef GetOneOrAllParams
166
- * @property {GetOneOrAllPath} [path]
167
- * @property {GetOneOrAllQuery} [query]
205
+ * @typedef LogisticsResponse
206
+ * @property {Object} [dp]
168
207
  */
169
208
 
170
209
  /**
171
- * @typedef GetOneOrAllPath
172
- * @property {string} [locality_type]
173
- * @property {string} [locality_value]
210
+ * @typedef CountryEntityResponse
211
+ * @property {CountryMetaResponse} [meta]
212
+ * @property {LogisticsResponse} [logistics]
213
+ * @property {string} [display_name]
214
+ * @property {string} [type]
215
+ * @property {boolean} [is_active]
216
+ * @property {string} [parent_id]
217
+ * @property {string} [sub_type]
218
+ * @property {string} [name]
219
+ * @property {string} [uid]
174
220
  */
175
221
 
176
222
  /**
177
- * @typedef GetOneOrAllQuery
178
- * @property {string} [city]
179
- * @property {string} [country]
180
- * @property {string} [sector]
181
- * @property {string} [state]
182
- */
183
-
184
- /**
185
- * @typedef GetStoreResponse
186
- * @property {StoreItemResponse[]} [items]
187
- * @property {Page} [page]
223
+ * @typedef CountryListResponse
224
+ * @property {CountryEntityResponse[]} [results]
188
225
  */
189
226
 
190
227
  /**
191
228
  * @typedef GetZoneFromPincodeViewRequest
192
- * @property {string} country
193
229
  * @property {string} pincode
230
+ * @property {string} country
194
231
  */
195
232
 
196
233
  /**
@@ -200,268 +237,266 @@ const Joi = require("joi");
200
237
  */
201
238
 
202
239
  /**
203
- * @typedef LengthValidation
204
- * @property {number} [max]
205
- * @property {number} [min]
240
+ * @typedef ReAssignStoreRequest
241
+ * @property {Object} configuration
242
+ * @property {string} to_pincode
243
+ * @property {number[]} ignored_locations
244
+ * @property {string} identifier
245
+ * @property {Object[]} articles
206
246
  */
207
247
 
208
248
  /**
209
- * @typedef Localities
210
- * @property {string} [display_name]
211
- * @property {string} [id]
212
- * @property {string} [name]
213
- * @property {string[]} [parent_ids]
214
- * @property {string} [type]
249
+ * @typedef ReAssignStoreResponse
250
+ * @property {string} to_pincode
251
+ * @property {string} pystormbreaker_uuid
252
+ * @property {boolean} success
253
+ * @property {Object} error
254
+ * @property {Object[]} [assigned_stores]
215
255
  */
216
256
 
217
257
  /**
218
- * @typedef LocalityParent
219
- * @property {string} [display_name]
220
- * @property {string} [id]
258
+ * @typedef CountryHierarchy
221
259
  * @property {string} [name]
222
- * @property {string[]} [parent_ids]
223
- * @property {string} [type]
260
+ * @property {string} [slug]
224
261
  */
225
262
 
226
263
  /**
227
- * @typedef LogisticsResponse
228
- * @property {Object} [dp]
264
+ * @typedef CurrencyObject
265
+ * @property {string} [code]
266
+ * @property {string} [name]
267
+ * @property {string} [symbol]
229
268
  */
230
269
 
231
270
  /**
232
- * @typedef Page
233
- * @property {number} [current]
234
- * @property {boolean} [has_next]
235
- * @property {boolean} [has_previous]
236
- * @property {number} [item_total]
237
- * @property {string} [next_id]
238
- * @property {number} [size]
239
- * @property {string} type
271
+ * @typedef CountryObject
272
+ * @property {string} [id]
273
+ * @property {string} [name]
274
+ * @property {string} [display_name]
275
+ * @property {string} [iso2]
276
+ * @property {string} [iso3]
277
+ * @property {string[]} [timezones]
278
+ * @property {CountryHierarchy[]} [hierarchy]
279
+ * @property {string} [phone_code]
280
+ * @property {string} [latitude]
281
+ * @property {string} [longitude]
282
+ * @property {CurrencyObject} [currency]
283
+ * @property {string} [type]
240
284
  */
241
285
 
242
286
  /**
243
- * @typedef PincodeApiResponse
244
- * @property {PincodeDataResponse[]} [data]
245
- * @property {PincodeErrorSchemaResponse} error
246
- * @property {boolean} success
287
+ * @typedef GetCountries
288
+ * @property {CountryObject[]} [items]
289
+ * @property {Page} [page]
247
290
  */
248
291
 
249
292
  /**
250
- * @typedef PincodeDataResponse
251
- * @property {string} [display_name]
252
- * @property {PincodeErrorSchemaResponse} error
253
- * @property {PincodeLatLongData} [lat_long]
254
- * @property {PincodeMetaResponse} [meta]
255
- * @property {CountryMetaResponse} [meta_code]
256
- * @property {string} [name]
257
- * @property {PincodeParentsResponse[]} [parents]
258
- * @property {string} [sub_type]
259
- * @property {string} [uid]
293
+ * @typedef GetOneOrAllPath
294
+ * @property {string} [locality_type]
295
+ * @property {string} [locality_value]
260
296
  */
261
297
 
262
298
  /**
263
- * @typedef PincodeErrorSchemaResponse
264
- * @property {string} [message]
265
- * @property {string} [type]
266
- * @property {string} [value]
299
+ * @typedef GetOneOrAllQuery
300
+ * @property {string} [country]
301
+ * @property {string} [state]
302
+ * @property {string} [city]
303
+ * @property {string} [sector]
267
304
  */
268
305
 
269
306
  /**
270
- * @typedef PincodeLatLongData
271
- * @property {string[]} [coordinates]
272
- * @property {string} [type]
307
+ * @typedef GetOneOrAllParams
308
+ * @property {GetOneOrAllPath} [path]
309
+ * @property {GetOneOrAllQuery} [query]
273
310
  */
274
311
 
275
312
  /**
276
- * @typedef PincodeMetaResponse
277
- * @property {number} [internal_zone_id]
278
- * @property {string} [zone]
313
+ * @typedef GetOneOrAll
314
+ * @property {string} [operation_id]
315
+ * @property {GetOneOrAllParams} [params]
279
316
  */
280
317
 
281
318
  /**
282
- * @typedef PincodeParentsResponse
283
- * @property {string} [display_name]
284
- * @property {string} [name]
285
- * @property {string} [sub_type]
286
- * @property {string} [uid]
319
+ * @typedef LengthValidation
320
+ * @property {number} [min]
321
+ * @property {number} [max]
287
322
  */
288
323
 
289
324
  /**
290
- * @typedef ReAssignStoreRequest
291
- * @property {Object[]} articles
292
- * @property {Object} configuration
293
- * @property {string} identifier
294
- * @property {number[]} ignored_locations
295
- * @property {string} to_pincode
325
+ * @typedef FieldValidationRegex
326
+ * @property {string} [value]
327
+ * @property {LengthValidation} [length]
296
328
  */
297
329
 
298
330
  /**
299
- * @typedef ReAssignStoreResponse
300
- * @property {Object[]} [assigned_stores]
301
- * @property {Object} error
302
- * @property {string} pystormbreaker_uuid
303
- * @property {boolean} success
304
- * @property {string} to_pincode
331
+ * @typedef FieldValidation
332
+ * @property {string} [type]
333
+ * @property {FieldValidationRegex} [regex]
305
334
  */
306
335
 
307
336
  /**
308
- * @typedef StoreItemResponse
309
- * @property {number} [company_id]
310
- * @property {string} [fulfillment_type]
311
- * @property {number} [id]
312
- * @property {number} [latitude]
313
- * @property {number} [longitude]
314
- * @property {number} [processing_time]
315
- * @property {string} [store_type]
316
- * @property {string[]} [tags]
337
+ * @typedef GetCountryFieldsAddressValues
338
+ * @property {GetOneOrAll} [get_one]
339
+ * @property {GetOneOrAll} [get_all]
317
340
  */
318
341
 
319
342
  /**
320
- * @typedef TATArticlesRequest
321
- * @property {TATCategoryRequest} [category]
322
- * @property {number} [manufacturing_time]
323
- * @property {string} [manufacturing_time_unit]
343
+ * @typedef GetCountryFieldsAddress
344
+ * @property {string} display_name
345
+ * @property {string} slug
346
+ * @property {boolean} required
347
+ * @property {boolean} [edit]
348
+ * @property {string} input
349
+ * @property {FieldValidation} [validation]
350
+ * @property {GetCountryFieldsAddressValues} [values]
351
+ * @property {string} [error_text]
324
352
  */
325
353
 
326
354
  /**
327
- * @typedef TATArticlesResponse
328
- * @property {number} [_manufacturing_time_seconds]
329
- * @property {TATCategoryRequest} [category]
330
- * @property {TATErrorSchemaResponse} [error]
331
- * @property {boolean} [is_cod_available]
332
- * @property {number} [manufacturing_time]
333
- * @property {string} [manufacturing_time_unit]
334
- * @property {TATPromiseResponse} [promise]
355
+ * @typedef GetCountryFieldsAddressTemplate
356
+ * @property {string} checkout_form
357
+ * @property {string} store_os_form
358
+ * @property {string} default_display
335
359
  */
336
360
 
337
361
  /**
338
- * @typedef TATCategoryRequest
339
- * @property {number} [id]
340
- * @property {string} [level]
362
+ * @typedef GetCountryFields
363
+ * @property {GetCountryFieldsAddress[]} address
364
+ * @property {string[]} serviceability_fields
365
+ * @property {GetCountryFieldsAddressTemplate} address_template
341
366
  */
342
367
 
343
368
  /**
344
- * @typedef TATErrorSchemaResponse
345
- * @property {string} [message]
369
+ * @typedef GetCountry
370
+ * @property {string} [id]
371
+ * @property {string} [name]
372
+ * @property {string} [display_name]
373
+ * @property {string} [iso2]
374
+ * @property {string} [iso3]
375
+ * @property {string[]} [timezones]
376
+ * @property {CountryHierarchy[]} [hierarchy]
377
+ * @property {string} [phone_code]
378
+ * @property {string} [latitude]
379
+ * @property {string} [longitude]
380
+ * @property {CurrencyObject} [currency]
346
381
  * @property {string} [type]
347
- * @property {string} [value]
382
+ * @property {GetCountryFields} [fields]
348
383
  */
349
384
 
350
385
  /**
351
- * @typedef TATFormattedResponse
352
- * @property {string} [max]
353
- * @property {string} [min]
386
+ * @typedef Page
387
+ * @property {number} [item_total]
388
+ * @property {string} [next_id]
389
+ * @property {boolean} [has_previous]
390
+ * @property {boolean} [has_next]
391
+ * @property {number} [current]
392
+ * @property {string} type
393
+ * @property {number} [size]
354
394
  */
355
395
 
356
396
  /**
357
- * @typedef TATLocationDetailsRequest
358
- * @property {TATArticlesRequest[]} [articles]
359
- * @property {string} [from_pincode]
360
- * @property {number} [fulfillment_id]
397
+ * @typedef Localities
398
+ * @property {string} [id]
399
+ * @property {string} [name]
400
+ * @property {string} [display_name]
401
+ * @property {string[]} [parent_ids]
402
+ * @property {string} [type]
361
403
  */
362
404
 
363
405
  /**
364
- * @typedef TATLocationDetailsResponse
365
- * @property {TATArticlesResponse[]} [articles]
366
- * @property {string} [from_pincode]
367
- * @property {number} [fulfillment_id]
406
+ * @typedef LocalityParent
407
+ * @property {string} [id]
408
+ * @property {string} [name]
409
+ * @property {string} [display_name]
410
+ * @property {string[]} [parent_ids]
411
+ * @property {string} [type]
368
412
  */
369
413
 
370
414
  /**
371
- * @typedef TATPromiseResponse
372
- * @property {TATFormattedResponse} [formatted]
373
- * @property {TATTimestampResponse} [timestamp]
415
+ * @typedef GetLocalities
416
+ * @property {Localities[]} [items]
417
+ * @property {Page} [page]
374
418
  */
375
419
 
376
420
  /**
377
- * @typedef TATTimestampResponse
378
- * @property {number} [max]
379
- * @property {number} [min]
421
+ * @typedef GetLocality
422
+ * @property {string} [id]
423
+ * @property {string} [name]
424
+ * @property {string} [display_name]
425
+ * @property {string[]} [parent_ids]
426
+ * @property {string} [type]
427
+ * @property {LocalityParent[]} [localities]
380
428
  */
381
429
 
382
430
  /**
383
- * @typedef TATViewRequest
384
- * @property {string} [action]
385
- * @property {string} [identifier]
386
- * @property {string} [journey]
387
- * @property {TATLocationDetailsRequest[]} [location_details]
388
- * @property {string} [source]
389
- * @property {string} [to_pincode]
431
+ * @typedef ErrorResponse
432
+ * @property {string} [error]
390
433
  */
391
434
 
392
- /**
393
- * @typedef TATViewResponse
394
- * @property {string} [action]
395
- * @property {TATErrorSchemaResponse} [error]
396
- * @property {string} [identifier]
397
- * @property {boolean} [is_cod_available]
398
- * @property {string} [journey]
399
- * @property {TATLocationDetailsResponse[]} [location_details]
400
- * @property {string} [payment_mode]
401
- * @property {string} [request_uuid]
402
- * @property {string} [source]
403
- * @property {string} [stormbreaker_uuid]
404
- * @property {boolean} [success]
405
- * @property {string} [to_city]
406
- * @property {string} [to_pincode]
407
- */
435
+ class LogisticApplicationModel {
436
+ /** @returns {GetStoreResponse} */
437
+ static GetStoreResponse() {
438
+ return Joi.object({
439
+ items: Joi.array().items(LogisticApplicationModel.StoreItemResponse()),
440
+ page: LogisticApplicationModel.Page(),
441
+ });
442
+ }
408
443
 
409
- /**
410
- * @typedef ValidateAddressRequest
411
- * @property {string} [address] - A string representing the complete address,
412
- * combining address line 1, address line 2, area, landmark, sector, city,
413
- * state, and pincode. This provides a comprehensive view of the address details.
414
- * @property {string} [address1] - A string representing the first line of the
415
- * address, typically containing street or building information.
416
- * @property {string} [address2] - A string representing the second line of the
417
- * address, which can be used for additional address details if needed.
418
- * @property {string} [area] - A string specifying the locality or area
419
- * associated with the address.
420
- * @property {string} [city] - A string denoting the city or municipality of the address.
421
- * @property {string} [email] - A string containing the recipient's email address.
422
- * @property {string} [landmark] - A string representing a prominent nearby
423
- * landmark that aids in locating the address.
424
- * @property {string} [name] - A string representing the recipient's name or the
425
- * organization name associated with the address.
426
- * @property {string} [phone] - An integer representing the recipient's contact
427
- * phone number.
428
- * @property {string} [pincode] - A string indicating the postal code or PIN
429
- * code of the address area.
430
- * @property {string} [sector] - A string specifying the sector or district of
431
- * the address if applicable.
432
- * @property {string} [state] - A string indicating the state or province of the address.
433
- */
444
+ /** @returns {StoreItemResponse} */
445
+ static StoreItemResponse() {
446
+ return Joi.object({
447
+ id: Joi.number(),
448
+ store_type: Joi.string().allow(""),
449
+ fulfillment_type: Joi.string().allow(""),
450
+ processing_time: Joi.number(),
451
+ tags: Joi.array().items(Joi.string().allow("")),
452
+ company_id: Joi.number(),
453
+ latitude: Joi.number(),
454
+ longitude: Joi.number(),
455
+ });
456
+ }
434
457
 
435
- class LogisticApplicationModel {
436
- /** @returns {CountryEntityResponse} */
437
- static CountryEntityResponse() {
458
+ /** @returns {ValidateAddressRequest} */
459
+ static ValidateAddressRequest() {
438
460
  return Joi.object({
439
- display_name: Joi.string().allow(""),
440
- is_active: Joi.boolean(),
441
- logistics: LogisticApplicationModel.LogisticsResponse(),
442
- meta: LogisticApplicationModel.CountryMetaResponse(),
461
+ address: Joi.string().allow(""),
462
+ address1: Joi.string().allow(""),
463
+ address2: Joi.string().allow(""),
464
+ area: Joi.string().allow(""),
465
+ landmark: Joi.string().allow(""),
466
+ pincode: Joi.string().allow(""),
467
+ sector: Joi.string().allow(""),
468
+ city: Joi.string().allow(""),
469
+ state: Joi.string().allow(""),
443
470
  name: Joi.string().allow(""),
444
- parent_id: Joi.string().allow(""),
471
+ phone: Joi.string().allow(""),
472
+ email: Joi.string().allow(""),
473
+ });
474
+ }
475
+
476
+ /** @returns {PincodeParentsResponse} */
477
+ static PincodeParentsResponse() {
478
+ return Joi.object({
445
479
  sub_type: Joi.string().allow(""),
446
- type: Joi.string().allow(""),
480
+ display_name: Joi.string().allow(""),
481
+ name: Joi.string().allow(""),
447
482
  uid: Joi.string().allow(""),
448
483
  });
449
484
  }
450
485
 
451
- /** @returns {CountryHierarchy} */
452
- static CountryHierarchy() {
486
+ /** @returns {PincodeMetaResponse} */
487
+ static PincodeMetaResponse() {
453
488
  return Joi.object({
454
- name: Joi.string().allow(""),
455
- slug: Joi.string().allow(""),
489
+ zone: Joi.string().allow(""),
490
+ internal_zone_id: Joi.number(),
456
491
  });
457
492
  }
458
493
 
459
- /** @returns {CountryListResponse} */
460
- static CountryListResponse() {
494
+ /** @returns {PincodeErrorSchemaResponse} */
495
+ static PincodeErrorSchemaResponse() {
461
496
  return Joi.object({
462
- results: Joi.array().items(
463
- LogisticApplicationModel.CountryEntityResponse()
464
- ),
497
+ message: Joi.string().allow("").allow(null),
498
+ value: Joi.string().allow("").allow(null),
499
+ type: Joi.string().allow("").allow(null),
465
500
  });
466
501
  }
467
502
 
@@ -473,210 +508,212 @@ class LogisticApplicationModel {
473
508
  });
474
509
  }
475
510
 
476
- /** @returns {CountryObject} */
477
- static CountryObject() {
511
+ /** @returns {PincodeLatLongData} */
512
+ static PincodeLatLongData() {
478
513
  return Joi.object({
479
- currency: LogisticApplicationModel.CurrencyObject(),
480
- display_name: Joi.string().allow(""),
481
- hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
482
- id: Joi.string().allow(""),
483
- iso2: Joi.string().allow(""),
484
- iso3: Joi.string().allow(""),
485
- latitude: Joi.string().allow(""),
486
- longitude: Joi.string().allow(""),
487
- name: Joi.string().allow(""),
488
- phone_code: Joi.string().allow(""),
489
- timezones: Joi.array().items(Joi.string().allow("")),
490
514
  type: Joi.string().allow(""),
515
+ coordinates: Joi.array().items(Joi.string().allow("")),
491
516
  });
492
517
  }
493
518
 
494
- /** @returns {CurrencyObject} */
495
- static CurrencyObject() {
519
+ /** @returns {PincodeDataResponse} */
520
+ static PincodeDataResponse() {
496
521
  return Joi.object({
497
- code: Joi.string().allow(""),
522
+ parents: Joi.array().items(
523
+ LogisticApplicationModel.PincodeParentsResponse()
524
+ ),
525
+ meta: LogisticApplicationModel.PincodeMetaResponse(),
526
+ display_name: Joi.string().allow(""),
527
+ error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
528
+ meta_code: LogisticApplicationModel.CountryMetaResponse(),
529
+ lat_long: LogisticApplicationModel.PincodeLatLongData(),
530
+ sub_type: Joi.string().allow(""),
498
531
  name: Joi.string().allow(""),
499
- symbol: Joi.string().allow(""),
500
- });
501
- }
502
-
503
- /** @returns {DP} */
504
- static DP() {
505
- return Joi.object({
506
- area_code: Joi.string().allow("").allow(null),
507
- assign_dp_from_sb: Joi.boolean(),
508
- external_account_id: Joi.string().allow("").allow(null),
509
- fm_priority: Joi.number().required(),
510
- internal_account_id: Joi.string().allow(""),
511
- lm_priority: Joi.number().required(),
512
- operations: Joi.array().items(Joi.string().allow("")).required(),
513
- payment_mode: Joi.string().allow("").required(),
514
- rvp_priority: Joi.number().required(),
515
- transport_mode: Joi.string().allow(""),
532
+ uid: Joi.string().allow(""),
516
533
  });
517
534
  }
518
535
 
519
- /** @returns {ErrorResponse} */
520
- static ErrorResponse() {
536
+ /** @returns {PincodeApiResponse} */
537
+ static PincodeApiResponse() {
521
538
  return Joi.object({
522
- error: Joi.string().allow(""),
539
+ success: Joi.boolean().required(),
540
+ data: Joi.array().items(LogisticApplicationModel.PincodeDataResponse()),
541
+ error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
523
542
  });
524
543
  }
525
544
 
526
- /** @returns {FieldValidation} */
527
- static FieldValidation() {
545
+ /** @returns {TATCategoryRequest} */
546
+ static TATCategoryRequest() {
528
547
  return Joi.object({
529
- regex: LogisticApplicationModel.FieldValidationRegex(),
530
- type: Joi.string().allow(""),
548
+ level: Joi.string().allow(""),
549
+ id: Joi.number(),
531
550
  });
532
551
  }
533
552
 
534
- /** @returns {FieldValidationRegex} */
535
- static FieldValidationRegex() {
553
+ /** @returns {TATArticlesRequest} */
554
+ static TATArticlesRequest() {
536
555
  return Joi.object({
537
- length: LogisticApplicationModel.LengthValidation(),
538
- value: Joi.string().allow(""),
556
+ category: LogisticApplicationModel.TATCategoryRequest(),
557
+ manufacturing_time_unit: Joi.string().allow(""),
558
+ manufacturing_time: Joi.number(),
539
559
  });
540
560
  }
541
561
 
542
- /** @returns {GetCountries} */
543
- static GetCountries() {
562
+ /** @returns {TATLocationDetailsRequest} */
563
+ static TATLocationDetailsRequest() {
544
564
  return Joi.object({
545
- items: Joi.array().items(LogisticApplicationModel.CountryObject()),
546
- page: LogisticApplicationModel.Page(),
565
+ fulfillment_id: Joi.number(),
566
+ from_pincode: Joi.string().allow(""),
567
+ articles: Joi.array().items(
568
+ LogisticApplicationModel.TATArticlesRequest()
569
+ ),
547
570
  });
548
571
  }
549
572
 
550
- /** @returns {GetCountry} */
551
- static GetCountry() {
573
+ /** @returns {TATViewRequest} */
574
+ static TATViewRequest() {
552
575
  return Joi.object({
553
- currency: LogisticApplicationModel.CurrencyObject(),
554
- display_name: Joi.string().allow(""),
555
- fields: LogisticApplicationModel.GetCountryFields(),
556
- hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
557
- id: Joi.string().allow(""),
558
- iso2: Joi.string().allow(""),
559
- iso3: Joi.string().allow(""),
560
- latitude: Joi.string().allow(""),
561
- longitude: Joi.string().allow(""),
562
- name: Joi.string().allow(""),
563
- phone_code: Joi.string().allow(""),
564
- timezones: Joi.array().items(Joi.string().allow("")),
565
- type: Joi.string().allow(""),
576
+ to_pincode: Joi.string().allow(""),
577
+ source: Joi.string().allow(""),
578
+ action: Joi.string().allow(""),
579
+ identifier: Joi.string().allow(""),
580
+ location_details: Joi.array().items(
581
+ LogisticApplicationModel.TATLocationDetailsRequest()
582
+ ),
583
+ journey: Joi.string().allow(""),
566
584
  });
567
585
  }
568
586
 
569
- /** @returns {GetCountryFields} */
570
- static GetCountryFields() {
587
+ /** @returns {TATErrorSchemaResponse} */
588
+ static TATErrorSchemaResponse() {
571
589
  return Joi.object({
572
- address: Joi.array()
573
- .items(LogisticApplicationModel.GetCountryFieldsAddress())
574
- .required(),
575
- address_template: LogisticApplicationModel.GetCountryFieldsAddressTemplate().required(),
576
- serviceability_fields: Joi.array()
577
- .items(Joi.string().allow(""))
578
- .required(),
590
+ message: Joi.string().allow("").allow(null),
591
+ value: Joi.string().allow("").allow(null),
592
+ type: Joi.string().allow("").allow(null),
579
593
  });
580
594
  }
581
595
 
582
- /** @returns {GetCountryFieldsAddress} */
583
- static GetCountryFieldsAddress() {
596
+ /** @returns {TATTimestampResponse} */
597
+ static TATTimestampResponse() {
584
598
  return Joi.object({
585
- display_name: Joi.string().allow("").required(),
586
- edit: Joi.boolean(),
587
- error_text: Joi.string().allow("").allow(null),
588
- input: Joi.string().allow("").required(),
589
- required: Joi.boolean().required(),
590
- slug: Joi.string().allow("").required(),
591
- validation: LogisticApplicationModel.FieldValidation(),
592
- values: LogisticApplicationModel.GetCountryFieldsAddressValues(),
599
+ min: Joi.number(),
600
+ max: Joi.number(),
593
601
  });
594
602
  }
595
603
 
596
- /** @returns {GetCountryFieldsAddressTemplate} */
597
- static GetCountryFieldsAddressTemplate() {
604
+ /** @returns {TATFormattedResponse} */
605
+ static TATFormattedResponse() {
598
606
  return Joi.object({
599
- checkout_form: Joi.string().allow("").required(),
600
- default_display: Joi.string().allow("").required(),
601
- store_os_form: Joi.string().allow("").required(),
607
+ min: Joi.string().allow(""),
608
+ max: Joi.string().allow(""),
602
609
  });
603
610
  }
604
611
 
605
- /** @returns {GetCountryFieldsAddressValues} */
606
- static GetCountryFieldsAddressValues() {
612
+ /** @returns {TATPromiseResponse} */
613
+ static TATPromiseResponse() {
607
614
  return Joi.object({
608
- get_all: LogisticApplicationModel.GetOneOrAll(),
609
- get_one: LogisticApplicationModel.GetOneOrAll(),
615
+ timestamp: LogisticApplicationModel.TATTimestampResponse(),
616
+ formatted: LogisticApplicationModel.TATFormattedResponse(),
610
617
  });
611
618
  }
612
619
 
613
- /** @returns {GetLocalities} */
614
- static GetLocalities() {
620
+ /** @returns {TATArticlesResponse} */
621
+ static TATArticlesResponse() {
615
622
  return Joi.object({
616
- items: Joi.array().items(LogisticApplicationModel.Localities()),
617
- page: LogisticApplicationModel.Page(),
623
+ manufacturing_time_unit: Joi.string().allow(""),
624
+ error: LogisticApplicationModel.TATErrorSchemaResponse(),
625
+ is_cod_available: Joi.boolean(),
626
+ promise: LogisticApplicationModel.TATPromiseResponse(),
627
+ manufacturing_time: Joi.number(),
628
+ category: LogisticApplicationModel.TATCategoryRequest(),
629
+ _manufacturing_time_seconds: Joi.number(),
618
630
  });
619
631
  }
620
632
 
621
- /** @returns {GetLocality} */
622
- static GetLocality() {
633
+ /** @returns {TATLocationDetailsResponse} */
634
+ static TATLocationDetailsResponse() {
623
635
  return Joi.object({
624
- display_name: Joi.string().allow(""),
625
- id: Joi.string().allow(""),
626
- localities: Joi.array().items(LogisticApplicationModel.LocalityParent()),
627
- name: Joi.string().allow(""),
628
- parent_ids: Joi.array().items(Joi.string().allow("")),
629
- type: Joi.string().allow(""),
636
+ fulfillment_id: Joi.number(),
637
+ from_pincode: Joi.string().allow(""),
638
+ articles: Joi.array().items(
639
+ LogisticApplicationModel.TATArticlesResponse()
640
+ ),
630
641
  });
631
642
  }
632
643
 
633
- /** @returns {GetOneOrAll} */
634
- static GetOneOrAll() {
644
+ /** @returns {TATViewResponse} */
645
+ static TATViewResponse() {
635
646
  return Joi.object({
636
- operation_id: Joi.string().allow(""),
637
- params: LogisticApplicationModel.GetOneOrAllParams(),
647
+ to_pincode: Joi.string().allow(""),
648
+ request_uuid: Joi.string().allow(""),
649
+ payment_mode: Joi.string().allow(""),
650
+ success: Joi.boolean(),
651
+ error: LogisticApplicationModel.TATErrorSchemaResponse(),
652
+ is_cod_available: Joi.boolean(),
653
+ source: Joi.string().allow(""),
654
+ action: Joi.string().allow(""),
655
+ stormbreaker_uuid: Joi.string().allow(""),
656
+ to_city: Joi.string().allow(""),
657
+ identifier: Joi.string().allow(""),
658
+ location_details: Joi.array().items(
659
+ LogisticApplicationModel.TATLocationDetailsResponse()
660
+ ),
661
+ journey: Joi.string().allow(""),
638
662
  });
639
663
  }
640
664
 
641
- /** @returns {GetOneOrAllParams} */
642
- static GetOneOrAllParams() {
665
+ /** @returns {DP} */
666
+ static DP() {
643
667
  return Joi.object({
644
- path: LogisticApplicationModel.GetOneOrAllPath(),
645
- query: LogisticApplicationModel.GetOneOrAllQuery(),
668
+ fm_priority: Joi.number().required(),
669
+ lm_priority: Joi.number().required(),
670
+ rvp_priority: Joi.number().required(),
671
+ payment_mode: Joi.string().allow("").required(),
672
+ operations: Joi.array().items(Joi.string().allow("")).required(),
673
+ area_code: Joi.string().allow("").allow(null),
674
+ assign_dp_from_sb: Joi.boolean(),
675
+ internal_account_id: Joi.string().allow(""),
676
+ external_account_id: Joi.string().allow("").allow(null),
677
+ transport_mode: Joi.string().allow(""),
646
678
  });
647
679
  }
648
680
 
649
- /** @returns {GetOneOrAllPath} */
650
- static GetOneOrAllPath() {
681
+ /** @returns {LogisticsResponse} */
682
+ static LogisticsResponse() {
651
683
  return Joi.object({
652
- locality_type: Joi.string().allow(""),
653
- locality_value: Joi.string().allow(""),
684
+ dp: Joi.object().pattern(/\S/, LogisticApplicationModel.DP()),
654
685
  });
655
686
  }
656
687
 
657
- /** @returns {GetOneOrAllQuery} */
658
- static GetOneOrAllQuery() {
688
+ /** @returns {CountryEntityResponse} */
689
+ static CountryEntityResponse() {
659
690
  return Joi.object({
660
- city: Joi.string().allow("").allow(null),
661
- country: Joi.string().allow("").allow(null),
662
- sector: Joi.string().allow("").allow(null),
663
- state: Joi.string().allow("").allow(null),
691
+ meta: LogisticApplicationModel.CountryMetaResponse(),
692
+ logistics: LogisticApplicationModel.LogisticsResponse(),
693
+ display_name: Joi.string().allow(""),
694
+ type: Joi.string().allow(""),
695
+ is_active: Joi.boolean(),
696
+ parent_id: Joi.string().allow(""),
697
+ sub_type: Joi.string().allow(""),
698
+ name: Joi.string().allow(""),
699
+ uid: Joi.string().allow(""),
664
700
  });
665
701
  }
666
702
 
667
- /** @returns {GetStoreResponse} */
668
- static GetStoreResponse() {
703
+ /** @returns {CountryListResponse} */
704
+ static CountryListResponse() {
669
705
  return Joi.object({
670
- items: Joi.array().items(LogisticApplicationModel.StoreItemResponse()),
671
- page: LogisticApplicationModel.Page(),
706
+ results: Joi.array().items(
707
+ LogisticApplicationModel.CountryEntityResponse()
708
+ ),
672
709
  });
673
710
  }
674
711
 
675
712
  /** @returns {GetZoneFromPincodeViewRequest} */
676
713
  static GetZoneFromPincodeViewRequest() {
677
714
  return Joi.object({
678
- country: Joi.string().allow("").required(),
679
715
  pincode: Joi.string().allow("").required(),
716
+ country: Joi.string().allow("").required(),
680
717
  });
681
718
  }
682
719
 
@@ -688,288 +725,251 @@ class LogisticApplicationModel {
688
725
  });
689
726
  }
690
727
 
691
- /** @returns {LengthValidation} */
692
- static LengthValidation() {
728
+ /** @returns {ReAssignStoreRequest} */
729
+ static ReAssignStoreRequest() {
693
730
  return Joi.object({
694
- max: Joi.number().allow(null),
695
- min: Joi.number().allow(null),
731
+ configuration: Joi.any().required(),
732
+ to_pincode: Joi.string().allow("").required(),
733
+ ignored_locations: Joi.array().items(Joi.number()).required(),
734
+ identifier: Joi.string().allow("").required(),
735
+ articles: Joi.array().items(Joi.any()).required(),
696
736
  });
697
737
  }
698
738
 
699
- /** @returns {Localities} */
700
- static Localities() {
739
+ /** @returns {ReAssignStoreResponse} */
740
+ static ReAssignStoreResponse() {
701
741
  return Joi.object({
702
- display_name: Joi.string().allow(""),
703
- id: Joi.string().allow(""),
704
- name: Joi.string().allow(""),
705
- parent_ids: Joi.array().items(Joi.string().allow("")),
706
- type: Joi.string().allow(""),
742
+ to_pincode: Joi.string().allow("").required(),
743
+ pystormbreaker_uuid: Joi.string().allow("").required(),
744
+ success: Joi.boolean().required(),
745
+ error: Joi.any().required(),
746
+ assigned_stores: Joi.array().items(Joi.any()),
707
747
  });
708
748
  }
709
749
 
710
- /** @returns {LocalityParent} */
711
- static LocalityParent() {
750
+ /** @returns {CountryHierarchy} */
751
+ static CountryHierarchy() {
712
752
  return Joi.object({
713
- display_name: Joi.string().allow(""),
714
- id: Joi.string().allow(""),
715
753
  name: Joi.string().allow(""),
716
- parent_ids: Joi.array().items(Joi.string().allow("")),
717
- type: Joi.string().allow(""),
718
- });
719
- }
720
-
721
- /** @returns {LogisticsResponse} */
722
- static LogisticsResponse() {
723
- return Joi.object({
724
- dp: Joi.object().pattern(/\S/, LogisticApplicationModel.DP()),
725
- });
726
- }
727
-
728
- /** @returns {Page} */
729
- static Page() {
730
- return Joi.object({
731
- current: Joi.number(),
732
- has_next: Joi.boolean(),
733
- has_previous: Joi.boolean(),
734
- item_total: Joi.number(),
735
- next_id: Joi.string().allow(""),
736
- size: Joi.number(),
737
- type: Joi.string().allow("").required(),
754
+ slug: Joi.string().allow(""),
738
755
  });
739
756
  }
740
757
 
741
- /** @returns {PincodeApiResponse} */
742
- static PincodeApiResponse() {
758
+ /** @returns {CurrencyObject} */
759
+ static CurrencyObject() {
743
760
  return Joi.object({
744
- data: Joi.array().items(LogisticApplicationModel.PincodeDataResponse()),
745
- error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
746
- success: Joi.boolean().required(),
761
+ code: Joi.string().allow(""),
762
+ name: Joi.string().allow(""),
763
+ symbol: Joi.string().allow(""),
747
764
  });
748
765
  }
749
766
 
750
- /** @returns {PincodeDataResponse} */
751
- static PincodeDataResponse() {
767
+ /** @returns {CountryObject} */
768
+ static CountryObject() {
752
769
  return Joi.object({
753
- display_name: Joi.string().allow(""),
754
- error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
755
- lat_long: LogisticApplicationModel.PincodeLatLongData(),
756
- meta: LogisticApplicationModel.PincodeMetaResponse(),
757
- meta_code: LogisticApplicationModel.CountryMetaResponse(),
770
+ id: Joi.string().allow(""),
758
771
  name: Joi.string().allow(""),
759
- parents: Joi.array().items(
760
- LogisticApplicationModel.PincodeParentsResponse()
761
- ),
762
- sub_type: Joi.string().allow(""),
763
- uid: Joi.string().allow(""),
772
+ display_name: Joi.string().allow(""),
773
+ iso2: Joi.string().allow(""),
774
+ iso3: Joi.string().allow(""),
775
+ timezones: Joi.array().items(Joi.string().allow("")),
776
+ hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
777
+ phone_code: Joi.string().allow(""),
778
+ latitude: Joi.string().allow(""),
779
+ longitude: Joi.string().allow(""),
780
+ currency: LogisticApplicationModel.CurrencyObject(),
781
+ type: Joi.string().allow(""),
764
782
  });
765
783
  }
766
784
 
767
- /** @returns {PincodeErrorSchemaResponse} */
768
- static PincodeErrorSchemaResponse() {
785
+ /** @returns {GetCountries} */
786
+ static GetCountries() {
769
787
  return Joi.object({
770
- message: Joi.string().allow("").allow(null),
771
- type: Joi.string().allow("").allow(null),
772
- value: Joi.string().allow("").allow(null),
788
+ items: Joi.array().items(LogisticApplicationModel.CountryObject()),
789
+ page: LogisticApplicationModel.Page(),
773
790
  });
774
791
  }
775
792
 
776
- /** @returns {PincodeLatLongData} */
777
- static PincodeLatLongData() {
793
+ /** @returns {GetOneOrAllPath} */
794
+ static GetOneOrAllPath() {
778
795
  return Joi.object({
779
- coordinates: Joi.array().items(Joi.string().allow("")),
780
- type: Joi.string().allow(""),
796
+ locality_type: Joi.string().allow(""),
797
+ locality_value: Joi.string().allow(""),
781
798
  });
782
799
  }
783
800
 
784
- /** @returns {PincodeMetaResponse} */
785
- static PincodeMetaResponse() {
801
+ /** @returns {GetOneOrAllQuery} */
802
+ static GetOneOrAllQuery() {
786
803
  return Joi.object({
787
- internal_zone_id: Joi.number(),
788
- zone: Joi.string().allow(""),
804
+ country: Joi.string().allow("").allow(null),
805
+ state: Joi.string().allow("").allow(null),
806
+ city: Joi.string().allow("").allow(null),
807
+ sector: Joi.string().allow("").allow(null),
789
808
  });
790
809
  }
791
810
 
792
- /** @returns {PincodeParentsResponse} */
793
- static PincodeParentsResponse() {
811
+ /** @returns {GetOneOrAllParams} */
812
+ static GetOneOrAllParams() {
794
813
  return Joi.object({
795
- display_name: Joi.string().allow(""),
796
- name: Joi.string().allow(""),
797
- sub_type: Joi.string().allow(""),
798
- uid: Joi.string().allow(""),
814
+ path: LogisticApplicationModel.GetOneOrAllPath(),
815
+ query: LogisticApplicationModel.GetOneOrAllQuery(),
799
816
  });
800
817
  }
801
818
 
802
- /** @returns {ReAssignStoreRequest} */
803
- static ReAssignStoreRequest() {
819
+ /** @returns {GetOneOrAll} */
820
+ static GetOneOrAll() {
804
821
  return Joi.object({
805
- articles: Joi.array().items(Joi.any()).required(),
806
- configuration: Joi.any().required(),
807
- identifier: Joi.string().allow("").required(),
808
- ignored_locations: Joi.array().items(Joi.number()).required(),
809
- to_pincode: Joi.string().allow("").required(),
822
+ operation_id: Joi.string().allow(""),
823
+ params: LogisticApplicationModel.GetOneOrAllParams(),
810
824
  });
811
825
  }
812
826
 
813
- /** @returns {ReAssignStoreResponse} */
814
- static ReAssignStoreResponse() {
827
+ /** @returns {LengthValidation} */
828
+ static LengthValidation() {
815
829
  return Joi.object({
816
- assigned_stores: Joi.array().items(Joi.any()),
817
- error: Joi.any().required(),
818
- pystormbreaker_uuid: Joi.string().allow("").required(),
819
- success: Joi.boolean().required(),
820
- to_pincode: Joi.string().allow("").required(),
830
+ min: Joi.number().allow(null),
831
+ max: Joi.number().allow(null),
821
832
  });
822
833
  }
823
834
 
824
- /** @returns {StoreItemResponse} */
825
- static StoreItemResponse() {
835
+ /** @returns {FieldValidationRegex} */
836
+ static FieldValidationRegex() {
826
837
  return Joi.object({
827
- company_id: Joi.number(),
828
- fulfillment_type: Joi.string().allow(""),
829
- id: Joi.number(),
830
- latitude: Joi.number(),
831
- longitude: Joi.number(),
832
- processing_time: Joi.number(),
833
- store_type: Joi.string().allow(""),
834
- tags: Joi.array().items(Joi.string().allow("")),
838
+ value: Joi.string().allow(""),
839
+ length: LogisticApplicationModel.LengthValidation(),
835
840
  });
836
841
  }
837
842
 
838
- /** @returns {TATArticlesRequest} */
839
- static TATArticlesRequest() {
843
+ /** @returns {FieldValidation} */
844
+ static FieldValidation() {
840
845
  return Joi.object({
841
- category: LogisticApplicationModel.TATCategoryRequest(),
842
- manufacturing_time: Joi.number(),
843
- manufacturing_time_unit: Joi.string().allow(""),
846
+ type: Joi.string().allow(""),
847
+ regex: LogisticApplicationModel.FieldValidationRegex(),
844
848
  });
845
849
  }
846
850
 
847
- /** @returns {TATArticlesResponse} */
848
- static TATArticlesResponse() {
851
+ /** @returns {GetCountryFieldsAddressValues} */
852
+ static GetCountryFieldsAddressValues() {
849
853
  return Joi.object({
850
- _manufacturing_time_seconds: Joi.number(),
851
- category: LogisticApplicationModel.TATCategoryRequest(),
852
- error: LogisticApplicationModel.TATErrorSchemaResponse(),
853
- is_cod_available: Joi.boolean(),
854
- manufacturing_time: Joi.number(),
855
- manufacturing_time_unit: Joi.string().allow(""),
856
- promise: LogisticApplicationModel.TATPromiseResponse(),
854
+ get_one: LogisticApplicationModel.GetOneOrAll(),
855
+ get_all: LogisticApplicationModel.GetOneOrAll(),
857
856
  });
858
857
  }
859
858
 
860
- /** @returns {TATCategoryRequest} */
861
- static TATCategoryRequest() {
859
+ /** @returns {GetCountryFieldsAddress} */
860
+ static GetCountryFieldsAddress() {
862
861
  return Joi.object({
863
- id: Joi.number(),
864
- level: Joi.string().allow(""),
862
+ display_name: Joi.string().allow("").required(),
863
+ slug: Joi.string().allow("").required(),
864
+ required: Joi.boolean().required(),
865
+ edit: Joi.boolean(),
866
+ input: Joi.string().allow("").required(),
867
+ validation: LogisticApplicationModel.FieldValidation(),
868
+ values: LogisticApplicationModel.GetCountryFieldsAddressValues(),
869
+ error_text: Joi.string().allow("").allow(null),
865
870
  });
866
871
  }
867
872
 
868
- /** @returns {TATErrorSchemaResponse} */
869
- static TATErrorSchemaResponse() {
873
+ /** @returns {GetCountryFieldsAddressTemplate} */
874
+ static GetCountryFieldsAddressTemplate() {
870
875
  return Joi.object({
871
- message: Joi.string().allow("").allow(null),
872
- type: Joi.string().allow("").allow(null),
873
- value: Joi.string().allow("").allow(null),
876
+ checkout_form: Joi.string().allow("").required(),
877
+ store_os_form: Joi.string().allow("").required(),
878
+ default_display: Joi.string().allow("").required(),
874
879
  });
875
880
  }
876
881
 
877
- /** @returns {TATFormattedResponse} */
878
- static TATFormattedResponse() {
882
+ /** @returns {GetCountryFields} */
883
+ static GetCountryFields() {
879
884
  return Joi.object({
880
- max: Joi.string().allow(""),
881
- min: Joi.string().allow(""),
885
+ address: Joi.array()
886
+ .items(LogisticApplicationModel.GetCountryFieldsAddress())
887
+ .required(),
888
+ serviceability_fields: Joi.array()
889
+ .items(Joi.string().allow(""))
890
+ .required(),
891
+ address_template: LogisticApplicationModel.GetCountryFieldsAddressTemplate().required(),
882
892
  });
883
893
  }
884
894
 
885
- /** @returns {TATLocationDetailsRequest} */
886
- static TATLocationDetailsRequest() {
895
+ /** @returns {GetCountry} */
896
+ static GetCountry() {
887
897
  return Joi.object({
888
- articles: Joi.array().items(
889
- LogisticApplicationModel.TATArticlesRequest()
890
- ),
891
- from_pincode: Joi.string().allow(""),
892
- fulfillment_id: Joi.number(),
898
+ id: Joi.string().allow(""),
899
+ name: Joi.string().allow(""),
900
+ display_name: Joi.string().allow(""),
901
+ iso2: Joi.string().allow(""),
902
+ iso3: Joi.string().allow(""),
903
+ timezones: Joi.array().items(Joi.string().allow("")),
904
+ hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
905
+ phone_code: Joi.string().allow(""),
906
+ latitude: Joi.string().allow(""),
907
+ longitude: Joi.string().allow(""),
908
+ currency: LogisticApplicationModel.CurrencyObject(),
909
+ type: Joi.string().allow(""),
910
+ fields: LogisticApplicationModel.GetCountryFields(),
893
911
  });
894
912
  }
895
913
 
896
- /** @returns {TATLocationDetailsResponse} */
897
- static TATLocationDetailsResponse() {
914
+ /** @returns {Page} */
915
+ static Page() {
898
916
  return Joi.object({
899
- articles: Joi.array().items(
900
- LogisticApplicationModel.TATArticlesResponse()
901
- ),
902
- from_pincode: Joi.string().allow(""),
903
- fulfillment_id: Joi.number(),
917
+ item_total: Joi.number(),
918
+ next_id: Joi.string().allow(""),
919
+ has_previous: Joi.boolean(),
920
+ has_next: Joi.boolean(),
921
+ current: Joi.number(),
922
+ type: Joi.string().allow("").required(),
923
+ size: Joi.number(),
904
924
  });
905
925
  }
906
926
 
907
- /** @returns {TATPromiseResponse} */
908
- static TATPromiseResponse() {
927
+ /** @returns {Localities} */
928
+ static Localities() {
909
929
  return Joi.object({
910
- formatted: LogisticApplicationModel.TATFormattedResponse(),
911
- timestamp: LogisticApplicationModel.TATTimestampResponse(),
930
+ id: Joi.string().allow(""),
931
+ name: Joi.string().allow(""),
932
+ display_name: Joi.string().allow(""),
933
+ parent_ids: Joi.array().items(Joi.string().allow("")),
934
+ type: Joi.string().allow(""),
912
935
  });
913
936
  }
914
937
 
915
- /** @returns {TATTimestampResponse} */
916
- static TATTimestampResponse() {
938
+ /** @returns {LocalityParent} */
939
+ static LocalityParent() {
917
940
  return Joi.object({
918
- max: Joi.number(),
919
- min: Joi.number(),
941
+ id: Joi.string().allow(""),
942
+ name: Joi.string().allow(""),
943
+ display_name: Joi.string().allow(""),
944
+ parent_ids: Joi.array().items(Joi.string().allow("")),
945
+ type: Joi.string().allow(""),
920
946
  });
921
947
  }
922
948
 
923
- /** @returns {TATViewRequest} */
924
- static TATViewRequest() {
949
+ /** @returns {GetLocalities} */
950
+ static GetLocalities() {
925
951
  return Joi.object({
926
- action: Joi.string().allow(""),
927
- identifier: Joi.string().allow(""),
928
- journey: Joi.string().allow(""),
929
- location_details: Joi.array().items(
930
- LogisticApplicationModel.TATLocationDetailsRequest()
931
- ),
932
- source: Joi.string().allow(""),
933
- to_pincode: Joi.string().allow(""),
952
+ items: Joi.array().items(LogisticApplicationModel.Localities()),
953
+ page: LogisticApplicationModel.Page(),
934
954
  });
935
955
  }
936
956
 
937
- /** @returns {TATViewResponse} */
938
- static TATViewResponse() {
957
+ /** @returns {GetLocality} */
958
+ static GetLocality() {
939
959
  return Joi.object({
940
- action: Joi.string().allow(""),
941
- error: LogisticApplicationModel.TATErrorSchemaResponse(),
942
- identifier: Joi.string().allow(""),
943
- is_cod_available: Joi.boolean(),
944
- journey: Joi.string().allow(""),
945
- location_details: Joi.array().items(
946
- LogisticApplicationModel.TATLocationDetailsResponse()
947
- ),
948
- payment_mode: Joi.string().allow(""),
949
- request_uuid: Joi.string().allow(""),
950
- source: Joi.string().allow(""),
951
- stormbreaker_uuid: Joi.string().allow(""),
952
- success: Joi.boolean(),
953
- to_city: Joi.string().allow(""),
954
- to_pincode: Joi.string().allow(""),
960
+ id: Joi.string().allow(""),
961
+ name: Joi.string().allow(""),
962
+ display_name: Joi.string().allow(""),
963
+ parent_ids: Joi.array().items(Joi.string().allow("")),
964
+ type: Joi.string().allow(""),
965
+ localities: Joi.array().items(LogisticApplicationModel.LocalityParent()),
955
966
  });
956
967
  }
957
968
 
958
- /** @returns {ValidateAddressRequest} */
959
- static ValidateAddressRequest() {
969
+ /** @returns {ErrorResponse} */
970
+ static ErrorResponse() {
960
971
  return Joi.object({
961
- address: Joi.string().allow(""),
962
- address1: Joi.string().allow(""),
963
- address2: Joi.string().allow(""),
964
- area: Joi.string().allow(""),
965
- city: Joi.string().allow(""),
966
- email: Joi.string().allow(""),
967
- landmark: Joi.string().allow(""),
968
- name: Joi.string().allow(""),
969
- phone: Joi.string().allow(""),
970
- pincode: Joi.string().allow(""),
971
- sector: Joi.string().allow(""),
972
- state: Joi.string().allow(""),
972
+ error: Joi.string().allow(""),
973
973
  });
974
974
  }
975
975
  }