@selfcommunity/api-services 0.4.0-alpha.4 → 0.4.0-alpha.41

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 (514) hide show
  1. package/lib/cjs/client/index.d.ts +2 -10
  2. package/lib/cjs/client/index.js +3 -6
  3. package/lib/cjs/constants/Endpoints.d.ts +1 -2
  4. package/lib/cjs/constants/Endpoints.js +15 -4
  5. package/lib/cjs/constants/Errors.d.ts +4 -0
  6. package/lib/cjs/constants/Errors.js +7 -0
  7. package/lib/cjs/index.d.ts +3 -4
  8. package/lib/cjs/index.js +36 -61
  9. package/lib/cjs/services/account/index.d.ts +7 -1
  10. package/lib/cjs/services/account/index.js +20 -19
  11. package/lib/cjs/services/category/index.d.ts +0 -1
  12. package/lib/cjs/services/category/index.js +18 -30
  13. package/lib/cjs/services/comment/index.d.ts +0 -1
  14. package/lib/cjs/services/comment/index.js +13 -25
  15. package/lib/cjs/services/custom_adv/index.d.ts +0 -1
  16. package/lib/cjs/services/custom_adv/index.js +5 -17
  17. package/lib/cjs/services/custom_menu/index.d.ts +0 -1
  18. package/lib/cjs/services/custom_menu/index.js +6 -18
  19. package/lib/cjs/services/custom_page/index.d.ts +0 -1
  20. package/lib/cjs/services/custom_page/index.js +5 -17
  21. package/lib/cjs/services/data_portability/index.d.ts +0 -1
  22. package/lib/cjs/services/data_portability/index.js +5 -17
  23. package/lib/cjs/services/embed/index.d.ts +0 -1
  24. package/lib/cjs/services/embed/index.js +10 -22
  25. package/lib/cjs/services/feature/index.d.ts +0 -1
  26. package/lib/cjs/services/feature/index.js +3 -15
  27. package/lib/cjs/services/feed/index.d.ts +0 -1
  28. package/lib/cjs/services/feed/index.js +7 -19
  29. package/lib/cjs/services/feed_object/index.d.ts +0 -1
  30. package/lib/cjs/services/feed_object/index.js +29 -41
  31. package/lib/cjs/services/incubator/index.d.ts +0 -1
  32. package/lib/cjs/services/incubator/index.js +9 -21
  33. package/lib/cjs/services/insight/index.d.ts +0 -1
  34. package/lib/cjs/services/insight/index.js +8 -20
  35. package/lib/cjs/services/invite/index.d.ts +0 -1
  36. package/lib/cjs/services/invite/index.js +3 -15
  37. package/lib/cjs/services/legal_page/index.d.ts +0 -1
  38. package/lib/cjs/services/legal_page/index.js +11 -23
  39. package/lib/cjs/services/locality/index.d.ts +0 -1
  40. package/lib/cjs/services/locality/index.js +4 -16
  41. package/lib/cjs/services/loyalty/index.d.ts +5 -5
  42. package/lib/cjs/services/loyalty/index.js +16 -27
  43. package/lib/cjs/services/media/index.d.ts +0 -1
  44. package/lib/cjs/services/media/index.js +9 -21
  45. package/lib/cjs/services/moderation/index.d.ts +0 -1
  46. package/lib/cjs/services/moderation/index.js +8 -20
  47. package/lib/cjs/services/notification/index.d.ts +0 -1
  48. package/lib/cjs/services/notification/index.js +11 -23
  49. package/lib/cjs/services/preference/index.d.ts +0 -1
  50. package/lib/cjs/services/preference/index.js +5 -17
  51. package/lib/cjs/services/private_message/index.d.ts +0 -1
  52. package/lib/cjs/services/private_message/index.js +13 -25
  53. package/lib/cjs/services/promo/index.d.ts +0 -1
  54. package/lib/cjs/services/promo/index.js +3 -15
  55. package/lib/cjs/services/reactions/index.d.ts +7 -1
  56. package/lib/cjs/services/reactions/index.js +24 -16
  57. package/lib/cjs/services/score/index.d.ts +0 -1
  58. package/lib/cjs/services/score/index.js +5 -17
  59. package/lib/cjs/services/sso/index.d.ts +0 -1
  60. package/lib/cjs/services/sso/index.js +4 -16
  61. package/lib/cjs/services/suggestion/index.d.ts +9 -5
  62. package/lib/cjs/services/suggestion/index.js +12 -19
  63. package/lib/cjs/services/tag/index.d.ts +0 -1
  64. package/lib/cjs/services/tag/index.js +9 -21
  65. package/lib/cjs/services/user/index.d.ts +20 -13
  66. package/lib/cjs/services/user/index.js +82 -84
  67. package/lib/cjs/services/webhook/index.d.ts +0 -1
  68. package/lib/cjs/services/webhook/index.js +14 -26
  69. package/lib/cjs/types/account.d.ts +0 -1
  70. package/lib/cjs/types/account.js +0 -1
  71. package/lib/cjs/types/baseParams.d.ts +0 -1
  72. package/lib/cjs/types/baseParams.js +0 -1
  73. package/lib/cjs/types/category.d.ts +0 -1
  74. package/lib/cjs/types/category.js +0 -1
  75. package/lib/cjs/types/comment.d.ts +0 -1
  76. package/lib/cjs/types/comment.js +0 -1
  77. package/lib/cjs/types/customAdv.d.ts +0 -1
  78. package/lib/cjs/types/customAdv.js +0 -1
  79. package/lib/cjs/types/customPage.d.ts +0 -1
  80. package/lib/cjs/types/customPage.js +0 -1
  81. package/lib/cjs/types/embed.d.ts +0 -1
  82. package/lib/cjs/types/embed.js +0 -1
  83. package/lib/cjs/types/feature.d.ts +0 -1
  84. package/lib/cjs/types/feature.js +0 -1
  85. package/lib/cjs/types/feed.d.ts +0 -1
  86. package/lib/cjs/types/feed.js +0 -1
  87. package/lib/cjs/types/feedObject.d.ts +0 -1
  88. package/lib/cjs/types/feedObject.js +0 -1
  89. package/lib/cjs/types/incubator.d.ts +0 -1
  90. package/lib/cjs/types/incubator.js +0 -1
  91. package/lib/cjs/types/index.d.ts +2 -3
  92. package/lib/cjs/types/index.js +0 -1
  93. package/lib/cjs/types/insight.d.ts +0 -1
  94. package/lib/cjs/types/insight.js +0 -1
  95. package/lib/cjs/types/legalPage.d.ts +0 -1
  96. package/lib/cjs/types/legalPage.js +0 -1
  97. package/lib/cjs/types/media.d.ts +0 -1
  98. package/lib/cjs/types/media.js +0 -1
  99. package/lib/cjs/types/moderation.d.ts +0 -1
  100. package/lib/cjs/types/moderation.js +0 -1
  101. package/lib/cjs/types/notification.d.ts +0 -1
  102. package/lib/cjs/types/notification.js +0 -1
  103. package/lib/cjs/types/paginatedResponse.d.ts +0 -1
  104. package/lib/cjs/types/paginatedResponse.js +0 -1
  105. package/lib/cjs/types/privateMessage.d.ts +0 -1
  106. package/lib/cjs/types/privateMessage.js +0 -1
  107. package/lib/cjs/types/prize.d.ts +14 -1
  108. package/lib/cjs/types/prize.js +0 -1
  109. package/lib/cjs/types/reaction.d.ts +0 -1
  110. package/lib/cjs/types/reaction.js +0 -1
  111. package/lib/cjs/types/score.d.ts +0 -1
  112. package/lib/cjs/types/score.js +0 -1
  113. package/lib/cjs/types/sso.d.ts +0 -1
  114. package/lib/cjs/types/sso.js +0 -1
  115. package/lib/cjs/types/tag.d.ts +0 -1
  116. package/lib/cjs/types/tag.js +0 -1
  117. package/lib/cjs/types/user.d.ts +0 -1
  118. package/lib/cjs/types/user.js +0 -1
  119. package/lib/cjs/types/webhook.d.ts +0 -1
  120. package/lib/cjs/types/webhook.js +0 -1
  121. package/lib/cjs/utils/apiRequest.d.ts +0 -1
  122. package/lib/cjs/utils/apiRequest.js +10 -7
  123. package/lib/cjs/utils/http.d.ts +2 -2
  124. package/lib/cjs/utils/http.js +32 -6
  125. package/lib/cjs/utils/token.d.ts +0 -1
  126. package/lib/cjs/utils/token.js +3 -35
  127. package/lib/cjs/utils/url.d.ts +0 -1
  128. package/lib/cjs/utils/url.js +0 -1
  129. package/lib/esm/client/index.d.ts +2 -10
  130. package/lib/esm/client/index.js +1 -2
  131. package/lib/esm/constants/Endpoints.d.ts +1 -2
  132. package/lib/esm/constants/Endpoints.js +15 -4
  133. package/lib/esm/constants/Errors.d.ts +4 -0
  134. package/lib/esm/constants/Errors.js +4 -0
  135. package/lib/esm/index.d.ts +3 -4
  136. package/lib/esm/index.js +2 -3
  137. package/lib/esm/services/account/index.d.ts +7 -1
  138. package/lib/esm/services/account/index.js +14 -10
  139. package/lib/esm/services/category/index.d.ts +0 -1
  140. package/lib/esm/services/category/index.js +1 -10
  141. package/lib/esm/services/comment/index.d.ts +0 -1
  142. package/lib/esm/services/comment/index.js +1 -10
  143. package/lib/esm/services/custom_adv/index.d.ts +0 -1
  144. package/lib/esm/services/custom_adv/index.js +1 -10
  145. package/lib/esm/services/custom_menu/index.d.ts +0 -1
  146. package/lib/esm/services/custom_menu/index.js +1 -10
  147. package/lib/esm/services/custom_page/index.d.ts +0 -1
  148. package/lib/esm/services/custom_page/index.js +1 -10
  149. package/lib/esm/services/data_portability/index.d.ts +0 -1
  150. package/lib/esm/services/data_portability/index.js +1 -10
  151. package/lib/esm/services/embed/index.d.ts +0 -1
  152. package/lib/esm/services/embed/index.js +1 -10
  153. package/lib/esm/services/feature/index.d.ts +0 -1
  154. package/lib/esm/services/feature/index.js +1 -10
  155. package/lib/esm/services/feed/index.d.ts +0 -1
  156. package/lib/esm/services/feed/index.js +1 -10
  157. package/lib/esm/services/feed_object/index.d.ts +0 -1
  158. package/lib/esm/services/feed_object/index.js +1 -10
  159. package/lib/esm/services/incubator/index.d.ts +0 -1
  160. package/lib/esm/services/incubator/index.js +1 -10
  161. package/lib/esm/services/insight/index.d.ts +0 -1
  162. package/lib/esm/services/insight/index.js +1 -10
  163. package/lib/esm/services/invite/index.d.ts +0 -1
  164. package/lib/esm/services/invite/index.js +1 -10
  165. package/lib/esm/services/legal_page/index.d.ts +0 -1
  166. package/lib/esm/services/legal_page/index.js +1 -10
  167. package/lib/esm/services/locality/index.d.ts +0 -1
  168. package/lib/esm/services/locality/index.js +1 -10
  169. package/lib/esm/services/loyalty/index.d.ts +5 -5
  170. package/lib/esm/services/loyalty/index.js +6 -14
  171. package/lib/esm/services/media/index.d.ts +0 -1
  172. package/lib/esm/services/media/index.js +1 -10
  173. package/lib/esm/services/moderation/index.d.ts +0 -1
  174. package/lib/esm/services/moderation/index.js +1 -10
  175. package/lib/esm/services/notification/index.d.ts +0 -1
  176. package/lib/esm/services/notification/index.js +1 -10
  177. package/lib/esm/services/preference/index.d.ts +0 -1
  178. package/lib/esm/services/preference/index.js +1 -10
  179. package/lib/esm/services/private_message/index.d.ts +0 -1
  180. package/lib/esm/services/private_message/index.js +1 -10
  181. package/lib/esm/services/promo/index.d.ts +0 -1
  182. package/lib/esm/services/promo/index.js +1 -10
  183. package/lib/esm/services/reactions/index.d.ts +7 -1
  184. package/lib/esm/services/reactions/index.js +21 -10
  185. package/lib/esm/services/score/index.d.ts +0 -1
  186. package/lib/esm/services/score/index.js +1 -10
  187. package/lib/esm/services/sso/index.d.ts +0 -1
  188. package/lib/esm/services/sso/index.js +1 -10
  189. package/lib/esm/services/suggestion/index.d.ts +9 -5
  190. package/lib/esm/services/suggestion/index.js +6 -10
  191. package/lib/esm/services/tag/index.d.ts +0 -1
  192. package/lib/esm/services/tag/index.js +1 -10
  193. package/lib/esm/services/user/index.d.ts +20 -13
  194. package/lib/esm/services/user/index.js +31 -30
  195. package/lib/esm/services/webhook/index.d.ts +0 -1
  196. package/lib/esm/services/webhook/index.js +1 -10
  197. package/lib/esm/types/account.d.ts +0 -1
  198. package/lib/esm/types/account.js +0 -1
  199. package/lib/esm/types/baseParams.d.ts +0 -1
  200. package/lib/esm/types/baseParams.js +0 -1
  201. package/lib/esm/types/category.d.ts +0 -1
  202. package/lib/esm/types/category.js +0 -1
  203. package/lib/esm/types/comment.d.ts +0 -1
  204. package/lib/esm/types/comment.js +0 -1
  205. package/lib/esm/types/customAdv.d.ts +0 -1
  206. package/lib/esm/types/customAdv.js +0 -1
  207. package/lib/esm/types/customPage.d.ts +0 -1
  208. package/lib/esm/types/customPage.js +0 -1
  209. package/lib/esm/types/embed.d.ts +0 -1
  210. package/lib/esm/types/embed.js +0 -1
  211. package/lib/esm/types/feature.d.ts +0 -1
  212. package/lib/esm/types/feature.js +0 -1
  213. package/lib/esm/types/feed.d.ts +0 -1
  214. package/lib/esm/types/feed.js +0 -1
  215. package/lib/esm/types/feedObject.d.ts +0 -1
  216. package/lib/esm/types/feedObject.js +0 -1
  217. package/lib/esm/types/incubator.d.ts +0 -1
  218. package/lib/esm/types/incubator.js +0 -1
  219. package/lib/esm/types/index.d.ts +2 -3
  220. package/lib/esm/types/index.js +0 -1
  221. package/lib/esm/types/insight.d.ts +0 -1
  222. package/lib/esm/types/insight.js +0 -1
  223. package/lib/esm/types/legalPage.d.ts +0 -1
  224. package/lib/esm/types/legalPage.js +0 -1
  225. package/lib/esm/types/media.d.ts +0 -1
  226. package/lib/esm/types/media.js +0 -1
  227. package/lib/esm/types/moderation.d.ts +0 -1
  228. package/lib/esm/types/moderation.js +0 -1
  229. package/lib/esm/types/notification.d.ts +0 -1
  230. package/lib/esm/types/notification.js +0 -1
  231. package/lib/esm/types/paginatedResponse.d.ts +0 -1
  232. package/lib/esm/types/paginatedResponse.js +0 -1
  233. package/lib/esm/types/privateMessage.d.ts +0 -1
  234. package/lib/esm/types/privateMessage.js +0 -1
  235. package/lib/esm/types/prize.d.ts +14 -1
  236. package/lib/esm/types/prize.js +0 -1
  237. package/lib/esm/types/reaction.d.ts +0 -1
  238. package/lib/esm/types/reaction.js +0 -1
  239. package/lib/esm/types/score.d.ts +0 -1
  240. package/lib/esm/types/score.js +0 -1
  241. package/lib/esm/types/sso.d.ts +0 -1
  242. package/lib/esm/types/sso.js +0 -1
  243. package/lib/esm/types/tag.d.ts +0 -1
  244. package/lib/esm/types/tag.js +0 -1
  245. package/lib/esm/types/user.d.ts +0 -1
  246. package/lib/esm/types/user.js +0 -1
  247. package/lib/esm/types/webhook.d.ts +0 -1
  248. package/lib/esm/types/webhook.js +0 -1
  249. package/lib/esm/utils/apiRequest.d.ts +0 -1
  250. package/lib/esm/utils/apiRequest.js +8 -3
  251. package/lib/esm/utils/http.d.ts +2 -2
  252. package/lib/esm/utils/http.js +29 -2
  253. package/lib/esm/utils/token.d.ts +0 -1
  254. package/lib/esm/utils/token.js +1 -10
  255. package/lib/esm/utils/url.d.ts +0 -1
  256. package/lib/esm/utils/url.js +0 -1
  257. package/lib/umd/956.js +2 -0
  258. package/lib/umd/956.js.LICENSE.txt +1 -0
  259. package/lib/umd/api-services.js +1 -2
  260. package/lib/umd/api-services.js.LICENSE.txt +1 -1
  261. package/package.json +20 -19
  262. package/lib/cjs/client/index.d.ts.map +0 -1
  263. package/lib/cjs/client/index.js.map +0 -1
  264. package/lib/cjs/constants/Endpoints.d.ts.map +0 -1
  265. package/lib/cjs/constants/Endpoints.js.map +0 -1
  266. package/lib/cjs/index.d.ts.map +0 -1
  267. package/lib/cjs/index.js.map +0 -1
  268. package/lib/cjs/services/account/index.d.ts.map +0 -1
  269. package/lib/cjs/services/account/index.js.map +0 -1
  270. package/lib/cjs/services/category/index.d.ts.map +0 -1
  271. package/lib/cjs/services/category/index.js.map +0 -1
  272. package/lib/cjs/services/comment/index.d.ts.map +0 -1
  273. package/lib/cjs/services/comment/index.js.map +0 -1
  274. package/lib/cjs/services/custom_adv/index.d.ts.map +0 -1
  275. package/lib/cjs/services/custom_adv/index.js.map +0 -1
  276. package/lib/cjs/services/custom_menu/index.d.ts.map +0 -1
  277. package/lib/cjs/services/custom_menu/index.js.map +0 -1
  278. package/lib/cjs/services/custom_page/index.d.ts.map +0 -1
  279. package/lib/cjs/services/custom_page/index.js.map +0 -1
  280. package/lib/cjs/services/data_portability/index.d.ts.map +0 -1
  281. package/lib/cjs/services/data_portability/index.js.map +0 -1
  282. package/lib/cjs/services/embed/index.d.ts.map +0 -1
  283. package/lib/cjs/services/embed/index.js.map +0 -1
  284. package/lib/cjs/services/feature/index.d.ts.map +0 -1
  285. package/lib/cjs/services/feature/index.js.map +0 -1
  286. package/lib/cjs/services/feed/index.d.ts.map +0 -1
  287. package/lib/cjs/services/feed/index.js.map +0 -1
  288. package/lib/cjs/services/feed_object/index.d.ts.map +0 -1
  289. package/lib/cjs/services/feed_object/index.js.map +0 -1
  290. package/lib/cjs/services/incubator/index.d.ts.map +0 -1
  291. package/lib/cjs/services/incubator/index.js.map +0 -1
  292. package/lib/cjs/services/insight/index.d.ts.map +0 -1
  293. package/lib/cjs/services/insight/index.js.map +0 -1
  294. package/lib/cjs/services/invite/index.d.ts.map +0 -1
  295. package/lib/cjs/services/invite/index.js.map +0 -1
  296. package/lib/cjs/services/legal_page/index.d.ts.map +0 -1
  297. package/lib/cjs/services/legal_page/index.js.map +0 -1
  298. package/lib/cjs/services/locality/index.d.ts.map +0 -1
  299. package/lib/cjs/services/locality/index.js.map +0 -1
  300. package/lib/cjs/services/loyalty/index.d.ts.map +0 -1
  301. package/lib/cjs/services/loyalty/index.js.map +0 -1
  302. package/lib/cjs/services/media/index.d.ts.map +0 -1
  303. package/lib/cjs/services/media/index.js.map +0 -1
  304. package/lib/cjs/services/moderation/index.d.ts.map +0 -1
  305. package/lib/cjs/services/moderation/index.js.map +0 -1
  306. package/lib/cjs/services/notification/index.d.ts.map +0 -1
  307. package/lib/cjs/services/notification/index.js.map +0 -1
  308. package/lib/cjs/services/preference/index.d.ts.map +0 -1
  309. package/lib/cjs/services/preference/index.js.map +0 -1
  310. package/lib/cjs/services/private_message/index.d.ts.map +0 -1
  311. package/lib/cjs/services/private_message/index.js.map +0 -1
  312. package/lib/cjs/services/promo/index.d.ts.map +0 -1
  313. package/lib/cjs/services/promo/index.js.map +0 -1
  314. package/lib/cjs/services/reactions/index.d.ts.map +0 -1
  315. package/lib/cjs/services/reactions/index.js.map +0 -1
  316. package/lib/cjs/services/score/index.d.ts.map +0 -1
  317. package/lib/cjs/services/score/index.js.map +0 -1
  318. package/lib/cjs/services/sso/index.d.ts.map +0 -1
  319. package/lib/cjs/services/sso/index.js.map +0 -1
  320. package/lib/cjs/services/suggestion/index.d.ts.map +0 -1
  321. package/lib/cjs/services/suggestion/index.js.map +0 -1
  322. package/lib/cjs/services/tag/index.d.ts.map +0 -1
  323. package/lib/cjs/services/tag/index.js.map +0 -1
  324. package/lib/cjs/services/user/index.d.ts.map +0 -1
  325. package/lib/cjs/services/user/index.js.map +0 -1
  326. package/lib/cjs/services/webhook/index.d.ts.map +0 -1
  327. package/lib/cjs/services/webhook/index.js.map +0 -1
  328. package/lib/cjs/types/account.d.ts.map +0 -1
  329. package/lib/cjs/types/account.js.map +0 -1
  330. package/lib/cjs/types/baseParams.d.ts.map +0 -1
  331. package/lib/cjs/types/baseParams.js.map +0 -1
  332. package/lib/cjs/types/category.d.ts.map +0 -1
  333. package/lib/cjs/types/category.js.map +0 -1
  334. package/lib/cjs/types/comment.d.ts.map +0 -1
  335. package/lib/cjs/types/comment.js.map +0 -1
  336. package/lib/cjs/types/customAdv.d.ts.map +0 -1
  337. package/lib/cjs/types/customAdv.js.map +0 -1
  338. package/lib/cjs/types/customPage.d.ts.map +0 -1
  339. package/lib/cjs/types/customPage.js.map +0 -1
  340. package/lib/cjs/types/embed.d.ts.map +0 -1
  341. package/lib/cjs/types/embed.js.map +0 -1
  342. package/lib/cjs/types/feature.d.ts.map +0 -1
  343. package/lib/cjs/types/feature.js.map +0 -1
  344. package/lib/cjs/types/feed.d.ts.map +0 -1
  345. package/lib/cjs/types/feed.js.map +0 -1
  346. package/lib/cjs/types/feedObject.d.ts.map +0 -1
  347. package/lib/cjs/types/feedObject.js.map +0 -1
  348. package/lib/cjs/types/incubator.d.ts.map +0 -1
  349. package/lib/cjs/types/incubator.js.map +0 -1
  350. package/lib/cjs/types/index.d.ts.map +0 -1
  351. package/lib/cjs/types/index.js.map +0 -1
  352. package/lib/cjs/types/insight.d.ts.map +0 -1
  353. package/lib/cjs/types/insight.js.map +0 -1
  354. package/lib/cjs/types/legalPage.d.ts.map +0 -1
  355. package/lib/cjs/types/legalPage.js.map +0 -1
  356. package/lib/cjs/types/media.d.ts.map +0 -1
  357. package/lib/cjs/types/media.js.map +0 -1
  358. package/lib/cjs/types/moderation.d.ts.map +0 -1
  359. package/lib/cjs/types/moderation.js.map +0 -1
  360. package/lib/cjs/types/notification.d.ts.map +0 -1
  361. package/lib/cjs/types/notification.js.map +0 -1
  362. package/lib/cjs/types/paginatedResponse.d.ts.map +0 -1
  363. package/lib/cjs/types/paginatedResponse.js.map +0 -1
  364. package/lib/cjs/types/privateMessage.d.ts.map +0 -1
  365. package/lib/cjs/types/privateMessage.js.map +0 -1
  366. package/lib/cjs/types/prize.d.ts.map +0 -1
  367. package/lib/cjs/types/prize.js.map +0 -1
  368. package/lib/cjs/types/reaction.d.ts.map +0 -1
  369. package/lib/cjs/types/reaction.js.map +0 -1
  370. package/lib/cjs/types/score.d.ts.map +0 -1
  371. package/lib/cjs/types/score.js.map +0 -1
  372. package/lib/cjs/types/sso.d.ts.map +0 -1
  373. package/lib/cjs/types/sso.js.map +0 -1
  374. package/lib/cjs/types/tag.d.ts.map +0 -1
  375. package/lib/cjs/types/tag.js.map +0 -1
  376. package/lib/cjs/types/user.d.ts.map +0 -1
  377. package/lib/cjs/types/user.js.map +0 -1
  378. package/lib/cjs/types/webhook.d.ts.map +0 -1
  379. package/lib/cjs/types/webhook.js.map +0 -1
  380. package/lib/cjs/utils/apiRequest.d.ts.map +0 -1
  381. package/lib/cjs/utils/apiRequest.js.map +0 -1
  382. package/lib/cjs/utils/http.d.ts.map +0 -1
  383. package/lib/cjs/utils/http.js.map +0 -1
  384. package/lib/cjs/utils/token.d.ts.map +0 -1
  385. package/lib/cjs/utils/token.js.map +0 -1
  386. package/lib/cjs/utils/url.d.ts.map +0 -1
  387. package/lib/cjs/utils/url.js.map +0 -1
  388. package/lib/esm/client/index.d.ts.map +0 -1
  389. package/lib/esm/client/index.js.map +0 -1
  390. package/lib/esm/constants/Endpoints.d.ts.map +0 -1
  391. package/lib/esm/constants/Endpoints.js.map +0 -1
  392. package/lib/esm/index.d.ts.map +0 -1
  393. package/lib/esm/index.js.map +0 -1
  394. package/lib/esm/services/account/index.d.ts.map +0 -1
  395. package/lib/esm/services/account/index.js.map +0 -1
  396. package/lib/esm/services/category/index.d.ts.map +0 -1
  397. package/lib/esm/services/category/index.js.map +0 -1
  398. package/lib/esm/services/comment/index.d.ts.map +0 -1
  399. package/lib/esm/services/comment/index.js.map +0 -1
  400. package/lib/esm/services/custom_adv/index.d.ts.map +0 -1
  401. package/lib/esm/services/custom_adv/index.js.map +0 -1
  402. package/lib/esm/services/custom_menu/index.d.ts.map +0 -1
  403. package/lib/esm/services/custom_menu/index.js.map +0 -1
  404. package/lib/esm/services/custom_page/index.d.ts.map +0 -1
  405. package/lib/esm/services/custom_page/index.js.map +0 -1
  406. package/lib/esm/services/data_portability/index.d.ts.map +0 -1
  407. package/lib/esm/services/data_portability/index.js.map +0 -1
  408. package/lib/esm/services/embed/index.d.ts.map +0 -1
  409. package/lib/esm/services/embed/index.js.map +0 -1
  410. package/lib/esm/services/feature/index.d.ts.map +0 -1
  411. package/lib/esm/services/feature/index.js.map +0 -1
  412. package/lib/esm/services/feed/index.d.ts.map +0 -1
  413. package/lib/esm/services/feed/index.js.map +0 -1
  414. package/lib/esm/services/feed_object/index.d.ts.map +0 -1
  415. package/lib/esm/services/feed_object/index.js.map +0 -1
  416. package/lib/esm/services/incubator/index.d.ts.map +0 -1
  417. package/lib/esm/services/incubator/index.js.map +0 -1
  418. package/lib/esm/services/insight/index.d.ts.map +0 -1
  419. package/lib/esm/services/insight/index.js.map +0 -1
  420. package/lib/esm/services/invite/index.d.ts.map +0 -1
  421. package/lib/esm/services/invite/index.js.map +0 -1
  422. package/lib/esm/services/legal_page/index.d.ts.map +0 -1
  423. package/lib/esm/services/legal_page/index.js.map +0 -1
  424. package/lib/esm/services/locality/index.d.ts.map +0 -1
  425. package/lib/esm/services/locality/index.js.map +0 -1
  426. package/lib/esm/services/loyalty/index.d.ts.map +0 -1
  427. package/lib/esm/services/loyalty/index.js.map +0 -1
  428. package/lib/esm/services/media/index.d.ts.map +0 -1
  429. package/lib/esm/services/media/index.js.map +0 -1
  430. package/lib/esm/services/moderation/index.d.ts.map +0 -1
  431. package/lib/esm/services/moderation/index.js.map +0 -1
  432. package/lib/esm/services/notification/index.d.ts.map +0 -1
  433. package/lib/esm/services/notification/index.js.map +0 -1
  434. package/lib/esm/services/preference/index.d.ts.map +0 -1
  435. package/lib/esm/services/preference/index.js.map +0 -1
  436. package/lib/esm/services/private_message/index.d.ts.map +0 -1
  437. package/lib/esm/services/private_message/index.js.map +0 -1
  438. package/lib/esm/services/promo/index.d.ts.map +0 -1
  439. package/lib/esm/services/promo/index.js.map +0 -1
  440. package/lib/esm/services/reactions/index.d.ts.map +0 -1
  441. package/lib/esm/services/reactions/index.js.map +0 -1
  442. package/lib/esm/services/score/index.d.ts.map +0 -1
  443. package/lib/esm/services/score/index.js.map +0 -1
  444. package/lib/esm/services/sso/index.d.ts.map +0 -1
  445. package/lib/esm/services/sso/index.js.map +0 -1
  446. package/lib/esm/services/suggestion/index.d.ts.map +0 -1
  447. package/lib/esm/services/suggestion/index.js.map +0 -1
  448. package/lib/esm/services/tag/index.d.ts.map +0 -1
  449. package/lib/esm/services/tag/index.js.map +0 -1
  450. package/lib/esm/services/user/index.d.ts.map +0 -1
  451. package/lib/esm/services/user/index.js.map +0 -1
  452. package/lib/esm/services/webhook/index.d.ts.map +0 -1
  453. package/lib/esm/services/webhook/index.js.map +0 -1
  454. package/lib/esm/types/account.d.ts.map +0 -1
  455. package/lib/esm/types/account.js.map +0 -1
  456. package/lib/esm/types/baseParams.d.ts.map +0 -1
  457. package/lib/esm/types/baseParams.js.map +0 -1
  458. package/lib/esm/types/category.d.ts.map +0 -1
  459. package/lib/esm/types/category.js.map +0 -1
  460. package/lib/esm/types/comment.d.ts.map +0 -1
  461. package/lib/esm/types/comment.js.map +0 -1
  462. package/lib/esm/types/customAdv.d.ts.map +0 -1
  463. package/lib/esm/types/customAdv.js.map +0 -1
  464. package/lib/esm/types/customPage.d.ts.map +0 -1
  465. package/lib/esm/types/customPage.js.map +0 -1
  466. package/lib/esm/types/embed.d.ts.map +0 -1
  467. package/lib/esm/types/embed.js.map +0 -1
  468. package/lib/esm/types/feature.d.ts.map +0 -1
  469. package/lib/esm/types/feature.js.map +0 -1
  470. package/lib/esm/types/feed.d.ts.map +0 -1
  471. package/lib/esm/types/feed.js.map +0 -1
  472. package/lib/esm/types/feedObject.d.ts.map +0 -1
  473. package/lib/esm/types/feedObject.js.map +0 -1
  474. package/lib/esm/types/incubator.d.ts.map +0 -1
  475. package/lib/esm/types/incubator.js.map +0 -1
  476. package/lib/esm/types/index.d.ts.map +0 -1
  477. package/lib/esm/types/index.js.map +0 -1
  478. package/lib/esm/types/insight.d.ts.map +0 -1
  479. package/lib/esm/types/insight.js.map +0 -1
  480. package/lib/esm/types/legalPage.d.ts.map +0 -1
  481. package/lib/esm/types/legalPage.js.map +0 -1
  482. package/lib/esm/types/media.d.ts.map +0 -1
  483. package/lib/esm/types/media.js.map +0 -1
  484. package/lib/esm/types/moderation.d.ts.map +0 -1
  485. package/lib/esm/types/moderation.js.map +0 -1
  486. package/lib/esm/types/notification.d.ts.map +0 -1
  487. package/lib/esm/types/notification.js.map +0 -1
  488. package/lib/esm/types/paginatedResponse.d.ts.map +0 -1
  489. package/lib/esm/types/paginatedResponse.js.map +0 -1
  490. package/lib/esm/types/privateMessage.d.ts.map +0 -1
  491. package/lib/esm/types/privateMessage.js.map +0 -1
  492. package/lib/esm/types/prize.d.ts.map +0 -1
  493. package/lib/esm/types/prize.js.map +0 -1
  494. package/lib/esm/types/reaction.d.ts.map +0 -1
  495. package/lib/esm/types/reaction.js.map +0 -1
  496. package/lib/esm/types/score.d.ts.map +0 -1
  497. package/lib/esm/types/score.js.map +0 -1
  498. package/lib/esm/types/sso.d.ts.map +0 -1
  499. package/lib/esm/types/sso.js.map +0 -1
  500. package/lib/esm/types/tag.d.ts.map +0 -1
  501. package/lib/esm/types/tag.js.map +0 -1
  502. package/lib/esm/types/user.d.ts.map +0 -1
  503. package/lib/esm/types/user.js.map +0 -1
  504. package/lib/esm/types/webhook.d.ts.map +0 -1
  505. package/lib/esm/types/webhook.js.map +0 -1
  506. package/lib/esm/utils/apiRequest.d.ts.map +0 -1
  507. package/lib/esm/utils/apiRequest.js.map +0 -1
  508. package/lib/esm/utils/http.d.ts.map +0 -1
  509. package/lib/esm/utils/http.js.map +0 -1
  510. package/lib/esm/utils/token.d.ts.map +0 -1
  511. package/lib/esm/utils/token.js.map +0 -1
  512. package/lib/esm/utils/url.d.ts.map +0 -1
  513. package/lib/esm/utils/url.js.map +0 -1
  514. package/lib/umd/api-services.js.map +0 -1
