@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.4.0-beta.1

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 (231) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  4. package/sdk/application/Cart/CartApplicationClient.js +5 -3
  5. package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
  6. package/sdk/application/Cart/CartApplicationModel.js +74 -0
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
  8. package/sdk/application/Cart/CartApplicationValidator.js +4 -0
  9. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
  10. package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
  11. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
  12. package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
  13. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
  14. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
  15. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
  16. package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
  17. package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
  18. package/sdk/application/Content/ContentApplicationClient.js +246 -0
  19. package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
  20. package/sdk/application/Content/ContentApplicationModel.js +252 -0
  21. package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
  22. package/sdk/application/Content/ContentApplicationValidator.js +41 -0
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
  25. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
  26. package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
  27. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
  28. package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
  29. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  30. package/sdk/application/Order/OrderApplicationClient.js +32 -8
  31. package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
  32. package/sdk/application/Order/OrderApplicationModel.js +6 -0
  33. package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
  34. package/sdk/application/Order/OrderApplicationValidator.js +8 -0
  35. package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
  36. package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
  37. package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
  38. package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
  39. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
  40. package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
  41. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
  42. package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
  43. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  44. package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
  45. package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
  46. package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
  47. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
  48. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
  49. package/sdk/application/User/UserApplicationClient.d.ts +33 -0
  50. package/sdk/application/User/UserApplicationClient.js +239 -0
  51. package/sdk/application/User/UserApplicationModel.d.ts +28 -13
  52. package/sdk/application/User/UserApplicationModel.js +36 -12
  53. package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
  54. package/sdk/application/User/UserApplicationValidator.js +36 -0
  55. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +3 -15
  56. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
  57. package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
  58. package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
  59. package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
  60. package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
  61. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
  62. package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
  63. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
  64. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
  65. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
  66. package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
  67. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
  68. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
  69. package/sdk/partner/PartnerClient.d.ts +6 -0
  70. package/sdk/partner/PartnerClient.js +9 -0
  71. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
  72. package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
  73. package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
  74. package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
  75. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
  76. package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
  77. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
  78. package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
  79. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
  80. package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
  81. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
  82. package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
  83. package/sdk/partner/index.d.ts +3 -0
  84. package/sdk/partner/index.js +6 -0
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  86. package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
  87. package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
  88. package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
  89. package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
  90. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
  91. package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
  92. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
  94. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
  96. package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
  97. package/sdk/platform/Cart/CartPlatformModel.js +71 -4
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
  112. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
  114. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
  120. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  122. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
  123. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
  124. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  125. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  126. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
  127. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3641 -1059
  128. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +351 -1
  129. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +410 -0
  130. package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
  131. package/sdk/platform/Content/ContentPlatformClient.js +2011 -0
  132. package/sdk/platform/Content/ContentPlatformModel.d.ts +1100 -1
  133. package/sdk/platform/Content/ContentPlatformModel.js +1362 -46
  134. package/sdk/platform/Content/ContentPlatformValidator.d.ts +247 -0
  135. package/sdk/platform/Content/ContentPlatformValidator.js +319 -0
  136. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  137. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  138. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
  139. package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
  142. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
  143. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
  144. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +18 -19
  145. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -18
  146. package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
  147. package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
  148. package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
  149. package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
  150. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
  151. package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
  152. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
  153. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
  154. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
  155. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
  156. package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
  157. package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
  159. package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
  161. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
  162. package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
  163. package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
  164. package/sdk/platform/Order/OrderPlatformModel.d.ts +1032 -470
  165. package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
  166. package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
  167. package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
  168. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
  169. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
  170. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
  171. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
  172. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  173. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  174. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
  175. package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
  176. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  177. package/sdk/platform/PlatformApplicationClient.js +4 -4
  178. package/sdk/platform/PlatformClient.d.ts +4 -2
  179. package/sdk/platform/PlatformClient.js +8 -4
  180. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
  181. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
  182. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
  183. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
  190. package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
  191. package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
  192. package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
  193. package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
  194. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
  195. package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
  196. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
  197. package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
  198. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
  199. package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
  200. package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
  201. package/sdk/platform/User/UserPlatformModel.js +256 -5
  202. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
  203. package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
  204. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
  205. package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
  206. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
  207. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  208. package/sdk/platform/index.d.ts +1 -1
  209. package/sdk/platform/index.js +2 -2
  210. package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
  211. package/sdk/public/Billing/BillingPublicClient.js +116 -0
  212. package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
  213. package/sdk/public/Billing/BillingPublicModel.js +96 -0
  214. package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
  215. package/sdk/public/Billing/BillingPublicValidator.js +19 -0
  216. package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
  217. package/sdk/public/Content/ContentPublicClient.js +114 -0
  218. package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
  219. package/sdk/public/Content/ContentPublicModel.js +60 -0
  220. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
  221. package/sdk/public/Content/ContentPublicValidator.js +19 -0
  222. package/sdk/public/PublicClient.d.ts +4 -0
  223. package/sdk/public/PublicClient.js +8 -0
  224. package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
  225. package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
  226. package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
  227. package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
  228. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
  229. package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
  230. package/sdk/public/index.d.ts +2 -0
  231. package/sdk/public/index.js +4 -0
@@ -14,16 +14,10 @@ const Joi = require("joi");
14
14
  */
15
15
 
16
16
  /**
17
- * @typedef ApplicationCompanyDpViewRequest
18
- * @property {string} [dp_id]
19
- */
20
-
21
- /**
22
- * @typedef ApplicationCompanyDpViewResponse
23
- * @property {string} application_id
24
- * @property {number} company_id
25
- * @property {number} [courier_partner_id]
26
- * @property {boolean} success
17
+ * @typedef ApplicationConfig
18
+ * @property {string[]} [rule_ids]
19
+ * @property {string[]} [sort]
20
+ * @property {ZoneConfig} [zones]
27
21
  */
28
22
 
29
23
  /**
@@ -53,27 +47,66 @@ const Joi = require("joi");
53
47
  */
54
48
 
55
49
  /**
56
- * @typedef CommonError
57
- * @property {Object} [error]
58
- * @property {string} [status_code]
59
- * @property {string} [success]
50
+ * @typedef ArithmeticOperations
51
+ * @property {number} [gt]
52
+ * @property {number} [gte]
53
+ * @property {number} [lt]
54
+ * @property {number} [lte]
55
+ */
56
+
57
+ /**
58
+ * @typedef BulkRegionJobSerializer
59
+ * @property {string} action
60
+ * @property {string} country
61
+ * @property {string} [file_path]
62
+ * @property {string} region
60
63
  */
61
64
 
62
65
  /**
63
- * @typedef CompanyDpAccountListResponse
64
- * @property {Dp1[]} items
66
+ * @typedef BulkRegionResponse
67
+ * @property {BulkRegionResponseItemData[]} items
65
68
  * @property {Page} page
66
- * @property {boolean} success
67
69
  */
68
70
 
69
71
  /**
70
- * @typedef CompanyDpAccountRequest
71
- * @property {Dp1[]} data
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]
72
84
  */
73
85
 
74
86
  /**
75
- * @typedef CompanyDpAccountResponse
76
- * @property {boolean} success
87
+ * @typedef Channel
88
+ * @property {string} [id]
89
+ * @property {string} [type]
90
+ */
91
+
92
+ /**
93
+ * @typedef CommonError
94
+ * @property {Object} [error]
95
+ * @property {string} [status_code]
96
+ * @property {string} [success]
97
+ */
98
+
99
+ /**
100
+ * @typedef CompanyConfig
101
+ * @property {boolean} [logistics_as_actual]
102
+ * @property {string[]} rule_ids
103
+ * @property {string[]} sort
104
+ */
105
+
106
+ /**
107
+ * @typedef CompanyCourierPartnerAccountListResponse
108
+ * @property {CourierAccountResponse[]} items
109
+ * @property {Page} page
77
110
  */
