@aurora-interactive/sensei-productivity 1.5.0 → 1.7.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 (343) hide show
  1. package/README.md +4 -0
  2. package/dist/commonjs/funcs/categories-create.d.ts +1 -1
  3. package/dist/commonjs/funcs/categories-create.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/categories-create.js +2 -3
  5. package/dist/commonjs/funcs/categories-create.js.map +1 -1
  6. package/dist/commonjs/funcs/categories-delete.js +2 -2
  7. package/dist/commonjs/funcs/categories-delete.js.map +1 -1
  8. package/dist/commonjs/funcs/categories-get-all.d.ts +1 -1
  9. package/dist/commonjs/funcs/categories-get-all.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/categories-get-all.js +2 -3
  11. package/dist/commonjs/funcs/categories-get-all.js.map +1 -1
  12. package/dist/commonjs/funcs/categories-update.d.ts +1 -1
  13. package/dist/commonjs/funcs/categories-update.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/categories-update.js +2 -3
  15. package/dist/commonjs/funcs/categories-update.js.map +1 -1
  16. package/dist/commonjs/funcs/schools-get-all.js +2 -2
  17. package/dist/commonjs/funcs/schools-get-all.js.map +1 -1
  18. package/dist/commonjs/funcs/schools-get.d.ts +1 -1
  19. package/dist/commonjs/funcs/schools-get.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/schools-get.js +2 -3
  21. package/dist/commonjs/funcs/schools-get.js.map +1 -1
  22. package/dist/commonjs/funcs/users-activities-create.d.ts +1 -1
  23. package/dist/commonjs/funcs/users-activities-create.d.ts.map +1 -1
  24. package/dist/commonjs/funcs/users-activities-create.js +2 -3
  25. package/dist/commonjs/funcs/users-activities-create.js.map +1 -1
  26. package/dist/commonjs/funcs/users-activities-delete.js +2 -2
  27. package/dist/commonjs/funcs/users-activities-delete.js.map +1 -1
  28. package/dist/commonjs/funcs/users-activities-get-all-of-user.d.ts +1 -1
  29. package/dist/commonjs/funcs/users-activities-get-all-of-user.d.ts.map +1 -1
  30. package/dist/commonjs/funcs/users-activities-get-all-of-user.js +2 -3
  31. package/dist/commonjs/funcs/users-activities-get-all-of-user.js.map +1 -1
  32. package/dist/commonjs/funcs/users-activities-get.d.ts +1 -1
  33. package/dist/commonjs/funcs/users-activities-get.d.ts.map +1 -1
  34. package/dist/commonjs/funcs/users-activities-get.js +2 -3
  35. package/dist/commonjs/funcs/users-activities-get.js.map +1 -1
  36. package/dist/commonjs/funcs/users-activities-me.d.ts +1 -1
  37. package/dist/commonjs/funcs/users-activities-me.d.ts.map +1 -1
  38. package/dist/commonjs/funcs/users-activities-me.js +2 -3
  39. package/dist/commonjs/funcs/users-activities-me.js.map +1 -1
  40. package/dist/commonjs/funcs/users-activities-update.d.ts +1 -1
  41. package/dist/commonjs/funcs/users-activities-update.d.ts.map +1 -1
  42. package/dist/commonjs/funcs/users-activities-update.js +2 -3
  43. package/dist/commonjs/funcs/users-activities-update.js.map +1 -1
  44. package/dist/commonjs/funcs/users-delete.js +2 -2
  45. package/dist/commonjs/funcs/users-delete.js.map +1 -1
  46. package/dist/commonjs/funcs/users-friends-accept.js +2 -2
  47. package/dist/commonjs/funcs/users-friends-accept.js.map +1 -1
  48. package/dist/commonjs/funcs/users-friends-list.d.ts +1 -1
  49. package/dist/commonjs/funcs/users-friends-list.d.ts.map +1 -1
  50. package/dist/commonjs/funcs/users-friends-list.js +2 -3
  51. package/dist/commonjs/funcs/users-friends-list.js.map +1 -1
  52. package/dist/commonjs/funcs/users-friends-pending.d.ts +1 -1
  53. package/dist/commonjs/funcs/users-friends-pending.d.ts.map +1 -1
  54. package/dist/commonjs/funcs/users-friends-pending.js +2 -3
  55. package/dist/commonjs/funcs/users-friends-pending.js.map +1 -1
  56. package/dist/commonjs/funcs/users-friends-reject.js +2 -2
  57. package/dist/commonjs/funcs/users-friends-reject.js.map +1 -1
  58. package/dist/commonjs/funcs/users-friends-remove.js +2 -2
  59. package/dist/commonjs/funcs/users-friends-remove.js.map +1 -1
  60. package/dist/commonjs/funcs/users-friends-send-request.js +2 -2
  61. package/dist/commonjs/funcs/users-friends-send-request.js.map +1 -1
  62. package/dist/commonjs/funcs/users-get.d.ts +1 -1
  63. package/dist/commonjs/funcs/users-get.d.ts.map +1 -1
  64. package/dist/commonjs/funcs/users-get.js +2 -3
  65. package/dist/commonjs/funcs/users-get.js.map +1 -1
  66. package/dist/commonjs/funcs/users-login.d.ts +1 -1
  67. package/dist/commonjs/funcs/users-login.d.ts.map +1 -1
  68. package/dist/commonjs/funcs/users-login.js +2 -3
  69. package/dist/commonjs/funcs/users-login.js.map +1 -1
  70. package/dist/commonjs/funcs/users-me.d.ts +1 -1
  71. package/dist/commonjs/funcs/users-me.d.ts.map +1 -1
  72. package/dist/commonjs/funcs/users-me.js +2 -3
  73. package/dist/commonjs/funcs/users-me.js.map +1 -1
  74. package/dist/commonjs/funcs/users-posts-delete.js +2 -2
  75. package/dist/commonjs/funcs/users-posts-delete.js.map +1 -1
  76. package/dist/commonjs/funcs/users-posts-feed.d.ts +1 -1
  77. package/dist/commonjs/funcs/users-posts-feed.d.ts.map +1 -1
  78. package/dist/commonjs/funcs/users-posts-feed.js +2 -3
  79. package/dist/commonjs/funcs/users-posts-feed.js.map +1 -1
  80. package/dist/commonjs/funcs/users-posts-get-by-post-id.d.ts +1 -1
  81. package/dist/commonjs/funcs/users-posts-get-by-post-id.d.ts.map +1 -1
  82. package/dist/commonjs/funcs/users-posts-get-by-post-id.js +2 -3
  83. package/dist/commonjs/funcs/users-posts-get-by-post-id.js.map +1 -1
  84. package/dist/commonjs/funcs/users-posts-get-by-user-id.d.ts +1 -1
  85. package/dist/commonjs/funcs/users-posts-get-by-user-id.d.ts.map +1 -1
  86. package/dist/commonjs/funcs/users-posts-get-by-user-id.js +2 -3
  87. package/dist/commonjs/funcs/users-posts-get-by-user-id.js.map +1 -1
  88. package/dist/commonjs/funcs/users-posts-like.d.ts +14 -0
  89. package/dist/commonjs/funcs/users-posts-like.d.ts.map +1 -0
  90. package/dist/commonjs/funcs/users-posts-like.js +127 -0
  91. package/dist/commonjs/funcs/users-posts-like.js.map +1 -0
  92. package/dist/commonjs/funcs/users-posts-remove-like.d.ts +14 -0
  93. package/dist/commonjs/funcs/users-posts-remove-like.d.ts.map +1 -0
  94. package/dist/commonjs/funcs/users-posts-remove-like.js +127 -0
  95. package/dist/commonjs/funcs/users-posts-remove-like.js.map +1 -0
  96. package/dist/commonjs/funcs/users-posts-update.d.ts +1 -1
  97. package/dist/commonjs/funcs/users-posts-update.d.ts.map +1 -1
  98. package/dist/commonjs/funcs/users-posts-update.js +2 -3
  99. package/dist/commonjs/funcs/users-posts-update.js.map +1 -1
  100. package/dist/commonjs/funcs/users-signup.d.ts +1 -1
  101. package/dist/commonjs/funcs/users-signup.d.ts.map +1 -1
  102. package/dist/commonjs/funcs/users-signup.js +2 -3
  103. package/dist/commonjs/funcs/users-signup.js.map +1 -1
  104. package/dist/commonjs/funcs/users-update.d.ts +1 -1
  105. package/dist/commonjs/funcs/users-update.d.ts.map +1 -1
  106. package/dist/commonjs/funcs/users-update.js +2 -3
  107. package/dist/commonjs/funcs/users-update.js.map +1 -1
  108. package/dist/commonjs/lib/config.d.ts +4 -4
  109. package/dist/commonjs/lib/config.js +4 -4
  110. package/dist/commonjs/models/operations/get-feed.d.ts +1 -0
  111. package/dist/commonjs/models/operations/get-feed.d.ts.map +1 -1
  112. package/dist/commonjs/models/operations/get-feed.js +1 -0
  113. package/dist/commonjs/models/operations/get-feed.js.map +1 -1
  114. package/dist/commonjs/models/operations/get-post-by-id.d.ts +2 -1
  115. package/dist/commonjs/models/operations/get-post-by-id.d.ts.map +1 -1
  116. package/dist/commonjs/models/operations/get-post-by-id.js +2 -1
  117. package/dist/commonjs/models/operations/get-post-by-id.js.map +1 -1
  118. package/dist/commonjs/models/operations/get-user-posts.d.ts +1 -0
  119. package/dist/commonjs/models/operations/get-user-posts.d.ts.map +1 -1
  120. package/dist/commonjs/models/operations/get-user-posts.js +1 -0
  121. package/dist/commonjs/models/operations/get-user-posts.js.map +1 -1
  122. package/dist/commonjs/models/operations/index.d.ts +2 -0
  123. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  124. package/dist/commonjs/models/operations/index.js +2 -0
  125. package/dist/commonjs/models/operations/index.js.map +1 -1
  126. package/dist/commonjs/models/operations/like-post.d.ts +12 -0
  127. package/dist/commonjs/models/operations/like-post.d.ts.map +1 -0
  128. package/dist/commonjs/models/operations/like-post.js +49 -0
  129. package/dist/commonjs/models/operations/like-post.js.map +1 -0
  130. package/dist/commonjs/models/operations/unlike-post.d.ts +12 -0
  131. package/dist/commonjs/models/operations/unlike-post.d.ts.map +1 -0
  132. package/dist/commonjs/models/operations/unlike-post.js +49 -0
  133. package/dist/commonjs/models/operations/unlike-post.js.map +1 -0
  134. package/dist/commonjs/sdk/activities.d.ts +5 -5
  135. package/dist/commonjs/sdk/activities.d.ts.map +1 -1
  136. package/dist/commonjs/sdk/categories.d.ts +3 -3
  137. package/dist/commonjs/sdk/categories.d.ts.map +1 -1
  138. package/dist/commonjs/sdk/friends.d.ts +2 -2
  139. package/dist/commonjs/sdk/friends.d.ts.map +1 -1
  140. package/dist/commonjs/sdk/posts.d.ts +12 -4
  141. package/dist/commonjs/sdk/posts.d.ts.map +1 -1
  142. package/dist/commonjs/sdk/posts.js +14 -0
  143. package/dist/commonjs/sdk/posts.js.map +1 -1
  144. package/dist/commonjs/sdk/schools.d.ts +1 -1
  145. package/dist/commonjs/sdk/schools.d.ts.map +1 -1
  146. package/dist/commonjs/sdk/users.d.ts +5 -5
  147. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  148. package/dist/esm/funcs/categories-create.d.ts +1 -1
  149. package/dist/esm/funcs/categories-create.d.ts.map +1 -1
  150. package/dist/esm/funcs/categories-create.js +2 -3
  151. package/dist/esm/funcs/categories-create.js.map +1 -1
  152. package/dist/esm/funcs/categories-delete.js +2 -2
  153. package/dist/esm/funcs/categories-delete.js.map +1 -1
  154. package/dist/esm/funcs/categories-get-all.d.ts +1 -1
  155. package/dist/esm/funcs/categories-get-all.d.ts.map +1 -1
  156. package/dist/esm/funcs/categories-get-all.js +2 -3
  157. package/dist/esm/funcs/categories-get-all.js.map +1 -1
  158. package/dist/esm/funcs/categories-update.d.ts +1 -1
  159. package/dist/esm/funcs/categories-update.d.ts.map +1 -1
  160. package/dist/esm/funcs/categories-update.js +2 -3
  161. package/dist/esm/funcs/categories-update.js.map +1 -1
  162. package/dist/esm/funcs/schools-get-all.js +2 -2
  163. package/dist/esm/funcs/schools-get-all.js.map +1 -1
  164. package/dist/esm/funcs/schools-get.d.ts +1 -1
  165. package/dist/esm/funcs/schools-get.d.ts.map +1 -1
  166. package/dist/esm/funcs/schools-get.js +2 -3
  167. package/dist/esm/funcs/schools-get.js.map +1 -1
  168. package/dist/esm/funcs/users-activities-create.d.ts +1 -1
  169. package/dist/esm/funcs/users-activities-create.d.ts.map +1 -1
  170. package/dist/esm/funcs/users-activities-create.js +2 -3
  171. package/dist/esm/funcs/users-activities-create.js.map +1 -1
  172. package/dist/esm/funcs/users-activities-delete.js +2 -2
  173. package/dist/esm/funcs/users-activities-delete.js.map +1 -1
  174. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts +1 -1
  175. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts.map +1 -1
  176. package/dist/esm/funcs/users-activities-get-all-of-user.js +2 -3
  177. package/dist/esm/funcs/users-activities-get-all-of-user.js.map +1 -1
  178. package/dist/esm/funcs/users-activities-get.d.ts +1 -1
  179. package/dist/esm/funcs/users-activities-get.d.ts.map +1 -1
  180. package/dist/esm/funcs/users-activities-get.js +2 -3
  181. package/dist/esm/funcs/users-activities-get.js.map +1 -1
  182. package/dist/esm/funcs/users-activities-me.d.ts +1 -1
  183. package/dist/esm/funcs/users-activities-me.d.ts.map +1 -1
  184. package/dist/esm/funcs/users-activities-me.js +2 -3
  185. package/dist/esm/funcs/users-activities-me.js.map +1 -1
  186. package/dist/esm/funcs/users-activities-update.d.ts +1 -1
  187. package/dist/esm/funcs/users-activities-update.d.ts.map +1 -1
  188. package/dist/esm/funcs/users-activities-update.js +2 -3
  189. package/dist/esm/funcs/users-activities-update.js.map +1 -1
  190. package/dist/esm/funcs/users-delete.js +2 -2
  191. package/dist/esm/funcs/users-delete.js.map +1 -1
  192. package/dist/esm/funcs/users-friends-accept.js +2 -2
  193. package/dist/esm/funcs/users-friends-accept.js.map +1 -1
  194. package/dist/esm/funcs/users-friends-list.d.ts +1 -1
  195. package/dist/esm/funcs/users-friends-list.d.ts.map +1 -1
  196. package/dist/esm/funcs/users-friends-list.js +2 -3
  197. package/dist/esm/funcs/users-friends-list.js.map +1 -1
  198. package/dist/esm/funcs/users-friends-pending.d.ts +1 -1
  199. package/dist/esm/funcs/users-friends-pending.d.ts.map +1 -1
  200. package/dist/esm/funcs/users-friends-pending.js +2 -3
  201. package/dist/esm/funcs/users-friends-pending.js.map +1 -1
  202. package/dist/esm/funcs/users-friends-reject.js +2 -2
  203. package/dist/esm/funcs/users-friends-reject.js.map +1 -1
  204. package/dist/esm/funcs/users-friends-remove.js +2 -2
  205. package/dist/esm/funcs/users-friends-remove.js.map +1 -1
  206. package/dist/esm/funcs/users-friends-send-request.js +2 -2
  207. package/dist/esm/funcs/users-friends-send-request.js.map +1 -1
  208. package/dist/esm/funcs/users-get.d.ts +1 -1
  209. package/dist/esm/funcs/users-get.d.ts.map +1 -1
  210. package/dist/esm/funcs/users-get.js +2 -3
  211. package/dist/esm/funcs/users-get.js.map +1 -1
  212. package/dist/esm/funcs/users-login.d.ts +1 -1
  213. package/dist/esm/funcs/users-login.d.ts.map +1 -1
  214. package/dist/esm/funcs/users-login.js +2 -3
  215. package/dist/esm/funcs/users-login.js.map +1 -1
  216. package/dist/esm/funcs/users-me.d.ts +1 -1
  217. package/dist/esm/funcs/users-me.d.ts.map +1 -1
  218. package/dist/esm/funcs/users-me.js +2 -3
  219. package/dist/esm/funcs/users-me.js.map +1 -1
  220. package/dist/esm/funcs/users-posts-delete.js +2 -2
  221. package/dist/esm/funcs/users-posts-delete.js.map +1 -1
  222. package/dist/esm/funcs/users-posts-feed.d.ts +1 -1
  223. package/dist/esm/funcs/users-posts-feed.d.ts.map +1 -1
  224. package/dist/esm/funcs/users-posts-feed.js +2 -3
  225. package/dist/esm/funcs/users-posts-feed.js.map +1 -1
  226. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts +1 -1
  227. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts.map +1 -1
  228. package/dist/esm/funcs/users-posts-get-by-post-id.js +2 -3
  229. package/dist/esm/funcs/users-posts-get-by-post-id.js.map +1 -1
  230. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts +1 -1
  231. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts.map +1 -1
  232. package/dist/esm/funcs/users-posts-get-by-user-id.js +2 -3
  233. package/dist/esm/funcs/users-posts-get-by-user-id.js.map +1 -1
  234. package/dist/esm/funcs/users-posts-like.d.ts +14 -0
  235. package/dist/esm/funcs/users-posts-like.d.ts.map +1 -0
  236. package/dist/esm/funcs/users-posts-like.js +91 -0
  237. package/dist/esm/funcs/users-posts-like.js.map +1 -0
  238. package/dist/esm/funcs/users-posts-remove-like.d.ts +14 -0
  239. package/dist/esm/funcs/users-posts-remove-like.d.ts.map +1 -0
  240. package/dist/esm/funcs/users-posts-remove-like.js +91 -0
  241. package/dist/esm/funcs/users-posts-remove-like.js.map +1 -0
  242. package/dist/esm/funcs/users-posts-update.d.ts +1 -1
  243. package/dist/esm/funcs/users-posts-update.d.ts.map +1 -1
  244. package/dist/esm/funcs/users-posts-update.js +2 -3
  245. package/dist/esm/funcs/users-posts-update.js.map +1 -1
  246. package/dist/esm/funcs/users-signup.d.ts +1 -1
  247. package/dist/esm/funcs/users-signup.d.ts.map +1 -1
  248. package/dist/esm/funcs/users-signup.js +2 -3
  249. package/dist/esm/funcs/users-signup.js.map +1 -1
  250. package/dist/esm/funcs/users-update.d.ts +1 -1
  251. package/dist/esm/funcs/users-update.d.ts.map +1 -1
  252. package/dist/esm/funcs/users-update.js +2 -3
  253. package/dist/esm/funcs/users-update.js.map +1 -1
  254. package/dist/esm/lib/config.d.ts +4 -4
  255. package/dist/esm/lib/config.js +4 -4
  256. package/dist/esm/models/operations/get-feed.d.ts +1 -0
  257. package/dist/esm/models/operations/get-feed.d.ts.map +1 -1
  258. package/dist/esm/models/operations/get-feed.js +1 -0
  259. package/dist/esm/models/operations/get-feed.js.map +1 -1
  260. package/dist/esm/models/operations/get-post-by-id.d.ts +2 -1
  261. package/dist/esm/models/operations/get-post-by-id.d.ts.map +1 -1
  262. package/dist/esm/models/operations/get-post-by-id.js +2 -1
  263. package/dist/esm/models/operations/get-post-by-id.js.map +1 -1
  264. package/dist/esm/models/operations/get-user-posts.d.ts +1 -0
  265. package/dist/esm/models/operations/get-user-posts.d.ts.map +1 -1
  266. package/dist/esm/models/operations/get-user-posts.js +1 -0
  267. package/dist/esm/models/operations/get-user-posts.js.map +1 -1
  268. package/dist/esm/models/operations/index.d.ts +2 -0
  269. package/dist/esm/models/operations/index.d.ts.map +1 -1
  270. package/dist/esm/models/operations/index.js +2 -0
  271. package/dist/esm/models/operations/index.js.map +1 -1
  272. package/dist/esm/models/operations/like-post.d.ts +12 -0
  273. package/dist/esm/models/operations/like-post.d.ts.map +1 -0
  274. package/dist/esm/models/operations/like-post.js +12 -0
  275. package/dist/esm/models/operations/like-post.js.map +1 -0
  276. package/dist/esm/models/operations/unlike-post.d.ts +12 -0
  277. package/dist/esm/models/operations/unlike-post.d.ts.map +1 -0
  278. package/dist/esm/models/operations/unlike-post.js +12 -0
  279. package/dist/esm/models/operations/unlike-post.js.map +1 -0
  280. package/dist/esm/sdk/activities.d.ts +5 -5
  281. package/dist/esm/sdk/activities.d.ts.map +1 -1
  282. package/dist/esm/sdk/categories.d.ts +3 -3
  283. package/dist/esm/sdk/categories.d.ts.map +1 -1
  284. package/dist/esm/sdk/friends.d.ts +2 -2
  285. package/dist/esm/sdk/friends.d.ts.map +1 -1
  286. package/dist/esm/sdk/posts.d.ts +12 -4
  287. package/dist/esm/sdk/posts.d.ts.map +1 -1
  288. package/dist/esm/sdk/posts.js +14 -0
  289. package/dist/esm/sdk/posts.js.map +1 -1
  290. package/dist/esm/sdk/schools.d.ts +1 -1
  291. package/dist/esm/sdk/schools.d.ts.map +1 -1
  292. package/dist/esm/sdk/users.d.ts +5 -5
  293. package/dist/esm/sdk/users.d.ts.map +1 -1
  294. package/jsr.json +1 -1
  295. package/package.json +1 -1
  296. package/rest-api/cypress/e2e/activity-post-endpoints.cy.js +78 -0
  297. package/rest-api/cypress.config.ts +1 -0
  298. package/rest-api/index.js +2 -0
  299. package/rest-api/routes/ActivityPostFunctions.js +99 -10
  300. package/src/funcs/categories-create.ts +6 -14
  301. package/src/funcs/categories-delete.ts +2 -3
  302. package/src/funcs/categories-get-all.ts +6 -14
  303. package/src/funcs/categories-update.ts +6 -14
  304. package/src/funcs/schools-get-all.ts +2 -2
  305. package/src/funcs/schools-get.ts +6 -11
  306. package/src/funcs/users-activities-create.ts +6 -14
  307. package/src/funcs/users-activities-delete.ts +2 -3
  308. package/src/funcs/users-activities-get-all-of-user.ts +6 -18
  309. package/src/funcs/users-activities-get.ts +6 -14
  310. package/src/funcs/users-activities-me.ts +6 -14
  311. package/src/funcs/users-activities-update.ts +6 -14
  312. package/src/funcs/users-delete.ts +2 -3
  313. package/src/funcs/users-friends-accept.ts +2 -3
  314. package/src/funcs/users-friends-list.ts +6 -14
  315. package/src/funcs/users-friends-pending.ts +6 -15
  316. package/src/funcs/users-friends-reject.ts +2 -3
  317. package/src/funcs/users-friends-remove.ts +2 -3
  318. package/src/funcs/users-friends-send-request.ts +2 -3
  319. package/src/funcs/users-get.ts +6 -11
  320. package/src/funcs/users-login.ts +6 -11
  321. package/src/funcs/users-me.ts +6 -14
  322. package/src/funcs/users-posts-delete.ts +2 -3
  323. package/src/funcs/users-posts-feed.ts +6 -14
  324. package/src/funcs/users-posts-get-by-post-id.ts +6 -11
  325. package/src/funcs/users-posts-get-by-user-id.ts +6 -14
  326. package/src/funcs/users-posts-like.ts +174 -0
  327. package/src/funcs/users-posts-remove-like.ts +174 -0
  328. package/src/funcs/users-posts-update.ts +6 -11
  329. package/src/funcs/users-signup.ts +6 -8
  330. package/src/funcs/users-update.ts +6 -11
  331. package/src/lib/config.ts +4 -4
  332. package/src/models/operations/get-feed.ts +2 -0
  333. package/src/models/operations/get-post-by-id.ts +4 -2
  334. package/src/models/operations/get-user-posts.ts +2 -0
  335. package/src/models/operations/index.ts +2 -0
  336. package/src/models/operations/like-post.ts +28 -0
  337. package/src/models/operations/unlike-post.ts +30 -0
  338. package/src/sdk/activities.ts +5 -5
  339. package/src/sdk/categories.ts +3 -3
  340. package/src/sdk/friends.ts +2 -2
  341. package/src/sdk/posts.ts +34 -4
  342. package/src/sdk/schools.ts +1 -1
  343. package/src/sdk/users.ts +5 -5
