@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  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 +81 -101
  6. package/sdk/application/Cart/CartApplicationClient.js +173 -511
  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 +61 -61
  16. package/sdk/application/Content/ContentApplicationClient.js +183 -366
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  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 +28 -117
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
  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 +10 -54
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
  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 +12 -12
  88. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  90. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
  98. package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
  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 +240 -376
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
  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 +330 -502
  120. package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
  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 -100
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
  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 -31
  128. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
  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 +562 -1289
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
  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 -248
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
  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 +2391 -924
  146. package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
  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 +406 -403
  180. package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
  181. package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
  182. package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
  183. package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
  184. package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
  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 +937 -2452
  191. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
  192. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -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 +1307 -3536
  196. package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
  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 -521
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
  213. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
  214. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
  215. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
  216. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
  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 -9
  222. package/sdk/platform/Share/SharePlatformModel.js +45 -5
  223. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
  224. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
  225. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
  226. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
  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 -0
  272. package/sdk/public/PublicClient.js +4 -0
  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 -0
  280. package/sdk/public/index.js +2 -0
  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
@@ -6,29 +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}",
19
+ getCourierPartners:
20
+ "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",
20
21
  getDeliveryPromise:
21
22
  "/service/application/logistics/v1.0/delivery-promise",
22
- getGeoAreas:
23
- "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/geoareas",
24
23
  getLocalities:
25
24
  "/service/application/logistics/v1.0/localities/{locality_type}",
26
- getLocalitiesByPrefix: "/service/application/logistics/v1.0/localities",
27
25
  getLocality:
28
26
  "/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",
29
27
  getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
30
- getZones:
31
- "/service/application/logistics/v2.0/company/{company_id}/application/{application_id}/zones",
32
28
  validateAddress:
33
29
  "/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate",
34
30
  };
