@go-mondo/identity-sdk 0.0.2-beta.5 → 0.0.2-beta.7

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 (552) 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 +12 -5
  6. package/dist/cjs/action/schema/base.d.ts.map +1 -1
  7. package/dist/cjs/action/schema/base.js +8 -3
  8. package/dist/cjs/action/schema/operations/set-password.d.ts +11 -11
  9. package/dist/cjs/action/schema/operations/set-password.js +2 -2
  10. package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +5 -5
  11. package/dist/cjs/action/schema/operations/sign-up-verification.js +1 -1
  12. package/dist/cjs/action/schema/operations/sign-up.d.ts +7 -7
  13. package/dist/cjs/action/schema/operations/sign-up.js +12 -12
  14. package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +5 -5
  15. package/dist/cjs/action/schema/operations/user-attribute-verification.js +1 -1
  16. package/dist/cjs/action/schema/schema.d.ts +27 -34
  17. package/dist/cjs/action/schema/schema.d.ts.map +1 -1
  18. package/dist/cjs/action/schema/schema.js +2 -7
  19. package/dist/cjs/activity/index.d.ts +1 -0
  20. package/dist/cjs/activity/index.d.ts.map +1 -1
  21. package/dist/cjs/activity/index.js +1 -0
  22. package/dist/cjs/activity/resources.d.ts +13 -0
  23. package/dist/cjs/activity/resources.d.ts.map +1 -0
  24. package/dist/cjs/activity/resources.js +29 -0
  25. package/dist/cjs/activity/schema/base.d.ts +23 -7
  26. package/dist/cjs/activity/schema/base.d.ts.map +1 -1
  27. package/dist/cjs/activity/schema/base.js +12 -2
  28. package/dist/cjs/activity/schema/schema.d.ts +123 -29
  29. package/dist/cjs/activity/schema/schema.d.ts.map +1 -1
  30. package/dist/cjs/activity/schema/schema.js +5 -2
  31. package/dist/cjs/activity/schema/types/authentication.d.ts +28 -5
  32. package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -1
  33. package/dist/cjs/activity/schema/types/authentication.js +5 -2
  34. package/dist/cjs/activity/schema/types/authorization.d.ts +28 -5
  35. package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -1
  36. package/dist/cjs/activity/schema/types/authorization.js +6 -4
  37. package/dist/cjs/activity/schema/types/note.d.ts +27 -7
  38. package/dist/cjs/activity/schema/types/note.d.ts.map +1 -1
  39. package/dist/cjs/activity/schema/types/note.js +4 -2
  40. package/dist/cjs/activity/schema/types/operation.d.ts +27 -5
  41. package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -1
  42. package/dist/cjs/activity/schema/types/operation.js +4 -2
  43. package/dist/cjs/activity/schema/types/unknown.d.ts +25 -5
  44. package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -1
  45. package/dist/cjs/activity/schema/types/unknown.js +4 -2
  46. package/dist/cjs/app/authorization/resources.d.ts +12 -0
  47. package/dist/cjs/app/authorization/resources.d.ts.map +1 -0
  48. package/dist/cjs/app/authorization/resources.js +35 -0
  49. package/dist/cjs/app/authorization/schema.d.ts +54 -0
  50. package/dist/cjs/app/authorization/schema.d.ts.map +1 -0
  51. package/dist/cjs/app/{schema/authorization.js → authorization/schema.js} +31 -15
  52. package/dist/cjs/app/index.d.ts +13 -1
  53. package/dist/cjs/app/index.d.ts.map +1 -1
  54. package/dist/cjs/app/index.js +20 -1
  55. package/dist/cjs/app/oauth/resources.d.ts +12 -0
  56. package/dist/cjs/app/oauth/resources.d.ts.map +1 -0
  57. package/dist/cjs/app/oauth/resources.js +35 -0
  58. package/dist/cjs/app/{schema/oauth.d.ts → oauth/schema.d.ts} +18 -6
  59. package/dist/cjs/app/oauth/schema.d.ts.map +1 -0
  60. package/dist/cjs/app/{schema/oauth.js → oauth/schema.js} +10 -3
  61. package/dist/cjs/app/oidc/resources.d.ts +16 -0
  62. package/dist/cjs/app/oidc/resources.d.ts.map +1 -0
  63. package/dist/cjs/app/oidc/resources.js +49 -0
  64. package/dist/cjs/app/{schema/oidc.d.ts → oidc/schema.d.ts} +19 -9
  65. package/dist/cjs/app/oidc/schema.d.ts.map +1 -0
  66. package/dist/cjs/app/{schema/oidc.js → oidc/schema.js} +7 -2
  67. package/dist/cjs/app/registration/resources.d.ts +12 -0
  68. package/dist/cjs/app/registration/resources.d.ts.map +1 -0
  69. package/dist/cjs/app/registration/resources.js +35 -0
  70. package/dist/cjs/app/{schema/registration.d.ts → registration/schema.d.ts} +16 -6
  71. package/dist/cjs/app/registration/schema.d.ts.map +1 -0
  72. package/dist/cjs/app/{schema/registration.js → registration/schema.js} +9 -2
  73. package/dist/cjs/app/resources.d.ts +21 -0
  74. package/dist/cjs/app/resources.d.ts.map +1 -0
  75. package/dist/cjs/app/resources.js +57 -0
  76. package/dist/cjs/app/saml/resources.d.ts +16 -0
  77. package/dist/cjs/app/saml/resources.d.ts.map +1 -0
  78. package/dist/cjs/app/saml/resources.js +49 -0
  79. package/dist/cjs/app/{schema/saml.d.ts → saml/schema.d.ts} +19 -9
  80. package/dist/cjs/app/saml/schema.d.ts.map +1 -0
  81. package/dist/cjs/app/{schema/saml.js → saml/schema.js} +7 -2
  82. package/dist/cjs/app/{schema/app.d.ts → schema.d.ts} +24 -9
  83. package/dist/cjs/app/schema.d.ts.map +1 -0
  84. package/dist/cjs/app/{schema/app.js → schema.js} +12 -4
  85. package/dist/cjs/app/utils.d.ts.map +1 -0
  86. package/dist/cjs/association/index.d.ts +2 -1
  87. package/dist/cjs/association/index.d.ts.map +1 -1
  88. package/dist/cjs/association/index.js +2 -1
  89. package/dist/cjs/association/resources.d.ts +23 -0
  90. package/dist/cjs/association/resources.d.ts.map +1 -0
  91. package/dist/cjs/association/resources.js +51 -0
  92. package/dist/cjs/association/schema.d.ts +147 -0
  93. package/dist/cjs/association/schema.d.ts.map +1 -0
  94. package/dist/cjs/association/{schema/association.js → schema.js} +21 -5
  95. package/dist/cjs/authentication/{schema/factors.d.ts → factors/schema.d.ts} +12 -3
  96. package/dist/cjs/authentication/factors/schema.d.ts.map +1 -0
  97. package/dist/cjs/authentication/{schema/factors.js → factors/schema.js} +6 -2
  98. package/dist/cjs/authentication/factors/schema.test.d.ts +2 -0
  99. package/dist/cjs/authentication/factors/schema.test.d.ts.map +1 -0
  100. package/dist/cjs/authentication/{schema/factors.test.js → factors/schema.test.js} +17 -17
  101. package/dist/cjs/authentication/index.d.ts +8 -1
  102. package/dist/cjs/authentication/index.d.ts.map +1 -1
  103. package/dist/cjs/authentication/index.js +13 -1
  104. package/dist/cjs/authentication/{schema/provider.d.ts → providers/schema.d.ts} +5 -5
  105. package/dist/cjs/authentication/providers/schema.d.ts.map +1 -0
  106. package/dist/cjs/authentication/{schema/provider.js → providers/schema.js} +1 -1
  107. package/dist/cjs/authentication/resources.d.ts +2 -0
  108. package/dist/cjs/authentication/resources.d.ts.map +1 -0
  109. package/dist/cjs/authentication/resources.js +4 -0
  110. package/dist/cjs/authentication/sessions/resources.d.ts +21 -0
  111. package/dist/cjs/authentication/sessions/resources.d.ts.map +1 -0
  112. package/dist/cjs/authentication/sessions/resources.js +43 -0
  113. package/dist/cjs/authentication/sessions/schema.d.ts +81 -0
  114. package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -0
  115. package/dist/cjs/authentication/{schema/session.js → sessions/schema.js} +16 -7
  116. package/dist/cjs/authentication/settings/resources.d.ts +12 -0
  117. package/dist/cjs/authentication/settings/resources.d.ts.map +1 -0
  118. package/dist/cjs/authentication/settings/resources.js +32 -0
  119. package/dist/cjs/authentication/{schema/settings.d.ts → settings/schema.d.ts} +31 -8
  120. package/dist/cjs/authentication/settings/schema.d.ts.map +1 -0
  121. package/dist/cjs/authentication/{schema/settings.js → settings/schema.js} +11 -4
  122. package/dist/cjs/authentication/strategies/resources.d.ts +20 -0
  123. package/dist/cjs/authentication/strategies/resources.d.ts.map +1 -0
  124. package/dist/cjs/authentication/strategies/resources.js +58 -0
  125. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/base.d.ts +17 -7
  126. package/dist/cjs/authentication/strategies/schema/base.d.ts.map +1 -0
  127. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/base.js +10 -2
  128. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/schema.d.ts +102 -53
  129. package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -0
  130. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/schema.js +2 -1
  131. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/email.d.ts +27 -9
  132. package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -0
  133. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/email.js +4 -3
  134. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/password.d.ts +76 -43
  135. package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +1 -0
  136. package/dist/cjs/authentication/strategies/schema/types/password.js +52 -0
  137. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/totp.d.ts +33 -13
  138. package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -0
  139. package/dist/cjs/authentication/{schema/strategy → strategies/schema}/types/totp.js +12 -3
  140. package/dist/cjs/authorization/index.d.ts.map +1 -1
  141. package/dist/cjs/authorization/index.js +2 -0
  142. package/dist/cjs/authorization/permissions/resources.d.ts +2 -2
  143. package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -1
  144. package/dist/cjs/authorization/permissions/resources.js +1 -1
  145. package/dist/cjs/authorization/permissions/schema.d.ts +8 -8
  146. package/dist/cjs/authorization/roles/resources.d.ts +2 -2
  147. package/dist/cjs/authorization/roles/resources.d.ts.map +1 -1
  148. package/dist/cjs/authorization/roles/resources.js +1 -1
  149. package/dist/cjs/authorization/roles/schema.d.ts +8 -8
  150. package/dist/cjs/common/index.d.ts +1 -0
  151. package/dist/cjs/common/index.d.ts.map +1 -1
  152. package/dist/cjs/common/index.js +6 -0
  153. package/dist/cjs/common/schema/dates.d.ts +7 -7
  154. package/dist/cjs/common/schema/dates.d.ts.map +1 -1
  155. package/dist/cjs/common/schema/metadata.d.ts +8 -6
  156. package/dist/cjs/common/schema/metadata.d.ts.map +1 -1
  157. package/dist/cjs/common/schema/schema.d.ts +2 -1
  158. package/dist/cjs/common/schema/schema.d.ts.map +1 -1
  159. package/dist/cjs/common/schema/schema.js +2 -1
  160. package/dist/cjs/common/schema/schema.test.d.ts +2 -0
  161. package/dist/cjs/common/schema/schema.test.d.ts.map +1 -0
  162. package/dist/cjs/common/schema/schema.test.js +35 -0
  163. package/dist/cjs/common/schema/sets.d.ts +2 -2
  164. package/dist/cjs/common/schema/sets.d.ts.map +1 -1
  165. package/dist/cjs/common/schema/url.d.ts +2 -0
  166. package/dist/cjs/common/schema/url.d.ts.map +1 -0
  167. package/dist/cjs/common/schema/url.js +12 -0
  168. package/dist/cjs/customer/index.d.ts +1 -0
  169. package/dist/cjs/customer/index.d.ts.map +1 -1
  170. package/dist/cjs/customer/index.js +1 -0
  171. package/dist/cjs/customer/schema/organization.d.ts +7 -7
  172. package/dist/cjs/customer/users/resources.d.ts +2 -2
  173. package/dist/cjs/customer/users/resources.d.ts.map +1 -1
  174. package/dist/cjs/customer/users/resources.js +2 -2
  175. package/dist/cjs/customer/users/schema.d.ts +10 -11
  176. package/dist/cjs/customer/users/schema.d.ts.map +1 -1
  177. package/dist/cjs/customer/users/schema.js +1 -3
  178. package/dist/cjs/customer/users/schema.test.js +2 -0
  179. package/dist/cjs/customer/users/utils.d.ts +10 -0
  180. package/dist/cjs/customer/users/utils.d.ts.map +1 -0
  181. package/dist/cjs/customer/users/utils.js +33 -0
  182. package/dist/cjs/identity/index.d.ts +1 -1
  183. package/dist/cjs/identity/index.d.ts.map +1 -1
  184. package/dist/cjs/identity/index.js +1 -1
  185. package/dist/cjs/identity/schema.d.ts.map +1 -0
  186. package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +9 -9
  187. package/dist/cjs/oauth/common/schema.d.ts +6 -0
  188. package/dist/cjs/oauth/common/schema.d.ts.map +1 -1
  189. package/dist/cjs/oauth/common/schema.js +7 -1
  190. package/dist/cjs/oauth/index.d.ts +1 -1
  191. package/dist/cjs/oauth/index.d.ts.map +1 -1
  192. package/dist/cjs/oauth/index.js +2 -1
  193. package/dist/cjs/oauth/token/schema/grants/client-credentials.js +6 -6
  194. package/dist/cjs/oauth/token/schema/grants/refresh-token.js +4 -4
  195. package/dist/cjs/workspace/{schema/authorization.d.ts → authorization/schema.d.ts} +6 -6
  196. package/dist/cjs/workspace/authorization/schema.d.ts.map +1 -0
  197. package/dist/cjs/workspace/{schema/branding.d.ts → branding/schema.d.ts} +6 -6
  198. package/dist/cjs/workspace/branding/schema.d.ts.map +1 -0
  199. package/dist/cjs/workspace/index.d.ts +8 -1
  200. package/dist/cjs/workspace/index.d.ts.map +1 -1
  201. package/dist/cjs/workspace/index.js +8 -1
  202. package/dist/cjs/workspace/{schema/membership.d.ts → membership/schema.d.ts} +6 -6
  203. package/dist/cjs/workspace/membership/schema.d.ts.map +1 -0
  204. package/dist/cjs/workspace/{schema/registration.d.ts → registration/schema.d.ts} +6 -6
  205. package/dist/cjs/workspace/registration/schema.d.ts.map +1 -0
  206. package/dist/cjs/workspace/{schema/registration.js → registration/schema.js} +1 -1
  207. package/dist/cjs/workspace/{schema/settings.d.ts → settings/schema.d.ts} +6 -6
  208. package/dist/cjs/workspace/settings/schema.d.ts.map +1 -0
  209. package/dist/cjs/workspace/{schema/tenant.d.ts → tenant/schema.d.ts} +11 -11
  210. package/dist/cjs/workspace/{schema/tenant.d.ts.map → tenant/schema.d.ts.map} +1 -1
  211. package/dist/cjs/workspace/{schema/tenant.js → tenant/schema.js} +3 -3
  212. package/dist/cjs/workspace/{schema/user-notification.d.ts → user/notifications/schema.d.ts} +8 -8
  213. package/dist/cjs/workspace/user/notifications/schema.d.ts.map +1 -0
  214. package/dist/cjs/workspace/{schema/user-notification.js → user/notifications/schema.js} +4 -4
  215. package/dist/cjs/workspace/{schema/user-preferences.d.ts → user/preferences/schema.d.ts} +6 -6
  216. package/dist/cjs/workspace/user/preferences/schema.d.ts.map +1 -0
  217. package/dist/cjs/workspace/{schema/user-preferences.js → user/preferences/schema.js} +2 -2
  218. package/dist/cjs/workspace/user/schema.d.ts +3 -0
  219. package/dist/cjs/workspace/user/schema.d.ts.map +1 -0
  220. package/dist/cjs/{association/schema → workspace/user}/schema.js +2 -1
  221. package/dist/cjs/workspace/utils.d.ts.map +1 -0
  222. package/dist/esm/action/schema/base.d.ts +12 -5
  223. package/dist/esm/action/schema/base.d.ts.map +1 -1
  224. package/dist/esm/action/schema/base.js +6 -1
  225. package/dist/esm/action/schema/operations/set-password.d.ts +11 -11
  226. package/dist/esm/action/schema/operations/set-password.js +2 -2
  227. package/dist/esm/action/schema/operations/sign-up-verification.d.ts +5 -5
  228. package/dist/esm/action/schema/operations/sign-up-verification.js +1 -1
  229. package/dist/esm/action/schema/operations/sign-up.d.ts +7 -7
  230. package/dist/esm/action/schema/operations/sign-up.js +1 -1
  231. package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +5 -5
  232. package/dist/esm/action/schema/operations/user-attribute-verification.js +1 -1
  233. package/dist/esm/action/schema/schema.d.ts +27 -34
  234. package/dist/esm/action/schema/schema.d.ts.map +1 -1
  235. package/dist/esm/action/schema/schema.js +1 -7
  236. package/dist/esm/activity/index.d.ts +1 -0
  237. package/dist/esm/activity/index.d.ts.map +1 -1
  238. package/dist/esm/activity/index.js +1 -0
  239. package/dist/esm/activity/resources.d.ts +13 -0
  240. package/dist/esm/activity/resources.d.ts.map +1 -0
  241. package/dist/esm/activity/resources.js +24 -0
  242. package/dist/esm/activity/schema/base.d.ts +23 -7
  243. package/dist/esm/activity/schema/base.d.ts.map +1 -1
  244. package/dist/esm/activity/schema/base.js +13 -3
  245. package/dist/esm/activity/schema/schema.d.ts +123 -29
  246. package/dist/esm/activity/schema/schema.d.ts.map +1 -1
  247. package/dist/esm/activity/schema/schema.js +9 -6
  248. package/dist/esm/activity/schema/types/authentication.d.ts +28 -5
  249. package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -1
  250. package/dist/esm/activity/schema/types/authentication.js +5 -2
  251. package/dist/esm/activity/schema/types/authorization.d.ts +28 -5
  252. package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -1
  253. package/dist/esm/activity/schema/types/authorization.js +6 -4
  254. package/dist/esm/activity/schema/types/note.d.ts +27 -7
  255. package/dist/esm/activity/schema/types/note.d.ts.map +1 -1
  256. package/dist/esm/activity/schema/types/note.js +4 -2
  257. package/dist/esm/activity/schema/types/operation.d.ts +27 -5
  258. package/dist/esm/activity/schema/types/operation.d.ts.map +1 -1
  259. package/dist/esm/activity/schema/types/operation.js +4 -2
  260. package/dist/esm/activity/schema/types/unknown.d.ts +25 -5
  261. package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -1
  262. package/dist/esm/activity/schema/types/unknown.js +4 -2
  263. package/dist/esm/app/authorization/resources.d.ts +12 -0
  264. package/dist/esm/app/authorization/resources.d.ts.map +1 -0
  265. package/dist/esm/app/authorization/resources.js +29 -0
  266. package/dist/esm/app/authorization/schema.d.ts +54 -0
  267. package/dist/esm/app/authorization/schema.d.ts.map +1 -0
  268. package/dist/esm/app/{schema/authorization.js → authorization/schema.js} +32 -16
  269. package/dist/esm/app/index.d.ts +13 -1
  270. package/dist/esm/app/index.d.ts.map +1 -1
  271. package/dist/esm/app/index.js +20 -1
  272. package/dist/esm/app/oauth/resources.d.ts +12 -0
  273. package/dist/esm/app/oauth/resources.d.ts.map +1 -0
  274. package/dist/esm/app/oauth/resources.js +29 -0
  275. package/dist/esm/app/{schema/oauth.d.ts → oauth/schema.d.ts} +18 -6
  276. package/dist/esm/app/oauth/schema.d.ts.map +1 -0
  277. package/dist/esm/app/oauth/schema.js +25 -0
  278. package/dist/esm/app/oidc/resources.d.ts +16 -0
  279. package/dist/esm/app/oidc/resources.d.ts.map +1 -0
  280. package/dist/esm/app/oidc/resources.js +41 -0
  281. package/dist/esm/app/{schema/oidc.d.ts → oidc/schema.d.ts} +19 -9
  282. package/dist/esm/app/oidc/schema.d.ts.map +1 -0
  283. package/dist/esm/app/oidc/schema.js +15 -0
  284. package/dist/esm/app/registration/resources.d.ts +12 -0
  285. package/dist/esm/app/registration/resources.d.ts.map +1 -0
  286. package/dist/esm/app/registration/resources.js +29 -0
  287. package/dist/esm/app/registration/schema.d.ts +32 -0
  288. package/dist/esm/app/registration/schema.d.ts.map +1 -0
  289. package/dist/esm/app/{schema/registration.js → registration/schema.js} +10 -3
  290. package/dist/esm/app/resources.d.ts +21 -0
  291. package/dist/esm/app/resources.d.ts.map +1 -0
  292. package/dist/esm/app/resources.js +48 -0
  293. package/dist/esm/app/saml/resources.d.ts +16 -0
  294. package/dist/esm/app/saml/resources.d.ts.map +1 -0
  295. package/dist/esm/app/saml/resources.js +41 -0
  296. package/dist/esm/app/{schema/saml.d.ts → saml/schema.d.ts} +19 -9
  297. package/dist/esm/app/saml/schema.d.ts.map +1 -0
  298. package/dist/esm/app/saml/schema.js +15 -0
  299. package/dist/esm/app/{schema/app.d.ts → schema.d.ts} +24 -9
  300. package/dist/esm/app/schema.d.ts.map +1 -0
  301. package/dist/esm/app/{schema/app.js → schema.js} +11 -3
  302. package/dist/esm/app/utils.d.ts.map +1 -0
  303. package/dist/esm/association/index.d.ts +2 -1
  304. package/dist/esm/association/index.d.ts.map +1 -1
  305. package/dist/esm/association/index.js +2 -1
  306. package/dist/esm/association/resources.d.ts +23 -0
  307. package/dist/esm/association/resources.d.ts.map +1 -0
  308. package/dist/esm/association/resources.js +44 -0
  309. package/dist/esm/association/schema.d.ts +147 -0
  310. package/dist/esm/association/schema.d.ts.map +1 -0
  311. package/dist/esm/association/schema.js +39 -0
  312. package/dist/esm/authentication/{schema/factors.d.ts → factors/schema.d.ts} +12 -3
  313. package/dist/esm/authentication/factors/schema.d.ts.map +1 -0
  314. package/dist/esm/authentication/{schema/factors.js → factors/schema.js} +5 -1
  315. package/dist/esm/authentication/factors/schema.test.d.ts +2 -0
  316. package/dist/esm/authentication/factors/schema.test.d.ts.map +1 -0
  317. package/dist/esm/authentication/{schema/factors.test.js → factors/schema.test.js} +1 -1
  318. package/dist/esm/authentication/index.d.ts +8 -1
  319. package/dist/esm/authentication/index.d.ts.map +1 -1
  320. package/dist/esm/authentication/index.js +13 -1
  321. package/dist/esm/authentication/{schema/provider.d.ts → providers/schema.d.ts} +5 -5
  322. package/dist/esm/authentication/providers/schema.d.ts.map +1 -0
  323. package/dist/esm/authentication/{schema/provider.js → providers/schema.js} +1 -1
  324. package/dist/esm/authentication/resources.d.ts +2 -0
  325. package/dist/esm/authentication/resources.d.ts.map +1 -0
  326. package/dist/esm/authentication/resources.js +1 -0
  327. package/dist/esm/authentication/sessions/resources.d.ts +21 -0
  328. package/dist/esm/authentication/sessions/resources.d.ts.map +1 -0
  329. package/dist/esm/authentication/sessions/resources.js +37 -0
  330. package/dist/esm/authentication/sessions/schema.d.ts +81 -0
  331. package/dist/esm/authentication/sessions/schema.d.ts.map +1 -0
  332. package/dist/esm/authentication/{schema/session.js → sessions/schema.js} +17 -8
  333. package/dist/esm/authentication/settings/resources.d.ts +12 -0
  334. package/dist/esm/authentication/settings/resources.d.ts.map +1 -0
  335. package/dist/esm/authentication/settings/resources.js +26 -0
  336. package/dist/esm/authentication/{schema/settings.d.ts → settings/schema.d.ts} +31 -8
  337. package/dist/esm/authentication/settings/schema.d.ts.map +1 -0
  338. package/dist/esm/authentication/settings/schema.js +20 -0
  339. package/dist/esm/authentication/strategies/resources.d.ts +20 -0
  340. package/dist/esm/authentication/strategies/resources.d.ts.map +1 -0
  341. package/dist/esm/authentication/strategies/resources.js +49 -0
  342. package/dist/esm/authentication/{schema/strategy → strategies/schema}/base.d.ts +17 -7
  343. package/dist/esm/authentication/strategies/schema/base.d.ts.map +1 -0
  344. package/dist/esm/authentication/{schema/strategy → strategies/schema}/base.js +11 -3
  345. package/dist/esm/authentication/{schema/strategy → strategies/schema}/schema.d.ts +102 -53
  346. package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -0
  347. package/dist/esm/authentication/{schema/strategy → strategies/schema}/schema.js +4 -3
  348. package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/email.d.ts +27 -9
  349. package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -0
  350. package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/email.js +4 -3
  351. package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/password.d.ts +76 -43
  352. package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +1 -0
  353. package/dist/esm/authentication/strategies/schema/types/password.js +49 -0
  354. package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/totp.d.ts +33 -13
  355. package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -0
  356. package/dist/esm/authentication/{schema/strategy → strategies/schema}/types/totp.js +12 -3
  357. package/dist/esm/authorization/index.d.ts.map +1 -1
  358. package/dist/esm/authorization/index.js +2 -0
  359. package/dist/esm/authorization/permissions/resources.d.ts +2 -2
  360. package/dist/esm/authorization/permissions/resources.d.ts.map +1 -1
  361. package/dist/esm/authorization/permissions/resources.js +1 -1
  362. package/dist/esm/authorization/permissions/schema.d.ts +8 -8
  363. package/dist/esm/authorization/roles/resources.d.ts +2 -2
  364. package/dist/esm/authorization/roles/resources.d.ts.map +1 -1
  365. package/dist/esm/authorization/roles/resources.js +1 -1
  366. package/dist/esm/authorization/roles/schema.d.ts +8 -8
  367. package/dist/esm/common/index.d.ts +1 -0
  368. package/dist/esm/common/index.d.ts.map +1 -1
  369. package/dist/esm/common/index.js +1 -0
  370. package/dist/esm/common/schema/dates.d.ts +7 -7
  371. package/dist/esm/common/schema/dates.d.ts.map +1 -1
  372. package/dist/esm/common/schema/metadata.d.ts +8 -6
  373. package/dist/esm/common/schema/metadata.d.ts.map +1 -1
  374. package/dist/esm/common/schema/schema.d.ts +2 -1
  375. package/dist/esm/common/schema/schema.d.ts.map +1 -1
  376. package/dist/esm/common/schema/schema.js +2 -1
  377. package/dist/esm/common/schema/schema.test.d.ts +2 -0
  378. package/dist/esm/common/schema/schema.test.d.ts.map +1 -0
  379. package/dist/esm/common/schema/schema.test.js +33 -0
  380. package/dist/esm/common/schema/sets.d.ts +2 -2
  381. package/dist/esm/common/schema/sets.d.ts.map +1 -1
  382. package/dist/esm/common/schema/url.d.ts +2 -0
  383. package/dist/esm/common/schema/url.d.ts.map +1 -0
  384. package/dist/esm/common/schema/url.js +9 -0
  385. package/dist/esm/customer/index.d.ts +1 -0
  386. package/dist/esm/customer/index.d.ts.map +1 -1
  387. package/dist/esm/customer/index.js +1 -0
  388. package/dist/esm/customer/schema/organization.d.ts +7 -7
  389. package/dist/esm/customer/users/resources.d.ts +2 -2
  390. package/dist/esm/customer/users/resources.d.ts.map +1 -1
  391. package/dist/esm/customer/users/resources.js +3 -3
  392. package/dist/esm/customer/users/schema.d.ts +10 -11
  393. package/dist/esm/customer/users/schema.d.ts.map +1 -1
  394. package/dist/esm/customer/users/schema.js +1 -3
  395. package/dist/esm/customer/users/schema.test.js +2 -0
  396. package/dist/esm/customer/users/utils.d.ts +10 -0
  397. package/dist/esm/customer/users/utils.d.ts.map +1 -0
  398. package/dist/esm/customer/users/utils.js +27 -0
  399. package/dist/esm/identity/index.d.ts +1 -1
  400. package/dist/esm/identity/index.d.ts.map +1 -1
  401. package/dist/esm/identity/index.js +1 -1
  402. package/dist/esm/identity/schema.d.ts.map +1 -0
  403. package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +1 -1
  404. package/dist/esm/oauth/common/schema.d.ts +6 -0
  405. package/dist/esm/oauth/common/schema.d.ts.map +1 -1
  406. package/dist/esm/oauth/common/schema.js +6 -0
  407. package/dist/esm/oauth/index.d.ts +1 -1
  408. package/dist/esm/oauth/index.d.ts.map +1 -1
  409. package/dist/esm/oauth/index.js +1 -1
  410. package/dist/esm/oauth/token/schema/grants/client-credentials.js +1 -1
  411. package/dist/esm/oauth/token/schema/grants/refresh-token.js +1 -1
  412. package/dist/esm/workspace/{schema/authorization.d.ts → authorization/schema.d.ts} +6 -6
  413. package/dist/esm/workspace/authorization/schema.d.ts.map +1 -0
  414. package/dist/esm/workspace/{schema/branding.d.ts → branding/schema.d.ts} +6 -6
  415. package/dist/esm/workspace/branding/schema.d.ts.map +1 -0
  416. package/dist/esm/workspace/index.d.ts +8 -1
  417. package/dist/esm/workspace/index.d.ts.map +1 -1
  418. package/dist/esm/workspace/index.js +8 -1
  419. package/dist/esm/workspace/{schema/membership.d.ts → membership/schema.d.ts} +6 -6
  420. package/dist/esm/workspace/membership/schema.d.ts.map +1 -0
  421. package/dist/esm/workspace/{schema/registration.d.ts → registration/schema.d.ts} +6 -6
  422. package/dist/esm/workspace/registration/schema.d.ts.map +1 -0
  423. package/dist/esm/workspace/{schema/registration.js → registration/schema.js} +1 -1
  424. package/dist/esm/workspace/{schema/settings.d.ts → settings/schema.d.ts} +6 -6
  425. package/dist/esm/workspace/settings/schema.d.ts.map +1 -0
  426. package/dist/esm/workspace/{schema/tenant.d.ts → tenant/schema.d.ts} +11 -11
  427. package/dist/esm/workspace/{schema/tenant.d.ts.map → tenant/schema.d.ts.map} +1 -1
  428. package/dist/esm/workspace/{schema/tenant.js → tenant/schema.js} +2 -2
  429. package/dist/esm/workspace/{schema/user-notification.d.ts → user/notifications/schema.d.ts} +8 -8
  430. package/dist/esm/workspace/user/notifications/schema.d.ts.map +1 -0
  431. package/dist/esm/workspace/{schema/user-notification.js → user/notifications/schema.js} +4 -4
  432. package/dist/esm/workspace/{schema/user-preferences.d.ts → user/preferences/schema.d.ts} +6 -6
  433. package/dist/esm/workspace/user/preferences/schema.d.ts.map +1 -0
  434. package/dist/esm/workspace/{schema/user-preferences.js → user/preferences/schema.js} +2 -2
  435. package/dist/esm/workspace/user/schema.d.ts +3 -0
  436. package/dist/esm/workspace/user/schema.d.ts.map +1 -0
  437. package/dist/esm/workspace/user/schema.js +2 -0
  438. package/dist/esm/workspace/utils.d.ts.map +1 -0
  439. package/package.json +6 -6
  440. package/dist/cjs/app/schema/app.d.ts.map +0 -1
  441. package/dist/cjs/app/schema/authorization.d.ts +0 -37
  442. package/dist/cjs/app/schema/authorization.d.ts.map +0 -1
  443. package/dist/cjs/app/schema/oauth.d.ts.map +0 -1
  444. package/dist/cjs/app/schema/oidc.d.ts.map +0 -1
  445. package/dist/cjs/app/schema/registration.d.ts.map +0 -1
  446. package/dist/cjs/app/schema/saml.d.ts.map +0 -1
  447. package/dist/cjs/app/schema/schema.d.ts +0 -8
  448. package/dist/cjs/app/schema/schema.d.ts.map +0 -1
  449. package/dist/cjs/app/schema/schema.js +0 -23
  450. package/dist/cjs/app/schema/utils.d.ts.map +0 -1
  451. package/dist/cjs/association/schema/association.d.ts +0 -82
  452. package/dist/cjs/association/schema/association.d.ts.map +0 -1
  453. package/dist/cjs/association/schema/schema.d.ts +0 -2
  454. package/dist/cjs/association/schema/schema.d.ts.map +0 -1
  455. package/dist/cjs/authentication/schema/factors.d.ts.map +0 -1
  456. package/dist/cjs/authentication/schema/factors.test.d.ts +0 -2
  457. package/dist/cjs/authentication/schema/factors.test.d.ts.map +0 -1
  458. package/dist/cjs/authentication/schema/provider.d.ts.map +0 -1
  459. package/dist/cjs/authentication/schema/schema.d.ts +0 -6
  460. package/dist/cjs/authentication/schema/schema.d.ts.map +0 -1
  461. package/dist/cjs/authentication/schema/schema.js +0 -21
  462. package/dist/cjs/authentication/schema/session.d.ts +0 -59
  463. package/dist/cjs/authentication/schema/session.d.ts.map +0 -1
  464. package/dist/cjs/authentication/schema/settings.d.ts.map +0 -1
  465. package/dist/cjs/authentication/schema/strategy/base.d.ts.map +0 -1
  466. package/dist/cjs/authentication/schema/strategy/schema.d.ts.map +0 -1
  467. package/dist/cjs/authentication/schema/strategy/types/email.d.ts.map +0 -1
  468. package/dist/cjs/authentication/schema/strategy/types/password.d.ts.map +0 -1
  469. package/dist/cjs/authentication/schema/strategy/types/password.js +0 -35
  470. package/dist/cjs/authentication/schema/strategy/types/totp.d.ts.map +0 -1
  471. package/dist/cjs/identity/schema/schema.d.ts.map +0 -1
  472. package/dist/cjs/workspace/schema/authorization.d.ts.map +0 -1
  473. package/dist/cjs/workspace/schema/branding.d.ts.map +0 -1
  474. package/dist/cjs/workspace/schema/membership.d.ts.map +0 -1
  475. package/dist/cjs/workspace/schema/registration.d.ts.map +0 -1
  476. package/dist/cjs/workspace/schema/schema.d.ts +0 -10
  477. package/dist/cjs/workspace/schema/schema.d.ts.map +0 -1
  478. package/dist/cjs/workspace/schema/schema.js +0 -25
  479. package/dist/cjs/workspace/schema/settings.d.ts.map +0 -1
  480. package/dist/cjs/workspace/schema/user-notification.d.ts.map +0 -1
  481. package/dist/cjs/workspace/schema/user-preferences.d.ts.map +0 -1
  482. package/dist/cjs/workspace/schema/utils.d.ts.map +0 -1
  483. package/dist/esm/app/schema/app.d.ts.map +0 -1
  484. package/dist/esm/app/schema/authorization.d.ts +0 -37
  485. package/dist/esm/app/schema/authorization.d.ts.map +0 -1
  486. package/dist/esm/app/schema/oauth.d.ts.map +0 -1
  487. package/dist/esm/app/schema/oauth.js +0 -18
  488. package/dist/esm/app/schema/oidc.d.ts.map +0 -1
  489. package/dist/esm/app/schema/oidc.js +0 -10
  490. package/dist/esm/app/schema/registration.d.ts +0 -22
  491. package/dist/esm/app/schema/registration.d.ts.map +0 -1
  492. package/dist/esm/app/schema/saml.d.ts.map +0 -1
  493. package/dist/esm/app/schema/saml.js +0 -10
  494. package/dist/esm/app/schema/schema.d.ts +0 -8
  495. package/dist/esm/app/schema/schema.d.ts.map +0 -1
  496. package/dist/esm/app/schema/schema.js +0 -7
  497. package/dist/esm/app/schema/utils.d.ts.map +0 -1
  498. package/dist/esm/association/schema/association.d.ts +0 -82
  499. package/dist/esm/association/schema/association.d.ts.map +0 -1
  500. package/dist/esm/association/schema/association.js +0 -23
  501. package/dist/esm/association/schema/schema.d.ts +0 -2
  502. package/dist/esm/association/schema/schema.d.ts.map +0 -1
  503. package/dist/esm/association/schema/schema.js +0 -1
  504. package/dist/esm/authentication/schema/factors.d.ts.map +0 -1
  505. package/dist/esm/authentication/schema/factors.test.d.ts +0 -2
  506. package/dist/esm/authentication/schema/factors.test.d.ts.map +0 -1
  507. package/dist/esm/authentication/schema/provider.d.ts.map +0 -1
  508. package/dist/esm/authentication/schema/schema.d.ts +0 -6
  509. package/dist/esm/authentication/schema/schema.d.ts.map +0 -1
  510. package/dist/esm/authentication/schema/schema.js +0 -5
  511. package/dist/esm/authentication/schema/session.d.ts +0 -59
  512. package/dist/esm/authentication/schema/session.d.ts.map +0 -1
  513. package/dist/esm/authentication/schema/settings.d.ts.map +0 -1
  514. package/dist/esm/authentication/schema/settings.js +0 -13
  515. package/dist/esm/authentication/schema/strategy/base.d.ts.map +0 -1
  516. package/dist/esm/authentication/schema/strategy/schema.d.ts.map +0 -1
  517. package/dist/esm/authentication/schema/strategy/types/email.d.ts.map +0 -1
  518. package/dist/esm/authentication/schema/strategy/types/password.d.ts.map +0 -1
  519. package/dist/esm/authentication/schema/strategy/types/password.js +0 -32
  520. package/dist/esm/authentication/schema/strategy/types/totp.d.ts.map +0 -1
  521. package/dist/esm/identity/schema/schema.d.ts.map +0 -1
  522. package/dist/esm/workspace/schema/authorization.d.ts.map +0 -1
  523. package/dist/esm/workspace/schema/branding.d.ts.map +0 -1
  524. package/dist/esm/workspace/schema/membership.d.ts.map +0 -1
  525. package/dist/esm/workspace/schema/registration.d.ts.map +0 -1
  526. package/dist/esm/workspace/schema/schema.d.ts +0 -10
  527. package/dist/esm/workspace/schema/schema.d.ts.map +0 -1
  528. package/dist/esm/workspace/schema/schema.js +0 -9
  529. package/dist/esm/workspace/schema/settings.d.ts.map +0 -1
  530. package/dist/esm/workspace/schema/user-notification.d.ts.map +0 -1
  531. package/dist/esm/workspace/schema/user-preferences.d.ts.map +0 -1
  532. package/dist/esm/workspace/schema/utils.d.ts.map +0 -1
  533. package/dist/cjs/app/{schema/utils.d.ts → utils.d.ts} +0 -0
  534. package/dist/cjs/app/{schema/utils.js → utils.js} +0 -0
  535. package/dist/cjs/identity/{schema/schema.d.ts → schema.d.ts} +0 -0
  536. package/dist/cjs/identity/{schema/schema.js → schema.js} +0 -0
  537. package/dist/cjs/workspace/{schema/authorization.js → authorization/schema.js} +0 -0
  538. package/dist/cjs/workspace/{schema/branding.js → branding/schema.js} +0 -0
  539. package/dist/cjs/workspace/{schema/membership.js → membership/schema.js} +0 -0
  540. package/dist/cjs/workspace/{schema/settings.js → settings/schema.js} +0 -0
  541. package/dist/cjs/workspace/{schema/utils.d.ts → utils.d.ts} +0 -0
  542. package/dist/cjs/workspace/{schema/utils.js → utils.js} +1 -1
  543. package/dist/esm/app/{schema/utils.d.ts → utils.d.ts} +0 -0
  544. package/dist/esm/app/{schema/utils.js → utils.js} +0 -0
  545. package/dist/esm/identity/{schema/schema.d.ts → schema.d.ts} +0 -0
  546. package/dist/esm/identity/{schema/schema.js → schema.js} +0 -0
  547. package/dist/esm/workspace/{schema/authorization.js → authorization/schema.js} +0 -0
  548. package/dist/esm/workspace/{schema/branding.js → branding/schema.js} +0 -0
  549. package/dist/esm/workspace/{schema/membership.js → membership/schema.js} +0 -0
  550. package/dist/esm/workspace/{schema/settings.js → settings/schema.js} +0 -0
  551. package/dist/esm/workspace/{schema/utils.d.ts → utils.d.ts} +0 -0
  552. package/dist/esm/workspace/{schema/utils.js → utils.js} +1 -1