@@ -4,7 +4,7 @@ import { WebhookParamType, WebhookEventsType } from './webhook';
4
4
  import { SSOSignUpParams } from './sso';
5
5
  import { CommentListParams, CommentCreateParams } from './comment';
6
6
  import { IncubatorCreateParams, IncubatorSearchParams } from './incubator';
7
- import { LoyaltyPrizeParams } from './prize';
7
+ import { LoyaltyPrizeParams, LoyaltyGetPrizeParams } from './prize';
8
8
  import { ModerationParams, ModerateContributionParams, FlaggedContributionParams } from './moderation';
9
9
  import { CustomNotificationParams } from './notification';
10
10
  import { UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams } from './user';
@@ -23,5 +23,4 @@ import { FeatureParams } from './feature';
23
23
  import { ScoreParams } from './score';
24
24
  import { InsightCommonParams, InsightEmbedParams, InsightUserParams, InsightContributionParams } from './insight';
25
25
  import { ReactionParams } from './reaction';
26
- export { AccountCreateParams, AccountVerifyParams, AccountRecoverParams, AccountResetParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadCompleteParams, ChunkUploadParams, ThreadParams, ThreadDeleteParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams };
27
- //# sourceMappingURL=index.d.ts.map
26
+ export { AccountCreateParams, AccountVerifyParams, AccountRecoverParams, AccountResetParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadCompleteParams, ChunkUploadParams, ThreadParams, ThreadDeleteParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams };
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MediaTypes = void 0;
4
4
  const media_1 = require("./media");
