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