@@ -0,0 +1,174 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { SenseiProductivityCore } from "../core.js";
7
+ import { encodeSimple } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/http-client-errors.js";
21
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
22
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
23
+ import { SenseiProductivityError } from "../models/errors/sensei-productivity-error.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Remove a like from a specific post by ID
30
+ */
31
+ export function usersPostsRemoveLike(
32
+ client: SenseiProductivityCore,
33
+ request: operations.UnlikePostRequest,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ void,
38
+ | SenseiProductivityError
39
+ | ResponseValidationError
40
+ | ConnectionError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | InvalidRequestError
44
+ | UnexpectedClientError
45
+ | SDKValidationError
46
+ >
47
+ > {
48
+ return new APIPromise($do(
49
+ client,
50
+ request,
51
+ options,
52
+ ));
53
+ }
54
+
55
+ async function $do(
56
+ client: SenseiProductivityCore,
57
+ request: operations.UnlikePostRequest,
58
+ options?: RequestOptions,
59
+ ): Promise<
60
+ [
61
+ Result<
62
+ void,
63
+ | SenseiProductivityError
64
+ | ResponseValidationError
65
+ | ConnectionError
66
+ | RequestAbortedError
67
+ | RequestTimeoutError
68
+ | InvalidRequestError
69
+ | UnexpectedClientError
70
+ | SDKValidationError
71
+ >,
72
+ APICall,
73
+ ]
74
+ > {
75
+ const parsed = safeParse(
76
+ request,
77
+ (value) => z.parse(operations.UnlikePostRequest$outboundSchema, value),
78
+ "Input validation failed",
79
+ );
80
+ if (!parsed.ok) {
81
+ return [parsed, { status: "invalid" }];
82
+ }
83
+ const payload = parsed.value;
84
+ const body = null;
85
+
86
+ const pathParams = {
87
+ id: encodeSimple("id", payload.id, {
88
+ explode: false,
89
+ charEncoding: "percent",
90
+ }),
91
+ };
92
+
93
+ const path = pathToFunc("/api/v1/posts/{id}/like")(pathParams);
94
+
95
+ const headers = new Headers(compactMap({
96
+ Accept: "*/*",
97
+ }));
98
+
99
+ const secConfig = await extractSecurity(client._options.bearerAuth);
100
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
101
+ const requestSecurity = resolveGlobalSecurity(securityInput);
102
+
103
+ const context = {
104
+ options: client._options,
105
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
106
+ operationID: "unlikePost",
107
+ oAuth2Scopes: null,
108
+
109
+ resolvedSecurity: requestSecurity,
110
+
111
+ securitySource: client._options.bearerAuth,
112
+ retryConfig: options?.retries
113
+ || client._options.retryConfig
114
+ || {
115
+ strategy: "backoff",
116
+ backoff: {
117
+ initialInterval: 1000,
118
+ maxInterval: 60000,
119
+ exponent: 1.3,
120
+ maxElapsedTime: 3600000,
121
+ },
122
+ retryConnectionErrors: true,
123
+ }
124
+ || { strategy: "none" },
125
+ retryCodes: options?.retryCodes || ["429", "5XX"],
126
+ };
127
+
128
+ const requestRes = client._createRequest(context, {
129
+ security: requestSecurity,
130
+ method: "DELETE",
131
+ baseURL: options?.serverURL,
132
+ path: path,
133
+ headers: headers,
134
+ body: body,
135
+ userAgent: client._options.userAgent,
136
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
137
+ }, options);
138
+ if (!requestRes.ok) {
139
+ return [requestRes, { status: "invalid" }];
140
+ }
141
+ const req = requestRes.value;
142
+
143
+ const doResult = await client._do(req, {
144
+ context,
145
+ errorCodes: ["401", "404", "4XX", "5XX"],
146
+ retryConfig: context.retryConfig,
147
+ retryCodes: context.retryCodes,
148
+ });
149
+ if (!doResult.ok) {
150
+ return [doResult, { status: "request-error", request: req }];
151
+ }
152
+ const response = doResult.value;
153
+
154
+ const [result] = await M.match<
155
+ void,
156
+ | SenseiProductivityError
157
+ | ResponseValidationError
158
+ | ConnectionError
159
+ | RequestAbortedError
160
+ | RequestTimeoutError
161
+ | InvalidRequestError
162
+ | UnexpectedClientError
163
+ | SDKValidationError
164
+ >(
165
+ M.nil(200, z.void()),
166
+ M.fail([401, 404, "4XX"]),
167
+ M.fail("5XX"),
168
+ )(response, req);
169
+ if (!result.ok) {
170
+ return [result, { status: "complete", request: req, response }];
171
+ }
172
+
173
+ return [result, { status: "complete", request: req, response }];
174
+ }
@@ -24,7 +24,6 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
- import * as types$ from "../types/primitives.js";
28
27
 
29
28
  /**
30
29
  * Update a post's caption or visibility
@@ -35,7 +34,7 @@ export function usersPostsUpdate(
35
34
  options?: RequestOptions,
36
35
  ): APIPromise<
37
36
  Result<
38
- operations.UpdatePostResponse | undefined,
37
+ operations.UpdatePostResponse,
39
38
  | SenseiProductivityError
40
39
  | ResponseValidationError
41
40
  | ConnectionError
@@ -60,7 +59,7 @@ async function $do(
60
59
  ): Promise<
61
60
  [
62
61
  Result<
63
- operations.UpdatePostResponse | undefined,
62
+ operations.UpdatePostResponse,
64
63
  | SenseiProductivityError
65
64
  | ResponseValidationError
66
65
  | ConnectionError
@@ -144,7 +143,7 @@ async function $do(
144
143
 
145
144
  const doResult = await client._do(req, {
146
145
  context,
147
- errorCodes: ["429", "5XX"],
146
+ errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
148
147
  retryConfig: context.retryConfig,
149
148
  retryCodes: context.retryCodes,
150
149
  });
@@ -154,7 +153,7 @@ async function $do(
154
153
  const response = doResult.value;
155
154
 
156
155
  const [result] = await M.match<
157
- operations.UpdatePostResponse | undefined,
156
+ operations.UpdatePostResponse,
158
157
  | SenseiProductivityError
159
158
  | ResponseValidationError
160
159
  | ConnectionError
@@ -164,12 +163,8 @@ async function $do(
164
163
  | UnexpectedClientError
165
164
  | SDKValidationError
166
165
  >(
167
- M.json(200, types$.optional(operations.UpdatePostResponse$inboundSchema)),
168
- M.nil(
169
- [400, 401, 403, 404],
170
- types$.optional(operations.UpdatePostResponse$inboundSchema),
171
- ),
172
- M.fail(429),
166
+ M.json(200, operations.UpdatePostResponse$inboundSchema),
167
+ M.fail([400, 401, 403, 404, "4XX"]),
173
168
  M.fail("5XX"),
174
169
  )(response, req);
175
170
  if (!result.ok) {
@@ -24,7 +24,6 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
- import * as types$ from "../types/primitives.js";
28
27
 
29
28
  /**
30
29
  * Signup the given user
@@ -35,7 +34,7 @@ export function usersSignup(
35
34
  options?: RequestOptions,
36
35
  ): APIPromise<
37
36
  Result<
38
- operations.UserSignupResponse | undefined,
37
+ operations.UserSignupResponse,
39
38
  | SenseiProductivityError
40
39
  | ResponseValidationError
41
40
  | ConnectionError
@@ -60,7 +59,7 @@ async function $do(
60
59
  ): Promise<
61
60
  [
62
61
  Result<
63
- operations.UserSignupResponse | undefined,
62
+ operations.UserSignupResponse,
64
63
  | SenseiProductivityError
65
64
  | ResponseValidationError
66
65
  | ConnectionError
@@ -137,7 +136,7 @@ async function $do(
137
136
 
138
137
  const doResult = await client._do(req, {
139
138
  context,
140
- errorCodes: ["429", "5XX"],
139
+ errorCodes: ["400", "4XX", "5XX"],
141
140
  retryConfig: context.retryConfig,
142
141
  retryCodes: context.retryCodes,
143
142
  });
@@ -147,7 +146,7 @@ async function $do(
147
146
  const response = doResult.value;
148
147
 
149
148
  const [result] = await M.match<
150
- operations.UserSignupResponse | undefined,
149
+ operations.UserSignupResponse,
151
150
  | SenseiProductivityError
152
151
  | ResponseValidationError
153
152
  | ConnectionError
@@ -157,9 +156,8 @@ async function $do(
157
156
  | UnexpectedClientError
158
157
  | SDKValidationError
159
158
  >(
160
- M.json(200, types$.optional(operations.UserSignupResponse$inboundSchema)),
161
- M.nil(400, types$.optional(operations.UserSignupResponse$inboundSchema)),
162
- M.fail(429),
159
+ M.json(200, operations.UserSignupResponse$inboundSchema),
160
+ M.fail([400, "4XX"]),
163
161
  M.fail("5XX"),
164
162
  )(response, req);
165
163
  if (!result.ok) {
@@ -24,7 +24,6 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
- import * as types$ from "../types/primitives.js";
28
27
 
29
28
  /**
30
29
  * Update a user's profile (own profile only)
@@ -35,7 +34,7 @@ export function usersUpdate(
35
34
  options?: RequestOptions,
36
35
  ): APIPromise<
37
36
  Result<
38
- operations.UpdateUserResponse | undefined,
37
+ operations.UpdateUserResponse,
39
38
  | SenseiProductivityError
40
39
  | ResponseValidationError
41
40
  | ConnectionError
@@ -60,7 +59,7 @@ async function $do(
60
59
  ): Promise<
61
60
  [
62
61
  Result<
63
- operations.UpdateUserResponse | undefined,
62
+ operations.UpdateUserResponse,
64
63
  | SenseiProductivityError
65
64
  | ResponseValidationError
66
65
  | ConnectionError
@@ -144,7 +143,7 @@ async function $do(
144
143
 
145
144
  const doResult = await client._do(req, {
146
145
  context,
147
- errorCodes: ["429", "5XX"],
146
+ errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
148
147
  retryConfig: context.retryConfig,
149
148
  retryCodes: context.retryCodes,
150
149
  });
@@ -154,7 +153,7 @@ async function $do(
154
153
  const response = doResult.value;
155
154
 
156
155
  const [result] = await M.match<
157
- operations.UpdateUserResponse | undefined,
156
+ operations.UpdateUserResponse,
158
157
  | SenseiProductivityError
159
158
  | ResponseValidationError
160
159
  | ConnectionError
@@ -164,12 +163,8 @@ async function $do(
164
163
  | UnexpectedClientError
165
164
  | SDKValidationError
166
165
  >(
167
- M.json(200, types$.optional(operations.UpdateUserResponse$inboundSchema)),
168
- M.nil(
169
- [400, 401, 403, 404],
170
- types$.optional(operations.UpdateUserResponse$inboundSchema),
171
- ),
172
- M.fail(429),
166
+ M.json(200, operations.UpdateUserResponse$inboundSchema),
167
+ M.fail([400, 401, 403, 404, "4XX"]),
173
168
  M.fail("5XX"),
174
169
  )(response, req);
175
170
  if (!result.ok) {
package/src/lib/config.ts CHANGED
@@ -60,9 +60,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
60
60
 
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
- openapiDocVersion: "1.5.0",
64
- sdkVersion: "1.5.0",
65
- genVersion: "2.846.1",
63
+ openapiDocVersion: "1.7.0",
64
+ sdkVersion: "1.7.0",
65
+ genVersion: "2.866.0",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 1.5.0 2.846.1 1.5.0 @aurora-interactive/sensei-productivity",
67
+ "speakeasy-sdk/typescript 1.7.0 2.866.0 1.7.0 @aurora-interactive/sensei-productivity",
68
68
  } as const;
@@ -30,6 +30,7 @@ export type GetFeedResponse = {
30
30
  postDate: Date;
31
31
  postStatus: GetFeedPostStatus;
32
32
  caption?: string | undefined;
33
+ likes: number;
33
34
  };
34
35
 
35
36
  /** @internal */
@@ -69,6 +70,7 @@ export const GetFeedResponse$inboundSchema: z.ZodMiniType<
69
70
  postDate: types.date(),
70
71
  postStatus: GetFeedPostStatus$inboundSchema,
71
72
  caption: types.optional(types.string()),
73
+ likes: types.number(),
72
74
  });
