@gofynd/fdk-client-javascript 0.1.37 → 1.0.1

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 (353) hide show
  1. package/README.md +24 -0
  2. package/application.d.ts +2 -1
  3. package/application.js +2 -1
  4. package/documentation/application/CART.md +315 -289
  5. package/documentation/application/CATALOG.md +438 -415
  6. package/documentation/application/FILESTORAGE.md +2 -0
  7. package/documentation/application/LEAD.md +18 -18
  8. package/documentation/application/LOGISTIC.md +45 -45
  9. package/documentation/application/ORDER.md +277 -277
  10. package/documentation/application/PAYMENT.md +251 -251
  11. package/documentation/application/POSCART.md +318 -292
  12. package/documentation/application/REWARDS.md +1 -0
  13. package/documentation/application/USER.md +19 -14
  14. package/documentation/platform/CART.md +465 -462
  15. package/documentation/platform/CATALOG.md +2792 -2711
  16. package/documentation/platform/COMPANYPROFILE.md +200 -362
  17. package/documentation/platform/DISCOUNT.md +86 -0
  18. package/documentation/platform/FILESTORAGE.md +2 -0
  19. package/documentation/platform/LEAD.md +60 -60
  20. package/documentation/platform/ORDER.md +1451 -1654
  21. package/documentation/platform/PAYMENT.md +94 -94
  22. package/documentation/platform/REWARDS.md +145 -0
  23. package/documentation/platform/USER.md +24 -14
  24. package/index.d.ts +4 -1
  25. package/index.js +13 -4
  26. package/package.json +9 -9
  27. package/platform.d.ts +2 -1
  28. package/platform.js +3 -2
  29. package/public.d.ts +1 -0
  30. package/public.js +3 -2
  31. package/sdk/application/ApplicationAPIClient.js +3 -1
  32. package/sdk/application/ApplicationClient.d.ts +16 -16
  33. package/sdk/application/ApplicationClient.js +32 -16
  34. package/sdk/application/ApplicationConfig.js +3 -2
  35. package/sdk/application/ApplicationModels.d.ts +0 -832
  36. package/sdk/application/ApplicationModels.js +3 -10574
  37. package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
  38. package/sdk/application/{client → Cart}/CartApplicationClient.js +316 -8
  39. package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
  40. package/sdk/application/Cart/CartApplicationModel.js +1136 -0
  41. package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +17 -12
  42. package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
  43. package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +389 -8
  44. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
  45. package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
  46. package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +4 -1
  47. package/sdk/application/{client → Common}/CommonApplicationClient.js +24 -2
  48. package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
  49. package/sdk/application/Common/CommonApplicationModel.js +228 -0
  50. package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +3 -1
  51. package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +43 -2
  52. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
  53. package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
  54. package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +5 -3
  55. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +202 -2
  56. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
  57. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
  58. package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +4 -2
  59. package/sdk/application/{client → Content}/ContentApplicationClient.js +217 -2
  60. package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
  61. package/sdk/application/Content/ContentApplicationModel.js +1349 -0
  62. package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +3 -1
  63. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +35 -2
  64. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
  65. package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
  66. package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +6 -4
  67. package/sdk/application/{client → Lead}/LeadApplicationClient.js +83 -2
  68. package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
  69. package/sdk/application/Lead/LeadApplicationModel.js +690 -0
  70. package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +6 -4
  71. package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +46 -2
  72. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
  73. package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
  74. package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +5 -3
  75. package/sdk/application/{client → Order}/OrderApplicationClient.js +148 -2
  76. package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
  77. package/sdk/application/Order/OrderApplicationModel.js +872 -0
  78. package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +5 -3
  79. package/sdk/application/{client → Payment}/PaymentApplicationClient.js +530 -2
  80. package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
  81. package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
  82. package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +25 -23
  83. package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
  84. package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +343 -8
  85. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
  86. package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
  87. package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +18 -13
  88. package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +83 -2
  89. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
  90. package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
  91. package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +6 -4
  92. package/sdk/application/{client → Share}/ShareApplicationClient.js +89 -2
  93. package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
  94. package/sdk/application/Share/ShareApplicationModel.js +178 -0
  95. package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +4 -2
  96. package/sdk/application/{client → Theme}/ThemeApplicationClient.js +46 -2
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
  98. package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
  99. package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +3 -1
  100. package/sdk/application/{client → User}/UserApplicationClient.js +407 -2
  101. package/sdk/application/User/UserApplicationModel.d.ts +95 -0
  102. package/sdk/application/User/UserApplicationModel.js +998 -0
  103. package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +31 -29
  104. package/sdk/application/index.d.ts +18 -0
  105. package/sdk/application/index.js +33 -0
  106. package/sdk/common/AxiosHelper.js +23 -10
  107. package/sdk/common/Logger.d.ts +2 -0
  108. package/sdk/common/Logger.js +6 -0
  109. package/sdk/common/curlHelper.d.ts +2 -0
  110. package/sdk/common/curlHelper.js +95 -0
  111. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +399 -0
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
  115. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +60 -2
  116. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
  118. package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
  119. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +48 -2
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
  122. package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
  123. package/sdk/platform/{client → Billing}/BillingPlatformClient.js +162 -2
  124. package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
  125. package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
  126. package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
  127. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
  128. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1001 -0
  129. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
  130. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
  131. package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
  132. package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
  133. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
  134. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2927 -0
  135. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
  137. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +1402 -349
  138. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +317 -0
  139. package/sdk/platform/Catalog/CatalogPlatformModel.js +4702 -0
  140. package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +92 -91
  141. package/sdk/platform/{client → Common}/CommonPlatformClient.js +28 -2
  142. package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
  143. package/sdk/platform/Common/CommonPlatformModel.js +228 -0
  144. package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
  145. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
  146. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2243 -0
  147. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
  148. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
  149. package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +17 -2
  150. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
  151. package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
  152. package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
  153. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
  154. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +176 -28
  155. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
  156. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
  157. package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
  158. package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
  159. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
  160. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1322 -0
  161. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
  162. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
  163. package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +284 -2
  164. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
  165. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
  166. package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
  167. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
  168. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3074 -0
  169. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
  170. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
  171. package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
  172. package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
  173. package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
  174. package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +187 -2
  175. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
  176. package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
  177. package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
  178. package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
  179. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
  180. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +301 -0
  181. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
  182. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
  183. package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +78 -2
  184. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
  185. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
  186. package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
  187. package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +163 -2
  188. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
  189. package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
  190. package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
  191. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
  192. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +559 -0
  193. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
  194. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
  195. package/sdk/platform/{client → Lead}/LeadPlatformClient.js +142 -2
  196. package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
  197. package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
  198. package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
  199. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
  200. package/sdk/platform/Order/OrderPlatformApplicationClient.js +207 -0
  201. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
  202. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
  203. package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +24 -55
  204. package/sdk/platform/{client → Order}/OrderPlatformClient.js +693 -146
  205. package/sdk/platform/Order/OrderPlatformModel.d.ts +222 -0
  206. package/sdk/platform/Order/OrderPlatformModel.js +3466 -0
  207. package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +2 -3
  208. package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +32 -48
  209. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
  210. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +100 -0
  211. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
  212. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
  213. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
  214. package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
  215. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
  216. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +498 -0
  217. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
  218. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
  219. package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +141 -2
  220. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  221. package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
  222. package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
  223. package/sdk/platform/PlatformAPIClient.js +2 -1
  224. package/sdk/platform/PlatformApplicationClient.d.ts +2824 -18486
  225. package/sdk/platform/PlatformApplicationClient.js +3772 -13928
  226. package/sdk/platform/PlatformClient.d.ts +2824 -2881
  227. package/sdk/platform/PlatformClient.js +3710 -3145
  228. package/sdk/platform/PlatformConfig.js +2 -1
  229. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
  230. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +597 -0
  231. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
  232. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
  233. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
  234. package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
  235. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
  236. package/sdk/platform/Share/SharePlatformApplicationClient.js +235 -0
  237. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
  238. package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
  239. package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
  240. package/sdk/platform/Share/SharePlatformModel.js +170 -0
  241. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
  242. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +997 -0
  243. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
  244. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
  245. package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
  246. package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
  247. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
  248. package/sdk/platform/User/UserPlatformApplicationClient.js +506 -0
  249. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
  250. package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
  251. package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
  252. package/sdk/platform/User/UserPlatformModel.js +998 -0
  253. package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +92 -2
  254. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
  255. package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
  256. package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
  257. package/sdk/platform/index.d.ts +24 -0
  258. package/sdk/platform/index.js +45 -0
  259. package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +26 -1
  260. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
  261. package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
  262. package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +3 -1
  263. package/sdk/public/{client → Inventory}/InventoryPublicClient.js +76 -1
  264. package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
  265. package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
  266. package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +4 -2
  267. package/sdk/public/PublicClient.d.ts +3 -3
  268. package/sdk/public/PublicClient.js +8 -3
  269. package/sdk/public/{client → Webhook}/WebhookPublicClient.js +30 -1
  270. package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
  271. package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
  272. package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +4 -2
  273. package/sdk/public/index.d.ts +5 -0
  274. package/sdk/public/index.js +7 -0
  275. package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
  276. package/sdk/platform/PlatformApplicationModels.js +0 -22658
  277. package/sdk/platform/PlatformModels.d.ts +0 -1477
  278. package/sdk/platform/PlatformModels.js +0 -20646
  279. package/sdk/platform/models/CartValidator.d.ts +0 -0
  280. package/sdk/platform/models/CartValidator.js +0 -0
  281. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  282. package/sdk/platform/models/ContentValidator.js +0 -0
  283. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  284. package/sdk/platform/models/PartnerValidator.js +0 -0
  285. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  286. package/sdk/platform/models/RewardsValidator.js +0 -0
  287. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  288. package/sdk/platform/models/ShareValidator.js +0 -0
  289. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  290. package/sdk/platform/models/ThemeValidator.js +0 -0
  291. package/sdk/platform/models/UserValidator.d.ts +0 -0
  292. package/sdk/platform/models/UserValidator.js +0 -0
  293. package/sdk/public/PublicModels.d.ts +0 -50
  294. package/sdk/public/PublicModels.js +0 -712
  295. package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
  296. package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
  297. package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
  298. package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
  299. package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
  300. package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
  301. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
  302. package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
  303. package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
  304. package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
  305. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
  306. package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
  307. package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
  308. package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
  309. package/sdk/application/{client → Logistic}/LogisticApplicationClient.d.ts +0 -0
  310. package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +0 -0
  311. package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
  312. package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
  313. package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
  314. package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
  315. package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
  316. package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
  317. package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
  318. package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
  319. package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
  320. package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
  321. package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
  322. package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
  323. package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
  324. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
  325. package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
  326. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
  327. package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
  328. package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
  329. package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
  330. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +149 -149
  331. package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +21 -21
  332. /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
  333. /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
  334. /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
  335. /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
  336. /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
  337. /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
  338. /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
  339. /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
  340. /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
  341. /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
  342. /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
  343. /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
  344. /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
  345. /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
  346. /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
  347. /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
  348. /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
  349. /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
  350. /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
  351. /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
  352. /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
  353. /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
