@logto/schemas 1.0.0-beta.11
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.
- package/LICENSE +373 -0
- package/alterations/1.0.0_beta.10-1-logto-config.ts +20 -0
- package/alterations/1.0.0_beta.10-1663923211-machine-to-machine-app.ts +31 -0
- package/alterations/1.0.0_beta.10-1664265197-custom-phrases.ts +22 -0
- package/alterations/1.0.0_beta.11-1664347703-rename-language-key-to-tag.ts +14 -0
- package/alterations/1.0.0_beta.11-1664356000-add-created-at-column-to-users.ts +20 -0
- package/alterations/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.ts +25 -0
- package/alterations/README.md +42 -0
- package/lib/api/error.d.ts +12 -0
- package/lib/api/error.js +2 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +17 -0
- package/lib/db-entries/application.d.ts +25 -0
- package/lib/db-entries/application.js +57 -0
- package/lib/db-entries/connector.d.ts +14 -0
- package/lib/db-entries/connector.js +31 -0
- package/lib/db-entries/custom-phrase.d.ts +10 -0
- package/lib/db-entries/custom-phrase.js +25 -0
- package/lib/db-entries/custom-types.d.ts +19 -0
- package/lib/db-entries/custom-types.js +27 -0
- package/lib/db-entries/index.d.ts +13 -0
- package/lib/db-entries/index.js +30 -0
- package/lib/db-entries/log.d.ts +14 -0
- package/lib/db-entries/log.js +31 -0
- package/lib/db-entries/logto-config.d.ts +10 -0
- package/lib/db-entries/logto-config.js +25 -0
- package/lib/db-entries/oidc-model-instance.d.ts +16 -0
- package/lib/db-entries/oidc-model-instance.js +34 -0
- package/lib/db-entries/passcode.d.ts +25 -0
- package/lib/db-entries/passcode.js +56 -0
- package/lib/db-entries/resource.d.ts +14 -0
- package/lib/db-entries/resource.js +30 -0
- package/lib/db-entries/role.d.ts +10 -0
- package/lib/db-entries/role.js +24 -0
- package/lib/db-entries/setting.d.ts +10 -0
- package/lib/db-entries/setting.js +25 -0
- package/lib/db-entries/sign-in-experience.d.ts +23 -0
- package/lib/db-entries/sign-in-experience.js +53 -0
- package/lib/db-entries/user.d.ts +35 -0
- package/lib/db-entries/user.js +77 -0
- package/lib/foundations/index.d.ts +2 -0
- package/lib/foundations/index.js +18 -0
- package/lib/foundations/jsonb-types.d.ts +221 -0
- package/lib/foundations/jsonb-types.js +135 -0
- package/lib/foundations/schemas.d.ts +24 -0
- package/lib/foundations/schemas.js +2 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +34 -0
- package/lib/seeds/application.d.ts +9 -0
- package/lib/seeds/application.js +20 -0
- package/lib/seeds/index.d.ts +5 -0
- package/lib/seeds/index.js +21 -0
- package/lib/seeds/resource.d.ts +2 -0
- package/lib/seeds/resource.js +13 -0
- package/lib/seeds/roles.d.ts +5 -0
- package/lib/seeds/roles.js +11 -0
- package/lib/seeds/setting.d.ts +3 -0
- package/lib/seeds/setting.js +19 -0
- package/lib/seeds/sign-in-experience.d.ts +3 -0
- package/lib/seeds/sign-in-experience.js +47 -0
- package/lib/types/alteration.d.ts +5 -0
- package/lib/types/alteration.js +2 -0
- package/lib/types/connector.d.ts +5 -0
- package/lib/types/connector.js +6 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.js +21 -0
- package/lib/types/log.d.ts +577 -0
- package/lib/types/log.js +144 -0
- package/lib/types/logto-config.d.ts +32 -0
- package/lib/types/logto-config.js +40 -0
- package/lib/types/oidc-config.d.ts +12 -0
- package/lib/types/oidc-config.js +9 -0
- package/lib/types/user.d.ts +6 -0
- package/lib/types/user.js +21 -0
- package/package.json +74 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArbitraryObject, GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateConnector = {
|
|
3
|
+
id: string;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
config?: ArbitraryObject;
|
|
6
|
+
createdAt?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type Connector = {
|
|
9
|
+
id: string;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
config: ArbitraryObject;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const Connectors: GeneratedSchema<CreateConnector>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Connectors = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string().max(128),
|
|
9
|
+
enabled: zod_1.z.boolean().optional(),
|
|
10
|
+
config: foundations_1.arbitraryObjectGuard.optional(),
|
|
11
|
+
createdAt: zod_1.z.number().optional(),
|
|
12
|
+
});
|
|
13
|
+
const guard = zod_1.z.object({
|
|
14
|
+
id: zod_1.z.string().max(128),
|
|
15
|
+
enabled: zod_1.z.boolean(),
|
|
16
|
+
config: foundations_1.arbitraryObjectGuard,
|
|
17
|
+
createdAt: zod_1.z.number(),
|
|
18
|
+
});
|
|
19
|
+
exports.Connectors = Object.freeze({
|
|
20
|
+
table: 'connectors',
|
|
21
|
+
tableSingular: 'connector',
|
|
22
|
+
fields: {
|
|
23
|
+
id: 'id',
|
|
24
|
+
enabled: 'enabled',
|
|
25
|
+
config: 'config',
|
|
26
|
+
createdAt: 'created_at',
|
|
27
|
+
},
|
|
28
|
+
fieldKeys: ['id', 'enabled', 'config', 'createdAt'],
|
|
29
|
+
createGuard,
|
|
30
|
+
guard,
|
|
31
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Translation, GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateCustomPhrase = {
|
|
3
|
+
languageTag: string;
|
|
4
|
+
translation: Translation;
|
|
5
|
+
};
|
|
6
|
+
export declare type CustomPhrase = {
|
|
7
|
+
languageTag: string;
|
|
8
|
+
translation: Translation;
|
|
9
|
+
};
|
|
10
|
+
export declare const CustomPhrases: GeneratedSchema<CreateCustomPhrase>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CustomPhrases = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
languageTag: zod_1.z.string().max(16),
|
|
9
|
+
translation: foundations_1.translationGuard,
|
|
10
|
+
});
|
|
11
|
+
const guard = zod_1.z.object({
|
|
12
|
+
languageTag: zod_1.z.string().max(16),
|
|
13
|
+
translation: foundations_1.translationGuard,
|
|
14
|
+
});
|
|
15
|
+
exports.CustomPhrases = Object.freeze({
|
|
16
|
+
table: 'custom_phrases',
|
|
17
|
+
tableSingular: 'custom_phrase',
|
|
18
|
+
fields: {
|
|
19
|
+
languageTag: 'language_tag',
|
|
20
|
+
translation: 'translation',
|
|
21
|
+
},
|
|
22
|
+
fieldKeys: ['languageTag', 'translation'],
|
|
23
|
+
createGuard,
|
|
24
|
+
guard,
|
|
25
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum ApplicationType {
|
|
2
|
+
Native = "Native",
|
|
3
|
+
SPA = "SPA",
|
|
4
|
+
Traditional = "Traditional",
|
|
5
|
+
MachineToMachine = "MachineToMachine"
|
|
6
|
+
}
|
|
7
|
+
export declare enum PasscodeType {
|
|
8
|
+
SignIn = "SignIn",
|
|
9
|
+
Register = "Register",
|
|
10
|
+
ForgotPassword = "ForgotPassword"
|
|
11
|
+
}
|
|
12
|
+
export declare enum SignInMode {
|
|
13
|
+
SignIn = "SignIn",
|
|
14
|
+
Register = "Register",
|
|
15
|
+
SignInAndRegister = "SignInAndRegister"
|
|
16
|
+
}
|
|
17
|
+
export declare enum UsersPasswordEncryptionMethod {
|
|
18
|
+
Argon2i = "Argon2i"
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UsersPasswordEncryptionMethod = exports.SignInMode = exports.PasscodeType = exports.ApplicationType = void 0;
|
|
5
|
+
var ApplicationType;
|
|
6
|
+
(function (ApplicationType) {
|
|
7
|
+
ApplicationType["Native"] = "Native";
|
|
8
|
+
ApplicationType["SPA"] = "SPA";
|
|
9
|
+
ApplicationType["Traditional"] = "Traditional";
|
|
10
|
+
ApplicationType["MachineToMachine"] = "MachineToMachine";
|
|
11
|
+
})(ApplicationType = exports.ApplicationType || (exports.ApplicationType = {}));
|
|
12
|
+
var PasscodeType;
|
|
13
|
+
(function (PasscodeType) {
|
|
14
|
+
PasscodeType["SignIn"] = "SignIn";
|
|
15
|
+
PasscodeType["Register"] = "Register";
|
|
16
|
+
PasscodeType["ForgotPassword"] = "ForgotPassword";
|
|
17
|
+
})(PasscodeType = exports.PasscodeType || (exports.PasscodeType = {}));
|
|
18
|
+
var SignInMode;
|
|
19
|
+
(function (SignInMode) {
|
|
20
|
+
SignInMode["SignIn"] = "SignIn";
|
|
21
|
+
SignInMode["Register"] = "Register";
|
|
22
|
+
SignInMode["SignInAndRegister"] = "SignInAndRegister";
|
|
23
|
+
})(SignInMode = exports.SignInMode || (exports.SignInMode = {}));
|
|
24
|
+
var UsersPasswordEncryptionMethod;
|
|
25
|
+
(function (UsersPasswordEncryptionMethod) {
|
|
26
|
+
UsersPasswordEncryptionMethod["Argon2i"] = "Argon2i";
|
|
27
|
+
})(UsersPasswordEncryptionMethod = exports.UsersPasswordEncryptionMethod || (exports.UsersPasswordEncryptionMethod = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './custom-types';
|
|
2
|
+
export * from './application';
|
|
3
|
+
export * from './connector';
|
|
4
|
+
export * from './custom-phrase';
|
|
5
|
+
export * from './log';
|
|
6
|
+
export * from './logto-config';
|
|
7
|
+
export * from './oidc-model-instance';
|
|
8
|
+
export * from './passcode';
|
|
9
|
+
export * from './resource';
|
|
10
|
+
export * from './role';
|
|
11
|
+
export * from './setting';
|
|
12
|
+
export * from './sign-in-experience';
|
|
13
|
+
export * from './user';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./custom-types"), exports);
|
|
19
|
+
__exportStar(require("./application"), exports);
|
|
20
|
+
__exportStar(require("./connector"), exports);
|
|
21
|
+
__exportStar(require("./custom-phrase"), exports);
|
|
22
|
+
__exportStar(require("./log"), exports);
|
|
23
|
+
__exportStar(require("./logto-config"), exports);
|
|
24
|
+
__exportStar(require("./oidc-model-instance"), exports);
|
|
25
|
+
__exportStar(require("./passcode"), exports);
|
|
26
|
+
__exportStar(require("./resource"), exports);
|
|
27
|
+
__exportStar(require("./role"), exports);
|
|
28
|
+
__exportStar(require("./setting"), exports);
|
|
29
|
+
__exportStar(require("./sign-in-experience"), exports);
|
|
30
|
+
__exportStar(require("./user"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArbitraryObject, GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateLog = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
payload?: ArbitraryObject;
|
|
6
|
+
createdAt?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type Log = {
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
payload: ArbitraryObject;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const Logs: GeneratedSchema<CreateLog>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Logs = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string().max(21),
|
|
9
|
+
type: zod_1.z.string().max(64),
|
|
10
|
+
payload: foundations_1.arbitraryObjectGuard.optional(),
|
|
11
|
+
createdAt: zod_1.z.number().optional(),
|
|
12
|
+
});
|
|
13
|
+
const guard = zod_1.z.object({
|
|
14
|
+
id: zod_1.z.string().max(21),
|
|
15
|
+
type: zod_1.z.string().max(64),
|
|
16
|
+
payload: foundations_1.arbitraryObjectGuard,
|
|
17
|
+
createdAt: zod_1.z.number(),
|
|
18
|
+
});
|
|
19
|
+
exports.Logs = Object.freeze({
|
|
20
|
+
table: 'logs',
|
|
21
|
+
tableSingular: 'log',
|
|
22
|
+
fields: {
|
|
23
|
+
id: 'id',
|
|
24
|
+
type: 'type',
|
|
25
|
+
payload: 'payload',
|
|
26
|
+
createdAt: 'created_at',
|
|
27
|
+
},
|
|
28
|
+
fieldKeys: ['id', 'type', 'payload', 'createdAt'],
|
|
29
|
+
createGuard,
|
|
30
|
+
guard,
|
|
31
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ArbitraryObject, GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateLogtoConfig = {
|
|
3
|
+
key: string;
|
|
4
|
+
value?: ArbitraryObject;
|
|
5
|
+
};
|
|
6
|
+
export declare type LogtoConfig = {
|
|
7
|
+
key: string;
|
|
8
|
+
value: ArbitraryObject;
|
|
9
|
+
};
|
|
10
|
+
export declare const LogtoConfigs: GeneratedSchema<CreateLogtoConfig>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.LogtoConfigs = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
key: zod_1.z.string().max(256),
|
|
9
|
+
value: foundations_1.arbitraryObjectGuard.optional(),
|
|
10
|
+
});
|
|
11
|
+
const guard = zod_1.z.object({
|
|
12
|
+
key: zod_1.z.string().max(256),
|
|
13
|
+
value: foundations_1.arbitraryObjectGuard,
|
|
14
|
+
});
|
|
15
|
+
exports.LogtoConfigs = Object.freeze({
|
|
16
|
+
table: '_logto_configs',
|
|
17
|
+
tableSingular: '_logto_config',
|
|
18
|
+
fields: {
|
|
19
|
+
key: 'key',
|
|
20
|
+
value: 'value',
|
|
21
|
+
},
|
|
22
|
+
fieldKeys: ['key', 'value'],
|
|
23
|
+
createGuard,
|
|
24
|
+
guard,
|
|
25
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OidcModelInstancePayload, GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateOidcModelInstance = {
|
|
3
|
+
modelName: string;
|
|
4
|
+
id: string;
|
|
5
|
+
payload: OidcModelInstancePayload;
|
|
6
|
+
expiresAt: number;
|
|
7
|
+
consumedAt?: number | null;
|
|
8
|
+
};
|
|
9
|
+
export declare type OidcModelInstance = {
|
|
10
|
+
modelName: string;
|
|
11
|
+
id: string;
|
|
12
|
+
payload: OidcModelInstancePayload;
|
|
13
|
+
expiresAt: number;
|
|
14
|
+
consumedAt: number | null;
|
|
15
|
+
};
|
|
16
|
+
export declare const OidcModelInstances: GeneratedSchema<CreateOidcModelInstance>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OidcModelInstances = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
modelName: zod_1.z.string().max(64),
|
|
9
|
+
id: zod_1.z.string().max(128),
|
|
10
|
+
payload: foundations_1.oidcModelInstancePayloadGuard,
|
|
11
|
+
expiresAt: zod_1.z.number(),
|
|
12
|
+
consumedAt: zod_1.z.number().nullable().optional(),
|
|
13
|
+
});
|
|
14
|
+
const guard = zod_1.z.object({
|
|
15
|
+
modelName: zod_1.z.string().max(64),
|
|
16
|
+
id: zod_1.z.string().max(128),
|
|
17
|
+
payload: foundations_1.oidcModelInstancePayloadGuard,
|
|
18
|
+
expiresAt: zod_1.z.number(),
|
|
19
|
+
consumedAt: zod_1.z.number().nullable(),
|
|
20
|
+
});
|
|
21
|
+
exports.OidcModelInstances = Object.freeze({
|
|
22
|
+
table: 'oidc_model_instances',
|
|
23
|
+
tableSingular: 'oidc_model_instance',
|
|
24
|
+
fields: {
|
|
25
|
+
modelName: 'model_name',
|
|
26
|
+
id: 'id',
|
|
27
|
+
payload: 'payload',
|
|
28
|
+
expiresAt: 'expires_at',
|
|
29
|
+
consumedAt: 'consumed_at',
|
|
30
|
+
},
|
|
31
|
+
fieldKeys: ['modelName', 'id', 'payload', 'expiresAt', 'consumedAt'],
|
|
32
|
+
createGuard,
|
|
33
|
+
guard,
|
|
34
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GeneratedSchema } from '../foundations';
|
|
2
|
+
import { PasscodeType } from './custom-types';
|
|
3
|
+
export declare type CreatePasscode = {
|
|
4
|
+
id: string;
|
|
5
|
+
interactionJti: string;
|
|
6
|
+
phone?: string | null;
|
|
7
|
+
email?: string | null;
|
|
8
|
+
type: PasscodeType;
|
|
9
|
+
code: string;
|
|
10
|
+
consumed?: boolean;
|
|
11
|
+
tryCount?: number;
|
|
12
|
+
createdAt?: number;
|
|
13
|
+
};
|
|
14
|
+
export declare type Passcode = {
|
|
15
|
+
id: string;
|
|
16
|
+
interactionJti: string;
|
|
17
|
+
phone: string | null;
|
|
18
|
+
email: string | null;
|
|
19
|
+
type: PasscodeType;
|
|
20
|
+
code: string;
|
|
21
|
+
consumed: boolean;
|
|
22
|
+
tryCount: number;
|
|
23
|
+
createdAt: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const Passcodes: GeneratedSchema<CreatePasscode>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Passcodes = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const custom_types_1 = require("./custom-types");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string().max(21),
|
|
9
|
+
interactionJti: zod_1.z.string().max(128),
|
|
10
|
+
phone: zod_1.z.string().max(32).nullable().optional(),
|
|
11
|
+
email: zod_1.z.string().max(128).nullable().optional(),
|
|
12
|
+
type: zod_1.z.nativeEnum(custom_types_1.PasscodeType),
|
|
13
|
+
code: zod_1.z.string().max(6),
|
|
14
|
+
consumed: zod_1.z.boolean().optional(),
|
|
15
|
+
tryCount: zod_1.z.number().optional(),
|
|
16
|
+
createdAt: zod_1.z.number().optional(),
|
|
17
|
+
});
|
|
18
|
+
const guard = zod_1.z.object({
|
|
19
|
+
id: zod_1.z.string().max(21),
|
|
20
|
+
interactionJti: zod_1.z.string().max(128),
|
|
21
|
+
phone: zod_1.z.string().max(32).nullable(),
|
|
22
|
+
email: zod_1.z.string().max(128).nullable(),
|
|
23
|
+
type: zod_1.z.nativeEnum(custom_types_1.PasscodeType),
|
|
24
|
+
code: zod_1.z.string().max(6),
|
|
25
|
+
consumed: zod_1.z.boolean(),
|
|
26
|
+
tryCount: zod_1.z.number(),
|
|
27
|
+
createdAt: zod_1.z.number(),
|
|
28
|
+
});
|
|
29
|
+
exports.Passcodes = Object.freeze({
|
|
30
|
+
table: 'passcodes',
|
|
31
|
+
tableSingular: 'passcode',
|
|
32
|
+
fields: {
|
|
33
|
+
id: 'id',
|
|
34
|
+
interactionJti: 'interaction_jti',
|
|
35
|
+
phone: 'phone',
|
|
36
|
+
email: 'email',
|
|
37
|
+
type: 'type',
|
|
38
|
+
code: 'code',
|
|
39
|
+
consumed: 'consumed',
|
|
40
|
+
tryCount: 'try_count',
|
|
41
|
+
createdAt: 'created_at',
|
|
42
|
+
},
|
|
43
|
+
fieldKeys: [
|
|
44
|
+
'id',
|
|
45
|
+
'interactionJti',
|
|
46
|
+
'phone',
|
|
47
|
+
'email',
|
|
48
|
+
'type',
|
|
49
|
+
'code',
|
|
50
|
+
'consumed',
|
|
51
|
+
'tryCount',
|
|
52
|
+
'createdAt',
|
|
53
|
+
],
|
|
54
|
+
createGuard,
|
|
55
|
+
guard,
|
|
56
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateResource = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
indicator: string;
|
|
6
|
+
accessTokenTtl?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type Resource = {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
indicator: string;
|
|
12
|
+
accessTokenTtl: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const Resources: GeneratedSchema<CreateResource>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Resources = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const createGuard = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().max(21),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
indicator: zod_1.z.string(),
|
|
10
|
+
accessTokenTtl: zod_1.z.number().optional(),
|
|
11
|
+
});
|
|
12
|
+
const guard = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.string().max(21),
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
indicator: zod_1.z.string(),
|
|
16
|
+
accessTokenTtl: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
exports.Resources = Object.freeze({
|
|
19
|
+
table: 'resources',
|
|
20
|
+
tableSingular: 'resource',
|
|
21
|
+
fields: {
|
|
22
|
+
id: 'id',
|
|
23
|
+
name: 'name',
|
|
24
|
+
indicator: 'indicator',
|
|
25
|
+
accessTokenTtl: 'access_token_ttl',
|
|
26
|
+
},
|
|
27
|
+
fieldKeys: ['id', 'name', 'indicator', 'accessTokenTtl'],
|
|
28
|
+
createGuard,
|
|
29
|
+
guard,
|
|
30
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateRole = {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type Role = {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const Roles: GeneratedSchema<CreateRole>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Roles = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const createGuard = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().max(128),
|
|
8
|
+
description: zod_1.z.string().max(128),
|
|
9
|
+
});
|
|
10
|
+
const guard = zod_1.z.object({
|
|
11
|
+
name: zod_1.z.string().max(128),
|
|
12
|
+
description: zod_1.z.string().max(128),
|
|
13
|
+
});
|
|
14
|
+
exports.Roles = Object.freeze({
|
|
15
|
+
table: 'roles',
|
|
16
|
+
tableSingular: 'role',
|
|
17
|
+
fields: {
|
|
18
|
+
name: 'name',
|
|
19
|
+
description: 'description',
|
|
20
|
+
},
|
|
21
|
+
fieldKeys: ['name', 'description'],
|
|
22
|
+
createGuard,
|
|
23
|
+
guard,
|
|
24
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AdminConsoleConfig, GeneratedSchema } from '../foundations';
|
|
2
|
+
export declare type CreateSetting = {
|
|
3
|
+
id: string;
|
|
4
|
+
adminConsole: AdminConsoleConfig;
|
|
5
|
+
};
|
|
6
|
+
export declare type Setting = {
|
|
7
|
+
id: string;
|
|
8
|
+
adminConsole: AdminConsoleConfig;
|
|
9
|
+
};
|
|
10
|
+
export declare const Settings: GeneratedSchema<CreateSetting>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Settings = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const createGuard = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string().max(21),
|
|
9
|
+
adminConsole: foundations_1.adminConsoleConfigGuard,
|
|
10
|
+
});
|
|
11
|
+
const guard = zod_1.z.object({
|
|
12
|
+
id: zod_1.z.string().max(21),
|
|
13
|
+
adminConsole: foundations_1.adminConsoleConfigGuard,
|
|
14
|
+
});
|
|
15
|
+
exports.Settings = Object.freeze({
|
|
16
|
+
table: 'settings',
|
|
17
|
+
tableSingular: 'setting',
|
|
18
|
+
fields: {
|
|
19
|
+
id: 'id',
|
|
20
|
+
adminConsole: 'admin_console',
|
|
21
|
+
},
|
|
22
|
+
fieldKeys: ['id', 'adminConsole'],
|
|
23
|
+
createGuard,
|
|
24
|
+
guard,
|
|
25
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Color, Branding, LanguageInfo, TermsOfUse, SignInMethods, ConnectorTargets, GeneratedSchema } from '../foundations';
|
|
2
|
+
import { SignInMode } from './custom-types';
|
|
3
|
+
export declare type CreateSignInExperience = {
|
|
4
|
+
id: string;
|
|
5
|
+
color: Color;
|
|
6
|
+
branding: Branding;
|
|
7
|
+
languageInfo: LanguageInfo;
|
|
8
|
+
termsOfUse: TermsOfUse;
|
|
9
|
+
signInMethods: SignInMethods;
|
|
10
|
+
socialSignInConnectorTargets?: ConnectorTargets;
|
|
11
|
+
signInMode?: SignInMode;
|
|
12
|
+
};
|
|
13
|
+
export declare type SignInExperience = {
|
|
14
|
+
id: string;
|
|
15
|
+
color: Color;
|
|
16
|
+
branding: Branding;
|
|
17
|
+
languageInfo: LanguageInfo;
|
|
18
|
+
termsOfUse: TermsOfUse;
|
|
19
|
+
signInMethods: SignInMethods;
|
|
20
|
+
socialSignInConnectorTargets: ConnectorTargets;
|
|
21
|
+
signInMode: SignInMode;
|
|
22
|
+
};
|
|
23
|
+
export declare const SignInExperiences: GeneratedSchema<CreateSignInExperience>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SignInExperiences = void 0;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const foundations_1 = require("../foundations");
|
|
7
|
+
const custom_types_1 = require("./custom-types");
|
|
8
|
+
const createGuard = zod_1.z.object({
|
|
9
|
+
id: zod_1.z.string().max(21),
|
|
10
|
+
color: foundations_1.colorGuard,
|
|
11
|
+
branding: foundations_1.brandingGuard,
|
|
12
|
+
languageInfo: foundations_1.languageInfoGuard,
|
|
13
|
+
termsOfUse: foundations_1.termsOfUseGuard,
|
|
14
|
+
signInMethods: foundations_1.signInMethodsGuard,
|
|
15
|
+
socialSignInConnectorTargets: foundations_1.connectorTargetsGuard.optional(),
|
|
16
|
+
signInMode: zod_1.z.nativeEnum(custom_types_1.SignInMode).optional(),
|
|
17
|
+
});
|
|
18
|
+
const guard = zod_1.z.object({
|
|
19
|
+
id: zod_1.z.string().max(21),
|
|
20
|
+
color: foundations_1.colorGuard,
|
|
21
|
+
branding: foundations_1.brandingGuard,
|
|
22
|
+
languageInfo: foundations_1.languageInfoGuard,
|
|
23
|
+
termsOfUse: foundations_1.termsOfUseGuard,
|
|
24
|
+
signInMethods: foundations_1.signInMethodsGuard,
|
|
25
|
+
socialSignInConnectorTargets: foundations_1.connectorTargetsGuard,
|
|
26
|
+
signInMode: zod_1.z.nativeEnum(custom_types_1.SignInMode),
|
|
27
|
+
});
|
|
28
|
+
exports.SignInExperiences = Object.freeze({
|
|
29
|
+
table: 'sign_in_experiences',
|
|
30
|
+
tableSingular: 'sign_in_experience',
|
|
31
|
+
fields: {
|
|
32
|
+
id: 'id',
|
|
33
|
+
color: 'color',
|
|
34
|
+
branding: 'branding',
|
|
35
|
+
languageInfo: 'language_info',
|
|
36
|
+
termsOfUse: 'terms_of_use',
|
|
37
|
+
signInMethods: 'sign_in_methods',
|
|
38
|
+
socialSignInConnectorTargets: 'social_sign_in_connector_targets',
|
|
39
|
+
signInMode: 'sign_in_mode',
|
|
40
|
+
},
|
|
41
|
+
fieldKeys: [
|
|
42
|
+
'id',
|
|
43
|
+
'color',
|
|
44
|
+
'branding',
|
|
45
|
+
'languageInfo',
|
|
46
|
+
'termsOfUse',
|
|
47
|
+
'signInMethods',
|
|
48
|
+
'socialSignInConnectorTargets',
|
|
49
|
+
'signInMode',
|
|
50
|
+
],
|
|
51
|
+
createGuard,
|
|
52
|
+
guard,
|
|
53
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RoleNames, Identities, ArbitraryObject, GeneratedSchema } from '../foundations';
|
|
2
|
+
import { UsersPasswordEncryptionMethod } from './custom-types';
|
|
3
|
+
export declare type CreateUser = {
|
|
4
|
+
id: string;
|
|
5
|
+
username?: string | null;
|
|
6
|
+
primaryEmail?: string | null;
|
|
7
|
+
primaryPhone?: string | null;
|
|
8
|
+
passwordEncrypted?: string | null;
|
|
9
|
+
passwordEncryptionMethod?: UsersPasswordEncryptionMethod | null;
|
|
10
|
+
name?: string | null;
|
|
11
|
+
avatar?: string | null;
|
|
12
|
+
applicationId?: string | null;
|
|
13
|
+
roleNames?: RoleNames;
|
|
14
|
+
identities?: Identities;
|
|
15
|
+
customData?: ArbitraryObject;
|
|
16
|
+
lastSignInAt?: number | null;
|
|
17
|
+
createdAt?: number;
|
|
18
|
+
};
|
|
19
|
+
export declare type User = {
|
|
20
|
+
id: string;
|
|
21
|
+
username: string | null;
|
|
22
|
+
primaryEmail: string | null;
|
|
23
|
+
primaryPhone: string | null;
|
|
24
|
+
passwordEncrypted: string | null;
|
|
25
|
+
passwordEncryptionMethod: UsersPasswordEncryptionMethod | null;
|
|
26
|
+
name: string | null;
|
|
27
|
+
avatar: string | null;
|
|
28
|
+
applicationId: string | null;
|
|
29
|
+
roleNames: RoleNames;
|
|
30
|
+
identities: Identities;
|
|
31
|
+
customData: ArbitraryObject;
|
|
32
|
+
lastSignInAt: number | null;
|
|
33
|
+
createdAt: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const Users: GeneratedSchema<CreateUser>;
|