78
111
 
79
112
  /**
@@ -98,167 +131,168 @@ const Joi = require("joi");
98
131
  */
99
132
 
100
133
  /**
101
- * @typedef CreatedByResponse
102
- * @property {string} [user_id]
103
- * @property {string} [username]
104
- */
105
-
106
- /**
107
- * @typedef CreateZoneData
108
- * @property {string} [assignment_preference]
109
- * @property {GetZoneDataViewChannels[]} channels
110
- * @property {number} company_id
111
- * @property {boolean} is_active
112
- * @property {ZoneMappingType[]} mapping
113
- * @property {string} name
114
- * @property {ZoneProductTypes} product
115
- * @property {string} region_type
116
- * @property {string} slug
117
- * @property {number[]} store_ids
118
- */
119
-
120
- /**
121
- * @typedef DocumentsResponse
122
- * @property {string} [legal_name]
123
- * @property {string} [type]
124
- * @property {string} [value]
125
- * @property {boolean} [verified]
126
- */
127
-
128
- /**
129
- * @typedef Dp
130
- * @property {number} [area_code]
131
- * @property {boolean} [assign_dp_from_sb]
132
- * @property {string} [external_account_id]
133
- * @property {number} [fm_priority]
134
- * @property {string} [internal_account_id]
135
- * @property {number} [lm_priority]
136
- * @property {string[]} [operations]
137
- * @property {string} [payment_mode]
138
- * @property {number} [rvp_priority]
139
- * @property {string} [transport_mode]
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
140
141
  */
141
142
 
142
143
  /**
143
- * @typedef Dp1
144
+ * @typedef CourierAccountResponse
144
145
  * @property {string} account_id
145
- * @property {string} dp_id
146
+ * @property {boolean} is_own_account
146
147
  * @property {boolean} is_self_ship
147
- * @property {string} name
148
- * @property {string} plan_id
149
- * @property {Object} plan_rules
148
+ * @property {string} scheme_id
149
+ * @property {CourierPartnerSchemeModel} scheme_rules
150
150
  * @property {string} stage
151
151
  */
152
152
 
153
153
  /**
154
- * @typedef DpAccountFailureResponse
154
+ * @typedef CourierPartnerAccountFailureResponse
155
155
  * @property {ErrorResponse[]} error
156
- * @property {number} status_code
157
156
  * @property {boolean} success
158
157
  */
159
158
 
160
159
  /**
161
- * @typedef DPApplicationRuleRequest
162
- * @property {string[]} shipping_rules
163
- */
164
-
165
- /**
166
- * @typedef DPApplicationRuleResponse
167
- * @property {DpRuleResponse[]} data
168
- * @property {boolean} status_code
169
- * @property {boolean} success
160
+ * @typedef CourierPartnerList
161
+ * @property {string} account_id
162
+ * @property {string} extension_id
163
+ * @property {boolean} is_self_ship
164
+ * @property {string} name
170
165
  */
171
166
 
172
167
  /**
173
- * @typedef DPCompanyRuleRequest
174
- * @property {string[]} rule_ids
168
+ * @typedef CourierPartnerRule
169
+ * @property {CourierPartnerRuleConditions} conditions
170
+ * @property {CourierPartnerList[]} [cp_list]
171
+ * @property {boolean} is_active
172
+ * @property {string} name
173
+ * @property {string[]} sort
175
174
  */
176
175
 
177
176
  /**
178
- * @typedef DPCompanyRuleResponse
179
- * @property {DpRuleResponse[]} data
180
- * @property {number} status_code
181
- * @property {boolean} success
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]
182
194
  */
183
195
 
184
196
  /**
185
- * @typedef DpIds
186
- * @property {boolean} enabled
187
- * @property {Object} [meta]
188
- * @property {number} priority
197
+ * @typedef CourierPartnerRulesListResponse
198
+ * @property {CourierPartnerRule[]} items
199
+ * @property {Page} page
189
200
  */
190
201
 
191
202
  /**
192
- * @typedef DpMultipleRuleSuccessResponse
193
- * @property {DpRule[]} items
194
- * @property {Page} page
195
- * @property {boolean} success
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
196
235
  */
197
236
 
198
237
  /**
199
- * @typedef DpRule
200
- * @property {number} [company_id]
201
- * @property {Object[]} conditions
202
- * @property {Object} dp_ids
203
- * @property {boolean} [is_active]
204
- * @property {string} name
238
+ * @typedef CreatedByResponse
239
+ * @property {string} [user_id]
240
+ * @property {string} [username]
205
241
  */
206
242
 
207
243
  /**
208
- * @typedef DpRuleRequest
209
- * @property {number} [company_id]
210
- * @property {Object[]} conditions
211
- * @property {Object} dp_ids
244
+ * @typedef CreateStoreRuleRequestSchema
245
+ * @property {StoreRuleConditionSchema} [conditions]
212
246
  * @property {boolean} [is_active]
213
- * @property {string} name
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]
214
252
  */
215
253
 
216
254
  /**
217
- * @typedef DpRuleResponse
255
+ * @typedef CreateZoneData
256
+ * @property {string} [assignment_preference]
257
+ * @property {GetZoneDataViewChannels[]} channels
218
258
  * @property {number} company_id
219
- * @property {string[]} conditions
220
- * @property {Object} [created_by]
221
- * @property {string} [created_on]
222
- * @property {Object} dp_ids
223
- * @property {boolean} [is_active]
224
- * @property {Object} [modified_by]
225
- * @property {string} [modified_on]
259
+ * @property {boolean} is_active
260
+ * @property {ZoneMappingType[]} mapping
226
261
  * @property {string} name
227
- * @property {string} uid
228
- */
229
-
230
- /**
231
- * @typedef DpRuleSuccessResponse
232
- * @property {DpRule} data
233
- * @property {number} status_code
234
- * @property {boolean} success
262
+ * @property {string} region_type
263
+ * @property {string} slug
264
+ * @property {number[]} store_ids
235
265
  */
236
266
 
237
267
  /**
238
- * @typedef DpRulesUpdateRequest
239
- * @property {Object[]} conditions
240
- * @property {Object} dp_ids
241
- * @property {boolean} is_active
242
- * @property {string} name
268
+ * @typedef CustomerRadiusSchema
269
+ * @property {number} [gt]
270
+ * @property {number} [gte]
271
+ * @property {number} [lt]
272
+ * @property {number} [lte]
273
+ * @property {string} unit
243
274
  */
244
275
 
245
276
  /**
246
- * @typedef DpRuleUpdateSuccessResponse
247
- * @property {DpRuleResponse} data
248
- * @property {number} status_code
249
- * @property {boolean} success
277
+ * @typedef DocumentsResponse
278
+ * @property {string} [legal_name]
279
+ * @property {string} [type]
280
+ * @property {string} [value]
281
+ * @property {boolean} [verified]
250
282
  */
251
283
 
252
284
  /**
253
- * @typedef DpSchemaInRuleListing
254
- * @property {string} account_id
255
- * @property {string} dp_id
256
- * @property {boolean} is_self_ship
257
- * @property {string} name
258
- * @property {string} plan_id
259
- * @property {Object} plan_rules
260
- * @property {number} priority
261
- * @property {string} stage
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]
262
296
  */
263
297
 
264
298
  /**
@@ -275,7 +309,6 @@ const Joi = require("joi");
275
309
 
276
310
  /**
277
311
  * @typedef EntityRegionView_Items
278
- * @property {string} [display_name]
279
312
  * @property {string} name
280
313
  * @property {string} sub_type
281
314
  * @property {string} uid
@@ -298,8 +331,8 @@ const Joi = require("joi");
298
331
 
299
332
  /**
300
333
  * @typedef EntityRegionView_Response
334
+ * @property {EntityRegionView_Items[]} data
301
335
  * @property {EntityRegionView_Error} error
302
- * @property {EntityRegionView_Items[]} [items]
303
336
  * @property {EntityRegionView_page} page
304
337
  * @property {boolean} success
305
338
  */