73
75
 
74
76
  export function getFeedResponseFromJSON(
@@ -29,9 +29,10 @@ export type GetPostByIdResponse = {
29
29
  userId: number;
30
30
  categoryName: string;
31
31
  activityId: number;
32
- postDate: Date;
32
+ postDate: string;
33
33
  postStatus: GetPostByIdPostStatus;
34
34
  caption?: string | undefined;
35
+ likes: number;
35
36
  };
36
37
 
37
38
  /** @internal */
@@ -70,9 +71,10 @@ export const GetPostByIdResponse$inboundSchema: z.ZodMiniType<
70
71
  userId: types.number(),
71
72
  categoryName: types.string(),
72
73
  activityId: types.number(),
73
- postDate: types.date(),
74
+ postDate: types.string(),
74
75
  postStatus: GetPostByIdPostStatus$inboundSchema,
75
76
  caption: types.optional(types.string()),
77
+ likes: types.number(),
76
78
  });
77
79
 
78
80
  export function getPostByIdResponseFromJSON(
@@ -29,6 +29,7 @@ export type GetUserPostsResponse = {
29
29
  postDate: Date;
30
30
  postStatus: GetUserPostsPostStatus;
31
31
  caption?: string | undefined;
32
+ likes: number;
32
33
  };
33
34
 
34
35
  /** @internal */
@@ -70,6 +71,7 @@ export const GetUserPostsResponse$inboundSchema: z.ZodMiniType<
70
71
  postDate: types.date(),
71
72
  postStatus: GetUserPostsPostStatus$inboundSchema,
72
73
  caption: types.optional(types.string()),
74
+ likes: types.number(),
73
75
  });
