@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-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 (265) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -2
  3. package/sdk/application/ApplicationClient.js +20 -0
  4. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  5. package/sdk/application/Cart/CartApplicationClient.js +3 -5
  6. package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
  7. package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
  8. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
  9. package/sdk/application/Cart/CartApplicationValidator.js +0 -4
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
  12. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  13. package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
  14. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
  16. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  17. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  18. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  19. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
  22. package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
  23. package/sdk/application/Content/ContentApplicationClient.js +0 -246
  24. package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
  25. package/sdk/application/Content/ContentApplicationModel.js +565 -817
  26. package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
  27. package/sdk/application/Content/ContentApplicationValidator.js +0 -41
  28. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  29. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  30. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  31. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  32. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
  33. package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
  34. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
  35. package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
  36. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
  37. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
  38. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  39. package/sdk/application/Order/OrderApplicationClient.js +8 -32
  40. package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
  41. package/sdk/application/Order/OrderApplicationModel.js +816 -824
  42. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
  43. package/sdk/application/Order/OrderApplicationValidator.js +0 -8
  44. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
  45. package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
  46. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
  47. package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
  48. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
  49. package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
  50. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
  51. package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
  52. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  53. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  54. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  55. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  56. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  57. package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
  58. package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
  59. package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
  60. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
  61. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
  62. package/sdk/application/User/UserApplicationClient.d.ts +0 -33
  63. package/sdk/application/User/UserApplicationClient.js +0 -239
  64. package/sdk/application/User/UserApplicationModel.d.ts +753 -768
  65. package/sdk/application/User/UserApplicationModel.js +731 -755
  66. package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
  67. package/sdk/application/User/UserApplicationValidator.js +0 -36
  68. package/sdk/common/Clickstream.d.ts +1 -0
  69. package/sdk/common/Clickstream.js +254 -0
  70. package/sdk/common/Utility.js +1 -4
  71. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
  72. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
  73. package/sdk/partner/PartnerClient.d.ts +0 -6
  74. package/sdk/partner/PartnerClient.js +0 -9
  75. package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
  76. package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
  77. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
  78. package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
  79. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
  80. package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
  81. package/sdk/partner/index.d.ts +0 -3
  82. package/sdk/partner/index.js +0 -6
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  86. package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
  87. package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
  88. package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
  89. package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
  90. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
  91. package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
  92. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
  94. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
  96. package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
  97. package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
  108. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  109. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
  112. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
  114. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
  115. package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  124. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
  125. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
  126. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  127. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  128. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
  129. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
  130. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
  131. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
  132. package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
  133. package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
  134. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
  137. package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
  145. package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
  147. package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
  148. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
  149. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
  150. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  151. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  152. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
  153. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
  154. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
  155. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
  156. package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
  157. package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
  159. package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  161. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  162. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
  163. package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
  164. package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
  165. package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
  166. package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
  167. package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
  168. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  169. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  170. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
  172. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
  174. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  175. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  176. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
  177. package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
  178. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  179. package/sdk/platform/PlatformApplicationClient.js +4 -4
  180. package/sdk/platform/PlatformClient.d.ts +2 -4
  181. package/sdk/platform/PlatformClient.js +4 -8
  182. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  183. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
  194. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  195. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  196. package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
  197. package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
  198. package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
  199. package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
  200. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
  201. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
  202. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
  203. package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
  204. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
  205. package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
  206. package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
  207. package/sdk/platform/User/UserPlatformModel.js +428 -679
  208. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
  209. package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
  210. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
  211. package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
  212. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
  213. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  214. package/sdk/platform/index.d.ts +1 -1
  215. package/sdk/platform/index.js +2 -2
  216. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  217. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  218. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  219. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  220. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  221. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  222. package/sdk/public/PublicClient.d.ts +0 -4
  223. package/sdk/public/PublicClient.js +0 -8
  224. package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
  225. package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
  226. package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
  227. package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
  228. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
  229. package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
  230. package/sdk/public/index.d.ts +0 -2
  231. package/sdk/public/index.js +0 -4
  232. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
  233. package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
  234. package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
  235. package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
  236. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
  237. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
  238. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
  239. package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
  240. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
  241. package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
  242. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
  243. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
  244. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
  245. package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
  246. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
  247. package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
  248. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
  249. package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
  250. package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
  251. package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
  252. package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
  253. package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
  254. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
  255. package/sdk/public/Billing/BillingPublicClient.js +0 -116
  256. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
  257. package/sdk/public/Billing/BillingPublicModel.js +0 -96
  258. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
  259. package/sdk/public/Billing/BillingPublicValidator.js +0 -19
  260. package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
  261. package/sdk/public/Content/ContentPublicClient.js +0 -114
  262. package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
  263. package/sdk/public/Content/ContentPublicModel.js +0 -60
  264. package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
  265. package/sdk/public/Content/ContentPublicValidator.js +0 -19
@@ -1,354 +1,319 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef AddressResponse
5
- * @property {string} [address1]
6
- * @property {string} [address2]
7
- * @property {string} [city]
8
- * @property {string} [country]
9
- * @property {string} [landmark]
10
- * @property {number} [latitude]
11
- * @property {number} [longitude]
12
- * @property {number} [pincode]
13
- * @property {string} [state]
4
+ * @typedef ServiceabilityPayloadSchema
5
+ * @property {string} serviceability_type
14
6
  */
15
7
 
16
8
  /**
17
- * @typedef ApplicationConfig
18
- * @property {string[]} [rule_ids]
19
- * @property {string[]} [sort]
20
- * @property {ZoneConfig} [zones]
9
+ * @typedef ServiceabilityErrorResponse
10
+ * @property {string} message
11
+ * @property {string} value
12
+ * @property {string} type
21
13
  */
22
14
 
23
15
  /**
24
- * @typedef ApplicationSelfShipConfig
25
- * @property {Object} [self_ship]
16
+ * @typedef ApplicationServiceabilityConfig
17
+ * @property {string} channel_id
18
+ * @property {string} serviceability_type
19
+ * @property {string} channel_type
26
20
  */
27
21
 
28
22
  /**
29
- * @typedef ApplicationSelfShipConfigResponse
30
- * @property {ApplicationSelfShipConfig} [data]
23
+ * @typedef ApplicationServiceabilityConfigResponse
31
24
  * @property {ServiceabilityErrorResponse} [error]
25
+ * @property {ApplicationServiceabilityConfig} [data]
32
26
  * @property {boolean} success
33
27
  */
34
28
 
35
29
  /**
36
- * @typedef ApplicationServiceabilityConfig
37
- * @property {string} channel_id
38
- * @property {string} channel_type
39
- * @property {string} serviceability_type
30
+ * @typedef EntityRegionView_Request
31
+ * @property {string[]} sub_type
32
+ * @property {string[]} [parent_id]
40
33
  */
41
34
 
42
35
  /**
43
- * @typedef ApplicationServiceabilityConfigResponse
44
- * @property {ApplicationServiceabilityConfig} [data]
45
- * @property {ServiceabilityErrorResponse} [error]
46
- * @property {boolean} success
36
+ * @typedef EntityRegionView_Error
37
+ * @property {string} [message]
38
+ * @property {string} [value]
39
+ * @property {string} [type]
47
40
  */
48
41
 
49
42
  /**
50
- * @typedef ArithmeticOperations
51
- * @property {number} [gt]
52
- * @property {number} [gte]
53
- * @property {number} [lt]
54
- * @property {number} [lte]
43
+ * @typedef EntityRegionView_page
44
+ * @property {string} type
45
+ * @property {boolean} has_next
46
+ * @property {number} item_total
47
+ * @property {number} size
48
+ * @property {number} current
55
49
  */
56
50
 
57
51
  /**
58
- * @typedef BulkRegionJobSerializer
59
- * @property {string} action
60
- * @property {string} country
61
- * @property {string} [file_path]
62
- * @property {string} region
52
+ * @typedef EntityRegionView_Items
53
+ * @property {string} sub_type
54
+ * @property {string} uid
55
+ * @property {string} name
56
+ * @property {string} [display_name]
63
57
  */
64
58
 
65
59
  /**
66
- * @typedef BulkRegionResponse
67
- * @property {BulkRegionResponseItemData[]} items
68
- * @property {Page} page
60
+ * @typedef EntityRegionView_Response
61
+ * @property {EntityRegionView_Error} error
62
+ * @property {EntityRegionView_page} page
63
+ * @property {EntityRegionView_Items[]} [items]
64
+ * @property {boolean} success
69
65
  */
70
66
 
71
67
  /**
72
- * @typedef BulkRegionResponseItemData
73
- * @property {string} action
74
- * @property {string} batch_id
75
- * @property {string} country
76
- * @property {string} [error_file_path]
77
- * @property {number} [failed]
78
- * @property {Object[]} [failed_records]
79
- * @property {string} file_path
80
- * @property {string} region
81
- * @property {string} status
82
- * @property {number} [success]
83
- * @property {number} [total]
68
+ * @typedef ListViewSummary
69
+ * @property {number} total_zones
70
+ * @property {number} total_pincodes_served
71
+ * @property {number} total_active_zones
84
72
  */
85
73
 
86
74
  /**
87
- * @typedef Channel
88
- * @property {string} [id]
89
- * @property {string} [type]
75
+ * @typedef ZoneDataItem
76
+ * @property {boolean} has_next
77
+ * @property {number} item_total
78
+ * @property {number} size
79
+ * @property {number} current
80
+ * @property {string} type
90
81
  */
91
82
 
92
83
  /**
93
- * @typedef CommonError
94
- * @property {Object} [error]
95
- * @property {string} [status_code]
96
- * @property {string} [success]
84
+ * @typedef ListViewProduct
85
+ * @property {number} count
86
+ * @property {string} type
97
87
  */
98
88
 
99
89
  /**
100
- * @typedef CompanyConfig
101
- * @property {boolean} [logistics_as_actual]
102
- * @property {string[]} rule_ids
103
- * @property {string[]} sort
90
+ * @typedef ListViewChannels
91
+ * @property {string} channel_id
92
+ * @property {string} channel_type
104
93
  */
105
94
 
106
95
  /**
107
- * @typedef CompanyCourierPartnerAccountListResponse
108
- * @property {CourierAccountResponse[]} items
109
- * @property {Page} page
96
+ * @typedef ListViewItems
97
+ * @property {string} zone_id
98
+ * @property {string} name
99
+ * @property {string} slug
100
+ * @property {number} stores_count
101
+ * @property {boolean} is_active
102
+ * @property {ListViewProduct} product
103
+ * @property {number} pincodes_count
104
+ * @property {number} company_id
105
+ * @property {ListViewChannels[]} channels
106
+ */
107
+
108
+ /**
109
+ * @typedef ListViewResponse
110
+ * @property {ListViewSummary} summary
111
+ * @property {ZoneDataItem} page
112
+ * @property {ListViewItems[]} items
110
113
  */
111
114
 
112
115
  /**
113
116
  * @typedef CompanyStoreView_PageItems
114
- * @property {number} current
117
+ * @property {string} type
115
118
  * @property {boolean} has_next
116
119
  * @property {number} item_total
117
120
  * @property {number} size
118
- * @property {string} type
121
+ * @property {number} current
119
122
  */
120
123
 
121
124
  /**
122
125
  * @typedef CompanyStoreView_Response
123
- * @property {Object[]} [items]
124
126
  * @property {CompanyStoreView_PageItems[]} page
127
+ * @property {Object[]} [items]
125
128
  */
126
129
 
127
130
  /**
128
- * @typedef ContactNumberResponse
129
- * @property {number} [country_code]
130
- * @property {string} [number]
131
+ * @typedef GetZoneDataViewChannels
132
+ * @property {string} channel_id
133
+ * @property {string} channel_type
131
134
  */
132
135
 
133
136
  /**
134
- * @typedef CourierAccount
135
- * @property {string} account_id
136
- * @property {string} extension_id
137
- * @property {boolean} is_own_account
138
- * @property {boolean} is_self_ship
139
- * @property {string} scheme_id
140
- * @property {string} stage
137
+ * @typedef ZoneProductTypes
138
+ * @property {string} type
139
+ * @property {string[]} tags
141
140
  */
142
141
 
143
142
  /**
144
- * @typedef CourierAccountResponse
145
- * @property {string} account_id
146
- * @property {boolean} is_own_account
147
- * @property {boolean} is_self_ship
148
- * @property {string} scheme_id
149
- * @property {CourierPartnerSchemeModel} scheme_rules
150
- * @property {string} stage
143
+ * @typedef ZoneMappingType
144
+ * @property {string} country
145
+ * @property {string[]} [pincode]
146
+ * @property {string[]} [state]
151
147
  */
152
148
 
153
149
  /**
154
- * @typedef CourierPartnerAccountFailureResponse
155
- * @property {ErrorResponse[]} error
156
- * @property {boolean} success
150
+ * @typedef UpdateZoneData
151
+ * @property {string} zone_id
152
+ * @property {string} name
153
+ * @property {string} slug
154
+ * @property {number} company_id
155
+ * @property {boolean} is_active
156
+ * @property {GetZoneDataViewChannels[]} channels
157
+ * @property {ZoneProductTypes} product
158
+ * @property {number[]} store_ids
159
+ * @property {string} region_type
160
+ * @property {ZoneMappingType[]} mapping
161
+ * @property {string} [assignment_preference]
157
162
  */
158
163
 
159
164
  /**
160
- * @typedef CourierPartnerList
161
- * @property {string} account_id
162
- * @property {string} extension_id
163
- * @property {boolean} is_self_ship
164
- * @property {string} name
165
+ * @typedef ZoneUpdateRequest
166
+ * @property {string} identifier
167
+ * @property {UpdateZoneData} data
165
168
  */
166
169
 
167
170
  /**
168
- * @typedef CourierPartnerRule
169
- * @property {CourierPartnerRuleConditions} conditions
170
- * @property {CourierPartnerList[]} [cp_list]
171
- * @property {boolean} is_active
171
+ * @typedef ZoneSuccessResponse
172
+ * @property {number} status_code
173
+ * @property {boolean} success
174
+ */
175
+
176
+ /**
177
+ * @typedef GetZoneDataViewItems
178
+ * @property {string} zone_id
172
179
  * @property {string} name
173
- * @property {string[]} sort
180
+ * @property {string} slug
181
+ * @property {number} [company_id]
182
+ * @property {boolean} is_active
183
+ * @property {GetZoneDataViewChannels[]} channels
184
+ * @property {ZoneProductTypes} product
185
+ * @property {number[]} store_ids
186
+ * @property {string} region_type
187
+ * @property {ZoneMappingType[]} mapping
188
+ * @property {string} [assignment_preference]
189
+ * @property {number} stores_count
190
+ * @property {number} pincodes_count
174
191
  */
175
192
 
176
193
  /**
177
- * @typedef CourierPartnerRuleConditions
178
- * @property {IntComparisonOperations} [brand_ids]
179
- * @property {IntComparisonOperations} [category_ids]
180
- * @property {IntComparisonOperations} [department_ids]
181
- * @property {LocationRule} [forward]
182
- * @property {ArithmeticOperations} [order_place_date]
183
- * @property {StringComparisonOperations} [payment_mode]
184
- * @property {IntComparisonOperations} [product_ids]
185
- * @property {StringComparisonOperations} [product_tags]
186
- * @property {LocationRule} [reverse]
187
- * @property {ArithmeticOperations} [shipment_cost]
188
- * @property {ArithmeticOperations} [shipment_volumetric_weight]
189
- * @property {ArithmeticOperations} [shipment_weight]
190
- * @property {IntComparisonOperations} [store_ids]
191
- * @property {StringComparisonOperations} [store_tags]
192
- * @property {StringComparisonOperations} [store_type]
193
- * @property {StringComparisonOperations} [zone_ids]
194
+ * @typedef GetSingleZoneDataViewResponse
195
+ * @property {GetZoneDataViewItems} data
194
196
  */
195
197
 
196
198
  /**
197
- * @typedef CourierPartnerRulesListResponse
198
- * @property {CourierPartnerRule[]} items
199
- * @property {Page} page
199
+ * @typedef CreateZoneData
200
+ * @property {string} name
201
+ * @property {string} slug
202
+ * @property {number} company_id
203
+ * @property {boolean} is_active
204
+ * @property {GetZoneDataViewChannels[]} channels
205
+ * @property {ZoneProductTypes} product
206
+ * @property {number[]} store_ids
207
+ * @property {string} region_type
208
+ * @property {ZoneMappingType[]} mapping
209
+ * @property {string} [assignment_preference]
200
210
  */
201
211
 
202
212
  /**
203
- * @typedef CourierPartnerSchemeFeatures
204
- * @property {boolean} [cold_storage_goods]
205
- * @property {boolean} [dangerous_goods]
206
- * @property {boolean} [doorstep_exchange]
207
- * @property {boolean} [doorstep_qc]
208
- * @property {boolean} [doorstep_return]
209
- * @property {boolean} [ewaybill]
210
- * @property {boolean} [fragile_goods]
211
- * @property {boolean} [mps]
212
- * @property {boolean} [multi_pick_multi_drop]
213
- * @property {boolean} [multi_pick_single_drop]
214
- * @property {boolean} [ndr]
215
- * @property {number} [ndr_attempts]
216
- * @property {boolean} [openbox_delivery]
217
- * @property {boolean} [product_installation]
218
- * @property {boolean} [qr]
219
- * @property {boolean} [restricted_goods]
220
- * @property {boolean} [single_pick_multi_drop]
221
- * @property {string} [status_updates]
222
- */
223
-
224
- /**
225
- * @typedef CourierPartnerSchemeModel
226
- * @property {string} delivery_type
227
- * @property {string} extension_id
228
- * @property {CourierPartnerSchemeFeatures} feature
229
- * @property {string[]} payment_mode
230
- * @property {string} region
231
- * @property {string} scheme_id
232
- * @property {string} stage
233
- * @property {string} transport_type
234
- * @property {ArithmeticOperations} weight
213
+ * @typedef ZoneRequest
214
+ * @property {string} identifier
215
+ * @property {CreateZoneData} data
235
216
  */
