@go-mondo/identity-sdk 0.0.2-beta.6 → 0.0.2-beta.8

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 (363) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/.tsbuildinfo/cjs.json +1 -1
  3. package/.tsbuildinfo/esm.json +1 -1
  4. package/CHANGELOG.md +14 -0
  5. package/dist/cjs/action/schema/base.d.ts +5 -5
  6. package/dist/cjs/action/schema/operations/set-password.d.ts +11 -11
  7. package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +5 -5
  8. package/dist/cjs/action/schema/operations/sign-up.d.ts +7 -7
  9. package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +5 -5
  10. package/dist/cjs/action/schema/schema.d.ts +26 -26
  11. package/dist/cjs/activity/index.d.ts +1 -0
  12. package/dist/cjs/activity/index.d.ts.map +1 -1
  13. package/dist/cjs/activity/index.js +1 -0
  14. package/dist/cjs/activity/resources.d.ts +13 -0
  15. package/dist/cjs/activity/resources.d.ts.map +1 -0
  16. package/dist/cjs/activity/resources.js +29 -0
  17. package/dist/cjs/activity/schema/base.d.ts +23 -7
  18. package/dist/cjs/activity/schema/base.d.ts.map +1 -1
  19. package/dist/cjs/activity/schema/base.js +12 -2
  20. package/dist/cjs/activity/schema/schema.d.ts +123 -29
  21. package/dist/cjs/activity/schema/schema.d.ts.map +1 -1
  22. package/dist/cjs/activity/schema/schema.js +5 -2
  23. package/dist/cjs/activity/schema/types/authentication.d.ts +28 -5
  24. package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -1
  25. package/dist/cjs/activity/schema/types/authentication.js +5 -2
  26. package/dist/cjs/activity/schema/types/authorization.d.ts +28 -5
  27. package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -1
  28. package/dist/cjs/activity/schema/types/authorization.js +6 -4
  29. package/dist/cjs/activity/schema/types/note.d.ts +27 -7
  30. package/dist/cjs/activity/schema/types/note.d.ts.map +1 -1
  31. package/dist/cjs/activity/schema/types/note.js +4 -2
  32. package/dist/cjs/activity/schema/types/operation.d.ts +27 -5
  33. package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -1
  34. package/dist/cjs/activity/schema/types/operation.js +4 -2
  35. package/dist/cjs/activity/schema/types/unknown.d.ts +25 -5
  36. package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -1
  37. package/dist/cjs/activity/schema/types/unknown.js +4 -2
  38. package/dist/cjs/app/authorization/resources.d.ts +12 -0
  39. package/dist/cjs/app/authorization/resources.d.ts.map +1 -0
  40. package/dist/cjs/app/authorization/resources.js +35 -0
  41. package/dist/cjs/app/authorization/schema.d.ts +28 -11
  42. package/dist/cjs/app/authorization/schema.d.ts.map +1 -1
  43. package/dist/cjs/app/authorization/schema.js +30 -14
  44. package/dist/cjs/app/index.d.ts +6 -0
  45. package/dist/cjs/app/index.d.ts.map +1 -1
  46. package/dist/cjs/app/index.js +6 -0
  47. package/dist/cjs/app/oauth/resources.d.ts +12 -0
  48. package/dist/cjs/app/oauth/resources.d.ts.map +1 -0
  49. package/dist/cjs/app/oauth/resources.js +35 -0
  50. package/dist/cjs/app/oauth/schema.d.ts +17 -5
  51. package/dist/cjs/app/oauth/schema.d.ts.map +1 -1
  52. package/dist/cjs/app/oauth/schema.js +9 -2
  53. package/dist/cjs/app/oidc/resources.d.ts +16 -0
  54. package/dist/cjs/app/oidc/resources.d.ts.map +1 -0
  55. package/dist/cjs/app/oidc/resources.js +49 -0
  56. package/dist/cjs/app/oidc/schema.d.ts +18 -8
  57. package/dist/cjs/app/oidc/schema.d.ts.map +1 -1
  58. package/dist/cjs/app/oidc/schema.js +7 -2
  59. package/dist/cjs/app/registration/resources.d.ts +12 -0
  60. package/dist/cjs/app/registration/resources.d.ts.map +1 -0
  61. package/dist/cjs/app/registration/resources.js +35 -0
  62. package/dist/cjs/app/registration/schema.d.ts +15 -5
  63. package/dist/cjs/app/registration/schema.d.ts.map +1 -1
  64. package/dist/cjs/app/registration/schema.js +9 -2
  65. package/dist/cjs/app/resources.d.ts +21 -0
  66. package/dist/cjs/app/resources.d.ts.map +1 -0
  67. package/dist/cjs/app/resources.js +57 -0
  68. package/dist/cjs/app/saml/resources.d.ts +16 -0
  69. package/dist/cjs/app/saml/resources.d.ts.map +1 -0
  70. package/dist/cjs/app/saml/resources.js +49 -0
  71. package/dist/cjs/app/saml/schema.d.ts +18 -8
  72. package/dist/cjs/app/saml/schema.d.ts.map +1 -1
  73. package/dist/cjs/app/saml/schema.js +7 -2
  74. package/dist/cjs/app/schema.d.ts +24 -9
  75. package/dist/cjs/app/schema.d.ts.map +1 -1
  76. package/dist/cjs/app/schema.js +11 -3
  77. package/dist/cjs/association/index.d.ts +1 -0
  78. package/dist/cjs/association/index.d.ts.map +1 -1
  79. package/dist/cjs/association/index.js +1 -0
  80. package/dist/cjs/association/resources.d.ts +23 -0
  81. package/dist/cjs/association/resources.d.ts.map +1 -0
  82. package/dist/cjs/association/resources.js +51 -0
  83. package/dist/cjs/association/schema.d.ts +138 -19
  84. package/dist/cjs/association/schema.d.ts.map +1 -1
  85. package/dist/cjs/association/schema.js +30 -3
  86. package/dist/cjs/authentication/factors/schema.d.ts +11 -2
  87. package/dist/cjs/authentication/factors/schema.d.ts.map +1 -1
  88. package/dist/cjs/authentication/factors/schema.js +5 -1
  89. package/dist/cjs/authentication/index.d.ts +3 -0
  90. package/dist/cjs/authentication/index.d.ts.map +1 -1
  91. package/dist/cjs/authentication/index.js +3 -0
  92. package/dist/cjs/authentication/providers/schema.d.ts +4 -4
  93. package/dist/cjs/authentication/resources.d.ts +2 -0
  94. package/dist/cjs/authentication/resources.d.ts.map +1 -0
  95. package/dist/cjs/authentication/resources.js +4 -0
  96. package/dist/cjs/authentication/sessions/resources.d.ts +21 -0
  97. package/dist/cjs/authentication/sessions/resources.d.ts.map +1 -0
  98. package/dist/cjs/authentication/sessions/resources.js +43 -0
  99. package/dist/cjs/authentication/sessions/schema.d.ts +35 -13
  100. package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -1
  101. package/dist/cjs/authentication/sessions/schema.js +15 -6
  102. package/dist/cjs/authentication/settings/resources.d.ts +12 -0
  103. package/dist/cjs/authentication/settings/resources.d.ts.map +1 -0
  104. package/dist/cjs/authentication/settings/resources.js +32 -0
  105. package/dist/cjs/authentication/settings/schema.d.ts +30 -7
  106. package/dist/cjs/authentication/settings/schema.d.ts.map +1 -1
  107. package/dist/cjs/authentication/settings/schema.js +8 -1
  108. package/dist/cjs/authentication/strategies/resources.d.ts +20 -0
  109. package/dist/cjs/authentication/strategies/resources.d.ts.map +1 -0
  110. package/dist/cjs/authentication/strategies/resources.js +58 -0
  111. package/dist/cjs/authentication/strategies/schema/base.d.ts +17 -7
  112. package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -1
  113. package/dist/cjs/authentication/strategies/schema/base.js +10 -2
  114. package/dist/cjs/authentication/strategies/schema/schema.d.ts +102 -53
  115. package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -1
  116. package/dist/cjs/authentication/strategies/schema/schema.js +2 -1
  117. package/dist/cjs/authentication/strategies/schema/types/email.d.ts +27 -9
  118. package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -1
  119. package/dist/cjs/authentication/strategies/schema/types/email.js +4 -3
  120. package/dist/cjs/authentication/strategies/schema/types/password.d.ts +76 -43
  121. package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +1 -1
  122. package/dist/cjs/authentication/strategies/schema/types/password.js +26 -9
  123. package/dist/cjs/authentication/strategies/schema/types/totp.d.ts +33 -13
  124. package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -1
  125. package/dist/cjs/authentication/strategies/schema/types/totp.js +12 -3
  126. package/dist/cjs/authorization/permissions/resources.d.ts +2 -2
  127. package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -1
  128. package/dist/cjs/authorization/permissions/resources.js +1 -1
  129. package/dist/cjs/authorization/permissions/schema.d.ts +9 -9
  130. package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -1
  131. package/dist/cjs/authorization/permissions/schema.js +3 -1
  132. package/dist/cjs/authorization/roles/resources.d.ts +2 -2
  133. package/dist/cjs/authorization/roles/resources.d.ts.map +1 -1
  134. package/dist/cjs/authorization/roles/resources.js +1 -1
  135. package/dist/cjs/authorization/roles/schema.d.ts +9 -9
  136. package/dist/cjs/authorization/roles/schema.d.ts.map +1 -1
  137. package/dist/cjs/authorization/roles/schema.js +3 -1
  138. package/dist/cjs/common/index.d.ts +1 -0
  139. package/dist/cjs/common/index.d.ts.map +1 -1
  140. package/dist/cjs/common/index.js +6 -0
  141. package/dist/cjs/common/schema/dates.d.ts +7 -7
  142. package/dist/cjs/common/schema/dates.d.ts.map +1 -1
  143. package/dist/cjs/common/schema/metadata.d.ts +8 -6
  144. package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
  145. package/dist/cjs/common/schema/schema.d.ts +2 -1
  146. package/dist/cjs/common/schema/schema.d.ts.map +1 -1
  147. package/dist/cjs/common/schema/schema.js +2 -1
  148. package/dist/cjs/common/schema/schema.test.d.ts +2 -0
  149. package/dist/cjs/common/schema/schema.test.d.ts.map +1 -0
  150. package/dist/cjs/common/schema/schema.test.js +35 -0
  151. package/dist/cjs/common/schema/sets.d.ts +2 -2
  152. package/dist/cjs/common/schema/sets.d.ts.map +1 -1
  153. package/dist/cjs/common/schema/url.d.ts +2 -0
  154. package/dist/cjs/common/schema/url.d.ts.map +1 -0
  155. package/dist/cjs/common/schema/url.js +12 -0
  156. package/dist/cjs/customer/index.d.ts +1 -0
  157. package/dist/cjs/customer/index.d.ts.map +1 -1
  158. package/dist/cjs/customer/index.js +1 -0
  159. package/dist/cjs/customer/schema/organization.d.ts +7 -7
  160. package/dist/cjs/customer/users/resources.d.ts +2 -2
  161. package/dist/cjs/customer/users/resources.d.ts.map +1 -1
  162. package/dist/cjs/customer/users/resources.js +2 -2
  163. package/dist/cjs/customer/users/schema.d.ts +11 -12
  164. package/dist/cjs/customer/users/schema.d.ts.map +1 -1
  165. package/dist/cjs/customer/users/schema.js +2 -4
  166. package/dist/cjs/customer/users/schema.test.js +2 -0
  167. package/dist/cjs/customer/users/utils.d.ts +10 -0
  168. package/dist/cjs/customer/users/utils.d.ts.map +1 -0
  169. package/dist/cjs/customer/users/utils.js +33 -0
  170. package/dist/cjs/oauth/common/schema.d.ts +6 -0
  171. package/dist/cjs/oauth/common/schema.d.ts.map +1 -1
  172. package/dist/cjs/oauth/common/schema.js +7 -1
  173. package/dist/cjs/oauth/index.d.ts +1 -1
  174. package/dist/cjs/oauth/index.d.ts.map +1 -1
  175. package/dist/cjs/oauth/index.js +2 -1
  176. package/dist/cjs/workspace/authorization/schema.d.ts +5 -5
  177. package/dist/cjs/workspace/branding/schema.d.ts +5 -5
  178. package/dist/cjs/workspace/membership/schema.d.ts +5 -5
  179. package/dist/cjs/workspace/registration/schema.d.ts +5 -5
  180. package/dist/cjs/workspace/settings/schema.d.ts +5 -5
  181. package/dist/cjs/workspace/tenant/schema.d.ts +10 -10
  182. package/dist/cjs/workspace/user/notifications/schema.d.ts +7 -7
  183. package/dist/cjs/workspace/user/preferences/schema.d.ts +5 -5
  184. package/dist/esm/action/schema/base.d.ts +5 -5
  185. package/dist/esm/action/schema/operations/set-password.d.ts +11 -11
  186. package/dist/esm/action/schema/operations/sign-up-verification.d.ts +5 -5
  187. package/dist/esm/action/schema/operations/sign-up.d.ts +7 -7
  188. package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +5 -5
  189. package/dist/esm/action/schema/schema.d.ts +26 -26
  190. package/dist/esm/activity/index.d.ts +1 -0
  191. package/dist/esm/activity/index.d.ts.map +1 -1
  192. package/dist/esm/activity/index.js +1 -0
  193. package/dist/esm/activity/resources.d.ts +13 -0
  194. package/dist/esm/activity/resources.d.ts.map +1 -0
  195. package/dist/esm/activity/resources.js +24 -0
  196. package/dist/esm/activity/schema/base.d.ts +23 -7
  197. package/dist/esm/activity/schema/base.d.ts.map +1 -1
  198. package/dist/esm/activity/schema/base.js +13 -3
  199. package/dist/esm/activity/schema/schema.d.ts +123 -29
  200. package/dist/esm/activity/schema/schema.d.ts.map +1 -1
  201. package/dist/esm/activity/schema/schema.js +9 -6
  202. package/dist/esm/activity/schema/types/authentication.d.ts +28 -5
  203. package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -1
  204. package/dist/esm/activity/schema/types/authentication.js +5 -2
  205. package/dist/esm/activity/schema/types/authorization.d.ts +28 -5
  206. package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -1
  207. package/dist/esm/activity/schema/types/authorization.js +6 -4
  208. package/dist/esm/activity/schema/types/note.d.ts +27 -7
  209. package/dist/esm/activity/schema/types/note.d.ts.map +1 -1
  210. package/dist/esm/activity/schema/types/note.js +4 -2
  211. package/dist/esm/activity/schema/types/operation.d.ts +27 -5
  212. package/dist/esm/activity/schema/types/operation.d.ts.map +1 -1
  213. package/dist/esm/activity/schema/types/operation.js +4 -2
  214. package/dist/esm/activity/schema/types/unknown.d.ts +25 -5
  215. package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -1
  216. package/dist/esm/activity/schema/types/unknown.js +4 -2
  217. package/dist/esm/app/authorization/resources.d.ts +12 -0
  218. package/dist/esm/app/authorization/resources.d.ts.map +1 -0
  219. package/dist/esm/app/authorization/resources.js +29 -0
  220. package/dist/esm/app/authorization/schema.d.ts +28 -11
  221. package/dist/esm/app/authorization/schema.d.ts.map +1 -1
  222. package/dist/esm/app/authorization/schema.js +31 -15
  223. package/dist/esm/app/index.d.ts +6 -0
  224. package/dist/esm/app/index.d.ts.map +1 -1
  225. package/dist/esm/app/index.js +6 -0
  226. package/dist/esm/app/oauth/resources.d.ts +12 -0
  227. package/dist/esm/app/oauth/resources.d.ts.map +1 -0
  228. package/dist/esm/app/oauth/resources.js +29 -0
  229. package/dist/esm/app/oauth/schema.d.ts +17 -5
  230. package/dist/esm/app/oauth/schema.d.ts.map +1 -1
  231. package/dist/esm/app/oauth/schema.js +10 -3
  232. package/dist/esm/app/oidc/resources.d.ts +16 -0
  233. package/dist/esm/app/oidc/resources.d.ts.map +1 -0
  234. package/dist/esm/app/oidc/resources.js +41 -0
  235. package/dist/esm/app/oidc/schema.d.ts +18 -8
  236. package/dist/esm/app/oidc/schema.d.ts.map +1 -1
  237. package/dist/esm/app/oidc/schema.js +8 -3
  238. package/dist/esm/app/registration/resources.d.ts +12 -0
  239. package/dist/esm/app/registration/resources.d.ts.map +1 -0
  240. package/dist/esm/app/registration/resources.js +29 -0
  241. package/dist/esm/app/registration/schema.d.ts +15 -5
  242. package/dist/esm/app/registration/schema.d.ts.map +1 -1
  243. package/dist/esm/app/registration/schema.js +10 -3
  244. package/dist/esm/app/resources.d.ts +21 -0
  245. package/dist/esm/app/resources.d.ts.map +1 -0
  246. package/dist/esm/app/resources.js +48 -0
  247. package/dist/esm/app/saml/resources.d.ts +16 -0
  248. package/dist/esm/app/saml/resources.d.ts.map +1 -0
  249. package/dist/esm/app/saml/resources.js +41 -0
  250. package/dist/esm/app/saml/schema.d.ts +18 -8
  251. package/dist/esm/app/saml/schema.d.ts.map +1 -1
  252. package/dist/esm/app/saml/schema.js +8 -3
  253. package/dist/esm/app/schema.d.ts +24 -9
  254. package/dist/esm/app/schema.d.ts.map +1 -1
  255. package/dist/esm/app/schema.js +12 -4
  256. package/dist/esm/association/index.d.ts +1 -0
  257. package/dist/esm/association/index.d.ts.map +1 -1
  258. package/dist/esm/association/index.js +1 -0
  259. package/dist/esm/association/resources.d.ts +23 -0
  260. package/dist/esm/association/resources.d.ts.map +1 -0
  261. package/dist/esm/association/resources.js +44 -0
  262. package/dist/esm/association/schema.d.ts +138 -19
  263. package/dist/esm/association/schema.d.ts.map +1 -1
  264. package/dist/esm/association/schema.js +30 -3
  265. package/dist/esm/authentication/factors/schema.d.ts +11 -2
  266. package/dist/esm/authentication/factors/schema.d.ts.map +1 -1
  267. package/dist/esm/authentication/factors/schema.js +4 -0
  268. package/dist/esm/authentication/index.d.ts +3 -0
  269. package/dist/esm/authentication/index.d.ts.map +1 -1
  270. package/dist/esm/authentication/index.js +3 -0
  271. package/dist/esm/authentication/providers/schema.d.ts +4 -4
  272. package/dist/esm/authentication/resources.d.ts +2 -0
  273. package/dist/esm/authentication/resources.d.ts.map +1 -0
  274. package/dist/esm/authentication/resources.js +1 -0
  275. package/dist/esm/authentication/sessions/resources.d.ts +21 -0
  276. package/dist/esm/authentication/sessions/resources.d.ts.map +1 -0
  277. package/dist/esm/authentication/sessions/resources.js +37 -0
  278. package/dist/esm/authentication/sessions/schema.d.ts +35 -13
  279. package/dist/esm/authentication/sessions/schema.d.ts.map +1 -1
  280. package/dist/esm/authentication/sessions/schema.js +16 -7
  281. package/dist/esm/authentication/settings/resources.d.ts +12 -0
  282. package/dist/esm/authentication/settings/resources.d.ts.map +1 -0
  283. package/dist/esm/authentication/settings/resources.js +26 -0
  284. package/dist/esm/authentication/settings/schema.d.ts +30 -7
  285. package/dist/esm/authentication/settings/schema.d.ts.map +1 -1
  286. package/dist/esm/authentication/settings/schema.js +9 -2
  287. package/dist/esm/authentication/strategies/resources.d.ts +20 -0
  288. package/dist/esm/authentication/strategies/resources.d.ts.map +1 -0
  289. package/dist/esm/authentication/strategies/resources.js +49 -0
  290. package/dist/esm/authentication/strategies/schema/base.d.ts +17 -7
  291. package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -1
  292. package/dist/esm/authentication/strategies/schema/base.js +11 -3
  293. package/dist/esm/authentication/strategies/schema/schema.d.ts +102 -53
  294. package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -1
  295. package/dist/esm/authentication/strategies/schema/schema.js +4 -3
  296. package/dist/esm/authentication/strategies/schema/types/email.d.ts +27 -9
  297. package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -1
  298. package/dist/esm/authentication/strategies/schema/types/email.js +4 -3
  299. package/dist/esm/authentication/strategies/schema/types/password.d.ts +76 -43
  300. package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +1 -1
  301. package/dist/esm/authentication/strategies/schema/types/password.js +26 -9
  302. package/dist/esm/authentication/strategies/schema/types/totp.d.ts +33 -13
  303. package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -1
  304. package/dist/esm/authentication/strategies/schema/types/totp.js +12 -3
  305. package/dist/esm/authorization/permissions/resources.d.ts +2 -2
  306. package/dist/esm/authorization/permissions/resources.d.ts.map +1 -1
  307. package/dist/esm/authorization/permissions/resources.js +1 -1
  308. package/dist/esm/authorization/permissions/schema.d.ts +9 -9
  309. package/dist/esm/authorization/permissions/schema.d.ts.map +1 -1
  310. package/dist/esm/authorization/permissions/schema.js +3 -1
  311. package/dist/esm/authorization/roles/resources.d.ts +2 -2
  312. package/dist/esm/authorization/roles/resources.d.ts.map +1 -1
  313. package/dist/esm/authorization/roles/resources.js +1 -1
  314. package/dist/esm/authorization/roles/schema.d.ts +9 -9
  315. package/dist/esm/authorization/roles/schema.d.ts.map +1 -1
  316. package/dist/esm/authorization/roles/schema.js +3 -1
  317. package/dist/esm/common/index.d.ts +1 -0
  318. package/dist/esm/common/index.d.ts.map +1 -1
  319. package/dist/esm/common/index.js +1 -0
  320. package/dist/esm/common/schema/dates.d.ts +7 -7
  321. package/dist/esm/common/schema/dates.d.ts.map +1 -1
  322. package/dist/esm/common/schema/metadata.d.ts +8 -6
  323. package/dist/esm/common/schema/metadata.d.ts.map +1 -1
  324. package/dist/esm/common/schema/schema.d.ts +2 -1
  325. package/dist/esm/common/schema/schema.d.ts.map +1 -1
  326. package/dist/esm/common/schema/schema.js +2 -1
  327. package/dist/esm/common/schema/schema.test.d.ts +2 -0
  328. package/dist/esm/common/schema/schema.test.d.ts.map +1 -0
  329. package/dist/esm/common/schema/schema.test.js +33 -0
  330. package/dist/esm/common/schema/sets.d.ts +2 -2
  331. package/dist/esm/common/schema/sets.d.ts.map +1 -1
  332. package/dist/esm/common/schema/url.d.ts +2 -0
  333. package/dist/esm/common/schema/url.d.ts.map +1 -0
  334. package/dist/esm/common/schema/url.js +9 -0
  335. package/dist/esm/customer/index.d.ts +1 -0
  336. package/dist/esm/customer/index.d.ts.map +1 -1
  337. package/dist/esm/customer/index.js +1 -0
  338. package/dist/esm/customer/schema/organization.d.ts +7 -7
  339. package/dist/esm/customer/users/resources.d.ts +2 -2
  340. package/dist/esm/customer/users/resources.d.ts.map +1 -1
  341. package/dist/esm/customer/users/resources.js +3 -3
  342. package/dist/esm/customer/users/schema.d.ts +11 -12
  343. package/dist/esm/customer/users/schema.d.ts.map +1 -1
  344. package/dist/esm/customer/users/schema.js +2 -4
  345. package/dist/esm/customer/users/schema.test.js +2 -0
  346. package/dist/esm/customer/users/utils.d.ts +10 -0
  347. package/dist/esm/customer/users/utils.d.ts.map +1 -0
  348. package/dist/esm/customer/users/utils.js +27 -0
  349. package/dist/esm/oauth/common/schema.d.ts +6 -0
  350. package/dist/esm/oauth/common/schema.d.ts.map +1 -1
  351. package/dist/esm/oauth/common/schema.js +6 -0
  352. package/dist/esm/oauth/index.d.ts +1 -1
  353. package/dist/esm/oauth/index.d.ts.map +1 -1
  354. package/dist/esm/oauth/index.js +1 -1
  355. package/dist/esm/workspace/authorization/schema.d.ts +5 -5
  356. package/dist/esm/workspace/branding/schema.d.ts +5 -5
  357. package/dist/esm/workspace/membership/schema.d.ts +5 -5
  358. package/dist/esm/workspace/registration/schema.d.ts +5 -5
  359. package/dist/esm/workspace/settings/schema.d.ts +5 -5
  360. package/dist/esm/workspace/tenant/schema.d.ts +10 -10
  361. package/dist/esm/workspace/user/notifications/schema.d.ts +7 -7
  362. package/dist/esm/workspace/user/preferences/schema.d.ts +5 -5
  363. package/package.json +6 -6
