@aurora-interactive/sensei-productivity 1.3.0 → 1.4.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 (361) hide show
  1. package/README.md +15 -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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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.d.ts +14 -0
  47. package/dist/commonjs/funcs/users-friends-accept.d.ts.map +1 -0
  48. package/dist/commonjs/funcs/users-friends-accept.js +127 -0
  49. package/dist/commonjs/funcs/users-friends-accept.js.map +1 -0
  50. package/dist/commonjs/funcs/users-friends-list.d.ts +14 -0
  51. package/dist/commonjs/funcs/users-friends-list.d.ts.map +1 -0
  52. package/dist/commonjs/funcs/users-friends-list.js +128 -0
  53. package/dist/commonjs/funcs/users-friends-list.js.map +1 -0
  54. package/dist/commonjs/funcs/users-friends-pending.d.ts +14 -0
  55. package/dist/commonjs/funcs/users-friends-pending.d.ts.map +1 -0
  56. package/dist/commonjs/funcs/users-friends-pending.js +113 -0
  57. package/dist/commonjs/funcs/users-friends-pending.js.map +1 -0
  58. package/dist/commonjs/funcs/users-friends-reject.d.ts +14 -0
  59. package/dist/commonjs/funcs/users-friends-reject.d.ts.map +1 -0
  60. package/dist/commonjs/funcs/users-friends-reject.js +127 -0
  61. package/dist/commonjs/funcs/users-friends-reject.js.map +1 -0
  62. package/dist/commonjs/funcs/users-friends-remove.d.ts +14 -0
  63. package/dist/commonjs/funcs/users-friends-remove.d.ts.map +1 -0
  64. package/dist/commonjs/funcs/users-friends-remove.js +127 -0
  65. package/dist/commonjs/funcs/users-friends-remove.js.map +1 -0
  66. package/dist/commonjs/funcs/users-friends-send-request.d.ts +14 -0
  67. package/dist/commonjs/funcs/users-friends-send-request.d.ts.map +1 -0
  68. package/dist/commonjs/funcs/users-friends-send-request.js +127 -0
  69. package/dist/commonjs/funcs/users-friends-send-request.js.map +1 -0
  70. package/dist/commonjs/funcs/users-get.d.ts +1 -1
  71. package/dist/commonjs/funcs/users-get.d.ts.map +1 -1
  72. package/dist/commonjs/funcs/users-get.js +3 -2
  73. package/dist/commonjs/funcs/users-get.js.map +1 -1
  74. package/dist/commonjs/funcs/users-login.d.ts +1 -1
  75. package/dist/commonjs/funcs/users-login.d.ts.map +1 -1
  76. package/dist/commonjs/funcs/users-login.js +3 -2
  77. package/dist/commonjs/funcs/users-login.js.map +1 -1
  78. package/dist/commonjs/funcs/users-me.d.ts +1 -1
  79. package/dist/commonjs/funcs/users-me.d.ts.map +1 -1
  80. package/dist/commonjs/funcs/users-me.js +3 -2
  81. package/dist/commonjs/funcs/users-me.js.map +1 -1
  82. package/dist/commonjs/funcs/users-posts-delete.js +2 -2
  83. package/dist/commonjs/funcs/users-posts-delete.js.map +1 -1
  84. package/dist/commonjs/funcs/users-posts-feed.d.ts +1 -1
  85. package/dist/commonjs/funcs/users-posts-feed.d.ts.map +1 -1
  86. package/dist/commonjs/funcs/users-posts-feed.js +3 -2
  87. package/dist/commonjs/funcs/users-posts-feed.js.map +1 -1
  88. package/dist/commonjs/funcs/users-posts-get-by-post-id.d.ts +1 -1
  89. package/dist/commonjs/funcs/users-posts-get-by-post-id.d.ts.map +1 -1
  90. package/dist/commonjs/funcs/users-posts-get-by-post-id.js +3 -2
  91. package/dist/commonjs/funcs/users-posts-get-by-post-id.js.map +1 -1
  92. package/dist/commonjs/funcs/users-posts-get-by-user-id.d.ts +1 -1
  93. package/dist/commonjs/funcs/users-posts-get-by-user-id.d.ts.map +1 -1
  94. package/dist/commonjs/funcs/users-posts-get-by-user-id.js +3 -2
  95. package/dist/commonjs/funcs/users-posts-get-by-user-id.js.map +1 -1
  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 +3 -2
  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 +3 -2
  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 +3 -2
  107. package/dist/commonjs/funcs/users-update.js.map +1 -1
  108. package/dist/commonjs/lib/config.d.ts +3 -3
  109. package/dist/commonjs/lib/config.js +3 -3
  110. package/dist/commonjs/models/operations/accept-friend-request.d.ts +15 -0
  111. package/dist/commonjs/models/operations/accept-friend-request.d.ts.map +1 -0
  112. package/dist/commonjs/models/operations/accept-friend-request.js +49 -0
  113. package/dist/commonjs/models/operations/accept-friend-request.js.map +1 -0
  114. package/dist/commonjs/models/operations/index.d.ts +6 -0
  115. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  116. package/dist/commonjs/models/operations/index.js +6 -0
  117. package/dist/commonjs/models/operations/index.js.map +1 -1
  118. package/dist/commonjs/models/operations/list-friends.d.ts +26 -0
  119. package/dist/commonjs/models/operations/list-friends.d.ts.map +1 -0
  120. package/dist/commonjs/models/operations/list-friends.js +65 -0
  121. package/dist/commonjs/models/operations/list-friends.js.map +1 -0
  122. package/dist/commonjs/models/operations/pending-friend-requests.d.ts +16 -0
  123. package/dist/commonjs/models/operations/pending-friend-requests.d.ts.map +1 -0
  124. package/dist/commonjs/models/operations/pending-friend-requests.js +57 -0
  125. package/dist/commonjs/models/operations/pending-friend-requests.js.map +1 -0
  126. package/dist/commonjs/models/operations/reject-friend-request.d.ts +15 -0
  127. package/dist/commonjs/models/operations/reject-friend-request.d.ts.map +1 -0
  128. package/dist/commonjs/models/operations/reject-friend-request.js +49 -0
  129. package/dist/commonjs/models/operations/reject-friend-request.js.map +1 -0
  130. package/dist/commonjs/models/operations/remove-friend.d.ts +12 -0
  131. package/dist/commonjs/models/operations/remove-friend.d.ts.map +1 -0
  132. package/dist/commonjs/models/operations/remove-friend.js +49 -0
  133. package/dist/commonjs/models/operations/remove-friend.js.map +1 -0
  134. package/dist/commonjs/models/operations/send-friend-request.d.ts +12 -0
  135. package/dist/commonjs/models/operations/send-friend-request.d.ts.map +1 -0
  136. package/dist/commonjs/models/operations/send-friend-request.js +49 -0
  137. package/dist/commonjs/models/operations/send-friend-request.js.map +1 -0
  138. package/dist/commonjs/sdk/activities.d.ts +5 -5
  139. package/dist/commonjs/sdk/activities.d.ts.map +1 -1
  140. package/dist/commonjs/sdk/categories.d.ts +3 -3
  141. package/dist/commonjs/sdk/categories.d.ts.map +1 -1
  142. package/dist/commonjs/sdk/friends.d.ts +29 -0
  143. package/dist/commonjs/sdk/friends.d.ts.map +1 -0
  144. package/dist/commonjs/sdk/friends.js +54 -0
  145. package/dist/commonjs/sdk/friends.js.map +1 -0
  146. package/dist/commonjs/sdk/posts.d.ts +4 -4
  147. package/dist/commonjs/sdk/posts.d.ts.map +1 -1
  148. package/dist/commonjs/sdk/schools.d.ts +1 -1
  149. package/dist/commonjs/sdk/schools.d.ts.map +1 -1
  150. package/dist/commonjs/sdk/users.d.ts +8 -5
  151. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  152. package/dist/commonjs/sdk/users.js +4 -0
  153. package/dist/commonjs/sdk/users.js.map +1 -1
  154. package/dist/esm/funcs/categories-create.d.ts +1 -1
  155. package/dist/esm/funcs/categories-create.d.ts.map +1 -1
  156. package/dist/esm/funcs/categories-create.js +3 -2
  157. package/dist/esm/funcs/categories-create.js.map +1 -1
  158. package/dist/esm/funcs/categories-delete.js +2 -2
  159. package/dist/esm/funcs/categories-delete.js.map +1 -1
  160. package/dist/esm/funcs/categories-get-all.d.ts +1 -1
  161. package/dist/esm/funcs/categories-get-all.d.ts.map +1 -1
  162. package/dist/esm/funcs/categories-get-all.js +3 -2
  163. package/dist/esm/funcs/categories-get-all.js.map +1 -1
  164. package/dist/esm/funcs/categories-update.d.ts +1 -1
  165. package/dist/esm/funcs/categories-update.d.ts.map +1 -1
  166. package/dist/esm/funcs/categories-update.js +3 -2
  167. package/dist/esm/funcs/categories-update.js.map +1 -1
  168. package/dist/esm/funcs/schools-get-all.js +2 -2
  169. package/dist/esm/funcs/schools-get-all.js.map +1 -1
  170. package/dist/esm/funcs/schools-get.d.ts +1 -1
  171. package/dist/esm/funcs/schools-get.d.ts.map +1 -1
  172. package/dist/esm/funcs/schools-get.js +3 -2
  173. package/dist/esm/funcs/schools-get.js.map +1 -1
  174. package/dist/esm/funcs/users-activities-create.d.ts +1 -1
  175. package/dist/esm/funcs/users-activities-create.d.ts.map +1 -1
  176. package/dist/esm/funcs/users-activities-create.js +3 -2
  177. package/dist/esm/funcs/users-activities-create.js.map +1 -1
  178. package/dist/esm/funcs/users-activities-delete.js +2 -2
  179. package/dist/esm/funcs/users-activities-delete.js.map +1 -1
  180. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts +1 -1
  181. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts.map +1 -1
  182. package/dist/esm/funcs/users-activities-get-all-of-user.js +3 -2
  183. package/dist/esm/funcs/users-activities-get-all-of-user.js.map +1 -1
  184. package/dist/esm/funcs/users-activities-get.d.ts +1 -1
  185. package/dist/esm/funcs/users-activities-get.d.ts.map +1 -1
  186. package/dist/esm/funcs/users-activities-get.js +3 -2
  187. package/dist/esm/funcs/users-activities-get.js.map +1 -1
  188. package/dist/esm/funcs/users-activities-me.d.ts +1 -1
  189. package/dist/esm/funcs/users-activities-me.d.ts.map +1 -1
  190. package/dist/esm/funcs/users-activities-me.js +3 -2
  191. package/dist/esm/funcs/users-activities-me.js.map +1 -1
  192. package/dist/esm/funcs/users-activities-update.d.ts +1 -1
  193. package/dist/esm/funcs/users-activities-update.d.ts.map +1 -1
  194. package/dist/esm/funcs/users-activities-update.js +3 -2
  195. package/dist/esm/funcs/users-activities-update.js.map +1 -1
  196. package/dist/esm/funcs/users-delete.js +2 -2
  197. package/dist/esm/funcs/users-delete.js.map +1 -1
  198. package/dist/esm/funcs/users-friends-accept.d.ts +14 -0
  199. package/dist/esm/funcs/users-friends-accept.d.ts.map +1 -0
  200. package/dist/esm/funcs/users-friends-accept.js +91 -0
  201. package/dist/esm/funcs/users-friends-accept.js.map +1 -0
  202. package/dist/esm/funcs/users-friends-list.d.ts +14 -0
  203. package/dist/esm/funcs/users-friends-list.d.ts.map +1 -0
  204. package/dist/esm/funcs/users-friends-list.js +92 -0
  205. package/dist/esm/funcs/users-friends-list.js.map +1 -0
  206. package/dist/esm/funcs/users-friends-pending.d.ts +14 -0
  207. package/dist/esm/funcs/users-friends-pending.d.ts.map +1 -0
  208. package/dist/esm/funcs/users-friends-pending.js +77 -0
  209. package/dist/esm/funcs/users-friends-pending.js.map +1 -0
  210. package/dist/esm/funcs/users-friends-reject.d.ts +14 -0
  211. package/dist/esm/funcs/users-friends-reject.d.ts.map +1 -0
  212. package/dist/esm/funcs/users-friends-reject.js +91 -0
  213. package/dist/esm/funcs/users-friends-reject.js.map +1 -0
  214. package/dist/esm/funcs/users-friends-remove.d.ts +14 -0
  215. package/dist/esm/funcs/users-friends-remove.d.ts.map +1 -0
  216. package/dist/esm/funcs/users-friends-remove.js +91 -0
  217. package/dist/esm/funcs/users-friends-remove.js.map +1 -0
  218. package/dist/esm/funcs/users-friends-send-request.d.ts +14 -0
  219. package/dist/esm/funcs/users-friends-send-request.d.ts.map +1 -0
  220. package/dist/esm/funcs/users-friends-send-request.js +91 -0
  221. package/dist/esm/funcs/users-friends-send-request.js.map +1 -0
  222. package/dist/esm/funcs/users-get.d.ts +1 -1
  223. package/dist/esm/funcs/users-get.d.ts.map +1 -1
  224. package/dist/esm/funcs/users-get.js +3 -2
  225. package/dist/esm/funcs/users-get.js.map +1 -1
  226. package/dist/esm/funcs/users-login.d.ts +1 -1
  227. package/dist/esm/funcs/users-login.d.ts.map +1 -1
  228. package/dist/esm/funcs/users-login.js +3 -2
  229. package/dist/esm/funcs/users-login.js.map +1 -1
  230. package/dist/esm/funcs/users-me.d.ts +1 -1
  231. package/dist/esm/funcs/users-me.d.ts.map +1 -1
  232. package/dist/esm/funcs/users-me.js +3 -2
  233. package/dist/esm/funcs/users-me.js.map +1 -1
  234. package/dist/esm/funcs/users-posts-delete.js +2 -2
  235. package/dist/esm/funcs/users-posts-delete.js.map +1 -1
  236. package/dist/esm/funcs/users-posts-feed.d.ts +1 -1
  237. package/dist/esm/funcs/users-posts-feed.d.ts.map +1 -1
  238. package/dist/esm/funcs/users-posts-feed.js +3 -2
  239. package/dist/esm/funcs/users-posts-feed.js.map +1 -1
  240. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts +1 -1
  241. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts.map +1 -1
  242. package/dist/esm/funcs/users-posts-get-by-post-id.js +3 -2
  243. package/dist/esm/funcs/users-posts-get-by-post-id.js.map +1 -1
  244. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts +1 -1
  245. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts.map +1 -1
  246. package/dist/esm/funcs/users-posts-get-by-user-id.js +3 -2
  247. package/dist/esm/funcs/users-posts-get-by-user-id.js.map +1 -1
  248. package/dist/esm/funcs/users-posts-update.d.ts +1 -1
  249. package/dist/esm/funcs/users-posts-update.d.ts.map +1 -1
  250. package/dist/esm/funcs/users-posts-update.js +3 -2
  251. package/dist/esm/funcs/users-posts-update.js.map +1 -1
  252. package/dist/esm/funcs/users-signup.d.ts +1 -1
  253. package/dist/esm/funcs/users-signup.d.ts.map +1 -1
  254. package/dist/esm/funcs/users-signup.js +3 -2
  255. package/dist/esm/funcs/users-signup.js.map +1 -1
  256. package/dist/esm/funcs/users-update.d.ts +1 -1
  257. package/dist/esm/funcs/users-update.d.ts.map +1 -1
  258. package/dist/esm/funcs/users-update.js +3 -2
  259. package/dist/esm/funcs/users-update.js.map +1 -1
  260. package/dist/esm/lib/config.d.ts +3 -3
  261. package/dist/esm/lib/config.js +3 -3
  262. package/dist/esm/models/operations/accept-friend-request.d.ts +15 -0
  263. package/dist/esm/models/operations/accept-friend-request.d.ts.map +1 -0
  264. package/dist/esm/models/operations/accept-friend-request.js +12 -0
  265. package/dist/esm/models/operations/accept-friend-request.js.map +1 -0
  266. package/dist/esm/models/operations/index.d.ts +6 -0
  267. package/dist/esm/models/operations/index.d.ts.map +1 -1
  268. package/dist/esm/models/operations/index.js +6 -0
  269. package/dist/esm/models/operations/index.js.map +1 -1
  270. package/dist/esm/models/operations/list-friends.d.ts +26 -0
  271. package/dist/esm/models/operations/list-friends.d.ts.map +1 -0
  272. package/dist/esm/models/operations/list-friends.js +27 -0
  273. package/dist/esm/models/operations/list-friends.js.map +1 -0
  274. package/dist/esm/models/operations/pending-friend-requests.d.ts +16 -0
  275. package/dist/esm/models/operations/pending-friend-requests.d.ts.map +1 -0
  276. package/dist/esm/models/operations/pending-friend-requests.js +20 -0
  277. package/dist/esm/models/operations/pending-friend-requests.js.map +1 -0
  278. package/dist/esm/models/operations/reject-friend-request.d.ts +15 -0
  279. package/dist/esm/models/operations/reject-friend-request.d.ts.map +1 -0
  280. package/dist/esm/models/operations/reject-friend-request.js +12 -0
  281. package/dist/esm/models/operations/reject-friend-request.js.map +1 -0
  282. package/dist/esm/models/operations/remove-friend.d.ts +12 -0
  283. package/dist/esm/models/operations/remove-friend.d.ts.map +1 -0
  284. package/dist/esm/models/operations/remove-friend.js +12 -0
  285. package/dist/esm/models/operations/remove-friend.js.map +1 -0
  286. package/dist/esm/models/operations/send-friend-request.d.ts +12 -0
  287. package/dist/esm/models/operations/send-friend-request.d.ts.map +1 -0
  288. package/dist/esm/models/operations/send-friend-request.js +12 -0
  289. package/dist/esm/models/operations/send-friend-request.js.map +1 -0
  290. package/dist/esm/sdk/activities.d.ts +5 -5
  291. package/dist/esm/sdk/activities.d.ts.map +1 -1
  292. package/dist/esm/sdk/categories.d.ts +3 -3
  293. package/dist/esm/sdk/categories.d.ts.map +1 -1
  294. package/dist/esm/sdk/friends.d.ts +29 -0
  295. package/dist/esm/sdk/friends.d.ts.map +1 -0
  296. package/dist/esm/sdk/friends.js +50 -0
  297. package/dist/esm/sdk/friends.js.map +1 -0
  298. package/dist/esm/sdk/posts.d.ts +4 -4
  299. package/dist/esm/sdk/posts.d.ts.map +1 -1
  300. package/dist/esm/sdk/schools.d.ts +1 -1
  301. package/dist/esm/sdk/schools.d.ts.map +1 -1
  302. package/dist/esm/sdk/users.d.ts +8 -5
  303. package/dist/esm/sdk/users.d.ts.map +1 -1
  304. package/dist/esm/sdk/users.js +4 -0
  305. package/dist/esm/sdk/users.js.map +1 -1
  306. package/jsr.json +1 -1
  307. package/package.json +1 -1
  308. package/rest-api/cypress/e2e/friend-endpoints.cy.js +262 -0
  309. package/rest-api/cypress/e2e/{school-endpoints.cy.ts → school-endpoints.cy.js} +1 -1
  310. package/rest-api/cypress.config.ts +45 -2
  311. package/rest-api/index.js +8 -1
  312. package/rest-api/lib/users.js +7 -5
  313. package/rest-api/routes/FriendFunctions.js +266 -0
  314. package/rest-api/routes/UserActivityFunctions.js +1 -1
  315. package/src/funcs/categories-create.ts +14 -6
  316. package/src/funcs/categories-delete.ts +3 -2
  317. package/src/funcs/categories-get-all.ts +14 -6
  318. package/src/funcs/categories-update.ts +14 -6
  319. package/src/funcs/schools-get-all.ts +2 -2
  320. package/src/funcs/schools-get.ts +11 -6
  321. package/src/funcs/users-activities-create.ts +14 -6
  322. package/src/funcs/users-activities-delete.ts +3 -2
  323. package/src/funcs/users-activities-get-all-of-user.ts +18 -6
  324. package/src/funcs/users-activities-get.ts +14 -6
  325. package/src/funcs/users-activities-me.ts +14 -6
  326. package/src/funcs/users-activities-update.ts +14 -6
  327. package/src/funcs/users-delete.ts +3 -2
  328. package/src/funcs/users-friends-accept.ts +176 -0
  329. package/src/funcs/users-friends-list.ts +182 -0
  330. package/src/funcs/users-friends-pending.ts +162 -0
  331. package/src/funcs/users-friends-reject.ts +176 -0
  332. package/src/funcs/users-friends-remove.ts +175 -0
  333. package/src/funcs/users-friends-send-request.ts +176 -0
  334. package/src/funcs/users-get.ts +11 -6
  335. package/src/funcs/users-login.ts +11 -6
  336. package/src/funcs/users-me.ts +14 -6
  337. package/src/funcs/users-posts-delete.ts +3 -2
  338. package/src/funcs/users-posts-feed.ts +8 -6
  339. package/src/funcs/users-posts-get-by-post-id.ts +11 -6
  340. package/src/funcs/users-posts-get-by-user-id.ts +14 -6
  341. package/src/funcs/users-posts-update.ts +11 -6
  342. package/src/funcs/users-signup.ts +8 -6
  343. package/src/funcs/users-update.ts +11 -6
  344. package/src/lib/config.ts +3 -3
  345. package/src/models/operations/accept-friend-request.ts +33 -0
  346. package/src/models/operations/index.ts +6 -0
  347. package/src/models/operations/list-friends.ts +68 -0
  348. package/src/models/operations/pending-friend-requests.ts +43 -0
  349. package/src/models/operations/reject-friend-request.ts +33 -0
  350. package/src/models/operations/remove-friend.ts +30 -0
  351. package/src/models/operations/send-friend-request.ts +30 -0
  352. package/src/sdk/activities.ts +5 -5
  353. package/src/sdk/categories.ts +3 -3
  354. package/src/sdk/friends.ts +97 -0
  355. package/src/sdk/posts.ts +4 -4
  356. package/src/sdk/schools.ts +1 -1
  357. package/src/sdk/users.ts +11 -5
  358. /package/rest-api/cypress/e2e/{activity-post-endpoints.cy.ts → activity-post-endpoints.cy.js} +0 -0
  359. /package/rest-api/cypress/e2e/{category-endpoints.cy.ts → category-endpoints.cy.js} +0 -0
  360. /package/rest-api/cypress/e2e/{user-activity-endpoints.cy.ts → user-activity-endpoints.cy.js} +0 -0
  361. /package/rest-api/cypress/e2e/{user-endpoints.cy.ts → user-endpoints.cy.js} +0 -0
