@m1212e/rumble 0.5.5 → 0.6.2

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/index.d.cts CHANGED
@@ -1,14 +1,13 @@
1
- import * as drizzle_orm_mysql_core from 'drizzle-orm/mysql-core';
2
- import * as drizzle_orm_singlestore_core from 'drizzle-orm/singlestore-core';
3
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
4
- import * as _pothos_plugin_drizzle from '@pothos/plugin-drizzle';
5
- import { DrizzleClient } from '@pothos/plugin-drizzle';
2
+ import { PgEnum } from 'drizzle-orm/pg-core';
6
3
  import * as SchemaBuilder from '@pothos/core';
7
4
  import SchemaBuilder__default, { SchemaTypes, BasePlugin, PothosOutputFieldConfig } from '@pothos/core';
5
+ import * as _pothos_plugin_drizzle from '@pothos/plugin-drizzle';
6
+ import { DrizzleClient } from '@pothos/plugin-drizzle';
7
+ import { GraphQLFieldResolver, GraphQLError } from 'graphql';
8
8
  import * as graphql_yoga from 'graphql-yoga';
9
9
  import { createPubSub, YogaServerOptions } from 'graphql-yoga';
10
10
  import * as drizzle_orm from 'drizzle-orm';
11
- import { GraphQLFieldResolver, GraphQLError } from 'graphql';
12
11
 
13
12
  declare const pluginName = "ManualFiltersPlugin";
14
13
 
@@ -33,7 +32,7 @@ declare global {
33
32
  }
34
33
  }
35
34
 
