@go-mondo/identity-sdk 0.0.1 → 0.0.2-beta.3

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 (577) hide show
  1. package/.github/workflows/release.yaml +105 -0
  2. package/.release-please-manifest.json +3 -1
  3. package/.tsbuildinfo/cjs.json +1 -0
  4. package/.tsbuildinfo/esm.json +1 -0
  5. package/.vscode/settings.json +41 -0
  6. package/CHANGELOG.md +38 -0
  7. package/biome.json +1 -1
  8. package/dist/cjs/action/index.d.ts +2 -0
  9. package/dist/cjs/action/index.d.ts.map +1 -0
  10. package/dist/cjs/action/index.js +17 -0
  11. package/dist/cjs/action/schema/base.d.ts +21 -0
  12. package/dist/cjs/action/schema/base.d.ts.map +1 -0
  13. package/dist/cjs/action/schema/base.js +19 -0
  14. package/dist/cjs/action/schema/operations/set-password.d.ts +31 -0
  15. package/dist/cjs/action/schema/operations/set-password.d.ts.map +1 -0
  16. package/dist/cjs/action/schema/operations/set-password.js +18 -0
  17. package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +22 -0
  18. package/dist/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -0
  19. package/dist/cjs/action/schema/operations/sign-up-verification.js +15 -0
  20. package/dist/cjs/action/schema/operations/sign-up.d.ts +44 -0
  21. package/dist/cjs/action/schema/operations/sign-up.d.ts.map +1 -0
  22. package/dist/cjs/action/schema/operations/sign-up.js +21 -0
  23. package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +20 -0
  24. package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
  25. package/dist/cjs/action/schema/operations/user-attribute-verification.js +13 -0
  26. package/dist/cjs/action/schema/schema.d.ts +92 -0
  27. package/dist/cjs/action/schema/schema.d.ts.map +1 -0
  28. package/dist/cjs/action/schema/schema.js +40 -0
  29. package/dist/cjs/activity/index.d.ts +2 -0
  30. package/dist/cjs/activity/index.d.ts.map +1 -0
  31. package/dist/cjs/activity/index.js +17 -0
  32. package/dist/cjs/activity/schema/base.d.ts +54 -0
  33. package/dist/cjs/activity/schema/base.d.ts.map +1 -0
  34. package/dist/cjs/activity/schema/base.js +34 -0
  35. package/dist/cjs/activity/schema/schema.d.ts +156 -0
  36. package/dist/cjs/activity/schema/schema.d.ts.map +1 -0
  37. package/dist/cjs/activity/schema/schema.js +54 -0
  38. package/dist/cjs/activity/schema/types/authentication.d.ts +29 -0
  39. package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -0
  40. package/dist/cjs/activity/schema/types/authentication.js +16 -0
  41. package/dist/cjs/activity/schema/types/authorization.d.ts +29 -0
  42. package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -0
  43. package/dist/cjs/activity/schema/types/authorization.js +17 -0
  44. package/dist/cjs/activity/schema/types/note.d.ts +51 -0
  45. package/dist/cjs/activity/schema/types/note.d.ts.map +1 -0
  46. package/dist/cjs/activity/schema/types/note.js +17 -0
  47. package/dist/cjs/activity/schema/types/operation.d.ts +31 -0
  48. package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -0
  49. package/dist/cjs/activity/schema/types/operation.js +18 -0
  50. package/dist/cjs/activity/schema/types/unknown.d.ts +22 -0
  51. package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -0
  52. package/dist/cjs/activity/schema/types/unknown.js +9 -0
  53. package/dist/cjs/activity/schema/utils.d.ts +7 -0
  54. package/dist/cjs/activity/schema/utils.d.ts.map +1 -0
  55. package/dist/cjs/activity/schema/utils.js +16 -0
  56. package/dist/cjs/app/index.d.ts +2 -0
  57. package/dist/cjs/app/index.d.ts.map +1 -0
  58. package/dist/cjs/app/index.js +17 -0
  59. package/dist/cjs/app/schema/app.d.ts +58 -0
  60. package/dist/cjs/app/schema/app.d.ts.map +1 -0
  61. package/dist/cjs/app/schema/app.js +43 -0
  62. package/dist/cjs/app/schema/authorization.d.ts +37 -0
  63. package/dist/cjs/app/schema/authorization.d.ts.map +1 -0
  64. package/dist/cjs/app/schema/authorization.js +44 -0
  65. package/dist/cjs/app/schema/oauth.d.ts +30 -0
  66. package/dist/cjs/app/schema/oauth.d.ts.map +1 -0
  67. package/dist/cjs/app/schema/oauth.js +21 -0
  68. package/dist/cjs/app/schema/oidc.d.ts +28 -0
  69. package/dist/cjs/app/schema/oidc.d.ts.map +1 -0
  70. package/dist/cjs/app/schema/oidc.js +13 -0
  71. package/dist/cjs/app/schema/registration.d.ts +22 -0
  72. package/dist/cjs/app/schema/registration.d.ts.map +1 -0
  73. package/dist/cjs/app/schema/registration.js +16 -0
  74. package/dist/cjs/app/schema/saml.d.ts +28 -0
  75. package/dist/cjs/app/schema/saml.d.ts.map +1 -0
  76. package/dist/cjs/app/schema/saml.js +13 -0
  77. package/dist/cjs/app/schema/schema.d.ts +8 -0
  78. package/dist/cjs/app/schema/schema.d.ts.map +1 -0
  79. package/dist/cjs/app/schema/schema.js +23 -0
  80. package/dist/cjs/app/schema/utils.d.ts +11 -0
  81. package/dist/cjs/app/schema/utils.d.ts.map +1 -0
  82. package/dist/cjs/app/schema/utils.js +23 -0
  83. package/dist/cjs/association/index.d.ts +2 -0
  84. package/dist/cjs/association/index.d.ts.map +1 -0
  85. package/dist/cjs/association/index.js +17 -0
  86. package/dist/cjs/association/schema/association.d.ts +82 -0
  87. package/dist/cjs/association/schema/association.d.ts.map +1 -0
  88. package/dist/cjs/association/schema/association.js +26 -0
  89. package/dist/cjs/association/schema/schema.d.ts +2 -0
  90. package/dist/cjs/association/schema/schema.d.ts.map +1 -0
  91. package/dist/cjs/association/schema/schema.js +17 -0
  92. package/dist/cjs/authentication/index.d.ts +2 -0
  93. package/dist/cjs/authentication/index.d.ts.map +1 -0
  94. package/dist/cjs/authentication/index.js +17 -0
  95. package/dist/cjs/authentication/schema/factors.d.ts +48 -0
  96. package/dist/cjs/authentication/schema/factors.d.ts.map +1 -0
  97. package/dist/cjs/authentication/schema/factors.js +28 -0
  98. package/dist/cjs/authentication/schema/factors.test.d.ts +2 -0
  99. package/dist/cjs/authentication/schema/factors.test.d.ts.map +1 -0
  100. package/dist/cjs/authentication/schema/factors.test.js +123 -0
  101. package/dist/cjs/authentication/schema/provider.d.ts +27 -0
  102. package/dist/cjs/authentication/schema/provider.d.ts.map +1 -0
  103. package/dist/cjs/authentication/schema/provider.js +24 -0
  104. package/dist/cjs/authentication/schema/schema.d.ts +6 -0
  105. package/dist/cjs/authentication/schema/schema.d.ts.map +1 -0
  106. package/dist/cjs/authentication/schema/schema.js +21 -0
  107. package/dist/cjs/authentication/schema/session.d.ts +59 -0
  108. package/dist/cjs/authentication/schema/session.d.ts.map +1 -0
  109. package/dist/cjs/authentication/schema/session.js +46 -0
  110. package/dist/cjs/authentication/schema/settings.d.ts +46 -0
  111. package/dist/cjs/authentication/schema/settings.d.ts.map +1 -0
  112. package/dist/cjs/authentication/schema/settings.js +16 -0
  113. package/dist/cjs/authentication/schema/strategy/base.d.ts +54 -0
  114. package/dist/cjs/authentication/schema/strategy/base.d.ts.map +1 -0
  115. package/dist/cjs/authentication/schema/strategy/base.js +39 -0
  116. package/dist/cjs/authentication/schema/strategy/schema.d.ts +158 -0
  117. package/dist/cjs/authentication/schema/strategy/schema.d.ts.map +1 -0
  118. package/dist/cjs/authentication/schema/strategy/schema.js +39 -0
  119. package/dist/cjs/authentication/schema/strategy/types/email.d.ts +44 -0
  120. package/dist/cjs/authentication/schema/strategy/types/email.d.ts.map +1 -0
  121. package/dist/cjs/authentication/schema/strategy/types/email.js +20 -0
  122. package/dist/cjs/authentication/schema/strategy/types/password.d.ts +99 -0
  123. package/dist/cjs/authentication/schema/strategy/types/password.d.ts.map +1 -0
  124. package/dist/cjs/authentication/schema/strategy/types/password.js +35 -0
  125. package/dist/cjs/authentication/schema/strategy/types/totp.d.ts +91 -0
  126. package/dist/cjs/authentication/schema/strategy/types/totp.d.ts.map +1 -0
  127. package/dist/cjs/authentication/schema/strategy/types/totp.js +48 -0
  128. package/dist/cjs/authorization/index.d.ts +6 -0
  129. package/dist/cjs/authorization/index.d.ts.map +1 -0
  130. package/dist/cjs/authorization/index.js +21 -0
  131. package/dist/cjs/authorization/permissions/resources.d.ts +20 -0
  132. package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -0
  133. package/dist/cjs/authorization/permissions/resources.js +57 -0
  134. package/dist/cjs/authorization/permissions/schema.d.ts +104 -0
  135. package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -0
  136. package/dist/cjs/authorization/permissions/schema.js +66 -0
  137. package/dist/cjs/authorization/roles/resources.d.ts +20 -0
  138. package/dist/cjs/authorization/roles/resources.d.ts.map +1 -0
  139. package/dist/cjs/authorization/roles/resources.js +57 -0
  140. package/dist/cjs/authorization/roles/schema.d.ts +113 -0
  141. package/dist/cjs/authorization/roles/schema.d.ts.map +1 -0
  142. package/dist/cjs/authorization/roles/schema.js +72 -0
  143. package/dist/cjs/authorization/utils.d.ts +11 -0
  144. package/dist/cjs/authorization/utils.d.ts.map +1 -0
  145. package/dist/cjs/authorization/utils.js +23 -0
  146. package/dist/cjs/common/errors/http.d.ts +17 -0
  147. package/dist/cjs/common/errors/http.d.ts.map +1 -0
  148. package/dist/cjs/common/errors/http.js +18 -0
  149. package/dist/cjs/common/errors/validation.d.ts +11 -0
  150. package/dist/cjs/common/errors/validation.d.ts.map +1 -0
  151. package/dist/cjs/common/errors/validation.js +12 -0
  152. package/dist/cjs/common/index.d.ts +6 -0
  153. package/dist/cjs/common/index.d.ts.map +1 -0
  154. package/dist/cjs/common/index.js +21 -0
  155. package/dist/cjs/common/resources/authorization.d.ts +2 -0
  156. package/dist/cjs/common/resources/authorization.d.ts.map +1 -0
  157. package/dist/cjs/common/resources/authorization.js +2 -0
  158. package/dist/cjs/common/resources/init.d.ts +16 -0
  159. package/dist/cjs/common/resources/init.d.ts.map +1 -0
  160. package/dist/cjs/common/resources/init.js +38 -0
  161. package/dist/cjs/common/resources/operations.d.ts +7 -0
  162. package/dist/cjs/common/resources/operations.d.ts.map +1 -0
  163. package/dist/cjs/common/resources/operations.js +90 -0
  164. package/dist/cjs/common/resources/utils.d.ts +18 -0
  165. package/dist/cjs/common/resources/utils.d.ts.map +1 -0
  166. package/dist/cjs/common/resources/utils.js +96 -0
  167. package/dist/cjs/common/schema/aggregate.d.ts +6 -0
  168. package/dist/cjs/common/schema/aggregate.d.ts.map +1 -0
  169. package/dist/cjs/common/schema/aggregate.js +8 -0
  170. package/dist/cjs/common/schema/collection.d.ts +18 -0
  171. package/dist/cjs/common/schema/collection.d.ts.map +1 -0
  172. package/dist/cjs/common/schema/collection.js +10 -0
  173. package/dist/cjs/common/schema/dates.d.ts +39 -0
  174. package/dist/cjs/common/schema/dates.d.ts.map +1 -0
  175. package/dist/cjs/common/schema/dates.js +34 -0
  176. package/dist/cjs/common/schema/dates.test.d.ts +2 -0
  177. package/dist/cjs/common/schema/dates.test.d.ts.map +1 -0
  178. package/dist/cjs/common/schema/dates.test.js +33 -0
  179. package/dist/cjs/common/schema/jwt.d.ts +21 -0
  180. package/dist/cjs/common/schema/jwt.d.ts.map +1 -0
  181. package/dist/cjs/common/schema/jwt.js +24 -0
  182. package/dist/cjs/common/schema/metadata.d.ts +47 -0
  183. package/dist/cjs/common/schema/metadata.d.ts.map +1 -0
  184. package/dist/cjs/common/schema/metadata.js +88 -0
  185. package/dist/cjs/common/schema/metadata.test.d.ts +2 -0
  186. package/dist/cjs/common/schema/metadata.test.d.ts.map +1 -0
  187. package/dist/cjs/common/schema/metadata.test.js +62 -0
  188. package/dist/cjs/common/schema/pagination.d.ts +6 -0
  189. package/dist/cjs/common/schema/pagination.d.ts.map +1 -0
  190. package/dist/cjs/common/schema/pagination.js +8 -0
  191. package/dist/cjs/common/schema/schema.d.ts +8 -0
  192. package/dist/cjs/common/schema/schema.d.ts.map +1 -0
  193. package/dist/cjs/common/schema/schema.js +23 -0
  194. package/dist/cjs/common/schema/sets.d.ts +3 -0
  195. package/dist/cjs/common/schema/sets.d.ts.map +1 -0
  196. package/dist/cjs/common/schema/sets.js +9 -0
  197. package/dist/cjs/customer/index.d.ts +4 -0
  198. package/dist/cjs/customer/index.d.ts.map +1 -0
  199. package/dist/cjs/customer/index.js +19 -0
  200. package/dist/cjs/customer/schema/organization.d.ts +54 -0
  201. package/dist/cjs/customer/schema/organization.d.ts.map +1 -0
  202. package/dist/cjs/customer/schema/organization.js +40 -0
  203. package/dist/cjs/customer/schema/schema.d.ts +4 -0
  204. package/dist/cjs/customer/schema/schema.d.ts.map +1 -0
  205. package/dist/cjs/customer/schema/schema.js +19 -0
  206. package/dist/cjs/customer/schema/utils.d.ts +11 -0
  207. package/dist/cjs/customer/schema/utils.d.ts.map +1 -0
  208. package/dist/cjs/customer/schema/utils.js +23 -0
  209. package/dist/cjs/customer/users/resources.d.ts +20 -0
  210. package/dist/cjs/customer/users/resources.d.ts.map +1 -0
  211. package/dist/cjs/customer/users/resources.js +57 -0
  212. package/dist/cjs/customer/users/schema.d.ts +151 -0
  213. package/dist/cjs/customer/users/schema.d.ts.map +1 -0
  214. package/dist/cjs/customer/users/schema.js +91 -0
  215. package/dist/cjs/customer/users/schema.test.d.ts +2 -0
  216. package/dist/cjs/customer/users/schema.test.d.ts.map +1 -0
  217. package/dist/cjs/customer/users/schema.test.js +57 -0
  218. package/dist/cjs/identity/index.d.ts +2 -0
  219. package/dist/cjs/identity/index.d.ts.map +1 -0
  220. package/dist/cjs/identity/index.js +17 -0
  221. package/dist/cjs/identity/schema/schema.d.ts +7 -0
  222. package/dist/cjs/identity/schema/schema.d.ts.map +1 -0
  223. package/dist/cjs/identity/schema/schema.js +9 -0
  224. package/dist/cjs/oauth/authorize/index.d.ts +2 -0
  225. package/dist/cjs/oauth/authorize/index.d.ts.map +1 -0
  226. package/dist/cjs/oauth/authorize/index.js +17 -0
  227. package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
  228. package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
  229. package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +34 -0
  230. package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +11 -0
  231. package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
  232. package/dist/cjs/oauth/authorize/schema/grants/implicit.js +21 -0
  233. package/dist/cjs/oauth/authorize/schema/schema.d.ts +42 -0
  234. package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -0
  235. package/dist/cjs/oauth/authorize/schema/schema.js +25 -0
  236. package/dist/cjs/oauth/common/schema.d.ts +62 -0
  237. package/dist/cjs/oauth/common/schema.d.ts.map +1 -0
  238. package/dist/cjs/oauth/common/schema.js +54 -0
  239. package/dist/cjs/oauth/index.d.ts +4 -0
  240. package/dist/cjs/oauth/index.d.ts.map +1 -0
  241. package/dist/cjs/oauth/index.js +49 -0
  242. package/dist/cjs/oauth/token/index.d.ts +2 -0
  243. package/dist/cjs/oauth/token/index.d.ts.map +1 -0
  244. package/dist/cjs/oauth/token/index.js +17 -0
  245. package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +10 -0
  246. package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
  247. package/dist/cjs/oauth/token/schema/grants/authorization-code.js +20 -0
  248. package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +21 -0
  249. package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
  250. package/dist/cjs/oauth/token/schema/grants/client-credentials.js +25 -0
  251. package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +9 -0
  252. package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
  253. package/dist/cjs/oauth/token/schema/grants/refresh-token.js +17 -0
  254. package/dist/cjs/oauth/token/schema/schema.d.ts +28 -0
  255. package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -0
  256. package/dist/cjs/oauth/token/schema/schema.js +27 -0
  257. package/dist/cjs/package.json +1 -0
  258. package/dist/cjs/workspace/index.d.ts +2 -0
  259. package/dist/cjs/workspace/index.d.ts.map +1 -0
  260. package/dist/cjs/workspace/index.js +17 -0
  261. package/dist/cjs/workspace/schema/authorization.d.ts +31 -0
  262. package/dist/cjs/workspace/schema/authorization.d.ts.map +1 -0
  263. package/dist/cjs/workspace/schema/authorization.js +22 -0
  264. package/dist/cjs/workspace/schema/branding.d.ts +38 -0
  265. package/dist/cjs/workspace/schema/branding.d.ts.map +1 -0
  266. package/dist/cjs/workspace/schema/branding.js +25 -0
  267. package/dist/cjs/workspace/schema/membership.d.ts +25 -0
  268. package/dist/cjs/workspace/schema/membership.d.ts.map +1 -0
  269. package/dist/cjs/workspace/schema/membership.js +19 -0
  270. package/dist/cjs/workspace/schema/registration.d.ts +28 -0
  271. package/dist/cjs/workspace/schema/registration.d.ts.map +1 -0
  272. package/dist/cjs/workspace/schema/registration.js +22 -0
  273. package/dist/cjs/workspace/schema/schema.d.ts +10 -0
  274. package/dist/cjs/workspace/schema/schema.d.ts.map +1 -0
  275. package/dist/cjs/workspace/schema/schema.js +25 -0
  276. package/dist/cjs/workspace/schema/settings.d.ts +23 -0
  277. package/dist/cjs/workspace/schema/settings.d.ts.map +1 -0
  278. package/dist/cjs/workspace/schema/settings.js +15 -0
  279. package/dist/cjs/workspace/schema/tenant.d.ts +57 -0
  280. package/dist/cjs/workspace/schema/tenant.d.ts.map +1 -0
  281. package/dist/cjs/workspace/schema/tenant.js +26 -0
  282. package/dist/cjs/workspace/schema/user-notification.d.ts +62 -0
  283. package/dist/cjs/workspace/schema/user-notification.d.ts.map +1 -0
  284. package/dist/cjs/workspace/schema/user-notification.js +44 -0
  285. package/dist/cjs/workspace/schema/user-preferences.d.ts +26 -0
  286. package/dist/cjs/workspace/schema/user-preferences.d.ts.map +1 -0
  287. package/dist/cjs/workspace/schema/user-preferences.js +19 -0
  288. package/dist/cjs/workspace/schema/utils.d.ts +15 -0
  289. package/dist/cjs/workspace/schema/utils.d.ts.map +1 -0
  290. package/dist/cjs/workspace/schema/utils.js +64 -0
  291. package/dist/esm/action/index.d.ts +2 -0
  292. package/dist/esm/action/index.d.ts.map +1 -0
  293. package/dist/esm/action/index.js +1 -0
  294. package/dist/esm/action/schema/base.d.ts +21 -0
  295. package/dist/esm/action/schema/base.d.ts.map +1 -0
  296. package/dist/esm/action/schema/base.js +16 -0
  297. package/dist/esm/action/schema/operations/set-password.d.ts +31 -0
  298. package/dist/esm/action/schema/operations/set-password.d.ts.map +1 -0
  299. package/dist/esm/action/schema/operations/set-password.js +15 -0
  300. package/dist/esm/action/schema/operations/sign-up-verification.d.ts +22 -0
  301. package/dist/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -0
  302. package/dist/esm/action/schema/operations/sign-up-verification.js +12 -0
  303. package/dist/esm/action/schema/operations/sign-up.d.ts +44 -0
  304. package/dist/esm/action/schema/operations/sign-up.d.ts.map +1 -0
  305. package/dist/esm/action/schema/operations/sign-up.js +18 -0
  306. package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +20 -0
  307. package/dist/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
  308. package/dist/esm/action/schema/operations/user-attribute-verification.js +10 -0
  309. package/dist/esm/action/schema/schema.d.ts +92 -0
  310. package/dist/esm/action/schema/schema.d.ts.map +1 -0
  311. package/dist/esm/action/schema/schema.js +21 -0
  312. package/dist/esm/activity/index.d.ts +2 -0
  313. package/dist/esm/activity/index.d.ts.map +1 -0
  314. package/dist/esm/activity/index.js +1 -0
  315. package/dist/esm/activity/schema/base.d.ts +54 -0
  316. package/dist/esm/activity/schema/base.d.ts.map +1 -0
  317. package/dist/esm/activity/schema/base.js +31 -0
  318. package/dist/esm/activity/schema/schema.d.ts +156 -0
  319. package/dist/esm/activity/schema/schema.d.ts.map +1 -0
  320. package/dist/esm/activity/schema/schema.js +33 -0
  321. package/dist/esm/activity/schema/types/authentication.d.ts +29 -0
  322. package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -0
  323. package/dist/esm/activity/schema/types/authentication.js +13 -0
  324. package/dist/esm/activity/schema/types/authorization.d.ts +29 -0
  325. package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -0
  326. package/dist/esm/activity/schema/types/authorization.js +14 -0
  327. package/dist/esm/activity/schema/types/note.d.ts +51 -0
  328. package/dist/esm/activity/schema/types/note.d.ts.map +1 -0
  329. package/dist/esm/activity/schema/types/note.js +14 -0
  330. package/dist/esm/activity/schema/types/operation.d.ts +31 -0
  331. package/dist/esm/activity/schema/types/operation.d.ts.map +1 -0
  332. package/dist/esm/activity/schema/types/operation.js +15 -0
  333. package/dist/esm/activity/schema/types/unknown.d.ts +22 -0
  334. package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -0
  335. package/dist/esm/activity/schema/types/unknown.js +6 -0
  336. package/dist/esm/activity/schema/utils.d.ts +7 -0
  337. package/dist/esm/activity/schema/utils.d.ts.map +1 -0
  338. package/dist/esm/activity/schema/utils.js +9 -0
  339. package/dist/esm/app/index.d.ts +2 -0
  340. package/dist/esm/app/index.d.ts.map +1 -0
  341. package/dist/esm/app/index.js +1 -0
  342. package/dist/esm/app/schema/app.d.ts +58 -0
  343. package/dist/esm/app/schema/app.d.ts.map +1 -0
  344. package/dist/esm/app/schema/app.js +40 -0
  345. package/dist/esm/app/schema/authorization.d.ts +37 -0
  346. package/dist/esm/app/schema/authorization.d.ts.map +1 -0
  347. package/dist/esm/app/schema/authorization.js +41 -0
  348. package/dist/esm/app/schema/oauth.d.ts +30 -0
  349. package/dist/esm/app/schema/oauth.d.ts.map +1 -0
  350. package/dist/esm/app/schema/oauth.js +18 -0
  351. package/dist/esm/app/schema/oidc.d.ts +28 -0
  352. package/dist/esm/app/schema/oidc.d.ts.map +1 -0
  353. package/dist/esm/app/schema/oidc.js +10 -0
  354. package/dist/esm/app/schema/registration.d.ts +22 -0
  355. package/dist/esm/app/schema/registration.d.ts.map +1 -0
  356. package/dist/esm/app/schema/registration.js +13 -0
  357. package/dist/esm/app/schema/saml.d.ts +28 -0
  358. package/dist/esm/app/schema/saml.d.ts.map +1 -0
  359. package/dist/esm/app/schema/saml.js +10 -0
  360. package/dist/esm/app/schema/schema.d.ts +8 -0
  361. package/dist/esm/app/schema/schema.d.ts.map +1 -0
  362. package/dist/esm/app/schema/schema.js +7 -0
  363. package/dist/esm/app/schema/utils.d.ts +11 -0
  364. package/dist/esm/app/schema/utils.d.ts.map +1 -0
  365. package/dist/esm/app/schema/utils.js +15 -0
  366. package/dist/esm/association/index.d.ts +2 -0
  367. package/dist/esm/association/index.d.ts.map +1 -0
  368. package/dist/esm/association/index.js +1 -0
  369. package/dist/esm/association/schema/association.d.ts +82 -0
  370. package/dist/esm/association/schema/association.d.ts.map +1 -0
  371. package/dist/esm/association/schema/association.js +23 -0
  372. package/dist/esm/association/schema/schema.d.ts +2 -0
  373. package/dist/esm/association/schema/schema.d.ts.map +1 -0
  374. package/dist/esm/association/schema/schema.js +1 -0
  375. package/dist/esm/authentication/index.d.ts +2 -0
  376. package/dist/esm/authentication/index.d.ts.map +1 -0
  377. package/dist/esm/authentication/index.js +1 -0
  378. package/dist/esm/authentication/schema/factors.d.ts +48 -0
  379. package/dist/esm/authentication/schema/factors.d.ts.map +1 -0
  380. package/dist/esm/authentication/schema/factors.js +25 -0
  381. package/dist/esm/authentication/schema/factors.test.d.ts +2 -0
  382. package/dist/esm/authentication/schema/factors.test.d.ts.map +1 -0
  383. package/dist/esm/authentication/schema/factors.test.js +121 -0
  384. package/dist/esm/authentication/schema/provider.d.ts +27 -0
  385. package/dist/esm/authentication/schema/provider.d.ts.map +1 -0
  386. package/dist/esm/authentication/schema/provider.js +21 -0
  387. package/dist/esm/authentication/schema/schema.d.ts +6 -0
  388. package/dist/esm/authentication/schema/schema.d.ts.map +1 -0
  389. package/dist/esm/authentication/schema/schema.js +5 -0
  390. package/dist/esm/authentication/schema/session.d.ts +59 -0
  391. package/dist/esm/authentication/schema/session.d.ts.map +1 -0
  392. package/dist/esm/authentication/schema/session.js +43 -0
  393. package/dist/esm/authentication/schema/settings.d.ts +46 -0
  394. package/dist/esm/authentication/schema/settings.d.ts.map +1 -0
  395. package/dist/esm/authentication/schema/settings.js +13 -0
  396. package/dist/esm/authentication/schema/strategy/base.d.ts +54 -0
  397. package/dist/esm/authentication/schema/strategy/base.d.ts.map +1 -0
  398. package/dist/esm/authentication/schema/strategy/base.js +36 -0
  399. package/dist/esm/authentication/schema/strategy/schema.d.ts +158 -0
  400. package/dist/esm/authentication/schema/strategy/schema.d.ts.map +1 -0
  401. package/dist/esm/authentication/schema/strategy/schema.js +13 -0
  402. package/dist/esm/authentication/schema/strategy/types/email.d.ts +44 -0
  403. package/dist/esm/authentication/schema/strategy/types/email.d.ts.map +1 -0
  404. package/dist/esm/authentication/schema/strategy/types/email.js +17 -0
  405. package/dist/esm/authentication/schema/strategy/types/password.d.ts +99 -0
  406. package/dist/esm/authentication/schema/strategy/types/password.d.ts.map +1 -0
  407. package/dist/esm/authentication/schema/strategy/types/password.js +32 -0
  408. package/dist/esm/authentication/schema/strategy/types/totp.d.ts +91 -0
  409. package/dist/esm/authentication/schema/strategy/types/totp.d.ts.map +1 -0
  410. package/dist/esm/authentication/schema/strategy/types/totp.js +45 -0
  411. package/dist/esm/authorization/index.d.ts +6 -0
  412. package/dist/esm/authorization/index.d.ts.map +1 -0
  413. package/dist/esm/authorization/index.js +5 -0
  414. package/dist/esm/authorization/permissions/resources.d.ts +20 -0
  415. package/dist/esm/authorization/permissions/resources.d.ts.map +1 -0
  416. package/dist/esm/authorization/permissions/resources.js +48 -0
  417. package/dist/esm/authorization/permissions/schema.d.ts +104 -0
  418. package/dist/esm/authorization/permissions/schema.d.ts.map +1 -0
  419. package/dist/esm/authorization/permissions/schema.js +63 -0
  420. package/dist/esm/authorization/roles/resources.d.ts +20 -0
  421. package/dist/esm/authorization/roles/resources.d.ts.map +1 -0
  422. package/dist/esm/authorization/roles/resources.js +48 -0
  423. package/dist/esm/authorization/roles/schema.d.ts +113 -0
  424. package/dist/esm/authorization/roles/schema.d.ts.map +1 -0
  425. package/dist/esm/authorization/roles/schema.js +69 -0
  426. package/dist/esm/authorization/utils.d.ts +11 -0
  427. package/dist/esm/authorization/utils.d.ts.map +1 -0
  428. package/dist/esm/authorization/utils.js +15 -0
  429. package/dist/esm/common/errors/http.d.ts +17 -0
  430. package/dist/esm/common/errors/http.d.ts.map +1 -0
  431. package/dist/esm/common/errors/http.js +14 -0
  432. package/dist/esm/common/errors/validation.d.ts +11 -0
  433. package/dist/esm/common/errors/validation.d.ts.map +1 -0
  434. package/dist/esm/common/errors/validation.js +8 -0
  435. package/dist/esm/common/index.d.ts +6 -0
  436. package/dist/esm/common/index.d.ts.map +1 -0
  437. package/dist/esm/common/index.js +5 -0
  438. package/dist/esm/common/resources/authorization.d.ts +2 -0
  439. package/dist/esm/common/resources/authorization.d.ts.map +1 -0
  440. package/dist/esm/common/resources/authorization.js +1 -0
  441. package/dist/esm/common/resources/init.d.ts +16 -0
  442. package/dist/esm/common/resources/init.d.ts.map +1 -0
  443. package/dist/esm/common/resources/init.js +34 -0
  444. package/dist/esm/common/resources/operations.d.ts +7 -0
  445. package/dist/esm/common/resources/operations.d.ts.map +1 -0
  446. package/dist/esm/common/resources/operations.js +83 -0
  447. package/dist/esm/common/resources/utils.d.ts +18 -0
  448. package/dist/esm/common/resources/utils.d.ts.map +1 -0
  449. package/dist/esm/common/resources/utils.js +86 -0
  450. package/dist/esm/common/schema/aggregate.d.ts +6 -0
  451. package/dist/esm/common/schema/aggregate.d.ts.map +1 -0
  452. package/dist/esm/common/schema/aggregate.js +5 -0
  453. package/dist/esm/common/schema/collection.d.ts +18 -0
  454. package/dist/esm/common/schema/collection.d.ts.map +1 -0
  455. package/dist/esm/common/schema/collection.js +7 -0
  456. package/dist/esm/common/schema/dates.d.ts +39 -0
  457. package/dist/esm/common/schema/dates.d.ts.map +1 -0
  458. package/dist/esm/common/schema/dates.js +31 -0
  459. package/dist/esm/common/schema/dates.test.d.ts +2 -0
  460. package/dist/esm/common/schema/dates.test.d.ts.map +1 -0
  461. package/dist/esm/common/schema/dates.test.js +31 -0
  462. package/dist/esm/common/schema/jwt.d.ts +21 -0
  463. package/dist/esm/common/schema/jwt.d.ts.map +1 -0
  464. package/dist/esm/common/schema/jwt.js +21 -0
  465. package/dist/esm/common/schema/metadata.d.ts +47 -0
  466. package/dist/esm/common/schema/metadata.d.ts.map +1 -0
  467. package/dist/esm/common/schema/metadata.js +83 -0
  468. package/dist/esm/common/schema/metadata.test.d.ts +2 -0
  469. package/dist/esm/common/schema/metadata.test.d.ts.map +1 -0
  470. package/dist/esm/common/schema/metadata.test.js +60 -0
  471. package/dist/esm/common/schema/pagination.d.ts +6 -0
  472. package/dist/esm/common/schema/pagination.d.ts.map +1 -0
  473. package/dist/esm/common/schema/pagination.js +5 -0
  474. package/dist/esm/common/schema/schema.d.ts +8 -0
  475. package/dist/esm/common/schema/schema.d.ts.map +1 -0
  476. package/dist/esm/common/schema/schema.js +7 -0
  477. package/dist/esm/common/schema/sets.d.ts +3 -0
  478. package/dist/esm/common/schema/sets.d.ts.map +1 -0
  479. package/dist/esm/common/schema/sets.js +6 -0
  480. package/dist/esm/customer/index.d.ts +4 -0
  481. package/dist/esm/customer/index.d.ts.map +1 -0
  482. package/dist/esm/customer/index.js +3 -0
  483. package/dist/esm/customer/schema/organization.d.ts +54 -0
  484. package/dist/esm/customer/schema/organization.d.ts.map +1 -0
  485. package/dist/esm/customer/schema/organization.js +37 -0
  486. package/dist/esm/customer/schema/schema.d.ts +4 -0
  487. package/dist/esm/customer/schema/schema.d.ts.map +1 -0
  488. package/dist/esm/customer/schema/schema.js +3 -0
  489. package/dist/esm/customer/schema/utils.d.ts +11 -0
  490. package/dist/esm/customer/schema/utils.d.ts.map +1 -0
  491. package/dist/esm/customer/schema/utils.js +15 -0
  492. package/dist/esm/customer/users/resources.d.ts +20 -0
  493. package/dist/esm/customer/users/resources.d.ts.map +1 -0
  494. package/dist/esm/customer/users/resources.js +48 -0
  495. package/dist/esm/customer/users/schema.d.ts +151 -0
  496. package/dist/esm/customer/users/schema.d.ts.map +1 -0
  497. package/dist/esm/customer/users/schema.js +88 -0
  498. package/dist/esm/customer/users/schema.test.d.ts +2 -0
  499. package/dist/esm/customer/users/schema.test.d.ts.map +1 -0
  500. package/dist/esm/customer/users/schema.test.js +55 -0
  501. package/dist/esm/identity/index.d.ts +2 -0
  502. package/dist/esm/identity/index.d.ts.map +1 -0
  503. package/dist/esm/identity/index.js +1 -0
  504. package/dist/esm/identity/schema/schema.d.ts +7 -0
  505. package/dist/esm/identity/schema/schema.d.ts.map +1 -0
  506. package/dist/esm/identity/schema/schema.js +6 -0
  507. package/dist/esm/oauth/authorize/index.d.ts +2 -0
  508. package/dist/esm/oauth/authorize/index.d.ts.map +1 -0
  509. package/dist/esm/oauth/authorize/index.js +1 -0
  510. package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
  511. package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
  512. package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +31 -0
  513. package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +11 -0
  514. package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
  515. package/dist/esm/oauth/authorize/schema/grants/implicit.js +18 -0
  516. package/dist/esm/oauth/authorize/schema/schema.d.ts +42 -0
  517. package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -0
  518. package/dist/esm/oauth/authorize/schema/schema.js +8 -0
  519. package/dist/esm/oauth/common/schema.d.ts +62 -0
  520. package/dist/esm/oauth/common/schema.d.ts.map +1 -0
  521. package/dist/esm/oauth/common/schema.js +51 -0
  522. package/dist/esm/oauth/index.d.ts +4 -0
  523. package/dist/esm/oauth/index.d.ts.map +1 -0
  524. package/dist/esm/oauth/index.js +3 -0
  525. package/dist/esm/oauth/token/index.d.ts +2 -0
  526. package/dist/esm/oauth/token/index.d.ts.map +1 -0
  527. package/dist/esm/oauth/token/index.js +1 -0
  528. package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +10 -0
  529. package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
  530. package/dist/esm/oauth/token/schema/grants/authorization-code.js +17 -0
  531. package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +21 -0
  532. package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
  533. package/dist/esm/oauth/token/schema/grants/client-credentials.js +22 -0
  534. package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +9 -0
  535. package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
  536. package/dist/esm/oauth/token/schema/grants/refresh-token.js +14 -0
  537. package/dist/esm/oauth/token/schema/schema.d.ts +28 -0
  538. package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -0
  539. package/dist/esm/oauth/token/schema/schema.js +10 -0
  540. package/dist/esm/package.json +1 -0
  541. package/dist/esm/workspace/index.d.ts +2 -0
  542. package/dist/esm/workspace/index.d.ts.map +1 -0
  543. package/dist/esm/workspace/index.js +1 -0
  544. package/dist/esm/workspace/schema/authorization.d.ts +31 -0
  545. package/dist/esm/workspace/schema/authorization.d.ts.map +1 -0
  546. package/dist/esm/workspace/schema/authorization.js +19 -0
  547. package/dist/esm/workspace/schema/branding.d.ts +38 -0
  548. package/dist/esm/workspace/schema/branding.d.ts.map +1 -0
  549. package/dist/esm/workspace/schema/branding.js +22 -0
  550. package/dist/esm/workspace/schema/membership.d.ts +25 -0
  551. package/dist/esm/workspace/schema/membership.d.ts.map +1 -0
  552. package/dist/esm/workspace/schema/membership.js +16 -0
  553. package/dist/esm/workspace/schema/registration.d.ts +28 -0
  554. package/dist/esm/workspace/schema/registration.d.ts.map +1 -0
  555. package/dist/esm/workspace/schema/registration.js +19 -0
  556. package/dist/esm/workspace/schema/schema.d.ts +10 -0
  557. package/dist/esm/workspace/schema/schema.d.ts.map +1 -0
  558. package/dist/esm/workspace/schema/schema.js +9 -0
  559. package/dist/esm/workspace/schema/settings.d.ts +23 -0
  560. package/dist/esm/workspace/schema/settings.d.ts.map +1 -0
  561. package/dist/esm/workspace/schema/settings.js +12 -0
  562. package/dist/esm/workspace/schema/tenant.d.ts +57 -0
  563. package/dist/esm/workspace/schema/tenant.d.ts.map +1 -0
  564. package/dist/esm/workspace/schema/tenant.js +23 -0
  565. package/dist/esm/workspace/schema/user-notification.d.ts +62 -0
  566. package/dist/esm/workspace/schema/user-notification.d.ts.map +1 -0
  567. package/dist/esm/workspace/schema/user-notification.js +41 -0
  568. package/dist/esm/workspace/schema/user-preferences.d.ts +26 -0
  569. package/dist/esm/workspace/schema/user-preferences.d.ts.map +1 -0
  570. package/dist/esm/workspace/schema/user-preferences.js +16 -0
  571. package/dist/esm/workspace/schema/utils.d.ts +15 -0
  572. package/dist/esm/workspace/schema/utils.d.ts.map +1 -0
  573. package/dist/esm/workspace/schema/utils.js +22 -0
  574. package/package.json +50 -55
  575. package/release-please-config.json +13 -3
  576. package/tsconfig.esm.json +1 -1
  577. package/tsconfig.json +26 -0
