@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
@@ -23,7 +23,7 @@ class FileStorage {
23
23
  *
24
24
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
25
25
  * @param {import("../PlatformAPIClient").Options} - Options
26
- * @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
26
+ * @returns {Promise<FileStoragePlatformModel.FileUploadComplete>} - Success response
27
27
  * @name appCompleteUpload
28
28
  * @summary: Application complete upload.
29
29
  * @description: Finish uploading a file from an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
@@ -83,7 +83,7 @@ class FileStorage {
83
83
 
84
84
  const {
85
85
  error: res_error,
86
- } = FileStoragePlatformModel.CompleteResponse().validate(responseData, {
86
+ } = FileStoragePlatformModel.FileUploadComplete().validate(responseData, {
87
87
  abortEarly: false,
88
88
  allowUnknown: true,
89
89
  });
@@ -102,93 +102,13 @@ class FileStorage {
102
102
  return response;
103
103
  }
104
104
 
105
- /**
106
- * @param {FileStoragePlatformApplicationValidator.AppCopyFilesParam} arg - Arg object
107
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
108
- * @param {import("../PlatformAPIClient").Options} - Options
109
- * @returns {Promise<Object>} - Success response
110
- * @name appCopyFiles
111
- * @summary: Application copy files.
112
- * @description: Copy files from an application to another location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
113
- */
114
- async appCopyFiles(
115
- { body, sync, requestHeaders } = { requestHeaders: {} },
116
- { responseHeaders } = { responseHeaders: false }
117
- ) {
118
- const {
119
- error,
120
- } = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
121
- {
122
- body,
123
- sync,
124
- },
125
- { abortEarly: false, allowUnknown: true }
126
- );
127
- if (error) {
128
- return Promise.reject(new FDKClientValidationError(error));
129
- }
130
-
131
- // Showing warrnings if extra unknown parameters are found
132
- const {
133
- error: warrning,
134
- } = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
135
- {
136
- body,
137
- sync,
138
- },
139
- { abortEarly: false, allowUnknown: false }
140
- );
141
- if (warrning) {
142
- Logger({
143
- level: "WARN",
144
- message: `Parameter Validation warrnings for platform > FileStorage > appCopyFiles \n ${warrning}`,
145
- });
146
- }
147
-
148
- const query_params = {};
149
- query_params["sync"] = sync;
150
-
151
- const response = await PlatformAPIClient.execute(
152
- this.config,
153
- "post",
154
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy`,
155
- query_params,
156
- body,
157
- requestHeaders,
158
- { responseHeaders }
159
- );
160
-
161
- let responseData = response;
162
- if (responseHeaders) {
163
- responseData = response[0];
164
- }
165
-
166
- const { error: res_error } = Joi.any().validate(responseData, {
167
- abortEarly: false,
168
- allowUnknown: true,
169
- });
170
-
171
- if (res_error) {
172
- if (this.config.options.strictResponseCheck === true) {
173
- return Promise.reject(new FDKResponseValidationError(res_error));
174
- } else {
175
- Logger({
176
- level: "WARN",
177
- message: `Response Validation Warnings for platform > FileStorage > appCopyFiles \n ${res_error}`,
178
- });
179
- }
180
- }
181
-
182
- return response;
183
- }
184
-
185
105
  /**
186
106
  * @param {FileStoragePlatformApplicationValidator.AppStartUploadParam} arg
187
107
  * - Arg object
188
108
  *
189
109
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
190
110
  * @param {import("../PlatformAPIClient").Options} - Options
191
- * @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
111
+ * @returns {Promise<FileStoragePlatformModel.FileUpload>} - Success response
192
112
  * @name appStartUpload
193
113
  * @summary: Application start upload.
194
114
  * @description: Start uploading a file from an application and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
@@ -248,7 +168,7 @@ class FileStorage {
248
168
 
249
169
  const {
250
170
  error: res_error,
251
- } = FileStoragePlatformModel.StartResponse().validate(responseData, {
171
+ } = FileStoragePlatformModel.FileUpload().validate(responseData, {
252
172
  abortEarly: false,
253
173
  allowUnknown: true,
254
174
  });
@@ -446,1000 +366,6 @@ class FileStorage {
446
366
 
447
367
  return response;
448
368
  }
449
-
450
- /**
451
- * @param {FileStoragePlatformApplicationValidator.DeletePdfGeneratorConfigParam} arg
452
- * - Arg object
453
- *
454
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
455
- * @param {import("../PlatformAPIClient").Options} - Options
456
- * @returns {Promise<Object>} - Success response
457
- * @name deletePdfGeneratorConfig
458
- * @summary: Delete a PDF generator configuration
459
- * @description: Deletes a specific PDF generator configuration based on the provided id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/deletePdfGeneratorConfig/).
460
- */
461
- async deletePdfGeneratorConfig(
462
- { id, requestHeaders } = { requestHeaders: {} },
463
- { responseHeaders } = { responseHeaders: false }
464
- ) {
465
- const {
466
- error,
467
- } = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate(
468
- {
469
- id,
470
- },
471
- { abortEarly: false, allowUnknown: true }
472
- );
473
- if (error) {
474
- return Promise.reject(new FDKClientValidationError(error));
475
- }
476
-
477
- // Showing warrnings if extra unknown parameters are found
478
- const {
479
- error: warrning,
480
- } = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate(
481
- {
482
- id,
483
- },
484
- { abortEarly: false, allowUnknown: false }
485
- );
486
- if (warrning) {
487
- Logger({
488
- level: "WARN",
489
- message: `Parameter Validation warrnings for platform > FileStorage > deletePdfGeneratorConfig \n ${warrning}`,
490
- });
491
- }
492
-
493
- const query_params = {};
494
-
495
- const response = await PlatformAPIClient.execute(
496
- this.config,
497
- "delete",
498
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
499
- query_params,
500
- undefined,
501
- requestHeaders,
502
- { responseHeaders }
503
- );
504
-
505
- let responseData = response;
506
- if (responseHeaders) {
507
- responseData = response[0];
508
- }
509
-
510
- const { error: res_error } = Joi.any().validate(responseData, {
511
- abortEarly: false,
512
- allowUnknown: true,
513
- });
514
-
515
- if (res_error) {
516
- if (this.config.options.strictResponseCheck === true) {
517
- return Promise.reject(new FDKResponseValidationError(res_error));
518
- } else {
519
- Logger({
520
- level: "WARN",
521
- message: `Response Validation Warnings for platform > FileStorage > deletePdfGeneratorConfig \n ${res_error}`,
522
- });
523
- }
524
- }
525
-
526
- return response;
527
- }
528
-
529
- /**
530
- * @param {FileStoragePlatformApplicationValidator.FetchPdfDefaultTemplateByIdParam} arg
531
- * - Arg object
532
- *
533
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
534
- * @param {import("../PlatformAPIClient").Options} - Options
535
- * @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateResponse>}
536
- * - Success response
537
- *
538
- * @name fetchPdfDefaultTemplateById
539
- * @summary: get default html template for invoice or label
540
- * @description: get default html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfDefaultTemplateById/).
541
- */
542
- async fetchPdfDefaultTemplateById(
543
- { id, requestHeaders } = { requestHeaders: {} },
544
- { responseHeaders } = { responseHeaders: false }
545
- ) {
546
- const {
547
- error,
548
- } = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate(
549
- {
550
- id,
551
- },
552
- { abortEarly: false, allowUnknown: true }
553
- );
554
- if (error) {
555
- return Promise.reject(new FDKClientValidationError(error));
556
- }
557
-
558
- // Showing warrnings if extra unknown parameters are found
559
- const {
560
- error: warrning,
561
- } = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate(
562
- {
563
- id,
564
- },
565
- { abortEarly: false, allowUnknown: false }
566
- );
567
- if (warrning) {
568
- Logger({
569
- level: "WARN",
570
- message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${warrning}`,
571
- });
572
- }
573
-
574
- const query_params = {};
575
-
576
- const response = await PlatformAPIClient.execute(
577
- this.config,
578
- "get",
579
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template/${id}`,
580
- query_params,
581
- undefined,
582
- requestHeaders,
583
- { responseHeaders }
584
- );
585
-
586
- let responseData = response;
587
- if (responseHeaders) {
588
- responseData = response[0];
589
- }
590
-
591
- const {
592
- error: res_error,
593
- } = FileStoragePlatformModel.PdfDefaultTemplateResponse().validate(
594
- responseData,
595
- { abortEarly: false, allowUnknown: true }
596
- );
597
-
598
- if (res_error) {
599
- if (this.config.options.strictResponseCheck === true) {
600
- return Promise.reject(new FDKResponseValidationError(res_error));
601
- } else {
602
- Logger({
603
- level: "WARN",
604
- message: `Response Validation Warnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${res_error}`,
605
- });
606
- }
607
- }
608
-
609
- return response;
610
- }
611
-
612
- /**
613
- * @param {FileStoragePlatformApplicationValidator.FetchPdfTypeByIdParam} arg
614
- * - Arg object
615
- *
616
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
617
- * @param {import("../PlatformAPIClient").Options} - Options
618
- * @returns {Promise<FileStoragePlatformModel.PdfTypeIdResponse>} - Success response
619
- * @name fetchPdfTypeById
620
- * @summary: Get the pdf types of by id
621
- * @description: Get the pdf types of PDF formats for filter - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfTypeById/).
622
- */
623
- async fetchPdfTypeById(
624
- { id, requestHeaders } = { requestHeaders: {} },
625
- { responseHeaders } = { responseHeaders: false }
626
- ) {
627
- const {
628
- error,
629
- } = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate(
630
- {
631
- id,
632
- },
633
- { abortEarly: false, allowUnknown: true }
634
- );
635
- if (error) {
636
- return Promise.reject(new FDKClientValidationError(error));
637
- }
638
-
639
- // Showing warrnings if extra unknown parameters are found
640
- const {
641
- error: warrning,
642
- } = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate(
643
- {
644
- id,
645
- },
646
- { abortEarly: false, allowUnknown: false }
647
- );
648
- if (warrning) {
649
- Logger({
650
- level: "WARN",
651
- message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfTypeById \n ${warrning}`,
652
- });
653
- }
654
-
655
- const query_params = {};
656
-
657
- const response = await PlatformAPIClient.execute(
658
- this.config,
659
- "get",
660
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types/${id}`,
661
- query_params,
662
- undefined,
663
- requestHeaders,
664
- { responseHeaders }
665
- );
666
-
667
- let responseData = response;
668
- if (responseHeaders) {
669
- responseData = response[0];
670
- }
671
-
672
- const {
673
- error: res_error,
674
- } = FileStoragePlatformModel.PdfTypeIdResponse().validate(responseData, {
675
- abortEarly: false,
676
- allowUnknown: true,
677
- });
678
-
679
- if (res_error) {
680
- if (this.config.options.strictResponseCheck === true) {
681
- return Promise.reject(new FDKResponseValidationError(res_error));
682
- } else {
683
- Logger({
684
- level: "WARN",
685
- message: `Response Validation Warnings for platform > FileStorage > fetchPdfTypeById \n ${res_error}`,
686
- });
687
- }
688
- }
689
-
690
- return response;
691
- }
692
-
693
- /**
694
- * @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg
695
- * - Arg object
696
- *
697
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
698
- * @param {import("../PlatformAPIClient").Options} - Options
699
- * @returns {Promise<Object>} - Success response
700
- * @name generatePaymentReceipt
701
- * @summary: Generate payment receipt.
702
- * @description: Generate Payment Receipt for Jiomart Digital - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/generatePaymentReceipt/).
703
- */
704
- async generatePaymentReceipt(
705
- { body, requestHeaders } = { requestHeaders: {} },
706
- { responseHeaders } = { responseHeaders: false }
707
- ) {
708
- const {
709
- error,
710
- } = FileStoragePlatformApplicationValidator.generatePaymentReceipt().validate(
711
- {
712
- body,
713
- },
714
- { abortEarly: false, allowUnknown: true }
715
- );
716
- if (error) {
717
- return Promise.reject(new FDKClientValidationError(error));
718
- }
719
-
720
- // Showing warrnings if extra unknown parameters are found
721
- const {
722
- error: warrning,
723
- } = FileStoragePlatformApplicationValidator.generatePaymentReceipt().validate(
724
- {
725
- body,
726
- },
727
- { abortEarly: false, allowUnknown: false }
728
- );
729
- if (warrning) {
730
- Logger({
731
- level: "WARN",
732
- message: `Parameter Validation warrnings for platform > FileStorage > generatePaymentReceipt \n ${warrning}`,
733
- });
734
- }
735
-
736
- const query_params = {};
737
-
738
- const response = await PlatformAPIClient.execute(
739
- this.config,
740
- "post",
741
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/payment-receipt`,
742
- query_params,
743
- body,
744
- requestHeaders,
745
- { responseHeaders }
746
- );
747
-
748
- let responseData = response;
749
- if (responseHeaders) {
750
- responseData = response[0];
751
- }
752
-
753
- const { error: res_error } = Joi.any().validate(responseData, {
754
- abortEarly: false,
755
- allowUnknown: true,
756
- });
757
-
758
- if (res_error) {
759
- if (this.config.options.strictResponseCheck === true) {
760
- return Promise.reject(new FDKResponseValidationError(res_error));
761
- } else {
762
- Logger({
763
- level: "WARN",
764
- message: `Response Validation Warnings for platform > FileStorage > generatePaymentReceipt \n ${res_error}`,
765
- });
766
- }
767
- }
768
-
769
- return response;
770
- }
771
-
772
- /**
773
- * @param {FileStoragePlatformApplicationValidator.GetConfigHtmlTemplateByIdParam} arg
774
- * - Arg object
775
- *
776
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
777
- * @param {import("../PlatformAPIClient").Options} - Options
778
- * @returns {Promise<Object>} - Success response
779
- * @name getConfigHtmlTemplateById
780
- * @summary: Update html template for invoice or label
781
- * @description: Update html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getConfigHtmlTemplateById/).
782
- */
783
- async getConfigHtmlTemplateById(
784
- { id, requestHeaders } = { requestHeaders: {} },
785
- { responseHeaders } = { responseHeaders: false }
786
- ) {
787
- const {
788
- error,
789
- } = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate(
790
- {
791
- id,
792
- },
793
- { abortEarly: false, allowUnknown: true }
794
- );
795
- if (error) {
796
- return Promise.reject(new FDKClientValidationError(error));
797
- }
798
-
799
- // Showing warrnings if extra unknown parameters are found
800
- const {
801
- error: warrning,
802
- } = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate(
803
- {
804
- id,
805
- },
806
- { abortEarly: false, allowUnknown: false }
807
- );
808
- if (warrning) {
809
- Logger({
810
- level: "WARN",
811
- message: `Parameter Validation warrnings for platform > FileStorage > getConfigHtmlTemplateById \n ${warrning}`,
812
- });
813
- }
814
-
815
- const query_params = {};
816
-
817
- const response = await PlatformAPIClient.execute(
818
- this.config,
819
- "get",
820
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
821
- query_params,
822
- undefined,
823
- requestHeaders,
824
- { responseHeaders }
825
- );
826
-
827
- let responseData = response;
828
- if (responseHeaders) {
829
- responseData = response[0];
830
- }
831
-
832
- const { error: res_error } = Joi.object()
833
- .pattern(/\S/, Joi.any())
834
- .validate(responseData, { abortEarly: false, allowUnknown: true });
835
-
836
- if (res_error) {
837
- if (this.config.options.strictResponseCheck === true) {
838
- return Promise.reject(new FDKResponseValidationError(res_error));
839
- } else {
840
- Logger({
841
- level: "WARN",
842
- message: `Response Validation Warnings for platform > FileStorage > getConfigHtmlTemplateById \n ${res_error}`,
843
- });
844
- }
845
- }
846
-
847
- return response;
848
- }
849
-
850
- /**
851
- * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam} arg
852
- * - Arg object
853
- *
854
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
855
- * @param {import("../PlatformAPIClient").Options} - Options
856
- * @returns {Promise<FileStoragePlatformModel.DummyTemplateDataItems>} -
857
- * Success response
858
- * @name getDefaultPdfData
859
- * @summary: Get default PDF data.
860
- * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
861
- */
862
- async getDefaultPdfData(
863
- { pdfTypeId, countryCode, requestHeaders } = { requestHeaders: {} },
864
- { responseHeaders } = { responseHeaders: false }
865
- ) {
866
- const {
867
- error,
868
- } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
869
- {
870
- pdfTypeId,
871
- countryCode,
872
- },
873
- { abortEarly: false, allowUnknown: true }
874
- );
875
- if (error) {
876
- return Promise.reject(new FDKClientValidationError(error));
877
- }
878
-
879
- // Showing warrnings if extra unknown parameters are found
880
- const {
881
- error: warrning,
882
- } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
883
- {
884
- pdfTypeId,
885
- countryCode,
886
- },
887
- { abortEarly: false, allowUnknown: false }
888
- );
889
- if (warrning) {
890
- Logger({
891
- level: "WARN",
892
- message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfData \n ${warrning}`,
893
- });
894
- }
895
-
896
- const query_params = {};
897
- query_params["pdf_type_id"] = pdfTypeId;
898
- query_params["country_code"] = countryCode;
899
-
900
- const response = await PlatformAPIClient.execute(
901
- this.config,
902
- "get",
903
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper`,
904
- query_params,
905
- undefined,
906
- requestHeaders,
907
- { responseHeaders }
908
- );
909
-
910
- let responseData = response;
911
- if (responseHeaders) {
912
- responseData = response[0];
913
- }
914
-
915
- const {
916
- error: res_error,
917
- } = FileStoragePlatformModel.DummyTemplateDataItems().validate(
918
- responseData,
919
- { abortEarly: false, allowUnknown: true }
920
- );
921
-
922
- if (res_error) {
923
- if (this.config.options.strictResponseCheck === true) {
924
- return Promise.reject(new FDKResponseValidationError(res_error));
925
- } else {
926
- Logger({
927
- level: "WARN",
928
- message: `Response Validation Warnings for platform > FileStorage > getDefaultPdfData \n ${res_error}`,
929
- });
930
- }
931
- }
932
-
933
- return response;
934
- }
935
-
936
- /**
937
- * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam} arg
938
- * - Arg object
939
- *
940
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
941
- * @param {import("../PlatformAPIClient").Options} - Options
942
- * @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateSuccess>} -
943
- * Success response
944
- * @name getDefaultPdfTemplate
945
- * @summary: Get default PDF template.
946
- * @description: Retrieve the default PDF template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
947
- */
948
- async getDefaultPdfTemplate(
949
- { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
950
- { responseHeaders } = { responseHeaders: false }
951
- ) {
952
- const {
953
- error,
954
- } = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
955
- {
956
- pdfTypeId,
957
- format,
958
- countryCode,
959
- },
960
- { abortEarly: false, allowUnknown: true }
961
- );
962
- if (error) {
963
- return Promise.reject(new FDKClientValidationError(error));
964
- }
965
-
966
- // Showing warrnings if extra unknown parameters are found
967
- const {
968
- error: warrning,
969
- } = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
970
- {
971
- pdfTypeId,
972
- format,
973
- countryCode,
974
- },
975
- { abortEarly: false, allowUnknown: false }
976
- );
977
- if (warrning) {
978
- Logger({
979
- level: "WARN",
980
- message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfTemplate \n ${warrning}`,
981
- });
982
- }
983
-
984
- const query_params = {};
985
- query_params["pdf_type_id"] = pdfTypeId;
986
- query_params["format"] = format;
987
- query_params["country_code"] = countryCode;
988
-
989
- const response = await PlatformAPIClient.execute(
990
- this.config,
991
- "get",
992
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template`,
993
- query_params,
994
- undefined,
995
- requestHeaders,
996
- { responseHeaders }
997
- );
998
-
999
- let responseData = response;
1000
- if (responseHeaders) {
1001
- responseData = response[0];
1002
- }
1003
-
1004
- const {
1005
- error: res_error,
1006
- } = FileStoragePlatformModel.PdfDefaultTemplateSuccess().validate(
1007
- responseData,
1008
- { abortEarly: false, allowUnknown: true }
1009
- );
1010
-
1011
- if (res_error) {
1012
- if (this.config.options.strictResponseCheck === true) {
1013
- return Promise.reject(new FDKResponseValidationError(res_error));
1014
- } else {
1015
- Logger({
1016
- level: "WARN",
1017
- message: `Response Validation Warnings for platform > FileStorage > getDefaultPdfTemplate \n ${res_error}`,
1018
- });
1019
- }
1020
- }
1021
-
1022
- return response;
1023
- }
1024
-
1025
- /**
1026
- * @param {FileStoragePlatformApplicationValidator.GetHtmlTemplateConfigParam} arg
1027
- * - Arg object
1028
- *
1029
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1030
- * @param {import("../PlatformAPIClient").Options} - Options
1031
- * @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess>} - Success response
1032
- * @name getHtmlTemplateConfig
1033
- * @summary: Get html template for sales channel
1034
- * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getHtmlTemplateConfig/).
1035
- */
1036
- async getHtmlTemplateConfig(
1037
- { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
1038
- { responseHeaders } = { responseHeaders: false }
1039
- ) {
1040
- const {
1041
- error,
1042
- } = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate(
1043
- {
1044
- pdfTypeId,
1045
- format,
1046
- countryCode,
1047
- },
1048
- { abortEarly: false, allowUnknown: true }
1049
- );
1050
- if (error) {
1051
- return Promise.reject(new FDKClientValidationError(error));
1052
- }
1053
-
1054
- // Showing warrnings if extra unknown parameters are found
1055
- const {
1056
- error: warrning,
1057
- } = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate(
1058
- {
1059
- pdfTypeId,
1060
- format,
1061
- countryCode,
1062
- },
1063
- { abortEarly: false, allowUnknown: false }
1064
- );
1065
- if (warrning) {
1066
- Logger({
1067
- level: "WARN",
1068
- message: `Parameter Validation warrnings for platform > FileStorage > getHtmlTemplateConfig \n ${warrning}`,
1069
- });
1070
- }
1071
-
1072
- const query_params = {};
1073
- query_params["pdf_type_id"] = pdfTypeId;
1074
- query_params["format"] = format;
1075
- query_params["country_code"] = countryCode;
1076
-
1077
- const response = await PlatformAPIClient.execute(
1078
- this.config,
1079
- "get",
1080
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
1081
- query_params,
1082
- undefined,
1083
- requestHeaders,
1084
- { responseHeaders }
1085
- );
1086
-
1087
- let responseData = response;
1088
- if (responseHeaders) {
1089
- responseData = response[0];
1090
- }
1091
-
1092
- const {
1093
- error: res_error,
1094
- } = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, {
1095
- abortEarly: false,
1096
- allowUnknown: true,
1097
- });
1098
-
1099
- if (res_error) {
1100
- if (this.config.options.strictResponseCheck === true) {
1101
- return Promise.reject(new FDKResponseValidationError(res_error));
1102
- } else {
1103
- Logger({
1104
- level: "WARN",
1105
- message: `Response Validation Warnings for platform > FileStorage > getHtmlTemplateConfig \n ${res_error}`,
1106
- });
1107
- }
1108
- }
1109
-
1110
- return response;
1111
- }
1112
-
1113
- /**
1114
- * @param {FileStoragePlatformApplicationValidator.GetPdfPayloadByIdParam} arg
1115
- * - Arg object
1116
- *
1117
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1118
- * @param {import("../PlatformAPIClient").Options} - Options
1119
- * @returns {Promise<FileStoragePlatformModel.DummyPayloadById>} - Success response
1120
- * @name getPdfPayloadById
1121
- * @summary: Get default PDF data.
1122
- * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfPayloadById/).
1123
- */
1124
- async getPdfPayloadById(
1125
- { id, requestHeaders } = { requestHeaders: {} },
1126
- { responseHeaders } = { responseHeaders: false }
1127
- ) {
1128
- const {
1129
- error,
1130
- } = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate(
1131
- {
1132
- id,
1133
- },
1134
- { abortEarly: false, allowUnknown: true }
1135
- );
1136
- if (error) {
1137
- return Promise.reject(new FDKClientValidationError(error));
1138
- }
1139
-
1140
- // Showing warrnings if extra unknown parameters are found
1141
- const {
1142
- error: warrning,
1143
- } = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate(
1144
- {
1145
- id,
1146
- },
1147
- { abortEarly: false, allowUnknown: false }
1148
- );
1149
- if (warrning) {
1150
- Logger({
1151
- level: "WARN",
1152
- message: `Parameter Validation warrnings for platform > FileStorage > getPdfPayloadById \n ${warrning}`,
1153
- });
1154
- }
1155
-
1156
- const query_params = {};
1157
-
1158
- const response = await PlatformAPIClient.execute(
1159
- this.config,
1160
- "get",
1161
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper/${id}`,
1162
- query_params,
1163
- undefined,
1164
- requestHeaders,
1165
- { responseHeaders }
1166
- );
1167
-
1168
- let responseData = response;
1169
- if (responseHeaders) {
1170
- responseData = response[0];
1171
- }
1172
-
1173
- const {
1174
- error: res_error,
1175
- } = FileStoragePlatformModel.DummyPayloadById().validate(responseData, {
1176
- abortEarly: false,
1177
- allowUnknown: true,
1178
- });
1179
-
1180
- if (res_error) {
1181
- if (this.config.options.strictResponseCheck === true) {
1182
- return Promise.reject(new FDKResponseValidationError(res_error));
1183
- } else {
1184
- Logger({
1185
- level: "WARN",
1186
- message: `Response Validation Warnings for platform > FileStorage > getPdfPayloadById \n ${res_error}`,
1187
- });
1188
- }
1189
- }
1190
-
1191
- return response;
1192
- }
1193
-
1194
- /**
1195
- * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object
1196
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1197
- * @param {import("../PlatformAPIClient").Options} - Options
1198
- * @returns {Promise<FileStoragePlatformModel.InvoiceTypesResponse>} -
1199
- * Success response
1200
- * @name getPdfTypes
1201
- * @summary: Get all the supported invoice pdf types
1202
- * @description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
1203
- */
1204
- async getPdfTypes(
1205
- { storeOs, countryCode, requestHeaders } = { requestHeaders: {} },
1206
- { responseHeaders } = { responseHeaders: false }
1207
- ) {
1208
- const {
1209
- error,
1210
- } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
1211
- {
1212
- storeOs,
1213
- countryCode,
1214
- },
1215
- { abortEarly: false, allowUnknown: true }
1216
- );
1217
- if (error) {
1218
- return Promise.reject(new FDKClientValidationError(error));
1219
- }
1220
-
1221
- // Showing warrnings if extra unknown parameters are found
1222
- const {
1223
- error: warrning,
1224
- } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
1225
- {
1226
- storeOs,
1227
- countryCode,
1228
- },
1229
- { abortEarly: false, allowUnknown: false }
1230
- );
1231
- if (warrning) {
1232
- Logger({
1233
- level: "WARN",
1234
- message: `Parameter Validation warrnings for platform > FileStorage > getPdfTypes \n ${warrning}`,
1235
- });
1236
- }
1237
-
1238
- const query_params = {};
1239
- query_params["country_code"] = countryCode;
1240
- query_params["store_os"] = storeOs;
1241
-
1242
- const response = await PlatformAPIClient.execute(
1243
- this.config,
1244
- "get",
1245
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types`,
1246
- query_params,
1247
- undefined,
1248
- requestHeaders,
1249
- { responseHeaders }
1250
- );
1251
-
1252
- let responseData = response;
1253
- if (responseHeaders) {
1254
- responseData = response[0];
1255
- }
1256
-
1257
- const {
1258
- error: res_error,
1259
- } = FileStoragePlatformModel.InvoiceTypesResponse().validate(responseData, {
1260
- abortEarly: false,
1261
- allowUnknown: true,
1262
- });
1263
-
1264
- if (res_error) {
1265
- if (this.config.options.strictResponseCheck === true) {
1266
- return Promise.reject(new FDKResponseValidationError(res_error));
1267
- } else {
1268
- Logger({
1269
- level: "WARN",
1270
- message: `Response Validation Warnings for platform > FileStorage > getPdfTypes \n ${res_error}`,
1271
- });
1272
- }
1273
- }
1274
-
1275
- return response;
1276
- }
1277
-
1278
- /**
1279
- * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg
1280
- * - Arg object
1281
- *
1282
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1283
- * @param {import("../PlatformAPIClient").Options} - Options
1284
- * @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess>} -
1285
- * Success response
1286
- * @name saveHtmlTemplate
1287
- * @summary: Save HTML template.
1288
- * @description: Store an HTML template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/).
1289
- */
1290
- async saveHtmlTemplate(
1291
- { body, requestHeaders } = { requestHeaders: {} },
1292
- { responseHeaders } = { responseHeaders: false }
1293
- ) {
1294
- const {
1295
- error,
1296
- } = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
1297
- {
1298
- body,
1299
- },
1300
- { abortEarly: false, allowUnknown: true }
1301
- );
1302
- if (error) {
1303
- return Promise.reject(new FDKClientValidationError(error));
1304
- }
1305
-
1306
- // Showing warrnings if extra unknown parameters are found
1307
- const {
1308
- error: warrning,
1309
- } = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
1310
- {
1311
- body,
1312
- },
1313
- { abortEarly: false, allowUnknown: false }
1314
- );
1315
- if (warrning) {
1316
- Logger({
1317
- level: "WARN",
1318
- message: `Parameter Validation warrnings for platform > FileStorage > saveHtmlTemplate \n ${warrning}`,
1319
- });
1320
- }
1321
-
1322
- const query_params = {};
1323
-
1324
- const response = await PlatformAPIClient.execute(
1325
- this.config,
1326
- "post",
1327
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
1328
- query_params,
1329
- body,
1330
- requestHeaders,
1331
- { responseHeaders }
1332
- );
1333
-
1334
- let responseData = response;
1335
- if (responseHeaders) {
1336
- responseData = response[0];
1337
- }
1338
-
1339
- const {
1340
- error: res_error,
1341
- } = FileStoragePlatformModel.PdfConfigSaveSuccess().validate(responseData, {
1342
- abortEarly: false,
1343
- allowUnknown: true,
1344
- });
1345
-
1346
- if (res_error) {
1347
- if (this.config.options.strictResponseCheck === true) {
1348
- return Promise.reject(new FDKResponseValidationError(res_error));
1349
- } else {
1350
- Logger({
1351
- level: "WARN",
1352
- message: `Response Validation Warnings for platform > FileStorage > saveHtmlTemplate \n ${res_error}`,
1353
- });
1354
- }
1355
- }
1356
-
1357
- return response;
1358
- }
1359
-
1360
- /**
1361
- * @param {FileStoragePlatformApplicationValidator.UpdateHtmlTemplateParam} arg
1362
- * - Arg object
1363
- *
1364
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1365
- * @param {import("../PlatformAPIClient").Options} - Options
1366
- * @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess>} -
1367
- * Success response
1368
- * @name updateHtmlTemplate
1369
- * @summary: Update HTML Template
1370
- * @description: Update the HTML Template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/updateHtmlTemplate/).
1371
- */
1372
- async updateHtmlTemplate(
1373
- { id, body, requestHeaders } = { requestHeaders: {} },
1374
- { responseHeaders } = { responseHeaders: false }
1375
- ) {
1376
- const {
1377
- error,
1378
- } = FileStoragePlatformApplicationValidator.updateHtmlTemplate().validate(
1379
- {
1380
- id,
1381
- body,
1382
- },
1383
- { abortEarly: false, allowUnknown: true }
1384
- );
1385
- if (error) {
1386
- return Promise.reject(new FDKClientValidationError(error));
1387
- }
1388
-
1389
- // Showing warrnings if extra unknown parameters are found
1390
- const {
1391
- error: warrning,
1392
- } = FileStoragePlatformApplicationValidator.updateHtmlTemplate().validate(
1393
- {
1394
- id,
1395
- body,
1396
- },
1397
- { abortEarly: false, allowUnknown: false }
1398
- );
1399
- if (warrning) {
1400
- Logger({
1401
- level: "WARN",
1402
- message: `Parameter Validation warrnings for platform > FileStorage > updateHtmlTemplate \n ${warrning}`,
1403
- });
1404
- }
1405
-
1406
- const query_params = {};
1407
-
1408
- const response = await PlatformAPIClient.execute(
1409
- this.config,
1410
- "put",
1411
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
1412
- query_params,
1413
- body,
1414
- requestHeaders,
1415
- { responseHeaders }
1416
- );
1417
-
1418
- let responseData = response;
1419
- if (responseHeaders) {
1420
- responseData = response[0];
1421
- }
1422
-
1423
- const {
1424
- error: res_error,
1425
- } = FileStoragePlatformModel.PdfConfigSaveSuccess().validate(responseData, {
1426
- abortEarly: false,
1427
- allowUnknown: true,
1428
- });
1429
-
1430
- if (res_error) {
1431
- if (this.config.options.strictResponseCheck === true) {
1432
- return Promise.reject(new FDKResponseValidationError(res_error));
1433
- } else {
1434
- Logger({
1435
- level: "WARN",
1436
- message: `Response Validation Warnings for platform > FileStorage > updateHtmlTemplate \n ${res_error}`,
1437
- });
1438
- }
1439
- }
1440
-
1441
- return response;
1442
- }
1443
369
  }
1444
370
 
1445
371
  /**