@selfcommunity/api-services 0.1.7 → 0.1.8-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (464) hide show
  1. package/lib/{types → cjs}/client/index.d.ts +0 -0
  2. package/lib/{types → cjs}/client/index.d.ts.map +0 -0
  3. package/lib/cjs/client/index.js +112 -157
  4. package/lib/cjs/client/index.js.map +1 -0
  5. package/lib/{types → cjs}/constants/Endpoints.d.ts +0 -0
  6. package/lib/{types → cjs}/constants/Endpoints.d.ts.map +1 -1
  7. package/lib/cjs/constants/Endpoints.js +1017 -1051
  8. package/lib/cjs/constants/Endpoints.js.map +1 -0
  9. package/lib/{types → cjs}/index.d.ts +2 -2
  10. package/lib/{types → cjs}/index.d.ts.map +1 -1
  11. package/lib/cjs/index.js +134 -222
  12. package/lib/cjs/index.js.map +1 -0
  13. package/lib/{types → cjs}/services/category/index.d.ts +0 -0
  14. package/lib/{types → cjs}/services/category/index.d.ts.map +0 -0
  15. package/lib/cjs/services/category/index.js +218 -251
  16. package/lib/cjs/services/category/index.js.map +1 -0
  17. package/lib/{types → cjs}/services/comment/index.d.ts +5 -4
  18. package/lib/cjs/services/comment/index.d.ts.map +1 -0
  19. package/lib/cjs/services/comment/index.js +154 -181
  20. package/lib/cjs/services/comment/index.js.map +1 -0
  21. package/lib/{types → cjs}/services/custom_adv/index.d.ts +3 -3
  22. package/lib/cjs/services/custom_adv/index.d.ts.map +1 -0
  23. package/lib/cjs/services/custom_adv/index.js +56 -56
  24. package/lib/cjs/services/custom_adv/index.js.map +1 -0
  25. package/lib/{types → cjs}/services/custom_page/index.d.ts +0 -0
  26. package/lib/{types → cjs}/services/custom_page/index.d.ts.map +0 -0
  27. package/lib/cjs/services/custom_page/index.js +56 -56
  28. package/lib/cjs/services/custom_page/index.js.map +1 -0
  29. package/lib/{types → cjs}/services/data_portability/index.d.ts +0 -0
  30. package/lib/{types → cjs}/services/data_portability/index.d.ts.map +0 -0
  31. package/lib/cjs/services/data_portability/index.js +51 -49
  32. package/lib/cjs/services/data_portability/index.js.map +1 -0
  33. package/lib/{types → cjs}/services/embed/index.d.ts +8 -6
  34. package/lib/cjs/services/embed/index.d.ts.map +1 -0
  35. package/lib/cjs/services/embed/index.js +120 -128
  36. package/lib/cjs/services/embed/index.js.map +1 -0
  37. package/lib/cjs/services/feature/index.d.ts +19 -0
  38. package/lib/cjs/services/feature/index.d.ts.map +1 -0
  39. package/lib/cjs/services/feature/index.js +31 -25
  40. package/lib/cjs/services/feature/index.js.map +1 -0
  41. package/lib/{types → cjs}/services/feed/index.d.ts +2 -0
  42. package/lib/{types → cjs}/services/feed/index.d.ts.map +1 -1
  43. package/lib/cjs/services/feed/index.js +79 -81
  44. package/lib/cjs/services/feed/index.js.map +1 -0
  45. package/lib/{types → cjs}/services/feed_object/index.d.ts +9 -9
  46. package/lib/cjs/services/feed_object/index.d.ts.map +1 -0
  47. package/lib/cjs/services/feed_object/index.js +387 -485
  48. package/lib/cjs/services/feed_object/index.js.map +1 -0
  49. package/lib/{types → cjs}/services/incubator/index.d.ts +0 -0
  50. package/lib/{types → cjs}/services/incubator/index.d.ts.map +0 -0
  51. package/lib/cjs/services/incubator/index.js +104 -114
  52. package/lib/cjs/services/incubator/index.js.map +1 -0
  53. package/lib/{types → cjs}/services/insight/index.d.ts +13 -10
  54. package/lib/cjs/services/insight/index.d.ts.map +1 -0
  55. package/lib/cjs/services/insight/index.js +93 -94
  56. package/lib/cjs/services/insight/index.js.map +1 -0
  57. package/lib/{types → cjs}/services/legal_page/index.d.ts +0 -0
  58. package/lib/{types → cjs}/services/legal_page/index.d.ts.map +0 -0
  59. package/lib/cjs/services/legal_page/index.js +92 -102
  60. package/lib/cjs/services/legal_page/index.js.map +1 -0
  61. package/lib/cjs/services/locality/index.d.ts +26 -0
  62. package/lib/cjs/services/locality/index.d.ts.map +1 -0
  63. package/lib/cjs/services/locality/index.js +44 -37
  64. package/lib/cjs/services/locality/index.js.map +1 -0
  65. package/lib/{types → cjs}/services/loyalty/index.d.ts +3 -3
  66. package/lib/cjs/services/loyalty/index.d.ts.map +1 -0
  67. package/lib/cjs/services/loyalty/index.js +128 -148
  68. package/lib/cjs/services/loyalty/index.js.map +1 -0
  69. package/lib/{types → cjs}/services/media/index.d.ts +0 -0
  70. package/lib/{types → cjs}/services/media/index.d.ts.map +1 -1
  71. package/lib/cjs/services/media/index.js +107 -124
  72. package/lib/cjs/services/media/index.js.map +1 -0
  73. package/lib/{types → cjs}/services/moderation/index.d.ts +0 -0
  74. package/lib/{types → cjs}/services/moderation/index.d.ts.map +1 -1
  75. package/lib/cjs/services/moderation/index.js +95 -109
  76. package/lib/cjs/services/moderation/index.js.map +1 -0
  77. package/lib/{types → cjs}/services/notification/index.d.ts +3 -3
  78. package/lib/cjs/services/notification/index.d.ts.map +1 -0
  79. package/lib/cjs/services/notification/index.js +121 -131
  80. package/lib/cjs/services/notification/index.js.map +1 -0
  81. package/lib/{types → cjs}/services/preference/index.d.ts +0 -0
  82. package/lib/{types → cjs}/services/preference/index.d.ts.map +0 -0
  83. package/lib/cjs/services/preference/index.js +57 -65
  84. package/lib/cjs/services/preference/index.js.map +1 -0
  85. package/lib/{types → cjs}/services/private_message/index.d.ts +0 -0
  86. package/lib/{types → cjs}/services/private_message/index.d.ts.map +0 -0
  87. package/lib/cjs/services/private_message/index.js +137 -148
  88. package/lib/cjs/services/private_message/index.js.map +1 -0
  89. package/lib/cjs/services/score/index.d.ts +33 -0
  90. package/lib/cjs/services/score/index.d.ts.map +1 -0
  91. package/lib/cjs/services/score/index.js +56 -50
  92. package/lib/cjs/services/score/index.js.map +1 -0
  93. package/lib/{types → cjs}/services/sso/index.d.ts +2 -1
  94. package/lib/{types → cjs}/services/sso/index.d.ts.map +1 -1
  95. package/lib/cjs/services/sso/index.js +42 -38
  96. package/lib/cjs/services/sso/index.js.map +1 -0
  97. package/lib/{types → cjs}/services/suggestion/index.d.ts +0 -0
  98. package/lib/{types → cjs}/services/suggestion/index.d.ts.map +0 -0
  99. package/lib/cjs/services/suggestion/index.js +62 -61
  100. package/lib/cjs/services/suggestion/index.js.map +1 -0
  101. package/lib/{types → cjs}/services/tag/index.d.ts +10 -7
  102. package/lib/cjs/services/tag/index.d.ts.map +1 -0
  103. package/lib/cjs/services/tag/index.js +110 -119
  104. package/lib/cjs/services/tag/index.js.map +1 -0
  105. package/lib/{types → cjs}/services/user/index.d.ts +16 -12
  106. package/lib/cjs/services/user/index.d.ts.map +1 -0
  107. package/lib/cjs/services/user/index.js +606 -715
  108. package/lib/cjs/services/user/index.js.map +1 -0
  109. package/lib/{types → cjs}/services/webhook/index.d.ts +0 -0
  110. package/lib/{types → cjs}/services/webhook/index.d.ts.map +0 -0
  111. package/lib/cjs/services/webhook/index.js +164 -193
  112. package/lib/cjs/services/webhook/index.js.map +1 -0
  113. package/lib/{types → cjs}/types/baseParams.d.ts +0 -0
  114. package/lib/{types → cjs}/types/baseParams.d.ts.map +0 -0
  115. package/lib/cjs/types/baseParams.js +5 -2
  116. package/lib/cjs/types/baseParams.js.map +1 -0
  117. package/lib/{types → cjs}/types/category.d.ts +0 -0
  118. package/lib/{types → cjs}/types/category.d.ts.map +0 -0
  119. package/lib/cjs/types/category.js +2 -2
  120. package/lib/cjs/types/category.js.map +1 -0
  121. package/lib/{types → cjs}/types/comment.d.ts +0 -0
  122. package/lib/{types → cjs}/types/comment.d.ts.map +0 -0
  123. package/lib/cjs/types/comment.js +2 -2
  124. package/lib/cjs/types/comment.js.map +1 -0
  125. package/lib/{types → cjs}/types/customAdv.d.ts +0 -0
  126. package/lib/{types → cjs}/types/customAdv.d.ts.map +0 -0
  127. package/lib/cjs/types/customAdv.js +2 -2
  128. package/lib/cjs/types/customAdv.js.map +1 -0
  129. package/lib/{types → cjs}/types/customPage.d.ts +0 -0
  130. package/lib/{types → cjs}/types/customPage.d.ts.map +0 -0
  131. package/lib/cjs/types/customPage.js +2 -2
  132. package/lib/cjs/types/customPage.js.map +1 -0
  133. package/lib/{types → cjs}/types/embed.d.ts +0 -0
  134. package/lib/{types → cjs}/types/embed.d.ts.map +0 -0
  135. package/lib/cjs/types/embed.js +2 -2
  136. package/lib/cjs/types/embed.js.map +1 -0
  137. package/lib/cjs/types/feature.d.ts +11 -0
  138. package/lib/cjs/types/feature.d.ts.map +1 -0
  139. package/lib/cjs/types/feature.js +3 -0
  140. package/lib/cjs/types/feature.js.map +1 -0
  141. package/lib/{types → cjs}/types/feed.d.ts +0 -0
  142. package/lib/{types → cjs}/types/feed.d.ts.map +0 -0
  143. package/lib/cjs/types/feed.js +2 -2
  144. package/lib/cjs/types/feed.js.map +1 -0
  145. package/lib/{types → cjs}/types/feedObject.d.ts +0 -0
  146. package/lib/{types → cjs}/types/feedObject.d.ts.map +0 -0
  147. package/lib/cjs/types/feedObject.js +2 -2
  148. package/lib/cjs/types/feedObject.js.map +1 -0
  149. package/lib/{types → cjs}/types/incubator.d.ts +0 -0
  150. package/lib/{types → cjs}/types/incubator.d.ts.map +0 -0
  151. package/lib/cjs/types/incubator.js +2 -2
  152. package/lib/cjs/types/incubator.js.map +1 -0
  153. package/lib/{types → cjs}/types/index.d.ts +5 -2
  154. package/lib/cjs/types/index.d.ts.map +1 -0
  155. package/lib/cjs/types/index.js +6 -101
  156. package/lib/cjs/types/index.js.map +1 -0
  157. package/lib/cjs/types/insight.d.ts +67 -0
  158. package/lib/cjs/types/insight.d.ts.map +1 -0
  159. package/lib/cjs/types/insight.js +3 -0
  160. package/lib/cjs/types/insight.js.map +1 -0
  161. package/lib/{types → cjs}/types/legalPage.d.ts +0 -0
  162. package/lib/{types → cjs}/types/legalPage.d.ts.map +0 -0
  163. package/lib/cjs/types/legalPage.js +2 -2
  164. package/lib/cjs/types/legalPage.js.map +1 -0
  165. package/lib/{types → cjs}/types/media.d.ts +0 -0
  166. package/lib/{types → cjs}/types/media.d.ts.map +0 -0
  167. package/lib/cjs/types/media.js +22 -26
  168. package/lib/cjs/types/media.js.map +1 -0
  169. package/lib/{types → cjs}/types/moderation.d.ts +1 -1
  170. package/lib/{types → cjs}/types/moderation.d.ts.map +1 -1
  171. package/lib/cjs/types/moderation.js +2 -2
  172. package/lib/cjs/types/moderation.js.map +1 -0
  173. package/lib/{types → cjs}/types/notification.d.ts +0 -0
  174. package/lib/{types → cjs}/types/notification.d.ts.map +0 -0
  175. package/lib/cjs/types/notification.js +2 -2
  176. package/lib/cjs/types/notification.js.map +1 -0
  177. package/lib/{types → cjs}/types/paginatedResponse.d.ts +0 -0
  178. package/lib/{types → cjs}/types/paginatedResponse.d.ts.map +0 -0
  179. package/lib/cjs/types/paginatedResponse.js +5 -2
  180. package/lib/cjs/types/paginatedResponse.js.map +1 -0
  181. package/lib/{types → cjs}/types/privateMessage.d.ts +0 -0
  182. package/lib/{types → cjs}/types/privateMessage.d.ts.map +0 -0
  183. package/lib/cjs/types/privateMessage.js +2 -2
  184. package/lib/cjs/types/privateMessage.js.map +1 -0
  185. package/lib/{types → cjs}/types/prize.d.ts +0 -0
  186. package/lib/{types → cjs}/types/prize.d.ts.map +0 -0
  187. package/lib/cjs/types/prize.js +2 -2
  188. package/lib/cjs/types/prize.js.map +1 -0
  189. package/lib/cjs/types/score.d.ts +19 -0
  190. package/lib/cjs/types/score.d.ts.map +1 -0
  191. package/lib/cjs/types/score.js +3 -0
  192. package/lib/cjs/types/score.js.map +1 -0
  193. package/lib/{types → cjs}/types/sso.d.ts +0 -0
  194. package/lib/{types → cjs}/types/sso.d.ts.map +0 -0
  195. package/lib/cjs/types/sso.js +5 -2
  196. package/lib/cjs/types/sso.js.map +1 -0
  197. package/lib/{types → cjs}/types/tag.d.ts +22 -0
  198. package/lib/cjs/types/tag.d.ts.map +1 -0
  199. package/lib/cjs/types/tag.js +2 -2
  200. package/lib/cjs/types/tag.js.map +1 -0
  201. package/lib/{types → cjs}/types/user.d.ts +0 -0
  202. package/lib/{types → cjs}/types/user.d.ts.map +0 -0
  203. package/lib/cjs/types/user.js +2 -2
  204. package/lib/cjs/types/user.js.map +1 -0
  205. package/lib/{types → cjs}/types/webhook.d.ts +0 -0
  206. package/lib/{types → cjs}/types/webhook.d.ts.map +0 -0
  207. package/lib/cjs/types/webhook.js +2 -2
  208. package/lib/cjs/types/webhook.js.map +1 -0
  209. package/lib/cjs/utils/apiRequest.d.ts +2 -0
  210. package/lib/{types → cjs}/utils/apiRequest.d.ts.map +1 -1
  211. package/lib/cjs/utils/apiRequest.js +26 -25
  212. package/lib/cjs/utils/apiRequest.js.map +1 -0
  213. package/lib/{types → cjs}/utils/http.d.ts +0 -0
  214. package/lib/{types → cjs}/utils/http.d.ts.map +0 -0
  215. package/lib/cjs/utils/http.js +41 -45
  216. package/lib/cjs/utils/http.js.map +1 -0
  217. package/lib/{types → cjs}/utils/token.d.ts +0 -0
  218. package/lib/{types → cjs}/utils/token.d.ts.map +0 -0
  219. package/lib/cjs/utils/token.js +62 -31
  220. package/lib/cjs/utils/token.js.map +1 -0
  221. package/lib/esm/client/index.d.ts +115 -0
  222. package/lib/esm/client/index.d.ts.map +1 -0
  223. package/lib/esm/client/index.js +108 -160
  224. package/lib/esm/client/index.js.map +1 -0
  225. package/lib/esm/constants/Endpoints.d.ts +10 -0
  226. package/lib/esm/constants/Endpoints.d.ts.map +1 -0
  227. package/lib/esm/constants/Endpoints.js +1016 -1052
  228. package/lib/esm/constants/Endpoints.js.map +1 -0
  229. package/lib/esm/index.d.ts +51 -0
  230. package/lib/esm/index.d.ts.map +1 -0
  231. package/lib/esm/index.js +51 -223
  232. package/lib/esm/index.js.map +1 -0
  233. package/lib/esm/services/category/index.d.ts +127 -0
  234. package/lib/esm/services/category/index.d.ts.map +1 -0
  235. package/lib/esm/services/category/index.js +214 -255
  236. package/lib/esm/services/category/index.js.map +1 -0
  237. package/lib/esm/services/comment/index.d.ts +92 -0
  238. package/lib/esm/services/comment/index.d.ts.map +1 -0
  239. package/lib/esm/services/comment/index.js +150 -185
  240. package/lib/esm/services/comment/index.js.map +1 -0
  241. package/lib/esm/services/custom_adv/index.d.ts +33 -0
  242. package/lib/esm/services/custom_adv/index.d.ts.map +1 -0
  243. package/lib/esm/services/custom_adv/index.js +52 -60
  244. package/lib/esm/services/custom_adv/index.js.map +1 -0
  245. package/lib/esm/services/custom_page/index.d.ts +33 -0
  246. package/lib/esm/services/custom_page/index.d.ts.map +1 -0
  247. package/lib/esm/services/custom_page/index.js +52 -60
  248. package/lib/esm/services/custom_page/index.js.map +1 -0
  249. package/lib/esm/services/data_portability/index.d.ts +29 -0
  250. package/lib/esm/services/data_portability/index.d.ts.map +1 -0
  251. package/lib/esm/services/data_portability/index.js +47 -53
  252. package/lib/esm/services/data_portability/index.js.map +1 -0
  253. package/lib/esm/services/embed/index.d.ts +71 -0
  254. package/lib/esm/services/embed/index.d.ts.map +1 -0
  255. package/lib/esm/services/embed/index.js +116 -132
  256. package/lib/esm/services/embed/index.js.map +1 -0
  257. package/lib/esm/services/feature/index.d.ts +19 -0
  258. package/lib/esm/services/feature/index.d.ts.map +1 -0
  259. package/lib/esm/services/feature/index.js +27 -29
  260. package/lib/esm/services/feature/index.js.map +1 -0
  261. package/lib/esm/services/feed/index.d.ts +46 -0
  262. package/lib/esm/services/feed/index.d.ts.map +1 -0
  263. package/lib/esm/services/feed/index.js +75 -85
  264. package/lib/esm/services/feed/index.js.map +1 -0
  265. package/lib/esm/services/feed_object/index.d.ts +236 -0
  266. package/lib/esm/services/feed_object/index.d.ts.map +1 -0
  267. package/lib/esm/services/feed_object/index.js +383 -489
  268. package/lib/esm/services/feed_object/index.js.map +1 -0
  269. package/lib/esm/services/incubator/index.d.ts +61 -0
  270. package/lib/esm/services/incubator/index.d.ts.map +1 -0
  271. package/lib/esm/services/incubator/index.js +100 -118
  272. package/lib/esm/services/incubator/index.js.map +1 -0
  273. package/lib/esm/services/insight/index.d.ts +54 -0
  274. package/lib/esm/services/insight/index.d.ts.map +1 -0
  275. package/lib/esm/services/insight/index.js +89 -98
  276. package/lib/esm/services/insight/index.js.map +1 -0
  277. package/lib/esm/services/legal_page/index.d.ts +53 -0
  278. package/lib/esm/services/legal_page/index.d.ts.map +1 -0
  279. package/lib/esm/services/legal_page/index.js +88 -106
  280. package/lib/esm/services/legal_page/index.js.map +1 -0
  281. package/lib/esm/services/locality/index.d.ts +26 -0
  282. package/lib/esm/services/locality/index.d.ts.map +1 -0
  283. package/lib/esm/services/locality/index.js +40 -41
  284. package/lib/esm/services/locality/index.js.map +1 -0
  285. package/lib/esm/services/loyalty/index.d.ts +77 -0
  286. package/lib/esm/services/loyalty/index.d.ts.map +1 -0
  287. package/lib/esm/services/loyalty/index.js +124 -152
  288. package/lib/esm/services/loyalty/index.js.map +1 -0
  289. package/lib/esm/services/media/index.d.ts +65 -0
  290. package/lib/esm/services/media/index.d.ts.map +1 -0
  291. package/lib/esm/services/media/index.js +103 -128
  292. package/lib/esm/services/media/index.js.map +1 -0
  293. package/lib/esm/services/moderation/index.d.ts +58 -0
  294. package/lib/esm/services/moderation/index.d.ts.map +1 -0
  295. package/lib/esm/services/moderation/index.js +91 -113
  296. package/lib/esm/services/moderation/index.js.map +1 -0
  297. package/lib/esm/services/notification/index.d.ts +70 -0
  298. package/lib/esm/services/notification/index.d.ts.map +1 -0
  299. package/lib/esm/services/notification/index.js +117 -135
  300. package/lib/esm/services/notification/index.js.map +1 -0
  301. package/lib/esm/services/preference/index.d.ts +35 -0
  302. package/lib/esm/services/preference/index.d.ts.map +1 -0
  303. package/lib/esm/services/preference/index.js +53 -69
  304. package/lib/esm/services/preference/index.js.map +1 -0
  305. package/lib/esm/services/private_message/index.d.ts +81 -0
  306. package/lib/esm/services/private_message/index.d.ts.map +1 -0
  307. package/lib/esm/services/private_message/index.js +133 -152
  308. package/lib/esm/services/private_message/index.js.map +1 -0
  309. package/lib/esm/services/score/index.d.ts +33 -0
  310. package/lib/esm/services/score/index.d.ts.map +1 -0
  311. package/lib/esm/services/score/index.js +52 -54
  312. package/lib/esm/services/score/index.js.map +1 -0
  313. package/lib/esm/services/sso/index.d.ts +26 -0
  314. package/lib/esm/services/sso/index.d.ts.map +1 -0
  315. package/lib/esm/services/sso/index.js +38 -42
  316. package/lib/esm/services/sso/index.js.map +1 -0
  317. package/lib/esm/services/suggestion/index.d.ts +36 -0
  318. package/lib/esm/services/suggestion/index.d.ts.map +1 -0
  319. package/lib/esm/services/suggestion/index.js +58 -65
  320. package/lib/esm/services/suggestion/index.js.map +1 -0
  321. package/lib/esm/services/tag/index.d.ts +67 -0
  322. package/lib/esm/services/tag/index.d.ts.map +1 -0
  323. package/lib/esm/services/tag/index.js +106 -123
  324. package/lib/esm/services/tag/index.js.map +1 -0
  325. package/lib/esm/services/user/index.d.ts +351 -0
  326. package/lib/esm/services/user/index.d.ts.map +1 -0
  327. package/lib/esm/services/user/index.js +602 -719
  328. package/lib/esm/services/user/index.js.map +1 -0
  329. package/lib/esm/services/webhook/index.d.ts +99 -0
  330. package/lib/esm/services/webhook/index.d.ts.map +1 -0
  331. package/lib/esm/services/webhook/index.js +160 -197
  332. package/lib/esm/services/webhook/index.js.map +1 -0
  333. package/lib/esm/types/baseParams.d.ts +23 -0
  334. package/lib/esm/types/baseParams.d.ts.map +1 -0
  335. package/lib/esm/types/baseParams.js +5 -3
  336. package/lib/esm/types/baseParams.js.map +1 -0
  337. package/lib/esm/types/category.d.ts +15 -0
  338. package/lib/esm/types/category.d.ts.map +1 -0
  339. package/lib/esm/types/category.js +2 -3
  340. package/lib/esm/types/category.js.map +1 -0
  341. package/lib/esm/types/comment.d.ts +51 -0
  342. package/lib/esm/types/comment.d.ts.map +1 -0
  343. package/lib/esm/types/comment.js +2 -3
  344. package/lib/esm/types/comment.js.map +1 -0
  345. package/lib/esm/types/customAdv.d.ts +19 -0
  346. package/lib/esm/types/customAdv.d.ts.map +1 -0
  347. package/lib/esm/types/customAdv.js +2 -3
  348. package/lib/esm/types/customAdv.js.map +1 -0
  349. package/lib/esm/types/customPage.d.ts +24 -0
  350. package/lib/esm/types/customPage.d.ts.map +1 -0
  351. package/lib/esm/types/customPage.js +2 -3
  352. package/lib/esm/types/customPage.js.map +1 -0
  353. package/lib/esm/types/embed.d.ts +26 -0
  354. package/lib/esm/types/embed.d.ts.map +1 -0
  355. package/lib/esm/types/embed.js +2 -3
  356. package/lib/esm/types/embed.js.map +1 -0
  357. package/lib/esm/types/feature.d.ts +11 -0
  358. package/lib/esm/types/feature.d.ts.map +1 -0
  359. package/lib/esm/types/feature.js +2 -0
  360. package/lib/esm/types/feature.js.map +1 -0
  361. package/lib/esm/types/feed.d.ts +11 -0
  362. package/lib/esm/types/feed.d.ts.map +1 -0
  363. package/lib/esm/types/feed.js +2 -3
  364. package/lib/esm/types/feed.js.map +1 -0
  365. package/lib/esm/types/feedObject.d.ts +56 -0
  366. package/lib/esm/types/feedObject.d.ts.map +1 -0
  367. package/lib/esm/types/feedObject.js +2 -3
  368. package/lib/esm/types/feedObject.js.map +1 -0
  369. package/lib/esm/types/incubator.d.ts +33 -0
  370. package/lib/esm/types/incubator.d.ts.map +1 -0
  371. package/lib/esm/types/incubator.js +2 -3
  372. package/lib/esm/types/incubator.js.map +1 -0
  373. package/lib/esm/types/index.d.ts +25 -0
  374. package/lib/esm/types/index.d.ts.map +1 -0
  375. package/lib/esm/types/index.js +3 -102
  376. package/lib/esm/types/index.js.map +1 -0
  377. package/lib/esm/types/insight.d.ts +67 -0
  378. package/lib/esm/types/insight.d.ts.map +1 -0
  379. package/lib/esm/types/insight.js +2 -0
  380. package/lib/esm/types/insight.js.map +1 -0
  381. package/lib/esm/types/legalPage.d.ts +19 -0
  382. package/lib/esm/types/legalPage.d.ts.map +1 -0
  383. package/lib/esm/types/legalPage.js +2 -3
  384. package/lib/esm/types/legalPage.js.map +1 -0
  385. package/lib/esm/types/media.d.ts +80 -0
  386. package/lib/esm/types/media.d.ts.map +1 -0
  387. package/lib/esm/types/media.js +20 -27
  388. package/lib/esm/types/media.js.map +1 -0
  389. package/lib/esm/types/moderation.d.ts +23 -0
  390. package/lib/esm/types/moderation.d.ts.map +1 -0
  391. package/lib/esm/types/moderation.js +2 -3
  392. package/lib/esm/types/moderation.js.map +1 -0
  393. package/lib/esm/types/notification.d.ts +31 -0
  394. package/lib/esm/types/notification.d.ts.map +1 -0
  395. package/lib/esm/types/notification.js +2 -3
  396. package/lib/esm/types/notification.js.map +1 -0
  397. package/lib/esm/types/paginatedResponse.d.ts +10 -0
  398. package/lib/esm/types/paginatedResponse.d.ts.map +1 -0
  399. package/lib/esm/types/paginatedResponse.js +5 -3
  400. package/lib/esm/types/paginatedResponse.js.map +1 -0
  401. package/lib/esm/types/privateMessage.d.ts +176 -0
  402. package/lib/esm/types/privateMessage.d.ts.map +1 -0
  403. package/lib/esm/types/privateMessage.js +2 -3
  404. package/lib/esm/types/privateMessage.js.map +1 -0
  405. package/lib/esm/types/prize.d.ts +47 -0
  406. package/lib/esm/types/prize.d.ts.map +1 -0
  407. package/lib/esm/types/prize.js +2 -3
  408. package/lib/esm/types/prize.js.map +1 -0
  409. package/lib/esm/types/score.d.ts +19 -0
  410. package/lib/esm/types/score.d.ts.map +1 -0
  411. package/lib/esm/types/score.js +2 -0
  412. package/lib/esm/types/score.js.map +1 -0
  413. package/lib/esm/types/sso.d.ts +12 -0
  414. package/lib/esm/types/sso.d.ts.map +1 -0
  415. package/lib/esm/types/sso.js +5 -3
  416. package/lib/esm/types/sso.js.map +1 -0
  417. package/lib/esm/types/tag.d.ts +61 -0
  418. package/lib/esm/types/tag.d.ts.map +1 -0
  419. package/lib/esm/types/tag.js +2 -3
  420. package/lib/esm/types/tag.js.map +1 -0
  421. package/lib/esm/types/user.d.ts +105 -0
  422. package/lib/esm/types/user.d.ts.map +1 -0
  423. package/lib/esm/types/user.js +2 -3
  424. package/lib/esm/types/user.js.map +1 -0
  425. package/lib/esm/types/webhook.d.ts +32 -0
  426. package/lib/esm/types/webhook.d.ts.map +1 -0
  427. package/lib/esm/types/webhook.js +2 -3
  428. package/lib/esm/types/webhook.js.map +1 -0
  429. package/lib/esm/utils/apiRequest.d.ts +2 -0
  430. package/lib/esm/utils/apiRequest.d.ts.map +1 -0
  431. package/lib/esm/utils/apiRequest.js +21 -27
  432. package/lib/esm/utils/apiRequest.js.map +1 -0
  433. package/lib/esm/utils/http.d.ts +6 -0
  434. package/lib/esm/utils/http.d.ts.map +1 -0
  435. package/lib/esm/utils/http.js +39 -48
  436. package/lib/esm/utils/http.js.map +1 -0
  437. package/lib/esm/utils/token.d.ts +21 -0
  438. package/lib/esm/utils/token.d.ts.map +1 -0
  439. package/lib/esm/utils/token.js +36 -33
  440. package/lib/esm/utils/token.js.map +1 -0
  441. package/lib/umd/api-services.js +1 -1
  442. package/lib/umd/api-services.js.map +1 -1
  443. package/package.json +7 -9
  444. package/lib/cjs/index.d.js +0 -2
  445. package/lib/esm/index.d.js +0 -2
  446. package/lib/types/services/comment/index.d.ts.map +0 -1
  447. package/lib/types/services/custom_adv/index.d.ts.map +0 -1
  448. package/lib/types/services/embed/index.d.ts.map +0 -1
  449. package/lib/types/services/feature/index.d.ts +0 -18
  450. package/lib/types/services/feature/index.d.ts.map +0 -1
  451. package/lib/types/services/feed_object/index.d.ts.map +0 -1
  452. package/lib/types/services/insight/index.d.ts.map +0 -1
  453. package/lib/types/services/locality/index.d.ts +0 -24
  454. package/lib/types/services/locality/index.d.ts.map +0 -1
  455. package/lib/types/services/loyalty/index.d.ts.map +0 -1
  456. package/lib/types/services/notification/index.d.ts.map +0 -1
  457. package/lib/types/services/score/index.d.ts +0 -31
  458. package/lib/types/services/score/index.d.ts.map +0 -1
  459. package/lib/types/services/tag/index.d.ts.map +0 -1
  460. package/lib/types/services/user/index.d.ts.map +0 -1
  461. package/lib/types/tsconfig.build.tsbuildinfo +0 -1
  462. package/lib/types/types/index.d.ts.map +0 -1
  463. package/lib/types/types/tag.d.ts.map +0 -1
  464. package/lib/types/utils/apiRequest.d.ts +0 -2
