@gofynd/fdk-client-javascript 1.1.6 → 1.2.0

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 (321) hide show
  1. package/README.md +12 -0
  2. package/index.js +0 -3
  3. package/package.json +1 -1
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +8 -1
  6. package/sdk/application/ApplicationClient.d.ts +37 -6
  7. package/sdk/application/ApplicationClient.js +31 -0
  8. package/sdk/application/ApplicationConfig.d.ts +52 -12
  9. package/sdk/application/ApplicationConfig.js +37 -2
  10. package/sdk/application/ApplicationModels.d.ts +46 -1
  11. package/sdk/application/ApplicationModels.js +18 -0
  12. package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
  13. package/sdk/application/Cart/CartApplicationClient.js +620 -483
  14. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  15. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  16. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  17. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  18. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
  19. package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
  20. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
  21. package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
  22. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  23. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  24. package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
  25. package/sdk/application/Common/CommonApplicationClient.js +50 -33
  26. package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
  27. package/sdk/application/Common/CommonApplicationModel.js +224 -16
  28. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  29. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  30. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
  31. package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
  32. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
  33. package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
  34. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  35. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
  37. package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
  39. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  41. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  42. package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
  43. package/sdk/application/Content/ContentApplicationClient.js +409 -277
  44. package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
  45. package/sdk/application/Content/ContentApplicationModel.js +1202 -109
  46. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  47. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
  49. package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
  51. package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  53. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  54. package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
  55. package/sdk/application/Lead/LeadApplicationClient.js +169 -103
  56. package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
  57. package/sdk/application/Lead/LeadApplicationModel.js +619 -73
  58. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  59. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  60. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
  61. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
  62. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  63. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  64. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  65. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  66. package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
  67. package/sdk/application/Order/OrderApplicationClient.js +297 -217
  68. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  69. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  70. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  71. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  72. package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
  73. package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
  74. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  75. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  76. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  77. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  78. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
  79. package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
  80. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  81. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  82. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  83. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  84. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
  85. package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
  86. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  87. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  88. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  89. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  90. package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
  91. package/sdk/application/Share/ShareApplicationClient.js +165 -97
  92. package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
  93. package/sdk/application/Share/ShareApplicationModel.js +154 -16
  94. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  95. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  96. package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
  97. package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
  98. package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
  99. package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
  100. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  101. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  102. package/sdk/application/User/UserApplicationClient.d.ts +219 -303
  103. package/sdk/application/User/UserApplicationClient.js +819 -522
  104. package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
  105. package/sdk/application/User/UserApplicationModel.js +983 -44
  106. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  107. package/sdk/application/User/UserApplicationValidator.js +265 -31
  108. package/sdk/common/AxiosHelper.js +8 -2
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/partner/PartnerAPIClient.d.ts +15 -1
  113. package/sdk/partner/PartnerAPIClient.js +8 -1
  114. package/sdk/partner/PartnerClient.d.ts +20 -3
  115. package/sdk/partner/PartnerClient.js +17 -0
  116. package/sdk/partner/PartnerConfig.d.ts +40 -14
  117. package/sdk/partner/PartnerConfig.js +31 -6
  118. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
  119. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
  124. package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
  125. package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
  126. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
  127. package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
  128. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
  129. package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
  130. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
  131. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
  132. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  133. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  134. package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
  135. package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
  137. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  140. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
  141. package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
  142. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
  143. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
  144. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
  145. package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
  146. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
  147. package/sdk/platform/Common/CommonPlatformClient.js +48 -33
  148. package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
  149. package/sdk/platform/Common/CommonPlatformModel.js +224 -16
  150. package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
  151. package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
  156. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
  157. package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
  158. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
  159. package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
  160. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
  183. package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
  200. package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
  201. package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
  202. package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
  203. package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
  204. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
  205. package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
  206. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
  207. package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
  208. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  209. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  210. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  211. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  212. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
  213. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
  214. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  215. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  216. package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
  217. package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
  218. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
  219. package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
  220. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  221. package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
  222. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
  223. package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
  224. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  225. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  226. package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
  227. package/sdk/platform/Order/OrderPlatformClient.js +969 -762
  228. package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
  229. package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
  230. package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
  231. package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
  232. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
  233. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
  234. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
  235. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
  236. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
  237. package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
  238. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
  239. package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
  240. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
  241. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
  242. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
  243. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
  244. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
  245. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
  246. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
  247. package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
  248. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
  249. package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
  250. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  251. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  252. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  253. package/sdk/platform/PlatformAPIClient.js +9 -1
  254. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  255. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  256. package/sdk/platform/PlatformClient.d.ts +29 -12579
  257. package/sdk/platform/PlatformClient.js +26 -15085
  258. package/sdk/platform/PlatformConfig.d.ts +37 -11
  259. package/sdk/platform/PlatformConfig.js +32 -6
  260. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
  261. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
  262. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  263. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  264. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
  265. package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
  266. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
  267. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
  268. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
  269. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
  270. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
  271. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
  272. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  276. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
  277. package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
  278. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  279. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  280. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  281. package/sdk/platform/Share/SharePlatformModel.js +165 -17
  282. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
  283. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
  284. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
  285. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
  286. package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
  287. package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
  288. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
  289. package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
  290. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
  291. package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
  292. package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
  293. package/sdk/platform/User/UserPlatformModel.js +983 -44
  294. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
  295. package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
  296. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
  297. package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
  298. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
  299. package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
  300. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
  301. package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
  302. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
  303. package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
  304. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  305. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  306. package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
  307. package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
  308. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  309. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  310. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  311. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  312. package/sdk/public/PublicClient.d.ts +19 -3
  313. package/sdk/public/PublicClient.js +16 -0
  314. package/sdk/public/PublicConfig.d.ts +27 -6
  315. package/sdk/public/PublicConfig.js +17 -1
  316. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
  317. package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
  318. package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
  319. package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
  320. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  321. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const ServiceabilityValidator = require("./ServiceabilityPlatformValidator");
5
- const ServiceabilityModel = require("./ServiceabilityPlatformModel");
4
+ const ServiceabilityPlatformValidator = require("./ServiceabilityPlatformValidator");
5
+ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -12,14 +12,15 @@ class Serviceability {
12
12
  }
13
13
 
14
14
  /**
15
- * @param {Object} arg - Arg object.
16
- * @param {ZoneRequest} arg.body
17
- * @returns {Promise<ZoneResponse>} - Success response
15
+ * @param {ServiceabilityPlatformValidator.CreateZoneParam} arg - Arg object
16
+ * @param {import("../PlatformAPIClient").Options} - Options
17
+ * @returns {Promise<ServiceabilityPlatformModel.ZoneResponse>} - Success response
18
+ * @name createZone
18
19
  * @summary: Creation of a new zone
19
- * @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.
20
+ * @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/).
20
21
  */
