@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.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 (310) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +93 -113
  6. package/sdk/application/Cart/CartApplicationClient.js +157 -530
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -19
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +65 -55
  16. package/sdk/application/Content/ContentApplicationClient.js +211 -341
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
  22. package/sdk/application/Lead/LeadApplicationClient.js +24 -55
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +32 -87
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
  26. package/sdk/application/Order/OrderApplicationClient.js +89 -293
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
  28. package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
  29. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
  30. package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
  31. package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
  32. package/sdk/application/Share/ShareApplicationClient.js +35 -89
  33. package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
  34. package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
  35. package/sdk/application/User/UserApplicationClient.d.ts +23 -13
  36. package/sdk/application/User/UserApplicationClient.js +49 -407
  37. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  38. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
  39. package/sdk/common/Utility.d.ts +1 -1
  40. package/sdk/common/Utility.js +10 -7
  41. package/sdk/common/Validator.d.ts +1 -0
  42. package/sdk/common/Validator.js +20 -0
  43. package/sdk/common/utils.d.ts +0 -1
  44. package/sdk/common/utils.js +0 -14
  45. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +18 -62
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
  51. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  52. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  53. package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
  54. package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
  55. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  56. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
  57. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
  58. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
  59. package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
  60. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
  61. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
  62. package/sdk/partner/PartnerClient.d.ts +0 -6
  63. package/sdk/partner/PartnerClient.js +0 -9
  64. package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
  65. package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
  66. package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
  67. package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
  68. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
  69. package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
  70. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  71. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  72. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
  73. package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
  74. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  75. package/sdk/partner/index.d.ts +0 -3
  76. package/sdk/partner/index.js +0 -6
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  87. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -406
  88. package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
  90. package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
  98. package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
  110. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
  112. package/sdk/platform/Common/CommonPlatformModel.js +11 -14
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +236 -376
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
  117. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
  118. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
  119. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +314 -422
  120. package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
  121. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
  122. package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -68
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
  128. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
  132. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
  134. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +565 -1282
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
  137. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
  138. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
  139. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -246
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
  141. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
  142. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
  143. package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
  144. package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
  145. package/sdk/platform/Content/ContentPlatformModel.d.ts +2374 -877
  146. package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
  147. package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
  148. package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
  149. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
  150. package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
  151. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
  152. package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
  153. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  154. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  155. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
  156. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
  157. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
  158. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
  159. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  160. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  161. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
  162. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
  163. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  164. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  165. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  166. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  167. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  168. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  169. package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
  170. package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
  171. package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
  172. package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
  173. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
  174. package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
  175. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
  176. package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
  177. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
  178. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
  179. package/sdk/platform/Order/OrderPlatformClient.d.ts +421 -418
  180. package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
  181. package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
  182. package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
  183. package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
  184. package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
  185. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  186. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  187. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
  188. package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
  189. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
  190. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +934 -2452
  191. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
  192. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -305
  193. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
  194. package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
  195. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1327 -3529
  196. package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
  197. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
  198. package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
  199. package/sdk/platform/PlatformClient.d.ts +0 -2
  200. package/sdk/platform/PlatformClient.js +0 -4
  201. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  202. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  203. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  204. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  205. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
  206. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -513
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
  213. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
  214. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
  215. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
  216. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
  217. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
  218. package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
  219. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
  220. package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
  221. package/sdk/platform/Share/SharePlatformModel.d.ts +53 -4
  222. package/sdk/platform/Share/SharePlatformModel.js +45 -3
  223. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
  224. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
  225. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
  226. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
  227. package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
  228. package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
  229. package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
  230. package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
  231. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
  232. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
  233. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
  234. package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
  235. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
  236. package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
  237. package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
  238. package/sdk/platform/User/UserPlatformModel.js +253 -210
  239. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  240. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  241. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
  242. package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
  243. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  244. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  245. package/sdk/platform/index.d.ts +0 -1
  246. package/sdk/platform/index.js +0 -2
  247. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  248. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  249. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  250. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  251. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  252. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  253. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
  254. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
  255. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
  256. package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
  257. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
  258. package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
  259. package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
  260. package/sdk/public/Content/ContentPublicClient.js +254 -280
  261. package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
  262. package/sdk/public/Content/ContentPublicModel.js +98 -44
  263. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
  264. package/sdk/public/Content/ContentPublicValidator.js +26 -19
  265. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  266. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  267. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  268. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  269. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  270. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  271. package/sdk/public/PublicClient.d.ts +2 -2
  272. package/sdk/public/PublicClient.js +2 -2
  273. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  274. package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
  275. package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
  276. package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
  277. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  278. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  279. package/sdk/public/index.d.ts +1 -1
  280. package/sdk/public/index.js +1 -1
  281. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
  282. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
  283. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
  284. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
  285. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
  286. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
  287. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
  288. package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
  289. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
  290. package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
  291. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
  292. package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
  293. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
  294. package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
  295. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
  296. package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
  297. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
  298. package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
  299. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  300. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  301. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
  302. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
  303. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  304. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  305. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
  306. package/sdk/public/Billing/BillingPublicClient.js +0 -397
  307. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
  308. package/sdk/public/Billing/BillingPublicModel.js +0 -560
  309. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
  310. package/sdk/public/Billing/BillingPublicValidator.js +0 -50