@@ -1,494 +1,396 @@
1
1
  "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = exports.FeedObjectApiClient = void 0;
5
-
6
- var _apiRequest = require("../../utils/apiRequest");
7
-
8
- var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.FeedObjectApiClient = void 0;
16
+ const apiRequest_1 = require("../../utils/apiRequest");
17
+ const Endpoints_1 = __importDefault(require("../../constants/Endpoints"));
12
18
  /**
13
19
  * Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).
14
20
  */
15
21
  class FeedObjectApiClient {
16
- /**
17
- * This endpoint retrieves all feed objs
18
- * @param type
19
- * @param params
20
- */
21
- static getAllFeedObjects(type, params) {
22
- const p = new URLSearchParams(params);
23
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectList.url({
24
- type
25
- })}?${p.toString()}`, _Endpoints.default.FeedObjectList.method);
26
- }
27
- /**
28
- * This endpoint retrieves all uncommented feed objs
29
- * @param type
30
- * @param params
31
- */
32
-
33
-
34
- static getUncommentedFeedObjects(type, params) {
35
- const p = new URLSearchParams(params);
36
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectsUncommented.url({
37
- type
38
- })}?${p.toString()}`, _Endpoints.default.FeedObjectsUncommented.method);
39
- }
40
- /**
41
- * This endpoint performs search operation to feed objs
42
- * @param type
43
- */
44
-
45
-
46
- static searchFeedObject(type) {
47
- return (0, _apiRequest.apiRequest)(_Endpoints.default.SearchFeedObject.url({
48
- type
49
- }), _Endpoints.default.SearchFeedObject.method);
50
- }
51
- /**
52
- * This endpoint creates a feed obj
53
- * @param type
54
- * @param data
55
- */
56
-
57
-
58
- static createFeedObject(type, data) {
59
- return (0, _apiRequest.apiRequest)(_Endpoints.default.CreateFeedObject.url({
60
- type
61
- }), _Endpoints.default.CreateFeedObject.method, data);
62
- }
63
- /**
64
- * This endpoint retrieves a specific feed obj using ID
65
- * @param type
66
- * @param id
67
- */
68
-
69
-
70
- static getSpecificFeedObject(type, id) {
71
- return (0, _apiRequest.apiRequest)(_Endpoints.default.FeedObject.url({
72
- type,
73
- id
74
- }), _Endpoints.default.FeedObject.method);
75
- }
76
- /**
77
- * This endpoint updates a specific feed obj
78
- * @param type
79
- * @param id
80
- * @param data
81
- */
82
-
83
-
84
- static updateFeedObject(type, id, data) {
85
- return (0, _apiRequest.apiRequest)(_Endpoints.default.UpdateFeedObject.url({
86
- id,
87
- type
88
- }), _Endpoints.default.UpdateFeedObject.method, data);
89
- }
90
- /**
91
- * This endpoint deletes a specific feed obj
92
- * @param type
93
- * @param id
94
- */
95
-
96
-
97
- static deleteFeedObject(type, id) {
98
- return (0, _apiRequest.apiRequest)(_Endpoints.default.DeleteFeedObject.url({
99
- type,
100
- id
101
- }), _Endpoints.default.DeleteFeedObject.method);
102
- }
103
- /**
104
- * This endpoint retrieves all contributors for a specific feed obj
105
- * @param type
106
- * @param id
107
- * @param params
108
- */
109
-
110
-
111
- static feedObjectContributorsList(type, id, params) {
112
- const p = new URLSearchParams(params);
113
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectContributorsList.url({
114
- type,
115
- id
116
- })}?${p.toString()}`, _Endpoints.default.FeedObjectContributorsList.method);
117
- }
118
- /**
119
- * This endpoint retrieves all shares for a specific feed obj
120
- * @param type
121
- * @param id
122
- * @param params
123
- */
124
-
125
-
126
- static feedObjectSharesList(type, id, params) {
127
- const p = new URLSearchParams(params);
128
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectSharesList.url({
129
- type,
130
- id
131
- })}?${p.toString()}`, _Endpoints.default.FeedObjectSharesList.method);
132
- }
133
- /**
134
- * This endpoint retrieves all shares users for a specific feed obj
135
- * @param type
136
- * @param id
137
- * @param params
138
- */
139
-
140
-
141
- static feedObjectUserSharesList(type, id, params) {
142
- const p = new URLSearchParams(params);
143
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectUserSharesList.url({
144
- type,
145
- id
146
- })}?${p.toString()}`, _Endpoints.default.FeedObjectUserSharesList.method);
147
- }
148
- /**
149
- *
150
- * @param type
151
- * @param id
152
- */
153
-
154
-
155
- static restoreFeedObject(type, id) {
156
- return (0, _apiRequest.apiRequest)(_Endpoints.default.RestoreFeedObject.url({
157
- type,
158
- id
159
- }), _Endpoints.default.RestoreFeedObject.method);
160
- }
161
- /**
162
- * This endpoint restores a feed obj
163
- * @param type
164
- * @param id
165
- * @param params
166
- */
167
-
168
-
169
- static relatedFeedObjects(type, id, params) {
170
- const p = new URLSearchParams(params);
171
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.RelatedFeedObjects.url({
172
- type,
173
- id
174
- })}?${p.toString()}`, _Endpoints.default.RelatedFeedObjects.method);
175
- }
176
- /**
177
- * This endpoint upvotes a specific feed obj
178
- * @param type
179
- * @param id
180
- */
181
-
182
-
183
- static voteFeedObject(type, id) {
184
- return (0, _apiRequest.apiRequest)(_Endpoints.default.Vote.url({
185
- type,
186
- id
187
- }), _Endpoints.default.Vote.method);
188
- }
189
- /**
190
- * This endpoint retrieves all votes for a specific feed obj
191
- * @param type
192
- * @param id
193
- * @param params
194
- */
195
-
196
-
197
- static feedObjectVotes(type, id, params) {
198
- const p = new URLSearchParams(params);
199
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.VotesList.url({
200
- type,
201
- id
202
- })}?${p.toString()}`, _Endpoints.default.VotesList.method);
203
- }
204
- /**
205
- * This endpoint upvotes a specific poll choice in a feed obj
206
- * @param type It can be only "discussion" or "post".
207
- * @param id
208
- * @param choice
209
- */
210
-
211
-
212
- static feedObjectPollVote(type, id, choice) {
213
- return (0, _apiRequest.apiRequest)(_Endpoints.default.PollVote.url({
214
- type,
215
- id
216
- }), _Endpoints.default.PollVote.method, {
217
- choice: choice
218
- });
219
- }
220
- /**
221
- * This endpoint retrieves all poll votes for a specific feed obj
222
- * @param type It can be only "discussion" or "post".
223
- * @param id
224
- * @param params
225
- */
226
-
227
-
228
- static feedObjectPollVotesList(type, id, params) {
229
- const p = new URLSearchParams(params);
230
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.PollVotesList.url({
231
- type,
232
- id
233
- })}?${p.toString()}`, _Endpoints.default.PollVotesList.method);
234
- }
235
- /**
236
- * This endpoint follows a feed obj
237
- * @param type
238
- * @param id
239
- */
240
-
241
-
242
- static followFeedObject(type, id) {
243
- return (0, _apiRequest.apiRequest)(_Endpoints.default.FollowContribution.url({
244
- id
245
- }), _Endpoints.default.FollowContribution.method);
246
- }
247
- /**
248
- * This endpoint retrieves all feed objs followed by the authenticated user
249
- * @param type
250
- * @param params
251
- */
252
-
253
-
254
- static feedObjectFollowingList(type, params) {
255
- const p = new URLSearchParams(params);
256
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectFollowingList.url({
257
- type
258
- })}?${p.toString()}`, _Endpoints.default.FeedObjectFollowingList.method);
259
- }
260
- /**
261
- * This endpoint returns following = true if the feed obj (identified in path) is followed by the authenticated user
262
- * @param type
263
- * @param id
264
- */
265
-
266
-
267
- static checkIfFollowingFeedObject(type, id) {
268
- return (0, _apiRequest.apiRequest)(_Endpoints.default.CheckIfFollowingFeedObject.url({
269
- type,
270
- id
271
- }), _Endpoints.default.CheckIfFollowingFeedObject.method);
272
- }
273
- /**
274
- * This endpoint suspends the notifications for the selected feed obj
275
- * @param type
276
- * @param id
277
- */
278
-
279
-
280
- static suspendFeedObject(type, id) {
281
- return (0, _apiRequest.apiRequest)(_Endpoints.default.UserSuspendContributionNotification.url({
282
- type,
283
- id
284
- }), _Endpoints.default.UserSuspendContributionNotification.method);
285
- }
286
- /**
287
- * This endpoint returns suspended = true if the notifications for the feed obj (identified in path) is suspended by the authenticated user
288
- * @param type
289
- * @param id
290
- */
291
-
292
-
293
- static checkIfSuspendedFeedObject(type, id) {
294
- return (0, _apiRequest.apiRequest)(_Endpoints.default.UserCheckContributionNotificationSuspended.url({
295
- type,
296
- id
297
- }), _Endpoints.default.UserCheckContributionNotificationSuspended.method);
298
- }
299
- /**
300
- * This endpoint retrieves the list of feed obj which notifications are suspended by the authenticated user
301
- * @param type
302
- * @param params
303
- */
304
-
305
-
306
- static feedObjectSuspendedList(type, params) {
307
- const p = new URLSearchParams(params);
308
- return (0, _apiRequest.apiRequest)(`${_Endpoints.default.UserListContributionNotificationSuspended.url({
309
- type
310
- })}?${p.toString()}`, _Endpoints.default.UserListContributionNotificationSuspended.method);
311
- }
312
- /**
313
- * This endpoint flags a specific feed obj
314
- * @param type
315
- * @param id
316
- * @param flag_type
317
- */
318
-
319
-
320
- static flagFeedObject(type, id, flag_type) {
321
- return (0, _apiRequest.apiRequest)(_Endpoints.default.Flag.url({
322
- type,
323
- id
324
- }), _Endpoints.default.Flag.method, flag_type);
325
- }
326
- /**
327
- * Retrieves, if exists, a flag for this contribute created by the authenticated user
328
- * @param type
329
- * @param id
330
- */
331
-
332
-
333
- static feedObjectFlagStatus(type, id) {
334
- return (0, _apiRequest.apiRequest)(_Endpoints.default.FlagStatus.url({
335
- type,
336
- id
337
- }), _Endpoints.default.FlagStatus.method);
338
- }
339
- /**
340
- * This endpoint retrieves a list of flags for a specific feed obj
341
- * @param type
342
- * @param id
343
- */
344
-
345
-
346
- static feedObjectFlagList(type, id) {
347
- return (0, _apiRequest.apiRequest)(_Endpoints.default.FeedObjectFlagList.url({
348
- type,
349
- id
350
- }), _Endpoints.default.FeedObjectFlagList.method);
351
- }
352
- /**
353
- * This endpoint hides the feed obj for the logged user. The feed obj must be in show state
354
- * @param type
355
- * @param id
356
- */
357
-
358
-
359
- static hideFeedObject(type, id) {
360
- return (0, _apiRequest.apiRequest)(_Endpoints.default.HideFeedObject.url({
361
- type,
362
- id
363
- }), _Endpoints.default.HideFeedObject.method);
364
- }
365
- /**
366
- * This endpoint retrieves if the the feed obj has been hidden by the authenticated user (hidden = true)
367
- * @param type
368
- * @param id
369
- */
370
-
371
-
372
- static feedObjectHideStatus(type, id) {
373
- return (0, _apiRequest.apiRequest)(_Endpoints.default.FeedObjectHideStatus.url({
374
- type,
375
- id
376
- }), _Endpoints.default.FeedObjectHideStatus.method);
377
- }
378
-
22
+ /**
23
+ * This endpoint retrieves all feed objs
24
+ * @param type
25
+ * @param params
26
+ */
27
+ static getAllFeedObjects(type, params) {
28
+ const p = new URLSearchParams(params);
29
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.FeedObjectList.url({ type })}?${p.toString()}`, Endpoints_1.default.FeedObjectList.method);
30
+ }
31
+ /**
32
+ * This endpoint retrieves all uncommented feed objs
33
+ * @param type
34
+ * @param params
35
+ */
36
+ static getUncommentedFeedObjects(type, params) {
37
+ const p = new URLSearchParams(params);
38
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.FeedObjectsUncommented.url({ type })}?${p.toString()}`, Endpoints_1.default.FeedObjectsUncommented.method);
39
+ }
40
+ /**
41
+ * This endpoint performs search operation to feed objs
42
+ * @param type
43
+ */
44
+ static searchFeedObject(type) {
45
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.SearchFeedObject.url({ type }), Endpoints_1.default.SearchFeedObject.method);
46
+ }
47
+ /**
48
+ * This endpoint creates a feed obj
49
+ * @param type
50
+ * @param data
51
+ */
52
+ static createFeedObject(type, data) {
53
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.CreateFeedObject.url({ type }), Endpoints_1.default.CreateFeedObject.method, data);
54
+ }
55
+ /**
56
+ * This endpoint retrieves a specific feed obj using ID
57
+ * @param type
58
+ * @param id
59
+ */
60
+ static getSpecificFeedObject(type, id) {
61
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.FeedObject.url({ type, id }), Endpoints_1.default.FeedObject.method);
62
+ }
63
+ /**
64
+ * This endpoint updates a specific feed obj
65
+ * @param type
66
+ * @param id
67
+ * @param data
68
+ */
69
+ static updateFeedObject(type, id, data) {
70
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.UpdateFeedObject.url({ id, type }), Endpoints_1.default.UpdateFeedObject.method, data);
71
+ }
72
+ /**
73
+ * This endpoint deletes a specific feed obj
74
+ * @param type
75
+ * @param id
76
+ */
77
+ static deleteFeedObject(type, id) {
78
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.DeleteFeedObject.url({ type, id }), Endpoints_1.default.DeleteFeedObject.method);
79
+ }
80
+ /**
81
+ * This endpoint retrieves all contributors for a specific feed obj
82
+ * @param type
83
+ * @param id
84
+ * @param params
85
+ */
86
+ static feedObjectContributorsList(type, id, params) {
87
+ const p = new URLSearchParams(params);
88
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.FeedObjectContributorsList.url({ type, id })}?${p.toString()}`, Endpoints_1.default.FeedObjectContributorsList.method);
89
+ }
90
+ /**
91
+ * This endpoint retrieves all shares for a specific feed obj
92
+ * @param type
93
+ * @param id
94
+ * @param params
95
+ */
96
+ static feedObjectSharesList(type, id, params) {
97
+ const p = new URLSearchParams(params);
98
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.FeedObjectSharesList.url({ type, id })}?${p.toString()}`, Endpoints_1.default.FeedObjectSharesList.method);
99
+ }
100
+ /**
101
+ * This endpoint retrieves all shares users for a specific feed obj
102
+ * @param type
103
+ * @param id
104
+ * @param params
105
+ */
106
+ static feedObjectUserSharesList(type, id, params) {
107
+ const p = new URLSearchParams(params);
108
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.FeedObjectUserSharesList.url({ type, id })}?${p.toString()}`, Endpoints_1.default.FeedObjectUserSharesList.method);
109
+ }
110
+ /**
111
+ *
112
+ * @param type
113
+ * @param id
114
+ */
115
+ static restoreFeedObject(type, id) {
116
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.RestoreFeedObject.url({ type, id }), Endpoints_1.default.RestoreFeedObject.method);
117
+ }
118
+ /**
119
+ * This endpoint restores a feed obj
120
+ * @param type
121
+ * @param id
122
+ * @param params
123
+ */
124
+ static relatedFeedObjects(type, id, params) {
125
+ const p = new URLSearchParams(params);
126
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.RelatedFeedObjects.url({ type, id })}?${p.toString()}`, Endpoints_1.default.RelatedFeedObjects.method);
127
+ }
128
+ /**
129
+ * This endpoint upvotes a specific feed obj
130
+ * @param type
131
+ * @param id
132
+ */
133
+ static voteFeedObject(type, id) {
134
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.Vote.url({ type, id }), Endpoints_1.default.Vote.method);
135
+ }
136
+ /**
137
+ * This endpoint retrieves all votes for a specific feed obj
138
+ * @param type
139
+ * @param id
140
+ * @param params
141
+ */
142
+ static feedObjectVotes(type, id, params) {
143
+ const p = new URLSearchParams(params);
144
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.VotesList.url({ type, id })}?${p.toString()}`, Endpoints_1.default.VotesList.method);
145
+ }
146
+ /**
147
+ * This endpoint upvotes a specific poll choice in a feed obj
148
+ * @param type It can be only "discussion" or "post".
149
+ * @param id
150
+ * @param choice
151
+ */
152
+ static feedObjectPollVote(type, id, choice) {
153
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.PollVote.url({ type, id }), Endpoints_1.default.PollVote.method, { choice: choice });
154
+ }
155
+ /**
156
+ * This endpoint retrieves all poll votes for a specific feed obj
157
+ * @param type It can be only "discussion" or "post".
158
+ * @param id
159
+ * @param params
160
+ */
161
+ static feedObjectPollVotesList(type, id, params) {
162
+ const p = new URLSearchParams(params);
163
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.PollVotesList.url({ type, id })}?${p.toString()}`, Endpoints_1.default.PollVotesList.method);
164
+ }
165
+ /**
166
+ * This endpoint follows a feed obj
167
+ * @param type
168
+ * @param id
169
+ */
170
+ static followFeedObject(type, id) {
171
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.FollowContribution.url({ id }), Endpoints_1.default.FollowContribution.method);
172
+ }
173
+ /**
174
+ * This endpoint retrieves all feed objs followed by the authenticated user
175
+ * @param type
176
+ * @param params
177
+ */
178
+ static feedObjectFollowingList(type, params) {
179
+ const p = new URLSearchParams(params);
180
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.FeedObjectFollowingList.url({ type })}?${p.toString()}`, Endpoints_1.default.FeedObjectFollowingList.method);
181
+ }
182
+ /**
183
+ * This endpoint returns following = true if the feed obj (identified in path) is followed by the authenticated user
184
+ * @param type
185
+ * @param id
186
+ */
187
+ static checkIfFollowingFeedObject(type, id) {
188
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.CheckIfFollowingFeedObject.url({ type, id }), Endpoints_1.default.CheckIfFollowingFeedObject.method);
189
+ }
190
+ /**
191
+ * This endpoint suspends the notifications for the selected feed obj
192
+ * @param type
193
+ * @param id
194
+ */
195
+ static suspendFeedObject(type, id) {
196
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.UserSuspendContributionNotification.url({ type, id }), Endpoints_1.default.UserSuspendContributionNotification.method);
197
+ }
198
+ /**
199
+ * This endpoint returns suspended = true if the notifications for the feed obj (identified in path) is suspended by the authenticated user
200
+ * @param type
201
+ * @param id
202
+ */
203
+ static checkIfSuspendedFeedObject(type, id) {
204
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.UserCheckContributionNotificationSuspended.url({ type, id }), Endpoints_1.default.UserCheckContributionNotificationSuspended.method);
205
+ }
206
+ /**
207
+ * This endpoint retrieves the list of feed obj which notifications are suspended by the authenticated user
208
+ * @param type
209
+ * @param params
210
+ */
211
+ static feedObjectSuspendedList(type, params) {
212
+ const p = new URLSearchParams(params);
213
+ return (0, apiRequest_1.apiRequest)(`${Endpoints_1.default.UserListContributionNotificationSuspended.url({ type })}?${p.toString()}`, Endpoints_1.default.UserListContributionNotificationSuspended.method);
214
+ }
215
+ /**
216
+ * This endpoint flags a specific feed obj
217
+ * @param type
218
+ * @param id
219
+ * @param flag_type
220
+ */
221
+ static flagFeedObject(type, id, flag_type) {
222
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.Flag.url({ type, id }), Endpoints_1.default.Flag.method, flag_type);
223
+ }
224
+ /**
225
+ * Retrieves, if exists, a flag for this contribute created by the authenticated user
226
+ * @param type
227
+ * @param id
228
+ */
229
+ static feedObjectFlagStatus(type, id) {
230
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.FlagStatus.url({ type, id }), Endpoints_1.default.FlagStatus.method);
231
+ }
232
+ /**
233
+ * This endpoint retrieves a list of flags for a specific feed obj
234
+ * @param type
235
+ * @param id
236
+ */
237
+ static feedObjectFlagList(type, id) {
238
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.FeedObjectFlagList.url({ type, id }), Endpoints_1.default.FeedObjectFlagList.method);
239
+ }
240
+ /**
241
+ * This endpoint hides the feed obj for the logged user. The feed obj must be in show state
242
+ * @param type
243
+ * @param id
244
+ */
245
+ static hideFeedObject(type, id) {
246
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.HideFeedObject.url({ type, id }), Endpoints_1.default.HideFeedObject.method);
247
+ }
248
+ /**
249
+ * This endpoint retrieves if the the feed obj has been hidden by the authenticated user (hidden = true)
250
+ * @param type
251
+ * @param id
252
+ */
253
+ static feedObjectHideStatus(type, id) {
254
+ return (0, apiRequest_1.apiRequest)(Endpoints_1.default.FeedObjectHideStatus.url({ type, id }), Endpoints_1.default.FeedObjectHideStatus.method);
255
+ }
379
256
  }