@@ -1,3 +1,11 @@
1
+ export declare const AssociationObjectType: {
2
+ readonly USER: "User";
3
+ readonly ORGANIZATION: "Organization";
4
+ readonly ROLE: "Role";
5
+ readonly APP: "App";
6
+ readonly PERMISSION: "Permission";
7
+ };
8
+ export type AnyAssociationObjectType = (typeof AssociationObjectType)[keyof typeof AssociationObjectType];
1
9
  export declare const AssociationIdReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
2
10
  id: string;
3
11
  }, {}>;
@@ -8,7 +16,7 @@ export declare const AssociationAttributesReferenceSchema: import("arktype/out/m
8
16
  }, {}>;
9
17
  export type AssociationAttributesReference = typeof AssociationAttributesReferenceSchema.inferOut;
10
18
  export type AssociationReference = AssociationIdReference | AssociationAttributesReference;
11
- export declare const AssociationObjectSchema: import("arktype/out/methods/object.js").ObjectType<import("arktype/out/methods/object.js").ObjectType<{
19
+ export declare const AssociationObjectSchema: import("arktype/out/methods/object.js").ObjectType<{
12
20
  id: string;
13
21
  givenName?: string | undefined;
14
22
  middleName?: string | undefined;
@@ -17,16 +25,64 @@ export declare const AssociationObjectSchema: import("arktype/out/methods/object
17
25
  honorificSuffix?: string | undefined;
18
26
  email?: string | undefined;
19
27
  phoneNumber?: string | undefined;
20
- status: "active" | "suspended" | "unverified";
28
+ status: import("arktype/out/attributes.js").Default<"active" | "suspended" | "unverified", "unverified">;
21
29
  model: "User";
22
- }, {}> | import("arktype/out/methods/object.js").ObjectType<{
30
+ } | {
31
+ id: string;
32
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
33
+ label: string;
34
+ model: "App";
35
+ } | {
36
+ id: string;
37
+ name: string;
38
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
39
+ model: "Permission";
40
+ } | {
41
+ id: string;
42
+ name: string;
43
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
44
+ model: "Role";
45
+ } | {
23
46
  id: string;
24
47
  name: string;
25
48
  model: "Organization";
26
- }, {}>, {}>;
49
+ }, {}>;
27
50
  export type AssociationObject = typeof AssociationObjectSchema.inferOut;
28
51
  export declare const ObjectPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
29
- object: import("arktype/out/methods/object.js").ObjectType<{
52
+ object: {
53
+ id: string;
54
+ givenName?: string | undefined;
55
+ middleName?: string | undefined;
56
+ familyName?: string | undefined;
57
+ honorificPrefix?: string | undefined;
58
+ honorificSuffix?: string | undefined;
59
+ email?: string | undefined;
60
+ phoneNumber?: string | undefined;
61
+ status: import("arktype/out/attributes.js").Default<"active" | "suspended" | "unverified", "unverified">;
62
+ model: "User";
63
+ } | {
64
+ id: string;
65
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
66
+ label: string;
67
+ model: "App";
68
+ } | {
69
+ id: string;
70
+ name: string;
71
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
72
+ model: "Permission";
73
+ } | {
74
+ id: string;
75
+ name: string;
76
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
77
+ model: "Role";
78
+ } | {
79
+ id: string;
80
+ name: string;
81
+ model: "Organization";
82
+ };
83
+ }, {}>;
84
+ export declare const AssociationSchema: import("arktype/out/methods/object.js").ObjectType<{
85
+ object: {
30
86
  id: string;
31
87
  givenName?: string | undefined;
32
88
  middleName?: string | undefined;
@@ -35,19 +91,62 @@ export declare const ObjectPropertySchema: import("arktype/out/methods/object.js
35
91
  honorificSuffix?: string | undefined;
36
92
  email?: string | undefined;
37
93
  phoneNumber?: string | undefined;
38
- status: "active" | "suspended" | "unverified";
94
+ status: import("arktype/out/attributes.js").Default<"active" | "suspended" | "unverified", "unverified">;
39
95
  model: "User";
40
- }, {}> | import("arktype/out/methods/object.js").ObjectType<{
96
+ } | {
97
+ id: string;
98
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
99
+ label: string;
100
+ model: "App";
101
+ } | {
102
+ id: string;
103
+ name: string;
104
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
105
+ model: "Permission";
106
+ } | {
107
+ id: string;
108
+ name: string;
109
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
110
+ model: "Role";
111
+ } | {
41
112
  id: string;
42
113
  name: string;
43
114
  model: "Organization";
44
- }, {}>;
115
+ };
116
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
117
+ expiresAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
118
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
119
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
120
+ metadata: (In: import("arktype/out/attributes.js").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
121
+ }, {}>;
122
+ declare const RootAssociationProperties: import("arktype/out/methods/object.js").ObjectType<{
123
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
124
+ expiresAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
125
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
126
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
127
+ metadata: (In: import("arktype/out/attributes.js").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
45
128
  }, {}>;
129
+ type RootAssociationProperties = typeof RootAssociationProperties.inferIn;
130
+ export type AssociationProperties<O extends AssociationObject = AssociationObject> = RootAssociationProperties & {
131
+ object: O;
132
+ };
133
+ declare const RootAssociation: import("arktype/out/methods/object.js").ObjectType<{
134
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
135
+ expiresAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
136
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
137
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
138
+ metadata: (In: import("arktype/out/attributes.js").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
139
+ }, {}>;
140
+ type RootAssociation = typeof RootAssociation.inferOut;
141
+ export type Association<O extends AssociationObject = AssociationObject> = RootAssociation & {
142
+ object: O;
143
+ };
46
144
  export declare const AssociationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
47
- updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
48
- deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
49
- deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
50
- object: import("arktype/out/methods/object.js").ObjectType<{
145
+ updatedAt: (In: string | Date) => import("arktype").Out<string>;
146
+ expiresAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
147
+ deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
148
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
149
+ object: {
51
150
  id: string;
52
151
  givenName?: string | undefined;
53
152
  middleName?: string | undefined;
@@ -56,27 +155,47 @@ export declare const AssociationPayloadSchema: import("arktype/out/methods/objec
56
155
  honorificSuffix?: string | undefined;
57
156
  email?: string | undefined;
58
157
  phoneNumber?: string | undefined;
59
- status: "active" | "suspended" | "unverified";
158
+ status: import("arktype/out/attributes.js").Default<"active" | "suspended" | "unverified", "unverified">;
60
159
  model: "User";
61
- }, {}> | import("arktype/out/methods/object.js").ObjectType<{
160
+ } | {
161
+ id: string;
162
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
163
+ label: string;
164
+ model: "App";
165
+ } | {
166
+ id: string;
167
+ name: string;
168
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
169
+ model: "Permission";
170
+ } | {
171
+ id: string;
172
+ name: string;
173
+ status: import("arktype/out/attributes.js").Default<"enabled" | "disabled", "disabled">;
174
+ model: "Role";
175
+ } | {
62
176
  id: string;
63
177
  name: string;
64
178
  model: "Organization";
65
- }, {}>;
179
+ };
66
180
  metadata?: ((In: {
67
181
  [x: string]: string | number | boolean;
68
- } | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
182
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
69
183
  [x: string]: string | number | boolean;
70
184
  } | undefined>) | undefined;
71
185
  }, {}>;
72
- export type AssociationPayload = typeof AssociationPayloadSchema.inferOut;
186
+ type RootAssociationPayload = typeof AssociationPayloadSchema.inferOut;
187
+ export type AssociationPayload<O extends AssociationObject = AssociationObject> = RootAssociationPayload & {
188
+ object: O;
189
+ };
73
190
  export declare const UpsertAssociationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
74
- expiresAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
191
+ expiresAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
75
192
  metadata?: ((In: {
76
193
  [x: string]: string | number | boolean;
77
- } | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
194
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
78
195
  [x: string]: string | number | boolean;
79
196
  } | undefined>) | undefined;
80
197
  }, {}>;
198
+ export type UpsertAssociationInput = typeof UpsertAssociationPayloadSchema.inferIn;
81
199
  export type UpsertAssociationPayload = typeof UpsertAssociationPayloadSchema.inferOut;
200
+ export {};
82
201
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/association/schema.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,4BAA4B;;MAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAChC,OAAO,4BAA4B,CAAC,QAAQ,CAAC;AAE/C,eAAO,MAAM,oCAAoC;;;MACY,CAAC;AAC9D,MAAM,MAAM,8BAA8B,GACxC,OAAO,oCAAoC,CAAC,QAAQ,CAAC;AAEvD,MAAM,MAAM,oBAAoB,GAC5B,sBAAsB,GACtB,8BAA8B,CAAC;AAEnC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;WAGnC,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;MAE/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;MAMA,CAAC;AACtC,MAAM,MAAM,kBAAkB,GAAG,OAAO,wBAAwB,CAAC,QAAQ,CAAC;AAE1E,eAAO,MAAM,8BAA8B;;;;;;;MAEN,CAAC;AACtC,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/association/schema.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAC;AACX,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,4BAA4B;;MAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAChC,OAAO,4BAA4B,CAAC,QAAQ,CAAC;AAE/C,eAAO,MAAM,oCAAoC;;;MACY,CAAC;AAC9D,MAAM,MAAM,8BAA8B,GACxC,OAAO,oCAAoC,CAAC,QAAQ,CAAC;AAEvD,MAAM,MAAM,oBAAoB,GAC5B,sBAAsB,GACtB,8BAA8B,CAAC;AAEnC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKO,CAAC;AAC5C,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAQxE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAE/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKG,CAAC;AAClC,QAAA,MAAM,yBAAyB;;;;;;MAAmC,CAAC;AACnE,KAAK,yBAAyB,GAAG,OAAO,yBAAyB,CAAC,OAAO,CAAC;AAC1E,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAC7C,yBAAyB,GAAG;IAC9B,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AACF,QAAA,MAAM,eAAe;;;;;;MAAmC,CAAC;AACzD,KAAK,eAAe,GAAG,OAAO,eAAe,CAAC,QAAQ,CAAC;AACvD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IACrE,eAAe,GAAG;IAChB,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEJ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOA,CAAC;AACtC,KAAK,sBAAsB,GAAG,OAAO,wBAAwB,CAAC,QAAQ,CAAC;AAEvE,MAAM,MAAM,kBAAkB,CAC5B,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAC7C,sBAAsB,GAAG;IAC3B,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;MAEN,CAAC;AACtC,MAAM,MAAM,sBAAsB,GAChC,OAAO,8BAA8B,CAAC,OAAO,CAAC;AAChD,MAAM,MAAM,wBAAwB,GAClC,OAAO,8BAA8B,CAAC,QAAQ,CAAC"}
@@ -1,20 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpsertAssociationPayloadSchema = exports.AssociationPayloadSchema = exports.ObjectPropertySchema = exports.AssociationObjectSchema = exports.AssociationAttributesReferenceSchema = exports.AssociationIdReferenceSchema = void 0;
3
+ exports.UpsertAssociationPayloadSchema = exports.AssociationPayloadSchema = exports.AssociationSchema = exports.ObjectPropertySchema = exports.AssociationObjectSchema = exports.AssociationAttributesReferenceSchema = exports.AssociationIdReferenceSchema = exports.AssociationObjectType = void 0;
4
4
  const arktype_1 = require("arktype");
5
+ const schema_js_1 = require("../app/schema.js");
6
+ const index_js_1 = require("../authorization/index.js");
5
7
  const dates_js_1 = require("../common/schema/dates.js");
6
8
  const metadata_js_1 = require("../common/schema/metadata.js");
7
9
  const organization_js_1 = require("../customer/schema/organization.js");
8
- const schema_js_1 = require("../customer/users/schema.js");
10
+ const schema_js_2 = require("../customer/users/schema.js");
11
+ exports.AssociationObjectType = {
12
+ USER: 'User',
13
+ ORGANIZATION: 'Organization',
14
+ ROLE: 'Role',
15
+ APP: 'App',
16
+ PERMISSION: 'Permission',
17
+ };
9
18
  exports.AssociationIdReferenceSchema = (0, arktype_1.type)({
10
19
  id: (0, arktype_1.type)('string'),
11
20
  });
12
21
  exports.AssociationAttributesReferenceSchema = exports.AssociationIdReferenceSchema.and('Record<string, unknown>');
13
- exports.AssociationObjectSchema = arktype_1.type.enumerated(schema_js_1.UserAssociationReferenceSchema, organization_js_1.OrganizationAssociationReferenceSchema);
22
+ exports.AssociationObjectSchema = schema_js_2.UserAssociationReferenceSchema.or(organization_js_1.OrganizationAssociationReferenceSchema)
23
+ .or(schema_js_1.AppAssociationReferenceSchema)
24
+ .or(index_js_1.RoleAssociationReferenceSchema)
25
+ .or(index_js_1.PermissionAssociationReferenceSchema);
26
+ // export type AssociationObject =
27
+ // | UserAssociationReference
28
+ // | OrganizationAssociationReference
29
+ // | AppAssociationReference
30
+ // | RoleAssociationReference
31
+ // | PermissionAssociationReference;
14
32
  exports.ObjectPropertySchema = (0, arktype_1.type)({
15
33
  object: exports.AssociationObjectSchema,
16
34
  });
35
+ exports.AssociationSchema = exports.ObjectPropertySchema.and({
36
+ expiresAt: dates_js_1.RequiredDateSchema.optional(),
37
+ updatedAt: dates_js_1.RequiredDateSchema,
38
+ deletedAt: dates_js_1.OptionalDateSchema.optional(),
39
+ deactivatedAt: dates_js_1.OptionalDateSchema.optional(),
40
+ }).and(metadata_js_1.MetadataMapPropertySchema);
41
+ const RootAssociationProperties = exports.AssociationSchema.omit('object');
42
+ const RootAssociation = exports.AssociationSchema.omit('object');
17
43
  exports.AssociationPayloadSchema = (0, arktype_1.type)({
44
+ 'expiresAt?': dates_js_1.OptionalDatePayloadSchema,
18
45
  updatedAt: dates_js_1.RequiredDatePayloadSchema,
19
46
  'deletedAt?': dates_js_1.OptionalDatePayloadSchema,
20
47
  'deactivatedAt?': dates_js_1.OptionalDatePayloadSchema,
@@ -1,3 +1,12 @@
1
+ export declare const AuthenticationFactorSchema: import("arktype/out/methods/object.js").ObjectType<{
2
+ id: string;
3
+ nextFactors?: {
4
+ id: string;
5
+ nextFactors?: /*elided*/ any[] | null | undefined;
6
+ }[] | null | undefined;
7
+ }, {}>;
8
+ export type AuthenticationFactorProperties = typeof AuthenticationFactorPayloadSchema.inferIn;
9
+ export type AuthenticationFactor = typeof AuthenticationFactorPayloadSchema.inferOut;
1
10
  export declare const AuthenticationFactorPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
2
11
  id: string;
3
12
  nextFactors?: {
@@ -12,7 +21,7 @@ export declare const AuthenticationFactorsSchema: import("arktype/out/methods/ob
12
21
  id: string;
13
22
  nextFactors?: /*elided*/ any[] | null | undefined;
14
23
  }[] | null | undefined;
15
- }[] | null | undefined) => import("arktype/out/attributes.js").Out<{
24
+ }[] | null | undefined) => import("arktype").Out<{
16
25
  id: string;
17
26
  nextFactors?: {
18
27
  id: string;
@@ -27,7 +36,7 @@ export declare const AuthenticationFactorsPayloadSchema: import("arktype/out/met
27
36
  id: string;
28
37
  nextFactors?: /*elided*/ any[] | null | undefined;
29
38
  }[] | null | undefined;
30
- }[] | null | undefined) => import("arktype/out/attributes.js").Out<{
39
+ }[] | null | undefined) => import("arktype").Out<{
31
40
  id: string;
32
41
  nextFactors?: {
33
42
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/factors/schema.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,iCAAiC;;;;;;MAG5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC;AAEpD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;qBAGK,CAAC;AAC9C,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;MAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GACtC,OAAO,kCAAkC,CAAC,QAAQ,CAAC;AAErD,eAAO,MAAM,wCAAwC;;;;;;;;MAInD,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/factors/schema.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,0BAA0B;;;;;;MAGrC,CAAC;AACH,MAAM,MAAM,8BAA8B,GACxC,OAAO,iCAAiC,CAAC,OAAO,CAAC;AACnD,MAAM,MAAM,oBAAoB,GAC9B,OAAO,iCAAiC,CAAC,QAAQ,CAAC;AAEpD,eAAO,MAAM,iCAAiC;;;;;;MAG5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC;AAEpD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;qBAGK,CAAC;AAC9C,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;MAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GACtC,OAAO,kCAAkC,CAAC,QAAQ,CAAC;AAErD,eAAO,MAAM,wCAAwC;;;;;;;;MAInD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpsertAuthenticationFactorsPayloadSchema = exports.AuthenticationFactorsPayloadSchema = exports.AuthenticationFactorsSchema = exports.AuthenticationFactorPayloadSchema = void 0;
3
+ exports.UpsertAuthenticationFactorsPayloadSchema = exports.AuthenticationFactorsPayloadSchema = exports.AuthenticationFactorsSchema = exports.AuthenticationFactorPayloadSchema = exports.AuthenticationFactorSchema = void 0;
4
4
  const arktype_1 = require("arktype");
5
5
  const base_js_1 = require("../strategies/schema/base.js");
6
6
  const factorScope = (0, arktype_1.scope)({
@@ -11,6 +11,10 @@ const factorScope = (0, arktype_1.scope)({
11
11
  childFactors: 'factor[] | undefined | null',
12
12
  'nextFactors?': 'factor[] | undefined | null',
13
13
  });
14
+ exports.AuthenticationFactorSchema = (0, arktype_1.type)({
15
+ id: base_js_1.StrategyIdSchema,
16
+ ...factorScope.export('nextFactors?'),
17
+ });
14
18
  exports.AuthenticationFactorPayloadSchema = (0, arktype_1.type)({
15
19
  id: base_js_1.StrategyIdSchema,
16
20
  ...factorScope.export('nextFactors?'),
@@ -1,6 +1,9 @@
1
1
  export * from './factors/schema.js';
2
2
  export * from './providers/schema.js';
3
+ export * from './sessions/resources.js';
3
4
  export * from './sessions/schema.js';
5
+ export * from './settings/resources.js';
4
6
  export * from './settings/schema.js';
7
+ export * from './strategies/resources.js';
5
8
  export * from './strategies/schema/schema.js';
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authentication/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AAGpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authentication/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AAGpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC"}
@@ -19,8 +19,11 @@ __exportStar(require("./factors/schema.js"), exports);
19
19
  // Providers
20
20
  __exportStar(require("./providers/schema.js"), exports);
21
21
  // Session
22
+ __exportStar(require("./sessions/resources.js"), exports);
22
23
  __exportStar(require("./sessions/schema.js"), exports);
23
24
  // Settings
25
+ __exportStar(require("./settings/resources.js"), exports);
24
26
  __exportStar(require("./settings/schema.js"), exports);
25
27
  // Strategies
28
+ __exportStar(require("./strategies/resources.js"), exports);
26
29
  __exportStar(require("./strategies/schema/schema.js"), exports);
@@ -14,12 +14,12 @@ export declare const ProviderPayloadSchema: import("arktype/out/methods/object.j
14
14
  type: "mondo";
15
15
  user: string;
16
16
  strategy: string;
17
- updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
18
- deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
19
- deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
17
+ updatedAt: (In: string | Date) => import("arktype").Out<string>;
18
+ deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
19
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
20
20
  metadata?: ((In: {
21
21
  [x: string]: string | number | boolean;
22
- } | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
22
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
23
23
  [x: string]: string | number | boolean;
24
24
  } | undefined>) | undefined;
25
25
  }, {}>;
@@ -0,0 +1,2 @@
1
+ export declare const PATH = "/v1/authentication";
2
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/authentication/resources.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PATH = void 0;
4
+ exports.PATH = '/v1/authentication';
@@ -0,0 +1,21 @@
1
+ import type { MondoIdentity } from '../../common/resources/init.js';
2
+ import { type PaginationCollection } from '../../common/schema/collection.js';
3
+ import type { Pagination } from '../../common/schema/pagination.js';
4
+ import { type Session } from './schema.js';
5
+ export type SessionListingOptions = {
6
+ filter?: {
7
+ user?: string;
8
+ app?: string;
9
+ };
10
+ };
11
+ export declare class SessionResources {
12
+ private readonly instance;
13
+ constructor(instance: MondoIdentity);
14
+ static buildPath(id: string): string;
15
+ static buildListingPath(options?: SessionListingOptions): string;
16
+ listItems(options?: SessionListingOptions, pagination?: Pagination): Promise<PaginationCollection<Session>>;
17
+ deleteItem(id: string): Promise<Session>;
18
+ }
19
+ export declare function listSessions(instance: MondoIdentity, options?: SessionListingOptions, pagination?: Pagination): Promise<PaginationCollection<Session>>;
20
+ export declare function deleteSession(instance: MondoIdentity, id: string): Promise<Session>;
21
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AASpE,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGpE,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,aAAa,CAAC;AAI1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CAAC;AAEF,qBAAa,gBAAgB;IACR,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3D,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAQpC,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM;IAYzD,SAAS,CACd,OAAO,CAAC,EAAE,qBAAqB,EAC/B,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAIlC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGhD;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,aAAa,EACvB,OAAO,CAAC,EAAE,qBAAqB,EAC/B,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAWxC;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,aAAa,EACvB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,OAAO,CAAC,CASlB"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SessionResources = void 0;
4
+ exports.listSessions = listSessions;
5
+ exports.deleteSession = deleteSession;
6
+ const operations_js_1 = require("../../common/resources/operations.js");
7
+ const utils_js_1 = require("../../common/resources/utils.js");
8
+ const collection_js_1 = require("../../common/schema/collection.js");
9
+ const url_js_1 = require("../../common/schema/url.js");
10
+ const resources_js_1 = require("../resources.js");
11
+ const schema_js_1 = require("./schema.js");
12
+ const RESOURCE = 'sessions';
13
+ class SessionResources {
14
+ instance;
15
+ constructor(instance) {
16
+ this.instance = instance;
17
+ }
18
+ static buildPath(id) {
19
+ if (id.startsWith(resources_js_1.PATH)) {
20
+ return id;
21
+ }
22
+ return [resources_js_1.PATH, RESOURCE, id].filter(Boolean).join('/');
23
+ }
24
+ static buildListingPath(options) {
25
+ return (0, url_js_1.appendSearchParams)([resources_js_1.PATH, RESOURCE].filter(Boolean).join('/'), new Map(
26
+ // format the the keys to 'filter[<key>]'
27
+ Array.from(Object.entries(options?.filter || {})).map(([key, value]) => [`filter[${key}]`, value])));
28
+ }
29
+ listItems(options, pagination) {
30
+ return listSessions(this.instance, options, pagination);
31
+ }
32
+ deleteItem(id) {
33
+ return deleteSession(this.instance, id);
34
+ }
35
+ }
36
+ exports.SessionResources = SessionResources;
37
+ async function listSessions(instance, options, pagination) {
38
+ const url = (0, utils_js_1.addPaginationToURL)(new URL(SessionResources.buildListingPath(options), instance.config.host), pagination);
39
+ return (0, utils_js_1.parseEgressSchema)((0, collection_js_1.PaginationCollectionSchema)(schema_js_1.SessionSchema)(await (0, operations_js_1.getItemWithAuthorization)(url, instance.authorizer)));
40
+ }
41
+ async function deleteSession(instance, id) {
42
+ return (0, utils_js_1.parseEgressSchema)((0, schema_js_1.SessionSchema)(await (0, operations_js_1.deleteItemWithAuthorization)(new URL(SessionResources.buildPath(id), instance.config.host), instance.authorizer)));
43
+ }
@@ -11,21 +11,40 @@ export declare const SessionIdPropertySchema: import("arktype/out/methods/object
11
11
  }, {}>;
12
12
  export type SessionIdProperty = typeof SessionIdPropertySchema.inferOut;
13
13
  export declare const SessionStatusSchema: import("arktype/out/methods/string.js").StringType<"initiated" | "authenticated" | "pending", {}>;
14
- export declare const AuthenticationFactorSchema: import("arktype/out/methods/object.js").ObjectType<{
14
+ export declare const SessionAuthenticationFactorSchema: import("arktype/out/methods/object.js").ObjectType<{
15
15
  id: string;
16
16
  type: "email" | "password" | "totp";
17
17
  settings?: Record<string, unknown> | undefined;
18
18
  state?: string | undefined;
19
19
  }, {}>;
20
- export type AuthenticationFactor = typeof AuthenticationFactorSchema.inferOut;
21
- export declare const AuthenticationFactorHistorySchema: import("arktype/out/methods/object.js").ObjectType<(In: string[] | Set<string> | undefined) => import("arktype/out/attributes.js").Out<string[] | Set<string> | undefined>, {}>;
22
- export type AuthenticationFactorHistory = typeof AuthenticationFactorHistorySchema.inferOut;
20
+ export type SessionAuthenticationFactor = typeof SessionAuthenticationFactorSchema.inferOut;
21
+ export declare const SessionAuthenticationFactorHistorySchema: import("arktype/out/methods/object.js").ObjectType<(In: string[] | Set<string> | undefined) => import("arktype").Out<string[] | Set<string> | undefined>, {}>;
22
+ export type SessionAuthenticationFactorHistory = typeof SessionAuthenticationFactorHistorySchema.inferOut;
23
+ export declare const SessionSchema: import("arktype/out/methods/object.js").ObjectType<{
24
+ id: string;
25
+ status: "initiated" | "authenticated" | "pending";
26
+ user?: string | undefined;
27
+ userAgent?: string | undefined;
28
+ sourceIp?: string | undefined;
29
+ factors?: {
30
+ id: string;
31
+ type: "email" | "password" | "totp";
32
+ settings?: Record<string, unknown> | undefined;
33
+ state?: string | undefined;
34
+ }[] | undefined;
35
+ factorHistory?: ((In: string[] | Set<string> | undefined) => import("arktype").Out<string[] | Set<string> | undefined>) | undefined;
36
+ expiresAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
37
+ createdAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
38
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
39
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
40
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
41
+ metadata: (In: import("arktype/out/attributes.js").Default<unknown, Map<string, string | number | boolean>>) => import("arktype").Out<Map<string, string | number | boolean> | Map<string, any>>;
42
+ }, {}>;
43
+ export type SessionProperties = typeof SessionSchema.inferIn;
44
+ export type Session = typeof SessionSchema.inferOut;
23
45
  export declare const SessionPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
24
46
  id: string;
25
47
  status: "initiated" | "authenticated" | "pending";
26
- expiresAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
27
- createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
28
- updatedAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
29
48
  user?: string | undefined;
30
49
  userAgent?: string | undefined;
31
50
  sourceIp?: string | undefined;
@@ -35,12 +54,15 @@ export declare const SessionPayloadSchema: import("arktype/out/methods/object.js
35
54
  settings?: Record<string, unknown> | undefined;
36
55
  state?: string | undefined;
37
56
  }[] | undefined;
38
- factorHistory?: ((In: string[] | Set<string> | undefined) => import("arktype/out/attributes.js").Out<string[] | Set<string> | undefined>) | undefined;
39
- deletedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
40
- deactivatedAt?: ((In: string | Date | undefined) => import("arktype/out/attributes.js").Out<string | undefined>) | undefined;
57
+ factorHistory?: ((In: string[] | Set<string> | undefined) => import("arktype").Out<string[] | Set<string> | undefined>) | undefined;
58
+ expiresAt: (In: string | Date) => import("arktype").Out<string>;
59
+ createdAt: (In: string | Date) => import("arktype").Out<string>;
60
+ updatedAt: (In: string | Date) => import("arktype").Out<string>;
61
+ deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
62
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
41
63
  metadata?: ((In: {
42
64
  [x: string]: string | number | boolean;
43
- } | Map<string, string | number | boolean> | null | undefined) => import("arktype/out/attributes.js").Out<{
65
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
44
66
  [x: string]: string | number | boolean;
45
67
  } | undefined>) | undefined;
46
68
  }, {}>;
@@ -48,11 +70,11 @@ export type SessionPayload = typeof SessionPayloadSchema.inferOut;
48
70
  export declare const SessionAssociationReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
49
71
  id: string;
50
72
  status: "initiated" | "authenticated" | "pending";
51
- expiresAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
52
- createdAt: (In: string | Date) => import("arktype/out/attributes.js").Out<string>;
53
73
  user?: string | undefined;
54
74
  userAgent?: string | undefined;
55
75
  sourceIp?: string | undefined;
76
+ expiresAt: (In: string | Date) => import("arktype").Out<string>;
77
+ createdAt: (In: string | Date) => import("arktype").Out<string>;
56
78
  model: "Session";
57
79
  }, {}>;
58
80
  export type SessionAssociationReference = typeof SessionAssociationReferenceSchema.inferOut;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,gEAAc,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,QAAQ,CAAC;AAExD,eAAO,MAAM,uBAAuB;;MAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,mBAAmB,mGAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;MAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,0BAA0B,CAAC,QAAQ,CAAC;AAM9E,eAAO,MAAM,iCAAiC,iLAK3C,CAAC;AACJ,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC;AAEpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;MAYI,CAAC;AACtC,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAElE,eAAO,MAAM,iCAAiC;;;;;;;;;MAU5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,gEAAc,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,QAAQ,CAAC;AAExD,eAAO,MAAM,uBAAuB;;MAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC;AAExE,eAAO,MAAM,mBAAmB,mGAI/B,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;MAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC;AAMpD,eAAO,MAAM,wCAAwC,+JAKlD,CAAC;AACJ,MAAM,MAAM,kCAAkC,GAC5C,OAAO,wCAAwC,CAAC,QAAQ,CAAC;AAW3D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;MAMO,CAAC;AAClC,MAAM,MAAM,iBAAiB,GAAG,OAAO,aAAa,CAAC,OAAO,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG,OAAO,aAAa,CAAC,QAAQ,CAAC;AAEpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;MAMI,CAAC;AACtC,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,QAAQ,CAAC;AAElE,eAAO,MAAM,iCAAiC;;;;;;;;;MAU5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GACrC,OAAO,iCAAiC,CAAC,QAAQ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SessionAssociationReferenceSchema = exports.SessionPayloadSchema = exports.AuthenticationFactorHistorySchema = exports.AuthenticationFactorSchema = exports.SessionStatusSchema = exports.SessionIdPropertySchema = exports.SessionIdSchema = exports.SessionStatus = void 0;
3
+ exports.SessionAssociationReferenceSchema = exports.SessionPayloadSchema = exports.SessionSchema = exports.SessionAuthenticationFactorHistorySchema = exports.SessionAuthenticationFactorSchema = exports.SessionStatusSchema = exports.SessionIdPropertySchema = exports.SessionIdSchema = exports.SessionStatus = void 0;
4
4
  const arktype_1 = require("arktype");
5
5
  const dates_js_1 = require("../../common/schema/dates.js");
6
6
  const metadata_js_1 = require("../../common/schema/metadata.js");
@@ -16,7 +16,7 @@ exports.SessionIdPropertySchema = (0, arktype_1.type)({
16
16
  id: exports.SessionIdSchema,
17
17
  });
18
18
  exports.SessionStatusSchema = arktype_1.type.enumerated(exports.SessionStatus.INITIATED, exports.SessionStatus.AUTHENTICATED, exports.SessionStatus.PENDING);
19
- exports.AuthenticationFactorSchema = (0, arktype_1.type)({
19
+ exports.SessionAuthenticationFactorSchema = (0, arktype_1.type)({
20
20
  id: base_js_1.StrategyIdSchema,
21
21
  type: base_js_1.StrategyTypeSchema,
22
22
  settings: (0, arktype_1.type)('Record<string, unknown> | undefined').optional(),
@@ -24,17 +24,26 @@ exports.AuthenticationFactorSchema = (0, arktype_1.type)({
24
24
  });
25
25
  const AuthenticationFactorHistoryArraySchema = base_js_1.StrategyIdSchema.array();
26
26
  const AuthenticationFactorHistorySetSchema = arktype_1.type.instanceOf((Set));
27
- exports.AuthenticationFactorHistorySchema = (0, arktype_1.type)('undefined')
27
+ exports.SessionAuthenticationFactorHistorySchema = (0, arktype_1.type)('undefined')
28
28
  .or(AuthenticationFactorHistoryArraySchema)
29
29
  .or(AuthenticationFactorHistorySetSchema)
30
30
  .pipe((s) => (s instanceof Set ? Array.from(s) : s)?.length ? s : undefined);
31
- exports.SessionPayloadSchema = exports.SessionIdPropertySchema.and({
31
+ const BaseSchema = exports.SessionIdPropertySchema.and({
32
32
  status: exports.SessionStatusSchema,
33
33
  user: schema_js_1.UserIdSchema.or('undefined').optional(),
34
34
  userAgent: (0, arktype_1.type)('string | undefined').optional(),
35
35
  sourceIp: (0, arktype_1.type)('string.ip.v4 | string.ip.v6 | undefined').optional(),
36
- factors: exports.AuthenticationFactorSchema.array().or('undefined').optional(),
37
- factorHistory: exports.AuthenticationFactorHistorySchema.optional(),
36
+ factors: exports.SessionAuthenticationFactorSchema.array().or('undefined').optional(),
37
+ factorHistory: exports.SessionAuthenticationFactorHistorySchema.optional(),
38
+ });
39
+ exports.SessionSchema = BaseSchema.and({
40
+ expiresAt: dates_js_1.RequiredDateSchema,
41
+ createdAt: dates_js_1.RequiredDateSchema,
42
+ updatedAt: dates_js_1.RequiredDateSchema,
43
+ deletedAt: dates_js_1.OptionalDateSchema.optional(),
44
+ deactivatedAt: dates_js_1.OptionalDateSchema.optional(),
45
+ }).and(metadata_js_1.MetadataMapPropertySchema);
46
+ exports.SessionPayloadSchema = BaseSchema.and({
38
47
  expiresAt: dates_js_1.RequiredDatePayloadSchema,
39
48
  createdAt: dates_js_1.RequiredDatePayloadSchema,
40
49
  updatedAt: dates_js_1.RequiredDatePayloadSchema,
@@ -0,0 +1,12 @@
1
+ import type { MondoIdentity } from '../../common/resources/init.js';
2
+ import { type Settings, type UpsertSettingsInput } from './schema.js';
3
+ export declare class SettingsResources {
4
+ private readonly instance;
5
+ constructor(instance: MondoIdentity);
6
+ static buildPath(): string;
7
+ getItem(): Promise<Settings>;
8
+ upsertItem(item: UpsertSettingsInput): Promise<Settings>;
9
+ }
10
+ export declare function getSettings(instance: MondoIdentity): Promise<Settings>;
11
+ export declare function upsertSettings(instance: MondoIdentity, item: UpsertSettingsInput): Promise<Settings>;
12
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/authentication/settings/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAOpE,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAC;AAIrB,qBAAa,iBAAiB;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3D,MAAM,CAAC,SAAS,IAAI,MAAM;IAInB,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI5B,UAAU,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGhE;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,CAS5E;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,QAAQ,CAAC,CAYnB"}