@@ -0,0 +1,147 @@
1
+ import type { AppAssociationReference } from 'src/app/schema.js';
2
+ import type { PermissionAssociationReference, RoleAssociationReference } from 'src/authorization/index.js';
3
+ import { type OrganizationAssociationReference } from '../customer/schema/organization.js';
4
+ import { type UserAssociationReference } from '../customer/users/schema.js';
5
+ export declare const AssociationObjectType: {
6
+ readonly USER: "User";
7
+ readonly ORGANIZATION: "Organization";
8
+ readonly ROLE: "Role";
9
+ readonly APP: "App";
10
+ readonly PERMISSION: "Permission";
11
+ };
12
+ export type AnyAssociationObjectType = (typeof AssociationObjectType)[keyof typeof AssociationObjectType];
13
+ export declare const AssociationIdReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
14
+ id: string;
15
+ }, {}>;
16
+ export type AssociationIdReference = typeof AssociationIdReferenceSchema.inferOut;
17
+ export declare const AssociationAttributesReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
18
+ [x: string]: unknown;
19
+ id: string;
20
+ }, {}>;
21
+ export type AssociationAttributesReference = typeof AssociationAttributesReferenceSchema.inferOut;
22
+ export type AssociationReference = AssociationIdReference | AssociationAttributesReference;
23
+ export declare const AssociationObjectSchema: import("arktype/out/methods/object.js").ObjectType<import("arktype/out/methods/object.js").ObjectType<{
24
+ id: string;
25
+ givenName?: string | undefined;
26
+ middleName?: string | undefined;
27
+ familyName?: string | undefined;
28
+ honorificPrefix?: string | undefined;
29
+ honorificSuffix?: string | undefined;
30
+ email?: string | undefined;
31
+ phoneNumber?: string | undefined;
32
+ status: "active" | "suspended" | "unverified";
33
+ model: "User";
34
+ }, {}> | import("arktype/out/methods/object.js").ObjectType<{
35
+ id: string;
36
+ name: string;
37
+ model: "Organization";
38
+ }, {}>, {}>;
39
+ export type AssociationObject = UserAssociationReference | OrganizationAssociationReference | AppAssociationReference | RoleAssociationReference | PermissionAssociationReference;
40
+ export declare const ObjectPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
41
+ object: import("arktype/out/methods/object.js").ObjectType<{
42
+ id: string;
43
+ givenName?: string | undefined;
44
+ middleName?: string | undefined;
45
+ familyName?: string | undefined;
46
+ honorificPrefix?: string | undefined;
47
+ honorificSuffix?: string | undefined;
48
+ email?: string | undefined;
49
+ phoneNumber?: string | undefined;
50
+ status: "active" | "suspended" | "unverified";
51
+ model: "User";
52
+ }, {}> | import("arktype/out/methods/object.js").ObjectType<{
53
+ id: string;
54
+ name: string;
55
+ model: "Organization";
56
+ }, {}>;
57
+ }, {}>;
58
+ export declare const AssociationSchema: import("arktype/out/methods/object.js").ObjectType<{
59
+ object: import("arktype/out/methods/object.js").ObjectType<{
60
+ id: string;
61
+ givenName?: string | undefined;
62
+ middleName?: string | undefined;
63
+ familyName?: string | undefined;
64
+ honorificPrefix?: string | undefined;
65
+ honorificSuffix?: string | undefined;
66
+ email?: string | undefined;
67
+ phoneNumber?: string | undefined;
68
+ status: "active" | "suspended" | "unverified";
69
+ model: "User";
70
+ }, {}> | import("arktype/out/methods/object.js").ObjectType<{
71
+ id: string;
72
+ name: string;
73
+ model: "Organization";
74
+ }, {}>;
75
+ expiresAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
76
+ createdAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
77
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
78
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
79
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
80
+ 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>>;
81
+ }, {}>;
82
+ declare const RootAssociationProperties: import("arktype/out/methods/object.js").ObjectType<{
83
+ expiresAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
84
+ createdAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
85
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
86
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
87
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
88
+ 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>>;
89
+ }, {}>;
90
+ type RootAssociationProperties = typeof RootAssociationProperties.inferIn;
91
+ export type AssociationProperties<O extends AssociationObject = AssociationObject> = RootAssociationProperties & {
92
+ object: O;
93
+ };
94
+ declare const RootAssociation: import("arktype/out/methods/object.js").ObjectType<{
95
+ expiresAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
96
+ createdAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
97
+ updatedAt: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>);
98
+ deletedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
99
+ deactivatedAt?: Date | ((In: string) => import("arktype/out/attributes.js").To<Date>) | undefined;
100
+ 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>>;
101
+ }, {}>;
102
+ type RootAssociation = typeof RootAssociation.inferOut;
103
+ export type Association<O extends AssociationObject = AssociationObject> = RootAssociation & {
104
+ object: O;
105
+ };
106
+ export declare const AssociationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
107
+ updatedAt: (In: string | Date) => import("arktype").Out<string>;
108
+ deletedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
109
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
110
+ object: import("arktype/out/methods/object.js").ObjectType<{
111
+ id: string;
112
+ givenName?: string | undefined;
113
+ middleName?: string | undefined;
114
+ familyName?: string | undefined;
115
+ honorificPrefix?: string | undefined;
116
+ honorificSuffix?: string | undefined;
117
+ email?: string | undefined;
118
+ phoneNumber?: string | undefined;
119
+ status: "active" | "suspended" | "unverified";
120
+ model: "User";
121
+ }, {}> | import("arktype/out/methods/object.js").ObjectType<{
122
+ id: string;
123
+ name: string;
124
+ model: "Organization";
125
+ }, {}>;
126
+ metadata?: ((In: {
127
+ [x: string]: string | number | boolean;
128
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
129
+ [x: string]: string | number | boolean;
130
+ } | undefined>) | undefined;
131
+ }, {}>;
132
+ type RootAssociationPayload = typeof AssociationPayloadSchema.inferOut;
133
+ export type AssociationPayload<O extends AssociationObject = AssociationObject> = RootAssociationPayload & {
134
+ object: O;
135
+ };
136
+ export declare const UpsertAssociationPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
137
+ expiresAt?: ((In: string | Date | undefined) => import("arktype").Out<string | undefined>) | undefined;
138
+ metadata?: ((In: {
139
+ [x: string]: string | number | boolean;
140
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
141
+ [x: string]: string | number | boolean;
142
+ } | undefined>) | undefined;
143
+ }, {}>;
144
+ export type UpsertAssociationInput = typeof UpsertAssociationPayloadSchema.inferIn;
145
+ export type UpsertAssociationPayload = typeof UpsertAssociationPayloadSchema.inferOut;
146
+ export {};
147
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/association/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EACV,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAWpC,OAAO,EACL,KAAK,gCAAgC,EAEtC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,6BAA6B,CAAC;AAErC,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;;;;;;;;;;;;;;;WAGnC,CAAC;AACF,MAAM,MAAM,iBAAiB,GACzB,wBAAwB,GACxB,gCAAgC,GAChC,uBAAuB,GACvB,wBAAwB,GACxB,8BAA8B,CAAC;AAEnC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;MAE/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;MAMG,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;;;;;;;;;;;;;;;;;;;;;;;;;MAMA,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,11 +1,18 @@
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 dates_js_1 = require("../../common/schema/dates.js");
6
- const metadata_js_1 = require("../../common/schema/metadata.js");
7
- const organization_js_1 = require("../../customer/schema/organization.js");
8
- const schema_js_1 = require("../../customer/users/schema.js");
5
+ const dates_js_1 = require("../common/schema/dates.js");
6
+ const metadata_js_1 = require("../common/schema/metadata.js");
7
+ const organization_js_1 = require("../customer/schema/organization.js");
8
+ const schema_js_1 = require("../customer/users/schema.js");
9
+ exports.AssociationObjectType = {
10
+ USER: 'User',
11
+ ORGANIZATION: 'Organization',
12
+ ROLE: 'Role',
13
+ APP: 'App',
14
+ PERMISSION: 'Permission',
15
+ };
9
16
  exports.AssociationIdReferenceSchema = (0, arktype_1.type)({
10
17
  id: (0, arktype_1.type)('string'),
11
18
  });
