@gofynd/fdk-client-javascript 1.1.6 → 1.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 (321) hide show
  1. package/README.md +12 -0
  2. package/index.js +0 -3
  3. package/package.json +1 -1
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +8 -1
  6. package/sdk/application/ApplicationClient.d.ts +37 -6
  7. package/sdk/application/ApplicationClient.js +31 -0
  8. package/sdk/application/ApplicationConfig.d.ts +52 -12
  9. package/sdk/application/ApplicationConfig.js +37 -2
  10. package/sdk/application/ApplicationModels.d.ts +46 -1
  11. package/sdk/application/ApplicationModels.js +18 -0
  12. package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
  13. package/sdk/application/Cart/CartApplicationClient.js +620 -483
  14. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  15. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  16. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  17. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  18. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
  19. package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
  20. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
  21. package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
  22. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  23. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  24. package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
  25. package/sdk/application/Common/CommonApplicationClient.js +50 -33
  26. package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
  27. package/sdk/application/Common/CommonApplicationModel.js +224 -16
  28. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  29. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  30. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
  31. package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
  32. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
  33. package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
  34. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  35. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
  37. package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
  39. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  41. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  42. package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
  43. package/sdk/application/Content/ContentApplicationClient.js +409 -277
  44. package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
  45. package/sdk/application/Content/ContentApplicationModel.js +1202 -109
  46. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  47. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
  49. package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
  51. package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  53. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  54. package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
  55. package/sdk/application/Lead/LeadApplicationClient.js +169 -103
  56. package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
  57. package/sdk/application/Lead/LeadApplicationModel.js +619 -73
  58. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  59. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  60. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
  61. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
  62. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  63. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  64. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  65. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  66. package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
  67. package/sdk/application/Order/OrderApplicationClient.js +297 -217
  68. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  69. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  70. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  71. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  72. package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
  73. package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
  74. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  75. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  76. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  77. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  78. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
  79. package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
  80. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  81. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  82. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  83. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  84. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
  85. package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
  86. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  87. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  88. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  89. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  90. package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
  91. package/sdk/application/Share/ShareApplicationClient.js +165 -97
  92. package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
  93. package/sdk/application/Share/ShareApplicationModel.js +154 -16
  94. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  95. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  96. package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
  97. package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
  98. package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
  99. package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
  100. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  101. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  102. package/sdk/application/User/UserApplicationClient.d.ts +219 -303
  103. package/sdk/application/User/UserApplicationClient.js +819 -522
  104. package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
  105. package/sdk/application/User/UserApplicationModel.js +983 -44
  106. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  107. package/sdk/application/User/UserApplicationValidator.js +265 -31
  108. package/sdk/common/AxiosHelper.js +8 -2
  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/partner/PartnerAPIClient.d.ts +15 -1
  113. package/sdk/partner/PartnerAPIClient.js +8 -1
  114. package/sdk/partner/PartnerClient.d.ts +20 -3
  115. package/sdk/partner/PartnerClient.js +17 -0
  116. package/sdk/partner/PartnerConfig.d.ts +40 -14
  117. package/sdk/partner/PartnerConfig.js +31 -6
  118. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
  119. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
  124. package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
  125. package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
  126. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
  127. package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
  128. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
  129. package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
  130. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
  131. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
  132. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  133. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  134. package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
  135. package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
  137. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  140. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
  141. package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
  142. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
  143. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
  144. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
  145. package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
  146. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
  147. package/sdk/platform/Common/CommonPlatformClient.js +48 -33
  148. package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
  149. package/sdk/platform/Common/CommonPlatformModel.js +224 -16
  150. package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
  151. package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
  156. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
  157. package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
  158. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
  159. package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
  160. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
  183. package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
  200. package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
  201. package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
  202. package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
  203. package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
  204. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
  205. package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
  206. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
  207. package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
  208. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  209. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  210. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  211. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  212. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
  213. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
  214. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  215. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  216. package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
  217. package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
  218. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
  219. package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
  220. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  221. package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
  222. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
  223. package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
  224. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  225. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  226. package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
  227. package/sdk/platform/Order/OrderPlatformClient.js +969 -762
  228. package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
  229. package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
  230. package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
  231. package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
  232. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
  233. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
  234. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
  235. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
  236. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
  237. package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
  238. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
  239. package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
  240. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
  241. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
  242. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
  243. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
  244. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
  245. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
  246. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
  247. package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
  248. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
  249. package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
  250. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  251. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  252. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  253. package/sdk/platform/PlatformAPIClient.js +9 -1
  254. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  255. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  256. package/sdk/platform/PlatformClient.d.ts +29 -12579
  257. package/sdk/platform/PlatformClient.js +26 -15085
  258. package/sdk/platform/PlatformConfig.d.ts +37 -11
  259. package/sdk/platform/PlatformConfig.js +32 -6
  260. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
  261. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
  262. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  263. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  264. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
  265. package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
  266. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
  267. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
  268. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
  269. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
  270. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
  271. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
  272. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  276. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
  277. package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
  278. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  279. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  280. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  281. package/sdk/platform/Share/SharePlatformModel.js +165 -17
  282. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
  283. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
  284. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
  285. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
  286. package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
  287. package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
  288. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
  289. package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
  290. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
  291. package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
  292. package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
  293. package/sdk/platform/User/UserPlatformModel.js +983 -44
  294. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
  295. package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
  296. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
  297. package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
  298. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
  299. package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
  300. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
  301. package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
  302. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
  303. package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
  304. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  305. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  306. package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
  307. package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
  308. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  309. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  310. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  311. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  312. package/sdk/public/PublicClient.d.ts +19 -3
  313. package/sdk/public/PublicClient.js +16 -0
  314. package/sdk/public/PublicConfig.d.ts +27 -6
  315. package/sdk/public/PublicConfig.js +17 -1
  316. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
  317. package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
  318. package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
  319. package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
  320. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  321. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
@@ -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 ThemeValidator = require("./ThemePlatformApplicationValidator");
5
- const ThemeModel = require("./ThemePlatformModel");
4
+ const ThemePlatformApplicationValidator = require("./ThemePlatformApplicationValidator");
5
+ const ThemePlatformModel = require("./ThemePlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -13,14 +13,17 @@ class Theme {
13
13
  }
14
14
 
15
15
  /**
16
- * @param {Object} arg - Arg object.
17
- * @param {AddThemeRequestSchema} arg.body
18
- * @returns {Promise<ThemesSchema>} - Success response
16
+ * @param {ThemePlatformApplicationValidator.AddToThemeLibraryParam} arg - Arg object
17
+ * @param {import("../PlatformAPIClient").Options} - Options
18
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
19
+ * @name addToThemeLibrary
19
20
  * @summary: Add a theme to the theme library
20
- * @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to choose a theme and add it to the theme library.
21
+ * @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to choose a theme and add it to the theme library. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/addToThemeLibrary/).
21
22
  */
