@stackframe/stack-shared 2.8.8 → 2.8.11

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 (476) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/config/format.d.cts +39 -0
  3. package/dist/config/format.d.ts +14 -13
  4. package/dist/config/format.js +147 -206
  5. package/dist/config/format.js.map +1 -0
  6. package/dist/config/schema.d.cts +729 -0
  7. package/dist/config/schema.d.ts +59 -51
  8. package/dist/config/schema.js +232 -172
  9. package/dist/config/schema.js.map +1 -0
  10. package/dist/crud.d.cts +102 -0
  11. package/dist/crud.d.ts +15 -13
  12. package/dist/crud.js +83 -128
  13. package/dist/crud.js.map +1 -0
  14. package/dist/esm/config/format.js +135 -0
  15. package/dist/esm/config/format.js.map +1 -0
  16. package/dist/esm/config/schema.js +201 -0
  17. package/dist/esm/config/schema.js.map +1 -0
  18. package/dist/esm/crud.js +60 -0
  19. package/dist/esm/crud.js.map +1 -0
  20. package/dist/esm/global.d.js +1 -0
  21. package/dist/esm/global.d.js.map +1 -0
  22. package/dist/esm/helpers/password.js +17 -0
  23. package/dist/esm/helpers/password.js.map +1 -0
  24. package/dist/esm/helpers/production-mode.js +50 -0
  25. package/dist/esm/helpers/production-mode.js.map +1 -0
  26. package/dist/esm/hooks/use-async-callback.js +38 -0
  27. package/dist/esm/hooks/use-async-callback.js.map +1 -0
  28. package/dist/esm/hooks/use-async-external-store.js +23 -0
  29. package/dist/esm/hooks/use-async-external-store.js.map +1 -0
  30. package/dist/esm/hooks/use-hash.js +17 -0
  31. package/dist/esm/hooks/use-hash.js.map +1 -0
  32. package/dist/esm/hooks/use-strict-memo.js +61 -0
  33. package/dist/esm/hooks/use-strict-memo.js.map +1 -0
  34. package/dist/esm/index.js +22 -0
  35. package/dist/esm/index.js.map +1 -0
  36. package/dist/esm/interface/adminInterface.js +244 -0
  37. package/dist/esm/interface/adminInterface.js.map +1 -0
  38. package/dist/esm/interface/clientInterface.js +2041 -0
  39. package/dist/esm/interface/clientInterface.js.map +1 -0
  40. package/dist/esm/interface/crud/contact-channels.js +77 -0
  41. package/dist/esm/interface/crud/contact-channels.js.map +1 -0
  42. package/dist/esm/interface/crud/current-user.js +65 -0
  43. package/dist/esm/interface/crud/current-user.js.map +1 -0
  44. package/dist/esm/interface/crud/email-templates.js +52 -0
  45. package/dist/esm/interface/crud/email-templates.js.map +1 -0
  46. package/dist/esm/interface/crud/emails.js +20 -0
  47. package/dist/esm/interface/crud/emails.js.map +1 -0
  48. package/dist/esm/interface/crud/internal-api-keys.js +69 -0
  49. package/dist/esm/interface/crud/internal-api-keys.js.map +1 -0
  50. package/dist/esm/interface/crud/oauth.js +24 -0
  51. package/dist/esm/interface/crud/oauth.js.map +1 -0
  52. package/dist/esm/interface/crud/project-api-keys.js +93 -0
  53. package/dist/esm/interface/crud/project-api-keys.js.map +1 -0
  54. package/dist/esm/interface/crud/project-permissions.js +113 -0
  55. package/dist/esm/interface/crud/project-permissions.js.map +1 -0
  56. package/dist/esm/interface/crud/projects.js +180 -0
  57. package/dist/esm/interface/crud/projects.js.map +1 -0
  58. package/dist/esm/interface/crud/sessions.js +62 -0
  59. package/dist/esm/interface/crud/sessions.js.map +1 -0
  60. package/dist/esm/interface/crud/svix-token.js +22 -0
  61. package/dist/esm/interface/crud/svix-token.js.map +1 -0
  62. package/dist/esm/interface/crud/team-invitation-details.js +23 -0
  63. package/dist/esm/interface/crud/team-invitation-details.js.map +1 -0
  64. package/dist/esm/interface/crud/team-invitation.js +36 -0
  65. package/dist/esm/interface/crud/team-invitation.js.map +1 -0
  66. package/dist/esm/interface/crud/team-member-profiles.js +62 -0
  67. package/dist/esm/interface/crud/team-member-profiles.js.map +1 -0
  68. package/dist/esm/interface/crud/team-memberships.js +60 -0
  69. package/dist/esm/interface/crud/team-memberships.js.map +1 -0
  70. package/dist/esm/interface/crud/team-permissions.js +114 -0
  71. package/dist/esm/interface/crud/team-permissions.js.map +1 -0
  72. package/dist/esm/interface/crud/teams.js +143 -0
  73. package/dist/esm/interface/crud/teams.js.map +1 -0
  74. package/dist/esm/interface/crud/users.js +139 -0
  75. package/dist/esm/interface/crud/users.js.map +1 -0
  76. package/dist/esm/interface/serverInterface.js +485 -0
  77. package/dist/esm/interface/serverInterface.js.map +1 -0
  78. package/dist/esm/interface/webhooks.js +21 -0
  79. package/dist/esm/interface/webhooks.js.map +1 -0
  80. package/dist/esm/known-errors.js +1238 -0
  81. package/dist/esm/known-errors.js.map +1 -0
  82. package/dist/esm/schema-fields.js +484 -0
  83. package/dist/esm/schema-fields.js.map +1 -0
  84. package/dist/esm/sessions.js +168 -0
  85. package/dist/esm/sessions.js.map +1 -0
  86. package/dist/esm/utils/api-keys.js +79 -0
  87. package/dist/esm/utils/api-keys.js.map +1 -0
  88. package/dist/esm/utils/arrays.js +78 -0
  89. package/dist/esm/utils/arrays.js.map +1 -0
  90. package/dist/esm/utils/base64.js +18 -0
  91. package/dist/esm/utils/base64.js.map +1 -0
  92. package/dist/esm/utils/booleans.js +12 -0
  93. package/dist/esm/utils/booleans.js.map +1 -0
  94. package/dist/esm/utils/browser-compat.js +21 -0
  95. package/dist/esm/utils/browser-compat.js.map +1 -0
  96. package/dist/esm/utils/bytes.js +160 -0
  97. package/dist/esm/utils/bytes.js.map +1 -0
  98. package/dist/esm/utils/caches.js +167 -0
  99. package/dist/esm/utils/caches.js.map +1 -0
  100. package/dist/esm/utils/compile-time.js +11 -0
  101. package/dist/esm/utils/compile-time.js.map +1 -0
  102. package/dist/esm/utils/crypto.js +25 -0
  103. package/dist/esm/utils/crypto.js.map +1 -0
  104. package/dist/esm/utils/dates.js +64 -0
  105. package/dist/esm/utils/dates.js.map +1 -0
  106. package/dist/esm/utils/dom.js +11 -0
  107. package/dist/esm/utils/dom.js.map +1 -0
  108. package/dist/esm/utils/env.js +58 -0
  109. package/dist/esm/utils/env.js.map +1 -0
  110. package/dist/esm/utils/errors.js +174 -0
  111. package/dist/esm/utils/errors.js.map +1 -0
  112. package/dist/esm/utils/fs.js +37 -0
  113. package/dist/esm/utils/fs.js.map +1 -0
  114. package/dist/esm/utils/functions.js +12 -0
  115. package/dist/esm/utils/functions.js.map +1 -0
  116. package/dist/esm/utils/geo.js +15 -0
  117. package/dist/esm/utils/geo.js.map +1 -0
  118. package/dist/esm/utils/globals.js +18 -0
  119. package/dist/esm/utils/globals.js.map +1 -0
  120. package/dist/esm/utils/hashes.js +55 -0
  121. package/dist/esm/utils/hashes.js.map +1 -0
  122. package/dist/esm/utils/html.js +13 -0
  123. package/dist/esm/utils/html.js.map +1 -0
  124. package/dist/esm/utils/http.js +60 -0
  125. package/dist/esm/utils/http.js.map +1 -0
  126. package/dist/esm/utils/ips.js +15 -0
  127. package/dist/esm/utils/ips.js.map +1 -0
  128. package/dist/esm/utils/json.js +31 -0
  129. package/dist/esm/utils/json.js.map +1 -0
  130. package/dist/esm/utils/jwt.js +87 -0
  131. package/dist/esm/utils/jwt.js.map +1 -0
  132. package/dist/esm/utils/locks.js +57 -0
  133. package/dist/esm/utils/locks.js.map +1 -0
  134. package/dist/esm/utils/maps.js +181 -0
  135. package/dist/esm/utils/maps.js.map +1 -0
  136. package/dist/esm/utils/math.js +8 -0
  137. package/dist/esm/utils/math.js.map +1 -0
  138. package/dist/esm/utils/node-http.js +42 -0
  139. package/dist/esm/utils/node-http.js.map +1 -0
  140. package/dist/esm/utils/numbers.js +32 -0
  141. package/dist/esm/utils/numbers.js.map +1 -0
  142. package/dist/esm/utils/oauth.js +10 -0
  143. package/dist/esm/utils/oauth.js.map +1 -0
  144. package/dist/esm/utils/objects.js +177 -0
  145. package/dist/esm/utils/objects.js.map +1 -0
  146. package/dist/esm/utils/passkey.js +1 -0
  147. package/dist/esm/utils/passkey.js.map +1 -0
  148. package/dist/esm/utils/promises.js +233 -0
  149. package/dist/esm/utils/promises.js.map +1 -0
  150. package/dist/esm/utils/proxies.js +128 -0
  151. package/dist/esm/utils/proxies.js.map +1 -0
  152. package/dist/esm/utils/react.js +78 -0
  153. package/dist/esm/utils/react.js.map +1 -0
  154. package/dist/esm/utils/results.js +141 -0
  155. package/dist/esm/utils/results.js.map +1 -0
  156. package/dist/esm/utils/sentry.js +20 -0
  157. package/dist/esm/utils/sentry.js.map +1 -0
  158. package/dist/esm/utils/stores.js +195 -0
  159. package/dist/esm/utils/stores.js.map +1 -0
  160. package/dist/esm/utils/strings.js +295 -0
  161. package/dist/esm/utils/strings.js.map +1 -0
  162. package/dist/esm/utils/strings.nicify.test.js +222 -0
  163. package/dist/esm/utils/strings.nicify.test.js.map +1 -0
  164. package/dist/esm/utils/types.js +1 -0
  165. package/dist/esm/utils/types.js.map +1 -0
  166. package/dist/esm/utils/unicode.js +11 -0
  167. package/dist/esm/utils/unicode.js.map +1 -0
  168. package/dist/esm/utils/urls.js +53 -0
  169. package/dist/esm/utils/urls.js.map +1 -0
  170. package/dist/esm/utils/uuids.js +16 -0
  171. package/dist/esm/utils/uuids.js.map +1 -0
  172. package/dist/global.d.d.cts +1 -0
  173. package/dist/global.d.d.ts +1 -0
  174. package/dist/global.d.js +2 -0
  175. package/dist/global.d.js.map +1 -0
  176. package/dist/helpers/password.d.cts +11 -0
  177. package/dist/helpers/password.d.ts +11 -2
  178. package/dist/helpers/password.js +41 -11
  179. package/dist/helpers/password.js.map +1 -0
  180. package/dist/helpers/production-mode.d.cts +12 -0
  181. package/dist/helpers/production-mode.d.ts +9 -3
  182. package/dist/helpers/production-mode.js +72 -45
  183. package/dist/helpers/production-mode.js.map +1 -0
  184. package/dist/hooks/use-async-callback.d.cts +6 -0
  185. package/dist/hooks/use-async-callback.d.ts +6 -3
  186. package/dist/hooks/use-async-callback.js +72 -30
  187. package/dist/hooks/use-async-callback.js.map +1 -0
  188. package/dist/hooks/use-async-external-store.d.cts +7 -0
  189. package/dist/hooks/use-async-external-store.d.ts +5 -2
  190. package/dist/hooks/use-async-external-store.js +47 -19
  191. package/dist/hooks/use-async-external-store.js.map +1 -0
  192. package/dist/hooks/use-hash.d.cts +3 -0
  193. package/dist/hooks/use-hash.d.ts +3 -1
  194. package/dist/hooks/use-hash.js +41 -8
  195. package/dist/hooks/use-hash.js.map +1 -0
  196. package/dist/hooks/use-strict-memo.d.cts +8 -0
  197. package/dist/hooks/use-strict-memo.d.ts +3 -1
  198. package/dist/hooks/use-strict-memo.js +78 -131
  199. package/dist/hooks/use-strict-memo.js.map +1 -0
  200. package/dist/index.d.cts +30 -0
  201. package/dist/index.d.ts +30 -4
  202. package/dist/index.js +42 -4
  203. package/dist/index.js.map +1 -0
  204. package/dist/interface/adminInterface.d.cts +94 -0
  205. package/dist/interface/adminInterface.d.ts +38 -15
  206. package/dist/interface/adminInterface.js +269 -174
  207. package/dist/interface/adminInterface.js.map +1 -0
  208. package/dist/interface/clientInterface.d.cts +260 -0
  209. package/dist/interface/clientInterface.d.ts +25 -18
  210. package/dist/interface/clientInterface.js +2054 -995
  211. package/dist/interface/clientInterface.js.map +1 -0
  212. package/dist/interface/crud/contact-channels.d.cts +180 -0
  213. package/dist/interface/crud/contact-channels.d.ts +30 -25
  214. package/dist/interface/crud/contact-channels.js +101 -59
  215. package/dist/interface/crud/contact-channels.js.map +1 -0
  216. package/dist/interface/crud/current-user.d.cts +205 -0
  217. package/dist/interface/crud/current-user.d.ts +17 -12
  218. package/dist/interface/crud/current-user.js +86 -56
  219. package/dist/interface/crud/current-user.js.map +1 -0
  220. package/dist/interface/crud/email-templates.d.cts +84 -0
  221. package/dist/interface/crud/email-templates.d.ts +24 -19
  222. package/dist/interface/crud/email-templates.js +77 -37
  223. package/dist/interface/crud/email-templates.js.map +1 -0
  224. package/dist/interface/crud/emails.d.cts +69 -0
  225. package/dist/interface/crud/emails.d.ts +12 -7
  226. package/dist/interface/crud/emails.js +54 -12
  227. package/dist/interface/crud/emails.js.map +1 -0
  228. package/dist/interface/crud/internal-api-keys.d.cts +139 -0
  229. package/dist/interface/crud/internal-api-keys.d.ts +22 -17
  230. package/dist/interface/crud/internal-api-keys.js +92 -54
  231. package/dist/interface/crud/internal-api-keys.js.map +1 -0
  232. package/dist/interface/crud/oauth.d.cts +34 -0
  233. package/dist/interface/crud/oauth.d.ts +16 -11
  234. package/dist/interface/crud/oauth.js +48 -14
  235. package/dist/interface/crud/oauth.js.map +1 -0
  236. package/dist/interface/crud/project-api-keys.d.cts +196 -0
  237. package/dist/interface/crud/project-api-keys.d.ts +20 -12
  238. package/dist/interface/crud/project-api-keys.js +121 -74
  239. package/dist/interface/crud/project-api-keys.js.map +1 -0
  240. package/dist/interface/crud/project-permissions.d.cts +160 -0
  241. package/dist/interface/crud/project-permissions.d.ts +38 -33
  242. package/dist/interface/crud/project-permissions.js +148 -90
  243. package/dist/interface/crud/project-permissions.js.map +1 -0
  244. package/dist/interface/crud/projects.d.cts +627 -0
  245. package/dist/interface/crud/projects.d.ts +43 -51
  246. package/dist/interface/crud/projects.js +210 -156
  247. package/dist/interface/crud/projects.js.map +1 -0
  248. package/dist/interface/crud/sessions.d.cts +149 -0
  249. package/dist/interface/crud/sessions.d.ts +21 -16
  250. package/dist/interface/crud/sessions.js +86 -50
  251. package/dist/interface/crud/sessions.js.map +1 -0
  252. package/dist/interface/crud/svix-token.d.cts +26 -0
  253. package/dist/interface/crud/svix-token.d.ts +14 -9
  254. package/dist/interface/crud/svix-token.js +46 -12
  255. package/dist/interface/crud/svix-token.js.map +1 -0
  256. package/dist/interface/crud/team-invitation-details.d.cts +30 -0
  257. package/dist/interface/crud/team-invitation-details.d.ts +12 -7
  258. package/dist/interface/crud/team-invitation-details.js +57 -15
  259. package/dist/interface/crud/team-invitation-details.js.map +1 -0
  260. package/dist/interface/crud/team-invitation.d.cts +49 -0
  261. package/dist/interface/crud/team-invitation.d.ts +13 -8
  262. package/dist/interface/crud/team-invitation.js +69 -27
  263. package/dist/interface/crud/team-invitation.js.map +1 -0
  264. package/dist/interface/crud/team-member-profiles.d.cts +229 -0
  265. package/dist/interface/crud/team-member-profiles.d.ts +20 -15
  266. package/dist/interface/crud/team-member-profiles.js +95 -49
  267. package/dist/interface/crud/team-member-profiles.js.map +1 -0
  268. package/dist/interface/crud/team-memberships.d.cts +74 -0
  269. package/dist/interface/crud/team-memberships.d.ts +22 -17
  270. package/dist/interface/crud/team-memberships.js +85 -45
  271. package/dist/interface/crud/team-memberships.js.map +1 -0
  272. package/dist/interface/crud/team-permissions.d.cts +168 -0
  273. package/dist/interface/crud/team-permissions.d.ts +38 -33
  274. package/dist/interface/crud/team-permissions.js +149 -91
  275. package/dist/interface/crud/team-permissions.js.map +1 -0
  276. package/dist/interface/crud/teams.d.cts +298 -0
  277. package/dist/interface/crud/teams.d.ts +45 -40
  278. package/dist/interface/crud/teams.js +177 -119
  279. package/dist/interface/crud/teams.js.map +1 -0
  280. package/dist/interface/crud/users.d.cts +469 -0
  281. package/dist/interface/crud/users.d.ts +31 -26
  282. package/dist/interface/crud/users.js +172 -118
  283. package/dist/interface/crud/users.js.map +1 -0
  284. package/dist/interface/serverInterface.d.cts +128 -0
  285. package/dist/interface/serverInterface.d.ts +29 -17
  286. package/dist/interface/serverInterface.js +506 -339
  287. package/dist/interface/serverInterface.js.map +1 -0
  288. package/dist/interface/webhooks.d.cts +292 -0
  289. package/dist/interface/webhooks.d.ts +6 -3
  290. package/dist/interface/webhooks.js +45 -15
  291. package/dist/interface/webhooks.js.map +1 -0
  292. package/dist/known-errors.d.cts +447 -0
  293. package/dist/known-errors.d.ts +15 -9
  294. package/dist/known-errors.js +1104 -562
  295. package/dist/known-errors.js.map +1 -0
  296. package/dist/schema-fields.d.cts +163 -0
  297. package/dist/schema-fields.d.ts +116 -114
  298. package/dist/schema-fields.js +593 -427
  299. package/dist/schema-fields.js.map +1 -0
  300. package/dist/sessions.d.cts +109 -0
  301. package/dist/sessions.d.ts +6 -3
  302. package/dist/sessions.js +201 -172
  303. package/dist/sessions.js.map +1 -0
  304. package/dist/utils/api-keys.d.cts +24 -0
  305. package/dist/utils/api-keys.d.ts +5 -4
  306. package/dist/utils/api-keys.js +106 -66
  307. package/dist/utils/api-keys.js.map +1 -0
  308. package/dist/utils/arrays.d.cts +18 -0
  309. package/dist/utils/arrays.d.ts +15 -13
  310. package/dist/utils/arrays.js +101 -168
  311. package/dist/utils/arrays.js.map +1 -0
  312. package/dist/utils/base64.d.cts +4 -0
  313. package/dist/utils/base64.d.ts +4 -2
  314. package/dist/utils/base64.js +41 -20
  315. package/dist/utils/base64.js.map +1 -0
  316. package/dist/utils/booleans.d.cts +6 -0
  317. package/dist/utils/booleans.d.ts +6 -4
  318. package/dist/utils/booleans.js +35 -27
  319. package/dist/utils/booleans.js.map +1 -0
  320. package/dist/utils/browser-compat.d.cts +8 -0
  321. package/dist/utils/browser-compat.d.ts +3 -1
  322. package/dist/utils/browser-compat.js +45 -16
  323. package/dist/utils/browser-compat.js.map +1 -0
  324. package/dist/utils/bytes.d.cts +15 -0
  325. package/dist/utils/bytes.d.ts +15 -13
  326. package/dist/utils/bytes.js +182 -270
  327. package/dist/utils/bytes.js.map +1 -0
  328. package/dist/utils/caches.d.cts +98 -0
  329. package/dist/utils/caches.d.ts +17 -14
  330. package/dist/utils/caches.js +188 -193
  331. package/dist/utils/caches.js.map +1 -0
  332. package/dist/utils/compile-time.d.cts +8 -0
  333. package/dist/utils/compile-time.d.ts +3 -1
  334. package/dist/utils/compile-time.js +35 -10
  335. package/dist/utils/compile-time.js.map +1 -0
  336. package/dist/utils/crypto.d.cts +8 -0
  337. package/dist/utils/crypto.d.ts +4 -2
  338. package/dist/utils/crypto.js +49 -21
  339. package/dist/utils/crypto.js.map +1 -0
  340. package/dist/utils/dates.d.cts +15 -0
  341. package/dist/utils/dates.d.ts +6 -4
  342. package/dist/utils/dates.js +83 -105
  343. package/dist/utils/dates.js.map +1 -0
  344. package/dist/utils/dom.d.cts +3 -0
  345. package/dist/utils/dom.d.ts +3 -1
  346. package/dist/utils/dom.js +35 -7
  347. package/dist/utils/dom.js.map +1 -0
  348. package/dist/utils/env.d.cts +9 -0
  349. package/dist/utils/env.d.ts +6 -4
  350. package/dist/utils/env.js +70 -43
  351. package/dist/utils/env.js.map +1 -0
  352. package/dist/utils/errors.d.cts +223 -0
  353. package/dist/utils/errors.d.ts +14 -11
  354. package/dist/utils/errors.js +148 -126
  355. package/dist/utils/errors.js.map +1 -0
  356. package/dist/utils/fs.d.cts +7 -0
  357. package/dist/utils/fs.d.ts +5 -3
  358. package/dist/utils/fs.js +70 -27
  359. package/dist/utils/fs.js.map +1 -0
  360. package/dist/utils/functions.d.cts +4 -0
  361. package/dist/utils/functions.d.ts +4 -2
  362. package/dist/utils/functions.js +35 -18
  363. package/dist/utils/functions.js.map +1 -0
  364. package/dist/utils/geo.d.cts +22 -0
  365. package/dist/utils/geo.d.ts +6 -3
  366. package/dist/utils/geo.js +39 -9
  367. package/dist/utils/geo.js.map +1 -0
  368. package/dist/utils/globals.d.cts +5 -0
  369. package/dist/utils/globals.d.ts +4 -2
  370. package/dist/utils/globals.js +41 -14
  371. package/dist/utils/globals.js.map +1 -0
  372. package/dist/utils/hashes.d.cts +7 -0
  373. package/dist/utils/hashes.d.ts +7 -5
  374. package/dist/utils/hashes.js +87 -41
  375. package/dist/utils/hashes.js.map +1 -0
  376. package/dist/utils/html.d.cts +4 -0
  377. package/dist/utils/html.d.ts +4 -2
  378. package/dist/utils/html.js +36 -37
  379. package/dist/utils/html.js.map +1 -0
  380. package/dist/utils/http.d.cts +43 -0
  381. package/dist/utils/http.d.ts +6 -4
  382. package/dist/utils/http.js +83 -83
  383. package/dist/utils/http.js.map +1 -0
  384. package/dist/utils/ips.d.cts +6 -0
  385. package/dist/utils/ips.d.ts +6 -4
  386. package/dist/utils/ips.js +48 -35
  387. package/dist/utils/ips.js.map +1 -0
  388. package/dist/utils/json.d.cts +13 -0
  389. package/dist/utils/json.d.ts +9 -6
  390. package/dist/utils/json.js +54 -157
  391. package/dist/utils/json.js.map +1 -0
  392. package/dist/utils/jwt.d.cts +44 -0
  393. package/dist/utils/jwt.d.ts +14 -11
  394. package/dist/utils/jwt.js +119 -84
  395. package/dist/utils/jwt.js.map +1 -0
  396. package/dist/utils/locks.d.cts +15 -0
  397. package/dist/utils/locks.d.ts +3 -2
  398. package/dist/utils/locks.js +76 -56
  399. package/dist/utils/locks.js.map +1 -0
  400. package/dist/utils/maps.d.cts +59 -0
  401. package/dist/utils/maps.d.ts +6 -4
  402. package/dist/utils/maps.js +207 -343
  403. package/dist/utils/maps.js.map +1 -0
  404. package/dist/utils/math.d.cts +6 -0
  405. package/dist/utils/math.d.ts +3 -1
  406. package/dist/utils/math.js +31 -16
  407. package/dist/utils/math.js.map +1 -0
  408. package/dist/utils/node-http.d.cts +15 -0
  409. package/dist/utils/node-http.d.ts +5 -5
  410. package/dist/utils/node-http.js +65 -36
  411. package/dist/utils/node-http.js.map +1 -0
  412. package/dist/utils/numbers.d.cts +5 -0
  413. package/dist/utils/numbers.d.ts +5 -3
  414. package/dist/utils/numbers.js +53 -66
  415. package/dist/utils/numbers.js.map +1 -0
  416. package/dist/utils/oauth.d.cts +8 -0
  417. package/dist/utils/oauth.d.ts +8 -6
  418. package/dist/utils/oauth.js +37 -4
  419. package/dist/utils/oauth.js.map +1 -0
  420. package/dist/utils/objects.d.cts +69 -0
  421. package/dist/utils/objects.d.ts +37 -32
  422. package/dist/utils/objects.js +224 -374
  423. package/dist/utils/objects.js.map +1 -0
  424. package/dist/utils/passkey.d.cts +1 -0
  425. package/dist/utils/passkey.d.ts +1 -1
  426. package/dist/utils/passkey.js +19 -1
  427. package/dist/utils/passkey.js.map +1 -0
  428. package/dist/utils/promises.d.cts +74 -0
  429. package/dist/utils/promises.d.ts +20 -18
  430. package/dist/utils/promises.js +252 -393
  431. package/dist/utils/promises.js.map +1 -0
  432. package/dist/utils/proxies.d.cts +4 -0
  433. package/dist/utils/proxies.d.ts +4 -2
  434. package/dist/utils/proxies.js +150 -161
  435. package/dist/utils/proxies.js.map +1 -0
  436. package/dist/utils/react.d.cts +25 -0
  437. package/dist/utils/react.d.ts +9 -6
  438. package/dist/utils/react.js +88 -134
  439. package/dist/utils/react.js.map +1 -0
  440. package/dist/utils/results.d.cts +78 -0
  441. package/dist/utils/results.d.ts +10 -9
  442. package/dist/utils/results.js +143 -324
  443. package/dist/utils/results.js.map +1 -0
  444. package/dist/utils/sentry.d.cts +5 -0
  445. package/dist/utils/sentry.d.ts +5 -2
  446. package/dist/utils/sentry.js +44 -14
  447. package/dist/utils/sentry.js.map +1 -0
  448. package/dist/utils/stores.d.cts +102 -0
  449. package/dist/utils/stores.d.ts +12 -9
  450. package/dist/utils/stores.js +219 -189
  451. package/dist/utils/stores.js.map +1 -0
  452. package/dist/utils/strings.d.cts +72 -0
  453. package/dist/utils/strings.d.ts +22 -20
  454. package/dist/utils/strings.js +300 -580
  455. package/dist/utils/strings.js.map +1 -0
  456. package/dist/utils/strings.nicify.test.d.cts +2 -0
  457. package/dist/utils/strings.nicify.test.d.ts +2 -1
  458. package/dist/utils/strings.nicify.test.js +168 -158
  459. package/dist/utils/strings.nicify.test.js.map +1 -0
  460. package/dist/utils/types.d.cts +23 -0
  461. package/dist/utils/types.d.ts +8 -6
  462. package/dist/utils/types.js +19 -1
  463. package/dist/utils/types.js.map +1 -0
  464. package/dist/utils/unicode.d.cts +3 -0
  465. package/dist/utils/unicode.d.ts +3 -1
  466. package/dist/utils/unicode.js +34 -21
  467. package/dist/utils/unicode.js.map +1 -0
  468. package/dist/utils/urls.d.cts +20 -0
  469. package/dist/utils/urls.d.ts +10 -8
  470. package/dist/utils/urls.js +76 -165
  471. package/dist/utils/urls.js.map +1 -0
  472. package/dist/utils/uuids.d.cts +4 -0
  473. package/dist/utils/uuids.d.ts +4 -2
  474. package/dist/utils/uuids.js +39 -35
  475. package/dist/utils/uuids.js.map +1 -0
  476. package/package.json +5 -5