21
- async createZone({ body } = {}) {
22
- const { error } = ServiceabilityValidator.createZone().validate(
22
+ async createZone({ body } = {}, { headers } = { headers: false }) {
23
+ const { error } = ServiceabilityPlatformValidator.createZone().validate(
23
24
  {
24
25
  body,
25
26
  },
@@ -30,7 +31,9 @@ class Serviceability {
30
31
  }
31
32
 
32
33
  // Showing warrnings if extra unknown parameters are found
33
- const { error: warrning } = ServiceabilityValidator.createZone().validate(
34
+ const {
35
+ error: warrning,
36
+ } = ServiceabilityPlatformValidator.createZone().validate(
34
37
  {
35
38
  body,
36
39
  },
@@ -39,9 +42,8 @@ class Serviceability {
39
42
  if (warrning) {
40
43
  Logger({
41
44
  level: "WARN",
42
- message: "Parameter Validation warrnings for createZone",
45
+ message: `Parameter Validation warrnings for platform > Serviceability > createZone \n ${warrning}`,
43
46
  });
44
- Logger({ level: "WARN", message: warrning });
45
47
  }
46
48
 
47
49
  const query_params = {};
@@ -54,12 +56,18 @@ class Serviceability {
54
56
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone`,
55
57
  query_params,
56
58
  body,
57
- xHeaders
59
+ xHeaders,
60
+ { headers }
58
61
  );
59
62
 
63
+ let responseData = response;
64
+ if (headers) {
65
+ responseData = response[0];
66
+ }
67
+
60
68
  const {
61
69
  error: res_error,
62
- } = ServiceabilityModel.ZoneResponse().validate(response, {
70
+ } = ServiceabilityPlatformModel.ZoneResponse().validate(responseData, {
63
71
  abortEarly: false,
64
72
  allowUnknown: false,
65
73
  });
@@ -67,22 +75,24 @@ class Serviceability {
67
75
  if (res_error) {
68
76
  Logger({
69
77
  level: "WARN",
70
- message: "Response Validation Warnnings for createZone",
78
+ message: `Response Validation Warnnings for platform > Serviceability > createZone \n ${res_error}`,
71
79
  });
72
- Logger({ level: "WARN", message: res_error });
73
80
  }
74
81
 
75
82
  return response;
76
83
  }
77
84
 
78
85
  /**
79
- * @param {Object} arg - Arg object.
80
- * @returns {Promise<GetStoresViewResponse>} - Success response
86
+ * @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object
87
+ * @param {import("../PlatformAPIClient").Options} - Options
88
+ * @returns {Promise<ServiceabilityPlatformModel.GetStoresViewResponse>} -
89
+ * Success response
90
+ * @name getAllStores
81
91
  * @summary: GET stores data
82
- * @description: This API returns stores data.
92
+ * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/).
83
93
  */
84
- async getAllStores({} = {}) {
85
- const { error } = ServiceabilityValidator.getAllStores().validate(
94
+ async getAllStores({ headers } = { headers: false }) {
95
+ const { error } = ServiceabilityPlatformValidator.getAllStores().validate(
86
96
  {},
87
97
  { abortEarly: false, allowUnknown: true }
88
98
  );
@@ -91,16 +101,17 @@ class Serviceability {
91
101
  }
92
102
 
93
103
  // Showing warrnings if extra unknown parameters are found
94
- const { error: warrning } = ServiceabilityValidator.getAllStores().validate(
104
+ const {
105
+ error: warrning,
106
+ } = ServiceabilityPlatformValidator.getAllStores().validate(
95
107
  {},
96
108
  { abortEarly: false, allowUnknown: false }
97
109
  );
98
110
  if (warrning) {
99
111
  Logger({
100
112
  level: "WARN",
101
- message: "Parameter Validation warrnings for getAllStores",
113
+ message: `Parameter Validation warrnings for platform > Serviceability > getAllStores \n ${warrning}`,
102
114
  });
103
- Logger({ level: "WARN", message: warrning });
104
115
  }
105
116
 
106
117
  const query_params = {};
@@ -113,37 +124,49 @@ class Serviceability {
113
124
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/logistics/stores`,
114
125
  query_params,
115
126
  undefined,
116
- xHeaders
127
+ xHeaders,
128
+ { headers }
117
129
  );
118
130
 
131
+ let responseData = response;
132
+ if (headers) {
133
+ responseData = response[0];
134
+ }
135
+
119
136
  const {
120
137
  error: res_error,
121
- } = ServiceabilityModel.GetStoresViewResponse().validate(response, {
122
- abortEarly: false,
123
- allowUnknown: false,
124
- });
138
+ } = ServiceabilityPlatformModel.GetStoresViewResponse().validate(
139
+ responseData,
140
+ { abortEarly: false, allowUnknown: false }
141
+ );
125
142
 
126
143
  if (res_error) {
127
144
  Logger({
128
145
  level: "WARN",
129
- message: "Response Validation Warnnings for getAllStores",
146
+ message: `Response Validation Warnnings for platform > Serviceability > getAllStores \n ${res_error}`,
130
147
  });
131
- Logger({ level: "WARN", message: res_error });
132
148
  }
133
149
 
134
150
  return response;
135
151
  }
136
152
 
137
153
  /**
138
- * @param {Object} arg - Arg object.
139
- * @param {number} [arg.pageNumber] - Index of the item to start returning with
140
- * @param {number} [arg.pageSize] - Determines the items to be displayed in a page
141
- * @returns {Promise<CompanyStoreView_Response>} - Success response
154
+ * @param {ServiceabilityPlatformValidator.GetCompanyStoreViewParam} arg - Arg object
155
+ * @param {import("../PlatformAPIClient").Options} - Options
156
+ * @returns {Promise<ServiceabilityPlatformModel.CompanyStoreView_Response>}
157
+ * - Success response
158
+ *
159
+ * @name getCompanyStoreView
142
160
  * @summary: Company Store View of application.
143
- * @description: This API returns Company Store View of the application.
161
+ * @description: This API returns Company Store View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyStoreView/).
144
162
  */
145
- async getCompanyStoreView({ pageNumber, pageSize } = {}) {
146
- const { error } = ServiceabilityValidator.getCompanyStoreView().validate(
163
+ async getCompanyStoreView(
164
+ { pageNumber, pageSize } = {},
165
+ { headers } = { headers: false }
166
+ ) {
167
+ const {
168
+ error,
169
+ } = ServiceabilityPlatformValidator.getCompanyStoreView().validate(
147
170
  {
148
171
  pageNumber,
149
172
  pageSize,
@@ -157,7 +180,7 @@ class Serviceability {
157
180
  // Showing warrnings if extra unknown parameters are found
158
181
  const {
159
182
  error: warrning,
160
- } = ServiceabilityValidator.getCompanyStoreView().validate(
183
+ } = ServiceabilityPlatformValidator.getCompanyStoreView().validate(
161
184
  {
162
185
  pageNumber,
163
186
  pageSize,
@@ -167,9 +190,8 @@ class Serviceability {
167
190
  if (warrning) {
168
191
  Logger({
169
192
  level: "WARN",
170
- message: "Parameter Validation warrnings for getCompanyStoreView",
193
+ message: `Parameter Validation warrnings for platform > Serviceability > getCompanyStoreView \n ${warrning}`,
171
194
  });
172
- Logger({ level: "WARN", message: warrning });
173
195
  }
174
196
 
175
197
  const query_params = {};
@@ -184,46 +206,47 @@ class Serviceability {
184
206
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/all-stores`,
185
207
  query_params,
186
208
  undefined,
187
- xHeaders
209
+ xHeaders,
210
+ { headers }
188
211
  );
189
212
 
213
+ let responseData = response;
214
+ if (headers) {
215
+ responseData = response[0];
216
+ }
217
+
190
218
  const {
191
219
  error: res_error,
192
- } = ServiceabilityModel.CompanyStoreView_Response().validate(response, {
193
- abortEarly: false,
194
- allowUnknown: false,
195
- });
220
+ } = ServiceabilityPlatformModel.CompanyStoreView_Response().validate(
221
+ responseData,
222
+ { abortEarly: false, allowUnknown: false }
223
+ );
196
224
 
197
225
  if (res_error) {
198
226
  Logger({
199
227
  level: "WARN",
200
- message: "Response Validation Warnnings for getCompanyStoreView",
228
+ message: `Response Validation Warnnings for platform > Serviceability > getCompanyStoreView \n ${res_error}`,
201
229
  });
202
- Logger({ level: "WARN", message: res_error });
203
230
  }
204
231
 
205
232
  return response;
206
233
  }
207
234
 
208
235
  /**
209
- * @param {Object} arg - Arg object.
210
- * @param {number} [arg.pageNumber] - Index of the item to start returning with
211
- * @param {number} [arg.pageSize] - Determines the items to be displayed in a page
212
- * @param {string} [arg.stage] - Stage of the account. enabled/disabled
213
- * @param {string} [arg.paymentMode] - Filters dp accounts based on payment mode
214
- * @param {string} [arg.transportType] - Filters dp accounts based on transport_type
215
- * @returns {Promise<CompanyDpAccountListResponse>} - Success response
236
+ * @param {ServiceabilityPlatformValidator.GetDpAccountParam} arg - Arg object
237
+ * @param {import("../PlatformAPIClient").Options} - Options
238
+ * @returns {Promise<ServiceabilityPlatformModel.CompanyDpAccountListResponse>}
239
+ * - Success response
240
+ *
241
+ * @name getDpAccount
216
242
  * @summary: Getting DpAccount of a company from database.
217
- * @description: This API returns response DpAccount of a company from mongo database.
243
+ * @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/).
218
244
  */
219
- async getDpAccount({
220
- pageNumber,
221
- pageSize,
222
- stage,
223
- paymentMode,
224
- transportType,
225
- } = {}) {
226
- const { error } = ServiceabilityValidator.getDpAccount().validate(
245
+ async getDpAccount(
246
+ { pageNumber, pageSize, stage, paymentMode, transportType } = {},
247
+ { headers } = { headers: false }
248
+ ) {
249
+ const { error } = ServiceabilityPlatformValidator.getDpAccount().validate(
227
250
  {
228
251
  pageNumber,
229
252
  pageSize,
@@ -238,7 +261,9 @@ class Serviceability {
238
261
  }
239
262
 
240
263
  // Showing warrnings if extra unknown parameters are found
241
- const { error: warrning } = ServiceabilityValidator.getDpAccount().validate(
264
+ const {
265
+ error: warrning,
266
+ } = ServiceabilityPlatformValidator.getDpAccount().validate(
242
267
  {
243
268
  pageNumber,
244
269
  pageSize,
@@ -251,9 +276,8 @@ class Serviceability {
251
276
  if (warrning) {
252
277
  Logger({
253
278
  level: "WARN",
254
- message: "Parameter Validation warrnings for getDpAccount",
279
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpAccount \n ${warrning}`,
255
280
  });
256
- Logger({ level: "WARN", message: warrning });
257
281
  }
258
282
 
259
283
  const query_params = {};
@@ -271,35 +295,45 @@ class Serviceability {
271
295
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/account`,
272
296
  query_params,
273
297
  undefined,
274
- xHeaders
298
+ xHeaders,
299
+ { headers }
275
300
  );
276
301
 
302
+ let responseData = response;
303
+ if (headers) {
304
+ responseData = response[0];
305
+ }
306
+
277
307
  const {
278
308
  error: res_error,
279
- } = ServiceabilityModel.CompanyDpAccountListResponse().validate(response, {
280
- abortEarly: false,
281
- allowUnknown: false,
282
- });
309
+ } = ServiceabilityPlatformModel.CompanyDpAccountListResponse().validate(
310
+ responseData,
311
+ { abortEarly: false, allowUnknown: false }
312
+ );
283
313
 
284
314
  if (res_error) {
285
315
  Logger({
286
316
  level: "WARN",
287
- message: "Response Validation Warnnings for getDpAccount",
317
+ message: `Response Validation Warnnings for platform > Serviceability > getDpAccount \n ${res_error}`,
288
318
  });
289
- Logger({ level: "WARN", message: res_error });
290
319
  }
291
320
 
292
321
  return response;
293
322
  }
294
323
 
295
324
  /**
296
- * @param {Object} arg - Arg object.
297
- * @returns {Promise<DPCompanyRuleResponse>} - Success response
325
+ * @param {ServiceabilityPlatformValidator.GetDpCompanyRulesParam} arg - Arg object
326
+ * @param {import("../PlatformAPIClient").Options} - Options
327
+ * @returns {Promise<ServiceabilityPlatformModel.DPCompanyRuleResponse>} -
328
+ * Success response
329
+ * @name getDpCompanyRules
298
330
  * @summary: Get All DpCompanyRules applied to company from database.
299
- * @description: This API returns response of all DpCompanyRules from mongo database.
331
+ * @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/).
300
332
  */
301
- async getDpCompanyRules({} = {}) {
302
- const { error } = ServiceabilityValidator.getDpCompanyRules().validate(
333
+ async getDpCompanyRules({ headers } = { headers: false }) {
334
+ const {
335
+ error,
336
+ } = ServiceabilityPlatformValidator.getDpCompanyRules().validate(
303
337
  {},
304
338
  { abortEarly: false, allowUnknown: true }
305
339
  );
@@ -310,16 +344,15 @@ class Serviceability {
310
344
  // Showing warrnings if extra unknown parameters are found
311
345
  const {
312
346
  error: warrning,
313
- } = ServiceabilityValidator.getDpCompanyRules().validate(
347
+ } = ServiceabilityPlatformValidator.getDpCompanyRules().validate(
314
348
  {},
315
349
  { abortEarly: false, allowUnknown: false }
316
350
  );
317
351
  if (warrning) {
318
352
  Logger({
319
353
  level: "WARN",
320
- message: "Parameter Validation warrnings for getDpCompanyRules",
354
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpCompanyRules \n ${warrning}`,
321
355
  });
322
- Logger({ level: "WARN", message: warrning });
323
356
  }
324
357
 
325
358
  const query_params = {};
@@ -332,37 +365,49 @@ class Serviceability {
332
365
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/priority`,
333
366
  query_params,
334
367
  undefined,
335
- xHeaders
368
+ xHeaders,
369
+ { headers }
336
370
  );
337
371
 
372
+ let responseData = response;
373
+ if (headers) {
374
+ responseData = response[0];
375
+ }
376
+
338
377
  const {
339
378
  error: res_error,
340
- } = ServiceabilityModel.DPCompanyRuleResponse().validate(response, {
341
- abortEarly: false,
342
- allowUnknown: false,
343
- });
379
+ } = ServiceabilityPlatformModel.DPCompanyRuleResponse().validate(
380
+ responseData,
381
+ { abortEarly: false, allowUnknown: false }
382
+ );
344
383
 
345
384
  if (res_error) {
346
385
  Logger({
347
386
  level: "WARN",
348
- message: "Response Validation Warnnings for getDpCompanyRules",
387
+ message: `Response Validation Warnnings for platform > Serviceability > getDpCompanyRules \n ${res_error}`,
349
388
  });
350
- Logger({ level: "WARN", message: res_error });
351
389
  }
352
390
 
353
391
  return response;
354
392
  }
355
393
 
356
394
  /**
357
- * @param {Object} arg - Arg object.
358
- * @param {number} [arg.pageNumber] - Index of the item to start returning with
359
- * @param {number} [arg.pageSize] - Determines the items to be displayed in a page
360
- * @returns {Promise<DpMultipleRuleSuccessResponse>} - Success response
395
+ * @param {ServiceabilityPlatformValidator.GetDpRuleInsertParam} arg - Arg object
396
+ * @param {import("../PlatformAPIClient").Options} - Options
397
+ * @returns {Promise<ServiceabilityPlatformModel.DpMultipleRuleSuccessResponse>}
398
+ * - Success response
399
+ *
400
+ * @name getDpRuleInsert
361
401
  * @summary: Fetching of DpRules from database.
362
- * @description: This API returns response of DpRules from mongo database.
402
+ * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRuleInsert/).
363
403
  */
364
- async getDpRuleInsert({ pageNumber, pageSize } = {}) {
365
- const { error } = ServiceabilityValidator.getDpRuleInsert().validate(
404
+ async getDpRuleInsert(
405
+ { pageNumber, pageSize } = {},
406
+ { headers } = { headers: false }
407
+ ) {
408
+ const {
409
+ error,
410
+ } = ServiceabilityPlatformValidator.getDpRuleInsert().validate(
366
411
  {
367
412
  pageNumber,
368
413
  pageSize,
@@ -376,7 +421,7 @@ class Serviceability {
376
421
  // Showing warrnings if extra unknown parameters are found
377
422
  const {
378
423
  error: warrning,
379
- } = ServiceabilityValidator.getDpRuleInsert().validate(
424
+ } = ServiceabilityPlatformValidator.getDpRuleInsert().validate(
380
425
  {
381
426
  pageNumber,
382
427
  pageSize,
@@ -386,9 +431,8 @@ class Serviceability {
386
431
  if (warrning) {
387
432
  Logger({
388
433
  level: "WARN",
389
- message: "Parameter Validation warrnings for getDpRuleInsert",
434
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpRuleInsert \n ${warrning}`,
390
435
  });
391
- Logger({ level: "WARN", message: warrning });
392
436
  }
393
437
 
394
438
  const query_params = {};
@@ -403,37 +447,43 @@ class Serviceability {
403
447
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules`,
404
448
  query_params,
405
449
  undefined,
406
- xHeaders
450
+ xHeaders,
451
+ { headers }
407
452
  );
408
453
 
454
+ let responseData = response;
455
+ if (headers) {
456
+ responseData = response[0];
457
+ }
458
+
409
459
  const {
410
460
  error: res_error,
411
- } = ServiceabilityModel.DpMultipleRuleSuccessResponse().validate(response, {
412
- abortEarly: false,
413
- allowUnknown: false,
414
- });
461
+ } = ServiceabilityPlatformModel.DpMultipleRuleSuccessResponse().validate(
462
+ responseData,
463
+ { abortEarly: false, allowUnknown: false }
464
+ );
415
465
 
416
466
  if (res_error) {
417
467
  Logger({
418
468
  level: "WARN",
419
- message: "Response Validation Warnnings for getDpRuleInsert",
469
+ message: `Response Validation Warnnings for platform > Serviceability > getDpRuleInsert \n ${res_error}`,
420
470
  });
421
- Logger({ level: "WARN", message: res_error });
422
471
  }
423
472
 
424
473
  return response;
425
474
  }
426
475
 
427
476
  /**
428
- * @param {Object} arg - Arg object.
429
- * @param {string} arg.ruleUid - A `rule_uid` is a unique identifier for a
430
- * particular Dp.
431
- * @returns {Promise<DpRuleSuccessResponse>} - Success response
477
+ * @param {ServiceabilityPlatformValidator.GetDpRulesParam} arg - Arg object
478
+ * @param {import("../PlatformAPIClient").Options} - Options
479
+ * @returns {Promise<ServiceabilityPlatformModel.DpRuleSuccessResponse>} -
480
+ * Success response
481
+ * @name getDpRules
432
482
  * @summary: Fetching of DpRules from database.
433
- * @description: This API returns response of DpRules from mongo database.
483
+ * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRules/).
434
484
  */
435
- async getDpRules({ ruleUid } = {}) {
436
- const { error } = ServiceabilityValidator.getDpRules().validate(
485
+ async getDpRules({ ruleUid } = {}, { headers } = { headers: false }) {
486
+ const { error } = ServiceabilityPlatformValidator.getDpRules().validate(
437
487
  {
438
488
  ruleUid,
439
489
  },
@@ -444,7 +494,9 @@ class Serviceability {
444
494
  }
445
495
 
446
496
  // Showing warrnings if extra unknown parameters are found
447
- const { error: warrning } = ServiceabilityValidator.getDpRules().validate(
497
+ const {
498
+ error: warrning,
499
+ } = ServiceabilityPlatformValidator.getDpRules().validate(
448
500
  {
449
501
  ruleUid,
450
502
  },
@@ -453,9 +505,8 @@ class Serviceability {
453
505
  if (warrning) {
454
506
  Logger({
455
507
  level: "WARN",
456
- message: "Parameter Validation warrnings for getDpRules",
508
+ message: `Parameter Validation warrnings for platform > Serviceability > getDpRules \n ${warrning}`,
457
509
  });
458
- Logger({ level: "WARN", message: warrning });
459
510
  }
460
511
 
461
512
  const query_params = {};
@@ -468,36 +519,46 @@ class Serviceability {
468
519
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules/${ruleUid}`,
469
520
  query_params,
470
521
  undefined,
471
- xHeaders
522
+ xHeaders,
523
+ { headers }
472
524
  );
473
525
 
526
+ let responseData = response;
527
+ if (headers) {
528
+ responseData = response[0];
529
+ }
530
+
474
531
  const {
475
532
  error: res_error,
476
- } = ServiceabilityModel.DpRuleSuccessResponse().validate(response, {
477
- abortEarly: false,
478
- allowUnknown: false,
479
- });
533
+ } = ServiceabilityPlatformModel.DpRuleSuccessResponse().validate(
534
+ responseData,
535
+ { abortEarly: false, allowUnknown: false }
536
+ );
480
537
 
481
538
  if (res_error) {
482
539
  Logger({
483
540
  level: "WARN",
484
- message: "Response Validation Warnnings for getDpRules",
541
+ message: `Response Validation Warnnings for platform > Serviceability > getDpRules \n ${res_error}`,
485
542
  });
486
- Logger({ level: "WARN", message: res_error });
487
543
  }
488
544
 
489
545
  return response;
490
546
  }
491
547
 
492
548
  /**
493
- * @param {Object} arg - Arg object.
494
- * @param {EntityRegionView_Request} arg.body
495
- * @returns {Promise<EntityRegionView_Response>} - Success response
549
+ * @param {ServiceabilityPlatformValidator.GetEntityRegionViewParam} arg - Arg object
550
+ * @param {import("../PlatformAPIClient").Options} - Options
551
+ * @returns {Promise<ServiceabilityPlatformModel.EntityRegionView_Response>}
552
+ * - Success response
553
+ *
554
+ * @name getEntityRegionView
496
555
  * @summary: Get country and state list
497
- * @description: This API returns response for Entity Region View.
556
+ * @description: This API returns response for Entity Region View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getEntityRegionView/).
498
557
  */
499
- async getEntityRegionView({ body } = {}) {
500
- const { error } = ServiceabilityValidator.getEntityRegionView().validate(
558
+ async getEntityRegionView({ body } = {}, { headers } = { headers: false }) {
559
+ const {
560
+ error,
561
+ } = ServiceabilityPlatformValidator.getEntityRegionView().validate(
501
562
  {
502
563
  body,
503
564
  },
@@ -510,7 +571,7 @@ class Serviceability {
510
571
  // Showing warrnings if extra unknown parameters are found
511
572
  const {
512
573
  error: warrning,
513
- } = ServiceabilityValidator.getEntityRegionView().validate(
574
+ } = ServiceabilityPlatformValidator.getEntityRegionView().validate(
514
575
  {
515
576
  body,
516
577
  },
@@ -519,9 +580,8 @@ class Serviceability {
519
580
  if (warrning) {
520
581
  Logger({
521
582
  level: "WARN",
522
- message: "Parameter Validation warrnings for getEntityRegionView",
583
+ message: `Parameter Validation warrnings for platform > Serviceability > getEntityRegionView \n ${warrning}`,
523
584
  });
524
- Logger({ level: "WARN", message: warrning });
525
585
  }
526
586
 
527
587
  const query_params = {};
@@ -534,48 +594,45 @@ class Serviceability {
534
594
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/regions`,
535
595
  query_params,
536
596
  body,
537
- xHeaders
597
+ xHeaders,
598
+ { headers }
538
599
  );
539
600
 
601
+ let responseData = response;
602
+ if (headers) {
603
+ responseData = response[0];
604
+ }
605
+
540
606
  const {
541
607
  error: res_error,
542
- } = ServiceabilityModel.EntityRegionView_Response().validate(response, {
543
- abortEarly: false,
544
- allowUnknown: false,
545
- });
608
+ } = ServiceabilityPlatformModel.EntityRegionView_Response().validate(
609
+ responseData,
610
+ { abortEarly: false, allowUnknown: false }
611
+ );
546
612
 
547
613
  if (res_error) {
548
614
  Logger({
549
615
  level: "WARN",
550
- message: "Response Validation Warnnings for getEntityRegionView",
616
+ message: `Response Validation Warnnings for platform > Serviceability > getEntityRegionView \n ${res_error}`,
551
617
  });
552
- Logger({ level: "WARN", message: res_error });
553
618
  }
554
619
 
555
620
  return response;
556
621
  }
557
622
 
558
623
  /**
559
- * @param {Object} arg - Arg object.
560
- * @param {number} [arg.pageNumber] - Index of the item to start returning with
561
- * @param {number} [arg.pageSize] - Determines the items to be displayed in a page
562
- * @param {string} [arg.name] - Name of particular zone in the seller account
563
- * @param {boolean} [arg.isActive] - Status of zone whether active or inactive
564
- * @param {string} [arg.channelIds] - Zones associated with the given channel ids'
565
- * @param {string} [arg.q] - Search with name as a free text
566
- * @returns {Promise<ListViewResponse>} - Success response
624
+ * @param {ServiceabilityPlatformValidator.GetListViewParam} arg - Arg object
625
+ * @param {import("../PlatformAPIClient").Options} - Options
626
+ * @returns {Promise<ServiceabilityPlatformModel.ListViewResponse>} - Success response
627
+ * @name getListView
567
628
  * @summary: Zone List of application.
568
- * @description: This API returns Zone List View of the application.
629
+ * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getListView/).
569
630
  */
570
- async getListView({
571
- pageNumber,
572
- pageSize,
573
- name,
574
- isActive,
575
- channelIds,
576
- q,
577
- } = {}) {
578
- const { error } = ServiceabilityValidator.getListView().validate(
631
+ async getListView(
632
+ { pageNumber, pageSize, name, isActive, channelIds, q } = {},
633
+ { headers } = { headers: false }
634
+ ) {
635
+ const { error } = ServiceabilityPlatformValidator.getListView().validate(
579
636
  {
580
637
  pageNumber,
581
638
  pageSize,
@@ -591,7 +648,9 @@ class Serviceability {
591
648
  }
592
649
 
593
650
  // Showing warrnings if extra unknown parameters are found
594
- const { error: warrning } = ServiceabilityValidator.getListView().validate(
651
+ const {
652
+ error: warrning,
653
+ } = ServiceabilityPlatformValidator.getListView().validate(
595
654
  {
596
655
  pageNumber,
597
656
  pageSize,
@@ -605,9 +664,8 @@ class Serviceability {
605
664
  if (warrning) {
606
665
  Logger({
607
666
  level: "WARN",
608
- message: "Parameter Validation warrnings for getListView",
667
+ message: `Parameter Validation warrnings for platform > Serviceability > getListView \n ${warrning}`,
609
668
  });
610
- Logger({ level: "WARN", message: warrning });
611
669
  }
612
670
 
613
671
  const query_params = {};
@@ -626,12 +684,18 @@ class Serviceability {
626
684
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/zones`,
627
685
  query_params,
628
686
  undefined,
629
- xHeaders
687
+ xHeaders,
688
+ { headers }
630
689
  );
631
690
 
691
+ let responseData = response;
692
+ if (headers) {
693
+ responseData = response[0];
694
+ }
695
+
632
696
  const {
633
697
  error: res_error,
634
- } = ServiceabilityModel.ListViewResponse().validate(response, {
698
+ } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, {
635
699
  abortEarly: false,
636
700
  allowUnknown: false,
637
701
  });
@@ -639,23 +703,26 @@ class Serviceability {
639
703
  if (res_error) {
640
704
  Logger({
641
705
  level: "WARN",
642
- message: "Response Validation Warnnings for getListView",
706
+ message: `Response Validation Warnnings for platform > Serviceability > getListView \n ${res_error}`,
643
707
  });
644
- Logger({ level: "WARN", message: res_error });
645
708
  }
646
709
 
647
710
  return response;
648
711
  }
649
712
 
650
713
  /**
651
- * @param {Object} arg - Arg object.
652
- * @param {ReAssignStoreRequest} arg.body
653
- * @returns {Promise<ReAssignStoreResponse>} - Success response
714
+ * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
715
+ * @param {import("../PlatformAPIClient").Options} - Options
716
+ * @returns {Promise<ServiceabilityPlatformModel.ReAssignStoreResponse>} -
717
+ * Success response
718
+ * @name getOptimalLocations
654
719
  * @summary: Get serviceable store of the item
655
- * @description: This API returns serviceable store of the item.
720
+ * @description: This API returns serviceable store of the item. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/).
656
721
  */
657
- async getOptimalLocations({ body } = {}) {
658
- const { error } = ServiceabilityValidator.getOptimalLocations().validate(
722
+ async getOptimalLocations({ body } = {}, { headers } = { headers: false }) {
723
+ const {
724
+ error,
725
+ } = ServiceabilityPlatformValidator.getOptimalLocations().validate(
659
726
  {
660
727
  body,
661
728
  },
@@ -668,7 +735,7 @@ class Serviceability {
668
735
  // Showing warrnings if extra unknown parameters are found
669
736
  const {
670
737
  error: warrning,
671
- } = ServiceabilityValidator.getOptimalLocations().validate(
738
+ } = ServiceabilityPlatformValidator.getOptimalLocations().validate(
672
739
  {
673
740
  body,
674
741
  },
@@ -677,9 +744,8 @@ class Serviceability {
677
744
  if (warrning) {
678
745
  Logger({
679
746
  level: "WARN",
680
- message: "Parameter Validation warrnings for getOptimalLocations",
747
+ message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`,
681
748
  });
682
- Logger({ level: "WARN", message: warrning });
683
749
  }
684
750
 
685
751
  const query_params = {};
@@ -692,36 +758,43 @@ class Serviceability {
692
758
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/reassign`,
693
759
  query_params,
694
760
  body,
695
- xHeaders
761
+ xHeaders,
762
+ { headers }
696
763
  );
697
764
 
765
+ let responseData = response;
766
+ if (headers) {
767
+ responseData = response[0];
768
+ }
769
+
698
770
  const {
699
771
  error: res_error,
700
- } = ServiceabilityModel.ReAssignStoreResponse().validate(response, {
701
- abortEarly: false,
702
- allowUnknown: false,
703
- });
772
+ } = ServiceabilityPlatformModel.ReAssignStoreResponse().validate(
773
+ responseData,
774
+ { abortEarly: false, allowUnknown: false }
775
+ );
704
776
 
705
777
  if (res_error) {
706
778
  Logger({
707
779
  level: "WARN",
708
- message: "Response Validation Warnnings for getOptimalLocations",
780
+ message: `Response Validation Warnnings for platform > Serviceability > getOptimalLocations \n ${res_error}`,
709
781
  });
710
- Logger({ level: "WARN", message: res_error });
711
782
  }
712
783
 
713
784
  return response;
714
785
  }
715
786
 
716
787
  /**
717
- * @param {Object} arg - Arg object.
718
- * @param {number} arg.storeUid - A `store_uid` contains a specific ID of a store.
719
- * @returns {Promise<GetStoresViewResponse>} - Success response
788
+ * @param {ServiceabilityPlatformValidator.GetStoreParam} arg - Arg object
789
+ * @param {import("../PlatformAPIClient").Options} - Options
790
+ * @returns {Promise<ServiceabilityPlatformModel.GetStoresViewResponse>} -
791
+ * Success response
792
+ * @name getStore
720
793
  * @summary: GET stores data
721
- * @description: This API returns stores data.
794
+ * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStore/).
722
795
  */
723
- async getStore({ storeUid } = {}) {
724
- const { error } = ServiceabilityValidator.getStore().validate(
796
+ async getStore({ storeUid } = {}, { headers } = { headers: false }) {
797
+ const { error } = ServiceabilityPlatformValidator.getStore().validate(
725
798
  {
726
799
  storeUid,
727
800
  },
@@ -732,7 +805,9 @@ class Serviceability {
732
805
  }
733
806
 
734
807
  // Showing warrnings if extra unknown parameters are found
735
- const { error: warrning } = ServiceabilityValidator.getStore().validate(
808
+ const {
809
+ error: warrning,
810
+ } = ServiceabilityPlatformValidator.getStore().validate(
736
811
  {
737
812
  storeUid,
738
813
  },
@@ -741,9 +816,8 @@ class Serviceability {
741
816
  if (warrning) {
742
817
  Logger({
743
818
  level: "WARN",
744
- message: "Parameter Validation warrnings for getStore",
819
+ message: `Parameter Validation warrnings for platform > Serviceability > getStore \n ${warrning}`,
745
820
  });
746
- Logger({ level: "WARN", message: warrning });
747
821
  }
748
822
 
749
823
  const query_params = {};
@@ -756,37 +830,46 @@ class Serviceability {
756
830
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/stores/${storeUid}`,
757
831
  query_params,
758
832
  undefined,
759
- xHeaders
833
+ xHeaders,
834
+ { headers }
760
835
  );
761
836
 
837
+ let responseData = response;
838
+ if (headers) {
839
+ responseData = response[0];
840
+ }
841
+
762
842
  const {
763
843
  error: res_error,
764
- } = ServiceabilityModel.GetStoresViewResponse().validate(response, {
765
- abortEarly: false,
766
- allowUnknown: false,
767
- });
844
+ } = ServiceabilityPlatformModel.GetStoresViewResponse().validate(
845
+ responseData,
846
+ { abortEarly: false, allowUnknown: false }
847
+ );
768
848
 
769
849
  if (res_error) {
770
850
  Logger({
771
851
  level: "WARN",
772
- message: "Response Validation Warnnings for getStore",
852
+ message: `Response Validation Warnnings for platform > Serviceability > getStore \n ${res_error}`,
773
853
  });
774
- Logger({ level: "WARN", message: res_error });
775
854
  }
776
855
 
777
856
  return response;
778
857
  }
779
858
 
780
859
  /**
781
- * @param {Object} arg - Arg object.
782
- * @param {string} arg.zoneId - A `zone_id` is a unique identifier for a
783
- * particular zone.
784
- * @returns {Promise<GetSingleZoneDataViewResponse>} - Success response
860
+ * @param {ServiceabilityPlatformValidator.GetZoneDataViewParam} arg - Arg object
861
+ * @param {import("../PlatformAPIClient").Options} - Options
862
+ * @returns {Promise<ServiceabilityPlatformModel.GetSingleZoneDataViewResponse>}
863
+ * - Success response
864
+ *
865
+ * @name getZoneDataView
785
866
  * @summary: Zone Data View of application.
786
- * @description: This API returns Zone Data View of the application.
867
+ * @description: This API returns Zone Data View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneDataView/).
787
868
  */
788
- async getZoneDataView({ zoneId } = {}) {
789
- const { error } = ServiceabilityValidator.getZoneDataView().validate(
869
+ async getZoneDataView({ zoneId } = {}, { headers } = { headers: false }) {
870
+ const {
871
+ error,
872
+ } = ServiceabilityPlatformValidator.getZoneDataView().validate(
790
873
  {
791
874
  zoneId,
792
875
  },
@@ -799,7 +882,7 @@ class Serviceability {
799
882
  // Showing warrnings if extra unknown parameters are found
800
883
  const {
801
884
  error: warrning,
802
- } = ServiceabilityValidator.getZoneDataView().validate(
885
+ } = ServiceabilityPlatformValidator.getZoneDataView().validate(
803
886
  {
804
887
  zoneId,
805
888
  },
@@ -808,9 +891,8 @@ class Serviceability {
808
891
  if (warrning) {
809
892
  Logger({
810
893
  level: "WARN",
811
- message: "Parameter Validation warrnings for getZoneDataView",
894
+ message: `Parameter Validation warrnings for platform > Serviceability > getZoneDataView \n ${warrning}`,
812
895
  });
813
- Logger({ level: "WARN", message: warrning });
814
896
  }
815
897
 
816
898
  const query_params = {};
@@ -823,52 +905,56 @@ class Serviceability {
823
905
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone/${zoneId}`,
824
906
  query_params,
825
907
  undefined,
826
- xHeaders
908
+ xHeaders,
909
+ { headers }
827
910
  );
828
911
 
912
+ let responseData = response;
913
+ if (headers) {
914
+ responseData = response[0];
915
+ }
916
+
829
917
  const {
830
918
  error: res_error,
831
- } = ServiceabilityModel.GetSingleZoneDataViewResponse().validate(response, {
832
- abortEarly: false,
833
- allowUnknown: false,
834
- });
919
+ } = ServiceabilityPlatformModel.GetSingleZoneDataViewResponse().validate(
920
+ responseData,
921
+ { abortEarly: false, allowUnknown: false }
922
+ );
835
923
 
836
924
  if (res_error) {
837
925
  Logger({
838
926
  level: "WARN",
839
- message: "Response Validation Warnnings for getZoneDataView",
927
+ message: `Response Validation Warnnings for platform > Serviceability > getZoneDataView \n ${res_error}`,
840
928
  });
841
- Logger({ level: "WARN", message: res_error });
842
929
  }
843
930
 
844
931
  return response;
845
932
  }
846
933
 
847
934
  /**
848
- * @param {Object} arg - Arg object.
849
- * @param {number} [arg.pageNumber] - Index of the item to start returning with
850
- * @param {number} [arg.pageNo] - Index of the item to start returning with
851
- * @param {number} [arg.pageSize] - Determines the items to be displayed in a page
852
- * @param {string} [arg.name] - Name of particular zone in the seller account
853
- * @param {boolean} [arg.isActive] - Status of zone whether active or inactive
854
- * @param {string} [arg.channelIds] - Zones associated with the given channel ids'
855
- * @param {string} [arg.q] - Search with name as a free text
856
- * @param {string[]} [arg.zoneId] - List of zones to query for
857
- * @returns {Promise<ListViewResponse>} - Success response
935
+ * @param {ServiceabilityPlatformValidator.GetZoneListViewParam} arg - Arg object
936
+ * @param {import("../PlatformAPIClient").Options} - Options
937
+ * @returns {Promise<ServiceabilityPlatformModel.ListViewResponse>} - Success response
938
+ * @name getZoneListView
858
939
  * @summary: Zone List of application.
859
- * @description: This API returns Zone List View of the application.
940
+ * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneListView/).
860
941
  */
861
- async getZoneListView({
862
- pageNumber,
863
- pageNo,
864
- pageSize,
865
- name,
866
- isActive,
867
- channelIds,
868
- q,
869
- zoneId,
870
- } = {}) {
871
- const { error } = ServiceabilityValidator.getZoneListView().validate(
942
+ async getZoneListView(
943
+ {
944
+ pageNumber,
945
+ pageNo,
946
+ pageSize,
947
+ name,
948
+ isActive,
949
+ channelIds,
950
+ q,
951
+ zoneId,
952
+ } = {},
953
+ { headers } = { headers: false }
954
+ ) {
955
+ const {
956
+ error,
957
+ } = ServiceabilityPlatformValidator.getZoneListView().validate(
872
958
  {
873
959
  pageNumber,
874
960
  pageNo,
@@ -888,7 +974,7 @@ class Serviceability {
888
974
  // Showing warrnings if extra unknown parameters are found
889
975
  const {
890
976
  error: warrning,
891
- } = ServiceabilityValidator.getZoneListView().validate(
977
+ } = ServiceabilityPlatformValidator.getZoneListView().validate(
892
978
  {
893
979
  pageNumber,
894
980
  pageNo,
@@ -904,9 +990,8 @@ class Serviceability {
904
990
  if (warrning) {
905
991
  Logger({
906
992
  level: "WARN",
907
- message: "Parameter Validation warrnings for getZoneListView",
993
+ message: `Parameter Validation warrnings for platform > Serviceability > getZoneListView \n ${warrning}`,
908
994
  });
909
- Logger({ level: "WARN", message: warrning });
910
995
  }
911
996
 
912
997
  const query_params = {};
@@ -927,12 +1012,18 @@ class Serviceability {
927
1012
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/zones-list`,
928
1013
  query_params,
929
1014
  undefined,
930
- xHeaders
1015
+ xHeaders,
1016
+ { headers }
931
1017
  );
932
1018
 
1019
+ let responseData = response;
1020
+ if (headers) {
1021
+ responseData = response[0];
1022
+ }
1023
+
933
1024
  const {
934
1025
  error: res_error,
935
- } = ServiceabilityModel.ListViewResponse().validate(response, {
1026
+ } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, {
936
1027
  abortEarly: false,
937
1028
  allowUnknown: false,
938
1029
  });
@@ -940,25 +1031,25 @@ class Serviceability {
940
1031
  if (res_error) {
941
1032
  Logger({
942
1033
  level: "WARN",
943
- message: "Response Validation Warnnings for getZoneListView",
1034
+ message: `Response Validation Warnnings for platform > Serviceability > getZoneListView \n ${res_error}`,
944
1035
  });
945
- Logger({ level: "WARN", message: res_error });
946
1036
  }
947
1037
 
948
1038
  return response;
949
1039
  }
950
1040
 
951
1041
  /**
952
- * @param {Object} arg - Arg object.
953
- * @param {string} arg.ruleUid - A `rule_uid` is a unique identifier for a
954
- * particular Dp.
955
- * @param {DpRulesUpdateRequest} arg.body
956
- * @returns {Promise<DpRuleUpdateSuccessResponse>} - Success response
1042
+ * @param {ServiceabilityPlatformValidator.UpdateDpRuleParam} arg - Arg object
1043
+ * @param {import("../PlatformAPIClient").Options} - Options
1044
+ * @returns {Promise<ServiceabilityPlatformModel.DpRuleUpdateSuccessResponse>}
1045
+ * - Success response
1046
+ *
1047
+ * @name updateDpRule
957
1048
  * @summary: Updating of DpRules from database.
958
- * @description: This API updates and returns response of DpRules from mongo database.
1049
+ * @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/).
959
1050
  */
960
- async updateDpRule({ ruleUid, body } = {}) {
961
- const { error } = ServiceabilityValidator.updateDpRule().validate(
1051
+ async updateDpRule({ ruleUid, body } = {}, { headers } = { headers: false }) {
1052
+ const { error } = ServiceabilityPlatformValidator.updateDpRule().validate(
962
1053
  {
963
1054
  ruleUid,
964
1055
  body,
@@ -970,7 +1061,9 @@ class Serviceability {
970
1061
  }
971
1062
 
972
1063
  // Showing warrnings if extra unknown parameters are found
973
- const { error: warrning } = ServiceabilityValidator.updateDpRule().validate(
1064
+ const {
1065
+ error: warrning,
1066
+ } = ServiceabilityPlatformValidator.updateDpRule().validate(
974
1067
  {
975
1068
  ruleUid,
976
1069
  body,
@@ -980,9 +1073,8 @@ class Serviceability {
980
1073
  if (warrning) {
981
1074
  Logger({
982
1075
  level: "WARN",
983
- message: "Parameter Validation warrnings for updateDpRule",
1076
+ message: `Parameter Validation warrnings for platform > Serviceability > updateDpRule \n ${warrning}`,
984
1077
  });
985
- Logger({ level: "WARN", message: warrning });
986
1078
  }
987
1079
 
988
1080
  const query_params = {};
@@ -995,44 +1087,50 @@ class Serviceability {
995
1087
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules/${ruleUid}`,
996
1088
  query_params,
997
1089
  body,
998
- xHeaders
1090
+ xHeaders,
1091
+ { headers }
999
1092
  );
1000
1093
 
1094
+ let responseData = response;
1095
+ if (headers) {
1096
+ responseData = response[0];
1097
+ }
1098
+
1001
1099
  const {
1002
1100
  error: res_error,
1003
- } = ServiceabilityModel.DpRuleUpdateSuccessResponse().validate(response, {
1004
- abortEarly: false,
1005
- allowUnknown: false,
1006
- });
1101
+ } = ServiceabilityPlatformModel.DpRuleUpdateSuccessResponse().validate(
1102
+ responseData,
1103
+ { abortEarly: false, allowUnknown: false }
1104
+ );
1007
1105
 
1008
1106
  if (res_error) {
1009
1107
  Logger({
1010
1108
  level: "WARN",
1011
- message: "Response Validation Warnnings for updateDpRule",
1109
+ message: `Response Validation Warnnings for platform > Serviceability > updateDpRule \n ${res_error}`,
1012
1110
  });
1013
- Logger({ level: "WARN", message: res_error });
1014
1111
  }
1015
1112
 
1016
1113
  return response;
1017
1114
  }
1018
1115
 
1019
1116
  /**
1020
- * @param {Object} arg - Arg object.
1021
- * @param {string} arg.zoneId - A `zone_id` is a unique identifier for a
1022
- * particular zone.
1023
- * @param {ZoneUpdateRequest} arg.body
1024
- * @returns {Promise<ZoneSuccessResponse>} - Success response
1117
+ * @param {ServiceabilityPlatformValidator.UpdateZoneControllerViewParam} arg
1118
+ * - Arg object
1119
+ *
1120
+ * @param {import("../PlatformAPIClient").Options} - Options
1121
+ * @returns {Promise<ServiceabilityPlatformModel.ZoneSuccessResponse>} -
1122
+ * Success response
1123
+ * @name updateZoneControllerView
1025
1124
  * @summary: Updation of zone collections in database.
1026
- * @description: This API returns response of updation of zone in mongo database.
1125
+ * @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/).
1027
1126
  */
1028
- async updateZoneControllerView({
1029
- zoneId,
1030
-
1031
- body,
1032
- } = {}) {
1127
+ async updateZoneControllerView(
1128
+ { zoneId, body } = {},
1129
+ { headers } = { headers: false }
1130
+ ) {
1033
1131
  const {
1034
1132
  error,
1035
- } = ServiceabilityValidator.updateZoneControllerView().validate(
1133
+ } = ServiceabilityPlatformValidator.updateZoneControllerView().validate(
1036
1134
  {
1037
1135
  zoneId,
1038
1136
 
@@ -1047,7 +1145,7 @@ class Serviceability {
1047
1145
  // Showing warrnings if extra unknown parameters are found
1048
1146
  const {
1049
1147
  error: warrning,
1050
- } = ServiceabilityValidator.updateZoneControllerView().validate(
1148
+ } = ServiceabilityPlatformValidator.updateZoneControllerView().validate(
1051
1149
  {
1052
1150
  zoneId,
1053
1151
 
@@ -1058,9 +1156,8 @@ class Serviceability {
1058
1156
  if (warrning) {
1059
1157
  Logger({
1060
1158
  level: "WARN",
1061
- message: "Parameter Validation warrnings for updateZoneControllerView",
1159
+ message: `Parameter Validation warrnings for platform > Serviceability > updateZoneControllerView \n ${warrning}`,
1062
1160
  });
1063
- Logger({ level: "WARN", message: warrning });
1064
1161
  }
1065
1162
 
1066
1163
  const query_params = {};
@@ -1073,36 +1170,46 @@ class Serviceability {
1073
1170
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone/${zoneId}`,
1074
1171
  query_params,
1075
1172
  body,
1076
- xHeaders
1173
+ xHeaders,
1174
+ { headers }
1077
1175
  );
1078
1176
 
1177
+ let responseData = response;
1178
+ if (headers) {
1179
+ responseData = response[0];
1180
+ }
1181
+
1079
1182
  const {
1080
1183
  error: res_error,
1081
- } = ServiceabilityModel.ZoneSuccessResponse().validate(response, {
1082
- abortEarly: false,
1083
- allowUnknown: false,
1084
- });
1184
+ } = ServiceabilityPlatformModel.ZoneSuccessResponse().validate(
1185
+ responseData,
1186
+ { abortEarly: false, allowUnknown: false }
1187
+ );
1085
1188
 
1086
1189
  if (res_error) {
1087
1190
  Logger({
1088
1191
  level: "WARN",
1089
- message: "Response Validation Warnnings for updateZoneControllerView",
1192
+ message: `Response Validation Warnnings for platform > Serviceability > updateZoneControllerView \n ${res_error}`,
1090
1193
  });
1091
- Logger({ level: "WARN", message: res_error });
1092
1194
  }
1093
1195
 
1094
1196
  return response;
1095
1197
  }
1096
1198
 
1097
1199
  /**
1098
- * @param {Object} arg - Arg object.
1099
- * @param {CompanyDpAccountRequest} arg.body
1100
- * @returns {Promise<CompanyDpAccountResponse>} - Success response
1200
+ * @param {ServiceabilityPlatformValidator.UpsertDpAccountParam} arg - Arg object
1201
+ * @param {import("../PlatformAPIClient").Options} - Options
1202
+ * @returns {Promise<ServiceabilityPlatformModel.CompanyDpAccountResponse>}
1203
+ * - Success response
1204
+ *
1205
+ * @name upsertDpAccount
1101
1206
  * @summary: Upsertion of DpAccount in database.
1102
- * @description: This API returns response of upsertion of DpAccount in mongo database.
1207
+ * @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/).
1103
1208
  */
1104
- async upsertDpAccount({ body } = {}) {
1105
- const { error } = ServiceabilityValidator.upsertDpAccount().validate(
1209
+ async upsertDpAccount({ body } = {}, { headers } = { headers: false }) {
1210
+ const {
1211
+ error,
1212
+ } = ServiceabilityPlatformValidator.upsertDpAccount().validate(
1106
1213
  {
1107
1214
  body,
1108
1215
  },
@@ -1115,7 +1222,7 @@ class Serviceability {
1115
1222
  // Showing warrnings if extra unknown parameters are found
1116
1223
  const {
1117
1224
  error: warrning,
1118
- } = ServiceabilityValidator.upsertDpAccount().validate(
1225
+ } = ServiceabilityPlatformValidator.upsertDpAccount().validate(
1119
1226
  {
1120
1227
  body,
1121
1228
  },
@@ -1124,9 +1231,8 @@ class Serviceability {
1124
1231
  if (warrning) {
1125
1232
  Logger({
1126
1233
  level: "WARN",
1127
- message: "Parameter Validation warrnings for upsertDpAccount",
1234
+ message: `Parameter Validation warrnings for platform > Serviceability > upsertDpAccount \n ${warrning}`,
1128
1235
  });
1129
- Logger({ level: "WARN", message: warrning });
1130
1236
  }
1131
1237
 
1132
1238
  const query_params = {};
@@ -1139,36 +1245,45 @@ class Serviceability {
1139
1245
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/account`,
1140
1246
  query_params,
1141
1247
  body,
1142
- xHeaders
1248
+ xHeaders,
1249
+ { headers }
1143
1250
  );
1144
1251
 
1252
+ let responseData = response;
1253
+ if (headers) {
1254
+ responseData = response[0];
1255
+ }
1256
+
1145
1257
  const {
1146
1258
  error: res_error,
1147
- } = ServiceabilityModel.CompanyDpAccountResponse().validate(response, {
1148
- abortEarly: false,
1149
- allowUnknown: false,
1150
- });
1259
+ } = ServiceabilityPlatformModel.CompanyDpAccountResponse().validate(
1260
+ responseData,
1261
+ { abortEarly: false, allowUnknown: false }
1262
+ );
1151
1263
 
1152
1264
  if (res_error) {
1153
1265
  Logger({
1154
1266
  level: "WARN",
1155
- message: "Response Validation Warnnings for upsertDpAccount",
1267
+ message: `Response Validation Warnnings for platform > Serviceability > upsertDpAccount \n ${res_error}`,
1156
1268
  });
1157
- Logger({ level: "WARN", message: res_error });
1158
1269
  }
1159
1270
 
1160
1271
  return response;
1161
1272
  }
1162
1273
 
1163
1274
  /**
1164
- * @param {Object} arg - Arg object.
1165
- * @param {DPCompanyRuleRequest} arg.body
1166
- * @returns {Promise<DPCompanyRuleResponse>} - Success response
1275
+ * @param {ServiceabilityPlatformValidator.UpsertDpCompanyRulesParam} arg - Arg object
1276
+ * @param {import("../PlatformAPIClient").Options} - Options
1277
+ * @returns {Promise<ServiceabilityPlatformModel.DPCompanyRuleResponse>} -
1278
+ * Success response
1279
+ * @name upsertDpCompanyRules
1167
1280
  * @summary: Upsert of DpCompanyRules in database.
1168
- * @description: This API returns response of upsert of DpCompanyRules in mongo database.
1281
+ * @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/).
1169
1282
  */
1170
- async upsertDpCompanyRules({ body } = {}) {
1171
- const { error } = ServiceabilityValidator.upsertDpCompanyRules().validate(
1283
+ async upsertDpCompanyRules({ body } = {}, { headers } = { headers: false }) {
1284
+ const {
1285
+ error,
1286
+ } = ServiceabilityPlatformValidator.upsertDpCompanyRules().validate(
1172
1287
  {
1173
1288
  body,
1174
1289
  },
@@ -1181,7 +1296,7 @@ class Serviceability {
1181
1296
  // Showing warrnings if extra unknown parameters are found
1182
1297
  const {
1183
1298
  error: warrning,
1184
- } = ServiceabilityValidator.upsertDpCompanyRules().validate(
1299
+ } = ServiceabilityPlatformValidator.upsertDpCompanyRules().validate(
1185
1300
  {
1186
1301
  body,
1187
1302
  },
@@ -1190,9 +1305,8 @@ class Serviceability {
1190
1305
  if (warrning) {
1191
1306
  Logger({
1192
1307
  level: "WARN",
1193
- message: "Parameter Validation warrnings for upsertDpCompanyRules",
1308
+ message: `Parameter Validation warrnings for platform > Serviceability > upsertDpCompanyRules \n ${warrning}`,
1194
1309
  });
1195
- Logger({ level: "WARN", message: warrning });
1196
1310
  }
1197
1311
 
1198
1312
  const query_params = {};
@@ -1205,36 +1319,43 @@ class Serviceability {
1205
1319
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/priority`,
1206
1320
  query_params,
1207
1321
  body,
1208
- xHeaders
1322
+ xHeaders,
1323
+ { headers }
1209
1324
  );
1210
1325
 
1326
+ let responseData = response;
1327
+ if (headers) {
1328
+ responseData = response[0];
1329
+ }
1330
+
1211
1331
  const {
1212
1332
  error: res_error,
1213
- } = ServiceabilityModel.DPCompanyRuleResponse().validate(response, {
1214
- abortEarly: false,
1215
- allowUnknown: false,
1216
- });
1333
+ } = ServiceabilityPlatformModel.DPCompanyRuleResponse().validate(
1334
+ responseData,
1335
+ { abortEarly: false, allowUnknown: false }
1336
+ );
1217
1337
 
1218
1338
  if (res_error) {
1219
1339
  Logger({
1220
1340
  level: "WARN",
1221
- message: "Response Validation Warnnings for upsertDpCompanyRules",
1341
+ message: `Response Validation Warnnings for platform > Serviceability > upsertDpCompanyRules \n ${res_error}`,
1222
1342
  });
1223
- Logger({ level: "WARN", message: res_error });
1224
1343
  }
1225
1344
 
1226
1345
  return response;
1227
1346
  }
1228
1347
 
1229
1348
  /**
1230
- * @param {Object} arg - Arg object.
1231
- * @param {DpRuleRequest} arg.body
1232
- * @returns {Promise<DpRuleSuccessResponse>} - Success response
1349
+ * @param {ServiceabilityPlatformValidator.UpsertDpRulesParam} arg - Arg object
1350
+ * @param {import("../PlatformAPIClient").Options} - Options
1351
+ * @returns {Promise<ServiceabilityPlatformModel.DpRuleSuccessResponse>} -
1352
+ * Success response
1353
+ * @name upsertDpRules
1233
1354
  * @summary: Upsert of DpRules in database.
1234
- * @description: This API returns response of upsert of DpRules in mongo database.
1355
+ * @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/).
1235
1356
  */
1236
- async upsertDpRules({ body } = {}) {
1237
- const { error } = ServiceabilityValidator.upsertDpRules().validate(
1357
+ async upsertDpRules({ body } = {}, { headers } = { headers: false }) {
1358
+ const { error } = ServiceabilityPlatformValidator.upsertDpRules().validate(
1238
1359
  {
1239
1360
  body,
1240
1361
  },
@@ -1247,7 +1368,7 @@ class Serviceability {
1247
1368
  // Showing warrnings if extra unknown parameters are found
1248
1369
  const {
1249
1370
  error: warrning,
1250
- } = ServiceabilityValidator.upsertDpRules().validate(
1371
+ } = ServiceabilityPlatformValidator.upsertDpRules().validate(
1251
1372
  {
1252
1373
  body,
1253
1374
  },
@@ -1256,9 +1377,8 @@ class Serviceability {
1256
1377
  if (warrning) {
1257
1378
  Logger({
1258
1379
  level: "WARN",
1259
- message: "Parameter Validation warrnings for upsertDpRules",
1380
+ message: `Parameter Validation warrnings for platform > Serviceability > upsertDpRules \n ${warrning}`,
1260
1381
  });
1261
- Logger({ level: "WARN", message: warrning });
1262
1382
  }
1263
1383
 
1264
1384
  const query_params = {};
@@ -1271,22 +1391,27 @@ class Serviceability {
1271
1391
  `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules`,
1272
1392
  query_params,
1273
1393
  body,
1274
- xHeaders
1394
+ xHeaders,
1395
+ { headers }
1275
1396
  );
1276
1397
 
1398
+ let responseData = response;
1399
+ if (headers) {
1400
+ responseData = response[0];
1401
+ }
1402
+
1277
1403
  const {
1278
1404
  error: res_error,
1279
- } = ServiceabilityModel.DpRuleSuccessResponse().validate(response, {
1280
- abortEarly: false,
1281
- allowUnknown: false,
1282
- });
1405
+ } = ServiceabilityPlatformModel.DpRuleSuccessResponse().validate(
1406
+ responseData,
1407
+ { abortEarly: false, allowUnknown: false }
1408
+ );
1283
1409
 
1284
1410
  if (res_error) {
1285
1411
  Logger({
1286
1412
  level: "WARN",
1287
- message: "Response Validation Warnnings for upsertDpRules",
1413
+ message: `Response Validation Warnnings for platform > Serviceability > upsertDpRules \n ${res_error}`,
1288
1414
  });
1289
- Logger({ level: "WARN", message: res_error });
1290
1415
  }
1291
1416
 
1292
1417
  return response;