@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
@@ -14,438 +14,14 @@ class Serviceability {
14
14
  this.config = config;
15
15
  }
16
16
 
17
- /**
18
- * @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object
19
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
20
- * @param {import("../PlatformAPIClient").Options} - Options
21
- * @returns {Promise<ServiceabilityPlatformModel.BulkRegionResponseItemData>}
22
- * - Success response
23
- *
24
- * @name bulkServiceability
25
- * @summary: Serviceability Import or Export
26
- * @description: Serviceability Import or Export - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkServiceability/).
27
- */
28
- async bulkServiceability(
29
- { extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
30
- { responseHeaders } = { responseHeaders: false }
31
- ) {
32
- const {
33
- error,
34
- } = ServiceabilityPlatformValidator.bulkServiceability().validate(
35
- {
36
- extensionId,
37
- schemeId,
38
- body,
39
- },
40
- { abortEarly: false, allowUnknown: true }
41
- );
42
- if (error) {
43
- return Promise.reject(new FDKClientValidationError(error));
44
- }
45
-
46
- // Showing warrnings if extra unknown parameters are found
47
- const {
48
- error: warrning,
49
- } = ServiceabilityPlatformValidator.bulkServiceability().validate(
50
- {
51
- extensionId,
52
- schemeId,
53
- body,
54
- },
55
- { abortEarly: false, allowUnknown: false }
56
- );
57
- if (warrning) {
58
- Logger({
59
- level: "WARN",
60
- message: `Parameter Validation warrnings for platform > Serviceability > bulkServiceability \n ${warrning}`,
61
- });
62
- }
63
-
64
- const query_params = {};
65
-
66
- const xHeaders = {};
67
-
68
- const response = await PlatformAPIClient.execute(
69
- this.config,
70
- "post",
71
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
72
- query_params,
73
- body,
74
- { ...xHeaders, ...requestHeaders },
75
- { responseHeaders }
76
- );
77
-
78
- let responseData = response;
79
- if (responseHeaders) {
80
- responseData = response[0];
81
- }
82
-
83
- const {
84
- error: res_error,
85
- } = ServiceabilityPlatformModel.BulkRegionResponseItemData().validate(
86
- responseData,
87
- { abortEarly: false, allowUnknown: true }
88
- );
89
-
90
- if (res_error) {
91
- if (this.config.options.strictResponseCheck === true) {
92
- return Promise.reject(new FDKResponseValidationError(res_error));
93
- } else {
94
- Logger({
95
- level: "WARN",
96
- message: `Response Validation Warnings for platform > Serviceability > bulkServiceability \n ${res_error}`,
97
- });
98
- }
99
- }
100
-
101
- return response;
102
- }
103
-
104
- /**
105
- * @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object
106
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
107
- * @param {import("../PlatformAPIClient").Options} - Options
108
- * @returns {Promise<ServiceabilityPlatformModel.BulkRegionResponseItemData>}
109
- * - Success response
110
- *
111
- * @name bulkTat
112
- * @summary: Region TAT Import or Export
113
- * @description: Region TAT Import or Export - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkTat/).
114
- */
115
- async bulkTat(
116
- { extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
117
- { responseHeaders } = { responseHeaders: false }
118
- ) {
119
- const { error } = ServiceabilityPlatformValidator.bulkTat().validate(
120
- {
121
- extensionId,
122
- schemeId,
123
- body,
124
- },
125
- { abortEarly: false, allowUnknown: true }
126
- );
127
- if (error) {
128
- return Promise.reject(new FDKClientValidationError(error));
129
- }
130
-
131
- // Showing warrnings if extra unknown parameters are found
132
- const {
133
- error: warrning,
134
- } = ServiceabilityPlatformValidator.bulkTat().validate(
135
- {
136
- extensionId,
137
- schemeId,
138
- body,
139
- },
140
- { abortEarly: false, allowUnknown: false }
141
- );
142
- if (warrning) {
143
- Logger({
144
- level: "WARN",
145
- message: `Parameter Validation warrnings for platform > Serviceability > bulkTat \n ${warrning}`,
146
- });
147
- }
148
-
149
- const query_params = {};
150
-
151
- const xHeaders = {};
152
-
153
- const response = await PlatformAPIClient.execute(
154
- this.config,
155
- "post",
156
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
157
- query_params,
158
- body,
159
- { ...xHeaders, ...requestHeaders },
160
- { responseHeaders }
161
- );
162
-
163
- let responseData = response;
164
- if (responseHeaders) {
165
- responseData = response[0];
166
- }
167
-
168
- const {
169
- error: res_error,
170
- } = ServiceabilityPlatformModel.BulkRegionResponseItemData().validate(
171
- responseData,
172
- { abortEarly: false, allowUnknown: true }
173
- );
174
-
175
- if (res_error) {
176
- if (this.config.options.strictResponseCheck === true) {
177
- return Promise.reject(new FDKResponseValidationError(res_error));
178
- } else {
179
- Logger({
180
- level: "WARN",
181
- message: `Response Validation Warnings for platform > Serviceability > bulkTat \n ${res_error}`,
182
- });
183
- }
184
- }
185
-
186
- return response;
187
- }
188
-
189
- /**
190
- * @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg
191
- * - Arg object
192
- *
193
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
194
- * @param {import("../PlatformAPIClient").Options} - Options
195
- * @returns {Promise<ServiceabilityPlatformModel.CourierAccount>} - Success response
196
- * @name createCourierPartnerAccount
197
- * @summary: Creation of Courier Account
198
- * @description: This API Creates a new Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerAccount/).
199
- */
200
- async createCourierPartnerAccount(
201
- { body, requestHeaders } = { requestHeaders: {} },
202
- { responseHeaders } = { responseHeaders: false }
203
- ) {
204
- const {
205
- error,
206
- } = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate(
207
- {
208
- body,
209
- },
210
- { abortEarly: false, allowUnknown: true }
211
- );
212
- if (error) {
213
- return Promise.reject(new FDKClientValidationError(error));
214
- }
215
-
216
- // Showing warrnings if extra unknown parameters are found
217
- const {
218
- error: warrning,
219
- } = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate(
220
- {
221
- body,
222
- },
223
- { abortEarly: false, allowUnknown: false }
224
- );
225
- if (warrning) {
226
- Logger({
227
- level: "WARN",
228
- message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerAccount \n ${warrning}`,
229
- });
230
- }
231
-
232
- const query_params = {};
233
-
234
- const xHeaders = {};
235
-
236
- const response = await PlatformAPIClient.execute(
237
- this.config,
238
- "post",
239
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
240
- query_params,
241
- body,
242
- { ...xHeaders, ...requestHeaders },
243
- { responseHeaders }
244
- );
245
-
246
- let responseData = response;
247
- if (responseHeaders) {
248
- responseData = response[0];
249
- }
250
-
251
- const {
252
- error: res_error,
253
- } = ServiceabilityPlatformModel.CourierAccount().validate(responseData, {
254
- abortEarly: false,
255
- allowUnknown: true,
256
- });
257
-
258
- if (res_error) {
259
- if (this.config.options.strictResponseCheck === true) {
260
- return Promise.reject(new FDKResponseValidationError(res_error));
261
- } else {
262
- Logger({
263
- level: "WARN",
264
- message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerAccount \n ${res_error}`,
265
- });
266
- }
267
- }
268
-
269
- return response;
270
- }
271
-
272
- /**
273
- * @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg
274
- * - Arg object
275
- *
276
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
277
- * @param {import("../PlatformAPIClient").Options} - Options
278
- * @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
279
- * - Success response
280
- *
281
- * @name createPackageMaterial
282
- * @summary: Upsert of PackageMaterial in database.
283
- * @description: This API returns response of upsert of PackageMaterial in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/).
284
- */
285
- async createPackageMaterial(
286
- { body, requestHeaders } = { requestHeaders: {} },
287
- { responseHeaders } = { responseHeaders: false }
288
- ) {
289
- const {
290
- error,
291
- } = ServiceabilityPlatformValidator.createPackageMaterial().validate(
292
- {
293
- body,
294
- },
295
- { abortEarly: false, allowUnknown: true }
296
- );
297
- if (error) {
298
- return Promise.reject(new FDKClientValidationError(error));
299
- }
300
-
301
- // Showing warrnings if extra unknown parameters are found
302
- const {
303
- error: warrning,
304
- } = ServiceabilityPlatformValidator.createPackageMaterial().validate(
305
- {
306
- body,
307
- },
308
- { abortEarly: false, allowUnknown: false }
309
- );
310
- if (warrning) {
311
- Logger({
312
- level: "WARN",
313
- message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterial \n ${warrning}`,
314
- });
315
- }
316
-
317
- const query_params = {};
318
-
319
- const xHeaders = {};
320
-
321
- const response = await PlatformAPIClient.execute(
322
- this.config,
323
- "post",
324
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
325
- query_params,
326
- body,
327
- { ...xHeaders, ...requestHeaders },
328
- { responseHeaders }
329
- );
330
-
331
- let responseData = response;
332
- if (responseHeaders) {
333
- responseData = response[0];
334
- }
335
-
336
- const {
337
- error: res_error,
338
- } = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
339
- responseData,
340
- { abortEarly: false, allowUnknown: true }
341
- );
342
-
343
- if (res_error) {
344
- if (this.config.options.strictResponseCheck === true) {
345
- return Promise.reject(new FDKResponseValidationError(res_error));
346
- } else {
347
- Logger({
348
- level: "WARN",
349
- message: `Response Validation Warnings for platform > Serviceability > createPackageMaterial \n ${res_error}`,
350
- });
351
- }
352
- }
353
-
354
- return response;
355
- }
356
-
357
- /**
358
- * @param {ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam} arg
359
- * - Arg object
360
- *
361
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
362
- * @param {import("../PlatformAPIClient").Options} - Options
363
- * @returns {Promise<ServiceabilityPlatformModel.PackageRuleResponse>} -
364
- * Success response
365
- * @name createPackageMaterialRule
366
- * @summary: Upsert of Package Material Rule in database.
367
- * @description: This API returns response of upsert of Package Material Rule in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/).
368
- */
369
- async createPackageMaterialRule(
370
- { body, requestHeaders } = { requestHeaders: {} },
371
- { responseHeaders } = { responseHeaders: false }
372
- ) {
373
- const {
374
- error,
375
- } = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
376
- {
377
- body,
378
- },
379
- { abortEarly: false, allowUnknown: true }
380
- );
381
- if (error) {
382
- return Promise.reject(new FDKClientValidationError(error));
383
- }
384
-
385
- // Showing warrnings if extra unknown parameters are found
386
- const {
387
- error: warrning,
388
- } = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
389
- {
390
- body,
391
- },
392
- { abortEarly: false, allowUnknown: false }
393
- );
394
- if (warrning) {
395
- Logger({
396
- level: "WARN",
397
- message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterialRule \n ${warrning}`,
398
- });
399
- }
400
-
401
- const query_params = {};
402
-
403
- const xHeaders = {};
404
-
405
- const response = await PlatformAPIClient.execute(
406
- this.config,
407
- "post",
408
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
409
- query_params,
410
- body,
411
- { ...xHeaders, ...requestHeaders },
412
- { responseHeaders }
413
- );
414
-
415
- let responseData = response;
416
- if (responseHeaders) {
417
- responseData = response[0];
418
- }
419
-
420
- const {
421
- error: res_error,
422
- } = ServiceabilityPlatformModel.PackageRuleResponse().validate(
423
- responseData,
424
- { abortEarly: false, allowUnknown: true }
425
- );
426
-
427
- if (res_error) {
428
- if (this.config.options.strictResponseCheck === true) {
429
- return Promise.reject(new FDKResponseValidationError(res_error));
430
- } else {
431
- Logger({
432
- level: "WARN",
433
- message: `Response Validation Warnings for platform > Serviceability > createPackageMaterialRule \n ${res_error}`,
434
- });
435
- }
436
- }
437
-
438
- return response;
439
- }
440
-
441
17
  /**
442
18
  * @param {ServiceabilityPlatformValidator.CreateZoneParam} arg - Arg object
443
19
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
444
20
  * @param {import("../PlatformAPIClient").Options} - Options
445
21
  * @returns {Promise<ServiceabilityPlatformModel.ZoneResponse>} - Success response
446
22
  * @name createZone
447
- * @summary: Creates a new Zone
448
- * @description: Creates a new zone with the specified mapping. A zone enables serviceability based on given regions. By creating a zone and including specific regions, you can ensure that the stores associated with the zone are serviceable for those added regions. This functionality is particularly useful when you need to ensure serviceability for multiple regions by grouping them into a single zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/).
23
+ * @summary: Creation of a new zone
24
+ * @description: This API allows you to create a new zone with the specified information. A zone enables serviceability based on given pincodes or regions. By creating a zone and including specific pincodes or regions, you can ensure that the stores associated with the zone are serviceable for those added pincodes or regions. This functionality is particularly useful when you need to ensure serviceability for multiple pincodes or regions by grouping them into a single zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/).
449
25
  */
450
26
  async createZone(
451
27
  { body, requestHeaders } = { requestHeaders: {} },
@@ -484,7 +60,7 @@ class Serviceability {
484
60
  const response = await PlatformAPIClient.execute(
485
61
  this.config,
486
62
  "post",
487
- `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones`,
63
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone`,
488
64
  query_params,
489
65
  body,
490
66
  { ...xHeaders, ...requestHeaders },
@@ -517,348 +93,21 @@ class Serviceability {
517
93
  return response;
518
94
  }
519
95
 
520
- /**
521
- * @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object
522
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
523
- * @param {import("../PlatformAPIClient").Options} - Options
524
- * @returns {Promise<ServiceabilityPlatformModel.GetStoresViewResponse>} -
525
- * Success response
526
- * @name getAllStores
527
- * @summary: GET stores data
528
- * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/).
529
- */
530
- async getAllStores(
531
- { requestHeaders } = { requestHeaders: {} },
532
- { responseHeaders } = { responseHeaders: false }
533
- ) {
534
- const { error } = ServiceabilityPlatformValidator.getAllStores().validate(
535
- {},
536
- { abortEarly: false, allowUnknown: true }
537
- );
538
- if (error) {
539
- return Promise.reject(new FDKClientValidationError(error));
540
- }
541
-
542
- // Showing warrnings if extra unknown parameters are found
543
- const {
544
- error: warrning,
545
- } = ServiceabilityPlatformValidator.getAllStores().validate(
546
- {},
547
- { abortEarly: false, allowUnknown: false }
548
- );
549
- if (warrning) {
550
- Logger({
551
- level: "WARN",
552
- message: `Parameter Validation warrnings for platform > Serviceability > getAllStores \n ${warrning}`,
553
- });
554
- }
555
-
556
- const query_params = {};
557
-
558
- const xHeaders = {};
559
-
560
- const response = await PlatformAPIClient.execute(
561
- this.config,
562
- "get",
563
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/logistics/stores`,
564
- query_params,
565
- undefined,
566
- { ...xHeaders, ...requestHeaders },
567
- { responseHeaders }
568
- );
569
-
570
- let responseData = response;
571
- if (responseHeaders) {
572
- responseData = response[0];
573
- }
574
-
575
- const {
576
- error: res_error,
577
- } = ServiceabilityPlatformModel.GetStoresViewResponse().validate(
578
- responseData,
579
- { abortEarly: false, allowUnknown: true }
580
- );
581
-
582
- if (res_error) {
583
- if (this.config.options.strictResponseCheck === true) {
584
- return Promise.reject(new FDKResponseValidationError(res_error));
585
- } else {
586
- Logger({
587
- level: "WARN",
588
- message: `Response Validation Warnings for platform > Serviceability > getAllStores \n ${res_error}`,
589
- });
590
- }
591
- }
592
-
593
- return response;
594
- }
595
-
596
- /**
597
- * @param {ServiceabilityPlatformValidator.GetBulkServiceabilityParam} arg
598
- * - Arg object
599
- *
600
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
601
- * @param {import("../PlatformAPIClient").Options} - Options
602
- * @returns {Promise<ServiceabilityPlatformModel.BulkRegionResponse>} -
603
- * Success response
604
- * @name getBulkServiceability
605
- * @summary: Get Region Serviceability Bulk History
606
- * @description: Get Region Serviceability Bulk History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkServiceability/).
607
- */
608
- async getBulkServiceability(
609
- {
610
- extensionId,
611
- schemeId,
612
- pageNo,
613
- pageSize,
614
- batchId,
615
- action,
616
- status,
617
- country,
618
- region,
619
- startDate,
620
- endDate,
621
- requestHeaders,
622
- } = { requestHeaders: {} },
623
- { responseHeaders } = { responseHeaders: false }
624
- ) {
625
- const {
626
- error,
627
- } = ServiceabilityPlatformValidator.getBulkServiceability().validate(
628
- {
629
- extensionId,
630
- schemeId,
631
- pageNo,
632
- pageSize,
633
- batchId,
634
- action,
635
- status,
636
- country,
637
- region,
638
- startDate,
639
- endDate,
640
- },
641
- { abortEarly: false, allowUnknown: true }
642
- );
643
- if (error) {
644
- return Promise.reject(new FDKClientValidationError(error));
645
- }
646
-
647
- // Showing warrnings if extra unknown parameters are found
648
- const {
649
- error: warrning,
650
- } = ServiceabilityPlatformValidator.getBulkServiceability().validate(
651
- {
652
- extensionId,
653
- schemeId,
654
- pageNo,
655
- pageSize,
656
- batchId,
657
- action,
658
- status,
659
- country,
660
- region,
661
- startDate,
662
- endDate,
663
- },
664
- { abortEarly: false, allowUnknown: false }
665
- );
666
- if (warrning) {
667
- Logger({
668
- level: "WARN",
669
- message: `Parameter Validation warrnings for platform > Serviceability > getBulkServiceability \n ${warrning}`,
670
- });
671
- }
672
-
673
- const query_params = {};
674
- query_params["page_no"] = pageNo;
675
- query_params["page_size"] = pageSize;
676
- query_params["batch_id"] = batchId;
677
- query_params["action"] = action;
678
- query_params["status"] = status;
679
- query_params["country"] = country;
680
- query_params["region"] = region;
681
- query_params["start_date"] = startDate;
682
- query_params["end_date"] = endDate;
683
-
684
- const xHeaders = {};
685
-
686
- const response = await PlatformAPIClient.execute(
687
- this.config,
688
- "get",
689
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
690
- query_params,
691
- undefined,
692
- { ...xHeaders, ...requestHeaders },
693
- { responseHeaders }
694
- );
695
-
696
- let responseData = response;
697
- if (responseHeaders) {
698
- responseData = response[0];
699
- }
700
-
701
- const {
702
- error: res_error,
703
- } = ServiceabilityPlatformModel.BulkRegionResponse().validate(
704
- responseData,
705
- { abortEarly: false, allowUnknown: true }
706
- );
707
-
708
- if (res_error) {
709
- if (this.config.options.strictResponseCheck === true) {
710
- return Promise.reject(new FDKResponseValidationError(res_error));
711
- } else {
712
- Logger({
713
- level: "WARN",
714
- message: `Response Validation Warnings for platform > Serviceability > getBulkServiceability \n ${res_error}`,
715
- });
716
- }
717
- }
718
-
719
- return response;
720
- }
721
-
722
- /**
723
- * @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object
724
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
725
- * @param {import("../PlatformAPIClient").Options} - Options
726
- * @returns {Promise<ServiceabilityPlatformModel.BulkRegionResponse>} -
727
- * Success response
728
- * @name getBulkTat
729
- * @summary: Get region tat bulk history
730
- * @description: Get region tat bulk history - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkTat/).
731
- */
732
- async getBulkTat(
733
- {
734
- extensionId,
735
- schemeId,
736
- pageNo,
737
- pageSize,
738
- batchId,
739
- action,
740
- status,
741
- country,
742
- region,
743
- startDate,
744
- endDate,
745
- requestHeaders,
746
- } = { requestHeaders: {} },
747
- { responseHeaders } = { responseHeaders: false }
748
- ) {
749
- const { error } = ServiceabilityPlatformValidator.getBulkTat().validate(
750
- {
751
- extensionId,
752
- schemeId,
753
- pageNo,
754
- pageSize,
755
- batchId,
756
- action,
757
- status,
758
- country,
759
- region,
760
- startDate,
761
- endDate,
762
- },
763
- { abortEarly: false, allowUnknown: true }
764
- );
765
- if (error) {
766
- return Promise.reject(new FDKClientValidationError(error));
767
- }
768
-
769
- // Showing warrnings if extra unknown parameters are found
770
- const {
771
- error: warrning,
772
- } = ServiceabilityPlatformValidator.getBulkTat().validate(
773
- {
774
- extensionId,
775
- schemeId,
776
- pageNo,
777
- pageSize,
778
- batchId,
779
- action,
780
- status,
781
- country,
782
- region,
783
- startDate,
784
- endDate,
785
- },
786
- { abortEarly: false, allowUnknown: false }
787
- );
788
- if (warrning) {
789
- Logger({
790
- level: "WARN",
791
- message: `Parameter Validation warrnings for platform > Serviceability > getBulkTat \n ${warrning}`,
792
- });
793
- }
794
-
795
- const query_params = {};
796
- query_params["page_no"] = pageNo;
797
- query_params["page_size"] = pageSize;
798
- query_params["batch_id"] = batchId;
799
- query_params["action"] = action;
800
- query_params["status"] = status;
801
- query_params["country"] = country;
802
- query_params["region"] = region;
803
- query_params["start_date"] = startDate;
804
- query_params["end_date"] = endDate;
805
-
806
- const xHeaders = {};
807
-
808
- const response = await PlatformAPIClient.execute(
809
- this.config,
810
- "get",
811
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
812
- query_params,
813
- undefined,
814
- { ...xHeaders, ...requestHeaders },
815
- { responseHeaders }
816
- );
817
-
818
- let responseData = response;
819
- if (responseHeaders) {
820
- responseData = response[0];
821
- }
822
-
823
- const {
824
- error: res_error,
825
- } = ServiceabilityPlatformModel.BulkRegionResponse().validate(
826
- responseData,
827
- { abortEarly: false, allowUnknown: true }
828
- );
829
-
830
- if (res_error) {
831
- if (this.config.options.strictResponseCheck === true) {
832
- return Promise.reject(new FDKResponseValidationError(res_error));
833
- } else {
834
- Logger({
835
- level: "WARN",
836
- message: `Response Validation Warnings for platform > Serviceability > getBulkTat \n ${res_error}`,
837
- });
838
- }
839
- }
840
-
841
- return response;
842
- }
843
-
844
- /**
845
- * @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg
846
- * - Arg object
847
- *
96
+ /**
97
+ * @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object
848
98
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
849
99
  * @param {import("../PlatformAPIClient").Options} - Options
850
- * @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
851
- * @name getCompanyConfiguration
852
- * @summary: Get All Courier Rules applied to company.
853
- * @description: This API returns all Courier Rules applied for company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyConfiguration/).
100
+ * @returns {Promise<ServiceabilityPlatformModel.GetStoresViewResponse>} -
101
+ * Success response
102
+ * @name getAllStores
103
+ * @summary: GET stores data
104
+ * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/).
854
105
  */
855
- async getCompanyConfiguration(
106
+ async getAllStores(
856
107
  { requestHeaders } = { requestHeaders: {} },
857
108
  { responseHeaders } = { responseHeaders: false }
858
109
  ) {
859
- const {
860
- error,
861
- } = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
110
+ const { error } = ServiceabilityPlatformValidator.getAllStores().validate(
862
111
  {},
863
112
  { abortEarly: false, allowUnknown: true }
864
113
  );
@@ -869,14 +118,14 @@ class Serviceability {
869
118
  // Showing warrnings if extra unknown parameters are found
870
119
  const {
871
120
  error: warrning,
872
- } = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
121
+ } = ServiceabilityPlatformValidator.getAllStores().validate(
873
122
  {},
874
123
  { abortEarly: false, allowUnknown: false }
875
124
  );
876
125
  if (warrning) {
877
126
  Logger({
878
127
  level: "WARN",
879
- message: `Parameter Validation warrnings for platform > Serviceability > getCompanyConfiguration \n ${warrning}`,
128
+ message: `Parameter Validation warrnings for platform > Serviceability > getAllStores \n ${warrning}`,
880
129
  });
881
130
  }
882
131
 
@@ -887,7 +136,7 @@ class Serviceability {
887
136
  const response = await PlatformAPIClient.execute(
888
137
  this.config,
889
138
  "get",
890
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`,
139
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/logistics/stores`,
891
140
  query_params,
892
141
  undefined,
893
142
  { ...xHeaders, ...requestHeaders },
@@ -901,10 +150,10 @@ class Serviceability {
901
150
 
902
151
  const {
903
152
  error: res_error,
904
- } = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, {
905
- abortEarly: false,
906
- allowUnknown: true,
907
- });
153
+ } = ServiceabilityPlatformModel.GetStoresViewResponse().validate(
154
+ responseData,
155
+ { abortEarly: false, allowUnknown: true }
156
+ );
908
157
 
909
158
  if (res_error) {
910
159
  if (this.config.options.strictResponseCheck === true) {
@@ -912,7 +161,7 @@ class Serviceability {
912
161
  } else {
913
162
  Logger({
914
163
  level: "WARN",
915
- message: `Response Validation Warnings for platform > Serviceability > getCompanyConfiguration \n ${res_error}`,
164
+ message: `Response Validation Warnings for platform > Serviceability > getAllStores \n ${res_error}`,
916
165
  });
917
166
  }
918
167
  }
@@ -921,26 +170,26 @@ class Serviceability {
921
170
  }
922
171
 
923
172
  /**
924
- * @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg
925
- * - Arg object
926
- *
173
+ * @param {ServiceabilityPlatformValidator.GetCompanyStoreViewParam} arg - Arg object
927
174
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
928
175
  * @param {import("../PlatformAPIClient").Options} - Options
929
- * @returns {Promise<ServiceabilityPlatformModel.CourierAccountResponse>} -
930
- * Success response
931
- * @name getCourierPartnerAccount
932
- * @summary: Getting Courier Account of a company from database.
933
- * @description: This API returns response DpAccount of a company from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccount/).
176
+ * @returns {Promise<ServiceabilityPlatformModel.CompanyStoreView_Response>}
177
+ * - Success response
178
+ *
179
+ * @name getCompanyStoreView
180
+ * @summary: Company Store View of application.
181
+ * @description: This API returns Company Store View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyStoreView/).
934
182
  */
935
- async getCourierPartnerAccount(
936
- { accountId, requestHeaders } = { requestHeaders: {} },
183
+ async getCompanyStoreView(
184
+ { pageNumber, pageSize, requestHeaders } = { requestHeaders: {} },
937
185
  { responseHeaders } = { responseHeaders: false }
938
186
  ) {
939
187
  const {
940
188
  error,
941
- } = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
189
+ } = ServiceabilityPlatformValidator.getCompanyStoreView().validate(
942
190
  {
943
- accountId,
191
+ pageNumber,
192
+ pageSize,
944
193
  },
945
194
  { abortEarly: false, allowUnknown: true }
946
195
  );
@@ -951,27 +200,30 @@ class Serviceability {
951
200
  // Showing warrnings if extra unknown parameters are found
952
201
  const {
953
202
  error: warrning,
954
- } = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
203
+ } = ServiceabilityPlatformValidator.getCompanyStoreView().validate(
955
204
  {
956
- accountId,
205
+ pageNumber,
206
+ pageSize,
957
207
  },
958
208
  { abortEarly: false, allowUnknown: false }
959
209
  );
960
210
  if (warrning) {
961
211
  Logger({
962
212
  level: "WARN",
963
- message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccount \n ${warrning}`,
213
+ message: `Parameter Validation warrnings for platform > Serviceability > getCompanyStoreView \n ${warrning}`,
964
214
  });
965
215
  }
966
216
 
967
217
  const query_params = {};
218
+ query_params["page_number"] = pageNumber;
219
+ query_params["page_size"] = pageSize;
968
220
 
969
221
  const xHeaders = {};
970
222
 
971
223
  const response = await PlatformAPIClient.execute(
972
224
  this.config,
973
225
  "get",
974
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
226
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/all-stores`,
975
227
  query_params,
976
228
  undefined,
977
229
  { ...xHeaders, ...requestHeaders },
@@ -985,7 +237,7 @@ class Serviceability {
985
237
 
986
238
  const {
987
239
  error: res_error,
988
- } = ServiceabilityPlatformModel.CourierAccountResponse().validate(
240
+ } = ServiceabilityPlatformModel.CompanyStoreView_Response().validate(
989
241
  responseData,
990
242
  { abortEarly: false, allowUnknown: true }
991
243
  );
@@ -996,7 +248,7 @@ class Serviceability {
996
248
  } else {
997
249
  Logger({
998
250
  level: "WARN",
999
- message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccount \n ${res_error}`,
251
+ message: `Response Validation Warnings for platform > Serviceability > getCompanyStoreView \n ${res_error}`,
1000
252
  });
1001
253
  }
1002
254
  }
@@ -1005,29 +257,30 @@ class Serviceability {
1005
257
  }
1006
258
 
1007
259
  /**
1008
- * @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam} arg
1009
- * - Arg object
1010
- *
260
+ * @param {ServiceabilityPlatformValidator.GetDpAccountParam} arg - Arg object
1011
261
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1012
262
  * @param {import("../PlatformAPIClient").Options} - Options
1013
- * @returns {Promise<ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResponse>}
263
+ * @returns {Promise<ServiceabilityPlatformModel.CompanyDpAccountListResponse>}
1014
264
  * - Success response
1015
265
  *
1016
- * @name getCourierPartnerAccounts
1017
- * @summary: Getting Courier Account list of a company.
1018
- * @description: This API returns Courier Account of a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccounts/).
266
+ * @name getDpAccount
267
+ * @summary: Getting DpAccount of a company from database.
268
+ * @description: This API returns response DpAccount of a company from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpAccount/).
1019
269
  */
1020
- async getCourierPartnerAccounts(
1021
- { pageNo, pageSize, stage, paymentMode, transportType, requestHeaders } = {
1022
- requestHeaders: {},
1023
- },
270
+ async getDpAccount(
271
+ {
272
+ pageNumber,
273
+ pageSize,
274
+ stage,
275
+ paymentMode,
276
+ transportType,
277
+ requestHeaders,
278
+ } = { requestHeaders: {} },
1024
279
  { responseHeaders } = { responseHeaders: false }
1025
280
  ) {
1026
- const {
1027
- error,
1028
- } = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
281
+ const { error } = ServiceabilityPlatformValidator.getDpAccount().validate(
1029
282
  {
1030
- pageNo,
283
+ pageNumber,
1031
284
  pageSize,
1032
285
  stage,
1033
286
  paymentMode,
@@ -1042,9 +295,9 @@ class Serviceability {
1042
295
  // Showing warrnings if extra unknown parameters are found
1043
296
  const {
1044
297
  error: warrning,
1045
- } = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
298
+ } = ServiceabilityPlatformValidator.getDpAccount().validate(
1046
299
  {
1047
- pageNo,
300
+ pageNumber,
1048
301
  pageSize,
1049
302
  stage,
1050
303
  paymentMode,
@@ -1055,12 +308,12 @@ class Serviceability {
1055
308
  if (warrning) {
1056
309
  Logger({
1057
310
  level: "WARN",
1058
- message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccounts \n ${warrning}`,
311
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpAccount \n ${warrning}`,
1059
312
  });
1060
313
  }
1061
314
 
1062
315
  const query_params = {};
1063
- query_params["page_no"] = pageNo;
316
+ query_params["page_number"] = pageNumber;
1064
317
  query_params["page_size"] = pageSize;
1065
318
  query_params["stage"] = stage;
1066
319
  query_params["payment_mode"] = paymentMode;
@@ -1071,7 +324,7 @@ class Serviceability {
1071
324
  const response = await PlatformAPIClient.execute(
1072
325
  this.config,
1073
326
  "get",
1074
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
327
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/account`,
1075
328
  query_params,
1076
329
  undefined,
1077
330
  { ...xHeaders, ...requestHeaders },
@@ -1085,7 +338,7 @@ class Serviceability {
1085
338
 
1086
339
  const {
1087
340
  error: res_error,
1088
- } = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResponse().validate(
341
+ } = ServiceabilityPlatformModel.CompanyDpAccountListResponse().validate(
1089
342
  responseData,
1090
343
  { abortEarly: false, allowUnknown: true }
1091
344
  );
@@ -1096,7 +349,7 @@ class Serviceability {
1096
349
  } else {
1097
350
  Logger({
1098
351
  level: "WARN",
1099
- message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccounts \n ${res_error}`,
352
+ message: `Response Validation Warnings for platform > Serviceability > getDpAccount \n ${res_error}`,
1100
353
  });
1101
354
  }
1102
355
  }
@@ -1105,25 +358,23 @@ class Serviceability {
1105
358
  }
1106
359
 
1107
360
  /**
1108
- * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
361
+ * @param {ServiceabilityPlatformValidator.GetDpCompanyRulesParam} arg - Arg object
1109
362
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1110
363
  * @param {import("../PlatformAPIClient").Options} - Options
1111
- * @returns {Promise<ServiceabilityPlatformModel.ReAssignStoreResponse>} -
364
+ * @returns {Promise<ServiceabilityPlatformModel.DPCompanyRuleResponse>} -
1112
365
  * Success response
1113
- * @name getOptimalLocations
1114
- * @summary: Get serviceable store of the item
1115
- * @description: This API returns serviceable store of the item. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/).
366
+ * @name getDpCompanyRules
367
+ * @summary: Get All DpCompanyRules applied to company from database.
368
+ * @description: This API returns response of all DpCompanyRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpCompanyRules/).
1116
369
  */
1117
- async getOptimalLocations(
1118
- { body, requestHeaders } = { requestHeaders: {} },
370
+ async getDpCompanyRules(
371
+ { requestHeaders } = { requestHeaders: {} },
1119
372
  { responseHeaders } = { responseHeaders: false }
1120
373
  ) {
1121
374
  const {
1122
375
  error,
1123
- } = ServiceabilityPlatformValidator.getOptimalLocations().validate(
1124
- {
1125
- body,
1126
- },
376
+ } = ServiceabilityPlatformValidator.getDpCompanyRules().validate(
377
+ {},
1127
378
  { abortEarly: false, allowUnknown: true }
1128
379
  );
1129
380
  if (error) {
@@ -1133,16 +384,14 @@ class Serviceability {
1133
384
  // Showing warrnings if extra unknown parameters are found
1134
385
  const {
1135
386
  error: warrning,
1136
- } = ServiceabilityPlatformValidator.getOptimalLocations().validate(
1137
- {
1138
- body,
1139
- },
387
+ } = ServiceabilityPlatformValidator.getDpCompanyRules().validate(
388
+ {},
1140
389
  { abortEarly: false, allowUnknown: false }
1141
390
  );
1142
391
  if (warrning) {
1143
392
  Logger({
1144
393
  level: "WARN",
1145
- message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`,
394
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpCompanyRules \n ${warrning}`,
1146
395
  });
1147
396
  }
1148
397
 
@@ -1152,10 +401,10 @@ class Serviceability {
1152
401
 
1153
402
  const response = await PlatformAPIClient.execute(
1154
403
  this.config,
1155
- "post",
1156
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/reassign`,
404
+ "get",
405
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/priority`,
1157
406
  query_params,
1158
- body,
407
+ undefined,
1159
408
  { ...xHeaders, ...requestHeaders },
1160
409
  { responseHeaders }
1161
410
  );
@@ -1167,7 +416,7 @@ class Serviceability {
1167
416
 
1168
417
  const {
1169
418
  error: res_error,
1170
- } = ServiceabilityPlatformModel.ReAssignStoreResponse().validate(
419
+ } = ServiceabilityPlatformModel.DPCompanyRuleResponse().validate(
1171
420
  responseData,
1172
421
  { abortEarly: false, allowUnknown: true }
1173
422
  );
@@ -1178,7 +427,7 @@ class Serviceability {
1178
427
  } else {
1179
428
  Logger({
1180
429
  level: "WARN",
1181
- message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`,
430
+ message: `Response Validation Warnings for platform > Serviceability > getDpCompanyRules \n ${res_error}`,
1182
431
  });
1183
432
  }
1184
433
  }
@@ -1187,32 +436,26 @@ class Serviceability {
1187
436
  }
1188
437
 
1189
438
  /**
1190
- * @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg
1191
- * - Arg object
1192
- *
439
+ * @param {ServiceabilityPlatformValidator.GetDpRuleInsertParam} arg - Arg object
1193
440
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1194
441
  * @param {import("../PlatformAPIClient").Options} - Options
1195
- * @returns {Promise<ServiceabilityPlatformModel.PackageMaterialList>} -
1196
- * Success response
1197
- * @name getPackageMaterialList
1198
- * @summary: Fetching of PackageMaterials from database.
1199
- * @description: This API returns response of PackageMaterials from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/).
442
+ * @returns {Promise<ServiceabilityPlatformModel.DpMultipleRuleSuccessResponse>}
443
+ * - Success response
444
+ *
445
+ * @name getDpRuleInsert
446
+ * @summary: Fetching of DpRules from database.
447
+ * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRuleInsert/).
1200
448
  */
1201
- async getPackageMaterialList(
1202
- { pageNo, pageSize, q, size, packageType, requestHeaders } = {
1203
- requestHeaders: {},
1204
- },
449
+ async getDpRuleInsert(
450
+ { pageNumber, pageSize, requestHeaders } = { requestHeaders: {} },
1205
451
  { responseHeaders } = { responseHeaders: false }
1206
452
  ) {
1207
453
  const {
1208
454
  error,
1209
- } = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
455
+ } = ServiceabilityPlatformValidator.getDpRuleInsert().validate(
1210
456
  {
1211
- pageNo,
457
+ pageNumber,
1212
458
  pageSize,
1213
- q,
1214
- size,
1215
- packageType,
1216
459
  },
1217
460
  { abortEarly: false, allowUnknown: true }
1218
461
  );
@@ -1223,36 +466,30 @@ class Serviceability {
1223
466
  // Showing warrnings if extra unknown parameters are found
1224
467
  const {
1225
468
  error: warrning,
1226
- } = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
469
+ } = ServiceabilityPlatformValidator.getDpRuleInsert().validate(
1227
470
  {
1228
- pageNo,
471
+ pageNumber,
1229
472
  pageSize,
1230
- q,
1231
- size,
1232
- packageType,
1233
473
  },
1234
474
  { abortEarly: false, allowUnknown: false }
1235
475
  );
1236
476
  if (warrning) {
1237
477
  Logger({
1238
478
  level: "WARN",
1239
- message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialList \n ${warrning}`,
479
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpRuleInsert \n ${warrning}`,
1240
480
  });
1241
481
  }
1242
482
 
1243
483
  const query_params = {};
1244
- query_params["page_no"] = pageNo;
484
+ query_params["page_number"] = pageNumber;
1245
485
  query_params["page_size"] = pageSize;
1246
- query_params["q"] = q;
1247
- query_params["size"] = size;
1248
- query_params["package_type"] = packageType;
1249
486
 
1250
487
  const xHeaders = {};
1251
488
 
1252
489
  const response = await PlatformAPIClient.execute(
1253
490
  this.config,
1254
491
  "get",
1255
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
492
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules`,
1256
493
  query_params,
1257
494
  undefined,
1258
495
  { ...xHeaders, ...requestHeaders },
@@ -1266,7 +503,7 @@ class Serviceability {
1266
503
 
1267
504
  const {
1268
505
  error: res_error,
1269
- } = ServiceabilityPlatformModel.PackageMaterialList().validate(
506
+ } = ServiceabilityPlatformModel.DpMultipleRuleSuccessResponse().validate(
1270
507
  responseData,
1271
508
  { abortEarly: false, allowUnknown: true }
1272
509
  );
@@ -1277,7 +514,7 @@ class Serviceability {
1277
514
  } else {
1278
515
  Logger({
1279
516
  level: "WARN",
1280
- message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialList \n ${res_error}`,
517
+ message: `Response Validation Warnings for platform > Serviceability > getDpRuleInsert \n ${res_error}`,
1281
518
  });
1282
519
  }
1283
520
  }
@@ -1286,26 +523,22 @@ class Serviceability {
1286
523
  }
1287
524
 
1288
525
  /**
1289
- * @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleParam} arg
1290
- * - Arg object
1291
- *
526
+ * @param {ServiceabilityPlatformValidator.GetDpRulesParam} arg - Arg object
1292
527
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1293
528
  * @param {import("../PlatformAPIClient").Options} - Options
1294
- * @returns {Promise<ServiceabilityPlatformModel.PackageRuleResponse>} -
529
+ * @returns {Promise<ServiceabilityPlatformModel.DpRuleSuccessResponse>} -
1295
530
  * Success response
1296
- * @name getPackageMaterialRule
1297
- * @summary: Fetching of Package Material from database.
1298
- * @description: This API returns response of Package Material from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/).
531
+ * @name getDpRules
532
+ * @summary: Fetching of DpRules from database.
533
+ * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRules/).
1299
534
  */
1300
- async getPackageMaterialRule(
1301
- { ruleId, requestHeaders } = { requestHeaders: {} },
535
+ async getDpRules(
536
+ { ruleUid, requestHeaders } = { requestHeaders: {} },
1302
537
  { responseHeaders } = { responseHeaders: false }
1303
538
  ) {
1304
- const {
1305
- error,
1306
- } = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
539
+ const { error } = ServiceabilityPlatformValidator.getDpRules().validate(
1307
540
  {
1308
- ruleId,
541
+ ruleUid,
1309
542
  },
1310
543
  { abortEarly: false, allowUnknown: true }
1311
544
  );
@@ -1316,16 +549,16 @@ class Serviceability {
1316
549
  // Showing warrnings if extra unknown parameters are found
1317
550
  const {
1318
551
  error: warrning,
1319
- } = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
552
+ } = ServiceabilityPlatformValidator.getDpRules().validate(
1320
553
  {
1321
- ruleId,
554
+ ruleUid,
1322
555
  },
1323
556
  { abortEarly: false, allowUnknown: false }
1324
557
  );
1325
558
  if (warrning) {
1326
559
  Logger({
1327
560
  level: "WARN",
1328
- message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRule \n ${warrning}`,
561
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpRules \n ${warrning}`,
1329
562
  });
1330
563
  }
1331
564
 
@@ -1336,7 +569,7 @@ class Serviceability {
1336
569
  const response = await PlatformAPIClient.execute(
1337
570
  this.config,
1338
571
  "get",
1339
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`,
572
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules/${ruleUid}`,
1340
573
  query_params,
1341
574
  undefined,
1342
575
  { ...xHeaders, ...requestHeaders },
@@ -1350,7 +583,7 @@ class Serviceability {
1350
583
 
1351
584
  const {
1352
585
  error: res_error,
1353
- } = ServiceabilityPlatformModel.PackageRuleResponse().validate(
586
+ } = ServiceabilityPlatformModel.DpRuleSuccessResponse().validate(
1354
587
  responseData,
1355
588
  { abortEarly: false, allowUnknown: true }
1356
589
  );
@@ -1361,7 +594,7 @@ class Serviceability {
1361
594
  } else {
1362
595
  Logger({
1363
596
  level: "WARN",
1364
- message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRule \n ${res_error}`,
597
+ message: `Response Validation Warnings for platform > Serviceability > getDpRules \n ${res_error}`,
1365
598
  });
1366
599
  }
1367
600
  }
@@ -1370,29 +603,25 @@ class Serviceability {
1370
603
  }
1371
604
 
1372
605
  /**
1373
- * @param {ServiceabilityPlatformValidator.GetPackageMaterialRulesParam} arg
1374
- * - Arg object
1375
- *
606
+ * @param {ServiceabilityPlatformValidator.GetEntityRegionViewParam} arg - Arg object
1376
607
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1377
608
  * @param {import("../PlatformAPIClient").Options} - Options
1378
- * @returns {Promise<ServiceabilityPlatformModel.PackageMaterialRuleList>}
609
+ * @returns {Promise<ServiceabilityPlatformModel.EntityRegionView_Response>}
1379
610
  * - Success response
1380
611
  *
1381
- * @name getPackageMaterialRules
1382
- * @summary: Fetching of Package Material Rules from database.
1383
- * @description: This API returns response of Package Materials Rules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRules/).
612
+ * @name getEntityRegionView
613
+ * @summary: Get country and state list
614
+ * @description: This API returns response for Entity Region View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getEntityRegionView/).
1384
615
  */
1385
- async getPackageMaterialRules(
1386
- { pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} },
616
+ async getEntityRegionView(
617
+ { body, requestHeaders } = { requestHeaders: {} },
1387
618
  { responseHeaders } = { responseHeaders: false }
1388
619
  ) {
1389
620
  const {
1390
621
  error,
1391
- } = ServiceabilityPlatformValidator.getPackageMaterialRules().validate(
622
+ } = ServiceabilityPlatformValidator.getEntityRegionView().validate(
1392
623
  {
1393
- pageNo,
1394
- pageSize,
1395
- isActive,
624
+ body,
1396
625
  },
1397
626
  { abortEarly: false, allowUnknown: true }
1398
627
  );
@@ -1403,34 +632,29 @@ class Serviceability {
1403
632
  // Showing warrnings if extra unknown parameters are found
1404
633
  const {
1405
634
  error: warrning,
1406
- } = ServiceabilityPlatformValidator.getPackageMaterialRules().validate(
635
+ } = ServiceabilityPlatformValidator.getEntityRegionView().validate(
1407
636
  {
1408
- pageNo,
1409
- pageSize,
1410
- isActive,
637
+ body,
1411
638
  },
1412
639
  { abortEarly: false, allowUnknown: false }
1413
640
  );
1414
641
  if (warrning) {
1415
642
  Logger({
1416
643
  level: "WARN",
1417
- message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRules \n ${warrning}`,
644
+ message: `Parameter Validation warrnings for platform > Serviceability > getEntityRegionView \n ${warrning}`,
1418
645
  });
1419
646
  }
1420
647
 
1421
648
  const query_params = {};
1422
- query_params["page_no"] = pageNo;
1423
- query_params["page_size"] = pageSize;
1424
- query_params["is_active"] = isActive;
1425
649
 
1426
650
  const xHeaders = {};
1427
651
 
1428
652
  const response = await PlatformAPIClient.execute(
1429
653
  this.config,
1430
- "get",
1431
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
654
+ "post",
655
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/regions`,
1432
656
  query_params,
1433
- undefined,
657
+ body,
1434
658
  { ...xHeaders, ...requestHeaders },
1435
659
  { responseHeaders }
1436
660
  );
@@ -1442,7 +666,7 @@ class Serviceability {
1442
666
 
1443
667
  const {
1444
668
  error: res_error,
1445
- } = ServiceabilityPlatformModel.PackageMaterialRuleList().validate(
669
+ } = ServiceabilityPlatformModel.EntityRegionView_Response().validate(
1446
670
  responseData,
1447
671
  { abortEarly: false, allowUnknown: true }
1448
672
  );
@@ -1453,7 +677,7 @@ class Serviceability {
1453
677
  } else {
1454
678
  Logger({
1455
679
  level: "WARN",
1456
- message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRules \n ${res_error}`,
680
+ message: `Response Validation Warnings for platform > Serviceability > getEntityRegionView \n ${res_error}`,
1457
681
  });
1458
682
  }
1459
683
  }
@@ -1462,25 +686,28 @@ class Serviceability {
1462
686
  }
1463
687
 
1464
688
  /**
1465
- * @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object
689
+ * @param {ServiceabilityPlatformValidator.GetListViewParam} arg - Arg object
1466
690
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1467
691
  * @param {import("../PlatformAPIClient").Options} - Options
1468
- * @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
1469
- * - Success response
1470
- *
1471
- * @name getPackageMaterials
1472
- * @summary: Fetching of Package Material from database.
1473
- * @description: This API returns response of Package Material from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/).
692
+ * @returns {Promise<ServiceabilityPlatformModel.ListViewResponse>} - Success response
693
+ * @name getListView
694
+ * @summary: Zone List of application.
695
+ * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getListView/).
1474
696
  */
1475
- async getPackageMaterials(
1476
- { packageMaterialId, requestHeaders } = { requestHeaders: {} },
697
+ async getListView(
698
+ { pageNumber, pageSize, name, isActive, channelIds, q, requestHeaders } = {
699
+ requestHeaders: {},
700
+ },
1477
701
  { responseHeaders } = { responseHeaders: false }
1478
702
  ) {
1479
- const {
1480
- error,
1481
- } = ServiceabilityPlatformValidator.getPackageMaterials().validate(
703
+ const { error } = ServiceabilityPlatformValidator.getListView().validate(
1482
704
  {
1483
- packageMaterialId,
705
+ pageNumber,
706
+ pageSize,
707
+ name,
708
+ isActive,
709
+ channelIds,
710
+ q,
1484
711
  },
1485
712
  { abortEarly: false, allowUnknown: true }
1486
713
  );
@@ -1491,27 +718,38 @@ class Serviceability {
1491
718
  // Showing warrnings if extra unknown parameters are found
1492
719
  const {
1493
720
  error: warrning,
1494
- } = ServiceabilityPlatformValidator.getPackageMaterials().validate(
721
+ } = ServiceabilityPlatformValidator.getListView().validate(
1495
722
  {
1496
- packageMaterialId,
723
+ pageNumber,
724
+ pageSize,
725
+ name,
726
+ isActive,
727
+ channelIds,
728
+ q,
1497
729
  },
1498
730
  { abortEarly: false, allowUnknown: false }
1499
731
  );
1500
732
  if (warrning) {
1501
733
  Logger({
1502
734
  level: "WARN",
1503
- message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterials \n ${warrning}`,
735
+ message: `Parameter Validation warrnings for platform > Serviceability > getListView \n ${warrning}`,
1504
736
  });
1505
737
  }
1506
738
 
1507
739
  const query_params = {};
740
+ query_params["page_number"] = pageNumber;
741
+ query_params["page_size"] = pageSize;
742
+ query_params["name"] = name;
743
+ query_params["is_active"] = isActive;
744
+ query_params["channel_ids"] = channelIds;
745
+ query_params["q"] = q;
1508
746
 
1509
747
  const xHeaders = {};
1510
748
 
1511
749
  const response = await PlatformAPIClient.execute(
1512
750
  this.config,
1513
751
  "get",
1514
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`,
752
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/zones`,
1515
753
  query_params,
1516
754
  undefined,
1517
755
  { ...xHeaders, ...requestHeaders },
@@ -1525,10 +763,10 @@ class Serviceability {
1525
763
 
1526
764
  const {
1527
765
  error: res_error,
1528
- } = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
1529
- responseData,
1530
- { abortEarly: false, allowUnknown: true }
1531
- );
766
+ } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, {
767
+ abortEarly: false,
768
+ allowUnknown: true,
769
+ });
1532
770
 
1533
771
  if (res_error) {
1534
772
  if (this.config.options.strictResponseCheck === true) {
@@ -1536,7 +774,7 @@ class Serviceability {
1536
774
  } else {
1537
775
  Logger({
1538
776
  level: "WARN",
1539
- message: `Response Validation Warnings for platform > Serviceability > getPackageMaterials \n ${res_error}`,
777
+ message: `Response Validation Warnings for platform > Serviceability > getListView \n ${res_error}`,
1540
778
  });
1541
779
  }
1542
780
  }
@@ -1545,28 +783,24 @@ class Serviceability {
1545
783
  }
1546
784
 
1547
785
  /**
1548
- * @param {ServiceabilityPlatformValidator.GetServiceabilityParam} arg - Arg object
786
+ * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
1549
787
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1550
788
  * @param {import("../PlatformAPIClient").Options} - Options
1551
- * @returns {Promise<ServiceabilityPlatformModel.ServiceabilityModel>} -
789
+ * @returns {Promise<ServiceabilityPlatformModel.ReAssignStoreResponse>} -
1552
790
  * Success response
1553
- * @name getServiceability
1554
- * @summary: Get Serviceability of a region
1555
- * @description: Get Serviceability of a region - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getServiceability/).
791
+ * @name getOptimalLocations
792
+ * @summary: Get serviceable store of the item
793
+ * @description: This API returns serviceable store of the item. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/).
1556
794
  */
1557
- async getServiceability(
1558
- { extensionId, schemeId, regionId, requestHeaders } = {
1559
- requestHeaders: {},
1560
- },
795
+ async getOptimalLocations(
796
+ { body, requestHeaders } = { requestHeaders: {} },
1561
797
  { responseHeaders } = { responseHeaders: false }
1562
798
  ) {
1563
799
  const {
1564
800
  error,
1565
- } = ServiceabilityPlatformValidator.getServiceability().validate(
801
+ } = ServiceabilityPlatformValidator.getOptimalLocations().validate(
1566
802
  {
1567
- extensionId,
1568
- schemeId,
1569
- regionId,
803
+ body,
1570
804
  },
1571
805
  { abortEarly: false, allowUnknown: true }
1572
806
  );
@@ -1577,18 +811,16 @@ class Serviceability {
1577
811
  // Showing warrnings if extra unknown parameters are found
1578
812
  const {
1579
813
  error: warrning,
1580
- } = ServiceabilityPlatformValidator.getServiceability().validate(
814
+ } = ServiceabilityPlatformValidator.getOptimalLocations().validate(
1581
815
  {
1582
- extensionId,
1583
- schemeId,
1584
- regionId,
816
+ body,
1585
817
  },
1586
818
  { abortEarly: false, allowUnknown: false }
1587
819
  );
1588
820
  if (warrning) {
1589
821
  Logger({
1590
822
  level: "WARN",
1591
- message: `Parameter Validation warrnings for platform > Serviceability > getServiceability \n ${warrning}`,
823
+ message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`,
1592
824
  });
1593
825
  }
1594
826
 
@@ -1598,10 +830,10 @@ class Serviceability {
1598
830
 
1599
831
  const response = await PlatformAPIClient.execute(
1600
832
  this.config,
1601
- "get",
1602
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/region/${regionId}`,
833
+ "post",
834
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/reassign`,
1603
835
  query_params,
1604
- undefined,
836
+ body,
1605
837
  { ...xHeaders, ...requestHeaders },
1606
838
  { responseHeaders }
1607
839
  );
@@ -1613,7 +845,7 @@ class Serviceability {
1613
845
 
1614
846
  const {
1615
847
  error: res_error,
1616
- } = ServiceabilityPlatformModel.ServiceabilityModel().validate(
848
+ } = ServiceabilityPlatformModel.ReAssignStoreResponse().validate(
1617
849
  responseData,
1618
850
  { abortEarly: false, allowUnknown: true }
1619
851
  );
@@ -1624,7 +856,7 @@ class Serviceability {
1624
856
  } else {
1625
857
  Logger({
1626
858
  level: "WARN",
1627
- message: `Response Validation Warnings for platform > Serviceability > getServiceability \n ${res_error}`,
859
+ message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`,
1628
860
  });
1629
861
  }
1630
862
  }
@@ -1633,22 +865,22 @@ class Serviceability {
1633
865
  }
1634
866
 
1635
867
  /**
1636
- * @param {ServiceabilityPlatformValidator.GetZoneByIdParam} arg - Arg object
868
+ * @param {ServiceabilityPlatformValidator.GetStoreParam} arg - Arg object
1637
869
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1638
870
  * @param {import("../PlatformAPIClient").Options} - Options
1639
- * @returns {Promise<ServiceabilityPlatformModel.GetZoneByIdSchema>} -
871
+ * @returns {Promise<ServiceabilityPlatformModel.GetStoresViewResponse>} -
1640
872
  * Success response
1641
- * @name getZoneById
1642
- * @summary: Get details of the Zone
1643
- * @description: Returns the region, application, store mapping and other details in the Zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneById/).
873
+ * @name getStore
874
+ * @summary: GET stores data
875
+ * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStore/).
1644
876
  */
1645
- async getZoneById(
1646
- { zoneId, requestHeaders } = { requestHeaders: {} },
877
+ async getStore(
878
+ { storeUid, requestHeaders } = { requestHeaders: {} },
1647
879
  { responseHeaders } = { responseHeaders: false }
1648
880
  ) {
1649
- const { error } = ServiceabilityPlatformValidator.getZoneById().validate(
881
+ const { error } = ServiceabilityPlatformValidator.getStore().validate(
1650
882
  {
1651
- zoneId,
883
+ storeUid,
1652
884
  },
1653
885
  { abortEarly: false, allowUnknown: true }
1654
886
  );
@@ -1659,16 +891,16 @@ class Serviceability {
1659
891
  // Showing warrnings if extra unknown parameters are found
1660
892
  const {
1661
893
  error: warrning,
1662
- } = ServiceabilityPlatformValidator.getZoneById().validate(
894
+ } = ServiceabilityPlatformValidator.getStore().validate(
1663
895
  {
1664
- zoneId,
896
+ storeUid,
1665
897
  },
1666
898
  { abortEarly: false, allowUnknown: false }
1667
899
  );
1668
900
  if (warrning) {
1669
901
  Logger({
1670
902
  level: "WARN",
1671
- message: `Parameter Validation warrnings for platform > Serviceability > getZoneById \n ${warrning}`,
903
+ message: `Parameter Validation warrnings for platform > Serviceability > getStore \n ${warrning}`,
1672
904
  });
1673
905
  }
1674
906
 
@@ -1679,7 +911,7 @@ class Serviceability {
1679
911
  const response = await PlatformAPIClient.execute(
1680
912
  this.config,
1681
913
  "get",
1682
- `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones/${zoneId}`,
914
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/stores/${storeUid}`,
1683
915
  query_params,
1684
916
  undefined,
1685
917
  { ...xHeaders, ...requestHeaders },
@@ -1693,10 +925,10 @@ class Serviceability {
1693
925
 
1694
926
  const {
1695
927
  error: res_error,
1696
- } = ServiceabilityPlatformModel.GetZoneByIdSchema().validate(responseData, {
1697
- abortEarly: false,
1698
- allowUnknown: true,
1699
- });
928
+ } = ServiceabilityPlatformModel.GetStoresViewResponse().validate(
929
+ responseData,
930
+ { abortEarly: false, allowUnknown: true }
931
+ );
1700
932
 
1701
933
  if (res_error) {
1702
934
  if (this.config.options.strictResponseCheck === true) {
@@ -1704,7 +936,7 @@ class Serviceability {
1704
936
  } else {
1705
937
  Logger({
1706
938
  level: "WARN",
1707
- message: `Response Validation Warnings for platform > Serviceability > getZoneById \n ${res_error}`,
939
+ message: `Response Validation Warnings for platform > Serviceability > getStore \n ${res_error}`,
1708
940
  });
1709
941
  }
1710
942
  }
@@ -1713,42 +945,25 @@ class Serviceability {
1713
945
  }
1714
946
 
1715
947
  /**
1716
- * @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object
948
+ * @param {ServiceabilityPlatformValidator.GetZoneDataViewParam} arg - Arg object
1717
949
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1718
950
  * @param {import("../PlatformAPIClient").Options} - Options
1719
- * @returns {Promise<ServiceabilityPlatformModel.ListViewResponse>} - Success response
1720
- * @name getZones
1721
- * @summary: Shows zones defined at the company level
1722
- * @description: Return the list of zones that are defined at the company level. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/).
951
+ * @returns {Promise<ServiceabilityPlatformModel.GetSingleZoneDataViewResponse>}
952
+ * - Success response
953
+ *
954
+ * @name getZoneDataView
955
+ * @summary: Zone Data View of application.
956
+ * @description: This API returns Zone Data View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneDataView/).
1723
957
  */
1724
- async getZones(
1725
- {
1726
- pageNo,
1727
- pageSize,
1728
- isActive,
1729
- channelId,
1730
- q,
1731
- country,
1732
- state,
1733
- city,
1734
- pincode,
1735
- sector,
1736
- requestHeaders,
1737
- } = { requestHeaders: {} },
958
+ async getZoneDataView(
959
+ { zoneId, requestHeaders } = { requestHeaders: {} },
1738
960
  { responseHeaders } = { responseHeaders: false }
1739
961
  ) {
1740
- const { error } = ServiceabilityPlatformValidator.getZones().validate(
962
+ const {
963
+ error,
964
+ } = ServiceabilityPlatformValidator.getZoneDataView().validate(
1741
965
  {
1742
- pageNo,
1743
- pageSize,
1744
- isActive,
1745
- channelId,
1746
- q,
1747
- country,
1748
- state,
1749
- city,
1750
- pincode,
1751
- sector,
966
+ zoneId,
1752
967
  },
1753
968
  { abortEarly: false, allowUnknown: true }
1754
969
  );
@@ -1759,46 +974,27 @@ class Serviceability {
1759
974
  // Showing warrnings if extra unknown parameters are found
1760
975
  const {
1761
976
  error: warrning,
1762
- } = ServiceabilityPlatformValidator.getZones().validate(
977
+ } = ServiceabilityPlatformValidator.getZoneDataView().validate(
1763
978
  {
1764
- pageNo,
1765
- pageSize,
1766
- isActive,
1767
- channelId,
1768
- q,
1769
- country,
1770
- state,
1771
- city,
1772
- pincode,
1773
- sector,
979
+ zoneId,
1774
980
  },
1775
981
  { abortEarly: false, allowUnknown: false }
1776
982
  );
1777
983
  if (warrning) {
1778
984
  Logger({
1779
985
  level: "WARN",
1780
- message: `Parameter Validation warrnings for platform > Serviceability > getZones \n ${warrning}`,
986
+ message: `Parameter Validation warrnings for platform > Serviceability > getZoneDataView \n ${warrning}`,
1781
987
  });
1782
988
  }
1783
989
 
1784
990
  const query_params = {};
1785
- query_params["page_no"] = pageNo;
1786
- query_params["page_size"] = pageSize;
1787
- query_params["is_active"] = isActive;
1788
- query_params["channel_id"] = channelId;
1789
- query_params["q"] = q;
1790
- query_params["country"] = country;
1791
- query_params["state"] = state;
1792
- query_params["city"] = city;
1793
- query_params["pincode"] = pincode;
1794
- query_params["sector"] = sector;
1795
991
 
1796
992
  const xHeaders = {};
1797
993
 
1798
994
  const response = await PlatformAPIClient.execute(
1799
995
  this.config,
1800
996
  "get",
1801
- `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones`,
997
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone/${zoneId}`,
1802
998
  query_params,
1803
999
  undefined,
1804
1000
  { ...xHeaders, ...requestHeaders },
@@ -1812,10 +1008,10 @@ class Serviceability {
1812
1008
 
1813
1009
  const {
1814
1010
  error: res_error,
1815
- } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, {
1816
- abortEarly: false,
1817
- allowUnknown: true,
1818
- });
1011
+ } = ServiceabilityPlatformModel.GetSingleZoneDataViewResponse().validate(
1012
+ responseData,
1013
+ { abortEarly: false, allowUnknown: true }
1014
+ );
1819
1015
 
1820
1016
  if (res_error) {
1821
1017
  if (this.config.options.strictResponseCheck === true) {
@@ -1823,7 +1019,7 @@ class Serviceability {
1823
1019
  } else {
1824
1020
  Logger({
1825
1021
  level: "WARN",
1826
- message: `Response Validation Warnings for platform > Serviceability > getZones \n ${res_error}`,
1022
+ message: `Response Validation Warnings for platform > Serviceability > getZoneDataView \n ${res_error}`,
1827
1023
  });
1828
1024
  }
1829
1025
  }
@@ -1832,25 +1028,40 @@ class Serviceability {
1832
1028
  }
1833
1029
 
1834
1030
  /**
1835
- * @param {ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam} arg
1836
- * - Arg object
1837
- *
1031
+ * @param {ServiceabilityPlatformValidator.GetZoneListViewParam} arg - Arg object
1838
1032
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1839
1033
  * @param {import("../PlatformAPIClient").Options} - Options
1840
- * @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
1841
- * @name updateCompanyConfiguration
1842
- * @summary: Apply Courier Rule to company.
1843
- * @description: Apply Courier Rule to company with rules priority - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCompanyConfiguration/).
1034
+ * @returns {Promise<ServiceabilityPlatformModel.ListViewResponse>} - Success response
1035
+ * @name getZoneListView
1036
+ * @summary: Zone List of application.
1037
+ * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneListView/).
1844
1038
  */
1845
- async updateCompanyConfiguration(
1846
- { body, requestHeaders } = { requestHeaders: {} },
1039
+ async getZoneListView(
1040
+ {
1041
+ pageNumber,
1042
+ pageNo,
1043
+ pageSize,
1044
+ name,
1045
+ isActive,
1046
+ channelIds,
1047
+ q,
1048
+ zoneId,
1049
+ requestHeaders,
1050
+ } = { requestHeaders: {} },
1847
1051
  { responseHeaders } = { responseHeaders: false }
1848
1052
  ) {
1849
1053
  const {
1850
1054
  error,
1851
- } = ServiceabilityPlatformValidator.updateCompanyConfiguration().validate(
1055
+ } = ServiceabilityPlatformValidator.getZoneListView().validate(
1852
1056
  {
1853
- body,
1057
+ pageNumber,
1058
+ pageNo,
1059
+ pageSize,
1060
+ name,
1061
+ isActive,
1062
+ channelIds,
1063
+ q,
1064
+ zoneId,
1854
1065
  },
1855
1066
  { abortEarly: false, allowUnknown: true }
1856
1067
  );
@@ -1861,29 +1072,44 @@ class Serviceability {
1861
1072
  // Showing warrnings if extra unknown parameters are found
1862
1073
  const {
1863
1074
  error: warrning,
1864
- } = ServiceabilityPlatformValidator.updateCompanyConfiguration().validate(
1075
+ } = ServiceabilityPlatformValidator.getZoneListView().validate(
1865
1076
  {
1866
- body,
1077
+ pageNumber,
1078
+ pageNo,
1079
+ pageSize,
1080
+ name,
1081
+ isActive,
1082
+ channelIds,
1083
+ q,
1084
+ zoneId,
1867
1085
  },
1868
1086
  { abortEarly: false, allowUnknown: false }
1869
1087
  );
1870
1088
  if (warrning) {
1871
1089
  Logger({
1872
1090
  level: "WARN",
1873
- message: `Parameter Validation warrnings for platform > Serviceability > updateCompanyConfiguration \n ${warrning}`,
1091
+ message: `Parameter Validation warrnings for platform > Serviceability > getZoneListView \n ${warrning}`,
1874
1092
  });
1875
1093
  }
1876
1094
 
1877
1095
  const query_params = {};
1096
+ query_params["page_number"] = pageNumber;
1097
+ query_params["page_no"] = pageNo;
1098
+ query_params["page_size"] = pageSize;
1099
+ query_params["name"] = name;
1100
+ query_params["is_active"] = isActive;
1101
+ query_params["channel_ids"] = channelIds;
1102
+ query_params["q"] = q;
1103
+ query_params["zone_id"] = zoneId;
1878
1104
 
1879
1105
  const xHeaders = {};
1880
1106
 
1881
1107
  const response = await PlatformAPIClient.execute(
1882
1108
  this.config,
1883
- "put",
1884
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`,
1109
+ "get",
1110
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/zones-list`,
1885
1111
  query_params,
1886
- body,
1112
+ undefined,
1887
1113
  { ...xHeaders, ...requestHeaders },
1888
1114
  { responseHeaders }
1889
1115
  );
@@ -1895,7 +1121,7 @@ class Serviceability {
1895
1121
 
1896
1122
  const {
1897
1123
  error: res_error,
1898
- } = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, {
1124
+ } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, {
1899
1125
  abortEarly: false,
1900
1126
  allowUnknown: true,
1901
1127
  });
@@ -1906,7 +1132,7 @@ class Serviceability {
1906
1132
  } else {
1907
1133
  Logger({
1908
1134
  level: "WARN",
1909
- message: `Response Validation Warnings for platform > Serviceability > updateCompanyConfiguration \n ${res_error}`,
1135
+ message: `Response Validation Warnings for platform > Serviceability > getZoneListView \n ${res_error}`,
1910
1136
  });
1911
1137
  }
1912
1138
  }
@@ -1915,26 +1141,23 @@ class Serviceability {
1915
1141
  }
1916
1142
 
1917
1143
  /**
1918
- * @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg
1919
- * - Arg object
1920
- *
1144
+ * @param {ServiceabilityPlatformValidator.UpdateDpRuleParam} arg - Arg object
1921
1145
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1922
1146
  * @param {import("../PlatformAPIClient").Options} - Options
1923
- * @returns {Promise<ServiceabilityPlatformModel.CourierAccountResponse>} -
1924
- * Success response
1925
- * @name updateCourierPartnerAccount
1926
- * @summary: Update Courier Account in database.
1927
- * @description: Updates Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerAccount/).
1147
+ * @returns {Promise<ServiceabilityPlatformModel.DpRuleUpdateSuccessResponse>}
1148
+ * - Success response
1149
+ *
1150
+ * @name updateDpRule
1151
+ * @summary: Updating of DpRules from database.
1152
+ * @description: This API updates and returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateDpRule/).
1928
1153
  */
1929
- async updateCourierPartnerAccount(
1930
- { accountId, body, requestHeaders } = { requestHeaders: {} },
1154
+ async updateDpRule(
1155
+ { ruleUid, body, requestHeaders } = { requestHeaders: {} },
1931
1156
  { responseHeaders } = { responseHeaders: false }
1932
1157
  ) {
1933
- const {
1934
- error,
1935
- } = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
1158
+ const { error } = ServiceabilityPlatformValidator.updateDpRule().validate(
1936
1159
  {
1937
- accountId,
1160
+ ruleUid,
1938
1161
  body,
1939
1162
  },
1940
1163
  { abortEarly: false, allowUnknown: true }
@@ -1946,9 +1169,9 @@ class Serviceability {
1946
1169
  // Showing warrnings if extra unknown parameters are found
1947
1170
  const {
1948
1171
  error: warrning,
1949
- } = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
1172
+ } = ServiceabilityPlatformValidator.updateDpRule().validate(
1950
1173
  {
1951
- accountId,
1174
+ ruleUid,
1952
1175
  body,
1953
1176
  },
1954
1177
  { abortEarly: false, allowUnknown: false }
@@ -1956,7 +1179,7 @@ class Serviceability {
1956
1179
  if (warrning) {
1957
1180
  Logger({
1958
1181
  level: "WARN",
1959
- message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerAccount \n ${warrning}`,
1182
+ message: `Parameter Validation warrnings for platform > Serviceability > updateDpRule \n ${warrning}`,
1960
1183
  });
1961
1184
  }
1962
1185
 
@@ -1967,7 +1190,7 @@ class Serviceability {
1967
1190
  const response = await PlatformAPIClient.execute(
1968
1191
  this.config,
1969
1192
  "put",
1970
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
1193
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules/${ruleUid}`,
1971
1194
  query_params,
1972
1195
  body,
1973
1196
  { ...xHeaders, ...requestHeaders },
@@ -1981,7 +1204,7 @@ class Serviceability {
1981
1204
 
1982
1205
  const {
1983
1206
  error: res_error,
1984
- } = ServiceabilityPlatformModel.CourierAccountResponse().validate(
1207
+ } = ServiceabilityPlatformModel.DpRuleUpdateSuccessResponse().validate(
1985
1208
  responseData,
1986
1209
  { abortEarly: false, allowUnknown: true }
1987
1210
  );
@@ -1992,7 +1215,7 @@ class Serviceability {
1992
1215
  } else {
1993
1216
  Logger({
1994
1217
  level: "WARN",
1995
- message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerAccount \n ${res_error}`,
1218
+ message: `Response Validation Warnings for platform > Serviceability > updateDpRule \n ${res_error}`,
1996
1219
  });
1997
1220
  }
1998
1221
  }
@@ -2001,26 +1224,27 @@ class Serviceability {
2001
1224
  }
2002
1225
 
2003
1226
  /**
2004
- * @param {ServiceabilityPlatformValidator.UpdatePackageMaterialRuleParam} arg
1227
+ * @param {ServiceabilityPlatformValidator.UpdateZoneControllerViewParam} arg
2005
1228
  * - Arg object
2006
1229
  *
2007
1230
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2008
1231
  * @param {import("../PlatformAPIClient").Options} - Options
2009
- * @returns {Promise<ServiceabilityPlatformModel.PackageRuleResponse>} -
1232
+ * @returns {Promise<ServiceabilityPlatformModel.ZoneSuccessResponse>} -
2010
1233
  * Success response
2011
- * @name updatePackageMaterialRule
2012
- * @summary: Fetching of Package Material Rules into database.
2013
- * @description: This API updates Package Material Rules into mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterialRule/).
1234
+ * @name updateZoneControllerView
1235
+ * @summary: Updation of zone collections in database.
1236
+ * @description: This API returns response of updation of zone in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneControllerView/).
2014
1237
  */
2015
- async updatePackageMaterialRule(
2016
- { ruleId, body, requestHeaders } = { requestHeaders: {} },
1238
+ async updateZoneControllerView(
1239
+ { zoneId, body, requestHeaders } = { requestHeaders: {} },
2017
1240
  { responseHeaders } = { responseHeaders: false }
2018
1241
  ) {
2019
1242
  const {
2020
1243
  error,
2021
- } = ServiceabilityPlatformValidator.updatePackageMaterialRule().validate(
1244
+ } = ServiceabilityPlatformValidator.updateZoneControllerView().validate(
2022
1245
  {
2023
- ruleId,
1246
+ zoneId,
1247
+
2024
1248
  body,
2025
1249
  },
2026
1250
  { abortEarly: false, allowUnknown: true }
@@ -2032,9 +1256,10 @@ class Serviceability {
2032
1256
  // Showing warrnings if extra unknown parameters are found
2033
1257
  const {
2034
1258
  error: warrning,
2035
- } = ServiceabilityPlatformValidator.updatePackageMaterialRule().validate(
1259
+ } = ServiceabilityPlatformValidator.updateZoneControllerView().validate(
2036
1260
  {
2037
- ruleId,
1261
+ zoneId,
1262
+
2038
1263
  body,
2039
1264
  },
2040
1265
  { abortEarly: false, allowUnknown: false }
@@ -2042,7 +1267,7 @@ class Serviceability {
2042
1267
  if (warrning) {
2043
1268
  Logger({
2044
1269
  level: "WARN",
2045
- message: `Parameter Validation warrnings for platform > Serviceability > updatePackageMaterialRule \n ${warrning}`,
1270
+ message: `Parameter Validation warrnings for platform > Serviceability > updateZoneControllerView \n ${warrning}`,
2046
1271
  });
2047
1272
  }
2048
1273
 
@@ -2052,8 +1277,8 @@ class Serviceability {
2052
1277
 
2053
1278
  const response = await PlatformAPIClient.execute(
2054
1279
  this.config,
2055
- "patch",
2056
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`,
1280
+ "put",
1281
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone/${zoneId}`,
2057
1282
  query_params,
2058
1283
  body,
2059
1284
  { ...xHeaders, ...requestHeaders },
@@ -2067,7 +1292,7 @@ class Serviceability {
2067
1292
 
2068
1293
  const {
2069
1294
  error: res_error,
2070
- } = ServiceabilityPlatformModel.PackageRuleResponse().validate(
1295
+ } = ServiceabilityPlatformModel.ZoneSuccessResponse().validate(
2071
1296
  responseData,
2072
1297
  { abortEarly: false, allowUnknown: true }
2073
1298
  );
@@ -2078,7 +1303,7 @@ class Serviceability {
2078
1303
  } else {
2079
1304
  Logger({
2080
1305
  level: "WARN",
2081
- message: `Response Validation Warnings for platform > Serviceability > updatePackageMaterialRule \n ${res_error}`,
1306
+ message: `Response Validation Warnings for platform > Serviceability > updateZoneControllerView \n ${res_error}`,
2082
1307
  });
2083
1308
  }
2084
1309
  }
@@ -2087,27 +1312,24 @@ class Serviceability {
2087
1312
  }
2088
1313
 
2089
1314
  /**
2090
- * @param {ServiceabilityPlatformValidator.UpdatePackageMaterialsParam} arg
2091
- * - Arg object
2092
- *
1315
+ * @param {ServiceabilityPlatformValidator.UpsertDpAccountParam} arg - Arg object
2093
1316
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2094
1317
  * @param {import("../PlatformAPIClient").Options} - Options
2095
- * @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
1318
+ * @returns {Promise<ServiceabilityPlatformModel.CompanyDpAccountResponse>}
2096
1319
  * - Success response
2097
1320
  *
2098
- * @name updatePackageMaterials
2099
- * @summary: Update Package Material to database.
2100
- * @description: This API updates Package Materials from into mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/).
1321
+ * @name upsertDpAccount
1322
+ * @summary: Upsertion of DpAccount in database.
1323
+ * @description: This API returns response of upsertion of DpAccount in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpAccount/).
2101
1324
  */
2102
- async updatePackageMaterials(
2103
- { packageMaterialId, body, requestHeaders } = { requestHeaders: {} },
1325
+ async upsertDpAccount(
1326
+ { body, requestHeaders } = { requestHeaders: {} },
2104
1327
  { responseHeaders } = { responseHeaders: false }
2105
1328
  ) {
2106
1329
  const {
2107
1330
  error,
2108
- } = ServiceabilityPlatformValidator.updatePackageMaterials().validate(
1331
+ } = ServiceabilityPlatformValidator.upsertDpAccount().validate(
2109
1332
  {
2110
- packageMaterialId,
2111
1333
  body,
2112
1334
  },
2113
1335
  { abortEarly: false, allowUnknown: true }
@@ -2119,9 +1341,8 @@ class Serviceability {
2119
1341
  // Showing warrnings if extra unknown parameters are found
2120
1342
  const {
2121
1343
  error: warrning,
2122
- } = ServiceabilityPlatformValidator.updatePackageMaterials().validate(
1344
+ } = ServiceabilityPlatformValidator.upsertDpAccount().validate(
2123
1345
  {
2124
- packageMaterialId,
2125
1346
  body,
2126
1347
  },
2127
1348
  { abortEarly: false, allowUnknown: false }
@@ -2129,7 +1350,7 @@ class Serviceability {
2129
1350
  if (warrning) {
2130
1351
  Logger({
2131
1352
  level: "WARN",
2132
- message: `Parameter Validation warrnings for platform > Serviceability > updatePackageMaterials \n ${warrning}`,
1353
+ message: `Parameter Validation warrnings for platform > Serviceability > upsertDpAccount \n ${warrning}`,
2133
1354
  });
2134
1355
  }
2135
1356
 
@@ -2139,8 +1360,8 @@ class Serviceability {
2139
1360
 
2140
1361
  const response = await PlatformAPIClient.execute(
2141
1362
  this.config,
2142
- "patch",
2143
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`,
1363
+ "post",
1364
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/account`,
2144
1365
  query_params,
2145
1366
  body,
2146
1367
  { ...xHeaders, ...requestHeaders },
@@ -2154,7 +1375,7 @@ class Serviceability {
2154
1375
 
2155
1376
  const {
2156
1377
  error: res_error,
2157
- } = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
1378
+ } = ServiceabilityPlatformModel.CompanyDpAccountResponse().validate(
2158
1379
  responseData,
2159
1380
  { abortEarly: false, allowUnknown: true }
2160
1381
  );
@@ -2165,7 +1386,7 @@ class Serviceability {
2165
1386
  } else {
2166
1387
  Logger({
2167
1388
  level: "WARN",
2168
- message: `Response Validation Warnings for platform > Serviceability > updatePackageMaterials \n ${res_error}`,
1389
+ message: `Response Validation Warnings for platform > Serviceability > upsertDpAccount \n ${res_error}`,
2169
1390
  });
2170
1391
  }
2171
1392
  }
@@ -2174,28 +1395,23 @@ class Serviceability {
2174
1395
  }
2175
1396
 
2176
1397
  /**
2177
- * @param {ServiceabilityPlatformValidator.UpdateServiceabilityParam} arg - Arg object
1398
+ * @param {ServiceabilityPlatformValidator.UpsertDpCompanyRulesParam} arg - Arg object
2178
1399
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2179
1400
  * @param {import("../PlatformAPIClient").Options} - Options
2180
- * @returns {Promise<ServiceabilityPlatformModel.ServiceabilityModel>} -
1401
+ * @returns {Promise<ServiceabilityPlatformModel.DPCompanyRuleResponse>} -
2181
1402
  * Success response
2182
- * @name updateServiceability
2183
- * @summary: Serviceability Update for a region
2184
- * @description: Serviceability Update for a region - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateServiceability/).
1403
+ * @name upsertDpCompanyRules
1404
+ * @summary: Upsert of DpCompanyRules in database.
1405
+ * @description: This API returns response of upsert of DpCompanyRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpCompanyRules/).
2185
1406
  */
2186
- async updateServiceability(
2187
- { extensionId, schemeId, regionId, body, requestHeaders } = {
2188
- requestHeaders: {},
2189
- },
1407
+ async upsertDpCompanyRules(
1408
+ { body, requestHeaders } = { requestHeaders: {} },
2190
1409
  { responseHeaders } = { responseHeaders: false }
2191
1410
  ) {
2192
1411
  const {
2193
1412
  error,
2194
- } = ServiceabilityPlatformValidator.updateServiceability().validate(
1413
+ } = ServiceabilityPlatformValidator.upsertDpCompanyRules().validate(
2195
1414
  {
2196
- extensionId,
2197
- schemeId,
2198
- regionId,
2199
1415
  body,
2200
1416
  },
2201
1417
  { abortEarly: false, allowUnknown: true }
@@ -2207,11 +1423,8 @@ class Serviceability {
2207
1423
  // Showing warrnings if extra unknown parameters are found
2208
1424
  const {
2209
1425
  error: warrning,
2210
- } = ServiceabilityPlatformValidator.updateServiceability().validate(
1426
+ } = ServiceabilityPlatformValidator.upsertDpCompanyRules().validate(
2211
1427
  {
2212
- extensionId,
2213
- schemeId,
2214
- regionId,
2215
1428
  body,
2216
1429
  },
2217
1430
  { abortEarly: false, allowUnknown: false }
@@ -2219,7 +1432,7 @@ class Serviceability {
2219
1432
  if (warrning) {
2220
1433
  Logger({
2221
1434
  level: "WARN",
2222
- message: `Parameter Validation warrnings for platform > Serviceability > updateServiceability \n ${warrning}`,
1435
+ message: `Parameter Validation warrnings for platform > Serviceability > upsertDpCompanyRules \n ${warrning}`,
2223
1436
  });
2224
1437
  }
2225
1438
 
@@ -2230,7 +1443,7 @@ class Serviceability {
2230
1443
  const response = await PlatformAPIClient.execute(
2231
1444
  this.config,
2232
1445
  "put",
2233
- `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/region/${regionId}`,
1446
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/priority`,
2234
1447
  query_params,
2235
1448
  body,
2236
1449
  { ...xHeaders, ...requestHeaders },
@@ -2244,7 +1457,7 @@ class Serviceability {
2244
1457
 
2245
1458
  const {
2246
1459
  error: res_error,
2247
- } = ServiceabilityPlatformModel.ServiceabilityModel().validate(
1460
+ } = ServiceabilityPlatformModel.DPCompanyRuleResponse().validate(
2248
1461
  responseData,
2249
1462
  { abortEarly: false, allowUnknown: true }
2250
1463
  );
@@ -2255,7 +1468,7 @@ class Serviceability {
2255
1468
  } else {
2256
1469
  Logger({
2257
1470
  level: "WARN",
2258
- message: `Response Validation Warnings for platform > Serviceability > updateServiceability \n ${res_error}`,
1471
+ message: `Response Validation Warnings for platform > Serviceability > upsertDpCompanyRules \n ${res_error}`,
2259
1472
  });
2260
1473
  }
2261
1474
  }
@@ -2264,22 +1477,21 @@ class Serviceability {
2264
1477
  }
2265
1478
 
2266
1479
  /**
2267
- * @param {ServiceabilityPlatformValidator.UpdateZoneByIdParam} arg - Arg object
1480
+ * @param {ServiceabilityPlatformValidator.UpsertDpRulesParam} arg - Arg object
2268
1481
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2269
1482
  * @param {import("../PlatformAPIClient").Options} - Options
2270
- * @returns {Promise<ServiceabilityPlatformModel.ZoneSuccessResponse>} -
1483
+ * @returns {Promise<ServiceabilityPlatformModel.DpRuleSuccessResponse>} -
2271
1484
  * Success response
2272
- * @name updateZoneById
2273
- * @summary: Update details of a Zone
2274
- * @description: Updates the region, application, store mapping and other details in the Zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneById/).
1485
+ * @name upsertDpRules
1486
+ * @summary: Upsert of DpRules in database.
1487
+ * @description: This API returns response of upsert of DpRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpRules/).
2275
1488
  */
2276
- async updateZoneById(
2277
- { zoneId, body, requestHeaders } = { requestHeaders: {} },
1489
+ async upsertDpRules(
1490
+ { body, requestHeaders } = { requestHeaders: {} },
2278
1491
  { responseHeaders } = { responseHeaders: false }
2279
1492
  ) {
2280
- const { error } = ServiceabilityPlatformValidator.updateZoneById().validate(
1493
+ const { error } = ServiceabilityPlatformValidator.upsertDpRules().validate(
2281
1494
  {
2282
- zoneId,
2283
1495
  body,
2284
1496
  },
2285
1497
  { abortEarly: false, allowUnknown: true }
@@ -2291,9 +1503,8 @@ class Serviceability {
2291
1503
  // Showing warrnings if extra unknown parameters are found
2292
1504
  const {
2293
1505
  error: warrning,
2294
- } = ServiceabilityPlatformValidator.updateZoneById().validate(
1506
+ } = ServiceabilityPlatformValidator.upsertDpRules().validate(
2295
1507
  {
2296
- zoneId,
2297
1508
  body,
2298
1509
  },
2299
1510
  { abortEarly: false, allowUnknown: false }
@@ -2301,7 +1512,7 @@ class Serviceability {
2301
1512
  if (warrning) {
2302
1513
  Logger({
2303
1514
  level: "WARN",
2304
- message: `Parameter Validation warrnings for platform > Serviceability > updateZoneById \n ${warrning}`,
1515
+ message: `Parameter Validation warrnings for platform > Serviceability > upsertDpRules \n ${warrning}`,
2305
1516
  });
2306
1517
  }
2307
1518
 
@@ -2311,8 +1522,8 @@ class Serviceability {
2311
1522
 
2312
1523
  const response = await PlatformAPIClient.execute(
2313
1524
  this.config,
2314
- "put",
2315
- `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones/${zoneId}`,
1525
+ "post",
1526
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules`,
2316
1527
  query_params,
2317
1528
  body,
2318
1529
  { ...xHeaders, ...requestHeaders },
@@ -2326,7 +1537,7 @@ class Serviceability {
2326
1537
 
2327
1538
  const {
2328
1539
  error: res_error,
2329
- } = ServiceabilityPlatformModel.ZoneSuccessResponse().validate(
1540
+ } = ServiceabilityPlatformModel.DpRuleSuccessResponse().validate(
2330
1541
  responseData,
2331
1542
  { abortEarly: false, allowUnknown: true }
2332
1543
  );
@@ -2337,7 +1548,7 @@ class Serviceability {
2337
1548
  } else {
2338
1549
  Logger({
2339
1550
  level: "WARN",
2340
- message: `Response Validation Warnings for platform > Serviceability > updateZoneById \n ${res_error}`,
1551
+ message: `Response Validation Warnings for platform > Serviceability > upsertDpRules \n ${res_error}`,
2341
1552
  });
2342
1553
  }
2343
1554
  }