@@ -14,6 +21,15 @@ exports.AssociationObjectSchema = arktype_1.type.enumerated(schema_js_1.UserAsso
14
21
  exports.ObjectPropertySchema = (0, arktype_1.type)({
15
22
  object: exports.AssociationObjectSchema,
16
23
  });
24
+ exports.AssociationSchema = exports.ObjectPropertySchema.and({
25
+ expiresAt: dates_js_1.RequiredDateSchema,
26
+ createdAt: dates_js_1.RequiredDateSchema,
27
+ updatedAt: dates_js_1.RequiredDateSchema,
28
+ deletedAt: dates_js_1.OptionalDateSchema.optional(),
29
+ deactivatedAt: dates_js_1.OptionalDateSchema.optional(),
30
+ }).and(metadata_js_1.MetadataMapPropertySchema);
31
+ const RootAssociationProperties = exports.AssociationSchema.omit('object');
32
+ const RootAssociation = exports.AssociationSchema.omit('object');
17
33
  exports.AssociationPayloadSchema = (0, arktype_1.type)({
18
34
  updatedAt: dates_js_1.RequiredDatePayloadSchema,
19
35
  'deletedAt?': 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;
@@ -45,4 +54,4 @@ export declare const UpsertAuthenticationFactorsPayloadSchema: import("arktype/o
45
54
  }[] | null | undefined;
46
55
  }[] | null | undefined;
47
56
  }, {}>;
48
- //# sourceMappingURL=factors.d.ts.map
57
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
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,8 +1,8 @@
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
- const base_js_1 = require("./strategy/base.js");
5
+ const base_js_1 = require("../strategies/schema/base.js");
6
6
  const factorScope = (0, arktype_1.scope)({
7
7
  factor: {
8
8
  id: base_js_1.StrategyIdSchema,
@@ -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?'),
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schema.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../../../../src/authentication/factors/schema.test.ts"],"names":[],"mappings":""}
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const arktype_1 = require("arktype");
4
4
  const vitest_1 = require("vitest");
5
- const factors_js_1 = require("./factors.js");
5
+ const schema_js_1 = require("./schema.js");
6
6
  (0, vitest_1.describe)('Authentication - Factors', () => {
7
7
  (0, vitest_1.describe)('Schema', () => {
8
8
  (0, vitest_1.test)('should parse response payload successfully', async () => {
9
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
9
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
10
10
  createdAt: new Date(),
11
11
  updatedAt: new Date(),
12
12
  factors: [
@@ -16,14 +16,14 @@ const factors_js_1 = require("./factors.js");
16
16
  ],
17
17
  })).not.toBeInstanceOf(arktype_1.type.errors);
18
18
  // Undefined factors
19
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
19
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
20
20
  createdAt: new Date(),
21
21
  updatedAt: new Date(),
22
22
  factors: undefined,
23
23
  })).not.toBeInstanceOf(arktype_1.type.errors);
24
24
  });
25
25
  (0, vitest_1.test)('should parse upsert payload successfully', async () => {
26
- (0, vitest_1.expect)((0, factors_js_1.UpsertAuthenticationFactorsPayloadSchema)({
26
+ (0, vitest_1.expect)((0, schema_js_1.UpsertAuthenticationFactorsPayloadSchema)({
27
27
  factors: [
28
28
  {
29
29
  id: '123',
@@ -31,23 +31,23 @@ const factors_js_1 = require("./factors.js");
31
31
  ],
32
32
  })).not.toBeInstanceOf(arktype_1.type.errors);
33
33
  // Null factors
34
- (0, vitest_1.expect)((0, factors_js_1.UpsertAuthenticationFactorsPayloadSchema)({
34
+ (0, vitest_1.expect)((0, schema_js_1.UpsertAuthenticationFactorsPayloadSchema)({
35
35
  factors: null,
36
36
  })).not.toBeInstanceOf(arktype_1.type.errors);
37
37
  // Undefined factors
38
- (0, vitest_1.expect)((0, factors_js_1.UpsertAuthenticationFactorsPayloadSchema)({
38
+ (0, vitest_1.expect)((0, schema_js_1.UpsertAuthenticationFactorsPayloadSchema)({
39
39
  factors: undefined,
40
40
  })).not.toBeInstanceOf(arktype_1.type.errors);
41
41
  });
42
42
  (0, vitest_1.test)('should throw error for invalid factors', async () => {
43
43
  // Factor object
44
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
44
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
45
45
  createdAt: new Date(),
46
46
  updatedAt: new Date(),
47
47
  factors: { id: '123' },
48
48
  })).toBeInstanceOf(arktype_1.type.errors);
49
49
  // Factor array of string
50
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
50
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
51
51
  createdAt: new Date(),
52
52
  updatedAt: new Date(),
53
53
  factors: ['123'],
@@ -55,12 +55,12 @@ const factors_js_1 = require("./factors.js");
55
55
  });
56
56
  (0, vitest_1.test)('should accept various next factors types', async () => {
57
57
  // Undefined
58
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorPayloadSchema)({
58
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorPayloadSchema)({
59
59
  id: '123',
60
60
  nextFactors: undefined,
61
61
  })).not.toBeInstanceOf(arktype_1.type.errors);
62
62
  // Array
63
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorPayloadSchema)({
63
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorPayloadSchema)({
64
64
  id: '123',
65
65
  nextFactors: [
66
66
  {
@@ -69,7 +69,7 @@ const factors_js_1 = require("./factors.js");
69
69
  ],
70
70
  })).not.toBeInstanceOf(arktype_1.type.errors);
71
71
  // Deeply nested array
72
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorPayloadSchema)({
72
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorPayloadSchema)({
73
73
  id: '123',
74
74
  nextFactors: [
75
75
  {
@@ -90,31 +90,31 @@ const factors_js_1 = require("./factors.js");
90
90
  });
91
91
  (0, vitest_1.test)('should throw error for invalid factor id', async () => {
92
92
  // Number
93
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
93
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
94
94
  id: 123,
95
95
  })).toBeInstanceOf(arktype_1.type.errors);
96
96
  // Null
97
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
97
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
98
98
  id: null,
99
99
  })).toBeInstanceOf(arktype_1.type.errors);
100
100
  // Undefined
101
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
101
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
102
102
  id: undefined,
103
103
  })).toBeInstanceOf(arktype_1.type.errors);
104
104
  });
105
105
  (0, vitest_1.test)('should throw error for invalid next factors', async () => {
106
106
  // String
107
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
107
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
108
108
  id: '123',
109
109
  nextFactors: '123',
110
110
  })).toBeInstanceOf(arktype_1.type.errors);
111
111
  // Object
112
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
112
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
113
113
  id: '123',
114
114
  nextFactors: { id: '123' },
115
115
  })).toBeInstanceOf(arktype_1.type.errors);
