@graphoria/server 0.2.2 → 0.3.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/README.md +25 -20
- package/dist/src/ai/tools/core.d.ts +6 -1
- package/dist/src/ai/tools/core.d.ts.map +1 -1
- package/dist/src/ai/tools/core.test.d.ts +2 -0
- package/dist/src/ai/tools/core.test.d.ts.map +1 -0
- package/dist/src/analyzeQuery/costLimit.d.ts +30 -0
- package/dist/src/analyzeQuery/costLimit.d.ts.map +1 -0
- package/dist/src/analyzeQuery/costLimit.test.d.ts +2 -0
- package/dist/src/analyzeQuery/costLimit.test.d.ts.map +1 -0
- package/dist/src/analyzeQuery/depthLimit.d.ts.map +1 -1
- package/dist/src/analyzeQuery/fragments.d.ts +6 -0
- package/dist/src/analyzeQuery/fragments.d.ts.map +1 -0
- package/dist/src/config/types/ai.d.ts +0 -6
- package/dist/src/config/types/ai.d.ts.map +1 -1
- package/dist/src/config/types/auth.d.ts +8 -29
- package/dist/src/config/types/auth.d.ts.map +1 -1
- package/dist/src/config/types/cron.d.ts +0 -94
- package/dist/src/config/types/cron.d.ts.map +1 -1
- package/dist/src/config/types/db.d.ts +2 -87
- package/dist/src/config/types/db.d.ts.map +1 -1
- package/dist/src/config/types/operation.d.ts +4 -0
- package/dist/src/config/types/operation.d.ts.map +1 -1
- package/dist/src/config/types/operation.test.d.ts +2 -0
- package/dist/src/config/types/operation.test.d.ts.map +1 -0
- package/dist/src/config/types/queue.d.ts +0 -47
- package/dist/src/config/types/queue.d.ts.map +1 -1
- package/dist/src/config/types/remote-rest.d.ts +0 -9
- package/dist/src/config/types/remote-rest.d.ts.map +1 -1
- package/dist/src/config/types/remote-schema.d.ts +0 -10
- package/dist/src/config/types/remote-schema.d.ts.map +1 -1
- package/dist/src/configuration/crossReferences.d.ts +27 -0
- package/dist/src/configuration/crossReferences.d.ts.map +1 -0
- package/dist/src/configuration/crossReferences.test.d.ts +2 -0
- package/dist/src/configuration/crossReferences.test.d.ts.map +1 -0
- package/dist/src/configuration/getSchemas/index.d.ts +70 -4
- package/dist/src/configuration/getSchemas/index.d.ts.map +1 -1
- package/dist/src/configuration/getSchemas/mergeEntities/index.d.ts +3 -0
- package/dist/src/configuration/getSchemas/mergeEntities/index.d.ts.map +1 -1
- package/dist/src/configuration/gql/handleGraphQLRequestFactory.d.ts +32 -2
- package/dist/src/configuration/gql/handleGraphQLRequestFactory.d.ts.map +1 -1
- package/dist/src/configuration/gql/handleGraphQLSubscriptionFactory.d.ts.map +1 -1
- package/dist/src/configuration/index.d.ts +41 -2
- package/dist/src/configuration/index.d.ts.map +1 -1
- package/dist/src/configuration/rest/handleRESTRequestFactory.d.ts.map +1 -1
- package/dist/src/configuration/rest/index.d.ts.map +1 -1
- package/dist/src/console/api.d.ts +7 -5
- package/dist/src/console/api.d.ts.map +1 -1
- package/dist/src/console/session.d.ts +21 -0
- package/dist/src/console/session.d.ts.map +1 -0
- package/dist/src/console/session.test.d.ts +2 -0
- package/dist/src/console/session.test.d.ts.map +1 -0
- package/dist/src/cron/index.d.ts +1 -1
- package/dist/src/cron/index.d.ts.map +1 -1
- package/dist/src/cron/index.test.d.ts +2 -0
- package/dist/src/cron/index.test.d.ts.map +1 -0
- package/dist/src/databases/common.d.ts +12 -4
- package/dist/src/databases/common.d.ts.map +1 -1
- package/dist/src/databases/core/executor.d.ts +6 -2
- package/dist/src/databases/core/executor.d.ts.map +1 -1
- package/dist/src/databases/core/function-mapping.d.ts +4 -3
- package/dist/src/databases/core/function-mapping.d.ts.map +1 -1
- package/dist/src/databases/core/query-builder.d.ts +7 -1
- package/dist/src/databases/core/query-builder.d.ts.map +1 -1
- package/dist/src/databases/engines/mssql/connection.d.ts +29 -6
- package/dist/src/databases/engines/mssql/connection.d.ts.map +1 -1
- package/dist/src/databases/engines/mssql/connection.test.d.ts +2 -0
- package/dist/src/databases/engines/mssql/connection.test.d.ts.map +1 -0
- package/dist/src/databases/engines/mssql/format.d.ts +2 -1
- package/dist/src/databases/engines/mssql/format.d.ts.map +1 -1
- package/dist/src/databases/engines/mssql/query/index.d.ts +3 -2
- package/dist/src/databases/engines/mssql/query/index.d.ts.map +1 -1
- package/dist/src/databases/engines/mysql/connection.d.ts +16 -0
- package/dist/src/databases/engines/mysql/connection.d.ts.map +1 -1
- package/dist/src/databases/engines/mysql/connection.test.d.ts +2 -0
- package/dist/src/databases/engines/mysql/connection.test.d.ts.map +1 -0
- package/dist/src/databases/engines/mysql/format.d.ts +2 -1
- package/dist/src/databases/engines/mysql/format.d.ts.map +1 -1
- package/dist/src/databases/engines/mysql/query/index.d.ts +3 -2
- package/dist/src/databases/engines/mysql/query/index.d.ts.map +1 -1
- package/dist/src/databases/engines/postgresql/connection.d.ts +25 -6
- package/dist/src/databases/engines/postgresql/connection.d.ts.map +1 -1
- package/dist/src/databases/engines/postgresql/connection.test.d.ts +2 -0
- package/dist/src/databases/engines/postgresql/connection.test.d.ts.map +1 -0
- package/dist/src/databases/engines/postgresql/format.d.ts +2 -1
- package/dist/src/databases/engines/postgresql/format.d.ts.map +1 -1
- package/dist/src/databases/engines/postgresql/query/index.d.ts +3 -2
- package/dist/src/databases/engines/postgresql/query/index.d.ts.map +1 -1
- package/dist/src/databases/high-level-operations.d.ts +2 -0
- package/dist/src/databases/high-level-operations.d.ts.map +1 -1
- package/dist/src/databases/transformers/data-transformers.d.ts +2 -0
- package/dist/src/databases/transformers/data-transformers.d.ts.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/singletons/env.d.ts +19 -0
- package/dist/src/singletons/env.d.ts.map +1 -1
- package/dist/src/singletons/queryTimeout.d.ts +3 -0
- package/dist/src/singletons/queryTimeout.d.ts.map +1 -0
- package/dist/src/subscriptions/strategies/database.d.ts.map +1 -1
- package/dist/src/subscriptions/strategies/database.test.d.ts +2 -0
- package/dist/src/subscriptions/strategies/database.test.d.ts.map +1 -0
- package/dist/src/subscriptions/types.d.ts +4 -1
- package/dist/src/subscriptions/types.d.ts.map +1 -1
- package/dist/src/subscriptions/utils/polling.d.ts.map +1 -1
- package/dist/src/types/env.d.ts +73 -0
- package/dist/src/types/env.d.ts.map +1 -1
- package/dist/src/types/zod/auth.d.ts +12 -0
- package/dist/src/types/zod/auth.d.ts.map +1 -1
- package/dist/src/types/zod/configuration.d.ts +28 -0
- package/dist/src/types/zod/configuration.d.ts.map +1 -1
- package/dist/src/utils/rateLimit.d.ts +65 -0
- package/dist/src/utils/rateLimit.d.ts.map +1 -0
- package/dist/src/utils/rateLimit.test.d.ts +2 -0
- package/dist/src/utils/rateLimit.test.d.ts.map +1 -0
- package/dist/src/utils/responses.d.ts +3 -0
- package/dist/src/utils/responses.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/playgrounds/console/index.html +7 -7
- package/playgrounds/graphiql/index.html +535 -536
- package/playgrounds/scalar/index.html +1 -1
- package/src/ai/tools/core.ts +30 -6
- package/src/analyzeQuery/costLimit.ts +236 -0
- package/src/analyzeQuery/depthLimit.ts +4 -23
- package/src/analyzeQuery/fragments.ts +18 -0
- package/src/config/types/auth.ts +7 -0
- package/src/config/types/db.ts +7 -0
- package/src/config/types/operation.ts +4 -0
- package/src/configuration/crossReferences.ts +340 -0
- package/src/configuration/getSchemas/type-definition-generator/index.ts +1 -1
- package/src/configuration/gql/buildExecute.ts +1 -1
- package/src/configuration/gql/handleGraphQLRequestFactory.ts +80 -10
- package/src/configuration/gql/handleGraphQLSubscriptionFactory.ts +22 -2
- package/src/configuration/index.ts +24 -6
- package/src/configuration/rest/handleRESTRequestFactory.ts +6 -4
- package/src/configuration/rest/index.ts +11 -2
- package/src/console/api.ts +51 -10
- package/src/console/session.ts +125 -0
- package/src/cron/index.ts +6 -2
- package/src/databases/common.ts +55 -10
- package/src/databases/core/executor.ts +12 -2
- package/src/databases/core/function-mapping.ts +5 -0
- package/src/databases/core/query-builder.ts +7 -0
- package/src/databases/engines/mssql/connection.ts +66 -14
- package/src/databases/engines/mssql/format.ts +3 -1
- package/src/databases/engines/mssql/query/index.ts +12 -2
- package/src/databases/engines/mysql/connection.ts +30 -13
- package/src/databases/engines/mysql/format.ts +3 -1
- package/src/databases/engines/mysql/query/index.ts +25 -4
- package/src/databases/engines/postgresql/connection.ts +76 -15
- package/src/databases/engines/postgresql/format.ts +3 -1
- package/src/databases/engines/postgresql/query/index.ts +12 -3
- package/src/databases/high-level-operations.ts +13 -2
- package/src/index.ts +82 -13
- package/src/singletons/queryTimeout.ts +20 -0
- package/src/subscriptions/strategies/database.ts +19 -3
- package/src/subscriptions/types.ts +4 -1
- package/src/subscriptions/utils/polling.ts +6 -3
- package/src/types/env.ts +21 -1
- package/src/utils/rateLimit.ts +209 -0
- package/src/utils/responses.ts +10 -0
- package/src/ai/README.md +0 -257
|
@@ -11,11 +11,8 @@ export declare const RELATIONSHIP_CONDITION_OPERATORS: readonly ["eq", "neq", "g
|
|
|
11
11
|
* A `value` is required for every operator except `is_null` / `is_not_null`.
|
|
12
12
|
*/
|
|
13
13
|
export declare const RelationshipConditionZod: z.ZodObject<{
|
|
14
|
-
/** Column on the declaring (source) table */
|
|
15
14
|
source: z.ZodOptional<z.ZodString>;
|
|
16
|
-
/** Column on the referenced (target) table */
|
|
17
15
|
target: z.ZodOptional<z.ZodString>;
|
|
18
|
-
/** Comparison operator (default `eq`) */
|
|
19
16
|
operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
20
17
|
eq: "eq";
|
|
21
18
|
gt: "gt";
|
|
@@ -27,7 +24,6 @@ export declare const RelationshipConditionZod: z.ZodObject<{
|
|
|
27
24
|
lte: "lte";
|
|
28
25
|
neq: "neq";
|
|
29
26
|
}>>>;
|
|
30
|
-
/** Literal compared against the column (omit for `is_null` / `is_not_null`) */
|
|
31
27
|
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
32
28
|
}, z.core.$strict>;
|
|
33
29
|
export type RelationshipCondition = z.input<typeof RelationshipConditionZod>;
|
|
@@ -38,13 +34,9 @@ export declare const TableRelationshipZod: z.ZodObject<{
|
|
|
38
34
|
source: z.ZodString;
|
|
39
35
|
target: z.ZodString;
|
|
40
36
|
}, z.core.$strict>>;
|
|
41
|
-
/** Static-value predicates ANDed into the JOIN condition */
|
|
42
37
|
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
-
/** Column on the declaring (source) table */
|
|
44
38
|
source: z.ZodOptional<z.ZodString>;
|
|
45
|
-
/** Column on the referenced (target) table */
|
|
46
39
|
target: z.ZodOptional<z.ZodString>;
|
|
47
|
-
/** Comparison operator (default `eq`) */
|
|
48
40
|
operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
49
41
|
eq: "eq";
|
|
50
42
|
gt: "gt";
|
|
@@ -56,7 +48,6 @@ export declare const TableRelationshipZod: z.ZodObject<{
|
|
|
56
48
|
lte: "lte";
|
|
57
49
|
neq: "neq";
|
|
58
50
|
}>>>;
|
|
59
|
-
/** Literal compared against the column (omit for `is_null` / `is_not_null`) */
|
|
60
51
|
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
61
52
|
}, z.core.$strict>>>;
|
|
62
53
|
}, z.core.$strict>;
|
|
@@ -79,13 +70,9 @@ export declare const TableSchemaConfigZod: z.ZodObject<{
|
|
|
79
70
|
source: z.ZodString;
|
|
80
71
|
target: z.ZodString;
|
|
81
72
|
}, z.core.$strict>>;
|
|
82
|
-
/** Static-value predicates ANDed into the JOIN condition */
|
|
83
73
|
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
-
/** Column on the declaring (source) table */
|
|
85
74
|
source: z.ZodOptional<z.ZodString>;
|
|
86
|
-
/** Column on the referenced (target) table */
|
|
87
75
|
target: z.ZodOptional<z.ZodString>;
|
|
88
|
-
/** Comparison operator (default `eq`) */
|
|
89
76
|
operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
90
77
|
eq: "eq";
|
|
91
78
|
gt: "gt";
|
|
@@ -97,13 +84,10 @@ export declare const TableSchemaConfigZod: z.ZodObject<{
|
|
|
97
84
|
lte: "lte";
|
|
98
85
|
neq: "neq";
|
|
99
86
|
}>>>;
|
|
100
|
-
/** Literal compared against the column (omit for `is_null` / `is_not_null`) */
|
|
101
87
|
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
102
88
|
}, z.core.$strict>>>;
|
|
103
89
|
}, z.core.$strict>>>>;
|
|
104
|
-
/** Overrides the table description from the database */
|
|
105
90
|
description: z.ZodOptional<z.ZodString>;
|
|
106
|
-
/** Overrides column descriptions from the database, keyed by column name */
|
|
107
91
|
columnDescriptions: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
108
92
|
}, z.core.$strict>;
|
|
109
93
|
export type TableSchemaConfig = z.input<typeof TableSchemaConfigZod>;
|
|
@@ -126,13 +110,9 @@ export declare const DatabaseSchemaConfigZod: z.ZodObject<{
|
|
|
126
110
|
source: z.ZodString;
|
|
127
111
|
target: z.ZodString;
|
|
128
112
|
}, z.core.$strict>>;
|
|
129
|
-
/** Static-value predicates ANDed into the JOIN condition */
|
|
130
113
|
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
131
|
-
/** Column on the declaring (source) table */
|
|
132
114
|
source: z.ZodOptional<z.ZodString>;
|
|
133
|
-
/** Column on the referenced (target) table */
|
|
134
115
|
target: z.ZodOptional<z.ZodString>;
|
|
135
|
-
/** Comparison operator (default `eq`) */
|
|
136
116
|
operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
137
117
|
eq: "eq";
|
|
138
118
|
gt: "gt";
|
|
@@ -144,13 +124,10 @@ export declare const DatabaseSchemaConfigZod: z.ZodObject<{
|
|
|
144
124
|
lte: "lte";
|
|
145
125
|
neq: "neq";
|
|
146
126
|
}>>>;
|
|
147
|
-
/** Literal compared against the column (omit for `is_null` / `is_not_null`) */
|
|
148
127
|
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
149
128
|
}, z.core.$strict>>>;
|
|
150
129
|
}, z.core.$strict>>>>;
|
|
151
|
-
/** Overrides the table description from the database */
|
|
152
130
|
description: z.ZodOptional<z.ZodString>;
|
|
153
|
-
/** Overrides column descriptions from the database, keyed by column name */
|
|
154
131
|
columnDescriptions: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
155
132
|
}, z.core.$strict>>>>>>>;
|
|
156
133
|
excludedTables: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
@@ -161,27 +138,13 @@ export type DatabaseSchemaConfig = z.input<typeof DatabaseSchemaConfigZod>;
|
|
|
161
138
|
* All timeout values are in seconds.
|
|
162
139
|
*/
|
|
163
140
|
export declare const BunSQLConnectionOptionsZod: z.ZodObject<{
|
|
164
|
-
/** Maximum number of connections in the pool */
|
|
165
141
|
max: z.ZodDefault<z.ZodNumber>;
|
|
166
|
-
/** Maximum time in seconds a connection can be idle before being closed */
|
|
167
142
|
idleTimeout: z.ZodDefault<z.ZodNumber>;
|
|
168
|
-
/** Maximum time in seconds to wait when establishing a connection */
|
|
169
143
|
connectionTimeout: z.ZodDefault<z.ZodNumber>;
|
|
170
|
-
/** Maximum lifetime in seconds of a connection */
|
|
171
144
|
maxLifetime: z.ZodDefault<z.ZodNumber>;
|
|
172
|
-
/** Whether to use TLS/SSL for the connection */
|
|
173
145
|
tls: z.ZodDefault<z.ZodBoolean>;
|
|
174
|
-
/**
|
|
175
|
-
* MySQL only: allow the client to fetch the server's RSA public key over a
|
|
176
|
-
* plain connection when caching_sha2_password asks for full authentication.
|
|
177
|
-
* Off by default, as it is in Bun: without TLS a man-in-the-middle can answer
|
|
178
|
-
* with its own key and read the password. Needed for MySQL 8 servers that are
|
|
179
|
-
* reachable only over plain TCP.
|
|
180
|
-
*/
|
|
181
146
|
allowPublicKeyRetrieval: z.ZodDefault<z.ZodBoolean>;
|
|
182
|
-
/** Automatic creation of prepared statements (default: true) */
|
|
183
147
|
prepare: z.ZodDefault<z.ZodBoolean>;
|
|
184
|
-
/** Return values outside i32 range as BigInts instead of strings (default: false) */
|
|
185
148
|
bigint: z.ZodDefault<z.ZodBoolean>;
|
|
186
149
|
}, z.core.$strict>;
|
|
187
150
|
export type BunSQLConnectionOptions = z.input<typeof BunSQLConnectionOptionsZod>;
|
|
@@ -190,26 +153,17 @@ export type BunSQLConnectionOptions = z.input<typeof BunSQLConnectionOptionsZod>
|
|
|
190
153
|
* All timeout values are in seconds (converted to milliseconds internally).
|
|
191
154
|
*/
|
|
192
155
|
export declare const MSSQLConnectionOptionsZod: z.ZodObject<{
|
|
193
|
-
/** Connection pool options */
|
|
194
156
|
pool: z.ZodDefault<z.ZodObject<{
|
|
195
|
-
/** Maximum number of connections in the pool */
|
|
196
157
|
max: z.ZodDefault<z.ZodNumber>;
|
|
197
|
-
/** Minimum number of connections in the pool */
|
|
198
158
|
min: z.ZodDefault<z.ZodNumber>;
|
|
199
|
-
/** Maximum time in seconds a connection can be idle before being closed */
|
|
200
159
|
idleTimeout: z.ZodDefault<z.ZodNumber>;
|
|
160
|
+
acquireTimeout: z.ZodDefault<z.ZodNumber>;
|
|
201
161
|
}, z.core.$strict>>;
|
|
202
|
-
/** Maximum time in seconds to wait when establishing a connection */
|
|
203
162
|
connectionTimeout: z.ZodDefault<z.ZodNumber>;
|
|
204
|
-
/** Maximum time in seconds to wait for a request to complete */
|
|
205
163
|
requestTimeout: z.ZodDefault<z.ZodNumber>;
|
|
206
|
-
/** Whether to encrypt the connection */
|
|
207
164
|
encrypt: z.ZodDefault<z.ZodBoolean>;
|
|
208
|
-
/** Whether to trust the server certificate without validation */
|
|
209
165
|
trustServerCertificate: z.ZodDefault<z.ZodBoolean>;
|
|
210
|
-
/** Whether to use Windows Authentication (trusted connection) */
|
|
211
166
|
trustedConnection: z.ZodDefault<z.ZodBoolean>;
|
|
212
|
-
/** Whether to automatically parse JSON responses */
|
|
213
167
|
parseJSON: z.ZodDefault<z.ZodBoolean>;
|
|
214
168
|
}, z.core.$strict>;
|
|
215
169
|
export type MSSQLConnectionOptions = z.input<typeof MSSQLConnectionOptionsZod>;
|
|
@@ -234,13 +188,9 @@ export type OnConnectHandler<T extends DatabaseType = DatabaseType> = (connectio
|
|
|
234
188
|
*/
|
|
235
189
|
export type ConnectionOptionsForType<T extends DatabaseType> = T extends "pg" | "mysql" ? BunSQLConnectionOptions : T extends "mssql" ? MSSQLConnectionOptions : never;
|
|
236
190
|
export declare const DatabaseConnectionZod: z.ZodObject<{
|
|
237
|
-
/** Unique name for the database connection */
|
|
238
191
|
name: z.ZodString;
|
|
239
|
-
/** Whether the database is enabled */
|
|
240
192
|
enabled: z.ZodBoolean;
|
|
241
|
-
/** Database type */
|
|
242
193
|
type: z.ZodUnion<readonly [z.ZodLiteral<"mssql">, z.ZodLiteral<"pg">, z.ZodLiteral<"mysql">]>;
|
|
243
|
-
/** Connection configuration */
|
|
244
194
|
connection: z.ZodObject<{
|
|
245
195
|
host: z.ZodString;
|
|
246
196
|
port: z.ZodNumber;
|
|
@@ -248,13 +198,9 @@ export declare const DatabaseConnectionZod: z.ZodObject<{
|
|
|
248
198
|
password: z.ZodString;
|
|
249
199
|
database: z.ZodString;
|
|
250
200
|
}, z.core.$strict>;
|
|
251
|
-
/** Field naming pattern (default: "{schema}_{name}") */
|
|
252
201
|
fieldNaming: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
253
|
-
/** Factory function to create custom database repository */
|
|
254
202
|
repository: z.ZodOptional<z.ZodCustom<CustomRepositoryFactory<DatabaseType>, CustomRepositoryFactory<DatabaseType>>>;
|
|
255
|
-
/** Handler run once at startup against the connected database */
|
|
256
203
|
onConnect: z.ZodOptional<z.ZodCustom<OnConnectHandler<DatabaseType>, OnConnectHandler<DatabaseType>>>;
|
|
257
|
-
/** Schema configuration (virtual columns, relationships, excluded tables) */
|
|
258
204
|
schema: z.ZodOptional<z.ZodObject<{
|
|
259
205
|
database: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
260
206
|
columns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -274,13 +220,9 @@ export declare const DatabaseConnectionZod: z.ZodObject<{
|
|
|
274
220
|
source: z.ZodString;
|
|
275
221
|
target: z.ZodString;
|
|
276
222
|
}, z.core.$strict>>;
|
|
277
|
-
/** Static-value predicates ANDed into the JOIN condition */
|
|
278
223
|
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
279
|
-
/** Column on the declaring (source) table */
|
|
280
224
|
source: z.ZodOptional<z.ZodString>;
|
|
281
|
-
/** Column on the referenced (target) table */
|
|
282
225
|
target: z.ZodOptional<z.ZodString>;
|
|
283
|
-
/** Comparison operator (default `eq`) */
|
|
284
226
|
operator: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
285
227
|
eq: "eq";
|
|
286
228
|
gt: "gt";
|
|
@@ -292,62 +234,35 @@ export declare const DatabaseConnectionZod: z.ZodObject<{
|
|
|
292
234
|
lte: "lte";
|
|
293
235
|
neq: "neq";
|
|
294
236
|
}>>>;
|
|
295
|
-
/** Literal compared against the column (omit for `is_null` / `is_not_null`) */
|
|
296
237
|
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
297
238
|
}, z.core.$strict>>>;
|
|
298
239
|
}, z.core.$strict>>>>;
|
|
299
|
-
/** Overrides the table description from the database */
|
|
300
240
|
description: z.ZodOptional<z.ZodString>;
|
|
301
|
-
/** Overrides column descriptions from the database, keyed by column name */
|
|
302
241
|
columnDescriptions: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
303
242
|
}, z.core.$strict>>>>>>>;
|
|
304
243
|
excludedTables: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
305
244
|
}, z.core.$strict>>;
|
|
306
|
-
/** Optional connection pool and transport options */
|
|
307
245
|
connectionOptions: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
308
|
-
/** Maximum number of connections in the pool */
|
|
309
246
|
max: z.ZodDefault<z.ZodNumber>;
|
|
310
|
-
/** Maximum time in seconds a connection can be idle before being closed */
|
|
311
247
|
idleTimeout: z.ZodDefault<z.ZodNumber>;
|
|
312
|
-
/** Maximum time in seconds to wait when establishing a connection */
|
|
313
248
|
connectionTimeout: z.ZodDefault<z.ZodNumber>;
|
|
314
|
-
/** Maximum lifetime in seconds of a connection */
|
|
315
249
|
maxLifetime: z.ZodDefault<z.ZodNumber>;
|
|
316
|
-
/** Whether to use TLS/SSL for the connection */
|
|
317
250
|
tls: z.ZodDefault<z.ZodBoolean>;
|
|
318
|
-
/**
|
|
319
|
-
* MySQL only: allow the client to fetch the server's RSA public key over a
|
|
320
|
-
* plain connection when caching_sha2_password asks for full authentication.
|
|
321
|
-
* Off by default, as it is in Bun: without TLS a man-in-the-middle can answer
|
|
322
|
-
* with its own key and read the password. Needed for MySQL 8 servers that are
|
|
323
|
-
* reachable only over plain TCP.
|
|
324
|
-
*/
|
|
325
251
|
allowPublicKeyRetrieval: z.ZodDefault<z.ZodBoolean>;
|
|
326
|
-
/** Automatic creation of prepared statements (default: true) */
|
|
327
252
|
prepare: z.ZodDefault<z.ZodBoolean>;
|
|
328
|
-
/** Return values outside i32 range as BigInts instead of strings (default: false) */
|
|
329
253
|
bigint: z.ZodDefault<z.ZodBoolean>;
|
|
330
254
|
}, z.core.$strict>, z.ZodObject<{
|
|
331
|
-
/** Connection pool options */
|
|
332
255
|
pool: z.ZodDefault<z.ZodObject<{
|
|
333
|
-
/** Maximum number of connections in the pool */
|
|
334
256
|
max: z.ZodDefault<z.ZodNumber>;
|
|
335
|
-
/** Minimum number of connections in the pool */
|
|
336
257
|
min: z.ZodDefault<z.ZodNumber>;
|
|
337
|
-
/** Maximum time in seconds a connection can be idle before being closed */
|
|
338
258
|
idleTimeout: z.ZodDefault<z.ZodNumber>;
|
|
259
|
+
acquireTimeout: z.ZodDefault<z.ZodNumber>;
|
|
339
260
|
}, z.core.$strict>>;
|
|
340
|
-
/** Maximum time in seconds to wait when establishing a connection */
|
|
341
261
|
connectionTimeout: z.ZodDefault<z.ZodNumber>;
|
|
342
|
-
/** Maximum time in seconds to wait for a request to complete */
|
|
343
262
|
requestTimeout: z.ZodDefault<z.ZodNumber>;
|
|
344
|
-
/** Whether to encrypt the connection */
|
|
345
263
|
encrypt: z.ZodDefault<z.ZodBoolean>;
|
|
346
|
-
/** Whether to trust the server certificate without validation */
|
|
347
264
|
trustServerCertificate: z.ZodDefault<z.ZodBoolean>;
|
|
348
|
-
/** Whether to use Windows Authentication (trusted connection) */
|
|
349
265
|
trustedConnection: z.ZodDefault<z.ZodBoolean>;
|
|
350
|
-
/** Whether to automatically parse JSON responses */
|
|
351
266
|
parseJSON: z.ZodDefault<z.ZodBoolean>;
|
|
352
267
|
}, z.core.$strict>]>>;
|
|
353
268
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../../src/config/types/db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAe5C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC;AAMpD,4EAA4E;AAC5E,eAAO,MAAM,gCAAgC,YAC3C,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,SAAS,EACT,aAAa,CACL,CAAC;AAEX;;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G,YAAY,IAAI;IAClE,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB;IACpB,IAAI,EAAE,CAAC,CAAC;IACR,+BAA+B;IAC/B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACxC,iEAAiE;IACjE,SAAS,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAChC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;CACjD,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;KAC7B,CAAC,IAAI,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC;CACvC,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -103,6 +103,7 @@ export declare const OperationZod: z.ZodObject<{
|
|
|
103
103
|
updateAgeOnHas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
104
104
|
ttlAutopurge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
105
105
|
}, z.core.$strict>>;
|
|
106
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
106
107
|
}, z.core.$strict>;
|
|
107
108
|
export type Operation = z.input<typeof OperationZod>;
|
|
108
109
|
export declare const OperationsZod: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -142,6 +143,7 @@ export declare const OperationsZod: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
142
143
|
updateAgeOnHas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
143
144
|
ttlAutopurge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
144
145
|
}, z.core.$strict>>;
|
|
146
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
145
147
|
}, z.core.$strict>>;
|
|
146
148
|
export type Operations = z.input<typeof OperationsZod>;
|
|
147
149
|
/**
|
|
@@ -232,6 +234,8 @@ export type BaseOperation<TInput, TOutput, TInitData> = {
|
|
|
232
234
|
graphql?: OperationGraphQLConfig;
|
|
233
235
|
/** Cache configuration */
|
|
234
236
|
cache?: OperationCacheConfig;
|
|
237
|
+
/** Statement timeout in milliseconds. Overrides `QUERY_TIMEOUT_MS` for this operation. */
|
|
238
|
+
timeout?: number;
|
|
235
239
|
};
|
|
236
240
|
/**
|
|
237
241
|
* Query-based operation - executes a GraphQL query
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/config/types/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI,MAAM,SAAS,MAAM,GACrD,OAAO,GAEP,MAAM,SAAS;IAAE,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,KAAK,MAAM,OAAO,CAAA;CAAE,GAC9D,OAAO,GACP,OAAO,CAAC;AAMd;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;kBAMjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;kBAGpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;kBAQlC,CAAC;AAMH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,C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,CAAC,GAC1C,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation.test.d.ts","sourceRoot":"","sources":["../../../../src/config/types/operation.test.ts"],"names":[],"mappings":""}
|
|
@@ -3,13 +3,9 @@ import { z } from "zod";
|
|
|
3
3
|
* Reconnection configuration
|
|
4
4
|
*/
|
|
5
5
|
export declare const ReconnectConfigZod: z.ZodObject<{
|
|
6
|
-
/** Initial delay before first reconnect attempt (ms) */
|
|
7
6
|
initialDelay: z.ZodDefault<z.ZodNumber>;
|
|
8
|
-
/** Maximum delay between reconnect attempts (ms) */
|
|
9
7
|
maxDelay: z.ZodDefault<z.ZodNumber>;
|
|
10
|
-
/** Multiplier for exponential backoff */
|
|
11
8
|
multiplier: z.ZodDefault<z.ZodNumber>;
|
|
12
|
-
/** Maximum number of reconnect attempts (0 = infinite) */
|
|
13
9
|
maxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
14
10
|
}, z.core.$strict>;
|
|
15
11
|
export type ReconnectConfig = z.input<typeof ReconnectConfigZod>;
|
|
@@ -17,13 +13,9 @@ export type ReconnectConfig = z.input<typeof ReconnectConfigZod>;
|
|
|
17
13
|
* Publisher configuration — defines how to send messages
|
|
18
14
|
*/
|
|
19
15
|
export declare const PublisherConfigZod: z.ZodObject<{
|
|
20
|
-
/** Topic/Exchange name to publish to */
|
|
21
16
|
topic: z.ZodString;
|
|
22
|
-
/** Routing key (RabbitMQ) or message key (Kafka) */
|
|
23
17
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
24
|
-
/** Whether messages should survive broker restart (RabbitMQ only) */
|
|
25
18
|
persistent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
26
|
-
/** Custom headers (Kafka only) */
|
|
27
19
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
28
20
|
}, z.core.$strict>;
|
|
29
21
|
export type PublisherConfig = z.input<typeof PublisherConfigZod>;
|
|
@@ -44,19 +36,12 @@ export type SubscriberHandler = (message: unknown, context: {
|
|
|
44
36
|
* Subscriber configuration — defines how to receive messages
|
|
45
37
|
*/
|
|
46
38
|
export declare const SubscriberConfigZod: z.ZodObject<{
|
|
47
|
-
/** Topic/Exchange name to subscribe to */
|
|
48
39
|
topic: z.ZodString;
|
|
49
|
-
/** Pattern for filtering messages (routing key pattern for RabbitMQ) */
|
|
50
40
|
pattern: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
51
|
-
/** Explicit queue name (RabbitMQ) — auto-generated if not provided */
|
|
52
41
|
queue: z.ZodOptional<z.ZodString>;
|
|
53
|
-
/** Consumer group ID (Kafka) — auto-generated if not provided */
|
|
54
42
|
group: z.ZodOptional<z.ZodString>;
|
|
55
|
-
/** Whether queue should survive broker restart (RabbitMQ only) */
|
|
56
43
|
durable: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
-
/** Whether queue should auto-delete when no consumers (RabbitMQ only) */
|
|
58
44
|
autoDelete: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
-
/** Handler function to process received messages */
|
|
60
45
|
handler: z.ZodOptional<z.ZodCustom<SubscriberHandler, SubscriberHandler>>;
|
|
61
46
|
}, z.core.$strict>;
|
|
62
47
|
export type SubscriberConfig = z.input<typeof SubscriberConfigZod>;
|
|
@@ -64,16 +49,13 @@ export type SubscriberConfig = z.input<typeof SubscriberConfigZod>;
|
|
|
64
49
|
* Topic/Exchange configuration — for auto-setup
|
|
65
50
|
*/
|
|
66
51
|
export declare const TopicConfigZod: z.ZodObject<{
|
|
67
|
-
/** Exchange type (RabbitMQ only) */
|
|
68
52
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
69
53
|
direct: "direct";
|
|
70
54
|
fanout: "fanout";
|
|
71
55
|
headers: "headers";
|
|
72
56
|
topic: "topic";
|
|
73
57
|
}>>>;
|
|
74
|
-
/** Whether exchange should survive broker restart */
|
|
75
58
|
durable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
76
|
-
/** Whether exchange should auto-delete when no bindings */
|
|
77
59
|
autoDelete: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
78
60
|
}, z.core.$strict>;
|
|
79
61
|
export type TopicConfig = z.input<typeof TopicConfigZod>;
|
|
@@ -81,63 +63,38 @@ export type TopicConfig = z.input<typeof TopicConfigZod>;
|
|
|
81
63
|
* Base queue configuration shared by all providers
|
|
82
64
|
*/
|
|
83
65
|
export declare const BaseQueueConfigZod: z.ZodObject<{
|
|
84
|
-
/** Unique name for this queue connection */
|
|
85
66
|
name: z.ZodString;
|
|
86
|
-
/** Whether to auto-create topics/exchanges/queues */
|
|
87
67
|
autoSetup: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
88
|
-
/** Whether this queue is enabled */
|
|
89
68
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
90
|
-
/** Reconnection configuration */
|
|
91
69
|
reconnect: z.ZodOptional<z.ZodObject<{
|
|
92
|
-
/** Initial delay before first reconnect attempt (ms) */
|
|
93
70
|
initialDelay: z.ZodDefault<z.ZodNumber>;
|
|
94
|
-
/** Maximum delay between reconnect attempts (ms) */
|
|
95
71
|
maxDelay: z.ZodDefault<z.ZodNumber>;
|
|
96
|
-
/** Multiplier for exponential backoff */
|
|
97
72
|
multiplier: z.ZodDefault<z.ZodNumber>;
|
|
98
|
-
/** Maximum number of reconnect attempts (0 = infinite) */
|
|
99
73
|
maxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
100
74
|
}, z.core.$strict>>;
|
|
101
|
-
/** Publishers keyed by resolver name — become GraphQL mutations */
|
|
102
75
|
publishers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
103
|
-
/** Topic/Exchange name to publish to */
|
|
104
76
|
topic: z.ZodString;
|
|
105
|
-
/** Routing key (RabbitMQ) or message key (Kafka) */
|
|
106
77
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
107
|
-
/** Whether messages should survive broker restart (RabbitMQ only) */
|
|
108
78
|
persistent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
109
|
-
/** Custom headers (Kafka only) */
|
|
110
79
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
111
80
|
}, z.core.$strict>>>>;
|
|
112
|
-
/** Subscribers keyed by subscription name — become GraphQL subscriptions */
|
|
113
81
|
subscribers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
114
|
-
/** Topic/Exchange name to subscribe to */
|
|
115
82
|
topic: z.ZodString;
|
|
116
|
-
/** Pattern for filtering messages (routing key pattern for RabbitMQ) */
|
|
117
83
|
pattern: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
118
|
-
/** Explicit queue name (RabbitMQ) — auto-generated if not provided */
|
|
119
84
|
queue: z.ZodOptional<z.ZodString>;
|
|
120
|
-
/** Consumer group ID (Kafka) — auto-generated if not provided */
|
|
121
85
|
group: z.ZodOptional<z.ZodString>;
|
|
122
|
-
/** Whether queue should survive broker restart (RabbitMQ only) */
|
|
123
86
|
durable: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
-
/** Whether queue should auto-delete when no consumers (RabbitMQ only) */
|
|
125
87
|
autoDelete: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
-
/** Handler function to process received messages */
|
|
127
88
|
handler: z.ZodOptional<z.ZodCustom<SubscriberHandler, SubscriberHandler>>;
|
|
128
89
|
}, z.core.$strict>>>>;
|
|
129
|
-
/** Topic configurations for customizing auto-setup behavior */
|
|
130
90
|
topics: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
131
|
-
/** Exchange type (RabbitMQ only) */
|
|
132
91
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
133
92
|
direct: "direct";
|
|
134
93
|
fanout: "fanout";
|
|
135
94
|
headers: "headers";
|
|
136
95
|
topic: "topic";
|
|
137
96
|
}>>>;
|
|
138
|
-
/** Whether exchange should survive broker restart */
|
|
139
97
|
durable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
140
|
-
/** Whether exchange should auto-delete when no bindings */
|
|
141
98
|
autoDelete: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
142
99
|
}, z.core.$strict>>>>;
|
|
143
100
|
}, z.core.$strict>;
|
|
@@ -156,13 +113,9 @@ export type RabbitMQConnection = z.input<typeof RabbitMQConnectionZod>;
|
|
|
156
113
|
* Kafka connection configuration
|
|
157
114
|
*/
|
|
158
115
|
export declare const KafkaConnectionZod: z.ZodObject<{
|
|
159
|
-
/** Broker addresses — "host:port" or ["host1:port1", "host2:port2"] */
|
|
160
116
|
brokers: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
161
|
-
/** Client identifier sent to the broker (default: "datagraph-<queue name>") */
|
|
162
117
|
clientId: z.ZodOptional<z.ZodString>;
|
|
163
|
-
/** Enable SSL/TLS */
|
|
164
118
|
ssl: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
165
|
-
/** SASL authentication (optional) */
|
|
166
119
|
sasl: z.ZodOptional<z.ZodObject<{
|
|
167
120
|
mechanism: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
168
121
|
plain: "plain";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../../src/config/types/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../../src/config/types/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AACH,eAAO,MAAM,k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AAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAQjE,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACrE,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACzC,CAAC;AAEF,iEAAiE;AACjE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAClE,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,eAAe,CAAC;CACtC,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,gBAAgB,CAAC"}
|
|
@@ -3,23 +3,14 @@ import { z } from "zod";
|
|
|
3
3
|
* Remote REST API configuration (OpenAPI-based)
|
|
4
4
|
*/
|
|
5
5
|
export declare const RemoteRESTConfigZod: z.ZodObject<{
|
|
6
|
-
/** Unique identifier for this remote REST API */
|
|
7
6
|
name: z.ZodString;
|
|
8
|
-
/** Base URL of the remote API for proxying requests */
|
|
9
7
|
url: z.ZodOptional<z.ZodURL>;
|
|
10
|
-
/** URL to fetch the OpenAPI spec from */
|
|
11
8
|
specUrl: z.ZodOptional<z.ZodURL>;
|
|
12
|
-
/** Local file path to the OpenAPI spec (JSON or YAML) */
|
|
13
9
|
specPath: z.ZodOptional<z.ZodString>;
|
|
14
|
-
/** Whether the remote REST API is enabled (default: true) */
|
|
15
10
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
16
|
-
/** Subpath prefix under /rest (default: name) */
|
|
17
11
|
prefix: z.ZodOptional<z.ZodString>;
|
|
18
|
-
/** Static headers to send with every proxied request */
|
|
19
12
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
-
/** Client headers to forward to the remote endpoint */
|
|
21
13
|
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
-
/** Request timeout in milliseconds (default: 10000) */
|
|
23
14
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
24
15
|
}, z.core.$strict>;
|
|
25
16
|
/** Authoring type for remote REST API config */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-rest.d.ts","sourceRoot":"","sources":["../../../../src/config/types/remote-rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"remote-rest.d.ts","sourceRoot":"","sources":["../../../../src/config/types/remote-rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;kBAmB9B,CAAC;AAEH,gDAAgD;AAChD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -3,7 +3,6 @@ import { z } from "zod";
|
|
|
3
3
|
* Remote GraphQL schema introspection configuration
|
|
4
4
|
*/
|
|
5
5
|
export declare const RemoteSchemaIntrospectionConfigZod: z.ZodOptional<z.ZodObject<{
|
|
6
|
-
/** Re-introspect interval in ms (0 = only at startup, default: 0) */
|
|
7
6
|
interval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8
7
|
}, z.core.$strict>>;
|
|
9
8
|
/** Authoring type for remote schema introspection config */
|
|
@@ -12,23 +11,14 @@ export type RemoteSchemaIntrospectionConfig = z.input<typeof RemoteSchemaIntrosp
|
|
|
12
11
|
* Remote GraphQL schema configuration
|
|
13
12
|
*/
|
|
14
13
|
export declare const RemoteSchemaConfigZod: z.ZodObject<{
|
|
15
|
-
/** Unique identifier for this remote schema */
|
|
16
14
|
name: z.ZodString;
|
|
17
|
-
/** Remote GraphQL endpoint URL */
|
|
18
15
|
url: z.ZodURL;
|
|
19
|
-
/** Whether the remote schema is enabled (default: true) */
|
|
20
16
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
21
|
-
/** Type/field prefix (default: name + "_") */
|
|
22
17
|
prefix: z.ZodOptional<z.ZodString>;
|
|
23
|
-
/** Static headers to send with every request */
|
|
24
18
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
-
/** Client headers to forward to the remote endpoint */
|
|
26
19
|
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
-
/** Request timeout in milliseconds (default: 10000) */
|
|
28
20
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
29
|
-
/** Introspection configuration */
|
|
30
21
|
introspection: z.ZodOptional<z.ZodObject<{
|
|
31
|
-
/** Re-introspect interval in ms (0 = only at startup, default: 0) */
|
|
32
22
|
interval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
33
23
|
}, z.core.$strict>>;
|
|
34
24
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-schema.d.ts","sourceRoot":"","sources":["../../../../src/config/types/remote-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,kCAAkC
|
|
1
|
+
{"version":3,"file":"remote-schema.d.ts","sourceRoot":"","sources":["../../../../src/config/types/remote-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,kCAAkC;;mBAKlC,CAAC;AAEd,4DAA4D;AAC5D,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEjG;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;kBAiBhC,CAAC;AAEH,sDAAsD;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Configuration } from "../types/configuration";
|
|
2
|
+
import type { ProcedureResolver, TableResolver } from "../types/db";
|
|
3
|
+
/**
|
|
4
|
+
* Everything the configuration is allowed to point at that only exists once the
|
|
5
|
+
* databases have been introspected.
|
|
6
|
+
*/
|
|
7
|
+
export type KnownEntities = {
|
|
8
|
+
tables: TableResolver[];
|
|
9
|
+
storedProcedures: ProcedureResolver[];
|
|
10
|
+
/**
|
|
11
|
+
* Every table name a database reported, keyed by database name and recorded
|
|
12
|
+
* *before* exclusions are applied. `excludedTables` names are absent from
|
|
13
|
+
* `tables` by construction, so they cannot be resolved against it.
|
|
14
|
+
*/
|
|
15
|
+
tableNamesByDatabase: Record<string, string[]>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Every name a configuration points at that resolves to nothing, with the config
|
|
19
|
+
* path that carries it. Returns them all rather than throwing on the first, so a
|
|
20
|
+
* misconfigured deployment is fixed in one pass.
|
|
21
|
+
*
|
|
22
|
+
* A permission naming something that does not exist fails closed — the role
|
|
23
|
+
* simply loses the entity — which is why these never surfaced on their own: the
|
|
24
|
+
* rule the operator wrote silently does not apply.
|
|
25
|
+
*/
|
|
26
|
+
export declare const collectCrossReferenceErrors: (configuration: Configuration, known: KnownEntities) => string[];
|
|
27
|
+
//# sourceMappingURL=crossReferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crossReferences.d.ts","sourceRoot":"","sources":["../../../src/configuration/crossReferences.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAChD,CAAC;AA+GF;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,kBACvB,aAAa,SACrB,aAAa,KACnB,MAAM,EAmMR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crossReferences.test.d.ts","sourceRoot":"","sources":["../../../src/configuration/crossReferences.test.ts"],"names":[],"mappings":""}
|