236
217
 
237
218
  /**
238
- * @typedef CreatedByResponse
239
- * @property {string} [user_id]
240
- * @property {string} [username]
219
+ * @typedef ZoneResponse
220
+ * @property {number} status_code
221
+ * @property {string} zone_id
222
+ * @property {boolean} success
241
223
  */
242
224
 
243
225
  /**
244
- * @typedef CreateStoreRuleRequestSchema
245
- * @property {StoreRuleConditionSchema} [conditions]
246
- * @property {boolean} [is_active]
247
- * @property {string} [name]
248
- * @property {string[]} [sort]
249
- * @property {StorePrioritySchema[]} [store_priority]
250
- * @property {string[]} [tag_based_priority]
251
- * @property {string[]} [type_based_priority]
226
+ * @typedef GetZoneFromPincodeViewRequest
227
+ * @property {string} country
228
+ * @property {string} pincode
252
229
  */
253
230
 
254
231
  /**
255
- * @typedef CreateZoneData
256
- * @property {string} [assignment_preference]
257
- * @property {GetZoneDataViewChannels[]} channels
258
- * @property {number} company_id
259
- * @property {boolean} is_active
260
- * @property {ZoneMappingType[]} mapping
232
+ * @typedef Zone
233
+ * @property {string} zone_id
234
+ * @property {string} type
261
235
  * @property {string} name
262
- * @property {string} region_type
236
+ * @property {string[]} tags
263
237
  * @property {string} slug
238
+ * @property {boolean} is_active
264
239
  * @property {number[]} store_ids
240
+ * @property {string} assignment_preference
265
241
  */
266
242
 
267
243
  /**
268
- * @typedef CustomerRadiusSchema
269
- * @property {number} [gt]
270
- * @property {number} [gte]
271
- * @property {number} [lt]
272
- * @property {number} [lte]
273
- * @property {string} unit
244
+ * @typedef GetZoneFromPincodeViewResponse
245
+ * @property {string} serviceability_type
246
+ * @property {Zone[]} zones
274
247
  */
275
248
 
276
249
  /**
277
- * @typedef DocumentsResponse
278
- * @property {string} [legal_name]
250
+ * @typedef GetZoneFromApplicationIdViewResponse
251
+ * @property {ZoneDataItem[]} page
252
+ * @property {ListViewItems[]} items
253
+ */
254
+
255
+ /**
256
+ * @typedef ServiceabilityPageResponse
279
257
  * @property {string} [type]
280
- * @property {string} [value]
281
- * @property {boolean} [verified]
258
+ * @property {boolean} [has_next]
259
+ * @property {number} [item_total]
260
+ * @property {number} [size]
261
+ * @property {number} [current]
282
262
  */
283
263
 
284
264
  /**
285
- * @typedef Dp
286
- * @property {number} [area_code]
287
- * @property {boolean} [assign_dp_from_sb]
288
- * @property {string} [external_account_id]
289
- * @property {number} [fm_priority]
290
- * @property {string} [internal_account_id]
291
- * @property {number} [lm_priority]
292
- * @property {string[]} [operations]
293
- * @property {string} [payment_mode]
294
- * @property {number} [rvp_priority]
295
- * @property {string} [transport_mode]
265
+ * @typedef MobileNo
266
+ * @property {string} [number]
267
+ * @property {number} [country_code]
296
268
  */
297
269
 
298
270
  /**
299
- * @typedef EinvoiceResponse
300
- * @property {boolean} [enabled]
271
+ * @typedef ManagerResponse
272
+ * @property {string} [email]
273
+ * @property {MobileNo} [mobile_no]
274
+ * @property {string} [name]
301
275
  */
302
276
 
303
277
  /**
304
- * @typedef EntityRegionView_Error
305
- * @property {string} [message]
306
- * @property {string} [type]
307
- * @property {string} [value]
278
+ * @typedef ModifiedByResponse
279
+ * @property {string} [username]
280
+ * @property {string} [user_id]
308
281
  */
309
282
 
310
283
  /**
311
- * @typedef EntityRegionView_Items
312
- * @property {string} name
313
- * @property {string} sub_type
314
- * @property {string} uid
284
+ * @typedef IntegrationTypeResponse
285
+ * @property {string} [inventory]
286
+ * @property {string} [order]
315
287
  */
316
288
 
317
289
  /**
318
- * @typedef EntityRegionView_page
319
- * @property {number} current
320
- * @property {boolean} has_next
321
- * @property {number} item_total
322
- * @property {number} size
323
- * @property {string} type
324
- */
325
-
326
- /**
327
- * @typedef EntityRegionView_Request
328
- * @property {string[]} [parent_id]
329
- * @property {string[]} sub_type
290
+ * @typedef ProductReturnConfigResponse
291
+ * @property {boolean} [on_same_store]
330
292
  */
331
293
 
332
294
  /**
333
- * @typedef EntityRegionView_Response
334
- * @property {EntityRegionView_Items[]} data
335
- * @property {EntityRegionView_Error} error
336
- * @property {EntityRegionView_page} page
337
- * @property {boolean} success
295
+ * @typedef ContactNumberResponse
296
+ * @property {string} [number]
297
+ * @property {number} [country_code]
338
298
  */
339
299
 
340
300
  /**
341
- * @typedef Error
342
- * @property {string} [message]
343
- * @property {string} [type]
344
- * @property {string} [value]
301
+ * @typedef AddressResponse
302
+ * @property {string} [city]
303
+ * @property {string} [address1]
304
+ * @property {number} [pincode]
305
+ * @property {string} [address2]
306
+ * @property {string} [landmark]
307
+ * @property {string} [state]
308
+ * @property {string} [country]
309
+ * @property {number} [latitude]
310
+ * @property {number} [longitude]
345
311
  */
346
312
 
347
313
  /**
348
- * @typedef ErrorResponse
349
- * @property {string} message
350
- * @property {string} type
351
- * @property {string} value
314
+ * @typedef CreatedByResponse
315
+ * @property {string} [username]
316
+ * @property {string} [user_id]
352
317
  */
353
318
 
354
319
  /**
@@ -357,508 +322,413 @@ const Joi = require("joi");
357
322
  */
358
323
 
359
324
  /**
360
- * @typedef FailureResponse
361
- * @property {ErrorResponse[]} error
362
- * @property {boolean} success
325
+ * @typedef EinvoiceResponse
326
+ * @property {boolean} [enabled]
363
327
  */
364
328
 
365
329
  /**
366
- * @typedef getAppRegionZonesResponse
367
- * @property {ListViewItems[]} items
368
- * @property {PageSchema[]} page
330
+ * @typedef GstCredentialsResponse
331
+ * @property {EwayBillResponse} [e_waybill]
332
+ * @property {EinvoiceResponse} [e_invoice]
369
333
  */
370
334
 
371
335
  /**
372
- * @typedef GetSingleZoneDataViewResponse
373
- * @property {GetZoneDataViewItems} data
336
+ * @typedef WarningsResponse
337
+ * @property {string} [store_address]
374
338
  */
375
339
 
376
340
  /**
377
- * @typedef GetStoreRulesApiResponse
378
- * @property {StoreRuleDataSchema[]} [items]
379
- * @property {Page} [page]
341
+ * @typedef OpeningClosing
342
+ * @property {number} [minute]
343
+ * @property {number} [hour]
380
344
  */
381
345
 
382
346
  /**
383
- * @typedef GetStoresViewResponse
384
- * @property {ItemResponse[]} [items]
385
- * @property {ServiceabilityPageResponse} page
347
+ * @typedef TimmingResponse
348
+ * @property {boolean} [open]
349
+ * @property {string} [weekday]
350
+ * @property {OpeningClosing} [closing]
351
+ * @property {OpeningClosing} [opening]
386
352
  */
387
353
 
388
354
  /**
389
- * @typedef GetZoneByIdSchema
390
- * @property {string} [assignment_preference]
391
- * @property {GetZoneDataViewChannels[]} channels
392
- * @property {number} [company_id]
393
- * @property {boolean} is_active
394
- * @property {ZoneMappingType[]} mapping
395
- * @property {string} name
396
- * @property {ZoneProductTypes} product
397
- * @property {string} region_type
398
- * @property {string} slug
399
- * @property {number[]} store_ids
400
- * @property {number} stores_count
401
- * @property {string} zone_id
355
+ * @typedef DocumentsResponse
356
+ * @property {string} [legal_name]
357
+ * @property {string} [value]
358
+ * @property {string} [type]
359
+ * @property {boolean} [verified]
402
360
  */
403
361
 
404
362
  /**
405
- * @typedef GetZoneDataViewChannels
406
- * @property {string} channel_id
407
- * @property {string} channel_type
363
+ * @typedef Dp
364
+ * @property {number} [fm_priority]
365
+ * @property {number} [rvp_priority]
366
+ * @property {number} [lm_priority]
367
+ * @property {string} [internal_account_id]
368
+ * @property {number} [area_code]
369
+ * @property {string} [payment_mode]
370
+ * @property {string[]} [operations]
371
+ * @property {string} [external_account_id]
372
+ * @property {string} [transport_mode]
373
+ * @property {boolean} [assign_dp_from_sb]
408
374
  */
409
375
 
410
376
  /**
411
- * @typedef GetZoneDataViewItems
412
- * @property {string} [assignment_preference]
413
- * @property {GetZoneDataViewChannels[]} channels
414
- * @property {number} [company_id]
415
- * @property {boolean} is_active
416
- * @property {ZoneMappingType[]} mapping
417
- * @property {string} name
418
- * @property {ZoneProductTypes} product
419
- * @property {string} [region_type]
420
- * @property {string} slug
421
- * @property {number[]} store_ids
422
- * @property {number} stores_count
423
- * @property {string} zone_id
377
+ * @typedef LogisticsResponse
378
+ * @property {boolean} [override]
379
+ * @property {Dp} [dp]
424
380
  */
425
381
 
426
382
  /**
427
- * @typedef GetZoneFromApplicationIdViewResponse
428
- * @property {ListViewItems[]} items
429
- * @property {ZoneDataItem[]} page
383
+ * @typedef ItemResponse
384
+ * @property {string} [created_on]
385
+ * @property {ManagerResponse} [manager]
386
+ * @property {ModifiedByResponse} [modified_by]
387
+ * @property {IntegrationTypeResponse} [integration_type]
388
+ * @property {string} [verified_on]
389
+ * @property {ProductReturnConfigResponse} [product_return_config]
390
+ * @property {ContactNumberResponse[]} [contact_numbers]
391
+ * @property {ModifiedByResponse} [verified_by]
392
+ * @property {string} [stage]
393
+ * @property {AddressResponse} [address]
394
+ * @property {string} [modified_on]
395
+ * @property {CreatedByResponse} [created_by]
396
+ * @property {GstCredentialsResponse} [gst_credentials]
397
+ * @property {string} [display_name]
398
+ * @property {number} [company_id]
399
+ * @property {number} [uid]
400
+ * @property {Object} [_custom_json]
401
+ * @property {string} [code]
402
+ * @property {WarningsResponse} [warnings]
403
+ * @property {string} [name]
404
+ * @property {TimmingResponse[]} [timing]
405
+ * @property {DocumentsResponse[]} [documents]
406
+ * @property {string} [store_type]
407
+ * @property {string} [sub_type]
408
+ * @property {number} [company]
409
+ * @property {string} [_cls]
410
+ * @property {LogisticsResponse} [logistics]
411
+ * @property {string[]} [notification_emails]
430
412
  */
431
413
 
432
414
  /**
433
- * @typedef GetZoneFromPincodeViewRequest
434
- * @property {string} country
435
- * @property {string} pincode
415
+ * @typedef GetStoresViewResponse
416
+ * @property {ServiceabilityPageResponse} page
417
+ * @property {ItemResponse[]} [items]
436
418
  */
437
419
 
438
420
  /**
439
- * @typedef GetZoneFromPincodeViewResponse
440
- * @property {string} serviceability_type
441
- * @property {Zone[]} zones
421
+ * @typedef ReAssignStoreRequest
422
+ * @property {string} to_pincode
423
+ * @property {string} identifier
424
+ * @property {Object} configuration
425
+ * @property {string[]} ignored_locations
426
+ * @property {Object[]} articles
442
427
  */
443
428
 
444
429
  /**
445
- * @typedef GstCredentialsResponse
446
- * @property {EinvoiceResponse} [e_invoice]
447
- * @property {EwayBillResponse} [e_waybill]
430
+ * @typedef ReAssignStoreResponse
431
+ * @property {string} to_pincode
432
+ * @property {boolean} success
433
+ * @property {Object} error
434
+ * @property {Object[]} [articles]
448
435
  */
449
436
 
450
437
  /**
451
- * @typedef IntComparisonOperations
452
- * @property {number[]} [includes]
438
+ * @typedef ApplicationCompanyDpViewResponse
439
+ * @property {number} [courier_partner_id]
440
+ * @property {number} company_id
441
+ * @property {string} application_id
442
+ * @property {boolean} success
453
443
  */
454
444
 
455
445
  /**
456
- * @typedef IntegrationTypeResponse
457
- * @property {string} [inventory]
458
- * @property {string} [order]
446
+ * @typedef ApplicationCompanyDpViewRequest
447
+ * @property {string} [dp_id]
459
448
  */
460
449
 
461
450
  /**
462
- * @typedef ItemResponse
463
- * @property {string} [_cls]
464
- * @property {Object} [_custom_json]
465
- * @property {AddressResponse} [address]
466
- * @property {string} [code]
467
- * @property {number} [company]
468
- * @property {number} [company_id]
469
- * @property {ContactNumberResponse[]} [contact_numbers]
470
- * @property {CreatedByResponse} [created_by]
471
- * @property {string} [created_on]
472
- * @property {string} [display_name]
473
- * @property {DocumentsResponse[]} [documents]
474
- * @property {GstCredentialsResponse} [gst_credentials]
475
- * @property {IntegrationTypeResponse} [integration_type]
476
- * @property {LogisticsResponse} [logistics]
477
- * @property {ManagerResponse} [manager]
478
- * @property {ModifiedByResponse} [modified_by]
479
- * @property {string} [modified_on]
480
- * @property {string} [name]
481
- * @property {string[]} [notification_emails]
482
- * @property {ProductReturnConfigResponse} [product_return_config]
483
- * @property {string} [stage]
484
- * @property {string} [store_type]
485
- * @property {string} [sub_type]
486
- * @property {TimmingResponse[]} [timing]
487
- * @property {number} [uid]
488
- * @property {ModifiedByResponse} [verified_by]
489
- * @property {string} [verified_on]
490
- * @property {WarningsResponse} [warnings]
451
+ * @typedef PincodeMopData
452
+ * @property {number[]} pincodes
453
+ * @property {string} country
454
+ * @property {string} action
491
455
  */
492
456
 
493
457
  /**
494
- * @typedef ListViewChannels
458
+ * @typedef PincodeMopUpdateResponse
459
+ * @property {number} pincode
495
460
  * @property {string} channel_id
496
- * @property {string} channel_type
461
+ * @property {string} country
462
+ * @property {boolean} is_active
497
463
  */
498
464
 
499
465
  /**
500
- * @typedef ListViewItems
501
- * @property {ListViewChannels[]} channels
502
- * @property {number} company_id
503
- * @property {boolean} is_active
504
- * @property {string} name
505
- * @property {ListViewProduct} product
506
- * @property {number} regions_count
507
- * @property {string} slug
508
- * @property {number} stores_count
509
- * @property {string} zone_id
466
+ * @typedef PincodeMOPresponse
467
+ * @property {boolean} success
468
+ * @property {number} status_code
469
+ * @property {string} batch_id
470
+ * @property {string} country
471
+ * @property {string} action
472
+ * @property {number[]} [pincodes]
473
+ * @property {PincodeMopUpdateResponse[]} [updated_pincodes]
510
474
  */
511
475
 
512
476
  /**
513
- * @typedef ListViewProduct
514
- * @property {number} count
515
- * @property {string} type
477
+ * @typedef CommonError
478
+ * @property {string} [status_code]
479
+ * @property {Object} [error]
480
+ * @property {string} [success]
516
481
  */
517
482
 
518
483
  /**
519
- * @typedef ListViewResponse
520
- * @property {ListViewItems[]} items
521
- * @property {ZoneDataItem[]} page
484
+ * @typedef PincodeMopBulkData
485
+ * @property {string} batch_id
486
+ * @property {string} s3_url
522
487
  */
523
488
 
524
489
  /**
525
- * @typedef ListViewSummary
526
- * @property {number} total_active_zones
527
- * @property {number} total_pincodes_served
528
- * @property {number} total_zones
490
+ * @typedef PincodeBulkViewResponse
491
+ * @property {string} batch_id
492
+ * @property {string} s3_url
529
493
  */
530
494
 
531
495
  /**
532
- * @typedef LocationRule
533
- * @property {LocationRuleValues[]} [includes]
534
- * @property {string} [type]
496
+ * @typedef PincodeCodStatusListingRequest
497
+ * @property {string} [country]
498
+ * @property {boolean} [is_active]
499
+ * @property {number} [pincode]
500
+ * @property {number} [current]
501
+ * @property {number} [page_size]
535
502
  */
536
503
 
537
504
  /**
538
- * @typedef LocationRuleValues
539
- * @property {string} [display_name]
540
- * @property {string} id
541
- * @property {string} [name]
542
- * @property {string} [parent_id]
543
- * @property {string[]} [parent_ids]
544
- * @property {string} [sub_type]
505
+ * @typedef PincodeCodStatusListingResponse
506
+ * @property {string} country
507
+ * @property {PincodeCodStatusListingResponse[]} data
508
+ * @property {boolean} success
509
+ * @property {Error[]} [errors]
510
+ * @property {PincodeCodStatusListingPage} page
511
+ * @property {PincodeCodStatusListingSummary} summary
545
512
  */
