@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,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
+ * Accept a pending friend request
30
+ */
31
+ export function usersFriendsAccept(
32
+ client: SenseiProductivityCore,
33
+ request: operations.AcceptFriendRequestRequest,
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.AcceptFriendRequestRequest,
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.AcceptFriendRequestRequest$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/friend-requests/{id}/accept")(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: "acceptFriendRequest",
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: "PATCH",
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(200, z.void()),
167
+ M.nil([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
+ }
@@ -0,0 +1,182 @@
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
+ import * as types$ from "../types/primitives.js";
28
+
29
+ /**
30
+ * List a user's friends
31
+ */
32
+ export function usersFriendsList(
33
+ client: SenseiProductivityCore,
34
+ request: operations.ListFriendsRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ Array<operations.ListFriendsResponse> | undefined,
39
+ | SenseiProductivityError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: SenseiProductivityCore,
58
+ request: operations.ListFriendsRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<
61
+ [
62
+ Result<
63
+ Array<operations.ListFriendsResponse> | undefined,
64
+ | SenseiProductivityError
65
+ | ResponseValidationError
66
+ | ConnectionError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | InvalidRequestError
70
+ | UnexpectedClientError
71
+ | SDKValidationError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed = safeParse(
77
+ request,
78
+ (value) => z.parse(operations.ListFriendsRequest$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}/friends")(pathParams);
95
+
96
+ const headers = new Headers(compactMap({
97
+ Accept: "application/json",
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: "listFriends",
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: "GET",
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
+ Array<operations.ListFriendsResponse> | undefined,
157
+ | SenseiProductivityError
158
+ | ResponseValidationError
159
+ | ConnectionError
160
+ | RequestAbortedError
161
+ | RequestTimeoutError
162
+ | InvalidRequestError
163
+ | UnexpectedClientError
164
+ | SDKValidationError
165
+ >(
166
+ M.json(
167
+ 200,
168
+ types$.optional(z.array(operations.ListFriendsResponse$inboundSchema)),
169
+ ),
170
+ M.nil(
171
+ [401, 404],
172
+ types$.optional(z.array(operations.ListFriendsResponse$inboundSchema)),
173
+ ),
174
+ M.fail(429),
175
+ M.fail("5XX"),
176
+ )(response, req);
177
+ if (!result.ok) {
178
+ return [result, { status: "complete", request: req, response }];
179
+ }
180
+
181
+ return [result, { status: "complete", request: req, response }];
182
+ }
@@ -0,0 +1,162 @@
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 * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/http-client-errors.js";
19
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
20
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
21
+ import { SenseiProductivityError } from "../models/errors/sensei-productivity-error.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+ import * as types$ from "../types/primitives.js";
26
+
27
+ /**
28
+ * Get all pending friend requests
29
+ */
30
+ export function usersFriendsPending(
31
+ client: SenseiProductivityCore,
32
+ options?: RequestOptions,
33
+ ): APIPromise<
34
+ Result<
35
+ Array<operations.PendingFriendRequestsResponse> | undefined,
36
+ | SenseiProductivityError
37
+ | ResponseValidationError
38
+ | ConnectionError
39
+ | RequestAbortedError
40
+ | RequestTimeoutError
41
+ | InvalidRequestError
42
+ | UnexpectedClientError
43
+ | SDKValidationError
44
+ >
45
+ > {
46
+ return new APIPromise($do(
47
+ client,
48
+ options,
49
+ ));
50
+ }
51
+
52
+ async function $do(
53
+ client: SenseiProductivityCore,
54
+ options?: RequestOptions,
55
+ ): Promise<
56
+ [
57
+ Result<
58
+ Array<operations.PendingFriendRequestsResponse> | undefined,
59
+ | SenseiProductivityError
60
+ | ResponseValidationError
61
+ | ConnectionError
62
+ | RequestAbortedError
63
+ | RequestTimeoutError
64
+ | InvalidRequestError
65
+ | UnexpectedClientError
66
+ | SDKValidationError
67
+ >,
68
+ APICall,
69
+ ]
70
+ > {
71
+ const path = pathToFunc("/api/v1/users/friends/pending")();
72
+
73
+ const headers = new Headers(compactMap({
74
+ Accept: "application/json",
75
+ }));
76
+
77
+ const secConfig = await extractSecurity(client._options.bearerAuth);
78
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
79
+ const requestSecurity = resolveGlobalSecurity(securityInput);
80
+
81
+ const context = {
82
+ options: client._options,
83
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
84
+ operationID: "pendingFriendRequests",
85
+ oAuth2Scopes: null,
86
+
87
+ resolvedSecurity: requestSecurity,
88
+
89
+ securitySource: client._options.bearerAuth,
90
+ retryConfig: options?.retries
91
+ || client._options.retryConfig
92
+ || {
93
+ strategy: "backoff",
94
+ backoff: {
95
+ initialInterval: 1000,
96
+ maxInterval: 60000,
97
+ exponent: 1.3,
98
+ maxElapsedTime: 3600000,
99
+ },
100
+ retryConnectionErrors: true,
101
+ }
102
+ || { strategy: "none" },
103
+ retryCodes: options?.retryCodes || ["429", "5XX"],
104
+ };
105
+
106
+ const requestRes = client._createRequest(context, {
107
+ security: requestSecurity,
108
+ method: "GET",
109
+ baseURL: options?.serverURL,
110
+ path: path,
111
+ headers: headers,
112
+ userAgent: client._options.userAgent,
113
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
114
+ }, options);
115
+ if (!requestRes.ok) {
116
+ return [requestRes, { status: "invalid" }];
117
+ }
118
+ const req = requestRes.value;
119
+
120
+ const doResult = await client._do(req, {
121
+ context,
122
+ errorCodes: ["429", "5XX"],
123
+ retryConfig: context.retryConfig,
124
+ retryCodes: context.retryCodes,
125
+ });
126
+ if (!doResult.ok) {
127
+ return [doResult, { status: "request-error", request: req }];
128
+ }
129
+ const response = doResult.value;
130
+
131
+ const [result] = await M.match<
132
+ Array<operations.PendingFriendRequestsResponse> | undefined,
133
+ | SenseiProductivityError
134
+ | ResponseValidationError
135
+ | ConnectionError
136
+ | RequestAbortedError
137
+ | RequestTimeoutError
138
+ | InvalidRequestError
139
+ | UnexpectedClientError
140
+ | SDKValidationError
141
+ >(
142
+ M.json(
143
+ 200,
144
+ types$.optional(
145
+ z.array(operations.PendingFriendRequestsResponse$inboundSchema),
146
+ ),
147
+ ),
148
+ M.nil(
149
+ 401,
150
+ types$.optional(
151
+ z.array(operations.PendingFriendRequestsResponse$inboundSchema),
152
+ ),
153
+ ),
154
+ M.fail(429),
155
+ M.fail("5XX"),
156
+ )(response, req);
157
+ if (!result.ok) {
158
+ return [result, { status: "complete", request: req, response }];
159
+ }
160
+
161
+ return [result, { status: "complete", request: req, response }];
162
+ }
@@ -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
+ * Reject a pending friend request
30
+ */
31
+ export function usersFriendsReject(
32
+ client: SenseiProductivityCore,
33
+ request: operations.RejectFriendRequestRequest,
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.RejectFriendRequestRequest,
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.RejectFriendRequestRequest$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/friend-requests/{id}/reject")(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: "rejectFriendRequest",
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: "PATCH",
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(200, z.void()),
167
+ M.nil([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
+ }