@@ -0,0 +1,121 @@
1
+ import { type } from 'arktype';
2
+ import { describe, expect, test } from 'vitest';
3
+ import { AuthenticationFactorPayloadSchema, AuthenticationFactorsPayloadSchema, UpsertAuthenticationFactorsPayloadSchema, } from './factors.js';
4
+ describe('Authentication - Factors', () => {
5
+ describe('Schema', () => {
6
+ test('should parse response payload successfully', async () => {
7
+ expect(AuthenticationFactorsPayloadSchema({
8
+ createdAt: new Date(),
9
+ updatedAt: new Date(),
10
+ factors: [
11
+ {
12
+ id: '123',
13
+ },
14
+ ],
15
+ })).not.toBeInstanceOf(type.errors);
16
+ // Undefined factors
17
+ expect(AuthenticationFactorsPayloadSchema({
18
+ createdAt: new Date(),
19
+ updatedAt: new Date(),
20
+ factors: undefined,
21
+ })).not.toBeInstanceOf(type.errors);
22
+ });
23
+ test('should parse upsert payload successfully', async () => {
24
+ expect(UpsertAuthenticationFactorsPayloadSchema({
25
+ factors: [
26
+ {
27
+ id: '123',
28
+ },
29
+ ],
30
+ })).not.toBeInstanceOf(type.errors);
31
+ // Null factors
32
+ expect(UpsertAuthenticationFactorsPayloadSchema({
33
+ factors: null,
34
+ })).not.toBeInstanceOf(type.errors);
35
+ // Undefined factors
36
+ expect(UpsertAuthenticationFactorsPayloadSchema({
37
+ factors: undefined,
38
+ })).not.toBeInstanceOf(type.errors);
39
+ });
40
+ test('should throw error for invalid factors', async () => {
41
+ // Factor object
42
+ expect(AuthenticationFactorsPayloadSchema({
43
+ createdAt: new Date(),
44
+ updatedAt: new Date(),
45
+ factors: { id: '123' },
46
+ })).toBeInstanceOf(type.errors);
47
+ // Factor array of string
48
+ expect(AuthenticationFactorsPayloadSchema({
49
+ createdAt: new Date(),
50
+ updatedAt: new Date(),
51
+ factors: ['123'],
52
+ })).toBeInstanceOf(type.errors);
53
+ });
54
+ test('should accept various next factors types', async () => {
55
+ // Undefined
56
+ expect(AuthenticationFactorPayloadSchema({
57
+ id: '123',
58
+ nextFactors: undefined,
59
+ })).not.toBeInstanceOf(type.errors);
60
+ // Array
61
+ expect(AuthenticationFactorPayloadSchema({
62
+ id: '123',
63
+ nextFactors: [
64
+ {
65
+ id: '456',
66
+ },
67
+ ],
68
+ })).not.toBeInstanceOf(type.errors);
69
+ // Deeply nested array
70
+ expect(AuthenticationFactorPayloadSchema({
71
+ id: '123',
72
+ nextFactors: [
73
+ {
74
+ id: '456',
75
+ nextFactors: [
76
+ {
77
+ id: '456',
78
+ nextFactors: [
79
+ {
80
+ id: '456',
81
+ },
82
+ ],
83
+ },
84
+ ],
85
+ },
86
+ ],
87
+ })).not.toBeInstanceOf(type.errors);
88
+ });
89
+ test('should throw error for invalid factor id', async () => {
90
+ // Number
91
+ expect(AuthenticationFactorsPayloadSchema({
92
+ id: 123,
93
+ })).toBeInstanceOf(type.errors);
94
+ // Null
95
+ expect(AuthenticationFactorsPayloadSchema({
96
+ id: null,
97
+ })).toBeInstanceOf(type.errors);
98
+ // Undefined
99
+ expect(AuthenticationFactorsPayloadSchema({
100
+ id: undefined,
101
+ })).toBeInstanceOf(type.errors);
102
+ });
103
+ test('should throw error for invalid next factors', async () => {
104
+ // String
105
+ expect(AuthenticationFactorsPayloadSchema({
106
+ id: '123',
107
+ nextFactors: '123',
108
+ })).toBeInstanceOf(type.errors);
109
+ // Object
110
+ expect(AuthenticationFactorsPayloadSchema({
111
+ id: '123',
112
+ nextFactors: { id: '123' },
113
+ })).toBeInstanceOf(type.errors);
114
+ // Array
115
+ expect(AuthenticationFactorsPayloadSchema({
116
+ id: '123',
117
+ nextFactors: ['123'],
118
+ })).toBeInstanceOf(type.errors);
119
+ });
120
+ });
121
+ });
@@ -0,0 +1,27 @@
1
+ export declare const ProviderType: {
2
+ readonly MONDO: "mondo";
3
+ };
4
+ export type AnyProviderType = (typeof ProviderType)[keyof typeof ProviderType];
5
+ export declare const ProviderIdSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
6
+ export type ProviderId = typeof ProviderIdSchema.inferOut;
7
+ export declare const ProviderIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
8
+ id: string;
9
+ }, {}>;
10
+ export type ProviderIdProperty = typeof ProviderIdPropertySchema.inferOut;
11
+ export declare const ProviderTypeSchema: import("arktype/internal/methods/string.ts").StringType<"mondo", {}>;
12
+ export declare const ProviderPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
13
+ id: string;
14
+ type: "mondo";
15
+ user: string;
16
+ strategy: string;
17
+ updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
18
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
19
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
20
+ metadata?: ((In: {
21
+ [x: string]: string | number | boolean;
22
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
23
+ [x: string]: string | number | boolean;
24
+ } | undefined>) | undefined;
25
+ }, {}>;
26
+ export type ProviderPayload = typeof ProviderPayloadSchema.inferOut;
27
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/provider.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,qEAAc,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,sEAAsC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;MAOG,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type } from 'arktype';
2
+ import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../common/schema/dates.js';
3
+ import { MetadataPayloadPropertySchema } from '../../common/schema/metadata.js';
4
+ import { UserIdSchema } from '../../customer/users/schema.js';
5
+ import { StrategyIdSchema } from './strategy/base.js';
6
+ export const ProviderType = {
7
+ MONDO: 'mondo',
8
+ };
9
+ export const ProviderIdSchema = type.string;
10
+ export const ProviderIdPropertySchema = type({
11
+ id: ProviderIdSchema,
12
+ });
13
+ export const ProviderTypeSchema = type.enumerated(ProviderType.MONDO);
14
+ export const ProviderPayloadSchema = ProviderIdPropertySchema.and({
15
+ type: ProviderTypeSchema,
16
+ user: UserIdSchema,
17
+ strategy: StrategyIdSchema,
18
+ updatedAt: RequiredDatePayloadSchema,
19
+ 'deletedAt?': OptionalDatePayloadSchema,
20
+ 'deactivatedAt?': OptionalDatePayloadSchema,
21
+ }).and(MetadataPayloadPropertySchema);
@@ -0,0 +1,6 @@
1
+ export * from './factors.js';
2
+ export * from './provider.js';
3
+ export * from './session.js';
4
+ export * from './settings.js';
5
+ export * from './strategy/schema.js';
6
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/schema.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './factors.js';
2
+ export * from './provider.js';
3
+ export * from './session.js';
4
+ export * from './settings.js';
5
+ export * from './strategy/schema.js';
@@ -0,0 +1,59 @@
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/internal/methods/string.ts").StringType<string, {}>;
8
+ export type SessionId = typeof SessionIdSchema.inferOut;
9
+ export declare const SessionIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
10
+ id: string;
11
+ }, {}>;
12
+ export type SessionIdProperty = typeof SessionIdPropertySchema.inferOut;
13
+ export declare const SessionStatusSchema: import("arktype/internal/methods/string.ts").StringType<"initiated" | "authenticated" | "pending", {}>;
14
+ export declare const AuthenticationFactorSchema: import("arktype/internal/methods/object.ts").ObjectType<{
15
+ id: string;
16
+ type: "email" | "password" | "totp";
17
+ settings?: Record<string, unknown> | undefined;
18
+ state?: string | undefined;
19
+ }, {}>;
20
+ export type AuthenticationFactor = typeof AuthenticationFactorSchema.inferOut;
21
+ export declare const AuthenticationFactorHistorySchema: import("arktype/internal/methods/object.ts").ObjectType<(In: string[] | Set<string> | undefined) => import("arktype/internal/attributes.ts").Out<string[] | Set<string> | undefined>, {}>;
22
+ export type AuthenticationFactorHistory = typeof AuthenticationFactorHistorySchema.inferOut;
23
+ export declare const SessionPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
24
+ id: string;
25
+ status: "initiated" | "authenticated" | "pending";
26
+ expiresAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
27
+ createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
28
+ updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
29
+ user?: string | undefined;
30
+ userAgent?: string | undefined;
31
+ sourceIp?: string | undefined;
32
+ factors?: {
33
+ id: string;
34
+ type: "email" | "password" | "totp";
35
+ settings?: Record<string, unknown> | undefined;
36
+ state?: string | undefined;
37
+ }[] | undefined;
38
+ factorHistory?: ((In: string[] | Set<string> | undefined) => import("arktype/internal/attributes.ts").Out<string[] | Set<string> | undefined>) | undefined;
39
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
40
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
41
+ metadata?: ((In: {
42
+ [x: string]: string | number | boolean;
43
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
44
+ [x: string]: string | number | boolean;
45
+ } | undefined>) | undefined;
46
+ }, {}>;
47
+ export type SessionPayload = typeof SessionPayloadSchema.inferOut;
48
+ export declare const SessionAssociationReferenceSchema: import("arktype/internal/methods/object.ts").ObjectType<{
49
+ id: string;
50
+ status: "initiated" | "authenticated" | "pending";
51
+ expiresAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
52
+ createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
53
+ user?: string | undefined;
54
+ userAgent?: string | undefined;
55
+ sourceIp?: string | undefined;
56
+ model: "Session";
57
+ }, {}>;
58
+ export type SessionAssociationReference = typeof SessionAssociationReferenceSchema.inferOut;
59
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/session.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,qEAAc,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,wGAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;MAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,0BAA0B,CAAC,QAAQ,CAAC;AAM9E,eAAO,MAAM,iCAAiC,2LAK3C,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"}
@@ -0,0 +1,43 @@
1
+ import { type } from 'arktype';
2
+ import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../common/schema/dates.js';
3
+ import { MetadataPayloadPropertySchema } from '../../common/schema/metadata.js';
4
+ import { UserIdSchema } from '../../customer/users/schema.js';
5
+ import { StrategyIdSchema, StrategyTypeSchema } from './strategy/base.js';
6
+ export const SessionStatus = {
7
+ INITIATED: 'initiated', // Session was created, but no activity has been taken
8
+ AUTHENTICATED: 'authenticated', // Session is authenticated
9
+ PENDING: 'pending', // Session is in the process of authenticating
10
+ };
11
+ export const SessionIdSchema = type.string;
12
+ export const SessionIdPropertySchema = type({
13
+ id: SessionIdSchema,
14
+ });
15
+ export const SessionStatusSchema = type.enumerated(SessionStatus.INITIATED, SessionStatus.AUTHENTICATED, SessionStatus.PENDING);
16
+ export const AuthenticationFactorSchema = type({
17
+ id: StrategyIdSchema,
18
+ type: StrategyTypeSchema,
19
+ settings: type('Record<string, unknown> | undefined').optional(),
20
+ state: type('string | undefined').optional(),
21
+ });
22
+ const AuthenticationFactorHistoryArraySchema = StrategyIdSchema.array();
23
+ const AuthenticationFactorHistorySetSchema = type.instanceOf((Set));
24
+ export const AuthenticationFactorHistorySchema = type('undefined')
25
+ .or(AuthenticationFactorHistoryArraySchema)
26
+ .or(AuthenticationFactorHistorySetSchema)
27
+ .pipe((s) => (s instanceof Set ? Array.from(s) : s)?.length ? s : undefined);
28
+ export const SessionPayloadSchema = SessionIdPropertySchema.and({
29
+ status: SessionStatusSchema,
30
+ user: UserIdSchema.or('undefined').optional(),
31
+ userAgent: type('string | undefined').optional(),
32
+ sourceIp: type('string.ip.v4 | string.ip.v6 | undefined').optional(),
33
+ factors: AuthenticationFactorSchema.array().or('undefined').optional(),
34
+ factorHistory: AuthenticationFactorHistorySchema.optional(),
35
+ expiresAt: RequiredDatePayloadSchema,
36
+ createdAt: RequiredDatePayloadSchema,
37
+ updatedAt: RequiredDatePayloadSchema,
38
+ 'deletedAt?': OptionalDatePayloadSchema,
39
+ 'deactivatedAt?': OptionalDatePayloadSchema,
40
+ }).and(MetadataPayloadPropertySchema);
41
+ export const SessionAssociationReferenceSchema = SessionPayloadSchema.pick('id', 'status', 'user', 'userAgent', 'sourceIp', 'createdAt', 'expiresAt').and({
42
+ model: "'Session'",
43
+ });
@@ -0,0 +1,46 @@
1
+ export declare const SettingsPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
2
+ factors?: ((In: {
3
+ id: string;
4
+ nextFactors?: {
5
+ id: string;
6
+ nextFactors?: /*elided*/ any[] | null | undefined;
7
+ }[] | null | undefined;
8
+ }[] | null | undefined) => import("arktype/internal/attributes.ts").Out<{
9
+ id: string;
10
+ nextFactors?: {
11
+ id: string;
12
+ nextFactors?: /*elided*/ any[] | null | undefined;
13
+ }[] | null | undefined;
14
+ }[] | undefined>) | undefined;
15
+ updatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
16
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
17
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
18
+ metadata?: ((In: {
19
+ [x: string]: string | number | boolean;
20
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
21
+ [x: string]: string | number | boolean;
22
+ } | undefined>) | undefined;
23
+ }, {}>;
24
+ export type SettingsPayload = typeof SettingsPayloadSchema.inferOut;
25
+ export declare const UpsertSettingsPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
26
+ factors?: ((In: {
27
+ id: string;
28
+ nextFactors?: {
29
+ id: string;
30
+ nextFactors?: /*elided*/ any[] | null | undefined;
31
+ }[] | null | undefined;
32
+ }[] | null | undefined) => import("arktype/internal/attributes.ts").Out<{
33
+ id: string;
34
+ nextFactors?: {
35
+ id: string;
36
+ nextFactors?: /*elided*/ any[] | null | undefined;
37
+ }[] | null | undefined;
38
+ }[] | undefined>) | undefined;
39
+ metadata?: ((In: {
40
+ [x: string]: string | number | boolean;
41
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
42
+ [x: string]: string | number | boolean;
43
+ } | null>) | undefined;
44
+ }, {}>;
45
+ export type UpsertSettingsPayload = typeof UpsertSettingsPayloadSchema.inferOut;
46
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/authentication/schema/settings.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;MAMG,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC;AAEpE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;MAEG,CAAC;AAC5C,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type } from 'arktype';
2
+ import { OptionalDatePayloadSchema } from '../../common/schema/dates.js';
3
+ import { MetadataPayloadPropertySchema, UpsertMetadataPayloadPropertySchema, } from '../../common/schema/metadata.js';
4
+ import { AuthenticationFactorsSchema } from './factors.js';
5
+ export const SettingsPayloadSchema = type({
6
+ factors: AuthenticationFactorsSchema.optional(),
7
+ 'updatedAt?': OptionalDatePayloadSchema,
8
+ 'deletedAt?': OptionalDatePayloadSchema,
9
+ 'deactivatedAt?': OptionalDatePayloadSchema,
10
+ }).and(MetadataPayloadPropertySchema);
11
+ export const UpsertSettingsPayloadSchema = type({
12
+ factors: AuthenticationFactorsSchema.optional(),
13
+ }).and(UpsertMetadataPayloadPropertySchema);
@@ -0,0 +1,54 @@
1
+ export declare const StrategyType: {
2
+ readonly EMAIL: "email";
3
+ readonly PASSWORD: "password";
4
+ readonly TOTP: "totp";
5
+ };
6
+ export type AnyStrategyType = (typeof StrategyType)[keyof typeof StrategyType];
7
+ export declare const StrategyStatus: {
8
+ readonly ENABLED: "enabled";
9
+ readonly DISABLED: "disabled";
10
+ };
11
+ export type AnyStrategyStatus = (typeof StrategyStatus)[keyof typeof StrategyStatus];
12
+ export declare const StrategyIdSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
13
+ export type StrategyId = typeof StrategyIdSchema.inferOut;
14
+ export declare const StrategyIdPropertySchema: import("arktype/internal/methods/object.ts").ObjectType<{
15
+ id: string;
16
+ }, {}>;
17
+ export type StrategyIdProperty = typeof StrategyIdPropertySchema.inferOut;
18
+ export declare const StrategyStatusSchema: import("arktype/internal/methods/string.ts").StringType<"enabled" | "disabled", {}>;
19
+ export declare const StrategyTypeSchema: import("arktype/internal/methods/string.ts").StringType<"email" | "password" | "totp", {}>;
20
+ export declare const StrategyLabelSchema: import("arktype/internal/methods/string.ts").StringType<string, {}>;
21
+ export declare const BaseStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
22
+ id: string;
23
+ status: "enabled" | "disabled";
24
+ label: string;
25
+ createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
26
+ updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
27
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
28
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
29
+ metadata?: ((In: {
30
+ [x: string]: string | number | boolean;
31
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
32
+ [x: string]: string | number | boolean;
33
+ } | undefined>) | undefined;
34
+ }, {}>;
35
+ export declare const BaseInsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
36
+ label: string;
37
+ status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
38
+ id?: string | undefined;
39
+ metadata?: ((In: {
40
+ [x: string]: string | number | boolean;
41
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
42
+ [x: string]: string | number | boolean;
43
+ } | undefined>) | undefined;
44
+ }, {}>;
45
+ export declare const BaseUpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
46
+ label?: string | undefined;
47
+ status?: "enabled" | "disabled" | undefined;
48
+ metadata?: ((In: {
49
+ [x: string]: string | number | boolean;
50
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
51
+ [x: string]: string | number | boolean;
52
+ } | undefined>) | undefined;
53
+ }, {}>;
54
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/schema/strategy/base.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE/E,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,gBAAgB,qEAAc,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,oBAAoB,qFAGhC,CAAC;AACF,eAAO,MAAM,kBAAkB,4FAI9B,CAAC;AACF,eAAO,MAAM,mBAAmB,qEAAiB,CAAC;AAElD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;MAOD,CAAC;AAEtC,eAAO,MAAM,+BAA+B;;;;;;;;;MAIP,CAAC;AAEtC,eAAO,MAAM,+BAA+B;;;;;;;;MAGP,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type } from 'arktype';
2
+ import { OptionalDatePayloadSchema, RequiredDatePayloadSchema, } from '../../../common/index.js';
3
+ import { MetadataPayloadPropertySchema } from '../../../common/schema/metadata.js';
4
+ export const StrategyType = {
5
+ EMAIL: 'email',
6
+ PASSWORD: 'password',
7
+ TOTP: 'totp',
8
+ };
9
+ export const StrategyStatus = {
10
+ ENABLED: 'enabled',
11
+ DISABLED: 'disabled',
12
+ };
13
+ export const StrategyIdSchema = type.string;
14
+ export const StrategyIdPropertySchema = type({
15
+ id: StrategyIdSchema,
16
+ });
17
+ export const StrategyStatusSchema = type.enumerated(StrategyStatus.ENABLED, StrategyStatus.DISABLED);
18
+ export const StrategyTypeSchema = type.enumerated(StrategyType.EMAIL, StrategyType.PASSWORD, StrategyType.TOTP);
19
+ export const StrategyLabelSchema = type('string');
20
+ export const BaseStrategyPayloadSchema = StrategyIdPropertySchema.and({
21
+ status: StrategyStatusSchema,
22
+ label: StrategyLabelSchema,
23
+ createdAt: RequiredDatePayloadSchema,
24
+ updatedAt: RequiredDatePayloadSchema,
25
+ 'deletedAt?': OptionalDatePayloadSchema,
26
+ 'deactivatedAt?': OptionalDatePayloadSchema,
27
+ }).and(MetadataPayloadPropertySchema);
28
+ export const BaseInsertStrategyPayloadSchema = type({
29
+ id: StrategyIdSchema.optional(),
30
+ label: StrategyLabelSchema,
31
+ status: StrategyStatusSchema.default(StrategyStatus.ENABLED),
32
+ }).and(MetadataPayloadPropertySchema);
33
+ export const BaseUpdateStrategyPayloadSchema = type({
34
+ label: StrategyLabelSchema.optional(),
35
+ status: StrategyStatusSchema.optional(),
36
+ }).and(MetadataPayloadPropertySchema);
@@ -0,0 +1,158 @@
1
+ /**
2
+ * Union(s)
3
+ */
4
+ export declare const InsertStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
5
+ label: string;
6
+ status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
7
+ id?: string | undefined;
8
+ metadata?: ((In: {
9
+ [x: string]: string | number | boolean;
10
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
11
+ [x: string]: string | number | boolean;
12
+ } | undefined>) | undefined;
13
+ type: "email";
14
+ } | {
15
+ label: string;
16
+ status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
17
+ id?: string | undefined;
18
+ metadata?: ((In: {
19
+ [x: string]: string | number | boolean;
20
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
21
+ [x: string]: string | number | boolean;
22
+ } | undefined>) | undefined;
23
+ type: "password";
24
+ settings: {
25
+ passwordPolicy: {
26
+ minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
27
+ maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
28
+ minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
29
+ minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
30
+ minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
31
+ minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
32
+ };
33
+ };
34
+ } | {
35
+ label: string;
36
+ status: import("arktype/internal/attributes.ts").Default<"enabled" | "disabled", "enabled">;
37
+ id?: string | undefined;
38
+ metadata?: ((In: {
39
+ [x: string]: string | number | boolean;
40
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
41
+ [x: string]: string | number | boolean;
42
+ } | undefined>) | undefined;
43
+ type: "totp";
44
+ settings: {
45
+ digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
46
+ period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
47
+ algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
48
+ };
49
+ }, {}>;
50
+ export type InsertStrategyPayload = typeof InsertStrategyPayloadSchema.inferOut;
51
+ export declare const UpdateStrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
52
+ label?: string | undefined;
53
+ status?: "enabled" | "disabled" | undefined;
54
+ metadata?: ((In: {
55
+ [x: string]: string | number | boolean;
56
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
57
+ [x: string]: string | number | boolean;
58
+ } | undefined>) | undefined;
59
+ type: "email";
60
+ } | {
61
+ label?: string | undefined;
62
+ status?: "enabled" | "disabled" | undefined;
63
+ metadata?: ((In: {
64
+ [x: string]: string | number | boolean;
65
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
66
+ [x: string]: string | number | boolean;
67
+ } | undefined>) | undefined;
68
+ type: "password";
69
+ settings: {
70
+ passwordPolicy: {
71
+ minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
72
+ maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
73
+ minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
74
+ minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
75
+ minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
76
+ minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
77
+ };
78
+ };
79
+ } | {
80
+ label?: string | undefined;
81
+ status?: "enabled" | "disabled" | undefined;
82
+ metadata?: ((In: {
83
+ [x: string]: string | number | boolean;
84
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
85
+ [x: string]: string | number | boolean;
86
+ } | undefined>) | undefined;
87
+ type: "totp";
88
+ settings: {
89
+ digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
90
+ period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
91
+ algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
92
+ };
93
+ }, {}>;
94
+ export type UpdateStrategyPayload = typeof UpdateStrategyPayloadSchema.inferOut;
95
+ export declare const StrategyPayloadSchema: import("arktype/internal/methods/object.ts").ObjectType<{
96
+ id: string;
97
+ status: "enabled" | "disabled";
98
+ label: string;
99
+ createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
100
+ updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
101
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
102
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
103
+ metadata?: ((In: {
104
+ [x: string]: string | number | boolean;
105
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
106
+ [x: string]: string | number | boolean;
107
+ } | undefined>) | undefined;
108
+ type: "email";
109
+ } | {
110
+ id: string;
111
+ status: "enabled" | "disabled";
112
+ label: string;
113
+ createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
114
+ updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
115
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
116
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
117
+ metadata?: ((In: {
118
+ [x: string]: string | number | boolean;
119
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
120
+ [x: string]: string | number | boolean;
121
+ } | undefined>) | undefined;
122
+ type: "password";
123
+ settings: {
124
+ passwordPolicy: {
125
+ minimumLength: import("arktype/internal/attributes.ts").Default<number, 8>;
126
+ maximumLength: import("arktype/internal/attributes.ts").Default<number, 36>;
127
+ minimumCapital: import("arktype/internal/attributes.ts").Default<number, 1>;
128
+ minimumLower: import("arktype/internal/attributes.ts").Default<number, 1>;
129
+ minimumNumber: import("arktype/internal/attributes.ts").Default<number, 1>;
130
+ minimumSpecial: import("arktype/internal/attributes.ts").Default<number, 1>;
131
+ };
132
+ };
133
+ } | {
134
+ id: string;
135
+ status: "enabled" | "disabled";
136
+ label: string;
137
+ createdAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
138
+ updatedAt: (In: string | Date) => import("arktype/internal/attributes.ts").Out<string>;
139
+ deletedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
140
+ deactivatedAt?: ((In: string | Date | undefined) => import("arktype/internal/attributes.ts").Out<string | undefined>) | undefined;
141
+ metadata?: ((In: {
142
+ [x: string]: string | number | boolean;
143
+ } | Map<string, string | number | boolean> | null | undefined) => import("arktype/internal/attributes.ts").Out<{
144
+ [x: string]: string | number | boolean;
145
+ } | undefined>) | undefined;
146
+ type: "totp";
147
+ settings: {
148
+ digits: import("arktype/internal/attributes.ts").Default<6 | 7 | 8, 6>;
149
+ period: import("arktype/internal/attributes.ts").Default<15 | 30 | 60, 30>;
150
+ algorithm: import("arktype/internal/attributes.ts").Default<string, string>;
151
+ };
152
+ }, {}>;
153
+ export type StrategyPayload = typeof StrategyPayloadSchema.inferOut;
154
+ export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, type AnyStrategyStatus, type AnyStrategyType, type StrategyId, type StrategyIdProperty, } from './base.js';
155
+ export * from './types/email.js';
156
+ export * from './types/password.js';
157
+ export * from './types/totp.js';
158
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/schema/strategy/schema.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGrC,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGrC,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,QAAQ,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEjC,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,QAAQ,CAAC;AAEpE,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { EmailStrategyPayloadSchema, InsertEmailStrategyPayloadSchema, UpdateEmailStrategyPayloadSchema, } from './types/email.js';
2
+ import { InsertPasswordStrategyPayloadSchema, PasswordStrategyPayloadSchema, UpdatePasswordStrategyPayloadSchema, } from './types/password.js';
3
+ import { InsertTOTPStrategyPayloadSchema, TOTPStrategyPayloadSchema, UpdateTOTPStrategyPayloadSchema, } from './types/totp.js';
4
+ /**
5
+ * Union(s)
6
+ */
7
+ export const InsertStrategyPayloadSchema = InsertPasswordStrategyPayloadSchema.or(InsertEmailStrategyPayloadSchema).or(InsertTOTPStrategyPayloadSchema);
8
+ export const UpdateStrategyPayloadSchema = UpdatePasswordStrategyPayloadSchema.or(UpdateEmailStrategyPayloadSchema).or(UpdateTOTPStrategyPayloadSchema);
9
+ export const StrategyPayloadSchema = PasswordStrategyPayloadSchema.or(EmailStrategyPayloadSchema.or(TOTPStrategyPayloadSchema));
10
+ export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, } from './base.js';
11
+ export * from './types/email.js';
12
+ export * from './types/password.js';
13
+ export * from './types/totp.js';