116
116
  // Array
117
- (0, vitest_1.expect)((0, factors_js_1.AuthenticationFactorsPayloadSchema)({
117
+ (0, vitest_1.expect)((0, schema_js_1.AuthenticationFactorsPayloadSchema)({
118
118
  id: '123',
119
119
  nextFactors: ['123'],
120
120
  })).toBeInstanceOf(arktype_1.type.errors);
@@ -1,2 +1,9 @@
1
- export * from './schema/schema.js';
1
+ export * from './factors/schema.js';
2
+ export * from './providers/schema.js';
3
+ export * from './sessions/resources.js';
4
+ export * from './sessions/schema.js';
5
+ export * from './settings/resources.js';
6
+ export * from './settings/schema.js';
7
+ export * from './strategies/resources.js';
8
+ export * from './strategies/schema/schema.js';
2
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authentication/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,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"}
@@ -14,4 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./schema/schema.js"), exports);
17
+ // Factors
18
+ __exportStar(require("./factors/schema.js"), exports);
19
+ // Providers
20
+ __exportStar(require("./providers/schema.js"), exports);
21
+ // Session
22
+ __exportStar(require("./sessions/resources.js"), exports);
23
+ __exportStar(require("./sessions/schema.js"), exports);
24
+ // Settings
25
+ __exportStar(require("./settings/resources.js"), exports);
26
+ __exportStar(require("./settings/schema.js"), exports);
27
+ // Strategies
28
+ __exportStar(require("./strategies/resources.js"), exports);
29
+ __exportStar(require("./strategies/schema/schema.js"), exports);
@@ -14,14 +14,14 @@ 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
  }, {}>;
26
26
  export type ProviderPayload = typeof ProviderPayloadSchema.inferOut;
27
- //# sourceMappingURL=provider.d.ts.map
27
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/providers/schema.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE/E,eAAO,MAAM,gBAAgB,gEAAc,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,OAAO,gBAAgB,CAAC,QAAQ,CAAC;AAE1D,eAAO,MAAM,wBAAwB;;MAEnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,wBAAwB,CAAC,QAAQ,CAAC;AAE1E,eAAO,MAAM,kBAAkB,iEAAsC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;MAOG,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC"}
@@ -5,7 +5,7 @@ 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");
7
7
  const schema_js_1 = require("../../customer/users/schema.js");
8
- const base_js_1 = require("./strategy/base.js");
8
+ const base_js_1 = require("../strategies/schema/base.js");
9
9
  exports.ProviderType = {
10
10
  MONDO: 'mondo',
11
11
  };
@@ -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
+ }
@@ -0,0 +1,81 @@
1
+ export declare const SessionStatus: {
2
+ readonly INITIATED: "initiated";
3
+ readonly AUTHENTICATED: "authenticated";
4
+ readonly PENDING: "pending";
5
+ };
6
+ export type AnySessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
7
+ export declare const SessionIdSchema: import("arktype/out/methods/string.js").StringType<string, {}>;
8
+ export type SessionId = typeof SessionIdSchema.inferOut;
9
+ export declare const SessionIdPropertySchema: import("arktype/out/methods/object.js").ObjectType<{
10
+ id: string;
11
+ }, {}>;
12
+ export type SessionIdProperty = typeof SessionIdPropertySchema.inferOut;
13
+ export declare const SessionStatusSchema: import("arktype/out/methods/string.js").StringType<"initiated" | "authenticated" | "pending", {}>;
14
+ export declare const SessionAuthenticationFactorSchema: import("arktype/out/methods/object.js").ObjectType<{
15
+ id: string;
16
+ type: "email" | "password" | "totp";
17
+ settings?: Record<string, unknown> | undefined;
18
+ state?: string | undefined;
19
+ }, {}>;
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;
45
+ export declare const SessionPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
46
+ id: string;
47
+ status: "initiated" | "authenticated" | "pending";
48
+ user?: string | undefined;
49
+ userAgent?: string | undefined;
50
+ sourceIp?: string | undefined;
51
+ factors?: {
52
+ id: string;
53
+ type: "email" | "password" | "totp";
54
+ settings?: Record<string, unknown> | undefined;
55
+ state?: string | undefined;
56
+ }[] | 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;
63
+ metadata?: ((In: {
64
+ [x: string]: string | number | boolean;
65
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype").Out<{
66
+ [x: string]: string | number | boolean;
67
+ } | undefined>) | undefined;
68
+ }, {}>;
69
+ export type SessionPayload = typeof SessionPayloadSchema.inferOut;
70
+ export declare const SessionAssociationReferenceSchema: import("arktype/out/methods/object.js").ObjectType<{
71
+ id: string;
72
+ status: "initiated" | "authenticated" | "pending";
73
+ user?: string | undefined;
74
+ userAgent?: string | undefined;
75
+ sourceIp?: string | undefined;
76
+ expiresAt: (In: string | Date) => import("arktype").Out<string>;
77
+ createdAt: (In: string | Date) => import("arktype").Out<string>;
78
+ model: "Session";
79
+ }, {}>;
80
+ export type SessionAssociationReference = typeof SessionAssociationReferenceSchema.inferOut;
81
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
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"}