@aurora-interactive/sensei-productivity 1.6.0 → 1.8.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 (366) 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 +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.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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +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 +4 -4
  109. package/dist/commonjs/lib/config.js +4 -4
  110. package/dist/commonjs/lib/files.d.ts +13 -0
  111. package/dist/commonjs/lib/files.d.ts.map +1 -1
  112. package/dist/commonjs/lib/files.js +19 -0
  113. package/dist/commonjs/lib/files.js.map +1 -1
  114. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  115. package/dist/commonjs/lib/sdks.js +8 -4
  116. package/dist/commonjs/lib/sdks.js.map +1 -1
  117. package/dist/commonjs/lib/url.d.ts.map +1 -1
  118. package/dist/commonjs/lib/url.js +4 -2
  119. package/dist/commonjs/lib/url.js.map +1 -1
  120. package/dist/commonjs/models/operations/get-feed.d.ts +2 -0
  121. package/dist/commonjs/models/operations/get-feed.d.ts.map +1 -1
  122. package/dist/commonjs/models/operations/get-feed.js +2 -0
  123. package/dist/commonjs/models/operations/get-feed.js.map +1 -1
  124. package/dist/commonjs/models/operations/get-post-by-id.d.ts +2 -0
  125. package/dist/commonjs/models/operations/get-post-by-id.d.ts.map +1 -1
  126. package/dist/commonjs/models/operations/get-post-by-id.js +2 -0
  127. package/dist/commonjs/models/operations/get-post-by-id.js.map +1 -1
  128. package/dist/commonjs/models/operations/get-user-posts.d.ts +2 -0
  129. package/dist/commonjs/models/operations/get-user-posts.d.ts.map +1 -1
  130. package/dist/commonjs/models/operations/get-user-posts.js +2 -0
  131. package/dist/commonjs/models/operations/get-user-posts.js.map +1 -1
  132. package/dist/commonjs/models/operations/index.d.ts +2 -0
  133. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  134. package/dist/commonjs/models/operations/index.js +2 -0
  135. package/dist/commonjs/models/operations/index.js.map +1 -1
  136. package/dist/commonjs/models/operations/like-post.d.ts +12 -0
  137. package/dist/commonjs/models/operations/like-post.d.ts.map +1 -0
  138. package/dist/commonjs/models/operations/like-post.js +49 -0
  139. package/dist/commonjs/models/operations/like-post.js.map +1 -0
  140. package/dist/commonjs/models/operations/unlike-post.d.ts +12 -0
  141. package/dist/commonjs/models/operations/unlike-post.d.ts.map +1 -0
  142. package/dist/commonjs/models/operations/unlike-post.js +49 -0
  143. package/dist/commonjs/models/operations/unlike-post.js.map +1 -0
  144. package/dist/commonjs/sdk/activities.d.ts +5 -5
  145. package/dist/commonjs/sdk/activities.d.ts.map +1 -1
  146. package/dist/commonjs/sdk/categories.d.ts +3 -3
  147. package/dist/commonjs/sdk/categories.d.ts.map +1 -1
  148. package/dist/commonjs/sdk/friends.d.ts +2 -2
  149. package/dist/commonjs/sdk/friends.d.ts.map +1 -1
  150. package/dist/commonjs/sdk/posts.d.ts +12 -4
  151. package/dist/commonjs/sdk/posts.d.ts.map +1 -1
  152. package/dist/commonjs/sdk/posts.js +14 -0
  153. package/dist/commonjs/sdk/posts.js.map +1 -1
  154. package/dist/commonjs/sdk/schools.d.ts +1 -1
  155. package/dist/commonjs/sdk/schools.d.ts.map +1 -1
  156. package/dist/commonjs/sdk/users.d.ts +5 -5
  157. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  158. package/dist/esm/funcs/categories-create.d.ts +1 -1
  159. package/dist/esm/funcs/categories-create.d.ts.map +1 -1
  160. package/dist/esm/funcs/categories-create.js +3 -2
  161. package/dist/esm/funcs/categories-create.js.map +1 -1
  162. package/dist/esm/funcs/categories-delete.js +2 -2
  163. package/dist/esm/funcs/categories-delete.js.map +1 -1
  164. package/dist/esm/funcs/categories-get-all.d.ts +1 -1
  165. package/dist/esm/funcs/categories-get-all.d.ts.map +1 -1
  166. package/dist/esm/funcs/categories-get-all.js +3 -2
  167. package/dist/esm/funcs/categories-get-all.js.map +1 -1
  168. package/dist/esm/funcs/categories-update.d.ts +1 -1
  169. package/dist/esm/funcs/categories-update.d.ts.map +1 -1
  170. package/dist/esm/funcs/categories-update.js +3 -2
  171. package/dist/esm/funcs/categories-update.js.map +1 -1
  172. package/dist/esm/funcs/schools-get-all.js +2 -2
  173. package/dist/esm/funcs/schools-get-all.js.map +1 -1
  174. package/dist/esm/funcs/schools-get.d.ts +1 -1
  175. package/dist/esm/funcs/schools-get.d.ts.map +1 -1
  176. package/dist/esm/funcs/schools-get.js +3 -2
  177. package/dist/esm/funcs/schools-get.js.map +1 -1
  178. package/dist/esm/funcs/users-activities-create.d.ts +1 -1
  179. package/dist/esm/funcs/users-activities-create.d.ts.map +1 -1
  180. package/dist/esm/funcs/users-activities-create.js +3 -2
  181. package/dist/esm/funcs/users-activities-create.js.map +1 -1
  182. package/dist/esm/funcs/users-activities-delete.js +2 -2
  183. package/dist/esm/funcs/users-activities-delete.js.map +1 -1
  184. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts +1 -1
  185. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts.map +1 -1
  186. package/dist/esm/funcs/users-activities-get-all-of-user.js +3 -2
  187. package/dist/esm/funcs/users-activities-get-all-of-user.js.map +1 -1
  188. package/dist/esm/funcs/users-activities-get.d.ts +1 -1
  189. package/dist/esm/funcs/users-activities-get.d.ts.map +1 -1
  190. package/dist/esm/funcs/users-activities-get.js +3 -2
  191. package/dist/esm/funcs/users-activities-get.js.map +1 -1
  192. package/dist/esm/funcs/users-activities-me.d.ts +1 -1
  193. package/dist/esm/funcs/users-activities-me.d.ts.map +1 -1
  194. package/dist/esm/funcs/users-activities-me.js +3 -2
  195. package/dist/esm/funcs/users-activities-me.js.map +1 -1
  196. package/dist/esm/funcs/users-activities-update.d.ts +1 -1
  197. package/dist/esm/funcs/users-activities-update.d.ts.map +1 -1
  198. package/dist/esm/funcs/users-activities-update.js +3 -2
  199. package/dist/esm/funcs/users-activities-update.js.map +1 -1
  200. package/dist/esm/funcs/users-delete.js +2 -2
  201. package/dist/esm/funcs/users-delete.js.map +1 -1
  202. package/dist/esm/funcs/users-friends-accept.js +2 -2
  203. package/dist/esm/funcs/users-friends-accept.js.map +1 -1
  204. package/dist/esm/funcs/users-friends-list.d.ts +1 -1
  205. package/dist/esm/funcs/users-friends-list.d.ts.map +1 -1
  206. package/dist/esm/funcs/users-friends-list.js +3 -2
  207. package/dist/esm/funcs/users-friends-list.js.map +1 -1
  208. package/dist/esm/funcs/users-friends-pending.d.ts +1 -1
  209. package/dist/esm/funcs/users-friends-pending.d.ts.map +1 -1
  210. package/dist/esm/funcs/users-friends-pending.js +3 -2
  211. package/dist/esm/funcs/users-friends-pending.js.map +1 -1
  212. package/dist/esm/funcs/users-friends-reject.js +2 -2
  213. package/dist/esm/funcs/users-friends-reject.js.map +1 -1
  214. package/dist/esm/funcs/users-friends-remove.js +2 -2
  215. package/dist/esm/funcs/users-friends-remove.js.map +1 -1
  216. package/dist/esm/funcs/users-friends-send-request.js +2 -2
  217. package/dist/esm/funcs/users-friends-send-request.js.map +1 -1
  218. package/dist/esm/funcs/users-get.d.ts +1 -1
  219. package/dist/esm/funcs/users-get.d.ts.map +1 -1
  220. package/dist/esm/funcs/users-get.js +3 -2
  221. package/dist/esm/funcs/users-get.js.map +1 -1
  222. package/dist/esm/funcs/users-login.d.ts +1 -1
  223. package/dist/esm/funcs/users-login.d.ts.map +1 -1
  224. package/dist/esm/funcs/users-login.js +3 -2
  225. package/dist/esm/funcs/users-login.js.map +1 -1
  226. package/dist/esm/funcs/users-me.d.ts +1 -1
  227. package/dist/esm/funcs/users-me.d.ts.map +1 -1
  228. package/dist/esm/funcs/users-me.js +3 -2
  229. package/dist/esm/funcs/users-me.js.map +1 -1
  230. package/dist/esm/funcs/users-posts-delete.js +2 -2
  231. package/dist/esm/funcs/users-posts-delete.js.map +1 -1
  232. package/dist/esm/funcs/users-posts-feed.d.ts +1 -1
  233. package/dist/esm/funcs/users-posts-feed.d.ts.map +1 -1
  234. package/dist/esm/funcs/users-posts-feed.js +3 -2
  235. package/dist/esm/funcs/users-posts-feed.js.map +1 -1
  236. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts +1 -1
  237. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts.map +1 -1
  238. package/dist/esm/funcs/users-posts-get-by-post-id.js +3 -2
  239. package/dist/esm/funcs/users-posts-get-by-post-id.js.map +1 -1
  240. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts +1 -1
  241. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts.map +1 -1
  242. package/dist/esm/funcs/users-posts-get-by-user-id.js +3 -2
  243. package/dist/esm/funcs/users-posts-get-by-user-id.js.map +1 -1
  244. package/dist/esm/funcs/users-posts-like.d.ts +14 -0
  245. package/dist/esm/funcs/users-posts-like.d.ts.map +1 -0
  246. package/dist/esm/funcs/users-posts-like.js +91 -0
  247. package/dist/esm/funcs/users-posts-like.js.map +1 -0
  248. package/dist/esm/funcs/users-posts-remove-like.d.ts +14 -0
  249. package/dist/esm/funcs/users-posts-remove-like.d.ts.map +1 -0
  250. package/dist/esm/funcs/users-posts-remove-like.js +91 -0
  251. package/dist/esm/funcs/users-posts-remove-like.js.map +1 -0
  252. package/dist/esm/funcs/users-posts-update.d.ts +1 -1
  253. package/dist/esm/funcs/users-posts-update.d.ts.map +1 -1
  254. package/dist/esm/funcs/users-posts-update.js +3 -2
  255. package/dist/esm/funcs/users-posts-update.js.map +1 -1
  256. package/dist/esm/funcs/users-signup.d.ts +1 -1
  257. package/dist/esm/funcs/users-signup.d.ts.map +1 -1
  258. package/dist/esm/funcs/users-signup.js +3 -2
  259. package/dist/esm/funcs/users-signup.js.map +1 -1
  260. package/dist/esm/funcs/users-update.d.ts +1 -1
  261. package/dist/esm/funcs/users-update.d.ts.map +1 -1
  262. package/dist/esm/funcs/users-update.js +3 -2
  263. package/dist/esm/funcs/users-update.js.map +1 -1
  264. package/dist/esm/lib/config.d.ts +4 -4
  265. package/dist/esm/lib/config.js +4 -4
  266. package/dist/esm/lib/files.d.ts +13 -0
  267. package/dist/esm/lib/files.d.ts.map +1 -1
  268. package/dist/esm/lib/files.js +18 -0
  269. package/dist/esm/lib/files.js.map +1 -1
  270. package/dist/esm/lib/sdks.d.ts.map +1 -1
  271. package/dist/esm/lib/sdks.js +8 -4
  272. package/dist/esm/lib/sdks.js.map +1 -1
  273. package/dist/esm/lib/url.d.ts.map +1 -1
  274. package/dist/esm/lib/url.js +4 -2
  275. package/dist/esm/lib/url.js.map +1 -1
  276. package/dist/esm/models/operations/get-feed.d.ts +2 -0
  277. package/dist/esm/models/operations/get-feed.d.ts.map +1 -1
  278. package/dist/esm/models/operations/get-feed.js +2 -0
  279. package/dist/esm/models/operations/get-feed.js.map +1 -1
  280. package/dist/esm/models/operations/get-post-by-id.d.ts +2 -0
  281. package/dist/esm/models/operations/get-post-by-id.d.ts.map +1 -1
  282. package/dist/esm/models/operations/get-post-by-id.js +2 -0
  283. package/dist/esm/models/operations/get-post-by-id.js.map +1 -1
  284. package/dist/esm/models/operations/get-user-posts.d.ts +2 -0
  285. package/dist/esm/models/operations/get-user-posts.d.ts.map +1 -1
  286. package/dist/esm/models/operations/get-user-posts.js +2 -0
  287. package/dist/esm/models/operations/get-user-posts.js.map +1 -1
  288. package/dist/esm/models/operations/index.d.ts +2 -0
  289. package/dist/esm/models/operations/index.d.ts.map +1 -1
  290. package/dist/esm/models/operations/index.js +2 -0
  291. package/dist/esm/models/operations/index.js.map +1 -1
  292. package/dist/esm/models/operations/like-post.d.ts +12 -0
  293. package/dist/esm/models/operations/like-post.d.ts.map +1 -0
  294. package/dist/esm/models/operations/like-post.js +12 -0
  295. package/dist/esm/models/operations/like-post.js.map +1 -0
  296. package/dist/esm/models/operations/unlike-post.d.ts +12 -0
  297. package/dist/esm/models/operations/unlike-post.d.ts.map +1 -0
  298. package/dist/esm/models/operations/unlike-post.js +12 -0
  299. package/dist/esm/models/operations/unlike-post.js.map +1 -0
  300. package/dist/esm/sdk/activities.d.ts +5 -5
  301. package/dist/esm/sdk/activities.d.ts.map +1 -1
  302. package/dist/esm/sdk/categories.d.ts +3 -3
  303. package/dist/esm/sdk/categories.d.ts.map +1 -1
  304. package/dist/esm/sdk/friends.d.ts +2 -2
  305. package/dist/esm/sdk/friends.d.ts.map +1 -1
  306. package/dist/esm/sdk/posts.d.ts +12 -4
  307. package/dist/esm/sdk/posts.d.ts.map +1 -1
  308. package/dist/esm/sdk/posts.js +14 -0
  309. package/dist/esm/sdk/posts.js.map +1 -1
  310. package/dist/esm/sdk/schools.d.ts +1 -1
  311. package/dist/esm/sdk/schools.d.ts.map +1 -1
  312. package/dist/esm/sdk/users.d.ts +5 -5
  313. package/dist/esm/sdk/users.d.ts.map +1 -1
  314. package/jsr.json +1 -1
  315. package/package.json +1 -1
  316. package/rest-api/cypress/e2e/activity-post-endpoints.cy.js +78 -0
  317. package/rest-api/cypress.config.ts +1 -0
  318. package/rest-api/index.js +2 -0
  319. package/rest-api/routes/ActivityPostFunctions.js +107 -10
  320. package/src/funcs/categories-create.ts +14 -6
  321. package/src/funcs/categories-delete.ts +3 -3
  322. package/src/funcs/categories-get-all.ts +14 -6
  323. package/src/funcs/categories-update.ts +14 -7
  324. package/src/funcs/schools-get-all.ts +2 -2
  325. package/src/funcs/schools-get.ts +11 -7
  326. package/src/funcs/users-activities-create.ts +14 -6
  327. package/src/funcs/users-activities-delete.ts +3 -3
  328. package/src/funcs/users-activities-get-all-of-user.ts +18 -7
  329. package/src/funcs/users-activities-get.ts +14 -7
  330. package/src/funcs/users-activities-me.ts +14 -6
  331. package/src/funcs/users-activities-update.ts +14 -7
  332. package/src/funcs/users-delete.ts +3 -3
  333. package/src/funcs/users-friends-accept.ts +3 -3
  334. package/src/funcs/users-friends-list.ts +14 -7
  335. package/src/funcs/users-friends-pending.ts +15 -6
  336. package/src/funcs/users-friends-reject.ts +3 -3
  337. package/src/funcs/users-friends-remove.ts +3 -3
  338. package/src/funcs/users-friends-send-request.ts +3 -3
  339. package/src/funcs/users-get.ts +11 -7
  340. package/src/funcs/users-login.ts +11 -6
  341. package/src/funcs/users-me.ts +14 -6
  342. package/src/funcs/users-posts-delete.ts +3 -3
  343. package/src/funcs/users-posts-feed.ts +14 -6
  344. package/src/funcs/users-posts-get-by-post-id.ts +11 -7
  345. package/src/funcs/users-posts-get-by-user-id.ts +14 -7
  346. package/src/funcs/users-posts-like.ts +174 -0
  347. package/src/funcs/users-posts-remove-like.ts +174 -0
  348. package/src/funcs/users-posts-update.ts +11 -7
  349. package/src/funcs/users-signup.ts +8 -6
  350. package/src/funcs/users-update.ts +11 -7
  351. package/src/lib/config.ts +4 -4
  352. package/src/lib/files.ts +22 -0
  353. package/src/lib/sdks.ts +7 -5
  354. package/src/lib/url.ts +16 -14
  355. package/src/models/operations/get-feed.ts +4 -0
  356. package/src/models/operations/get-post-by-id.ts +4 -0
  357. package/src/models/operations/get-user-posts.ts +4 -0
  358. package/src/models/operations/index.ts +2 -0
  359. package/src/models/operations/like-post.ts +28 -0
  360. package/src/models/operations/unlike-post.ts +30 -0
  361. package/src/sdk/activities.ts +5 -5
  362. package/src/sdk/categories.ts +3 -3
  363. package/src/sdk/friends.ts +2 -2
  364. package/src/sdk/posts.ts +34 -4
  365. package/src/sdk/schools.ts +1 -1
  366. package/src/sdk/users.ts +5 -5