5
5
  Object.defineProperty(exports, "MediaTypes", { enumerable: true, get: function () { return media_1.MediaTypes; } });
6
- //# sourceMappingURL=index.js.map
@@ -64,4 +64,3 @@ export interface InsightUserParams extends InsightCommonParams {
64
64
  */
65
65
  user_tag_id?: number;
66
66
  }
67
- //# sourceMappingURL=insight.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=insight.js.map
@@ -16,4 +16,3 @@ export interface LegalPageFilterParams extends BaseSearchParams {
16
16
  */
17
17
  ordering: string;
18
18
  }
19
- //# sourceMappingURL=legalPage.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=legalPage.js.map
@@ -64,4 +64,3 @@ export interface ChunkUploadCompleteParams {
64
64
  */
65
65
  md5: string;
66
66
  }
67
- //# sourceMappingURL=media.d.ts.map
@@ -7,4 +7,3 @@ var MediaTypes;
7
7
  MediaTypes["SHARE"] = "share";
8
8
  MediaTypes["EMBED"] = "embed";
9
9
  })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
10
- //# sourceMappingURL=media.js.map
@@ -71,4 +71,3 @@ export interface FlaggedContributionParams extends BaseGetParams {
71
71
  */
72
72
  order_by?: string;
73
73
  }