@@ -326,21 +359,48 @@ const Joi = require("joi");
326
359
  /**
327
360
  * @typedef FailureResponse
328
361
  * @property {ErrorResponse[]} error
329
- * @property {number} status_code
330
362
  * @property {boolean} success
331
363
  */
332
364
 
365
+ /**
366
+ * @typedef getAppRegionZonesResponse
367
+ * @property {ListViewItems[]} items
368
+ * @property {PageSchema[]} page
369
+ */
370
+
333
371
  /**
334
372
  * @typedef GetSingleZoneDataViewResponse
335
373
  * @property {GetZoneDataViewItems} data
336
374
  */
337
375
 
376
+ /**
377
+ * @typedef GetStoreRulesApiResponse
378
+ * @property {StoreRuleDataSchema[]} [items]
379
+ * @property {Page} [page]
380
+ */
381
+
338
382
  /**
339
383
  * @typedef GetStoresViewResponse
340
384
  * @property {ItemResponse[]} [items]
341
385
  * @property {ServiceabilityPageResponse} page
342
386
  */
343
387
 
388
+ /**
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
402
+ */
403
+
344
404
  /**
345
405
  * @typedef GetZoneDataViewChannels
346
406
  * @property {string} channel_id
@@ -355,9 +415,8 @@ const Joi = require("joi");
355
415
  * @property {boolean} is_active
356
416
  * @property {ZoneMappingType[]} mapping
357
417
  * @property {string} name
358
- * @property {number} pincodes_count
359
418
  * @property {ZoneProductTypes} product
360
- * @property {string} region_type
419
+ * @property {string} [region_type]
361
420
  * @property {string} slug
362
421
  * @property {number[]} store_ids
363
422
  * @property {number} stores_count
@@ -388,6 +447,11 @@ const Joi = require("joi");
388
447
  * @property {EwayBillResponse} [e_waybill]
389
448
  */
390
449
 
450
+ /**
451
+ * @typedef IntComparisonOperations
452
+ * @property {number[]} [includes]
453
+ */
454
+
391
455
  /**
392
456
  * @typedef IntegrationTypeResponse
393
457
  * @property {string} [inventory]
@@ -434,12 +498,12 @@ const Joi = require("joi");
434
498
 
435
499
  /**
436
500
  * @typedef ListViewItems
437
- * @property {ListViewChannels[]} channels
501
+ * @property {ListViewChannels} channels
438
502
  * @property {number} company_id
439
503
  * @property {boolean} is_active
440
504
  * @property {string} name
441
- * @property {number} pincodes_count
442
505
  * @property {ListViewProduct} product
506
+ * @property {number} regions_count
443
507
  * @property {string} slug
444
508
  * @property {number} stores_count
445
509
  * @property {string} zone_id
@@ -454,8 +518,7 @@ const Joi = require("joi");
454
518
  /**
455
519
  * @typedef ListViewResponse
456
520
  * @property {ListViewItems[]} items
457
- * @property {ZoneDataItem} page
458
- * @property {ListViewSummary} summary
521
+ * @property {ZoneDataItem[]} page
459
522
  */
460
523
 
461
524
  /**
@@ -465,6 +528,22 @@ const Joi = require("joi");
465
528
  * @property {number} total_zones
466
529
  */
467
530
 
531
+ /**
532
+ * @typedef LocationRule
533
+ * @property {LocationRuleValues[]} [includes]
534
+ * @property {string} [type]
535
+ */
536
+
537
+ /**
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]
545
+ */
546
+
468
547
  /**
469
548
  * @typedef LogisticsResponse
470
549
  * @property {Dp} [dp]
@@ -496,6 +575,113 @@ const Joi = require("joi");
496
575
  * @property {number} [minute]
497
576
  */
498
577
 
578
+ /**
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
597
+ */
598
+
599
+ /**
600
+ * @typedef PackageMaterialList
601
+ * @property {PackageMaterialResponse} [items]
602
+ * @property {Page} [page]
603
+ */
604
+
605
+ /**
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]
616
+ * @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]
633
+ */
634
+
635
+ /**
636
+ * @typedef PackageMaterialRuleList
637
+ * @property {PackageRuleResponse} [items]
638
+ * @property {Page} [page]
639
+ */
640
+
641
+ /**
642
+ * @typedef PackageMaterialRuleQuantity
643
+ * @property {number} [max]
644
+ * @property {number} [min]
645
+ */
646
+
647
+ /**
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]
655
+ * @property {string} type
656
+ */
657
+
658
+ /**
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
683
+ */
684
+
499
685
  /**
500
686
  * @typedef Page
501
687
  * @property {number} [current]
@@ -507,6 +693,15 @@ const Joi = require("joi");
507
693
  * @property {string} type
508
694
  */
509
695
 
696
+ /**
697
+ * @typedef PageSchema
698
+ * @property {number} current
699
+ * @property {boolean} has_next
700
+ * @property {number} item_total
701
+ * @property {number} size
702
+ * @property {string} type
703
+ */
704
+
510
705
  /**
511
706
  * @typedef PincodeBulkViewResponse
512
707
  * @property {string} batch_id
@@ -635,6 +830,37 @@ const Joi = require("joi");
635
830
  * @property {string} to_pincode
636
831
  */
637
832
 
833
+ /**
834
+ * @typedef RulePriorityRequest
835
+ * @property {number} priority
836
+ * @property {string} rule_id
837
+ */
838
+
839
+ /**
840
+ * @typedef RulePriorityResponse
841
+ * @property {boolean} [success]
842
+ */
843
+
844
+ /**
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]
851
+ */
852
+
853
+ /**
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]
862
+ */
863
+
638
864
  /**
639
865
  * @typedef SelfShipResponse
640
866
  * @property {boolean} is_active
@@ -648,6 +874,18 @@ const Joi = require("joi");
648
874
  * @property {string} value
649
875
  */
650
876
 
877
+ /**
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
887
+ */
888
+
651
889
  /**
652
890
  * @typedef ServiceabilityPageResponse
653
891
  * @property {number} [current]
@@ -658,8 +896,80 @@ const Joi = require("joi");
658
896
  */
659
897
 
660
898
  /**
661
- * @typedef ServiceabilityPayloadSchema
662
- * @property {string} serviceability_type
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]
663
973
  */
664
974
 
665
975
  /**
@@ -670,6 +980,11 @@ const Joi = require("joi");
670
980
  * @property {string} [weekday]
671
981
  */
672
982
 
983
+ /**
984
+ * @typedef UpdateZoneConfigRequest
985
+ * @property {string} [serviceability_type]
986
+ */
987
+
673
988
  /**
674
989
  * @typedef UpdateZoneData
675
990
  * @property {string} [assignment_preference]
@@ -702,6 +1017,11 @@ const Joi = require("joi");
702
1017
  * @property {string} zone_id
703
1018
  */
704
1019
 
1020
+ /**
1021
+ * @typedef ZoneConfig
1022
+ * @property {string} [serviceability_type]
1023
+ */
1024
+
705
1025
  /**
706
1026
  * @typedef ZoneDataItem
707
1027
  * @property {number} current
@@ -724,12 +1044,6 @@ const Joi = require("joi");
724
1044
  * @property {string} type
725
1045
  */
726
1046
 