@@ -51,65 +47,7 @@ class Logistic {
51
47
  /**
52
48
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
53
49
  * @param {import("../ApplicationAPIClient").Options} - Options
54
- * @returns {Promise<GenerateShipmentsAndCourierPartnerResponse>} - Success response
55
- * @name createShipments
56
- * @summary: Create and return shipments.
57
- * @description: Create and return shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/createShipments/).
58
- */
59
- async createShipments(
60
- { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
61
- { responseHeaders } = { responseHeaders: false }
62
- ) {
63
- let invalidInput = [];
64
-
65
- if (!companyId) {
66
- invalidInput.push({
67
- message: `The 'companyId' field is required.`,
68
- path: ["companyId"],
69
- });
70
- }
71
- if (!applicationId) {
72
- invalidInput.push({
73
- message: `The 'applicationId' field is required.`,
74
- path: ["applicationId"],
75
- });
76
- }
77
- if (invalidInput.length) {
78
- const error = new Error();
79
- error.message = "Missing required field";
80
- error.details = invalidInput;
81
- return Promise.reject(new FDKClientValidationError(error));
82
- }
83
-
84
- const query_params = {};
85
-
86
- const xHeaders = {};
87
-
88
- const response = await ApplicationAPIClient.execute(
89
- this._conf,
90
- "post",
91
- constructUrl({
92
- url: this._urls["createShipments"],
93
- params: { companyId, applicationId },
94
- }),
95
- query_params,
96
- body,
97
- { ...xHeaders, ...requestHeaders },
98
- { responseHeaders }
99
- );
100
-
101
- let responseData = response;
102
- if (responseHeaders) {
103
- responseData = response[0];
104
- }
105
-
106
- return response;
107
- }
108
-
109
- /**
110
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
111
- * @param {import("../ApplicationAPIClient").Options} - Options
112
- * @returns {Promise<CountryListResponse>} - Success response
50
+ * @returns {Promise<CountryResult>} - Success response
113
51
  * @name getAllCountries
114
52
  * @summary: Get deliverable countries
115
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/).
@@ -118,14 +56,6 @@ class Logistic {
118
56
  { requestHeaders } = { requestHeaders: {} },
119
57
  { responseHeaders } = { responseHeaders: false }
120
58
  ) {
121
- let invalidInput = [];
122
- if (invalidInput.length) {
123
- const error = new Error();
124
- error.message = "Missing required field";
125
- error.details = invalidInput;
126
- return Promise.reject(new FDKClientValidationError(error));
127
- }
128
-
129
59
  const query_params = {};
130
60
 
131
61
  const xHeaders = {};
@@ -156,29 +86,28 @@ class Logistic {
156
86
  * @param {import("../ApplicationAPIClient").Options} - Options
157
87
  * @returns {Promise<GetCountries>} - Success response
158
88
  * @name getCountries
159
- * @summary: Get all countries and associated data.
160
- * @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/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/).
161
91
  */
162
92
  async getCountries(
163
- { onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
164
- requestHeaders: {},
165
- },
93
+ {
94
+ onboarding,
95
+ pageNo,
96
+ pageSize,
97
+ q,
98
+ hierarchy,
99
+ phoneCode,
100
+ requestHeaders,
101
+ } = { requestHeaders: {} },
166
102
  { responseHeaders } = { responseHeaders: false }
167
103
  ) {
168
- let invalidInput = [];
169
- if (invalidInput.length) {
170
- const error = new Error();
171
- error.message = "Missing required field";
172
- error.details = invalidInput;
173
- return Promise.reject(new FDKClientValidationError(error));
174
- }
175
-
176
104
  const query_params = {};
177
- query_params["onboard"] = onboard;
105
+ query_params["onboarding"] = onboarding;
178
106
  query_params["page_no"] = pageNo;
179
107
  query_params["page_size"] = pageSize;
180
108
  query_params["q"] = q;
181
109
  query_params["hierarchy"] = hierarchy;
110
+ query_params["phone_code"] = phoneCode;
182
111
 
183
112
  const xHeaders = {};
184
113
 
@@ -203,43 +132,6 @@ class Logistic {
203
132
  return response;
204
133
  }
205
134
 
206
- /**
207
- * @param {Object} arg - Arg object.
208
- * @param {boolean} [arg.onboard] - Only fetch countries which allowed for
209
- * onboard on Platform.
210
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
211
- * page. Default value is 12
212
- * @param {string} [arg.q] - The search string to search in the list of
213
- * countries by name.
214
- * @param {string} [arg.hierarchy] - The search filter to filter countries
215
- * based on their available hierarchy.
216
- * @returns {Paginator<GetCountries>}
217
- * @summary: Get all countries and associated data.
218
- * @description: Retrieve a list of countries for logistical purposes.
219
- */
220
- getCountriesPaginator({ onboard, pageSize, q, hierarchy } = {}) {
221
- const paginator = new Paginator();
222
- const callback = async () => {
223
- const pageId = paginator.nextId;
224
- const pageNo = paginator.pageNo;
225
- const pageType = "number";
226
- const data = await this.getCountries({
227
- onboard: onboard,
228
- pageNo: pageNo,
229
- pageSize: pageSize,
230
- q: q,
231
- hierarchy: hierarchy,
232
- });
233
- paginator.setPaginator({
234
- hasNext: data.page.has_next ? true : false,
235
- nextId: data.page.next_id,
236
- });
237
- return data;
238
- };
239
- paginator.setCallback(callback.bind(this));
240
- return paginator;
241
- }
242
-
243
135
  /**
244
136
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
245
137
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -252,18 +144,12 @@ class Logistic {
252
144
  { countryIsoCode, requestHeaders } = { requestHeaders: {} },
253
145
  { responseHeaders } = { responseHeaders: false }
254
146
  ) {
255
- let invalidInput = [];
256
-
257
- if (!countryIsoCode) {
258
- invalidInput.push({
259
- message: `The 'countryIsoCode' field is required.`,
260
- path: ["countryIsoCode"],
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,
261
152
  });
262
- }
263
- if (invalidInput.length) {
264
- const error = new Error();
265
- error.message = "Missing required field";
266
- error.details = invalidInput;
267
153
  return Promise.reject(new FDKClientValidationError(error));
268
154
  }
269
155
 
@@ -295,38 +181,40 @@ class Logistic {
295
181
  /**
296
182
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
297
183
  * @param {import("../ApplicationAPIClient").Options} - Options
298
- * @returns {Promise<GetPromiseDetails>} - Success response
299
- * @name getDeliveryPromise
300
- * @summary: Get delivery promise
301
- * @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/).
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/).
302
188
  */
303
- async getDeliveryPromise(
304
- { pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
189
+ async getCourierPartners(
190
+ { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
305
191
  { responseHeaders } = { responseHeaders: false }
306
192
  ) {
307
- let invalidInput = [];
308
- if (invalidInput.length) {
309
- const error = new Error();
310
- error.message = "Missing required field";
311
- error.details = invalidInput;
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,
201
+ });
312
202
  return Promise.reject(new FDKClientValidationError(error));
313
203
  }
314
204
 
315
205
  const query_params = {};
316
- query_params["page_no"] = pageNo;
317
- query_params["page_size"] = pageSize;
318
206
 
319
207
  const xHeaders = {};
320
208
 
321
209
  const response = await ApplicationAPIClient.execute(
322
210
  this._conf,
323
- "get",
211
+ "post",
324
212
  constructUrl({
325
- url: this._urls["getDeliveryPromise"],
326
- params: {},
213
+ url: this._urls["getCourierPartners"],
214
+ params: { companyId, applicationId },
327
215
  }),
328
216
  query_params,
329
- undefined,
217
+ body,
330
218
  { ...xHeaders, ...requestHeaders },
331
219
  { responseHeaders }
332
220
  );
@@ -342,70 +230,31 @@ class Logistic {
342
230
  /**
343
231
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
344
232
  * @param {import("../ApplicationAPIClient").Options} - Options
345
- * @returns {Promise<GeoAreaGetResponseBody>} - Success response
346
- * @name getGeoAreas
347
- * @summary: Get all geoareas in the current application.
348
- * @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/).
349
237
  */
350
- async getGeoAreas(
351
- {
352
- applicationId,
353
- companyId,
354
- pageSize,
355
- pageNo,
356
- type,
357
- isActive,
358
- q,
359
- countryIsoCode,
360
- state,
361
- city,
362
- pincode,
363
- sector,
364
- requestHeaders,
365
- } = { requestHeaders: {} },
238
+ async getDeliveryPromise(
239
+ { xLocationDetail, xApplicationData, pageNo, pageSize, requestHeaders } = {
240
+ requestHeaders: {},
241
+ },
366
242
  { responseHeaders } = { responseHeaders: false }
367
243
  ) {
368
- let invalidInput = [];
369
-
370
- if (!applicationId) {
371
- invalidInput.push({
372
- message: `The 'applicationId' field is required.`,
373
- path: ["applicationId"],
374
- });
375
- }
376
- if (!companyId) {
377
- invalidInput.push({
378
- message: `The 'companyId' field is required.`,
379
- path: ["companyId"],
380
- });
381
- }
382
- if (invalidInput.length) {
383
- const error = new Error();
384
- error.message = "Missing required field";
385
- error.details = invalidInput;
386
- return Promise.reject(new FDKClientValidationError(error));
387
- }
388
-
389
244
  const query_params = {};
390
- query_params["page_size"] = pageSize;
391
245
  query_params["page_no"] = pageNo;
392
- query_params["type"] = type;
393
- query_params["is_active"] = isActive;
394
- query_params["q"] = q;
395
- query_params["country_iso_code"] = countryIsoCode;
396
- query_params["state"] = state;
397
- query_params["city"] = city;
398
- query_params["pincode"] = pincode;
399
- query_params["sector"] = sector;
246
+ query_params["page_size"] = pageSize;
400
247
 
401
248
  const xHeaders = {};
249
+ xHeaders["x-location-detail"] = xLocationDetail;
250
+ xHeaders["x-application-data"] = xApplicationData;
402
251
 
403
252
  const response = await ApplicationAPIClient.execute(
404
253
  this._conf,
405
254
  "get",
406
255
  constructUrl({
407
- url: this._urls["getGeoAreas"],
408
- params: { applicationId, companyId },
256
+ url: this._urls["getDeliveryPromise"],
257
+ params: {},
409
258
  }),
410
259
  query_params,
411
260
  undefined,
@@ -424,10 +273,10 @@ class Logistic {
424
273
  /**
425
274
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
426
275
  * @param {import("../ApplicationAPIClient").Options} - Options
427
- * @returns {Promise<GetLocalities>} - Success response
276
+ * @returns {Promise<GetLocalitiesApp>} - Success response
428
277
  * @name getLocalities
429
278
  * @summary: Get Localities
430
- * @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/).
431
280
  */
432
281
  async getLocalities(
433
282
  {
@@ -438,23 +287,17 @@ class Logistic {
438
287
  pageNo,
439
288
  pageSize,
440
289
  q,
441
- name,
290
+ sector,
442
291
  requestHeaders,
443
292
  } = { requestHeaders: {} },
444
293
  { responseHeaders } = { responseHeaders: false }
445
294
  ) {
446
- let invalidInput = [];
447
-
448
- if (!localityType) {
449
- invalidInput.push({
450
- message: `The 'localityType' field is required.`,
451
- 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,
452
300
  });
453
- }
454
- if (invalidInput.length) {
455
- const error = new Error();
456
- error.message = "Missing required field";
457
- error.details = invalidInput;
458
301
  return Promise.reject(new FDKClientValidationError(error));
459
302
  }
460
303
 
@@ -465,7 +308,7 @@ class Logistic {
465
308
  query_params["page_no"] = pageNo;
466
309
  query_params["page_size"] = pageSize;
467
310
  query_params["q"] = q;
468
- query_params["name"] = name;
311
+ query_params["sector"] = sector;
469
312
 
470
313
  const xHeaders = {};
471
314
 
@@ -490,173 +333,35 @@ class Logistic {
490
333
  return response;
491
334
  }
492
335
 
493
- /**
494
- * @param {Object} arg - Arg object.
495
- * @param {string} arg.localityType - Unique geographical division.
496
- * @param {string} [arg.country] - Country name.
497
- * @param {string} [arg.state] - State or the province.
498
- * @param {string} [arg.city] - City.
499
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
500
- * page. Default value is 12.
501
- * @param {string} [arg.q] - This parameter is used to filter or search the records.
502
- * @param {string} [arg.name] - Search for localities. Either provide a full
503
- * name or a search term.
504
- * @returns {Paginator<GetLocalities>}
505
- * @summary: Get Localities
506
- * @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.
507
- */
508
- getLocalitiesPaginator({
509
- localityType,
510
- country,
511
- state,
512
- city,
513
- pageSize,
514
- q,
515
- name,
516
- } = {}) {
517
- const paginator = new Paginator();
518
- const callback = async () => {
519
- const pageId = paginator.nextId;
520
- const pageNo = paginator.pageNo;
521
- const pageType = "number";
522
- const data = await this.getLocalities({
523
- localityType: localityType,
524
- country: country,
525
- state: state,
526
- city: city,
527
- pageNo: pageNo,
528
- pageSize: pageSize,
529
- q: q,
530
- name: name,
531
- });
532
- paginator.setPaginator({
533
- hasNext: data.page.has_next ? true : false,
534
- nextId: data.page.next_id,
535
- });
536
- return data;
537
- };
538
- paginator.setCallback(callback.bind(this));
539
- return paginator;
540
- }
541
-
542
- /**
543
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
544
- * @param {import("../ApplicationAPIClient").Options} - Options
545
- * @returns {Promise<GetLocalities>} - Success response
546
- * @name getLocalitiesByPrefix
547
- * @summary: Get Localities by Name Prefix
548
- * @description: Get localities that start with a specified prefix. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalitiesByPrefix/).
549
- */
550
- async getLocalitiesByPrefix(
551
- { companyId, pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
552
- { responseHeaders } = { responseHeaders: false }
553
- ) {
554
- let invalidInput = [];
555
-
556
- if (!companyId) {
557
- invalidInput.push({
558
- message: `The 'companyId' field is required.`,
559
- path: ["companyId"],
560
- });
561
- }
562
- if (invalidInput.length) {
563
- const error = new Error();
564
- error.message = "Missing required field";
565
- error.details = invalidInput;
566
- return Promise.reject(new FDKClientValidationError(error));
567
- }
568
-
569
- const query_params = {};
570
- query_params["page_no"] = pageNo;
571
- query_params["page_size"] = pageSize;
572
- query_params["q"] = q;
573
-
574
- const xHeaders = {};
575
-
576
- const response = await ApplicationAPIClient.execute(
577
- this._conf,
578
- "get",
579
- constructUrl({
580
- url: this._urls["getLocalitiesByPrefix"],
581
- params: { companyId },
582
- }),
583
- query_params,
584
- undefined,
585
- { ...xHeaders, ...requestHeaders },
586
- { responseHeaders }
587
- );
588
-
589
- let responseData = response;
590
- if (responseHeaders) {
591
- responseData = response[0];
592
- }
593
-
594
- return response;
595
- }
596
-
597
- /**
598
- * @param {Object} arg - Arg object.
599
- * @param {number} arg.companyId - The unique identifier of the company.
600
- * @param {number} [arg.pageSize] - Number of items per page.
601
- * @param {string} [arg.q] - Localities starting with the specified prefix.
602
- * @returns {Paginator<GetLocalities>}
603
- * @summary: Get Localities by Name Prefix
604
- * @description: Get localities that start with a specified prefix.
605
- */
606
- getLocalitiesByPrefixPaginator({ companyId, pageSize, q } = {}) {
607
- const paginator = new Paginator();
608
- const callback = async () => {
609
- const pageId = paginator.nextId;
610
- const pageNo = paginator.pageNo;
611
- const pageType = "number";
612
- const data = await this.getLocalitiesByPrefix({
613
- companyId: companyId,
614
- pageNo: pageNo,
615
- pageSize: pageSize,
616
- q: q,
617
- });
618
- paginator.setPaginator({
619
- hasNext: data.page.has_next ? true : false,
620
- nextId: data.page.next_id,
621
- });
622
- return data;
623
- };
624
- paginator.setCallback(callback.bind(this));
625
- return paginator;
626
- }
627
-
628
336
  /**
629
337
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
630
338
  * @param {import("../ApplicationAPIClient").Options} - Options
631
- * @returns {Promise<GetLocality>} - Success response
339
+ * @returns {Promise<GetLocalityApp>} - Success response
632
340
  * @name getLocality
633
- * @summary: Get locality detail
341
+ * @summary: Get Locality API
634
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/).
635
343
  */
636
344
  async getLocality(
637
- { localityType, localityValue, country, state, city, requestHeaders } = {
638
- requestHeaders: {},
639
- },
345
+ {
346
+ localityType,
347
+ localityValue,
348
+ country,
349
+ state,
350
+ city,
351
+ sector,
352
+ requestHeaders,
353
+ } = { requestHeaders: {} },
640
354
  { responseHeaders } = { responseHeaders: false }
641
355
  ) {
642
- let invalidInput = [];
643
-
644
- if (!localityType) {
645
- invalidInput.push({
646
- message: `The 'localityType' field is required.`,
647
- path: ["localityType"],
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,
648
364
  });
649
- }
650
- if (!localityValue) {
651
- invalidInput.push({
652
- message: `The 'localityValue' field is required.`,
653
- path: ["localityValue"],
654
- });
655
- }
656
- if (invalidInput.length) {
657
- const error = new Error();
658
- error.message = "Missing required field";
659
- error.details = invalidInput;
660
365
  return Promise.reject(new FDKClientValidationError(error));
661
366
  }
662
367
 
@@ -664,6 +369,7 @@ class Logistic {
664
369
  query_params["country"] = country;
665
370
  query_params["state"] = state;
666
371
  query_params["city"] = city;
372
+ query_params["sector"] = sector;
667
373
 
668
374
  const xHeaders = {};
669
375
 
@@ -691,27 +397,21 @@ class Logistic {
691
397
  /**
692
398
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
693
399
  * @param {import("../ApplicationAPIClient").Options} - Options
694
- * @returns {Promise<PincodeApiResponse>} - Success response
400
+ * @returns {Promise<PincodeDetailsResult>} - Success response
695
401
  * @name getPincodeCity
696
- * @summary: Get Pincode API
402
+ * @summary: Get pincode details
697
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/).
698
404
  */
699
405
  async getPincodeCity(
700
406
  { pincode, requestHeaders } = { requestHeaders: {} },
701
407
  { responseHeaders } = { responseHeaders: false }
702
408
  ) {
703
- let invalidInput = [];
704
-
705
- if (!pincode) {
706
- invalidInput.push({
707
- message: `The 'pincode' field is required.`,
708
- 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,
709
414
  });
710
- }
711
- if (invalidInput.length) {
712
- const error = new Error();
713
- error.message = "Missing required field";
714
- error.details = invalidInput;
715
415
  return Promise.reject(new FDKClientValidationError(error));
716
416
  }
717
417
 
@@ -743,91 +443,7 @@ class Logistic {
743
443
  /**
744
444
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
745
445
  * @param {import("../ApplicationAPIClient").Options} - Options
746
- * @returns {Promise<ListViewResponseV2>} - Success response
747
- * @name getZones
748
- * @summary: Shows zones defined at the application level
749
- * @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/).
750
- */
751
- async getZones(
752
- {
753
- companyId,
754
- applicationId,
755
- stage,
756
- type,
757
- pageSize,
758
- pageNo,
759
- isActive,
760
- q,
761
- countryIsoCode,
762
- pincode,
763
- state,
764
- city,
765
- sector,
766
- requestHeaders,
767
- } = { requestHeaders: {} },
768
- { responseHeaders } = { responseHeaders: false }
769
- ) {
770
- let invalidInput = [];
771
-
772
- if (!companyId) {
773
- invalidInput.push({
774
- message: `The 'companyId' field is required.`,
775
- path: ["companyId"],
776
- });
777
- }
778
- if (!applicationId) {
779
- invalidInput.push({
780
- message: `The 'applicationId' field is required.`,
781
- path: ["applicationId"],
782
- });
783
- }
784
- if (invalidInput.length) {
785
- const error = new Error();
786
- error.message = "Missing required field";
787
- error.details = invalidInput;
788
- return Promise.reject(new FDKClientValidationError(error));
789
- }
790
-
791
- const query_params = {};
792
- query_params["stage"] = stage;
793
- query_params["type"] = type;
794
- query_params["page_size"] = pageSize;
795
- query_params["page_no"] = pageNo;
796
- query_params["is_active"] = isActive;
797
- query_params["q"] = q;
798
- query_params["country_iso_code"] = countryIsoCode;
799
- query_params["pincode"] = pincode;
800
- query_params["state"] = state;
801
- query_params["city"] = city;
802
- query_params["sector"] = sector;
803
-
804
- const xHeaders = {};
805
-
806
- const response = await ApplicationAPIClient.execute(
807
- this._conf,
808
- "get",
809
- constructUrl({
810
- url: this._urls["getZones"],
811
- params: { companyId, applicationId },
812
- }),
813
- query_params,
814
- undefined,
815
- { ...xHeaders, ...requestHeaders },
816
- { responseHeaders }
817
- );
818
-
819
- let responseData = response;
820
- if (responseHeaders) {
821
- responseData = response[0];
822
- }
823
-
824
- return response;
825
- }
826
-
827
- /**
828
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
829
- * @param {import("../ApplicationAPIClient").Options} - Options
830
- * @returns {Promise<ValidateAddressRequest>} - Success response
446
+ * @returns {Promise<ValidateAddressDetails>} - Success response
831
447
  * @name validateAddress
832
448
  * @summary: Validate address
833
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/).
@@ -838,24 +454,15 @@ class Logistic {
838
454
  },
839
455
  { responseHeaders } = { responseHeaders: false }
840
456
  ) {
841
- let invalidInput = [];
842
-
843
- if (!countryIsoCode) {
844
- invalidInput.push({
845
- message: `The 'countryIsoCode' field is required.`,
846
- 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,
847
465
  });
848
- }
849
- if (!templateName) {
850
- invalidInput.push({
851
- message: `The 'templateName' field is required.`,
852
- path: ["templateName"],
853
- });
854
- }
855
- if (invalidInput.length) {
856
- const error = new Error();
857
- error.message = "Missing required field";
858
- error.details = invalidInput;
859
466
  return Promise.reject(new FDKClientValidationError(error));
860
467
  }
861
468