74
- //# sourceMappingURL=moderation.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=moderation.js.map
@@ -28,4 +28,3 @@ export interface CustomNotificationParams {
28
28
  */
29
29
  user: number;
30
30
  }
31
- //# sourceMappingURL=notification.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=notification.js.map
@@ -7,4 +7,3 @@ export interface SCPaginatedResponse<T = []> {
7
7
  previous: string;
8
8
  results: T[];
9
9
  }
10
- //# sourceMappingURL=paginatedResponse.d.ts.map
@@ -3,4 +3,3 @@
3
3
  * SCPaginatedResponse Interface
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=paginatedResponse.js.map
@@ -186,4 +186,3 @@ export interface MessageChunkUploadDoneParams {
186
186
  */
187
187
  totalfilesize?: number;
188
188
  }
189
- //# sourceMappingURL=privateMessage.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=privateMessage.js.map
@@ -1,4 +1,18 @@
1
1
  import { SCUserType } from '@selfcommunity/types';
2
+ import { BaseSearchParams } from './baseParams';
3
+ /**
4
+ * LoyaltyGetPrizeParams interface
5
+ */
6
+ export interface LoyaltyGetPrizeParams extends BaseSearchParams {
7
+ /**
8
+ * Filter by active only for editor or admin users
9
+ */
10
+ active?: string;
11
+ /**
12
+ * Which field to use when ordering the results
13
+ */
14
+ ordering?: string;
15
+ }
2
16
  /**
3
17
  * LoyaltyPrizeParams interface
4
18
  */