74
76
 
75
77
  export function getUserPostsResponseFromJSON(
@@ -17,6 +17,7 @@ export * from "./get-school-by-id.js";
17
17
  export * from "./get-user-activities.js";
18
18
  export * from "./get-user-by-id.js";
19
19
  export * from "./get-user-posts.js";
20
+ export * from "./like-post.js";
20
21
  export * from "./list-activities.js";
21
22
  export * from "./list-categories.js";
22
23
  export * from "./list-friends.js";
@@ -25,6 +26,7 @@ export * from "./pending-friend-requests.js";
25
26
  export * from "./reject-friend-request.js";
26
27
  export * from "./remove-friend.js";
27
28
  export * from "./send-friend-request.js";
29
+ export * from "./unlike-post.js";
28
30
  export * from "./update-activity.js";
29
31
  export * from "./update-category.js";
30
32
  export * from "./update-post.js";
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type LikePostRequest = {
8
+ id: number;
9
+ };
10
+
11
+ /** @internal */
12
+ export type LikePostRequest$Outbound = {
13
+ id: number;
14
+ };
15
+
16
+ /** @internal */
17
+ export const LikePostRequest$outboundSchema: z.ZodMiniType<
18
+ LikePostRequest$Outbound,
19
+ LikePostRequest
20
+ > = z.object({
21
+ id: z.int(),
22
+ });
23
+
24
+ export function likePostRequestToJSON(
25
+ likePostRequest: LikePostRequest,
26
+ ): string {
27
+ return JSON.stringify(LikePostRequest$outboundSchema.parse(likePostRequest));
28
+ }
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type UnlikePostRequest = {
8
+ id: number;
9
+ };
10
+
11
+ /** @internal */
12
+ export type UnlikePostRequest$Outbound = {
13
+ id: number;
14
+ };
15
+
16
+ /** @internal */
17
+ export const UnlikePostRequest$outboundSchema: z.ZodMiniType<
18
+ UnlikePostRequest$Outbound,
19
+ UnlikePostRequest
20
+ > = z.object({
21
+ id: z.int(),
22
+ });
23
+
24
+ export function unlikePostRequestToJSON(
25
+ unlikePostRequest: UnlikePostRequest,
26
+ ): string {
27
+ return JSON.stringify(
28
+ UnlikePostRequest$outboundSchema.parse(unlikePostRequest),
29
+ );
30
+ }
@@ -19,7 +19,7 @@ export class Activities extends ClientSDK {
19
19
  async getAllOfUser(
20
20
  request: operations.GetUserActivitiesRequest,
21
21
  options?: RequestOptions,
22
- ): Promise<Array<operations.GetUserActivitiesResponse> | undefined> {
22
+ ): Promise<Array<operations.GetUserActivitiesResponse>> {
23
23
  return unwrapAsync(usersActivitiesGetAllOfUser(
24
24
  this,
25
25
  request,
@@ -33,7 +33,7 @@ export class Activities extends ClientSDK {
33
33
  async me(
34
34
  request?: operations.ListActivitiesRequest | undefined,
35
35
  options?: RequestOptions,
36
- ): Promise<Array<operations.ListActivitiesResponse> | undefined> {
36
+ ): Promise<Array<operations.ListActivitiesResponse>> {
37
37
  return unwrapAsync(usersActivitiesMe(
38
38
  this,
39
39
  request,
@@ -47,7 +47,7 @@ export class Activities extends ClientSDK {
47
47
  async create(
48
48
  request: operations.CreateActivityRequest,
49
49
  options?: RequestOptions,
50
- ): Promise<operations.CreateActivityResponse | undefined> {
50
+ ): Promise<operations.CreateActivityResponse> {
51
51
  return unwrapAsync(usersActivitiesCreate(
52
52
  this,
53
53
  request,
@@ -61,7 +61,7 @@ export class Activities extends ClientSDK {
61
61
  async get(
62
62
  request: operations.GetActivityByIdRequest,
63
63
  options?: RequestOptions,
64
- ): Promise<operations.GetActivityByIdResponse | undefined> {
64
+ ): Promise<operations.GetActivityByIdResponse> {
65
65
  return unwrapAsync(usersActivitiesGet(
66
66
  this,
67
67
  request,
@@ -75,7 +75,7 @@ export class Activities extends ClientSDK {
75
75
  async update(
76
76
  request: operations.UpdateActivityRequest,
77
77
  options?: RequestOptions,
78
- ): Promise<operations.UpdateActivityResponse | undefined> {
78
+ ): Promise<operations.UpdateActivityResponse> {
79
79
  return unwrapAsync(usersActivitiesUpdate(
80
80
  this,
81
81
  request,
@@ -16,7 +16,7 @@ export class Categories extends ClientSDK {
16
16
  */
17
17
  async getAll(
18
18
  options?: RequestOptions,
19
- ): Promise<Array<operations.ListCategoriesResponse> | undefined> {
19
+ ): Promise<Array<operations.ListCategoriesResponse>> {
20
20
  return unwrapAsync(categoriesGetAll(
21
21
  this,
22
22
  options,
@@ -29,7 +29,7 @@ export class Categories extends ClientSDK {
29
29
  async create(
30
30
  request: operations.CreateCategoryRequest,
31
31
  options?: RequestOptions,
32
- ): Promise<operations.CreateCategoryResponse | undefined> {
32
+ ): Promise<operations.CreateCategoryResponse> {
33
33
  return unwrapAsync(categoriesCreate(
34
34
  this,
35
35
  request,
@@ -43,7 +43,7 @@ export class Categories extends ClientSDK {
43
43
  async update(
44
44
  request: operations.UpdateCategoryRequest,
45
45
  options?: RequestOptions,
46
- ): Promise<operations.UpdateCategoryResponse | undefined> {
46
+ ): Promise<operations.UpdateCategoryResponse> {
47
47
  return unwrapAsync(categoriesUpdate(
48
48
  this,
49
49
  request,
@@ -19,7 +19,7 @@ export class Friends extends ClientSDK {
19
19
  async list(
20
20
  request: operations.ListFriendsRequest,
21
21
  options?: RequestOptions,
22
- ): Promise<Array<operations.ListFriendsResponse> | undefined> {
22
+ ): Promise<Array<operations.ListFriendsResponse>> {
23
23
  return unwrapAsync(usersFriendsList(
24
24
  this,
25
25
  request,
@@ -32,7 +32,7 @@ export class Friends extends ClientSDK {
32
32
  */
33
33
  async pending(
34
34
  options?: RequestOptions,
35
- ): Promise<Array<operations.PendingFriendRequestsResponse> | undefined> {
35
+ ): Promise<Array<operations.PendingFriendRequestsResponse>> {
36
36
  return unwrapAsync(usersFriendsPending(
37
37
  this,
38
38
  options,
package/src/sdk/posts.ts CHANGED
@@ -6,6 +6,8 @@ import { usersPostsDelete } from "../funcs/users-posts-delete.js";
6
6
  import { usersPostsFeed } from "../funcs/users-posts-feed.js";
7
7
  import { usersPostsGetByPostId } from "../funcs/users-posts-get-by-post-id.js";
8
8
  import { usersPostsGetByUserId } from "../funcs/users-posts-get-by-user-id.js";
9
+ import { usersPostsLike } from "../funcs/users-posts-like.js";
10
+ import { usersPostsRemoveLike } from "../funcs/users-posts-remove-like.js";
9
11
  import { usersPostsUpdate } from "../funcs/users-posts-update.js";
10
12
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
13
  import * as operations from "../models/operations/index.js";
@@ -18,7 +20,7 @@ export class Posts extends ClientSDK {
18
20
  async getByUserId(
19
21
  request: operations.GetUserPostsRequest,
20
22
  options?: RequestOptions,
21
- ): Promise<Array<operations.GetUserPostsResponse> | undefined> {
23
+ ): Promise<Array<operations.GetUserPostsResponse>> {
22
24
  return unwrapAsync(usersPostsGetByUserId(
23
25
  this,
24
26
  request,
@@ -32,7 +34,7 @@ export class Posts extends ClientSDK {
32
34
  async feed(
33
35
  request?: operations.GetFeedRequest | undefined,
34
36
  options?: RequestOptions,
35
- ): Promise<Array<operations.GetFeedResponse> | undefined> {
37
+ ): Promise<Array<operations.GetFeedResponse>> {
36
38
  return unwrapAsync(usersPostsFeed(
37
39
  this,
38
40
  request,
@@ -46,7 +48,7 @@ export class Posts extends ClientSDK {
46
48
  async getByPostId(
47
49
  request: operations.GetPostByIdRequest,
48
50
  options?: RequestOptions,
49
- ): Promise<operations.GetPostByIdResponse | undefined> {
51
+ ): Promise<operations.GetPostByIdResponse> {
50
52
  return unwrapAsync(usersPostsGetByPostId(
51
53
  this,
52
54
  request,
@@ -60,7 +62,7 @@ export class Posts extends ClientSDK {
60
62
  async update(
61
63
  request: operations.UpdatePostRequest,
62
64
  options?: RequestOptions,
63
- ): Promise<operations.UpdatePostResponse | undefined> {
65
+ ): Promise<operations.UpdatePostResponse> {
64
66
  return unwrapAsync(usersPostsUpdate(
65
67
  this,
66
68
  request,
@@ -81,4 +83,32 @@ export class Posts extends ClientSDK {
81
83
  options,
82
84
  ));
83
85
  }
86
+
87
+ /**
88
+ * Like a specific post by ID
89
+ */
90
+ async like(
91
+ request: operations.LikePostRequest,
92
+ options?: RequestOptions,
93
+ ): Promise<void> {
94
+ return unwrapAsync(usersPostsLike(
95
+ this,
96
+ request,
97
+ options,
98
+ ));
99
+ }
100
+
101
+ /**
102
+ * Remove a like from a specific post by ID
103
+ */
104
+ async removeLike(
105
+ request: operations.UnlikePostRequest,
106
+ options?: RequestOptions,
107
+ ): Promise<void> {
108
+ return unwrapAsync(usersPostsRemoveLike(
109
+ this,
110
+ request,
111
+ options,
112
+ ));
113
+ }
84
114
  }
@@ -27,7 +27,7 @@ export class Schools extends ClientSDK {
27
27
  async get(
28
28
  request: operations.GetSchoolByIdRequest,
29
29
  options?: RequestOptions,
30
- ): Promise<operations.GetSchoolByIdResponse | undefined> {
30
+ ): Promise<operations.GetSchoolByIdResponse> {
31
31
  return unwrapAsync(schoolsGet(
32
32
  this,
33
33
  request,