@gofynd/fdk-client-javascript 1.0.2 → 1.0.3

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 (310) hide show
  1. package/documentation/application/CART.md +5934 -4502
  2. package/documentation/application/CATALOG.md +6338 -7245
  3. package/documentation/application/COMMON.md +95 -222
  4. package/documentation/application/COMMUNICATION.md +106 -186
  5. package/documentation/application/CONFIGURATION.md +903 -1597
  6. package/documentation/application/CONTENT.md +557 -1279
  7. package/documentation/application/FILESTORAGE.md +84 -220
  8. package/documentation/application/LEAD.md +314 -660
  9. package/documentation/application/LOGISTIC.md +229 -305
  10. package/documentation/application/ORDER.md +642 -1137
  11. package/documentation/application/PAYMENT.md +2285 -3031
  12. package/documentation/application/POSCART.md +6079 -4642
  13. package/documentation/application/REWARDS.md +94 -248
  14. package/documentation/application/SHARE.md +152 -250
  15. package/documentation/application/THEME.md +952 -1235
  16. package/documentation/application/USER.md +1228 -1765
  17. package/documentation/platform/ANALYTICS.md +207 -349
  18. package/documentation/platform/AUDITTRAIL.md +121 -204
  19. package/documentation/platform/BILLING.md +865 -1376
  20. package/documentation/platform/CART.md +2814 -3662
  21. package/documentation/platform/CATALOG.md +14453 -17192
  22. package/documentation/platform/COMMON.md +95 -222
  23. package/documentation/platform/COMMUNICATION.md +1632 -2380
  24. package/documentation/platform/COMPANYPROFILE.md +572 -957
  25. package/documentation/platform/CONFIGURATION.md +3050 -4073
  26. package/documentation/platform/CONTENT.md +3438 -4172
  27. package/documentation/platform/DISCOUNT.md +140 -236
  28. package/documentation/platform/FILESTORAGE.md +187 -323
  29. package/documentation/platform/INVENTORY.md +268 -911
  30. package/documentation/platform/LEAD.md +2195 -2541
  31. package/documentation/platform/ORDER.md +3400 -5361
  32. package/documentation/platform/PARTNER.md +9 -36
  33. package/documentation/platform/PAYMENT.md +903 -1213
  34. package/documentation/platform/REWARDS.md +183 -347
  35. package/documentation/platform/SHARE.md +120 -213
  36. package/documentation/platform/THEME.md +12956 -13239
  37. package/documentation/platform/USER.md +975 -1120
  38. package/documentation/platform/WEBHOOK.md +78 -184
  39. package/documentation/public/CONFIGURATION.md +95 -222
  40. package/documentation/public/INVENTORY.md +100 -282
  41. package/documentation/public/WEBHOOK.md +27 -133
  42. package/package.json +1 -1
  43. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  44. package/sdk/application/Cart/CartApplicationClient.js +567 -567
  45. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  46. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  47. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  48. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  49. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  50. package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
  51. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  52. package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
  53. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  54. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  55. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  56. package/sdk/application/Common/CommonApplicationClient.js +38 -38
  57. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  58. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  59. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  60. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  61. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  62. package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
  63. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  64. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  65. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  66. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  67. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
  69. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  71. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  73. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  74. package/sdk/application/Content/ContentApplicationClient.js +191 -191
  75. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  76. package/sdk/application/Content/ContentApplicationModel.js +467 -884
  77. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  78. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  79. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
  81. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  83. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  85. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  86. package/sdk/application/Lead/LeadApplicationClient.js +100 -100
  87. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  88. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  89. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  90. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  91. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  92. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
  93. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  94. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  95. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  96. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  97. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  98. package/sdk/application/Order/OrderApplicationClient.js +232 -232
  99. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  100. package/sdk/application/Order/OrderApplicationModel.js +352 -656
  101. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  102. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  103. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  104. package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
  105. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  106. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  107. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  108. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  109. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  110. package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
  111. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  112. package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
  113. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  114. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  115. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  116. package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
  117. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  118. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  119. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  120. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  121. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  122. package/sdk/application/Share/ShareApplicationClient.js +84 -84
  123. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  124. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  125. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  126. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  127. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  128. package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
  129. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  130. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  131. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  132. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  133. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  134. package/sdk/application/User/UserApplicationClient.js +581 -581
  135. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  136. package/sdk/application/User/UserApplicationModel.js +440 -689
  137. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  138. package/sdk/application/User/UserApplicationValidator.js +89 -89
  139. package/sdk/common/AxiosHelper.js +1 -1
  140. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  144. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  145. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  146. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  147. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
  148. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  152. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  153. package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
  154. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  155. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  156. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  157. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  158. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
  159. package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
  160. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  161. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  162. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  163. package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
  164. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  165. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
  166. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
  168. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
  169. package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
  170. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  171. package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
  172. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  173. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
  174. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  175. package/sdk/platform/Common/CommonPlatformClient.js +41 -41
  176. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  177. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  178. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  179. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  180. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  181. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
  182. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  184. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  185. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  186. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  187. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
  188. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  189. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  190. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  192. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  193. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
  194. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  195. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  196. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  197. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
  198. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  199. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  200. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  201. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  202. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
  203. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
  204. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
  205. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
  206. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  207. package/sdk/platform/Content/ContentPlatformModel.js +484 -907
  208. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  209. package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
  210. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  211. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  212. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  213. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  214. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
  215. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
  216. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  217. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  218. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
  219. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
  220. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  221. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  222. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  223. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  224. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  225. package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
  226. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  227. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  228. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  229. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  230. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  231. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
  232. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  233. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  234. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  235. package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
  236. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  237. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  238. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  239. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  240. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  241. package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
  242. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  243. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  244. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  245. package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
  246. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  247. package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
  248. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  249. package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
  250. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  251. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  252. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
  253. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
  254. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  255. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  256. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  257. package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
  258. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  259. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  260. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  261. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  262. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  263. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  264. package/sdk/platform/PlatformClient.d.ts +7965 -7885
  265. package/sdk/platform/PlatformClient.js +8672 -10105
  266. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  270. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  271. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  272. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  273. package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
  274. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  275. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  276. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  277. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  278. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  279. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
  280. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  281. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  282. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  283. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  284. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  285. package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
  286. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  287. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  288. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  289. package/sdk/platform/User/UserPlatformModel.js +440 -689
  290. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  291. package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
  292. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  293. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  294. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  295. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  296. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  297. package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
  298. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  299. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  300. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  301. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  302. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  303. package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
  304. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  305. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  306. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  307. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  308. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  309. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  310. package/tests/application/catalog.spec.js +7 -0
