@gofynd/fdk-client-javascript 1.0.2 → 1.0.4

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 (346) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  12. package/sdk/application/Cart/CartApplicationClient.js +595 -594
  13. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  14. package/sdk/application/Cart/CartApplicationModel.js +490 -885
  15. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  16. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  17. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  18. package/sdk/application/Catalog/CatalogApplicationClient.js +1079 -1078
  19. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  20. package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
  21. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  22. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  23. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  24. package/sdk/application/Common/CommonApplicationClient.js +43 -42
  25. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  26. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  27. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  28. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  29. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  30. package/sdk/application/Communication/CommunicationApplicationClient.js +32 -31
  31. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  32. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  33. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  34. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  41. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  42. package/sdk/application/Content/ContentApplicationClient.js +216 -215
  43. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  44. package/sdk/application/Content/ContentApplicationModel.js +468 -884
  45. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  46. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.js +65 -64
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  53. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  54. package/sdk/application/Lead/LeadApplicationClient.js +109 -108
  55. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  56. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  57. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  58. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  59. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +31 -22
  60. package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
  61. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  62. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  63. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  64. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -9
  65. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  66. package/sdk/application/Order/OrderApplicationClient.js +247 -246
  67. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  68. package/sdk/application/Order/OrderApplicationModel.js +361 -656
  69. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  70. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  71. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  72. package/sdk/application/Payment/PaymentApplicationClient.js +781 -780
  73. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  74. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  75. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  76. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  77. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  78. package/sdk/application/PosCart/PosCartApplicationClient.js +646 -645
  79. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  80. package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
  81. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  82. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +122 -121
  85. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  86. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  87. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  88. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  89. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  90. package/sdk/application/Share/ShareApplicationClient.js +94 -93
  91. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  92. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  93. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  94. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  95. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  96. package/sdk/application/Theme/ThemeApplicationClient.js +38 -37
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  98. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  99. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  100. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  101. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  102. package/sdk/application/User/UserApplicationClient.js +619 -618
  103. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  104. package/sdk/application/User/UserApplicationModel.js +440 -689
  105. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  106. package/sdk/application/User/UserApplicationValidator.js +89 -89
  107. package/sdk/common/AxiosHelper.js +18 -7
  108. package/sdk/constructUrl.d.ts +5 -0
  109. package/sdk/constructUrl.js +13 -0
  110. package/sdk/index.d.ts +3 -0
  111. package/sdk/index.js +5 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  115. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
  116. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  118. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  119. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  124. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +7 -6
  126. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  127. package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
  128. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  129. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  130. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  131. package/sdk/platform/Billing/BillingPlatformValidator.js +26 -25
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  137. package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  142. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
  143. package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
  146. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  147. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
  148. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  149. package/sdk/platform/Common/CommonPlatformClient.js +40 -51
  150. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  151. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  152. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  153. package/sdk/platform/Common/CommonPlatformValidator.js +7 -6
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
  156. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  157. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
  158. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  159. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  160. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +39 -38
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  183. package/sdk/platform/Content/ContentPlatformModel.js +485 -907
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +30 -29
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +12 -11
  200. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  201. package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
  202. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  203. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  204. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  205. package/sdk/platform/Inventory/InventoryPlatformValidator.js +29 -28
  206. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  207. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
  208. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  209. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
  210. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  211. package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
  212. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  213. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  214. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  215. package/sdk/platform/Lead/LeadPlatformValidator.js +25 -24
  216. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  217. package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
  218. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  219. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
  220. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  221. package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
  222. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  223. package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
  224. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  225. package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
  226. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  227. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  228. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  229. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  230. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
  231. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
  232. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  233. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
  234. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  235. package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
  236. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  237. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  238. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  239. package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
  240. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  241. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  242. package/sdk/platform/PlatformClient.d.ts +7972 -7888
  243. package/sdk/platform/PlatformClient.js +8678 -10107
  244. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
  245. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
  246. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  247. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
  248. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  249. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  250. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  251. package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
  252. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  253. package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
  254. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  255. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  256. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  257. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
  258. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  259. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
  260. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  261. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  262. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  263. package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
  264. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  265. package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
  266. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  267. package/sdk/platform/User/UserPlatformModel.js +440 -689
  268. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  269. package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
  270. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  271. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  272. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  273. package/sdk/platform/Webhook/WebhookPlatformValidator.js +15 -14
  274. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  275. package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -38
  276. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  277. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  278. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  279. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  280. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  281. package/sdk/public/Inventory/InventoryPublicClient.js +115 -113
  282. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  283. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  284. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  285. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  286. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  287. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  288. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  289. package/.github/workflows/on_create_release.yml +0 -23
  290. package/.github/workflows/on_merge_main.yml +0 -38
  291. package/.github/workflows/on_pull_request.yml +0 -35
  292. package/.prettierrc +0 -5
  293. package/documentation/application/CART.md +0 -7339
  294. package/documentation/application/CATALOG.md +0 -9597
  295. package/documentation/application/COMMON.md +0 -452
  296. package/documentation/application/COMMUNICATION.md +0 -467
  297. package/documentation/application/CONFIGURATION.md +0 -2906
  298. package/documentation/application/CONTENT.md +0 -3351
  299. package/documentation/application/FILESTORAGE.md +0 -578
  300. package/documentation/application/LEAD.md +0 -1895
  301. package/documentation/application/LOGISTIC.md +0 -765
  302. package/documentation/application/ORDER.md +0 -3432
  303. package/documentation/application/PAYMENT.md +0 -5221
  304. package/documentation/application/POSCART.md +0 -7938
  305. package/documentation/application/README.md +0 -21
  306. package/documentation/application/REWARDS.md +0 -708
  307. package/documentation/application/SHARE.md +0 -733
  308. package/documentation/application/THEME.md +0 -5800
  309. package/documentation/application/USER.md +0 -4335
  310. package/documentation/platform/ANALYTICS.md +0 -1154
  311. package/documentation/platform/AUDITTRAIL.md +0 -576
  312. package/documentation/platform/BILLING.md +0 -2400
  313. package/documentation/platform/CART.md +0 -5559
  314. package/documentation/platform/CATALOG.md +0 -23261
  315. package/documentation/platform/COMMON.md +0 -452
  316. package/documentation/platform/COMMUNICATION.md +0 -5718
  317. package/documentation/platform/COMPANYPROFILE.md +0 -2031
  318. package/documentation/platform/CONFIGURATION.md +0 -7339
  319. package/documentation/platform/CONTENT.md +0 -9098
  320. package/documentation/platform/DISCOUNT.md +0 -863
  321. package/documentation/platform/FILESTORAGE.md +0 -1081
  322. package/documentation/platform/INVENTORY.md +0 -1779
  323. package/documentation/platform/LEAD.md +0 -4740
  324. package/documentation/platform/ORDER.md +0 -8486
  325. package/documentation/platform/PARTNER.md +0 -220
  326. package/documentation/platform/PAYMENT.md +0 -3448
  327. package/documentation/platform/README.md +0 -27
  328. package/documentation/platform/REWARDS.md +0 -1083
  329. package/documentation/platform/SHARE.md +0 -606
  330. package/documentation/platform/THEME.md +0 -35729
  331. package/documentation/platform/USER.md +0 -2319
  332. package/documentation/platform/WEBHOOK.md +0 -591
  333. package/documentation/public/CONFIGURATION.md +0 -452
  334. package/documentation/public/INVENTORY.md +0 -690
  335. package/documentation/public/WEBHOOK.md +0 -352
  336. package/jest.config.d.ts +0 -4
  337. package/jest.config.js +0 -6
  338. package/tests/application/catalog.spec.js +0 -47
  339. package/tests/common/action-url.spec.js +0 -35
  340. package/tests/common/schema/action-url.json +0 -178
  341. package/tests/common/schema/url-action.json +0 -683
  342. package/tests/common/url-action.spec.js +0 -48
  343. package/tests/helpers/cookie.helper.js +0 -31
  344. package/tests/helpers/oauth.helper.js +0 -43
  345. package/tests/platform/catalog.spec.js +0 -49
  346. package/tests/public/location.spec.js +0 -39
