@gofynd/fdk-client-javascript 1.1.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const FileStorageValidator = require("./FileStoragePlatformApplicationValidator");
5
- const FileStorageModel = require("./FileStoragePlatformModel");
4
+ const FileStoragePlatformApplicationValidator = require("./FileStoragePlatformApplicationValidator");
5
+ const FileStoragePlatformModel = require("./FileStoragePlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -15,13 +15,13 @@ class FileStorage {
15
15
  }
16
16
 
17
17
  /**
18
- * @param {Object} arg - Arg object.
19
- * @param {string} arg.namespace - Segregation of different types of
20
- * files(products, orders, logistics etc), Required for validating the
21
- * data of the file being uploaded, decides where exactly the file will be
22
- * stored inside the storage bucket.
23
- * @param {StartResponse} arg.body
24
- * @returns {Promise<CompleteResponse>} - Success response
18
+ * @param {FileStoragePlatformApplicationValidator.AppCompleteUploadParam} arg
19
+ * - Arg object
20
+ *
21
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
22
+ * @param {import("../PlatformAPIClient").Options} - Options
23
+ * @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
24
+ * @name appCompleteUpload
25
25
  * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
26
26
  * @description: Uploads an arbitrarily sized buffer or blob.
27
27
  *
@@ -41,13 +41,15 @@ class FileStorage {
41
41
  * ### Complete
42
42
  * After successfully upload, call `appCompleteUpload` api to complete the upload process.
43
43
  * This operation will return the url for the uploaded file.
44
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
44
45
  */