36
- type QueryConditionObject = Partial<{
35
+ type QueryFilterObject = Partial<{
37
36
  where: any;
38
37
  columns: any;
39
38
  limit: any;
@@ -41,8 +40,8 @@ type QueryConditionObject = Partial<{
41
40
  type GenericDrizzleDbTypeConstraints = {
42
41
  query: {
43
42
  [key: string]: {
44
- findMany: (P: QueryConditionObject) => any;
45
- findFirst: (P: QueryConditionObject) => any;
43
+ findMany: (P: QueryFilterObject) => any;
44
+ findFirst: (P: QueryFilterObject) => any;
46
45
  };
47
46
  };
48
47
  } & DrizzleClient;
@@ -85,6 +84,11 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends GenericDriz
85
84
  defaultLimit?: number | undefined | null;
86
85
  };
87
86
 
87
+ type EnumTypes = PgEnum<any>;
88
+ type NonEnumFields<T> = {
89
+ [K in keyof T as T[K] extends EnumTypes ? never : K]: T[K];
90
+ };
91
+
88
92
  declare const rumble: <UserContext extends Record<string, any>, DB extends GenericDrizzleDbTypeConstraints, RequestEvent extends Record<string, any>, PothosConfig extends CustomRumblePothosConfig, Action extends string = "read" | "update" | "delete">(rumbleInput: RumbleInput<UserContext, DB, RequestEvent, Action, PothosConfig>) => {
89
93
  /**
90
94
  * The ability builder. Use it to declare whats allowed for each entity in your DB.
@@ -104,38 +108,33 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Gener
104
108
  */
105
109
  abilityBuilder: (keyof DB["query"] extends infer T extends keyof DB["query"] ? { [key in T]: {
106
110
  allow: (action: Action | Action[]) => {
107
- when: (condition: Parameters<DB["query"][keyof DB["query"]]["findMany"]>[0] | ((context: UserContext) => "allow" | Parameters<DB["query"][keyof DB["query"]]["findMany"]>[0] | undefined)) => void;
111
+ when: (queryFilter: Parameters<DB["query"][key]["findMany"]>[0] | ((context: UserContext) => "allow" | Parameters<DB["query"][key]["findMany"]>[0] | undefined)) => void;
108
112
  };
109
113
  filter: (action: Action | Action[]) => {
110
114
  by: (explicitFilter: Filter<UserContext, NonNullable<Awaited<ReturnType<DB["query"][key]["findFirst"]>>>>) => void;
111
115
  };
112
116
  }; } : never) & {
113
- registeredConditions: keyof DB["query"] extends infer T_1 extends keyof DB["query"] ? { [key_1 in T_1]: { [key_2 in Action]: "wildcard" | (Partial<{
114
- where: any;
115
- columns: any;
116
- limit: any;
117
- }> | ((context: UserContext) => "allow" | Partial<{
118
- where: any;
119
- columns: any;
120
- limit: any;
121
- }> | undefined))[]; }; } : never;
117
+ registeredQueryFilters: keyof DB["query"] extends infer T_1 extends keyof DB["query"] ? { [key_1 in T_1]: { [key_2 in Action]: any[] | "unspecified"; }; } : never;
122
118
  registeredFilters: keyof DB["query"] extends infer T_2 extends keyof DB["query"] ? { [key_3 in T_2]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never;
123
119
  buildWithUserContext: (userContext: UserContext) => keyof DB["query"] extends infer T_3 extends keyof DB["query"] ? { [key_5 in T_3]: {
124
- filter: (action: Action, options?: {
125
- inject?: Partial<{
126
- where: any;
127
- columns: any;
128
- limit: any;
129
- }> | undefined;
120
+ filter: <Injection extends Parameters<DB["query"][key_5]["findMany"]>[0]>(action: Action, options?: {
121
+ inject?: Injection | undefined;
130
122
  } | undefined) => {
131
- single: {
132
- where: drizzle_orm.SQL<unknown> | undefined;
133
- columns: Record<string, any> | undefined;
123
+ query: {
124
+ single: {
125
+ readonly where: any;
126
+ readonly columns: undefined;
127
+ };
128
+ many: {
129
+ readonly where: any;
130
+ readonly columns: undefined;
131
+ readonly limit: any;
132
+ };
134
133
  };
135
- many: {
136
- where: drizzle_orm.SQL<unknown> | undefined;
137
- columns: Record<string, any> | undefined;
138
- limit: number | undefined;
134
+ sql: {
135
+ readonly where: drizzle_orm.SQL<unknown> | undefined;
136
+ readonly columns: undefined;
137
+ readonly limit: any;
139
138
  };
140
139
  };
141
140
  explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_4 extends keyof DB["query"] ? { [key_3 in T_4]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
@@ -147,27 +146,30 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Gener
147
146
  schemaBuilder: PothosSchemaTypes.SchemaBuilder<PothosSchemaTypes.ExtendDefaultTypes<{
148
147
  Context: Awaited<UserContext & {
149
148
  abilities: keyof DB["query"] extends infer T_3 extends keyof DB["query"] ? { [key_5 in T_3]: {
150
- filter: (action: Action, options?: {
151
- inject?: Partial<{
152
- where: any;
153
- columns: any;
154
- limit: any;
155
- }> | undefined;
149
+ filter: <Injection extends Parameters<DB["query"][key_5]["findMany"]>[0]>(action: Action, options?: {
150
+ inject?: Injection | undefined;
156
151
  } | undefined) => {
157
- single: {
158
- where: drizzle_orm.SQL<unknown> | undefined;
159
- columns: Record<string, any> | undefined;
152
+ query: {
153
+ single: {
154
+ readonly where: any;
155
+ readonly columns: undefined;
156
+ };
157
+ many: {
158
+ readonly where: any;
159
+ readonly columns: undefined;
160
+ readonly limit: any;
161
+ };
160
162
  };
161
- many: {
162
- where: drizzle_orm.SQL<unknown> | undefined;
163
- columns: Record<string, any> | undefined;
164
- limit: number | undefined;
163
+ sql: {
164
+ readonly where: drizzle_orm.SQL<unknown> | undefined;
165
+ readonly columns: undefined;
166
+ readonly limit: any;
165
167
  };
166
168
  };
167
169
  explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_4 extends keyof DB["query"] ? { [key_3 in T_4]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
168
170
  }; } : never;
169
171
  }>;
170
- DrizzleSchema: DB["_"]["fullSchema"];
172
+ DrizzleRelations: DB["_"]["relations"];
171
173
  Scalars: {
172
174
  JSON: {
173
175
  Input: unknown;
@@ -200,35 +202,79 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Gener
200
202
  /**
201
203
  * A function for creating default objects for your schema
202
204
  */
203
- object: <ExplicitTableName extends keyof NonNullable<DB["_"]["schema"]>, RefName extends string, Extender extends ((t: any) => SchemaBuilder.FieldMap) | undefined>({ tableName, name, readAction, extend, }: {
204
- tableName: ExplicitTableName;
205
- name?: RefName | undefined;
205
+ object: <ExplicitTableName extends keyof NonEnumFields<NonNullable<DB["_"]["relations"]["schema"]>>, RefName extends string>({ table, refName, readAction, extend, }: {
206
+ table: ExplicitTableName;
207
+ refName?: RefName | undefined;
206
208
  readAction?: Action | undefined;
207
- extend?: Extender | undefined;
209
+ extend?: ((t: _pothos_plugin_drizzle.DrizzleObjectFieldBuilder<PothosSchemaTypes.ExtendDefaultTypes<{
210
+ Context: Awaited<UserContext & {
211
+ abilities: keyof DB["query"] extends infer T_4 extends keyof DB["query"] ? { [key_5 in T_4]: {
212
+ filter: <Injection extends Parameters<DB["query"][key_5]["findMany"]>[0]>(action: Action, options?: {
213
+ inject?: Injection | undefined;
214
+ } | undefined) => {
215
+ query: {
216
+ single: {
217
+ readonly where: any;
218
+ readonly columns: undefined;
219
+ };
220
+ many: {
221
+ readonly where: any;
222
+ readonly columns: undefined;
223
+ readonly limit: any;
224
+ };
225
+ };
226
+ sql: {
227
+ readonly where: drizzle_orm.SQL<unknown> | undefined;
228
+ readonly columns: undefined;
229
+ readonly limit: any;
230
+ };
231
+ };
232
+ explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_5 extends keyof DB["query"] ? { [key_3 in T_5]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
233
+ }; } : never;
234
+ }>;
235
+ DrizzleRelations: DB["_"]["relations"];
236
+ Scalars: {
237
+ JSON: {
238
+ Input: unknown;
239
+ Output: unknown;
240
+ };
241
+ Date: {
242
+ Input: Date;
243
+ Output: Date;
244
+ };
245
+ DateTime: {
246
+ Input: Date;
247
+ Output: Date;
248
+ };
249
+ };
250
+ }>, any, any, any>) => SchemaBuilder.FieldMap) | undefined;
208
251
  }) => _pothos_plugin_drizzle.DrizzleObjectRef<PothosSchemaTypes.ExtendDefaultTypes<{
209
252
  Context: Awaited<UserContext & {
210
253
  abilities: keyof DB["query"] extends infer T_4 extends keyof DB["query"] ? { [key_5 in T_4]: {
211
- filter: (action: Action, options?: {
212
- inject?: Partial<{
213
- where: any;
214
- columns: any;
215
- limit: any;
216
- }> | undefined;
254
+ filter: <Injection extends Parameters<DB["query"][key_5]["findMany"]>[0]>(action: Action, options?: {
255
+ inject?: Injection | undefined;
217
256
  } | undefined) => {
218
- single: {
219
- where: drizzle_orm.SQL<unknown> | undefined;
220
- columns: Record<string, any> | undefined;
257
+ query: {
258
+ single: {
259
+ readonly where: any;
260
+ readonly columns: undefined;
261
+ };
262
+ many: {
263
+ readonly where: any;
264
+ readonly columns: undefined;
265
+ readonly limit: any;
266
+ };
221
267
  };
222
- many: {
223
- where: drizzle_orm.SQL<unknown> | undefined;
224
- columns: Record<string, any> | undefined;
225
- limit: number | undefined;
268
+ sql: {
269
+ readonly where: drizzle_orm.SQL<unknown> | undefined;
270
+ readonly columns: undefined;
271
+ readonly limit: any;
226
272
  };
227
273
  };
228
274
  explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_5 extends keyof DB["query"] ? { [key_3 in T_5]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
229
275
  }; } : never;
230
276
  }>;
231
- DrizzleSchema: DB["_"]["fullSchema"];
277
+ DrizzleRelations: DB["_"]["relations"];
232
278
  Scalars: {
233
279
  JSON: {
234
280
  Input: unknown;
@@ -243,74 +289,76 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Gener
243
289
  Output: Date;
244
290
  };
245
291
  };
246
- }>, ExplicitTableName, ({ [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; } | undefined extends Record<string, unknown> ? { [Key in (drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]) & string as Key]: { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["notNull"] extends true ? { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] : { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] | null; } extends infer T_8 ? { [K_2 in keyof T_8]: { [Key in (drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]) & string as Key]: { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["notNull"] extends true ? { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] : { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] | null; }[K_2]; } : never : { [Key_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] & string as Key_1]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["notNull"] extends true ? drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] : drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] | null; } extends infer T_9 ? { [K_5 in keyof T_9]: { [Key_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] & string as Key_1]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["notNull"] extends true ? drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] : drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] | null; }[K_5]; } : never) & {} & ({ [K_6 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"]]?: true | drizzle_orm.DBQueryConfig<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6] extends drizzle_orm.One<string, boolean> ? "one" : "many", false, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.FindTableByDBName<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6]["referencedTableName"]>> | undefined; } | undefined extends Record<string, unknown> ? drizzle_orm.BuildRelationResult<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, Record<string, unknown> & { [K_6 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"]]?: true | drizzle_orm.DBQueryConfig<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6] extends drizzle_orm.One<string, boolean> ? "one" : "many", false, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.FindTableByDBName<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6]["referencedTableName"]>> | undefined; }, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"]> : {}) extends infer T_5 ? { [K in keyof T_5]: (({ [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; } | undefined extends Record<string, unknown> ? { [Key in (drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]) & string as Key]: { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["notNull"] extends true ? { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] : { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] | null; } extends infer T_6 ? { [K_2 in keyof T_6]: { [Key in (drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]) & string as Key]: { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["notNull"] extends true ? { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] : { [K_4 in drizzle_orm.Equal<Exclude<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] | (string & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"])], undefined>, false> extends true ? Exclude<keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"], drizzle_orm.NonUndefinedKeysOnly<Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; }>> : { [K_3 in keyof (Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })]: drizzle_orm.Equal<(Record<string, unknown> & { [K_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]?: boolean | undefined; })[K_3], true> extends true ? K_3 : never; }[string | keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]] & keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"]]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][K_4]; }[Key]["_"]["data"] | null; }[K_2]; } : never : { [Key_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] & string as Key_1]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["notNull"] extends true ? drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] : drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] | null; } extends infer T_7 ? { [K_5 in keyof T_7]: { [Key_1 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"] & string as Key_1]: drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["notNull"] extends true ? drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] : drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["columns"][Key_1]["_"]["data"] | null; }[K_5]; } : never) & {} & ({ [K_6 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"]]?: true | drizzle_orm.DBQueryConfig<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6] extends drizzle_orm.One<string, boolean> ? "one" : "many", false, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.FindTableByDBName<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6]["referencedTableName"]>> | undefined; } | undefined extends Record<string, unknown> ? drizzle_orm.BuildRelationResult<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, Record<string, unknown> & { [K_6 in keyof drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"]]?: true | drizzle_orm.DBQueryConfig<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6] extends drizzle_orm.One<string, boolean> ? "one" : "many", false, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.FindTableByDBName<drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"][K_6]["referencedTableName"]>> | undefined; }, drizzle_orm.ExtractTablesWithRelations<DB["_"]["fullSchema"] & {}>[ExplicitTableName]["relations"]> : {}))[K]; } : never>;
292
+ }>, ExplicitTableName, drizzle_orm.BuildQueryResult<drizzle_orm.ExtractTablesWithRelations<DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})["tables"]>, drizzle_orm.ExtractTablesWithRelations<DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})["tables"]>[ExplicitTableName], true | drizzle_orm.DBQueryConfig<"one", drizzle_orm.ExtractTablesWithRelations<DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})["tables"]>, drizzle_orm.ExtractTablesWithRelations<DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})["tables"]>[ExplicitTableName]>>>;
247
293
  /**
248
294
  * A function for creating where args to filter entities
249
295
  */