@@ -1,30 +1,72 @@
1
- import { createCrud } from "../../crud";
2
- import * as schemaFields from "../../schema-fields";
3
- import { yupObject } from "../../schema-fields";
4
- export const teamInvitationDetailsClientReadSchema = yupObject({
5
- id: schemaFields.yupString().uuid().defined(),
6
- team_id: schemaFields.teamIdSchema.defined(),
7
- expires_at_millis: schemaFields.yupNumber().defined(),
8
- recipient_email: schemaFields.emailSchema.defined(),
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/interface/crud/team-invitation.ts
31
+ var team_invitation_exports = {};
32
+ __export(team_invitation_exports, {
33
+ teamInvitationCrud: () => teamInvitationCrud,
34
+ teamInvitationDetailsClientReadSchema: () => teamInvitationDetailsClientReadSchema
35
+ });
36
+ module.exports = __toCommonJS(team_invitation_exports);
37
+ var import_crud = require("../../crud");
38
+ var schemaFields = __toESM(require("../../schema-fields"), 1);
39
+ var import_schema_fields = require("../../schema-fields");
40
+ var teamInvitationDetailsClientReadSchema = (0, import_schema_fields.yupObject)({
41
+ id: schemaFields.yupString().uuid().defined(),
42
+ team_id: schemaFields.teamIdSchema.defined(),
43
+ expires_at_millis: schemaFields.yupNumber().defined(),
44
+ recipient_email: schemaFields.emailSchema.defined()
9
45
  }).defined();
10
- export const teamInvitationCrud = createCrud({
11
- clientReadSchema: teamInvitationDetailsClientReadSchema,
12
- clientDeleteSchema: schemaFields.yupMixed(),
13
- docs: {
14
- clientRead: {
15
- summary: "Get the team details with invitation code",
16
- description: "",
17
- tags: ["Teams"],
18
- },
19
- clientList: {
20
- summary: "List team invitations",
21
- description: "",
22
- tags: ["Teams"],
23
- },
24
- clientDelete: {
25
- summary: "Delete a team invitation",
26
- description: "",
27
- tags: ["Teams"],
28
- },
46
+ var teamInvitationCrud = (0, import_crud.createCrud)({
47
+ clientReadSchema: teamInvitationDetailsClientReadSchema,
48
+ clientDeleteSchema: schemaFields.yupMixed(),
49
+ docs: {
50
+ clientRead: {
51
+ summary: "Get the team details with invitation code",
52
+ description: "",
53
+ tags: ["Teams"]
54
+ },
55
+ clientList: {
56
+ summary: "List team invitations",
57
+ description: "",
58
+ tags: ["Teams"]
29
59
  },
60
+ clientDelete: {
61
+ summary: "Delete a team invitation",
62
+ description: "",
63
+ tags: ["Teams"]
64
+ }
65
+ }
66
+ });
67
+ // Annotate the CommonJS export names for ESM import in node:
68
+ 0 && (module.exports = {
69
+ teamInvitationCrud,
70
+ teamInvitationDetailsClientReadSchema
30
71
  });
72
+ //# sourceMappingURL=team-invitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/interface/crud/team-invitation.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\n\nexport const teamInvitationDetailsClientReadSchema = yupObject({\n id: schemaFields.yupString().uuid().defined(),\n team_id: schemaFields.teamIdSchema.defined(),\n expires_at_millis: schemaFields.yupNumber().defined(),\n recipient_email: schemaFields.emailSchema.defined(),\n}).defined();\n\nexport const teamInvitationCrud = createCrud({\n clientReadSchema: teamInvitationDetailsClientReadSchema,\n clientDeleteSchema: schemaFields.yupMixed(),\n docs: {\n clientRead: {\n summary: \"Get the team details with invitation code\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientList: {\n summary: \"List team invitations\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientDelete: {\n summary: \"Delete a team invitation\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamInvitationCrud = CrudTypeOf<typeof teamInvitationCrud>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,mBAA8B;AAC9B,2BAA0B;AAEnB,IAAM,4CAAwC,gCAAU;AAAA,EAC7D,IAAiB,uBAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EAC5C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,mBAAgC,uBAAU,EAAE,QAAQ;AAAA,EACpD,iBAA8B,yBAAY,QAAQ;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,yBAAqB,wBAAW;AAAA,EAC3C,kBAAkB;AAAA,EAClB,oBAAiC,sBAAS;AAAA,EAC1C,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
@@ -0,0 +1,229 @@
1
+ import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.cjs';
2
+ import * as yup from 'yup';
3
+ import '../../utils/types.cjs';
4
+
5
+ declare const teamMemberProfilesCrudClientReadSchema: yup.ObjectSchema<{
6
+ team_id: string;
7
+ user_id: string;
8
+ display_name: string | null;
9
+ profile_image_url: string | null;
10
+ }, yup.AnyObject, {
11
+ team_id: undefined;
12
+ user_id: undefined;
13
+ display_name: undefined;
14
+ profile_image_url: undefined;
15
+ }, "">;
16
+ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
17
+ team_id: string;
18
+ user_id: string;
19
+ display_name: string | null;
20
+ profile_image_url: string | null;
21
+ } & {
22
+ user: {
23
+ id: string;
24
+ display_name: string | null;
25
+ oauth_providers: {
26
+ email?: string | null | undefined;
27
+ id: string;
28
+ account_id: string;
29
+ }[];
30
+ profile_image_url: string | null;
31
+ client_metadata: {} | null;
32
+ client_read_only_metadata: {} | null;
33
+ server_metadata: {} | null;
34
+ primary_email: string | null;
35
+ primary_email_verified: boolean;
36
+ primary_email_auth_enabled: boolean;
37
+ passkey_auth_enabled: boolean;
38
+ otp_auth_enabled: boolean;
39
+ selected_team_id: string | null;
40
+ is_anonymous: boolean;
41
+ selected_team: {
42
+ client_metadata?: {} | null | undefined;
43
+ client_read_only_metadata?: {} | null | undefined;
44
+ server_metadata?: {} | null | undefined;
45
+ id: string;
46
+ display_name: string;
47
+ created_at_millis: number;
48
+ profile_image_url: string | null;
49
+ } | null;
50
+ signed_up_at_millis: number;
51
+ has_password: boolean;
52
+ last_active_at_millis: number;
53
+ auth_with_email: boolean;
54
+ requires_totp_mfa: boolean;
55
+ };
56
+ }, yup.AnyObject, {
57
+ team_id: undefined;
58
+ user_id: undefined;
59
+ display_name: undefined;
60
+ profile_image_url: undefined;
61
+ user: {
62
+ id: undefined;
63
+ primary_email: undefined;
64
+ primary_email_verified: undefined;
65
+ primary_email_auth_enabled: undefined;
66
+ display_name: undefined;
67
+ selected_team: {
68
+ id: undefined;
69
+ display_name: undefined;
70
+ profile_image_url: undefined;
71
+ client_metadata: undefined;
72
+ client_read_only_metadata: undefined;
73
+ created_at_millis: undefined;
74
+ server_metadata: undefined;
75
+ };
76
+ selected_team_id: undefined;
77
+ profile_image_url: undefined;
78
+ signed_up_at_millis: undefined;
79
+ has_password: undefined;
80
+ otp_auth_enabled: undefined;
81
+ passkey_auth_enabled: undefined;
82
+ client_metadata: undefined;
83
+ client_read_only_metadata: undefined;
84
+ server_metadata: undefined;
85
+ last_active_at_millis: undefined;
86
+ is_anonymous: undefined;
87
+ oauth_providers: undefined;
88
+ auth_with_email: undefined;
89
+ requires_totp_mfa: undefined;
90
+ };
91
+ }, "">;
92
+ declare const teamMemberProfilesCrudClientUpdateSchema: yup.ObjectSchema<{
93
+ display_name: string | undefined;
94
+ profile_image_url: string | null | undefined;
95
+ }, yup.AnyObject, {
96
+ display_name: undefined;
97
+ profile_image_url: undefined;
98
+ }, "">;
99
+ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
100
+ clientReadSchema: yup.ObjectSchema<{
101
+ team_id: string;
102
+ user_id: string;
103
+ display_name: string | null;
104
+ profile_image_url: string | null;
105
+ }, yup.AnyObject, {
106
+ team_id: undefined;
107
+ user_id: undefined;
108
+ display_name: undefined;
109
+ profile_image_url: undefined;
110
+ }, "">;
111
+ serverReadSchema: yup.ObjectSchema<{
112
+ team_id: string;
113
+ user_id: string;
114
+ display_name: string | null;
115
+ profile_image_url: string | null;
116
+ } & {
117
+ user: {
118
+ id: string;
119
+ display_name: string | null;
120
+ oauth_providers: {
121
+ email?: string | null | undefined;
122
+ id: string;
123
+ account_id: string;
124
+ }[];
125
+ profile_image_url: string | null;
126
+ client_metadata: {} | null;
127
+ client_read_only_metadata: {} | null;
128
+ server_metadata: {} | null;
129
+ primary_email: string | null;
130
+ primary_email_verified: boolean;
131
+ primary_email_auth_enabled: boolean;
132
+ passkey_auth_enabled: boolean;
133
+ otp_auth_enabled: boolean;
134
+ selected_team_id: string | null;
135
+ is_anonymous: boolean;
136
+ selected_team: {
137
+ client_metadata?: {} | null | undefined;
138
+ client_read_only_metadata?: {} | null | undefined;
139
+ server_metadata?: {} | null | undefined;
140
+ id: string;
141
+ display_name: string;
142
+ created_at_millis: number;
143
+ profile_image_url: string | null;
144
+ } | null;
145
+ signed_up_at_millis: number;
146
+ has_password: boolean;
147
+ last_active_at_millis: number;
148
+ auth_with_email: boolean;
149
+ requires_totp_mfa: boolean;
150
+ };
151
+ }, yup.AnyObject, {
152
+ team_id: undefined;
153
+ user_id: undefined;
154
+ display_name: undefined;
155
+ profile_image_url: undefined;
156
+ user: {
157
+ id: undefined;
158
+ primary_email: undefined;
159
+ primary_email_verified: undefined;
160
+ primary_email_auth_enabled: undefined;
161
+ display_name: undefined;
162
+ selected_team: {
163
+ id: undefined;
164
+ display_name: undefined;
165
+ profile_image_url: undefined;
166
+ client_metadata: undefined;
167
+ client_read_only_metadata: undefined;
168
+ created_at_millis: undefined;
169
+ server_metadata: undefined;
170
+ };
171
+ selected_team_id: undefined;
172
+ profile_image_url: undefined;
173
+ signed_up_at_millis: undefined;
174
+ has_password: undefined;
175
+ otp_auth_enabled: undefined;
176
+ passkey_auth_enabled: undefined;
177
+ client_metadata: undefined;
178
+ client_read_only_metadata: undefined;
179
+ server_metadata: undefined;
180
+ last_active_at_millis: undefined;
181
+ is_anonymous: undefined;
182
+ oauth_providers: undefined;
183
+ auth_with_email: undefined;
184
+ requires_totp_mfa: undefined;
185
+ };
186
+ }, "">;
187
+ clientUpdateSchema: yup.ObjectSchema<{
188
+ display_name: string | undefined;
189
+ profile_image_url: string | null | undefined;
190
+ }, yup.AnyObject, {
191
+ display_name: undefined;
192
+ profile_image_url: undefined;
193
+ }, "">;
194
+ docs: {
195
+ clientList: {
196
+ summary: string;
197
+ description: string;
198
+ tags: string[];
199
+ };
200
+ serverList: {
201
+ summary: string;
202
+ description: string;
203
+ tags: string[];
204
+ };
205
+ clientRead: {
206
+ summary: string;
207
+ description: string;
208
+ tags: string[];
209
+ };
210
+ serverRead: {
211
+ summary: string;
212
+ description: string;
213
+ tags: string[];
214
+ };
215
+ clientUpdate: {
216
+ summary: string;
217
+ description: string;
218
+ tags: string[];
219
+ };
220
+ serverUpdate: {
221
+ summary: string;
222
+ description: string;
223
+ tags: string[];
224
+ };
225
+ };
226
+ }>;
227
+ type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;
228
+
229
+ export { type TeamMemberProfilesCrud, teamMemberProfilesCrud, teamMemberProfilesCrudClientReadSchema, teamMemberProfilesCrudClientUpdateSchema, teamMemberProfilesCrudServerReadSchema };
@@ -1,16 +1,19 @@
1
- import { CrudTypeOf } from "../../crud";
2
- export declare const teamMemberProfilesCrudClientReadSchema: import("yup").ObjectSchema<{
1
+ import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
+ import * as yup from 'yup';
3
+ import '../../utils/types.js';
4
+
5
+ declare const teamMemberProfilesCrudClientReadSchema: yup.ObjectSchema<{
3
6
  team_id: string;
4
7
  user_id: string;
5
8
  display_name: string | null;
6
9
  profile_image_url: string | null;
7
- }, import("yup").AnyObject, {
10
+ }, yup.AnyObject, {
8
11
  team_id: undefined;
9
12
  user_id: undefined;
10
13
  display_name: undefined;
11
14
  profile_image_url: undefined;
12
15
  }, "">;
13
- export declare const teamMemberProfilesCrudServerReadSchema: import("yup").ObjectSchema<{
16
+ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
14
17
  team_id: string;
15
18
  user_id: string;
16
19
  display_name: string | null;
@@ -50,7 +53,7 @@ export declare const teamMemberProfilesCrudServerReadSchema: import("yup").Objec
50
53
  auth_with_email: boolean;
51
54
  requires_totp_mfa: boolean;
52
55
  };
53
- }, import("yup").AnyObject, {
56
+ }, yup.AnyObject, {
54
57
  team_id: undefined;
55
58
  user_id: undefined;
56
59
  display_name: undefined;
@@ -86,26 +89,26 @@ export declare const teamMemberProfilesCrudServerReadSchema: import("yup").Objec
86
89
  requires_totp_mfa: undefined;
87
90
  };
88
91
  }, "">;
89
- export declare const teamMemberProfilesCrudClientUpdateSchema: import("yup").ObjectSchema<{
92
+ declare const teamMemberProfilesCrudClientUpdateSchema: yup.ObjectSchema<{
90
93
  display_name: string | undefined;
91
94
  profile_image_url: string | null | undefined;
92
- }, import("yup").AnyObject, {
95
+ }, yup.AnyObject, {
93
96
  display_name: undefined;
94
97
  profile_image_url: undefined;
95
98
  }, "">;
96
- export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFromOptions<{
97
- clientReadSchema: import("yup").ObjectSchema<{
99
+ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
100
+ clientReadSchema: yup.ObjectSchema<{
98
101
  team_id: string;
99
102
  user_id: string;
100
103
  display_name: string | null;
101
104
  profile_image_url: string | null;
102
- }, import("yup").AnyObject, {
105
+ }, yup.AnyObject, {
103
106
  team_id: undefined;
104
107
  user_id: undefined;
105
108
  display_name: undefined;
106
109
  profile_image_url: undefined;
107
110
  }, "">;
108
- serverReadSchema: import("yup").ObjectSchema<{
111
+ serverReadSchema: yup.ObjectSchema<{
109
112
  team_id: string;
110
113
  user_id: string;
111
114
  display_name: string | null;
@@ -145,7 +148,7 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
145
148
  auth_with_email: boolean;
146
149
  requires_totp_mfa: boolean;
147
150
  };
148
- }, import("yup").AnyObject, {
151
+ }, yup.AnyObject, {
149
152
  team_id: undefined;
150
153
  user_id: undefined;
151
154
  display_name: undefined;
@@ -181,10 +184,10 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
181
184
  requires_totp_mfa: undefined;
182
185
  };
183
186
  }, "">;
184
- clientUpdateSchema: import("yup").ObjectSchema<{
187
+ clientUpdateSchema: yup.ObjectSchema<{
185
188
  display_name: string | undefined;
186
189
  profile_image_url: string | null | undefined;
187
- }, import("yup").AnyObject, {
190
+ }, yup.AnyObject, {
188
191
  display_name: undefined;
189
192
  profile_image_url: undefined;
190
193
  }, "">;
@@ -221,4 +224,6 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
221
224
  };
222
225
  };
223
226
  }>;
224
- export type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;
227
+ type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;
228
+
229
+ export { type TeamMemberProfilesCrud, teamMemberProfilesCrud, teamMemberProfilesCrudClientReadSchema, teamMemberProfilesCrudClientUpdateSchema, teamMemberProfilesCrudServerReadSchema };
@@ -1,54 +1,100 @@
1
- import { createCrud } from "../../crud";
2
- import * as schemaFields from "../../schema-fields";
3
- import { yupObject } from "../../schema-fields";
4
- import { usersCrudServerReadSchema } from "./users";
5
- export const teamMemberProfilesCrudClientReadSchema = yupObject({
6
- team_id: schemaFields.teamIdSchema.defined(),
7
- user_id: schemaFields.userIdSchema.defined(),
8
- display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),
9
- profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined(),
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/interface/crud/team-member-profiles.ts
31
+ var team_member_profiles_exports = {};
32
+ __export(team_member_profiles_exports, {
33
+ teamMemberProfilesCrud: () => teamMemberProfilesCrud,
34
+ teamMemberProfilesCrudClientReadSchema: () => teamMemberProfilesCrudClientReadSchema,
35
+ teamMemberProfilesCrudClientUpdateSchema: () => teamMemberProfilesCrudClientUpdateSchema,
36
+ teamMemberProfilesCrudServerReadSchema: () => teamMemberProfilesCrudServerReadSchema
37
+ });
38
+ module.exports = __toCommonJS(team_member_profiles_exports);
39
+ var import_crud = require("../../crud");
40
+ var schemaFields = __toESM(require("../../schema-fields"), 1);
41
+ var import_schema_fields = require("../../schema-fields");
42
+ var import_users = require("./users");
43
+ var teamMemberProfilesCrudClientReadSchema = (0, import_schema_fields.yupObject)({
44
+ team_id: schemaFields.teamIdSchema.defined(),
45
+ user_id: schemaFields.userIdSchema.defined(),
46
+ display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),
47
+ profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined()
10
48
  }).defined();
11
- export const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({
12
- user: usersCrudServerReadSchema.defined(),
49
+ var teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat((0, import_schema_fields.yupObject)({
50
+ user: import_users.usersCrudServerReadSchema.defined()
13
51
  })).defined();
14
- export const teamMemberProfilesCrudClientUpdateSchema = yupObject({
15
- display_name: schemaFields.teamMemberDisplayNameSchema.optional(),
16
- profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional(),
52
+ var teamMemberProfilesCrudClientUpdateSchema = (0, import_schema_fields.yupObject)({
53
+ display_name: schemaFields.teamMemberDisplayNameSchema.optional(),
54
+ profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional()
17
55
  }).defined();
18
- export const teamMemberProfilesCrud = createCrud({
19
- clientReadSchema: teamMemberProfilesCrudClientReadSchema,
20
- serverReadSchema: teamMemberProfilesCrudServerReadSchema,
21
- clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,
22
- docs: {
23
- clientList: {
24
- summary: "List team members profiles",
25
- description: "List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.",
26
- tags: ["Teams"],
27
- },
28
- serverList: {
29
- summary: "List team members profiles",
30
- description: "List team members profiles and filter by team ID and user ID",
31
- tags: ["Teams"],
32
- },
33
- clientRead: {
34
- summary: "Get a team member profile",
35
- description: "Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.",
36
- tags: ["Teams"],
37
- },
38
- serverRead: {
39
- summary: "Get a team member profile",
40
- description: "Get a team member profile by user ID",
41
- tags: ["Teams"],
42
- },
43
- clientUpdate: {
44
- summary: "Update your team member profile",
45
- description: "Update your own team member profile. `user_id` must be `me` in the path parameters on the client.",
46
- tags: ["Teams"],
47
- },
48
- serverUpdate: {
49
- summary: "Update a team member profile",
50
- description: "Update a team member profile by user ID",
51
- tags: ["Teams"],
52
- },
56
+ var teamMemberProfilesCrud = (0, import_crud.createCrud)({
57
+ clientReadSchema: teamMemberProfilesCrudClientReadSchema,
58
+ serverReadSchema: teamMemberProfilesCrudServerReadSchema,
59
+ clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,
60
+ docs: {
61
+ clientList: {
62
+ summary: "List team members profiles",
63
+ description: "List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.",
64
+ tags: ["Teams"]
65
+ },
66
+ serverList: {
67
+ summary: "List team members profiles",
68
+ description: "List team members profiles and filter by team ID and user ID",
69
+ tags: ["Teams"]
70
+ },
71
+ clientRead: {
72
+ summary: "Get a team member profile",
73
+ description: "Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.",
74
+ tags: ["Teams"]
53
75
  },
76
+ serverRead: {
77
+ summary: "Get a team member profile",
78
+ description: "Get a team member profile by user ID",
79
+ tags: ["Teams"]
80
+ },
81
+ clientUpdate: {
82
+ summary: "Update your team member profile",
83
+ description: "Update your own team member profile. `user_id` must be `me` in the path parameters on the client.",
84
+ tags: ["Teams"]
85
+ },
86
+ serverUpdate: {
87
+ summary: "Update a team member profile",
88
+ description: "Update a team member profile by user ID",
89
+ tags: ["Teams"]
90
+ }
91
+ }
92
+ });
93
+ // Annotate the CommonJS export names for ESM import in node:
94
+ 0 && (module.exports = {
95
+ teamMemberProfilesCrud,
96
+ teamMemberProfilesCrudClientReadSchema,
97
+ teamMemberProfilesCrudClientUpdateSchema,
98
+ teamMemberProfilesCrudServerReadSchema
54
99
  });
100
+ //# sourceMappingURL=team-member-profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/interface/crud/team-member-profiles.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\nimport { usersCrudServerReadSchema } from \"./users\";\n\n\nexport const teamMemberProfilesCrudClientReadSchema = yupObject({\n team_id: schemaFields.teamIdSchema.defined(),\n user_id: schemaFields.userIdSchema.defined(),\n display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined(),\n}).defined();\n\nexport const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({\n user: usersCrudServerReadSchema.defined(),\n})).defined();\n\nexport const teamMemberProfilesCrudClientUpdateSchema = yupObject({\n display_name: schemaFields.teamMemberDisplayNameSchema.optional(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional(),\n}).defined();\n\nexport const teamMemberProfilesCrud = createCrud({\n clientReadSchema: teamMemberProfilesCrudClientReadSchema,\n serverReadSchema: teamMemberProfilesCrudServerReadSchema,\n clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,\n docs: {\n clientList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles and filter by team ID and user ID\",\n tags: [\"Teams\"],\n },\n clientRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n clientUpdate: {\n summary: \"Update your team member profile\",\n description: \"Update your own team member profile. `user_id` must be `me` in the path parameters on the client.\",\n tags: [\"Teams\"],\n },\n serverUpdate: {\n summary: \"Update a team member profile\",\n description: \"Update a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,mBAA8B;AAC9B,2BAA0B;AAC1B,mBAA0C;AAGnC,IAAM,6CAAyC,gCAAU;AAAA,EAC9D,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,cAA2B,yCAA4B,SAAS,EAAE,QAAQ;AAAA,EAC1E,mBAAgC,6CAAgC,SAAS,EAAE,QAAQ;AACrF,CAAC,EAAE,QAAQ;AAEJ,IAAM,yCAAyC,uCAAuC,WAAO,gCAAU;AAAA,EAC5G,MAAM,uCAA0B,QAAQ;AAC1C,CAAC,CAAC,EAAE,QAAQ;AAEL,IAAM,+CAA2C,gCAAU;AAAA,EAChE,cAA2B,yCAA4B,SAAS;AAAA,EAChE,mBAAgC,6CAAgC,SAAS,EAAE,SAAS;AACtF,CAAC,EAAE,QAAQ;AAEJ,IAAM,6BAAyB,wBAAW;AAAA,EAC/C,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
@@ -0,0 +1,74 @@
1
+ import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.cjs';
2
+ import * as yup from 'yup';
3
+ import '../../utils/types.cjs';
4
+
5
+ declare const teamMembershipsCrudClientReadSchema: yup.ObjectSchema<{
6
+ team_id: string;
7
+ user_id: string;
8
+ }, yup.AnyObject, {
9
+ team_id: undefined;
10
+ user_id: undefined;
11
+ }, "">;
12
+ declare const teamMembershipsCrudServerCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
13
+ declare const teamMembershipsCrudClientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
14
+ declare const teamMembershipsCrud: CrudSchemaFromOptions<{
15
+ clientReadSchema: yup.ObjectSchema<{
16
+ team_id: string;
17
+ user_id: string;
18
+ }, yup.AnyObject, {
19
+ team_id: undefined;
20
+ user_id: undefined;
21
+ }, "">;
22
+ clientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
23
+ serverCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
24
+ docs: {
25
+ serverCreate: {
26
+ summary: string;
27
+ description: string;
28
+ tags: string[];
29
+ };
30
+ clientDelete: {
31
+ summary: string;
32
+ description: string;
33
+ tags: string[];
34
+ };
35
+ serverDelete: {
36
+ summary: string;
37
+ description: string;
38
+ tags: string[];
39
+ };
40
+ };
41
+ }>;
42
+ type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;
43
+ declare const teamMembershipCreatedWebhookEvent: {
44
+ type: string;
45
+ schema: yup.ObjectSchema<{
46
+ team_id: string;
47
+ user_id: string;
48
+ }, yup.AnyObject, {
49
+ team_id: undefined;
50
+ user_id: undefined;
51
+ }, "">;
52
+ metadata: {
53
+ summary: string;
54
+ description: string;
55
+ tags: string[];
56
+ };
57
+ };
58
+ declare const teamMembershipDeletedWebhookEvent: {
59
+ type: string;
60
+ schema: yup.ObjectSchema<{
61
+ team_id: string;
62
+ user_id: string;
63
+ }, yup.AnyObject, {
64
+ team_id: undefined;
65
+ user_id: undefined;
66
+ }, "">;
67
+ metadata: {
68
+ summary: string;
69
+ description: string;
70
+ tags: string[];
71
+ };
72
+ };
73
+
74
+ export { type TeamMembershipsCrud, teamMembershipCreatedWebhookEvent, teamMembershipDeletedWebhookEvent, teamMembershipsCrud, teamMembershipsCrudClientDeleteSchema, teamMembershipsCrudClientReadSchema, teamMembershipsCrudServerCreateSchema };