@tailor-platform/sdk 1.39.0 → 1.39.1
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/CHANGELOG.md +12 -0
- package/dist/{env-CgI46oPS.d.mts → actor-Bb4OVq1j.d.mts} +9 -9
- package/dist/{application-DhQrXEld.mjs → application-BHu8YE-g.mjs} +148 -148
- package/dist/application-BHu8YE-g.mjs.map +1 -0
- package/dist/application-C8Lr37AM.mjs +4 -0
- package/dist/{brand-D-d15jx3.mjs → brand-Ll48SMXe.mjs} +1 -1
- package/dist/{brand-D-d15jx3.mjs.map → brand-Ll48SMXe.mjs.map} +1 -1
- package/dist/cli/index.mjs +15 -15
- package/dist/cli/lib.d.mts +9 -9
- package/dist/cli/lib.mjs +4 -4
- package/dist/{client-xzPXtc_e.mjs → client-B2K45RvK.mjs} +77 -47
- package/dist/client-B2K45RvK.mjs.map +1 -0
- package/dist/{client-BWAbbA1C.mjs → client-CEVmv94H.mjs} +1 -1
- package/dist/configure/index.d.mts +4 -4
- package/dist/configure/index.mjs +55 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-DXhPL8Ue.mjs → crash-report-CACiemAr.mjs} +4 -4
- package/dist/{crash-report-DXhPL8Ue.mjs.map → crash-report-CACiemAr.mjs.map} +1 -1
- package/dist/{crash-report-BEAiCSCl.mjs → crash-report-CPUF3T5d.mjs} +1 -1
- package/dist/{errors-D9f2UJpT.mjs → errors-ChWX5ZG8.mjs} +1 -1
- package/dist/{errors-D9f2UJpT.mjs.map → errors-ChWX5ZG8.mjs.map} +1 -1
- package/dist/field-BY2vbJ8f.mjs +23 -0
- package/dist/field-BY2vbJ8f.mjs.map +1 -0
- package/dist/{index-31hm0Fq7.d.mts → index-BYmdVno1.d.mts} +133 -30
- package/dist/{index-y5790SX_.d.mts → index-CeFwhUkX.d.mts} +2 -2
- package/dist/{index-B2tsEXdh.d.mts → index-Ch8Em3nz.d.mts} +2 -2
- package/dist/{index-DbzopC7M.d.mts → index-Cx1RYDbu.d.mts} +2 -2
- package/dist/{index-DeBFa7oc.d.mts → index-DLO_XvLi.d.mts} +2 -2
- package/dist/{interceptor-CzaH2Ur6.mjs → interceptor-B5bKVwgq.mjs} +1 -1
- package/dist/{interceptor-CzaH2Ur6.mjs.map → interceptor-B5bKVwgq.mjs.map} +1 -1
- package/dist/{job-DkAklmE4.mjs → job-p6zf8Qpg.mjs} +2 -2
- package/dist/job-p6zf8Qpg.mjs.map +1 -0
- package/dist/{logger-5_JMzHmw.mjs → logger-DTNAMYGy.mjs} +1 -1
- package/dist/{logger-5_JMzHmw.mjs.map → logger-DTNAMYGy.mjs.map} +1 -1
- package/dist/package-json-CPR7s5hf.mjs +4 -0
- package/dist/{package-json-BHViVisJ.mjs → package-json-CWp8s9dE.mjs} +1 -1
- package/dist/{package-json-BHViVisJ.mjs.map → package-json-CWp8s9dE.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{runtime-DtSOnOHh.mjs → runtime-2xqzvkQv.mjs} +86 -15
- package/dist/runtime-2xqzvkQv.mjs.map +1 -0
- package/dist/{schema-CnwUqPyM.mjs → schema-CEcfEyPN.mjs} +4 -44
- package/dist/schema-CEcfEyPN.mjs.map +1 -0
- package/dist/{seed-DrbB1VXd.mjs → seed-CyYPhvNL.mjs} +12 -12
- package/dist/seed-CyYPhvNL.mjs.map +1 -0
- package/dist/{service-Bcp6JB3w.mjs → service-SrG26B9T.mjs} +3 -3
- package/dist/{service-Bcp6JB3w.mjs.map → service-SrG26B9T.mjs.map} +1 -1
- package/dist/{plugin-_K3ZfP8B.d.mts → tailor-db-field-B99RnR2N.d.mts} +695 -1187
- package/dist/{telemetry-DwHuiNiR.mjs → telemetry-BuDto_2q.mjs} +2 -2
- package/dist/{telemetry-DwHuiNiR.mjs.map → telemetry-BuDto_2q.mjs.map} +1 -1
- package/dist/telemetry-C1hzFaiV.mjs +4 -0
- package/dist/types-BnphjkIJ.mjs +5 -0
- package/dist/{types-B9ZMosul.mjs → types-Duhhsx3R.mjs} +3 -32
- package/dist/types-Duhhsx3R.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +1 -1
- package/dist/workflow.generated-DSwr-k57.d.mts +1207 -0
- package/docs/cli/application.md +21 -5
- package/docs/services/idp.md +4 -4
- package/package.json +2 -2
- package/dist/application-C1ipG5Q6.mjs +0 -4
- package/dist/application-DhQrXEld.mjs.map +0 -1
- package/dist/client-xzPXtc_e.mjs.map +0 -1
- package/dist/job-DkAklmE4.mjs.map +0 -1
- package/dist/package-json--6dmp6-h.mjs +0 -4
- package/dist/runtime-DtSOnOHh.mjs.map +0 -1
- package/dist/schema-CnwUqPyM.mjs.map +0 -1
- package/dist/seed-DrbB1VXd.mjs.map +0 -1
- package/dist/telemetry-4IOPW6wE.mjs +0 -4
- package/dist/types-B9ZMosul.mjs.map +0 -1
- package/dist/types-C45jRrCM.mjs +0 -4
- package/dist/workflow.generated-BxbnuzAE.d.mts +0 -414
|
@@ -0,0 +1,1207 @@
|
|
|
1
|
+
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
+
import { A as RelationType, Bt as InferredAttributeMap, D as DefinedDBFieldMetadata, Dt as ArrayFieldOutput, E as DBFieldMetadata, F as AuthConfig, Ft as FieldValidateInput, It as Validators, Kt as Prettify, M as TailorDBServiceInput, Mt as FieldOutput, O as GqlOperationsConfig, Pt as TailorToTs, Ut as InferFieldsOutput, Vt as TailorUser, Y as TailorField, c as PluginConfigs, ht as BuiltinIdP, i as TailorDBType$1, j as SerialConfig, jt as FieldOptions, k as IndexDef, kt as EnumValue, qt as output, r as TailorDBField$1, t as TailorAnyDBField$1 } from "./tailor-db-field-B99RnR2N.mjs";
|
|
3
|
+
import { NonEmptyObject } from "type-fest";
|
|
4
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
|
+
|
|
6
|
+
//#region src/configure/types/field.d.ts
|
|
7
|
+
type AllowedValues = readonly [string | EnumValue, ...(string | EnumValue)[]];
|
|
8
|
+
type AllowedValuesOutput<V extends AllowedValues> = V[number] extends infer T ? T extends string ? T : T extends {
|
|
9
|
+
value: infer K;
|
|
10
|
+
} ? K : never : never;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/configure/services/tailordb/permission.d.ts
|
|
13
|
+
/**
|
|
14
|
+
* Record-level permission configuration for a TailorDB type.
|
|
15
|
+
* Defines create, read, update, and delete permissions.
|
|
16
|
+
*
|
|
17
|
+
* Prefer object format with explicit `conditions` and `permit` for readability.
|
|
18
|
+
* Shorthand array format is supported for compatibility, but less readable.
|
|
19
|
+
*
|
|
20
|
+
* For update operations, use `newRecord`/`oldRecord` operands instead of `record`.
|
|
21
|
+
* @example
|
|
22
|
+
* const permission: TailorTypePermission = {
|
|
23
|
+
* create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
24
|
+
* read: [{ conditions: [[{ record: "isPublic" }, "=", true]], permit: true }],
|
|
25
|
+
* update: [{ conditions: [[{ newRecord: "ownerId" }, "=", { user: "id" }]], permit: true }],
|
|
26
|
+
* delete: [{ conditions: [[{ record: "ownerId" }, "=", { user: "id" }]], permit: true }],
|
|
27
|
+
* };
|
|
28
|
+
*/
|
|
29
|
+
type TailorTypePermission<User extends object = InferredAttributeMap, Type extends object = object> = {
|
|
30
|
+
create: readonly ActionPermission<"record", User, Type, false>[];
|
|
31
|
+
read: readonly ActionPermission<"record", User, Type, false>[];
|
|
32
|
+
update: readonly ActionPermission<"record", User, Type, true>[];
|
|
33
|
+
delete: readonly ActionPermission<"record", User, Type, false>[];
|
|
34
|
+
};
|
|
35
|
+
type ActionPermission<Level extends "record" | "gql" = "record" | "gql", User extends object = InferredAttributeMap, Type extends object = object, Update extends boolean = boolean> = {
|
|
36
|
+
conditions: PermissionCondition<Level, User, Update, Type> | readonly PermissionCondition<Level, User, Update, Type>[];
|
|
37
|
+
description?: string | undefined;
|
|
38
|
+
permit?: boolean;
|
|
39
|
+
} | readonly [...PermissionCondition<Level, User, Update, Type>, ...([] | [boolean])] | readonly [...PermissionCondition<Level, User, Update, Type>[], ...([] | [boolean])];
|
|
40
|
+
type TailorTypeGqlPermission<User extends object = InferredAttributeMap, Type extends object = object> = readonly GqlPermissionPolicy<User, Type>[];
|
|
41
|
+
type GqlPermissionPolicy<User extends object = InferredAttributeMap, Type extends object = object> = {
|
|
42
|
+
conditions: readonly PermissionCondition<"gql", User, boolean, Type>[];
|
|
43
|
+
actions: "all" | readonly GqlPermissionAction[];
|
|
44
|
+
permit?: boolean;
|
|
45
|
+
description?: string;
|
|
46
|
+
};
|
|
47
|
+
type GqlPermissionAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert";
|
|
48
|
+
type EqualityOperator = "=" | "!=";
|
|
49
|
+
type ContainsOperator = "in" | "not in";
|
|
50
|
+
type HasAnyOperator = "hasAny" | "not hasAny";
|
|
51
|
+
type StringFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string ? K : never }[keyof User];
|
|
52
|
+
type StringArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string[] ? K : never }[keyof User];
|
|
53
|
+
type BooleanFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean ? K : never }[keyof User];
|
|
54
|
+
type BooleanArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean[] ? K : never }[keyof User];
|
|
55
|
+
type UserStringOperand<User extends object = InferredAttributeMap> = {
|
|
56
|
+
user: StringFieldKeys<User> | "id";
|
|
57
|
+
};
|
|
58
|
+
type UserStringArrayOperand<User extends object = InferredAttributeMap> = {
|
|
59
|
+
user: StringArrayFieldKeys<User>;
|
|
60
|
+
};
|
|
61
|
+
type UserBooleanOperand<User extends object = InferredAttributeMap> = {
|
|
62
|
+
user: BooleanFieldKeys<User> | "_loggedIn";
|
|
63
|
+
};
|
|
64
|
+
type UserBooleanArrayOperand<User extends object = InferredAttributeMap> = {
|
|
65
|
+
user: BooleanArrayFieldKeys<User>;
|
|
66
|
+
};
|
|
67
|
+
type RecordOperand<Type extends object, Update extends boolean = false> = Update extends true ? {
|
|
68
|
+
oldRecord: (keyof Type & string) | "id";
|
|
69
|
+
} | {
|
|
70
|
+
newRecord: (keyof Type & string) | "id";
|
|
71
|
+
} : {
|
|
72
|
+
record: (keyof Type & string) | "id";
|
|
73
|
+
};
|
|
74
|
+
type StringEqualityCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = (Level extends "gql" ? readonly [string, EqualityOperator, boolean] : never) | readonly [string, EqualityOperator, string] | readonly [UserStringOperand<User>, EqualityOperator, string] | readonly [string, EqualityOperator, UserStringOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, EqualityOperator, string | UserStringOperand<User>] | readonly [string | UserStringOperand<User>, EqualityOperator, RecordOperand<Type, Update>] : never);
|
|
75
|
+
type BooleanEqualityCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [boolean, EqualityOperator, boolean] | readonly [UserBooleanOperand<User>, EqualityOperator, boolean] | readonly [boolean, EqualityOperator, UserBooleanOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, EqualityOperator, boolean | UserBooleanOperand<User>] | readonly [boolean | UserBooleanOperand<User>, EqualityOperator, RecordOperand<Type, Update>] : never);
|
|
76
|
+
type EqualityCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = StringEqualityCondition<Level, User, Update, Type> | BooleanEqualityCondition<Level, User, Update, Type>;
|
|
77
|
+
type StringContainsCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, ContainsOperator, string[] | UserStringArrayOperand<User>] | readonly [string | UserStringOperand<User>, ContainsOperator, RecordOperand<Type, Update>] : never);
|
|
78
|
+
type BooleanContainsCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = (Level extends "gql" ? readonly [string, ContainsOperator, boolean[]] : never) | readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>] | readonly [boolean | UserBooleanOperand<User>, ContainsOperator, RecordOperand<Type, Update>] : never);
|
|
79
|
+
type ContainsCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = StringContainsCondition<Level, User, Update, Type> | BooleanContainsCondition<Level, User, Update, Type>;
|
|
80
|
+
type HasAnyCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [string[] | UserStringArrayOperand<User>, HasAnyOperator, string[] | UserStringArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, HasAnyOperator, string[] | UserStringArrayOperand<User>] | readonly [string[] | UserStringArrayOperand<User>, HasAnyOperator, RecordOperand<Type, Update>] : never);
|
|
81
|
+
/**
|
|
82
|
+
* Type representing a permission condition that combines user attributes, record fields, and literal values using comparison operators.
|
|
83
|
+
*
|
|
84
|
+
* The User type is extended by `tailor.d.ts`, which is automatically generated when running `tailor-sdk generate`.
|
|
85
|
+
* Attributes enabled in the config file's `auth.userProfile.attributes` (or
|
|
86
|
+
* `auth.machineUserAttributes` when userProfile is omitted) become available as types.
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* // tailor.config.ts
|
|
90
|
+
* export const auth = defineAuth("my-auth", {
|
|
91
|
+
* userProfile: {
|
|
92
|
+
* type: user,
|
|
93
|
+
* attributes: {
|
|
94
|
+
* isAdmin: true,
|
|
95
|
+
* roles: true,
|
|
96
|
+
* }
|
|
97
|
+
* }
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
type PermissionCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = EqualityCondition<Level, User, Update, Type> | ContainsCondition<Level, User, Update, Type> | HasAnyCondition<Level, User, Update, Type>;
|
|
102
|
+
/**
|
|
103
|
+
* Grants full record-level access without any conditions.
|
|
104
|
+
*
|
|
105
|
+
* Unsafe and intended only for local development, prototyping, or tests.
|
|
106
|
+
* Do not use this in production environments, as it effectively disables
|
|
107
|
+
* authorization checks.
|
|
108
|
+
*/
|
|
109
|
+
declare const unsafeAllowAllTypePermission: TailorTypePermission;
|
|
110
|
+
/**
|
|
111
|
+
* Grants full GraphQL access (all actions) without any conditions.
|
|
112
|
+
*
|
|
113
|
+
* Unsafe and intended only for local development, prototyping, or tests.
|
|
114
|
+
* Do not use this in production environments, as it effectively disables
|
|
115
|
+
* authorization checks.
|
|
116
|
+
*/
|
|
117
|
+
declare const unsafeAllowAllGqlPermission: TailorTypeGqlPermission;
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/configure/services/tailordb/types.d.ts
|
|
120
|
+
type HookFn<TValue, TData, TReturn> = (args: {
|
|
121
|
+
value: TValue;
|
|
122
|
+
data: TData extends Record<string, unknown> ? { readonly [K in keyof TData]?: TData[K] | null | undefined } : unknown;
|
|
123
|
+
user: TailorUser;
|
|
124
|
+
}) => TReturn;
|
|
125
|
+
type Hook<TData, TReturn> = {
|
|
126
|
+
create?: HookFn<TReturn | null, TData, TReturn>;
|
|
127
|
+
update?: HookFn<TReturn | null, TData, TReturn>;
|
|
128
|
+
};
|
|
129
|
+
type Hooks<F extends Record<string, TailorAnyDBField$1>, TData = { [K in keyof F]: output<F[K]> }> = NonEmptyObject<{ [K in Exclude<keyof F, "id"> as F[K]["_defined"] extends {
|
|
130
|
+
hooks: unknown;
|
|
131
|
+
} ? never : F[K]["_defined"] extends {
|
|
132
|
+
type: "nested";
|
|
133
|
+
} ? never : K]?: Hook<TData, output<F[K]>> }>;
|
|
134
|
+
type ExcludeNestedDBFields<T extends Record<string, TailorAnyDBField$1>> = { [K in keyof T]: T[K] extends TailorDBField$1<{
|
|
135
|
+
type: "nested";
|
|
136
|
+
array: boolean;
|
|
137
|
+
}, any> ? never : T[K] };
|
|
138
|
+
interface TypeFeatures {
|
|
139
|
+
pluralForm?: string;
|
|
140
|
+
aggregation?: true;
|
|
141
|
+
bulkUpsert?: true;
|
|
142
|
+
/** Configure GraphQL operations for this type. Use "query" for read-only mode, or an object for granular control. */
|
|
143
|
+
gqlOperations?: GqlOperationsConfig;
|
|
144
|
+
/**
|
|
145
|
+
* Enable publishing events for this type.
|
|
146
|
+
* When enabled, record creation/update/deletion events are published.
|
|
147
|
+
* If not specified, this is automatically set to true when an executor uses this type
|
|
148
|
+
* with recordCreated/recordUpdated/recordDeleted triggers. If explicitly set to false
|
|
149
|
+
* while an executor uses this type, an error will be thrown during apply.
|
|
150
|
+
*/
|
|
151
|
+
publishEvents?: boolean;
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/configure/services/tailordb/schema.d.ts
|
|
155
|
+
type TailorAnyDBField = TailorDBField<any, any>;
|
|
156
|
+
type TailorAnyDBType = TailorDBType<any, any>;
|
|
157
|
+
/**
|
|
158
|
+
* Full TailorDBField interface with builder methods.
|
|
159
|
+
* Extends the minimal structural interface from types/ with fluent API methods.
|
|
160
|
+
*/
|
|
161
|
+
interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any> extends Omit<TailorDBField$1<Defined, Output>, "fields"> {
|
|
162
|
+
readonly fields: Record<string, TailorAnyDBField>;
|
|
163
|
+
_metadata: DBFieldMetadata;
|
|
164
|
+
/**
|
|
165
|
+
* Parse and validate a value against this field's validation rules
|
|
166
|
+
*/
|
|
167
|
+
parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;
|
|
168
|
+
/**
|
|
169
|
+
* Internal parse method that tracks field path for nested validation
|
|
170
|
+
* @private
|
|
171
|
+
*/
|
|
172
|
+
_parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
|
|
173
|
+
/**
|
|
174
|
+
* typeName is not available on TailorDB fields.
|
|
175
|
+
* Use typeName on pipeline fields (t.enum / t.object) instead.
|
|
176
|
+
*/
|
|
177
|
+
typeName(this: never, typeName: string): never;
|
|
178
|
+
/**
|
|
179
|
+
* Set a description for the field
|
|
180
|
+
*/
|
|
181
|
+
description<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
182
|
+
description: unknown;
|
|
183
|
+
} ? never : TailorField<CurrentDefined, Output>, description: string): TailorDBField<Prettify<CurrentDefined & {
|
|
184
|
+
description: true;
|
|
185
|
+
}>, Output>;
|
|
186
|
+
/**
|
|
187
|
+
* Define a relation to another type.
|
|
188
|
+
*/
|
|
189
|
+
relation<S extends RelationType, T extends TailorAnyDBType, CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
190
|
+
relation: unknown;
|
|
191
|
+
} ? never : TailorDBField<CurrentDefined, Output>, config: RelationConfig<S, T>): TailorDBField<S extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
|
|
192
|
+
unique: true;
|
|
193
|
+
index: true;
|
|
194
|
+
relation: true;
|
|
195
|
+
}> : Prettify<CurrentDefined & {
|
|
196
|
+
index: true;
|
|
197
|
+
relation: true;
|
|
198
|
+
}>, Output>;
|
|
199
|
+
/**
|
|
200
|
+
* Define a self-referencing relation
|
|
201
|
+
*/
|
|
202
|
+
relation<S extends RelationSelfConfig, CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
203
|
+
relation: unknown;
|
|
204
|
+
} ? never : TailorDBField<CurrentDefined, Output>, config: S): TailorDBField<S["type"] extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
|
|
205
|
+
unique: true;
|
|
206
|
+
index: true;
|
|
207
|
+
relation: true;
|
|
208
|
+
}> : Prettify<CurrentDefined & {
|
|
209
|
+
index: true;
|
|
210
|
+
relation: true;
|
|
211
|
+
}>, Output>;
|
|
212
|
+
/**
|
|
213
|
+
* Add an index to the field
|
|
214
|
+
*/
|
|
215
|
+
index<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
216
|
+
index: unknown;
|
|
217
|
+
} ? never : CurrentDefined extends {
|
|
218
|
+
array: true;
|
|
219
|
+
} ? never : TailorDBField<CurrentDefined, Output>): TailorDBField<Prettify<CurrentDefined & {
|
|
220
|
+
index: true;
|
|
221
|
+
}>, Output>;
|
|
222
|
+
/**
|
|
223
|
+
* Make the field unique (also adds an index)
|
|
224
|
+
*/
|
|
225
|
+
unique<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
226
|
+
unique: unknown;
|
|
227
|
+
} ? never : CurrentDefined extends {
|
|
228
|
+
array: true;
|
|
229
|
+
} ? never : TailorDBField<CurrentDefined, Output>): TailorDBField<Prettify<CurrentDefined & {
|
|
230
|
+
unique: true;
|
|
231
|
+
index: true;
|
|
232
|
+
}>, Output>;
|
|
233
|
+
/**
|
|
234
|
+
* Enable vector search on the field (string type only)
|
|
235
|
+
*/
|
|
236
|
+
vector<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
237
|
+
vector: unknown;
|
|
238
|
+
} ? never : CurrentDefined extends {
|
|
239
|
+
type: "string";
|
|
240
|
+
array: false;
|
|
241
|
+
} ? TailorDBField<CurrentDefined, Output> : never): TailorDBField<Prettify<CurrentDefined & {
|
|
242
|
+
vector: true;
|
|
243
|
+
}>, Output>;
|
|
244
|
+
/**
|
|
245
|
+
* Add hooks for create/update operations on this field.
|
|
246
|
+
*/
|
|
247
|
+
hooks<CurrentDefined extends Defined, const H extends Hook<unknown, Output>>(this: CurrentDefined extends {
|
|
248
|
+
hooks: unknown;
|
|
249
|
+
} ? never : CurrentDefined extends {
|
|
250
|
+
type: "nested";
|
|
251
|
+
} ? never : TailorDBField<CurrentDefined, Output>, hooks: H): TailorDBField<Prettify<CurrentDefined & {
|
|
252
|
+
hooks?: {
|
|
253
|
+
create: H extends {
|
|
254
|
+
create: unknown;
|
|
255
|
+
} ? true : false;
|
|
256
|
+
update: H extends {
|
|
257
|
+
update: unknown;
|
|
258
|
+
} ? true : false;
|
|
259
|
+
};
|
|
260
|
+
serial: false;
|
|
261
|
+
}>, Output>;
|
|
262
|
+
/**
|
|
263
|
+
* Add validation functions to the field.
|
|
264
|
+
*/
|
|
265
|
+
validate<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
266
|
+
validate: unknown;
|
|
267
|
+
} ? never : TailorDBField<CurrentDefined, Output>, ...validate: FieldValidateInput<Output>[]): TailorDBField<Prettify<CurrentDefined & {
|
|
268
|
+
validate: true;
|
|
269
|
+
}>, Output>;
|
|
270
|
+
/**
|
|
271
|
+
* Configure serial/auto-increment behavior
|
|
272
|
+
*/
|
|
273
|
+
serial<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
274
|
+
serial: unknown;
|
|
275
|
+
} ? never : Output extends null ? never : CurrentDefined extends {
|
|
276
|
+
type: "integer" | "string";
|
|
277
|
+
array: false;
|
|
278
|
+
} ? TailorDBField<CurrentDefined, Output> : never, config: SerialConfig<CurrentDefined["type"] & ("integer" | "string")>): TailorDBField<Prettify<CurrentDefined & {
|
|
279
|
+
serial: true;
|
|
280
|
+
hooks: {
|
|
281
|
+
create: false;
|
|
282
|
+
update: false;
|
|
283
|
+
};
|
|
284
|
+
}>, Output>;
|
|
285
|
+
/**
|
|
286
|
+
* Clone the field with optional overrides for field options
|
|
287
|
+
*/
|
|
288
|
+
clone<const NewOpt extends FieldOptions>(options?: NewOpt): TailorDBField<Prettify<Omit<Defined, "array"> & {
|
|
289
|
+
array: NewOpt extends {
|
|
290
|
+
array: true;
|
|
291
|
+
} ? true : Defined["array"];
|
|
292
|
+
}>, FieldOutput<TailorToTs[Defined["type"]], NewOpt>>;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Full TailorDBType interface with builder methods.
|
|
296
|
+
* Extends the minimal structural interface from types/ with fluent API methods.
|
|
297
|
+
*/
|
|
298
|
+
interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> extends TailorDBType$1<Fields, User> {
|
|
299
|
+
_description?: string;
|
|
300
|
+
hooks(hooks: Hooks<Fields>): TailorDBType<Fields, User>;
|
|
301
|
+
validate(validators: Validators<Fields>): TailorDBType<Fields, User>;
|
|
302
|
+
features(features: Omit<TypeFeatures, "pluralForm">): TailorDBType<Fields, User>;
|
|
303
|
+
indexes(...indexes: IndexDef<TailorDBType<Fields, User>>[]): TailorDBType<Fields, User>;
|
|
304
|
+
files<const F extends string>(files: Record<F, string> & Partial<Record<keyof output<TailorDBType<Fields, User>>, never>>): TailorDBType<Fields, User>;
|
|
305
|
+
permission<U extends object = User, P extends TailorTypePermission<U, output<TailorDBType<Fields, User>>> = TailorTypePermission<U, output<TailorDBType<Fields, User>>>>(permission: P): TailorDBType<Fields, U>;
|
|
306
|
+
gqlPermission<U extends object = User, P extends TailorTypeGqlPermission<U> = TailorTypeGqlPermission<U>>(permission: P): TailorDBType<Fields, U>;
|
|
307
|
+
description(description: string): TailorDBType<Fields, User>;
|
|
308
|
+
pickFields<K extends keyof Fields>(keys: K[]): Pick<Fields, K>;
|
|
309
|
+
pickFields<K extends keyof Fields, const Opt extends FieldOptions>(keys: K[], options: Opt): { [P in K]: Fields[P] extends TailorDBField<infer D, infer _O> ? TailorDBField<Omit<D, "array"> & {
|
|
310
|
+
array: Opt extends {
|
|
311
|
+
array: true;
|
|
312
|
+
} ? true : D["array"];
|
|
313
|
+
}, FieldOutput<TailorToTs[D["type"]], Opt>> : never };
|
|
314
|
+
omitFields<K extends keyof Fields>(keys: K[]): Omit<Fields, K>;
|
|
315
|
+
plugin<P extends keyof PluginConfigs<keyof Fields & string>>(config: { [K in P]: PluginConfigs<keyof Fields & string>[K] }): TailorDBType<Fields, User>;
|
|
316
|
+
}
|
|
317
|
+
type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> = TailorDBType<Fields, User>;
|
|
318
|
+
interface RelationConfig<S extends RelationType, T extends TailorDBType> {
|
|
319
|
+
type: S;
|
|
320
|
+
toward: {
|
|
321
|
+
type: T;
|
|
322
|
+
as?: string;
|
|
323
|
+
key?: keyof T["fields"] & string;
|
|
324
|
+
};
|
|
325
|
+
backward?: string;
|
|
326
|
+
}
|
|
327
|
+
type RelationSelfConfig = {
|
|
328
|
+
type: RelationType;
|
|
329
|
+
toward: {
|
|
330
|
+
type: "self";
|
|
331
|
+
as?: string;
|
|
332
|
+
key?: string;
|
|
333
|
+
};
|
|
334
|
+
backward?: string;
|
|
335
|
+
};
|
|
336
|
+
type FieldParseArgs = {
|
|
337
|
+
value: unknown;
|
|
338
|
+
data: unknown;
|
|
339
|
+
user: TailorUser;
|
|
340
|
+
};
|
|
341
|
+
type FieldParseInternalArgs = {
|
|
342
|
+
value: any;
|
|
343
|
+
data: unknown;
|
|
344
|
+
user: TailorUser;
|
|
345
|
+
pathArray: string[];
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Create a UUID field.
|
|
349
|
+
* @param options - Field configuration options
|
|
350
|
+
* @returns A UUID field
|
|
351
|
+
* @example db.uuid()
|
|
352
|
+
* @example db.uuid({ optional: true })
|
|
353
|
+
*/
|
|
354
|
+
declare function uuid<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
355
|
+
type: "uuid";
|
|
356
|
+
array: Opt extends {
|
|
357
|
+
array: true;
|
|
358
|
+
} ? true : false;
|
|
359
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
360
|
+
/**
|
|
361
|
+
* Create a string field.
|
|
362
|
+
* @param options - Field configuration options
|
|
363
|
+
* @returns A string field
|
|
364
|
+
* @example db.string()
|
|
365
|
+
* @example db.string({ optional: true })
|
|
366
|
+
*/
|
|
367
|
+
declare function string<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
368
|
+
type: "string";
|
|
369
|
+
array: Opt extends {
|
|
370
|
+
array: true;
|
|
371
|
+
} ? true : false;
|
|
372
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
373
|
+
/**
|
|
374
|
+
* Create a boolean field.
|
|
375
|
+
* Note: The method name is `bool` but creates a `boolean` type field.
|
|
376
|
+
* @param options - Field configuration options
|
|
377
|
+
* @returns A boolean field
|
|
378
|
+
* @example db.bool()
|
|
379
|
+
* @example db.bool({ optional: true })
|
|
380
|
+
*/
|
|
381
|
+
declare function bool<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
382
|
+
type: "boolean";
|
|
383
|
+
array: Opt extends {
|
|
384
|
+
array: true;
|
|
385
|
+
} ? true : false;
|
|
386
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<boolean, Opt> | null : ArrayFieldOutput<boolean, Opt>>;
|
|
387
|
+
/**
|
|
388
|
+
* Create an integer field.
|
|
389
|
+
* @param options - Field configuration options
|
|
390
|
+
* @returns An integer field
|
|
391
|
+
* @example db.int()
|
|
392
|
+
* @example db.int({ optional: true })
|
|
393
|
+
*/
|
|
394
|
+
declare function int<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
395
|
+
type: "integer";
|
|
396
|
+
array: Opt extends {
|
|
397
|
+
array: true;
|
|
398
|
+
} ? true : false;
|
|
399
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>>;
|
|
400
|
+
/**
|
|
401
|
+
* Create a float (decimal number) field.
|
|
402
|
+
* @param options - Field configuration options
|
|
403
|
+
* @returns A float field
|
|
404
|
+
* @example db.float()
|
|
405
|
+
* @example db.float({ optional: true })
|
|
406
|
+
*/
|
|
407
|
+
declare function float<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
408
|
+
type: "float";
|
|
409
|
+
array: Opt extends {
|
|
410
|
+
array: true;
|
|
411
|
+
} ? true : false;
|
|
412
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>>;
|
|
413
|
+
interface DecimalFieldOptions extends FieldOptions {
|
|
414
|
+
scale?: number;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Create a decimal field (stored as string for precision).
|
|
418
|
+
* @param options - Field configuration options including optional scale (0-12)
|
|
419
|
+
* @returns A decimal field
|
|
420
|
+
* @example db.decimal()
|
|
421
|
+
* @example db.decimal({ scale: 2 })
|
|
422
|
+
* @example db.decimal({ scale: 2, optional: true })
|
|
423
|
+
*/
|
|
424
|
+
declare function decimal<const Opt extends DecimalFieldOptions>(options?: Opt): TailorDBField<{
|
|
425
|
+
type: "decimal";
|
|
426
|
+
array: Opt extends {
|
|
427
|
+
array: true;
|
|
428
|
+
} ? true : false;
|
|
429
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
430
|
+
/**
|
|
431
|
+
* Create a date field (date only, no time component).
|
|
432
|
+
* Format: "yyyy-MM-dd"
|
|
433
|
+
* @param options - Field configuration options
|
|
434
|
+
* @returns A date field
|
|
435
|
+
* @example db.date()
|
|
436
|
+
*/
|
|
437
|
+
declare function date<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
438
|
+
type: "date";
|
|
439
|
+
array: Opt extends {
|
|
440
|
+
array: true;
|
|
441
|
+
} ? true : false;
|
|
442
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
443
|
+
/**
|
|
444
|
+
* Create a datetime field (date and time).
|
|
445
|
+
* Format: ISO 8601 "yyyy-MM-ddTHH:mm:ssZ"
|
|
446
|
+
* @param options - Field configuration options
|
|
447
|
+
* @returns A datetime field
|
|
448
|
+
* @example db.datetime()
|
|
449
|
+
*/
|
|
450
|
+
declare function datetime<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
451
|
+
type: "datetime";
|
|
452
|
+
array: Opt extends {
|
|
453
|
+
array: true;
|
|
454
|
+
} ? true : false;
|
|
455
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<string | Date, Opt> | null : ArrayFieldOutput<string | Date, Opt>>;
|
|
456
|
+
/**
|
|
457
|
+
* Create a time field (time only, no date component).
|
|
458
|
+
* Format: "HH:mm"
|
|
459
|
+
* @param options - Field configuration options
|
|
460
|
+
* @returns A time field
|
|
461
|
+
* @example db.time()
|
|
462
|
+
*/
|
|
463
|
+
declare function time<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
464
|
+
type: "time";
|
|
465
|
+
array: Opt extends {
|
|
466
|
+
array: true;
|
|
467
|
+
} ? true : false;
|
|
468
|
+
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
469
|
+
/**
|
|
470
|
+
* Create an enum field with a fixed set of allowed string values.
|
|
471
|
+
* @param values - Array of allowed string values, or array of `{ value, description }` objects
|
|
472
|
+
* @param options - Field configuration options
|
|
473
|
+
* @returns An enum field
|
|
474
|
+
* @example db.enum(["active", "inactive", "suspended"])
|
|
475
|
+
* @example db.enum(["small", "medium", "large"], { optional: true })
|
|
476
|
+
*/
|
|
477
|
+
declare function _enum<const V extends AllowedValues, const Opt extends FieldOptions>(values: V, options?: Opt): TailorDBField<{
|
|
478
|
+
type: "enum";
|
|
479
|
+
array: Opt extends {
|
|
480
|
+
array: true;
|
|
481
|
+
} ? true : false;
|
|
482
|
+
}, FieldOutput<AllowedValuesOutput<V>, Opt>>;
|
|
483
|
+
/**
|
|
484
|
+
* Create a nested object field with sub-fields.
|
|
485
|
+
* @param fields - Record of nested field definitions
|
|
486
|
+
* @param options - Field configuration options
|
|
487
|
+
* @returns A nested object field
|
|
488
|
+
* @example db.object({ street: db.string(), city: db.string(), zip: db.string() })
|
|
489
|
+
* @example db.object({ name: db.string() }, { optional: true })
|
|
490
|
+
*/
|
|
491
|
+
declare function object<const F extends Record<string, TailorAnyDBField> & ExcludeNestedDBFields<F>, const Opt extends FieldOptions>(fields: F, options?: Opt): TailorDBField<{
|
|
492
|
+
type: "nested";
|
|
493
|
+
array: Opt extends {
|
|
494
|
+
array: true;
|
|
495
|
+
} ? true : false;
|
|
496
|
+
}, FieldOutput<InferFieldsOutput<F>, Opt>>;
|
|
497
|
+
declare const idField: TailorDBField<{
|
|
498
|
+
type: "uuid";
|
|
499
|
+
array: false;
|
|
500
|
+
}, string>;
|
|
501
|
+
type idField = typeof idField;
|
|
502
|
+
type DBType<F extends {
|
|
503
|
+
id?: never;
|
|
504
|
+
} & Record<string, TailorAnyDBField>> = TailorDBInstance<{
|
|
505
|
+
id: idField;
|
|
506
|
+
} & F>;
|
|
507
|
+
/**
|
|
508
|
+
* Creates a new database type with the specified fields.
|
|
509
|
+
* An `id` field (UUID) is automatically added to every type.
|
|
510
|
+
* @param name - The name of the type, or a tuple of [name, pluralForm]
|
|
511
|
+
* @param fields - The field definitions for the type
|
|
512
|
+
* @returns A new TailorDBType instance
|
|
513
|
+
* @example
|
|
514
|
+
* export const user = db.type("User", {
|
|
515
|
+
* name: db.string(),
|
|
516
|
+
* email: db.string(),
|
|
517
|
+
* age: db.int({ optional: true }),
|
|
518
|
+
* role: db.enum(["admin", "member"]),
|
|
519
|
+
* ...db.fields.timestamps(),
|
|
520
|
+
* });
|
|
521
|
+
* // Always export both the value and type:
|
|
522
|
+
* export type user = typeof user;
|
|
523
|
+
*/
|
|
524
|
+
declare function dbType<const F extends {
|
|
525
|
+
id?: never;
|
|
526
|
+
} & Record<string, TailorAnyDBField>>(name: string | [string, string], fields: F): DBType<F>;
|
|
527
|
+
/**
|
|
528
|
+
* Creates a new database type with the specified fields and description.
|
|
529
|
+
* An `id` field (UUID) is automatically added to every type.
|
|
530
|
+
* @param name - The name of the type, or a tuple of [name, pluralForm]
|
|
531
|
+
* @param description - A description of the type
|
|
532
|
+
* @param fields - The field definitions for the type
|
|
533
|
+
* @returns A new TailorDBType instance
|
|
534
|
+
*/
|
|
535
|
+
declare function dbType<const F extends {
|
|
536
|
+
id?: never;
|
|
537
|
+
} & Record<string, TailorAnyDBField>>(name: string | [string, string], description: string, fields: F): DBType<F>;
|
|
538
|
+
/** TailorDB schema builder utilities for defining types and fields. */
|
|
539
|
+
declare const db: {
|
|
540
|
+
type: typeof dbType;
|
|
541
|
+
uuid: typeof uuid;
|
|
542
|
+
string: typeof string;
|
|
543
|
+
bool: typeof bool;
|
|
544
|
+
int: typeof int;
|
|
545
|
+
float: typeof float;
|
|
546
|
+
decimal: typeof decimal;
|
|
547
|
+
date: typeof date;
|
|
548
|
+
datetime: typeof datetime;
|
|
549
|
+
time: typeof time;
|
|
550
|
+
enum: typeof _enum;
|
|
551
|
+
object: typeof object;
|
|
552
|
+
fields: {
|
|
553
|
+
/**
|
|
554
|
+
* Creates standard timestamp fields (createdAt, updatedAt) with auto-hooks.
|
|
555
|
+
* createdAt is set on create, updatedAt is set on update.
|
|
556
|
+
* @returns An object with createdAt and updatedAt fields
|
|
557
|
+
* @example
|
|
558
|
+
* const model = db.type("Model", {
|
|
559
|
+
* name: db.string(),
|
|
560
|
+
* ...db.fields.timestamps(),
|
|
561
|
+
* });
|
|
562
|
+
*/
|
|
563
|
+
timestamps: () => {
|
|
564
|
+
createdAt: TailorDBField<{
|
|
565
|
+
type: "datetime";
|
|
566
|
+
array: false;
|
|
567
|
+
hooks?: {
|
|
568
|
+
create: true;
|
|
569
|
+
update: false;
|
|
570
|
+
} | undefined;
|
|
571
|
+
serial: false;
|
|
572
|
+
description: true;
|
|
573
|
+
}, string | Date>;
|
|
574
|
+
updatedAt: TailorDBField<{
|
|
575
|
+
type: "datetime";
|
|
576
|
+
array: false;
|
|
577
|
+
hooks?: {
|
|
578
|
+
create: false;
|
|
579
|
+
update: true;
|
|
580
|
+
} | undefined;
|
|
581
|
+
serial: false;
|
|
582
|
+
description: true;
|
|
583
|
+
}, string | Date | null>;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
//#endregion
|
|
588
|
+
//#region src/types/idp.generated.d.ts
|
|
589
|
+
/**
|
|
590
|
+
* Configuration for GraphQL operations on IdP users.
|
|
591
|
+
* All operations are enabled by default (undefined or true = enabled, false = disabled).
|
|
592
|
+
*/
|
|
593
|
+
type IdPGqlOperationsInput = "query" | {
|
|
594
|
+
create?: boolean | undefined;
|
|
595
|
+
update?: boolean | undefined;
|
|
596
|
+
delete?: boolean | undefined;
|
|
597
|
+
read?: boolean | undefined;
|
|
598
|
+
sendPasswordResetEmail?: boolean | undefined;
|
|
599
|
+
};
|
|
600
|
+
type IdPGqlOperations = {
|
|
601
|
+
create?: boolean | undefined;
|
|
602
|
+
update?: boolean | undefined;
|
|
603
|
+
delete?: boolean | undefined;
|
|
604
|
+
read?: boolean | undefined;
|
|
605
|
+
sendPasswordResetEmail?: boolean | undefined;
|
|
606
|
+
};
|
|
607
|
+
/**
|
|
608
|
+
* Namespace-level email configuration defaults
|
|
609
|
+
*/
|
|
610
|
+
type IdPEmailConfig = {
|
|
611
|
+
/** Default sender display name for emails */fromName?: string | undefined; /** Default subject for password reset emails */
|
|
612
|
+
passwordResetSubject?: string | undefined;
|
|
613
|
+
};
|
|
614
|
+
type IdPInput = {
|
|
615
|
+
/** IdP service name */name: string; /** OAuth2 client names that can use this IdP */
|
|
616
|
+
clients: string[]; /** Authorization mode for IdP API access */
|
|
617
|
+
authorization?: "insecure" | "loggedIn" | {
|
|
618
|
+
cel: string;
|
|
619
|
+
} | undefined; /** UI language for IdP pages */
|
|
620
|
+
lang?: "en" | "ja" | undefined; /** User authentication policy configuration */
|
|
621
|
+
userAuthPolicy?: {
|
|
622
|
+
useNonEmailIdentifier?: boolean | undefined;
|
|
623
|
+
allowSelfPasswordReset?: boolean | undefined;
|
|
624
|
+
passwordRequireUppercase?: boolean | undefined;
|
|
625
|
+
passwordRequireLowercase?: boolean | undefined;
|
|
626
|
+
passwordRequireNonAlphanumeric?: boolean | undefined;
|
|
627
|
+
passwordRequireNumeric?: boolean | undefined;
|
|
628
|
+
passwordMinLength?: number | undefined;
|
|
629
|
+
passwordMaxLength?: number | undefined;
|
|
630
|
+
allowedEmailDomains?: string[] | undefined;
|
|
631
|
+
allowGoogleOauth?: boolean | undefined;
|
|
632
|
+
allowMicrosoftOauth?: boolean | undefined;
|
|
633
|
+
disablePasswordAuth?: boolean | undefined;
|
|
634
|
+
} | undefined; /** Enable publishing user lifecycle events */
|
|
635
|
+
publishUserEvents?: boolean | undefined; /** Configure which GraphQL operations are enabled */
|
|
636
|
+
gqlOperations?: "query" | {
|
|
637
|
+
create?: boolean | undefined;
|
|
638
|
+
update?: boolean | undefined;
|
|
639
|
+
delete?: boolean | undefined;
|
|
640
|
+
read?: boolean | undefined;
|
|
641
|
+
sendPasswordResetEmail?: boolean | undefined;
|
|
642
|
+
} | undefined; /** Namespace-level email configuration defaults */
|
|
643
|
+
emailConfig?: {
|
|
644
|
+
fromName?: string | undefined;
|
|
645
|
+
passwordResetSubject?: string | undefined;
|
|
646
|
+
} | undefined; /** Per-operation permission policies for IdP users */
|
|
647
|
+
permission?: {
|
|
648
|
+
create: readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
649
|
+
user: string;
|
|
650
|
+
} | {
|
|
651
|
+
idpUser: "name" | "id" | "disabled";
|
|
652
|
+
} | {
|
|
653
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
654
|
+
} | {
|
|
655
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
656
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
657
|
+
user: string;
|
|
658
|
+
} | {
|
|
659
|
+
idpUser: "name" | "id" | "disabled";
|
|
660
|
+
} | {
|
|
661
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
662
|
+
} | {
|
|
663
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
664
|
+
})] | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
665
|
+
user: string;
|
|
666
|
+
} | {
|
|
667
|
+
idpUser: "name" | "id" | "disabled";
|
|
668
|
+
} | {
|
|
669
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
670
|
+
} | {
|
|
671
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
672
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
673
|
+
user: string;
|
|
674
|
+
} | {
|
|
675
|
+
idpUser: "name" | "id" | "disabled";
|
|
676
|
+
} | {
|
|
677
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
678
|
+
} | {
|
|
679
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
680
|
+
}), boolean] | readonly (boolean | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
681
|
+
user: string;
|
|
682
|
+
} | {
|
|
683
|
+
idpUser: "name" | "id" | "disabled";
|
|
684
|
+
} | {
|
|
685
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
686
|
+
} | {
|
|
687
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
688
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
689
|
+
user: string;
|
|
690
|
+
} | {
|
|
691
|
+
idpUser: "name" | "id" | "disabled";
|
|
692
|
+
} | {
|
|
693
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
694
|
+
} | {
|
|
695
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
696
|
+
})])[] | {
|
|
697
|
+
conditions: readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
698
|
+
user: string;
|
|
699
|
+
} | {
|
|
700
|
+
idpUser: "name" | "id" | "disabled";
|
|
701
|
+
} | {
|
|
702
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
703
|
+
} | {
|
|
704
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
705
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
706
|
+
user: string;
|
|
707
|
+
} | {
|
|
708
|
+
idpUser: "name" | "id" | "disabled";
|
|
709
|
+
} | {
|
|
710
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
711
|
+
} | {
|
|
712
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
713
|
+
})] | readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
714
|
+
user: string;
|
|
715
|
+
} | {
|
|
716
|
+
idpUser: "name" | "id" | "disabled";
|
|
717
|
+
} | {
|
|
718
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
719
|
+
} | {
|
|
720
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
721
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
722
|
+
user: string;
|
|
723
|
+
} | {
|
|
724
|
+
idpUser: "name" | "id" | "disabled";
|
|
725
|
+
} | {
|
|
726
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
727
|
+
} | {
|
|
728
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
729
|
+
})])[];
|
|
730
|
+
description?: string | undefined;
|
|
731
|
+
permit?: boolean | undefined;
|
|
732
|
+
})[];
|
|
733
|
+
read: readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
734
|
+
user: string;
|
|
735
|
+
} | {
|
|
736
|
+
idpUser: "name" | "id" | "disabled";
|
|
737
|
+
} | {
|
|
738
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
739
|
+
} | {
|
|
740
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
741
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
742
|
+
user: string;
|
|
743
|
+
} | {
|
|
744
|
+
idpUser: "name" | "id" | "disabled";
|
|
745
|
+
} | {
|
|
746
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
747
|
+
} | {
|
|
748
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
749
|
+
})] | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
750
|
+
user: string;
|
|
751
|
+
} | {
|
|
752
|
+
idpUser: "name" | "id" | "disabled";
|
|
753
|
+
} | {
|
|
754
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
755
|
+
} | {
|
|
756
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
757
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
758
|
+
user: string;
|
|
759
|
+
} | {
|
|
760
|
+
idpUser: "name" | "id" | "disabled";
|
|
761
|
+
} | {
|
|
762
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
763
|
+
} | {
|
|
764
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
765
|
+
}), boolean] | readonly (boolean | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
766
|
+
user: string;
|
|
767
|
+
} | {
|
|
768
|
+
idpUser: "name" | "id" | "disabled";
|
|
769
|
+
} | {
|
|
770
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
771
|
+
} | {
|
|
772
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
773
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
774
|
+
user: string;
|
|
775
|
+
} | {
|
|
776
|
+
idpUser: "name" | "id" | "disabled";
|
|
777
|
+
} | {
|
|
778
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
779
|
+
} | {
|
|
780
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
781
|
+
})])[] | {
|
|
782
|
+
conditions: readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
783
|
+
user: string;
|
|
784
|
+
} | {
|
|
785
|
+
idpUser: "name" | "id" | "disabled";
|
|
786
|
+
} | {
|
|
787
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
788
|
+
} | {
|
|
789
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
790
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
791
|
+
user: string;
|
|
792
|
+
} | {
|
|
793
|
+
idpUser: "name" | "id" | "disabled";
|
|
794
|
+
} | {
|
|
795
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
796
|
+
} | {
|
|
797
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
798
|
+
})] | readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
799
|
+
user: string;
|
|
800
|
+
} | {
|
|
801
|
+
idpUser: "name" | "id" | "disabled";
|
|
802
|
+
} | {
|
|
803
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
804
|
+
} | {
|
|
805
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
806
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
807
|
+
user: string;
|
|
808
|
+
} | {
|
|
809
|
+
idpUser: "name" | "id" | "disabled";
|
|
810
|
+
} | {
|
|
811
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
812
|
+
} | {
|
|
813
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
814
|
+
})])[];
|
|
815
|
+
description?: string | undefined;
|
|
816
|
+
permit?: boolean | undefined;
|
|
817
|
+
})[];
|
|
818
|
+
update: readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
819
|
+
user: string;
|
|
820
|
+
} | {
|
|
821
|
+
idpUser: "name" | "id" | "disabled";
|
|
822
|
+
} | {
|
|
823
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
824
|
+
} | {
|
|
825
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
826
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
827
|
+
user: string;
|
|
828
|
+
} | {
|
|
829
|
+
idpUser: "name" | "id" | "disabled";
|
|
830
|
+
} | {
|
|
831
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
832
|
+
} | {
|
|
833
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
834
|
+
})] | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
835
|
+
user: string;
|
|
836
|
+
} | {
|
|
837
|
+
idpUser: "name" | "id" | "disabled";
|
|
838
|
+
} | {
|
|
839
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
840
|
+
} | {
|
|
841
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
842
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
843
|
+
user: string;
|
|
844
|
+
} | {
|
|
845
|
+
idpUser: "name" | "id" | "disabled";
|
|
846
|
+
} | {
|
|
847
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
848
|
+
} | {
|
|
849
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
850
|
+
}), boolean] | readonly (boolean | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
851
|
+
user: string;
|
|
852
|
+
} | {
|
|
853
|
+
idpUser: "name" | "id" | "disabled";
|
|
854
|
+
} | {
|
|
855
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
856
|
+
} | {
|
|
857
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
858
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
859
|
+
user: string;
|
|
860
|
+
} | {
|
|
861
|
+
idpUser: "name" | "id" | "disabled";
|
|
862
|
+
} | {
|
|
863
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
864
|
+
} | {
|
|
865
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
866
|
+
})])[] | {
|
|
867
|
+
conditions: readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
868
|
+
user: string;
|
|
869
|
+
} | {
|
|
870
|
+
idpUser: "name" | "id" | "disabled";
|
|
871
|
+
} | {
|
|
872
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
873
|
+
} | {
|
|
874
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
875
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
876
|
+
user: string;
|
|
877
|
+
} | {
|
|
878
|
+
idpUser: "name" | "id" | "disabled";
|
|
879
|
+
} | {
|
|
880
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
881
|
+
} | {
|
|
882
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
883
|
+
})] | readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
884
|
+
user: string;
|
|
885
|
+
} | {
|
|
886
|
+
idpUser: "name" | "id" | "disabled";
|
|
887
|
+
} | {
|
|
888
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
889
|
+
} | {
|
|
890
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
891
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
892
|
+
user: string;
|
|
893
|
+
} | {
|
|
894
|
+
idpUser: "name" | "id" | "disabled";
|
|
895
|
+
} | {
|
|
896
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
897
|
+
} | {
|
|
898
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
899
|
+
})])[];
|
|
900
|
+
description?: string | undefined;
|
|
901
|
+
permit?: boolean | undefined;
|
|
902
|
+
})[];
|
|
903
|
+
delete: readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
904
|
+
user: string;
|
|
905
|
+
} | {
|
|
906
|
+
idpUser: "name" | "id" | "disabled";
|
|
907
|
+
} | {
|
|
908
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
909
|
+
} | {
|
|
910
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
911
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
912
|
+
user: string;
|
|
913
|
+
} | {
|
|
914
|
+
idpUser: "name" | "id" | "disabled";
|
|
915
|
+
} | {
|
|
916
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
917
|
+
} | {
|
|
918
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
919
|
+
})] | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
920
|
+
user: string;
|
|
921
|
+
} | {
|
|
922
|
+
idpUser: "name" | "id" | "disabled";
|
|
923
|
+
} | {
|
|
924
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
925
|
+
} | {
|
|
926
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
927
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
928
|
+
user: string;
|
|
929
|
+
} | {
|
|
930
|
+
idpUser: "name" | "id" | "disabled";
|
|
931
|
+
} | {
|
|
932
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
933
|
+
} | {
|
|
934
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
935
|
+
}), boolean] | readonly (boolean | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
936
|
+
user: string;
|
|
937
|
+
} | {
|
|
938
|
+
idpUser: "name" | "id" | "disabled";
|
|
939
|
+
} | {
|
|
940
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
941
|
+
} | {
|
|
942
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
943
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
944
|
+
user: string;
|
|
945
|
+
} | {
|
|
946
|
+
idpUser: "name" | "id" | "disabled";
|
|
947
|
+
} | {
|
|
948
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
949
|
+
} | {
|
|
950
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
951
|
+
})])[] | {
|
|
952
|
+
conditions: readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
953
|
+
user: string;
|
|
954
|
+
} | {
|
|
955
|
+
idpUser: "name" | "id" | "disabled";
|
|
956
|
+
} | {
|
|
957
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
958
|
+
} | {
|
|
959
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
960
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
961
|
+
user: string;
|
|
962
|
+
} | {
|
|
963
|
+
idpUser: "name" | "id" | "disabled";
|
|
964
|
+
} | {
|
|
965
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
966
|
+
} | {
|
|
967
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
968
|
+
})] | readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
969
|
+
user: string;
|
|
970
|
+
} | {
|
|
971
|
+
idpUser: "name" | "id" | "disabled";
|
|
972
|
+
} | {
|
|
973
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
974
|
+
} | {
|
|
975
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
976
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
977
|
+
user: string;
|
|
978
|
+
} | {
|
|
979
|
+
idpUser: "name" | "id" | "disabled";
|
|
980
|
+
} | {
|
|
981
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
982
|
+
} | {
|
|
983
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
984
|
+
})])[];
|
|
985
|
+
description?: string | undefined;
|
|
986
|
+
permit?: boolean | undefined;
|
|
987
|
+
})[];
|
|
988
|
+
sendPasswordResetEmail: readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
989
|
+
user: string;
|
|
990
|
+
} | {
|
|
991
|
+
idpUser: "name" | "id" | "disabled";
|
|
992
|
+
} | {
|
|
993
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
994
|
+
} | {
|
|
995
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
996
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
997
|
+
user: string;
|
|
998
|
+
} | {
|
|
999
|
+
idpUser: "name" | "id" | "disabled";
|
|
1000
|
+
} | {
|
|
1001
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1002
|
+
} | {
|
|
1003
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1004
|
+
})] | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
1005
|
+
user: string;
|
|
1006
|
+
} | {
|
|
1007
|
+
idpUser: "name" | "id" | "disabled";
|
|
1008
|
+
} | {
|
|
1009
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1010
|
+
} | {
|
|
1011
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1012
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
1013
|
+
user: string;
|
|
1014
|
+
} | {
|
|
1015
|
+
idpUser: "name" | "id" | "disabled";
|
|
1016
|
+
} | {
|
|
1017
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1018
|
+
} | {
|
|
1019
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1020
|
+
}), boolean] | readonly (boolean | readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
1021
|
+
user: string;
|
|
1022
|
+
} | {
|
|
1023
|
+
idpUser: "name" | "id" | "disabled";
|
|
1024
|
+
} | {
|
|
1025
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1026
|
+
} | {
|
|
1027
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1028
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
1029
|
+
user: string;
|
|
1030
|
+
} | {
|
|
1031
|
+
idpUser: "name" | "id" | "disabled";
|
|
1032
|
+
} | {
|
|
1033
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1034
|
+
} | {
|
|
1035
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1036
|
+
})])[] | {
|
|
1037
|
+
conditions: readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
1038
|
+
user: string;
|
|
1039
|
+
} | {
|
|
1040
|
+
idpUser: "name" | "id" | "disabled";
|
|
1041
|
+
} | {
|
|
1042
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1043
|
+
} | {
|
|
1044
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1045
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
1046
|
+
user: string;
|
|
1047
|
+
} | {
|
|
1048
|
+
idpUser: "name" | "id" | "disabled";
|
|
1049
|
+
} | {
|
|
1050
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1051
|
+
} | {
|
|
1052
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1053
|
+
})] | readonly (readonly [(string | boolean | readonly string[] | readonly boolean[] | {
|
|
1054
|
+
user: string;
|
|
1055
|
+
} | {
|
|
1056
|
+
idpUser: "name" | "id" | "disabled";
|
|
1057
|
+
} | {
|
|
1058
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1059
|
+
} | {
|
|
1060
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1061
|
+
}), "in" | "=" | "!=" | "not in", (string | boolean | readonly string[] | readonly boolean[] | {
|
|
1062
|
+
user: string;
|
|
1063
|
+
} | {
|
|
1064
|
+
idpUser: "name" | "id" | "disabled";
|
|
1065
|
+
} | {
|
|
1066
|
+
oldIdpUser: "name" | "id" | "disabled";
|
|
1067
|
+
} | {
|
|
1068
|
+
newIdpUser: "name" | "id" | "disabled";
|
|
1069
|
+
})])[];
|
|
1070
|
+
description?: string | undefined;
|
|
1071
|
+
permit?: boolean | undefined;
|
|
1072
|
+
})[];
|
|
1073
|
+
} | undefined;
|
|
1074
|
+
};
|
|
1075
|
+
//#endregion
|
|
1076
|
+
//#region src/types/idp.d.ts
|
|
1077
|
+
declare const idpDefinitionBrand: unique symbol;
|
|
1078
|
+
type IdpDefinitionBrand = {
|
|
1079
|
+
readonly [idpDefinitionBrand]: true;
|
|
1080
|
+
};
|
|
1081
|
+
type DefinedIdp<Name extends string, Config, ClientNames extends string> = Config & {
|
|
1082
|
+
name: Name;
|
|
1083
|
+
provider(providerName: string, clientName: ClientNames): BuiltinIdP;
|
|
1084
|
+
} & IdpDefinitionBrand;
|
|
1085
|
+
type IdPExternalConfig = {
|
|
1086
|
+
name: string;
|
|
1087
|
+
external: true;
|
|
1088
|
+
};
|
|
1089
|
+
type IdPOwnConfig = Omit<DefinedIdp<string, IdPInput, string>, "provider">;
|
|
1090
|
+
type IdPConfig = IdPOwnConfig | IdPExternalConfig;
|
|
1091
|
+
type IdPUserField = "id" | "name" | "disabled";
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region src/types/secrets.generated.d.ts
|
|
1094
|
+
type Secrets = {
|
|
1095
|
+
vaults: {
|
|
1096
|
+
[x: string]: {
|
|
1097
|
+
[x: string]: string | null | undefined;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
options: {
|
|
1101
|
+
ignoreNullishValues: boolean;
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
type SecretsInput = Secrets;
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region src/types/secrets-config.d.ts
|
|
1107
|
+
declare const secretsDefinitionBrand: unique symbol;
|
|
1108
|
+
type SecretsDefinitionBrand = {
|
|
1109
|
+
readonly [secretsDefinitionBrand]: true;
|
|
1110
|
+
};
|
|
1111
|
+
/** Type accepted by `AppConfig.secrets`. Only values returned by `defineSecretManager()` satisfy this. */
|
|
1112
|
+
type SecretsConfig = SecretsInput & SecretsDefinitionBrand;
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region src/types/staticwebsite.generated.d.ts
|
|
1115
|
+
type StaticWebsite = {
|
|
1116
|
+
/** Static website name */name: string; /** Static website description */
|
|
1117
|
+
description?: string | undefined; /** IP addresses allowed to access the website */
|
|
1118
|
+
allowedIpAddresses?: string[] | undefined;
|
|
1119
|
+
};
|
|
1120
|
+
type StaticWebsiteInput = StaticWebsite;
|
|
1121
|
+
//#endregion
|
|
1122
|
+
//#region src/types/staticwebsite-config.d.ts
|
|
1123
|
+
declare const staticWebsiteDefinitionBrand: unique symbol;
|
|
1124
|
+
type StaticWebsiteDefinitionBrand = {
|
|
1125
|
+
readonly [staticWebsiteDefinitionBrand]: true;
|
|
1126
|
+
};
|
|
1127
|
+
/** Type accepted by `AppConfig.staticWebsites`. Only values returned by `defineStaticWebSite()` satisfy this. */
|
|
1128
|
+
type StaticWebsiteConfig = StaticWebsiteInput & StaticWebsiteDefinitionBrand;
|
|
1129
|
+
//#endregion
|
|
1130
|
+
//#region src/types/app-config.d.ts
|
|
1131
|
+
type ExecutorServiceConfig = {
|
|
1132
|
+
files: string[];
|
|
1133
|
+
ignores?: string[];
|
|
1134
|
+
};
|
|
1135
|
+
type ExecutorServiceInput = ExecutorServiceConfig;
|
|
1136
|
+
type ResolverServiceConfig = {
|
|
1137
|
+
files: string[];
|
|
1138
|
+
ignores?: string[];
|
|
1139
|
+
};
|
|
1140
|
+
type ResolverExternalConfig = {
|
|
1141
|
+
external: true;
|
|
1142
|
+
};
|
|
1143
|
+
type ResolverServiceInput = {
|
|
1144
|
+
[namespace: string]: ResolverServiceConfig | ResolverExternalConfig;
|
|
1145
|
+
};
|
|
1146
|
+
type WorkflowServiceConfig = {
|
|
1147
|
+
files: string[];
|
|
1148
|
+
job_files?: string[];
|
|
1149
|
+
ignores?: string[];
|
|
1150
|
+
job_ignores?: string[];
|
|
1151
|
+
};
|
|
1152
|
+
type WorkflowServiceInput = WorkflowServiceConfig;
|
|
1153
|
+
/**
|
|
1154
|
+
* Application configuration for `defineConfig()`.
|
|
1155
|
+
*
|
|
1156
|
+
* Key fields:
|
|
1157
|
+
* - `name` (required): Application name
|
|
1158
|
+
* - `cors`: Array of allowed origins, e.g. `["https://example.com"]`
|
|
1159
|
+
* - `auth`: Single auth config object (not an array)
|
|
1160
|
+
* - `idp`: Array of IdP configs, e.g. `[myIdp]`
|
|
1161
|
+
* - `staticWebsites`: Array of static website configs, e.g. `[website]`
|
|
1162
|
+
* - `db`, `resolver`, `executor`, `workflow`: Service configs with file globs
|
|
1163
|
+
*/
|
|
1164
|
+
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], Env extends Record<string, string | number | boolean> = Record<string, string | number | boolean>> {
|
|
1165
|
+
/** Application name (required). */
|
|
1166
|
+
name: string;
|
|
1167
|
+
/** Environment variables accessible via `context.env` in resolvers and via the second argument `{ env }` in workflow job bodies. */
|
|
1168
|
+
env?: Env;
|
|
1169
|
+
/** Allowed CORS origins. Must be an array of strings, e.g. `["https://example.com"]`. */
|
|
1170
|
+
cors?: string[];
|
|
1171
|
+
/** IP addresses allowed to access the application. */
|
|
1172
|
+
allowedIpAddresses?: string[];
|
|
1173
|
+
/** Disable GraphQL introspection in production. */
|
|
1174
|
+
disableIntrospection?: boolean;
|
|
1175
|
+
/** TailorDB service configuration with type definition files. */
|
|
1176
|
+
db?: TailorDBServiceInput;
|
|
1177
|
+
/** Resolver service configuration with resolver files. */
|
|
1178
|
+
resolver?: ResolverServiceInput;
|
|
1179
|
+
/** Identity Provider configurations. Must be an array, e.g. `[myIdp]`. */
|
|
1180
|
+
idp?: Idp;
|
|
1181
|
+
/** Auth configuration (single object, not an array). */
|
|
1182
|
+
auth?: Auth;
|
|
1183
|
+
/** Executor service configuration with executor files. */
|
|
1184
|
+
executor?: ExecutorServiceInput;
|
|
1185
|
+
/** Workflow service configuration with workflow files. */
|
|
1186
|
+
workflow?: WorkflowServiceInput;
|
|
1187
|
+
/** Static website configurations. Must be an array, e.g. `[website]`. */
|
|
1188
|
+
staticWebsites?: StaticWebsites;
|
|
1189
|
+
/** Secret Manager vault configurations. Keys are vault names, values are records of secret names to values. */
|
|
1190
|
+
secrets?: SecretsConfig;
|
|
1191
|
+
/**
|
|
1192
|
+
* Enable inline sourcemaps in bundled functions for better error stack traces.
|
|
1193
|
+
* @default true
|
|
1194
|
+
*/
|
|
1195
|
+
inlineSourcemap?: boolean;
|
|
1196
|
+
}
|
|
1197
|
+
//#endregion
|
|
1198
|
+
//#region src/types/workflow.generated.d.ts
|
|
1199
|
+
type RetryPolicy = {
|
|
1200
|
+
/** Maximum number of retries (1-10) */maxRetries: number; /** Initial backoff duration (e.g., '1s', '500ms', '1m', max 1h) */
|
|
1201
|
+
initialBackoff: `${number}ms` | `${number}s` | `${number}m`; /** Maximum backoff duration (e.g., '30s', '5m', max 24h) */
|
|
1202
|
+
maxBackoff: `${number}ms` | `${number}s` | `${number}m`; /** Backoff multiplier (>= 1) */
|
|
1203
|
+
backoffMultiplier: number;
|
|
1204
|
+
};
|
|
1205
|
+
//#endregion
|
|
1206
|
+
export { TailorTypeGqlPermission as A, TailorAnyDBField as C, TailorDBType as D, TailorDBInstance as E, AllowedValuesOutput as F, unsafeAllowAllGqlPermission as M, unsafeAllowAllTypePermission as N, db as O, AllowedValues as P, IdPInput as S, TailorDBField as T, IdPUserField as _, ResolverExternalConfig as a, IdPGqlOperations as b, WorkflowServiceConfig as c, StaticWebsiteDefinitionBrand as d, StaticWebsiteInput as f, IdPExternalConfig as g, IdPConfig as h, ExecutorServiceInput as i, TailorTypePermission as j, PermissionCondition as k, WorkflowServiceInput as l, SecretsDefinitionBrand as m, AppConfig as n, ResolverServiceConfig as o, SecretsConfig as p, ExecutorServiceConfig as r, ResolverServiceInput as s, RetryPolicy as t, StaticWebsiteConfig as u, IdpDefinitionBrand as v, TailorAnyDBType as w, IdPGqlOperationsInput as x, IdPEmailConfig as y };
|
|
1207
|
+
//# sourceMappingURL=workflow.generated-DSwr-k57.d.mts.map
|