45
- async appCompleteUpload({
46
- namespace,
47
-
48
- body,
49
- } = {}) {
50
- const { error } = FileStorageValidator.appCompleteUpload().validate(
46
+ async appCompleteUpload(
47
+ { namespace, body, requestHeaders } = { requestHeaders: {} },
48
+ { responseHeaders } = { responseHeaders: false }
49
+ ) {
50
+ const {
51
+ error,
52
+ } = FileStoragePlatformApplicationValidator.appCompleteUpload().validate(
51
53
  {
52
54
  namespace,
53
55
 
@@ -62,7 +64,7 @@ class FileStorage {
62
64
  // Showing warrnings if extra unknown parameters are found
63
65
  const {
64
66
  error: warrning,
65
- } = FileStorageValidator.appCompleteUpload().validate(
67
+ } = FileStoragePlatformApplicationValidator.appCompleteUpload().validate(
66
68
  {
67
69
  namespace,
68
70
 
@@ -73,9 +75,8 @@ class FileStorage {
73
75
  if (warrning) {
74
76
  Logger({
75
77
  level: "WARN",
76
- message: "Parameter Validation warrnings for appCompleteUpload",
78
+ message: `Parameter Validation warrnings for platform > FileStorage > appCompleteUpload \n ${warrning}`,
77
79
  });
78
- Logger({ level: "WARN", message: warrning });
79
80
  }
80
81
 
81
82
  const query_params = {};
@@ -83,14 +84,21 @@ class FileStorage {
83
84
  const response = await PlatformAPIClient.execute(
84
85
  this.config,
85
86
  "post",
86
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete/`,
87
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`,
87
88
  query_params,
88
- body
89
+ body,
90
+ requestHeaders,
91
+ { responseHeaders }
89
92
  );
90
93
 
94
+ let responseData = response;
95
+ if (responseHeaders) {
96
+ responseData = response[0];
97
+ }
98
+
91
99
  const {
92
100
  error: res_error,
93
- } = FileStorageModel.CompleteResponse().validate(response, {
101
+ } = FileStoragePlatformModel.CompleteResponse().validate(responseData, {
94
102
  abortEarly: false,
95
103
  allowUnknown: false,
96
104
  });
@@ -98,24 +106,29 @@ class FileStorage {
98
106
  if (res_error) {
99
107
  Logger({
100
108
  level: "WARN",
101
- message: "Response Validation Warnnings for appCompleteUpload",
109
+ message: `Response Validation Warnnings for platform > FileStorage > appCompleteUpload \n ${res_error}`,
102
110
  });
103
- Logger({ level: "WARN", message: res_error });
104
111
  }
105
112
 
106
113
  return response;
107
114
  }
108
115
 
109
116
  /**
110
- * @param {Object} arg - Arg object.
111
- * @param {boolean} [arg.sync] - Sync
112
- * @param {BulkRequest} arg.body
113
- * @returns {Promise<BulkUploadResponse>} - Success response
117
+ * @param {FileStoragePlatformApplicationValidator.AppCopyFilesParam} arg - Arg object
118
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
119
+ * @param {import("../PlatformAPIClient").Options} - Options
120
+ * @returns {Promise<FileStoragePlatformModel.BulkUploadSyncMode>} - Success response
121
+ * @name appCopyFiles
114
122
  * @summary: Copy Files
115
- * @description: Copy Files
123
+ * @description: Copy Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
116
124
  */
117
- async appCopyFiles({ body, sync } = {}) {
118
- const { error } = FileStorageValidator.appCopyFiles().validate(
125
+ async appCopyFiles(
126
+ { body, sync, requestHeaders } = { requestHeaders: {} },
127
+ { responseHeaders } = { responseHeaders: false }
128
+ ) {
129
+ const {
130
+ error,
131
+ } = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
119
132
  {
120
133
  body,
121
134
  sync,
@@ -127,7 +140,9 @@ class FileStorage {
127
140
  }
128
141
 
129
142
  // Showing warrnings if extra unknown parameters are found
130
- const { error: warrning } = FileStorageValidator.appCopyFiles().validate(
143
+ const {
144
+ error: warrning,
145
+ } = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
131
146
  {
132
147
  body,
133
148
  sync,
@@ -137,9 +152,8 @@ class FileStorage {
137
152
  if (warrning) {
138
153
  Logger({
139
154
  level: "WARN",
140
- message: "Parameter Validation warrnings for appCopyFiles",
155
+ message: `Parameter Validation warrnings for platform > FileStorage > appCopyFiles \n ${warrning}`,
141
156
  });
142
- Logger({ level: "WARN", message: warrning });
143
157
  }
144
158
 
145
159
  const query_params = {};
@@ -148,14 +162,21 @@ class FileStorage {
148
162
  const response = await PlatformAPIClient.execute(
149
163
  this.config,
150
164
  "post",
151
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy/`,
165
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy`,
152
166
  query_params,
153
- body
167
+ body,
168
+ requestHeaders,
169
+ { responseHeaders }
154
170
  );
155
171
 
172
+ let responseData = response;
173
+ if (responseHeaders) {
174
+ responseData = response[0];
175
+ }
176
+
156
177
  const {
157
178
  error: res_error,
158
- } = FileStorageModel.BulkUploadResponse().validate(response, {
179
+ } = FileStoragePlatformModel.BulkUploadSyncMode().validate(responseData, {
159
180
  abortEarly: false,
160
181
  allowUnknown: false,
161
182
  });
@@ -163,22 +184,21 @@ class FileStorage {
163
184
  if (res_error) {
164
185
  Logger({
165
186
  level: "WARN",
166
- message: "Response Validation Warnnings for appCopyFiles",
187
+ message: `Response Validation Warnnings for platform > FileStorage > appCopyFiles \n ${res_error}`,
167
188
  });
168
- Logger({ level: "WARN", message: res_error });
169
189
  }
170
190
 
171
191
  return response;
172
192
  }
173
193
 
174
194
  /**
175
- * @param {Object} arg - Arg object.
176
- * @param {string} arg.namespace - Segregation of different types of
177
- * files(products, orders, logistics etc), Required for validating the
178
- * data of the file being uploaded, decides where exactly the file will be
179
- * stored inside the storage bucket.
180
- * @param {StartRequest} arg.body
181
- * @returns {Promise<StartResponse>} - Success response
195
+ * @param {FileStoragePlatformApplicationValidator.AppStartUploadParam} arg
196
+ * - Arg object
197
+ *
198
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
199
+ * @param {import("../PlatformAPIClient").Options} - Options
200
+ * @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
201
+ * @name appStartUpload
182
202
  * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
183
203
  * @description: Uploads an arbitrarily sized buffer or blob.
184
204
  *
@@ -198,13 +218,15 @@ class FileStorage {
198
218
  * ### Complete
199
219
  * After successfully upload, call `appCompleteUpload` api to complete the upload process.
200
220
  * This operation will return the url for the uploaded file.
221
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
201
222
  */
202
- async appStartUpload({
203
- namespace,
204
-
205
- body,
206
- } = {}) {
207
- const { error } = FileStorageValidator.appStartUpload().validate(
223
+ async appStartUpload(
224
+ { namespace, body, requestHeaders } = { requestHeaders: {} },
225
+ { responseHeaders } = { responseHeaders: false }
226
+ ) {
227
+ const {
228
+ error,
229
+ } = FileStoragePlatformApplicationValidator.appStartUpload().validate(
208
230
  {
209
231
  namespace,
210
232
 
@@ -217,7 +239,9 @@ class FileStorage {
217
239
  }
218
240
 
219
241
  // Showing warrnings if extra unknown parameters are found
220
- const { error: warrning } = FileStorageValidator.appStartUpload().validate(
242
+ const {
243
+ error: warrning,
244
+ } = FileStoragePlatformApplicationValidator.appStartUpload().validate(
221
245
  {
222
246
  namespace,
223
247
 
@@ -228,9 +252,8 @@ class FileStorage {
228
252
  if (warrning) {
229
253
  Logger({
230
254
  level: "WARN",
231
- message: "Parameter Validation warrnings for appStartUpload",
255
+ message: `Parameter Validation warrnings for platform > FileStorage > appStartUpload \n ${warrning}`,
232
256
  });
233
- Logger({ level: "WARN", message: warrning });
234
257
  }
235
258
 
236
259
  const query_params = {};
@@ -238,14 +261,21 @@ class FileStorage {
238
261
  const response = await PlatformAPIClient.execute(
239
262
  this.config,
240
263
  "post",
241
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start/`,
264
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`,
242
265
  query_params,
243
- body
266
+ body,
267
+ requestHeaders,
268
+ { responseHeaders }
244
269
  );
245
270
 
271
+ let responseData = response;
272
+ if (responseHeaders) {
273
+ responseData = response[0];
274
+ }
275
+
246
276
  const {
247
277
  error: res_error,
248
- } = FileStorageModel.StartResponse().validate(response, {
278
+ } = FileStoragePlatformModel.StartResponse().validate(responseData, {
249
279
  abortEarly: false,
250
280
  allowUnknown: false,
251
281
  });
@@ -253,32 +283,34 @@ class FileStorage {
253
283
  if (res_error) {
254
284
  Logger({
255
285
  level: "WARN",
256
- message: "Response Validation Warnnings for appStartUpload",
286
+ message: `Response Validation Warnnings for platform > FileStorage > appStartUpload \n ${res_error}`,
257
287
  });
258
- Logger({ level: "WARN", message: res_error });
259
288
  }
260
289
 
261
290
  return response;
262
291
  }
263
292
 
264
293
  /**
265
- * @param {Object} arg - Arg object.
266
- * @param {string} arg.namespace - Bucket name
267
- * @param {number} [arg.pageNo] - Page no
268
- * @returns {Promise<BrowseResponse>} - Success response
294
+ * @param {FileStoragePlatformApplicationValidator.AppbrowseParam} arg - Arg object
295
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
296
+ * @param {import("../PlatformAPIClient").Options} - Options
297
+ * @returns {Promise<FileStoragePlatformModel.BrowseResponse>} - Success response
298
+ * @name appbrowse
269
299
  * @summary: Browse Files
270
- * @description: Browse Files
300
+ * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
271
301
  */
272
- async appbrowse({
273
- namespace,
274
-
275
- pageNo,
276
- } = {}) {
277
- const { error } = FileStorageValidator.appbrowse().validate(
302
+ async appbrowse(
303
+ { namespace, page, limit, requestHeaders } = { requestHeaders: {} },
304
+ { responseHeaders } = { responseHeaders: false }
305
+ ) {
306
+ const {
307
+ error,
308
+ } = FileStoragePlatformApplicationValidator.appbrowse().validate(
278
309
  {
279
310
  namespace,
280
311
 
281
- pageNo,
312
+ page,
313
+ limit,
282
314
  },
283
315
  { abortEarly: false, allowUnknown: true }
284
316
  );
@@ -287,36 +319,46 @@ class FileStorage {
287
319
  }
288
320
 
289
321
  // Showing warrnings if extra unknown parameters are found
290
- const { error: warrning } = FileStorageValidator.appbrowse().validate(
322
+ const {
323
+ error: warrning,
324
+ } = FileStoragePlatformApplicationValidator.appbrowse().validate(
291
325
  {
292
326
  namespace,
293
327
 
294
- pageNo,
328
+ page,
329
+ limit,
295
330
  },
296
331
  { abortEarly: false, allowUnknown: false }
297
332
  );
298
333
  if (warrning) {
299
334
  Logger({
300
335
  level: "WARN",
301
- message: "Parameter Validation warrnings for appbrowse",
336
+ message: `Parameter Validation warrnings for platform > FileStorage > appbrowse \n ${warrning}`,
302
337
  });
303
- Logger({ level: "WARN", message: warrning });
304
338
  }
305
339
 
306
340
  const query_params = {};
307
- query_params["page_no"] = pageNo;
341
+ query_params["page"] = page;
342
+ query_params["limit"] = limit;
308
343
 
309
344
  const response = await PlatformAPIClient.execute(
310
345
  this.config,
311
346
  "get",
312
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse/`,
347
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse`,
313
348
  query_params,
314
- undefined
349
+ undefined,
350
+ requestHeaders,
351
+ { responseHeaders }
315
352
  );
316
353
 
354
+ let responseData = response;
355
+ if (responseHeaders) {
356
+ responseData = response[0];
357
+ }
358
+
317
359
  const {
318
360
  error: res_error,
319
- } = FileStorageModel.BrowseResponse().validate(response, {
361
+ } = FileStoragePlatformModel.BrowseResponse().validate(responseData, {
320
362
  abortEarly: false,
321
363
  allowUnknown: false,
322
364
  });
@@ -324,42 +366,465 @@ class FileStorage {
324
366
  if (res_error) {
325
367
  Logger({
326
368
  level: "WARN",
327
- message: "Response Validation Warnnings for appbrowse",
369
+ message: `Response Validation Warnnings for platform > FileStorage > appbrowse \n ${res_error}`,
328
370
  });
329
- Logger({ level: "WARN", message: res_error });
330
371
  }
331
372
 
332
373
  return response;
333
374
  }
334
375
 
335
376
  /**
336
- * @param {Object} arg - Arg object.
337
- * @param {string} arg.namespace - Bucket name
338
- * @param {number} arg.companyId - Company_id
339
- * @param {number} arg.applicationId - Application_id
340
- * @summary: Browse Files
341
- * @description: Browse Files
377
+ * @param {FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam} arg
378
+ * - Arg object
379
+ *
380
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
381
+ * @param {import("../PlatformAPIClient").Options} - Options
382
+ * @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess[]>} - Success response
383
+ * @name getDefaultHtmlTemplate
384
+ * @summary: Get html template for sales channel
385
+ * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
386
+ */
387
+ async getDefaultHtmlTemplate(
388
+ { pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
389
+ { responseHeaders } = { responseHeaders: false }
390
+ ) {
391
+ const {
392
+ error,
393
+ } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
394
+ {
395
+ pdfTypeId,
396
+ format,
397
+ },
398
+ { abortEarly: false, allowUnknown: true }
399
+ );
400
+ if (error) {
401
+ return Promise.reject(new FDKClientValidationError(error));
402
+ }
403
+
404
+ // Showing warrnings if extra unknown parameters are found
405
+ const {
406
+ error: warrning,
407
+ } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
408
+ {
409
+ pdfTypeId,
410
+ format,
411
+ },
412
+ { abortEarly: false, allowUnknown: false }
413
+ );
414
+ if (warrning) {
415
+ Logger({
416
+ level: "WARN",
417
+ message: `Parameter Validation warrnings for platform > FileStorage > getDefaultHtmlTemplate \n ${warrning}`,
418
+ });
419
+ }
420
+
421
+ const query_params = {};
422
+ query_params["pdf_type_id"] = pdfTypeId;
423
+ query_params["format"] = format;
424
+
425
+ const response = await PlatformAPIClient.execute(
426
+ this.config,
427
+ "get",
428
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
429
+ query_params,
430
+ undefined,
431
+ requestHeaders,
432
+ { responseHeaders }
433
+ );
434
+
435
+ let responseData = response;
436
+ if (responseHeaders) {
437
+ responseData = response[0];
438
+ }
439
+
440
+ const { error: res_error } = Joi.array()
441
+ .items(FileStoragePlatformModel.PdfConfigSuccess())
442
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
443
+
444
+ if (res_error) {
445
+ Logger({
446
+ level: "WARN",
447
+ message: `Response Validation Warnnings for platform > FileStorage > getDefaultHtmlTemplate \n ${res_error}`,
448
+ });
449
+ }
450
+
451
+ return response;
452
+ }
453
+
454
+ /**
455
+ * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam} arg
456
+ * - Arg object
457
+ *
458
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
459
+ * @param {import("../PlatformAPIClient").Options} - Options
460
+ * @returns {Promise<FileStoragePlatformModel.DummyTemplateDataItems[]>} -
461
+ * Success response
462
+ * @name getDefaultPdfData
463
+ * @summary: Get Dummy pdf data for invoice or label
464
+ * @description: Get Dummy pdf data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
342
465
  */
343
- appbrowsePaginator({ namespace, companyId, applicationId } = {}) {
344
- const paginator = new Paginator();
345
- const callback = async () => {
346
- const pageId = paginator.nextId;
347
- const pageNo = paginator.pageNo;
348
- const pageType = "number";
349
- const data = await this.appbrowse({
350
- namespace: namespace,
351
- companyId: companyId,
352
- applicationId: applicationId,
353
- pageNo: pageNo,
466
+ async getDefaultPdfData(
467
+ { pdfTypeId, requestHeaders } = { requestHeaders: {} },
468
+ { responseHeaders } = { responseHeaders: false }
469
+ ) {
470
+ const {
471
+ error,
472
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
473
+ {
474
+ pdfTypeId,
475
+ },
476
+ { abortEarly: false, allowUnknown: true }
477
+ );
478
+ if (error) {
479
+ return Promise.reject(new FDKClientValidationError(error));
480
+ }
481
+
482
+ // Showing warrnings if extra unknown parameters are found
483
+ const {
484
+ error: warrning,
485
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
486
+ {
487
+ pdfTypeId,
488
+ },
489
+ { abortEarly: false, allowUnknown: false }
490
+ );
491
+ if (warrning) {
492
+ Logger({
493
+ level: "WARN",
494
+ message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfData \n ${warrning}`,
495
+ });
496
+ }
497
+
498
+ const query_params = {};
499
+ query_params["pdf_type_id"] = pdfTypeId;
500
+
501
+ const response = await PlatformAPIClient.execute(
502
+ this.config,
503
+ "get",
504
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper`,
505
+ query_params,
506
+ undefined,
507
+ requestHeaders,
508
+ { responseHeaders }
509
+ );
510
+
511
+ let responseData = response;
512
+ if (responseHeaders) {
513
+ responseData = response[0];
514
+ }
515
+
516
+ const { error: res_error } = Joi.array()
517
+ .items(FileStoragePlatformModel.DummyTemplateDataItems())
518
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
519
+
520
+ if (res_error) {
521
+ Logger({
522
+ level: "WARN",
523
+ message: `Response Validation Warnnings for platform > FileStorage > getDefaultPdfData \n ${res_error}`,
354
524
  });
355
- paginator.setPaginator({
356
- hasNext: data.page.has_next ? true : false,
357
- nextId: data.page.next_id,
525
+ }
526
+
527
+ return response;
528
+ }
529
+
530
+ /**
531
+ * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam} arg
532
+ * - Arg object
533
+ *
534
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
535
+ * @param {import("../PlatformAPIClient").Options} - Options
536
+ * @returns {Promise<
537
+ * FileStoragePlatformModel.PdfDefaultTemplateSuccess[]
538
+ * >}
539
+ * - Success response
540
+ *
541
+ * @name getDefaultPdfTemplate
542
+ * @summary: Default html template
543
+ * @description: Get default html template data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
544
+ */
545
+ async getDefaultPdfTemplate(
546
+ { pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
547
+ { responseHeaders } = { responseHeaders: false }
548
+ ) {
549
+ const {
550
+ error,
551
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
552
+ {
553
+ pdfTypeId,
554
+ format,
555
+ },
556
+ { abortEarly: false, allowUnknown: true }
557
+ );
558
+ if (error) {
559
+ return Promise.reject(new FDKClientValidationError(error));
560
+ }
561
+
562
+ // Showing warrnings if extra unknown parameters are found
563
+ const {
564
+ error: warrning,
565
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
566
+ {
567
+ pdfTypeId,
568
+ format,
569
+ },
570
+ { abortEarly: false, allowUnknown: false }
571
+ );
572
+ if (warrning) {
573
+ Logger({
574
+ level: "WARN",
575
+ message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfTemplate \n ${warrning}`,
358
576
  });
359
- return data;
360
- };
361
- paginator.setCallback(callback.bind(this));
362
- return paginator;
577
+ }
578
+
579
+ const query_params = {};
580
+ query_params["pdf_type_id"] = pdfTypeId;
581
+ query_params["format"] = format;
582
+
583
+ const response = await PlatformAPIClient.execute(
584
+ this.config,
585
+ "get",
586
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template`,
587
+ query_params,
588
+ undefined,
589
+ requestHeaders,
590
+ { responseHeaders }
591
+ );
592
+
593
+ let responseData = response;
594
+ if (responseHeaders) {
595
+ responseData = response[0];
596
+ }
597
+
598
+ const { error: res_error } = Joi.array()
599
+ .items(FileStoragePlatformModel.PdfDefaultTemplateSuccess())
600
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
601
+
602
+ if (res_error) {
603
+ Logger({
604
+ level: "WARN",
605
+ message: `Response Validation Warnnings for platform > FileStorage > getDefaultPdfTemplate \n ${res_error}`,
606
+ });
607
+ }
608
+
609
+ return response;
610
+ }
611
+
612
+ /**
613
+ * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object
614
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
615
+ * @param {import("../PlatformAPIClient").Options} - Options
616
+ * @returns {Promise<FileStoragePlatformModel.InvoiceTypesResponse[]>} -
617
+ * Success response
618
+ * @name getPdfTypes
619
+ * @summary: Get all the supported invoice pdf types
620
+ * @description: Get all the supported invoice pdf types such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
621
+ */
622
+ async getPdfTypes(
623
+ { requestHeaders } = { requestHeaders: {} },
624
+ { responseHeaders } = { responseHeaders: false }
625
+ ) {
626
+ const {
627
+ error,
628
+ } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
629
+ {},
630
+ { abortEarly: false, allowUnknown: true }
631
+ );
632
+ if (error) {
633
+ return Promise.reject(new FDKClientValidationError(error));
634
+ }
635
+
636
+ // Showing warrnings if extra unknown parameters are found
637
+ const {
638
+ error: warrning,
639
+ } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
640
+ {},
641
+ { abortEarly: false, allowUnknown: false }
642
+ );
643
+ if (warrning) {
644
+ Logger({
645
+ level: "WARN",
646
+ message: `Parameter Validation warrnings for platform > FileStorage > getPdfTypes \n ${warrning}`,
647
+ });
648
+ }
649
+
650
+ const query_params = {};
651
+
652
+ const response = await PlatformAPIClient.execute(
653
+ this.config,
654
+ "get",
655
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types`,
656
+ query_params,
657
+ undefined,
658
+ requestHeaders,
659
+ { responseHeaders }
660
+ );
661
+
662
+ let responseData = response;
663
+ if (responseHeaders) {
664
+ responseData = response[0];
665
+ }
666
+
667
+ const { error: res_error } = Joi.array()
668
+ .items(FileStoragePlatformModel.InvoiceTypesResponse())
669
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
670
+
671
+ if (res_error) {
672
+ Logger({
673
+ level: "WARN",
674
+ message: `Response Validation Warnnings for platform > FileStorage > getPdfTypes \n ${res_error}`,
675
+ });
676
+ }
677
+
678
+ return response;
679
+ }
680
+
681
+ /**
682
+ * @param {FileStoragePlatformApplicationValidator.PreviewTemplateParam} arg
683
+ * - Arg object
684
+ *
685
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
686
+ * @param {import("../PlatformAPIClient").Options} - Options
687
+ * @returns {Promise<string>} - Success response
688
+ * @name previewTemplate
689
+ * @summary: Preview HTML template
690
+ * @description: Rendered HTML template with dummy json data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/previewTemplate/).
691
+ */
692
+ async previewTemplate(
693
+ { body, requestHeaders } = { requestHeaders: {} },
694
+ { responseHeaders } = { responseHeaders: false }
695
+ ) {
696
+ const {
697
+ error,
698
+ } = FileStoragePlatformApplicationValidator.previewTemplate().validate(
699
+ {
700
+ body,
701
+ },
702
+ { abortEarly: false, allowUnknown: true }
703
+ );
704
+ if (error) {
705
+ return Promise.reject(new FDKClientValidationError(error));
706
+ }
707
+
708
+ // Showing warrnings if extra unknown parameters are found
709
+ const {
710
+ error: warrning,
711
+ } = FileStoragePlatformApplicationValidator.previewTemplate().validate(
712
+ {
713
+ body,
714
+ },
715
+ { abortEarly: false, allowUnknown: false }
716
+ );
717
+ if (warrning) {
718
+ Logger({
719
+ level: "WARN",
720
+ message: `Parameter Validation warrnings for platform > FileStorage > previewTemplate \n ${warrning}`,
721
+ });
722
+ }
723
+
724
+ const query_params = {};
725
+
726
+ const response = await PlatformAPIClient.execute(
727
+ this.config,
728
+ "post",
729
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/render`,
730
+ query_params,
731
+ body,
732
+ requestHeaders,
733
+ { responseHeaders }
734
+ );
735
+
736
+ let responseData = response;
737
+ if (responseHeaders) {
738
+ responseData = response[0];
739
+ }
740
+
741
+ const { error: res_error } = Joi.string()
742
+ .allow("")
743
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
744
+
745
+ if (res_error) {
746
+ Logger({
747
+ level: "WARN",
748
+ message: `Response Validation Warnnings for platform > FileStorage > previewTemplate \n ${res_error}`,
749
+ });
750
+ }
751
+
752
+ return response;
753
+ }
754
+
755
+ /**
756
+ * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg
757
+ * - Arg object
758
+ *
759
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
760
+ * @param {import("../PlatformAPIClient").Options} - Options
761
+ * @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess[]>} -
762
+ * Success response
763
+ * @name saveHtmlTemplate
764
+ * @summary: Update html template for invoice or label
765
+ * @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/saveHtmlTemplate/).
766
+ */
767
+ async saveHtmlTemplate(
768
+ { body, requestHeaders } = { requestHeaders: {} },
769
+ { responseHeaders } = { responseHeaders: false }
770
+ ) {
771
+ const {
772
+ error,
773
+ } = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
774
+ {
775
+ body,
776
+ },
777
+ { abortEarly: false, allowUnknown: true }
778
+ );
779
+ if (error) {
780
+ return Promise.reject(new FDKClientValidationError(error));
781
+ }
782
+
783
+ // Showing warrnings if extra unknown parameters are found
784
+ const {
785
+ error: warrning,
786
+ } = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
787
+ {
788
+ body,
789
+ },
790
+ { abortEarly: false, allowUnknown: false }
791
+ );
792
+ if (warrning) {
793
+ Logger({
794
+ level: "WARN",
795
+ message: `Parameter Validation warrnings for platform > FileStorage > saveHtmlTemplate \n ${warrning}`,
796
+ });
797
+ }
798
+
799
+ const query_params = {};
800
+
801
+ const response = await PlatformAPIClient.execute(
802
+ this.config,
803
+ "put",
804
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
805
+ query_params,
806
+ body,
807
+ requestHeaders,
808
+ { responseHeaders }
809
+ );
810
+
811
+ let responseData = response;
812
+ if (responseHeaders) {
813
+ responseData = response[0];
814
+ }
815
+
816
+ const { error: res_error } = Joi.array()
817
+ .items(FileStoragePlatformModel.PdfConfigSaveSuccess())
818
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
819
+
820
+ if (res_error) {
821
+ Logger({
822
+ level: "WARN",
823
+ message: `Response Validation Warnnings for platform > FileStorage > saveHtmlTemplate \n ${res_error}`,
824
+ });
825
+ }
826
+
827
+ return response;
363
828
  }
364
829
  }
365
830