546
513
 
547
514
  /**
548
- * @typedef LogisticsResponse
549
- * @property {Dp} [dp]
550
- * @property {boolean} [override]
515
+ * @typedef Error
516
+ * @property {string} [type]
517
+ * @property {string} [value]
518
+ * @property {string} [message]
551
519
  */
552
520
 
553
521
  /**
554
- * @typedef ManagerResponse
555
- * @property {string} [email]
556
- * @property {MobileNo} [mobile_no]
557
- * @property {string} [name]
522
+ * @typedef PincodeCodStatusListingPage
523
+ * @property {string} type
524
+ * @property {boolean} has_next
525
+ * @property {number} item_total
526
+ * @property {number} size
527
+ * @property {number} current
558
528
  */
559
529
 
560
530
  /**
561
- * @typedef MobileNo
562
- * @property {number} [country_code]
563
- * @property {string} [number]
531
+ * @typedef PincodeCodStatusListingSummary
532
+ * @property {number} total_active_pincodes
533
+ * @property {number} total_inactive_pincodes
564
534
  */
565
535
 
566
536
  /**
567
- * @typedef ModifiedByResponse
568
- * @property {string} [user_id]
569
- * @property {string} [username]
537
+ * @typedef PincodeMopUpdateAuditHistoryRequest
538
+ * @property {string} entity_type
539
+ * @property {string} [file_name]
570
540
  */
571
541
 
572
542
  /**
573
- * @typedef OpeningClosing
574
- * @property {number} [hour]
575
- * @property {number} [minute]
543
+ * @typedef PincodeMopUpdateAuditHistoryPaging
544
+ * @property {string} [type]
545
+ * @property {number} [size]
546
+ * @property {number} [current]
547
+ * @property {boolean} [has_next]
548
+ * @property {number} [item_total]
576
549
  */
577
550
 
578
551
  /**
579
- * @typedef PackageMaterial
580
- * @property {boolean} [auto_calculate]
581
- * @property {Channel[]} channels
582
- * @property {number} error_rate
583
- * @property {number} height
584
- * @property {number} length
585
- * @property {number} [max_weight]
586
- * @property {string[]} [media]
587
- * @property {string} name
588
- * @property {string} package_type
589
- * @property {number} [package_vol_weight]
590
- * @property {PackageMaterialRule[]} [rules]
591
- * @property {string} size
592
- * @property {string} status
593
- * @property {number[]} store_ids
594
- * @property {boolean} [track_inventory]
595
- * @property {number} weight
596
- * @property {number} width
552
+ * @typedef PincodeMopUpdateAuditHistoryResponse
553
+ * @property {string} [batch_id]
554
+ * @property {string} [entity_type]
555
+ * @property {string} [error_file_s3_url]
556
+ * @property {string} [s3_url]
557
+ * @property {string} [file_name]
558
+ * @property {string} [updated_at]
559
+ * @property {string} [updated_by]
560
+ * @property {boolean} [success]
597
561
  */
598
562
 
599
563
  /**
600
- * @typedef PackageMaterialList
601
- * @property {PackageMaterialResponse} [items]
602
- * @property {Page} [page]
564
+ * @typedef PincodeMopUpdateAuditHistoryResponseData
565
+ * @property {string} [entity_type]
566
+ * @property {PincodeMopUpdateAuditHistoryPaging} page
567
+ * @property {PincodeMopUpdateAuditHistoryResponse[]} data
603
568
  */
604
569
 
605
570
  /**
606
- * @typedef PackageMaterialResponse
607
- * @property {boolean} [auto_calculate]
608
- * @property {Channel[]} channels
609
- * @property {number} error_rate
610
- * @property {number} height
611
- * @property {string} [id]
612
- * @property {number} [item_id]
613
- * @property {number} length
614
- * @property {number} [max_weight]
615
- * @property {string[]} [media]
571
+ * @typedef Dp1
572
+ * @property {boolean} is_self_ship
616
573
  * @property {string} name
617
- * @property {string} package_type
618
- * @property {number} [package_vol_weight]
619
- * @property {PackageMaterialRule[]} [rules]
620
- * @property {string} size
621
- * @property {string} status
622
- * @property {number[]} store_ids
623
- * @property {boolean} [track_inventory]
624
- * @property {number} weight
625
- * @property {number} width
626
- */
627
-
628
- /**
629
- * @typedef PackageMaterialRule
630
- * @property {PackageMaterialRuleQuantity} [quantity]
631
- * @property {string} [rule_id]
632
- * @property {number} [weight]
574
+ * @property {string} plan_id
575
+ * @property {string} stage
576
+ * @property {string} account_id
577
+ * @property {string} dp_id
578
+ * @property {Object} plan_rules
633
579
  */
634
580
 
635
581
  /**
636
- * @typedef PackageMaterialRuleList
637
- * @property {PackageRuleResponse} [items]
638
- * @property {Page} [page]
582
+ * @typedef CompanyDpAccountRequest
583
+ * @property {Dp1[]} data
639
584
  */
640
585
 
641
586
  /**
642
- * @typedef PackageMaterialRuleQuantity
643
- * @property {number} [max]
644
- * @property {number} [min]
587
+ * @typedef CompanyDpAccountResponse
588
+ * @property {boolean} success
645
589
  */
646
590
 
647
591
  /**
648
- * @typedef PackageRule
649
- * @property {PackageRuleCategory} [category_id]
650
- * @property {number} company_id
651
- * @property {boolean} [is_active]
652
- * @property {string} name
653
- * @property {PackageRuleProduct} [product_id]
654
- * @property {PackageRuleProductTag} [product_tag]
592
+ * @typedef ErrorResponse
593
+ * @property {string} message
594
+ * @property {string} value
655
595
  * @property {string} type
656
596
  */
657
597
 
658
598
  /**
659
- * @typedef PackageRuleCategory
660
- * @property {number[]} [includes]
661
- */
662
-
663
- /**
664
- * @typedef PackageRuleProduct
665
- * @property {number[]} [includes]
666
- */
667
-
668
- /**
669
- * @typedef PackageRuleProductTag
670
- * @property {string[]} [includes]
671
- */
672
-
673
- /**
674
- * @typedef PackageRuleResponse
675
- * @property {PackageRuleCategory} [category_id]
676
- * @property {number} company_id
677
- * @property {string} [id]
678
- * @property {boolean} [is_active]
679
- * @property {string} name
680
- * @property {PackageRuleProduct} [product_id]
681
- * @property {PackageRuleProductTag} [product_tag]
682
- * @property {string} type
599
+ * @typedef DpAccountFailureResponse
600
+ * @property {number} status_code
601
+ * @property {ErrorResponse[]} error
602
+ * @property {boolean} success
683
603
  */
684
604
 
685
605
  /**
686
606
  * @typedef Page
687
- * @property {number} [current]
688
- * @property {boolean} [has_next]
689
- * @property {boolean} [has_previous]
690
607
  * @property {number} [item_total]
691
608
  * @property {string} [next_id]
692
- * @property {number} [size]
693
- * @property {string} type
694
- */
695
-
696
- /**
697
- * @typedef PageSchema
698
- * @property {number} current
699
- * @property {boolean} has_next
700
- * @property {number} item_total
701
- * @property {number} size
609
+ * @property {boolean} [has_previous]
610
+ * @property {boolean} [has_next]
611
+ * @property {number} [current]
702
612
  * @property {string} type
613
+ * @property {number} [size]
703
614
  */
704
615
 
705
616
  /**
706
- * @typedef PincodeBulkViewResponse
707
- * @property {string} batch_id
708
- * @property {string} s3_url
617
+ * @typedef CompanyDpAccountListResponse
618
+ * @property {boolean} success
619
+ * @property {Page} page
620
+ * @property {Dp1[]} items
709
621
  */
710
622
 
711
623
  /**
712
- * @typedef PincodeCodStatusListingPage
713
- * @property {number} current
714
- * @property {boolean} has_next
715
- * @property {number} item_total
716
- * @property {number} size
717
- * @property {string} type
624
+ * @typedef DpRulesUpdateRequest
625
+ * @property {boolean} is_active
626
+ * @property {Object[]} conditions
627
+ * @property {Object} dp_ids
628
+ * @property {string} name
718
629
  */
719
630
 
720
631
  /**
721
- * @typedef PincodeCodStatusListingRequest
722
- * @property {string} [country]
723
- * @property {number} [current]
632
+ * @typedef DpRuleResponse
633
+ * @property {string} [created_on]
634
+ * @property {string} name
635
+ * @property {Object} [modified_by]
636
+ * @property {Object} dp_ids
724
637
  * @property {boolean} [is_active]
725
- * @property {number} [page_size]
726
- * @property {number} [pincode]
638
+ * @property {string} [modified_on]
639
+ * @property {string} uid
640
+ * @property {Object} [created_by]
641
+ * @property {number} company_id
642
+ * @property {string[]} conditions
727
643
  */
728
644
 
729
645
  /**
730
- * @typedef PincodeCodStatusListingResponse
731
- * @property {string} country
732
- * @property {PincodeCodStatusListingResponse[]} data
733
- * @property {Error[]} [errors]
734
- * @property {PincodeCodStatusListingPage} page
646
+ * @typedef DpRuleUpdateSuccessResponse
647
+ * @property {number} status_code
648
+ * @property {DpRuleResponse} data
735
649
  * @property {boolean} success
736
- * @property {PincodeCodStatusListingSummary} summary
737
- */
738
-
739
- /**
740
- * @typedef PincodeCodStatusListingSummary
741
- * @property {number} total_active_pincodes
742
- * @property {number} total_inactive_pincodes
743
- */
744
-
745
- /**
746
- * @typedef PincodeMopBulkData
747
- * @property {string} batch_id
748
- * @property {string} s3_url
749
- */
750
-
751
- /**
752
- * @typedef PincodeMopData
753
- * @property {string} action
754
- * @property {string} country
755
- * @property {number[]} pincodes
756
650
  */
757
651
 
758
652
  /**
759
- * @typedef PincodeMOPresponse
760
- * @property {string} action
761
- * @property {string} batch_id
762
- * @property {string} country
763
- * @property {number[]} [pincodes]
653
+ * @typedef FailureResponse
764
654
  * @property {number} status_code
655
+ * @property {ErrorResponse[]} error
765
656
  * @property {boolean} success
766
- * @property {PincodeMopUpdateResponse[]} [updated_pincodes]
767
- */
768
-
769
- /**
770
- * @typedef PincodeMopUpdateAuditHistoryPaging
771
- * @property {number} [current]
772
- * @property {boolean} [has_next]
773
- * @property {number} [item_total]
774
- * @property {number} [size]
775
- * @property {string} [type]
776
- */
777
-
778
- /**
779
- * @typedef PincodeMopUpdateAuditHistoryRequest
780
- * @property {string} entity_type
781
- * @property {string} [file_name]
782
657
  */
783
658
 
784
659
  /**
785
- * @typedef PincodeMopUpdateAuditHistoryResponse
786
- * @property {string} [batch_id]
787
- * @property {string} [entity_type]
788
- * @property {string} [error_file_s3_url]
789
- * @property {string} [file_name]
790
- * @property {string} [s3_url]
791
- * @property {boolean} [success]
792
- * @property {string} [updated_at]
793
- * @property {string} [updated_by]
660
+ * @typedef DpSchemaInRuleListing
661
+ * @property {boolean} is_self_ship
662
+ * @property {string} name
663
+ * @property {string} plan_id
664
+ * @property {string} stage
665
+ * @property {string} account_id
666
+ * @property {number} priority
667
+ * @property {string} dp_id
668
+ * @property {Object} plan_rules
794
669
  */
795
670
 
796
671
  /**
797
- * @typedef PincodeMopUpdateAuditHistoryResponseData
798
- * @property {PincodeMopUpdateAuditHistoryResponse[]} data
799
- * @property {string} [entity_type]
800
- * @property {PincodeMopUpdateAuditHistoryPaging} page
672
+ * @typedef DpRule
673
+ * @property {string} name
674
+ * @property {Object} dp_ids
675
+ * @property {boolean} [is_active]
676
+ * @property {number} [company_id]
677
+ * @property {Object[]} conditions
801
678
  */
802
679
 
803
680
  /**
804
- * @typedef PincodeMopUpdateResponse
805
- * @property {string} channel_id
806
- * @property {string} country
807
- * @property {boolean} is_active
808
- * @property {number} pincode
681
+ * @typedef DpRuleSuccessResponse
682
+ * @property {number} status_code
683
+ * @property {DpRule} data
684
+ * @property {boolean} success
809
685
  */
810
686
 
811
687
  /**
812
- * @typedef ProductReturnConfigResponse
813
- * @property {boolean} [on_same_store]
688
+ * @typedef DpIds
689
+ * @property {boolean} enabled
690
+ * @property {number} priority
691
+ * @property {Object} [meta]
814
692
  */
815
693
 
816
694
  /**
817
- * @typedef ReAssignStoreRequest
818
- * @property {Object[]} articles
819
- * @property {Object} configuration
820
- * @property {string} identifier
821
- * @property {string[]} ignored_locations
822
- * @property {string} to_pincode
695
+ * @typedef DpRuleRequest
696
+ * @property {string} name
697
+ * @property {Object} dp_ids
698
+ * @property {boolean} [is_active]
699
+ * @property {number} [company_id]
700
+ * @property {Object[]} conditions
823
701
  */
824
702
 
825
703
  /**
826
- * @typedef ReAssignStoreResponse
827
- * @property {Object[]} [articles]
828
- * @property {Object} error
704
+ * @typedef DpMultipleRuleSuccessResponse
829
705
  * @property {boolean} success
830
- * @property {string} to_pincode
706
+ * @property {Page} page
707
+ * @property {DpRule[]} items
831
708
  */
832
709
 
833
710
  /**
834
- * @typedef RulePriorityRequest
835
- * @property {number} priority
836
- * @property {string} rule_id
711
+ * @typedef DPCompanyRuleRequest
712
+ * @property {string[]} rule_ids
837
713
  */
838
714
 
839
715
  /**
840
- * @typedef RulePriorityResponse
841
- * @property {boolean} [success]
716
+ * @typedef DPCompanyRuleResponse
717
+ * @property {number} status_code
718
+ * @property {DpRuleResponse[]} data
719
+ * @property {boolean} success
842
720
  */
843
721
 
844
722
  /**
845
- * @typedef SchemeRules
846
- * @property {SchemeRulesFeatures} [feature]
847
- * @property {string[]} [payment_mode]
848
- * @property {string} [region]
849
- * @property {string[]} [transport_type]
850
- * @property {ArithmeticOperations} [weight]
723
+ * @typedef DPApplicationRuleRequest
724
+ * @property {string[]} shipping_rules
851
725
  */
852
726
 
853
727
  /**
854
- * @typedef SchemeRulesFeatures
855
- * @property {boolean} [battery_operated]
856
- * @property {boolean} [e_waybill]
857
- * @property {boolean} [flammable]
858
- * @property {boolean} [hazmat]
859
- * @property {boolean} [multi_part_shipments]
860
- * @property {boolean} [quality_check]
861
- * @property {boolean} [quick_response_code]
728
+ * @typedef DPApplicationRuleResponse
729
+ * @property {boolean} status_code
730
+ * @property {DpRuleResponse[]} data
731
+ * @property {boolean} success
862
732
  */
863
733
 
864
734
  /**
@@ -868,239 +738,31 @@ const Joi = require("joi");
868
738
  */
869
739
 
870
740
  /**
871
- * @typedef ServiceabilityErrorResponse
872
- * @property {string} message
873
- * @property {string} type
874
- * @property {string} value
741
+ * @typedef ApplicationSelfShipConfig
742
+ * @property {Object} [self_ship]
875
743
  */
876
744
 
877
745
  /**
878
- * @typedef ServiceabilityModel
879
- * @property {boolean} is_first_mile
880
- * @property {boolean} is_installation
881
- * @property {boolean} is_last_mile
882
- * @property {boolean} is_qc
883
- * @property {boolean} is_return
884
- * @property {number} lm_cod_limit
885
- * @property {string} pickup_cutoff
886
- * @property {string} route_code
746
+ * @typedef ApplicationSelfShipConfigResponse
747
+ * @property {ServiceabilityErrorResponse} [error]
748
+ * @property {ApplicationSelfShipConfig} [data]
749
+ * @property {boolean} success
887
750
  */
888
751
 