250
- arg: <ExplicitTableName extends keyof NonNullable<DB["_"]["schema"]>, RefName_1 extends string>({ tableName, name, nativeTableName, }: {
251
- tableName: ExplicitTableName;
252
- name?: RefName_1 | undefined;
253
- nativeTableName?: string;
254
- }) => {
255
- inputType: PothosSchemaTypes.InputObjectRef<PothosSchemaTypes.ExtendDefaultTypes<{
256
- Context: Awaited<UserContext & {
257
- abilities: keyof DB["query"] extends infer T_4 extends keyof DB["query"] ? { [key_5 in T_4]: {
258
- filter: (action: Action, options?: {
259
- inject?: Partial<{
260
- where: any;
261
- columns: any;
262
- limit: any;
263
- }> | undefined;
264
- } | undefined) => {
296
+ arg: <ExplicitTableName extends keyof NonEnumFields<NonNullable<DB["_"]["relations"]["schema"]>>, RefName_1 extends string>({ table, refName, dbName, }: Partial<{
297
+ table: ExplicitTableName;
298
+ refName: RefName_1 | undefined;
299
+ dbName: string;
300
+ }> & ({
301
+ dbName: string;
302
+ } | {
303
+ table: ExplicitTableName;
304
+ })) => PothosSchemaTypes.InputObjectRef<PothosSchemaTypes.ExtendDefaultTypes<{
305
+ Context: Awaited<UserContext & {
306
+ abilities: keyof DB["query"] extends infer T_4 extends keyof DB["query"] ? { [key_5 in T_4]: {
307
+ filter: <Injection extends Parameters<DB["query"][key_5]["findMany"]>[0]>(action: Action, options?: {
308
+ inject?: Injection | undefined;
309
+ } | undefined) => {
310
+ query: {
265
311
  single: {
266
- where: drizzle_orm.SQL<unknown> | undefined;
267
- columns: Record<string, any> | undefined;
312
+ readonly where: any;
313
+ readonly columns: undefined;
268
314
  };
269
315
  many: {
270
- where: drizzle_orm.SQL<unknown> | undefined;
271
- columns: Record<string, any> | undefined;
272
- limit: number | undefined;
316
+ readonly where: any;
317
+ readonly columns: undefined;
318
+ readonly limit: any;
273
319
  };
274
320
  };
275
- explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_5 extends keyof DB["query"] ? { [key_3 in T_5]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
276
- }; } : never;
277
- }>;
278
- DrizzleSchema: DB["_"]["fullSchema"];
279
- Scalars: {
280
- JSON: {
281
- Input: unknown;
282
- Output: unknown;
283
- };
284
- Date: {
285
- Input: Date;
286
- Output: Date;
287
- };
288
- DateTime: {
289
- Input: Date;
290
- Output: Date;
321
+ sql: {
322
+ readonly where: drizzle_orm.SQL<unknown> | undefined;
323
+ readonly columns: undefined;
324
+ readonly limit: any;
325
+ };
291
326
  };
292
- };
293
- }>, {
294
- [x: string]: unknown;
327
+ explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_5 extends keyof DB["query"] ? { [key_3 in T_5]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
328
+ }; } : never;
295
329
  }>;
296
- transformArgumentToQueryCondition: <T_5 extends {
297
- [x: string]: unknown;
298
- }>(arg: T_5 | null | undefined) => drizzle_orm.SQL<unknown> | undefined;
299
- };
330
+ DrizzleRelations: DB["_"]["relations"];
331
+ Scalars: {
332
+ JSON: {
333
+ Input: unknown;
334
+ Output: unknown;
335
+ };
336
+ Date: {
337
+ Input: Date;
338
+ Output: Date;
339
+ };
340
+ DateTime: {
341
+ Input: Date;
342
+ Output: Date;
343
+ };
344
+ };
345
+ }>, {
346
+ [x: string]: unknown;
347
+ }>;
300
348
  /**
301
349
  * A function for creating default READ queries.
302
350
  * Make sure the objects for the table you are creating the queries for are implemented
303
351
  */
304
- query: <ExplicitTableName extends keyof NonNullable<DB["_"]["schema"]>>({ tableName, readAction, listAction, }: {
305
- tableName: ExplicitTableName;
352
+ query: <ExplicitTableName extends keyof NonEnumFields<NonNullable<DB["_"]["relations"]["schema"]>>>({ table, readAction, listAction, }: {
353
+ table: ExplicitTableName;
306
354
  readAction?: Action | undefined;
307
355
  listAction?: Action | undefined;
308
356
  }) => void;
309
357
  /**
310
358
  * A function for creating a pubsub instance for a table. Use this to publish or subscribe events
311
359
  */
312
- pubsub: <ExplicitTableName extends keyof NonNullable<DB["_"]["schema"]>>({ tableName, }: {
313
- tableName: ExplicitTableName;
360
+ pubsub: <ExplicitTableName extends keyof NonEnumFields<NonNullable<DB["_"]["relations"]["schema"]>>>({ table, }: {
361
+ table: ExplicitTableName;
314
362
  }) => {
315
363
  registerOnInstance({ instance, action, primaryKeyValue, }: {
316
364
  instance: {
@@ -320,46 +368,49 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Gener
320
368
  primaryKeyValue?: string;
321
369
  }): void;
322
370
  created(): void;
323
- removed(primaryKeyValue?: NonNullable<DB["_"]["schema"]>[ExplicitTableName]["primaryKey"][number]["_"]["data"] | NonNullable<DB["_"]["schema"]>[ExplicitTableName]["primaryKey"][number]["_"]["data"][] | undefined): void;
324
- updated(primaryKeyValue?: NonNullable<DB["_"]["schema"]>[ExplicitTableName]["primaryKey"][number]["_"]["data"] | NonNullable<DB["_"]["schema"]>[ExplicitTableName]["primaryKey"][number]["_"]["data"][] | undefined): void;
371
+ removed(primaryKeyValue?: any | any[]): void;
372
+ updated(primaryKeyValue?: any | any[]): void;
325
373
  };
326
374
  /**
327
375
  * A function to implement enums for graphql usage.
328
376
  * The other helpers use this helper internally so in most cases you do not have to
329
377
  * call this helper directly, unless you need the reference to an enum type
330
378
  */
331
- enum_: <ExplicitEnumVariableName extends keyof (NonNullable<DB["_"]["fullSchema"]> extends infer T_4 ? { [K in keyof T_4 as NonNullable<DB["_"]["fullSchema"]>[K] extends drizzle_orm_pg_core.PgEnum<any> | drizzle_orm_singlestore_core.SingleStoreEnumColumnBuilderInitial<any, any> | drizzle_orm_mysql_core.MySqlEnumColumnBuilderInitial<any, any> ? K : never]: NonNullable<DB["_"]["fullSchema"]>[K]; } : never), RefName_2 extends string, EnumName extends string>({ enumVariableName, name, enumName, }: Partial<{
332
- enumVariableName: ExplicitEnumVariableName;
333
- enumName: EnumName;
334
- name: RefName_2 | undefined;
335
- } & ({
336
- enumVariableName: ExplicitEnumVariableName;
379
+ enum_: <ExplicitEnumVariableName extends keyof (NonNullable<DB["_"]["relations"]["schema"]> extends infer T_4 ? { [K in keyof T_4 as NonNullable<DB["_"]["relations"]["schema"]>[K] extends drizzle_orm_pg_core.PgEnum<any> ? K : never]: NonNullable<DB["_"]["relations"]["schema"]>[K]; } : never), EnumColumn extends drizzle_orm_pg_core.PgEnum<any>, RefName_2 extends string>({ tsName, enumColumn, refName, }: Partial<{
380
+ tsName: ExplicitEnumVariableName;
381
+ enumColumn: EnumColumn;
382
+ refName?: RefName_2 | undefined;
383
+ }> & ({
384
+ tsName: ExplicitEnumVariableName;
337
385
  } | {
338
- enumName: EnumName;
339
- })>) => PothosSchemaTypes.EnumRef<PothosSchemaTypes.ExtendDefaultTypes<{
386
+ enumColumn: EnumColumn;
387
+ })) => PothosSchemaTypes.EnumRef<PothosSchemaTypes.ExtendDefaultTypes<{
340
388
  Context: Awaited<UserContext & {
341
389
  abilities: keyof DB["query"] extends infer T_5 extends keyof DB["query"] ? { [key_5 in T_5]: {
342
- filter: (action: Action, options?: {
343
- inject?: Partial<{
344
- where: any;
345
- columns: any;
346
- limit: any;
347
- }> | undefined;
390
+ filter: <Injection extends Parameters<DB["query"][key_5]["findMany"]>[0]>(action: Action, options?: {
391
+ inject?: Injection | undefined;
348
392
  } | undefined) => {
349
- single: {
350
- where: drizzle_orm.SQL<unknown> | undefined;
351
- columns: Record<string, any> | undefined;
393
+ query: {
394
+ single: {
395
+ readonly where: any;
396
+ readonly columns: undefined;
397
+ };
398
+ many: {
399
+ readonly where: any;
400
+ readonly columns: undefined;
401
+ readonly limit: any;
402
+ };
352
403
  };
353
- many: {
354
- where: drizzle_orm.SQL<unknown> | undefined;
355
- columns: Record<string, any> | undefined;
356
- limit: number | undefined;
404
+ sql: {
405
+ readonly where: drizzle_orm.SQL<unknown> | undefined;
406
+ readonly columns: undefined;
407
+ readonly limit: any;
357
408
  };
358
409
  };
359
410
  explicitFilters: (action: Action) => (keyof DB["query"] extends infer T_6 extends keyof DB["query"] ? { [key_3 in T_6]: { [key_4 in Action]: Filter<UserContext, any>[]; }; } : never)[key_5][Action];
360
411
  }; } : never;
361
412
  }>;
362
- DrizzleSchema: DB["_"]["fullSchema"];
413
+ DrizzleRelations: DB["_"]["relations"];
363
414
  Scalars: {
364
415
  JSON: {
365
416
  Input: unknown;