727
- /**
728
- * @typedef ZoneRequest
729
- * @property {CreateZoneData} data
730
- * @property {string} identifier
731
- */
732
-
733
1047
  /**
734
1048
  * @typedef ZoneResponse
735
1049
  * @property {number} status_code
@@ -765,20 +1079,12 @@ class ServiceabilityPlatformModel {
765
1079
  });
766
1080
  }
767
1081
 
768
- /** @returns {ApplicationCompanyDpViewRequest} */
769
- static ApplicationCompanyDpViewRequest() {
1082
+ /** @returns {ApplicationConfig} */
1083
+ static ApplicationConfig() {
770
1084
  return Joi.object({
771
- dp_id: Joi.string().allow(""),
772
- });
773
- }
774
-
775
- /** @returns {ApplicationCompanyDpViewResponse} */
776
- static ApplicationCompanyDpViewResponse() {
777
- return Joi.object({
778
- application_id: Joi.string().allow("").required(),
779
- company_id: Joi.number().required(),
780
- courier_partner_id: Joi.number(),
781
- success: Joi.boolean().required(),
1085
+ rule_ids: Joi.array().items(Joi.string().allow("")),
1086
+ sort: Joi.array().items(Joi.string().allow("")),
1087
+ zones: ServiceabilityPlatformModel.ZoneConfig(),
782
1088
  });
783
1089
  }
784
1090
 
@@ -816,35 +1122,86 @@ class ServiceabilityPlatformModel {
816
1122
  });
817
1123
  }
818
1124
 
819
- /** @returns {CommonError} */
820
- static CommonError() {
1125
+ /** @returns {ArithmeticOperations} */
1126
+ static ArithmeticOperations() {
821
1127
  return Joi.object({
822
- error: Joi.any(),
823
- status_code: Joi.string().allow(""),
824
- success: Joi.string().allow(""),
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(),
825
1142
  });
826
1143
  }
827
1144
 
828
- /** @returns {CompanyDpAccountListResponse} */
829
- static CompanyDpAccountListResponse() {
1145
+ /** @returns {BulkRegionResponse} */
1146
+ static BulkRegionResponse() {
830
1147
  return Joi.object({
831
- items: Joi.array().items(ServiceabilityPlatformModel.Dp1()).required(),
1148
+ items: Joi.array()
1149
+ .items(ServiceabilityPlatformModel.BulkRegionResponseItemData())
1150
+ .required(),
832
1151
  page: ServiceabilityPlatformModel.Page().required(),
833
- success: Joi.boolean().required(),
834
1152
  });
835
1153
  }
836
1154
 
837
- /** @returns {CompanyDpAccountRequest} */
838
- static CompanyDpAccountRequest() {
1155
+ /** @returns {BulkRegionResponseItemData} */
1156
+ static BulkRegionResponseItemData() {
839
1157
  return Joi.object({
840
- data: Joi.array().items(ServiceabilityPlatformModel.Dp1()).required(),
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(),
841
1169
  });
842
1170
  }
843
1171
 
844
- /** @returns {CompanyDpAccountResponse} */
845
- static CompanyDpAccountResponse() {
1172
+ /** @returns {Channel} */
1173
+ static Channel() {
846
1174
  return Joi.object({
847
- success: Joi.boolean().required(),
1175
+ id: Joi.string().allow(""),
1176
+ type: Joi.string().allow(""),
1177
+ });
1178
+ }
1179
+
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(),
848
1205
  });
849
1206
  }
850
1207
 
@@ -877,219 +1234,210 @@ class ServiceabilityPlatformModel {
877
1234
  });
878
1235
  }
879
1236
 