@@ -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) {
@@ -89,7 +89,6 @@ async function $do(
89
89
  charEncoding: "percent",
90
90
  }),
91
91
  };
92
-
93
92
  const path = pathToFunc("/api/v1/posts/{id}")(pathParams);
94
93
 
95
94
  const headers = new Headers(compactMap({
@@ -142,7 +141,7 @@ async function $do(
142
141
 
143
142
  const doResult = await client._do(req, {
144
143
  context,
145
- errorCodes: ["401", "403", "404", "4XX", "5XX"],
144
+ errorCodes: ["429", "5XX"],
146
145
  retryConfig: context.retryConfig,
147
146
  retryCodes: context.retryCodes,
148
147
  });
@@ -163,7 +162,8 @@ async function $do(
163
162
  | SDKValidationError
164
163
  >(
165
164
  M.nil(200, z.void()),
166
- M.fail([401, 403, 404, "4XX"]),
165
+ M.nil([401, 403, 404], z.void()),
166
+ M.fail(429),
167
167
  M.fail("5XX"),
168
168
  )(response, req);
169
169
  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
- Array<operations.GetFeedResponse>,
38
+ Array<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
- Array<operations.GetFeedResponse>,
63
+ Array<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
- Array<operations.GetFeedResponse>,
156
+ Array<operations.GetFeedResponse> | undefined,
156
157
  | SenseiProductivityError
157
158
  | ResponseValidationError
158
159
  | ConnectionError
@@ -162,8 +163,15 @@ async function $do(
162
163
  | UnexpectedClientError
163
164
  | SDKValidationError
164
165
  >(
165
- M.json(200, z.array(operations.GetFeedResponse$inboundSchema)),
166
- M.fail([401, "4XX"]),
166
+ M.json(
167
+ 200,
168
+ types$.optional(z.array(operations.GetFeedResponse$inboundSchema)),
169
+ ),
170
+ M.nil(
171
+ 401,
172
+ types$.optional(z.array(operations.GetFeedResponse$inboundSchema)),
173
+ ),
174
+ M.fail(429),
167
175
  M.fail("5XX"),
168
176
  )(response, req);
169
177
  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
@@ -89,7 +90,6 @@ async function $do(
89
90
  charEncoding: "percent",
90
91
  }),
91
92
  };
92
-
93
93
  const path = pathToFunc("/api/v1/posts/{id}")(pathParams);
94
94
 
95
95
  const headers = new Headers(compactMap({
@@ -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
  });
@@ -152,7 +152,7 @@ async function $do(
152
152
  const response = doResult.value;
153
153
 
154
154
  const [result] = await M.match<
155
- operations.GetPostByIdResponse,
155
+ operations.GetPostByIdResponse | undefined,
156
156
  | SenseiProductivityError
157
157
  | ResponseValidationError
158
158
  | ConnectionError
@@ -162,8 +162,12 @@ async function $do(
162
162
  | UnexpectedClientError
163
163
  | SDKValidationError
164
164
  >(
165
- M.json(200, operations.GetPostByIdResponse$inboundSchema),
166
- M.fail([401, 403, 404, "4XX"]),
165
+ M.json(200, types$.optional(operations.GetPostByIdResponse$inboundSchema)),
166
+ M.nil(
167
+ [401, 403, 404],
168
+ types$.optional(operations.GetPostByIdResponse$inboundSchema),
169
+ ),
170
+ M.fail(429),
167
171
  M.fail("5XX"),
168
172
  )(response, req);
169
173
  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 user's posts (respects post visibility)
@@ -34,7 +35,7 @@ export function usersPostsGetByUserId(
34
35
  options?: RequestOptions,
35
36
  ): APIPromise<
36
37
  Result<
37
- Array<operations.GetUserPostsResponse>,
38
+ Array<operations.GetUserPostsResponse> | 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
- Array<operations.GetUserPostsResponse>,
63
+ Array<operations.GetUserPostsResponse> | undefined,
63
64
  | SenseiProductivityError
64
65
  | ResponseValidationError
65
66
  | ConnectionError
@@ -89,7 +90,6 @@ async function $do(
89
90
  charEncoding: "percent",
90
91
  }),
91
92
  };
92
-
93
93
  const path = pathToFunc("/api/v1/users/{id}/posts")(pathParams);
94
94
 
95
95
  const headers = new Headers(compactMap({
@@ -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
  });
@@ -152,7 +152,7 @@ async function $do(
152
152
  const response = doResult.value;
153
153
 
154
154
  const [result] = await M.match<
155
- Array<operations.GetUserPostsResponse>,
155
+ Array<operations.GetUserPostsResponse> | undefined,
156
156
  | SenseiProductivityError
157
157
  | ResponseValidationError
158
158
  | ConnectionError
@@ -162,8 +162,15 @@ async function $do(
162
162
  | UnexpectedClientError
163
163
  | SDKValidationError
164
164
  >(
165
- M.json(200, z.array(operations.GetUserPostsResponse$inboundSchema)),
166
- M.fail([401, 403, 404, "4XX"]),
165
+ M.json(
166
+ 200,
167
+ types$.optional(z.array(operations.GetUserPostsResponse$inboundSchema)),
168
+ ),
169
+ M.nil(
170
+ [401, 403, 404],
171
+ types$.optional(z.array(operations.GetUserPostsResponse$inboundSchema)),
172
+ ),
173
+ M.fail(429),
167
174
  M.fail("5XX"),
168
175
  )(response, req);
169
176
  if (!result.ok) {
@@ -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
+ * Like a specific post by ID
30
+ */
31
+ export function usersPostsLike(
32
+ client: SenseiProductivityCore,
33
+ request: operations.LikePostRequest,
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.LikePostRequest,
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.LikePostRequest$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
+ const path = pathToFunc("/api/v1/posts/{id}/like")(pathParams);
93
+
94
+ const headers = new Headers(compactMap({
95
+ Accept: "*/*",
96
+ }));
97
+
98
+ const secConfig = await extractSecurity(client._options.bearerAuth);
99
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
100
+ const requestSecurity = resolveGlobalSecurity(securityInput);
101
+
102
+ const context = {
103
+ options: client._options,
104
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
105
+ operationID: "likePost",
106
+ oAuth2Scopes: null,
107
+
108
+ resolvedSecurity: requestSecurity,
109
+
110
+ securitySource: client._options.bearerAuth,
111
+ retryConfig: options?.retries
112
+ || client._options.retryConfig
113
+ || {
114
+ strategy: "backoff",
115
+ backoff: {
116
+ initialInterval: 1000,
117
+ maxInterval: 60000,
118
+ exponent: 1.3,
119
+ maxElapsedTime: 3600000,
120
+ },
121
+ retryConnectionErrors: true,
122
+ }
123
+ || { strategy: "none" },
124
+ retryCodes: options?.retryCodes || ["429", "5XX"],
125
+ };
126
+
127
+ const requestRes = client._createRequest(context, {
128
+ security: requestSecurity,
129
+ method: "PATCH",
130
+ baseURL: options?.serverURL,
131
+ path: path,
132
+ headers: headers,
133
+ body: body,
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ errorCodes: ["429", "5XX"],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req }];
150
+ }
151
+ const response = doResult.value;
152
+
153
+ const [result] = await M.match<
154
+ void,
155
+ | SenseiProductivityError
156
+ | ResponseValidationError
157
+ | ConnectionError
158
+ | RequestAbortedError
159
+ | RequestTimeoutError
160
+ | InvalidRequestError
161
+ | UnexpectedClientError
162
+ | SDKValidationError
163
+ >(
164
+ M.nil(200, z.void()),
165
+ M.nil([401, 404], z.void()),
166
+ M.fail(429),
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
+ }
@@ -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
+ const path = pathToFunc("/api/v1/posts/{id}/like")(pathParams);
93
+
94
+ const headers = new Headers(compactMap({
95
+ Accept: "*/*",
96
+ }));
97
+
98
+ const secConfig = await extractSecurity(client._options.bearerAuth);
99
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
100
+ const requestSecurity = resolveGlobalSecurity(securityInput);
101
+
102
+ const context = {
103
+ options: client._options,
104
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
105
+ operationID: "unlikePost",
106
+ oAuth2Scopes: null,
107
+
108
+ resolvedSecurity: requestSecurity,
109
+
110
+ securitySource: client._options.bearerAuth,
111
+ retryConfig: options?.retries
112
+ || client._options.retryConfig
113
+ || {
114
+ strategy: "backoff",
115
+ backoff: {
116
+ initialInterval: 1000,
117
+ maxInterval: 60000,
118
+ exponent: 1.3,
119
+ maxElapsedTime: 3600000,
120
+ },
121
+ retryConnectionErrors: true,
122
+ }
123
+ || { strategy: "none" },
124
+ retryCodes: options?.retryCodes || ["429", "5XX"],
125
+ };
126
+
127
+ const requestRes = client._createRequest(context, {
128
+ security: requestSecurity,
129
+ method: "DELETE",
130
+ baseURL: options?.serverURL,
131
+ path: path,
132
+ headers: headers,
133
+ body: body,
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ errorCodes: ["429", "5XX"],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req }];
150
+ }
151
+ const response = doResult.value;
152
+
153
+ const [result] = await M.match<
154
+ void,
155
+ | SenseiProductivityError
156
+ | ResponseValidationError
157
+ | ConnectionError
158
+ | RequestAbortedError
159
+ | RequestTimeoutError
160
+ | InvalidRequestError
161
+ | UnexpectedClientError
162
+ | SDKValidationError
163
+ >(
164
+ M.nil(200, z.void()),
165
+ M.nil([401, 404], z.void()),
166
+ M.fail(429),
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,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
  * Update a post's caption or visibility
@@ -34,7 +35,7 @@ export function usersPostsUpdate(
34
35
  options?: RequestOptions,
35
36
  ): APIPromise<
36
37
  Result<
37
- operations.UpdatePostResponse,
38
+ operations.UpdatePostResponse | 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.UpdatePostResponse,
63
+ operations.UpdatePostResponse | undefined,
63
64
  | SenseiProductivityError
64
65
  | ResponseValidationError
65
66
  | ConnectionError
@@ -89,7 +90,6 @@ async function $do(
89
90
  charEncoding: "percent",
90
91
  }),
91
92
  };
92
-
93
93
  const path = pathToFunc("/api/v1/posts/{id}")(pathParams);
94
94
 
95
95
  const headers = new Headers(compactMap({
@@ -143,7 +143,7 @@ async function $do(
143
143
 
144
144
  const doResult = await client._do(req, {
145
145
  context,
146
- errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
146
+ errorCodes: ["429", "5XX"],
147
147
  retryConfig: context.retryConfig,
148
148
  retryCodes: context.retryCodes,
149
149
  });
@@ -153,7 +153,7 @@ async function $do(
153
153
  const response = doResult.value;
154
154
 
155
155
  const [result] = await M.match<
156
- operations.UpdatePostResponse,
156
+ operations.UpdatePostResponse | undefined,
157
157
  | SenseiProductivityError
158
158
  | ResponseValidationError
159
159
  | ConnectionError
@@ -163,8 +163,12 @@ async function $do(
163
163
  | UnexpectedClientError
164
164
  | SDKValidationError
165
165
  >(
166
- M.json(200, operations.UpdatePostResponse$inboundSchema),
167
- M.fail([400, 401, 403, 404, "4XX"]),
166
+ M.json(200, types$.optional(operations.UpdatePostResponse$inboundSchema)),
167
+ M.nil(
168
+ [400, 401, 403, 404],
169
+ types$.optional(operations.UpdatePostResponse$inboundSchema),
170
+ ),
171
+ M.fail(429),
168
172
  M.fail("5XX"),
169
173
  )(response, req);
170
174
  if (!result.ok) {