@tailor-platform/sdk 1.23.0 → 1.24.0
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 +57 -0
- package/dist/app-config-BNKHurwr.d.mts +174 -0
- package/dist/{application-CTQe2HSB.mjs → application-DThE2HW7.mjs} +200 -215
- package/dist/application-DThE2HW7.mjs.map +1 -0
- package/dist/application-P1by1htu.mjs +8 -0
- package/dist/{brand-DyPrAzpM.mjs → brand-64NrPh_e.mjs} +1 -1
- package/dist/{brand-DyPrAzpM.mjs.map → brand-64NrPh_e.mjs.map} +1 -1
- package/dist/cli/index.mjs +7 -7
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +7 -7
- package/dist/cli/lib.mjs +7 -7
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +5 -4
- package/dist/configure/index.mjs +3 -3
- package/dist/configure/index.mjs.map +1 -1
- package/dist/enum-constants-B5Nl-yzx.mjs.map +1 -1
- package/dist/env-CHwmMyfF.d.mts +32 -0
- package/dist/file-utils-sEOwAdJ4.mjs.map +1 -1
- package/dist/{index-CO-jsOMb.d.mts → index-BrIZ1rm2.d.mts} +2 -2
- package/dist/{index-CU2kZzKa.d.mts → index-Df0aH5zp.d.mts} +55 -4
- package/dist/{index-BSXclved.d.mts → index-DhtKJmgi.d.mts} +2 -2
- package/dist/{index-DQlsfhpg.d.mts → index-DkRJwNw2.d.mts} +2 -2
- package/dist/{index-lIALNMi_.d.mts → index-zZUL7_2B.d.mts} +2 -2
- package/dist/{interceptor-DiARwPfw.mjs → interceptor-B-0OmiDZ.mjs} +1 -1
- package/dist/{interceptor-DiARwPfw.mjs.map → interceptor-B-0OmiDZ.mjs.map} +1 -1
- package/dist/{job-CRavYLLk.mjs → job-CnqcfVTI.mjs} +2 -2
- package/dist/{job-CRavYLLk.mjs.map → job-CnqcfVTI.mjs.map} +1 -1
- package/dist/kysely-type-CSlcwNFH.mjs.map +1 -1
- package/dist/{package-json-iVBhE5Ef.mjs → package-json-4G3gLWMd.mjs} +1 -1
- package/dist/{package-json-iVBhE5Ef.mjs.map → package-json-4G3gLWMd.mjs.map} +1 -1
- package/dist/package-json-BqvUKPBM.mjs +3 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -2
- package/dist/plugin/builtin/seed/index.d.mts +2 -2
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{types--G4ilVmx.d.mts → plugin-CE-BZZgX.d.mts} +1068 -1761
- package/dist/{query-BLQBOaAM.mjs → query-CV5n7DRd.mjs} +173 -52
- package/dist/query-CV5n7DRd.mjs.map +1 -0
- package/dist/{schema-Cjm-OvPF.mjs → schema-0ByCZ2Ym.mjs} +2 -2
- package/dist/schema-0ByCZ2Ym.mjs.map +1 -0
- package/dist/{seed-CXvCW3Xc.mjs → seed-Cl5QXYsL.mjs} +13 -3
- package/dist/seed-Cl5QXYsL.mjs.map +1 -0
- package/dist/{telemetry-C46fds1l.mjs → telemetry-BPviAbME.mjs} +2 -2
- package/dist/{telemetry-C46fds1l.mjs.map → telemetry-BPviAbME.mjs.map} +1 -1
- package/dist/telemetry-Dq5FZUH0.mjs +3 -0
- package/dist/utils/test/index.d.mts +3 -3
- package/dist/utils/test/index.mjs +2 -2
- package/docs/cli/tailordb.md +1 -1
- package/docs/cli-reference.md +8 -8
- package/package.json +25 -23
- package/dist/application-CTQe2HSB.mjs.map +0 -1
- package/dist/application-DdSu3baZ.mjs +0 -8
- package/dist/package-json-BI0ng3_5.mjs +0 -3
- package/dist/query-BLQBOaAM.mjs.map +0 -1
- package/dist/schema-Cjm-OvPF.mjs.map +0 -1
- package/dist/seed-CXvCW3Xc.mjs.map +0 -1
- package/dist/telemetry-BAxP8-PR.mjs +0 -3
- package/dist/types-CBTSg-LK.mjs +0 -13
- package/dist/types-CBTSg-LK.mjs.map +0 -1
- package/dist/types-IR-hw0-y.d.mts +0 -245
|
@@ -1,584 +1,485 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { IsAny, NonEmptyObject } from "type-fest";
|
|
3
2
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
import { IsAny, NonEmptyObject } from "type-fest";
|
|
4
|
+
|
|
5
|
+
//#region src/parser/generator-config/index.d.ts
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
declare const BaseGeneratorConfigSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"@tailor-platform/kysely-type">, z.ZodObject<{
|
|
8
|
+
distPath: z.ZodString;
|
|
9
|
+
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/seed">, z.ZodObject<{
|
|
10
|
+
distPath: z.ZodString;
|
|
11
|
+
machineUserName: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/enum-constants">, z.ZodObject<{
|
|
13
|
+
distPath: z.ZodString;
|
|
14
|
+
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/file-utils">, z.ZodObject<{
|
|
15
|
+
distPath: z.ZodString;
|
|
16
|
+
}, z.core.$strip>], null>, z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
description: z.ZodString;
|
|
19
|
+
dependencies: z.ZodArray<z.ZodEnum<{
|
|
20
|
+
executor: "executor";
|
|
21
|
+
tailordb: "tailordb";
|
|
22
|
+
resolver: "resolver";
|
|
23
|
+
}>>;
|
|
24
|
+
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
25
|
+
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
26
|
+
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
27
|
+
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
28
|
+
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
29
|
+
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
30
|
+
}, z.core.$strip>]>;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/types/auth.generated.d.ts
|
|
33
|
+
type AuthInvoker = {
|
|
34
|
+
/** Auth namespace */
|
|
35
|
+
namespace: string;
|
|
36
|
+
/** Machine user name for authentication */
|
|
37
|
+
machineUserName: string;
|
|
38
|
+
};
|
|
39
|
+
type OIDC = {
|
|
40
|
+
/** Identity provider name */
|
|
41
|
+
name: string;
|
|
42
|
+
kind: "OIDC";
|
|
43
|
+
/** OAuth2 client ID */
|
|
44
|
+
clientID: string;
|
|
45
|
+
/** OAuth2 client secret */
|
|
46
|
+
clientSecret: {
|
|
47
|
+
vaultName: string;
|
|
48
|
+
secretKey: string;
|
|
49
|
+
};
|
|
50
|
+
/** OIDC provider URL */
|
|
51
|
+
providerURL: string;
|
|
52
|
+
/** OIDC issuer URL (defaults to providerURL) */
|
|
53
|
+
issuerURL?: string | undefined;
|
|
54
|
+
/** JWT claim to use as username */
|
|
55
|
+
usernameClaim?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
type SAML = {
|
|
58
|
+
/** Identity provider name */
|
|
59
|
+
name: string;
|
|
60
|
+
kind: "SAML";
|
|
61
|
+
/** Enable signing of SAML requests */
|
|
62
|
+
enableSignRequest: boolean;
|
|
63
|
+
/** URL to fetch SAML metadata (mutually exclusive with rawMetadata) */
|
|
64
|
+
metadataURL?: string | undefined;
|
|
65
|
+
/** Raw SAML metadata XML (mutually exclusive with metadataURL) */
|
|
66
|
+
rawMetadata?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
type IDToken = {
|
|
69
|
+
/** Identity provider name */
|
|
70
|
+
name: string;
|
|
71
|
+
kind: "IDToken";
|
|
72
|
+
/** ID token provider URL */
|
|
73
|
+
providerURL: string;
|
|
74
|
+
/** Client ID for ID token validation */
|
|
75
|
+
clientID: string;
|
|
76
|
+
/** ID token issuer URL */
|
|
77
|
+
issuerURL?: string | undefined;
|
|
78
|
+
/** JWT claim to use as username */
|
|
79
|
+
usernameClaim?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
type BuiltinIdP = {
|
|
82
|
+
/** Identity provider name */
|
|
83
|
+
name: string;
|
|
84
|
+
kind: "BuiltInIdP";
|
|
85
|
+
/** IdP namespace */
|
|
86
|
+
namespace: string;
|
|
87
|
+
/** OAuth2 client name in the IdP */
|
|
88
|
+
clientName: string;
|
|
89
|
+
};
|
|
90
|
+
type IdProvider = OIDC | SAML | IDToken | BuiltinIdP;
|
|
91
|
+
type OAuth2ClientInput = {
|
|
92
|
+
/** Allowed redirect URIs */
|
|
93
|
+
redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[];
|
|
94
|
+
/** Client description */
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
/** Allowed OAuth2 grant types */
|
|
97
|
+
grantTypes?: ("authorization_code" | "refresh_token")[] | undefined;
|
|
98
|
+
/** OAuth2 client type */
|
|
99
|
+
clientType?: "confidential" | "public" | "browser" | undefined;
|
|
100
|
+
/** Access token lifetime in seconds (60-86400) */
|
|
101
|
+
accessTokenLifetimeSeconds?: number | undefined;
|
|
102
|
+
/** Refresh token lifetime in seconds (60-604800) */
|
|
103
|
+
refreshTokenLifetimeSeconds?: number | undefined;
|
|
104
|
+
/** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
|
|
105
|
+
requireDpop?: boolean | undefined;
|
|
106
|
+
};
|
|
107
|
+
type OAuth2Client = {
|
|
108
|
+
/** Allowed OAuth2 grant types */
|
|
109
|
+
grantTypes: ("authorization_code" | "refresh_token")[];
|
|
110
|
+
/** Allowed redirect URIs */
|
|
111
|
+
redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[];
|
|
112
|
+
/** Access token lifetime in seconds (60-86400) */
|
|
113
|
+
accessTokenLifetimeSeconds: {
|
|
114
|
+
seconds: bigint;
|
|
115
|
+
nanos: number;
|
|
116
|
+
} | undefined;
|
|
117
|
+
/** Refresh token lifetime in seconds (60-604800) */
|
|
118
|
+
refreshTokenLifetimeSeconds: {
|
|
119
|
+
seconds: bigint;
|
|
120
|
+
nanos: number;
|
|
121
|
+
} | undefined;
|
|
122
|
+
/** Client description */
|
|
123
|
+
description?: string | undefined;
|
|
124
|
+
/** OAuth2 client type */
|
|
125
|
+
clientType?: "confidential" | "public" | "browser" | undefined;
|
|
126
|
+
/** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
|
|
127
|
+
requireDpop?: boolean | undefined;
|
|
128
|
+
};
|
|
129
|
+
type SCIMAuthorization = {
|
|
130
|
+
/** SCIM authorization type */
|
|
131
|
+
type: "oauth2" | "bearer";
|
|
132
|
+
/** Bearer token secret (required for bearer type) */
|
|
133
|
+
bearerSecret?: {
|
|
134
|
+
vaultName: string;
|
|
135
|
+
secretKey: string;
|
|
136
|
+
} | undefined;
|
|
137
|
+
};
|
|
138
|
+
type SCIMAttribute = {
|
|
139
|
+
/** Attribute data type */
|
|
140
|
+
type: "string" | "number" | "boolean" | "datetime" | "complex";
|
|
141
|
+
/** Attribute name */
|
|
142
|
+
name: string;
|
|
143
|
+
/** Attribute description */
|
|
144
|
+
description?: string | undefined;
|
|
145
|
+
/** Attribute mutability */
|
|
146
|
+
mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
|
|
147
|
+
/** Whether the attribute is required */
|
|
148
|
+
required?: boolean | undefined;
|
|
149
|
+
/** Whether the attribute can have multiple values */
|
|
150
|
+
multiValued?: boolean | undefined;
|
|
151
|
+
/** Uniqueness constraint */
|
|
152
|
+
uniqueness?: "none" | "server" | "global" | undefined;
|
|
153
|
+
/** List of canonical values */
|
|
154
|
+
canonicalValues?: string[] | null | undefined;
|
|
155
|
+
subAttributes?: SCIMAttribute[] | null | undefined;
|
|
156
|
+
};
|
|
157
|
+
type SCIMAttributeMapping = {
|
|
158
|
+
/** TailorDB field name to map to */
|
|
159
|
+
tailorDBField: string;
|
|
160
|
+
/** SCIM attribute path */
|
|
161
|
+
scimPath: string;
|
|
162
|
+
};
|
|
163
|
+
type SCIMResource = {
|
|
164
|
+
/** SCIM resource name */
|
|
165
|
+
name: string;
|
|
166
|
+
/** TailorDB namespace for the resource */
|
|
167
|
+
tailorDBNamespace: string;
|
|
168
|
+
/** TailorDB type name for the resource */
|
|
169
|
+
tailorDBType: string;
|
|
170
|
+
/** Core SCIM schema definition */
|
|
171
|
+
coreSchema: {
|
|
172
|
+
/** SCIM resource name */
|
|
173
|
+
name: string;
|
|
174
|
+
attributes: {
|
|
175
|
+
type: "string" | "number" | "boolean" | "datetime" | "complex";
|
|
176
|
+
/** SCIM resource name */
|
|
177
|
+
name: string;
|
|
178
|
+
description?: string | undefined;
|
|
179
|
+
mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
|
|
180
|
+
required?: boolean | undefined;
|
|
181
|
+
multiValued?: boolean | undefined;
|
|
182
|
+
uniqueness?: "none" | "server" | "global" | undefined;
|
|
183
|
+
canonicalValues?: string[] | null | undefined;
|
|
184
|
+
subAttributes?: any[] | null | undefined;
|
|
185
|
+
}[];
|
|
186
|
+
};
|
|
187
|
+
/** Attribute mapping configuration */
|
|
188
|
+
attributeMapping: {
|
|
189
|
+
tailorDBField: string;
|
|
190
|
+
scimPath: string;
|
|
191
|
+
}[];
|
|
192
|
+
};
|
|
193
|
+
type SCIMConfig = {
|
|
194
|
+
/** Machine user name for SCIM operations */
|
|
195
|
+
machineUserName: string;
|
|
196
|
+
/** SCIM authorization configuration */
|
|
197
|
+
authorization: {
|
|
198
|
+
type: "oauth2" | "bearer";
|
|
199
|
+
bearerSecret?: {
|
|
200
|
+
vaultName: string;
|
|
201
|
+
secretKey: string;
|
|
202
|
+
} | undefined;
|
|
203
|
+
};
|
|
204
|
+
/** SCIM resource definitions */
|
|
205
|
+
resources: {
|
|
206
|
+
name: string;
|
|
207
|
+
tailorDBNamespace: string;
|
|
208
|
+
tailorDBType: string;
|
|
209
|
+
coreSchema: {
|
|
210
|
+
name: string;
|
|
211
|
+
attributes: {
|
|
212
|
+
type: "string" | "number" | "boolean" | "datetime" | "complex";
|
|
213
|
+
name: string;
|
|
214
|
+
description?: string | undefined;
|
|
215
|
+
mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
|
|
216
|
+
required?: boolean | undefined;
|
|
217
|
+
multiValued?: boolean | undefined;
|
|
218
|
+
uniqueness?: "none" | "server" | "global" | undefined;
|
|
219
|
+
canonicalValues?: string[] | null | undefined;
|
|
220
|
+
subAttributes?: any[] | null | undefined;
|
|
221
|
+
}[];
|
|
222
|
+
};
|
|
223
|
+
attributeMapping: {
|
|
224
|
+
tailorDBField: string;
|
|
225
|
+
scimPath: string;
|
|
226
|
+
}[];
|
|
227
|
+
}[];
|
|
228
|
+
};
|
|
229
|
+
type TenantProvider = {
|
|
230
|
+
/** TailorDB namespace for the tenant type */
|
|
231
|
+
namespace: string;
|
|
232
|
+
/** TailorDB type name for tenants */
|
|
233
|
+
type: string;
|
|
234
|
+
/** Field used as the tenant signature */
|
|
235
|
+
signatureField: string;
|
|
13
236
|
};
|
|
14
|
-
type RelationType = keyof typeof relationTypes;
|
|
15
237
|
//#endregion
|
|
16
|
-
//#region src/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
aggregation: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
bulkUpsert: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
-
gqlOperations: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodObject<{
|
|
27
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
-
update: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
-
delete: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
-
read: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
-
}, z.core.$strip>]>, z.ZodTransform<GqlOperations, "query" | {
|
|
32
|
-
create?: boolean | undefined;
|
|
33
|
-
update?: boolean | undefined;
|
|
34
|
-
delete?: boolean | undefined;
|
|
35
|
-
read?: boolean | undefined;
|
|
36
|
-
}>>>;
|
|
37
|
-
publishEvents: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
}, z.core.$strip>;
|
|
39
|
-
declare const RawPermissionsSchema: z.ZodObject<{
|
|
40
|
-
record: z.ZodOptional<z.ZodObject<{
|
|
41
|
-
create: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
42
|
-
conditions: z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
43
|
-
user: z.ZodString;
|
|
44
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
45
|
-
record: z.ZodString;
|
|
46
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
-
oldRecord: z.ZodString;
|
|
48
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
-
newRecord: z.ZodString;
|
|
50
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
51
|
-
in: "in";
|
|
52
|
-
"=": "=";
|
|
53
|
-
"!=": "!=";
|
|
54
|
-
"not in": "not in";
|
|
55
|
-
hasAny: "hasAny";
|
|
56
|
-
"not hasAny": "not hasAny";
|
|
57
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
-
user: z.ZodString;
|
|
59
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
60
|
-
record: z.ZodString;
|
|
61
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
-
oldRecord: z.ZodString;
|
|
63
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
-
newRecord: z.ZodString;
|
|
65
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
66
|
-
user: z.ZodString;
|
|
67
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
68
|
-
record: z.ZodString;
|
|
69
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
-
oldRecord: z.ZodString;
|
|
71
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
-
newRecord: z.ZodString;
|
|
73
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
74
|
-
in: "in";
|
|
75
|
-
"=": "=";
|
|
76
|
-
"!=": "!=";
|
|
77
|
-
"not in": "not in";
|
|
78
|
-
hasAny: "hasAny";
|
|
79
|
-
"not hasAny": "not hasAny";
|
|
80
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
81
|
-
user: z.ZodString;
|
|
82
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
83
|
-
record: z.ZodString;
|
|
84
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
-
oldRecord: z.ZodString;
|
|
86
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
-
newRecord: z.ZodString;
|
|
88
|
-
}, z.core.$strip>]>], null>>>>]>;
|
|
89
|
-
description: z.ZodOptional<z.ZodString>;
|
|
90
|
-
permit: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
-
}, z.core.$strip>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
92
|
-
user: z.ZodString;
|
|
93
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
94
|
-
record: z.ZodString;
|
|
95
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
-
oldRecord: z.ZodString;
|
|
97
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
-
newRecord: z.ZodString;
|
|
99
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
100
|
-
in: "in";
|
|
101
|
-
"=": "=";
|
|
102
|
-
"!=": "!=";
|
|
103
|
-
"not in": "not in";
|
|
104
|
-
hasAny: "hasAny";
|
|
105
|
-
"not hasAny": "not hasAny";
|
|
106
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
107
|
-
user: z.ZodString;
|
|
108
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
109
|
-
record: z.ZodString;
|
|
110
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
-
oldRecord: z.ZodString;
|
|
112
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
-
newRecord: z.ZodString;
|
|
114
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
115
|
-
user: z.ZodString;
|
|
116
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
117
|
-
record: z.ZodString;
|
|
118
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
119
|
-
oldRecord: z.ZodString;
|
|
120
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
121
|
-
newRecord: z.ZodString;
|
|
122
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
123
|
-
in: "in";
|
|
124
|
-
"=": "=";
|
|
125
|
-
"!=": "!=";
|
|
126
|
-
"not in": "not in";
|
|
127
|
-
hasAny: "hasAny";
|
|
128
|
-
"not hasAny": "not hasAny";
|
|
129
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
130
|
-
user: z.ZodString;
|
|
131
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
132
|
-
record: z.ZodString;
|
|
133
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
-
oldRecord: z.ZodString;
|
|
135
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
-
newRecord: z.ZodString;
|
|
137
|
-
}, z.core.$strip>]>, z.ZodBoolean], null>>, z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
138
|
-
user: z.ZodString;
|
|
139
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
140
|
-
record: z.ZodString;
|
|
141
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
-
oldRecord: z.ZodString;
|
|
143
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
-
newRecord: z.ZodString;
|
|
145
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
146
|
-
in: "in";
|
|
147
|
-
"=": "=";
|
|
148
|
-
"!=": "!=";
|
|
149
|
-
"not in": "not in";
|
|
150
|
-
hasAny: "hasAny";
|
|
151
|
-
"not hasAny": "not hasAny";
|
|
152
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
153
|
-
user: z.ZodString;
|
|
154
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
155
|
-
record: z.ZodString;
|
|
156
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
-
oldRecord: z.ZodString;
|
|
158
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
-
newRecord: z.ZodString;
|
|
160
|
-
}, z.core.$strip>]>], null>>, z.ZodBoolean]>>>]>>>;
|
|
161
|
-
read: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
162
|
-
conditions: z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
163
|
-
user: z.ZodString;
|
|
164
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
165
|
-
record: z.ZodString;
|
|
166
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
-
oldRecord: z.ZodString;
|
|
168
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
-
newRecord: z.ZodString;
|
|
170
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
171
|
-
in: "in";
|
|
172
|
-
"=": "=";
|
|
173
|
-
"!=": "!=";
|
|
174
|
-
"not in": "not in";
|
|
175
|
-
hasAny: "hasAny";
|
|
176
|
-
"not hasAny": "not hasAny";
|
|
177
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
178
|
-
user: z.ZodString;
|
|
179
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
180
|
-
record: z.ZodString;
|
|
181
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
-
oldRecord: z.ZodString;
|
|
183
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
-
newRecord: z.ZodString;
|
|
185
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
186
|
-
user: z.ZodString;
|
|
187
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
188
|
-
record: z.ZodString;
|
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
-
oldRecord: z.ZodString;
|
|
191
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
192
|
-
newRecord: z.ZodString;
|
|
193
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
194
|
-
in: "in";
|
|
195
|
-
"=": "=";
|
|
196
|
-
"!=": "!=";
|
|
197
|
-
"not in": "not in";
|
|
198
|
-
hasAny: "hasAny";
|
|
199
|
-
"not hasAny": "not hasAny";
|
|
200
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
201
|
-
user: z.ZodString;
|
|
202
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
203
|
-
record: z.ZodString;
|
|
204
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
205
|
-
oldRecord: z.ZodString;
|
|
206
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
-
newRecord: z.ZodString;
|
|
208
|
-
}, z.core.$strip>]>], null>>>>]>;
|
|
209
|
-
description: z.ZodOptional<z.ZodString>;
|
|
210
|
-
permit: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
-
}, z.core.$strip>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
212
|
-
user: z.ZodString;
|
|
213
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
214
|
-
record: z.ZodString;
|
|
215
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
216
|
-
oldRecord: z.ZodString;
|
|
217
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
-
newRecord: z.ZodString;
|
|
219
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
220
|
-
in: "in";
|
|
221
|
-
"=": "=";
|
|
222
|
-
"!=": "!=";
|
|
223
|
-
"not in": "not in";
|
|
224
|
-
hasAny: "hasAny";
|
|
225
|
-
"not hasAny": "not hasAny";
|
|
226
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
227
|
-
user: z.ZodString;
|
|
228
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
229
|
-
record: z.ZodString;
|
|
230
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
-
oldRecord: z.ZodString;
|
|
232
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
-
newRecord: z.ZodString;
|
|
234
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
235
|
-
user: z.ZodString;
|
|
236
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
237
|
-
record: z.ZodString;
|
|
238
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
-
oldRecord: z.ZodString;
|
|
240
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
241
|
-
newRecord: z.ZodString;
|
|
242
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
243
|
-
in: "in";
|
|
244
|
-
"=": "=";
|
|
245
|
-
"!=": "!=";
|
|
246
|
-
"not in": "not in";
|
|
247
|
-
hasAny: "hasAny";
|
|
248
|
-
"not hasAny": "not hasAny";
|
|
249
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
250
|
-
user: z.ZodString;
|
|
251
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
252
|
-
record: z.ZodString;
|
|
253
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
-
oldRecord: z.ZodString;
|
|
255
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
256
|
-
newRecord: z.ZodString;
|
|
257
|
-
}, z.core.$strip>]>, z.ZodBoolean], null>>, z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
258
|
-
user: z.ZodString;
|
|
259
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
260
|
-
record: z.ZodString;
|
|
261
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
262
|
-
oldRecord: z.ZodString;
|
|
263
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
-
newRecord: z.ZodString;
|
|
265
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
266
|
-
in: "in";
|
|
267
|
-
"=": "=";
|
|
268
|
-
"!=": "!=";
|
|
269
|
-
"not in": "not in";
|
|
270
|
-
hasAny: "hasAny";
|
|
271
|
-
"not hasAny": "not hasAny";
|
|
272
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
273
|
-
user: z.ZodString;
|
|
274
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
275
|
-
record: z.ZodString;
|
|
276
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
277
|
-
oldRecord: z.ZodString;
|
|
278
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
-
newRecord: z.ZodString;
|
|
280
|
-
}, z.core.$strip>]>], null>>, z.ZodBoolean]>>>]>>>;
|
|
281
|
-
update: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
282
|
-
conditions: z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
283
|
-
user: z.ZodString;
|
|
284
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
285
|
-
record: z.ZodString;
|
|
286
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
287
|
-
oldRecord: z.ZodString;
|
|
288
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
-
newRecord: z.ZodString;
|
|
290
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
291
|
-
in: "in";
|
|
292
|
-
"=": "=";
|
|
293
|
-
"!=": "!=";
|
|
294
|
-
"not in": "not in";
|
|
295
|
-
hasAny: "hasAny";
|
|
296
|
-
"not hasAny": "not hasAny";
|
|
297
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
298
|
-
user: z.ZodString;
|
|
299
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
300
|
-
record: z.ZodString;
|
|
301
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
302
|
-
oldRecord: z.ZodString;
|
|
303
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
304
|
-
newRecord: z.ZodString;
|
|
305
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
306
|
-
user: z.ZodString;
|
|
307
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
308
|
-
record: z.ZodString;
|
|
309
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
310
|
-
oldRecord: z.ZodString;
|
|
311
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
-
newRecord: z.ZodString;
|
|
313
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
314
|
-
in: "in";
|
|
315
|
-
"=": "=";
|
|
316
|
-
"!=": "!=";
|
|
317
|
-
"not in": "not in";
|
|
318
|
-
hasAny: "hasAny";
|
|
319
|
-
"not hasAny": "not hasAny";
|
|
320
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
321
|
-
user: z.ZodString;
|
|
322
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
323
|
-
record: z.ZodString;
|
|
324
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
-
oldRecord: z.ZodString;
|
|
326
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
-
newRecord: z.ZodString;
|
|
328
|
-
}, z.core.$strip>]>], null>>>>]>;
|
|
329
|
-
description: z.ZodOptional<z.ZodString>;
|
|
330
|
-
permit: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
-
}, z.core.$strip>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
332
|
-
user: z.ZodString;
|
|
333
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
334
|
-
record: z.ZodString;
|
|
335
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
336
|
-
oldRecord: z.ZodString;
|
|
337
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
338
|
-
newRecord: z.ZodString;
|
|
339
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
340
|
-
in: "in";
|
|
341
|
-
"=": "=";
|
|
342
|
-
"!=": "!=";
|
|
343
|
-
"not in": "not in";
|
|
344
|
-
hasAny: "hasAny";
|
|
345
|
-
"not hasAny": "not hasAny";
|
|
346
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
347
|
-
user: z.ZodString;
|
|
348
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
349
|
-
record: z.ZodString;
|
|
350
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
-
oldRecord: z.ZodString;
|
|
352
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
353
|
-
newRecord: z.ZodString;
|
|
354
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
355
|
-
user: z.ZodString;
|
|
356
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
357
|
-
record: z.ZodString;
|
|
358
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
359
|
-
oldRecord: z.ZodString;
|
|
360
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
361
|
-
newRecord: z.ZodString;
|
|
362
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
363
|
-
in: "in";
|
|
364
|
-
"=": "=";
|
|
365
|
-
"!=": "!=";
|
|
366
|
-
"not in": "not in";
|
|
367
|
-
hasAny: "hasAny";
|
|
368
|
-
"not hasAny": "not hasAny";
|
|
369
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
370
|
-
user: z.ZodString;
|
|
371
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
372
|
-
record: z.ZodString;
|
|
373
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
374
|
-
oldRecord: z.ZodString;
|
|
375
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
-
newRecord: z.ZodString;
|
|
377
|
-
}, z.core.$strip>]>, z.ZodBoolean], null>>, z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
378
|
-
user: z.ZodString;
|
|
379
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
380
|
-
record: z.ZodString;
|
|
381
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
382
|
-
oldRecord: z.ZodString;
|
|
383
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
384
|
-
newRecord: z.ZodString;
|
|
385
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
386
|
-
in: "in";
|
|
387
|
-
"=": "=";
|
|
388
|
-
"!=": "!=";
|
|
389
|
-
"not in": "not in";
|
|
390
|
-
hasAny: "hasAny";
|
|
391
|
-
"not hasAny": "not hasAny";
|
|
392
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
393
|
-
user: z.ZodString;
|
|
394
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
395
|
-
record: z.ZodString;
|
|
396
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
-
oldRecord: z.ZodString;
|
|
398
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
399
|
-
newRecord: z.ZodString;
|
|
400
|
-
}, z.core.$strip>]>], null>>, z.ZodBoolean]>>>]>>>;
|
|
401
|
-
delete: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
402
|
-
conditions: z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
403
|
-
user: z.ZodString;
|
|
404
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
405
|
-
record: z.ZodString;
|
|
406
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
-
oldRecord: z.ZodString;
|
|
408
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
409
|
-
newRecord: z.ZodString;
|
|
410
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
411
|
-
in: "in";
|
|
412
|
-
"=": "=";
|
|
413
|
-
"!=": "!=";
|
|
414
|
-
"not in": "not in";
|
|
415
|
-
hasAny: "hasAny";
|
|
416
|
-
"not hasAny": "not hasAny";
|
|
417
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
418
|
-
user: z.ZodString;
|
|
419
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
420
|
-
record: z.ZodString;
|
|
421
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
422
|
-
oldRecord: z.ZodString;
|
|
423
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
424
|
-
newRecord: z.ZodString;
|
|
425
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
426
|
-
user: z.ZodString;
|
|
427
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
428
|
-
record: z.ZodString;
|
|
429
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
430
|
-
oldRecord: z.ZodString;
|
|
431
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
432
|
-
newRecord: z.ZodString;
|
|
433
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
434
|
-
in: "in";
|
|
435
|
-
"=": "=";
|
|
436
|
-
"!=": "!=";
|
|
437
|
-
"not in": "not in";
|
|
438
|
-
hasAny: "hasAny";
|
|
439
|
-
"not hasAny": "not hasAny";
|
|
440
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
441
|
-
user: z.ZodString;
|
|
442
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
443
|
-
record: z.ZodString;
|
|
444
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
445
|
-
oldRecord: z.ZodString;
|
|
446
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
-
newRecord: z.ZodString;
|
|
448
|
-
}, z.core.$strip>]>], null>>>>]>;
|
|
449
|
-
description: z.ZodOptional<z.ZodString>;
|
|
450
|
-
permit: z.ZodOptional<z.ZodBoolean>;
|
|
451
|
-
}, z.core.$strip>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
452
|
-
user: z.ZodString;
|
|
453
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
454
|
-
record: z.ZodString;
|
|
455
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
456
|
-
oldRecord: z.ZodString;
|
|
457
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
458
|
-
newRecord: z.ZodString;
|
|
459
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
460
|
-
in: "in";
|
|
461
|
-
"=": "=";
|
|
462
|
-
"!=": "!=";
|
|
463
|
-
"not in": "not in";
|
|
464
|
-
hasAny: "hasAny";
|
|
465
|
-
"not hasAny": "not hasAny";
|
|
466
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
467
|
-
user: z.ZodString;
|
|
468
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
469
|
-
record: z.ZodString;
|
|
470
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
471
|
-
oldRecord: z.ZodString;
|
|
472
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
473
|
-
newRecord: z.ZodString;
|
|
474
|
-
}, z.core.$strip>]>], null>>, z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
475
|
-
user: z.ZodString;
|
|
476
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
477
|
-
record: z.ZodString;
|
|
478
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
479
|
-
oldRecord: z.ZodString;
|
|
480
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
481
|
-
newRecord: z.ZodString;
|
|
482
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
483
|
-
in: "in";
|
|
484
|
-
"=": "=";
|
|
485
|
-
"!=": "!=";
|
|
486
|
-
"not in": "not in";
|
|
487
|
-
hasAny: "hasAny";
|
|
488
|
-
"not hasAny": "not hasAny";
|
|
489
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
490
|
-
user: z.ZodString;
|
|
491
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
492
|
-
record: z.ZodString;
|
|
493
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
494
|
-
oldRecord: z.ZodString;
|
|
495
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
496
|
-
newRecord: z.ZodString;
|
|
497
|
-
}, z.core.$strip>]>, z.ZodBoolean], null>>, z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
498
|
-
user: z.ZodString;
|
|
499
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
500
|
-
record: z.ZodString;
|
|
501
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
502
|
-
oldRecord: z.ZodString;
|
|
503
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
504
|
-
newRecord: z.ZodString;
|
|
505
|
-
}, z.core.$strip>]>, z.ZodEnum<{
|
|
506
|
-
in: "in";
|
|
507
|
-
"=": "=";
|
|
508
|
-
"!=": "!=";
|
|
509
|
-
"not in": "not in";
|
|
510
|
-
hasAny: "hasAny";
|
|
511
|
-
"not hasAny": "not hasAny";
|
|
512
|
-
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
513
|
-
user: z.ZodString;
|
|
514
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodObject<{
|
|
515
|
-
record: z.ZodString;
|
|
516
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
517
|
-
oldRecord: z.ZodString;
|
|
518
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
519
|
-
newRecord: z.ZodString;
|
|
520
|
-
}, z.core.$strip>]>], null>>, z.ZodBoolean]>>>]>>>;
|
|
521
|
-
}, z.core.$strip>>;
|
|
522
|
-
gql: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
523
|
-
conditions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodUnion<readonly [z.ZodObject<{
|
|
524
|
-
user: z.ZodString;
|
|
525
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>, z.ZodEnum<{
|
|
526
|
-
in: "in";
|
|
527
|
-
"=": "=";
|
|
528
|
-
"!=": "!=";
|
|
529
|
-
"not in": "not in";
|
|
530
|
-
hasAny: "hasAny";
|
|
531
|
-
"not hasAny": "not hasAny";
|
|
532
|
-
}>, z.ZodUnion<readonly [z.ZodObject<{
|
|
533
|
-
user: z.ZodString;
|
|
534
|
-
}, z.core.$strict>, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>], null>>>>;
|
|
535
|
-
actions: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
536
|
-
create: "create";
|
|
537
|
-
delete: "delete";
|
|
538
|
-
update: "update";
|
|
539
|
-
read: "read";
|
|
540
|
-
aggregate: "aggregate";
|
|
541
|
-
bulkUpsert: "bulkUpsert";
|
|
542
|
-
}>>>]>;
|
|
543
|
-
permit: z.ZodOptional<z.ZodBoolean>;
|
|
544
|
-
description: z.ZodOptional<z.ZodString>;
|
|
545
|
-
}, z.core.$strip>>>>;
|
|
546
|
-
}, z.core.$strip>;
|
|
547
|
-
/**
|
|
548
|
-
* Schema for TailorDB service configuration.
|
|
549
|
-
* Normalizes gqlOperations from alias ("query") to object format.
|
|
550
|
-
*/
|
|
551
|
-
declare const TailorDBServiceConfigSchema: z.ZodObject<{
|
|
552
|
-
files: z.ZodArray<z.ZodString>;
|
|
553
|
-
ignores: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
554
|
-
erdSite: z.ZodOptional<z.ZodString>;
|
|
555
|
-
migration: z.ZodOptional<z.ZodObject<{
|
|
556
|
-
directory: z.ZodString;
|
|
557
|
-
machineUser: z.ZodOptional<z.ZodString>;
|
|
558
|
-
}, z.core.$strip>>;
|
|
559
|
-
gqlOperations: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodObject<{
|
|
560
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
561
|
-
update: z.ZodOptional<z.ZodBoolean>;
|
|
562
|
-
delete: z.ZodOptional<z.ZodBoolean>;
|
|
563
|
-
read: z.ZodOptional<z.ZodBoolean>;
|
|
564
|
-
}, z.core.$strip>]>, z.ZodTransform<GqlOperations, "query" | {
|
|
565
|
-
create?: boolean | undefined;
|
|
566
|
-
update?: boolean | undefined;
|
|
567
|
-
delete?: boolean | undefined;
|
|
568
|
-
read?: boolean | undefined;
|
|
569
|
-
}>>>;
|
|
570
|
-
}, z.core.$strip>;
|
|
571
|
-
/**
|
|
572
|
-
* Input type for TailorDB service configuration (before schema parsing).
|
|
573
|
-
* gqlOperations accepts both alias ("query") and object format.
|
|
574
|
-
*/
|
|
575
|
-
type TailorDBServiceConfigInput = z.input<typeof TailorDBServiceConfigSchema>;
|
|
576
|
-
type TailorDBExternalConfig = {
|
|
577
|
-
external: true;
|
|
238
|
+
//#region src/types/executor.generated.d.ts
|
|
239
|
+
type RecordTrigger = {
|
|
240
|
+
/** Record event type */
|
|
241
|
+
kind: "recordCreated" | "recordUpdated" | "recordDeleted";
|
|
242
|
+
/** TailorDB type name to watch for events */
|
|
243
|
+
typeName: string;
|
|
244
|
+
/** Condition function to filter events */
|
|
245
|
+
condition?: Function | undefined;
|
|
578
246
|
};
|
|
579
|
-
type
|
|
580
|
-
|
|
247
|
+
type ResolverExecutedTrigger = {
|
|
248
|
+
kind: "resolverExecuted";
|
|
249
|
+
/** Name of the resolver to trigger on */
|
|
250
|
+
resolverName: string;
|
|
251
|
+
/** Condition function to filter events */
|
|
252
|
+
condition?: Function | undefined;
|
|
253
|
+
};
|
|
254
|
+
type ScheduleTriggerInput = {
|
|
255
|
+
kind: "schedule";
|
|
256
|
+
/** CRON expression for the schedule */
|
|
257
|
+
cron: string;
|
|
258
|
+
/** Timezone for the CRON schedule (default: UTC) */
|
|
259
|
+
timezone?: string | undefined;
|
|
260
|
+
};
|
|
261
|
+
type IncomingWebhookTrigger = {
|
|
262
|
+
kind: "incomingWebhook";
|
|
263
|
+
};
|
|
264
|
+
type IdpUserTrigger = {
|
|
265
|
+
/** IdP user event type */
|
|
266
|
+
kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
|
|
267
|
+
};
|
|
268
|
+
type AuthAccessTokenTrigger = {
|
|
269
|
+
/** Auth access token event type */
|
|
270
|
+
kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
|
|
271
|
+
};
|
|
272
|
+
type FunctionOperation = {
|
|
273
|
+
kind: "function" | "jobFunction";
|
|
274
|
+
/** Function implementation */
|
|
275
|
+
body: Function;
|
|
276
|
+
/** Auth invoker for the function execution */
|
|
277
|
+
authInvoker?: {
|
|
278
|
+
namespace: string;
|
|
279
|
+
machineUserName: string;
|
|
280
|
+
} | undefined;
|
|
281
|
+
};
|
|
282
|
+
type GqlOperation = {
|
|
283
|
+
kind: "graphql";
|
|
284
|
+
query: string;
|
|
285
|
+
/** Target application name for the GraphQL query */
|
|
286
|
+
appName?: string | undefined;
|
|
287
|
+
/** Function to compute GraphQL variables */
|
|
288
|
+
variables?: Function | undefined;
|
|
289
|
+
/** Auth invoker for the GraphQL execution */
|
|
290
|
+
authInvoker?: {
|
|
291
|
+
namespace: string;
|
|
292
|
+
machineUserName: string;
|
|
293
|
+
} | undefined;
|
|
294
|
+
};
|
|
295
|
+
type WebhookOperation = {
|
|
296
|
+
kind: "webhook";
|
|
297
|
+
/** Function returning the webhook URL */
|
|
298
|
+
url: Function;
|
|
299
|
+
/** Function to compute the request body */
|
|
300
|
+
requestBody?: Function | undefined;
|
|
301
|
+
/** HTTP headers for the webhook request */
|
|
302
|
+
headers?: {
|
|
303
|
+
[x: string]: string | {
|
|
304
|
+
vault: string;
|
|
305
|
+
key: string;
|
|
306
|
+
};
|
|
307
|
+
} | undefined;
|
|
308
|
+
};
|
|
309
|
+
type WorkflowOperation = {
|
|
310
|
+
kind: "workflow";
|
|
311
|
+
workflowName: string;
|
|
312
|
+
args?: Function | {
|
|
313
|
+
[x: string]: unknown;
|
|
314
|
+
} | undefined;
|
|
315
|
+
authInvoker?: {
|
|
316
|
+
namespace: string;
|
|
317
|
+
machineUserName: string;
|
|
318
|
+
} | undefined;
|
|
319
|
+
};
|
|
320
|
+
type ExecutorInput = {
|
|
321
|
+
/** Executor name */
|
|
322
|
+
name: string;
|
|
323
|
+
/** Event trigger configuration */
|
|
324
|
+
trigger: {
|
|
325
|
+
kind: "recordCreated" | "recordUpdated" | "recordDeleted";
|
|
326
|
+
typeName: string;
|
|
327
|
+
condition?: Function | undefined;
|
|
328
|
+
} | {
|
|
329
|
+
kind: "resolverExecuted";
|
|
330
|
+
resolverName: string;
|
|
331
|
+
condition?: Function | undefined;
|
|
332
|
+
} | {
|
|
333
|
+
kind: "schedule";
|
|
334
|
+
cron: string;
|
|
335
|
+
timezone?: string | undefined;
|
|
336
|
+
} | {
|
|
337
|
+
kind: "incomingWebhook";
|
|
338
|
+
} | {
|
|
339
|
+
kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
|
|
340
|
+
} | {
|
|
341
|
+
kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
|
|
342
|
+
};
|
|
343
|
+
/** Operation to execute when triggered */
|
|
344
|
+
operation: unknown;
|
|
345
|
+
/** Executor description */
|
|
346
|
+
description?: string | undefined;
|
|
347
|
+
/** Whether the executor is disabled */
|
|
348
|
+
disabled?: boolean | undefined;
|
|
349
|
+
};
|
|
350
|
+
type Executor = {
|
|
351
|
+
/** Executor name */
|
|
352
|
+
name: string;
|
|
353
|
+
/** Whether the executor is disabled */
|
|
354
|
+
disabled: boolean;
|
|
355
|
+
/** Event trigger configuration */
|
|
356
|
+
trigger: {
|
|
357
|
+
kind: "recordCreated" | "recordUpdated" | "recordDeleted";
|
|
358
|
+
typeName: string;
|
|
359
|
+
condition?: Function | undefined;
|
|
360
|
+
} | {
|
|
361
|
+
kind: "resolverExecuted";
|
|
362
|
+
resolverName: string;
|
|
363
|
+
condition?: Function | undefined;
|
|
364
|
+
} | {
|
|
365
|
+
kind: "schedule";
|
|
366
|
+
cron: string;
|
|
367
|
+
timezone: string;
|
|
368
|
+
} | {
|
|
369
|
+
kind: "incomingWebhook";
|
|
370
|
+
} | {
|
|
371
|
+
kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
|
|
372
|
+
} | {
|
|
373
|
+
kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
|
|
374
|
+
};
|
|
375
|
+
/** Operation to execute when triggered */
|
|
376
|
+
operation: {
|
|
377
|
+
kind: "workflow";
|
|
378
|
+
workflowName: string;
|
|
379
|
+
args?: Function | {
|
|
380
|
+
[x: string]: unknown;
|
|
381
|
+
} | undefined;
|
|
382
|
+
authInvoker?: {
|
|
383
|
+
namespace: string;
|
|
384
|
+
machineUserName: string;
|
|
385
|
+
} | undefined;
|
|
386
|
+
} | {
|
|
387
|
+
kind: "function" | "jobFunction";
|
|
388
|
+
body: Function;
|
|
389
|
+
authInvoker?: {
|
|
390
|
+
namespace: string;
|
|
391
|
+
machineUserName: string;
|
|
392
|
+
} | undefined;
|
|
393
|
+
} | {
|
|
394
|
+
kind: "graphql";
|
|
395
|
+
query: string;
|
|
396
|
+
appName?: string | undefined;
|
|
397
|
+
variables?: Function | undefined;
|
|
398
|
+
authInvoker?: {
|
|
399
|
+
namespace: string;
|
|
400
|
+
machineUserName: string;
|
|
401
|
+
} | undefined;
|
|
402
|
+
} | {
|
|
403
|
+
kind: "webhook";
|
|
404
|
+
url: Function;
|
|
405
|
+
requestBody?: Function | undefined;
|
|
406
|
+
headers?: {
|
|
407
|
+
[x: string]: string | {
|
|
408
|
+
vault: string;
|
|
409
|
+
key: string;
|
|
410
|
+
};
|
|
411
|
+
} | undefined;
|
|
412
|
+
};
|
|
413
|
+
/** Executor description */
|
|
414
|
+
description?: string | undefined;
|
|
415
|
+
};
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/types/generator-config.d.ts
|
|
418
|
+
type GeneratorConfig = z.input<typeof BaseGeneratorConfigSchema>;
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region src/types/resolver.generated.d.ts
|
|
421
|
+
type TailorFieldInput = {
|
|
422
|
+
/** Field data type */
|
|
423
|
+
type: "string" | "boolean" | "uuid" | "integer" | "float" | "decimal" | "enum" | "date" | "datetime" | "time" | "nested";
|
|
424
|
+
/** Field metadata configuration */
|
|
425
|
+
metadata: {
|
|
426
|
+
required?: boolean | undefined;
|
|
427
|
+
array?: boolean | undefined;
|
|
428
|
+
description?: string | undefined;
|
|
429
|
+
allowedValues?: {
|
|
430
|
+
value: string;
|
|
431
|
+
description?: string | undefined;
|
|
432
|
+
}[] | undefined;
|
|
433
|
+
hooks?: {
|
|
434
|
+
create?: Function | undefined;
|
|
435
|
+
update?: Function | undefined;
|
|
436
|
+
} | undefined;
|
|
437
|
+
typeName?: string | undefined;
|
|
438
|
+
};
|
|
439
|
+
fields: {
|
|
440
|
+
[x: string]: TailorFieldInput;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
type Resolver = {
|
|
444
|
+
/** GraphQL operation type (query or mutation) */
|
|
445
|
+
operation: "query" | "mutation";
|
|
446
|
+
/** Resolver name */
|
|
447
|
+
name: string;
|
|
448
|
+
/** Resolver implementation function */
|
|
449
|
+
body: Function;
|
|
450
|
+
/** Output field definition */
|
|
451
|
+
output: {
|
|
452
|
+
type: "string" | "boolean" | "date" | "enum" | "uuid" | "integer" | "float" | "decimal" | "datetime" | "time" | "nested";
|
|
453
|
+
metadata: {
|
|
454
|
+
required?: boolean | undefined;
|
|
455
|
+
array?: boolean | undefined;
|
|
456
|
+
/** Resolver description */
|
|
457
|
+
description?: string | undefined;
|
|
458
|
+
allowedValues?: {
|
|
459
|
+
value: string;
|
|
460
|
+
/** Resolver description */
|
|
461
|
+
description?: string | undefined;
|
|
462
|
+
}[] | undefined;
|
|
463
|
+
hooks?: {
|
|
464
|
+
create?: Function | undefined;
|
|
465
|
+
update?: Function | undefined;
|
|
466
|
+
} | undefined;
|
|
467
|
+
typeName?: string | undefined;
|
|
468
|
+
};
|
|
469
|
+
fields: {
|
|
470
|
+
[x: string]: any;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
/** Resolver description */
|
|
474
|
+
description?: string | undefined;
|
|
475
|
+
/** Input field definitions */
|
|
476
|
+
input?: {
|
|
477
|
+
[x: string]: any;
|
|
478
|
+
} | undefined;
|
|
479
|
+
/** Enable publishing events from this resolver */
|
|
480
|
+
publishEvents?: boolean | undefined;
|
|
581
481
|
};
|
|
482
|
+
type ResolverInput = Resolver;
|
|
582
483
|
//#endregion
|
|
583
484
|
//#region src/configure/types/field.d.ts
|
|
584
485
|
type AllowedValue = EnumValue;
|
|
@@ -622,34 +523,6 @@ type TailorUser = {
|
|
|
622
523
|
/** Represents an unauthenticated user in the Tailor platform. */
|
|
623
524
|
declare const unauthenticatedTailorUser: TailorUser;
|
|
624
525
|
//#endregion
|
|
625
|
-
//#region src/configure/types/actor.d.ts
|
|
626
|
-
/** User type enum values from the Tailor Platform server. */
|
|
627
|
-
type TailorActorType = "USER_TYPE_USER" | "USER_TYPE_MACHINE_USER" | "USER_TYPE_UNSPECIFIED";
|
|
628
|
-
/** Represents an actor in event triggers. */
|
|
629
|
-
type TailorActor = {
|
|
630
|
-
/** The ID of the workspace the user belongs to. */
|
|
631
|
-
workspaceId: string;
|
|
632
|
-
/** The ID of the user. */
|
|
633
|
-
userId: string;
|
|
634
|
-
/**
|
|
635
|
-
* A map of the user's attributes.
|
|
636
|
-
* Maps from server's `attributeMap` field.
|
|
637
|
-
*/
|
|
638
|
-
attributes: InferredAttributeMap | null;
|
|
639
|
-
/**
|
|
640
|
-
* A list of the user's attributes.
|
|
641
|
-
* Maps from server's `attributes` field.
|
|
642
|
-
*/
|
|
643
|
-
attributeList: InferredAttributeList;
|
|
644
|
-
/** The type of the user. */
|
|
645
|
-
userType: TailorActorType;
|
|
646
|
-
};
|
|
647
|
-
//#endregion
|
|
648
|
-
//#region src/configure/types/env.d.ts
|
|
649
|
-
interface Env {}
|
|
650
|
-
/** Represents environment variables in the Tailor platform. */
|
|
651
|
-
type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
|
|
652
|
-
//#endregion
|
|
653
526
|
//#region src/configure/types/helpers.d.ts
|
|
654
527
|
type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
|
|
655
528
|
type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
|
|
@@ -671,122 +544,6 @@ type JsonCompatible<T> = T extends string | number | boolean | null | undefined
|
|
|
671
544
|
toJSON: () => unknown;
|
|
672
545
|
} ? never : { [K in keyof T]: JsonCompatible<T[K]> } : never;
|
|
673
546
|
//#endregion
|
|
674
|
-
//#region src/parser/service/resolver/schema.d.ts
|
|
675
|
-
declare const QueryTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodLiteral<"mutation">]>;
|
|
676
|
-
declare const TailorFieldSchema: z.ZodObject<{
|
|
677
|
-
type: z.ZodEnum<{
|
|
678
|
-
string: "string";
|
|
679
|
-
boolean: "boolean";
|
|
680
|
-
uuid: "uuid";
|
|
681
|
-
integer: "integer";
|
|
682
|
-
float: "float";
|
|
683
|
-
decimal: "decimal";
|
|
684
|
-
enum: "enum";
|
|
685
|
-
date: "date";
|
|
686
|
-
datetime: "datetime";
|
|
687
|
-
time: "time";
|
|
688
|
-
nested: "nested";
|
|
689
|
-
}>;
|
|
690
|
-
metadata: z.ZodObject<{
|
|
691
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
692
|
-
array: z.ZodOptional<z.ZodBoolean>;
|
|
693
|
-
description: z.ZodOptional<z.ZodString>;
|
|
694
|
-
allowedValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
695
|
-
value: z.ZodString;
|
|
696
|
-
description: z.ZodOptional<z.ZodString>;
|
|
697
|
-
}, z.core.$strip>>>;
|
|
698
|
-
hooks: z.ZodOptional<z.ZodObject<{
|
|
699
|
-
create: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
700
|
-
update: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
701
|
-
}, z.core.$strip>>;
|
|
702
|
-
typeName: z.ZodOptional<z.ZodString>;
|
|
703
|
-
}, z.core.$strip>;
|
|
704
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject< /*elided*/any, z.core.$strip>>;
|
|
705
|
-
}, z.core.$strip>;
|
|
706
|
-
declare const ResolverSchema: z.ZodObject<{
|
|
707
|
-
operation: z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodLiteral<"mutation">]>;
|
|
708
|
-
name: z.ZodString;
|
|
709
|
-
description: z.ZodOptional<z.ZodString>;
|
|
710
|
-
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
711
|
-
type: z.ZodEnum<{
|
|
712
|
-
string: "string";
|
|
713
|
-
boolean: "boolean";
|
|
714
|
-
uuid: "uuid";
|
|
715
|
-
integer: "integer";
|
|
716
|
-
float: "float";
|
|
717
|
-
decimal: "decimal";
|
|
718
|
-
enum: "enum";
|
|
719
|
-
date: "date";
|
|
720
|
-
datetime: "datetime";
|
|
721
|
-
time: "time";
|
|
722
|
-
nested: "nested";
|
|
723
|
-
}>;
|
|
724
|
-
metadata: z.ZodObject<{
|
|
725
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
726
|
-
array: z.ZodOptional<z.ZodBoolean>;
|
|
727
|
-
description: z.ZodOptional<z.ZodString>;
|
|
728
|
-
allowedValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
729
|
-
value: z.ZodString;
|
|
730
|
-
description: z.ZodOptional<z.ZodString>;
|
|
731
|
-
}, z.core.$strip>>>;
|
|
732
|
-
hooks: z.ZodOptional<z.ZodObject<{
|
|
733
|
-
create: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
734
|
-
update: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
735
|
-
}, z.core.$strip>>;
|
|
736
|
-
typeName: z.ZodOptional<z.ZodString>;
|
|
737
|
-
}, z.core.$strip>;
|
|
738
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject< /*elided*/any, z.core.$strip>>;
|
|
739
|
-
}, z.core.$strip>>>;
|
|
740
|
-
body: z.ZodCustom<Function, Function>;
|
|
741
|
-
output: z.ZodObject<{
|
|
742
|
-
type: z.ZodEnum<{
|
|
743
|
-
string: "string";
|
|
744
|
-
boolean: "boolean";
|
|
745
|
-
uuid: "uuid";
|
|
746
|
-
integer: "integer";
|
|
747
|
-
float: "float";
|
|
748
|
-
decimal: "decimal";
|
|
749
|
-
enum: "enum";
|
|
750
|
-
date: "date";
|
|
751
|
-
datetime: "datetime";
|
|
752
|
-
time: "time";
|
|
753
|
-
nested: "nested";
|
|
754
|
-
}>;
|
|
755
|
-
metadata: z.ZodObject<{
|
|
756
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
757
|
-
array: z.ZodOptional<z.ZodBoolean>;
|
|
758
|
-
description: z.ZodOptional<z.ZodString>;
|
|
759
|
-
allowedValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
760
|
-
value: z.ZodString;
|
|
761
|
-
description: z.ZodOptional<z.ZodString>;
|
|
762
|
-
}, z.core.$strip>>>;
|
|
763
|
-
hooks: z.ZodOptional<z.ZodObject<{
|
|
764
|
-
create: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
765
|
-
update: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
766
|
-
}, z.core.$strip>>;
|
|
767
|
-
typeName: z.ZodOptional<z.ZodString>;
|
|
768
|
-
}, z.core.$strip>;
|
|
769
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject< /*elided*/any, z.core.$strip>>;
|
|
770
|
-
}, z.core.$strip>;
|
|
771
|
-
publishEvents: z.ZodOptional<z.ZodBoolean>;
|
|
772
|
-
}, z.core.$strip>;
|
|
773
|
-
//#endregion
|
|
774
|
-
//#region src/parser/service/resolver/types.d.ts
|
|
775
|
-
type TailorFieldInput = z.input<typeof TailorFieldSchema>;
|
|
776
|
-
type QueryType = z.output<typeof QueryTypeSchema>;
|
|
777
|
-
type ResolverInput = z.input<typeof ResolverSchema>;
|
|
778
|
-
type Resolver = z.output<typeof ResolverSchema>;
|
|
779
|
-
type ResolverServiceConfig = {
|
|
780
|
-
files: string[];
|
|
781
|
-
ignores?: string[];
|
|
782
|
-
};
|
|
783
|
-
type ResolverExternalConfig = {
|
|
784
|
-
external: true;
|
|
785
|
-
};
|
|
786
|
-
type ResolverServiceInput = {
|
|
787
|
-
[namespace: string]: ResolverServiceConfig | ResolverExternalConfig;
|
|
788
|
-
};
|
|
789
|
-
//#endregion
|
|
790
547
|
//#region src/configure/types/type.d.ts
|
|
791
548
|
type TailorAnyField = TailorField<any>;
|
|
792
549
|
type FieldParseArgs = {
|
|
@@ -1062,6 +819,221 @@ declare const unsafeAllowAllTypePermission: TailorTypePermission;
|
|
|
1062
819
|
*/
|
|
1063
820
|
declare const unsafeAllowAllGqlPermission: TailorTypeGqlPermission;
|
|
1064
821
|
//#endregion
|
|
822
|
+
//#region src/types/tailordb.generated.d.ts
|
|
823
|
+
/**
|
|
824
|
+
* Configuration for GraphQL operations on a TailorDB type.
|
|
825
|
+
* All operations are enabled by default (undefined or true = enabled, false = disabled).
|
|
826
|
+
*/
|
|
827
|
+
type GqlOperationsInput = "query" | {
|
|
828
|
+
create?: boolean | undefined;
|
|
829
|
+
update?: boolean | undefined;
|
|
830
|
+
delete?: boolean | undefined;
|
|
831
|
+
read?: boolean | undefined;
|
|
832
|
+
};
|
|
833
|
+
type TailorDBTypeParsedSettings = {
|
|
834
|
+
/** Custom plural form of the type name for GraphQL */
|
|
835
|
+
pluralForm?: string | undefined;
|
|
836
|
+
/** Enable aggregation queries for this type */
|
|
837
|
+
aggregation?: boolean | undefined;
|
|
838
|
+
/** Enable bulk upsert mutation for this type */
|
|
839
|
+
bulkUpsert?: boolean | undefined;
|
|
840
|
+
/** Configure GraphQL operations for this type. Use "query" for read-only mode, or an object for granular control. */
|
|
841
|
+
gqlOperations?: {
|
|
842
|
+
create?: boolean | undefined;
|
|
843
|
+
update?: boolean | undefined;
|
|
844
|
+
delete?: boolean | undefined;
|
|
845
|
+
read?: boolean | undefined;
|
|
846
|
+
} | undefined;
|
|
847
|
+
/**
|
|
848
|
+
* Enable publishing events for this type.
|
|
849
|
+
* When enabled, record creation/update/deletion events are published.
|
|
850
|
+
* If not specified, this is automatically set to true when an executor uses this type
|
|
851
|
+
* with recordCreated/recordUpdated/recordDeleted triggers. If explicitly set to false
|
|
852
|
+
* while an executor uses this type, an error will be thrown during apply.
|
|
853
|
+
*/
|
|
854
|
+
publishEvents?: boolean | undefined;
|
|
855
|
+
};
|
|
856
|
+
type RawPermissions = {
|
|
857
|
+
record?: {
|
|
858
|
+
create: readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
859
|
+
user: string;
|
|
860
|
+
} | {
|
|
861
|
+
record: string;
|
|
862
|
+
} | {
|
|
863
|
+
oldRecord: string;
|
|
864
|
+
} | {
|
|
865
|
+
newRecord: string;
|
|
866
|
+
})[] | readonly (boolean | readonly (string | boolean | string[] | boolean[] | {
|
|
867
|
+
user: string;
|
|
868
|
+
} | {
|
|
869
|
+
record: string;
|
|
870
|
+
} | {
|
|
871
|
+
oldRecord: string;
|
|
872
|
+
} | {
|
|
873
|
+
newRecord: string;
|
|
874
|
+
})[])[] | {
|
|
875
|
+
conditions: readonly (string | boolean | string[] | boolean[] | {
|
|
876
|
+
user: string;
|
|
877
|
+
} | {
|
|
878
|
+
record: string;
|
|
879
|
+
} | {
|
|
880
|
+
oldRecord: string;
|
|
881
|
+
} | {
|
|
882
|
+
newRecord: string;
|
|
883
|
+
})[] | readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
884
|
+
user: string;
|
|
885
|
+
} | {
|
|
886
|
+
record: string;
|
|
887
|
+
} | {
|
|
888
|
+
oldRecord: string;
|
|
889
|
+
} | {
|
|
890
|
+
newRecord: string;
|
|
891
|
+
})[])[];
|
|
892
|
+
description?: string | undefined;
|
|
893
|
+
permit?: boolean | undefined;
|
|
894
|
+
})[];
|
|
895
|
+
read: readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
896
|
+
user: string;
|
|
897
|
+
} | {
|
|
898
|
+
record: string;
|
|
899
|
+
} | {
|
|
900
|
+
oldRecord: string;
|
|
901
|
+
} | {
|
|
902
|
+
newRecord: string;
|
|
903
|
+
})[] | readonly (boolean | readonly (string | boolean | string[] | boolean[] | {
|
|
904
|
+
user: string;
|
|
905
|
+
} | {
|
|
906
|
+
record: string;
|
|
907
|
+
} | {
|
|
908
|
+
oldRecord: string;
|
|
909
|
+
} | {
|
|
910
|
+
newRecord: string;
|
|
911
|
+
})[])[] | {
|
|
912
|
+
conditions: readonly (string | boolean | string[] | boolean[] | {
|
|
913
|
+
user: string;
|
|
914
|
+
} | {
|
|
915
|
+
record: string;
|
|
916
|
+
} | {
|
|
917
|
+
oldRecord: string;
|
|
918
|
+
} | {
|
|
919
|
+
newRecord: string;
|
|
920
|
+
})[] | readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
921
|
+
user: string;
|
|
922
|
+
} | {
|
|
923
|
+
record: string;
|
|
924
|
+
} | {
|
|
925
|
+
oldRecord: string;
|
|
926
|
+
} | {
|
|
927
|
+
newRecord: string;
|
|
928
|
+
})[])[];
|
|
929
|
+
description?: string | undefined;
|
|
930
|
+
permit?: boolean | undefined;
|
|
931
|
+
})[];
|
|
932
|
+
update: readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
933
|
+
user: string;
|
|
934
|
+
} | {
|
|
935
|
+
record: string;
|
|
936
|
+
} | {
|
|
937
|
+
oldRecord: string;
|
|
938
|
+
} | {
|
|
939
|
+
newRecord: string;
|
|
940
|
+
})[] | readonly (boolean | readonly (string | boolean | string[] | boolean[] | {
|
|
941
|
+
user: string;
|
|
942
|
+
} | {
|
|
943
|
+
record: string;
|
|
944
|
+
} | {
|
|
945
|
+
oldRecord: string;
|
|
946
|
+
} | {
|
|
947
|
+
newRecord: string;
|
|
948
|
+
})[])[] | {
|
|
949
|
+
conditions: readonly (string | boolean | string[] | boolean[] | {
|
|
950
|
+
user: string;
|
|
951
|
+
} | {
|
|
952
|
+
record: string;
|
|
953
|
+
} | {
|
|
954
|
+
oldRecord: string;
|
|
955
|
+
} | {
|
|
956
|
+
newRecord: string;
|
|
957
|
+
})[] | readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
958
|
+
user: string;
|
|
959
|
+
} | {
|
|
960
|
+
record: string;
|
|
961
|
+
} | {
|
|
962
|
+
oldRecord: string;
|
|
963
|
+
} | {
|
|
964
|
+
newRecord: string;
|
|
965
|
+
})[])[];
|
|
966
|
+
description?: string | undefined;
|
|
967
|
+
permit?: boolean | undefined;
|
|
968
|
+
})[];
|
|
969
|
+
delete: readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
970
|
+
user: string;
|
|
971
|
+
} | {
|
|
972
|
+
record: string;
|
|
973
|
+
} | {
|
|
974
|
+
oldRecord: string;
|
|
975
|
+
} | {
|
|
976
|
+
newRecord: string;
|
|
977
|
+
})[] | readonly (boolean | readonly (string | boolean | string[] | boolean[] | {
|
|
978
|
+
user: string;
|
|
979
|
+
} | {
|
|
980
|
+
record: string;
|
|
981
|
+
} | {
|
|
982
|
+
oldRecord: string;
|
|
983
|
+
} | {
|
|
984
|
+
newRecord: string;
|
|
985
|
+
})[])[] | {
|
|
986
|
+
conditions: readonly (string | boolean | string[] | boolean[] | {
|
|
987
|
+
user: string;
|
|
988
|
+
} | {
|
|
989
|
+
record: string;
|
|
990
|
+
} | {
|
|
991
|
+
oldRecord: string;
|
|
992
|
+
} | {
|
|
993
|
+
newRecord: string;
|
|
994
|
+
})[] | readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
995
|
+
user: string;
|
|
996
|
+
} | {
|
|
997
|
+
record: string;
|
|
998
|
+
} | {
|
|
999
|
+
oldRecord: string;
|
|
1000
|
+
} | {
|
|
1001
|
+
newRecord: string;
|
|
1002
|
+
})[])[];
|
|
1003
|
+
description?: string | undefined;
|
|
1004
|
+
permit?: boolean | undefined;
|
|
1005
|
+
})[];
|
|
1006
|
+
} | undefined;
|
|
1007
|
+
gql?: readonly {
|
|
1008
|
+
conditions: readonly (readonly (string | boolean | string[] | boolean[] | {
|
|
1009
|
+
user: string;
|
|
1010
|
+
})[])[];
|
|
1011
|
+
actions: "all" | readonly ("create" | "read" | "update" | "delete" | "aggregate" | "bulkUpsert")[];
|
|
1012
|
+
permit?: boolean | undefined;
|
|
1013
|
+
description?: string | undefined;
|
|
1014
|
+
}[] | undefined;
|
|
1015
|
+
};
|
|
1016
|
+
type TailorDBServiceConfigInput = {
|
|
1017
|
+
/** Glob patterns for TailorDB type definition files */
|
|
1018
|
+
files: string[];
|
|
1019
|
+
/** Glob patterns to exclude from type discovery */
|
|
1020
|
+
ignores?: string[] | undefined;
|
|
1021
|
+
/** URL for the ERD (Entity Relationship Diagram) site */
|
|
1022
|
+
erdSite?: string | undefined;
|
|
1023
|
+
/** Migration configuration */
|
|
1024
|
+
migration?: {
|
|
1025
|
+
directory: string;
|
|
1026
|
+
machineUser?: string | undefined;
|
|
1027
|
+
} | undefined;
|
|
1028
|
+
/** Default GraphQL operations for all types in this service */
|
|
1029
|
+
gqlOperations?: "query" | {
|
|
1030
|
+
create?: boolean | undefined;
|
|
1031
|
+
update?: boolean | undefined;
|
|
1032
|
+
delete?: boolean | undefined;
|
|
1033
|
+
read?: boolean | undefined;
|
|
1034
|
+
} | undefined;
|
|
1035
|
+
};
|
|
1036
|
+
//#endregion
|
|
1065
1037
|
//#region src/configure/services/tailordb/types.d.ts
|
|
1066
1038
|
type SerialConfig<T extends "string" | "integer" = "string" | "integer"> = Prettify<{
|
|
1067
1039
|
start: number;
|
|
@@ -1120,29 +1092,7 @@ type IndexDef<T extends {
|
|
|
1120
1092
|
unique?: boolean;
|
|
1121
1093
|
name?: string;
|
|
1122
1094
|
};
|
|
1123
|
-
|
|
1124
|
-
* Configuration for GraphQL operations on a TailorDB type.
|
|
1125
|
-
* All operations are enabled by default (undefined or true = enabled, false = disabled).
|
|
1126
|
-
*/
|
|
1127
|
-
interface GqlOperations {
|
|
1128
|
-
/** Enable create mutation (default: true) */
|
|
1129
|
-
create?: boolean;
|
|
1130
|
-
/** Enable update mutation (default: true) */
|
|
1131
|
-
update?: boolean;
|
|
1132
|
-
/** Enable delete mutation (default: true) */
|
|
1133
|
-
delete?: boolean;
|
|
1134
|
-
/** Enable read queries - get, list, aggregation (default: true) */
|
|
1135
|
-
read?: boolean;
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* Alias for common GqlOperations configurations.
|
|
1139
|
-
* - "query": Read-only mode - disables all mutations (create, update, delete)
|
|
1140
|
-
*/
|
|
1141
|
-
type GqlOperationsAliasQuery = "query";
|
|
1142
|
-
/**
|
|
1143
|
-
* Configuration for GraphQL operations - either an alias string or detailed object.
|
|
1144
|
-
*/
|
|
1145
|
-
type GqlOperationsConfig = GqlOperationsAliasQuery | GqlOperations;
|
|
1095
|
+
type GqlOperationsConfig = GqlOperationsInput;
|
|
1146
1096
|
interface TypeFeatures {
|
|
1147
1097
|
pluralForm?: string;
|
|
1148
1098
|
aggregation?: true;
|
|
@@ -1159,979 +1109,24 @@ interface TypeFeatures {
|
|
|
1159
1109
|
publishEvents?: boolean;
|
|
1160
1110
|
}
|
|
1161
1111
|
//#endregion
|
|
1162
|
-
//#region src/
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
tailordb: "tailordb";
|
|
1181
|
-
resolver: "resolver";
|
|
1182
|
-
}>>;
|
|
1183
|
-
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1184
|
-
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1185
|
-
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1186
|
-
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1187
|
-
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1188
|
-
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
1189
|
-
}, z.core.$strip>]>;
|
|
1190
|
-
//#endregion
|
|
1191
|
-
//#region src/parser/service/auth/schema.d.ts
|
|
1192
|
-
declare const AuthInvokerSchema: z.ZodObject<{
|
|
1193
|
-
namespace: z.ZodString;
|
|
1194
|
-
machineUserName: z.ZodString;
|
|
1195
|
-
}, z.core.$strip>;
|
|
1196
|
-
declare const OIDCSchema: z.ZodObject<{
|
|
1197
|
-
name: z.ZodString;
|
|
1198
|
-
kind: z.ZodLiteral<"OIDC">;
|
|
1199
|
-
clientID: z.ZodString;
|
|
1200
|
-
clientSecret: z.ZodObject<{
|
|
1201
|
-
vaultName: z.ZodString;
|
|
1202
|
-
secretKey: z.ZodString;
|
|
1203
|
-
}, z.core.$strip>;
|
|
1204
|
-
providerURL: z.ZodString;
|
|
1205
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
1206
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
1207
|
-
}, z.core.$strip>;
|
|
1208
|
-
declare const SAMLSchema: z.ZodObject<{
|
|
1209
|
-
name: z.ZodString;
|
|
1210
|
-
kind: z.ZodLiteral<"SAML">;
|
|
1211
|
-
enableSignRequest: z.ZodDefault<z.ZodBoolean>;
|
|
1212
|
-
metadataURL: z.ZodOptional<z.ZodString>;
|
|
1213
|
-
rawMetadata: z.ZodOptional<z.ZodString>;
|
|
1214
|
-
}, z.core.$strip>;
|
|
1215
|
-
declare const IDTokenSchema: z.ZodObject<{
|
|
1216
|
-
name: z.ZodString;
|
|
1217
|
-
kind: z.ZodLiteral<"IDToken">;
|
|
1218
|
-
providerURL: z.ZodString;
|
|
1219
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
1220
|
-
clientID: z.ZodString;
|
|
1221
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
1222
|
-
}, z.core.$strip>;
|
|
1223
|
-
declare const BuiltinIdPSchema: z.ZodObject<{
|
|
1224
|
-
name: z.ZodString;
|
|
1225
|
-
kind: z.ZodLiteral<"BuiltInIdP">;
|
|
1226
|
-
namespace: z.ZodString;
|
|
1227
|
-
clientName: z.ZodString;
|
|
1228
|
-
}, z.core.$strip>;
|
|
1229
|
-
declare const IdProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1230
|
-
name: z.ZodString;
|
|
1231
|
-
kind: z.ZodLiteral<"OIDC">;
|
|
1232
|
-
clientID: z.ZodString;
|
|
1233
|
-
clientSecret: z.ZodObject<{
|
|
1234
|
-
vaultName: z.ZodString;
|
|
1235
|
-
secretKey: z.ZodString;
|
|
1236
|
-
}, z.core.$strip>;
|
|
1237
|
-
providerURL: z.ZodString;
|
|
1238
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
1239
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
1240
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1241
|
-
name: z.ZodString;
|
|
1242
|
-
kind: z.ZodLiteral<"SAML">;
|
|
1243
|
-
enableSignRequest: z.ZodDefault<z.ZodBoolean>;
|
|
1244
|
-
metadataURL: z.ZodOptional<z.ZodString>;
|
|
1245
|
-
rawMetadata: z.ZodOptional<z.ZodString>;
|
|
1246
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1247
|
-
name: z.ZodString;
|
|
1248
|
-
kind: z.ZodLiteral<"IDToken">;
|
|
1249
|
-
providerURL: z.ZodString;
|
|
1250
|
-
issuerURL: z.ZodOptional<z.ZodString>;
|
|
1251
|
-
clientID: z.ZodString;
|
|
1252
|
-
usernameClaim: z.ZodOptional<z.ZodString>;
|
|
1253
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1254
|
-
name: z.ZodString;
|
|
1255
|
-
kind: z.ZodLiteral<"BuiltInIdP">;
|
|
1256
|
-
namespace: z.ZodString;
|
|
1257
|
-
clientName: z.ZodString;
|
|
1258
|
-
}, z.core.$strip>], "kind">;
|
|
1259
|
-
declare const OAuth2ClientGrantTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"authorization_code">, z.ZodLiteral<"refresh_token">]>;
|
|
1260
|
-
declare const OAuth2ClientSchema: z.ZodObject<{
|
|
1261
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1262
|
-
grantTypes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"authorization_code">, z.ZodLiteral<"refresh_token">]>>>;
|
|
1263
|
-
redirectURIs: z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`https://${string}`>, z.ZodTemplateLiteral<`http://${string}`>, z.ZodTemplateLiteral<`${string}:url`>, z.ZodTemplateLiteral<`${string}:url/${string}`>]>>;
|
|
1264
|
-
clientType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"confidential">, z.ZodLiteral<"public">, z.ZodLiteral<"browser">]>>;
|
|
1265
|
-
accessTokenLifetimeSeconds: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<{
|
|
1266
|
-
seconds: bigint;
|
|
1267
|
-
nanos: number;
|
|
1268
|
-
} | undefined, number | undefined>>;
|
|
1269
|
-
refreshTokenLifetimeSeconds: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<{
|
|
1270
|
-
seconds: bigint;
|
|
1271
|
-
nanos: number;
|
|
1272
|
-
} | undefined, number | undefined>>;
|
|
1273
|
-
requireDpop: z.ZodOptional<z.ZodBoolean>;
|
|
1274
|
-
}, z.core.$strip>;
|
|
1275
|
-
declare const SCIMAuthorizationSchema: z.ZodObject<{
|
|
1276
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"oauth2">, z.ZodLiteral<"bearer">]>;
|
|
1277
|
-
bearerSecret: z.ZodOptional<z.ZodObject<{
|
|
1278
|
-
vaultName: z.ZodString;
|
|
1279
|
-
secretKey: z.ZodString;
|
|
1280
|
-
}, z.core.$strip>>;
|
|
1281
|
-
}, z.core.$strip>;
|
|
1282
|
-
declare const SCIMAttributeTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
1283
|
-
declare const SCIMAttributeSchema: z.ZodObject<{
|
|
1284
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
1285
|
-
name: z.ZodString;
|
|
1286
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1287
|
-
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
1288
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
1289
|
-
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
1290
|
-
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
1291
|
-
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1292
|
-
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
1293
|
-
}, z.core.$strip>;
|
|
1294
|
-
declare const SCIMAttributeMappingSchema: z.ZodObject<{
|
|
1295
|
-
tailorDBField: z.ZodString;
|
|
1296
|
-
scimPath: z.ZodString;
|
|
1297
|
-
}, z.core.$strip>;
|
|
1298
|
-
declare const SCIMResourceSchema: z.ZodObject<{
|
|
1299
|
-
name: z.ZodString;
|
|
1300
|
-
tailorDBNamespace: z.ZodString;
|
|
1301
|
-
tailorDBType: z.ZodString;
|
|
1302
|
-
coreSchema: z.ZodObject<{
|
|
1303
|
-
name: z.ZodString;
|
|
1304
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
1305
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
1306
|
-
name: z.ZodString;
|
|
1307
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1308
|
-
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
1309
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
1310
|
-
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
1311
|
-
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
1312
|
-
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1313
|
-
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
1314
|
-
}, z.core.$strip>>;
|
|
1315
|
-
}, z.core.$strip>;
|
|
1316
|
-
attributeMapping: z.ZodArray<z.ZodObject<{
|
|
1317
|
-
tailorDBField: z.ZodString;
|
|
1318
|
-
scimPath: z.ZodString;
|
|
1319
|
-
}, z.core.$strip>>;
|
|
1320
|
-
}, z.core.$strip>;
|
|
1321
|
-
declare const SCIMSchema: z.ZodObject<{
|
|
1322
|
-
machineUserName: z.ZodString;
|
|
1323
|
-
authorization: z.ZodObject<{
|
|
1324
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"oauth2">, z.ZodLiteral<"bearer">]>;
|
|
1325
|
-
bearerSecret: z.ZodOptional<z.ZodObject<{
|
|
1326
|
-
vaultName: z.ZodString;
|
|
1327
|
-
secretKey: z.ZodString;
|
|
1328
|
-
}, z.core.$strip>>;
|
|
1329
|
-
}, z.core.$strip>;
|
|
1330
|
-
resources: z.ZodArray<z.ZodObject<{
|
|
1331
|
-
name: z.ZodString;
|
|
1332
|
-
tailorDBNamespace: z.ZodString;
|
|
1333
|
-
tailorDBType: z.ZodString;
|
|
1334
|
-
coreSchema: z.ZodObject<{
|
|
1335
|
-
name: z.ZodString;
|
|
1336
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
1337
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"string">, z.ZodLiteral<"number">, z.ZodLiteral<"boolean">, z.ZodLiteral<"datetime">, z.ZodLiteral<"complex">]>;
|
|
1338
|
-
name: z.ZodString;
|
|
1339
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1340
|
-
mutability: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">, z.ZodLiteral<"writeOnly">]>>;
|
|
1341
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
1342
|
-
multiValued: z.ZodOptional<z.ZodBoolean>;
|
|
1343
|
-
uniqueness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"server">, z.ZodLiteral<"global">]>>;
|
|
1344
|
-
canonicalValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1345
|
-
subAttributes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>>>;
|
|
1346
|
-
}, z.core.$strip>>;
|
|
1347
|
-
}, z.core.$strip>;
|
|
1348
|
-
attributeMapping: z.ZodArray<z.ZodObject<{
|
|
1349
|
-
tailorDBField: z.ZodString;
|
|
1350
|
-
scimPath: z.ZodString;
|
|
1351
|
-
}, z.core.$strip>>;
|
|
1352
|
-
}, z.core.$strip>>;
|
|
1353
|
-
}, z.core.$strip>;
|
|
1354
|
-
declare const TenantProviderSchema: z.ZodObject<{
|
|
1355
|
-
namespace: z.ZodString;
|
|
1356
|
-
type: z.ZodString;
|
|
1357
|
-
signatureField: z.ZodString;
|
|
1358
|
-
}, z.core.$strip>;
|
|
1359
|
-
//#endregion
|
|
1360
|
-
//#region src/parser/service/auth/types.d.ts
|
|
1361
|
-
type AuthInvoker = z.output<typeof AuthInvokerSchema>;
|
|
1362
|
-
type AuthInvokerWithName<M extends string> = Omit<AuthInvoker, "machineUserName"> & {
|
|
1363
|
-
machineUserName: M;
|
|
1364
|
-
};
|
|
1365
|
-
type OIDC = z.output<typeof OIDCSchema>;
|
|
1366
|
-
type SAML = z.output<typeof SAMLSchema>;
|
|
1367
|
-
type IDToken = z.output<typeof IDTokenSchema>;
|
|
1368
|
-
type BuiltinIdP = z.output<typeof BuiltinIdPSchema>;
|
|
1369
|
-
type IdProviderConfig = z.output<typeof IdProviderSchema>;
|
|
1370
|
-
type OAuth2ClientGrantType = z.output<typeof OAuth2ClientGrantTypeSchema>;
|
|
1371
|
-
type OAuth2ClientInput = z.input<typeof OAuth2ClientSchema>;
|
|
1372
|
-
type SCIMAuthorization = z.output<typeof SCIMAuthorizationSchema>;
|
|
1373
|
-
type SCIMAttributeType = z.output<typeof SCIMAttributeTypeSchema>;
|
|
1374
|
-
type SCIMAttribute = z.output<typeof SCIMAttributeSchema>;
|
|
1375
|
-
type SCIMAttributeMapping = z.output<typeof SCIMAttributeMappingSchema>;
|
|
1376
|
-
type SCIMResource = z.output<typeof SCIMResourceSchema>;
|
|
1377
|
-
type SCIMConfig = z.output<typeof SCIMSchema>;
|
|
1378
|
-
type TenantProviderConfig = z.output<typeof TenantProviderSchema>;
|
|
1379
|
-
type ValueOperand = string | boolean | string[] | boolean[];
|
|
1380
|
-
type AuthAttributeValue = ValueOperand | null | undefined;
|
|
1381
|
-
type UserFieldKeys<User extends TailorDBInstance> = keyof output<User> & string;
|
|
1382
|
-
type FieldDefined<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = User["fields"][Key] extends {
|
|
1383
|
-
_defined: infer Defined;
|
|
1384
|
-
} ? Defined : never;
|
|
1385
|
-
type FieldOutput<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = output<User>[Key];
|
|
1386
|
-
type FieldIsRequired<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = undefined extends FieldOutput<User, Key> ? false : true;
|
|
1387
|
-
type FieldIsOfType<User extends TailorDBInstance, Key extends UserFieldKeys<User>, Type extends string> = FieldDefined<User, Key> extends {
|
|
1388
|
-
type: Type;
|
|
1389
|
-
} ? true : false;
|
|
1390
|
-
type FieldIsArray<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
1391
|
-
array: true;
|
|
1392
|
-
} ? true : false;
|
|
1393
|
-
type FieldIsUnique<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
1394
|
-
unique: true;
|
|
1395
|
-
} ? true : false;
|
|
1396
|
-
type FieldSupportsValueOperand<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldOutput<User, Key> extends ValueOperand | null | undefined ? true : false;
|
|
1397
|
-
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>];
|
|
1398
|
-
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>];
|
|
1399
|
-
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>];
|
|
1400
|
-
type UserAttributeMap<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true };
|
|
1401
|
-
type DisallowExtraKeys<T, Allowed extends PropertyKey> = T & { [K in Exclude<keyof T, Allowed>]: never };
|
|
1402
|
-
type AttributeListValue<User extends TailorDBInstance, Key extends UserAttributeListKey<User>> = Key extends keyof output<User> ? output<User>[Key] : never;
|
|
1403
|
-
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 };
|
|
1404
|
-
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>>;
|
|
1405
|
-
type UserProfile<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[]> = {
|
|
1406
|
-
/**
|
|
1407
|
-
* TailorDB namespace where the user type is defined.
|
|
1408
|
-
*
|
|
1409
|
-
* Usually auto-resolved, so you don't need to specify this.
|
|
1410
|
-
* Required only when multiple TailorDBs exist and the type is in an external TailorDB.
|
|
1411
|
-
*/
|
|
1412
|
-
namespace?: string;
|
|
1413
|
-
type: User;
|
|
1414
|
-
usernameField: UsernameFieldKey<User>;
|
|
1415
|
-
attributes?: DisallowExtraKeys<AttributeMap$1, UserAttributeKey<User>>;
|
|
1416
|
-
attributeList?: AttributeList$1;
|
|
1417
|
-
};
|
|
1418
|
-
type MachineUserAttributeFields = Record<string, TailorField<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
|
|
1419
|
-
type TailorFieldOutputValue<Field> = Field extends TailorField<DefinedFieldMetadata, infer Output, FieldMetadata, TailorFieldType> ? Output : never;
|
|
1420
|
-
type MachineUserAttributeValues<Fields extends MachineUserAttributeFields> = { [K in keyof Fields]: TailorFieldOutputValue<Fields[K]> extends ValueOperand | null | undefined ? TailorFieldOutputValue<Fields[K]> : never };
|
|
1421
|
-
type MachineUserFromAttributes<Fields extends MachineUserAttributeFields> = (keyof Fields extends never ? {
|
|
1422
|
-
attributes?: never;
|
|
1423
|
-
} : {
|
|
1424
|
-
attributes: DisallowExtraKeys<MachineUserAttributeValues<Fields>, keyof Fields>;
|
|
1425
|
-
}) & {
|
|
1426
|
-
attributeList?: string[];
|
|
1427
|
-
};
|
|
1428
|
-
type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = [], MachineUserAttributes extends MachineUserAttributeFields | undefined = undefined> = IsAny<MachineUserAttributes> extends true ? IsAny<User> extends true ? {
|
|
1429
|
-
attributes: Record<string, AuthAttributeValue>;
|
|
1430
|
-
attributeList?: string[];
|
|
1431
|
-
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
1432
|
-
attributes?: never;
|
|
1433
|
-
} : {
|
|
1434
|
-
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 };
|
|
1435
|
-
}) & ([] extends AttributeList$1 ? {
|
|
1436
|
-
attributeList?: never;
|
|
1437
|
-
} : {
|
|
1438
|
-
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
1439
|
-
}) : [MachineUserAttributes] extends [MachineUserAttributeFields] ? MachineUserFromAttributes<MachineUserAttributes> : IsAny<User> extends true ? {
|
|
1440
|
-
attributes: Record<string, AuthAttributeValue>;
|
|
1441
|
-
attributeList?: string[];
|
|
1442
|
-
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
1443
|
-
attributes?: never;
|
|
1444
|
-
} : {
|
|
1445
|
-
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 };
|
|
1446
|
-
}) & ([] extends AttributeList$1 ? {
|
|
1447
|
-
attributeList?: never;
|
|
1448
|
-
} : {
|
|
1449
|
-
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
1450
|
-
});
|
|
1451
|
-
type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined> = {
|
|
1452
|
-
userProfile?: UserProfile<User, AttributeMap$1, AttributeList$1>;
|
|
1453
|
-
machineUserAttributes?: MachineUserAttributes;
|
|
1454
|
-
machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap$1, AttributeList$1, MachineUserAttributes>>;
|
|
1455
|
-
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
1456
|
-
idProvider?: IdProviderConfig;
|
|
1457
|
-
scim?: SCIMConfig;
|
|
1458
|
-
tenantProvider?: TenantProviderConfig;
|
|
1459
|
-
publishSessionEvents?: boolean;
|
|
1460
|
-
};
|
|
1461
|
-
declare const authDefinitionBrand: unique symbol;
|
|
1462
|
-
type AuthDefinitionBrand = {
|
|
1463
|
-
readonly [authDefinitionBrand]: true;
|
|
1464
|
-
};
|
|
1465
|
-
type DefinedAuth<Name extends string, Config, MachineUserNames extends string> = Config & {
|
|
1466
|
-
name: Name;
|
|
1467
|
-
invoker<M extends MachineUserNames>(machineUser: M): AuthInvokerWithName<M>;
|
|
1468
|
-
} & AuthDefinitionBrand;
|
|
1469
|
-
type AuthExternalConfig = {
|
|
1470
|
-
name: string;
|
|
1471
|
-
external: true;
|
|
1472
|
-
};
|
|
1473
|
-
type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
1474
|
-
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose, string>;
|
|
1475
|
-
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
1476
|
-
//#endregion
|
|
1477
|
-
//#region src/parser/service/executor/schema.d.ts
|
|
1478
|
-
declare const RecordTriggerSchema: z.ZodObject<{
|
|
1479
|
-
kind: z.ZodEnum<{
|
|
1480
|
-
recordCreated: "recordCreated";
|
|
1481
|
-
recordUpdated: "recordUpdated";
|
|
1482
|
-
recordDeleted: "recordDeleted";
|
|
1483
|
-
}>;
|
|
1484
|
-
typeName: z.ZodString;
|
|
1485
|
-
condition: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1486
|
-
}, z.core.$strip>;
|
|
1487
|
-
declare const ResolverExecutedTriggerSchema: z.ZodObject<{
|
|
1488
|
-
kind: z.ZodLiteral<"resolverExecuted">;
|
|
1489
|
-
resolverName: z.ZodString;
|
|
1490
|
-
condition: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1491
|
-
}, z.core.$strip>;
|
|
1492
|
-
declare const ScheduleTriggerSchema: z.ZodObject<{
|
|
1493
|
-
kind: z.ZodLiteral<"schedule">;
|
|
1494
|
-
cron: z.ZodString;
|
|
1495
|
-
timezone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1496
|
-
}, z.core.$strip>;
|
|
1497
|
-
declare const IncomingWebhookTriggerSchema: z.ZodObject<{
|
|
1498
|
-
kind: z.ZodLiteral<"incomingWebhook">;
|
|
1499
|
-
}, z.core.$strip>;
|
|
1500
|
-
declare const IdpUserTriggerSchema: z.ZodObject<{
|
|
1501
|
-
kind: z.ZodEnum<{
|
|
1502
|
-
idpUserCreated: "idpUserCreated";
|
|
1503
|
-
idpUserUpdated: "idpUserUpdated";
|
|
1504
|
-
idpUserDeleted: "idpUserDeleted";
|
|
1505
|
-
}>;
|
|
1506
|
-
}, z.core.$strip>;
|
|
1507
|
-
declare const AuthAccessTokenTriggerSchema: z.ZodObject<{
|
|
1508
|
-
kind: z.ZodEnum<{
|
|
1509
|
-
authAccessTokenIssued: "authAccessTokenIssued";
|
|
1510
|
-
authAccessTokenRefreshed: "authAccessTokenRefreshed";
|
|
1511
|
-
authAccessTokenRevoked: "authAccessTokenRevoked";
|
|
1512
|
-
}>;
|
|
1513
|
-
}, z.core.$strip>;
|
|
1514
|
-
declare const FunctionOperationSchema: z.ZodObject<{
|
|
1515
|
-
kind: z.ZodEnum<{
|
|
1516
|
-
function: "function";
|
|
1517
|
-
jobFunction: "jobFunction";
|
|
1518
|
-
}>;
|
|
1519
|
-
body: z.ZodCustom<Function, Function>;
|
|
1520
|
-
authInvoker: z.ZodOptional<z.ZodObject<{
|
|
1521
|
-
namespace: z.ZodString;
|
|
1522
|
-
machineUserName: z.ZodString;
|
|
1523
|
-
}, z.core.$strip>>;
|
|
1524
|
-
}, z.core.$strip>;
|
|
1525
|
-
declare const GqlOperationSchema: z.ZodObject<{
|
|
1526
|
-
kind: z.ZodLiteral<"graphql">;
|
|
1527
|
-
appName: z.ZodOptional<z.ZodString>;
|
|
1528
|
-
query: z.ZodPipe<z.ZodTransform<string, unknown>, z.ZodString>;
|
|
1529
|
-
variables: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1530
|
-
authInvoker: z.ZodOptional<z.ZodObject<{
|
|
1531
|
-
namespace: z.ZodString;
|
|
1532
|
-
machineUserName: z.ZodString;
|
|
1533
|
-
}, z.core.$strip>>;
|
|
1534
|
-
}, z.core.$strip>;
|
|
1535
|
-
declare const WebhookOperationSchema: z.ZodObject<{
|
|
1536
|
-
kind: z.ZodLiteral<"webhook">;
|
|
1537
|
-
url: z.ZodCustom<Function, Function>;
|
|
1538
|
-
requestBody: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1539
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1540
|
-
vault: z.ZodString;
|
|
1541
|
-
key: z.ZodString;
|
|
1542
|
-
}, z.core.$strip>]>>>;
|
|
1543
|
-
}, z.core.$strip>;
|
|
1544
|
-
declare const WorkflowOperationSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
1545
|
-
kind: z.ZodLiteral<"workflow">;
|
|
1546
|
-
workflowName: z.ZodString;
|
|
1547
|
-
args: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodCustom<Function, Function>]>>;
|
|
1548
|
-
authInvoker: z.ZodOptional<z.ZodObject<{
|
|
1549
|
-
namespace: z.ZodString;
|
|
1550
|
-
machineUserName: z.ZodString;
|
|
1551
|
-
}, z.core.$strip>>;
|
|
1552
|
-
}, z.core.$strip>>;
|
|
1553
|
-
declare const ExecutorSchema: z.ZodObject<{
|
|
1554
|
-
name: z.ZodString;
|
|
1555
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1556
|
-
disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1557
|
-
trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1558
|
-
kind: z.ZodEnum<{
|
|
1559
|
-
recordCreated: "recordCreated";
|
|
1560
|
-
recordUpdated: "recordUpdated";
|
|
1561
|
-
recordDeleted: "recordDeleted";
|
|
1562
|
-
}>;
|
|
1563
|
-
typeName: z.ZodString;
|
|
1564
|
-
condition: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1565
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1566
|
-
kind: z.ZodLiteral<"resolverExecuted">;
|
|
1567
|
-
resolverName: z.ZodString;
|
|
1568
|
-
condition: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1569
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1570
|
-
kind: z.ZodLiteral<"schedule">;
|
|
1571
|
-
cron: z.ZodString;
|
|
1572
|
-
timezone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1573
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1574
|
-
kind: z.ZodLiteral<"incomingWebhook">;
|
|
1575
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1576
|
-
kind: z.ZodEnum<{
|
|
1577
|
-
idpUserCreated: "idpUserCreated";
|
|
1578
|
-
idpUserUpdated: "idpUserUpdated";
|
|
1579
|
-
idpUserDeleted: "idpUserDeleted";
|
|
1580
|
-
}>;
|
|
1581
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1582
|
-
kind: z.ZodEnum<{
|
|
1583
|
-
authAccessTokenIssued: "authAccessTokenIssued";
|
|
1584
|
-
authAccessTokenRefreshed: "authAccessTokenRefreshed";
|
|
1585
|
-
authAccessTokenRevoked: "authAccessTokenRevoked";
|
|
1586
|
-
}>;
|
|
1587
|
-
}, z.core.$strip>], "kind">;
|
|
1588
|
-
operation: z.ZodUnion<readonly [z.ZodObject<{
|
|
1589
|
-
kind: z.ZodEnum<{
|
|
1590
|
-
function: "function";
|
|
1591
|
-
jobFunction: "jobFunction";
|
|
1592
|
-
}>;
|
|
1593
|
-
body: z.ZodCustom<Function, Function>;
|
|
1594
|
-
authInvoker: z.ZodOptional<z.ZodObject<{
|
|
1595
|
-
namespace: z.ZodString;
|
|
1596
|
-
machineUserName: z.ZodString;
|
|
1597
|
-
}, z.core.$strip>>;
|
|
1598
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1599
|
-
kind: z.ZodLiteral<"graphql">;
|
|
1600
|
-
appName: z.ZodOptional<z.ZodString>;
|
|
1601
|
-
query: z.ZodPipe<z.ZodTransform<string, unknown>, z.ZodString>;
|
|
1602
|
-
variables: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1603
|
-
authInvoker: z.ZodOptional<z.ZodObject<{
|
|
1604
|
-
namespace: z.ZodString;
|
|
1605
|
-
machineUserName: z.ZodString;
|
|
1606
|
-
}, z.core.$strip>>;
|
|
1607
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1608
|
-
kind: z.ZodLiteral<"webhook">;
|
|
1609
|
-
url: z.ZodCustom<Function, Function>;
|
|
1610
|
-
requestBody: z.ZodOptional<z.ZodCustom<Function, Function>>;
|
|
1611
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1612
|
-
vault: z.ZodString;
|
|
1613
|
-
key: z.ZodString;
|
|
1614
|
-
}, z.core.$strip>]>>>;
|
|
1615
|
-
}, z.core.$strip>, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
1616
|
-
kind: z.ZodLiteral<"workflow">;
|
|
1617
|
-
workflowName: z.ZodString;
|
|
1618
|
-
args: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodCustom<Function, Function>]>>;
|
|
1619
|
-
authInvoker: z.ZodOptional<z.ZodObject<{
|
|
1620
|
-
namespace: z.ZodString;
|
|
1621
|
-
machineUserName: z.ZodString;
|
|
1622
|
-
}, z.core.$strip>>;
|
|
1623
|
-
}, z.core.$strip>>]>;
|
|
1624
|
-
}, z.core.$strip>;
|
|
1625
|
-
//#endregion
|
|
1626
|
-
//#region src/parser/service/executor/types.d.ts
|
|
1627
|
-
type RecordTrigger = z.infer<typeof RecordTriggerSchema>;
|
|
1628
|
-
type ResolverExecutedTrigger = z.infer<typeof ResolverExecutedTriggerSchema>;
|
|
1629
|
-
type ScheduleTriggerInput = z.input<typeof ScheduleTriggerSchema>;
|
|
1630
|
-
type IncomingWebhookTrigger = z.infer<typeof IncomingWebhookTriggerSchema>;
|
|
1631
|
-
type IdpUserTrigger = z.infer<typeof IdpUserTriggerSchema>;
|
|
1632
|
-
type AuthAccessTokenTrigger = z.infer<typeof AuthAccessTokenTriggerSchema>;
|
|
1633
|
-
type FunctionOperation = z.infer<typeof FunctionOperationSchema>;
|
|
1634
|
-
type GqlOperation = z.infer<typeof GqlOperationSchema>;
|
|
1635
|
-
type WebhookOperation = z.infer<typeof WebhookOperationSchema>;
|
|
1636
|
-
type WorkflowOperation = z.infer<typeof WorkflowOperationSchema>;
|
|
1637
|
-
type Executor = z.infer<typeof ExecutorSchema>;
|
|
1638
|
-
type ExecutorInput = z.input<typeof ExecutorSchema>;
|
|
1639
|
-
type ExecutorServiceConfig = {
|
|
1640
|
-
files: string[];
|
|
1641
|
-
ignores?: string[];
|
|
1642
|
-
};
|
|
1643
|
-
type ExecutorServiceInput = ExecutorServiceConfig;
|
|
1644
|
-
//#endregion
|
|
1645
|
-
//#region src/parser/plugin-config/generation-types.d.ts
|
|
1646
|
-
/**
|
|
1647
|
-
* A single generated file to write to disk.
|
|
1648
|
-
*/
|
|
1649
|
-
interface GeneratedFile {
|
|
1650
|
-
path: string;
|
|
1651
|
-
content: string;
|
|
1652
|
-
skipIfExists?: boolean;
|
|
1653
|
-
executable?: boolean;
|
|
1654
|
-
}
|
|
1655
|
-
/**
|
|
1656
|
-
* Result returned by generation-time hooks.
|
|
1657
|
-
*/
|
|
1658
|
-
interface GeneratorResult {
|
|
1659
|
-
files: GeneratedFile[];
|
|
1660
|
-
errors?: string[];
|
|
1661
|
-
}
|
|
1662
|
-
/**
|
|
1663
|
-
* Auth configuration available to generation-time hooks.
|
|
1664
|
-
*/
|
|
1665
|
-
interface GeneratorAuthInput {
|
|
1666
|
-
name: string;
|
|
1667
|
-
userProfile?: {
|
|
1668
|
-
typeName: string;
|
|
1669
|
-
namespace: string;
|
|
1670
|
-
usernameField: string;
|
|
1671
|
-
};
|
|
1672
|
-
machineUsers?: Record<string, {
|
|
1673
|
-
attributes: Record<string, unknown>;
|
|
1674
|
-
}>;
|
|
1675
|
-
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
1676
|
-
idProvider?: IdProviderConfig;
|
|
1677
|
-
}
|
|
1678
|
-
/**
|
|
1679
|
-
* Namespace-level TailorDB data available to generation-time hooks.
|
|
1680
|
-
*/
|
|
1681
|
-
interface TailorDBNamespaceData {
|
|
1682
|
-
/** Namespace name */
|
|
1683
|
-
namespace: string;
|
|
1684
|
-
/** All TailorDB types in this namespace, keyed by type name */
|
|
1685
|
-
types: Record<string, TailorDBType>;
|
|
1686
|
-
/** Source info for each type (file path, export name, plugin info) */
|
|
1687
|
-
sourceInfo: ReadonlyMap<string, TypeSourceInfoEntry>;
|
|
1688
|
-
/** Plugin attachments configured on each type via .plugin() method */
|
|
1689
|
-
pluginAttachments: ReadonlyMap<string, readonly PluginAttachment[]>;
|
|
1690
|
-
}
|
|
1691
|
-
/**
|
|
1692
|
-
* Namespace-level resolver data available to generation-time hooks.
|
|
1693
|
-
*/
|
|
1694
|
-
interface ResolverNamespaceData {
|
|
1695
|
-
/** Namespace name */
|
|
1696
|
-
namespace: string;
|
|
1697
|
-
/** All resolvers in this namespace, keyed by resolver name */
|
|
1698
|
-
resolvers: Record<string, Resolver>;
|
|
1699
|
-
}
|
|
1700
|
-
/**
|
|
1701
|
-
* Context passed to plugin's onTailorDBReady hook.
|
|
1702
|
-
* Called after all TailorDB types are loaded and finalized.
|
|
1703
|
-
* @template PluginConfig - Plugin-level configuration type
|
|
1704
|
-
*/
|
|
1705
|
-
interface TailorDBReadyContext<PluginConfig = unknown> {
|
|
1706
|
-
/** All TailorDB namespaces with their types and metadata */
|
|
1707
|
-
tailordb: TailorDBNamespaceData[];
|
|
1708
|
-
/** Auth configuration */
|
|
1709
|
-
auth?: GeneratorAuthInput;
|
|
1710
|
-
/** Base directory for generated files */
|
|
1711
|
-
baseDir: string;
|
|
1712
|
-
/** Path to tailor.config.ts */
|
|
1713
|
-
configPath: string;
|
|
1714
|
-
/** Plugin-level configuration passed via definePlugins() */
|
|
1715
|
-
pluginConfig: PluginConfig;
|
|
1716
|
-
}
|
|
1717
|
-
/**
|
|
1718
|
-
* Context passed to plugin's onResolverReady hook.
|
|
1719
|
-
* Called after all resolvers are loaded and finalized.
|
|
1720
|
-
* @template PluginConfig - Plugin-level configuration type
|
|
1721
|
-
*/
|
|
1722
|
-
interface ResolverReadyContext<PluginConfig = unknown> {
|
|
1723
|
-
/** All TailorDB namespaces with their types and metadata */
|
|
1724
|
-
tailordb: TailorDBNamespaceData[];
|
|
1725
|
-
/** All resolver namespaces with their resolvers */
|
|
1726
|
-
resolvers: ResolverNamespaceData[];
|
|
1727
|
-
/** Auth configuration */
|
|
1728
|
-
auth?: GeneratorAuthInput;
|
|
1729
|
-
/** Base directory for generated files */
|
|
1730
|
-
baseDir: string;
|
|
1731
|
-
/** Path to tailor.config.ts */
|
|
1732
|
-
configPath: string;
|
|
1733
|
-
/** Plugin-level configuration passed via definePlugins() */
|
|
1734
|
-
pluginConfig: PluginConfig;
|
|
1735
|
-
}
|
|
1736
|
-
/**
|
|
1737
|
-
* Context passed to plugin's onExecutorReady hook.
|
|
1738
|
-
* Called after all executors are loaded and finalized.
|
|
1739
|
-
* @template PluginConfig - Plugin-level configuration type
|
|
1740
|
-
*/
|
|
1741
|
-
interface ExecutorReadyContext<PluginConfig = unknown> {
|
|
1742
|
-
/** All TailorDB namespaces with their types and metadata */
|
|
1743
|
-
tailordb: TailorDBNamespaceData[];
|
|
1744
|
-
/** All resolver namespaces with their resolvers */
|
|
1745
|
-
resolvers: ResolverNamespaceData[];
|
|
1746
|
-
/** All executors, keyed by executor name */
|
|
1747
|
-
executors: Record<string, Executor>;
|
|
1748
|
-
/** Auth configuration */
|
|
1749
|
-
auth?: GeneratorAuthInput;
|
|
1750
|
-
/** Base directory for generated files */
|
|
1751
|
-
baseDir: string;
|
|
1752
|
-
/** Path to tailor.config.ts */
|
|
1753
|
-
configPath: string;
|
|
1754
|
-
/** Plugin-level configuration passed via definePlugins() */
|
|
1755
|
-
pluginConfig: PluginConfig;
|
|
1756
|
-
}
|
|
1757
|
-
//#endregion
|
|
1758
|
-
//#region src/parser/plugin-config/types.d.ts
|
|
1759
|
-
type TypeConfigRequired<PluginConfig = unknown> = boolean | ((pluginConfig: PluginConfig | undefined) => boolean);
|
|
1760
|
-
/**
|
|
1761
|
-
* Interface for plugin configuration mapping.
|
|
1762
|
-
* Extend this interface via declaration merging to add typed plugin configs.
|
|
1763
|
-
*
|
|
1764
|
-
* The `Fields` type parameter provides field names from the type being configured,
|
|
1765
|
-
* enabling type-safe field references in plugin configs.
|
|
1766
|
-
* @example
|
|
1767
|
-
* ```typescript
|
|
1768
|
-
* // In your plugin package or types file:
|
|
1769
|
-
* declare module "@tailor-platform/sdk" {
|
|
1770
|
-
* interface PluginConfigs<Fields extends string> {
|
|
1771
|
-
* "@my-company/i18n": {
|
|
1772
|
-
* labels: Partial<Record<Fields, { ja: string; en: string }>>;
|
|
1773
|
-
* };
|
|
1774
|
-
* }
|
|
1775
|
-
* }
|
|
1776
|
-
* ```
|
|
1777
|
-
*/
|
|
1778
|
-
interface PluginConfigs<Fields extends string = string> {}
|
|
1779
|
-
/**
|
|
1780
|
-
* Plugin attachment stored on TailorAnyDBType instances.
|
|
1781
|
-
* This is the configuration passed via `.plugin()` method.
|
|
1782
|
-
*/
|
|
1783
|
-
interface PluginAttachment {
|
|
1784
|
-
pluginId: string;
|
|
1785
|
-
config: unknown;
|
|
1786
|
-
}
|
|
1787
|
-
/**
|
|
1788
|
-
* Context passed to plugin's process method
|
|
1789
|
-
*/
|
|
1790
|
-
interface PluginProcessContext<TypeConfig = unknown, PluginConfig = unknown> {
|
|
1791
|
-
/** The raw TailorDB type being processed */
|
|
1792
|
-
type: TailorAnyDBType;
|
|
1793
|
-
/** Per-type configuration passed via .plugin() method */
|
|
1794
|
-
typeConfig: TypeConfig;
|
|
1795
|
-
/** Plugin-level configuration passed via definePlugins() */
|
|
1796
|
-
pluginConfig: PluginConfig;
|
|
1797
|
-
/** Namespace of the TailorDB type */
|
|
1798
|
-
namespace: string;
|
|
1799
|
-
}
|
|
1800
|
-
/**
|
|
1801
|
-
* Context passed to plugin's onNamespaceLoaded hook.
|
|
1802
|
-
* Used for plugins that operate on a namespace without requiring a source type.
|
|
1803
|
-
*/
|
|
1804
|
-
interface PluginNamespaceProcessContext<PluginConfig = unknown> {
|
|
1805
|
-
/** Plugin-level configuration passed via definePlugins() */
|
|
1806
|
-
pluginConfig: PluginConfig;
|
|
1807
|
-
/** Target namespace for generated types */
|
|
1808
|
-
namespace: string;
|
|
1809
|
-
}
|
|
1810
|
-
/**
|
|
1811
|
-
* Interface representing a TailorDB type for plugin output.
|
|
1812
|
-
* This interface is satisfied by db.type() instances.
|
|
1813
|
-
*/
|
|
1814
|
-
interface TailorDBTypeForPlugin {
|
|
1815
|
-
/** The name of the type */
|
|
1816
|
-
readonly name: string;
|
|
1817
|
-
/** The field definitions */
|
|
1818
|
-
readonly fields: Record<string, unknown>;
|
|
1819
|
-
}
|
|
1820
|
-
/**
|
|
1821
|
-
* Type generated by a plugin - use db.type() to create these.
|
|
1822
|
-
*/
|
|
1823
|
-
type PluginGeneratedType = TailorDBTypeForPlugin;
|
|
1824
|
-
/**
|
|
1825
|
-
* Map of generated types keyed by kind identifier.
|
|
1826
|
-
* The kind is used to generate distinct TypeScript type files for each generated type.
|
|
1827
|
-
* @example
|
|
1828
|
-
* ```typescript
|
|
1829
|
-
* {
|
|
1830
|
-
* request: changeRequest,
|
|
1831
|
-
* step: changeStep,
|
|
1832
|
-
* approval: changeApproval,
|
|
1833
|
-
* }
|
|
1834
|
-
* ```
|
|
1835
|
-
*/
|
|
1836
|
-
type PluginGeneratedTypes = Record<string, PluginGeneratedType>;
|
|
1837
|
-
/**
|
|
1838
|
-
* Resolver definition generated by a plugin.
|
|
1839
|
-
* Fields can be TailorDB field instances or raw field definitions.
|
|
1840
|
-
*/
|
|
1841
|
-
interface PluginGeneratedResolver {
|
|
1842
|
-
name: string;
|
|
1843
|
-
operation: "query" | "mutation";
|
|
1844
|
-
inputFields?: Record<string, unknown>;
|
|
1845
|
-
outputFields: Record<string, unknown>;
|
|
1846
|
-
/** Function body code as string */
|
|
1847
|
-
body: string;
|
|
1848
|
-
}
|
|
1849
|
-
/**
|
|
1850
|
-
* Record trigger configuration for plugin-generated executors
|
|
1851
|
-
*/
|
|
1852
|
-
interface PluginRecordTriggerConfig {
|
|
1853
|
-
kind: "recordCreated" | "recordUpdated" | "recordDeleted";
|
|
1854
|
-
/** TailorDB type name for record triggers */
|
|
1855
|
-
typeName: string;
|
|
1856
|
-
}
|
|
1857
|
-
/**
|
|
1858
|
-
* Schedule trigger configuration for plugin-generated executors
|
|
1859
|
-
*/
|
|
1860
|
-
interface PluginScheduleTriggerConfig {
|
|
1861
|
-
kind: "schedule";
|
|
1862
|
-
/** Cron expression */
|
|
1863
|
-
cron: string;
|
|
1864
|
-
/** Timezone (defaults to UTC) */
|
|
1865
|
-
timezone?: string;
|
|
1866
|
-
}
|
|
1867
|
-
/**
|
|
1868
|
-
* Incoming webhook trigger configuration for plugin-generated executors
|
|
1869
|
-
*/
|
|
1870
|
-
interface PluginIncomingWebhookTriggerConfig {
|
|
1871
|
-
kind: "incomingWebhook";
|
|
1872
|
-
}
|
|
1873
|
-
/**
|
|
1874
|
-
* Trigger configuration for plugin-generated executors
|
|
1875
|
-
*/
|
|
1876
|
-
type PluginTriggerConfig = PluginRecordTriggerConfig | PluginScheduleTriggerConfig | PluginIncomingWebhookTriggerConfig;
|
|
1877
|
-
/**
|
|
1878
|
-
* Inject value types supported for plugin executor injection.
|
|
1879
|
-
* These values are serialized as const declarations in the generated file.
|
|
1880
|
-
*/
|
|
1881
|
-
type PluginInjectValue = string | number | boolean | null;
|
|
1882
|
-
/**
|
|
1883
|
-
* Inject map for plugin executor.
|
|
1884
|
-
* Keys become const variable names in the generated file.
|
|
1885
|
-
*/
|
|
1886
|
-
type PluginInjectMap = Record<string, PluginInjectValue>;
|
|
1887
|
-
/**
|
|
1888
|
-
* Function operation configuration for plugin-generated executors
|
|
1889
|
-
*/
|
|
1890
|
-
interface PluginFunctionOperationConfig {
|
|
1891
|
-
kind: "function";
|
|
1892
|
-
/** Function body code as string */
|
|
1893
|
-
body: string;
|
|
1894
|
-
/**
|
|
1895
|
-
* Variables to inject into the generated file scope.
|
|
1896
|
-
* These become const declarations at the top of the generated file,
|
|
1897
|
-
* allowing the function body to reference them.
|
|
1898
|
-
* @example { namespace: "tailordb", historyTypeName: "CustomerHistory" }
|
|
1899
|
-
*/
|
|
1900
|
-
inject?: PluginInjectMap;
|
|
1901
|
-
}
|
|
1902
|
-
/**
|
|
1903
|
-
* GraphQL operation configuration for plugin-generated executors
|
|
1904
|
-
*/
|
|
1905
|
-
interface PluginGraphQLOperationConfig {
|
|
1906
|
-
kind: "graphql";
|
|
1907
|
-
/** GraphQL query string */
|
|
1908
|
-
query: string;
|
|
1909
|
-
/** App name for the GraphQL endpoint */
|
|
1910
|
-
appName?: string;
|
|
1911
|
-
/**
|
|
1912
|
-
* Variables expression as a string function.
|
|
1913
|
-
* Receives the executor args object and returns the variables object.
|
|
1914
|
-
* @example "(args) => ({ input: { recordId: args.newRecord.id } })"
|
|
1915
|
-
*/
|
|
1916
|
-
variables?: string;
|
|
1917
|
-
}
|
|
1918
|
-
/**
|
|
1919
|
-
* Webhook operation configuration for plugin-generated executors
|
|
1920
|
-
*/
|
|
1921
|
-
interface PluginWebhookOperationConfig {
|
|
1922
|
-
kind: "webhook";
|
|
1923
|
-
/** Webhook URL */
|
|
1924
|
-
url: string;
|
|
1925
|
-
}
|
|
1926
|
-
/**
|
|
1927
|
-
* Workflow operation configuration for plugin-generated executors
|
|
1928
|
-
*/
|
|
1929
|
-
interface PluginWorkflowOperationConfig {
|
|
1930
|
-
kind: "workflow";
|
|
1931
|
-
/** Workflow name */
|
|
1932
|
-
workflowName: string;
|
|
1933
|
-
}
|
|
1934
|
-
/**
|
|
1935
|
-
* Operation configuration for plugin-generated executors
|
|
1936
|
-
*/
|
|
1937
|
-
type PluginOperationConfig = PluginFunctionOperationConfig | PluginGraphQLOperationConfig | PluginWebhookOperationConfig | PluginWorkflowOperationConfig;
|
|
1938
|
-
/**
|
|
1939
|
-
* Context value types for plugin executor context.
|
|
1940
|
-
* Supports primitive values and type references.
|
|
1941
|
-
*/
|
|
1942
|
-
type PluginExecutorContextValue = TailorAnyDBType | string | number | boolean | null | undefined;
|
|
1943
|
-
/**
|
|
1944
|
-
* Base executor context that can include type references and other values.
|
|
1945
|
-
* Type objects (TailorAnyDBType) will be handled specially by the generator
|
|
1946
|
-
* to create appropriate import statements.
|
|
1947
|
-
*
|
|
1948
|
-
* Plugin authors should extend this interface for their specific context needs.
|
|
1949
|
-
*/
|
|
1950
|
-
interface PluginExecutorContextBase {
|
|
1951
|
-
/** Source type that the plugin is attached to. Null for namespace executors. */
|
|
1952
|
-
sourceType: TailorAnyDBType | null;
|
|
1953
|
-
/** TailorDB namespace for data operations */
|
|
1954
|
-
namespace: string;
|
|
1955
|
-
}
|
|
1956
|
-
/**
|
|
1957
|
-
* Flexible executor context type that allows additional properties.
|
|
1958
|
-
* Used as the context type in PluginGeneratedExecutorWithFile.
|
|
1959
|
-
*/
|
|
1960
|
-
type PluginExecutorContext = PluginExecutorContextBase & {
|
|
1961
|
-
[key: string]: PluginExecutorContextValue;
|
|
1962
|
-
};
|
|
1963
|
-
/**
|
|
1964
|
-
* Module shape returned by plugin executor resolve().
|
|
1965
|
-
* The concrete context type is intentionally erased at this boundary.
|
|
1966
|
-
*/
|
|
1967
|
-
interface PluginExecutorModule {
|
|
1968
|
-
default: unknown;
|
|
1969
|
-
}
|
|
1970
|
-
/**
|
|
1971
|
-
* Executor definition with dynamic import reference (new format).
|
|
1972
|
-
* Used with withPluginContext for type-safe executor definitions in separate files.
|
|
1973
|
-
*/
|
|
1974
|
-
interface PluginGeneratedExecutorWithFile<Ctx = PluginExecutorContext> {
|
|
1975
|
-
/** Executor name (used for generated file name) */
|
|
1976
|
-
name: string;
|
|
1977
|
-
/**
|
|
1978
|
-
* Resolver function for the executor module.
|
|
1979
|
-
* Should return a dynamic import to the executor file.
|
|
1980
|
-
* Relative import specifiers are resolved from the plugin's importPath base.
|
|
1981
|
-
* @example `async () => await import("./executors/on-create")`
|
|
1982
|
-
*/
|
|
1983
|
-
resolve: () => Promise<PluginExecutorModule>;
|
|
1984
|
-
/**
|
|
1985
|
-
* Context to pass to the executor factory.
|
|
1986
|
-
* Can include TailorAnyDBType objects - these will be handled specially
|
|
1987
|
-
* by the generator to create appropriate import statements.
|
|
1988
|
-
*/
|
|
1989
|
-
context: Ctx;
|
|
1990
|
-
}
|
|
1991
|
-
/**
|
|
1992
|
-
* Executor definition generated by a plugin (legacy format).
|
|
1993
|
-
* @deprecated Use PluginGeneratedExecutorWithFile with withPluginContext instead.
|
|
1994
|
-
*/
|
|
1995
|
-
interface PluginGeneratedExecutorLegacy {
|
|
1996
|
-
name: string;
|
|
1997
|
-
description?: string;
|
|
1998
|
-
trigger: PluginTriggerConfig;
|
|
1999
|
-
operation: PluginOperationConfig;
|
|
2000
|
-
}
|
|
2001
|
-
/**
|
|
2002
|
-
* Executor definition generated by a plugin.
|
|
2003
|
-
* Supports both legacy format (inline trigger/operation) and new format (executorFile/context).
|
|
2004
|
-
*/
|
|
2005
|
-
type PluginGeneratedExecutor = PluginGeneratedExecutorWithFile | PluginGeneratedExecutorLegacy;
|
|
2006
|
-
/**
|
|
2007
|
-
* Extension options for modifying the source type
|
|
2008
|
-
*/
|
|
2009
|
-
interface PluginExtends {
|
|
2010
|
-
/**
|
|
2011
|
-
* Fields to add to the source type.
|
|
2012
|
-
* These fields will be merged into the original type's fields.
|
|
2013
|
-
* Existing fields (from original definition or earlier plugins) take precedence.
|
|
2014
|
-
*/
|
|
2015
|
-
fields?: Record<string, TailorAnyDBField>;
|
|
2016
|
-
}
|
|
2017
|
-
/**
|
|
2018
|
-
* Base output returned by a plugin's definition-time hooks.
|
|
2019
|
-
* Used by both onTypeLoaded and onNamespaceLoaded.
|
|
2020
|
-
*/
|
|
2021
|
-
interface PluginOutput {
|
|
2022
|
-
/**
|
|
2023
|
-
* Additional TailorDB types to generate, keyed by kind identifier.
|
|
2024
|
-
* The kind is used to generate distinct TypeScript type files.
|
|
2025
|
-
* @example { request: changeRequest, step: changeStep }
|
|
2026
|
-
*/
|
|
2027
|
-
types?: PluginGeneratedTypes;
|
|
2028
|
-
/** Additional resolvers to generate */
|
|
2029
|
-
resolvers?: PluginGeneratedResolver[];
|
|
2030
|
-
/** Additional executors to generate */
|
|
2031
|
-
executors?: PluginGeneratedExecutor[];
|
|
2032
|
-
}
|
|
2033
|
-
/**
|
|
2034
|
-
* Output returned by a plugin's onTypeLoaded hook.
|
|
2035
|
-
* Extends PluginOutput with the ability to add fields to the source type.
|
|
2036
|
-
*/
|
|
2037
|
-
interface TypePluginOutput extends PluginOutput {
|
|
2038
|
-
/** Extensions to apply to the source type */
|
|
2039
|
-
extends?: PluginExtends;
|
|
2040
|
-
}
|
|
2041
|
-
/**
|
|
2042
|
-
* Output returned by a plugin's onNamespaceLoaded hook.
|
|
2043
|
-
* Alias for PluginOutput (namespace plugins cannot extend a source type).
|
|
2044
|
-
*/
|
|
2045
|
-
type NamespacePluginOutput = PluginOutput;
|
|
2046
|
-
/**
|
|
2047
|
-
* Plugin interface that all plugins must implement.
|
|
2048
|
-
* Plugins can hook into two lifecycle phases:
|
|
2049
|
-
* - **Definition-time hooks** (`onTypeLoaded`, `onNamespaceLoaded`): Generate TailorDB types, resolvers, and executors
|
|
2050
|
-
* - **Generation-time hooks** (`onTailorDBReady`, `onResolverReady`, `onExecutorReady`): Process finalized artifacts and produce output files
|
|
2051
|
-
* @template TypeConfig - Type for per-type configuration passed via .plugin() method
|
|
2052
|
-
* @template PluginConfig - Type for plugin-level configuration passed via definePlugins()
|
|
2053
|
-
*/
|
|
2054
|
-
interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
|
|
2055
|
-
/** Unique identifier for the plugin */
|
|
2056
|
-
readonly id: string;
|
|
2057
|
-
/** Human-readable description of the plugin */
|
|
2058
|
-
readonly description: string;
|
|
2059
|
-
/**
|
|
2060
|
-
* Import path for this plugin's public API.
|
|
2061
|
-
* Used by code generators to create correct import statements
|
|
2062
|
-
* (e.g., plugin executors and seed schema generation).
|
|
2063
|
-
* Required when plugin has definition-time hooks (onTypeLoaded/onNamespaceLoaded).
|
|
2064
|
-
* Optional for generation-only plugins.
|
|
2065
|
-
*/
|
|
2066
|
-
readonly importPath?: string;
|
|
2067
|
-
/**
|
|
2068
|
-
* Controls whether per-type plugin config is required when attaching via .plugin().
|
|
2069
|
-
* If a function is provided, it receives pluginConfig from definePlugins().
|
|
2070
|
-
* Default is optional when not provided.
|
|
2071
|
-
*/
|
|
2072
|
-
readonly typeConfigRequired?: TypeConfigRequired<PluginConfig>;
|
|
2073
|
-
/**
|
|
2074
|
-
* Plugin-level configuration passed via definePlugins().
|
|
2075
|
-
* This config is stored when the plugin is registered and made available
|
|
2076
|
-
* to all hook methods.
|
|
2077
|
-
*/
|
|
2078
|
-
readonly pluginConfig?: PluginConfig;
|
|
2079
|
-
/**
|
|
2080
|
-
* Process a single TailorDB type and generate outputs.
|
|
2081
|
-
* Called for each type that has this plugin attached via .plugin().
|
|
2082
|
-
* @param context - Context containing the type, config, pluginConfig, and namespace
|
|
2083
|
-
* @returns Plugin output with generated types, resolvers, and executors
|
|
2084
|
-
*/
|
|
2085
|
-
onTypeLoaded?(context: PluginProcessContext<TypeConfig, PluginConfig>): TypePluginOutput | Promise<TypePluginOutput>;
|
|
2086
|
-
/**
|
|
2087
|
-
* Process plugin for a namespace without requiring a source type.
|
|
2088
|
-
* Called once per namespace for plugins configured via definePlugins().
|
|
2089
|
-
* Use this for plugins that generate types independently of user-defined types.
|
|
2090
|
-
* @param context - Context containing the plugin config and namespace
|
|
2091
|
-
* @returns Plugin output with generated types, resolvers, and executors
|
|
2092
|
-
*/
|
|
2093
|
-
onNamespaceLoaded?(context: PluginNamespaceProcessContext<PluginConfig>): NamespacePluginOutput | Promise<NamespacePluginOutput>;
|
|
2094
|
-
/**
|
|
2095
|
-
* Called after all TailorDB types are loaded and finalized.
|
|
2096
|
-
* Receives all TailorDB namespaces and their types.
|
|
2097
|
-
* @param context - Context containing all TailorDB data, auth, and output paths
|
|
2098
|
-
* @returns Generated files and optional errors
|
|
2099
|
-
*/
|
|
2100
|
-
onTailorDBReady?(context: TailorDBReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2101
|
-
/**
|
|
2102
|
-
* Called after all resolvers are loaded and finalized.
|
|
2103
|
-
* Receives all TailorDB data plus resolver data.
|
|
2104
|
-
* @param context - Context containing TailorDB data, resolvers, auth, and output paths
|
|
2105
|
-
* @returns Generated files and optional errors
|
|
2106
|
-
*/
|
|
2107
|
-
onResolverReady?(context: ResolverReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2108
|
-
/**
|
|
2109
|
-
* Called after all executors are loaded and finalized.
|
|
2110
|
-
* Receives all TailorDB data, resolver data, plus executor data.
|
|
2111
|
-
* @param context - Context containing all service data, auth, and output paths
|
|
2112
|
-
* @returns Generated files and optional errors
|
|
2113
|
-
*/
|
|
2114
|
-
onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2115
|
-
}
|
|
2116
|
-
//#endregion
|
|
2117
|
-
//#region src/configure/services/tailordb/schema.d.ts
|
|
2118
|
-
interface RelationConfig<S extends RelationType, T extends TailorDBType$1> {
|
|
2119
|
-
type: S;
|
|
2120
|
-
toward: {
|
|
2121
|
-
type: T;
|
|
2122
|
-
as?: string;
|
|
2123
|
-
key?: keyof T["fields"] & string;
|
|
2124
|
-
};
|
|
2125
|
-
backward?: string;
|
|
2126
|
-
}
|
|
2127
|
-
type RelationSelfConfig = {
|
|
2128
|
-
type: RelationType;
|
|
2129
|
-
toward: {
|
|
2130
|
-
type: "self";
|
|
2131
|
-
as?: string;
|
|
2132
|
-
key?: string;
|
|
2133
|
-
};
|
|
2134
|
-
backward?: string;
|
|
1112
|
+
//#region src/configure/services/tailordb/schema.d.ts
|
|
1113
|
+
interface RelationConfig<S extends RelationType, T extends TailorDBType$1> {
|
|
1114
|
+
type: S;
|
|
1115
|
+
toward: {
|
|
1116
|
+
type: T;
|
|
1117
|
+
as?: string;
|
|
1118
|
+
key?: keyof T["fields"] & string;
|
|
1119
|
+
};
|
|
1120
|
+
backward?: string;
|
|
1121
|
+
}
|
|
1122
|
+
type RelationSelfConfig = {
|
|
1123
|
+
type: RelationType;
|
|
1124
|
+
toward: {
|
|
1125
|
+
type: "self";
|
|
1126
|
+
as?: string;
|
|
1127
|
+
key?: string;
|
|
1128
|
+
};
|
|
1129
|
+
backward?: string;
|
|
2135
1130
|
};
|
|
2136
1131
|
type TailorAnyDBField = TailorDBField<any, any>;
|
|
2137
1132
|
type TailorAnyDBType = TailorDBType$1<any, any>;
|
|
@@ -2615,53 +1610,135 @@ declare const db: {
|
|
|
2615
1610
|
};
|
|
2616
1611
|
};
|
|
2617
1612
|
//#endregion
|
|
2618
|
-
//#region src/
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
1613
|
+
//#region src/types/auth.d.ts
|
|
1614
|
+
type OAuth2ClientGrantType = OAuth2Client["grantTypes"][number];
|
|
1615
|
+
type SCIMAttributeType = SCIMAttribute["type"];
|
|
1616
|
+
type AuthInvokerWithName<M extends string> = Omit<AuthInvoker, "machineUserName"> & {
|
|
1617
|
+
machineUserName: M;
|
|
1618
|
+
};
|
|
1619
|
+
type ValueOperand = string | boolean | string[] | boolean[];
|
|
1620
|
+
type AuthAttributeValue = ValueOperand | null | undefined;
|
|
1621
|
+
type UserFieldKeys<User extends TailorDBInstance> = keyof output<User> & string;
|
|
1622
|
+
type FieldDefined<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = User["fields"][Key] extends {
|
|
1623
|
+
_defined: infer Defined;
|
|
1624
|
+
} ? Defined : never;
|
|
1625
|
+
type FieldOutput<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = output<User>[Key];
|
|
1626
|
+
type FieldIsRequired<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = undefined extends FieldOutput<User, Key> ? false : true;
|
|
1627
|
+
type FieldIsOfType<User extends TailorDBInstance, Key extends UserFieldKeys<User>, Type extends string> = FieldDefined<User, Key> extends {
|
|
1628
|
+
type: Type;
|
|
1629
|
+
} ? true : false;
|
|
1630
|
+
type FieldIsArray<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
1631
|
+
array: true;
|
|
1632
|
+
} ? true : false;
|
|
1633
|
+
type FieldIsUnique<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldDefined<User, Key> extends {
|
|
1634
|
+
unique: true;
|
|
1635
|
+
} ? true : false;
|
|
1636
|
+
type FieldSupportsValueOperand<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldOutput<User, Key> extends ValueOperand | null | undefined ? true : false;
|
|
1637
|
+
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>];
|
|
1638
|
+
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>];
|
|
1639
|
+
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>];
|
|
1640
|
+
type UserAttributeMap<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true };
|
|
1641
|
+
type DisallowExtraKeys<T, Allowed extends PropertyKey> = T & { [K in Exclude<keyof T, Allowed>]: never };
|
|
1642
|
+
type AttributeListValue<User extends TailorDBInstance, Key extends UserAttributeListKey<User>> = Key extends keyof output<User> ? output<User>[Key] : never;
|
|
1643
|
+
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 };
|
|
1644
|
+
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>>;
|
|
1645
|
+
type UserProfile<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[]> = {
|
|
1646
|
+
/**
|
|
1647
|
+
* TailorDB namespace where the user type is defined.
|
|
1648
|
+
*
|
|
1649
|
+
* Usually auto-resolved, so you don't need to specify this.
|
|
1650
|
+
* Required only when multiple TailorDBs exist and the type is in an external TailorDB.
|
|
1651
|
+
*/
|
|
1652
|
+
namespace?: string;
|
|
1653
|
+
type: User;
|
|
1654
|
+
usernameField: UsernameFieldKey<User>;
|
|
1655
|
+
attributes?: DisallowExtraKeys<AttributeMap$1, UserAttributeKey<User>>;
|
|
1656
|
+
attributeList?: AttributeList$1;
|
|
1657
|
+
};
|
|
1658
|
+
type MachineUserAttributeFields = Record<string, TailorField<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
|
|
1659
|
+
type TailorFieldOutputValue<Field> = Field extends TailorField<DefinedFieldMetadata, infer Output, FieldMetadata, TailorFieldType> ? Output : never;
|
|
1660
|
+
type MachineUserAttributeValues<Fields extends MachineUserAttributeFields> = { [K in keyof Fields]: TailorFieldOutputValue<Fields[K]> extends ValueOperand | null | undefined ? TailorFieldOutputValue<Fields[K]> : never };
|
|
1661
|
+
type MachineUserFromAttributes<Fields extends MachineUserAttributeFields> = (keyof Fields extends never ? {
|
|
1662
|
+
attributes?: never;
|
|
1663
|
+
} : {
|
|
1664
|
+
attributes: DisallowExtraKeys<MachineUserAttributeValues<Fields>, keyof Fields>;
|
|
1665
|
+
}) & {
|
|
1666
|
+
attributeList?: string[];
|
|
1667
|
+
};
|
|
1668
|
+
type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = [], MachineUserAttributes extends MachineUserAttributeFields | undefined = undefined> = IsAny<MachineUserAttributes> extends true ? IsAny<User> extends true ? {
|
|
1669
|
+
attributes: Record<string, AuthAttributeValue>;
|
|
1670
|
+
attributeList?: string[];
|
|
1671
|
+
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
1672
|
+
attributes?: never;
|
|
1673
|
+
} : {
|
|
1674
|
+
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 };
|
|
1675
|
+
}) & ([] extends AttributeList$1 ? {
|
|
1676
|
+
attributeList?: never;
|
|
1677
|
+
} : {
|
|
1678
|
+
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
1679
|
+
}) : [MachineUserAttributes] extends [MachineUserAttributeFields] ? MachineUserFromAttributes<MachineUserAttributes> : IsAny<User> extends true ? {
|
|
1680
|
+
attributes: Record<string, AuthAttributeValue>;
|
|
1681
|
+
attributeList?: string[];
|
|
1682
|
+
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
1683
|
+
attributes?: never;
|
|
1684
|
+
} : {
|
|
1685
|
+
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 };
|
|
1686
|
+
}) & ([] extends AttributeList$1 ? {
|
|
1687
|
+
attributeList?: never;
|
|
1688
|
+
} : {
|
|
1689
|
+
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
1690
|
+
});
|
|
1691
|
+
type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined> = {
|
|
1692
|
+
userProfile?: UserProfile<User, AttributeMap$1, AttributeList$1>;
|
|
1693
|
+
machineUserAttributes?: MachineUserAttributes;
|
|
1694
|
+
machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap$1, AttributeList$1, MachineUserAttributes>>;
|
|
1695
|
+
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
1696
|
+
idProvider?: IdProvider;
|
|
1697
|
+
scim?: SCIMConfig;
|
|
1698
|
+
tenantProvider?: TenantProvider;
|
|
1699
|
+
publishSessionEvents?: boolean;
|
|
1700
|
+
};
|
|
1701
|
+
declare const authDefinitionBrand: unique symbol;
|
|
1702
|
+
type AuthDefinitionBrand = {
|
|
1703
|
+
readonly [authDefinitionBrand]: true;
|
|
1704
|
+
};
|
|
1705
|
+
type DefinedAuth<Name extends string, Config, MachineUserNames extends string> = Config & {
|
|
1706
|
+
name: Name;
|
|
1707
|
+
invoker<M extends MachineUserNames>(machineUser: M): AuthInvokerWithName<M>;
|
|
1708
|
+
} & AuthDefinitionBrand;
|
|
1709
|
+
type AuthExternalConfig = {
|
|
1710
|
+
name: string;
|
|
1711
|
+
external: true;
|
|
1712
|
+
};
|
|
1713
|
+
type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
1714
|
+
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose, string>;
|
|
1715
|
+
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
1716
|
+
//#endregion
|
|
1717
|
+
//#region src/types/tailordb.d.ts
|
|
1718
|
+
type RelationType = "1-1" | "oneToOne" | "n-1" | "manyToOne" | "N-1" | "keyOnly";
|
|
1719
|
+
type TailorDBExternalConfig = {
|
|
1720
|
+
external: true;
|
|
1721
|
+
};
|
|
1722
|
+
type TailorDBServiceInput = {
|
|
1723
|
+
[namespace: string]: TailorDBServiceConfigInput | TailorDBExternalConfig;
|
|
1724
|
+
};
|
|
2622
1725
|
interface UserDefinedTypeSource {
|
|
2623
|
-
/** File path to import from */
|
|
2624
1726
|
filePath: string;
|
|
2625
|
-
/** Export name in the source file */
|
|
2626
1727
|
exportName: string;
|
|
2627
|
-
/** Not present for user-defined types */
|
|
2628
1728
|
pluginId?: never;
|
|
2629
1729
|
}
|
|
2630
|
-
/**
|
|
2631
|
-
* Source information for a plugin-generated TailorDB type.
|
|
2632
|
-
*/
|
|
2633
1730
|
interface PluginGeneratedTypeSource {
|
|
2634
|
-
/** Not present for plugin-generated types */
|
|
2635
1731
|
filePath?: never;
|
|
2636
|
-
/** Export name of the generated type */
|
|
2637
1732
|
exportName: string;
|
|
2638
|
-
/** Plugin ID that generated this type */
|
|
2639
1733
|
pluginId: string;
|
|
2640
|
-
/** Plugin import path for code generators */
|
|
2641
1734
|
pluginImportPath: string;
|
|
2642
|
-
/** Original type's file path */
|
|
2643
1735
|
originalFilePath: string;
|
|
2644
|
-
/** Original type's export name */
|
|
2645
1736
|
originalExportName: string;
|
|
2646
|
-
/** Generated type kind for getGeneratedType() API (e.g., "request", "step") */
|
|
2647
1737
|
generatedTypeKind?: string;
|
|
2648
|
-
/** Plugin config used to generate this type */
|
|
2649
1738
|
pluginConfig?: unknown;
|
|
2650
|
-
/** Namespace where this type was generated */
|
|
2651
1739
|
namespace?: string;
|
|
2652
1740
|
}
|
|
2653
|
-
/**
|
|
2654
|
-
* Source information for a TailorDB type.
|
|
2655
|
-
* Discriminated union: use `pluginId` to distinguish between user-defined and plugin-generated types.
|
|
2656
|
-
*/
|
|
2657
1741
|
type TypeSourceInfoEntry = UserDefinedTypeSource | PluginGeneratedTypeSource;
|
|
2658
|
-
/**
|
|
2659
|
-
* Parsed and normalized settings for TailorDB type.
|
|
2660
|
-
* gqlOperations is normalized from alias to object format.
|
|
2661
|
-
* @public
|
|
2662
|
-
*/
|
|
2663
|
-
type TailorDBTypeParsedSettings = z.output<typeof TailorDBTypeSettingsSchema>;
|
|
2664
|
-
type RawPermissions = z.output<typeof RawPermissionsSchema>;
|
|
2665
1742
|
interface Script {
|
|
2666
1743
|
expr: string;
|
|
2667
1744
|
}
|
|
@@ -2677,13 +1754,8 @@ interface OperatorFieldHook {
|
|
|
2677
1754
|
create?: Script;
|
|
2678
1755
|
update?: Script;
|
|
2679
1756
|
}
|
|
2680
|
-
/**
|
|
2681
|
-
* Raw relation config stored in configure layer, processed in parser layer.
|
|
2682
|
-
* This is the serialized form of RelationConfig from schema.ts where
|
|
2683
|
-
* the TailorDBType reference is replaced with the type name string.
|
|
2684
|
-
*/
|
|
2685
1757
|
interface RawRelationConfig {
|
|
2686
|
-
type:
|
|
1758
|
+
type: "1-1" | "n-1" | "keyOnly" | "oneToOne" | "manyToOne" | "N-1";
|
|
2687
1759
|
toward: {
|
|
2688
1760
|
type: string;
|
|
2689
1761
|
as?: string;
|
|
@@ -2767,9 +1839,6 @@ interface TailorDBTypeMetadata {
|
|
|
2767
1839
|
unique?: boolean;
|
|
2768
1840
|
}>;
|
|
2769
1841
|
}
|
|
2770
|
-
/**
|
|
2771
|
-
* Parsed and normalized TailorDB field information
|
|
2772
|
-
*/
|
|
2773
1842
|
interface ParsedField {
|
|
2774
1843
|
name: string;
|
|
2775
1844
|
config: OperatorFieldConfig;
|
|
@@ -2781,9 +1850,6 @@ interface ParsedField {
|
|
|
2781
1850
|
unique: boolean;
|
|
2782
1851
|
};
|
|
2783
1852
|
}
|
|
2784
|
-
/**
|
|
2785
|
-
* Parsed and normalized TailorDB relationship information
|
|
2786
|
-
*/
|
|
2787
1853
|
interface ParsedRelationship {
|
|
2788
1854
|
name: string;
|
|
2789
1855
|
targetType: string;
|
|
@@ -2792,9 +1858,6 @@ interface ParsedRelationship {
|
|
|
2792
1858
|
isArray: boolean;
|
|
2793
1859
|
description: string;
|
|
2794
1860
|
}
|
|
2795
|
-
/**
|
|
2796
|
-
* Parsed and normalized TailorDB type information
|
|
2797
|
-
*/
|
|
2798
1861
|
interface TailorDBType {
|
|
2799
1862
|
name: string;
|
|
2800
1863
|
pluralForm: string;
|
|
@@ -2808,5 +1871,249 @@ interface TailorDBType {
|
|
|
2808
1871
|
files?: TailorDBTypeMetadata["files"];
|
|
2809
1872
|
}
|
|
2810
1873
|
//#endregion
|
|
2811
|
-
|
|
2812
|
-
|
|
1874
|
+
//#region src/types/plugin-generation.d.ts
|
|
1875
|
+
/**
|
|
1876
|
+
* A single generated file to write to disk.
|
|
1877
|
+
*/
|
|
1878
|
+
interface GeneratedFile {
|
|
1879
|
+
path: string;
|
|
1880
|
+
content: string;
|
|
1881
|
+
skipIfExists?: boolean;
|
|
1882
|
+
executable?: boolean;
|
|
1883
|
+
}
|
|
1884
|
+
/**
|
|
1885
|
+
* Result returned by generation-time hooks.
|
|
1886
|
+
*/
|
|
1887
|
+
interface GeneratorResult {
|
|
1888
|
+
files: GeneratedFile[];
|
|
1889
|
+
errors?: string[];
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* Auth configuration available to generation-time hooks.
|
|
1893
|
+
*/
|
|
1894
|
+
interface GeneratorAuthInput {
|
|
1895
|
+
name: string;
|
|
1896
|
+
userProfile?: {
|
|
1897
|
+
typeName: string;
|
|
1898
|
+
namespace: string;
|
|
1899
|
+
usernameField: string;
|
|
1900
|
+
};
|
|
1901
|
+
machineUsers?: Record<string, {
|
|
1902
|
+
attributes: Record<string, unknown>;
|
|
1903
|
+
}>;
|
|
1904
|
+
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
1905
|
+
idProvider?: IdProvider;
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Namespace-level TailorDB data available to generation-time hooks.
|
|
1909
|
+
*/
|
|
1910
|
+
interface TailorDBNamespaceData {
|
|
1911
|
+
/** Namespace name */
|
|
1912
|
+
namespace: string;
|
|
1913
|
+
/** All TailorDB types in this namespace, keyed by type name */
|
|
1914
|
+
types: Record<string, TailorDBType>;
|
|
1915
|
+
/** Source info for each type (file path, export name, plugin info) */
|
|
1916
|
+
sourceInfo: ReadonlyMap<string, TypeSourceInfoEntry>;
|
|
1917
|
+
/** Plugin attachments configured on each type via .plugin() method */
|
|
1918
|
+
pluginAttachments: ReadonlyMap<string, readonly PluginAttachment[]>;
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Namespace-level resolver data available to generation-time hooks.
|
|
1922
|
+
*/
|
|
1923
|
+
interface ResolverNamespaceData {
|
|
1924
|
+
/** Namespace name */
|
|
1925
|
+
namespace: string;
|
|
1926
|
+
/** All resolvers in this namespace, keyed by resolver name */
|
|
1927
|
+
resolvers: Record<string, Resolver>;
|
|
1928
|
+
}
|
|
1929
|
+
/**
|
|
1930
|
+
* Context passed to plugin's onTailorDBReady hook.
|
|
1931
|
+
* @template PluginConfig - Plugin-level configuration type
|
|
1932
|
+
*/
|
|
1933
|
+
interface TailorDBReadyContext<PluginConfig = unknown> {
|
|
1934
|
+
/** All TailorDB namespaces with their types and metadata */
|
|
1935
|
+
tailordb: TailorDBNamespaceData[];
|
|
1936
|
+
/** Auth configuration */
|
|
1937
|
+
auth?: GeneratorAuthInput;
|
|
1938
|
+
/** Base directory for generated files */
|
|
1939
|
+
baseDir: string;
|
|
1940
|
+
/** Path to tailor.config.ts */
|
|
1941
|
+
configPath: string;
|
|
1942
|
+
/** Plugin-level configuration passed via definePlugins() */
|
|
1943
|
+
pluginConfig: PluginConfig;
|
|
1944
|
+
}
|
|
1945
|
+
/**
|
|
1946
|
+
* Context passed to plugin's onResolverReady hook.
|
|
1947
|
+
* @template PluginConfig - Plugin-level configuration type
|
|
1948
|
+
*/
|
|
1949
|
+
interface ResolverReadyContext<PluginConfig = unknown> {
|
|
1950
|
+
/** All TailorDB namespaces with their types and metadata */
|
|
1951
|
+
tailordb: TailorDBNamespaceData[];
|
|
1952
|
+
/** All resolver namespaces with their resolvers */
|
|
1953
|
+
resolvers: ResolverNamespaceData[];
|
|
1954
|
+
/** Auth configuration */
|
|
1955
|
+
auth?: GeneratorAuthInput;
|
|
1956
|
+
/** Base directory for generated files */
|
|
1957
|
+
baseDir: string;
|
|
1958
|
+
/** Path to tailor.config.ts */
|
|
1959
|
+
configPath: string;
|
|
1960
|
+
/** Plugin-level configuration passed via definePlugins() */
|
|
1961
|
+
pluginConfig: PluginConfig;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Context passed to plugin's onExecutorReady hook.
|
|
1965
|
+
* @template PluginConfig - Plugin-level configuration type
|
|
1966
|
+
*/
|
|
1967
|
+
interface ExecutorReadyContext<PluginConfig = unknown> {
|
|
1968
|
+
/** All TailorDB namespaces with their types and metadata */
|
|
1969
|
+
tailordb: TailorDBNamespaceData[];
|
|
1970
|
+
/** All resolver namespaces with their resolvers */
|
|
1971
|
+
resolvers: ResolverNamespaceData[];
|
|
1972
|
+
/** All executors, keyed by executor name */
|
|
1973
|
+
executors: Record<string, Executor>;
|
|
1974
|
+
/** Auth configuration */
|
|
1975
|
+
auth?: GeneratorAuthInput;
|
|
1976
|
+
/** Base directory for generated files */
|
|
1977
|
+
baseDir: string;
|
|
1978
|
+
/** Path to tailor.config.ts */
|
|
1979
|
+
configPath: string;
|
|
1980
|
+
/** Plugin-level configuration passed via definePlugins() */
|
|
1981
|
+
pluginConfig: PluginConfig;
|
|
1982
|
+
}
|
|
1983
|
+
//#endregion
|
|
1984
|
+
//#region src/types/plugin.d.ts
|
|
1985
|
+
type TypeConfigRequired<PluginConfig = unknown> = boolean | ((pluginConfig: PluginConfig | undefined) => boolean);
|
|
1986
|
+
/**
|
|
1987
|
+
* Interface for plugin configuration mapping.
|
|
1988
|
+
* Extend this interface via declaration merging to add typed plugin configs.
|
|
1989
|
+
*/
|
|
1990
|
+
interface PluginConfigs<Fields extends string = string> {}
|
|
1991
|
+
/**
|
|
1992
|
+
* Plugin attachment stored on TailorAnyDBType instances.
|
|
1993
|
+
*/
|
|
1994
|
+
interface PluginAttachment {
|
|
1995
|
+
pluginId: string;
|
|
1996
|
+
config: unknown;
|
|
1997
|
+
}
|
|
1998
|
+
/**
|
|
1999
|
+
* Context passed to plugin's process method
|
|
2000
|
+
*/
|
|
2001
|
+
interface PluginProcessContext<TypeConfig = unknown, PluginConfig = unknown> {
|
|
2002
|
+
type: TailorAnyDBType;
|
|
2003
|
+
typeConfig: TypeConfig;
|
|
2004
|
+
pluginConfig: PluginConfig;
|
|
2005
|
+
namespace: string;
|
|
2006
|
+
}
|
|
2007
|
+
/**
|
|
2008
|
+
* Context passed to plugin's onNamespaceLoaded hook.
|
|
2009
|
+
*/
|
|
2010
|
+
interface PluginNamespaceProcessContext<PluginConfig = unknown> {
|
|
2011
|
+
pluginConfig: PluginConfig;
|
|
2012
|
+
namespace: string;
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* Interface representing a TailorDB type for plugin output.
|
|
2016
|
+
*/
|
|
2017
|
+
interface TailorDBTypeForPlugin {
|
|
2018
|
+
readonly name: string;
|
|
2019
|
+
readonly fields: Record<string, unknown>;
|
|
2020
|
+
}
|
|
2021
|
+
type PluginGeneratedType = TailorDBTypeForPlugin;
|
|
2022
|
+
type PluginGeneratedTypes = Record<string, PluginGeneratedType>;
|
|
2023
|
+
interface PluginGeneratedResolver {
|
|
2024
|
+
name: string;
|
|
2025
|
+
operation: "query" | "mutation";
|
|
2026
|
+
inputFields?: Record<string, unknown>;
|
|
2027
|
+
outputFields: Record<string, unknown>;
|
|
2028
|
+
body: string;
|
|
2029
|
+
}
|
|
2030
|
+
interface PluginRecordTriggerConfig {
|
|
2031
|
+
kind: "recordCreated" | "recordUpdated" | "recordDeleted";
|
|
2032
|
+
typeName: string;
|
|
2033
|
+
}
|
|
2034
|
+
interface PluginScheduleTriggerConfig {
|
|
2035
|
+
kind: "schedule";
|
|
2036
|
+
cron: string;
|
|
2037
|
+
timezone?: string;
|
|
2038
|
+
}
|
|
2039
|
+
interface PluginIncomingWebhookTriggerConfig {
|
|
2040
|
+
kind: "incomingWebhook";
|
|
2041
|
+
}
|
|
2042
|
+
type PluginTriggerConfig = PluginRecordTriggerConfig | PluginScheduleTriggerConfig | PluginIncomingWebhookTriggerConfig;
|
|
2043
|
+
type PluginInjectValue = string | number | boolean | null;
|
|
2044
|
+
type PluginInjectMap = Record<string, PluginInjectValue>;
|
|
2045
|
+
interface PluginFunctionOperationConfig {
|
|
2046
|
+
kind: "function";
|
|
2047
|
+
body: string;
|
|
2048
|
+
inject?: PluginInjectMap;
|
|
2049
|
+
}
|
|
2050
|
+
interface PluginGraphQLOperationConfig {
|
|
2051
|
+
kind: "graphql";
|
|
2052
|
+
query: string;
|
|
2053
|
+
appName?: string;
|
|
2054
|
+
variables?: string;
|
|
2055
|
+
}
|
|
2056
|
+
interface PluginWebhookOperationConfig {
|
|
2057
|
+
kind: "webhook";
|
|
2058
|
+
url: string;
|
|
2059
|
+
}
|
|
2060
|
+
interface PluginWorkflowOperationConfig {
|
|
2061
|
+
kind: "workflow";
|
|
2062
|
+
workflowName: string;
|
|
2063
|
+
}
|
|
2064
|
+
type PluginOperationConfig = PluginFunctionOperationConfig | PluginGraphQLOperationConfig | PluginWebhookOperationConfig | PluginWorkflowOperationConfig;
|
|
2065
|
+
type PluginExecutorContextValue = TailorAnyDBType | string | number | boolean | null | undefined;
|
|
2066
|
+
interface PluginExecutorContextBase {
|
|
2067
|
+
sourceType: TailorAnyDBType | null;
|
|
2068
|
+
namespace: string;
|
|
2069
|
+
}
|
|
2070
|
+
type PluginExecutorContext = PluginExecutorContextBase & {
|
|
2071
|
+
[key: string]: PluginExecutorContextValue;
|
|
2072
|
+
};
|
|
2073
|
+
interface PluginExecutorModule {
|
|
2074
|
+
default: unknown;
|
|
2075
|
+
}
|
|
2076
|
+
interface PluginGeneratedExecutorWithFile<Ctx = PluginExecutorContext> {
|
|
2077
|
+
name: string;
|
|
2078
|
+
resolve: () => Promise<PluginExecutorModule>;
|
|
2079
|
+
context: Ctx;
|
|
2080
|
+
}
|
|
2081
|
+
interface PluginGeneratedExecutorLegacy {
|
|
2082
|
+
name: string;
|
|
2083
|
+
description?: string;
|
|
2084
|
+
trigger: PluginTriggerConfig;
|
|
2085
|
+
operation: PluginOperationConfig;
|
|
2086
|
+
}
|
|
2087
|
+
type PluginGeneratedExecutor = PluginGeneratedExecutorWithFile | PluginGeneratedExecutorLegacy;
|
|
2088
|
+
interface PluginExtends {
|
|
2089
|
+
fields?: Record<string, TailorAnyDBField>;
|
|
2090
|
+
}
|
|
2091
|
+
interface PluginOutput {
|
|
2092
|
+
types?: PluginGeneratedTypes;
|
|
2093
|
+
resolvers?: PluginGeneratedResolver[];
|
|
2094
|
+
executors?: PluginGeneratedExecutor[];
|
|
2095
|
+
}
|
|
2096
|
+
interface TypePluginOutput extends PluginOutput {
|
|
2097
|
+
extends?: PluginExtends;
|
|
2098
|
+
}
|
|
2099
|
+
type NamespacePluginOutput = PluginOutput;
|
|
2100
|
+
/**
|
|
2101
|
+
* Plugin interface that all plugins must implement.
|
|
2102
|
+
* @template TypeConfig - Type for per-type configuration passed via .plugin() method
|
|
2103
|
+
* @template PluginConfig - Type for plugin-level configuration passed via definePlugins()
|
|
2104
|
+
*/
|
|
2105
|
+
interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
|
|
2106
|
+
readonly id: string;
|
|
2107
|
+
readonly description: string;
|
|
2108
|
+
readonly importPath?: string;
|
|
2109
|
+
readonly typeConfigRequired?: TypeConfigRequired<PluginConfig>;
|
|
2110
|
+
readonly pluginConfig?: PluginConfig;
|
|
2111
|
+
onTypeLoaded?(context: PluginProcessContext<TypeConfig, PluginConfig>): TypePluginOutput | Promise<TypePluginOutput>;
|
|
2112
|
+
onNamespaceLoaded?(context: PluginNamespaceProcessContext<PluginConfig>): NamespacePluginOutput | Promise<NamespacePluginOutput>;
|
|
2113
|
+
onTailorDBReady?(context: TailorDBReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2114
|
+
onResolverReady?(context: ResolverReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2115
|
+
onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2116
|
+
}
|
|
2117
|
+
//#endregion
|
|
2118
|
+
export { TailorFieldType as $, OAuth2ClientGrantType as A, IDToken as At, TailorDBInstance as B, TenantProvider as Bt, TailorDBType as C, RecordTrigger as Ct, AuthOwnConfig as D, WorkflowOperation as Dt, AuthExternalConfig as E, WebhookOperation as Et, UsernameFieldKey as F, SCIMAttribute as Ft, TailorTypePermission as G, db as H, ValueOperand as I, SCIMAttributeMapping as It, ArrayFieldOutput as J, unsafeAllowAllGqlPermission as K, TailorAnyDBField as L, SCIMAuthorization as Lt, UserAttributeKey as M, OAuth2ClientInput as Mt, UserAttributeListKey as N, OIDC as Nt, AuthServiceInput as O, AuthInvoker as Ot, UserAttributeMap as P, SAML as Pt, FieldOutput$1 as Q, TailorAnyDBType as R, SCIMConfig as Rt, TailorDBServiceInput as S, IncomingWebhookTrigger as St, AuthConfig as T, ScheduleTriggerInput as Tt, PermissionCondition as U, TailorDBType$1 as V, TailorTypeGqlPermission as W, FieldMetadata as X, DefinedFieldMetadata as Y, FieldOptions as Z, GeneratorResult as _, Executor as _t, PluginExecutorContext as a, AttributeList as at, TailorDBNamespaceData as b, GqlOperation as bt, PluginGeneratedExecutorWithFile as c, InferredAttributeMap as ct, PluginNamespaceProcessContext as d, AllowedValues as dt, TailorAnyField as et, PluginOutput as f, AllowedValuesOutput as ft, ExecutorReadyContext as g, AuthAccessTokenTrigger as gt, TypePluginOutput as h, GeneratorConfig as ht, PluginConfigs as i, output as it, SCIMAttributeType as j, IdProvider as jt, DefinedAuth as k, BuiltinIdP as kt, PluginGeneratedResolver as l, TailorUser as lt, TailorDBTypeForPlugin as m, ResolverInput as mt, Plugin as n, InferFieldsOutput as nt, PluginExecutorContextBase as o, AttributeMap as ot, PluginProcessContext as p, Resolver as pt, unsafeAllowAllTypePermission as q, PluginAttachment as r, JsonCompatible as rt, PluginGeneratedExecutor as s, InferredAttributeList as st, NamespacePluginOutput as t, TailorField as tt, PluginGeneratedType as u, unauthenticatedTailorUser as ut, ResolverNamespaceData as v, ExecutorInput as vt, TypeSourceInfoEntry as w, ResolverExecutedTrigger as wt, TailorDBReadyContext as x, IdpUserTrigger as xt, ResolverReadyContext as y, FunctionOperation as yt, TailorDBField as z, SCIMResource as zt };
|
|
2119
|
+
//# sourceMappingURL=plugin-CE-BZZgX.d.mts.map
|