380
-
381
257
  exports.FeedObjectApiClient = FeedObjectApiClient;
382
-
383
258
  class FeedObjectService {
384
- static async getAllFeedObjects(type, params) {
385
- return FeedObjectApiClient.getAllFeedObjects(type, params);
386
- }
387
-
388
- static async getUncommentedFeedObjects(type, params) {
389
- return FeedObjectApiClient.getUncommentedFeedObjects(type, params);
390
- }
391
-
392
- static async searchFeedObject(type) {
393
- return FeedObjectApiClient.searchFeedObject(type);
394
- }
395
-
396
- static async createFeedObject(type, data) {
397
- return FeedObjectApiClient.createFeedObject(type, data);
398
- }
399
-
400
- static async getSpecificFeedObject(type, id) {
401
- return FeedObjectApiClient.getSpecificFeedObject(type, id);
402
- }
403
-
404
- static async updateFeedObject(type, id, data) {
405
- return FeedObjectApiClient.updateFeedObject(type, id, data);
406
- }
407
-
408
- static async deleteFeedObject(type, id) {
409
- return FeedObjectApiClient.deleteFeedObject(type, id);
410
- }
411
-
412
- static async feedObjectContributorsList(type, id, params) {
413
- return FeedObjectApiClient.feedObjectContributorsList(type, id, params);
414
- }
415
-
416
- static async feedObjectSharesList(type, id, params) {
417
- return FeedObjectApiClient.feedObjectSharesList(type, id, params);
418
- }
419
-
420
- static async feedObjectUserSharesList(type, id, params) {
421
- return FeedObjectApiClient.feedObjectUserSharesList(type, id, params);
422
- }
423
-
424
- static async restoreFeedObject(type, id) {
425
- return FeedObjectApiClient.restoreFeedObject(type, id);
426
- }
427
-
428
- static async relatedFeedObjects(type, id, params) {
429
- return FeedObjectApiClient.relatedFeedObjects(type, id, params);
430
- }
431
-
432
- static async voteFeedObject(type, id) {
433
- return FeedObjectApiClient.voteFeedObject(type, id);
434
- }
435
-
436
- static async feedObjectVotes(type, id, params) {
437
- return FeedObjectApiClient.feedObjectVotes(type, id, params);
438
- }
439
-
440
- static async feedObjectPollVote(type, id, choice) {
441
- return FeedObjectApiClient.feedObjectPollVote(type, id, choice);
442
- }
443
-
444
- static async feedObjectPollVotesList(type, id, params) {
445
- return FeedObjectApiClient.feedObjectPollVotesList(type, id, params);
446
- }
447
-
448
- static async followFeedObject(type, id) {
449
- return FeedObjectApiClient.followFeedObject(type, id);
450
- }
451
-
452
- static async feedObjectFollowingList(type, params) {
453
- return FeedObjectApiClient.feedObjectFollowingList(type, params);
454
- }
455
-
456
- static async checkIfFollowingFeedObject(type, id) {
457
- return FeedObjectApiClient.checkIfFollowingFeedObject(type, id);
458
- }
459
-
460
- static async suspendFeedObject(type, id) {
461
- return FeedObjectApiClient.suspendFeedObject(type, id);
462
- }
463
-
464
- static async checkIfSuspendedFeedObject(type, id) {
465
- return FeedObjectApiClient.checkIfSuspendedFeedObject(type, id);
466
- }
467
-
468
- static async feedObjectSuspendedList(type, params) {
469
- return FeedObjectApiClient.feedObjectSuspendedList(type, params);
470
- }
471
-
472
- static async flagFeedObject(type, id, flag_type) {
473
- return FeedObjectApiClient.flagFeedObject(type, id, flag_type);
474
- }
475
-
476
- static async feedObjectFlagList(type, id) {
477
- return FeedObjectApiClient.feedObjectFlagList(type, id);
478
- }
479
-
480
- static async feedObjectFlagStatus(type, id) {
481
- return FeedObjectApiClient.feedObjectFlagStatus(type, id);
482
- }
483
-
484
- static async hideFeedObject(type, id) {
485
- return FeedObjectApiClient.hideFeedObject(type, id);
486
- }
487
-
488
- static async feedObjectHideStatus(type, id) {
489
- return FeedObjectApiClient.feedObjectHideStatus(type, id);
490
- }
491
-
259
+ static getAllFeedObjects(type, params) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ return FeedObjectApiClient.getAllFeedObjects(type, params);
262
+ });
263
+ }
264
+ static getUncommentedFeedObjects(type, params) {
265
+ return __awaiter(this, void 0, void 0, function* () {
266
+ return FeedObjectApiClient.getUncommentedFeedObjects(type, params);
267
+ });
268
+ }
269
+ static searchFeedObject(type) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ return FeedObjectApiClient.searchFeedObject(type);
272
+ });
273
+ }
274
+ static createFeedObject(type, data) {
275
+ return __awaiter(this, void 0, void 0, function* () {
276
+ return FeedObjectApiClient.createFeedObject(type, data);
277
+ });
278
+ }
279
+ static getSpecificFeedObject(type, id) {
280
+ return __awaiter(this, void 0, void 0, function* () {
281
+ return FeedObjectApiClient.getSpecificFeedObject(type, id);
282
+ });
283
+ }
284
+ static updateFeedObject(type, id, data) {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ return FeedObjectApiClient.updateFeedObject(type, id, data);
287
+ });
288
+ }
289
+ static deleteFeedObject(type, id) {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ return FeedObjectApiClient.deleteFeedObject(type, id);
292
+ });
293
+ }
294
+ static feedObjectContributorsList(type, id, params) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ return FeedObjectApiClient.feedObjectContributorsList(type, id, params);
297
+ });
298
+ }
299
+ static feedObjectSharesList(type, id, params) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ return FeedObjectApiClient.feedObjectSharesList(type, id, params);
302
+ });
303
+ }
304
+ static feedObjectUserSharesList(type, id, params) {
305
+ return __awaiter(this, void 0, void 0, function* () {
306
+ return FeedObjectApiClient.feedObjectUserSharesList(type, id, params);
307
+ });
308
+ }
309
+ static restoreFeedObject(type, id) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ return FeedObjectApiClient.restoreFeedObject(type, id);
312
+ });
313
+ }
314
+ static relatedFeedObjects(type, id, params) {
315
+ return __awaiter(this, void 0, void 0, function* () {
316
+ return FeedObjectApiClient.relatedFeedObjects(type, id, params);
317
+ });
318
+ }
319
+ static voteFeedObject(type, id) {
320
+ return __awaiter(this, void 0, void 0, function* () {
321
+ return FeedObjectApiClient.voteFeedObject(type, id);
322
+ });
323
+ }
324
+ static feedObjectVotes(type, id, params) {
325
+ return __awaiter(this, void 0, void 0, function* () {
326
+ return FeedObjectApiClient.feedObjectVotes(type, id, params);
327
+ });
328
+ }
329
+ static feedObjectPollVote(type, id, choice) {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ return FeedObjectApiClient.feedObjectPollVote(type, id, choice);
332
+ });
333
+ }
334
+ static feedObjectPollVotesList(type, id, params) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ return FeedObjectApiClient.feedObjectPollVotesList(type, id, params);
337
+ });
338
+ }
339
+ static followFeedObject(type, id) {
340
+ return __awaiter(this, void 0, void 0, function* () {
341
+ return FeedObjectApiClient.followFeedObject(type, id);
342
+ });
343
+ }
344
+ static feedObjectFollowingList(type, params) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ return FeedObjectApiClient.feedObjectFollowingList(type, params);
347
+ });
348
+ }
349
+ static checkIfFollowingFeedObject(type, id) {
350
+ return __awaiter(this, void 0, void 0, function* () {
351
+ return FeedObjectApiClient.checkIfFollowingFeedObject(type, id);
352
+ });
353
+ }
354
+ static suspendFeedObject(type, id) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ return FeedObjectApiClient.suspendFeedObject(type, id);
357
+ });
358
+ }
359
+ static checkIfSuspendedFeedObject(type, id) {
360
+ return __awaiter(this, void 0, void 0, function* () {
361
+ return FeedObjectApiClient.checkIfSuspendedFeedObject(type, id);
362
+ });
363
+ }
364
+ static feedObjectSuspendedList(type, params) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ return FeedObjectApiClient.feedObjectSuspendedList(type, params);
367
+ });
368
+ }
369
+ static flagFeedObject(type, id, flag_type) {
370
+ return __awaiter(this, void 0, void 0, function* () {
371
+ return FeedObjectApiClient.flagFeedObject(type, id, flag_type);
372
+ });
373
+ }
374
+ static feedObjectFlagList(type, id) {
375
+ return __awaiter(this, void 0, void 0, function* () {
376
+ return FeedObjectApiClient.feedObjectFlagList(type, id);
377
+ });
378
+ }
379
+ static feedObjectFlagStatus(type, id) {
380
+ return __awaiter(this, void 0, void 0, function* () {
381
+ return FeedObjectApiClient.feedObjectFlagStatus(type, id);
382
+ });
383
+ }
384
+ static hideFeedObject(type, id) {
385
+ return __awaiter(this, void 0, void 0, function* () {
386
+ return FeedObjectApiClient.hideFeedObject(type, id);
387
+ });
388
+ }
389
+ static feedObjectHideStatus(type, id) {
390
+ return __awaiter(this, void 0, void 0, function* () {
391
+ return FeedObjectApiClient.feedObjectHideStatus(type, id);
392
+ });
393
+ }
492
394
  }
493
-
494
- exports.default = FeedObjectService;
395
+ exports.default = FeedObjectService;
396
+ //# sourceMappingURL=index.js.map