@@ -0,0 +1,175 @@
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 friend
30
+ */
31
+ export function usersFriendsRemove(
32
+ client: SenseiProductivityCore,
33
+ request: operations.RemoveFriendRequest,
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.RemoveFriendRequest,
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.RemoveFriendRequest$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
+ friendId: encodeSimple("friendId", payload.friendId, {
88
+ explode: false,
89
+ charEncoding: "percent",
90
+ }),
91
+ };
92
+
93
+ const path = pathToFunc("/api/v1/users/friends/{friendId}")(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: "removeFriend",
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: ["429", "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.nil([401, 404], z.void()),
167
+ M.fail(429),
168
+ M.fail("5XX"),
169
+ )(response, req);
170
+ if (!result.ok) {
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
173
+
174
+ return [result, { status: "complete", request: req, response }];
175
+ }
@@ -0,0 +1,176 @@
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
+ * Send a friend request to a user
30
+ */
31
+ export function usersFriendsSendRequest(
32
+ client: SenseiProductivityCore,
33
+ request: operations.SendFriendRequestRequest,
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.SendFriendRequestRequest,
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) =>
78
+ z.parse(operations.SendFriendRequestRequest$outboundSchema, value),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed.ok) {
82
+ return [parsed, { status: "invalid" }];
83
+ }
84
+ const payload = parsed.value;
85
+ const body = null;
86
+
87
+ const pathParams = {
88
+ id: encodeSimple("id", payload.id, {
89
+ explode: false,
90
+ charEncoding: "percent",
91
+ }),
92
+ };
93
+
94
+ const path = pathToFunc("/api/v1/users/{id}/friend-request")(pathParams);
95
+
96
+ const headers = new Headers(compactMap({
97
+ Accept: "*/*",
98
+ }));
99
+
100
+ const secConfig = await extractSecurity(client._options.bearerAuth);
101
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
102
+ const requestSecurity = resolveGlobalSecurity(securityInput);
103
+
104
+ const context = {
105
+ options: client._options,
106
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
107
+ operationID: "sendFriendRequest",
108
+ oAuth2Scopes: null,
109
+
110
+ resolvedSecurity: requestSecurity,
111
+
112
+ securitySource: client._options.bearerAuth,
113
+ retryConfig: options?.retries
114
+ || client._options.retryConfig
115
+ || {
116
+ strategy: "backoff",
117
+ backoff: {
118
+ initialInterval: 1000,
119
+ maxInterval: 60000,
120
+ exponent: 1.3,
121
+ maxElapsedTime: 3600000,
122
+ },
123
+ retryConnectionErrors: true,
124
+ }
125
+ || { strategy: "none" },
126
+ retryCodes: options?.retryCodes || ["429", "5XX"],
127
+ };
128
+
129
+ const requestRes = client._createRequest(context, {
130
+ security: requestSecurity,
131
+ method: "POST",
132
+ baseURL: options?.serverURL,
133
+ path: path,
134
+ headers: headers,
135
+ body: body,
136
+ userAgent: client._options.userAgent,
137
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
138
+ }, options);
139
+ if (!requestRes.ok) {
140
+ return [requestRes, { status: "invalid" }];
141
+ }
142
+ const req = requestRes.value;
143
+
144
+ const doResult = await client._do(req, {
145
+ context,
146
+ errorCodes: ["429", "5XX"],
147
+ retryConfig: context.retryConfig,
148
+ retryCodes: context.retryCodes,
149
+ });
150
+ if (!doResult.ok) {
151
+ return [doResult, { status: "request-error", request: req }];
152
+ }
153
+ const response = doResult.value;
154
+
155
+ const [result] = await M.match<
156
+ void,
157
+ | SenseiProductivityError
158
+ | ResponseValidationError
159
+ | ConnectionError
160
+ | RequestAbortedError
161
+ | RequestTimeoutError
162
+ | InvalidRequestError
163
+ | UnexpectedClientError
164
+ | SDKValidationError
165
+ >(
166
+ M.nil(201, z.void()),
167
+ M.nil([400, 401, 404], z.void()),
168
+ M.fail(429),
169
+ M.fail("5XX"),
170
+ )(response, req);
171
+ if (!result.ok) {
172
+ return [result, { status: "complete", request: req, response }];
173
+ }
174
+
175
+ return [result, { status: "complete", request: req, response }];
176
+ }
@@ -24,6 +24,7 @@ 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";
27
28
 