@@ -13,15 +13,15 @@ class Theme {
13
13
 
14
14
  /**
15
15
  * @param {Object} arg - Arg object.
16
- * @param {string} arg.themeId - ID of the theme to be retrieved
17
- * @returns {Promise<AllAvailablePageSchema>} - Success response
18
- * @summary: Get all pages of a theme
19
- * @description: Use this API to retrieve all the available pages of a theme by its ID.
16
+ * @param {AddThemeRequestSchema} arg.body
17
+ * @returns {Promise<ThemesSchema>} - Success response
18
+ * @summary: Add a theme to the theme library
19
+ * @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.
20
20
  */
21
- async getAllPages({ themeId } = {}) {
22
- const { error } = ThemeValidator.getAllPages().validate(
21
+ async addToThemeLibrary({ body } = {}) {
22
+ const { error } = ThemeValidator.addToThemeLibrary().validate(
23
23
  {
24
- themeId,
24
+ body,
25
25
  },
26
26
  { abortEarly: false, allowUnknown: true }
27
27
  );
@@ -30,16 +30,16 @@ class Theme {
30
30
  }
31
31
 
32
32
  // Showing warrnings if extra unknown parameters are found
33
- const { error: warrning } = ThemeValidator.getAllPages().validate(
33
+ const { error: warrning } = ThemeValidator.addToThemeLibrary().validate(
34
34
  {
35
- themeId,
35
+ body,
36
36
  },
37
37
  { abortEarly: false, allowUnknown: false }
38
38
  );
39
39
  if (warrning) {
40
40
  Logger({
41
41
  level: "WARN",
42
- message: "Parameter Validation warrnings for getAllPages",
42
+ message: "Parameter Validation warrnings for addToThemeLibrary",
43
43
  });
44
44
  Logger({ level: "WARN", message: warrning });
45
45
  }
@@ -48,15 +48,13 @@ class Theme {
48
48
 
49
49
  const response = await PlatformAPIClient.execute(
50
50
  this.config,
51
- "get",
52
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
51
+ "post",
52
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
53
53
  query_params,
54
- undefined
54
+ body
55
55
  );
56
56
 
57
- const {
58
- error: res_error,
59
- } = ThemeModel.AllAvailablePageSchema().validate(response, {
57
+ const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
60
58
  abortEarly: false,
61
59
  allowUnknown: false,
62
60
  });
@@ -64,7 +62,7 @@ class Theme {
64
62
  if (res_error) {
65
63
  Logger({
66
64
  level: "WARN",
67
- message: "Response Validation Warnnings for getAllPages",
65
+ message: "Response Validation Warnnings for addToThemeLibrary",
68
66
  });
69
67
  Logger({ level: "WARN", message: res_error });
70
68
  }
@@ -74,16 +72,14 @@ class Theme {
74
72
 
75
73
  /**
76
74
  * @param {Object} arg - Arg object.
77
- * @param {string} arg.themeId - ID of the theme
78
- * @param {AvailablePageSchema} arg.body
79
- * @returns {Promise<AvailablePageSchema>} - Success response
80
- * @summary: Create a page
81
- * @description: Use this API to create a page for a theme by its ID.
75
+ * @param {AddThemeRequestSchema} arg.body
76
+ * @returns {Promise<ThemesSchema>} - Success response
77
+ * @summary: Apply a theme
78
+ * @description: Use this API to apply a theme to the website.
82
79
  */
83
- async createPage({ themeId, body } = {}) {
84
- const { error } = ThemeValidator.createPage().validate(
80
+ async applyTheme({ body } = {}) {
81
+ const { error } = ThemeValidator.applyTheme().validate(
85
82
  {
86
- themeId,
87
83
  body,
88
84
  },
89
85
  { abortEarly: false, allowUnknown: true }
@@ -93,9 +89,8 @@ class Theme {
93
89
  }
94
90
 
95
91
  // Showing warrnings if extra unknown parameters are found
96
- const { error: warrning } = ThemeValidator.createPage().validate(
92
+ const { error: warrning } = ThemeValidator.applyTheme().validate(
97
93
  {
98
- themeId,
99
94
  body,
100
95
  },
101
96
  { abortEarly: false, allowUnknown: false }
@@ -103,7 +98,7 @@ class Theme {
103
98
  if (warrning) {
104
99
  Logger({
105
100
  level: "WARN",
106
- message: "Parameter Validation warrnings for createPage",
101
+ message: "Parameter Validation warrnings for applyTheme",
107
102
  });
108
103
  Logger({ level: "WARN", message: warrning });
109
104
  }
@@ -113,14 +108,12 @@ class Theme {
113
108
  const response = await PlatformAPIClient.execute(
114
109
  this.config,
115
110
  "post",
116
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
111
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/apply`,
117
112
  query_params,
118
113
  body
119
114
  );
120
115
 
121
- const {
122
- error: res_error,
123
- } = ThemeModel.AvailablePageSchema().validate(response, {
116
+ const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
124
117
  abortEarly: false,
125
118
  allowUnknown: false,
126
119
  });
@@ -128,7 +121,7 @@ class Theme {
128
121
  if (res_error) {
129
122
  Logger({
130
123
  level: "WARN",
131
- message: "Response Validation Warnnings for createPage",
124
+ message: "Response Validation Warnnings for applyTheme",
132
125
  });
133
126
  Logger({ level: "WARN", message: res_error });
134
127
  }
@@ -138,17 +131,15 @@ class Theme {
138
131
 
139
132
  /**
140
133
  * @param {Object} arg - Arg object.
141
- * @param {string} arg.themeId - ID of the theme to be retrieved
142
- * @param {AllAvailablePageSchema} arg.body
143
- * @returns {Promise<AllAvailablePageSchema>} - Success response
144
- * @summary: Update multiple pages of a theme
145
- * @description: Use this API to update multiple pages of a theme by its ID.
134
+ * @param {string} arg.themeId - ID allotted to the theme.
135
+ * @returns {Promise<ThemesSchema>} - Success response
136
+ * @summary: Archive a theme
137
+ * @description: Use this API to store an existing theme but not delete it so that it can be used in future if required.
146
138
  */
147
- async updateMultiplePages({ themeId, body } = {}) {
148
- const { error } = ThemeValidator.updateMultiplePages().validate(
139
+ async archiveTheme({ themeId } = {}) {
140
+ const { error } = ThemeValidator.archiveTheme().validate(
149
141
  {
150
142
  themeId,
151
- body,
152
143
  },
153
144
  { abortEarly: false, allowUnknown: true }
154
145
  );
@@ -157,17 +148,16 @@ class Theme {
157
148
  }
158
149
 
159
150
  // Showing warrnings if extra unknown parameters are found
160
- const { error: warrning } = ThemeValidator.updateMultiplePages().validate(
151
+ const { error: warrning } = ThemeValidator.archiveTheme().validate(
161
152
  {
162
153
  themeId,
163
- body,
164
154
  },
165
155
  { abortEarly: false, allowUnknown: false }
166
156
  );
167
157
  if (warrning) {
168
158
  Logger({
169
159
  level: "WARN",
170
- message: "Parameter Validation warrnings for updateMultiplePages",
160
+ message: "Parameter Validation warrnings for archiveTheme",
171
161
  });
172
162
  Logger({ level: "WARN", message: warrning });
173
163
  }
@@ -177,14 +167,12 @@ class Theme {
177
167
  const response = await PlatformAPIClient.execute(
178
168
  this.config,
179
169
  "put",
180
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
170
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
181
171
  query_params,
182
- body
172
+ undefined
183
173
  );
184
174
 
185
- const {
186
- error: res_error,
187
- } = ThemeModel.AllAvailablePageSchema().validate(response, {
175
+ const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
188
176
  abortEarly: false,
189
177
  allowUnknown: false,
190
178
  });
@@ -192,7 +180,7 @@ class Theme {
192
180
  if (res_error) {
193
181
  Logger({
194
182
  level: "WARN",
195
- message: "Response Validation Warnnings for updateMultiplePages",
183
+ message: "Response Validation Warnnings for archiveTheme",
196
184
  });
197
185
  Logger({ level: "WARN", message: res_error });
198
186
  }
@@ -202,17 +190,17 @@ class Theme {
202
190
 
203
191
  /**
204
192
  * @param {Object} arg - Arg object.
205
- * @param {string} arg.themeId - ID of the theme to be retrieved
206
- * @param {string} arg.pageValue - Value of the page to be retrieved
193
+ * @param {string} arg.themeId - ID of the theme
194
+ * @param {AvailablePageSchema} arg.body
207
195
  * @returns {Promise<AvailablePageSchema>} - Success response
208
- * @summary: Get page of a theme
209
- * @description: Use this API to retrieve a page of a theme.
196
+ * @summary: Create a page
197
+ * @description: Use this API to create a page for a theme by its ID.
210
198
  */
211
- async getPage({ themeId, pageValue } = {}) {
212
- const { error } = ThemeValidator.getPage().validate(
199
+ async createPage({ themeId, body } = {}) {
200
+ const { error } = ThemeValidator.createPage().validate(
213
201
  {
214
202
  themeId,
215
- pageValue,
203
+ body,
216
204
  },
217
205
  { abortEarly: false, allowUnknown: true }
218
206
  );
@@ -221,17 +209,17 @@ class Theme {
221
209
  }
222
210
 
223
211
  // Showing warrnings if extra unknown parameters are found
224
- const { error: warrning } = ThemeValidator.getPage().validate(
212
+ const { error: warrning } = ThemeValidator.createPage().validate(
225
213
  {
226
214
  themeId,
227
- pageValue,
215
+ body,
228
216
  },
229
217
  { abortEarly: false, allowUnknown: false }
230
218
  );
231
219
  if (warrning) {
232
220
  Logger({
233
221
  level: "WARN",
234
- message: "Parameter Validation warrnings for getPage",
222
+ message: "Parameter Validation warrnings for createPage",
235
223
  });
236
224
  Logger({ level: "WARN", message: warrning });
237
225
  }
@@ -240,10 +228,10 @@ class Theme {
240
228
 
241
229
  const response = await PlatformAPIClient.execute(
242
230
  this.config,
243
- "get",
244
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
231
+ "post",
232
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
245
233
  query_params,
246
- undefined
234
+ body
247
235
  );
248
236
 
249
237
  const {
@@ -256,7 +244,7 @@ class Theme {
256
244
  if (res_error) {
257
245
  Logger({
258
246
  level: "WARN",
259
- message: "Response Validation Warnnings for getPage",
247
+ message: "Response Validation Warnnings for createPage",
260
248
  });
261
249
  Logger({ level: "WARN", message: res_error });
262
250
  }
@@ -266,18 +254,14 @@ class Theme {
266
254
 
267
255
  /**
268
256
  * @param {Object} arg - Arg object.
269
- * @param {string} arg.themeId - ID of the theme
270
- * @param {string} arg.pageValue - Value of the page to be updated
271
- * @param {AvailablePageSchema} arg.body
272
- * @returns {Promise<AvailablePageSchema>} - Success response
273
- * @summary: Updates a page
274
- * @description: Use this API to update a page for a theme by its ID.
257
+ * @param {ThemesSchema} arg.body
258
+ * @returns {Promise<ThemesSchema>} - Success response
259
+ * @summary: Create a new theme
260
+ * @description: Themes improve the look and appearance of a website. Use this API to create a theme.
275
261
  */
276
- async updatePage({ themeId, pageValue, body } = {}) {
277
- const { error } = ThemeValidator.updatePage().validate(
262
+ async createTheme({ body } = {}) {
263
+ const { error } = ThemeValidator.createTheme().validate(
278
264
  {
279
- themeId,
280
- pageValue,
281
265
  body,
282
266
  },
283
267
  { abortEarly: false, allowUnknown: true }
@@ -287,10 +271,8 @@ class Theme {
287
271
  }
288
272
 
289
273
  // Showing warrnings if extra unknown parameters are found
290
- const { error: warrning } = ThemeValidator.updatePage().validate(
274
+ const { error: warrning } = ThemeValidator.createTheme().validate(
291
275
  {
292
- themeId,
293
- pageValue,
294
276
  body,
295
277
  },
296
278
  { abortEarly: false, allowUnknown: false }
@@ -298,7 +280,7 @@ class Theme {
298
280
  if (warrning) {
299
281
  Logger({
300
282
  level: "WARN",
301
- message: "Parameter Validation warrnings for updatePage",
283
+ message: "Parameter Validation warrnings for createTheme",
302
284
  });
303
285
  Logger({ level: "WARN", message: warrning });
304
286
  }
@@ -307,15 +289,13 @@ class Theme {
307
289
 
308
290
  const response = await PlatformAPIClient.execute(
309
291
  this.config,
310
- "put",
311
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
292
+ "post",
293
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
312
294
  query_params,
313
295
  body
314
296
  );
315
297
 
316
- const {
317
- error: res_error,
318
- } = ThemeModel.AvailablePageSchema().validate(response, {
298
+ const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
319
299
  abortEarly: false,
320
300
  allowUnknown: false,
321
301
  });
@@ -323,7 +303,7 @@ class Theme {
323
303
  if (res_error) {
324
304
  Logger({
325
305
  level: "WARN",
326
- message: "Response Validation Warnnings for updatePage",
306
+ message: "Response Validation Warnnings for createTheme",
327
307
  });
328
308
  Logger({ level: "WARN", message: res_error });
329
309
  }
@@ -397,19 +377,15 @@ class Theme {
397
377
 
398
378
  /**
399
379
  * @param {Object} arg - Arg object.
400
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
401
- * page. Default value is 10.
402
- * @param {number} [arg.pageNo] - The page number to navigate through the
403
- * given set of results. Default value is 1.
404
- * @returns {Promise<ThemesListingResponseSchema>} - Success response
405
- * @summary: Get a list of themes from the theme library
406
- * @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.
380
+ * @param {string} arg.themeId - ID allotted to the theme.
381
+ * @returns {Promise<ThemesSchema>} - Success response
382
+ * @summary: Delete a theme
383
+ * @description: Use this API to delete a theme from the theme library.
407
384
  */
408
- async getThemeLibrary({ pageSize, pageNo } = {}) {
409
- const { error } = ThemeValidator.getThemeLibrary().validate(
385
+ async deleteTheme({ themeId } = {}) {
386
+ const { error } = ThemeValidator.deleteTheme().validate(
410
387
  {
411
- pageSize,
412
- pageNo,
388
+ themeId,
413
389
  },
414
390
  { abortEarly: false, allowUnknown: true }
415
391
  );
@@ -418,36 +394,31 @@ class Theme {
418
394
  }
419
395
 
420
396
  // Showing warrnings if extra unknown parameters are found
421
- const { error: warrning } = ThemeValidator.getThemeLibrary().validate(
397
+ const { error: warrning } = ThemeValidator.deleteTheme().validate(
422
398
  {
423
- pageSize,
424
- pageNo,
399
+ themeId,
425
400
  },
426
401
  { abortEarly: false, allowUnknown: false }
427
402
  );
428
403
  if (warrning) {
429
404
  Logger({
430
405
  level: "WARN",
431
- message: "Parameter Validation warrnings for getThemeLibrary",
406
+ message: "Parameter Validation warrnings for deleteTheme",
432
407
  });
433
408
  Logger({ level: "WARN", message: warrning });
434
409
  }
435
410
 
436
411
  const query_params = {};
437
- query_params["page_size"] = pageSize;
438
- query_params["page_no"] = pageNo;
439
412
 
440
413
  const response = await PlatformAPIClient.execute(
441
414
  this.config,
442
- "get",
443
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
415
+ "delete",
416
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
444
417
  query_params,
445
418
  undefined
446
419
  );
447
420
 
448
- const {
449
- error: res_error,
450
- } = ThemeModel.ThemesListingResponseSchema().validate(response, {
421
+ const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
451
422
  abortEarly: false,
452
423
  allowUnknown: false,
453
424
  });
@@ -455,7 +426,7 @@ class Theme {
455
426
  if (res_error) {
456
427
  Logger({
457
428
  level: "WARN",
458
- message: "Response Validation Warnnings for getThemeLibrary",
429
+ message: "Response Validation Warnnings for deleteTheme",
459
430
  });
460
431
  Logger({ level: "WARN", message: res_error });
461
432
  }
@@ -465,15 +436,15 @@ class Theme {
465
436
 
466
437
  /**
467
438
  * @param {Object} arg - Arg object.
468
- * @param {AddThemeRequestSchema} arg.body
469
- * @returns {Promise<ThemesSchema>} - Success response
470
- * @summary: Add a theme to the theme library
471
- * @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.
439
+ * @param {string} arg.themeId - ID of the theme to be retrieved
440
+ * @returns {Promise<AllAvailablePageSchema>} - Success response
441
+ * @summary: Get all pages of a theme
442
+ * @description: Use this API to retrieve all the available pages of a theme by its ID.
472
443
  */
473
- async addToThemeLibrary({ body } = {}) {
474
- const { error } = ThemeValidator.addToThemeLibrary().validate(
444
+ async getAllPages({ themeId } = {}) {
445
+ const { error } = ThemeValidator.getAllPages().validate(
475
446
  {
476
- body,
447
+ themeId,
477
448
  },
478
449
  { abortEarly: false, allowUnknown: true }
479
450
  );
@@ -482,16 +453,16 @@ class Theme {
482
453
  }
483
454
 
484
455
  // Showing warrnings if extra unknown parameters are found
485
- const { error: warrning } = ThemeValidator.addToThemeLibrary().validate(
456
+ const { error: warrning } = ThemeValidator.getAllPages().validate(
486
457
  {
487
- body,
458
+ themeId,
488
459
  },
489
460
  { abortEarly: false, allowUnknown: false }
490
461
  );
491
462
  if (warrning) {
492
463
  Logger({
493
464
  level: "WARN",
494
- message: "Parameter Validation warrnings for addToThemeLibrary",
465
+ message: "Parameter Validation warrnings for getAllPages",
495
466
  });
496
467
  Logger({ level: "WARN", message: warrning });
497
468
  }
@@ -500,13 +471,15 @@ class Theme {
500
471
 
501
472
  const response = await PlatformAPIClient.execute(
502
473
  this.config,
503
- "post",
504
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
474
+ "get",
475
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
505
476
  query_params,
506
- body
477
+ undefined
507
478
  );
508
479
 
509
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
480
+ const {
481
+ error: res_error,
482
+ } = ThemeModel.AllAvailablePageSchema().validate(response, {
510
483
  abortEarly: false,
511
484
  allowUnknown: false,
512
485
  });
@@ -514,7 +487,7 @@ class Theme {
514
487
  if (res_error) {
515
488
  Logger({
516
489
  level: "WARN",
517
- message: "Response Validation Warnnings for addToThemeLibrary",
490
+ message: "Response Validation Warnnings for getAllPages",
518
491
  });
519
492
  Logger({ level: "WARN", message: res_error });
520
493
  }
@@ -524,16 +497,13 @@ class Theme {
524
497
 
525
498
  /**
526
499
  * @param {Object} arg - Arg object.
527
- * @param {AddThemeRequestSchema} arg.body
528
500
  * @returns {Promise<ThemesSchema>} - Success response
529
- * @summary: Apply a theme
530
- * @description: Use this API to apply a theme to the website.
501
+ * @summary: Get the applied theme
502
+ * @description: Use this API to retrieve the theme that is currently applied to the website along with its details.
531
503
  */
532
- async applyTheme({ body } = {}) {
533
- const { error } = ThemeValidator.applyTheme().validate(
534
- {
535
- body,
536
- },
504
+ async getAppliedTheme({} = {}) {
505
+ const { error } = ThemeValidator.getAppliedTheme().validate(
506
+ {},
537
507
  { abortEarly: false, allowUnknown: true }
538
508
  );
539
509
  if (error) {
@@ -541,16 +511,14 @@ class Theme {
541
511
  }
542
512
 
543
513
  // Showing warrnings if extra unknown parameters are found
544
- const { error: warrning } = ThemeValidator.applyTheme().validate(
545
- {
546
- body,
547
- },
514
+ const { error: warrning } = ThemeValidator.getAppliedTheme().validate(
515
+ {},
548
516
  { abortEarly: false, allowUnknown: false }
549
517
  );
550
518
  if (warrning) {
551
519
  Logger({
552
520
  level: "WARN",
553
- message: "Parameter Validation warrnings for applyTheme",
521
+ message: "Parameter Validation warrnings for getAppliedTheme",
554
522
  });
555
523
  Logger({ level: "WARN", message: warrning });
556
524
  }
@@ -559,10 +527,10 @@ class Theme {
559
527
 
560
528
  const response = await PlatformAPIClient.execute(
561
529
  this.config,
562
- "post",
563
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/apply`,
530
+ "get",
531
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
564
532
  query_params,
565
- body
533
+ undefined
566
534
  );
567
535
 
568
536
  const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
@@ -573,7 +541,7 @@ class Theme {
573
541
  if (res_error) {
574
542
  Logger({
575
543
  level: "WARN",
576
- message: "Response Validation Warnnings for applyTheme",
544
+ message: "Response Validation Warnnings for getAppliedTheme",
577
545
  });
578
546
  Logger({ level: "WARN", message: res_error });
579
547
  }
@@ -583,16 +551,13 @@ class Theme {
583
551
 
584
552
  /**
585
553
  * @param {Object} arg - Arg object.
586
- * @param {string} arg.themeId - Theme ID
587
- * @returns {Promise<UpgradableThemeSchema>} - Success response
588
- * @summary: Checks if theme is upgradable
589
- * @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.
554
+ * @returns {Promise<FontsSchema>} - Success response
555
+ * @summary: Get all the supported fonts in a theme
556
+ * @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts.
590
557
  */
591
- async isUpgradable({ themeId } = {}) {
592
- const { error } = ThemeValidator.isUpgradable().validate(
593
- {
594
- themeId,
595
- },
558
+ async getFonts({} = {}) {
559
+ const { error } = ThemeValidator.getFonts().validate(
560
+ {},
596
561
  { abortEarly: false, allowUnknown: true }
597
562
  );
598
563
  if (error) {
@@ -600,16 +565,14 @@ class Theme {
600
565
  }
601
566
 
602
567
  // Showing warrnings if extra unknown parameters are found
603
- const { error: warrning } = ThemeValidator.isUpgradable().validate(
604
- {
605
- themeId,
606
- },
568
+ const { error: warrning } = ThemeValidator.getFonts().validate(
569
+ {},
607
570
  { abortEarly: false, allowUnknown: false }
608
571
  );
609
572
  if (warrning) {
610
573
  Logger({
611
574
  level: "WARN",
612
- message: "Parameter Validation warrnings for isUpgradable",
575
+ message: "Parameter Validation warrnings for getFonts",
613
576
  });
614
577
  Logger({ level: "WARN", message: warrning });
615
578
  }
@@ -619,14 +582,12 @@ class Theme {
619
582
  const response = await PlatformAPIClient.execute(
620
583
  this.config,
621
584
  "get",
622
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgradable`,
585
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fonts`,
623
586
  query_params,
624
587
  undefined
625
588
  );
626
589
 
627
- const {
628
- error: res_error,
629
- } = ThemeModel.UpgradableThemeSchema().validate(response, {
590
+ const { error: res_error } = ThemeModel.FontsSchema().validate(response, {
630
591
  abortEarly: false,
631
592
  allowUnknown: false,
632
593
  });
@@ -634,7 +595,7 @@ class Theme {
634
595
  if (res_error) {
635
596
  Logger({
636
597
  level: "WARN",
637
- message: "Response Validation Warnnings for isUpgradable",
598
+ message: "Response Validation Warnnings for getFonts",
638
599
  });
639
600
  Logger({ level: "WARN", message: res_error });
640
601
  }
@@ -644,15 +605,17 @@ class Theme {
644
605
 
645
606
  /**
646
607
  * @param {Object} arg - Arg object.
647
- * @param {string} arg.themeId - ID allotted to the theme.
648
- * @returns {Promise<ThemesSchema>} - Success response
649
- * @summary: Upgrade a theme
650
- * @description: Use this API to upgrade the current theme to its latest version.
608
+ * @param {string} arg.themeId - ID of the theme to be retrieved
609
+ * @param {string} arg.pageValue - Value of the page to be retrieved
610
+ * @returns {Promise<AvailablePageSchema>} - Success response
611
+ * @summary: Get page of a theme
612
+ * @description: Use this API to retrieve a page of a theme.
651
613
  */
652
- async upgradeTheme({ themeId } = {}) {
653
- const { error } = ThemeValidator.upgradeTheme().validate(
614
+ async getPage({ themeId, pageValue } = {}) {
615
+ const { error } = ThemeValidator.getPage().validate(
654
616
  {
655
617
  themeId,
618
+ pageValue,
656
619
  },
657
620
  { abortEarly: false, allowUnknown: true }
658
621
  );
@@ -661,16 +624,17 @@ class Theme {
661
624
  }
662
625
 
663
626
  // Showing warrnings if extra unknown parameters are found
664
- const { error: warrning } = ThemeValidator.upgradeTheme().validate(
627
+ const { error: warrning } = ThemeValidator.getPage().validate(
665
628
  {
666
629
  themeId,
630
+ pageValue,
667
631
  },
668
632
  { abortEarly: false, allowUnknown: false }
669
633
  );
670
634
  if (warrning) {
671
635
  Logger({
672
636
  level: "WARN",
673
- message: "Parameter Validation warrnings for upgradeTheme",
637
+ message: "Parameter Validation warrnings for getPage",
674
638
  });
675
639
  Logger({ level: "WARN", message: warrning });
676
640
  }
@@ -679,13 +643,15 @@ class Theme {
679
643
 
680
644
  const response = await PlatformAPIClient.execute(
681
645
  this.config,
682
- "put",
683
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgrade`,
646
+ "get",
647
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
684
648
  query_params,
685
649
  undefined
686
650
  );
687
651
 
688
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
652
+ const {
653
+ error: res_error,
654
+ } = ThemeModel.AvailablePageSchema().validate(response, {
689
655
  abortEarly: false,
690
656
  allowUnknown: false,
691
657
  });
@@ -693,7 +659,7 @@ class Theme {
693
659
  if (res_error) {
694
660
  Logger({
695
661
  level: "WARN",
696
- message: "Response Validation Warnnings for upgradeTheme",
662
+ message: "Response Validation Warnnings for getPage",
697
663
  });
698
664
  Logger({ level: "WARN", message: res_error });
699
665
  }
@@ -771,15 +737,15 @@ class Theme {
771
737
 
772
738
  /**
773
739
  * @param {Object} arg - Arg object.
774
- * @param {ThemesSchema} arg.body
740
+ * @param {string} arg.themeId - ID allotted to the theme.
775
741
  * @returns {Promise<ThemesSchema>} - Success response
776
- * @summary: Create a new theme
777
- * @description: Themes improve the look and appearance of a website. Use this API to create a theme.
742
+ * @summary: Gets theme by id
743
+ * @description: Use this API to retrieve the details of a specific theme by using its ID.
778
744
  */
779
- async createTheme({ body } = {}) {
780
- const { error } = ThemeValidator.createTheme().validate(
745
+ async getThemeById({ themeId } = {}) {
746
+ const { error } = ThemeValidator.getThemeById().validate(
781
747
  {
782
- body,
748
+ themeId,
783
749
  },
784
750
  { abortEarly: false, allowUnknown: true }
785
751
  );
@@ -788,16 +754,16 @@ class Theme {
788
754
  }
789
755
 
790
756
  // Showing warrnings if extra unknown parameters are found
791
- const { error: warrning } = ThemeValidator.createTheme().validate(
757
+ const { error: warrning } = ThemeValidator.getThemeById().validate(
792
758
  {
793
- body,
759
+ themeId,
794
760
  },
795
761
  { abortEarly: false, allowUnknown: false }
796
762
  );
797
763
  if (warrning) {
798
764
  Logger({
799
765
  level: "WARN",
800
- message: "Parameter Validation warrnings for createTheme",
766
+ message: "Parameter Validation warrnings for getThemeById",
801
767
  });
802
768
  Logger({ level: "WARN", message: warrning });
803
769
  }
@@ -806,10 +772,10 @@ class Theme {
806
772
 
807
773
  const response = await PlatformAPIClient.execute(
808
774
  this.config,
809
- "post",
810
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
775
+ "get",
776
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
811
777
  query_params,
812
- body
778
+ undefined
813
779
  );
814
780
 
815
781
  const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
@@ -820,7 +786,7 @@ class Theme {
820
786
  if (res_error) {
821
787
  Logger({
822
788
  level: "WARN",
823
- message: "Response Validation Warnnings for createTheme",
789
+ message: "Response Validation Warnnings for getThemeById",
824
790
  });
825
791
  Logger({ level: "WARN", message: res_error });
826
792
  }
@@ -830,13 +796,16 @@ class Theme {
830
796
 
831
797
  /**
832
798
  * @param {Object} arg - Arg object.
799
+ * @param {string} arg.themeId - ID allotted to the theme.
833
800
  * @returns {Promise<ThemesSchema>} - Success response
834
- * @summary: Get the applied theme
835
- * @description: Use this API to retrieve the theme that is currently applied to the website along with its details.
801
+ * @summary: Get a theme preview
802
+ * @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID.
836
803
  */
837
- async getAppliedTheme({} = {}) {
838
- const { error } = ThemeValidator.getAppliedTheme().validate(
839
- {},
804
+ async getThemeForPreview({ themeId } = {}) {
805
+ const { error } = ThemeValidator.getThemeForPreview().validate(
806
+ {
807
+ themeId,
808
+ },
840
809
  { abortEarly: false, allowUnknown: true }
841
810
  );
842
811
  if (error) {
@@ -844,14 +813,16 @@ class Theme {
844
813
  }
845
814
 
846
815
  // Showing warrnings if extra unknown parameters are found
847
- const { error: warrning } = ThemeValidator.getAppliedTheme().validate(
848
- {},
816
+ const { error: warrning } = ThemeValidator.getThemeForPreview().validate(
817
+ {
818
+ themeId,
819
+ },
849
820
  { abortEarly: false, allowUnknown: false }
850
821
  );
851
822
  if (warrning) {
852
823
  Logger({
853
824
  level: "WARN",
854
- message: "Parameter Validation warrnings for getAppliedTheme",
825
+ message: "Parameter Validation warrnings for getThemeForPreview",
855
826
  });
856
827
  Logger({ level: "WARN", message: warrning });
857
828
  }
@@ -861,7 +832,7 @@ class Theme {
861
832
  const response = await PlatformAPIClient.execute(
862
833
  this.config,
863
834
  "get",
864
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
835
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/preview`,
865
836
  query_params,
866
837
  undefined
867
838
  );
@@ -874,7 +845,7 @@ class Theme {
874
845
  if (res_error) {
875
846
  Logger({
876
847
  level: "WARN",
877
- message: "Response Validation Warnnings for getAppliedTheme",
848
+ message: "Response Validation Warnnings for getThemeForPreview",
878
849
  });
879
850
  Logger({ level: "WARN", message: res_error });
880
851
  }
@@ -884,13 +855,16 @@ class Theme {
884
855
 
885
856
  /**
886
857
  * @param {Object} arg - Arg object.
887
- * @returns {Promise<FontsSchema>} - Success response
888
- * @summary: Get all the supported fonts in a theme
889
- * @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts.
858
+ * @param {string} arg.themeId - ID allotted to the theme.
859
+ * @returns {Promise<any>} - Success response
860
+ * @summary: Fetch last modified timestamp
861
+ * @description: Use this API to fetch Last-Modified timestamp in header metadata.
890
862
  */
891
- async getFonts({} = {}) {
892
- const { error } = ThemeValidator.getFonts().validate(
893
- {},
863
+ async getThemeLastModified({ themeId } = {}) {
864
+ const { error } = ThemeValidator.getThemeLastModified().validate(
865
+ {
866
+ themeId,
867
+ },
894
868
  { abortEarly: false, allowUnknown: true }
895
869
  );
896
870
  if (error) {
@@ -898,14 +872,16 @@ class Theme {
898
872
  }
899
873
 
900
874
  // Showing warrnings if extra unknown parameters are found
901
- const { error: warrning } = ThemeValidator.getFonts().validate(
902
- {},
875
+ const { error: warrning } = ThemeValidator.getThemeLastModified().validate(
876
+ {
877
+ themeId,
878
+ },
903
879
  { abortEarly: false, allowUnknown: false }
904
880
  );
905
881
  if (warrning) {
906
882
  Logger({
907
883
  level: "WARN",
908
- message: "Parameter Validation warrnings for getFonts",
884
+ message: "Parameter Validation warrnings for getThemeLastModified",
909
885
  });
910
886
  Logger({ level: "WARN", message: warrning });
911
887
  }
@@ -914,21 +890,20 @@ class Theme {
914
890
 
915
891
  const response = await PlatformAPIClient.execute(
916
892
  this.config,
917
- "get",
918
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fonts`,
893
+ "head",
894
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/polling`,
919
895
  query_params,
920
896
  undefined
921
897
  );
922
898
 
923
- const { error: res_error } = ThemeModel.FontsSchema().validate(response, {
924
- abortEarly: false,
925
- allowUnknown: false,
926
- });
899
+ const { error: res_error } = Joi.string()
900
+ .allow("")
901
+ .validate(response, { abortEarly: false, allowUnknown: false });
927
902
 
928
903
  if (res_error) {
929
904
  Logger({
930
905
  level: "WARN",
931
- message: "Response Validation Warnnings for getFonts",
906
+ message: "Response Validation Warnnings for getThemeLastModified",
932
907
  });
933
908
  Logger({ level: "WARN", message: res_error });
934
909
  }
@@ -938,15 +913,19 @@ class Theme {
938
913
 
939
914
  /**
940
915
  * @param {Object} arg - Arg object.
941
- * @param {string} arg.themeId - ID allotted to the theme.
942
- * @returns {Promise<ThemesSchema>} - Success response
943
- * @summary: Gets theme by id
944
- * @description: Use this API to retrieve the details of a specific theme by using its ID.
916
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
917
+ * page. Default value is 10.
918
+ * @param {number} [arg.pageNo] - The page number to navigate through the
919
+ * given set of results. Default value is 1.
920
+ * @returns {Promise<ThemesListingResponseSchema>} - Success response
921
+ * @summary: Get a list of themes from the theme library
922
+ * @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.
945
923
  */
946
- async getThemeById({ themeId } = {}) {
947
- const { error } = ThemeValidator.getThemeById().validate(
924
+ async getThemeLibrary({ pageSize, pageNo } = {}) {
925
+ const { error } = ThemeValidator.getThemeLibrary().validate(
948
926
  {
949
- themeId,
927
+ pageSize,
928
+ pageNo,
950
929
  },
951
930
  { abortEarly: false, allowUnknown: true }
952
931
  );
@@ -955,31 +934,36 @@ class Theme {
955
934
  }
956
935
 
957
936
  // Showing warrnings if extra unknown parameters are found
958
- const { error: warrning } = ThemeValidator.getThemeById().validate(
937
+ const { error: warrning } = ThemeValidator.getThemeLibrary().validate(
959
938
  {
960
- themeId,
939
+ pageSize,
940
+ pageNo,
961
941
  },
962
942
  { abortEarly: false, allowUnknown: false }
963
943
  );
964
944
  if (warrning) {
965
945
  Logger({
966
946
  level: "WARN",
967
- message: "Parameter Validation warrnings for getThemeById",
947
+ message: "Parameter Validation warrnings for getThemeLibrary",
968
948
  });
969
949
  Logger({ level: "WARN", message: warrning });
970
950
  }
971
951
 
972
952
  const query_params = {};
953
+ query_params["page_size"] = pageSize;
954
+ query_params["page_no"] = pageNo;
973
955
 
974
956
  const response = await PlatformAPIClient.execute(
975
957
  this.config,
976
958
  "get",
977
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
959
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
978
960
  query_params,
979
961
  undefined
980
962
  );
981
963
 
982
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
964
+ const {
965
+ error: res_error,
966
+ } = ThemeModel.ThemesListingResponseSchema().validate(response, {
983
967
  abortEarly: false,
984
968
  allowUnknown: false,
985
969
  });
@@ -987,7 +971,7 @@ class Theme {
987
971
  if (res_error) {
988
972
  Logger({
989
973
  level: "WARN",
990
- message: "Response Validation Warnnings for getThemeById",
974
+ message: "Response Validation Warnnings for getThemeLibrary",
991
975
  });
992
976
  Logger({ level: "WARN", message: res_error });
993
977
  }
@@ -997,17 +981,15 @@ class Theme {
997
981
 
998
982
  /**
999
983
  * @param {Object} arg - Arg object.
1000
- * @param {string} arg.themeId - ID allotted to the theme.
1001
- * @param {ThemesSchema} arg.body
1002
- * @returns {Promise<ThemesSchema>} - Success response
1003
- * @summary: Update a theme
1004
- * @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more.
984
+ * @param {string} arg.themeId - Theme ID
985
+ * @returns {Promise<UpgradableThemeSchema>} - Success response
986
+ * @summary: Checks if theme is upgradable
987
+ * @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.
1005
988
  */
1006
- async updateTheme({ themeId, body } = {}) {
1007
- const { error } = ThemeValidator.updateTheme().validate(
989
+ async isUpgradable({ themeId } = {}) {
990
+ const { error } = ThemeValidator.isUpgradable().validate(
1008
991
  {
1009
992
  themeId,
1010
- body,
1011
993
  },
1012
994
  { abortEarly: false, allowUnknown: true }
1013
995
  );
@@ -1016,17 +998,16 @@ class Theme {
1016
998
  }
1017
999
 
1018
1000
  // Showing warrnings if extra unknown parameters are found
1019
- const { error: warrning } = ThemeValidator.updateTheme().validate(
1001
+ const { error: warrning } = ThemeValidator.isUpgradable().validate(
1020
1002
  {
1021
1003
  themeId,
1022
- body,
1023
1004
  },
1024
1005
  { abortEarly: false, allowUnknown: false }
1025
1006
  );
1026
1007
  if (warrning) {
1027
1008
  Logger({
1028
1009
  level: "WARN",
1029
- message: "Parameter Validation warrnings for updateTheme",
1010
+ message: "Parameter Validation warrnings for isUpgradable",
1030
1011
  });
1031
1012
  Logger({ level: "WARN", message: warrning });
1032
1013
  }
@@ -1035,13 +1016,15 @@ class Theme {
1035
1016
 
1036
1017
  const response = await PlatformAPIClient.execute(
1037
1018
  this.config,
1038
- "put",
1039
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
1019
+ "get",
1020
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgradable`,
1040
1021
  query_params,
1041
- body
1022
+ undefined
1042
1023
  );
1043
1024
 
1044
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1025
+ const {
1026
+ error: res_error,
1027
+ } = ThemeModel.UpgradableThemeSchema().validate(response, {
1045
1028
  abortEarly: false,
1046
1029
  allowUnknown: false,
1047
1030
  });
@@ -1049,7 +1032,7 @@ class Theme {
1049
1032
  if (res_error) {
1050
1033
  Logger({
1051
1034
  level: "WARN",
1052
- message: "Response Validation Warnnings for updateTheme",
1035
+ message: "Response Validation Warnnings for isUpgradable",
1053
1036
  });
1054
1037
  Logger({ level: "WARN", message: res_error });
1055
1038
  }
@@ -1061,11 +1044,11 @@ class Theme {
1061
1044
  * @param {Object} arg - Arg object.
1062
1045
  * @param {string} arg.themeId - ID allotted to the theme.
1063
1046
  * @returns {Promise<ThemesSchema>} - Success response
1064
- * @summary: Delete a theme
1065
- * @description: Use this API to delete a theme from the theme library.
1047
+ * @summary: Publish a theme
1048
+ * @description: Use this API to publish a theme that is either newly created or edited.
1066
1049
  */
1067
- async deleteTheme({ themeId } = {}) {
1068
- const { error } = ThemeValidator.deleteTheme().validate(
1050
+ async publishTheme({ themeId } = {}) {
1051
+ const { error } = ThemeValidator.publishTheme().validate(
1069
1052
  {
1070
1053
  themeId,
1071
1054
  },
@@ -1076,7 +1059,7 @@ class Theme {
1076
1059
  }
1077
1060
 
1078
1061
  // Showing warrnings if extra unknown parameters are found
1079
- const { error: warrning } = ThemeValidator.deleteTheme().validate(
1062
+ const { error: warrning } = ThemeValidator.publishTheme().validate(
1080
1063
  {
1081
1064
  themeId,
1082
1065
  },
@@ -1085,7 +1068,7 @@ class Theme {
1085
1068
  if (warrning) {
1086
1069
  Logger({
1087
1070
  level: "WARN",
1088
- message: "Parameter Validation warrnings for deleteTheme",
1071
+ message: "Parameter Validation warrnings for publishTheme",
1089
1072
  });
1090
1073
  Logger({ level: "WARN", message: warrning });
1091
1074
  }
@@ -1094,8 +1077,8 @@ class Theme {
1094
1077
 
1095
1078
  const response = await PlatformAPIClient.execute(
1096
1079
  this.config,
1097
- "delete",
1098
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
1080
+ "put",
1081
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
1099
1082
  query_params,
1100
1083
  undefined
1101
1084
  );
@@ -1108,7 +1091,7 @@ class Theme {
1108
1091
  if (res_error) {
1109
1092
  Logger({
1110
1093
  level: "WARN",
1111
- message: "Response Validation Warnnings for deleteTheme",
1094
+ message: "Response Validation Warnnings for publishTheme",
1112
1095
  });
1113
1096
  Logger({ level: "WARN", message: res_error });
1114
1097
  }
@@ -1120,11 +1103,11 @@ class Theme {
1120
1103
  * @param {Object} arg - Arg object.
1121
1104
  * @param {string} arg.themeId - ID allotted to the theme.
1122
1105
  * @returns {Promise<ThemesSchema>} - Success response
1123
- * @summary: Get a theme preview
1124
- * @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID.
1106
+ * @summary: Unarchive a theme
1107
+ * @description: Use this API to restore an archived theme and bring it back for editing or publishing.
1125
1108
  */
1126
- async getThemeForPreview({ themeId } = {}) {
1127
- const { error } = ThemeValidator.getThemeForPreview().validate(
1109
+ async unarchiveTheme({ themeId } = {}) {
1110
+ const { error } = ThemeValidator.unarchiveTheme().validate(
1128
1111
  {
1129
1112
  themeId,
1130
1113
  },
@@ -1135,7 +1118,7 @@ class Theme {
1135
1118
  }
1136
1119
 
1137
1120
  // Showing warrnings if extra unknown parameters are found
1138
- const { error: warrning } = ThemeValidator.getThemeForPreview().validate(
1121
+ const { error: warrning } = ThemeValidator.unarchiveTheme().validate(
1139
1122
  {
1140
1123
  themeId,
1141
1124
  },
@@ -1144,7 +1127,7 @@ class Theme {
1144
1127
  if (warrning) {
1145
1128
  Logger({
1146
1129
  level: "WARN",
1147
- message: "Parameter Validation warrnings for getThemeForPreview",
1130
+ message: "Parameter Validation warrnings for unarchiveTheme",
1148
1131
  });
1149
1132
  Logger({ level: "WARN", message: warrning });
1150
1133
  }
@@ -1153,8 +1136,8 @@ class Theme {
1153
1136
 
1154
1137
  const response = await PlatformAPIClient.execute(
1155
1138
  this.config,
1156
- "get",
1157
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/preview`,
1139
+ "put",
1140
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
1158
1141
  query_params,
1159
1142
  undefined
1160
1143
  );
@@ -1167,7 +1150,7 @@ class Theme {
1167
1150
  if (res_error) {
1168
1151
  Logger({
1169
1152
  level: "WARN",
1170
- message: "Response Validation Warnnings for getThemeForPreview",
1153
+ message: "Response Validation Warnnings for unarchiveTheme",
1171
1154
  });
1172
1155
  Logger({ level: "WARN", message: res_error });
1173
1156
  }
@@ -1179,11 +1162,11 @@ class Theme {
1179
1162
  * @param {Object} arg - Arg object.
1180
1163
  * @param {string} arg.themeId - ID allotted to the theme.
1181
1164
  * @returns {Promise<ThemesSchema>} - Success response
1182
- * @summary: Publish a theme
1183
- * @description: Use this API to publish a theme that is either newly created or edited.
1165
+ * @summary: Unpublish a theme
1166
+ * @description: Use this API to remove an existing theme from the list of available themes.
1184
1167
  */
1185
- async publishTheme({ themeId } = {}) {
1186
- const { error } = ThemeValidator.publishTheme().validate(
1168
+ async unpublishTheme({ themeId } = {}) {
1169
+ const { error } = ThemeValidator.unpublishTheme().validate(
1187
1170
  {
1188
1171
  themeId,
1189
1172
  },
@@ -1194,7 +1177,7 @@ class Theme {
1194
1177
  }
1195
1178
 
1196
1179
  // Showing warrnings if extra unknown parameters are found
1197
- const { error: warrning } = ThemeValidator.publishTheme().validate(
1180
+ const { error: warrning } = ThemeValidator.unpublishTheme().validate(
1198
1181
  {
1199
1182
  themeId,
1200
1183
  },
@@ -1203,7 +1186,7 @@ class Theme {
1203
1186
  if (warrning) {
1204
1187
  Logger({
1205
1188
  level: "WARN",
1206
- message: "Parameter Validation warrnings for publishTheme",
1189
+ message: "Parameter Validation warrnings for unpublishTheme",
1207
1190
  });
1208
1191
  Logger({ level: "WARN", message: warrning });
1209
1192
  }
@@ -1213,7 +1196,7 @@ class Theme {
1213
1196
  const response = await PlatformAPIClient.execute(
1214
1197
  this.config,
1215
1198
  "put",
1216
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
1199
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
1217
1200
  query_params,
1218
1201
  undefined
1219
1202
  );
@@ -1226,7 +1209,7 @@ class Theme {
1226
1209
  if (res_error) {
1227
1210
  Logger({
1228
1211
  level: "WARN",
1229
- message: "Response Validation Warnnings for publishTheme",
1212
+ message: "Response Validation Warnnings for unpublishTheme",
1230
1213
  });
1231
1214
  Logger({ level: "WARN", message: res_error });
1232
1215
  }
@@ -1236,15 +1219,17 @@ class Theme {
1236
1219
 
1237
1220
  /**
1238
1221
  * @param {Object} arg - Arg object.
1239
- * @param {string} arg.themeId - ID allotted to the theme.
1240
- * @returns {Promise<ThemesSchema>} - Success response
1241
- * @summary: Unpublish a theme
1242
- * @description: Use this API to remove an existing theme from the list of available themes.
1222
+ * @param {string} arg.themeId - ID of the theme to be retrieved
1223
+ * @param {AllAvailablePageSchema} arg.body
1224
+ * @returns {Promise<AllAvailablePageSchema>} - Success response
1225
+ * @summary: Update multiple pages of a theme
1226
+ * @description: Use this API to update multiple pages of a theme by its ID.
1243
1227
  */
1244
- async unpublishTheme({ themeId } = {}) {
1245
- const { error } = ThemeValidator.unpublishTheme().validate(
1228
+ async updateMultiplePages({ themeId, body } = {}) {
1229
+ const { error } = ThemeValidator.updateMultiplePages().validate(
1246
1230
  {
1247
1231
  themeId,
1232
+ body,
1248
1233
  },
1249
1234
  { abortEarly: false, allowUnknown: true }
1250
1235
  );
@@ -1253,16 +1238,17 @@ class Theme {
1253
1238
  }
1254
1239
 
1255
1240
  // Showing warrnings if extra unknown parameters are found
1256
- const { error: warrning } = ThemeValidator.unpublishTheme().validate(
1241
+ const { error: warrning } = ThemeValidator.updateMultiplePages().validate(
1257
1242
  {
1258
1243
  themeId,
1244
+ body,
1259
1245
  },
1260
1246
  { abortEarly: false, allowUnknown: false }
1261
1247
  );
1262
1248
  if (warrning) {
1263
1249
  Logger({
1264
1250
  level: "WARN",
1265
- message: "Parameter Validation warrnings for unpublishTheme",
1251
+ message: "Parameter Validation warrnings for updateMultiplePages",
1266
1252
  });
1267
1253
  Logger({ level: "WARN", message: warrning });
1268
1254
  }
@@ -1272,12 +1258,14 @@ class Theme {
1272
1258
  const response = await PlatformAPIClient.execute(
1273
1259
  this.config,
1274
1260
  "put",
1275
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
1261
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
1276
1262
  query_params,
1277
- undefined
1263
+ body
1278
1264
  );
1279
1265
 
1280
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1266
+ const {
1267
+ error: res_error,
1268
+ } = ThemeModel.AllAvailablePageSchema().validate(response, {
1281
1269
  abortEarly: false,
1282
1270
  allowUnknown: false,
1283
1271
  });
@@ -1285,7 +1273,7 @@ class Theme {
1285
1273
  if (res_error) {
1286
1274
  Logger({
1287
1275
  level: "WARN",
1288
- message: "Response Validation Warnnings for unpublishTheme",
1276
+ message: "Response Validation Warnnings for updateMultiplePages",
1289
1277
  });
1290
1278
  Logger({ level: "WARN", message: res_error });
1291
1279
  }
@@ -1295,15 +1283,19 @@ class Theme {
1295
1283
 
1296
1284
  /**
1297
1285
  * @param {Object} arg - Arg object.
1298
- * @param {string} arg.themeId - ID allotted to the theme.
1299
- * @returns {Promise<ThemesSchema>} - Success response
1300
- * @summary: Archive a theme
1301
- * @description: Use this API to store an existing theme but not delete it so that it can be used in future if required.
1286
+ * @param {string} arg.themeId - ID of the theme
1287
+ * @param {string} arg.pageValue - Value of the page to be updated
1288
+ * @param {AvailablePageSchema} arg.body
1289
+ * @returns {Promise<AvailablePageSchema>} - Success response
1290
+ * @summary: Updates a page
1291
+ * @description: Use this API to update a page for a theme by its ID.
1302
1292
  */
1303
- async archiveTheme({ themeId } = {}) {
1304
- const { error } = ThemeValidator.archiveTheme().validate(
1293
+ async updatePage({ themeId, pageValue, body } = {}) {
1294
+ const { error } = ThemeValidator.updatePage().validate(
1305
1295
  {
1306
1296
  themeId,
1297
+ pageValue,
1298
+ body,
1307
1299
  },
1308
1300
  { abortEarly: false, allowUnknown: true }
1309
1301
  );
@@ -1312,16 +1304,18 @@ class Theme {
1312
1304
  }
1313
1305
 
1314
1306
  // Showing warrnings if extra unknown parameters are found
1315
- const { error: warrning } = ThemeValidator.archiveTheme().validate(
1307
+ const { error: warrning } = ThemeValidator.updatePage().validate(
1316
1308
  {
1317
1309
  themeId,
1310
+ pageValue,
1311
+ body,
1318
1312
  },
1319
1313
  { abortEarly: false, allowUnknown: false }
1320
1314
  );
1321
1315
  if (warrning) {
1322
1316
  Logger({
1323
1317
  level: "WARN",
1324
- message: "Parameter Validation warrnings for archiveTheme",
1318
+ message: "Parameter Validation warrnings for updatePage",
1325
1319
  });
1326
1320
  Logger({ level: "WARN", message: warrning });
1327
1321
  }
@@ -1331,12 +1325,14 @@ class Theme {
1331
1325
  const response = await PlatformAPIClient.execute(
1332
1326
  this.config,
1333
1327
  "put",
1334
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
1328
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
1335
1329
  query_params,
1336
- undefined
1330
+ body
1337
1331
  );
1338
1332
 
1339
- const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1333
+ const {
1334
+ error: res_error,
1335
+ } = ThemeModel.AvailablePageSchema().validate(response, {
1340
1336
  abortEarly: false,
1341
1337
  allowUnknown: false,
1342
1338
  });
@@ -1344,7 +1340,7 @@ class Theme {
1344
1340
  if (res_error) {
1345
1341
  Logger({
1346
1342
  level: "WARN",
1347
- message: "Response Validation Warnnings for archiveTheme",
1343
+ message: "Response Validation Warnnings for updatePage",
1348
1344
  });
1349
1345
  Logger({ level: "WARN", message: res_error });
1350
1346
  }
@@ -1355,14 +1351,16 @@ class Theme {
1355
1351
  /**
1356
1352
  * @param {Object} arg - Arg object.
1357
1353
  * @param {string} arg.themeId - ID allotted to the theme.
1354
+ * @param {ThemesSchema} arg.body
1358
1355
  * @returns {Promise<ThemesSchema>} - Success response
1359
- * @summary: Unarchive a theme
1360
- * @description: Use this API to restore an archived theme and bring it back for editing or publishing.
1356
+ * @summary: Update a theme
1357
+ * @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more.
1361
1358
  */
1362
- async unarchiveTheme({ themeId } = {}) {
1363
- const { error } = ThemeValidator.unarchiveTheme().validate(
1359
+ async updateTheme({ themeId, body } = {}) {
1360
+ const { error } = ThemeValidator.updateTheme().validate(
1364
1361
  {
1365
1362
  themeId,
1363
+ body,
1366
1364
  },
1367
1365
  { abortEarly: false, allowUnknown: true }
1368
1366
  );
@@ -1371,16 +1369,17 @@ class Theme {
1371
1369
  }
1372
1370
 
1373
1371
  // Showing warrnings if extra unknown parameters are found
1374
- const { error: warrning } = ThemeValidator.unarchiveTheme().validate(
1372
+ const { error: warrning } = ThemeValidator.updateTheme().validate(
1375
1373
  {
1376
1374
  themeId,
1375
+ body,
1377
1376
  },
1378
1377
  { abortEarly: false, allowUnknown: false }
1379
1378
  );
1380
1379
  if (warrning) {
1381
1380
  Logger({
1382
1381
  level: "WARN",
1383
- message: "Parameter Validation warrnings for unarchiveTheme",
1382
+ message: "Parameter Validation warrnings for updateTheme",
1384
1383
  });
1385
1384
  Logger({ level: "WARN", message: warrning });
1386
1385
  }
@@ -1390,9 +1389,9 @@ class Theme {
1390
1389
  const response = await PlatformAPIClient.execute(
1391
1390
  this.config,
1392
1391
  "put",
1393
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
1392
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
1394
1393
  query_params,
1395
- undefined
1394
+ body
1396
1395
  );
1397
1396
 
1398
1397
  const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
@@ -1403,7 +1402,7 @@ class Theme {
1403
1402
  if (res_error) {
1404
1403
  Logger({
1405
1404
  level: "WARN",
1406
- message: "Response Validation Warnnings for unarchiveTheme",
1405
+ message: "Response Validation Warnnings for updateTheme",
1407
1406
  });
1408
1407
  Logger({ level: "WARN", message: res_error });
1409
1408
  }
@@ -1414,12 +1413,12 @@ class Theme {
1414
1413
  /**
1415
1414
  * @param {Object} arg - Arg object.
1416
1415
  * @param {string} arg.themeId - ID allotted to the theme.
1417
- * @returns {Promise<any>} - Success response
1418
- * @summary: Fetch last modified timestamp
1419
- * @description: Use this API to fetch Last-Modified timestamp in header metadata.
1416
+ * @returns {Promise<ThemesSchema>} - Success response
1417
+ * @summary: Upgrade a theme
1418
+ * @description: Use this API to upgrade the current theme to its latest version.
1420
1419
  */
1421
- async getThemeLastModified({ themeId } = {}) {
1422
- const { error } = ThemeValidator.getThemeLastModified().validate(
1420
+ async upgradeTheme({ themeId } = {}) {
1421
+ const { error } = ThemeValidator.upgradeTheme().validate(
1423
1422
  {
1424
1423
  themeId,
1425
1424
  },
@@ -1430,7 +1429,7 @@ class Theme {
1430
1429
  }
1431
1430
 
1432
1431
  // Showing warrnings if extra unknown parameters are found
1433
- const { error: warrning } = ThemeValidator.getThemeLastModified().validate(
1432
+ const { error: warrning } = ThemeValidator.upgradeTheme().validate(
1434
1433
  {
1435
1434
  themeId,
1436
1435
  },
@@ -1439,7 +1438,7 @@ class Theme {
1439
1438
  if (warrning) {
1440
1439
  Logger({
1441
1440
  level: "WARN",
1442
- message: "Parameter Validation warrnings for getThemeLastModified",
1441
+ message: "Parameter Validation warrnings for upgradeTheme",
1443
1442
  });
1444
1443
  Logger({ level: "WARN", message: warrning });
1445
1444
  }
@@ -1448,20 +1447,21 @@ class Theme {
1448
1447
 
1449
1448
  const response = await PlatformAPIClient.execute(
1450
1449
  this.config,
1451
- "head",
1452
- `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/polling`,
1450
+ "put",
1451
+ `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgrade`,
1453
1452
  query_params,
1454
1453
  undefined
1455
1454
  );
1456
1455
 
1457
- const { error: res_error } = Joi.string()
1458
- .allow("")
1459
- .validate(response, { abortEarly: false, allowUnknown: false });
1456
+ const { error: res_error } = ThemeModel.ThemesSchema().validate(response, {
1457
+ abortEarly: false,
1458
+ allowUnknown: false,
1459
+ });
1460
1460
 
1461
1461
  if (res_error) {
1462
1462
  Logger({
1463
1463
  level: "WARN",
1464
- message: "Response Validation Warnnings for getThemeLastModified",
1464
+ message: "Response Validation Warnnings for upgradeTheme",
1465
1465
  });
1466
1466
  Logger({ level: "WARN", message: res_error });
1467
1467
  }