22
- async addToThemeLibrary({ body } = {}) {
23
- const { error } = ThemeValidator.addToThemeLibrary().validate(
23
+ async addToThemeLibrary({ body } = {}, { headers } = { headers: false }) {
24
+ const {
25
+ error,
26
+ } = ThemePlatformApplicationValidator.addToThemeLibrary().validate(
24
27
  {
25
28
  body,
26
29
  },
@@ -31,7 +34,9 @@ class Theme {
31
34
  }
32
35
 
33
36
  // Showing warrnings if extra unknown parameters are found
34
- const { error: warrning } = ThemeValidator.addToThemeLibrary().validate(
37
+ const {
38
+ error: warrning,
39
+ } = ThemePlatformApplicationValidator.addToThemeLibrary().validate(
35
40
  {
36
41
  body,
37
42
  },
@@ -40,9 +45,8 @@ class Theme {
40
45
  if (warrning) {
41
46
  Logger({
42
47
  level: "WARN",
43
- message: "Parameter Validation warrnings for addToThemeLibrary",
48
+ message: `Parameter Validation warrnings for platform > Theme > addToThemeLibrary \n ${warrning}`,
44
49
  });
45
- Logger({ level: "WARN", message: warrning });
46
50
  }
47
51
 
48
52
  const query_params = {};
@@ -52,10 +56,19 @@ class Theme {
52
56
  "post",
53
57
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
54
58
  query_params,
55
- body
59
+ body,
60
+ undefined,
61
+ { headers }
56
62
  );
57
63
 
58
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
64
+ let responseData = response;
65
+ if (headers) {
66
+ responseData = response[0];
67
+ }
68
+
69
+ const {
70
+ error: res_error,
71
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
59
72
  abortEarly: false,
60
73
  allowUnknown: false,
61
74
  });
@@ -63,23 +76,23 @@ class Theme {
63
76
  if (res_error) {
64
77
  Logger({
65
78
  level: "WARN",
66
- message: "Response Validation Warnnings for addToThemeLibrary",
79
+ message: `Response Validation Warnnings for platform > Theme > addToThemeLibrary \n ${res_error}`,
67
80
  });
68
- Logger({ level: "WARN", message: res_error });
69
81
  }
70
82
 
71
83
  return response;
72
84
  }
73
85
 
74
86
  /**
75
- * @param {Object} arg - Arg object.
76
- * @param {AddThemeRequestSchema} arg.body
77
- * @returns {Promise<ThemesSchema>} - Success response
87
+ * @param {ThemePlatformApplicationValidator.ApplyThemeParam} arg - Arg object
88
+ * @param {import("../PlatformAPIClient").Options} - Options
89
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
90
+ * @name applyTheme
78
91
  * @summary: Apply a theme
79
- * @description: Use this API to apply a theme to the website.
92
+ * @description: Use this API to apply a theme to the website. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/applyTheme/).
80
93
  */
81
- async applyTheme({ body } = {}) {
82
- const { error } = ThemeValidator.applyTheme().validate(
94
+ async applyTheme({ body } = {}, { headers } = { headers: false }) {
95
+ const { error } = ThemePlatformApplicationValidator.applyTheme().validate(
83
96
  {
84
97
  body,
85
98
  },
@@ -90,7 +103,9 @@ class Theme {
90
103
  }
91
104
 
92
105
  // Showing warrnings if extra unknown parameters are found
93
- const { error: warrning } = ThemeValidator.applyTheme().validate(
106
+ const {
107
+ error: warrning,
108
+ } = ThemePlatformApplicationValidator.applyTheme().validate(
94
109
  {
95
110
  body,
96
111
  },
@@ -99,9 +114,8 @@ class Theme {
99
114
  if (warrning) {
100
115
  Logger({
101
116
  level: "WARN",
102
- message: "Parameter Validation warrnings for applyTheme",
117
+ message: `Parameter Validation warrnings for platform > Theme > applyTheme \n ${warrning}`,
103
118
  });
104
- Logger({ level: "WARN", message: warrning });
105
119
  }
106
120
 
107
121
  const query_params = {};
@@ -111,10 +125,19 @@ class Theme {
111
125
  "post",
112
126
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/apply`,
113
127
  query_params,
114
- body
128
+ body,
129
+ undefined,
130
+ { headers }
115
131
  );
116
132
 
117
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
133
+ let responseData = response;
134
+ if (headers) {
135
+ responseData = response[0];
136
+ }
137
+
138
+ const {
139
+ error: res_error,
140
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
118
141
  abortEarly: false,
119
142
  allowUnknown: false,
120
143
  });
@@ -122,23 +145,23 @@ class Theme {
122
145
  if (res_error) {
123
146
  Logger({
124
147
  level: "WARN",
125
- message: "Response Validation Warnnings for applyTheme",
148
+ message: `Response Validation Warnnings for platform > Theme > applyTheme \n ${res_error}`,
126
149
  });
127
- Logger({ level: "WARN", message: res_error });
128
150
  }
129
151
 
130
152
  return response;
131
153
  }
132
154
 
133
155
  /**
134
- * @param {Object} arg - Arg object.
135
- * @param {string} arg.themeId - ID allotted to the theme.
136
- * @returns {Promise<ThemesSchema>} - Success response
156
+ * @param {ThemePlatformApplicationValidator.ArchiveThemeParam} arg - Arg object
157
+ * @param {import("../PlatformAPIClient").Options} - Options
158
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
159
+ * @name archiveTheme
137
160
  * @summary: Archive a theme
138
- * @description: Use this API to store an existing theme but not delete it so that it can be used in future if required.
161
+ * @description: Use this API to store an existing theme but not delete it so that it can be used in future if required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/archiveTheme/).
139
162
  */
140
- async archiveTheme({ themeId } = {}) {
141
- const { error } = ThemeValidator.archiveTheme().validate(
163
+ async archiveTheme({ themeId } = {}, { headers } = { headers: false }) {
164
+ const { error } = ThemePlatformApplicationValidator.archiveTheme().validate(
142
165
  {
143
166
  themeId,
144
167
  },
@@ -149,7 +172,9 @@ class Theme {
149
172
  }
150
173
 
151
174
  // Showing warrnings if extra unknown parameters are found
152
- const { error: warrning } = ThemeValidator.archiveTheme().validate(
175
+ const {
176
+ error: warrning,
177
+ } = ThemePlatformApplicationValidator.archiveTheme().validate(
153
178
  {
154
179
  themeId,
155
180
  },
@@ -158,9 +183,8 @@ class Theme {
158
183
  if (warrning) {
159
184
  Logger({
160
185
  level: "WARN",
161
- message: "Parameter Validation warrnings for archiveTheme",
186
+ message: `Parameter Validation warrnings for platform > Theme > archiveTheme \n ${warrning}`,
162
187
  });
163
- Logger({ level: "WARN", message: warrning });
164
188
  }
165
189
 
166
190
  const query_params = {};
@@ -170,10 +194,19 @@ class Theme {
170
194
  "put",
171
195
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
172
196
  query_params,
173
- undefined
197
+ undefined,
198
+ undefined,
199
+ { headers }
174
200
  );
175
201
 
176
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
202
+ let responseData = response;
203
+ if (headers) {
204
+ responseData = response[0];
205
+ }
206
+
207
+ const {
208
+ error: res_error,
209
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
177
210
  abortEarly: false,
178
211
  allowUnknown: false,
179
212
  });
@@ -181,24 +214,23 @@ class Theme {
181
214
  if (res_error) {
182
215
  Logger({
183
216
  level: "WARN",
184
- message: "Response Validation Warnnings for archiveTheme",
217
+ message: `Response Validation Warnnings for platform > Theme > archiveTheme \n ${res_error}`,
185
218
  });
186
- Logger({ level: "WARN", message: res_error });
187
219
  }
188
220
 
189
221
  return response;
190
222
  }
191
223
 
192
224
  /**
193
- * @param {Object} arg - Arg object.
194
- * @param {string} arg.themeId - ID of the theme
195
- * @param {AvailablePageSchema} arg.body
196
- * @returns {Promise<AvailablePageSchema>} - Success response
225
+ * @param {ThemePlatformApplicationValidator.CreatePageParam} arg - Arg object
226
+ * @param {import("../PlatformAPIClient").Options} - Options
227
+ * @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
228
+ * @name createPage
197
229
  * @summary: Create a page
198
- * @description: Use this API to create a page for a theme by its ID.
230
+ * @description: Use this API to create a page for a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/createPage/).
199
231
  */
200
- async createPage({ themeId, body } = {}) {
201
- const { error } = ThemeValidator.createPage().validate(
232
+ async createPage({ themeId, body } = {}, { headers } = { headers: false }) {
233
+ const { error } = ThemePlatformApplicationValidator.createPage().validate(
202
234
  {
203
235
  themeId,
204
236
  body,
@@ -210,7 +242,9 @@ class Theme {
210
242
  }
211
243
 
212
244
  // Showing warrnings if extra unknown parameters are found
213
- const { error: warrning } = ThemeValidator.createPage().validate(
245
+ const {
246
+ error: warrning,
247
+ } = ThemePlatformApplicationValidator.createPage().validate(
214
248
  {
215
249
  themeId,
216
250
  body,
@@ -220,9 +254,8 @@ class Theme {
220
254
  if (warrning) {
221
255
  Logger({
222
256
  level: "WARN",
223
- message: "Parameter Validation warrnings for createPage",
257
+ message: `Parameter Validation warrnings for platform > Theme > createPage \n ${warrning}`,
224
258
  });
225
- Logger({ level: "WARN", message: warrning });
226
259
  }
227
260
 
228
261
  const query_params = {};
@@ -232,12 +265,19 @@ class Theme {
232
265
  "post",
233
266
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
234
267
  query_params,
235
- body
268
+ body,
269
+ undefined,
270
+ { headers }
236
271
  );
237
272
 
273
+ let responseData = response;
274
+ if (headers) {
275
+ responseData = response[0];
276
+ }
277
+
238
278
  const {
239
279
  error: res_error,
240
- } = ThemeModel.AvailablePageSchema().validate(response, {
280
+ } = ThemePlatformModel.AvailablePageSchema().validate(responseData, {
241
281
  abortEarly: false,
242
282
  allowUnknown: false,
243
283
  });
@@ -245,23 +285,23 @@ class Theme {
245
285
  if (res_error) {
246
286
  Logger({
247
287
  level: "WARN",
248
- message: "Response Validation Warnnings for createPage",
288
+ message: `Response Validation Warnnings for platform > Theme > createPage \n ${res_error}`,
249
289
  });
250
- Logger({ level: "WARN", message: res_error });
251
290
  }
252
291
 
253
292
  return response;
254
293
  }
255
294
 
256
295
  /**
257
- * @param {Object} arg - Arg object.
258
- * @param {ThemesSchema} arg.body
259
- * @returns {Promise<ThemesSchema>} - Success response
296
+ * @param {ThemePlatformApplicationValidator.CreateThemeParam} arg - Arg object
297
+ * @param {import("../PlatformAPIClient").Options} - Options
298
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
299
+ * @name createTheme
260
300
  * @summary: Create a new theme
261
- * @description: Themes improve the look and appearance of a website. Use this API to create a theme.
301
+ * @description: Themes improve the look and appearance of a website. Use this API to create a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/createTheme/).
262
302
  */
263
- async createTheme({ body } = {}) {
264
- const { error } = ThemeValidator.createTheme().validate(
303
+ async createTheme({ body } = {}, { headers } = { headers: false }) {
304
+ const { error } = ThemePlatformApplicationValidator.createTheme().validate(
265
305
  {
266
306
  body,
267
307
  },
@@ -272,7 +312,9 @@ class Theme {
272
312
  }
273
313
 
274
314
  // Showing warrnings if extra unknown parameters are found
275
- const { error: warrning } = ThemeValidator.createTheme().validate(
315
+ const {
316
+ error: warrning,
317
+ } = ThemePlatformApplicationValidator.createTheme().validate(
276
318
  {
277
319
  body,
278
320
  },
@@ -281,9 +323,8 @@ class Theme {
281
323
  if (warrning) {
282
324
  Logger({
283
325
  level: "WARN",
284
- message: "Parameter Validation warrnings for createTheme",
326
+ message: `Parameter Validation warrnings for platform > Theme > createTheme \n ${warrning}`,
285
327
  });
286
- Logger({ level: "WARN", message: warrning });
287
328
  }
288
329
 
289
330
  const query_params = {};
@@ -293,10 +334,19 @@ class Theme {
293
334
  "post",
294
335
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
295
336
  query_params,
296
- body
337
+ body,
338
+ undefined,
339
+ { headers }
297
340
  );
298
341
 
299
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
342
+ let responseData = response;
343
+ if (headers) {
344
+ responseData = response[0];
345
+ }
346
+
347
+ const {
348
+ error: res_error,
349
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
300
350
  abortEarly: false,
301
351
  allowUnknown: false,
302
352
  });
@@ -304,24 +354,26 @@ class Theme {
304
354
  if (res_error) {
305
355
  Logger({
306
356
  level: "WARN",
307
- message: "Response Validation Warnnings for createTheme",
357
+ message: `Response Validation Warnnings for platform > Theme > createTheme \n ${res_error}`,
308
358
  });
309
- Logger({ level: "WARN", message: res_error });
310
359
  }
311
360
 
312
361
  return response;
313
362
  }
314
363
 
315
364
  /**
316
- * @param {Object} arg - Arg object.
317
- * @param {string} arg.themeId - ID of the theme
318
- * @param {string} arg.pageValue - Value of the page to be updated
319
- * @returns {Promise<AvailablePageSchema>} - Success response
365
+ * @param {ThemePlatformApplicationValidator.DeletePageParam} arg - Arg object
366
+ * @param {import("../PlatformAPIClient").Options} - Options
367
+ * @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
368
+ * @name deletePage
320
369
  * @summary: Deletes a page
321
- * @description: Use this API to delete a page for a theme by its ID and page_value.
370
+ * @description: Use this API to delete a page for a theme by its ID and page_value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deletePage/).
322
371
  */
323
- async deletePage({ themeId, pageValue } = {}) {
324
- const { error } = ThemeValidator.deletePage().validate(
372
+ async deletePage(
373
+ { themeId, pageValue } = {},
374
+ { headers } = { headers: false }
375
+ ) {
376
+ const { error } = ThemePlatformApplicationValidator.deletePage().validate(
325
377
  {
326
378
  themeId,
327
379
  pageValue,
@@ -333,7 +385,9 @@ class Theme {
333
385
  }
334
386
 
335
387
  // Showing warrnings if extra unknown parameters are found
336
- const { error: warrning } = ThemeValidator.deletePage().validate(
388
+ const {
389
+ error: warrning,
390
+ } = ThemePlatformApplicationValidator.deletePage().validate(
337
391
  {
338
392
  themeId,
339
393
  pageValue,
@@ -343,9 +397,8 @@ class Theme {
343
397
  if (warrning) {
344
398
  Logger({
345
399
  level: "WARN",
346
- message: "Parameter Validation warrnings for deletePage",
400
+ message: `Parameter Validation warrnings for platform > Theme > deletePage \n ${warrning}`,
347
401
  });
348
- Logger({ level: "WARN", message: warrning });
349
402
  }
350
403
 
351
404
  const query_params = {};
@@ -355,12 +408,19 @@ class Theme {
355
408
  "delete",
356
409
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
357
410
  query_params,
358
- undefined
411
+ undefined,
412
+ undefined,
413
+ { headers }
359
414
  );
360
415
 
416
+ let responseData = response;
417
+ if (headers) {
418
+ responseData = response[0];
419
+ }
420
+
361
421
  const {
362
422
  error: res_error,
363
- } = ThemeModel.AvailablePageSchema().validate(response, {
423
+ } = ThemePlatformModel.AvailablePageSchema().validate(responseData, {
364
424
  abortEarly: false,
365
425
  allowUnknown: false,
366
426
  });
@@ -368,23 +428,23 @@ class Theme {
368
428
  if (res_error) {
369
429
  Logger({
370
430
  level: "WARN",
371
- message: "Response Validation Warnnings for deletePage",
431
+ message: `Response Validation Warnnings for platform > Theme > deletePage \n ${res_error}`,
372
432
  });
373
- Logger({ level: "WARN", message: res_error });
374
433
  }
375
434
 
376
435
  return response;
377
436
  }
378
437
 
379
438
  /**
380
- * @param {Object} arg - Arg object.
381
- * @param {string} arg.themeId - ID allotted to the theme.
382
- * @returns {Promise<ThemesSchema>} - Success response
439
+ * @param {ThemePlatformApplicationValidator.DeleteThemeParam} arg - Arg object
440
+ * @param {import("../PlatformAPIClient").Options} - Options
441
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
442
+ * @name deleteTheme
383
443
  * @summary: Delete a theme
384
- * @description: Use this API to delete a theme from the theme library.
444
+ * @description: Use this API to delete a theme from the theme library. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deleteTheme/).
385
445
  */
386
- async deleteTheme({ themeId } = {}) {
387
- const { error } = ThemeValidator.deleteTheme().validate(
446
+ async deleteTheme({ themeId } = {}, { headers } = { headers: false }) {
447
+ const { error } = ThemePlatformApplicationValidator.deleteTheme().validate(
388
448
  {
389
449
  themeId,
390
450
  },
@@ -395,7 +455,9 @@ class Theme {
395
455
  }
396
456
 
397
457
  // Showing warrnings if extra unknown parameters are found
398
- const { error: warrning } = ThemeValidator.deleteTheme().validate(
458
+ const {
459
+ error: warrning,
460
+ } = ThemePlatformApplicationValidator.deleteTheme().validate(
399
461
  {
400
462
  themeId,
401
463
  },
@@ -404,9 +466,8 @@ class Theme {
404
466
  if (warrning) {
405
467
  Logger({
406
468
  level: "WARN",
407
- message: "Parameter Validation warrnings for deleteTheme",
469
+ message: `Parameter Validation warrnings for platform > Theme > deleteTheme \n ${warrning}`,
408
470
  });
409
- Logger({ level: "WARN", message: warrning });
410
471
  }
411
472
 
412
473
  const query_params = {};
@@ -416,10 +477,19 @@ class Theme {
416
477
  "delete",
417
478
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
418
479
  query_params,
419
- undefined
480
+ undefined,
481
+ undefined,
482
+ { headers }
420
483
  );
421
484
 
422
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
485
+ let responseData = response;
486
+ if (headers) {
487
+ responseData = response[0];
488
+ }
489
+
490
+ const {
491
+ error: res_error,
492
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
423
493
  abortEarly: false,
424
494
  allowUnknown: false,
425
495
  });
@@ -427,23 +497,23 @@ class Theme {
427
497
  if (res_error) {
428
498
  Logger({
429
499
  level: "WARN",
430
- message: "Response Validation Warnnings for deleteTheme",
500
+ message: `Response Validation Warnnings for platform > Theme > deleteTheme \n ${res_error}`,
431
501
  });
432
- Logger({ level: "WARN", message: res_error });
433
502
  }
434
503
 
435
504
  return response;
436
505
  }
437
506
 
438
507
  /**
439
- * @param {Object} arg - Arg object.
440
- * @param {string} arg.themeId - ID of the theme to be retrieved
441
- * @returns {Promise<AllAvailablePageSchema>} - Success response
508
+ * @param {ThemePlatformApplicationValidator.GetAllPagesParam} arg - Arg object
509
+ * @param {import("../PlatformAPIClient").Options} - Options
510
+ * @returns {Promise<ThemePlatformModel.AllAvailablePageSchema>} - Success response
511
+ * @name getAllPages
442
512
  * @summary: Get all pages of a theme
443
- * @description: Use this API to retrieve all the available pages of a theme by its ID.
513
+ * @description: Use this API to retrieve all the available pages of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAllPages/).
444
514
  */
445
- async getAllPages({ themeId } = {}) {
446
- const { error } = ThemeValidator.getAllPages().validate(
515
+ async getAllPages({ themeId } = {}, { headers } = { headers: false }) {
516
+ const { error } = ThemePlatformApplicationValidator.getAllPages().validate(
447
517
  {
448
518
  themeId,
449
519
  },
@@ -454,7 +524,9 @@ class Theme {
454
524
  }
455
525
 
456
526
  // Showing warrnings if extra unknown parameters are found
457
- const { error: warrning } = ThemeValidator.getAllPages().validate(
527
+ const {
528
+ error: warrning,
529
+ } = ThemePlatformApplicationValidator.getAllPages().validate(
458
530
  {
459
531
  themeId,
460
532
  },
@@ -463,9 +535,8 @@ class Theme {
463
535
  if (warrning) {
464
536
  Logger({
465
537
  level: "WARN",
466
- message: "Parameter Validation warrnings for getAllPages",
538
+ message: `Parameter Validation warrnings for platform > Theme > getAllPages \n ${warrning}`,
467
539
  });
468
- Logger({ level: "WARN", message: warrning });
469
540
  }
470
541
 
471
542
  const query_params = {};
@@ -475,12 +546,19 @@ class Theme {
475
546
  "get",
476
547
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
477
548
  query_params,
478
- undefined
549
+ undefined,
550
+ undefined,
551
+ { headers }
479
552
  );
480
553
 
554
+ let responseData = response;
555
+ if (headers) {
556
+ responseData = response[0];
557
+ }
558
+
481
559
  const {
482
560
  error: res_error,
483
- } = ThemeModel.AllAvailablePageSchema().validate(response, {
561
+ } = ThemePlatformModel.AllAvailablePageSchema().validate(responseData, {
484
562
  abortEarly: false,
485
563
  allowUnknown: false,
486
564
  });
@@ -488,22 +566,24 @@ class Theme {
488
566
  if (res_error) {
489
567
  Logger({
490
568
  level: "WARN",
491
- message: "Response Validation Warnnings for getAllPages",
569
+ message: `Response Validation Warnnings for platform > Theme > getAllPages \n ${res_error}`,
492
570
  });
493
- Logger({ level: "WARN", message: res_error });
494
571
  }
495
572
 
496
573
  return response;
497
574
  }
498
575
 
499
576
  /**
500
- * @param {Object} arg - Arg object.
501
- * @returns {Promise<ThemesSchema>} - Success response
577
+ * @param {import("../PlatformAPIClient").Options} - Options
578
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
579
+ * @name getAppliedTheme
502
580
  * @summary: Get the applied theme
503
- * @description: Use this API to retrieve the theme that is currently applied to the website along with its details.
581
+ * @description: Use this API to retrieve the theme that is currently applied to the website along with its details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAppliedTheme/).
504
582
  */
505
- async getAppliedTheme({} = {}) {
506
- const { error } = ThemeValidator.getAppliedTheme().validate(
583
+ async getAppliedTheme({ headers } = { headers: false }) {
584
+ const {
585
+ error,
586
+ } = ThemePlatformApplicationValidator.getAppliedTheme().validate(
507
587
  {},
508
588
  { abortEarly: false, allowUnknown: true }
509
589
  );
@@ -512,16 +592,17 @@ class Theme {
512
592
  }
513
593
 
514
594
  // Showing warrnings if extra unknown parameters are found
515
- const { error: warrning } = ThemeValidator.getAppliedTheme().validate(
595
+ const {
596
+ error: warrning,
597
+ } = ThemePlatformApplicationValidator.getAppliedTheme().validate(
516
598
  {},
517
599
  { abortEarly: false, allowUnknown: false }
518
600
  );
519
601
  if (warrning) {
520
602
  Logger({
521
603
  level: "WARN",
522
- message: "Parameter Validation warrnings for getAppliedTheme",
604
+ message: `Parameter Validation warrnings for platform > Theme > getAppliedTheme \n ${warrning}`,
523
605
  });
524
- Logger({ level: "WARN", message: warrning });
525
606
  }
526
607
 
527
608
  const query_params = {};
@@ -531,10 +612,19 @@ class Theme {
531
612
  "get",
532
613
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
533
614
  query_params,
534
- undefined
615
+ undefined,
616
+ undefined,
617
+ { headers }
535
618
  );
536
619
 
537
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
620
+ let responseData = response;
621
+ if (headers) {
622
+ responseData = response[0];
623
+ }
624
+
625
+ const {
626
+ error: res_error,
627
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
538
628
  abortEarly: false,
539
629
  allowUnknown: false,
540
630
  });
@@ -542,22 +632,22 @@ class Theme {
542
632
  if (res_error) {
543
633
  Logger({
544
634
  level: "WARN",
545
- message: "Response Validation Warnnings for getAppliedTheme",
635
+ message: `Response Validation Warnnings for platform > Theme > getAppliedTheme \n ${res_error}`,
546
636
  });
547
- Logger({ level: "WARN", message: res_error });
548
637
  }
549
638
 
550
639
  return response;
551
640
  }
552
641
 
553
642
  /**
554
- * @param {Object} arg - Arg object.
555
- * @returns {Promise<FontsSchema>} - Success response
643
+ * @param {import("../PlatformAPIClient").Options} - Options
644
+ * @returns {Promise<ThemePlatformModel.FontsSchema>} - Success response
645
+ * @name getFonts
556
646
  * @summary: Get all the supported fonts in a theme
557
- * @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts.
647
+ * @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getFonts/).
558
648
  */
559
- async getFonts({} = {}) {
560
- const { error } = ThemeValidator.getFonts().validate(
649
+ async getFonts({ headers } = { headers: false }) {
650
+ const { error } = ThemePlatformApplicationValidator.getFonts().validate(
561
651
  {},
562
652
  { abortEarly: false, allowUnknown: true }
563
653
  );
@@ -566,16 +656,17 @@ class Theme {
566
656
  }
567
657
 
568
658
  // Showing warrnings if extra unknown parameters are found
569
- const { error: warrning } = ThemeValidator.getFonts().validate(
659
+ const {
660
+ error: warrning,
661
+ } = ThemePlatformApplicationValidator.getFonts().validate(
570
662
  {},
571
663
  { abortEarly: false, allowUnknown: false }
572
664
  );
573
665
  if (warrning) {
574
666
  Logger({
575
667
  level: "WARN",
576
- message: "Parameter Validation warrnings for getFonts",
668
+ message: `Parameter Validation warrnings for platform > Theme > getFonts \n ${warrning}`,
577
669
  });
578
- Logger({ level: "WARN", message: warrning });
579
670
  }
580
671
 
581
672
  const query_params = {};
@@ -585,10 +676,19 @@ class Theme {
585
676
  "get",
586
677
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fonts`,
587
678
  query_params,
588
- undefined
679
+ undefined,
680
+ undefined,
681
+ { headers }
589
682
  );
590
683
 
591
- const { error: res_error } = ThemeModel.FontsSchema().validate(response, {
684
+ let responseData = response;
685
+ if (headers) {
686
+ responseData = response[0];
687
+ }
688
+
689
+ const {
690
+ error: res_error,
691
+ } = ThemePlatformModel.FontsSchema().validate(responseData, {
592
692
  abortEarly: false,
593
693
  allowUnknown: false,
594
694
  });
@@ -596,24 +696,23 @@ class Theme {
596
696
  if (res_error) {
597
697
  Logger({
598
698
  level: "WARN",
599
- message: "Response Validation Warnnings for getFonts",
699
+ message: `Response Validation Warnnings for platform > Theme > getFonts \n ${res_error}`,
600
700
  });
601
- Logger({ level: "WARN", message: res_error });
602
701
  }
603
702
 
604
703
  return response;
605
704
  }
606
705
 
607
706
  /**
608
- * @param {Object} arg - Arg object.
609
- * @param {string} arg.themeId - ID of the theme to be retrieved
610
- * @param {string} arg.pageValue - Value of the page to be retrieved
611
- * @returns {Promise<AvailablePageSchema>} - Success response
707
+ * @param {ThemePlatformApplicationValidator.GetPageParam} arg - Arg object
708
+ * @param {import("../PlatformAPIClient").Options} - Options
709
+ * @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
710
+ * @name getPage
612
711
  * @summary: Get page of a theme
613
- * @description: Use this API to retrieve a page of a theme.
712
+ * @description: Use this API to retrieve a page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPage/).
614
713
  */
615
- async getPage({ themeId, pageValue } = {}) {
616
- const { error } = ThemeValidator.getPage().validate(
714
+ async getPage({ themeId, pageValue } = {}, { headers } = { headers: false }) {
715
+ const { error } = ThemePlatformApplicationValidator.getPage().validate(
617
716
  {
618
717
  themeId,
619
718
  pageValue,
@@ -625,7 +724,9 @@ class Theme {
625
724
  }
626
725
 
627
726
  // Showing warrnings if extra unknown parameters are found
628
- const { error: warrning } = ThemeValidator.getPage().validate(
727
+ const {
728
+ error: warrning,
729
+ } = ThemePlatformApplicationValidator.getPage().validate(
629
730
  {
630
731
  themeId,
631
732
  pageValue,
@@ -635,9 +736,8 @@ class Theme {
635
736
  if (warrning) {
636
737
  Logger({
637
738
  level: "WARN",
638
- message: "Parameter Validation warrnings for getPage",
739
+ message: `Parameter Validation warrnings for platform > Theme > getPage \n ${warrning}`,
639
740
  });
640
- Logger({ level: "WARN", message: warrning });
641
741
  }
642
742
 
643
743
  const query_params = {};
@@ -647,12 +747,19 @@ class Theme {
647
747
  "get",
648
748
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
649
749
  query_params,
650
- undefined
750
+ undefined,
751
+ undefined,
752
+ { headers }
651
753
  );
652
754
 
755
+ let responseData = response;
756
+ if (headers) {
757
+ responseData = response[0];
758
+ }
759
+
653
760
  const {
654
761
  error: res_error,
655
- } = ThemeModel.AvailablePageSchema().validate(response, {
762
+ } = ThemePlatformModel.AvailablePageSchema().validate(responseData, {
656
763
  abortEarly: false,
657
764
  allowUnknown: false,
658
765
  });
@@ -660,26 +767,29 @@ class Theme {
660
767
  if (res_error) {
661
768
  Logger({
662
769
  level: "WARN",
663
- message: "Response Validation Warnnings for getPage",
770
+ message: `Response Validation Warnnings for platform > Theme > getPage \n ${res_error}`,
664
771
  });
665
- Logger({ level: "WARN", message: res_error });
666
772
  }
667
773
 
668
774
  return response;
669
775
  }
670
776
 
671
777
  /**
672
- * @param {Object} arg - Arg object.
673
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
674
- * page. Default value is 10.
675
- * @param {number} [arg.pageNo] - The page number to navigate through the
676
- * given set of results. Default value is 1.
677
- * @returns {Promise<ThemesListingResponseSchema>} - Success response
778
+ * @param {ThemePlatformApplicationValidator.GetPublicThemesParam} arg - Arg object
779
+ * @param {import("../PlatformAPIClient").Options} - Options
780
+ * @returns {Promise<ThemePlatformModel.ThemesListingResponseSchema>} -
781
+ * Success response
782
+ * @name getPublicThemes
678
783
  * @summary: Get all public themes
679
- * @description: Use this API to get a list of free themes that you can apply to your website.
784
+ * @description: Use this API to get a list of free themes that you can apply to your website. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPublicThemes/).
680
785
  */
681
- async getPublicThemes({ pageSize, pageNo } = {}) {
682
- const { error } = ThemeValidator.getPublicThemes().validate(
786
+ async getPublicThemes(
787
+ { pageSize, pageNo } = {},
788
+ { headers } = { headers: false }
789
+ ) {
790
+ const {
791
+ error,
792
+ } = ThemePlatformApplicationValidator.getPublicThemes().validate(
683
793
  {
684
794
  pageSize,
685
795
  pageNo,
@@ -691,7 +801,9 @@ class Theme {
691
801
  }
692
802
 
693
803
  // Showing warrnings if extra unknown parameters are found
694
- const { error: warrning } = ThemeValidator.getPublicThemes().validate(
804
+ const {
805
+ error: warrning,
806
+ } = ThemePlatformApplicationValidator.getPublicThemes().validate(
695
807
  {
696
808
  pageSize,
697
809
  pageNo,
@@ -701,9 +813,8 @@ class Theme {
701
813
  if (warrning) {
702
814
  Logger({
703
815
  level: "WARN",
704
- message: "Parameter Validation warrnings for getPublicThemes",
816
+ message: `Parameter Validation warrnings for platform > Theme > getPublicThemes \n ${warrning}`,
705
817
  });
706
- Logger({ level: "WARN", message: warrning });
707
818
  }
708
819
 
709
820
  const query_params = {};
@@ -715,36 +826,43 @@ class Theme {
715
826
  "get",
716
827
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/list/public`,
717
828
  query_params,
718
- undefined
829
+ undefined,
830
+ undefined,
831
+ { headers }
719
832
  );
720
833
 
834
+ let responseData = response;
835
+ if (headers) {
836
+ responseData = response[0];
837
+ }
838
+
721
839
  const {
722
840
  error: res_error,
723
- } = ThemeModel.ThemesListingResponseSchema().validate(response, {
724
- abortEarly: false,
725
- allowUnknown: false,
726
- });
841
+ } = ThemePlatformModel.ThemesListingResponseSchema().validate(
842
+ responseData,
843
+ { abortEarly: false, allowUnknown: false }
844
+ );
727
845
 
728
846
  if (res_error) {
729
847
  Logger({
730
848
  level: "WARN",
731
- message: "Response Validation Warnnings for getPublicThemes",
849
+ message: `Response Validation Warnnings for platform > Theme > getPublicThemes \n ${res_error}`,
732
850
  });
733
- Logger({ level: "WARN", message: res_error });
734
851
  }
735
852
 
736
853
  return response;
737
854
  }
738
855
 
739
856
  /**
740
- * @param {Object} arg - Arg object.
741
- * @param {string} arg.themeId - ID allotted to the theme.
742
- * @returns {Promise<ThemesSchema>} - Success response
857
+ * @param {ThemePlatformApplicationValidator.GetThemeByIdParam} arg - Arg object
858
+ * @param {import("../PlatformAPIClient").Options} - Options
859
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
860
+ * @name getThemeById
743
861
  * @summary: Gets theme by id
744
- * @description: Use this API to retrieve the details of a specific theme by using its ID.
862
+ * @description: Use this API to retrieve the details of a specific theme by using its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeById/).
745
863
  */
746
- async getThemeById({ themeId } = {}) {
747
- const { error } = ThemeValidator.getThemeById().validate(
864
+ async getThemeById({ themeId } = {}, { headers } = { headers: false }) {
865
+ const { error } = ThemePlatformApplicationValidator.getThemeById().validate(
748
866
  {
749
867
  themeId,
750
868
  },
@@ -755,7 +873,9 @@ class Theme {
755
873
  }
756
874
 
757
875
  // Showing warrnings if extra unknown parameters are found
758
- const { error: warrning } = ThemeValidator.getThemeById().validate(
876
+ const {
877
+ error: warrning,
878
+ } = ThemePlatformApplicationValidator.getThemeById().validate(
759
879
  {
760
880
  themeId,
761
881
  },
@@ -764,9 +884,8 @@ class Theme {
764
884
  if (warrning) {
765
885
  Logger({
766
886
  level: "WARN",
767
- message: "Parameter Validation warrnings for getThemeById",
887
+ message: `Parameter Validation warrnings for platform > Theme > getThemeById \n ${warrning}`,
768
888
  });
769
- Logger({ level: "WARN", message: warrning });
770
889
  }
771
890
 
772
891
  const query_params = {};
@@ -776,10 +895,19 @@ class Theme {
776
895
  "get",
777
896
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
778
897
  query_params,
779
- undefined
898
+ undefined,
899
+ undefined,
900
+ { headers }
780
901
  );
781
902
 
782
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
903
+ let responseData = response;
904
+ if (headers) {
905
+ responseData = response[0];
906
+ }
907
+
908
+ const {
909
+ error: res_error,
910
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
783
911
  abortEarly: false,
784
912
  allowUnknown: false,
785
913
  });
@@ -787,23 +915,25 @@ class Theme {
787
915
  if (res_error) {
788
916
  Logger({
789
917
  level: "WARN",
790
- message: "Response Validation Warnnings for getThemeById",
918
+ message: `Response Validation Warnnings for platform > Theme > getThemeById \n ${res_error}`,
791
919
  });
792
- Logger({ level: "WARN", message: res_error });
793
920
  }
794
921
 
795
922
  return response;
796
923
  }
797
924
 
798
925
  /**
799
- * @param {Object} arg - Arg object.
800
- * @param {string} arg.themeId - ID allotted to the theme.
801
- * @returns {Promise<ThemesSchema>} - Success response
926
+ * @param {ThemePlatformApplicationValidator.GetThemeForPreviewParam} arg - Arg object
927
+ * @param {import("../PlatformAPIClient").Options} - Options
928
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
929
+ * @name getThemeForPreview
802
930
  * @summary: Get a theme preview
803
- * @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID.
931
+ * @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeForPreview/).
804
932
  */
805
- async getThemeForPreview({ themeId } = {}) {
806
- const { error } = ThemeValidator.getThemeForPreview().validate(
933
+ async getThemeForPreview({ themeId } = {}, { headers } = { headers: false }) {
934
+ const {
935
+ error,
936
+ } = ThemePlatformApplicationValidator.getThemeForPreview().validate(
807
937
  {
808
938
  themeId,
809
939
  },
@@ -814,7 +944,9 @@ class Theme {
814
944
  }
815
945
 
816
946
  // Showing warrnings if extra unknown parameters are found
817
- const { error: warrning } = ThemeValidator.getThemeForPreview().validate(
947
+ const {
948
+ error: warrning,
949
+ } = ThemePlatformApplicationValidator.getThemeForPreview().validate(
818
950
  {
819
951
  themeId,
820
952
  },
@@ -823,9 +955,8 @@ class Theme {
823
955
  if (warrning) {
824
956
  Logger({
825
957
  level: "WARN",
826
- message: "Parameter Validation warrnings for getThemeForPreview",
958
+ message: `Parameter Validation warrnings for platform > Theme > getThemeForPreview \n ${warrning}`,
827
959
  });
828
- Logger({ level: "WARN", message: warrning });
829
960
  }
830
961
 
831
962
  const query_params = {};
@@ -835,10 +966,19 @@ class Theme {
835
966
  "get",
836
967
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/preview`,
837
968
  query_params,
838
- undefined
969
+ undefined,
970
+ undefined,
971
+ { headers }
839
972
  );
840
973
 
841
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
974
+ let responseData = response;
975
+ if (headers) {
976
+ responseData = response[0];
977
+ }
978
+
979
+ const {
980
+ error: res_error,
981
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
842
982
  abortEarly: false,
843
983
  allowUnknown: false,
844
984
  });
@@ -846,23 +986,30 @@ class Theme {
846
986
  if (res_error) {
847
987
  Logger({
848
988
  level: "WARN",
849
- message: "Response Validation Warnnings for getThemeForPreview",
989
+ message: `Response Validation Warnnings for platform > Theme > getThemeForPreview \n ${res_error}`,
850
990
  });
851
- Logger({ level: "WARN", message: res_error });
852
991
  }
853
992
 
854
993
  return response;
855
994
  }
856
995
 
857
996
  /**
858
- * @param {Object} arg - Arg object.
859
- * @param {string} arg.themeId - ID allotted to the theme.
997
+ * @param {ThemePlatformApplicationValidator.GetThemeLastModifiedParam} arg
998
+ * - Arg object
999
+ *
1000
+ * @param {import("../PlatformAPIClient").Options} - Options
860
1001
  * @returns {Promise<any>} - Success response
1002
+ * @name getThemeLastModified
861
1003
  * @summary: Fetch last modified timestamp
862
- * @description: Use this API to fetch Last-Modified timestamp in header metadata.
1004
+ * @description: Use this API to fetch Last-Modified timestamp in header metadata. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLastModified/).
863
1005
  */
864
- async getThemeLastModified({ themeId } = {}) {
865
- const { error } = ThemeValidator.getThemeLastModified().validate(
1006
+ async getThemeLastModified(
1007
+ { themeId } = {},
1008
+ { headers } = { headers: false }
1009
+ ) {
1010
+ const {
1011
+ error,
1012
+ } = ThemePlatformApplicationValidator.getThemeLastModified().validate(
866
1013
  {
867
1014
  themeId,
868
1015
  },
@@ -873,7 +1020,9 @@ class Theme {
873
1020
  }
874
1021
 
875
1022
  // Showing warrnings if extra unknown parameters are found
876
- const { error: warrning } = ThemeValidator.getThemeLastModified().validate(
1023
+ const {
1024
+ error: warrning,
1025
+ } = ThemePlatformApplicationValidator.getThemeLastModified().validate(
877
1026
  {
878
1027
  themeId,
879
1028
  },
@@ -882,9 +1031,8 @@ class Theme {
882
1031
  if (warrning) {
883
1032
  Logger({
884
1033
  level: "WARN",
885
- message: "Parameter Validation warrnings for getThemeLastModified",
1034
+ message: `Parameter Validation warrnings for platform > Theme > getThemeLastModified \n ${warrning}`,
886
1035
  });
887
- Logger({ level: "WARN", message: warrning });
888
1036
  }
889
1037
 
890
1038
  const query_params = {};
@@ -894,36 +1042,46 @@ class Theme {
894
1042
  "head",
895
1043
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/polling`,
896
1044
  query_params,
897
- undefined
1045
+ undefined,
1046
+ undefined,
1047
+ { headers }
898
1048
  );
899
1049
 
1050
+ let responseData = response;
1051
+ if (headers) {
1052
+ responseData = response[0];
1053
+ }
1054
+
900
1055
  const { error: res_error } = Joi.string()
901
1056
  .allow("")
902
- .validate(response, { abortEarly: false, allowUnknown: false });
1057
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
903
1058
 
904
1059
  if (res_error) {
905
1060
  Logger({
906
1061
  level: "WARN",
907
- message: "Response Validation Warnnings for getThemeLastModified",
1062
+ message: `Response Validation Warnnings for platform > Theme > getThemeLastModified \n ${res_error}`,
908
1063
  });
909
- Logger({ level: "WARN", message: res_error });
910
1064
  }
911
1065
 
912
1066
  return response;
913
1067
  }
914
1068
 
915
1069
  /**
916
- * @param {Object} arg - Arg object.
917
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
918
- * page. Default value is 10.
919
- * @param {number} [arg.pageNo] - The page number to navigate through the
920
- * given set of results. Default value is 1.
921
- * @returns {Promise<ThemesListingResponseSchema>} - Success response
1070
+ * @param {ThemePlatformApplicationValidator.GetThemeLibraryParam} arg - Arg object
1071
+ * @param {import("../PlatformAPIClient").Options} - Options
1072
+ * @returns {Promise<ThemePlatformModel.ThemesListingResponseSchema>} -
1073
+ * Success response
1074
+ * @name getThemeLibrary
922
1075
  * @summary: Get a list of themes from the theme library
923
- * @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to fetch a list of themes from the library along with their configuration details.
1076
+ * @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to fetch a list of themes from the library along with their configuration details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLibrary/).
924
1077
  */
925
- async getThemeLibrary({ pageSize, pageNo } = {}) {
926
- const { error } = ThemeValidator.getThemeLibrary().validate(
1078
+ async getThemeLibrary(
1079
+ { pageSize, pageNo } = {},
1080
+ { headers } = { headers: false }
1081
+ ) {
1082
+ const {
1083
+ error,
1084
+ } = ThemePlatformApplicationValidator.getThemeLibrary().validate(
927
1085
  {
928
1086
  pageSize,
929
1087
  pageNo,
@@ -935,7 +1093,9 @@ class Theme {
935
1093
  }
936
1094
 
937
1095
  // Showing warrnings if extra unknown parameters are found
938
- const { error: warrning } = ThemeValidator.getThemeLibrary().validate(
1096
+ const {
1097
+ error: warrning,
1098
+ } = ThemePlatformApplicationValidator.getThemeLibrary().validate(
939
1099
  {
940
1100
  pageSize,
941
1101
  pageNo,
@@ -945,9 +1105,8 @@ class Theme {
945
1105
  if (warrning) {
946
1106
  Logger({
947
1107
  level: "WARN",
948
- message: "Parameter Validation warrnings for getThemeLibrary",
1108
+ message: `Parameter Validation warrnings for platform > Theme > getThemeLibrary \n ${warrning}`,
949
1109
  });
950
- Logger({ level: "WARN", message: warrning });
951
1110
  }
952
1111
 
953
1112
  const query_params = {};
@@ -959,36 +1118,43 @@ class Theme {
959
1118
  "get",
960
1119
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
961
1120
  query_params,
962
- undefined
1121
+ undefined,
1122
+ undefined,
1123
+ { headers }
963
1124
  );
964
1125
 
1126
+ let responseData = response;
1127
+ if (headers) {
1128
+ responseData = response[0];
1129
+ }
1130
+
965
1131
  const {
966
1132
  error: res_error,
967
- } = ThemeModel.ThemesListingResponseSchema().validate(response, {
968
- abortEarly: false,
969
- allowUnknown: false,
970
- });
1133
+ } = ThemePlatformModel.ThemesListingResponseSchema().validate(
1134
+ responseData,
1135
+ { abortEarly: false, allowUnknown: false }
1136
+ );
971
1137
 
972
1138
  if (res_error) {
973
1139
  Logger({
974
1140
  level: "WARN",
975
- message: "Response Validation Warnnings for getThemeLibrary",
1141
+ message: `Response Validation Warnnings for platform > Theme > getThemeLibrary \n ${res_error}`,
976
1142
  });
977
- Logger({ level: "WARN", message: res_error });
978
1143
  }
979
1144
 
980
1145
  return response;
981
1146
  }
982
1147
 
983
1148
  /**
984
- * @param {Object} arg - Arg object.
985
- * @param {string} arg.themeId - Theme ID
986
- * @returns {Promise<UpgradableThemeSchema>} - Success response
1149
+ * @param {ThemePlatformApplicationValidator.IsUpgradableParam} arg - Arg object
1150
+ * @param {import("../PlatformAPIClient").Options} - Options
1151
+ * @returns {Promise<ThemePlatformModel.UpgradableThemeSchema>} - Success response
1152
+ * @name isUpgradable
987
1153
  * @summary: Checks if theme is upgradable
988
- * @description: There's always a possibility that new features get added to a theme. Use this API to check if the applied theme has an upgrade available.
1154
+ * @description: There's always a possibility that new features get added to a theme. Use this API to check if the applied theme has an upgrade available. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/isUpgradable/).
989
1155
  */
990
- async isUpgradable({ themeId } = {}) {
991
- const { error } = ThemeValidator.isUpgradable().validate(
1156
+ async isUpgradable({ themeId } = {}, { headers } = { headers: false }) {
1157
+ const { error } = ThemePlatformApplicationValidator.isUpgradable().validate(
992
1158
  {
993
1159
  themeId,
994
1160
  },
@@ -999,7 +1165,9 @@ class Theme {
999
1165
  }
1000
1166
 
1001
1167
  // Showing warrnings if extra unknown parameters are found
1002
- const { error: warrning } = ThemeValidator.isUpgradable().validate(
1168
+ const {
1169
+ error: warrning,
1170
+ } = ThemePlatformApplicationValidator.isUpgradable().validate(
1003
1171
  {
1004
1172
  themeId,
1005
1173
  },
@@ -1008,9 +1176,8 @@ class Theme {
1008
1176
  if (warrning) {
1009
1177
  Logger({
1010
1178
  level: "WARN",
1011
- message: "Parameter Validation warrnings for isUpgradable",
1179
+ message: `Parameter Validation warrnings for platform > Theme > isUpgradable \n ${warrning}`,
1012
1180
  });
1013
- Logger({ level: "WARN", message: warrning });
1014
1181
  }
1015
1182
 
1016
1183
  const query_params = {};
@@ -1020,12 +1187,19 @@ class Theme {
1020
1187
  "get",
1021
1188
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgradable`,
1022
1189
  query_params,
1023
- undefined
1190
+ undefined,
1191
+ undefined,
1192
+ { headers }
1024
1193
  );
1025
1194
 
1195
+ let responseData = response;
1196
+ if (headers) {
1197
+ responseData = response[0];
1198
+ }
1199
+
1026
1200
  const {
1027
1201
  error: res_error,
1028
- } = ThemeModel.UpgradableThemeSchema().validate(response, {
1202
+ } = ThemePlatformModel.UpgradableThemeSchema().validate(responseData, {
1029
1203
  abortEarly: false,
1030
1204
  allowUnknown: false,
1031
1205
  });
@@ -1033,23 +1207,23 @@ class Theme {
1033
1207
  if (res_error) {
1034
1208
  Logger({
1035
1209
  level: "WARN",
1036
- message: "Response Validation Warnnings for isUpgradable",
1210
+ message: `Response Validation Warnnings for platform > Theme > isUpgradable \n ${res_error}`,
1037
1211
  });
1038
- Logger({ level: "WARN", message: res_error });
1039
1212
  }
1040
1213
 
1041
1214
  return response;
1042
1215
  }
1043
1216
 
1044
1217
  /**
1045
- * @param {Object} arg - Arg object.
1046
- * @param {string} arg.themeId - ID allotted to the theme.
1047
- * @returns {Promise<ThemesSchema>} - Success response
1218
+ * @param {ThemePlatformApplicationValidator.PublishThemeParam} arg - Arg object
1219
+ * @param {import("../PlatformAPIClient").Options} - Options
1220
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
1221
+ * @name publishTheme
1048
1222
  * @summary: Publish a theme
1049
- * @description: Use this API to publish a theme that is either newly created or edited.
1223
+ * @description: Use this API to publish a theme that is either newly created or edited. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/publishTheme/).
1050
1224
  */
1051
- async publishTheme({ themeId } = {}) {
1052
- const { error } = ThemeValidator.publishTheme().validate(
1225
+ async publishTheme({ themeId } = {}, { headers } = { headers: false }) {
1226
+ const { error } = ThemePlatformApplicationValidator.publishTheme().validate(
1053
1227
  {
1054
1228
  themeId,
1055
1229
  },
@@ -1060,7 +1234,9 @@ class Theme {
1060
1234
  }
1061
1235
 
1062
1236
  // Showing warrnings if extra unknown parameters are found
1063
- const { error: warrning } = ThemeValidator.publishTheme().validate(
1237
+ const {
1238
+ error: warrning,
1239
+ } = ThemePlatformApplicationValidator.publishTheme().validate(
1064
1240
  {
1065
1241
  themeId,
1066
1242
  },
@@ -1069,9 +1245,8 @@ class Theme {
1069
1245
  if (warrning) {
1070
1246
  Logger({
1071
1247
  level: "WARN",
1072
- message: "Parameter Validation warrnings for publishTheme",
1248
+ message: `Parameter Validation warrnings for platform > Theme > publishTheme \n ${warrning}`,
1073
1249
  });
1074
- Logger({ level: "WARN", message: warrning });
1075
1250
  }
1076
1251
 
1077
1252
  const query_params = {};
@@ -1081,10 +1256,19 @@ class Theme {
1081
1256
  "put",
1082
1257
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
1083
1258
  query_params,
1084
- undefined
1259
+ undefined,
1260
+ undefined,
1261
+ { headers }
1085
1262
  );
1086
1263
 
1087
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1264
+ let responseData = response;
1265
+ if (headers) {
1266
+ responseData = response[0];
1267
+ }
1268
+
1269
+ const {
1270
+ error: res_error,
1271
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
1088
1272
  abortEarly: false,
1089
1273
  allowUnknown: false,
1090
1274
  });
@@ -1092,23 +1276,25 @@ class Theme {
1092
1276
  if (res_error) {
1093
1277
  Logger({
1094
1278
  level: "WARN",
1095
- message: "Response Validation Warnnings for publishTheme",
1279
+ message: `Response Validation Warnnings for platform > Theme > publishTheme \n ${res_error}`,
1096
1280
  });
1097
- Logger({ level: "WARN", message: res_error });
1098
1281
  }
1099
1282
 
1100
1283
  return response;
1101
1284
  }
1102
1285
 
1103
1286
  /**
1104
- * @param {Object} arg - Arg object.
1105
- * @param {string} arg.themeId - ID allotted to the theme.
1106
- * @returns {Promise<ThemesSchema>} - Success response
1287
+ * @param {ThemePlatformApplicationValidator.UnarchiveThemeParam} arg - Arg object
1288
+ * @param {import("../PlatformAPIClient").Options} - Options
1289
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
1290
+ * @name unarchiveTheme
1107
1291
  * @summary: Unarchive a theme
1108
- * @description: Use this API to restore an archived theme and bring it back for editing or publishing.
1292
+ * @description: Use this API to restore an archived theme and bring it back for editing or publishing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/unarchiveTheme/).
1109
1293
  */
1110
- async unarchiveTheme({ themeId } = {}) {
1111
- const { error } = ThemeValidator.unarchiveTheme().validate(
1294
+ async unarchiveTheme({ themeId } = {}, { headers } = { headers: false }) {
1295
+ const {
1296
+ error,
1297
+ } = ThemePlatformApplicationValidator.unarchiveTheme().validate(
1112
1298
  {
1113
1299
  themeId,
1114
1300
  },
@@ -1119,7 +1305,9 @@ class Theme {
1119
1305
  }
1120
1306
 
1121
1307
  // Showing warrnings if extra unknown parameters are found
1122
- const { error: warrning } = ThemeValidator.unarchiveTheme().validate(
1308
+ const {
1309
+ error: warrning,
1310
+ } = ThemePlatformApplicationValidator.unarchiveTheme().validate(
1123
1311
  {
1124
1312
  themeId,
1125
1313
  },
@@ -1128,9 +1316,8 @@ class Theme {
1128
1316
  if (warrning) {
1129
1317
  Logger({
1130
1318
  level: "WARN",
1131
- message: "Parameter Validation warrnings for unarchiveTheme",
1319
+ message: `Parameter Validation warrnings for platform > Theme > unarchiveTheme \n ${warrning}`,
1132
1320
  });
1133
- Logger({ level: "WARN", message: warrning });
1134
1321
  }
1135
1322
 
1136
1323
  const query_params = {};
@@ -1140,10 +1327,19 @@ class Theme {
1140
1327
  "put",
1141
1328
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
1142
1329
  query_params,
1143
- undefined
1330
+ undefined,
1331
+ undefined,
1332
+ { headers }
1144
1333
  );
1145
1334
 
1146
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1335
+ let responseData = response;
1336
+ if (headers) {
1337
+ responseData = response[0];
1338
+ }
1339
+
1340
+ const {
1341
+ error: res_error,
1342
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
1147
1343
  abortEarly: false,
1148
1344
  allowUnknown: false,
1149
1345
  });
@@ -1151,23 +1347,25 @@ class Theme {
1151
1347
  if (res_error) {
1152
1348
  Logger({
1153
1349
  level: "WARN",
1154
- message: "Response Validation Warnnings for unarchiveTheme",
1350
+ message: `Response Validation Warnnings for platform > Theme > unarchiveTheme \n ${res_error}`,
1155
1351
  });
1156
- Logger({ level: "WARN", message: res_error });
1157
1352
  }
1158
1353
 
1159
1354
  return response;
1160
1355
  }
1161
1356
 
1162
1357
  /**
1163
- * @param {Object} arg - Arg object.
1164
- * @param {string} arg.themeId - ID allotted to the theme.
1165
- * @returns {Promise<ThemesSchema>} - Success response
1358
+ * @param {ThemePlatformApplicationValidator.UnpublishThemeParam} arg - Arg object
1359
+ * @param {import("../PlatformAPIClient").Options} - Options
1360
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
1361
+ * @name unpublishTheme
1166
1362
  * @summary: Unpublish a theme
1167
- * @description: Use this API to remove an existing theme from the list of available themes.
1363
+ * @description: Use this API to remove an existing theme from the list of available themes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/unpublishTheme/).
1168
1364
  */
1169
- async unpublishTheme({ themeId } = {}) {
1170
- const { error } = ThemeValidator.unpublishTheme().validate(
1365
+ async unpublishTheme({ themeId } = {}, { headers } = { headers: false }) {
1366
+ const {
1367
+ error,
1368
+ } = ThemePlatformApplicationValidator.unpublishTheme().validate(
1171
1369
  {
1172
1370
  themeId,
1173
1371
  },
@@ -1178,7 +1376,9 @@ class Theme {
1178
1376
  }
1179
1377
 
1180
1378
  // Showing warrnings if extra unknown parameters are found
1181
- const { error: warrning } = ThemeValidator.unpublishTheme().validate(
1379
+ const {
1380
+ error: warrning,
1381
+ } = ThemePlatformApplicationValidator.unpublishTheme().validate(
1182
1382
  {
1183
1383
  themeId,
1184
1384
  },
@@ -1187,9 +1387,8 @@ class Theme {
1187
1387
  if (warrning) {
1188
1388
  Logger({
1189
1389
  level: "WARN",
1190
- message: "Parameter Validation warrnings for unpublishTheme",
1390
+ message: `Parameter Validation warrnings for platform > Theme > unpublishTheme \n ${warrning}`,
1191
1391
  });
1192
- Logger({ level: "WARN", message: warrning });
1193
1392
  }
1194
1393
 
1195
1394
  const query_params = {};
@@ -1199,10 +1398,19 @@ class Theme {
1199
1398
  "put",
1200
1399
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
1201
1400
  query_params,
1202
- undefined
1401
+ undefined,
1402
+ undefined,
1403
+ { headers }
1203
1404
  );
1204
1405
 
1205
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1406
+ let responseData = response;
1407
+ if (headers) {
1408
+ responseData = response[0];
1409
+ }
1410
+
1411
+ const {
1412
+ error: res_error,
1413
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
1206
1414
  abortEarly: false,
1207
1415
  allowUnknown: false,
1208
1416
  });
@@ -1210,24 +1418,30 @@ class Theme {
1210
1418
  if (res_error) {
1211
1419
  Logger({
1212
1420
  level: "WARN",
1213
- message: "Response Validation Warnnings for unpublishTheme",
1421
+ message: `Response Validation Warnnings for platform > Theme > unpublishTheme \n ${res_error}`,
1214
1422
  });
1215
- Logger({ level: "WARN", message: res_error });
1216
1423
  }
1217
1424
 
1218
1425
  return response;
1219
1426
  }
1220
1427
 
1221
1428
  /**
1222
- * @param {Object} arg - Arg object.
1223
- * @param {string} arg.themeId - ID of the theme to be retrieved
1224
- * @param {AllAvailablePageSchema} arg.body
1225
- * @returns {Promise<AllAvailablePageSchema>} - Success response
1429
+ * @param {ThemePlatformApplicationValidator.UpdateMultiplePagesParam} arg
1430
+ * - Arg object
1431
+ *
1432
+ * @param {import("../PlatformAPIClient").Options} - Options
1433
+ * @returns {Promise<ThemePlatformModel.AllAvailablePageSchema>} - Success response
1434
+ * @name updateMultiplePages
1226
1435
  * @summary: Update multiple pages of a theme
1227
- * @description: Use this API to update multiple pages of a theme by its ID.
1436
+ * @description: Use this API to update multiple pages of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateMultiplePages/).
1228
1437
  */
1229
- async updateMultiplePages({ themeId, body } = {}) {
1230
- const { error } = ThemeValidator.updateMultiplePages().validate(
1438
+ async updateMultiplePages(
1439
+ { themeId, body } = {},
1440
+ { headers } = { headers: false }
1441
+ ) {
1442
+ const {
1443
+ error,
1444
+ } = ThemePlatformApplicationValidator.updateMultiplePages().validate(
1231
1445
  {
1232
1446
  themeId,
1233
1447
  body,
@@ -1239,7 +1453,9 @@ class Theme {
1239
1453
  }
1240
1454
 
1241
1455
  // Showing warrnings if extra unknown parameters are found
1242
- const { error: warrning } = ThemeValidator.updateMultiplePages().validate(
1456
+ const {
1457
+ error: warrning,
1458
+ } = ThemePlatformApplicationValidator.updateMultiplePages().validate(
1243
1459
  {
1244
1460
  themeId,
1245
1461
  body,
@@ -1249,9 +1465,8 @@ class Theme {
1249
1465
  if (warrning) {
1250
1466
  Logger({
1251
1467
  level: "WARN",
1252
- message: "Parameter Validation warrnings for updateMultiplePages",
1468
+ message: `Parameter Validation warrnings for platform > Theme > updateMultiplePages \n ${warrning}`,
1253
1469
  });
1254
- Logger({ level: "WARN", message: warrning });
1255
1470
  }
1256
1471
 
1257
1472
  const query_params = {};
@@ -1261,12 +1476,19 @@ class Theme {
1261
1476
  "put",
1262
1477
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
1263
1478
  query_params,
1264
- body
1479
+ body,
1480
+ undefined,
1481
+ { headers }
1265
1482
  );
1266
1483
 
1484
+ let responseData = response;
1485
+ if (headers) {
1486
+ responseData = response[0];
1487
+ }
1488
+
1267
1489
  const {
1268
1490
  error: res_error,
1269
- } = ThemeModel.AllAvailablePageSchema().validate(response, {
1491
+ } = ThemePlatformModel.AllAvailablePageSchema().validate(responseData, {
1270
1492
  abortEarly: false,
1271
1493
  allowUnknown: false,
1272
1494
  });
@@ -1274,25 +1496,26 @@ class Theme {
1274
1496
  if (res_error) {
1275
1497
  Logger({
1276
1498
  level: "WARN",
1277
- message: "Response Validation Warnnings for updateMultiplePages",
1499
+ message: `Response Validation Warnnings for platform > Theme > updateMultiplePages \n ${res_error}`,
1278
1500
  });
1279
- Logger({ level: "WARN", message: res_error });
1280
1501
  }
1281
1502
 
1282
1503
  return response;
1283
1504
  }
1284
1505
 
1285
1506
  /**
1286
- * @param {Object} arg - Arg object.
1287
- * @param {string} arg.themeId - ID of the theme
1288
- * @param {string} arg.pageValue - Value of the page to be updated
1289
- * @param {AvailablePageSchema} arg.body
1290
- * @returns {Promise<AvailablePageSchema>} - Success response
1507
+ * @param {ThemePlatformApplicationValidator.UpdatePageParam} arg - Arg object
1508
+ * @param {import("../PlatformAPIClient").Options} - Options
1509
+ * @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
1510
+ * @name updatePage
1291
1511
  * @summary: Updates a page
1292
- * @description: Use this API to update a page for a theme by its ID.
1512
+ * @description: Use this API to update a page for a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updatePage/).
1293
1513
  */
1294
- async updatePage({ themeId, pageValue, body } = {}) {
1295
- const { error } = ThemeValidator.updatePage().validate(
1514
+ async updatePage(
1515
+ { themeId, pageValue, body } = {},
1516
+ { headers } = { headers: false }
1517
+ ) {
1518
+ const { error } = ThemePlatformApplicationValidator.updatePage().validate(
1296
1519
  {
1297
1520
  themeId,
1298
1521
  pageValue,
@@ -1305,7 +1528,9 @@ class Theme {
1305
1528
  }
1306
1529
 
1307
1530
  // Showing warrnings if extra unknown parameters are found
1308
- const { error: warrning } = ThemeValidator.updatePage().validate(
1531
+ const {
1532
+ error: warrning,
1533
+ } = ThemePlatformApplicationValidator.updatePage().validate(
1309
1534
  {
1310
1535
  themeId,
1311
1536
  pageValue,
@@ -1316,9 +1541,8 @@ class Theme {
1316
1541
  if (warrning) {
1317
1542
  Logger({
1318
1543
  level: "WARN",
1319
- message: "Parameter Validation warrnings for updatePage",
1544
+ message: `Parameter Validation warrnings for platform > Theme > updatePage \n ${warrning}`,
1320
1545
  });
1321
- Logger({ level: "WARN", message: warrning });
1322
1546
  }
1323
1547
 
1324
1548
  const query_params = {};
@@ -1328,12 +1552,19 @@ class Theme {
1328
1552
  "put",
1329
1553
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
1330
1554
  query_params,
1331
- body
1555
+ body,
1556
+ undefined,
1557
+ { headers }
1332
1558
  );
1333
1559
 
1560
+ let responseData = response;
1561
+ if (headers) {
1562
+ responseData = response[0];
1563
+ }
1564
+
1334
1565
  const {
1335
1566
  error: res_error,
1336
- } = ThemeModel.AvailablePageSchema().validate(response, {
1567
+ } = ThemePlatformModel.AvailablePageSchema().validate(responseData, {
1337
1568
  abortEarly: false,
1338
1569
  allowUnknown: false,
1339
1570
  });
@@ -1341,24 +1572,23 @@ class Theme {
1341
1572
  if (res_error) {
1342
1573
  Logger({
1343
1574
  level: "WARN",
1344
- message: "Response Validation Warnnings for updatePage",
1575
+ message: `Response Validation Warnnings for platform > Theme > updatePage \n ${res_error}`,
1345
1576
  });
1346
- Logger({ level: "WARN", message: res_error });
1347
1577
  }
1348
1578
 
1349
1579
  return response;
1350
1580
  }
1351
1581
 
1352
1582
  /**
1353
- * @param {Object} arg - Arg object.
1354
- * @param {string} arg.themeId - ID allotted to the theme.
1355
- * @param {ThemesSchema} arg.body
1356
- * @returns {Promise<ThemesSchema>} - Success response
1583
+ * @param {ThemePlatformApplicationValidator.UpdateThemeParam} arg - Arg object
1584
+ * @param {import("../PlatformAPIClient").Options} - Options
1585
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
1586
+ * @name updateTheme
1357
1587
  * @summary: Update a theme
1358
- * @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more.
1588
+ * @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateTheme/).
1359
1589
  */
1360
- async updateTheme({ themeId, body } = {}) {
1361
- const { error } = ThemeValidator.updateTheme().validate(
1590
+ async updateTheme({ themeId, body } = {}, { headers } = { headers: false }) {
1591
+ const { error } = ThemePlatformApplicationValidator.updateTheme().validate(
1362
1592
  {
1363
1593
  themeId,
1364
1594
  body,
@@ -1370,7 +1600,9 @@ class Theme {
1370
1600
  }
1371
1601
 
1372
1602
  // Showing warrnings if extra unknown parameters are found
1373
- const { error: warrning } = ThemeValidator.updateTheme().validate(
1603
+ const {
1604
+ error: warrning,
1605
+ } = ThemePlatformApplicationValidator.updateTheme().validate(
1374
1606
  {
1375
1607
  themeId,
1376
1608
  body,
@@ -1380,9 +1612,8 @@ class Theme {
1380
1612
  if (warrning) {
1381
1613
  Logger({
1382
1614
  level: "WARN",
1383
- message: "Parameter Validation warrnings for updateTheme",
1615
+ message: `Parameter Validation warrnings for platform > Theme > updateTheme \n ${warrning}`,
1384
1616
  });
1385
- Logger({ level: "WARN", message: warrning });
1386
1617
  }
1387
1618
 
1388
1619
  const query_params = {};
@@ -1392,10 +1623,19 @@ class Theme {
1392
1623
  "put",
1393
1624
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
1394
1625
  query_params,
1395
- body
1626
+ body,
1627
+ undefined,
1628
+ { headers }
1396
1629
  );
1397
1630
 
1398
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1631
+ let responseData = response;
1632
+ if (headers) {
1633
+ responseData = response[0];
1634
+ }
1635
+
1636
+ const {
1637
+ error: res_error,
1638
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
1399
1639
  abortEarly: false,
1400
1640
  allowUnknown: false,
1401
1641
  });
@@ -1403,23 +1643,23 @@ class Theme {
1403
1643
  if (res_error) {
1404
1644
  Logger({
1405
1645
  level: "WARN",
1406
- message: "Response Validation Warnnings for updateTheme",
1646
+ message: `Response Validation Warnnings for platform > Theme > updateTheme \n ${res_error}`,
1407
1647
  });
1408
- Logger({ level: "WARN", message: res_error });
1409
1648
  }
1410
1649
 
1411
1650
  return response;
1412
1651
  }
1413
1652
 
1414
1653
  /**
1415
- * @param {Object} arg - Arg object.
1416
- * @param {string} arg.themeId - ID allotted to the theme.
1417
- * @returns {Promise<ThemesSchema>} - Success response
1654
+ * @param {ThemePlatformApplicationValidator.UpgradeThemeParam} arg - Arg object
1655
+ * @param {import("../PlatformAPIClient").Options} - Options
1656
+ * @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
1657
+ * @name upgradeTheme
1418
1658
  * @summary: Upgrade a theme
1419
- * @description: Use this API to upgrade the current theme to its latest version.
1659
+ * @description: Use this API to upgrade the current theme to its latest version. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/upgradeTheme/).
1420
1660
  */
1421
- async upgradeTheme({ themeId } = {}) {
1422
- const { error } = ThemeValidator.upgradeTheme().validate(
1661
+ async upgradeTheme({ themeId } = {}, { headers } = { headers: false }) {
1662
+ const { error } = ThemePlatformApplicationValidator.upgradeTheme().validate(
1423
1663
  {
1424
1664
  themeId,
1425
1665
  },
@@ -1430,7 +1670,9 @@ class Theme {
1430
1670
  }
1431
1671
 
1432
1672
  // Showing warrnings if extra unknown parameters are found
1433
- const { error: warrning } = ThemeValidator.upgradeTheme().validate(
1673
+ const {
1674
+ error: warrning,
1675
+ } = ThemePlatformApplicationValidator.upgradeTheme().validate(
1434
1676
  {
1435
1677
  themeId,
1436
1678
  },
@@ -1439,9 +1681,8 @@ class Theme {
1439
1681
  if (warrning) {
1440
1682
  Logger({
1441
1683
  level: "WARN",
1442
- message: "Parameter Validation warrnings for upgradeTheme",
1684
+ message: `Parameter Validation warrnings for platform > Theme > upgradeTheme \n ${warrning}`,
1443
1685
  });
1444
- Logger({ level: "WARN", message: warrning });
1445
1686
  }
1446
1687
 
1447
1688
  const query_params = {};
@@ -1451,10 +1692,19 @@ class Theme {
1451
1692
  "put",
1452
1693
  `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgrade`,
1453
1694
  query_params,
1454
- undefined
1695
+ undefined,
1696
+ undefined,
1697
+ { headers }
1455
1698
  );
1456
1699
 
1457
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1700
+ let responseData = response;
1701
+ if (headers) {
1702
+ responseData = response[0];
1703
+ }
1704
+
1705
+ const {
1706
+ error: res_error,
1707
+ } = ThemePlatformModel.ThemesSchema().validate(responseData, {
1458
1708
  abortEarly: false,
1459
1709
  allowUnknown: false,
1460
1710
  });
@@ -1462,9 +1712,8 @@ class Theme {
1462
1712
  if (res_error) {
1463
1713
  Logger({
1464
1714
  level: "WARN",
1465
- message: "Response Validation Warnnings for upgradeTheme",
1715
+ message: `Response Validation Warnnings for platform > Theme > upgradeTheme \n ${res_error}`,
1466
1716
  });
1467
- Logger({ level: "WARN", message: res_error });
1468
1717
  }
1469
1718
 
1470
1719
  return response;