880
- /** @returns {CreatedByResponse} */
881
- static CreatedByResponse() {
882
- return Joi.object({
883
- user_id: Joi.string().allow(""),
884
- username: Joi.string().allow(""),
885
- });
886
- }
887
-
888
- /** @returns {CreateZoneData} */
889
- static CreateZoneData() {
1237
+ /** @returns {CourierAccount} */
1238
+ static CourierAccount() {
890
1239
  return Joi.object({
891
- assignment_preference: Joi.string().allow(""),
892
- channels: Joi.array()
893
- .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
894
- .required(),
895
- company_id: Joi.number().required(),
896
- is_active: Joi.boolean().required(),
897
- mapping: Joi.array()
898
- .items(ServiceabilityPlatformModel.ZoneMappingType())
899
- .required(),
900
- name: Joi.string().allow("").required(),
901
- product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
902
- region_type: Joi.string().allow("").required(),
903
- slug: Joi.string().allow("").required(),
904
- store_ids: Joi.array().items(Joi.number()).required(),
905
- });
906
- }
907
-
908
- /** @returns {DocumentsResponse} */
909
- static DocumentsResponse() {
910
- return Joi.object({
911
- legal_name: Joi.string().allow(""),
912
- type: Joi.string().allow(""),
913
- value: Joi.string().allow(""),
914
- verified: Joi.boolean(),
915
- });
916
- }
917
-
918
- /** @returns {Dp} */
919
- static Dp() {
920
- return Joi.object({
921
- area_code: Joi.number().allow(null),
922
- assign_dp_from_sb: Joi.boolean(),
923
- external_account_id: Joi.string().allow("").allow(null),
924
- fm_priority: Joi.number(),
925
- internal_account_id: Joi.string().allow(""),
926
- lm_priority: Joi.number(),
927
- operations: Joi.array().items(Joi.string().allow("")),
928
- payment_mode: Joi.string().allow(""),
929
- rvp_priority: Joi.number(),
930
- transport_mode: Joi.string().allow(""),
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(),
931
1246
  });
932
1247
  }
933
1248
 
934
- /** @returns {Dp1} */
935
- static Dp1() {
1249
+ /** @returns {CourierAccountResponse} */
1250
+ static CourierAccountResponse() {
936
1251
  return Joi.object({
937
1252
  account_id: Joi.string().allow("").required(),
938
- dp_id: Joi.string().allow("").required(),
1253
+ is_own_account: Joi.boolean().required(),
939
1254
  is_self_ship: Joi.boolean().required(),
940
- name: Joi.string().allow("").required(),
941
- plan_id: Joi.string().allow("").required(),
942
- plan_rules: Joi.any().required(),
1255
+ scheme_id: Joi.string().allow("").required(),
1256
+ scheme_rules: ServiceabilityPlatformModel.CourierPartnerSchemeModel().required(),
943
1257
  stage: Joi.string().allow("").required(),
944
1258
  });
945
1259
  }
946
1260
 
947
- /** @returns {DpAccountFailureResponse} */
948
- static DpAccountFailureResponse() {
1261
+ /** @returns {CourierPartnerAccountFailureResponse} */
1262
+ static CourierPartnerAccountFailureResponse() {
949
1263
  return Joi.object({
950
1264
  error: Joi.array()
951
1265
  .items(ServiceabilityPlatformModel.ErrorResponse())
952
1266
  .required(),
953
- status_code: Joi.number().required(),
954
1267
  success: Joi.boolean().required(),
955
1268
  });
956
1269
  }
957
1270
 
958
- /** @returns {DPApplicationRuleRequest} */
959
- static DPApplicationRuleRequest() {
1271
+ /** @returns {CourierPartnerList} */
1272
+ static CourierPartnerList() {
960
1273
  return Joi.object({
961
- shipping_rules: Joi.array().items(Joi.string().allow("")).required(),
1274
+ account_id: Joi.string().allow("").required(),
1275
+ extension_id: Joi.string().allow("").required(),
1276
+ is_self_ship: Joi.boolean().required(),
1277
+ name: Joi.string().allow("").required(),
962
1278
  });
963
1279
  }
964
1280
 
965
- /** @returns {DPApplicationRuleResponse} */
966
- static DPApplicationRuleResponse() {
1281
+ /** @returns {CourierPartnerRule} */
1282
+ static CourierPartnerRule() {
967
1283
  return Joi.object({
968
- data: Joi.array()
969
- .items(ServiceabilityPlatformModel.DpRuleResponse())
970
- .required(),
971
- status_code: Joi.boolean().required(),
972
- success: Joi.boolean().required(),
1284
+ conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions().required(),
1285
+ cp_list: Joi.array().items(
1286
+ ServiceabilityPlatformModel.CourierPartnerList()
1287
+ ),
1288
+ is_active: Joi.boolean().required(),
1289
+ name: Joi.string().allow("").required(),
1290
+ sort: Joi.array().items(Joi.string().allow("")).required(),
973
1291
  });
974
1292
  }
975
1293
 
976
- /** @returns {DPCompanyRuleRequest} */
977
- static DPCompanyRuleRequest() {
1294
+ /** @returns {CourierPartnerRuleConditions} */
1295
+ static CourierPartnerRuleConditions() {
978
1296
  return Joi.object({
979
- rule_ids: Joi.array().items(Joi.string().allow("")).required(),
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(),
980
1313
  });
981
1314
  }
982
1315
 
983
- /** @returns {DPCompanyRuleResponse} */
984
- static DPCompanyRuleResponse() {
1316
+ /** @returns {CourierPartnerRulesListResponse} */
1317
+ static CourierPartnerRulesListResponse() {
985
1318
  return Joi.object({
986
- data: Joi.array()
987
- .items(ServiceabilityPlatformModel.DpRuleResponse())
1319
+ items: Joi.array()
1320
+ .items(ServiceabilityPlatformModel.CourierPartnerRule())
988
1321
  .required(),
989
- status_code: Joi.number().required(),
990
- success: Joi.boolean().required(),
991
- });
992
- }
993
-
994
- /** @returns {DpIds} */
995
- static DpIds() {
996
- return Joi.object({
997
- enabled: Joi.boolean().required(),
998
- meta: Joi.any(),
999
- priority: Joi.number().required(),
1000
- });
1001
- }
1002
-
1003
- /** @returns {DpMultipleRuleSuccessResponse} */
1004
- static DpMultipleRuleSuccessResponse() {
1005
- return Joi.object({
1006
- items: Joi.array().items(ServiceabilityPlatformModel.DpRule()).required(),
1007
1322
  page: ServiceabilityPlatformModel.Page().required(),
1008
- success: Joi.boolean().required(),
1009
1323
  });
1010
1324
  }
1011
1325
 
1012
- /** @returns {DpRule} */
1013
- static DpRule() {
1014
- return Joi.object({
1015
- company_id: Joi.number(),
1016
- conditions: Joi.array().items(Joi.any()).required(),
1017
- dp_ids: Joi.object()
1018
- .pattern(/\S/, ServiceabilityPlatformModel.DpSchemaInRuleListing())
1019
- .required(),
1020
- is_active: Joi.boolean(),
1021
- name: Joi.string().allow("").required(),
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(),
1022
1362
  });
1023
1363
  }
1024
1364
 
1025
- /** @returns {DpRuleRequest} */
1026
- static DpRuleRequest() {
1365
+ /** @returns {CreatedByResponse} */
1366
+ static CreatedByResponse() {
1027
1367
  return Joi.object({
1028
- company_id: Joi.number(),
1029
- conditions: Joi.array().items(Joi.any()).required(),
1030
- dp_ids: Joi.object()
1031
- .pattern(/\S/, ServiceabilityPlatformModel.DpIds())
1032
- .required(),
1033
- is_active: Joi.boolean(),
1034
- name: Joi.string().allow("").required(),
1368
+ user_id: Joi.string().allow(""),
1369
+ username: Joi.string().allow(""),
1035
1370
  });
1036
1371
  }
1037
1372
 
1038
- /** @returns {DpRuleResponse} */
1039
- static DpRuleResponse() {
1373
+ /** @returns {CreateStoreRuleRequestSchema} */
1374
+ static CreateStoreRuleRequestSchema() {
1040
1375
  return Joi.object({
1041
- company_id: Joi.number().required(),
1042
- conditions: Joi.array().items(Joi.string().allow("")).required(),
1043
- created_by: Joi.any(),
1044
- created_on: Joi.string().allow(""),
1045
- dp_ids: Joi.any().required(),
1376
+ conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
1046
1377
  is_active: Joi.boolean(),
1047
- modified_by: Joi.any(),
1048
- modified_on: Joi.string().allow(""),
1049
- name: Joi.string().allow("").required(),
1050
- uid: Joi.string().allow("").required(),
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("")),
1051
1385
  });
1052
1386
  }
1053
1387
 
1054
- /** @returns {DpRuleSuccessResponse} */
1055
- static DpRuleSuccessResponse() {
1388
+ /** @returns {CreateZoneData} */
1389
+ static CreateZoneData() {
1056
1390
  return Joi.object({
1057
- data: ServiceabilityPlatformModel.DpRule().required(),
1058
- status_code: Joi.number().required(),
1059
- success: Joi.boolean().required(),
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(),
1400
+ name: Joi.string().allow("").required(),
1401
+ region_type: Joi.string().allow("").required(),
1402
+ slug: Joi.string().allow("").required(),
1403
+ store_ids: Joi.array().items(Joi.number()).required(),
1060
1404
  });
1061
1405
  }
1062
1406
 
1063
- /** @returns {DpRulesUpdateRequest} */
1064
- static DpRulesUpdateRequest() {
1407
+ /** @returns {CustomerRadiusSchema} */
1408
+ static CustomerRadiusSchema() {
1065
1409
  return Joi.object({
1066
- conditions: Joi.array().items(Joi.any()).required(),
1067
- dp_ids: Joi.object().pattern(/\S/, Joi.any()).required(),
1068
- is_active: Joi.boolean().required(),
1069
- name: Joi.string().allow("").required(),
1410
+ gt: Joi.number(),
1411
+ gte: Joi.number(),
1412
+ lt: Joi.number(),
1413
+ lte: Joi.number(),
1414
+ unit: Joi.string().allow("").required(),
1070
1415
  });
1071
1416
  }
1072
1417
 
1073
- /** @returns {DpRuleUpdateSuccessResponse} */
1074
- static DpRuleUpdateSuccessResponse() {
1418
+ /** @returns {DocumentsResponse} */
1419
+ static DocumentsResponse() {
1075
1420
  return Joi.object({
1076
- data: ServiceabilityPlatformModel.DpRuleResponse().required(),
1077
- status_code: Joi.number().required(),
1078
- success: Joi.boolean().required(),
1421
+ legal_name: Joi.string().allow(""),
1422
+ type: Joi.string().allow(""),
1423
+ value: Joi.string().allow(""),
1424
+ verified: Joi.boolean(),
1079
1425
  });
1080
1426
  }
1081
1427
 
1082
- /** @returns {DpSchemaInRuleListing} */
1083
- static DpSchemaInRuleListing() {
1428
+ /** @returns {Dp} */
1429
+ static Dp() {
1084
1430
  return Joi.object({
1085
- account_id: Joi.string().allow("").required(),
1086
- dp_id: Joi.string().allow("").required(),
1087
- is_self_ship: Joi.boolean().required(),
1088
- name: Joi.string().allow("").required(),
1089
- plan_id: Joi.string().allow("").required(),
1090
- plan_rules: Joi.any().required(),
1091
- priority: Joi.number().required(),
1092
- stage: Joi.string().allow("").required(),
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(""),
1093
1441
  });
1094
1442
  }
1095
1443
 
@@ -1112,7 +1460,6 @@ class ServiceabilityPlatformModel {
1112
1460
  /** @returns {EntityRegionView_Items} */
1113
1461
  static EntityRegionView_Items() {
1114
1462
  return Joi.object({
1115
- display_name: Joi.string().allow(""),
1116
1463
  name: Joi.string().allow("").required(),
1117
1464
  sub_type: Joi.string().allow("").required(),
1118
1465
  uid: Joi.string().allow("").required(),
@@ -1141,10 +1488,10 @@ class ServiceabilityPlatformModel {
1141
1488
  /** @returns {EntityRegionView_Response} */
1142
1489
  static EntityRegionView_Response() {
1143
1490
  return Joi.object({
1491
+ data: Joi.array()
1492
+ .items(ServiceabilityPlatformModel.EntityRegionView_Items())
1493
+ .required(),
1144
1494
  error: ServiceabilityPlatformModel.EntityRegionView_Error().required(),
1145
- items: Joi.array().items(
1146
- ServiceabilityPlatformModel.EntityRegionView_Items()
1147
- ),
1148
1495
  page: ServiceabilityPlatformModel.EntityRegionView_page().required(),
1149
1496
  success: Joi.boolean().required(),
1150
1497
  });
@@ -1181,11 +1528,22 @@ class ServiceabilityPlatformModel {
1181
1528
  error: Joi.array()
1182
1529
  .items(ServiceabilityPlatformModel.ErrorResponse())
1183
1530
  .required(),
1184
- status_code: Joi.number().required(),
1185
1531
  success: Joi.boolean().required(),
1186
1532
  });
1187
1533
  }
1188
1534
 
1535
+ /** @returns {getAppRegionZonesResponse} */
1536
+ static getAppRegionZonesResponse() {
1537
+ return Joi.object({
1538
+ items: Joi.array()
1539
+ .items(ServiceabilityPlatformModel.ListViewItems())
1540
+ .required(),
1541
+ page: Joi.array()
1542
+ .items(ServiceabilityPlatformModel.PageSchema())
1543
+ .required(),
1544
+ });
1545
+ }
1546
+
1189
1547
  /** @returns {GetSingleZoneDataViewResponse} */
1190
1548
  static GetSingleZoneDataViewResponse() {
1191
1549
  return Joi.object({
@@ -1193,6 +1551,16 @@ class ServiceabilityPlatformModel {
1193
1551
  });
1194
1552
  }
1195
1553
 
1554
+ /** @returns {GetStoreRulesApiResponse} */
1555
+ static GetStoreRulesApiResponse() {
1556
+ return Joi.object({
1557
+ items: Joi.array().items(
1558
+ ServiceabilityPlatformModel.StoreRuleDataSchema()
1559
+ ),
1560
+ page: ServiceabilityPlatformModel.Page(),
1561
+ });
1562
+ }
1563
+
1196
1564
  /** @returns {GetStoresViewResponse} */
1197
1565
  static GetStoresViewResponse() {
1198
1566
  return Joi.object({
@@ -1201,6 +1569,28 @@ class ServiceabilityPlatformModel {
1201
1569
  });
1202
1570
  }
1203
1571
 
1572
+ /** @returns {GetZoneByIdSchema} */
1573
+ static GetZoneByIdSchema() {
1574
+ return Joi.object({
1575
+ assignment_preference: Joi.string().allow(""),
1576
+ channels: Joi.array()
1577
+ .items(ServiceabilityPlatformModel.GetZoneDataViewChannels())
1578
+ .required(),
1579
+ company_id: Joi.number(),
1580
+ is_active: Joi.boolean().required(),
1581
+ mapping: Joi.array()
1582
+ .items(ServiceabilityPlatformModel.ZoneMappingType())
1583
+ .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(),
1589
+ stores_count: Joi.number().required(),
1590
+ zone_id: Joi.string().allow("").required(),
1591
+ });
1592
+ }
1593
+
1204
1594
  /** @returns {GetZoneDataViewChannels} */
1205
1595
  static GetZoneDataViewChannels() {
1206
1596
  return Joi.object({
@@ -1222,9 +1612,8 @@ class ServiceabilityPlatformModel {
1222
1612
  .items(ServiceabilityPlatformModel.ZoneMappingType())
1223
1613
  .required(),
1224
1614
  name: Joi.string().allow("").required(),
1225
- pincodes_count: Joi.number().required(),
1226
1615
  product: ServiceabilityPlatformModel.ZoneProductTypes().required(),
1227
- region_type: Joi.string().allow("").required(),
1616
+ region_type: Joi.string().allow(""),
1228
1617
  slug: Joi.string().allow("").required(),
1229
1618
  store_ids: Joi.array().items(Joi.number()).required(),
1230
1619
  stores_count: Joi.number().required(),
@@ -1268,6 +1657,13 @@ class ServiceabilityPlatformModel {
1268
1657
  });
1269
1658
  }
1270
1659
 
1660
+ /** @returns {IntComparisonOperations} */
1661
+ static IntComparisonOperations() {
1662
+ return Joi.object({
1663
+ includes: Joi.array().items(Joi.number()),
1664
+ });
1665
+ }
1666
+
1271
1667
  /** @returns {IntegrationTypeResponse} */
1272
1668
  static IntegrationTypeResponse() {
1273
1669
  return Joi.object({
@@ -1325,14 +1721,12 @@ class ServiceabilityPlatformModel {
1325
1721
  /** @returns {ListViewItems} */
1326
1722
  static ListViewItems() {
1327
1723
  return Joi.object({
1328
- channels: Joi.array()
1329
- .items(ServiceabilityPlatformModel.ListViewChannels())
1330
- .required(),
1724
+ channels: ServiceabilityPlatformModel.ListViewChannels().required(),
1331
1725
  company_id: Joi.number().required(),
1332
1726
  is_active: Joi.boolean().required(),
1333
1727
  name: Joi.string().allow("").required(),
1334
- pincodes_count: Joi.number().required(),
1335
1728
  product: ServiceabilityPlatformModel.ListViewProduct().required(),
1729
+ regions_count: Joi.number().required(),
1336
1730
  slug: Joi.string().allow("").required(),
1337
1731
  stores_count: Joi.number().required(),
1338
1732
  zone_id: Joi.string().allow("").required(),
@@ -1353,8 +1747,9 @@ class ServiceabilityPlatformModel {
1353
1747
  items: Joi.array()
1354
1748
  .items(ServiceabilityPlatformModel.ListViewItems())
1355
1749
  .required(),
1356
- page: ServiceabilityPlatformModel.ZoneDataItem().required(),
1357
- summary: ServiceabilityPlatformModel.ListViewSummary().required(),
1750
+ page: Joi.array()
1751
+ .items(ServiceabilityPlatformModel.ZoneDataItem())
1752
+ .required(),
1358
1753
  });
1359
1754
  }
1360
1755
 
@@ -1367,6 +1762,28 @@ class ServiceabilityPlatformModel {
1367
1762
  });
1368
1763
  }
1369
1764
 
1765
+ /** @returns {LocationRule} */
1766
+ static LocationRule() {
1767
+ return Joi.object({
1768
+ includes: Joi.array().items(
1769
+ ServiceabilityPlatformModel.LocationRuleValues()
1770
+ ),
1771
+ type: Joi.string().allow(""),
1772
+ });
1773
+ }
1774
+
1775
+ /** @returns {LocationRuleValues} */
1776
+ static LocationRuleValues() {
1777
+ return Joi.object({
1778
+ display_name: Joi.string().allow(""),
1779
+ id: Joi.string().allow("").required(),
1780
+ name: Joi.string().allow(""),
1781
+ parent_id: Joi.string().allow(""),
1782
+ parent_ids: Joi.array().items(Joi.string().allow("")),
1783
+ sub_type: Joi.string().allow(""),
1784
+ });
1785
+ }
1786
+
1370
1787
  /** @returns {LogisticsResponse} */
1371
1788
  static LogisticsResponse() {
1372
1789
  return Joi.object({
@@ -1408,6 +1825,143 @@ class ServiceabilityPlatformModel {
1408
1825
  });
1409
1826
  }
1410
1827
 
1828
+ /** @returns {PackageMaterial} */
1829
+ static PackageMaterial() {
1830
+ return Joi.object({
1831
+ auto_calculate: Joi.boolean(),
1832
+ channels: Joi.array()
1833
+ .items(ServiceabilityPlatformModel.Channel())
1834
+ .required(),
1835
+ error_rate: Joi.number().required(),
1836
+ height: Joi.number().required(),
1837
+ length: Joi.number().required(),
1838
+ max_weight: Joi.number(),
1839
+ media: Joi.array().items(Joi.string().allow("")),
1840
+ name: Joi.string().allow("").required(),
1841
+ package_type: Joi.string().allow("").required(),
1842
+ package_vol_weight: Joi.number(),
1843
+ rules: Joi.array().items(
1844
+ ServiceabilityPlatformModel.PackageMaterialRule()
1845
+ ),
1846
+ size: Joi.string().allow("").required(),
1847
+ status: Joi.string().allow("").required(),
1848
+ store_ids: Joi.array().items(Joi.number()).required(),
1849
+ track_inventory: Joi.boolean(),
1850
+ weight: Joi.number().required(),
1851
+ width: Joi.number().required(),
1852
+ });
1853
+ }
1854
+
1855
+ /** @returns {PackageMaterialList} */
1856
+ static PackageMaterialList() {
1857
+ return Joi.object({
1858
+ items: ServiceabilityPlatformModel.PackageMaterialResponse(),
1859
+ page: ServiceabilityPlatformModel.Page(),
1860
+ });
1861
+ }
1862
+
1863
+ /** @returns {PackageMaterialResponse} */
1864
+ static PackageMaterialResponse() {
1865
+ return Joi.object({
1866
+ auto_calculate: Joi.boolean(),
1867
+ channels: Joi.array()
1868
+ .items(ServiceabilityPlatformModel.Channel())
1869
+ .required(),
1870
+ error_rate: Joi.number().required(),
1871
+ height: Joi.number().required(),
1872
+ id: Joi.string().allow(""),
1873
+ item_id: Joi.number(),
1874
+ length: Joi.number().required(),
1875
+ max_weight: Joi.number(),
1876
+ media: Joi.array().items(Joi.string().allow("")),
1877
+ name: Joi.string().allow("").required(),
1878
+ package_type: Joi.string().allow("").required(),
1879
+ package_vol_weight: Joi.number(),
1880
+ rules: Joi.array().items(
1881
+ ServiceabilityPlatformModel.PackageMaterialRule()
1882
+ ),
1883
+ size: Joi.string().allow("").required(),
1884
+ status: Joi.string().allow("").required(),
1885
+ store_ids: Joi.array().items(Joi.number()).required(),
1886
+ track_inventory: Joi.boolean(),
1887
+ weight: Joi.number().required(),
1888
+ width: Joi.number().required(),
1889
+ });
1890
+ }
1891
+
1892
+ /** @returns {PackageMaterialRule} */
1893
+ static PackageMaterialRule() {
1894
+ return Joi.object({
1895
+ quantity: ServiceabilityPlatformModel.PackageMaterialRuleQuantity(),
1896
+ rule_id: Joi.string().allow(""),
1897
+ weight: Joi.number(),
1898
+ });
1899
+ }
1900
+
1901
+ /** @returns {PackageMaterialRuleList} */
1902
+ static PackageMaterialRuleList() {
1903
+ return Joi.object({
1904
+ items: ServiceabilityPlatformModel.PackageRuleResponse(),
1905
+ page: ServiceabilityPlatformModel.Page(),
1906
+ });
1907
+ }
1908
+
1909
+ /** @returns {PackageMaterialRuleQuantity} */
1910
+ static PackageMaterialRuleQuantity() {
1911
+ return Joi.object({
1912
+ max: Joi.number(),
1913
+ min: Joi.number(),
1914
+ });
1915
+ }
1916
+
1917
+ /** @returns {PackageRule} */
1918
+ static PackageRule() {
1919
+ return Joi.object({
1920
+ category_id: ServiceabilityPlatformModel.PackageRuleCategory(),
1921
+ company_id: Joi.number().required(),
1922
+ is_active: Joi.boolean(),
1923
+ name: Joi.string().allow("").required(),
1924
+ product_id: ServiceabilityPlatformModel.PackageRuleProduct(),
1925
+ product_tag: ServiceabilityPlatformModel.PackageRuleProductTag(),
1926
+ type: Joi.string().allow("").required(),
1927
+ });
1928
+ }
1929
+
1930
+ /** @returns {PackageRuleCategory} */
1931
+ static PackageRuleCategory() {
1932
+ return Joi.object({
1933
+ includes: Joi.array().items(Joi.number()),
1934
+ });
1935
+ }
1936
+
1937
+ /** @returns {PackageRuleProduct} */
1938
+ static PackageRuleProduct() {
1939
+ return Joi.object({
1940
+ includes: Joi.array().items(Joi.number()),
1941
+ });
1942
+ }
1943
+
1944
+ /** @returns {PackageRuleProductTag} */
1945
+ static PackageRuleProductTag() {
1946
+ return Joi.object({
1947
+ includes: Joi.array().items(Joi.string().allow("")),
1948
+ });
1949
+ }
1950
+
1951
+ /** @returns {PackageRuleResponse} */
1952
+ static PackageRuleResponse() {
1953
+ return Joi.object({
1954
+ category_id: ServiceabilityPlatformModel.PackageRuleCategory(),
1955
+ company_id: Joi.number().required(),
1956
+ id: Joi.string().allow(""),
1957
+ is_active: Joi.boolean(),
1958
+ name: Joi.string().allow("").required(),
1959
+ product_id: ServiceabilityPlatformModel.PackageRuleProduct(),
1960
+ product_tag: ServiceabilityPlatformModel.PackageRuleProductTag(),
1961
+ type: Joi.string().allow("").required(),
1962
+ });
1963
+ }
1964
+
1411
1965
  /** @returns {Page} */
1412
1966
  static Page() {
1413
1967
  return Joi.object({
@@ -1421,6 +1975,17 @@ class ServiceabilityPlatformModel {
1421
1975
  });
1422
1976
  }
1423
1977
 
1978
+ /** @returns {PageSchema} */
1979
+ static PageSchema() {
1980
+ return Joi.object({
1981
+ current: Joi.number().required(),
1982
+ has_next: Joi.boolean().required(),
1983
+ item_total: Joi.number().required(),
1984
+ size: Joi.number().required(),
1985
+ type: Joi.string().allow("").required(),
1986
+ });
1987
+ }
1988
+
1424
1989
  /** @returns {PincodeBulkViewResponse} */
1425
1990
  static PincodeBulkViewResponse() {
1426
1991
  return Joi.object({
@@ -1589,6 +2154,45 @@ class ServiceabilityPlatformModel {
1589
2154
  });
1590
2155
  }
1591
2156
 
2157
+ /** @returns {RulePriorityRequest} */
2158
+ static RulePriorityRequest() {
2159
+ return Joi.object({
2160
+ priority: Joi.number().required(),
2161
+ rule_id: Joi.string().allow("").required(),
2162
+ });
2163
+ }
2164
+
2165
+ /** @returns {RulePriorityResponse} */
2166
+ static RulePriorityResponse() {
2167
+ return Joi.object({
2168
+ success: Joi.boolean(),
2169
+ });
2170
+ }
2171
+
2172
+ /** @returns {SchemeRules} */
2173
+ static SchemeRules() {
2174
+ return Joi.object({
2175
+ feature: ServiceabilityPlatformModel.SchemeRulesFeatures(),
2176
+ payment_mode: Joi.array().items(Joi.string().allow("")),
2177
+ region: Joi.string().allow(""),
2178
+ transport_type: Joi.array().items(Joi.string().allow("")),
2179
+ weight: ServiceabilityPlatformModel.ArithmeticOperations(),
2180
+ });
2181
+ }
2182
+
2183
+ /** @returns {SchemeRulesFeatures} */
2184
+ static SchemeRulesFeatures() {
2185
+ return Joi.object({
2186
+ battery_operated: Joi.boolean(),
2187
+ e_waybill: Joi.boolean(),
2188
+ flammable: Joi.boolean(),
2189
+ hazmat: Joi.boolean(),
2190
+ multi_part_shipments: Joi.boolean(),
2191
+ quality_check: Joi.boolean(),
2192
+ quick_response_code: Joi.boolean(),
2193
+ });
2194
+ }
2195
+
1592
2196
  /** @returns {SelfShipResponse} */
1593
2197
  static SelfShipResponse() {
1594
2198
  return Joi.object({
@@ -1606,6 +2210,20 @@ class ServiceabilityPlatformModel {
1606
2210
  });
1607
2211
  }
1608
2212
 
2213
+ /** @returns {ServiceabilityModel} */
2214
+ static ServiceabilityModel() {
2215
+ return Joi.object({
2216
+ is_first_mile: Joi.boolean().required(),
2217
+ is_installation: Joi.boolean().required(),
2218
+ is_last_mile: Joi.boolean().required(),
2219
+ is_qc: Joi.boolean().required(),
2220
+ is_return: Joi.boolean().required(),
2221
+ lm_cod_limit: Joi.number().required(),
2222
+ pickup_cutoff: Joi.string().allow("").allow(null).required(),
2223
+ route_code: Joi.string().allow("").allow(null).required(),
2224
+ });
2225
+ }
2226
+
1609
2227
  /** @returns {ServiceabilityPageResponse} */
1610
2228
  static ServiceabilityPageResponse() {
1611
2229
  return Joi.object({
@@ -1617,10 +2235,102 @@ class ServiceabilityPlatformModel {
1617
2235
  });
1618
2236
  }
1619
2237
 
1620
- /** @returns {ServiceabilityPayloadSchema} */
1621
- static ServiceabilityPayloadSchema() {
2238
+ /** @returns {StorePrioritySchema} */
2239
+ static StorePrioritySchema() {
1622
2240
  return Joi.object({
1623
- serviceability_type: Joi.string().allow("").required(),
2241
+ id: Joi.string().allow(""),
2242
+ name: Joi.string().allow(""),
2243
+ });
2244
+ }
2245
+
2246
+ /** @returns {StoreRuleConditionSchema} */
2247
+ static StoreRuleConditionSchema() {
2248
+ return Joi.object({
2249
+ brand_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2250
+ category_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2251
+ customer_radius: ServiceabilityPlatformModel.CustomerRadiusSchema(),
2252
+ department_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2253
+ order_place_date: ServiceabilityPlatformModel.ArithmeticOperations(),
2254
+ product_ids: ServiceabilityPlatformModel.IntComparisonOperations(),
2255
+ product_tags: ServiceabilityPlatformModel.StringComparisonOperations(),
2256
+ store_tags: ServiceabilityPlatformModel.StringComparisonOperations(),
2257
+ store_type: ServiceabilityPlatformModel.StringComparisonOperations(),
2258
+ to_location: ServiceabilityPlatformModel.LocationRule(),
2259
+ zone_ids: ServiceabilityPlatformModel.StringComparisonOperations(),
2260
+ });
2261
+ }
2262
+
2263
+ /** @returns {StoreRuleConfigData} */
2264
+ static StoreRuleConfigData() {
2265
+ return Joi.object({
2266
+ rule_ids: Joi.array().items(Joi.string().allow("")),
2267
+ sort: Joi.array().items(Joi.string().allow("")),
2268
+ store_priority: Joi.array().items(
2269
+ ServiceabilityPlatformModel.StorePrioritySchema()
2270
+ ),
2271
+ tag_based_priority: Joi.array().items(Joi.string().allow("")),
2272
+ type_based_priority: Joi.array().items(Joi.string().allow("")),
2273
+ });
2274
+ }
2275
+
2276
+ /** @returns {StoreRuleDataSchema} */
2277
+ static StoreRuleDataSchema() {
2278
+ return Joi.object({
2279
+ application_id: Joi.string().allow(""),
2280
+ company_id: Joi.number(),
2281
+ conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
2282
+ id: Joi.string().allow(""),
2283
+ is_active: Joi.boolean(),
2284
+ name: Joi.string().allow(""),
2285
+ sort: Joi.array().items(Joi.string().allow("")),
2286
+ store_priority: Joi.array().items(
2287
+ ServiceabilityPlatformModel.StorePrioritySchema()
2288
+ ),
2289
+ tag_based_priority: Joi.array().items(Joi.string().allow("")),
2290
+ type_based_priority: Joi.array().items(Joi.string().allow("")),
2291
+ });
2292
+ }
2293
+
2294
+ /** @returns {StoreRuleResponseSchema} */
2295
+ static StoreRuleResponseSchema() {
2296
+ return Joi.object({
2297
+ conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
2298
+ id: Joi.string().allow(""),
2299
+ is_active: Joi.boolean(),
2300
+ name: Joi.string().allow(""),
2301
+ sort: Joi.array().items(Joi.string().allow("")),
2302
+ store_priority: Joi.array().items(
2303
+ ServiceabilityPlatformModel.StorePrioritySchema()
2304
+ ),
2305
+ tag_based_priority: Joi.array().items(Joi.string().allow("")),
2306
+ type: Joi.string().allow(""),
2307
+ type_based_priority: Joi.array().items(Joi.string().allow("")),
2308
+ });
2309
+ }
2310
+
2311
+ /** @returns {StoreRuleUpdateResponseSchema} */
2312
+ static StoreRuleUpdateResponseSchema() {
2313
+ return Joi.object({
2314
+ application_id: Joi.string().allow(""),
2315
+ company_id: Joi.number(),
2316
+ conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(),
2317
+ id: Joi.string().allow(""),
2318
+ is_active: Joi.boolean(),
2319
+ name: Joi.string().allow(""),
2320
+ sort: Joi.array().items(Joi.string().allow("")),
2321
+ store_priority: Joi.array().items(
2322
+ ServiceabilityPlatformModel.StorePrioritySchema()
2323
+ ),
2324
+ tag_based_priority: Joi.array().items(Joi.string().allow("")),
2325
+ type: Joi.string().allow(""),
2326
+ type_based_priority: Joi.array().items(Joi.string().allow("")),
2327
+ });
2328
+ }
2329
+
2330
+ /** @returns {StringComparisonOperations} */
2331
+ static StringComparisonOperations() {
2332
+ return Joi.object({
2333
+ includes: Joi.array().items(Joi.string().allow("")),
1624
2334
  });
1625
2335
  }
1626
2336
 
@@ -1634,6 +2344,13 @@ class ServiceabilityPlatformModel {
1634
2344
  });
1635
2345
  }
1636
2346
 
2347
+ /** @returns {UpdateZoneConfigRequest} */
2348
+ static UpdateZoneConfigRequest() {
2349
+ return Joi.object({
2350
+ serviceability_type: Joi.string().allow(""),
2351
+ });
2352
+ }
2353
+
1637
2354
  /** @returns {UpdateZoneData} */
1638
2355
  static UpdateZoneData() {
1639
2356
  return Joi.object({
@@ -1676,6 +2393,13 @@ class ServiceabilityPlatformModel {
1676
2393
  });
1677
2394
  }
1678
2395
 
2396
+ /** @returns {ZoneConfig} */
2397
+ static ZoneConfig() {
2398
+ return Joi.object({
2399
+ serviceability_type: Joi.string().allow(""),
2400
+ });
2401
+ }
2402
+
1679
2403
  /** @returns {ZoneDataItem} */
1680
2404
  static ZoneDataItem() {
1681
2405
  return Joi.object({
@@ -1704,14 +2428,6 @@ class ServiceabilityPlatformModel {
1704
2428
  });
1705
2429
  }
1706
2430
 
1707
- /** @returns {ZoneRequest} */
1708
- static ZoneRequest() {
1709
- return Joi.object({
1710
- data: ServiceabilityPlatformModel.CreateZoneData().required(),
1711
- identifier: Joi.string().allow("").required(),
1712
- });
1713
- }
1714
-
1715
2431
  /** @returns {ZoneResponse} */
1716
2432
  static ZoneResponse() {
1717
2433
  return Joi.object({