28
29
  /**
29
30
  * Get a user's public profile by ID
@@ -34,7 +35,7 @@ export function usersGet(
34
35
  options?: RequestOptions,
35
36
  ): APIPromise<
36
37
  Result<
37
- operations.GetUserByIdResponse,
38
+ operations.GetUserByIdResponse | undefined,
38
39
  | SenseiProductivityError
39
40
  | ResponseValidationError
40
41
  | ConnectionError
@@ -59,7 +60,7 @@ async function $do(
59
60
  ): Promise<
60
61
  [
61
62
  Result<
62
- operations.GetUserByIdResponse,
63
+ operations.GetUserByIdResponse | undefined,
63
64
  | SenseiProductivityError
64
65
  | ResponseValidationError
65
66
  | ConnectionError
@@ -142,7 +143,7 @@ async function $do(
142
143
 
143
144
  const doResult = await client._do(req, {
144
145
  context,
145
- errorCodes: ["401", "403", "404", "4XX", "5XX"],
146
+ errorCodes: ["429", "5XX"],
146
147
  retryConfig: context.retryConfig,
147
148
  retryCodes: context.retryCodes,
148
149
  });
@@ -152,7 +153,7 @@ async function $do(
152
153
  const response = doResult.value;
153
154
 
154
155
  const [result] = await M.match<
155
- operations.GetUserByIdResponse,
156
+ operations.GetUserByIdResponse | undefined,
156
157
  | SenseiProductivityError
157
158
  | ResponseValidationError
158
159
  | ConnectionError
@@ -162,8 +163,12 @@ async function $do(
162
163
  | UnexpectedClientError
163
164
  | SDKValidationError
164
165
  >(
165
- M.json(200, operations.GetUserByIdResponse$inboundSchema),
166
- M.fail([401, 403, 404, "4XX"]),
166
+ M.json(200, types$.optional(operations.GetUserByIdResponse$inboundSchema)),
167
+ M.nil(
168
+ [401, 403, 404],
169
+ types$.optional(operations.GetUserByIdResponse$inboundSchema),
170
+ ),
171
+ M.fail(429),
167
172
  M.fail("5XX"),
168
173
  )(response, req);
169
174
  if (!result.ok) {
@@ -24,6 +24,7 @@ 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";
27
28
 
28
29
  /**
29
30
  * Login the user and also return an access token the API client can use for further authentication
@@ -34,7 +35,7 @@ export function usersLogin(
34
35
  options?: RequestOptions,
35
36
  ): APIPromise<
36
37
  Result<
37
- operations.UserLoginResponse,
38
+ operations.UserLoginResponse | undefined,
38
39
  | SenseiProductivityError
39
40
  | ResponseValidationError
40
41
  | ConnectionError
@@ -59,7 +60,7 @@ async function $do(
59
60
  ): Promise<
60
61
  [
61
62
  Result<
62
- operations.UserLoginResponse,
63
+ operations.UserLoginResponse | undefined,
63
64
  | SenseiProductivityError
64
65
  | ResponseValidationError
65
66
  | ConnectionError
@@ -136,7 +137,7 @@ async function $do(
136
137
 
137
138
  const doResult = await client._do(req, {
138
139
  context,
139
- errorCodes: ["400", "401", "4XX", "5XX"],
140
+ errorCodes: ["429", "5XX"],
140
141
  retryConfig: context.retryConfig,
141
142
  retryCodes: context.retryCodes,
142
143
  });
@@ -146,7 +147,7 @@ async function $do(
146
147
  const response = doResult.value;
147
148
 
148
149
  const [result] = await M.match<
149
- operations.UserLoginResponse,
150
+ operations.UserLoginResponse | undefined,
150
151
  | SenseiProductivityError
151
152
  | ResponseValidationError
152
153
  | ConnectionError
@@ -156,8 +157,12 @@ async function $do(
156
157
  | UnexpectedClientError
157
158
  | SDKValidationError
158
159
  >(
159
- M.json(200, operations.UserLoginResponse$inboundSchema),
160
- M.fail([400, 401, "4XX"]),
160
+ M.json(200, types$.optional(operations.UserLoginResponse$inboundSchema)),
161
+ M.nil(
162
+ [400, 401],
163
+ types$.optional(operations.UserLoginResponse$inboundSchema),
164
+ ),
165
+ M.fail(429),
161
166
  M.fail("5XX"),
162
167
  )(response, req);
163
168
  if (!result.ok) {
@@ -21,6 +21,7 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
21
21
  import * as operations from "../models/operations/index.js";
22
22
  import { APICall, APIPromise } from "../types/async.js";
23
23
  import { Result } from "../types/fp.js";
24
+ import * as types$ from "../types/primitives.js";
24
25
 
25
26
  /**
26
27
  * Get the currently authenticated user's profile
@@ -30,7 +31,7 @@ export function usersMe(
30
31
  options?: RequestOptions,
31
32
  ): APIPromise<
32
33
  Result<
33
- operations.GetCurrentUserResponse,
34
+ operations.GetCurrentUserResponse | undefined,
34
35
  | SenseiProductivityError
35
36
  | ResponseValidationError
36
37
  | ConnectionError
@@ -53,7 +54,7 @@ async function $do(
53
54
  ): Promise<
54
55
  [
55
56
  Result<
56
- operations.GetCurrentUserResponse,
57
+ operations.GetCurrentUserResponse | undefined,
57
58
  | SenseiProductivityError
58
59
  | ResponseValidationError
59
60
  | ConnectionError
@@ -117,7 +118,7 @@ async function $do(
117
118
 
118
119
  const doResult = await client._do(req, {
119
120
  context,
120
- errorCodes: ["401", "4XX", "5XX"],
121
+ errorCodes: ["429", "5XX"],
121
122
  retryConfig: context.retryConfig,
122
123
  retryCodes: context.retryCodes,
123
124
  });
@@ -127,7 +128,7 @@ async function $do(
127
128
  const response = doResult.value;
128
129
 
129
130
  const [result] = await M.match<
130
- operations.GetCurrentUserResponse,
131
+ operations.GetCurrentUserResponse | undefined,
131
132
  | SenseiProductivityError
132
133
  | ResponseValidationError
133
134
  | ConnectionError
@@ -137,8 +138,15 @@ async function $do(
137
138
  | UnexpectedClientError
138
139
  | SDKValidationError
139
140
  >(
140
- M.json(200, operations.GetCurrentUserResponse$inboundSchema),
141
- M.fail([401, "4XX"]),
141
+ M.json(
142
+ 200,
143
+ types$.optional(operations.GetCurrentUserResponse$inboundSchema),
144
+ ),
145
+ M.nil(
146
+ 401,
147
+ types$.optional(operations.GetCurrentUserResponse$inboundSchema),
148
+ ),
149
+ M.fail(429),
142
150
  M.fail("5XX"),
143
151
  )(response, req);
144
152
  if (!result.ok) {
@@ -142,7 +142,7 @@ async function $do(
142
142
 
143
143
  const doResult = await client._do(req, {
144
144
  context,
145
- errorCodes: ["401", "403", "404", "4XX", "5XX"],
145
+ errorCodes: ["429", "5XX"],
146
146
  retryConfig: context.retryConfig,
147
147
  retryCodes: context.retryCodes,
148
148
  });
@@ -163,7 +163,8 @@ async function $do(
163
163
  | SDKValidationError
164
164
  >(
165
165
  M.nil(200, z.void()),
166
- M.fail([401, 403, 404, "4XX"]),
166
+ M.nil([401, 403, 404], z.void()),
167
+ M.fail(429),
167
168
  M.fail("5XX"),
168
169
  )(response, req);
169
170
  if (!result.ok) {
@@ -24,6 +24,7 @@ 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";
27
28
 
28
29
  /**
29
30
  * Get the social feed of posts from the authenticated user's friends
@@ -34,7 +35,7 @@ export function usersPostsFeed(
34
35
  options?: RequestOptions,
35
36
  ): APIPromise<
36
37
  Result<
37
- operations.GetFeedResponse,
38
+ operations.GetFeedResponse | undefined,
38
39
  | SenseiProductivityError
39
40
  | ResponseValidationError
40
41
  | ConnectionError
@@ -59,7 +60,7 @@ async function $do(
59
60
  ): Promise<
60
61
  [
61
62
  Result<
62
- operations.GetFeedResponse,
63
+ operations.GetFeedResponse | undefined,
63
64
  | SenseiProductivityError
64
65
  | ResponseValidationError
65
66
  | ConnectionError
@@ -142,7 +143,7 @@ async function $do(
142
143
 
143
144
  const doResult = await client._do(req, {
144
145
  context,
145
- errorCodes: ["401", "4XX", "5XX"],
146
+ errorCodes: ["429", "5XX"],
146
147
  retryConfig: context.retryConfig,
147
148
  retryCodes: context.retryCodes,
148
149
  });
@@ -152,7 +153,7 @@ async function $do(
152
153
  const response = doResult.value;
153
154
 
154
155
  const [result] = await M.match<
155
- operations.GetFeedResponse,
156
+ operations.GetFeedResponse | undefined,
156
157
  | SenseiProductivityError
157
158
  | ResponseValidationError
158
159
  | ConnectionError
@@ -162,8 +163,9 @@ async function $do(
162
163
  | UnexpectedClientError
163
164
  | SDKValidationError
164
165
  >(
165
- M.json(200, operations.GetFeedResponse$inboundSchema),
166
- M.fail([401, "4XX"]),
166
+ M.json(200, types$.optional(operations.GetFeedResponse$inboundSchema)),
167
+ M.nil(401, types$.optional(operations.GetFeedResponse$inboundSchema)),
168
+ M.fail(429),
167
169
  M.fail("5XX"),
168
170
  )(response, req);
169
171
  if (!result.ok) {
@@ -24,6 +24,7 @@ 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";
27
28
 
28
29
  /**
29
30
  * Get a specific post by ID
@@ -34,7 +35,7 @@ export function usersPostsGetByPostId(
34
35
  options?: RequestOptions,
35
36
  ): APIPromise<
36
37
  Result<
37
- operations.GetPostByIdResponse,
38
+ operations.GetPostByIdResponse | undefined,
38
39
  | SenseiProductivityError
39
40
  | ResponseValidationError
40
41
  | ConnectionError
@@ -59,7 +60,7 @@ async function $do(
59
60
  ): Promise<
60
61
  [
61
62
  Result<
62
- operations.GetPostByIdResponse,
63
+ operations.GetPostByIdResponse | undefined,
63
64
  | SenseiProductivityError
64
65
  | ResponseValidationError
65
66
  | ConnectionError
@@ -142,7 +143,7 @@ async function $do(
142
143
 
143
144
  const doResult = await client._do(req, {
144
145
  context,
145
- errorCodes: ["401", "403", "404", "4XX", "5XX"],
146
+ errorCodes: ["429", "5XX"],
146
147
  retryConfig: context.retryConfig,
147
148
  retryCodes: context.retryCodes,
148
149
  });
@@ -152,7 +153,7 @@ async function $do(
152
153
  const response = doResult.value;
153
154
 
154
155
  const [result] = await M.match<
155
- operations.GetPostByIdResponse,
156
+ operations.GetPostByIdResponse | undefined,
156
157
  | SenseiProductivityError
157
158
  | ResponseValidationError
158
159
  | ConnectionError
@@ -162,8 +163,12 @@ async function $do(
162
163
  | UnexpectedClientError
163
164
  | SDKValidationError
164
165
  >(
165
- M.json(200, operations.GetPostByIdResponse$inboundSchema),
166
- M.fail([401, 403, 404, "4XX"]),
166
+ M.json(200, types$.optional(operations.GetPostByIdResponse$inboundSchema)),
167
+ M.nil(
168
+ [401, 403, 404],
169
+ types$.optional(operations.GetPostByIdResponse$inboundSchema),
170
+ ),
171
+ M.fail(429),
167
172
  M.fail("5XX"),
168
173
  )(response, req);
169
174
  if (!result.ok) {