@@ -1,10 +1,11 @@
1
- const APIClient = require("../ApplicationAPIClient");
1
+ const ApplicationAPIClient = require("../ApplicationAPIClient");
2
+ const { FDKClientValidationError } = require("../../common/FDKError");
2
3
  const constructUrl = require("../constructUrl");
3
4
  const Paginator = require("../../common/Paginator");
4
- const { FDKClientValidationError } = require("../../common/FDKError");
5
5
  const ContentValidator = require("./ContentApplicationValidator");
6
6
  const ContentModel = require("./ContentApplicationModel");
7
7
  const { Logger } = require("./../../common/Logger");
8
+ const Joi = require("joi");
8
9
 
9
10
  class Content {
10
11
  constructor(_conf) {
@@ -14,23 +15,23 @@ class Content {
14
15
  getBlog: "/service/application/content/v1.0/blogs/{slug}",
15
16
  getBlogs: "/service/application/content/v1.0/blogs/",
16
17
  getDataLoaders: "/service/application/content/v1.0/data-loader",
17
- getFaqs: "/service/application/content/v1.0/faq",
18
- getFaqCategories: "/service/application/content/v1.0/faq/categories",
19
18
  getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
19
+ getFaqCategories: "/service/application/content/v1.0/faq/categories",
20
20
  getFaqCategoryBySlug:
21
21
  "/service/application/content/v1.0/faq/category/{slug}",
22
+ getFaqs: "/service/application/content/v1.0/faq",
22
23
  getFaqsByCategorySlug:
23
24
  "/service/application/content/v1.0/faq/category/{slug}/faqs",
24
25
  getLandingPage: "/service/application/content/v1.0/landing-page",
25
26
  getLegalInformation: "/service/application/content/v1.0/legal",
26
27
  getNavigations: "/service/application/content/v1.0/navigations/",
28
+ getPage: "/service/application/content/v2.0/pages/{slug}",
29
+ getPages: "/service/application/content/v2.0/pages/",
27
30
  getSEOConfiguration: "/service/application/content/v1.0/seo",
28
- getSlideshows: "/service/application/content/v1.0/slideshow/",
29
31
  getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
32
+ getSlideshows: "/service/application/content/v1.0/slideshow/",
30
33
  getSupportInformation: "/service/application/content/v1.0/support",
31
34
  getTags: "/service/application/content/v1.0/tags",
32
- getPage: "/service/application/content/v2.0/pages/{slug}",
33
- getPages: "/service/application/content/v2.0/pages/",
34
35
  };
35
36
  this._urls = Object.entries(this._relativeUrls).reduce(
36
37
  (urls, [method, relativeUrl]) => {
@@ -80,7 +81,7 @@ class Content {
80
81
 
81
82
  const xHeaders = {};
82
83
 
83
- const response = await APIClient.execute(
84
+ const response = await ApplicationAPIClient.execute(
84
85
  this._conf,
85
86
  "get",
86
87
  constructUrl({
@@ -147,7 +148,7 @@ class Content {
147
148
 
148
149
  const xHeaders = {};
149
150
 
150
- const response = await APIClient.execute(
151
+ const response = await ApplicationAPIClient.execute(
151
152
  this._conf,
152
153
  "get",
153
154
  constructUrl({
@@ -212,7 +213,7 @@ class Content {
212
213
 
213
214
  const xHeaders = {};
214
215
 
215
- const response = await APIClient.execute(
216
+ const response = await ApplicationAPIClient.execute(
216
217
  this._conf,
217
218
  "get",
218
219
  constructUrl({
@@ -264,7 +265,7 @@ class Content {
264
265
  });
265
266
  return data;
266
267
  };
267
- paginator.setCallback(callback);
268
+ paginator.setCallback(callback.bind(this));
268
269
  return paginator;
269
270
  }
270
271
 
@@ -300,7 +301,7 @@ class Content {
300
301
 
301
302
  const xHeaders = {};
302
303
 
303
- const response = await APIClient.execute(
304
+ const response = await ApplicationAPIClient.execute(
304
305
  this._conf,
305
306
  "get",
306
307
  constructUrl({
@@ -332,13 +333,16 @@ class Content {
332
333
 
333
334
  /**
334
335
  * @param {Object} arg - Arg object.
335
- * @returns {Promise<FaqResponseSchema>} - Success response
336
- * @summary: Get a list of FAQs
337
- * @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
336
+ * @param {string} arg.slug - A short, human-readable, URL-friendly
337
+ * identifier of an FAQ. You can get slug value from the endpoint
338
+ * /service/application/content/v1.0/faq.
339
+ * @returns {Promise<FaqSchema>} - Success response
340
+ * @summary: Get an FAQ
341
+ * @description: Use this API to get a particular FAQ by its slug.
338
342
  */
339
- async getFaqs({} = {}) {
340
- const { error } = ContentValidator.getFaqs().validate(
341
- {},
343
+ async getFaqBySlug({ slug } = {}) {
344
+ const { error } = ContentValidator.getFaqBySlug().validate(
345
+ { slug },
342
346
  { abortEarly: false, allowUnknown: true }
343
347
  );
344
348
  if (error) {
@@ -346,14 +350,14 @@ class Content {
346
350
  }
347
351
 
348
352
  // Showing warrnings if extra unknown parameters are found
349
- const { error: warrning } = ContentValidator.getFaqs().validate(
350
- {},
353
+ const { error: warrning } = ContentValidator.getFaqBySlug().validate(
354
+ { slug },
351
355
  { abortEarly: false, allowUnknown: false }
352
356
  );
353
357
  if (warrning) {
354
358
  Logger({
355
359
  level: "WARN",
356
- message: "Parameter Validation warrnings for getFaqs",
360
+ message: "Parameter Validation warrnings for getFaqBySlug",
357
361
  });
358
362
  Logger({ level: "WARN", message: warrning });
359
363
  }
@@ -362,21 +366,19 @@ class Content {
362
366
 
363
367
  const xHeaders = {};
364
368
 
365
- const response = await APIClient.execute(
369
+ const response = await ApplicationAPIClient.execute(
366
370
  this._conf,
367
371
  "get",
368
372
  constructUrl({
369
- url: this._urls["getFaqs"],
370
- params: {},
373
+ url: this._urls["getFaqBySlug"],
374
+ params: { slug },
371
375
  }),
372
376
  query_params,
373
377
  undefined,
374
378
  xHeaders
375
379
  );
376
380
 
377
- const {
378
- error: res_error,
379
- } = ContentModel.FaqResponseSchema().validate(response, {
381
+ const { error: res_error } = ContentModel.FaqSchema().validate(response, {
380
382
  abortEarly: false,
381
383
  allowUnknown: false,
382
384
  });
@@ -384,7 +386,7 @@ class Content {
384
386
  if (res_error) {
385
387
  Logger({
386
388
  level: "WARN",
387
- message: "Response Validation Warnnings for getFaqs",
389
+ message: "Response Validation Warnnings for getFaqBySlug",
388
390
  });
389
391
  Logger({ level: "WARN", message: res_error });
390
392
  }
@@ -424,7 +426,7 @@ class Content {
424
426
 
425
427
  const xHeaders = {};
426
428
 
427
- const response = await APIClient.execute(
429
+ const response = await ApplicationAPIClient.execute(
428
430
  this._conf,
429
431
  "get",
430
432
  constructUrl({
@@ -457,14 +459,14 @@ class Content {
457
459
  /**
458
460
  * @param {Object} arg - Arg object.
459
461
  * @param {string} arg.slug - A short, human-readable, URL-friendly
460
- * identifier of an FAQ. You can get slug value from the endpoint
461
- * /service/application/content/v1.0/faq.
462
- * @returns {Promise<FaqSchema>} - Success response
463
- * @summary: Get an FAQ
464
- * @description: Use this API to get a particular FAQ by its slug.
462
+ * identifier of an FAQ category. You can get slug value from the endpoint
463
+ * /service/application/content/v1.0/faq/categories.
464
+ * @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
465
+ * @summary: Get the FAQ category
466
+ * @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
465
467
  */
466
- async getFaqBySlug({ slug } = {}) {
467
- const { error } = ContentValidator.getFaqBySlug().validate(
468
+ async getFaqCategoryBySlug({ slug } = {}) {
469
+ const { error } = ContentValidator.getFaqCategoryBySlug().validate(
468
470
  { slug },
469
471
  { abortEarly: false, allowUnknown: true }
470
472
  );
@@ -473,14 +475,16 @@ class Content {
473
475
  }
474
476
 
475
477
  // Showing warrnings if extra unknown parameters are found
476
- const { error: warrning } = ContentValidator.getFaqBySlug().validate(
478
+ const {
479
+ error: warrning,
480
+ } = ContentValidator.getFaqCategoryBySlug().validate(
477
481
  { slug },
478
482
  { abortEarly: false, allowUnknown: false }
479
483
  );
480
484
  if (warrning) {
481
485
  Logger({
482
486
  level: "WARN",
483
- message: "Parameter Validation warrnings for getFaqBySlug",
487
+ message: "Parameter Validation warrnings for getFaqCategoryBySlug",
484
488
  });
485
489
  Logger({ level: "WARN", message: warrning });
486
490
  }
@@ -489,11 +493,11 @@ class Content {
489
493
 
490
494
  const xHeaders = {};
491
495
 
492
- const response = await APIClient.execute(
496
+ const response = await ApplicationAPIClient.execute(
493
497
  this._conf,
494
498
  "get",
495
499
  constructUrl({
496
- url: this._urls["getFaqBySlug"],
500
+ url: this._urls["getFaqCategoryBySlug"],
497
501
  params: { slug },
498
502
  }),
499
503
  query_params,
@@ -501,7 +505,9 @@ class Content {
501
505
  xHeaders
502
506
  );
503
507
 
504
- const { error: res_error } = ContentModel.FaqSchema().validate(response, {
508
+ const {
509
+ error: res_error,
510
+ } = ContentModel.GetFaqCategoryBySlugSchema().validate(response, {
505
511
  abortEarly: false,
506
512
  allowUnknown: false,
507
513
  });
@@ -509,7 +515,7 @@ class Content {
509
515
  if (res_error) {
510
516
  Logger({
511
517
  level: "WARN",
512
- message: "Response Validation Warnnings for getFaqBySlug",
518
+ message: "Response Validation Warnnings for getFaqCategoryBySlug",
513
519
  });
514
520
  Logger({ level: "WARN", message: res_error });
515
521
  }
@@ -519,16 +525,13 @@ class Content {
519
525
 
520
526
  /**
521
527
  * @param {Object} arg - Arg object.
522
- * @param {string} arg.slug - A short, human-readable, URL-friendly
523
- * identifier of an FAQ category. You can get slug value from the endpoint
524
- * /service/application/content/v1.0/faq/categories.
525
- * @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
526
- * @summary: Get the FAQ category
527
- * @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
528
+ * @returns {Promise<FaqResponseSchema>} - Success response
529
+ * @summary: Get a list of FAQs
530
+ * @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
528
531
  */
529
- async getFaqCategoryBySlug({ slug } = {}) {
530
- const { error } = ContentValidator.getFaqCategoryBySlug().validate(
531
- { slug },
532
+ async getFaqs({} = {}) {
533
+ const { error } = ContentValidator.getFaqs().validate(
534
+ {},
532
535
  { abortEarly: false, allowUnknown: true }
533
536
  );
534
537
  if (error) {
@@ -536,16 +539,14 @@ class Content {
536
539
  }
537
540
 
538
541
  // Showing warrnings if extra unknown parameters are found
539
- const {
540
- error: warrning,
541
- } = ContentValidator.getFaqCategoryBySlug().validate(
542
- { slug },
542
+ const { error: warrning } = ContentValidator.getFaqs().validate(
543
+ {},
543
544
  { abortEarly: false, allowUnknown: false }
544
545
  );
545
546
  if (warrning) {
546
547
  Logger({
547
548
  level: "WARN",
548
- message: "Parameter Validation warrnings for getFaqCategoryBySlug",
549
+ message: "Parameter Validation warrnings for getFaqs",
549
550
  });
550
551
  Logger({ level: "WARN", message: warrning });
551
552
  }
@@ -554,12 +555,12 @@ class Content {
554
555
 
555
556
  const xHeaders = {};
556
557
 
557
- const response = await APIClient.execute(
558
+ const response = await ApplicationAPIClient.execute(
558
559
  this._conf,
559
560
  "get",
560
561
  constructUrl({
561
- url: this._urls["getFaqCategoryBySlug"],
562
- params: { slug },
562
+ url: this._urls["getFaqs"],
563
+ params: {},
563
564
  }),
564
565
  query_params,
565
566
  undefined,
@@ -568,7 +569,7 @@ class Content {
568
569
 
569
570
  const {
570
571
  error: res_error,
571
- } = ContentModel.GetFaqCategoryBySlugSchema().validate(response, {
572
+ } = ContentModel.FaqResponseSchema().validate(response, {
572
573
  abortEarly: false,
573
574
  allowUnknown: false,
574
575
  });
@@ -576,7 +577,7 @@ class Content {
576
577
  if (res_error) {
577
578
  Logger({
578
579
  level: "WARN",
579
- message: "Response Validation Warnnings for getFaqCategoryBySlug",
580
+ message: "Response Validation Warnnings for getFaqs",
580
581
  });
581
582
  Logger({ level: "WARN", message: res_error });
582
583
  }
@@ -621,7 +622,7 @@ class Content {
621
622
 
622
623
  const xHeaders = {};
623
624
 
624
- const response = await APIClient.execute(
625
+ const response = await ApplicationAPIClient.execute(
625
626
  this._conf,
626
627
  "get",
627
628
  constructUrl({
@@ -681,7 +682,7 @@ class Content {
681
682
 
682
683
  const xHeaders = {};
683
684
 
684
- const response = await APIClient.execute(
685
+ const response = await ApplicationAPIClient.execute(
685
686
  this._conf,
686
687
  "get",
687
688
  constructUrl({
@@ -743,7 +744,7 @@ class Content {
743
744
 
744
745
  const xHeaders = {};
745
746
 
746
- const response = await APIClient.execute(
747
+ const response = await ApplicationAPIClient.execute(
747
748
  this._conf,
748
749
  "get",
749
750
  constructUrl({
@@ -810,7 +811,7 @@ class Content {
810
811
 
811
812
  const xHeaders = {};
812
813
 
813
- const response = await APIClient.execute(
814
+ const response = await ApplicationAPIClient.execute(
814
815
  this._conf,
815
816
  "get",
816
817
  constructUrl({
@@ -862,19 +863,23 @@ class Content {
862
863
  });
863
864
  return data;
864
865
  };
865
- paginator.setCallback(callback);
866
+ paginator.setCallback(callback.bind(this));
866
867
  return paginator;
867
868
  }
868
869
 
869
870
  /**
870
871
  * @param {Object} arg - Arg object.
871
- * @returns {Promise<SeoComponent>} - Success response
872
- * @summary: Get the SEO of an application
873
- * @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
872
+ * @param {string} arg.slug - A short, human-readable, URL-friendly
873
+ * identifier of a page. You can get slug value from the endpoint
874
+ * /service/application/content/v2.0/pages/.
875
+ * @param {string} [arg.rootId] - ID given to the HTML element
876
+ * @returns {Promise<PageSchema>} - Success response
877
+ * @summary: Get a page
878
+ * @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
874
879
  */
875
- async getSEOConfiguration({} = {}) {
876
- const { error } = ContentValidator.getSEOConfiguration().validate(
877
- {},
880
+ async getPage({ slug, rootId } = {}) {
881
+ const { error } = ContentValidator.getPage().validate(
882
+ { slug, rootId },
878
883
  { abortEarly: false, allowUnknown: true }
879
884
  );
880
885
  if (error) {
@@ -882,43 +887,44 @@ class Content {
882
887
  }
883
888
 
884
889
  // Showing warrnings if extra unknown parameters are found
885
- const { error: warrning } = ContentValidator.getSEOConfiguration().validate(
886
- {},
890
+ const { error: warrning } = ContentValidator.getPage().validate(
891
+ { slug, rootId },
887
892
  { abortEarly: false, allowUnknown: false }
888
893
  );
889
894
  if (warrning) {
890
895
  Logger({
891
896
  level: "WARN",
892
- message: "Parameter Validation warrnings for getSEOConfiguration",
897
+ message: "Parameter Validation warrnings for getPage",
893
898
  });
894
899
  Logger({ level: "WARN", message: warrning });
895
900
  }
896
901
 
897
902
  const query_params = {};
903
+ query_params["root_id"] = rootId;
898
904
 
899
905
  const xHeaders = {};
900
906
 
901
- const response = await APIClient.execute(
907
+ const response = await ApplicationAPIClient.execute(
902
908
  this._conf,
903
909
  "get",
904
910
  constructUrl({
905
- url: this._urls["getSEOConfiguration"],
906
- params: {},
911
+ url: this._urls["getPage"],
912
+ params: { slug },
907
913
  }),
908
914
  query_params,
909
915
  undefined,
910
916
  xHeaders
911
917
  );
912
918
 
913
- const { error: res_error } = ContentModel.SeoComponent().validate(
914
- response,
915
- { abortEarly: false, allowUnknown: false }
916
- );
919
+ const { error: res_error } = ContentModel.PageSchema().validate(response, {
920
+ abortEarly: false,
921
+ allowUnknown: false,
922
+ });
917
923
 
918
924
  if (res_error) {
919
925
  Logger({
920
926
  level: "WARN",
921
- message: "Response Validation Warnnings for getSEOConfiguration",
927
+ message: "Response Validation Warnnings for getPage",
922
928
  });
923
929
  Logger({ level: "WARN", message: res_error });
924
930
  }
@@ -931,12 +937,12 @@ class Content {
931
937
  * @param {number} [arg.pageNo] - The page number to navigate through the
932
938
  * given set of results. Default value is 1.
933
939
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
934
- * @returns {Promise<SlideshowGetResponse>} - Success response
935
- * @summary: Get the slideshows
936
- * @description: Use this API to get a list of slideshows along with their details.
940
+ * @returns {Promise<PageGetResponse>} - Success response
941
+ * @summary: Get all pages
942
+ * @description: Use this API to get a list of pages.
937
943
  */
938
- async getSlideshows({ pageNo, pageSize } = {}) {
939
- const { error } = ContentValidator.getSlideshows().validate(
944
+ async getPages({ pageNo, pageSize } = {}) {
945
+ const { error } = ContentValidator.getPages().validate(
940
946
  { pageNo, pageSize },
941
947
  { abortEarly: false, allowUnknown: true }
942
948
  );
@@ -945,14 +951,14 @@ class Content {
945
951
  }
946
952
 
947
953
  // Showing warrnings if extra unknown parameters are found
948
- const { error: warrning } = ContentValidator.getSlideshows().validate(
954
+ const { error: warrning } = ContentValidator.getPages().validate(
949
955
  { pageNo, pageSize },
950
956
  { abortEarly: false, allowUnknown: false }
951
957
  );
952
958
  if (warrning) {
953
959
  Logger({
954
960
  level: "WARN",
955
- message: "Parameter Validation warrnings for getSlideshows",
961
+ message: "Parameter Validation warrnings for getPages",
956
962
  });
957
963
  Logger({ level: "WARN", message: warrning });
958
964
  }
@@ -963,11 +969,11 @@ class Content {
963
969
 
964
970
  const xHeaders = {};
965
971
 
966
- const response = await APIClient.execute(
972
+ const response = await ApplicationAPIClient.execute(
967
973
  this._conf,
968
974
  "get",
969
975
  constructUrl({
970
- url: this._urls["getSlideshows"],
976
+ url: this._urls["getPages"],
971
977
  params: {},
972
978
  }),
973
979
  query_params,
@@ -977,7 +983,7 @@ class Content {
977
983
 
978
984
  const {
979
985
  error: res_error,
980
- } = ContentModel.SlideshowGetResponse().validate(response, {
986
+ } = ContentModel.PageGetResponse().validate(response, {
981
987
  abortEarly: false,
982
988
  allowUnknown: false,
983
989
  });
@@ -985,7 +991,7 @@ class Content {
985
991
  if (res_error) {
986
992
  Logger({
987
993
  level: "WARN",
988
- message: "Response Validation Warnnings for getSlideshows",
994
+ message: "Response Validation Warnnings for getPages",
989
995
  });
990
996
  Logger({ level: "WARN", message: res_error });
991
997
  }
@@ -996,16 +1002,16 @@ class Content {
996
1002
  /**
997
1003
  * @param {Object} arg - Arg object.
998
1004
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
999
- * @summary: Get the slideshows
1000
- * @description: Use this API to get a list of slideshows along with their details.
1005
+ * @summary: Get all pages
1006
+ * @description: Use this API to get a list of pages.
1001
1007
  */
1002
- getSlideshowsPaginator({ pageSize } = {}) {
1008
+ getPagesPaginator({ pageSize } = {}) {
1003
1009
  const paginator = new Paginator();
1004
1010
  const callback = async () => {
1005
1011
  const pageId = paginator.nextId;
1006
1012
  const pageNo = paginator.pageNo;
1007
1013
  const pageType = "number";
1008
- const data = await this.getSlideshows({
1014
+ const data = await this.getPages({
1009
1015
  pageNo: pageNo,
1010
1016
  pageSize: pageSize,
1011
1017
  });
@@ -1015,22 +1021,19 @@ class Content {
1015
1021
  });
1016
1022
  return data;
1017
1023
  };
1018
- paginator.setCallback(callback);
1024
+ paginator.setCallback(callback.bind(this));
1019
1025
  return paginator;
1020
1026
  }
1021
1027
 
1022
1028
  /**
1023
1029
  * @param {Object} arg - Arg object.
1024
- * @param {string} arg.slug - A short, human-readable, URL-friendly
1025
- * identifier of a slideshow. You can get slug value from the endpoint
1026
- * /service/application/content/v1.0/slideshow/.
1027
- * @returns {Promise<SlideshowSchema>} - Success response
1028
- * @summary: Get a slideshow
1029
- * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
1030
+ * @returns {Promise<SeoComponent>} - Success response
1031
+ * @summary: Get the SEO of an application
1032
+ * @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
1030
1033
  */
1031
- async getSlideshow({ slug } = {}) {
1032
- const { error } = ContentValidator.getSlideshow().validate(
1033
- { slug },
1034
+ async getSEOConfiguration({} = {}) {
1035
+ const { error } = ContentValidator.getSEOConfiguration().validate(
1036
+ {},
1034
1037
  { abortEarly: false, allowUnknown: true }
1035
1038
  );
1036
1039
  if (error) {
@@ -1038,14 +1041,14 @@ class Content {
1038
1041
  }
1039
1042
 
1040
1043
  // Showing warrnings if extra unknown parameters are found
1041
- const { error: warrning } = ContentValidator.getSlideshow().validate(
1042
- { slug },
1044
+ const { error: warrning } = ContentValidator.getSEOConfiguration().validate(
1045
+ {},
1043
1046
  { abortEarly: false, allowUnknown: false }
1044
1047
  );
1045
1048
  if (warrning) {
1046
1049
  Logger({
1047
1050
  level: "WARN",
1048
- message: "Parameter Validation warrnings for getSlideshow",
1051
+ message: "Parameter Validation warrnings for getSEOConfiguration",
1049
1052
  });
1050
1053
  Logger({ level: "WARN", message: warrning });
1051
1054
  }
@@ -1054,29 +1057,27 @@ class Content {
1054
1057
 
1055
1058
  const xHeaders = {};
1056
1059
 
1057
- const response = await APIClient.execute(
1060
+ const response = await ApplicationAPIClient.execute(
1058
1061
  this._conf,
1059
1062
  "get",
1060
1063
  constructUrl({
1061
- url: this._urls["getSlideshow"],
1062
- params: { slug },
1064
+ url: this._urls["getSEOConfiguration"],
1065
+ params: {},
1063
1066
  }),
1064
1067
  query_params,
1065
1068
  undefined,
1066
1069
  xHeaders
1067
1070
  );
1068
1071
 
1069
- const {
1070
- error: res_error,
1071
- } = ContentModel.SlideshowSchema().validate(response, {
1072
- abortEarly: false,
1073
- allowUnknown: false,
1074
- });
1072
+ const { error: res_error } = ContentModel.SeoComponent().validate(
1073
+ response,
1074
+ { abortEarly: false, allowUnknown: false }
1075
+ );
1075
1076
 
1076
1077
  if (res_error) {
1077
1078
  Logger({
1078
1079
  level: "WARN",
1079
- message: "Response Validation Warnnings for getSlideshow",
1080
+ message: "Response Validation Warnnings for getSEOConfiguration",
1080
1081
  });
1081
1082
  Logger({ level: "WARN", message: res_error });
1082
1083
  }
@@ -1086,13 +1087,16 @@ class Content {
1086
1087
 
1087
1088
  /**
1088
1089
  * @param {Object} arg - Arg object.
1089
- * @returns {Promise<Support>} - Success response
1090
- * @summary: Get the support information
1091
- * @description: Use this API to get contact details for customer support including emails and phone numbers.
1090
+ * @param {string} arg.slug - A short, human-readable, URL-friendly
1091
+ * identifier of a slideshow. You can get slug value from the endpoint
1092
+ * /service/application/content/v1.0/slideshow/.
1093
+ * @returns {Promise<SlideshowSchema>} - Success response
1094
+ * @summary: Get a slideshow
1095
+ * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
1092
1096
  */
1093
- async getSupportInformation({} = {}) {
1094
- const { error } = ContentValidator.getSupportInformation().validate(
1095
- {},
1097
+ async getSlideshow({ slug } = {}) {
1098
+ const { error } = ContentValidator.getSlideshow().validate(
1099
+ { slug },
1096
1100
  { abortEarly: false, allowUnknown: true }
1097
1101
  );
1098
1102
  if (error) {
@@ -1100,16 +1104,14 @@ class Content {
1100
1104
  }
1101
1105
 
1102
1106
  // Showing warrnings if extra unknown parameters are found
1103
- const {
1104
- error: warrning,
1105
- } = ContentValidator.getSupportInformation().validate(
1106
- {},
1107
+ const { error: warrning } = ContentValidator.getSlideshow().validate(
1108
+ { slug },
1107
1109
  { abortEarly: false, allowUnknown: false }
1108
1110
  );
1109
1111
  if (warrning) {
1110
1112
  Logger({
1111
1113
  level: "WARN",
1112
- message: "Parameter Validation warrnings for getSupportInformation",
1114
+ message: "Parameter Validation warrnings for getSlideshow",
1113
1115
  });
1114
1116
  Logger({ level: "WARN", message: warrning });
1115
1117
  }
@@ -1118,19 +1120,21 @@ class Content {
1118
1120
 
1119
1121
  const xHeaders = {};
1120
1122
 
1121
- const response = await APIClient.execute(
1123
+ const response = await ApplicationAPIClient.execute(
1122
1124
  this._conf,
1123
1125
  "get",
1124
1126
  constructUrl({
1125
- url: this._urls["getSupportInformation"],
1126
- params: {},
1127
+ url: this._urls["getSlideshow"],
1128
+ params: { slug },
1127
1129
  }),
1128
1130
  query_params,
1129
1131
  undefined,
1130
1132
  xHeaders
1131
1133
  );
1132
1134
 
1133
- const { error: res_error } = ContentModel.Support().validate(response, {
1135
+ const {
1136
+ error: res_error,
1137
+ } = ContentModel.SlideshowSchema().validate(response, {
1134
1138
  abortEarly: false,
1135
1139
  allowUnknown: false,
1136
1140
  });
@@ -1138,7 +1142,7 @@ class Content {
1138
1142
  if (res_error) {
1139
1143
  Logger({
1140
1144
  level: "WARN",
1141
- message: "Response Validation Warnnings for getSupportInformation",
1145
+ message: "Response Validation Warnnings for getSlideshow",
1142
1146
  });
1143
1147
  Logger({ level: "WARN", message: res_error });
1144
1148
  }
@@ -1148,13 +1152,16 @@ class Content {
1148
1152
 
1149
1153
  /**
1150
1154
  * @param {Object} arg - Arg object.
1151
- * @returns {Promise<TagsSchema>} - Success response
1152
- * @summary: Get the tags associated with an application
1153
- * @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
1155
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1156
+ * given set of results. Default value is 1.
1157
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1158
+ * @returns {Promise<SlideshowGetResponse>} - Success response
1159
+ * @summary: Get the slideshows
1160
+ * @description: Use this API to get a list of slideshows along with their details.
1154
1161
  */
1155
- async getTags({} = {}) {
1156
- const { error } = ContentValidator.getTags().validate(
1157
- {},
1162
+ async getSlideshows({ pageNo, pageSize } = {}) {
1163
+ const { error } = ContentValidator.getSlideshows().validate(
1164
+ { pageNo, pageSize },
1158
1165
  { abortEarly: false, allowUnknown: true }
1159
1166
  );
1160
1167
  if (error) {
@@ -1162,27 +1169,29 @@ class Content {
1162
1169
  }
1163
1170
 
1164
1171
  // Showing warrnings if extra unknown parameters are found
1165
- const { error: warrning } = ContentValidator.getTags().validate(
1166
- {},
1172
+ const { error: warrning } = ContentValidator.getSlideshows().validate(
1173
+ { pageNo, pageSize },
1167
1174
  { abortEarly: false, allowUnknown: false }
1168
1175
  );
1169
1176
  if (warrning) {
1170
1177
  Logger({
1171
1178
  level: "WARN",
1172
- message: "Parameter Validation warrnings for getTags",
1179
+ message: "Parameter Validation warrnings for getSlideshows",
1173
1180
  });
1174
1181
  Logger({ level: "WARN", message: warrning });
1175
1182
  }
1176
1183
 
1177
1184
  const query_params = {};
1185
+ query_params["page_no"] = pageNo;
1186
+ query_params["page_size"] = pageSize;
1178
1187
 
1179
1188
  const xHeaders = {};
1180
1189
 
1181
- const response = await APIClient.execute(
1190
+ const response = await ApplicationAPIClient.execute(
1182
1191
  this._conf,
1183
1192
  "get",
1184
1193
  constructUrl({
1185
- url: this._urls["getTags"],
1194
+ url: this._urls["getSlideshows"],
1186
1195
  params: {},
1187
1196
  }),
1188
1197
  query_params,
@@ -1190,7 +1199,9 @@ class Content {
1190
1199
  xHeaders
1191
1200
  );
1192
1201
 
1193
- const { error: res_error } = ContentModel.TagsSchema().validate(response, {
1202
+ const {
1203
+ error: res_error,
1204
+ } = ContentModel.SlideshowGetResponse().validate(response, {
1194
1205
  abortEarly: false,
1195
1206
  allowUnknown: false,
1196
1207
  });
@@ -1198,7 +1209,7 @@ class Content {
1198
1209
  if (res_error) {
1199
1210
  Logger({
1200
1211
  level: "WARN",
1201
- message: "Response Validation Warnnings for getTags",
1212
+ message: "Response Validation Warnnings for getSlideshows",
1202
1213
  });
1203
1214
  Logger({ level: "WARN", message: res_error });
1204
1215
  }
@@ -1208,17 +1219,39 @@ class Content {
1208
1219
 
1209
1220
  /**
1210
1221
  * @param {Object} arg - Arg object.
1211
- * @param {string} arg.slug - A short, human-readable, URL-friendly
1212
- * identifier of a page. You can get slug value from the endpoint
1213
- * /service/application/content/v2.0/pages/.
1214
- * @param {string} [arg.rootId] - ID given to the HTML element
1215
- * @returns {Promise<PageSchema>} - Success response
1216
- * @summary: Get a page
1217
- * @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
1222
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1223
+ * @summary: Get the slideshows
1224
+ * @description: Use this API to get a list of slideshows along with their details.
1218
1225
  */
1219
- async getPage({ slug, rootId } = {}) {
1220
- const { error } = ContentValidator.getPage().validate(
1221
- { slug, rootId },
1226
+ getSlideshowsPaginator({ pageSize } = {}) {
1227
+ const paginator = new Paginator();
1228
+ const callback = async () => {
1229
+ const pageId = paginator.nextId;
1230
+ const pageNo = paginator.pageNo;
1231
+ const pageType = "number";
1232
+ const data = await this.getSlideshows({
1233
+ pageNo: pageNo,
1234
+ pageSize: pageSize,
1235
+ });
1236
+ paginator.setPaginator({
1237
+ hasNext: data.page.has_next ? true : false,
1238
+ nextId: data.page.next_id,
1239
+ });
1240
+ return data;
1241
+ };
1242
+ paginator.setCallback(callback.bind(this));
1243
+ return paginator;
1244
+ }
1245
+
1246
+ /**
1247
+ * @param {Object} arg - Arg object.
1248
+ * @returns {Promise<Support>} - Success response
1249
+ * @summary: Get the support information
1250
+ * @description: Use this API to get contact details for customer support including emails and phone numbers.
1251
+ */
1252
+ async getSupportInformation({} = {}) {
1253
+ const { error } = ContentValidator.getSupportInformation().validate(
1254
+ {},
1222
1255
  { abortEarly: false, allowUnknown: true }
1223
1256
  );
1224
1257
  if (error) {
@@ -1226,36 +1259,37 @@ class Content {
1226
1259
  }
1227
1260
 
1228
1261
  // Showing warrnings if extra unknown parameters are found
1229
- const { error: warrning } = ContentValidator.getPage().validate(
1230
- { slug, rootId },
1262
+ const {
1263
+ error: warrning,
1264
+ } = ContentValidator.getSupportInformation().validate(
1265
+ {},
1231
1266
  { abortEarly: false, allowUnknown: false }
1232
1267
  );
1233
1268
  if (warrning) {
1234
1269
  Logger({
1235
1270
  level: "WARN",
1236
- message: "Parameter Validation warrnings for getPage",
1271
+ message: "Parameter Validation warrnings for getSupportInformation",
1237
1272
  });
1238
1273
  Logger({ level: "WARN", message: warrning });
1239
1274
  }
1240
1275
 
1241
1276
  const query_params = {};
1242
- query_params["root_id"] = rootId;
1243
1277
 
1244
1278
  const xHeaders = {};
1245
1279
 
1246
- const response = await APIClient.execute(
1280
+ const response = await ApplicationAPIClient.execute(
1247
1281
  this._conf,
1248
1282
  "get",
1249
1283
  constructUrl({
1250
- url: this._urls["getPage"],
1251
- params: { slug },
1284
+ url: this._urls["getSupportInformation"],
1285
+ params: {},
1252
1286
  }),
1253
1287
  query_params,
1254
1288
  undefined,
1255
1289
  xHeaders
1256
1290
  );
1257
1291
 
1258
- const { error: res_error } = ContentModel.PageSchema().validate(response, {
1292
+ const { error: res_error } = ContentModel.Support().validate(response, {
1259
1293
  abortEarly: false,
1260
1294
  allowUnknown: false,
1261
1295
  });
@@ -1263,7 +1297,7 @@ class Content {
1263
1297
  if (res_error) {
1264
1298
  Logger({
1265
1299
  level: "WARN",
1266
- message: "Response Validation Warnnings for getPage",
1300
+ message: "Response Validation Warnnings for getSupportInformation",
1267
1301
  });
1268
1302
  Logger({ level: "WARN", message: res_error });
1269
1303
  }
@@ -1273,16 +1307,13 @@ class Content {
1273
1307
 
1274
1308
  /**
1275
1309
  * @param {Object} arg - Arg object.
1276
- * @param {number} [arg.pageNo] - The page number to navigate through the
1277
- * given set of results. Default value is 1.
1278
- * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1279
- * @returns {Promise<PageGetResponse>} - Success response
1280
- * @summary: Get all pages
1281
- * @description: Use this API to get a list of pages.
1310
+ * @returns {Promise<TagsSchema>} - Success response
1311
+ * @summary: Get the tags associated with an application
1312
+ * @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
1282
1313
  */
1283
- async getPages({ pageNo, pageSize } = {}) {
1284
- const { error } = ContentValidator.getPages().validate(
1285
- { pageNo, pageSize },
1314
+ async getTags({} = {}) {
1315
+ const { error } = ContentValidator.getTags().validate(
1316
+ {},
1286
1317
  { abortEarly: false, allowUnknown: true }
1287
1318
  );
1288
1319
  if (error) {
@@ -1290,29 +1321,27 @@ class Content {
1290
1321
  }
1291
1322
 
1292
1323
  // Showing warrnings if extra unknown parameters are found
1293
- const { error: warrning } = ContentValidator.getPages().validate(
1294
- { pageNo, pageSize },
1324
+ const { error: warrning } = ContentValidator.getTags().validate(
1325
+ {},
1295
1326
  { abortEarly: false, allowUnknown: false }
1296
1327
  );
1297
1328
  if (warrning) {
1298
1329
  Logger({
1299
1330
  level: "WARN",
1300
- message: "Parameter Validation warrnings for getPages",
1331
+ message: "Parameter Validation warrnings for getTags",
1301
1332
  });
1302
1333
  Logger({ level: "WARN", message: warrning });
1303
1334
  }
1304
1335
 
1305
1336
  const query_params = {};
1306
- query_params["page_no"] = pageNo;
1307
- query_params["page_size"] = pageSize;
1308
1337
 
1309
1338
  const xHeaders = {};
1310
1339
 
1311
- const response = await APIClient.execute(
1340
+ const response = await ApplicationAPIClient.execute(
1312
1341
  this._conf,
1313
1342
  "get",
1314
1343
  constructUrl({
1315
- url: this._urls["getPages"],
1344
+ url: this._urls["getTags"],
1316
1345
  params: {},
1317
1346
  }),
1318
1347
  query_params,
@@ -1320,9 +1349,7 @@ class Content {
1320
1349
  xHeaders
1321
1350
  );
1322
1351
 
1323
- const {
1324
- error: res_error,
1325
- } = ContentModel.PageGetResponse().validate(response, {
1352
+ const { error: res_error } = ContentModel.TagsSchema().validate(response, {
1326
1353
  abortEarly: false,
1327
1354
  allowUnknown: false,
1328
1355
  });
@@ -1330,39 +1357,13 @@ class Content {
1330
1357
  if (res_error) {
1331
1358
  Logger({
1332
1359
  level: "WARN",
1333
- message: "Response Validation Warnnings for getPages",
1360
+ message: "Response Validation Warnnings for getTags",
1334
1361
  });
1335
1362
  Logger({ level: "WARN", message: res_error });
1336
1363
  }
1337
1364
 
1338
1365
  return response;
1339
1366
  }
1340
-
1341
- /**
1342
- * @param {Object} arg - Arg object.
1343
- * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1344
- * @summary: Get all pages
1345
- * @description: Use this API to get a list of pages.
1346
- */
1347
- getPagesPaginator({ pageSize } = {}) {
1348
- const paginator = new Paginator();
1349
- const callback = async () => {
1350
- const pageId = paginator.nextId;
1351
- const pageNo = paginator.pageNo;
1352
- const pageType = "number";
1353
- const data = await this.getPages({
1354
- pageNo: pageNo,
1355
- pageSize: pageSize,
1356
- });
1357
- paginator.setPaginator({
1358
- hasNext: data.page.has_next ? true : false,
1359
- nextId: data.page.next_id,
1360
- });
1361
- return data;
1362
- };
1363
- paginator.setCallback(callback);
1364
- return paginator;
1365
- }
1366
1367
  }
1367
1368
 
1368
1369
  module.exports = Content;