@tailor-platform/sdk 0.22.2 → 0.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cli/index.mjs +3 -3
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +1 -2
- package/dist/cli/lib.mjs +2 -2
- package/dist/{config-BYrX78K0.mjs → config-CtRi0Lgg.mjs} +3 -78
- package/dist/config-CtRi0Lgg.mjs.map +1 -0
- package/dist/configure/index.d.mts +2 -2
- package/dist/configure/index.mjs +1 -1
- package/dist/{index-43O2EJml.d.mts → index-Bz_i9lgm.d.mts} +8 -3
- package/dist/{list-CqNMJdug.mjs → list-BHj1dQPk.mjs} +180 -76
- package/dist/list-BHj1dQPk.mjs.map +1 -0
- package/dist/{types-DkG_CWKo.d.mts → types-BaiXm10C.d.mts} +253 -254
- package/dist/utils/test/index.d.mts +2 -2
- package/package.json +8 -6
- package/dist/config-BYrX78K0.mjs.map +0 -1
- package/dist/list-CqNMJdug.mjs.map +0 -1
|
@@ -6,174 +6,6 @@ import { IsAny, NonEmptyObject } from "type-fest";
|
|
|
6
6
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
7
7
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
8
|
|
|
9
|
-
//#region src/parser/service/auth/schema.d.ts
|
|
10
|
-
declare const AuthInvokerSchema: z.ZodObject<{
|
|
11
|
-
namespace: z.ZodString;
|
|
12
|
-
machineUserName: z.ZodString;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
declare const OIDCSchema: z.ZodObject<{
|
|
15
|
-
name: z.ZodString;
|
|
16
|
-
kind: z.ZodLiteral<"OIDC">;
|
|
17
|
-
clientID: z.ZodString;
|
|
18
|
-
clientSecret: z.ZodObject<{
|
|
19
|
-
vaultName: z.ZodString;
|
|
20
|
-
secretKey: z.ZodString;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
providerURL: z.ZodString;
|
|
23
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
24
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
declare const SAMLSchema: z.ZodObject<{
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
kind: z.ZodLiteral<"SAML">;
|
|
29
|
-
enableSignRequest: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
-
metadataURL: z.ZodOptional<z.ZodString>;
|
|
31
|
-
rawMetadata: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
declare const IDTokenSchema: z.ZodObject<{
|
|
34
|
-
name: z.ZodString;
|
|
35
|
-
kind: z.ZodLiteral<"IDToken">;
|
|
36
|
-
providerURL: z.ZodString;
|
|
37
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
38
|
-
clientID: z.ZodString;
|
|
39
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
declare const BuiltinIdPSchema: z.ZodObject<{
|
|
42
|
-
name: z.ZodString;
|
|
43
|
-
kind: z.ZodLiteral<"BuiltInIdP">;
|
|
44
|
-
namespace: z.ZodString;
|
|
45
|
-
clientName: z.ZodString;
|
|
46
|
-
}, z.core.$strip>;
|
|
47
|
-
declare const IdProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
kind: z.ZodLiteral<"OIDC">;
|
|
50
|
-
clientID: z.ZodString;
|
|
51
|
-
clientSecret: z.ZodObject<{
|
|
52
|
-
vaultName: z.ZodString;
|
|
53
|
-
secretKey: z.ZodString;
|
|
54
|
-
}, z.core.$strip>;
|
|
55
|
-
providerURL: z.ZodString;
|
|
56
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
57
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
-
name: z.ZodString;
|
|
60
|
-
kind: z.ZodLiteral<"SAML">;
|
|
61
|
-
enableSignRequest: z.ZodDefault<z.ZodBoolean>;
|
|
62
|
-
metadataURL: z.ZodOptional<z.ZodString>;
|
|
63
|
-
rawMetadata: z.ZodOptional<z.ZodString>;
|
|
64
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
kind: z.ZodLiteral<"IDToken">;
|
|
67
|
-
providerURL: z.ZodString;
|
|
68
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
69
|
-
clientID: z.ZodString;
|
|
70
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
71
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
-
name: z.ZodString;
|
|
73
|
-
kind: z.ZodLiteral<"BuiltInIdP">;
|
|
74
|
-
namespace: z.ZodString;
|
|
75
|
-
clientName: z.ZodString;
|
|
76
|
-
}, z.core.$strip>], "kind">;
|
|
77
|
-
declare const OAuth2ClientGrantTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"authorization_code">, z.ZodLiteral<"refresh_token">]>;
|
|
78
|
-
declare const OAuth2ClientSchema: z.ZodObject<{
|
|
79
|
-
description: z.ZodOptional<z.ZodString>;
|
|
80
|
-
grantTypes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"authorization_code">, z.ZodLiteral<"refresh_token">]>>>;
|
|
81
|
-
redirectURIs: z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`https://${string}`>, z.ZodTemplateLiteral<`http://${string}`>, z.ZodTemplateLiteral<`${string}:url`>, z.ZodTemplateLiteral<`${string}:url/${string}`>]>>;
|
|
82
|
-
clientType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"confidential">, z.ZodLiteral<"public">, z.ZodLiteral<"browser">]>>;
|
|
83
|
-
accessTokenLifetimeSeconds: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<{
|
|
84
|
-
seconds: bigint;
|
|
85
|
-
nanos: number;
|
|
86
|
-
} | undefined, number | undefined>>;
|
|
87
|
-
refreshTokenLifetimeSeconds: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<{
|
|
88
|
-
seconds: bigint;
|
|
89
|
-
nanos: number;
|
|
90
|
-
} | undefined, number | undefined>>;
|
|
91
|
-
}, z.core.$strip>;
|
|
92
|
-
declare const SCIMAuthorizationSchema: z.ZodObject<{
|
|
93
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"oauth2">, z.ZodLiteral<"bearer">]>;
|
|
94
|
-
bearerSecret: z.ZodOptional<z.ZodObject<{
|
|
95
|
-
vaultName: z.ZodString;
|
|
96
|
-
secretKey: z.ZodString;
|
|
97
|
-
}, z.core.$strip>>;
|
|
98
|
-
}, z.core.$strip>;
|
|
99
|
-
declare const SCIMAttributeTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
100
|
-
declare const SCIMAttributeSchema: z.ZodObject<{
|
|
101
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
102
|
-
name: z.ZodString;
|
|
103
|
-
description: z.ZodOptional<z.ZodString>;
|
|
104
|
-
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
105
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
-
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
-
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
108
|
-
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
109
|
-
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
110
|
-
}, z.core.$strip>;
|
|
111
|
-
declare const SCIMAttributeMappingSchema: z.ZodObject<{
|
|
112
|
-
tailorDBField: z.ZodString;
|
|
113
|
-
scimPath: z.ZodString;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
declare const SCIMResourceSchema: z.ZodObject<{
|
|
116
|
-
name: z.ZodString;
|
|
117
|
-
tailorDBNamespace: z.ZodString;
|
|
118
|
-
tailorDBType: z.ZodString;
|
|
119
|
-
coreSchema: z.ZodObject<{
|
|
120
|
-
name: z.ZodString;
|
|
121
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
122
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
123
|
-
name: z.ZodString;
|
|
124
|
-
description: z.ZodOptional<z.ZodString>;
|
|
125
|
-
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
126
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
-
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
-
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
129
|
-
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
130
|
-
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
131
|
-
}, z.core.$strip>>;
|
|
132
|
-
}, z.core.$strip>;
|
|
133
|
-
attributeMapping: z.ZodArray<z.ZodObject<{
|
|
134
|
-
tailorDBField: z.ZodString;
|
|
135
|
-
scimPath: z.ZodString;
|
|
136
|
-
}, z.core.$strip>>;
|
|
137
|
-
}, z.core.$strip>;
|
|
138
|
-
declare const SCIMSchema: z.ZodObject<{
|
|
139
|
-
machineUserName: z.ZodString;
|
|
140
|
-
authorization: z.ZodObject<{
|
|
141
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"oauth2">, z.ZodLiteral<"bearer">]>;
|
|
142
|
-
bearerSecret: z.ZodOptional<z.ZodObject<{
|
|
143
|
-
vaultName: z.ZodString;
|
|
144
|
-
secretKey: z.ZodString;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
}, z.core.$strip>;
|
|
147
|
-
resources: z.ZodArray<z.ZodObject<{
|
|
148
|
-
name: z.ZodString;
|
|
149
|
-
tailorDBNamespace: z.ZodString;
|
|
150
|
-
tailorDBType: z.ZodString;
|
|
151
|
-
coreSchema: z.ZodObject<{
|
|
152
|
-
name: z.ZodString;
|
|
153
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
154
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
155
|
-
name: z.ZodString;
|
|
156
|
-
description: z.ZodOptional<z.ZodString>;
|
|
157
|
-
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
158
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
-
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
-
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
161
|
-
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
162
|
-
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
163
|
-
}, z.core.$strip>>;
|
|
164
|
-
}, z.core.$strip>;
|
|
165
|
-
attributeMapping: z.ZodArray<z.ZodObject<{
|
|
166
|
-
tailorDBField: z.ZodString;
|
|
167
|
-
scimPath: z.ZodString;
|
|
168
|
-
}, z.core.$strip>>;
|
|
169
|
-
}, z.core.$strip>>;
|
|
170
|
-
}, z.core.$strip>;
|
|
171
|
-
declare const TenantProviderSchema: z.ZodObject<{
|
|
172
|
-
namespace: z.ZodString;
|
|
173
|
-
type: z.ZodString;
|
|
174
|
-
signatureField: z.ZodString;
|
|
175
|
-
}, z.core.$strip>;
|
|
176
|
-
//#endregion
|
|
177
9
|
//#region src/configure/types/helpers.d.ts
|
|
178
10
|
type Prettify<T$1> = { [K in keyof T$1 as string extends K ? never : K]: T$1[K] } & {};
|
|
179
11
|
type DeepWritable<T$1> = T$1 extends Date | RegExp | Function ? T$1 : T$1 extends object ? { -readonly [P in keyof T$1]: DeepWritable<T$1[P]> } & {} : T$1;
|
|
@@ -195,75 +27,6 @@ type JsonCompatible<T$1> = T$1 extends string | number | boolean | null | undefi
|
|
|
195
27
|
toJSON: () => unknown;
|
|
196
28
|
} ? never : { [K in keyof T$1]: JsonCompatible<T$1[K]> } : never;
|
|
197
29
|
//#endregion
|
|
198
|
-
//#region src/parser/service/auth/types.d.ts
|
|
199
|
-
type AuthInvoker$1 = z.output<typeof AuthInvokerSchema>;
|
|
200
|
-
type OIDC = z.output<typeof OIDCSchema>;
|
|
201
|
-
type SAML = z.output<typeof SAMLSchema>;
|
|
202
|
-
type IDToken = z.output<typeof IDTokenSchema>;
|
|
203
|
-
type BuiltinIdP = z.output<typeof BuiltinIdPSchema>;
|
|
204
|
-
type IdProviderConfig = z.output<typeof IdProviderSchema>;
|
|
205
|
-
type OAuth2ClientGrantType = z.output<typeof OAuth2ClientGrantTypeSchema>;
|
|
206
|
-
type OAuth2ClientInput = z.input<typeof OAuth2ClientSchema>;
|
|
207
|
-
type SCIMAuthorization = z.output<typeof SCIMAuthorizationSchema>;
|
|
208
|
-
type SCIMAttributeType = z.output<typeof SCIMAttributeTypeSchema>;
|
|
209
|
-
type SCIMAttribute = z.output<typeof SCIMAttributeSchema>;
|
|
210
|
-
type SCIMAttributeMapping = z.output<typeof SCIMAttributeMappingSchema>;
|
|
211
|
-
type SCIMResource = z.output<typeof SCIMResourceSchema>;
|
|
212
|
-
type SCIMConfig = z.output<typeof SCIMSchema>;
|
|
213
|
-
type TenantProviderConfig = z.output<typeof TenantProviderSchema>;
|
|
214
|
-
type ValueOperand = string | boolean | string[] | boolean[];
|
|
215
|
-
type AuthAttributeValue = ValueOperand | null | undefined;
|
|
216
|
-
type UserFieldKeys<User extends TailorDBInstance> = keyof output<User> & string;
|
|
217
|
-
type FieldDefined<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = User["fields"][Key] extends {
|
|
218
|
-
_defined: infer Defined;
|
|
219
|
-
} ? Defined : never;
|
|
220
|
-
type FieldOutput$1<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = output<User>[Key];
|
|
221
|
-
type FieldIsRequired<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = undefined extends FieldOutput$1<User, Key> ? false : true;
|
|
222
|
-
type FieldIsOfType<User extends TailorDBInstance, Key extends UserFieldKeys<User>, Type extends string> = FieldDefined<User, Key> extends {
|
|
223
|
-
type: Type;
|
|
224
|
-
} ? true : false;
|
|
225
|
-
type FieldIsArray<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
226
|
-
array: true;
|
|
227
|
-
} ? true : false;
|
|
228
|
-
type FieldIsUnique<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
229
|
-
unique: true;
|
|
230
|
-
} ? true : false;
|
|
231
|
-
type FieldSupportsValueOperand<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldOutput$1<User, Key> extends ValueOperand | null | undefined ? true : false;
|
|
232
|
-
type UsernameFieldKey<User extends TailorDBInstance> = IsAny<User> extends true ? string : { [K in UserFieldKeys<User>]: FieldIsRequired<User, K> extends true ? FieldIsOfType<User, K, "string"> extends true ? FieldIsArray<User, K> extends true ? never : FieldIsUnique<User, K> extends true ? K : never : never : never }[UserFieldKeys<User>];
|
|
233
|
-
type UserAttributeKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldSupportsValueOperand<User, K> extends true ? FieldIsOfType<User, K, "datetime" | "date" | "time"> extends true ? never : K : never }[UserFieldKeys<User>];
|
|
234
|
-
type UserAttributeListKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldIsOfType<User, K, "uuid"> extends true ? FieldIsArray<User, K> extends true ? never : K : never }[UserFieldKeys<User>];
|
|
235
|
-
type UserAttributeMap<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true };
|
|
236
|
-
type DisallowExtraKeys<T$1, Allowed extends PropertyKey> = T$1 & { [K in Exclude<keyof T$1, Allowed>]: never };
|
|
237
|
-
type AttributeListValue<User extends TailorDBInstance, Key extends UserAttributeListKey<User>> = Key extends keyof output<User> ? output<User>[Key] : never;
|
|
238
|
-
type AttributeListToTuple<User extends TailorDBInstance, AttributeList$1 extends readonly UserAttributeListKey<User>[]> = { [Index in keyof AttributeList$1]: AttributeList$1[Index] extends UserAttributeListKey<User> ? AttributeListValue<User, AttributeList$1[Index]> : never };
|
|
239
|
-
type AttributeMapSelectedKeys<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>> = Extract<{ [K in keyof AttributeMap$1]-?: undefined extends AttributeMap$1[K] ? never : K }[keyof AttributeMap$1], UserAttributeKey<User>>;
|
|
240
|
-
type UserProfile<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[]> = {
|
|
241
|
-
type: User;
|
|
242
|
-
usernameField: UsernameFieldKey<User>;
|
|
243
|
-
attributes?: DisallowExtraKeys<AttributeMap$1, UserAttributeKey<User>>;
|
|
244
|
-
attributeList?: AttributeList$1;
|
|
245
|
-
};
|
|
246
|
-
type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = []> = IsAny<User> extends true ? {
|
|
247
|
-
attributes: Record<string, AuthAttributeValue>;
|
|
248
|
-
attributeList?: string[];
|
|
249
|
-
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
250
|
-
attributes?: never;
|
|
251
|
-
} : {
|
|
252
|
-
attributes: { [K in AttributeMapSelectedKeys<User, AttributeMap$1>]: K extends keyof output<User> ? output<User>[K] : never } & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap$1>>]?: never };
|
|
253
|
-
}) & ([] extends AttributeList$1 ? {
|
|
254
|
-
attributeList?: never;
|
|
255
|
-
} : {
|
|
256
|
-
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
257
|
-
});
|
|
258
|
-
type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string> = {
|
|
259
|
-
userProfile?: UserProfile<User, AttributeMap$1, AttributeList$1>;
|
|
260
|
-
machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap$1, AttributeList$1>>;
|
|
261
|
-
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
262
|
-
idProvider?: IdProviderConfig;
|
|
263
|
-
scim?: SCIMConfig;
|
|
264
|
-
tenantProvider?: TenantProviderConfig;
|
|
265
|
-
};
|
|
266
|
-
//#endregion
|
|
267
30
|
//#region src/configure/types/validation.d.ts
|
|
268
31
|
/**
|
|
269
32
|
* Validation function type
|
|
@@ -345,7 +108,7 @@ type FieldOptions = {
|
|
|
345
108
|
optional?: boolean;
|
|
346
109
|
array?: boolean;
|
|
347
110
|
};
|
|
348
|
-
type FieldOutput<T$1, O extends FieldOptions> = OptionalFieldOutput<ArrayFieldOutput<T$1, O>, O>;
|
|
111
|
+
type FieldOutput$1<T$1, O extends FieldOptions> = OptionalFieldOutput<ArrayFieldOutput<T$1, O>, O>;
|
|
349
112
|
type OptionalFieldOutput<T$1, O extends FieldOptions> = O["optional"] extends true ? T$1 | null : T$1;
|
|
350
113
|
type ArrayFieldOutput<T$1, O extends FieldOptions> = [O] extends [{
|
|
351
114
|
array: true;
|
|
@@ -467,7 +230,7 @@ declare class TailorField<const Defined extends DefinedFieldMetadata = DefinedFi
|
|
|
467
230
|
array: TOptions extends {
|
|
468
231
|
array: true;
|
|
469
232
|
} ? true : false;
|
|
470
|
-
}, FieldOutput<OutputBase, TOptions>, FieldMetadata>;
|
|
233
|
+
}, FieldOutput$1<OutputBase, TOptions>, FieldMetadata>;
|
|
471
234
|
description<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
472
235
|
description: unknown;
|
|
473
236
|
} ? never : TailorField<CurrentDefined, Output>, description: string): TailorField<Prettify<CurrentDefined & {
|
|
@@ -542,10 +305,242 @@ type TailorUser = {
|
|
|
542
305
|
/** Represents an unauthenticated user in the Tailor platform. */
|
|
543
306
|
declare const unauthenticatedTailorUser: TailorUser;
|
|
544
307
|
//#endregion
|
|
545
|
-
//#region src/
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
308
|
+
//#region src/parser/service/auth/schema.d.ts
|
|
309
|
+
declare const AuthInvokerSchema: z.ZodObject<{
|
|
310
|
+
namespace: z.ZodString;
|
|
311
|
+
machineUserName: z.ZodString;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
declare const OIDCSchema: z.ZodObject<{
|
|
314
|
+
name: z.ZodString;
|
|
315
|
+
kind: z.ZodLiteral<"OIDC">;
|
|
316
|
+
clientID: z.ZodString;
|
|
317
|
+
clientSecret: z.ZodObject<{
|
|
318
|
+
vaultName: z.ZodString;
|
|
319
|
+
secretKey: z.ZodString;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
providerURL: z.ZodString;
|
|
322
|
+
issuerURL: z.ZodOptional<z.ZodString>;
|
|
323
|
+
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
declare const SAMLSchema: z.ZodObject<{
|
|
326
|
+
name: z.ZodString;
|
|
327
|
+
kind: z.ZodLiteral<"SAML">;
|
|
328
|
+
enableSignRequest: z.ZodDefault<z.ZodBoolean>;
|
|
329
|
+
metadataURL: z.ZodOptional<z.ZodString>;
|
|
330
|
+
rawMetadata: z.ZodOptional<z.ZodString>;
|
|
331
|
+
}, z.core.$strip>;
|
|
332
|
+
declare const IDTokenSchema: z.ZodObject<{
|
|
333
|
+
name: z.ZodString;
|
|
334
|
+
kind: z.ZodLiteral<"IDToken">;
|
|
335
|
+
providerURL: z.ZodString;
|
|
336
|
+
issuerURL: z.ZodOptional<z.ZodString>;
|
|
337
|
+
clientID: z.ZodString;
|
|
338
|
+
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
declare const BuiltinIdPSchema: z.ZodObject<{
|
|
341
|
+
name: z.ZodString;
|
|
342
|
+
kind: z.ZodLiteral<"BuiltInIdP">;
|
|
343
|
+
namespace: z.ZodString;
|
|
344
|
+
clientName: z.ZodString;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
declare const IdProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
347
|
+
name: z.ZodString;
|
|
348
|
+
kind: z.ZodLiteral<"OIDC">;
|
|
349
|
+
clientID: z.ZodString;
|
|
350
|
+
clientSecret: z.ZodObject<{
|
|
351
|
+
vaultName: z.ZodString;
|
|
352
|
+
secretKey: z.ZodString;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
providerURL: z.ZodString;
|
|
355
|
+
issuerURL: z.ZodOptional<z.ZodString>;
|
|
356
|
+
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
358
|
+
name: z.ZodString;
|
|
359
|
+
kind: z.ZodLiteral<"SAML">;
|
|
360
|
+
enableSignRequest: z.ZodDefault<z.ZodBoolean>;
|
|
361
|
+
metadataURL: z.ZodOptional<z.ZodString>;
|
|
362
|
+
rawMetadata: z.ZodOptional<z.ZodString>;
|
|
363
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
364
|
+
name: z.ZodString;
|
|
365
|
+
kind: z.ZodLiteral<"IDToken">;
|
|
366
|
+
providerURL: z.ZodString;
|
|
367
|
+
issuerURL: z.ZodOptional<z.ZodString>;
|
|
368
|
+
clientID: z.ZodString;
|
|
369
|
+
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
370
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
+
name: z.ZodString;
|
|
372
|
+
kind: z.ZodLiteral<"BuiltInIdP">;
|
|
373
|
+
namespace: z.ZodString;
|
|
374
|
+
clientName: z.ZodString;
|
|
375
|
+
}, z.core.$strip>], "kind">;
|
|
376
|
+
declare const OAuth2ClientGrantTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"authorization_code">, z.ZodLiteral<"refresh_token">]>;
|
|
377
|
+
declare const OAuth2ClientSchema: z.ZodObject<{
|
|
378
|
+
description: z.ZodOptional<z.ZodString>;
|
|
379
|
+
grantTypes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"authorization_code">, z.ZodLiteral<"refresh_token">]>>>;
|
|
380
|
+
redirectURIs: z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`https://${string}`>, z.ZodTemplateLiteral<`http://${string}`>, z.ZodTemplateLiteral<`${string}:url`>, z.ZodTemplateLiteral<`${string}:url/${string}`>]>>;
|
|
381
|
+
clientType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"confidential">, z.ZodLiteral<"public">, z.ZodLiteral<"browser">]>>;
|
|
382
|
+
accessTokenLifetimeSeconds: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<{
|
|
383
|
+
seconds: bigint;
|
|
384
|
+
nanos: number;
|
|
385
|
+
} | undefined, number | undefined>>;
|
|
386
|
+
refreshTokenLifetimeSeconds: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<{
|
|
387
|
+
seconds: bigint;
|
|
388
|
+
nanos: number;
|
|
389
|
+
} | undefined, number | undefined>>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
declare const SCIMAuthorizationSchema: z.ZodObject<{
|
|
392
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"oauth2">, z.ZodLiteral<"bearer">]>;
|
|
393
|
+
bearerSecret: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
vaultName: z.ZodString;
|
|
395
|
+
secretKey: z.ZodString;
|
|
396
|
+
}, z.core.$strip>>;
|
|
397
|
+
}, z.core.$strip>;
|
|
398
|
+
declare const SCIMAttributeTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
399
|
+
declare const SCIMAttributeSchema: z.ZodObject<{
|
|
400
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
401
|
+
name: z.ZodString;
|
|
402
|
+
description: z.ZodOptional<z.ZodString>;
|
|
403
|
+
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
404
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
405
|
+
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
406
|
+
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
407
|
+
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
408
|
+
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
declare const SCIMAttributeMappingSchema: z.ZodObject<{
|
|
411
|
+
tailorDBField: z.ZodString;
|
|
412
|
+
scimPath: z.ZodString;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
declare const SCIMResourceSchema: z.ZodObject<{
|
|
415
|
+
name: z.ZodString;
|
|
416
|
+
tailorDBNamespace: z.ZodString;
|
|
417
|
+
tailorDBType: z.ZodString;
|
|
418
|
+
coreSchema: z.ZodObject<{
|
|
419
|
+
name: z.ZodString;
|
|
420
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
421
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
422
|
+
name: z.ZodString;
|
|
423
|
+
description: z.ZodOptional<z.ZodString>;
|
|
424
|
+
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
425
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
426
|
+
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
427
|
+
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
428
|
+
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
429
|
+
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
430
|
+
}, z.core.$strip>>;
|
|
431
|
+
}, z.core.$strip>;
|
|
432
|
+
attributeMapping: z.ZodArray<z.ZodObject<{
|
|
433
|
+
tailorDBField: z.ZodString;
|
|
434
|
+
scimPath: z.ZodString;
|
|
435
|
+
}, z.core.$strip>>;
|
|
436
|
+
}, z.core.$strip>;
|
|
437
|
+
declare const SCIMSchema: z.ZodObject<{
|
|
438
|
+
machineUserName: z.ZodString;
|
|
439
|
+
authorization: z.ZodObject<{
|
|
440
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"oauth2">, z.ZodLiteral<"bearer">]>;
|
|
441
|
+
bearerSecret: z.ZodOptional<z.ZodObject<{
|
|
442
|
+
vaultName: z.ZodString;
|
|
443
|
+
secretKey: z.ZodString;
|
|
444
|
+
}, z.core.$strip>>;
|
|
445
|
+
}, z.core.$strip>;
|
|
446
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
447
|
+
name: z.ZodString;
|
|
448
|
+
tailorDBNamespace: z.ZodString;
|
|
449
|
+
tailorDBType: z.ZodString;
|
|
450
|
+
coreSchema: z.ZodObject<{
|
|
451
|
+
name: z.ZodString;
|
|
452
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
453
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
454
|
+
name: z.ZodString;
|
|
455
|
+
description: z.ZodOptional<z.ZodString>;
|
|
456
|
+
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
457
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
458
|
+
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
459
|
+
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
460
|
+
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
461
|
+
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
462
|
+
}, z.core.$strip>>;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
attributeMapping: z.ZodArray<z.ZodObject<{
|
|
465
|
+
tailorDBField: z.ZodString;
|
|
466
|
+
scimPath: z.ZodString;
|
|
467
|
+
}, z.core.$strip>>;
|
|
468
|
+
}, z.core.$strip>>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
declare const TenantProviderSchema: z.ZodObject<{
|
|
471
|
+
namespace: z.ZodString;
|
|
472
|
+
type: z.ZodString;
|
|
473
|
+
signatureField: z.ZodString;
|
|
474
|
+
}, z.core.$strip>;
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region src/parser/service/auth/types.d.ts
|
|
477
|
+
type AuthInvoker$1 = z.output<typeof AuthInvokerSchema>;
|
|
478
|
+
type OIDC = z.output<typeof OIDCSchema>;
|
|
479
|
+
type SAML = z.output<typeof SAMLSchema>;
|
|
480
|
+
type IDToken = z.output<typeof IDTokenSchema>;
|
|
481
|
+
type BuiltinIdP = z.output<typeof BuiltinIdPSchema>;
|
|
482
|
+
type IdProviderConfig = z.output<typeof IdProviderSchema>;
|
|
483
|
+
type OAuth2ClientGrantType = z.output<typeof OAuth2ClientGrantTypeSchema>;
|
|
484
|
+
type OAuth2ClientInput = z.input<typeof OAuth2ClientSchema>;
|
|
485
|
+
type SCIMAuthorization = z.output<typeof SCIMAuthorizationSchema>;
|
|
486
|
+
type SCIMAttributeType = z.output<typeof SCIMAttributeTypeSchema>;
|
|
487
|
+
type SCIMAttribute = z.output<typeof SCIMAttributeSchema>;
|
|
488
|
+
type SCIMAttributeMapping = z.output<typeof SCIMAttributeMappingSchema>;
|
|
489
|
+
type SCIMResource = z.output<typeof SCIMResourceSchema>;
|
|
490
|
+
type SCIMConfig = z.output<typeof SCIMSchema>;
|
|
491
|
+
type TenantProviderConfig = z.output<typeof TenantProviderSchema>;
|
|
492
|
+
type ValueOperand = string | boolean | string[] | boolean[];
|
|
493
|
+
type AuthAttributeValue = ValueOperand | null | undefined;
|
|
494
|
+
type UserFieldKeys<User extends TailorDBInstance> = keyof output<User> & string;
|
|
495
|
+
type FieldDefined<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = User["fields"][Key] extends {
|
|
496
|
+
_defined: infer Defined;
|
|
497
|
+
} ? Defined : never;
|
|
498
|
+
type FieldOutput<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = output<User>[Key];
|
|
499
|
+
type FieldIsRequired<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = undefined extends FieldOutput<User, Key> ? false : true;
|
|
500
|
+
type FieldIsOfType<User extends TailorDBInstance, Key extends UserFieldKeys<User>, Type extends string> = FieldDefined<User, Key> extends {
|
|
501
|
+
type: Type;
|
|
502
|
+
} ? true : false;
|
|
503
|
+
type FieldIsArray<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
504
|
+
array: true;
|
|
505
|
+
} ? true : false;
|
|
506
|
+
type FieldIsUnique<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
507
|
+
unique: true;
|
|
508
|
+
} ? true : false;
|
|
509
|
+
type FieldSupportsValueOperand<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldOutput<User, Key> extends ValueOperand | null | undefined ? true : false;
|
|
510
|
+
type UsernameFieldKey<User extends TailorDBInstance> = IsAny<User> extends true ? string : { [K in UserFieldKeys<User>]: FieldIsRequired<User, K> extends true ? FieldIsOfType<User, K, "string"> extends true ? FieldIsArray<User, K> extends true ? never : FieldIsUnique<User, K> extends true ? K : never : never : never }[UserFieldKeys<User>];
|
|
511
|
+
type UserAttributeKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldSupportsValueOperand<User, K> extends true ? FieldIsOfType<User, K, "datetime" | "date" | "time"> extends true ? never : K : never }[UserFieldKeys<User>];
|
|
512
|
+
type UserAttributeListKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldIsOfType<User, K, "uuid"> extends true ? FieldIsArray<User, K> extends true ? never : K : never }[UserFieldKeys<User>];
|
|
513
|
+
type UserAttributeMap<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true };
|
|
514
|
+
type DisallowExtraKeys<T$1, Allowed extends PropertyKey> = T$1 & { [K in Exclude<keyof T$1, Allowed>]: never };
|
|
515
|
+
type AttributeListValue<User extends TailorDBInstance, Key extends UserAttributeListKey<User>> = Key extends keyof output<User> ? output<User>[Key] : never;
|
|
516
|
+
type AttributeListToTuple<User extends TailorDBInstance, AttributeList$1 extends readonly UserAttributeListKey<User>[]> = { [Index in keyof AttributeList$1]: AttributeList$1[Index] extends UserAttributeListKey<User> ? AttributeListValue<User, AttributeList$1[Index]> : never };
|
|
517
|
+
type AttributeMapSelectedKeys<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>> = Extract<{ [K in keyof AttributeMap$1]-?: undefined extends AttributeMap$1[K] ? never : K }[keyof AttributeMap$1], UserAttributeKey<User>>;
|
|
518
|
+
type UserProfile<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[]> = {
|
|
519
|
+
type: User;
|
|
520
|
+
usernameField: UsernameFieldKey<User>;
|
|
521
|
+
attributes?: DisallowExtraKeys<AttributeMap$1, UserAttributeKey<User>>;
|
|
522
|
+
attributeList?: AttributeList$1;
|
|
523
|
+
};
|
|
524
|
+
type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = []> = IsAny<User> extends true ? {
|
|
525
|
+
attributes: Record<string, AuthAttributeValue>;
|
|
526
|
+
attributeList?: string[];
|
|
527
|
+
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
528
|
+
attributes?: never;
|
|
529
|
+
} : {
|
|
530
|
+
attributes: { [K in AttributeMapSelectedKeys<User, AttributeMap$1>]: K extends keyof output<User> ? output<User>[K] : never } & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap$1>>]?: never };
|
|
531
|
+
}) & ([] extends AttributeList$1 ? {
|
|
532
|
+
attributeList?: never;
|
|
533
|
+
} : {
|
|
534
|
+
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
535
|
+
});
|
|
536
|
+
type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string> = {
|
|
537
|
+
userProfile?: UserProfile<User, AttributeMap$1, AttributeList$1>;
|
|
538
|
+
machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap$1, AttributeList$1>>;
|
|
539
|
+
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
540
|
+
idProvider?: IdProviderConfig;
|
|
541
|
+
scim?: SCIMConfig;
|
|
542
|
+
tenantProvider?: TenantProviderConfig;
|
|
543
|
+
};
|
|
549
544
|
//#endregion
|
|
550
545
|
//#region src/configure/services/auth/index.d.ts
|
|
551
546
|
declare const authDefinitionBrand: unique symbol;
|
|
@@ -792,6 +787,10 @@ interface Permissions {
|
|
|
792
787
|
record?: StandardTailorTypePermission;
|
|
793
788
|
gql?: StandardTailorTypeGqlPermission;
|
|
794
789
|
}
|
|
790
|
+
interface RawPermissions {
|
|
791
|
+
record?: TailorTypePermission<any, any>;
|
|
792
|
+
gql?: TailorTypeGqlPermission<any, any>;
|
|
793
|
+
}
|
|
795
794
|
interface TailorDBTypeMetadata {
|
|
796
795
|
name: string;
|
|
797
796
|
description?: string;
|
|
@@ -800,7 +799,7 @@ interface TailorDBTypeMetadata {
|
|
|
800
799
|
aggregation?: boolean;
|
|
801
800
|
bulkUpsert?: boolean;
|
|
802
801
|
};
|
|
803
|
-
permissions:
|
|
802
|
+
permissions: RawPermissions;
|
|
804
803
|
files: Record<string, string>;
|
|
805
804
|
indexes?: Record<string, {
|
|
806
805
|
fields: string[];
|
|
@@ -843,7 +842,7 @@ interface ParsedTailorDBType {
|
|
|
843
842
|
forwardRelationships: Record<string, ParsedRelationship>;
|
|
844
843
|
backwardRelationships: Record<string, ParsedRelationship>;
|
|
845
844
|
settings: TailorDBTypeMetadata["settings"];
|
|
846
|
-
permissions:
|
|
845
|
+
permissions: Permissions;
|
|
847
846
|
indexes?: TailorDBTypeMetadata["indexes"];
|
|
848
847
|
files?: TailorDBTypeMetadata["files"];
|
|
849
848
|
}
|
|
@@ -907,7 +906,7 @@ declare class TailorDBField<const Defined extends DefinedDBFieldMetadata, const
|
|
|
907
906
|
array: TOptions extends {
|
|
908
907
|
array: true;
|
|
909
908
|
} ? true : false;
|
|
910
|
-
}, FieldOutput<OutputBase, TOptions>>;
|
|
909
|
+
}, FieldOutput$1<OutputBase, TOptions>>;
|
|
911
910
|
description<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
912
911
|
description: unknown;
|
|
913
912
|
} ? never : TailorField<CurrentDefined, Output>, description: string): TailorDBField<Prettify<CurrentDefined & {
|
|
@@ -993,7 +992,7 @@ declare class TailorDBField<const Defined extends DefinedDBFieldMetadata, const
|
|
|
993
992
|
array: NewOpt extends {
|
|
994
993
|
array: true;
|
|
995
994
|
} ? true : Defined["array"];
|
|
996
|
-
}>, FieldOutput<TailorToTs[Defined["type"]], NewOpt>>;
|
|
995
|
+
}>, FieldOutput$1<TailorToTs[Defined["type"]], NewOpt>>;
|
|
997
996
|
}
|
|
998
997
|
declare function uuid<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
999
998
|
type: "uuid";
|
|
@@ -1048,13 +1047,13 @@ declare function _enum<const V extends AllowedValues, const Opt extends FieldOpt
|
|
|
1048
1047
|
array: Opt extends {
|
|
1049
1048
|
array: true;
|
|
1050
1049
|
} ? true : false;
|
|
1051
|
-
}, FieldOutput<AllowedValuesOutput<V>, Opt>>;
|
|
1050
|
+
}, FieldOutput$1<AllowedValuesOutput<V>, Opt>>;
|
|
1052
1051
|
declare function object<const F extends Record<string, TailorDBField<any, any>> & ExcludeNestedDBFields<F>, const Opt extends FieldOptions>(fields: F, options?: Opt): TailorDBField<{
|
|
1053
1052
|
type: "nested";
|
|
1054
1053
|
array: Opt extends {
|
|
1055
1054
|
array: true;
|
|
1056
1055
|
} ? true : false;
|
|
1057
|
-
}, FieldOutput<InferFieldsOutput<F>, Opt>>;
|
|
1056
|
+
}, FieldOutput$1<InferFieldsOutput<F>, Opt>>;
|
|
1058
1057
|
declare class TailorDBType<const Fields extends Record<string, TailorDBField<any, any>> = any, User extends object = InferredAttributeMap> {
|
|
1059
1058
|
readonly name: string;
|
|
1060
1059
|
readonly fields: Fields;
|
|
@@ -1087,7 +1086,7 @@ declare class TailorDBType<const Fields extends Record<string, TailorDBField<any
|
|
|
1087
1086
|
array: Opt extends {
|
|
1088
1087
|
array: true;
|
|
1089
1088
|
} ? true : D["array"];
|
|
1090
|
-
}, FieldOutput<TailorToTs[D["type"]], Opt>> : never };
|
|
1089
|
+
}, FieldOutput$1<TailorToTs[D["type"]], Opt>> : never };
|
|
1091
1090
|
/**
|
|
1092
1091
|
* Omit specific fields from the type
|
|
1093
1092
|
* @param keys - Array of field keys to omit
|
|
@@ -1383,9 +1382,9 @@ type GeneratorConfig = z.input<typeof BaseGeneratorConfigSchema>;
|
|
|
1383
1382
|
type CodeGeneratorBase = z.output<typeof CodeGeneratorSchema>;
|
|
1384
1383
|
//#endregion
|
|
1385
1384
|
//#region src/configure/config.d.ts
|
|
1386
|
-
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], Env
|
|
1385
|
+
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>> {
|
|
1387
1386
|
name: string;
|
|
1388
|
-
env?: Env
|
|
1387
|
+
env?: Env;
|
|
1389
1388
|
cors?: string[];
|
|
1390
1389
|
allowedIPAddresses?: string[];
|
|
1391
1390
|
disableIntrospection?: boolean;
|
|
@@ -1553,5 +1552,5 @@ type WorkflowOperation = z.infer<typeof WorkflowOperationSchema>;
|
|
|
1553
1552
|
type Executor = z.infer<typeof ExecutorSchema>;
|
|
1554
1553
|
type ExecutorInput = z.input<typeof ExecutorSchema>;
|
|
1555
1554
|
//#endregion
|
|
1556
|
-
export {
|
|
1557
|
-
//# sourceMappingURL=types-
|
|
1555
|
+
export { SCIMAttribute as $, TailorDBType as A, AuthConfig as B, ResolverExternalConfig as C, InferFieldsOutput as Ct, ExecutorServiceInput as D, ExecutorServiceConfig as E, PermissionCondition as F, AuthServiceInput as G, AuthInvoker as H, TailorTypeGqlPermission as I, IdProviderConfig as J, BuiltinIdP as K, TailorTypePermission as L, AllowedValues as M, AllowedValuesOutput as N, TailorDBField as O, ParsedTailorDBType as P, SAML as Q, unsafeAllowAllGqlPermission as R, defineIdp as S, FieldOutput$1 as St, ResolverServiceInput as T, output as Tt, AuthOwnConfig as U, AuthExternalConfig as V, defineAuth as W, OAuth2ClientInput as X, OAuth2ClientGrantType as Y, OIDC as Z, WorkflowServiceInput as _, Resolver as _t, IncomingWebhookTrigger as a, TenantProviderConfig as at, IdPConfig as b, FieldMetadata as bt, ScheduleTriggerInput as c, UserAttributeMap as ct, AppConfig as d, AttributeList as dt, SCIMAttributeMapping as et, defineConfig as f, AttributeMap as ft, WorkflowServiceConfig as g, QueryType as gt, Generator as h, TailorField as ht, GqlOperation as i, SCIMResource as it, db as j, TailorDBInstance as k, WebhookOperation as l, UsernameFieldKey as lt, CodeGeneratorBase as m, unauthenticatedTailorUser as mt, ExecutorInput as n, SCIMAuthorization as nt, RecordTrigger as o, UserAttributeKey as ot, defineGenerators as p, TailorUser as pt, IDToken as q, FunctionOperation as r, SCIMConfig as rt, ResolverExecutedTrigger as s, UserAttributeListKey as st, Executor as t, SCIMAttributeType as tt, WorkflowOperation as u, ValueOperand as ut, StaticWebsiteConfig as v, ResolverInput as vt, ResolverServiceConfig as w, JsonCompatible as wt, IdPExternalConfig as x, FieldOptions as xt, defineStaticWebSite as y, ArrayFieldOutput as yt, unsafeAllowAllTypePermission as z };
|
|
1556
|
+
//# sourceMappingURL=types-BaiXm10C.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./../../user-defined.d.ts" />
|
|
2
|
-
import { A as TailorDBType,
|
|
3
|
-
import { n as output } from "../../index-
|
|
2
|
+
import { A as TailorDBType, ht as TailorField } from "../../types-BaiXm10C.mjs";
|
|
3
|
+
import { n as output } from "../../index-Bz_i9lgm.mjs";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/test/index.d.ts
|