@@ -0,0 +1,997 @@
1
+ const Paginator = require("../../common/Paginator");
2
+ const PlatformAPIClient = require("../PlatformAPIClient");
3
+ const { FDKClientValidationError } = require("../../common/FDKError");
4
+ const ThemeValidator = require("./ThemePlatformApplicationValidator");
5
+
6
+ class Theme {
7
+ constructor(config, applicationId) {
8
+ this.config = config;
9
+ this.applicationId = applicationId;
10
+ }
11
+
12
+ /**
13
+ * @param {Object} arg - Arg object.
14
+ * @param {string} arg.themeId - ID of the theme to be retrieved
15
+ * @summary: Get all pages of a theme
16
+ * @description: Use this API to retrieve all the available pages of a theme by its ID.
17
+ */
18
+ getAllPages({ themeId } = {}) {
19
+ const { error } = ThemeValidator.getAllPages().validate(
20
+ {
21
+ themeId,
22
+ },
23
+ { abortEarly: false, allowUnknown: true }
24
+ );
25
+ if (error) {
26
+ return Promise.reject(new FDKClientValidationError(error));
27
+ }
28
+
29
+ // Showing warrnings if extra unknown parameters are found
30
+ const { error: warrning } = ThemeValidator.getAllPages().validate(
31
+ {
32
+ themeId,
33
+ },
34
+ { abortEarly: false, allowUnknown: false }
35
+ );
36
+ if (warrning) {
37
+ console.log("Parameter Validation warrnings for getAllPages");
38
+ console.log(warrning);
39
+ }
40
+
41
+ const query_params = {};
42
+
43
+ return PlatformAPIClient.execute(
44
+ this.config,
45
+ "get",
46
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
47
+ query_params,
48
+ undefined
49
+ );
50
+ }
51
+
52
+ /**
53
+ * @param {Object} arg - Arg object.
54
+ * @param {string} arg.themeId - ID of the theme
55
+ * @param {AvailablePageSchema} arg.body
56
+ * @summary: Create a page
57
+ * @description: Use this API to create a page for a theme by its ID.
58
+ */
59
+ createPage({ themeId, body } = {}) {
60
+ const { error } = ThemeValidator.createPage().validate(
61
+ {
62
+ themeId,
63
+ body,
64
+ },
65
+ { abortEarly: false, allowUnknown: true }
66
+ );
67
+ if (error) {
68
+ return Promise.reject(new FDKClientValidationError(error));
69
+ }
70
+
71
+ // Showing warrnings if extra unknown parameters are found
72
+ const { error: warrning } = ThemeValidator.createPage().validate(
73
+ {
74
+ themeId,
75
+ body,
76
+ },
77
+ { abortEarly: false, allowUnknown: false }
78
+ );
79
+ if (warrning) {
80
+ console.log("Parameter Validation warrnings for createPage");
81
+ console.log(warrning);
82
+ }
83
+
84
+ const query_params = {};
85
+
86
+ return PlatformAPIClient.execute(
87
+ this.config,
88
+ "post",
89
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
90
+ query_params,
91
+ body
92
+ );
93
+ }
94
+
95
+ /**
96
+ * @param {Object} arg - Arg object.
97
+ * @param {string} arg.themeId - ID of the theme to be retrieved
98
+ * @param {AllAvailablePageSchema} arg.body
99
+ * @summary: Update multiple pages of a theme
100
+ * @description: Use this API to update multiple pages of a theme by its ID.
101
+ */
102
+ updateMultiplePages({ themeId, body } = {}) {
103
+ const { error } = ThemeValidator.updateMultiplePages().validate(
104
+ {
105
+ themeId,
106
+ body,
107
+ },
108
+ { abortEarly: false, allowUnknown: true }
109
+ );
110
+ if (error) {
111
+ return Promise.reject(new FDKClientValidationError(error));
112
+ }
113
+
114
+ // Showing warrnings if extra unknown parameters are found
115
+ const { error: warrning } = ThemeValidator.updateMultiplePages().validate(
116
+ {
117
+ themeId,
118
+ body,
119
+ },
120
+ { abortEarly: false, allowUnknown: false }
121
+ );
122
+ if (warrning) {
123
+ console.log("Parameter Validation warrnings for updateMultiplePages");
124
+ console.log(warrning);
125
+ }
126
+
127
+ const query_params = {};
128
+
129
+ return PlatformAPIClient.execute(
130
+ this.config,
131
+ "put",
132
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
133
+ query_params,
134
+ body
135
+ );
136
+ }
137
+
138
+ /**
139
+ * @param {Object} arg - Arg object.
140
+ * @param {string} arg.themeId - ID of the theme to be retrieved
141
+ * @param {string} arg.pageValue - Value of the page to be retrieved
142
+ * @summary: Get page of a theme
143
+ * @description: Use this API to retrieve a page of a theme.
144
+ */
145
+ getPage({ themeId, pageValue } = {}) {
146
+ const { error } = ThemeValidator.getPage().validate(
147
+ {
148
+ themeId,
149
+ pageValue,
150
+ },
151
+ { abortEarly: false, allowUnknown: true }
152
+ );
153
+ if (error) {
154
+ return Promise.reject(new FDKClientValidationError(error));
155
+ }
156
+
157
+ // Showing warrnings if extra unknown parameters are found
158
+ const { error: warrning } = ThemeValidator.getPage().validate(
159
+ {
160
+ themeId,
161
+ pageValue,
162
+ },
163
+ { abortEarly: false, allowUnknown: false }
164
+ );
165
+ if (warrning) {
166
+ console.log("Parameter Validation warrnings for getPage");
167
+ console.log(warrning);
168
+ }
169
+
170
+ const query_params = {};
171
+
172
+ return PlatformAPIClient.execute(
173
+ this.config,
174
+ "get",
175
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
176
+ query_params,
177
+ undefined
178
+ );
179
+ }
180
+
181
+ /**
182
+ * @param {Object} arg - Arg object.
183
+ * @param {string} arg.themeId - ID of the theme
184
+ * @param {string} arg.pageValue - Value of the page to be updated
185
+ * @param {AvailablePageSchema} arg.body
186
+ * @summary: Updates a page
187
+ * @description: Use this API to update a page for a theme by its ID.
188
+ */
189
+ updatePage({ themeId, pageValue, body } = {}) {
190
+ const { error } = ThemeValidator.updatePage().validate(
191
+ {
192
+ themeId,
193
+ pageValue,
194
+ body,
195
+ },
196
+ { abortEarly: false, allowUnknown: true }
197
+ );
198
+ if (error) {
199
+ return Promise.reject(new FDKClientValidationError(error));
200
+ }
201
+
202
+ // Showing warrnings if extra unknown parameters are found
203
+ const { error: warrning } = ThemeValidator.updatePage().validate(
204
+ {
205
+ themeId,
206
+ pageValue,
207
+ body,
208
+ },
209
+ { abortEarly: false, allowUnknown: false }
210
+ );
211
+ if (warrning) {
212
+ console.log("Parameter Validation warrnings for updatePage");
213
+ console.log(warrning);
214
+ }
215
+
216
+ const query_params = {};
217
+
218
+ return PlatformAPIClient.execute(
219
+ this.config,
220
+ "put",
221
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
222
+ query_params,
223
+ body
224
+ );
225
+ }
226
+
227
+ /**
228
+ * @param {Object} arg - Arg object.
229
+ * @param {string} arg.themeId - ID of the theme
230
+ * @param {string} arg.pageValue - Value of the page to be updated
231
+ * @summary: Deletes a page
232
+ * @description: Use this API to delete a page for a theme by its ID and page_value.
233
+ */
234
+ deletePage({ themeId, pageValue } = {}) {
235
+ const { error } = ThemeValidator.deletePage().validate(
236
+ {
237
+ themeId,
238
+ pageValue,
239
+ },
240
+ { abortEarly: false, allowUnknown: true }
241
+ );
242
+ if (error) {
243
+ return Promise.reject(new FDKClientValidationError(error));
244
+ }
245
+
246
+ // Showing warrnings if extra unknown parameters are found
247
+ const { error: warrning } = ThemeValidator.deletePage().validate(
248
+ {
249
+ themeId,
250
+ pageValue,
251
+ },
252
+ { abortEarly: false, allowUnknown: false }
253
+ );
254
+ if (warrning) {
255
+ console.log("Parameter Validation warrnings for deletePage");
256
+ console.log(warrning);
257
+ }
258
+
259
+ const query_params = {};
260
+
261
+ return PlatformAPIClient.execute(
262
+ this.config,
263
+ "delete",
264
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
265
+ query_params,
266
+ undefined
267
+ );
268
+ }
269
+
270
+ /**
271
+ * @param {Object} arg - Arg object.
272
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
273
+ * page. Default value is 10.
274
+ * @param {number} [arg.pageNo] - The page number to navigate through the
275
+ * given set of results. Default value is 1.
276
+ * @summary: Get a list of themes from the theme library
277
+ * @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.
278
+ */
279
+ getThemeLibrary({ pageSize, pageNo } = {}) {
280
+ const { error } = ThemeValidator.getThemeLibrary().validate(
281
+ {
282
+ pageSize,
283
+ pageNo,
284
+ },
285
+ { abortEarly: false, allowUnknown: true }
286
+ );
287
+ if (error) {
288
+ return Promise.reject(new FDKClientValidationError(error));
289
+ }
290
+
291
+ // Showing warrnings if extra unknown parameters are found
292
+ const { error: warrning } = ThemeValidator.getThemeLibrary().validate(
293
+ {
294
+ pageSize,
295
+ pageNo,
296
+ },
297
+ { abortEarly: false, allowUnknown: false }
298
+ );
299
+ if (warrning) {
300
+ console.log("Parameter Validation warrnings for getThemeLibrary");
301
+ console.log(warrning);
302
+ }
303
+
304
+ const query_params = {};
305
+ query_params["page_size"] = pageSize;
306
+ query_params["page_no"] = pageNo;
307
+
308
+ return PlatformAPIClient.execute(
309
+ this.config,
310
+ "get",
311
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
312
+ query_params,
313
+ undefined
314
+ );
315
+ }
316
+
317
+ /**
318
+ * @param {Object} arg - Arg object.
319
+ * @param {AddThemeRequestSchema} arg.body
320
+ * @summary: Add a theme to the theme library
321
+ * @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.
322
+ */
323
+ addToThemeLibrary({ body } = {}) {
324
+ const { error } = ThemeValidator.addToThemeLibrary().validate(
325
+ {
326
+ body,
327
+ },
328
+ { abortEarly: false, allowUnknown: true }
329
+ );
330
+ if (error) {
331
+ return Promise.reject(new FDKClientValidationError(error));
332
+ }
333
+
334
+ // Showing warrnings if extra unknown parameters are found
335
+ const { error: warrning } = ThemeValidator.addToThemeLibrary().validate(
336
+ {
337
+ body,
338
+ },
339
+ { abortEarly: false, allowUnknown: false }
340
+ );
341
+ if (warrning) {
342
+ console.log("Parameter Validation warrnings for addToThemeLibrary");
343
+ console.log(warrning);
344
+ }
345
+
346
+ const query_params = {};
347
+
348
+ return PlatformAPIClient.execute(
349
+ this.config,
350
+ "post",
351
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
352
+ query_params,
353
+ body
354
+ );
355
+ }
356
+
357
+ /**
358
+ * @param {Object} arg - Arg object.
359
+ * @param {AddThemeRequestSchema} arg.body
360
+ * @summary: Apply a theme
361
+ * @description: Use this API to apply a theme to the website.
362
+ */
363
+ applyTheme({ body } = {}) {
364
+ const { error } = ThemeValidator.applyTheme().validate(
365
+ {
366
+ body,
367
+ },
368
+ { abortEarly: false, allowUnknown: true }
369
+ );
370
+ if (error) {
371
+ return Promise.reject(new FDKClientValidationError(error));
372
+ }
373
+
374
+ // Showing warrnings if extra unknown parameters are found
375
+ const { error: warrning } = ThemeValidator.applyTheme().validate(
376
+ {
377
+ body,
378
+ },
379
+ { abortEarly: false, allowUnknown: false }
380
+ );
381
+ if (warrning) {
382
+ console.log("Parameter Validation warrnings for applyTheme");
383
+ console.log(warrning);
384
+ }
385
+
386
+ const query_params = {};
387
+
388
+ return PlatformAPIClient.execute(
389
+ this.config,
390
+ "post",
391
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/apply`,
392
+ query_params,
393
+ body
394
+ );
395
+ }
396
+
397
+ /**
398
+ * @param {Object} arg - Arg object.
399
+ * @param {string} arg.themeId - Theme ID
400
+ * @summary: Checks if theme is upgradable
401
+ * @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.
402
+ */
403
+ isUpgradable({ themeId } = {}) {
404
+ const { error } = ThemeValidator.isUpgradable().validate(
405
+ {
406
+ themeId,
407
+ },
408
+ { abortEarly: false, allowUnknown: true }
409
+ );
410
+ if (error) {
411
+ return Promise.reject(new FDKClientValidationError(error));
412
+ }
413
+
414
+ // Showing warrnings if extra unknown parameters are found
415
+ const { error: warrning } = ThemeValidator.isUpgradable().validate(
416
+ {
417
+ themeId,
418
+ },
419
+ { abortEarly: false, allowUnknown: false }
420
+ );
421
+ if (warrning) {
422
+ console.log("Parameter Validation warrnings for isUpgradable");
423
+ console.log(warrning);
424
+ }
425
+
426
+ const query_params = {};
427
+
428
+ return PlatformAPIClient.execute(
429
+ this.config,
430
+ "get",
431
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgradable`,
432
+ query_params,
433
+ undefined
434
+ );
435
+ }
436
+
437
+ /**
438
+ * @param {Object} arg - Arg object.
439
+ * @param {string} arg.themeId - ID allotted to the theme.
440
+ * @summary: Upgrade a theme
441
+ * @description: Use this API to upgrade the current theme to its latest version.
442
+ */
443
+ upgradeTheme({ themeId } = {}) {
444
+ const { error } = ThemeValidator.upgradeTheme().validate(
445
+ {
446
+ themeId,
447
+ },
448
+ { abortEarly: false, allowUnknown: true }
449
+ );
450
+ if (error) {
451
+ return Promise.reject(new FDKClientValidationError(error));
452
+ }
453
+
454
+ // Showing warrnings if extra unknown parameters are found
455
+ const { error: warrning } = ThemeValidator.upgradeTheme().validate(
456
+ {
457
+ themeId,
458
+ },
459
+ { abortEarly: false, allowUnknown: false }
460
+ );
461
+ if (warrning) {
462
+ console.log("Parameter Validation warrnings for upgradeTheme");
463
+ console.log(warrning);
464
+ }
465
+
466
+ const query_params = {};
467
+
468
+ return PlatformAPIClient.execute(
469
+ this.config,
470
+ "put",
471
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgrade`,
472
+ query_params,
473
+ undefined
474
+ );
475
+ }
476
+
477
+ /**
478
+ * @param {Object} arg - Arg object.
479
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
480
+ * page. Default value is 10.
481
+ * @param {number} [arg.pageNo] - The page number to navigate through the
482
+ * given set of results. Default value is 1.
483
+ * @summary: Get all public themes
484
+ * @description: Use this API to get a list of free themes that you can apply to your website.
485
+ */
486
+ getPublicThemes({ pageSize, pageNo } = {}) {
487
+ const { error } = ThemeValidator.getPublicThemes().validate(
488
+ {
489
+ pageSize,
490
+ pageNo,
491
+ },
492
+ { abortEarly: false, allowUnknown: true }
493
+ );
494
+ if (error) {
495
+ return Promise.reject(new FDKClientValidationError(error));
496
+ }
497
+
498
+ // Showing warrnings if extra unknown parameters are found
499
+ const { error: warrning } = ThemeValidator.getPublicThemes().validate(
500
+ {
501
+ pageSize,
502
+ pageNo,
503
+ },
504
+ { abortEarly: false, allowUnknown: false }
505
+ );
506
+ if (warrning) {
507
+ console.log("Parameter Validation warrnings for getPublicThemes");
508
+ console.log(warrning);
509
+ }
510
+
511
+ const query_params = {};
512
+ query_params["page_size"] = pageSize;
513
+ query_params["page_no"] = pageNo;
514
+
515
+ return PlatformAPIClient.execute(
516
+ this.config,
517
+ "get",
518
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/list/public`,
519
+ query_params,
520
+ undefined
521
+ );
522
+ }
523
+
524
+ /**
525
+ * @param {Object} arg - Arg object.
526
+ * @param {ThemesSchema} arg.body
527
+ * @summary: Create a new theme
528
+ * @description: Themes improve the look and appearance of a website. Use this API to create a theme.
529
+ */
530
+ createTheme({ body } = {}) {
531
+ const { error } = ThemeValidator.createTheme().validate(
532
+ {
533
+ body,
534
+ },
535
+ { abortEarly: false, allowUnknown: true }
536
+ );
537
+ if (error) {
538
+ return Promise.reject(new FDKClientValidationError(error));
539
+ }
540
+
541
+ // Showing warrnings if extra unknown parameters are found
542
+ const { error: warrning } = ThemeValidator.createTheme().validate(
543
+ {
544
+ body,
545
+ },
546
+ { abortEarly: false, allowUnknown: false }
547
+ );
548
+ if (warrning) {
549
+ console.log("Parameter Validation warrnings for createTheme");
550
+ console.log(warrning);
551
+ }
552
+
553
+ const query_params = {};
554
+
555
+ return PlatformAPIClient.execute(
556
+ this.config,
557
+ "post",
558
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
559
+ query_params,
560
+ body
561
+ );
562
+ }
563
+
564
+ /**
565
+ * @param {Object} arg - Arg object.
566
+ * @summary: Get the applied theme
567
+ * @description: Use this API to retrieve the theme that is currently applied to the website along with its details.
568
+ */
569
+ getAppliedTheme({} = {}) {
570
+ const { error } = ThemeValidator.getAppliedTheme().validate(
571
+ {},
572
+ { abortEarly: false, allowUnknown: true }
573
+ );
574
+ if (error) {
575
+ return Promise.reject(new FDKClientValidationError(error));
576
+ }
577
+
578
+ // Showing warrnings if extra unknown parameters are found
579
+ const { error: warrning } = ThemeValidator.getAppliedTheme().validate(
580
+ {},
581
+ { abortEarly: false, allowUnknown: false }
582
+ );
583
+ if (warrning) {
584
+ console.log("Parameter Validation warrnings for getAppliedTheme");
585
+ console.log(warrning);
586
+ }
587
+
588
+ const query_params = {};
589
+
590
+ return PlatformAPIClient.execute(
591
+ this.config,
592
+ "get",
593
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
594
+ query_params,
595
+ undefined
596
+ );
597
+ }
598
+
599
+ /**
600
+ * @param {Object} arg - Arg object.
601
+ * @summary: Get all the supported fonts in a theme
602
+ * @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts.
603
+ */
604
+ getFonts({} = {}) {
605
+ const { error } = ThemeValidator.getFonts().validate(
606
+ {},
607
+ { abortEarly: false, allowUnknown: true }
608
+ );
609
+ if (error) {
610
+ return Promise.reject(new FDKClientValidationError(error));
611
+ }
612
+
613
+ // Showing warrnings if extra unknown parameters are found
614
+ const { error: warrning } = ThemeValidator.getFonts().validate(
615
+ {},
616
+ { abortEarly: false, allowUnknown: false }
617
+ );
618
+ if (warrning) {
619
+ console.log("Parameter Validation warrnings for getFonts");
620
+ console.log(warrning);
621
+ }
622
+
623
+ const query_params = {};
624
+
625
+ return PlatformAPIClient.execute(
626
+ this.config,
627
+ "get",
628
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fonts`,
629
+ query_params,
630
+ undefined
631
+ );
632
+ }
633
+
634
+ /**
635
+ * @param {Object} arg - Arg object.
636
+ * @param {string} arg.themeId - ID allotted to the theme.
637
+ * @summary: Gets theme by id
638
+ * @description: Use this API to retrieve the details of a specific theme by using its ID.
639
+ */
640
+ getThemeById({ themeId } = {}) {
641
+ const { error } = ThemeValidator.getThemeById().validate(
642
+ {
643
+ themeId,
644
+ },
645
+ { abortEarly: false, allowUnknown: true }
646
+ );
647
+ if (error) {
648
+ return Promise.reject(new FDKClientValidationError(error));
649
+ }
650
+
651
+ // Showing warrnings if extra unknown parameters are found
652
+ const { error: warrning } = ThemeValidator.getThemeById().validate(
653
+ {
654
+ themeId,
655
+ },
656
+ { abortEarly: false, allowUnknown: false }
657
+ );
658
+ if (warrning) {
659
+ console.log("Parameter Validation warrnings for getThemeById");
660
+ console.log(warrning);
661
+ }
662
+
663
+ const query_params = {};
664
+
665
+ return PlatformAPIClient.execute(
666
+ this.config,
667
+ "get",
668
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
669
+ query_params,
670
+ undefined
671
+ );
672
+ }
673
+
674
+ /**
675
+ * @param {Object} arg - Arg object.
676
+ * @param {string} arg.themeId - ID allotted to the theme.
677
+ * @param {ThemesSchema} arg.body
678
+ * @summary: Update a theme
679
+ * @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more.
680
+ */
681
+ updateTheme({ themeId, body } = {}) {
682
+ const { error } = ThemeValidator.updateTheme().validate(
683
+ {
684
+ themeId,
685
+ body,
686
+ },
687
+ { abortEarly: false, allowUnknown: true }
688
+ );
689
+ if (error) {
690
+ return Promise.reject(new FDKClientValidationError(error));
691
+ }
692
+
693
+ // Showing warrnings if extra unknown parameters are found
694
+ const { error: warrning } = ThemeValidator.updateTheme().validate(
695
+ {
696
+ themeId,
697
+ body,
698
+ },
699
+ { abortEarly: false, allowUnknown: false }
700
+ );
701
+ if (warrning) {
702
+ console.log("Parameter Validation warrnings for updateTheme");
703
+ console.log(warrning);
704
+ }
705
+
706
+ const query_params = {};
707
+
708
+ return PlatformAPIClient.execute(
709
+ this.config,
710
+ "put",
711
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
712
+ query_params,
713
+ body
714
+ );
715
+ }
716
+
717
+ /**
718
+ * @param {Object} arg - Arg object.
719
+ * @param {string} arg.themeId - ID allotted to the theme.
720
+ * @summary: Delete a theme
721
+ * @description: Use this API to delete a theme from the theme library.
722
+ */
723
+ deleteTheme({ themeId } = {}) {
724
+ const { error } = ThemeValidator.deleteTheme().validate(
725
+ {
726
+ themeId,
727
+ },
728
+ { abortEarly: false, allowUnknown: true }
729
+ );
730
+ if (error) {
731
+ return Promise.reject(new FDKClientValidationError(error));
732
+ }
733
+
734
+ // Showing warrnings if extra unknown parameters are found
735
+ const { error: warrning } = ThemeValidator.deleteTheme().validate(
736
+ {
737
+ themeId,
738
+ },
739
+ { abortEarly: false, allowUnknown: false }
740
+ );
741
+ if (warrning) {
742
+ console.log("Parameter Validation warrnings for deleteTheme");
743
+ console.log(warrning);
744
+ }
745
+
746
+ const query_params = {};
747
+
748
+ return PlatformAPIClient.execute(
749
+ this.config,
750
+ "delete",
751
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
752
+ query_params,
753
+ undefined
754
+ );
755
+ }
756
+
757
+ /**
758
+ * @param {Object} arg - Arg object.
759
+ * @param {string} arg.themeId - ID allotted to the theme.
760
+ * @summary: Get a theme preview
761
+ * @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID.
762
+ */
763
+ getThemeForPreview({ themeId } = {}) {
764
+ const { error } = ThemeValidator.getThemeForPreview().validate(
765
+ {
766
+ themeId,
767
+ },
768
+ { abortEarly: false, allowUnknown: true }
769
+ );
770
+ if (error) {
771
+ return Promise.reject(new FDKClientValidationError(error));
772
+ }
773
+
774
+ // Showing warrnings if extra unknown parameters are found
775
+ const { error: warrning } = ThemeValidator.getThemeForPreview().validate(
776
+ {
777
+ themeId,
778
+ },
779
+ { abortEarly: false, allowUnknown: false }
780
+ );
781
+ if (warrning) {
782
+ console.log("Parameter Validation warrnings for getThemeForPreview");
783
+ console.log(warrning);
784
+ }
785
+
786
+ const query_params = {};
787
+
788
+ return PlatformAPIClient.execute(
789
+ this.config,
790
+ "get",
791
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/preview`,
792
+ query_params,
793
+ undefined
794
+ );
795
+ }
796
+
797
+ /**
798
+ * @param {Object} arg - Arg object.
799
+ * @param {string} arg.themeId - ID allotted to the theme.
800
+ * @summary: Publish a theme
801
+ * @description: Use this API to publish a theme that is either newly created or edited.
802
+ */
803
+ publishTheme({ themeId } = {}) {
804
+ const { error } = ThemeValidator.publishTheme().validate(
805
+ {
806
+ themeId,
807
+ },
808
+ { abortEarly: false, allowUnknown: true }
809
+ );
810
+ if (error) {
811
+ return Promise.reject(new FDKClientValidationError(error));
812
+ }
813
+
814
+ // Showing warrnings if extra unknown parameters are found
815
+ const { error: warrning } = ThemeValidator.publishTheme().validate(
816
+ {
817
+ themeId,
818
+ },
819
+ { abortEarly: false, allowUnknown: false }
820
+ );
821
+ if (warrning) {
822
+ console.log("Parameter Validation warrnings for publishTheme");
823
+ console.log(warrning);
824
+ }
825
+
826
+ const query_params = {};
827
+
828
+ return PlatformAPIClient.execute(
829
+ this.config,
830
+ "put",
831
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
832
+ query_params,
833
+ undefined
834
+ );
835
+ }
836
+
837
+ /**
838
+ * @param {Object} arg - Arg object.
839
+ * @param {string} arg.themeId - ID allotted to the theme.
840
+ * @summary: Unpublish a theme
841
+ * @description: Use this API to remove an existing theme from the list of available themes.
842
+ */
843
+ unpublishTheme({ themeId } = {}) {
844
+ const { error } = ThemeValidator.unpublishTheme().validate(
845
+ {
846
+ themeId,
847
+ },
848
+ { abortEarly: false, allowUnknown: true }
849
+ );
850
+ if (error) {
851
+ return Promise.reject(new FDKClientValidationError(error));
852
+ }
853
+
854
+ // Showing warrnings if extra unknown parameters are found
855
+ const { error: warrning } = ThemeValidator.unpublishTheme().validate(
856
+ {
857
+ themeId,
858
+ },
859
+ { abortEarly: false, allowUnknown: false }
860
+ );
861
+ if (warrning) {
862
+ console.log("Parameter Validation warrnings for unpublishTheme");
863
+ console.log(warrning);
864
+ }
865
+
866
+ const query_params = {};
867
+
868
+ return PlatformAPIClient.execute(
869
+ this.config,
870
+ "put",
871
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
872
+ query_params,
873
+ undefined
874
+ );
875
+ }
876
+
877
+ /**
878
+ * @param {Object} arg - Arg object.
879
+ * @param {string} arg.themeId - ID allotted to the theme.
880
+ * @summary: Archive a theme
881
+ * @description: Use this API to store an existing theme but not delete it so that it can be used in future if required.
882
+ */
883
+ archiveTheme({ themeId } = {}) {
884
+ const { error } = ThemeValidator.archiveTheme().validate(
885
+ {
886
+ themeId,
887
+ },
888
+ { abortEarly: false, allowUnknown: true }
889
+ );
890
+ if (error) {
891
+ return Promise.reject(new FDKClientValidationError(error));
892
+ }
893
+
894
+ // Showing warrnings if extra unknown parameters are found
895
+ const { error: warrning } = ThemeValidator.archiveTheme().validate(
896
+ {
897
+ themeId,
898
+ },
899
+ { abortEarly: false, allowUnknown: false }
900
+ );
901
+ if (warrning) {
902
+ console.log("Parameter Validation warrnings for archiveTheme");
903
+ console.log(warrning);
904
+ }
905
+
906
+ const query_params = {};
907
+
908
+ return PlatformAPIClient.execute(
909
+ this.config,
910
+ "put",
911
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
912
+ query_params,
913
+ undefined
914
+ );
915
+ }
916
+
917
+ /**
918
+ * @param {Object} arg - Arg object.
919
+ * @param {string} arg.themeId - ID allotted to the theme.
920
+ * @summary: Unarchive a theme
921
+ * @description: Use this API to restore an archived theme and bring it back for editing or publishing.
922
+ */
923
+ unarchiveTheme({ themeId } = {}) {
924
+ const { error } = ThemeValidator.unarchiveTheme().validate(
925
+ {
926
+ themeId,
927
+ },
928
+ { abortEarly: false, allowUnknown: true }
929
+ );
930
+ if (error) {
931
+ return Promise.reject(new FDKClientValidationError(error));
932
+ }
933
+
934
+ // Showing warrnings if extra unknown parameters are found
935
+ const { error: warrning } = ThemeValidator.unarchiveTheme().validate(
936
+ {
937
+ themeId,
938
+ },
939
+ { abortEarly: false, allowUnknown: false }
940
+ );
941
+ if (warrning) {
942
+ console.log("Parameter Validation warrnings for unarchiveTheme");
943
+ console.log(warrning);
944
+ }
945
+
946
+ const query_params = {};
947
+
948
+ return PlatformAPIClient.execute(
949
+ this.config,
950
+ "put",
951
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
952
+ query_params,
953
+ undefined
954
+ );
955
+ }
956
+
957
+ /**
958
+ * @param {Object} arg - Arg object.
959
+ * @param {string} arg.themeId - ID allotted to the theme.
960
+ * @summary: Fetch last modified timestamp
961
+ * @description: Use this API to fetch Last-Modified timestamp in header metadata.
962
+ */
963
+ getThemeLastModified({ themeId } = {}) {
964
+ const { error } = ThemeValidator.getThemeLastModified().validate(
965
+ {
966
+ themeId,
967
+ },
968
+ { abortEarly: false, allowUnknown: true }
969
+ );
970
+ if (error) {
971
+ return Promise.reject(new FDKClientValidationError(error));
972
+ }
973
+
974
+ // Showing warrnings if extra unknown parameters are found
975
+ const { error: warrning } = ThemeValidator.getThemeLastModified().validate(
976
+ {
977
+ themeId,
978
+ },
979
+ { abortEarly: false, allowUnknown: false }
980
+ );
981
+ if (warrning) {
982
+ console.log("Parameter Validation warrnings for getThemeLastModified");
983
+ console.log(warrning);
984
+ }
985
+
986
+ const query_params = {};
987
+
988
+ return PlatformAPIClient.execute(
989
+ this.config,
990
+ "head",
991
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/polling`,
992
+ query_params,
993
+ undefined
994
+ );
995
+ }
996
+ }
997
+ module.exports = Theme;