external-account.ts 572 B

123456789101112131415161718192021
  1. import type { Ref } from './common';
  2. import type { HasObjectId } from './has-object-id';
  3. import type { IUser } from './user';
  4. export const IExternalAuthProviderType = {
  5. ldap: 'ldap',
  6. saml: 'saml',
  7. oicd: 'oidc',
  8. google: 'google',
  9. github: 'github',
  10. } as const;
  11. export type IExternalAuthProviderType = typeof IExternalAuthProviderType[keyof typeof IExternalAuthProviderType]
  12. export type IExternalAccount = {
  13. providerType: IExternalAuthProviderType,
  14. accountId: string,
  15. user: Ref<IUser>,
  16. }
  17. export type IExternalAccountHasId = IExternalAccount & HasObjectId