889
- /**
890
- * @typedef ServiceabilityPageResponse
891
- * @property {number} [current]
892
- * @property {boolean} [has_next]
893
- * @property {number} [item_total]
894
- * @property {number} [size]
895
- * @property {string} [type]
896
- */
752
+ class ServiceabilityPlatformModel {
753
+ /** @returns {ServiceabilityPayloadSchema} */
754
+ static ServiceabilityPayloadSchema() {
755
+ return Joi.object({
756
+ serviceability_type: Joi.string().allow("").required(),
757
+ });
758
+ }
897
759
 
898
- /**
899
- * @typedef StorePrioritySchema
900
- * @property {string} [id]
901
- * @property {string} [name]
902
- */
903
-
904
- /**
905
- * @typedef StoreRuleConditionSchema
906
- * @property {IntComparisonOperations} [brand_ids]
907
- * @property {IntComparisonOperations} [category_ids]
908
- * @property {CustomerRadiusSchema} [customer_radius]
909
- * @property {IntComparisonOperations} [department_ids]
910
- * @property {ArithmeticOperations} [order_place_date]
911
- * @property {IntComparisonOperations} [product_ids]
912
- * @property {StringComparisonOperations} [product_tags]
913
- * @property {StringComparisonOperations} [store_tags]
914
- * @property {StringComparisonOperations} [store_type]
915
- * @property {LocationRule} [to_location]
916
- * @property {StringComparisonOperations} [zone_ids]
917
- */
918
-
919
- /**
920
- * @typedef StoreRuleConfigData
921
- * @property {string[]} [rule_ids]
922
- * @property {string[]} [sort]
923
- * @property {StorePrioritySchema[]} [store_priority]
924
- * @property {string[]} [tag_based_priority]
925
- * @property {string[]} [type_based_priority]
926
- */
927
-
928
- /**
929
- * @typedef StoreRuleDataSchema
930
- * @property {string} [application_id]
931
- * @property {number} [company_id]
932
- * @property {StoreRuleConditionSchema} [conditions]
933
- * @property {string} [id]
934
- * @property {boolean} [is_active]
935
- * @property {string} [name]
936
- * @property {string[]} [sort]
937
- * @property {StorePrioritySchema[]} [store_priority]
938
- * @property {string[]} [tag_based_priority]
939
- * @property {string[]} [type_based_priority]
940
- */
941
-
942
- /**
943
- * @typedef StoreRuleResponseSchema
944
- * @property {StoreRuleConditionSchema} [conditions]
945
- * @property {string} [id]
946
- * @property {boolean} [is_active]
947
- * @property {string} [name]
948
- * @property {string[]} [sort]
949
- * @property {StorePrioritySchema[]} [store_priority]
950
- * @property {string[]} [tag_based_priority]
951
- * @property {string} [type]
952
- * @property {string[]} [type_based_priority]
953
- */
954
-
955
- /**
956
- * @typedef StoreRuleUpdateResponseSchema
957
- * @property {string} [application_id]
958
- * @property {number} [company_id]
959
- * @property {StoreRuleConditionSchema} [conditions]
960
- * @property {string} [id]
961
- * @property {boolean} [is_active]
962
- * @property {string} [name]
963
- * @property {string[]} [sort]
964
- * @property {StorePrioritySchema[]} [store_priority]
965
- * @property {string[]} [tag_based_priority]
966
- * @property {string} [type]
967
- * @property {string[]} [type_based_priority]
968
- */
969
-
970
- /**
971
- * @typedef StringComparisonOperations
972
- * @property {string[]} [includes]
973
- */
974
-
975
- /**
976
- * @typedef TimmingResponse
977
- * @property {OpeningClosing} [closing]
978
- * @property {boolean} [open]
979
- * @property {OpeningClosing} [opening]
980
- * @property {string} [weekday]
981
- */
982
-
983
- /**
984
- * @typedef UpdateZoneConfigRequest
985
- * @property {string} [serviceability_type]
986
- */
987
-
988
- /**
989
- * @typedef UpdateZoneData
990
- * @property {string} [assignment_preference]
991
- * @property {GetZoneDataViewChannels[]} channels
992
- * @property {number} company_id
993
- * @property {boolean} is_active
994
- * @property {ZoneMappingType[]} mapping
995
- * @property {string} name
996
- * @property {ZoneProductTypes} product
997
- * @property {string} region_type
998
- * @property {string} slug
999
- * @property {number[]} store_ids
1000
- * @property {string} zone_id
1001
- */
1002
-
1003
- /**
1004
- * @typedef WarningsResponse
1005
- * @property {string} [store_address]
1006
- */
1007
-
1008
- /**
1009
- * @typedef Zone
1010
- * @property {string} assignment_preference
1011
- * @property {boolean} is_active
1012
- * @property {string} name
1013
- * @property {string} slug
1014
- * @property {number[]} store_ids
1015
- * @property {string[]} tags
1016
- * @property {string} type
1017
- * @property {string} zone_id
1018
- */
1019
-
1020
- /**
1021
- * @typedef ZoneConfig
1022
- * @property {string} [serviceability_type]
1023
- */
1024
-
1025
- /**
1026
- * @typedef ZoneDataItem
1027
- * @property {number} current
1028
- * @property {boolean} has_next
1029
- * @property {number} item_total
1030
- * @property {number} size
1031
- * @property {string} type
1032
- */
1033
-
1034
- /**
1035
- * @typedef ZoneMappingType
1036
- * @property {string} country
1037
- * @property {string[]} [pincode]
1038
- * @property {string[]} [state]
1039
- */
1040
-
1041
- /**
1042
- * @typedef ZoneProductTypes
1043
- * @property {string[]} tags
1044
- * @property {string} type
1045
- */
1046
-
1047
- /**
1048
- * @typedef ZoneResponse
1049
- * @property {number} status_code
1050
- * @property {boolean} success
1051
- * @property {string} zone_id
1052
- */
1053
-
1054
- /**
1055
- * @typedef ZoneSuccessResponse
1056
- * @property {number} status_code
1057
- * @property {boolean} success
1058
- */
1059
-
1060
- /**
1061
- * @typedef ZoneUpdateRequest
1062
- * @property {UpdateZoneData} data
1063
- * @property {string} identifier
1064
- */
1065
-
1066
- class ServiceabilityPlatformModel {
1067
- /** @returns {AddressResponse} */
1068
- static AddressResponse() {
1069
- return Joi.object({
1070
- address1: Joi.string().allow(""),
1071
- address2: Joi.string().allow(""),
1072
- city: Joi.string().allow(""),
1073
- country: Joi.string().allow(""),
1074
- landmark: Joi.string().allow(""),
1075
- latitude: Joi.number(),
1076
- longitude: Joi.number(),
1077
- pincode: Joi.number(),
1078
- state: Joi.string().allow(""),
1079
- });
1080
- }
1081
-
1082
- /** @returns {ApplicationConfig} */
1083
- static ApplicationConfig() {
1084
- return Joi.object({
1085
- rule_ids: Joi.array().items(Joi.string().allow("")),
1086
- sort: Joi.array().items(Joi.string().allow("")),
1087
- zones: ServiceabilityPlatformModel.ZoneConfig(),
1088
- });
1089
- }
1090
-
1091
- /** @returns {ApplicationSelfShipConfig} */
1092
- static ApplicationSelfShipConfig() {
1093
- return Joi.object({
1094
- self_ship: Joi.any().allow(null),
1095
- });
1096
- }
1097
-
1098
- /** @returns {ApplicationSelfShipConfigResponse} */
1099
- static ApplicationSelfShipConfigResponse() {
760
+ /** @returns {ServiceabilityErrorResponse} */
761
+ static ServiceabilityErrorResponse() {
1100
762
  return Joi.object({
1101
- data: ServiceabilityPlatformModel.ApplicationSelfShipConfig(),
1102
- error: ServiceabilityPlatformModel.ServiceabilityErrorResponse(),
1103
- success: Joi.boolean().required(),
763
+ message: Joi.string().allow("").required(),
764
+ value: Joi.string().allow("").required(),
765
+ type: Joi.string().allow("").required(),
1104
766
  });
1105
767
  }
1106
768
 
@@ -1108,528 +770,281 @@ class ServiceabilityPlatformModel {
1108
770
  static ApplicationServiceabilityConfig() {
1109
771
  return Joi.object({
1110
772
  channel_id: Joi.string().allow("").required(),
1111
- channel_type: Joi.string().allow("").required(),
1112
773
  serviceability_type: Joi.string().allow("").required(),
774
+ channel_type: Joi.string().allow("").required(),
1113
775
  });
1114
776
  }
1115
777
 
1116
778
  /** @returns {ApplicationServiceabilityConfigResponse} */
1117
779
  static ApplicationServiceabilityConfigResponse() {
1118
780
  return Joi.object({
1119
- data: ServiceabilityPlatformModel.ApplicationServiceabilityConfig(),
1120
781
  error: ServiceabilityPlatformModel.ServiceabilityErrorResponse(),
782
+ data: ServiceabilityPlatformModel.ApplicationServiceabilityConfig(),
1121
783
  success: Joi.boolean().required(),
1122
784
  });
1123
785
  }
1124
786
 
1125
- /** @returns {ArithmeticOperations} */
1126
- static ArithmeticOperations() {
1127
- return Joi.object({
1128
- gt: Joi.number(),
1129
- gte: Joi.number(),
1130
- lt: Joi.number(),
1131
- lte: Joi.number(),
1132
- });
1133
- }
1134
-
1135
- /** @returns {BulkRegionJobSerializer} */
1136
- static BulkRegionJobSerializer() {
1137
- return Joi.object({
1138
- action: Joi.string().allow("").required(),
1139
- country: Joi.string().allow("").required(),
1140
- file_path: Joi.string().allow(""),
1141
- region: Joi.string().allow("").required(),
1142
- });
1143
- }
1144
-
1145
- /** @returns {BulkRegionResponse} */
1146
- static BulkRegionResponse() {
1147
- return Joi.object({
1148
- items: Joi.array()
1149
- .items(ServiceabilityPlatformModel.BulkRegionResponseItemData())
1150
- .required(),
1151
- page: ServiceabilityPlatformModel.Page().required(),
1152
- });
1153
- }
1154
-
1155
- /** @returns {BulkRegionResponseItemData} */
1156
- static BulkRegionResponseItemData() {
787
+ /** @returns {EntityRegionView_Request} */
788
+ static EntityRegionView_Request() {
1157
789
  return Joi.object({
1158
- action: Joi.string().allow("").required(),
1159
- batch_id: Joi.string().allow("").required(),
1160
- country: Joi.string().allow("").required(),
1161
- error_file_path: Joi.string().allow(""),
1162
- failed: Joi.number(),
1163
- failed_records: Joi.array().items(Joi.any()),
1164
- file_path: Joi.string().allow("").required(),
1165
- region: Joi.string().allow("").required(),
1166
- status: Joi.string().allow("").required(),
1167
- success: Joi.number(),
1168
- total: Joi.number(),
790
+ sub_type: Joi.array().items(Joi.string().allow("")).required(),
791
+ parent_id: Joi.array().items(Joi.string().allow("")),
1169
792
  });
1170
793
  }
1171
794
 
1172
- /** @returns {Channel} */
1173
- static Channel() {
795
+ /** @returns {EntityRegionView_Error} */
796
+ static EntityRegionView_Error() {
1174
797
  return Joi.object({
1175
- id: Joi.string().allow(""),
798
+ message: Joi.string().allow(""),
799
+ value: Joi.string().allow(""),
1176
800
  type: Joi.string().allow(""),
1177
801
  });
1178
802
  }
1179
803
 
1180
- /** @returns {CommonError} */
1181
- static CommonError() {
1182
- return Joi.object({
1183
- error: Joi.any(),
1184
- status_code: Joi.string().allow(""),
1185
- success: Joi.string().allow(""),
1186
- });
1187
- }
1188
-
1189
- /** @returns {CompanyConfig} */
1190
- static CompanyConfig() {
1191
- return Joi.object({
1192
- logistics_as_actual: Joi.boolean(),
1193
- rule_ids: Joi.array().items(Joi.string().allow("")).required(),
1194
- sort: Joi.array().items(Joi.string().allow("")).required(),
1195
- });
1196
- }
1197
-
1198
- /** @returns {CompanyCourierPartnerAccountListResponse} */
1199
- static CompanyCourierPartnerAccountListResponse() {
1200
- return Joi.object({
1201
- items: Joi.array()
1202
- .items(ServiceabilityPlatformModel.CourierAccountResponse())
1203
- .required(),
1204
- page: ServiceabilityPlatformModel.Page().required(),
1205
- });
1206
- }
1207
-
1208
- /** @returns {CompanyStoreView_PageItems} */
1209
- static CompanyStoreView_PageItems() {
804
+ /** @returns {EntityRegionView_page} */
805
+ static EntityRegionView_page() {
1210
806
  return Joi.object({
1211
- current: Joi.number().required(),
807
+ type: Joi.string().allow("").required(),
1212
808
  has_next: Joi.boolean().required(),
1213
809
  item_total: Joi.number().required(),
1214
810
  size: Joi.number().required(),
1215
- type: Joi.string().allow("").required(),
1216
- });
1217
- }
1218
-
1219
- /** @returns {CompanyStoreView_Response} */
1220
- static CompanyStoreView_Response() {
1221
- return Joi.object({
1222
- items: Joi.array().items(Joi.any()),
1223
- page: Joi.array()
1224
- .items(ServiceabilityPlatformModel.CompanyStoreView_PageItems())
1225
- .required(),
1226
- });
1227
- }
1228
-
1229
- /** @returns {ContactNumberResponse} */
1230
- static ContactNumberResponse() {
1231
- return Joi.object({
1232
- country_code: Joi.number(),
1233
- number: Joi.string().allow(""),
1234
- });
1235
- }
1236
-
1237
- /** @returns {CourierAccount} */
1238
- static CourierAccount() {
1239
- return Joi.object({
1240
- account_id: Joi.string().allow("").required(),
1241
- extension_id: Joi.string().allow("").required(),
1242
- is_own_account: Joi.boolean().required(),
1243
- is_self_ship: Joi.boolean().required(),
1244
- scheme_id: Joi.string().allow("").required(),
1245
- stage: Joi.string().allow("").required(),
1246
- });
1247
- }
1248
-
1249
- /** @returns {CourierAccountResponse} */
1250
- static CourierAccountResponse() {
1251
- return Joi.object({
1252
- account_id: Joi.string().allow("").required(),
1253
- is_own_account: Joi.boolean().required(),
1254
- is_self_ship: Joi.boolean().required(),
1255
- scheme_id: Joi.string().allow("").required(),
1256
- scheme_rules: ServiceabilityPlatformModel.CourierPartnerSchemeModel().required(),
1257
- stage: Joi.string().allow("").required(),
1258
- });
1259
- }
1260
-
1261
- /** @returns {CourierPartnerAccountFailureResponse} */
1262
- static CourierPartnerAccountFailureResponse() {
1263
- return Joi.object({
1264
- error: Joi.array()
1265
- .items(ServiceabilityPlatformModel.ErrorResponse())
1266
- .required(),
1267
- success: Joi.boolean().required(),
811
+ current: Joi.number().required(),
1268
812
  });
1269
813
  }
1270
814
 
1271
- /** @returns {CourierPartnerList} */
1272
- static CourierPartnerList() {
815
+ /** @returns {EntityRegionView_Items} */
816
+ static EntityRegionView_Items() {
1273
817
  return Joi.object({
1274
- account_id: Joi.string().allow("").required(),
1275
- extension_id: Joi.string().allow("").required(),
1276
- is_self_ship: Joi.boolean().required(),
818
+ sub_type: Joi.string().allow("").required(),
819
+ uid: Joi.string().allow("").required(),
1277
820
  name: Joi.string().allow("").required(),
821
+ display_name: Joi.string().allow(""),
1278
822
  });
1279
823
  }
1280
824
 
1281
- /** @returns {CourierPartnerRule} */
1282
- static CourierPartnerRule() {
825
+ /** @returns {EntityRegionView_Response} */
826
+ static EntityRegionView_Response() {
1283
827
  return Joi.object({
1284
- conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions().required(),
1285
- cp_list: Joi.array().items(
1286
- ServiceabilityPlatformModel.CourierPartnerList()
828
+ error: ServiceabilityPlatformModel.EntityRegionView_Error().required(),
829
+ page: ServiceabilityPlatformModel.EntityRegionView_page().required(),
830
+ items: Joi.array().items(
831
+ ServiceabilityPlatformModel.EntityRegionView_Items()
1287
832
  ),
1288
- is_active: Joi.boolean().required(),
1289
- name: Joi.string().allow("").required(),
1290
- sort: Joi.array().items(Joi.string().allow("")).required(),
833
+ success: Joi.boolean().required(),
1291
834
  });
1292
835
  }
1293
836
 
1294
- /** @returns {CourierPartnerRuleConditions} */
1295
- static CourierPartnerRuleConditions() {
837
+ /** @returns {ListViewSummary} */
838
+ static ListViewSummary() {
1296
839
  return Joi.object({
1297
- brand_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
1298
- category_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
1299
- department_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
1300
- forward: ServiceabilityPlatformModel.LocationRule(),
1301
- order_place_date: ServiceabilityPlatformModel.ArithmeticOperations(),
1302
- payment_mode: ServiceabilityPlatformModel.StringComparisonOperations(),
1303
- product_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
1304
- product_tags: ServiceabilityPlatformModel.StringComparisonOperations(),
1305
- reverse: ServiceabilityPlatformModel.LocationRule(),
1306
- shipment_cost: ServiceabilityPlatformModel.ArithmeticOperations(),
1307
- shipment_volumetric_weight: ServiceabilityPlatformModel.ArithmeticOperations(),
1308
- shipment_weight: ServiceabilityPlatformModel.ArithmeticOperations(),
1309
- store_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
1310
- store_tags: ServiceabilityPlatformModel.StringComparisonOperations(),
1311
- store_type: ServiceabilityPlatformModel.StringComparisonOperations(),
1312
- zone_ids: ServiceabilityPlatformModel.StringComparisonOperations(),
840
+ total_zones: Joi.number().required(),
841
+ total_pincodes_served: Joi.number().required(),
842
+ total_active_zones: Joi.number().required(),
1313
843
  });
1314
844
  }
1315
845
 
1316
- /** @returns {CourierPartnerRulesListResponse} */
1317
- static CourierPartnerRulesListResponse() {
846
+ /** @returns {ZoneDataItem} */
847
+ static ZoneDataItem() {
1318
848
  return Joi.object({
1319
- items: Joi.array()
1320
- .items(ServiceabilityPlatformModel.CourierPartnerRule())
1321
- .required(),
1322
- page: ServiceabilityPlatformModel.Page().required(),
1323
- });
1324
- }
1325
-
1326
- /** @returns {CourierPartnerSchemeFeatures} */
1327
- static CourierPartnerSchemeFeatures() {
1328
- return Joi.object({
1329
- cold_storage_goods: Joi.boolean(),
1330
- dangerous_goods: Joi.boolean(),
1331
- doorstep_exchange: Joi.boolean(),
1332
- doorstep_qc: Joi.boolean(),
1333
- doorstep_return: Joi.boolean(),
1334
- ewaybill: Joi.boolean(),
1335
- fragile_goods: Joi.boolean(),
1336
- mps: Joi.boolean(),
1337
- multi_pick_multi_drop: Joi.boolean(),
1338
- multi_pick_single_drop: Joi.boolean(),
1339
- ndr: Joi.boolean(),
1340
- ndr_attempts: Joi.number(),
1341
- openbox_delivery: Joi.boolean(),
1342
- product_installation: Joi.boolean(),
1343
- qr: Joi.boolean(),
1344
- restricted_goods: Joi.boolean(),
1345
- single_pick_multi_drop: Joi.boolean(),
1346
- status_updates: Joi.string().allow(""),
1347
- });
1348
- }
1349
-
1350
- /** @returns {CourierPartnerSchemeModel} */
1351
- static CourierPartnerSchemeModel() {
1352
- return Joi.object({
1353
- delivery_type: Joi.string().allow("").required(),
1354
- extension_id: Joi.string().allow("").required(),
1355
- feature: ServiceabilityPlatformModel.CourierPartnerSchemeFeatures().required(),
1356
- payment_mode: Joi.array().items(Joi.string().allow("")).required(),
1357
- region: Joi.string().allow("").required(),
1358
- scheme_id: Joi.string().allow("").required(),
1359
- stage: Joi.string().allow("").required(),
1360
- transport_type: Joi.string().allow("").required(),
1361
- weight: ServiceabilityPlatformModel.ArithmeticOperations().required(),
849
+ has_next: Joi.boolean().required(),
850
+ item_total: Joi.number().required(),
851
+ size: Joi.number().required(),
852
+ current: Joi.number().required(),
853
+ type: Joi.string().allow("").required(),
1362
854
  });
1363
855
  }
1364
856
 
1365
- /** @returns {CreatedByResponse} */
1366
- static CreatedByResponse() {
857
+ /** @returns {ListViewProduct} */
858
+ static ListViewProduct() {
1367
859
  return Joi.object({
1368
- user_id: Joi.string().allow(""),
1369
- username: Joi.string().allow(""),
860
+ count: Joi.number().required(),
861
+ type: Joi.string().allow("").required(),
1370
862
  });
1371
863
  }
1372
864
 
1373
- /** @returns {CreateStoreRuleRequestSchema} */
1374
- static CreateStoreRuleRequestSchema() {
865
+ /** @returns {ListViewChannels} */
866
+ static ListViewChannels() {
1375
867
  return Joi.object({
1376
- conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
1377
- is_active: Joi.boolean(),
1378
- name: Joi.string().allow(""),
1379
- sort: Joi.array().items(Joi.string().allow("")),
1380
- store_priority: Joi.array().items(
1381
- ServiceabilityPlatformModel.StorePrioritySchema()
1382
- ),
1383
- tag_based_priority: Joi.array().items(Joi.string().allow("")),
1384
- type_based_priority: Joi.array().items(Joi.string().allow("")),
868
+ channel_id: Joi.string().allow("").required(),
869
+ channel_type: Joi.string().allow("").required(),
1385
870
  });
1386
871
  }
1387
872
 
1388
- /** @returns {CreateZoneData} */
1389
- static CreateZoneData() {
873
+ /** @returns {ListViewItems} */
874
+ static ListViewItems() {
1390
875
  return Joi.object({
1391
- assignment_preference: Joi.string().allow(""),
1392
- channels: Joi.array()
1393
- .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
1394
- .required(),
1395
- company_id: Joi.number().required(),
1396
- is_active: Joi.boolean().required(),
1397
- mapping: Joi.array()
1398
- .items(ServiceabilityPlatformModel.ZoneMappingType())
1399
- .required(),
876
+ zone_id: Joi.string().allow("").required(),
1400
877
  name: Joi.string().allow("").required(),
1401
- region_type: Joi.string().allow("").required(),
1402
878
  slug: Joi.string().allow("").required(),
1403
- store_ids: Joi.array().items(Joi.number()).required(),
1404
- });
1405
- }
1406
-
1407
- /** @returns {CustomerRadiusSchema} */
1408
- static CustomerRadiusSchema() {
1409
- return Joi.object({
1410
- gt: Joi.number(),
1411
- gte: Joi.number(),
1412
- lt: Joi.number(),
1413
- lte: Joi.number(),
1414
- unit: Joi.string().allow("").required(),
1415
- });
1416
- }
1417
-
1418
- /** @returns {DocumentsResponse} */
1419
- static DocumentsResponse() {
1420
- return Joi.object({
1421
- legal_name: Joi.string().allow(""),
1422
- type: Joi.string().allow(""),
1423
- value: Joi.string().allow(""),
1424
- verified: Joi.boolean(),
1425
- });
1426
- }
1427
-
1428
- /** @returns {Dp} */
1429
- static Dp() {
1430
- return Joi.object({
1431
- area_code: Joi.number().allow(null),
1432
- assign_dp_from_sb: Joi.boolean(),
1433
- external_account_id: Joi.string().allow("").allow(null),
1434
- fm_priority: Joi.number(),
1435
- internal_account_id: Joi.string().allow(""),
1436
- lm_priority: Joi.number(),
1437
- operations: Joi.array().items(Joi.string().allow("")),
1438
- payment_mode: Joi.string().allow(""),
1439
- rvp_priority: Joi.number(),
1440
- transport_mode: Joi.string().allow(""),
1441
- });
1442
- }
1443
-
1444
- /** @returns {EinvoiceResponse} */
1445
- static EinvoiceResponse() {
1446
- return Joi.object({
1447
- enabled: Joi.boolean(),
1448
- });
1449
- }
1450
-
1451
- /** @returns {EntityRegionView_Error} */
1452
- static EntityRegionView_Error() {
1453
- return Joi.object({
1454
- message: Joi.string().allow(""),
1455
- type: Joi.string().allow(""),
1456
- value: Joi.string().allow(""),
879
+ stores_count: Joi.number().required(),
880
+ is_active: Joi.boolean().required(),
881
+ product: ServiceabilityPlatformModel.ListViewProduct().required(),
882
+ pincodes_count: Joi.number().required(),
883
+ company_id: Joi.number().required(),
884
+ channels: Joi.array()
885
+ .items(ServiceabilityPlatformModel.ListViewChannels())
886
+ .required(),
1457
887
  });
1458
888
  }
1459
889
 
1460
- /** @returns {EntityRegionView_Items} */
1461
- static EntityRegionView_Items() {
890
+ /** @returns {ListViewResponse} */
891
+ static ListViewResponse() {
1462
892
  return Joi.object({
1463
- name: Joi.string().allow("").required(),
1464
- sub_type: Joi.string().allow("").required(),
1465
- uid: Joi.string().allow("").required(),
893
+ summary: ServiceabilityPlatformModel.ListViewSummary().required(),
894
+ page: ServiceabilityPlatformModel.ZoneDataItem().required(),
895
+ items: Joi.array()
896
+ .items(ServiceabilityPlatformModel.ListViewItems())
897
+ .required(),
1466
898
  });
1467
899
  }
1468
900
 
1469
- /** @returns {EntityRegionView_page} */
1470
- static EntityRegionView_page() {
901
+ /** @returns {CompanyStoreView_PageItems} */
902
+ static CompanyStoreView_PageItems() {
1471
903
  return Joi.object({
1472
- current: Joi.number().required(),
904
+ type: Joi.string().allow("").required(),
1473
905
  has_next: Joi.boolean().required(),
1474
906
  item_total: Joi.number().required(),
1475
907
  size: Joi.number().required(),
1476
- type: Joi.string().allow("").required(),
1477
- });
1478
- }
1479
-
1480
- /** @returns {EntityRegionView_Request} */
1481
- static EntityRegionView_Request() {
1482
- return Joi.object({
1483
- parent_id: Joi.array().items(Joi.string().allow("")),
1484
- sub_type: Joi.array().items(Joi.string().allow("")).required(),
1485
- });
1486
- }
1487
-
1488
- /** @returns {EntityRegionView_Response} */
1489
- static EntityRegionView_Response() {
1490
- return Joi.object({
1491
- data: Joi.array()
1492
- .items(ServiceabilityPlatformModel.EntityRegionView_Items())
1493
- .required(),
1494
- error: ServiceabilityPlatformModel.EntityRegionView_Error().required(),
1495
- page: ServiceabilityPlatformModel.EntityRegionView_page().required(),
1496
- success: Joi.boolean().required(),
908
+ current: Joi.number().required(),
1497
909
  });
1498
910
  }
1499
911
 
1500
- /** @returns {Error} */
1501
- static Error() {
912
+ /** @returns {CompanyStoreView_Response} */
913
+ static CompanyStoreView_Response() {
1502
914
  return Joi.object({
1503
- message: Joi.string().allow("").allow(null),
1504
- type: Joi.string().allow("").allow(null),
1505
- value: Joi.string().allow("").allow(null),
915
+ page: Joi.array()
916
+ .items(ServiceabilityPlatformModel.CompanyStoreView_PageItems())
917
+ .required(),
918
+ items: Joi.array().items(Joi.any()),
1506
919
  });
1507
920
  }
1508
921
 
1509
- /** @returns {ErrorResponse} */
1510
- static ErrorResponse() {
922
+ /** @returns {GetZoneDataViewChannels} */
923
+ static GetZoneDataViewChannels() {
1511
924
  return Joi.object({
1512
- message: Joi.string().allow("").required(),
1513
- type: Joi.string().allow("").required(),
1514
- value: Joi.string().allow("").required(),
925
+ channel_id: Joi.string().allow("").required(),
926
+ channel_type: Joi.string().allow("").required(),
1515
927
  });
1516
928
  }
1517
929
 
1518
- /** @returns {EwayBillResponse} */
1519
- static EwayBillResponse() {
930
+ /** @returns {ZoneProductTypes} */
931
+ static ZoneProductTypes() {
1520
932
  return Joi.object({
1521
- enabled: Joi.boolean(),
933
+ type: Joi.string().allow("").required(),
934
+ tags: Joi.array().items(Joi.string().allow("")).required(),
1522
935
  });
1523
936
  }
1524
937
 
1525
- /** @returns {FailureResponse} */
1526
- static FailureResponse() {
938
+ /** @returns {ZoneMappingType} */
939
+ static ZoneMappingType() {
1527
940
  return Joi.object({
1528
- error: Joi.array()
1529
- .items(ServiceabilityPlatformModel.ErrorResponse())
1530
- .required(),
1531
- success: Joi.boolean().required(),
941
+ country: Joi.string().allow("").required(),
942
+ pincode: Joi.array().items(Joi.string().allow("")),
943
+ state: Joi.array().items(Joi.string().allow("")),
1532
944
  });
1533
945
  }
1534
946
 
1535
- /** @returns {getAppRegionZonesResponse} */
1536
- static getAppRegionZonesResponse() {
947
+ /** @returns {UpdateZoneData} */
948
+ static UpdateZoneData() {
1537
949
  return Joi.object({
1538
- items: Joi.array()
1539
- .items(ServiceabilityPlatformModel.ListViewItems())
950
+ zone_id: Joi.string().allow("").required(),
951
+ name: Joi.string().allow("").required(),
952
+ slug: Joi.string().allow("").required(),
953
+ company_id: Joi.number().required(),
954
+ is_active: Joi.boolean().required(),
955
+ channels: Joi.array()
956
+ .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
1540
957
  .required(),
1541
- page: Joi.array()
1542
- .items(ServiceabilityPlatformModel.PageSchema())
958
+ product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
959
+ store_ids: Joi.array().items(Joi.number()).required(),
960
+ region_type: Joi.string().allow("").required(),
961
+ mapping: Joi.array()
962
+ .items(ServiceabilityPlatformModel.ZoneMappingType())
1543
963
  .required(),
964
+ assignment_preference: Joi.string().allow(""),
1544
965
  });
1545
966
  }
1546
967
 
1547
- /** @returns {GetSingleZoneDataViewResponse} */
1548
- static GetSingleZoneDataViewResponse() {
1549
- return Joi.object({
1550
- data: ServiceabilityPlatformModel.GetZoneDataViewItems().required(),
1551
- });
1552
- }
1553
-
1554
- /** @returns {GetStoreRulesApiResponse} */
1555
- static GetStoreRulesApiResponse() {
968
+ /** @returns {ZoneUpdateRequest} */
969
+ static ZoneUpdateRequest() {
1556
970
  return Joi.object({
1557
- items: Joi.array().items(
1558
- ServiceabilityPlatformModel.StoreRuleDataSchema()
1559
- ),
1560
- page: ServiceabilityPlatformModel.Page(),
971
+ identifier: Joi.string().allow("").required(),
972
+ data: ServiceabilityPlatformModel.UpdateZoneData().required(),
1561
973
  });
1562
974
  }
1563
975
 
1564
- /** @returns {GetStoresViewResponse} */
1565
- static GetStoresViewResponse() {
976
+ /** @returns {ZoneSuccessResponse} */
977
+ static ZoneSuccessResponse() {
1566
978
  return Joi.object({
1567
- items: Joi.array().items(ServiceabilityPlatformModel.ItemResponse()),
1568
- page: ServiceabilityPlatformModel.ServiceabilityPageResponse().required(),
979
+ status_code: Joi.number().required(),
980
+ success: Joi.boolean().required(),
1569
981
  });
1570
982
  }
1571
983
 
1572
- /** @returns {GetZoneByIdSchema} */
1573
- static GetZoneByIdSchema() {
984
+ /** @returns {GetZoneDataViewItems} */
985
+ static GetZoneDataViewItems() {
1574
986
  return Joi.object({
1575
- assignment_preference: Joi.string().allow(""),
987
+ zone_id: Joi.string().allow("").required(),
988
+ name: Joi.string().allow("").required(),
989
+ slug: Joi.string().allow("").required(),
990
+ company_id: Joi.number(),
991
+ is_active: Joi.boolean().required(),
1576
992
  channels: Joi.array()
1577
993
  .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
1578
994
  .required(),
1579
- company_id: Joi.number(),
1580
- is_active: Joi.boolean().required(),
995
+ product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
996
+ store_ids: Joi.array().items(Joi.number()).required(),
997
+ region_type: Joi.string().allow("").required(),
1581
998
  mapping: Joi.array()
1582
999
  .items(ServiceabilityPlatformModel.ZoneMappingType())
1583
1000
  .required(),
1584
- name: Joi.string().allow("").required(),
1585
- product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
1586
- region_type: Joi.string().allow("").required(),
1587
- slug: Joi.string().allow("").required(),
1588
- store_ids: Joi.array().items(Joi.number()).required(),
1001
+ assignment_preference: Joi.string().allow(""),
1589
1002
  stores_count: Joi.number().required(),
1590
- zone_id: Joi.string().allow("").required(),
1003
+ pincodes_count: Joi.number().required(),
1591
1004
  });
1592
1005
  }
1593
1006
 
1594
- /** @returns {GetZoneDataViewChannels} */
1595
- static GetZoneDataViewChannels() {
1007
+ /** @returns {GetSingleZoneDataViewResponse} */
1008
+ static GetSingleZoneDataViewResponse() {
1596
1009
  return Joi.object({
1597
- channel_id: Joi.string().allow("").required(),
1598
- channel_type: Joi.string().allow("").required(),
1010
+ data: ServiceabilityPlatformModel.GetZoneDataViewItems().required(),
1599
1011
  });
1600
1012
  }
1601
1013
 
1602
- /** @returns {GetZoneDataViewItems} */
1603
- static GetZoneDataViewItems() {
1014
+ /** @returns {CreateZoneData} */
1015
+ static CreateZoneData() {
1604
1016
  return Joi.object({
1605
- assignment_preference: Joi.string().allow(""),
1017
+ name: Joi.string().allow("").required(),
1018
+ slug: Joi.string().allow("").required(),
1019
+ company_id: Joi.number().required(),
1020
+ is_active: Joi.boolean().required(),
1606
1021
  channels: Joi.array()
1607
1022
  .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
1608
1023
  .required(),
1609
- company_id: Joi.number(),
1610
- is_active: Joi.boolean().required(),
1024
+ product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
1025
+ store_ids: Joi.array().items(Joi.number()).required(),
1026
+ region_type: Joi.string().allow("").required(),
1611
1027
  mapping: Joi.array()
1612
1028
  .items(ServiceabilityPlatformModel.ZoneMappingType())
1613
1029
  .required(),
1614
- name: Joi.string().allow("").required(),
1615
- product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
1616
- region_type: Joi.string().allow(""),
1617
- slug: Joi.string().allow("").required(),
1618
- store_ids: Joi.array().items(Joi.number()).required(),
1619
- stores_count: Joi.number().required(),
1620
- zone_id: Joi.string().allow("").required(),
1030
+ assignment_preference: Joi.string().allow(""),
1621
1031
  });
1622
1032
  }
1623
1033
 
1624
- /** @returns {GetZoneFromApplicationIdViewResponse} */
1625
- static GetZoneFromApplicationIdViewResponse() {
1034
+ /** @returns {ZoneRequest} */
1035
+ static ZoneRequest() {
1626
1036
  return Joi.object({
1627
- items: Joi.array()
1628
- .items(ServiceabilityPlatformModel.ListViewItems())
1629
- .required(),
1630
- page: Joi.array()
1631
- .items(ServiceabilityPlatformModel.ZoneDataItem())
1632
- .required(),
1037
+ identifier: Joi.string().allow("").required(),
1038
+ data: ServiceabilityPlatformModel.CreateZoneData().required(),
1039
+ });
1040
+ }
1041
+
1042
+ /** @returns {ZoneResponse} */
1043
+ static ZoneResponse() {
1044
+ return Joi.object({
1045
+ status_code: Joi.number().required(),
1046
+ zone_id: Joi.string().allow("").required(),
1047
+ success: Joi.boolean().required(),
1633
1048
  });
1634
1049
  }
1635
1050
 
@@ -1641,6 +1056,20 @@ class ServiceabilityPlatformModel {
1641
1056
  });
1642
1057
  }
1643
1058
 
1059
+ /** @returns {Zone} */
1060
+ static Zone() {
1061
+ return Joi.object({
1062
+ zone_id: Joi.string().allow("").required(),
1063
+ type: Joi.string().allow("").required(),
1064
+ name: Joi.string().allow("").required(),
1065
+ tags: Joi.array().items(Joi.string().allow("")).required(),
1066
+ slug: Joi.string().allow("").required(),
1067
+ is_active: Joi.boolean().required(),
1068
+ store_ids: Joi.array().items(Joi.number()).required(),
1069
+ assignment_preference: Joi.string().allow("").required(),
1070
+ });
1071
+ }
1072
+
1644
1073
  /** @returns {GetZoneFromPincodeViewResponse} */
1645
1074
  static GetZoneFromPincodeViewResponse() {
1646
1075
  return Joi.object({
@@ -1649,342 +1078,313 @@ class ServiceabilityPlatformModel {
1649
1078
  });
1650
1079
  }
1651
1080
 
1652
- /** @returns {GstCredentialsResponse} */
1653
- static GstCredentialsResponse() {
1081
+ /** @returns {GetZoneFromApplicationIdViewResponse} */
1082
+ static GetZoneFromApplicationIdViewResponse() {
1654
1083
  return Joi.object({
1655
- e_invoice: ServiceabilityPlatformModel.EinvoiceResponse(),
1656
- e_waybill: ServiceabilityPlatformModel.EwayBillResponse(),
1084
+ page: Joi.array()
1085
+ .items(ServiceabilityPlatformModel.ZoneDataItem())
1086
+ .required(),
1087
+ items: Joi.array()
1088
+ .items(ServiceabilityPlatformModel.ListViewItems())
1089
+ .required(),
1657
1090
  });
1658
1091
  }
1659
1092
 
1660
- /** @returns {IntComparisonOperations} */
1661
- static IntComparisonOperations() {
1093
+ /** @returns {ServiceabilityPageResponse} */
1094
+ static ServiceabilityPageResponse() {
1662
1095
  return Joi.object({
1663
- includes: Joi.array().items(Joi.number()),
1096
+ type: Joi.string().allow(""),
1097
+ has_next: Joi.boolean(),
1098
+ item_total: Joi.number(),
1099
+ size: Joi.number(),
1100
+ current: Joi.number(),
1664
1101
  });
1665
1102
  }
1666
1103
 
1667
- /** @returns {IntegrationTypeResponse} */
1668
- static IntegrationTypeResponse() {
1104
+ /** @returns {MobileNo} */
1105
+ static MobileNo() {
1669
1106
  return Joi.object({
1670
- inventory: Joi.string().allow(""),
1671
- order: Joi.string().allow(""),
1107
+ number: Joi.string().allow(""),
1108
+ country_code: Joi.number(),
1672
1109
  });
1673
1110
  }
1674
1111
 
1675
- /** @returns {ItemResponse} */
1676
- static ItemResponse() {
1112
+ /** @returns {ManagerResponse} */
1113
+ static ManagerResponse() {
1677
1114
  return Joi.object({
1678
- _cls: Joi.string().allow(""),
1679
- _custom_json: Joi.any(),
1680
- address: ServiceabilityPlatformModel.AddressResponse(),
1681
- code: Joi.string().allow(""),
1682
- company: Joi.number(),
1683
- company_id: Joi.number(),
1684
- contact_numbers: Joi.array().items(
1685
- ServiceabilityPlatformModel.ContactNumberResponse()
1686
- ),
1687
- created_by: ServiceabilityPlatformModel.CreatedByResponse(),
1688
- created_on: Joi.string().allow(""),
1689
- display_name: Joi.string().allow(""),
1690
- documents: Joi.array().items(
1691
- ServiceabilityPlatformModel.DocumentsResponse()
1692
- ),
1693
- gst_credentials: ServiceabilityPlatformModel.GstCredentialsResponse(),
1694
- integration_type: ServiceabilityPlatformModel.IntegrationTypeResponse(),
1695
- logistics: ServiceabilityPlatformModel.LogisticsResponse(),
1696
- manager: ServiceabilityPlatformModel.ManagerResponse(),
1697
- modified_by: ServiceabilityPlatformModel.ModifiedByResponse(),
1698
- modified_on: Joi.string().allow(""),
1115
+ email: Joi.string().allow(""),
1116
+ mobile_no: ServiceabilityPlatformModel.MobileNo(),
1699
1117
  name: Joi.string().allow(""),
1700
- notification_emails: Joi.array().items(Joi.string().allow("")),
1701
- product_return_config: ServiceabilityPlatformModel.ProductReturnConfigResponse(),
1702
- stage: Joi.string().allow(""),
1703
- store_type: Joi.string().allow(""),
1704
- sub_type: Joi.string().allow(""),
1705
- timing: Joi.array().items(ServiceabilityPlatformModel.TimmingResponse()),
1706
- uid: Joi.number(),
1707
- verified_by: ServiceabilityPlatformModel.ModifiedByResponse(),
1708
- verified_on: Joi.string().allow(""),
1709
- warnings: ServiceabilityPlatformModel.WarningsResponse(),
1710
1118
  });
1711
1119
  }
1712
1120
 
1713
- /** @returns {ListViewChannels} */
1714
- static ListViewChannels() {
1121
+ /** @returns {ModifiedByResponse} */
1122
+ static ModifiedByResponse() {
1715
1123
  return Joi.object({
1716
- channel_id: Joi.string().allow("").required(),
1717
- channel_type: Joi.string().allow("").required(),
1124
+ username: Joi.string().allow(""),
1125
+ user_id: Joi.string().allow(""),
1718
1126
  });
1719
1127
  }
1720
1128
 
1721
- /** @returns {ListViewItems} */
1722
- static ListViewItems() {
1129
+ /** @returns {IntegrationTypeResponse} */
1130
+ static IntegrationTypeResponse() {
1723
1131
  return Joi.object({
1724
- channels: Joi.array()
1725
- .items(ServiceabilityPlatformModel.ListViewChannels())
1726
- .required(),
1727
- company_id: Joi.number().required(),
1728
- is_active: Joi.boolean().required(),
1729
- name: Joi.string().allow("").required(),
1730
- product: ServiceabilityPlatformModel.ListViewProduct().required(),
1731
- regions_count: Joi.number().required(),
1732
- slug: Joi.string().allow("").required(),
1733
- stores_count: Joi.number().required(),
1734
- zone_id: Joi.string().allow("").required(),
1132
+ inventory: Joi.string().allow(""),
1133
+ order: Joi.string().allow(""),
1735
1134
  });
1736
1135
  }
1737
1136
 
1738
- /** @returns {ListViewProduct} */
1739
- static ListViewProduct() {
1137
+ /** @returns {ProductReturnConfigResponse} */
1138
+ static ProductReturnConfigResponse() {
1139
+ return Joi.object({
1140
+ on_same_store: Joi.boolean(),
1141
+ });
1142
+ }
1143
+
1144
+ /** @returns {ContactNumberResponse} */
1145
+ static ContactNumberResponse() {
1740
1146
  return Joi.object({
1741
- count: Joi.number().required(),
1742
- type: Joi.string().allow("").required(),
1147
+ number: Joi.string().allow(""),
1148
+ country_code: Joi.number(),
1743
1149
  });
1744
1150
  }
1745
1151
 
1746
- /** @returns {ListViewResponse} */
1747
- static ListViewResponse() {
1152
+ /** @returns {AddressResponse} */
1153
+ static AddressResponse() {
1748
1154
  return Joi.object({
1749
- items: Joi.array()
1750
- .items(ServiceabilityPlatformModel.ListViewItems())
1751
- .required(),
1752
- page: Joi.array()
1753
- .items(ServiceabilityPlatformModel.ZoneDataItem())
1754
- .required(),
1155
+ city: Joi.string().allow(""),
1156
+ address1: Joi.string().allow(""),
1157
+ pincode: Joi.number(),
1158
+ address2: Joi.string().allow(""),
1159
+ landmark: Joi.string().allow(""),
1160
+ state: Joi.string().allow(""),
1161
+ country: Joi.string().allow(""),
1162
+ latitude: Joi.number(),
1163
+ longitude: Joi.number(),
1755
1164
  });
1756
1165
  }
1757
1166
 
1758
- /** @returns {ListViewSummary} */
1759
- static ListViewSummary() {
1167
+ /** @returns {CreatedByResponse} */
1168
+ static CreatedByResponse() {
1760
1169
  return Joi.object({
1761
- total_active_zones: Joi.number().required(),
1762
- total_pincodes_served: Joi.number().required(),
1763
- total_zones: Joi.number().required(),
1170
+ username: Joi.string().allow(""),
1171
+ user_id: Joi.string().allow(""),
1764
1172
  });
1765
1173
  }
1766
1174
 
1767
- /** @returns {LocationRule} */
1768
- static LocationRule() {
1175
+ /** @returns {EwayBillResponse} */
1176
+ static EwayBillResponse() {
1769
1177
  return Joi.object({
1770
- includes: Joi.array().items(
1771
- ServiceabilityPlatformModel.LocationRuleValues()
1772
- ),
1773
- type: Joi.string().allow(""),
1178
+ enabled: Joi.boolean(),
1774
1179
  });
1775
1180
  }
1776
1181
 
1777
- /** @returns {LocationRuleValues} */
1778
- static LocationRuleValues() {
1182
+ /** @returns {EinvoiceResponse} */
1183
+ static EinvoiceResponse() {
1779
1184
  return Joi.object({
1780
- display_name: Joi.string().allow(""),
1781
- id: Joi.string().allow("").required(),
1782
- name: Joi.string().allow(""),
1783
- parent_id: Joi.string().allow(""),
1784
- parent_ids: Joi.array().items(Joi.string().allow("")),
1785
- sub_type: Joi.string().allow(""),
1185
+ enabled: Joi.boolean(),
1786
1186
  });
1787
1187
  }
1788
1188
 
1789
- /** @returns {LogisticsResponse} */
1790
- static LogisticsResponse() {
1189
+ /** @returns {GstCredentialsResponse} */
1190
+ static GstCredentialsResponse() {
1791
1191
  return Joi.object({
1792
- dp: ServiceabilityPlatformModel.Dp(),
1793
- override: Joi.boolean(),
1192
+ e_waybill: ServiceabilityPlatformModel.EwayBillResponse(),
1193
+ e_invoice: ServiceabilityPlatformModel.EinvoiceResponse(),
1794
1194
  });
1795
1195
  }
1796
1196
 
1797
- /** @returns {ManagerResponse} */
1798
- static ManagerResponse() {
1197
+ /** @returns {WarningsResponse} */
1198
+ static WarningsResponse() {
1799
1199
  return Joi.object({
1800
- email: Joi.string().allow(""),
1801
- mobile_no: ServiceabilityPlatformModel.MobileNo(),
1802
- name: Joi.string().allow(""),
1200
+ store_address: Joi.string().allow(""),
1803
1201
  });
1804
1202
  }
1805
1203
 
1806
- /** @returns {MobileNo} */
1807
- static MobileNo() {
1204
+ /** @returns {OpeningClosing} */
1205
+ static OpeningClosing() {
1808
1206
  return Joi.object({
1809
- country_code: Joi.number(),
1810
- number: Joi.string().allow(""),
1207
+ minute: Joi.number(),
1208
+ hour: Joi.number(),
1811
1209
  });
1812
1210
  }
1813
1211
 
1814
- /** @returns {ModifiedByResponse} */
1815
- static ModifiedByResponse() {
1212
+ /** @returns {TimmingResponse} */
1213
+ static TimmingResponse() {
1816
1214
  return Joi.object({
1817
- user_id: Joi.string().allow(""),
1818
- username: Joi.string().allow(""),
1215
+ open: Joi.boolean(),
1216
+ weekday: Joi.string().allow(""),
1217
+ closing: ServiceabilityPlatformModel.OpeningClosing(),
1218
+ opening: ServiceabilityPlatformModel.OpeningClosing(),
1819
1219
  });
1820
1220
  }
1821
1221
 
1822
- /** @returns {OpeningClosing} */
1823
- static OpeningClosing() {
1222
+ /** @returns {DocumentsResponse} */
1223
+ static DocumentsResponse() {
1824
1224
  return Joi.object({
1825
- hour: Joi.number(),
1826
- minute: Joi.number(),
1225
+ legal_name: Joi.string().allow(""),
1226
+ value: Joi.string().allow(""),
1227
+ type: Joi.string().allow(""),
1228
+ verified: Joi.boolean(),
1827
1229
  });
1828
1230
  }
1829
1231
 
1830
- /** @returns {PackageMaterial} */
1831
- static PackageMaterial() {
1232
+ /** @returns {Dp} */
1233
+ static Dp() {
1832
1234
  return Joi.object({
1833
- auto_calculate: Joi.boolean(),
1834
- channels: Joi.array()
1835
- .items(ServiceabilityPlatformModel.Channel())
1836
- .required(),
1837
- error_rate: Joi.number().required(),
1838
- height: Joi.number().required(),
1839
- length: Joi.number().required(),
1840
- max_weight: Joi.number(),
1841
- media: Joi.array().items(Joi.string().allow("")),
1842
- name: Joi.string().allow("").required(),
1843
- package_type: Joi.string().allow("").required(),
1844
- package_vol_weight: Joi.number(),
1845
- rules: Joi.array().items(
1846
- ServiceabilityPlatformModel.PackageMaterialRule()
1847
- ),
1848
- size: Joi.string().allow("").required(),
1849
- status: Joi.string().allow("").required(),
1850
- store_ids: Joi.array().items(Joi.number()).required(),
1851
- track_inventory: Joi.boolean(),
1852
- weight: Joi.number().required(),
1853
- width: Joi.number().required(),
1235
+ fm_priority: Joi.number(),
1236
+ rvp_priority: Joi.number(),
1237
+ lm_priority: Joi.number(),
1238
+ internal_account_id: Joi.string().allow(""),
1239
+ area_code: Joi.number().allow(null),
1240
+ payment_mode: Joi.string().allow(""),
1241
+ operations: Joi.array().items(Joi.string().allow("")),
1242
+ external_account_id: Joi.string().allow("").allow(null),
1243
+ transport_mode: Joi.string().allow(""),
1244
+ assign_dp_from_sb: Joi.boolean(),
1854
1245
  });
1855
1246
  }
1856
1247
 
1857
- /** @returns {PackageMaterialList} */
1858
- static PackageMaterialList() {
1248
+ /** @returns {LogisticsResponse} */
1249
+ static LogisticsResponse() {
1859
1250
  return Joi.object({
1860
- items: ServiceabilityPlatformModel.PackageMaterialResponse(),
1861
- page: ServiceabilityPlatformModel.Page(),
1251
+ override: Joi.boolean(),
1252
+ dp: ServiceabilityPlatformModel.Dp(),
1862
1253
  });
1863
1254
  }
1864
1255
 
1865
- /** @returns {PackageMaterialResponse} */
1866
- static PackageMaterialResponse() {
1256
+ /** @returns {ItemResponse} */
1257
+ static ItemResponse() {
1867
1258
  return Joi.object({
1868
- auto_calculate: Joi.boolean(),
1869
- channels: Joi.array()
1870
- .items(ServiceabilityPlatformModel.Channel())
1871
- .required(),
1872
- error_rate: Joi.number().required(),
1873
- height: Joi.number().required(),
1874
- id: Joi.string().allow(""),
1875
- item_id: Joi.number(),
1876
- length: Joi.number().required(),
1877
- max_weight: Joi.number(),
1878
- media: Joi.array().items(Joi.string().allow("")),
1879
- name: Joi.string().allow("").required(),
1880
- package_type: Joi.string().allow("").required(),
1881
- package_vol_weight: Joi.number(),
1882
- rules: Joi.array().items(
1883
- ServiceabilityPlatformModel.PackageMaterialRule()
1259
+ created_on: Joi.string().allow(""),
1260
+ manager: ServiceabilityPlatformModel.ManagerResponse(),
1261
+ modified_by: ServiceabilityPlatformModel.ModifiedByResponse(),
1262
+ integration_type: ServiceabilityPlatformModel.IntegrationTypeResponse(),
1263
+ verified_on: Joi.string().allow(""),
1264
+ product_return_config: ServiceabilityPlatformModel.ProductReturnConfigResponse(),
1265
+ contact_numbers: Joi.array().items(
1266
+ ServiceabilityPlatformModel.ContactNumberResponse()
1884
1267
  ),
1885
- size: Joi.string().allow("").required(),
1886
- status: Joi.string().allow("").required(),
1887
- store_ids: Joi.array().items(Joi.number()).required(),
1888
- track_inventory: Joi.boolean(),
1889
- weight: Joi.number().required(),
1890
- width: Joi.number().required(),
1268
+ verified_by: ServiceabilityPlatformModel.ModifiedByResponse(),
1269
+ stage: Joi.string().allow(""),
1270
+ address: ServiceabilityPlatformModel.AddressResponse(),
1271
+ modified_on: Joi.string().allow(""),
1272
+ created_by: ServiceabilityPlatformModel.CreatedByResponse(),
1273
+ gst_credentials: ServiceabilityPlatformModel.GstCredentialsResponse(),
1274
+ display_name: Joi.string().allow(""),
1275
+ company_id: Joi.number(),
1276
+ uid: Joi.number(),
1277
+ _custom_json: Joi.any(),
1278
+ code: Joi.string().allow(""),
1279
+ warnings: ServiceabilityPlatformModel.WarningsResponse(),
1280
+ name: Joi.string().allow(""),
1281
+ timing: Joi.array().items(ServiceabilityPlatformModel.TimmingResponse()),
1282
+ documents: Joi.array().items(
1283
+ ServiceabilityPlatformModel.DocumentsResponse()
1284
+ ),
1285
+ store_type: Joi.string().allow(""),
1286
+ sub_type: Joi.string().allow(""),
1287
+ company: Joi.number(),
1288
+ _cls: Joi.string().allow(""),
1289
+ logistics: ServiceabilityPlatformModel.LogisticsResponse(),
1290
+ notification_emails: Joi.array().items(Joi.string().allow("")),
1891
1291
  });
1892
1292
  }
1893
1293
 
1894
- /** @returns {PackageMaterialRule} */
1895
- static PackageMaterialRule() {
1294
+ /** @returns {GetStoresViewResponse} */
1295
+ static GetStoresViewResponse() {
1896
1296
  return Joi.object({
1897
- quantity: ServiceabilityPlatformModel.PackageMaterialRuleQuantity(),
1898
- rule_id: Joi.string().allow(""),
1899
- weight: Joi.number(),
1297
+ page: ServiceabilityPlatformModel.ServiceabilityPageResponse().required(),
1298
+ items: Joi.array().items(ServiceabilityPlatformModel.ItemResponse()),
1900
1299
  });
1901
1300
  }
1902
1301
 
1903
- /** @returns {PackageMaterialRuleList} */
1904
- static PackageMaterialRuleList() {
1302
+ /** @returns {ReAssignStoreRequest} */
1303
+ static ReAssignStoreRequest() {
1905
1304
  return Joi.object({
1906
- items: ServiceabilityPlatformModel.PackageRuleResponse(),
1907
- page: ServiceabilityPlatformModel.Page(),
1305
+ to_pincode: Joi.string().allow("").required(),
1306
+ identifier: Joi.string().allow("").required(),
1307
+ configuration: Joi.any().required(),
1308
+ ignored_locations: Joi.array().items(Joi.string().allow("")).required(),
1309
+ articles: Joi.array().items(Joi.any()).required(),
1908
1310
  });
1909
1311
  }
1910
1312
 
1911
- /** @returns {PackageMaterialRuleQuantity} */
1912
- static PackageMaterialRuleQuantity() {
1313
+ /** @returns {ReAssignStoreResponse} */
1314
+ static ReAssignStoreResponse() {
1913
1315
  return Joi.object({
1914
- max: Joi.number(),
1915
- min: Joi.number(),
1316
+ to_pincode: Joi.string().allow("").required(),
1317
+ success: Joi.boolean().required(),
1318
+ error: Joi.any().required(),
1319
+ articles: Joi.array().items(Joi.any()),
1916
1320
  });
1917
1321
  }
1918
1322
 
1919
- /** @returns {PackageRule} */
1920
- static PackageRule() {
1323
+ /** @returns {ApplicationCompanyDpViewResponse} */
1324
+ static ApplicationCompanyDpViewResponse() {
1921
1325
  return Joi.object({
1922
- category_id: ServiceabilityPlatformModel.PackageRuleCategory(),
1326
+ courier_partner_id: Joi.number(),
1923
1327
  company_id: Joi.number().required(),
1924
- is_active: Joi.boolean(),
1925
- name: Joi.string().allow("").required(),
1926
- product_id: ServiceabilityPlatformModel.PackageRuleProduct(),
1927
- product_tag: ServiceabilityPlatformModel.PackageRuleProductTag(),
1928
- type: Joi.string().allow("").required(),
1328
+ application_id: Joi.string().allow("").required(),
1329
+ success: Joi.boolean().required(),
1929
1330
  });
1930
1331
  }
1931
1332
 
1932
- /** @returns {PackageRuleCategory} */
1933
- static PackageRuleCategory() {
1333
+ /** @returns {ApplicationCompanyDpViewRequest} */
1334
+ static ApplicationCompanyDpViewRequest() {
1934
1335
  return Joi.object({
1935
- includes: Joi.array().items(Joi.number()),
1336
+ dp_id: Joi.string().allow(""),
1936
1337
  });
1937
1338
  }
1938
1339
 
1939
- /** @returns {PackageRuleProduct} */
1940
- static PackageRuleProduct() {
1340
+ /** @returns {PincodeMopData} */
1341
+ static PincodeMopData() {
1941
1342
  return Joi.object({
1942
- includes: Joi.array().items(Joi.number()),
1343
+ pincodes: Joi.array().items(Joi.number()).required(),
1344
+ country: Joi.string().allow("").required(),
1345
+ action: Joi.string().allow("").required(),
1943
1346
  });
1944
1347
  }
1945
1348
 
1946
- /** @returns {PackageRuleProductTag} */
1947
- static PackageRuleProductTag() {
1349
+ /** @returns {PincodeMopUpdateResponse} */
1350
+ static PincodeMopUpdateResponse() {
1948
1351
  return Joi.object({
1949
- includes: Joi.array().items(Joi.string().allow("")),
1352
+ pincode: Joi.number().required(),
1353
+ channel_id: Joi.string().allow("").required(),
1354
+ country: Joi.string().allow("").required(),
1355
+ is_active: Joi.boolean().required(),
1950
1356
  });
1951
1357
  }
1952
1358
 
1953
- /** @returns {PackageRuleResponse} */
1954
- static PackageRuleResponse() {
1359
+ /** @returns {PincodeMOPresponse} */
1360
+ static PincodeMOPresponse() {
1955
1361
  return Joi.object({
1956
- category_id: ServiceabilityPlatformModel.PackageRuleCategory(),
1957
- company_id: Joi.number().required(),
1958
- id: Joi.string().allow(""),
1959
- is_active: Joi.boolean(),
1960
- name: Joi.string().allow("").required(),
1961
- product_id: ServiceabilityPlatformModel.PackageRuleProduct(),
1962
- product_tag: ServiceabilityPlatformModel.PackageRuleProductTag(),
1963
- type: Joi.string().allow("").required(),
1362
+ success: Joi.boolean().required(),
1363
+ status_code: Joi.number().required(),
1364
+ batch_id: Joi.string().allow("").required(),
1365
+ country: Joi.string().allow("").required(),
1366
+ action: Joi.string().allow("").required(),
1367
+ pincodes: Joi.array().items(Joi.number()),
1368
+ updated_pincodes: Joi.array().items(
1369
+ ServiceabilityPlatformModel.PincodeMopUpdateResponse()
1370
+ ),
1964
1371
  });
1965
1372
  }
1966
1373
 
1967
- /** @returns {Page} */
1968
- static Page() {
1374
+ /** @returns {CommonError} */
1375
+ static CommonError() {
1969
1376
  return Joi.object({
1970
- current: Joi.number(),
1971
- has_next: Joi.boolean(),
1972
- has_previous: Joi.boolean(),
1973
- item_total: Joi.number(),
1974
- next_id: Joi.string().allow(""),
1975
- size: Joi.number(),
1976
- type: Joi.string().allow("").required(),
1377
+ status_code: Joi.string().allow(""),
1378
+ error: Joi.any(),
1379
+ success: Joi.string().allow(""),
1977
1380
  });
1978
1381
  }
1979
1382
 
1980
- /** @returns {PageSchema} */
1981
- static PageSchema() {
1383
+ /** @returns {PincodeMopBulkData} */
1384
+ static PincodeMopBulkData() {
1982
1385
  return Joi.object({
1983
- current: Joi.number().required(),
1984
- has_next: Joi.boolean().required(),
1985
- item_total: Joi.number().required(),
1986
- size: Joi.number().required(),
1987
- type: Joi.string().allow("").required(),
1386
+ batch_id: Joi.string().allow("").required(),
1387
+ s3_url: Joi.string().allow("").required(),
1988
1388
  });
1989
1389
  }
1990
1390
 
@@ -1996,25 +1396,14 @@ class ServiceabilityPlatformModel {
1996
1396
  });
1997
1397
  }
1998
1398
 
1999
- /** @returns {PincodeCodStatusListingPage} */
2000
- static PincodeCodStatusListingPage() {
2001
- return Joi.object({
2002
- current: Joi.number().required(),
2003
- has_next: Joi.boolean().required(),
2004
- item_total: Joi.number().required(),
2005
- size: Joi.number().required(),
2006
- type: Joi.string().allow("").required(),
2007
- });
2008
- }
2009
-
2010
1399
  /** @returns {PincodeCodStatusListingRequest} */
2011
1400
  static PincodeCodStatusListingRequest() {
2012
1401
  return Joi.object({
2013
1402
  country: Joi.string().allow(""),
2014
- current: Joi.number(),
2015
1403
  is_active: Joi.boolean(),
2016
- page_size: Joi.number(),
2017
1404
  pincode: Joi.number().allow(null),
1405
+ current: Joi.number(),
1406
+ page_size: Joi.number(),
2018
1407
  });
2019
1408
  }
2020
1409
 
@@ -2025,69 +1414,57 @@ class ServiceabilityPlatformModel {
2025
1414
  data: Joi.array()
2026
1415
  .items(Joi.link("#PincodeCodStatusListingResponse"))
2027
1416
  .required(),
1417
+ success: Joi.boolean().required(),
2028
1418
  errors: Joi.array().items(ServiceabilityPlatformModel.Error()),
2029
1419
  page: ServiceabilityPlatformModel.PincodeCodStatusListingPage().required(),
2030
- success: Joi.boolean().required(),
2031
1420
  summary: ServiceabilityPlatformModel.PincodeCodStatusListingSummary().required(),
2032
- });
1421
+ }).id("PincodeCodStatusListingResponse");
2033
1422
  }
2034
1423
 
2035
- /** @returns {PincodeCodStatusListingSummary} */
2036
- static PincodeCodStatusListingSummary() {
1424
+ /** @returns {Error} */
1425
+ static Error() {
2037
1426
  return Joi.object({
2038
- total_active_pincodes: Joi.number().required(),
2039
- total_inactive_pincodes: Joi.number().required(),
1427
+ type: Joi.string().allow("").allow(null),
1428
+ value: Joi.string().allow("").allow(null),
1429
+ message: Joi.string().allow("").allow(null),
2040
1430
  });
2041
1431
  }
2042
1432
 
2043
- /** @returns {PincodeMopBulkData} */
2044
- static PincodeMopBulkData() {
1433
+ /** @returns {PincodeCodStatusListingPage} */
1434
+ static PincodeCodStatusListingPage() {
2045
1435
  return Joi.object({
2046
- batch_id: Joi.string().allow("").required(),
2047
- s3_url: Joi.string().allow("").required(),
1436
+ type: Joi.string().allow("").required(),
1437
+ has_next: Joi.boolean().required(),
1438
+ item_total: Joi.number().required(),
1439
+ size: Joi.number().required(),
1440
+ current: Joi.number().required(),
2048
1441
  });
2049
1442
  }
2050
1443
 
2051
- /** @returns {PincodeMopData} */
2052
- static PincodeMopData() {
1444
+ /** @returns {PincodeCodStatusListingSummary} */
1445
+ static PincodeCodStatusListingSummary() {
2053
1446
  return Joi.object({
2054
- action: Joi.string().allow("").required(),
2055
- country: Joi.string().allow("").required(),
2056
- pincodes: Joi.array().items(Joi.number()).required(),
1447
+ total_active_pincodes: Joi.number().required(),
1448
+ total_inactive_pincodes: Joi.number().required(),
2057
1449
  });
2058
1450
  }
2059
1451
 
2060
- /** @returns {PincodeMOPresponse} */
2061
- static PincodeMOPresponse() {
1452
+ /** @returns {PincodeMopUpdateAuditHistoryRequest} */
1453
+ static PincodeMopUpdateAuditHistoryRequest() {
2062
1454
  return Joi.object({
2063
- action: Joi.string().allow("").required(),
2064
- batch_id: Joi.string().allow("").required(),
2065
- country: Joi.string().allow("").required(),
2066
- pincodes: Joi.array().items(Joi.number()),
2067
- status_code: Joi.number().required(),
2068
- success: Joi.boolean().required(),
2069
- updated_pincodes: Joi.array().items(
2070
- ServiceabilityPlatformModel.PincodeMopUpdateResponse()
2071
- ),
1455
+ entity_type: Joi.string().allow("").required(),
1456
+ file_name: Joi.string().allow(""),
2072
1457
  });
2073
1458
  }
2074
1459
 
2075
1460
  /** @returns {PincodeMopUpdateAuditHistoryPaging} */
2076
1461
  static PincodeMopUpdateAuditHistoryPaging() {
2077
1462
  return Joi.object({
1463
+ type: Joi.string().allow(""),
1464
+ size: Joi.number(),
2078
1465
  current: Joi.number(),
2079
1466
  has_next: Joi.boolean(),
2080
1467
  item_total: Joi.number(),
2081
- size: Joi.number(),
2082
- type: Joi.string().allow(""),
2083
- });
2084
- }
2085
-
2086
- /** @returns {PincodeMopUpdateAuditHistoryRequest} */
2087
- static PincodeMopUpdateAuditHistoryRequest() {
2088
- return Joi.object({
2089
- entity_type: Joi.string().allow("").required(),
2090
- file_name: Joi.string().allow(""),
2091
1468
  });
2092
1469
  }
2093
1470
 
@@ -2097,362 +1474,267 @@ class ServiceabilityPlatformModel {
2097
1474
  batch_id: Joi.string().allow(""),
2098
1475
  entity_type: Joi.string().allow(""),
2099
1476
  error_file_s3_url: Joi.string().allow(""),
2100
- file_name: Joi.string().allow(""),
2101
1477
  s3_url: Joi.string().allow(""),
2102
- success: Joi.boolean(),
1478
+ file_name: Joi.string().allow(""),
2103
1479
  updated_at: Joi.string().allow(""),
2104
1480
  updated_by: Joi.string().allow(""),
1481
+ success: Joi.boolean(),
2105
1482
  });
2106
1483
  }
2107
1484
 
2108
1485
  /** @returns {PincodeMopUpdateAuditHistoryResponseData} */
2109
1486
  static PincodeMopUpdateAuditHistoryResponseData() {
2110
1487
  return Joi.object({
1488
+ entity_type: Joi.string().allow(""),
1489
+ page: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryPaging().required(),
2111
1490
  data: Joi.array()
2112
1491
  .items(
2113
1492
  ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResponse()
2114
1493
  )
2115
1494
  .required(),
2116
- entity_type: Joi.string().allow(""),
2117
- page: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryPaging().required(),
2118
- });
2119
- }
2120
-
2121
- /** @returns {PincodeMopUpdateResponse} */
2122
- static PincodeMopUpdateResponse() {
2123
- return Joi.object({
2124
- channel_id: Joi.string().allow("").required(),
2125
- country: Joi.string().allow("").required(),
2126
- is_active: Joi.boolean().required(),
2127
- pincode: Joi.number().required(),
2128
1495
  });
2129
1496
  }
2130
1497
 
2131
- /** @returns {ProductReturnConfigResponse} */
2132
- static ProductReturnConfigResponse() {
1498
+ /** @returns {Dp1} */
1499
+ static Dp1() {
2133
1500
  return Joi.object({
2134
- on_same_store: Joi.boolean(),
1501
+ is_self_ship: Joi.boolean().required(),
1502
+ name: Joi.string().allow("").required(),
1503
+ plan_id: Joi.string().allow("").required(),
1504
+ stage: Joi.string().allow("").required(),
1505
+ account_id: Joi.string().allow("").required(),
1506
+ dp_id: Joi.string().allow("").required(),
1507
+ plan_rules: Joi.any().required(),
2135
1508
  });
2136
1509
  }
2137
1510
 
2138
- /** @returns {ReAssignStoreRequest} */
2139
- static ReAssignStoreRequest() {
1511
+ /** @returns {CompanyDpAccountRequest} */
1512
+ static CompanyDpAccountRequest() {
2140
1513
  return Joi.object({
2141
- articles: Joi.array().items(Joi.any()).required(),
2142
- configuration: Joi.any().required(),
2143
- identifier: Joi.string().allow("").required(),
2144
- ignored_locations: Joi.array().items(Joi.string().allow("")).required(),
2145
- to_pincode: Joi.string().allow("").required(),
1514
+ data: Joi.array().items(ServiceabilityPlatformModel.Dp1()).required(),
2146
1515
  });
2147
1516
  }
2148
1517
 
2149
- /** @returns {ReAssignStoreResponse} */
2150
- static ReAssignStoreResponse() {
1518
+ /** @returns {CompanyDpAccountResponse} */
1519
+ static CompanyDpAccountResponse() {
2151
1520
  return Joi.object({
2152
- articles: Joi.array().items(Joi.any()),
2153
- error: Joi.any().required(),
2154
1521
  success: Joi.boolean().required(),
2155
- to_pincode: Joi.string().allow("").required(),
2156
- });
2157
- }
2158
-
2159
- /** @returns {RulePriorityRequest} */
2160
- static RulePriorityRequest() {
2161
- return Joi.object({
2162
- priority: Joi.number().required(),
2163
- rule_id: Joi.string().allow("").required(),
2164
- });
2165
- }
2166
-
2167
- /** @returns {RulePriorityResponse} */
2168
- static RulePriorityResponse() {
2169
- return Joi.object({
2170
- success: Joi.boolean(),
2171
- });
2172
- }
2173
-
2174
- /** @returns {SchemeRules} */
2175
- static SchemeRules() {
2176
- return Joi.object({
2177
- feature: ServiceabilityPlatformModel.SchemeRulesFeatures(),
2178
- payment_mode: Joi.array().items(Joi.string().allow("")),
2179
- region: Joi.string().allow(""),
2180
- transport_type: Joi.array().items(Joi.string().allow("")),
2181
- weight: ServiceabilityPlatformModel.ArithmeticOperations(),
2182
- });
2183
- }
2184
-
2185
- /** @returns {SchemeRulesFeatures} */
2186
- static SchemeRulesFeatures() {
2187
- return Joi.object({
2188
- battery_operated: Joi.boolean(),
2189
- e_waybill: Joi.boolean(),
2190
- flammable: Joi.boolean(),
2191
- hazmat: Joi.boolean(),
2192
- multi_part_shipments: Joi.boolean(),
2193
- quality_check: Joi.boolean(),
2194
- quick_response_code: Joi.boolean(),
2195
- });
2196
- }
2197
-
2198
- /** @returns {SelfShipResponse} */
2199
- static SelfShipResponse() {
2200
- return Joi.object({
2201
- is_active: Joi.boolean().required(),
2202
- tat: Joi.number().required(),
2203
1522
  });
2204
1523
  }
2205
1524
 
2206
- /** @returns {ServiceabilityErrorResponse} */
2207
- static ServiceabilityErrorResponse() {
1525
+ /** @returns {ErrorResponse} */
1526
+ static ErrorResponse() {
2208
1527
  return Joi.object({
2209
1528
  message: Joi.string().allow("").required(),
2210
- type: Joi.string().allow("").required(),
2211
1529
  value: Joi.string().allow("").required(),
1530
+ type: Joi.string().allow("").required(),
2212
1531
  });
2213
1532
  }
2214
1533
 
2215
- /** @returns {ServiceabilityModel} */
2216
- static ServiceabilityModel() {
1534
+ /** @returns {DpAccountFailureResponse} */
1535
+ static DpAccountFailureResponse() {
2217
1536
  return Joi.object({
2218
- is_first_mile: Joi.boolean().required(),
2219
- is_installation: Joi.boolean().required(),
2220
- is_last_mile: Joi.boolean().required(),
2221
- is_qc: Joi.boolean().required(),
2222
- is_return: Joi.boolean().required(),
2223
- lm_cod_limit: Joi.number().required(),
2224
- pickup_cutoff: Joi.string().allow("").allow(null).required(),
2225
- route_code: Joi.string().allow("").allow(null).required(),
1537
+ status_code: Joi.number().required(),
1538
+ error: Joi.array()
1539
+ .items(ServiceabilityPlatformModel.ErrorResponse())
1540
+ .required(),
1541
+ success: Joi.boolean().required(),
2226
1542
  });
2227
1543
  }
2228
1544
 
2229
- /** @returns {ServiceabilityPageResponse} */
2230
- static ServiceabilityPageResponse() {
1545
+ /** @returns {Page} */
1546
+ static Page() {
2231
1547
  return Joi.object({
2232
- current: Joi.number(),
2233
- has_next: Joi.boolean(),
2234
1548
  item_total: Joi.number(),
1549
+ next_id: Joi.string().allow(""),
1550
+ has_previous: Joi.boolean(),
1551
+ has_next: Joi.boolean(),
1552
+ current: Joi.number(),
1553
+ type: Joi.string().allow("").required(),
2235
1554
  size: Joi.number(),
2236
- type: Joi.string().allow(""),
2237
1555
  });
2238
1556
  }
2239
1557
 
2240
- /** @returns {StorePrioritySchema} */
2241
- static StorePrioritySchema() {
1558
+ /** @returns {CompanyDpAccountListResponse} */
1559
+ static CompanyDpAccountListResponse() {
2242
1560
  return Joi.object({
2243
- id: Joi.string().allow(""),
2244
- name: Joi.string().allow(""),
1561
+ success: Joi.boolean().required(),
1562
+ page: ServiceabilityPlatformModel.Page().required(),
1563
+ items: Joi.array().items(ServiceabilityPlatformModel.Dp1()).required(),
2245
1564
  });
2246
1565
  }
2247
1566
 
2248
- /** @returns {StoreRuleConditionSchema} */
2249
- static StoreRuleConditionSchema() {
1567
+ /** @returns {DpRulesUpdateRequest} */
1568
+ static DpRulesUpdateRequest() {
2250
1569
  return Joi.object({
2251
- brand_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2252
- category_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2253
- customer_radius: ServiceabilityPlatformModel.CustomerRadiusSchema(),
2254
- department_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2255
- order_place_date: ServiceabilityPlatformModel.ArithmeticOperations(),
2256
- product_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2257
- product_tags: ServiceabilityPlatformModel.StringComparisonOperations(),
2258
- store_tags: ServiceabilityPlatformModel.StringComparisonOperations(),
2259
- store_type: ServiceabilityPlatformModel.StringComparisonOperations(),
2260
- to_location: ServiceabilityPlatformModel.LocationRule(),
2261
- zone_ids: ServiceabilityPlatformModel.StringComparisonOperations(),
1570
+ is_active: Joi.boolean().required(),
1571
+ conditions: Joi.array().items(Joi.any()).required(),
1572
+ dp_ids: Joi.object().pattern(/\S/, Joi.any()).required(),
1573
+ name: Joi.string().allow("").required(),
2262
1574
  });
2263
1575
  }
2264
1576
 
2265
- /** @returns {StoreRuleConfigData} */
2266
- static StoreRuleConfigData() {
1577
+ /** @returns {DpRuleResponse} */
1578
+ static DpRuleResponse() {
2267
1579
  return Joi.object({
2268
- rule_ids: Joi.array().items(Joi.string().allow("")),
2269
- sort: Joi.array().items(Joi.string().allow("")),
2270
- store_priority: Joi.array().items(
2271
- ServiceabilityPlatformModel.StorePrioritySchema()
2272
- ),
2273
- tag_based_priority: Joi.array().items(Joi.string().allow("")),
2274
- type_based_priority: Joi.array().items(Joi.string().allow("")),
1580
+ created_on: Joi.string().allow(""),
1581
+ name: Joi.string().allow("").required(),
1582
+ modified_by: Joi.any(),
1583
+ dp_ids: Joi.any().required(),
1584
+ is_active: Joi.boolean(),
1585
+ modified_on: Joi.string().allow(""),
1586
+ uid: Joi.string().allow("").required(),
1587
+ created_by: Joi.any(),
1588
+ company_id: Joi.number().required(),
1589
+ conditions: Joi.array().items(Joi.string().allow("")).required(),
2275
1590
  });
2276
1591
  }
2277
1592
 
2278
- /** @returns {StoreRuleDataSchema} */
2279
- static StoreRuleDataSchema() {
1593
+ /** @returns {DpRuleUpdateSuccessResponse} */
1594
+ static DpRuleUpdateSuccessResponse() {
2280
1595
  return Joi.object({
2281
- application_id: Joi.string().allow(""),
2282
- company_id: Joi.number(),
2283
- conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
2284
- id: Joi.string().allow(""),
2285
- is_active: Joi.boolean(),
2286
- name: Joi.string().allow(""),
2287
- sort: Joi.array().items(Joi.string().allow("")),
2288
- store_priority: Joi.array().items(
2289
- ServiceabilityPlatformModel.StorePrioritySchema()
2290
- ),
2291
- tag_based_priority: Joi.array().items(Joi.string().allow("")),
2292
- type_based_priority: Joi.array().items(Joi.string().allow("")),
1596
+ status_code: Joi.number().required(),
1597
+ data: ServiceabilityPlatformModel.DpRuleResponse().required(),
1598
+ success: Joi.boolean().required(),
2293
1599
  });
2294
1600
  }
2295
1601
 
2296
- /** @returns {StoreRuleResponseSchema} */
2297
- static StoreRuleResponseSchema() {
1602
+ /** @returns {FailureResponse} */
1603
+ static FailureResponse() {
2298
1604
  return Joi.object({
2299
- conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
2300
- id: Joi.string().allow(""),
2301
- is_active: Joi.boolean(),
2302
- name: Joi.string().allow(""),
2303
- sort: Joi.array().items(Joi.string().allow("")),
2304
- store_priority: Joi.array().items(
2305
- ServiceabilityPlatformModel.StorePrioritySchema()
2306
- ),
2307
- tag_based_priority: Joi.array().items(Joi.string().allow("")),
2308
- type: Joi.string().allow(""),
2309
- type_based_priority: Joi.array().items(Joi.string().allow("")),
1605
+ status_code: Joi.number().required(),
1606
+ error: Joi.array()
1607
+ .items(ServiceabilityPlatformModel.ErrorResponse())
1608
+ .required(),
1609
+ success: Joi.boolean().required(),
2310
1610
  });
2311
1611
  }
2312
1612
 
2313
- /** @returns {StoreRuleUpdateResponseSchema} */
2314
- static StoreRuleUpdateResponseSchema() {
1613
+ /** @returns {DpSchemaInRuleListing} */
1614
+ static DpSchemaInRuleListing() {
2315
1615
  return Joi.object({
2316
- application_id: Joi.string().allow(""),
2317
- company_id: Joi.number(),
2318
- conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
2319
- id: Joi.string().allow(""),
2320
- is_active: Joi.boolean(),
2321
- name: Joi.string().allow(""),
2322
- sort: Joi.array().items(Joi.string().allow("")),
2323
- store_priority: Joi.array().items(
2324
- ServiceabilityPlatformModel.StorePrioritySchema()
2325
- ),
2326
- tag_based_priority: Joi.array().items(Joi.string().allow("")),
2327
- type: Joi.string().allow(""),
2328
- type_based_priority: Joi.array().items(Joi.string().allow("")),
1616
+ is_self_ship: Joi.boolean().required(),
1617
+ name: Joi.string().allow("").required(),
1618
+ plan_id: Joi.string().allow("").required(),
1619
+ stage: Joi.string().allow("").required(),
1620
+ account_id: Joi.string().allow("").required(),
1621
+ priority: Joi.number().required(),
1622
+ dp_id: Joi.string().allow("").required(),
1623
+ plan_rules: Joi.any().required(),
2329
1624
  });
2330
1625
  }
2331
1626
 
2332
- /** @returns {StringComparisonOperations} */
2333
- static StringComparisonOperations() {
1627
+ /** @returns {DpRule} */
1628
+ static DpRule() {
2334
1629
  return Joi.object({
2335
- includes: Joi.array().items(Joi.string().allow("")),
1630
+ name: Joi.string().allow("").required(),
1631
+ dp_ids: Joi.object()
1632
+ .pattern(/\S/, ServiceabilityPlatformModel.DpSchemaInRuleListing())
1633
+ .required(),
1634
+ is_active: Joi.boolean(),
1635
+ company_id: Joi.number(),
1636
+ conditions: Joi.array().items(Joi.any()).required(),
2336
1637
  });
2337
1638
  }
2338
1639
 
2339
- /** @returns {TimmingResponse} */
2340
- static TimmingResponse() {
1640
+ /** @returns {DpRuleSuccessResponse} */
1641
+ static DpRuleSuccessResponse() {
2341
1642
  return Joi.object({
2342
- closing: ServiceabilityPlatformModel.OpeningClosing(),
2343
- open: Joi.boolean(),
2344
- opening: ServiceabilityPlatformModel.OpeningClosing(),
2345
- weekday: Joi.string().allow(""),
1643
+ status_code: Joi.number().required(),
1644
+ data: ServiceabilityPlatformModel.DpRule().required(),
1645
+ success: Joi.boolean().required(),
2346
1646
  });
2347
1647
  }
2348
1648
 
2349
- /** @returns {UpdateZoneConfigRequest} */
2350
- static UpdateZoneConfigRequest() {
1649
+ /** @returns {DpIds} */
1650
+ static DpIds() {
2351
1651
  return Joi.object({
2352
- serviceability_type: Joi.string().allow(""),
1652
+ enabled: Joi.boolean().required(),
1653
+ priority: Joi.number().required(),
1654
+ meta: Joi.any(),
2353
1655
  });
2354
1656
  }
2355
1657
 
2356
- /** @returns {UpdateZoneData} */
2357
- static UpdateZoneData() {
1658
+ /** @returns {DpRuleRequest} */
1659
+ static DpRuleRequest() {
2358
1660
  return Joi.object({
2359
- assignment_preference: Joi.string().allow(""),
2360
- channels: Joi.array()
2361
- .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
2362
- .required(),
2363
- company_id: Joi.number().required(),
2364
- is_active: Joi.boolean().required(),
2365
- mapping: Joi.array()
2366
- .items(ServiceabilityPlatformModel.ZoneMappingType())
2367
- .required(),
2368
1661
  name: Joi.string().allow("").required(),
2369
- product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
2370
- region_type: Joi.string().allow("").required(),
2371
- slug: Joi.string().allow("").required(),
2372
- store_ids: Joi.array().items(Joi.number()).required(),
2373
- zone_id: Joi.string().allow("").required(),
1662
+ dp_ids: Joi.object()
1663
+ .pattern(/\S/, ServiceabilityPlatformModel.DpIds())
1664
+ .required(),
1665
+ is_active: Joi.boolean(),
1666
+ company_id: Joi.number(),
1667
+ conditions: Joi.array().items(Joi.any()).required(),
2374
1668
  });
2375
1669
  }
2376
1670
 
2377
- /** @returns {WarningsResponse} */
2378
- static WarningsResponse() {
1671
+ /** @returns {DpMultipleRuleSuccessResponse} */
1672
+ static DpMultipleRuleSuccessResponse() {
2379
1673
  return Joi.object({
2380
- store_address: Joi.string().allow(""),
1674
+ success: Joi.boolean().required(),
1675
+ page: ServiceabilityPlatformModel.Page().required(),
1676
+ items: Joi.array().items(ServiceabilityPlatformModel.DpRule()).required(),
2381
1677
  });
2382
1678
  }
2383
1679
 
2384
- /** @returns {Zone} */
2385
- static Zone() {
1680
+ /** @returns {DPCompanyRuleRequest} */
1681
+ static DPCompanyRuleRequest() {
2386
1682
  return Joi.object({
2387
- assignment_preference: Joi.string().allow("").required(),
2388
- is_active: Joi.boolean().required(),
2389
- name: Joi.string().allow("").required(),
2390
- slug: Joi.string().allow("").required(),
2391
- store_ids: Joi.array().items(Joi.number()).required(),
2392
- tags: Joi.array().items(Joi.string().allow("")).required(),
2393
- type: Joi.string().allow("").required(),
2394
- zone_id: Joi.string().allow("").required(),
1683
+ rule_ids: Joi.array().items(Joi.string().allow("")).required(),
2395
1684
  });
2396
1685
  }
2397
1686
 
2398
- /** @returns {ZoneConfig} */
2399
- static ZoneConfig() {
1687
+ /** @returns {DPCompanyRuleResponse} */
1688
+ static DPCompanyRuleResponse() {
2400
1689
  return Joi.object({
2401
- serviceability_type: Joi.string().allow(""),
1690
+ status_code: Joi.number().required(),
1691
+ data: Joi.array()
1692
+ .items(ServiceabilityPlatformModel.DpRuleResponse())
1693
+ .required(),
1694
+ success: Joi.boolean().required(),
2402
1695
  });
2403
1696
  }
2404
1697
 
2405
- /** @returns {ZoneDataItem} */
2406
- static ZoneDataItem() {
1698
+ /** @returns {DPApplicationRuleRequest} */
1699
+ static DPApplicationRuleRequest() {
2407
1700
  return Joi.object({
2408
- current: Joi.number().required(),
2409
- has_next: Joi.boolean().required(),
2410
- item_total: Joi.number().required(),
2411
- size: Joi.number().required(),
2412
- type: Joi.string().allow("").required(),
1701
+ shipping_rules: Joi.array().items(Joi.string().allow("")).required(),
2413
1702
  });
2414
1703
  }
2415
1704
 
2416
- /** @returns {ZoneMappingType} */
2417
- static ZoneMappingType() {
1705
+ /** @returns {DPApplicationRuleResponse} */
1706
+ static DPApplicationRuleResponse() {
2418
1707
  return Joi.object({
2419
- country: Joi.string().allow("").required(),
2420
- pincode: Joi.array().items(Joi.string().allow("")),
2421
- state: Joi.array().items(Joi.string().allow("")),
1708
+ status_code: Joi.boolean().required(),
1709
+ data: Joi.array()
1710
+ .items(ServiceabilityPlatformModel.DpRuleResponse())
1711
+ .required(),
1712
+ success: Joi.boolean().required(),
2422
1713
  });
2423
1714
  }
2424
1715
 
2425
- /** @returns {ZoneProductTypes} */
2426
- static ZoneProductTypes() {
1716
+ /** @returns {SelfShipResponse} */
1717
+ static SelfShipResponse() {
2427
1718
  return Joi.object({
2428
- tags: Joi.array().items(Joi.string().allow("")).required(),
2429
- type: Joi.string().allow("").required(),
1719
+ is_active: Joi.boolean().required(),
1720
+ tat: Joi.number().required(),
2430
1721
  });
2431
1722
  }
2432
1723
 
2433
- /** @returns {ZoneResponse} */
2434
- static ZoneResponse() {
1724
+ /** @returns {ApplicationSelfShipConfig} */
1725
+ static ApplicationSelfShipConfig() {
2435
1726
  return Joi.object({
2436
- status_code: Joi.number().required(),
2437
- success: Joi.boolean().required(),
2438
- zone_id: Joi.string().allow("").required(),
1727
+ self_ship: Joi.any().allow(null),
2439
1728
  });
2440
1729
  }
2441
1730
 
2442
- /** @returns {ZoneSuccessResponse} */
2443
- static ZoneSuccessResponse() {
1731
+ /** @returns {ApplicationSelfShipConfigResponse} */
1732
+ static ApplicationSelfShipConfigResponse() {
2444
1733
  return Joi.object({
2445
- status_code: Joi.number().required(),
1734
+ error: ServiceabilityPlatformModel.ServiceabilityErrorResponse(),
1735
+ data: ServiceabilityPlatformModel.ApplicationSelfShipConfig(),
2446
1736
  success: Joi.boolean().required(),
2447
1737
  });
2448
1738
  }
2449
-
2450
- /** @returns {ZoneUpdateRequest} */
2451
- static ZoneUpdateRequest() {
2452
- return Joi.object({
2453
- data: ServiceabilityPlatformModel.UpdateZoneData().required(),
2454
- identifier: Joi.string().allow("").required(),
2455
- });
2456
- }
2457
1739
  }
2458
1740
  module.exports = ServiceabilityPlatformModel;