@@ -6,26 +6,25 @@ const {
6
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
7
7
  const constructUrl = require("../constructUrl");
8
8
  const Paginator = require("../../common/Paginator");
9
+ const { validateRequiredParams } = require("../../common/Validator");
9
10
 
10
11
  class Logistic {
11
12
  constructor(_conf) {
12
13
  this._conf = _conf;
13
14
  this._relativeUrls = {
14
- createShipments:
15
- "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipments",
16
15
  getAllCountries: "/service/application/logistics/v1.0/country-list",
17
16
  getCountries: "/service/application/logistics/v2.0/countries",
18
17
  getCountry:
19
18
  "/service/application/logistics/v1.0/countries/{country_iso_code}",
20
- getGeoAreas:
21
- "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/geoareas",
19
+ getCourierPartners:
20
+ "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",
21
+ getDeliveryPromise:
22
+ "/service/application/logistics/v1.0/delivery-promise",
22
23
  getLocalities:
23
24
  "/service/application/logistics/v1.0/localities/{locality_type}",
24
25
  getLocality:
25
26
  "/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",
26
27
  getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
27
- getZones:
28
- "/service/application/logistics/v2.0/company/{company_id}/application/{application_id}/zones",
29
28
  validateAddress:
30
29
  "/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate",
31
30
  };
@@ -48,49 +47,28 @@ class Logistic {
48
47
  /**
49
48
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
50
49
  * @param {import("../ApplicationAPIClient").Options} - Options
51
- * @returns {Promise<GenerateShipmentsAndCourierPartnerResponse>} - Success response
52
- * @name createShipments
53
- * @summary: Create and return shipments.
54
- * @description: Create and return shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/createShipments/).
50
+ * @returns {Promise<CountryResult>} - Success response
51
+ * @name getAllCountries
52
+ * @summary: Get deliverable countries
53
+ * @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/).
55
54
  */
56
- async createShipments(
57
- { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
55
+ async getAllCountries(
56
+ { requestHeaders } = { requestHeaders: {} },
58
57
  { responseHeaders } = { responseHeaders: false }
59
58
  ) {
60
- let invalidInput = [];
61
-
62
- if (!companyId) {
63
- invalidInput.push({
64
- message: `The 'companyId' field is required.`,
65
- path: ["companyId"],
66
- });
67
- }
68
- if (!applicationId) {
69
- invalidInput.push({
70
- message: `The 'applicationId' field is required.`,
71
- path: ["applicationId"],
72
- });
73
- }
74
- if (invalidInput.length) {
75
- const error = new Error();
76
- error.message = "Missing required field";
77
- error.details = invalidInput;
78
- return Promise.reject(new FDKClientValidationError(error));
79
- }
80
-
81
59
  const query_params = {};
82
60
 
83
61
  const xHeaders = {};
84
62
 
85
63
  const response = await ApplicationAPIClient.execute(
86
64
  this._conf,
87
- "post",
65
+ "get",
88
66
  constructUrl({
89
- url: this._urls["createShipments"],
90
- params: { companyId, applicationId },
67
+ url: this._urls["getAllCountries"],
68
+ params: {},
91
69
  }),
92
70
  query_params,
93
- body,
71
+ undefined,
94
72
  { ...xHeaders, ...requestHeaders },
95
73
  { responseHeaders }
96
74
  );
@@ -106,24 +84,30 @@ class Logistic {
106
84
  /**
107
85
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
108
86
  * @param {import("../ApplicationAPIClient").Options} - Options
109
- * @returns {Promise<CountryListResponse>} - Success response
110
- * @name getAllCountries
111
- * @summary: Get deliverable countries
112
- * @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/).
87
+ * @returns {Promise<GetCountries>} - Success response
88
+ * @name getCountries
89
+ * @summary: Get countries
90
+ * @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
113
91
  */
114
- async getAllCountries(
115
- { requestHeaders } = { requestHeaders: {} },
92
+ async getCountries(
93
+ {
94
+ onboarding,
95
+ pageNo,
96
+ pageSize,
97
+ q,
98
+ hierarchy,
99
+ phoneCode,
100
+ requestHeaders,
101
+ } = { requestHeaders: {} },
116
102
  { responseHeaders } = { responseHeaders: false }
117
103
  ) {
118
- let invalidInput = [];
119
- if (invalidInput.length) {
120
- const error = new Error();
121
- error.message = "Missing required field";
122
- error.details = invalidInput;
123
- return Promise.reject(new FDKClientValidationError(error));
124
- }
125
-
126
104
  const query_params = {};
105
+ query_params["onboarding"] = onboarding;
106
+ query_params["page_no"] = pageNo;
107
+ query_params["page_size"] = pageSize;
108
+ query_params["q"] = q;
109
+ query_params["hierarchy"] = hierarchy;
110
+ query_params["phone_code"] = phoneCode;
127
111
 
128
112
  const xHeaders = {};
129
113
 
@@ -131,7 +115,7 @@ class Logistic {
131
115
  this._conf,
132
116
  "get",
133
117
  constructUrl({
134
- url: this._urls["getAllCountries"],
118
+ url: this._urls["getCountries"],
135
119
  params: {},
136
120
  }),
137
121
  query_params,
@@ -151,31 +135,25 @@ class Logistic {
151
135
  /**
152
136
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
153
137
  * @param {import("../ApplicationAPIClient").Options} - Options
154
- * @returns {Promise<GetCountries>} - Success response
155
- * @name getCountries
156
- * @summary: Get all countries and associated data.
157
- * @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
138
+ * @returns {Promise<GetCountry>} - Success response
139
+ * @name getCountry
140
+ * @summary: Get country details
141
+ * @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
158
142
  */
159
- async getCountries(
160
- { onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
161
- requestHeaders: {},
162
- },
143
+ async getCountry(
144
+ { countryIsoCode, requestHeaders } = { requestHeaders: {} },
163
145
  { responseHeaders } = { responseHeaders: false }
164
146
  ) {
165
- let invalidInput = [];
166
- if (invalidInput.length) {
167
- const error = new Error();
168
- error.message = "Missing required field";
169
- error.details = invalidInput;
147
+ const errors = validateRequiredParams(arguments[0], ["countryIsoCode"]);
148
+ if (errors.length > 0) {
149
+ const error = new FDKClientValidationError({
150
+ message: "Missing required field",
151
+ details: errors,
152
+ });
170
153
  return Promise.reject(new FDKClientValidationError(error));
171
154
  }
172
155
 
173
156
  const query_params = {};
174
- query_params["onboard"] = onboard;
175
- query_params["page_no"] = pageNo;
176
- query_params["page_size"] = pageSize;
177
- query_params["q"] = q;
178
- query_params["hierarchy"] = hierarchy;
179
157
 
180
158
  const xHeaders = {};
181
159
 
@@ -183,8 +161,8 @@ class Logistic {
183
161
  this._conf,
184
162
  "get",
185
163
  constructUrl({
186
- url: this._urls["getCountries"],
187
- params: {},
164
+ url: this._urls["getCountry"],
165
+ params: { countryIsoCode },
188
166
  }),
189
167
  query_params,
190
168
  undefined,
@@ -200,67 +178,27 @@ class Logistic {
200
178
  return response;
201
179
  }
202
180
 
203
- /**
204
- * @param {Object} arg - Arg object.
205
- * @param {boolean} [arg.onboard] - Only fetch countries which allowed for
206
- * onboard on Platform.
207
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
208
- * page. Default value is 12
209
- * @param {string} [arg.q] - The search string to search in the list of
210
- * countries by name.
211
- * @param {string} [arg.hierarchy] - The search filter to filter countries
212
- * based on their available hierarchy.
213
- * @returns {Paginator<GetCountries>}
214
- * @summary: Get all countries and associated data.
215
- * @description: Retrieve a list of countries for logistical purposes.
216
- */
217
- getCountriesPaginator({ onboard, pageSize, q, hierarchy } = {}) {
218
- const paginator = new Paginator();
219
- const callback = async () => {
220
- const pageId = paginator.nextId;
221
- const pageNo = paginator.pageNo;
222
- const pageType = "number";
223
- const data = await this.getCountries({
224
- onboard: onboard,
225
- pageNo: pageNo,
226
- pageSize: pageSize,
227
- q: q,
228
- hierarchy: hierarchy,
229
- });
230
- paginator.setPaginator({
231
- hasNext: data.page.has_next ? true : false,
232
- nextId: data.page.next_id,
233
- });
234
- return data;
235
- };
236
- paginator.setCallback(callback.bind(this));
237
- return paginator;
238
- }
239
-
240
181
  /**
241
182
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
242
183
  * @param {import("../ApplicationAPIClient").Options} - Options
243
- * @returns {Promise<GetCountry>} - Success response
244
- * @name getCountry
245
- * @summary: Get country details
246
- * @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
184
+ * @returns {Promise<ShipmentCourierPartnerResult>} - Success response
185
+ * @name getCourierPartners
186
+ * @summary: Serviceable Courier Partners
187
+ * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCourierPartners/).
247
188
  */
248
- async getCountry(
249
- { countryIsoCode, requestHeaders } = { requestHeaders: {} },
189
+ async getCourierPartners(
190
+ { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
250
191
  { responseHeaders } = { responseHeaders: false }
251
192
  ) {
252
- let invalidInput = [];
253
-
254
- if (!countryIsoCode) {
255
- invalidInput.push({
256
- message: `The 'countryIsoCode' field is required.`,
257
- path: ["countryIsoCode"],
193
+ const errors = validateRequiredParams(arguments[0], [
194
+ "companyId",
195
+ "applicationId",
196
+ ]);
197
+ if (errors.length > 0) {
198
+ const error = new FDKClientValidationError({
199
+ message: "Missing required field",
200
+ details: errors,
258
201
  });
259
- }
260
- if (invalidInput.length) {
261
- const error = new Error();
262
- error.message = "Missing required field";
263
- error.details = invalidInput;
264
202
  return Promise.reject(new FDKClientValidationError(error));
265
203
  }
266
204
 
@@ -270,13 +208,13 @@ class Logistic {
270
208
 
271
209
  const response = await ApplicationAPIClient.execute(
272
210
  this._conf,
273
- "get",
211
+ "post",
274
212
  constructUrl({
275
- url: this._urls["getCountry"],
276
- params: { countryIsoCode },
213
+ url: this._urls["getCourierPartners"],
214
+ params: { companyId, applicationId },
277
215
  }),
278
216
  query_params,
279
- undefined,
217
+ body,
280
218
  { ...xHeaders, ...requestHeaders },
281
219
  { responseHeaders }
282
220
  );
@@ -292,70 +230,31 @@ class Logistic {
292
230
  /**
293
231
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
294
232
  * @param {import("../ApplicationAPIClient").Options} - Options
295
- * @returns {Promise<GeoAreaGetResponseBody>} - Success response
296
- * @name getGeoAreas
297
- * @summary: Get all geoareas in the current application.
298
- * @description: Retrieves a listing view of created GeoAreas. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getGeoAreas/).
233
+ * @returns {Promise<GetPromiseDetails>} - Success response
234
+ * @name getDeliveryPromise
235
+ * @summary: Get delivery promise
236
+ * @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/).
299
237
  */
300
- async getGeoAreas(
301
- {
302
- applicationId,
303
- companyId,
304
- pageSize,
305
- pageNo,
306
- type,
307
- isActive,
308
- q,
309
- countryIsoCode,
310
- state,
311
- city,
312
- pincode,
313
- sector,
314
- requestHeaders,
315
- } = { requestHeaders: {} },
238
+ async getDeliveryPromise(
239
+ { xLocationDetail, xApplicationData, pageNo, pageSize, requestHeaders } = {
240
+ requestHeaders: {},
241
+ },
316
242
  { responseHeaders } = { responseHeaders: false }
317
243
  ) {
318
- let invalidInput = [];
319
-
320
- if (!applicationId) {
321
- invalidInput.push({
322
- message: `The 'applicationId' field is required.`,
323
- path: ["applicationId"],
324
- });
325
- }
326
- if (!companyId) {
327
- invalidInput.push({
328
- message: `The 'companyId' field is required.`,
329
- path: ["companyId"],
330
- });
331
- }
332
- if (invalidInput.length) {
333
- const error = new Error();
334
- error.message = "Missing required field";
335
- error.details = invalidInput;
336
- return Promise.reject(new FDKClientValidationError(error));
337
- }
338
-
339
244
  const query_params = {};
340
- query_params["page_size"] = pageSize;
341
245
  query_params["page_no"] = pageNo;
342
- query_params["type"] = type;
343
- query_params["is_active"] = isActive;
344
- query_params["q"] = q;
345
- query_params["country_iso_code"] = countryIsoCode;
346
- query_params["state"] = state;
347
- query_params["city"] = city;
348
- query_params["pincode"] = pincode;
349
- query_params["sector"] = sector;
246
+ query_params["page_size"] = pageSize;
350
247
 
351
248
  const xHeaders = {};
249
+ xHeaders["x-location-detail"] = xLocationDetail;
250
+ xHeaders["x-application-data"] = xApplicationData;
352
251
 
353
252
  const response = await ApplicationAPIClient.execute(
354
253
  this._conf,
355
254
  "get",
356
255
  constructUrl({
357
- url: this._urls["getGeoAreas"],
358
- params: { applicationId, companyId },
256
+ url: this._urls["getDeliveryPromise"],
257
+ params: {},
359
258
  }),
360
259
  query_params,
361
260
  undefined,
@@ -374,10 +273,10 @@ class Logistic {
374
273
  /**
375
274
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
376
275
  * @param {import("../ApplicationAPIClient").Options} - Options
377
- * @returns {Promise<GetLocalities>} - Success response
276
+ * @returns {Promise<GetLocalitiesApp>} - Success response
378
277
  * @name getLocalities
379
278
  * @summary: Get Localities
380
- * @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
279
+ * @description: Get Localities data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
381
280
  */
382
281
  async getLocalities(
383
282
  {
@@ -388,23 +287,17 @@ class Logistic {
388
287
  pageNo,
389
288
  pageSize,
390
289
  q,
391
- name,
290
+ sector,
392
291
  requestHeaders,
393
292
  } = { requestHeaders: {} },
394
293
  { responseHeaders } = { responseHeaders: false }
395
294
  ) {
396
- let invalidInput = [];
397
-
398
- if (!localityType) {
399
- invalidInput.push({
400
- message: `The 'localityType' field is required.`,
401
- path: ["localityType"],
295
+ const errors = validateRequiredParams(arguments[0], ["localityType"]);
296
+ if (errors.length > 0) {
297
+ const error = new FDKClientValidationError({
298
+ message: "Missing required field",
299
+ details: errors,
402
300
  });
403
- }
404
- if (invalidInput.length) {
405
- const error = new Error();
406
- error.message = "Missing required field";
407
- error.details = invalidInput;
408
301
  return Promise.reject(new FDKClientValidationError(error));
409
302
  }
410
303
 
@@ -415,7 +308,7 @@ class Logistic {
415
308
  query_params["page_no"] = pageNo;
416
309
  query_params["page_size"] = pageSize;
417
310
  query_params["q"] = q;
418
- query_params["name"] = name;
311
+ query_params["sector"] = sector;
419
312
 
420
313
  const xHeaders = {};
421
314
 
@@ -440,87 +333,35 @@ class Logistic {
440
333
  return response;
441
334
  }
442
335
 
443
- /**
444
- * @param {Object} arg - Arg object.
445
- * @param {string} arg.localityType - Unique geographical division.
446
- * @param {string} [arg.country] - Country name.
447
- * @param {string} [arg.state] - State or the province.
448
- * @param {string} [arg.city] - City.
449
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
450
- * page. Default value is 12.
451
- * @param {string} [arg.q] - This parameter is used to filter or search the records.
452
- * @param {string} [arg.name] - Search for localities. Either provide a full
453
- * name or a search term.
454
- * @returns {Paginator<GetLocalities>}
455
- * @summary: Get Localities
456
- * @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state.
457
- */
458
- getLocalitiesPaginator({
459
- localityType,
460
- country,
461
- state,
462
- city,
463
- pageSize,
464
- q,
465
- name,
466
- } = {}) {
467
- const paginator = new Paginator();
468
- const callback = async () => {
469
- const pageId = paginator.nextId;
470
- const pageNo = paginator.pageNo;
471
- const pageType = "number";
472
- const data = await this.getLocalities({
473
- localityType: localityType,
474
- country: country,
475
- state: state,
476
- city: city,
477
- pageNo: pageNo,
478
- pageSize: pageSize,
479
- q: q,
480
- name: name,
481
- });
482
- paginator.setPaginator({
483
- hasNext: data.page.has_next ? true : false,
484
- nextId: data.page.next_id,
485
- });
486
- return data;
487
- };
488
- paginator.setCallback(callback.bind(this));
489
- return paginator;
490
- }
491
-
492
336
  /**
493
337
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
494
338
  * @param {import("../ApplicationAPIClient").Options} - Options
495
- * @returns {Promise<GetLocality>} - Success response
339
+ * @returns {Promise<GetLocalityApp>} - Success response
496
340
  * @name getLocality
497
- * @summary: Get locality detail
341
+ * @summary: Get Locality API
498
342
  * @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/).
499
343
  */
500
344
  async getLocality(
501
- { localityType, localityValue, country, state, city, requestHeaders } = {
502
- requestHeaders: {},
503
- },
345
+ {
346
+ localityType,
347
+ localityValue,
348
+ country,
349
+ state,
350
+ city,
351
+ sector,
352
+ requestHeaders,
353
+ } = { requestHeaders: {} },
504
354
  { responseHeaders } = { responseHeaders: false }
505
355
  ) {
506
- let invalidInput = [];
507
-
508
- if (!localityType) {
509
- invalidInput.push({
510
- message: `The 'localityType' field is required.`,
511
- path: ["localityType"],
512
- });
513
- }
514
- if (!localityValue) {
515
- invalidInput.push({
516
- message: `The 'localityValue' field is required.`,
517
- path: ["localityValue"],
356
+ const errors = validateRequiredParams(arguments[0], [
357
+ "localityType",
358
+ "localityValue",
359
+ ]);
360
+ if (errors.length > 0) {
361
+ const error = new FDKClientValidationError({
362
+ message: "Missing required field",
363
+ details: errors,
518
364
  });
519
- }
520
- if (invalidInput.length) {
521
- const error = new Error();
522
- error.message = "Missing required field";
523
- error.details = invalidInput;
524
365
  return Promise.reject(new FDKClientValidationError(error));
525
366
  }
526
367
 
@@ -528,6 +369,7 @@ class Logistic {
528
369
  query_params["country"] = country;
529
370
  query_params["state"] = state;
530
371
  query_params["city"] = city;
372
+ query_params["sector"] = sector;
531
373
 
532
374
  const xHeaders = {};
533
375
 
@@ -555,27 +397,21 @@ class Logistic {
555
397
  /**
556
398
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
557
399
  * @param {import("../ApplicationAPIClient").Options} - Options
558
- * @returns {Promise<PincodeApiResponse>} - Success response
400
+ * @returns {Promise<PincodeDetailsResult>} - Success response
559
401
  * @name getPincodeCity
560
- * @summary: Get Pincode API
402
+ * @summary: Get pincode details
561
403
  * @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/).
562
404
  */
563
405
  async getPincodeCity(
564
406
  { pincode, requestHeaders } = { requestHeaders: {} },
565
407
  { responseHeaders } = { responseHeaders: false }
566
408
  ) {
567
- let invalidInput = [];
568
-
569
- if (!pincode) {
570
- invalidInput.push({
571
- message: `The 'pincode' field is required.`,
572
- path: ["pincode"],
409
+ const errors = validateRequiredParams(arguments[0], ["pincode"]);
410
+ if (errors.length > 0) {
411
+ const error = new FDKClientValidationError({
412
+ message: "Missing required field",
413
+ details: errors,
573
414
  });
574
- }
575
- if (invalidInput.length) {
576
- const error = new Error();
577
- error.message = "Missing required field";
578
- error.details = invalidInput;
579
415
  return Promise.reject(new FDKClientValidationError(error));
580
416
  }
581
417
 
@@ -607,91 +443,7 @@ class Logistic {
607
443
  /**
608
444
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
609
445
  * @param {import("../ApplicationAPIClient").Options} - Options
610
- * @returns {Promise<ListViewResponseV2>} - Success response
611
- * @name getZones
612
- * @summary: Shows zones defined at the application level
613
- * @description: Displays the list of zones defined at the application level. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getZones/).
614
- */
615
- async getZones(
616
- {
617
- companyId,
618
- applicationId,
619
- stage,
620
- type,
621
- pageSize,
622
- pageNo,
623
- isActive,
624
- q,
625
- countryIsoCode,
626
- pincode,
627
- state,
628
- city,
629
- sector,
630
- requestHeaders,
631
- } = { requestHeaders: {} },
632
- { responseHeaders } = { responseHeaders: false }
633
- ) {
634
- let invalidInput = [];
635
-
636
- if (!companyId) {
637
- invalidInput.push({
638
- message: `The 'companyId' field is required.`,
639
- path: ["companyId"],
640
- });
641
- }
642
- if (!applicationId) {
643
- invalidInput.push({
644
- message: `The 'applicationId' field is required.`,
645
- path: ["applicationId"],
646
- });
647
- }
648
- if (invalidInput.length) {
649
- const error = new Error();
650
- error.message = "Missing required field";
651
- error.details = invalidInput;
652
- return Promise.reject(new FDKClientValidationError(error));
653
- }
654
-
655
- const query_params = {};
656
- query_params["stage"] = stage;
657
- query_params["type"] = type;
658
- query_params["page_size"] = pageSize;
659
- query_params["page_no"] = pageNo;
660
- query_params["is_active"] = isActive;
661
- query_params["q"] = q;
662
- query_params["country_iso_code"] = countryIsoCode;
663
- query_params["pincode"] = pincode;
664
- query_params["state"] = state;
665
- query_params["city"] = city;
666
- query_params["sector"] = sector;
667
-
668
- const xHeaders = {};
669
-
670
- const response = await ApplicationAPIClient.execute(
671
- this._conf,
672
- "get",
673
- constructUrl({
674
- url: this._urls["getZones"],
675
- params: { companyId, applicationId },
676
- }),
677
- query_params,
678
- undefined,
679
- { ...xHeaders, ...requestHeaders },
680
- { responseHeaders }
681
- );
682
-
683
- let responseData = response;
684
- if (responseHeaders) {
685
- responseData = response[0];
686
- }
687
-
688
- return response;
689
- }
690
-
691
- /**
692
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
693
- * @param {import("../ApplicationAPIClient").Options} - Options
694
- * @returns {Promise<ValidateAddressRequest>} - Success response
446
+ * @returns {Promise<ValidateAddressDetails>} - Success response
695
447
  * @name validateAddress
696
448
  * @summary: Validate address
697
449
  * @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/).
@@ -702,24 +454,15 @@ class Logistic {
702
454
  },
703
455
  { responseHeaders } = { responseHeaders: false }
704
456
  ) {
705
- let invalidInput = [];
706
-
707
- if (!countryIsoCode) {
708
- invalidInput.push({
709
- message: `The 'countryIsoCode' field is required.`,
710
- path: ["countryIsoCode"],
457
+ const errors = validateRequiredParams(arguments[0], [
458
+ "countryIsoCode",
459
+ "templateName",
460
+ ]);
461
+ if (errors.length > 0) {
462
+ const error = new FDKClientValidationError({
463
+ message: "Missing required field",
464
+ details: errors,
711
465
  });
712
- }
713
- if (!templateName) {
714
- invalidInput.push({
715
- message: `The 'templateName' field is required.`,
716
- path: ["templateName"],
717
- });
718
- }
719
- if (invalidInput.length) {
720
- const error = new Error();
721
- error.message = "Missing required field";
722
- error.details = invalidInput;
723
466
  return Promise.reject(new FDKClientValidationError(error));
724
467
  }
725
468