@@ -44,4 +58,3 @@ export interface LoyaltyPrizeParams {
44
58
  */
45
59
  created_by?: SCUserType;
46
60
  }
47
- //# sourceMappingURL=prize.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=prize.js.map
@@ -12,4 +12,3 @@ export interface ReactionParams extends BaseSearchParams {
12
12
  */
13
13
  ordering?: string;
14
14
  }
15
- //# sourceMappingURL=reaction.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=reaction.js.map
@@ -16,4 +16,3 @@ export interface ScoreParams extends BaseGetParams {
16
16
  */
17
17
  ordering?: string;
18
18
  }
19
- //# sourceMappingURL=score.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=score.js.map
@@ -9,4 +9,3 @@ export interface SSOSignUpParams {
9
9
  role?: string | null;
10
10
  tags?: number[] | null;
11
11
  }
12
- //# sourceMappingURL=sso.d.ts.map
@@ -3,4 +3,3 @@
3
3
  * SSOSignUpParams
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=sso.js.map
@@ -58,4 +58,3 @@ export interface TagGetParams extends BaseSearchParams {
58
58
  */
59
59
  visibility_boost?: boolean;
60
60
  }
61
- //# sourceMappingURL=tag.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=tag.js.map
@@ -119,4 +119,3 @@ export interface DeleteProviderAssociation {
119
119
  */
120
120
  ext_id: number;
121
121
  }
