@aurora-interactive/sensei-productivity 1.3.0 → 1.5.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 (387) 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 +4 -3
  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 +4 -4
  109. package/dist/commonjs/lib/config.js +4 -4
  110. package/dist/commonjs/lib/config.js.map +1 -1
  111. package/dist/commonjs/lib/matchers.d.ts.map +1 -1
  112. package/dist/commonjs/lib/matchers.js +0 -1
  113. package/dist/commonjs/lib/matchers.js.map +1 -1
  114. package/dist/commonjs/lib/security.d.ts.map +1 -1
  115. package/dist/commonjs/lib/security.js +1 -2
  116. package/dist/commonjs/lib/security.js.map +1 -1
  117. package/dist/commonjs/models/operations/accept-friend-request.d.ts +15 -0
  118. package/dist/commonjs/models/operations/accept-friend-request.d.ts.map +1 -0
  119. package/dist/commonjs/models/operations/accept-friend-request.js +49 -0
  120. package/dist/commonjs/models/operations/accept-friend-request.js.map +1 -0
  121. package/dist/commonjs/models/operations/get-feed.d.ts +3 -15
  122. package/dist/commonjs/models/operations/get-feed.d.ts.map +1 -1
  123. package/dist/commonjs/models/operations/get-feed.js +4 -15
  124. package/dist/commonjs/models/operations/get-feed.js.map +1 -1
  125. package/dist/commonjs/models/operations/index.d.ts +6 -0
  126. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  127. package/dist/commonjs/models/operations/index.js +6 -0
  128. package/dist/commonjs/models/operations/index.js.map +1 -1
  129. package/dist/commonjs/models/operations/list-friends.d.ts +26 -0
  130. package/dist/commonjs/models/operations/list-friends.d.ts.map +1 -0
  131. package/dist/commonjs/models/operations/list-friends.js +65 -0
  132. package/dist/commonjs/models/operations/list-friends.js.map +1 -0
  133. package/dist/commonjs/models/operations/pending-friend-requests.d.ts +16 -0
  134. package/dist/commonjs/models/operations/pending-friend-requests.d.ts.map +1 -0
  135. package/dist/commonjs/models/operations/pending-friend-requests.js +57 -0
  136. package/dist/commonjs/models/operations/pending-friend-requests.js.map +1 -0
  137. package/dist/commonjs/models/operations/reject-friend-request.d.ts +15 -0
  138. package/dist/commonjs/models/operations/reject-friend-request.d.ts.map +1 -0
  139. package/dist/commonjs/models/operations/reject-friend-request.js +49 -0
  140. package/dist/commonjs/models/operations/reject-friend-request.js.map +1 -0
  141. package/dist/commonjs/models/operations/remove-friend.d.ts +12 -0
  142. package/dist/commonjs/models/operations/remove-friend.d.ts.map +1 -0
  143. package/dist/commonjs/models/operations/remove-friend.js +49 -0
  144. package/dist/commonjs/models/operations/remove-friend.js.map +1 -0
  145. package/dist/commonjs/models/operations/send-friend-request.d.ts +12 -0
  146. package/dist/commonjs/models/operations/send-friend-request.d.ts.map +1 -0
  147. package/dist/commonjs/models/operations/send-friend-request.js +49 -0
  148. package/dist/commonjs/models/operations/send-friend-request.js.map +1 -0
  149. package/dist/commonjs/sdk/activities.d.ts +5 -5
  150. package/dist/commonjs/sdk/activities.d.ts.map +1 -1
  151. package/dist/commonjs/sdk/categories.d.ts +3 -3
  152. package/dist/commonjs/sdk/categories.d.ts.map +1 -1
  153. package/dist/commonjs/sdk/friends.d.ts +29 -0
  154. package/dist/commonjs/sdk/friends.d.ts.map +1 -0
  155. package/dist/commonjs/sdk/friends.js +54 -0
  156. package/dist/commonjs/sdk/friends.js.map +1 -0
  157. package/dist/commonjs/sdk/posts.d.ts +4 -4
  158. package/dist/commonjs/sdk/posts.d.ts.map +1 -1
  159. package/dist/commonjs/sdk/schools.d.ts +1 -1
  160. package/dist/commonjs/sdk/schools.d.ts.map +1 -1
  161. package/dist/commonjs/sdk/users.d.ts +8 -5
  162. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  163. package/dist/commonjs/sdk/users.js +4 -0
  164. package/dist/commonjs/sdk/users.js.map +1 -1
  165. package/dist/esm/funcs/categories-create.d.ts +1 -1
  166. package/dist/esm/funcs/categories-create.d.ts.map +1 -1
  167. package/dist/esm/funcs/categories-create.js +3 -2
  168. package/dist/esm/funcs/categories-create.js.map +1 -1
  169. package/dist/esm/funcs/categories-delete.js +2 -2
  170. package/dist/esm/funcs/categories-delete.js.map +1 -1
  171. package/dist/esm/funcs/categories-get-all.d.ts +1 -1
  172. package/dist/esm/funcs/categories-get-all.d.ts.map +1 -1
  173. package/dist/esm/funcs/categories-get-all.js +3 -2
  174. package/dist/esm/funcs/categories-get-all.js.map +1 -1
  175. package/dist/esm/funcs/categories-update.d.ts +1 -1
  176. package/dist/esm/funcs/categories-update.d.ts.map +1 -1
  177. package/dist/esm/funcs/categories-update.js +3 -2
  178. package/dist/esm/funcs/categories-update.js.map +1 -1
  179. package/dist/esm/funcs/schools-get-all.js +2 -2
  180. package/dist/esm/funcs/schools-get-all.js.map +1 -1
  181. package/dist/esm/funcs/schools-get.d.ts +1 -1
  182. package/dist/esm/funcs/schools-get.d.ts.map +1 -1
  183. package/dist/esm/funcs/schools-get.js +3 -2
  184. package/dist/esm/funcs/schools-get.js.map +1 -1
  185. package/dist/esm/funcs/users-activities-create.d.ts +1 -1
  186. package/dist/esm/funcs/users-activities-create.d.ts.map +1 -1
  187. package/dist/esm/funcs/users-activities-create.js +3 -2
  188. package/dist/esm/funcs/users-activities-create.js.map +1 -1
  189. package/dist/esm/funcs/users-activities-delete.js +2 -2
  190. package/dist/esm/funcs/users-activities-delete.js.map +1 -1
  191. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts +1 -1
  192. package/dist/esm/funcs/users-activities-get-all-of-user.d.ts.map +1 -1
  193. package/dist/esm/funcs/users-activities-get-all-of-user.js +3 -2
  194. package/dist/esm/funcs/users-activities-get-all-of-user.js.map +1 -1
  195. package/dist/esm/funcs/users-activities-get.d.ts +1 -1
  196. package/dist/esm/funcs/users-activities-get.d.ts.map +1 -1
  197. package/dist/esm/funcs/users-activities-get.js +3 -2
  198. package/dist/esm/funcs/users-activities-get.js.map +1 -1
  199. package/dist/esm/funcs/users-activities-me.d.ts +1 -1
  200. package/dist/esm/funcs/users-activities-me.d.ts.map +1 -1
  201. package/dist/esm/funcs/users-activities-me.js +3 -2
  202. package/dist/esm/funcs/users-activities-me.js.map +1 -1
  203. package/dist/esm/funcs/users-activities-update.d.ts +1 -1
  204. package/dist/esm/funcs/users-activities-update.d.ts.map +1 -1
  205. package/dist/esm/funcs/users-activities-update.js +3 -2
  206. package/dist/esm/funcs/users-activities-update.js.map +1 -1
  207. package/dist/esm/funcs/users-delete.js +2 -2
  208. package/dist/esm/funcs/users-delete.js.map +1 -1
  209. package/dist/esm/funcs/users-friends-accept.d.ts +14 -0
  210. package/dist/esm/funcs/users-friends-accept.d.ts.map +1 -0
  211. package/dist/esm/funcs/users-friends-accept.js +91 -0
  212. package/dist/esm/funcs/users-friends-accept.js.map +1 -0
  213. package/dist/esm/funcs/users-friends-list.d.ts +14 -0
  214. package/dist/esm/funcs/users-friends-list.d.ts.map +1 -0
  215. package/dist/esm/funcs/users-friends-list.js +92 -0
  216. package/dist/esm/funcs/users-friends-list.js.map +1 -0
  217. package/dist/esm/funcs/users-friends-pending.d.ts +14 -0
  218. package/dist/esm/funcs/users-friends-pending.d.ts.map +1 -0
  219. package/dist/esm/funcs/users-friends-pending.js +77 -0
  220. package/dist/esm/funcs/users-friends-pending.js.map +1 -0
  221. package/dist/esm/funcs/users-friends-reject.d.ts +14 -0
  222. package/dist/esm/funcs/users-friends-reject.d.ts.map +1 -0
  223. package/dist/esm/funcs/users-friends-reject.js +91 -0
  224. package/dist/esm/funcs/users-friends-reject.js.map +1 -0
  225. package/dist/esm/funcs/users-friends-remove.d.ts +14 -0
  226. package/dist/esm/funcs/users-friends-remove.d.ts.map +1 -0
  227. package/dist/esm/funcs/users-friends-remove.js +91 -0
  228. package/dist/esm/funcs/users-friends-remove.js.map +1 -0
  229. package/dist/esm/funcs/users-friends-send-request.d.ts +14 -0
  230. package/dist/esm/funcs/users-friends-send-request.d.ts.map +1 -0
  231. package/dist/esm/funcs/users-friends-send-request.js +91 -0
  232. package/dist/esm/funcs/users-friends-send-request.js.map +1 -0
  233. package/dist/esm/funcs/users-get.d.ts +1 -1
  234. package/dist/esm/funcs/users-get.d.ts.map +1 -1
  235. package/dist/esm/funcs/users-get.js +3 -2
  236. package/dist/esm/funcs/users-get.js.map +1 -1
  237. package/dist/esm/funcs/users-login.d.ts +1 -1
  238. package/dist/esm/funcs/users-login.d.ts.map +1 -1
  239. package/dist/esm/funcs/users-login.js +3 -2
  240. package/dist/esm/funcs/users-login.js.map +1 -1
  241. package/dist/esm/funcs/users-me.d.ts +1 -1
  242. package/dist/esm/funcs/users-me.d.ts.map +1 -1
  243. package/dist/esm/funcs/users-me.js +3 -2
  244. package/dist/esm/funcs/users-me.js.map +1 -1
  245. package/dist/esm/funcs/users-posts-delete.js +2 -2
  246. package/dist/esm/funcs/users-posts-delete.js.map +1 -1
  247. package/dist/esm/funcs/users-posts-feed.d.ts +1 -1
  248. package/dist/esm/funcs/users-posts-feed.d.ts.map +1 -1
  249. package/dist/esm/funcs/users-posts-feed.js +4 -3
  250. package/dist/esm/funcs/users-posts-feed.js.map +1 -1
  251. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts +1 -1
  252. package/dist/esm/funcs/users-posts-get-by-post-id.d.ts.map +1 -1
  253. package/dist/esm/funcs/users-posts-get-by-post-id.js +3 -2
  254. package/dist/esm/funcs/users-posts-get-by-post-id.js.map +1 -1
  255. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts +1 -1
  256. package/dist/esm/funcs/users-posts-get-by-user-id.d.ts.map +1 -1
  257. package/dist/esm/funcs/users-posts-get-by-user-id.js +3 -2
  258. package/dist/esm/funcs/users-posts-get-by-user-id.js.map +1 -1
  259. package/dist/esm/funcs/users-posts-update.d.ts +1 -1
  260. package/dist/esm/funcs/users-posts-update.d.ts.map +1 -1
  261. package/dist/esm/funcs/users-posts-update.js +3 -2
  262. package/dist/esm/funcs/users-posts-update.js.map +1 -1
  263. package/dist/esm/funcs/users-signup.d.ts +1 -1
  264. package/dist/esm/funcs/users-signup.d.ts.map +1 -1
  265. package/dist/esm/funcs/users-signup.js +3 -2
  266. package/dist/esm/funcs/users-signup.js.map +1 -1
  267. package/dist/esm/funcs/users-update.d.ts +1 -1
  268. package/dist/esm/funcs/users-update.d.ts.map +1 -1
  269. package/dist/esm/funcs/users-update.js +3 -2
  270. package/dist/esm/funcs/users-update.js.map +1 -1
  271. package/dist/esm/lib/config.d.ts +4 -4
  272. package/dist/esm/lib/config.js +4 -4
  273. package/dist/esm/lib/config.js.map +1 -1
  274. package/dist/esm/lib/matchers.d.ts.map +1 -1
  275. package/dist/esm/lib/matchers.js +0 -1
  276. package/dist/esm/lib/matchers.js.map +1 -1
  277. package/dist/esm/lib/security.d.ts.map +1 -1
  278. package/dist/esm/lib/security.js +1 -2
  279. package/dist/esm/lib/security.js.map +1 -1
  280. package/dist/esm/models/operations/accept-friend-request.d.ts +15 -0
  281. package/dist/esm/models/operations/accept-friend-request.d.ts.map +1 -0
  282. package/dist/esm/models/operations/accept-friend-request.js +12 -0
  283. package/dist/esm/models/operations/accept-friend-request.js.map +1 -0
  284. package/dist/esm/models/operations/get-feed.d.ts +3 -15
  285. package/dist/esm/models/operations/get-feed.d.ts.map +1 -1
  286. package/dist/esm/models/operations/get-feed.js +3 -13
  287. package/dist/esm/models/operations/get-feed.js.map +1 -1
  288. package/dist/esm/models/operations/index.d.ts +6 -0
  289. package/dist/esm/models/operations/index.d.ts.map +1 -1
  290. package/dist/esm/models/operations/index.js +6 -0
  291. package/dist/esm/models/operations/index.js.map +1 -1
  292. package/dist/esm/models/operations/list-friends.d.ts +26 -0
  293. package/dist/esm/models/operations/list-friends.d.ts.map +1 -0
  294. package/dist/esm/models/operations/list-friends.js +27 -0
  295. package/dist/esm/models/operations/list-friends.js.map +1 -0
  296. package/dist/esm/models/operations/pending-friend-requests.d.ts +16 -0
  297. package/dist/esm/models/operations/pending-friend-requests.d.ts.map +1 -0
  298. package/dist/esm/models/operations/pending-friend-requests.js +20 -0
  299. package/dist/esm/models/operations/pending-friend-requests.js.map +1 -0
  300. package/dist/esm/models/operations/reject-friend-request.d.ts +15 -0
  301. package/dist/esm/models/operations/reject-friend-request.d.ts.map +1 -0
  302. package/dist/esm/models/operations/reject-friend-request.js +12 -0
  303. package/dist/esm/models/operations/reject-friend-request.js.map +1 -0
  304. package/dist/esm/models/operations/remove-friend.d.ts +12 -0
  305. package/dist/esm/models/operations/remove-friend.d.ts.map +1 -0
  306. package/dist/esm/models/operations/remove-friend.js +12 -0
  307. package/dist/esm/models/operations/remove-friend.js.map +1 -0
  308. package/dist/esm/models/operations/send-friend-request.d.ts +12 -0
  309. package/dist/esm/models/operations/send-friend-request.d.ts.map +1 -0
  310. package/dist/esm/models/operations/send-friend-request.js +12 -0
  311. package/dist/esm/models/operations/send-friend-request.js.map +1 -0
  312. package/dist/esm/sdk/activities.d.ts +5 -5
  313. package/dist/esm/sdk/activities.d.ts.map +1 -1
  314. package/dist/esm/sdk/categories.d.ts +3 -3
  315. package/dist/esm/sdk/categories.d.ts.map +1 -1
  316. package/dist/esm/sdk/friends.d.ts +29 -0
  317. package/dist/esm/sdk/friends.d.ts.map +1 -0
  318. package/dist/esm/sdk/friends.js +50 -0
  319. package/dist/esm/sdk/friends.js.map +1 -0
  320. package/dist/esm/sdk/posts.d.ts +4 -4
  321. package/dist/esm/sdk/posts.d.ts.map +1 -1
  322. package/dist/esm/sdk/schools.d.ts +1 -1
  323. package/dist/esm/sdk/schools.d.ts.map +1 -1
  324. package/dist/esm/sdk/users.d.ts +8 -5
  325. package/dist/esm/sdk/users.d.ts.map +1 -1
  326. package/dist/esm/sdk/users.js +4 -0
  327. package/dist/esm/sdk/users.js.map +1 -1
  328. package/jsr.json +1 -1
  329. package/package.json +2 -2
  330. package/rest-api/cypress/e2e/{activity-post-endpoints.cy.ts → activity-post-endpoints.cy.js} +2 -3
  331. package/rest-api/cypress/e2e/friend-endpoints.cy.js +262 -0
  332. package/rest-api/cypress/e2e/{school-endpoints.cy.ts → school-endpoints.cy.js} +1 -1
  333. package/rest-api/cypress.config.ts +47 -3
  334. package/rest-api/index.js +8 -1
  335. package/rest-api/lib/users.js +7 -5
  336. package/rest-api/routes/ActivityPostFunctions.js +73 -2
  337. package/rest-api/routes/FriendFunctions.js +266 -0
  338. package/rest-api/routes/UserActivityFunctions.js +1 -1
  339. package/src/funcs/categories-create.ts +14 -6
  340. package/src/funcs/categories-delete.ts +3 -2
  341. package/src/funcs/categories-get-all.ts +14 -6
  342. package/src/funcs/categories-update.ts +14 -6
  343. package/src/funcs/schools-get-all.ts +2 -2
  344. package/src/funcs/schools-get.ts +11 -6
  345. package/src/funcs/users-activities-create.ts +14 -6
  346. package/src/funcs/users-activities-delete.ts +3 -2
  347. package/src/funcs/users-activities-get-all-of-user.ts +18 -6
  348. package/src/funcs/users-activities-get.ts +14 -6
  349. package/src/funcs/users-activities-me.ts +14 -6
  350. package/src/funcs/users-activities-update.ts +14 -6
  351. package/src/funcs/users-delete.ts +3 -2
  352. package/src/funcs/users-friends-accept.ts +176 -0
  353. package/src/funcs/users-friends-list.ts +182 -0
  354. package/src/funcs/users-friends-pending.ts +162 -0
  355. package/src/funcs/users-friends-reject.ts +176 -0
  356. package/src/funcs/users-friends-remove.ts +175 -0
  357. package/src/funcs/users-friends-send-request.ts +176 -0
  358. package/src/funcs/users-get.ts +11 -6
  359. package/src/funcs/users-login.ts +11 -6
  360. package/src/funcs/users-me.ts +14 -6
  361. package/src/funcs/users-posts-delete.ts +3 -2
  362. package/src/funcs/users-posts-feed.ts +15 -7
  363. package/src/funcs/users-posts-get-by-post-id.ts +11 -6
  364. package/src/funcs/users-posts-get-by-user-id.ts +14 -6
  365. package/src/funcs/users-posts-update.ts +11 -6
  366. package/src/funcs/users-signup.ts +8 -6
  367. package/src/funcs/users-update.ts +11 -6
  368. package/src/lib/config.ts +4 -4
  369. package/src/lib/matchers.ts +3 -2
  370. package/src/lib/security.ts +1 -2
  371. package/src/models/operations/accept-friend-request.ts +33 -0
  372. package/src/models/operations/get-feed.ts +9 -37
  373. package/src/models/operations/index.ts +6 -0
  374. package/src/models/operations/list-friends.ts +68 -0
  375. package/src/models/operations/pending-friend-requests.ts +43 -0
  376. package/src/models/operations/reject-friend-request.ts +33 -0
  377. package/src/models/operations/remove-friend.ts +30 -0
  378. package/src/models/operations/send-friend-request.ts +30 -0
  379. package/src/sdk/activities.ts +5 -5
  380. package/src/sdk/categories.ts +3 -3
  381. package/src/sdk/friends.ts +97 -0
  382. package/src/sdk/posts.ts +4 -4
  383. package/src/sdk/schools.ts +1 -1
  384. package/src/sdk/users.ts +11 -5
  385. /package/rest-api/cypress/e2e/{category-endpoints.cy.ts → category-endpoints.cy.js} +0 -0
  386. /package/rest-api/cypress/e2e/{user-activity-endpoints.cy.ts → user-activity-endpoints.cy.js} +0 -0
  387. /package/rest-api/cypress/e2e/{user-endpoints.cy.ts → user-endpoints.cy.js} +0 -0
@@ -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
+ }
@@ -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
+ }