1 | import * as t from 'io-ts';
|
2 | import { Context } from '..';
|
3 | import { DatastoreProvider } from '../datastore/datastore.provider';
|
4 | import { Repository } from '../datastore/repository';
|
5 | import { OneOrMany } from '../util/types';
|
6 | declare const passwordReset: t.TypeC<{
|
7 | id: t.StringC;
|
8 | accountId: t.StringC;
|
9 | createdAt: t.Type<Date, Date, unknown>;
|
10 | }>;
|
11 | export declare type PasswordReset = t.TypeOf<typeof passwordReset>;
|
12 | export declare class PasswordResetRepository extends Repository<PasswordReset> {
|
13 | constructor(datastoreProvider: DatastoreProvider);
|
14 | }
|
15 | declare const userInvite: t.TypeC<{
|
16 | id: t.StringC;
|
17 | email: t.StringC;
|
18 | createdAt: t.Type<Date, Date, unknown>;
|
19 | userId: t.StringC;
|
20 | roles: t.ArrayC<t.StringC>;
|
21 | }>;
|
22 | export declare type UserInvite = t.TypeOf<typeof userInvite>;
|
23 | export declare class UserInviteRepository extends Repository<UserInvite> {
|
24 | constructor(datastoreProvider: DatastoreProvider);
|
25 | }
|
26 | declare const externalAuthTypeEnum: t.UnionC<[t.LiteralC<"google">, t.LiteralC<"saml">, t.LiteralC<"auth0">, t.LiteralC<"oidc">]>;
|
27 | declare const loginCredentials: t.Type<{
|
28 | id: string;
|
29 | userId: string;
|
30 | password: string;
|
31 | type: "password";
|
32 | } | {
|
33 | id: string;
|
34 | userId: string;
|
35 | type: "google" | "saml" | "auth0" | "oidc";
|
36 | }, {
|
37 | id: string;
|
38 | userId: string;
|
39 | password: string;
|
40 | type: "password";
|
41 | } | {
|
42 | id: string;
|
43 | userId: string;
|
44 | type: "google" | "saml" | "auth0" | "oidc";
|
45 | }, unknown>;
|
46 | export declare type LoginCredentials = t.TypeOf<typeof loginCredentials>;
|
47 | export declare type ExternalAuthType = t.TypeOf<typeof externalAuthTypeEnum>;
|
48 | export declare class CredentialRepository extends Repository<LoginCredentials> {
|
49 | constructor(datastore: DatastoreProvider);
|
50 | protected beforePersist(context: Context, entities: OneOrMany<LoginCredentials>): OneOrMany<LoginCredentials>;
|
51 | }
|
52 | export {};
|