122
- //# sourceMappingURL=user.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=user.js.map
@@ -29,4 +29,3 @@ export interface WebhookParamType {
29
29
  export interface WebhookEventsType {
30
30
  type: string;
31
31
  }
32
- //# sourceMappingURL=webhook.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=webhook.js.map
@@ -1,3 +1,2 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  export declare function apiRequest(config: AxiosRequestConfig): Promise<any>;
3
- //# sourceMappingURL=apiRequest.d.ts.map
@@ -1,24 +1,27 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.apiRequest = void 0;
7
- const client_1 = __importDefault(require("../client"));
4
+ const tslib_1 = require("tslib");
5
+ const client_1 = tslib_1.__importDefault(require("../client"));
6
+ const Errors_1 = require("../constants/Errors");
7
+ const utils_1 = require("@selfcommunity/utils");
8
8
  function apiRequest(config) {
9
9
  return client_1.default
10
10
  .request(config)
11
11
  .then((res) => {
12
+ if (!res) {
13
+ utils_1.Logger.info(Errors_1.SCOPE_API_SERVICES, `Request ${config.method} ${config.url} aborted.`);
14
+ return Promise.reject(`Request ${config.method} ${config.url} aborted.`);
15
+ }
12
16
  if (res.status >= 300) {
13
- console.log(`Unable to ${config.method} ${config.url} (Response code: ${res.status}).`);
17
+ utils_1.Logger.info(Errors_1.SCOPE_API_SERVICES, `Unable to ${config.method} ${config.url} (Response code: ${res.status}).`);
14
18
  return Promise.reject(res);
15
19
  }
16
20
  return Promise.resolve(res.data);
17
21
  })
18
22
  .catch((error) => {
19
- console.log(`Unable to ${config.method} ${config.url} ${error}`);
23
+ utils_1.Logger.warn(Errors_1.SCOPE_API_SERVICES, `Unable to ${config.method} ${config.url} ${error}`);
20
24
  return Promise.reject(error);
21
25
  });
22
26
  }
23
27
  exports.apiRequest = apiRequest;
24
- //# sourceMappingURL=apiRequest.js.map
@@ -1,8 +1,8 @@
1
- import { CancelTokenSource } from "axios";
1
+ import { CancelTokenSource } from 'axios';
2
2
  export declare function defaultError(error: {
3
3
  request?: any;
4
4
  message?: any;
5
5
  }): void;
6
6
  export declare function formatHttpError(error: any): any;
7
+ export declare function formatHttpErrorCode(error: any): any;
7
8
  export declare function getCancelTokenSourceRequest(): CancelTokenSource;
8
- //# sourceMappingURL=http.d.ts.map
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getCancelTokenSourceRequest = exports.formatHttpError = exports.defaultError = void 0;
3
+ exports.getCancelTokenSourceRequest = exports.formatHttpErrorCode = exports.formatHttpError = exports.defaultError = void 0;
4
+ const tslib_1 = require("tslib");
7
5
  const utils_1 = require("@selfcommunity/utils");
8
- const axios_1 = __importDefault(require("axios"));
6
+ const axios_1 = tslib_1.__importDefault(require("axios"));
9
7
  function defaultError(error) {
10
8
  if (error.request) {
11
9
  // The request was made but no response was received
@@ -48,8 +46,36 @@ function formatHttpError(error) {
48
46
  return errors;
49
47
  }
50
48
  exports.formatHttpError = formatHttpError;
49
+ const formatErrorCode = (error) => {
50
+ const errors = {};
51
+ if (Array.isArray(error)) {
52
+ for (let i = 0; i < error.length; i++) {
53
+ const err = error[i];
54
+ if (err.field) {
55
+ errors[`${(0, utils_1.camelCase)(err.field)}Error`] = Array.isArray(err.messages) ? formatErrorCode(err.messages) : err.messages;
56
+ }
57
+ else {
58
+ errors.error = err.code;
59
+ }
60
+ }
61
+ }
62
+ else {
63
+ errors.error = error.errors;
64
+ }
65
+ return errors;
66
+ };
67
+ function formatHttpErrorCode(error) {
68
+ let errors = {};
69
+ if (error.response && error.response.data && typeof error.response.data === 'object' && error.response.data.errors) {
70
+ errors = Object.assign({}, formatErrorCode(error.response.data.errors));
71
+ }
72
+ else {
73
+ defaultError(error);
74
+ }
75
+ return errors;
76
+ }
77
+ exports.formatHttpErrorCode = formatHttpErrorCode;
51
78
  function getCancelTokenSourceRequest() {
52
79
  return axios_1.default.CancelToken.source();
53
80
  }
54
81
  exports.getCancelTokenSourceRequest = getCancelTokenSourceRequest;
55
- //# sourceMappingURL=http.js.map
@@ -18,4 +18,3 @@ export declare function generateJWTToken(userId: any, secretKey: any, expiration
18
18
  * @param token
19
19
  */
20
20
  export declare function parseJwt(token: any): any;
21
- //# sourceMappingURL=token.d.ts.map
@@ -1,39 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
2
  Object.defineProperty(exports, "__esModule", { value: true });
35
3
  exports.parseJwt = exports.generateJWTToken = void 0;
36
- const jose = __importStar(require("jose"));
4
+ const tslib_1 = require("tslib");
5
+ const jose = tslib_1.__importStar(require("jose"));
37
6
  /**
38
7
  * Generate a JWT
39
8
  :::tipContext can be consumed as following:
@@ -49,7 +18,7 @@ const jose = __importStar(require("jose"));
49
18
  * @param expirationTime
50
19
  */
51
20
  function generateJWTToken(userId, secretKey, expirationTime = '2h') {
52
- return __awaiter(this, void 0, void 0, function* () {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
22
  let data = {
54
23
  token_type: 'access',
55
24
  user_id: userId,
@@ -80,4 +49,3 @@ function parseJwt(token) {
80
49
  return JSON.parse(jsonPayload);
81
50
  }
82
51
  exports.parseJwt = parseJwt;
83
- //# sourceMappingURL=token.js.map
@@ -1,2 +1 @@
1
1
  export declare const urlParams: (init: Record<string, any>) => URLSearchParams;
2
- //# sourceMappingURL=url.d.ts.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.urlParams = void 0;
4
4
  const urlParams = (init) => new URLSearchParams(init);
5
5
  exports.urlParams = urlParams;
6
- //# sourceMappingURL=url.js.map
@@ -1,4 +1,4 @@
1
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
1
+ import { AxiosInstance, AxiosResponse } from 'axios';
2
2
  /**
3
3
  * List of all Http methods
4
4
  */
@@ -12,14 +12,7 @@ export declare type AxiosResponseHeaders = Record<string, string> & {
12
12
  /**
13
13
  * General HttpResponse
14
14
  */
15
- export interface HttpResponse<T = unknown, D = any> {
16
- data: T;
17
- status: number;
18
- statusText: string;
19
- headers: AxiosResponseHeaders;
20
- config: AxiosRequestConfig<D>;
21
- request?: any;
22
- }
15
+ export declare type HttpResponse<T = unknown, D = any> = AxiosResponse<T, D>;
23
16
  /**
24
17
  * Interface for the ApiClient
25
18
  */
@@ -122,4 +115,3 @@ export declare class ApiClient implements ApiClientInterface {
122
115
  }
123
116
  declare const client: ApiClient;
124
117
  export default client;
125
- //# sourceMappingURL=index.d.ts.map
@@ -45,7 +45,7 @@ export class ApiClient {
45
45
  }
46
46
  };
47
47
  this.client = this.createClient(config);
48
- this.setDefaultHeader({ name: 'Content-Type', value: 'application/x-www-form-urlencoded', methods: ['post'] });
48
+ this.setDefaultHeader({ name: 'Content-Type', value: 'application/json', methods: ['post'] });
49
49
  }
50
50
  createClient(config) {
51
51
  return axios.create(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), { responseType: 'json', headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
@@ -137,4 +137,3 @@ export class ApiClient {
137
137
  ApiClient.DEFAULT_TIMEOUT = 10 * 1000;
138
138
  const client = new ApiClient();
139
139
  export default client;
140
- //# sourceMappingURL=index.js.map
@@ -1,10 +1,9 @@
1
1
  import { HttpMethod } from '../client';
2
2
  export interface EndpointType {
3
- url: (params?: object) => string;
3
+ url: (params?: any) => string;
4
4
  method: HttpMethod;
5
5
  }
6
6
  declare const Endpoints: {
7
7
  [key: string]: EndpointType;
8
8
  };
9
9
  export default Endpoints;
10
- //# sourceMappingURL=Endpoints.d.ts.map
@@ -11,6 +11,10 @@ const Endpoints = {
11
11
  url: urlReplacer('/api/v2/account/verify/'),
12
12
  method: 'POST'
13
13
  },
14
+ AccountVerifyValidationCode: {
15
+ url: urlReplacer('/api/v2/account/verify/validation_code/'),
16
+ method: 'POST'
17
+ },
14
18
  AccountRecover: {
15
19
  url: urlReplacer('/api/v2/account/recover/'),
16
20
  method: 'POST'
@@ -311,6 +315,10 @@ const Endpoints = {
311
315
  url: urlReplacer('/api/v2/user/hidden_users/'),
312
316
  method: 'GET'
313
317
  },
318
+ ListHiddenUsersId: {
319
+ url: urlReplacer('/api/v2/user/hidden_users_id/'),
320
+ method: 'GET'
321
+ },
314
322
  UserAutocomplete: {
315
323
  url: urlReplacer('/api/v2/user/autocomplete/'),
316
324
  method: 'GET'
@@ -407,12 +415,16 @@ const Endpoints = {
407
415
  url: urlReplacer('/api/v2/user/$(id)/is_connection/'),
408
416
  method: 'GET'
409
417
  },
418
+ UserCheckConnectionStatus: {
419
+ url: urlReplacer('/api/v2/user/$(id)/connection_status/'),
420
+ method: 'GET'
421
+ },
410
422
  UserConnectionRequests: {
411
- url: urlReplacer('/api/v2/user/$(id)/connection/requests/'),
423
+ url: urlReplacer('/api/v2/user/connection/requests/'),
412
424
  method: 'GET'
413
425
  },
414
426
  UserRequestConnectionsSent: {
415
- url: urlReplacer('/api/v2/user/$(id)/connection/requests_sent/'),
427
+ url: urlReplacer('/api/v2/user/connection/requests_sent/'),
416
428
  method: 'GET'
417
429
  },
418
430
  UserAcceptRequestConnection: {
@@ -1079,7 +1091,7 @@ const Endpoints = {
1079
1091
  method: 'GET'
1080
1092
  },
1081
1093
  DataPortabilityDownload: {
1082
- url: urlReplacer('/api/v2/udp/download'),
1094
+ url: urlReplacer('/api/v2/udp/download/'),
1083
1095
  method: 'GET'
1084
1096
  },
1085
1097
  /**
@@ -1110,4 +1122,3 @@ const Endpoints = {
1110
1122
  }
1111
1123
  };
1112
1124
  export default Endpoints;
1113
- //# sourceMappingURL=Endpoints.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Scope prefix used to emit errors
3
+ */
4
+ export declare const SCOPE_API_SERVICES = "@selfcommunity/api-services";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Scope prefix used to emit errors
3
+ */
4
+ export const SCOPE_API_SERVICES = '@selfcommunity/api-services';
@@ -9,7 +9,7 @@ import Endpoints, { EndpointType } from './constants/Endpoints';
9
9
  /**
10
10
  * Utils
11
11
  */
12
- import { formatHttpError, getCancelTokenSourceRequest } from './utils/http';
12
+ import { formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest } from './utils/http';
13
13
  import { generateJWTToken, parseJwt } from './utils/token';
14
14
  import { apiRequest } from './utils/apiRequest';
15
15
  import { urlParams } from './utils/url';
@@ -49,9 +49,8 @@ import ReactionService, { ReactionApiClient, ReactionApiClientInterface } from '
49
49
  /**
50
50
  * Types
51
51
  */
52
- import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams } from './types';
52
+ import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams } from './types';
53
53
  /**
54
54
  * Export all
55
55
  */
56
- export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface };
57
- //# sourceMappingURL=index.d.ts.map
56
+ export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface };
package/lib/esm/index.js CHANGED
@@ -9,7 +9,7 @@ import Endpoints from './constants/Endpoints';
9
9
  /**
10
10
  * Utils
11
11
  */
12
- import { formatHttpError, getCancelTokenSourceRequest } from './utils/http';
12
+ import { formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest } from './utils/http';
13
13
  import { generateJWTToken, parseJwt } from './utils/token';
14
14
  import { apiRequest } from './utils/apiRequest';
15
15
  import { urlParams } from './utils/url';
@@ -53,5 +53,4 @@ import { MediaTypes } from './types';
53
53
  /**
54
54
  * Export all
55
55
  */
56
- export { http, apiRequest, formatHttpError, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, AccountService, AccountApiClient, PreferenceService, PreferenceApiClient, UserService, UserApiClient, FeatureService, FeatureApiClient, CategoryService, CategoryApiClient, CommentService, CommentApiClient, CustomAdvService, CustomAdvApiClient, CustomMenuService, CustomMenuApiClient, CustomPageService, CustomPageApiClient, DataPortabilityService, DataPortabilityApiClient, EmbedService, EmbedApiClient, FeedService, FeedApiClient, FeedObjectService, FeedObjectApiClient, IncubatorService, IncubatorApiClient, InsightService, InsightApiClient, InviteService, InviteApiClient, LegalPageService, LegalPageApiClient, LocalityService, LocalityApiClient, LoyaltyService, LoyaltyApiClient, MediaService, MediaApiClient, ModerationService, ModerationApiClient, NotificationService, NotificationApiClient, PrivateMessageService, PrivateMessageApiClient, PromoService, PromoApiClient, ScoreService, ScoreApiClient, SSOService, SSOApiClient, SuggestionService, SuggestionApiClient, TagService, TagApiClient, WebhookService, WebhookApiClient, MediaTypes, ReactionService, ReactionApiClient };
57
- //# sourceMappingURL=index.js.map
56
+ export { http, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, AccountService, AccountApiClient, PreferenceService, PreferenceApiClient, UserService, UserApiClient, FeatureService, FeatureApiClient, CategoryService, CategoryApiClient, CommentService, CommentApiClient, CustomAdvService, CustomAdvApiClient, CustomMenuService, CustomMenuApiClient, CustomPageService, CustomPageApiClient, DataPortabilityService, DataPortabilityApiClient, EmbedService, EmbedApiClient, FeedService, FeedApiClient, FeedObjectService, FeedObjectApiClient, IncubatorService, IncubatorApiClient, InsightService, InsightApiClient, InviteService, InviteApiClient, LegalPageService, LegalPageApiClient, LocalityService, LocalityApiClient, LoyaltyService, LoyaltyApiClient, MediaService, MediaApiClient, ModerationService, ModerationApiClient, NotificationService, NotificationApiClient, PrivateMessageService, PrivateMessageApiClient, PromoService, PromoApiClient, ScoreService, ScoreApiClient, SSOService, SSOApiClient, SuggestionService, SuggestionApiClient, TagService, TagApiClient, WebhookService, WebhookApiClient, MediaTypes, ReactionService, ReactionApiClient };
@@ -27,6 +27,12 @@ export declare class AccountApiClient {
27
27
  * @param config
28
28
  */
29
29
  static verify(data?: AccountVerifyParams, config?: AxiosRequestConfig): Promise<any>;
30
+ /**
31
+ * This endpoint verify if a validation code is valid.
32
+ * @param data
33
+ * @param config
34
+ */
35
+ static verifyValidationCode(data?: AccountVerifyParams, config?: AxiosRequestConfig): Promise<any>;
30
36
  /**
31
37
  * This endpoint recover an account.
32
38
  * @param data
@@ -86,8 +92,8 @@ export declare class AccountApiClient {
86
92
  export default class AccountService {
87
93
  static create(data?: AccountCreateParams, config?: AxiosRequestConfig): Promise<SCUserType>;
88
94
  static verify(data?: AccountVerifyParams, config?: AxiosRequestConfig): Promise<any>;
95
+ static verifyValidationCode(params?: AccountVerifyParams, config?: AxiosRequestConfig): Promise<SCUserType>;
89
96
  static recover(data?: AccountRecoverParams, config?: AxiosRequestConfig): Promise<any>;
90
97
  static reset(data?: AccountResetParams, config?: AxiosRequestConfig): Promise<any>;
91
98
  static search(params?: AccountSearchParams, config?: AxiosRequestConfig): Promise<SCUserType>;
92
99
  }
93
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,4 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
1
+ import { __awaiter } from "tslib";
10
2
  import Endpoints from '../../constants/Endpoints';
11
3
  import { apiRequest } from '../../utils/apiRequest';
12
4
  /**
@@ -32,6 +24,14 @@ export class AccountApiClient {
32
24
  static verify(data, config) {
33
25
  return apiRequest(Object.assign(Object.assign({}, config), { data, url: Endpoints.AccountVerify.url({}), method: Endpoints.AccountVerify.method }));
34
26
  }
27
+ /**
28
+ * This endpoint verify if a validation code is valid.
29
+ * @param data
30
+ * @param config
31
+ */
32
+ static verifyValidationCode(data, config) {
33
+ return apiRequest(Object.assign(Object.assign({}, config), { data, url: Endpoints.AccountVerifyValidationCode.url({}), method: Endpoints.AccountVerifyValidationCode.method }));
34
+ }
35
35
  /**
36
36
  * This endpoint recover an account.
37
37
  * @param data
@@ -105,6 +105,11 @@ export default class AccountService {
105
105
  return AccountApiClient.verify(data, config);
106
106
  });
107
107
  }
108
+ static verifyValidationCode(params, config) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ return AccountApiClient.verifyValidationCode(params, config);
111
+ });
112
+ }
108
113
  static recover(data, config) {
109
114
  return __awaiter(this, void 0, void 0, function* () {
110
115
  return AccountApiClient.recover(data, config);
@@ -121,4 +126,3 @@ export default class AccountService {
121
126
  });
122
127
  }
123
128
  }
124
- //# sourceMappingURL=index.js.map