@freehour/supabase-core 1.3.0 → 1.5.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.
@@ -1,50 +1,75 @@
1
- import { PostgrestResponseSuccess, PostgrestQueryBuilder, PostgrestFilterBuilder, UnstableGetResult } from '@supabase/postgrest-js';
1
+ import { PostgrestResponseSuccess } from '@supabase/postgrest-js';
2
2
  import { PostgrestSingleResponse } from '@supabase/supabase-js';
3
- import { FuzzySearchParams, UpsertOptions } from './data';
4
- import { CoreDatabase } from './database';
3
+ import { Database as CoreDatabase } from './generated/database';
4
+ import { ClientServerOptions, ColumnName, GenericDatabase, ID, Insert, RelationName as BaseRelationName, RelationType as BaseRelationType, Row, SchemaName as BaseSchemaName, TableName as BaseTableName, Update, ViewName as BaseViewName } from './database';
5
5
  import { DatabaseService } from './database-service';
6
- import { ColumnName, ID, Insert, RelationName, RelationType, Row, SchemaName, TableName, Update, ViewName } from './relation';
7
- import { Select, SelectColumns, SelectOptions, CountMethod } from './select';
6
+ import { PostgrestQueryBuilder, SelectQuery, SelectResult, UpsertOptions } from './postgrest';
8
7
  import { OmitFrom } from './utils';
9
- import { FilterNode } from './filter';
10
- import { PaginatedList } from './postgrest-extensions';
11
- export interface DataServiceParams<Database extends CoreDatabase, Schema extends SchemaName<Database>, Type extends RelationType = RelationType, Relation extends RelationName<Database, Schema, Type> = RelationName<Database, Schema, Type>> {
8
+ /**
9
+ * Options for fuzzy searching within a database table or view.
10
+ */
11
+ export interface FuzzySearchParams<Database extends GenericDatabase<SchemaName> & CoreDatabase, SchemaName extends BaseSchemaName<Database>, RelationType extends BaseRelationType = BaseRelationType, RelationName extends BaseRelationName<Database, SchemaName, RelationType> = BaseRelationName<Database, SchemaName, RelationType>> {
12
+ /**
13
+ * The name of the column to search in.
14
+ */
15
+ column: ColumnName<Database, SchemaName, RelationType, RelationName>;
16
+ /**
17
+ * The search term to use for the fuzzy search.
18
+ * This is the term that will be matched against the specified column.
19
+ * If empty or undefined, the function will return all rows sorted by the search column.
20
+ * @default ''
21
+ */
22
+ searchTerm?: string;
23
+ /**
24
+ * The minimum similarity score for results to be included.
25
+ * This is a number between 0 and 1, where 1 means an exact match.
26
+ * @default 0
27
+ */
28
+ minSimilarity?: number;
29
+ /**
30
+ * The maximum number of results to return.
31
+ * @default 64
32
+ */
33
+ limit?: number;
34
+ }
35
+ export interface DataServiceParams<Database extends GenericDatabase<SchemaName> & CoreDatabase, ClientOptions extends Required<ClientServerOptions>, SchemaName extends BaseSchemaName<Database>, RelationType extends BaseRelationType = BaseRelationType, RelationName extends BaseRelationName<Database, SchemaName, RelationType> = BaseRelationName<Database, SchemaName, RelationType>> {
12
36
  /**
13
37
  * The database service instance to use for database operations.
14
38
  */
15
- database: DatabaseService<Database>;
39
+ database: DatabaseService<Database, ClientOptions>;
16
40
  /**
17
41
  * The name of the schema containing the table or view.
18
42
  */
19
- schema: Schema;
43
+ schema: SchemaName;
20
44
  /**
21
45
  * The name of the table or view that this service interacts with.
22
46
  */
23
- relation: Relation;
47
+ relation: RelationName;
24
48
  }
25
49
  /**
26
50
  * A service for interacting with a specific table or view in a database.
27
51
  *
28
52
  * @template Database The database type.
29
- * @template Schema The name of the schema containing the table or view.
30
- * @template Type The type of relation, either 'Tables' or 'Views'.
31
- * @template Relation The name of the table or view.
53
+ * @template ClientOptions The options type for the PostgREST client, including the PostgREST version.
54
+ * @template SchemaName The name of the schema containing the table or view.
55
+ * @template RelationType The type of relation, either 'Tables' or 'Views'.
56
+ * @template RelationName The name of the table or view.
32
57
  * @example
33
58
  * const service = new DataService({database, schema: 'public', relation: 'my_view'});
34
59
  * const records = await service.list();
35
60
  * const record = await service.find('some-id');
36
61
  */
37
- export declare class DataService<Database extends CoreDatabase, Schema extends SchemaName<Database> = SchemaName<Database>, Type extends RelationType = RelationType, Relation extends RelationName<Database, Schema, Type> = RelationName<Database, Schema, Type>> {
62
+ export declare class DataService<Database extends GenericDatabase<SchemaName> & CoreDatabase, ClientOptions extends Required<ClientServerOptions>, SchemaName extends BaseSchemaName<Database> = BaseSchemaName<Database>, RelationType extends BaseRelationType = BaseRelationType, RelationName extends BaseRelationName<Database, SchemaName, RelationType> = BaseRelationName<Database, SchemaName, RelationType>> {
38
63
  private readonly database;
39
64
  /**
40
65
  * The name of the schema containing the view.
41
66
  */
42
- readonly schema: Schema;
67
+ readonly schema: SchemaName;
43
68
  /**
44
69
  * The name of the view or table that this service interacts with.
45
70
  */
46
- readonly relation: Relation;
47
- constructor({ database, schema, relation, }: DataServiceParams<Database, Schema, Type, Relation>);
71
+ readonly relation: RelationName;
72
+ constructor({ database, schema, relation, }: DataServiceParams<Database, ClientOptions, SchemaName, RelationType, RelationName>);
48
73
  private recordNotFoundError;
49
74
  /**
50
75
  * The PostgREST query builder for this relation.
@@ -52,2920 +77,19 @@ export declare class DataService<Database extends CoreDatabase, Schema extends S
52
77
  * @example
53
78
  * const { data, error } = await dataService.query.select('*');
54
79
  */
55
- get query(): OmitFrom< PostgrestQueryBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T ? T extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
56
- __InternalSupabase: {
57
- PostgrestVersion: string;
58
- };
59
- } ? Database["__InternalSupabase"] : {
60
- PostgrestVersion: "12";
61
- } : T extends {
62
- PostgrestVersion: string;
63
- } ? T : never : never : never, Database[Schema] extends {
64
- Tables: Record<string, {
65
- Row: Record<string, unknown>;
66
- Insert: Record<string, unknown>;
67
- Update: Record<string, unknown>;
68
- Relationships: {
69
- foreignKeyName: string;
70
- columns: string[];
71
- isOneToOne?: boolean;
72
- referencedRelation: string;
73
- referencedColumns: string[];
74
- }[];
75
- }>;
76
- Views: Record<string, {
77
- Row: Record<string, unknown>;
78
- Insert: Record<string, unknown>;
79
- Update: Record<string, unknown>;
80
- Relationships: {
81
- foreignKeyName: string;
82
- columns: string[];
83
- isOneToOne?: boolean;
84
- referencedRelation: string;
85
- referencedColumns: string[];
86
- }[];
87
- } | {
88
- Row: Record<string, unknown>;
89
- Relationships: {
90
- foreignKeyName: string;
91
- columns: string[];
92
- isOneToOne?: boolean;
93
- referencedRelation: string;
94
- referencedColumns: string[];
95
- }[];
96
- }>;
97
- Functions: Record<string, {
98
- Args: Record<string, unknown> | never;
99
- Returns: unknown;
100
- SetofOptions?: {
101
- isSetofReturn?: boolean | undefined;
102
- isOneToOne?: boolean | undefined;
103
- isNotNullable?: boolean | undefined;
104
- to: string;
105
- from: string;
106
- };
107
- }>;
108
- } ? Database[Schema] : any, (Database[Schema] extends {
109
- Tables: Record<string, {
110
- Row: Record<string, unknown>;
111
- Insert: Record<string, unknown>;
112
- Update: Record<string, unknown>;
113
- Relationships: {
114
- foreignKeyName: string;
115
- columns: string[];
116
- isOneToOne?: boolean;
117
- referencedRelation: string;
118
- referencedColumns: string[];
119
- }[];
120
- }>;
121
- Views: Record<string, {
122
- Row: Record<string, unknown>;
123
- Insert: Record<string, unknown>;
124
- Update: Record<string, unknown>;
125
- Relationships: {
126
- foreignKeyName: string;
127
- columns: string[];
128
- isOneToOne?: boolean;
129
- referencedRelation: string;
130
- referencedColumns: string[];
131
- }[];
132
- } | {
133
- Row: Record<string, unknown>;
134
- Relationships: {
135
- foreignKeyName: string;
136
- columns: string[];
137
- isOneToOne?: boolean;
138
- referencedRelation: string;
139
- referencedColumns: string[];
140
- }[];
141
- }>;
142
- Functions: Record<string, {
143
- Args: Record<string, unknown> | never;
144
- Returns: unknown;
145
- SetofOptions?: {
146
- isSetofReturn?: boolean | undefined;
147
- isOneToOne?: boolean | undefined;
148
- isNotNullable?: boolean | undefined;
149
- to: string;
150
- from: string;
151
- };
152
- }>;
153
- } ? Database[Schema] : any)["Tables"][Relation], Relation, (Database[Schema] extends {
154
- Tables: Record<string, {
155
- Row: Record<string, unknown>;
156
- Insert: Record<string, unknown>;
157
- Update: Record<string, unknown>;
158
- Relationships: {
159
- foreignKeyName: string;
160
- columns: string[];
161
- isOneToOne?: boolean;
162
- referencedRelation: string;
163
- referencedColumns: string[];
164
- }[];
165
- }>;
166
- Views: Record<string, {
167
- Row: Record<string, unknown>;
168
- Insert: Record<string, unknown>;
169
- Update: Record<string, unknown>;
170
- Relationships: {
171
- foreignKeyName: string;
172
- columns: string[];
173
- isOneToOne?: boolean;
174
- referencedRelation: string;
175
- referencedColumns: string[];
176
- }[];
177
- } | {
178
- Row: Record<string, unknown>;
179
- Relationships: {
180
- foreignKeyName: string;
181
- columns: string[];
182
- isOneToOne?: boolean;
183
- referencedRelation: string;
184
- referencedColumns: string[];
185
- }[];
186
- }>;
187
- Functions: Record<string, {
188
- Args: Record<string, unknown> | never;
189
- Returns: unknown;
190
- SetofOptions?: {
191
- isSetofReturn?: boolean | undefined;
192
- isOneToOne?: boolean | undefined;
193
- isNotNullable?: boolean | undefined;
194
- to: string;
195
- from: string;
196
- };
197
- }>;
198
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_1 ? T_1 extends (Database[Schema] extends {
199
- Tables: Record<string, {
200
- Row: Record<string, unknown>;
201
- Insert: Record<string, unknown>;
202
- Update: Record<string, unknown>;
203
- Relationships: {
204
- foreignKeyName: string;
205
- columns: string[];
206
- isOneToOne?: boolean;
207
- referencedRelation: string;
208
- referencedColumns: string[];
209
- }[];
210
- }>;
211
- Views: Record<string, {
212
- Row: Record<string, unknown>;
213
- Insert: Record<string, unknown>;
214
- Update: Record<string, unknown>;
215
- Relationships: {
216
- foreignKeyName: string;
217
- columns: string[];
218
- isOneToOne?: boolean;
219
- referencedRelation: string;
220
- referencedColumns: string[];
221
- }[];
222
- } | {
223
- Row: Record<string, unknown>;
224
- Relationships: {
225
- foreignKeyName: string;
226
- columns: string[];
227
- isOneToOne?: boolean;
228
- referencedRelation: string;
229
- referencedColumns: string[];
230
- }[];
231
- }>;
232
- Functions: Record<string, {
233
- Args: Record<string, unknown> | never;
234
- Returns: unknown;
235
- SetofOptions?: {
236
- isSetofReturn?: boolean | undefined;
237
- isOneToOne?: boolean | undefined;
238
- isNotNullable?: boolean | undefined;
239
- to: string;
240
- from: string;
241
- };
242
- }>;
243
- } ? Database[Schema] : any)["Tables"][Relation] ? T_1 extends {
244
- Relationships: infer R;
245
- } ? R : unknown : never : never>, "select" | "delete"> & {
246
- select: <Columns extends SelectColumns<(Database[Schema] extends {
247
- Tables: Record<string, {
248
- Row: Record<string, unknown>;
249
- Insert: Record<string, unknown>;
250
- Update: Record<string, unknown>;
251
- Relationships: {
252
- foreignKeyName: string;
253
- columns: string[];
254
- isOneToOne?: boolean;
255
- referencedRelation: string;
256
- referencedColumns: string[];
257
- }[];
258
- }>;
259
- Views: Record<string, {
260
- Row: Record<string, unknown>;
261
- Insert: Record<string, unknown>;
262
- Update: Record<string, unknown>;
263
- Relationships: {
264
- foreignKeyName: string;
265
- columns: string[];
266
- isOneToOne?: boolean;
267
- referencedRelation: string;
268
- referencedColumns: string[];
269
- }[];
270
- } | {
271
- Row: Record<string, unknown>;
272
- Relationships: {
273
- foreignKeyName: string;
274
- columns: string[];
275
- isOneToOne?: boolean;
276
- referencedRelation: string;
277
- referencedColumns: string[];
278
- }[];
279
- }>;
280
- Functions: Record<string, {
281
- Args: Record<string, unknown> | never;
282
- Returns: unknown;
283
- SetofOptions?: {
284
- isSetofReturn?: boolean | undefined;
285
- isOneToOne?: boolean | undefined;
286
- isNotNullable?: boolean | undefined;
287
- to: string;
288
- from: string;
289
- };
290
- }>;
291
- } ? Database[Schema] : any)["Tables"][Relation]["Row"]>>(columns: Columns, options?: SelectOptions) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_2 ? T_2 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_2 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
292
- __InternalSupabase: {
293
- PostgrestVersion: string;
294
- };
295
- } ? Database["__InternalSupabase"] : {
296
- PostgrestVersion: "12";
297
- } : T_2 extends {
298
- PostgrestVersion: string;
299
- } ? T_2 : never : never : never, Database[Schema] extends {
300
- Tables: Record<string, {
301
- Row: Record<string, unknown>;
302
- Insert: Record<string, unknown>;
303
- Update: Record<string, unknown>;
304
- Relationships: {
305
- foreignKeyName: string;
306
- columns: string[];
307
- isOneToOne?: boolean;
308
- referencedRelation: string;
309
- referencedColumns: string[];
310
- }[];
311
- }>;
312
- Views: Record<string, {
313
- Row: Record<string, unknown>;
314
- Insert: Record<string, unknown>;
315
- Update: Record<string, unknown>;
316
- Relationships: {
317
- foreignKeyName: string;
318
- columns: string[];
319
- isOneToOne?: boolean;
320
- referencedRelation: string;
321
- referencedColumns: string[];
322
- }[];
323
- } | {
324
- Row: Record<string, unknown>;
325
- Relationships: {
326
- foreignKeyName: string;
327
- columns: string[];
328
- isOneToOne?: boolean;
329
- referencedRelation: string;
330
- referencedColumns: string[];
331
- }[];
332
- }>;
333
- Functions: Record<string, {
334
- Args: Record<string, unknown> | never;
335
- Returns: unknown;
336
- SetofOptions?: {
337
- isSetofReturn?: boolean | undefined;
338
- isOneToOne?: boolean | undefined;
339
- isNotNullable?: boolean | undefined;
340
- to: string;
341
- from: string;
342
- };
343
- }>;
344
- } ? Database[Schema] : any, (Database[Schema] extends {
345
- Tables: Record<string, {
346
- Row: Record<string, unknown>;
347
- Insert: Record<string, unknown>;
348
- Update: Record<string, unknown>;
349
- Relationships: {
350
- foreignKeyName: string;
351
- columns: string[];
352
- isOneToOne?: boolean;
353
- referencedRelation: string;
354
- referencedColumns: string[];
355
- }[];
356
- }>;
357
- Views: Record<string, {
358
- Row: Record<string, unknown>;
359
- Insert: Record<string, unknown>;
360
- Update: Record<string, unknown>;
361
- Relationships: {
362
- foreignKeyName: string;
363
- columns: string[];
364
- isOneToOne?: boolean;
365
- referencedRelation: string;
366
- referencedColumns: string[];
367
- }[];
368
- } | {
369
- Row: Record<string, unknown>;
370
- Relationships: {
371
- foreignKeyName: string;
372
- columns: string[];
373
- isOneToOne?: boolean;
374
- referencedRelation: string;
375
- referencedColumns: string[];
376
- }[];
377
- }>;
378
- Functions: Record<string, {
379
- Args: Record<string, unknown> | never;
380
- Returns: unknown;
381
- SetofOptions?: {
382
- isSetofReturn?: boolean | undefined;
383
- isOneToOne?: boolean | undefined;
384
- isNotNullable?: boolean | undefined;
385
- to: string;
386
- from: string;
387
- };
388
- }>;
389
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Select<(Database[Schema] extends {
390
- Tables: Record<string, {
391
- Row: Record<string, unknown>;
392
- Insert: Record<string, unknown>;
393
- Update: Record<string, unknown>;
394
- Relationships: {
395
- foreignKeyName: string;
396
- columns: string[];
397
- isOneToOne?: boolean;
398
- referencedRelation: string;
399
- referencedColumns: string[];
400
- }[];
401
- }>;
402
- Views: Record<string, {
403
- Row: Record<string, unknown>;
404
- Insert: Record<string, unknown>;
405
- Update: Record<string, unknown>;
406
- Relationships: {
407
- foreignKeyName: string;
408
- columns: string[];
409
- isOneToOne?: boolean;
410
- referencedRelation: string;
411
- referencedColumns: string[];
412
- }[];
413
- } | {
414
- Row: Record<string, unknown>;
415
- Relationships: {
416
- foreignKeyName: string;
417
- columns: string[];
418
- isOneToOne?: boolean;
419
- referencedRelation: string;
420
- referencedColumns: string[];
421
- }[];
422
- }>;
423
- Functions: Record<string, {
424
- Args: Record<string, unknown> | never;
425
- Returns: unknown;
426
- SetofOptions?: {
427
- isSetofReturn?: boolean | undefined;
428
- isOneToOne?: boolean | undefined;
429
- isNotNullable?: boolean | undefined;
430
- to: string;
431
- from: string;
432
- };
433
- }>;
434
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Columns>[], Relation, (Database[Schema] extends {
435
- Tables: Record<string, {
436
- Row: Record<string, unknown>;
437
- Insert: Record<string, unknown>;
438
- Update: Record<string, unknown>;
439
- Relationships: {
440
- foreignKeyName: string;
441
- columns: string[];
442
- isOneToOne?: boolean;
443
- referencedRelation: string;
444
- referencedColumns: string[];
445
- }[];
446
- }>;
447
- Views: Record<string, {
448
- Row: Record<string, unknown>;
449
- Insert: Record<string, unknown>;
450
- Update: Record<string, unknown>;
451
- Relationships: {
452
- foreignKeyName: string;
453
- columns: string[];
454
- isOneToOne?: boolean;
455
- referencedRelation: string;
456
- referencedColumns: string[];
457
- }[];
458
- } | {
459
- Row: Record<string, unknown>;
460
- Relationships: {
461
- foreignKeyName: string;
462
- columns: string[];
463
- isOneToOne?: boolean;
464
- referencedRelation: string;
465
- referencedColumns: string[];
466
- }[];
467
- }>;
468
- Functions: Record<string, {
469
- Args: Record<string, unknown> | never;
470
- Returns: unknown;
471
- SetofOptions?: {
472
- isSetofReturn?: boolean | undefined;
473
- isOneToOne?: boolean | undefined;
474
- isNotNullable?: boolean | undefined;
475
- to: string;
476
- from: string;
477
- };
478
- }>;
479
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_3 ? T_3 extends (Database[Schema] extends {
480
- Tables: Record<string, {
481
- Row: Record<string, unknown>;
482
- Insert: Record<string, unknown>;
483
- Update: Record<string, unknown>;
484
- Relationships: {
485
- foreignKeyName: string;
486
- columns: string[];
487
- isOneToOne?: boolean;
488
- referencedRelation: string;
489
- referencedColumns: string[];
490
- }[];
491
- }>;
492
- Views: Record<string, {
493
- Row: Record<string, unknown>;
494
- Insert: Record<string, unknown>;
495
- Update: Record<string, unknown>;
496
- Relationships: {
497
- foreignKeyName: string;
498
- columns: string[];
499
- isOneToOne?: boolean;
500
- referencedRelation: string;
501
- referencedColumns: string[];
502
- }[];
503
- } | {
504
- Row: Record<string, unknown>;
505
- Relationships: {
506
- foreignKeyName: string;
507
- columns: string[];
508
- isOneToOne?: boolean;
509
- referencedRelation: string;
510
- referencedColumns: string[];
511
- }[];
512
- }>;
513
- Functions: Record<string, {
514
- Args: Record<string, unknown> | never;
515
- Returns: unknown;
516
- SetofOptions?: {
517
- isSetofReturn?: boolean | undefined;
518
- isOneToOne?: boolean | undefined;
519
- isNotNullable?: boolean | undefined;
520
- to: string;
521
- from: string;
522
- };
523
- }>;
524
- } ? Database[Schema] : any)["Tables"][Relation] ? T_3 extends {
525
- Relationships: infer R;
526
- } ? R : unknown : never : never, "GET">, "filter"> & {
527
- filter: <K extends string = string>(node: FilterNode<K>) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_4 ? T_4 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_4 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
528
- __InternalSupabase: {
529
- PostgrestVersion: string;
530
- };
531
- } ? Database["__InternalSupabase"] : {
532
- PostgrestVersion: "12";
533
- } : T_4 extends {
534
- PostgrestVersion: string;
535
- } ? T_4 : never : never : never, Database[Schema] extends {
536
- Tables: Record<string, {
537
- Row: Record<string, unknown>;
538
- Insert: Record<string, unknown>;
539
- Update: Record<string, unknown>;
540
- Relationships: {
541
- foreignKeyName: string;
542
- columns: string[];
543
- isOneToOne?: boolean;
544
- referencedRelation: string;
545
- referencedColumns: string[];
546
- }[];
547
- }>;
548
- Views: Record<string, {
549
- Row: Record<string, unknown>;
550
- Insert: Record<string, unknown>;
551
- Update: Record<string, unknown>;
552
- Relationships: {
553
- foreignKeyName: string;
554
- columns: string[];
555
- isOneToOne?: boolean;
556
- referencedRelation: string;
557
- referencedColumns: string[];
558
- }[];
559
- } | {
560
- Row: Record<string, unknown>;
561
- Relationships: {
562
- foreignKeyName: string;
563
- columns: string[];
564
- isOneToOne?: boolean;
565
- referencedRelation: string;
566
- referencedColumns: string[];
567
- }[];
568
- }>;
569
- Functions: Record<string, {
570
- Args: Record<string, unknown> | never;
571
- Returns: unknown;
572
- SetofOptions?: {
573
- isSetofReturn?: boolean | undefined;
574
- isOneToOne?: boolean | undefined;
575
- isNotNullable?: boolean | undefined;
576
- to: string;
577
- from: string;
578
- };
579
- }>;
580
- } ? Database[Schema] : any, (Database[Schema] extends {
581
- Tables: Record<string, {
582
- Row: Record<string, unknown>;
583
- Insert: Record<string, unknown>;
584
- Update: Record<string, unknown>;
585
- Relationships: {
586
- foreignKeyName: string;
587
- columns: string[];
588
- isOneToOne?: boolean;
589
- referencedRelation: string;
590
- referencedColumns: string[];
591
- }[];
592
- }>;
593
- Views: Record<string, {
594
- Row: Record<string, unknown>;
595
- Insert: Record<string, unknown>;
596
- Update: Record<string, unknown>;
597
- Relationships: {
598
- foreignKeyName: string;
599
- columns: string[];
600
- isOneToOne?: boolean;
601
- referencedRelation: string;
602
- referencedColumns: string[];
603
- }[];
604
- } | {
605
- Row: Record<string, unknown>;
606
- Relationships: {
607
- foreignKeyName: string;
608
- columns: string[];
609
- isOneToOne?: boolean;
610
- referencedRelation: string;
611
- referencedColumns: string[];
612
- }[];
613
- }>;
614
- Functions: Record<string, {
615
- Args: Record<string, unknown> | never;
616
- Returns: unknown;
617
- SetofOptions?: {
618
- isSetofReturn?: boolean | undefined;
619
- isOneToOne?: boolean | undefined;
620
- isNotNullable?: boolean | undefined;
621
- to: string;
622
- from: string;
623
- };
624
- }>;
625
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Select<(Database[Schema] extends {
626
- Tables: Record<string, {
627
- Row: Record<string, unknown>;
628
- Insert: Record<string, unknown>;
629
- Update: Record<string, unknown>;
630
- Relationships: {
631
- foreignKeyName: string;
632
- columns: string[];
633
- isOneToOne?: boolean;
634
- referencedRelation: string;
635
- referencedColumns: string[];
636
- }[];
637
- }>;
638
- Views: Record<string, {
639
- Row: Record<string, unknown>;
640
- Insert: Record<string, unknown>;
641
- Update: Record<string, unknown>;
642
- Relationships: {
643
- foreignKeyName: string;
644
- columns: string[];
645
- isOneToOne?: boolean;
646
- referencedRelation: string;
647
- referencedColumns: string[];
648
- }[];
649
- } | {
650
- Row: Record<string, unknown>;
651
- Relationships: {
652
- foreignKeyName: string;
653
- columns: string[];
654
- isOneToOne?: boolean;
655
- referencedRelation: string;
656
- referencedColumns: string[];
657
- }[];
658
- }>;
659
- Functions: Record<string, {
660
- Args: Record<string, unknown> | never;
661
- Returns: unknown;
662
- SetofOptions?: {
663
- isSetofReturn?: boolean | undefined;
664
- isOneToOne?: boolean | undefined;
665
- isNotNullable?: boolean | undefined;
666
- to: string;
667
- from: string;
668
- };
669
- }>;
670
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Columns>[], Relation, (Database[Schema] extends {
671
- Tables: Record<string, {
672
- Row: Record<string, unknown>;
673
- Insert: Record<string, unknown>;
674
- Update: Record<string, unknown>;
675
- Relationships: {
676
- foreignKeyName: string;
677
- columns: string[];
678
- isOneToOne?: boolean;
679
- referencedRelation: string;
680
- referencedColumns: string[];
681
- }[];
682
- }>;
683
- Views: Record<string, {
684
- Row: Record<string, unknown>;
685
- Insert: Record<string, unknown>;
686
- Update: Record<string, unknown>;
687
- Relationships: {
688
- foreignKeyName: string;
689
- columns: string[];
690
- isOneToOne?: boolean;
691
- referencedRelation: string;
692
- referencedColumns: string[];
693
- }[];
694
- } | {
695
- Row: Record<string, unknown>;
696
- Relationships: {
697
- foreignKeyName: string;
698
- columns: string[];
699
- isOneToOne?: boolean;
700
- referencedRelation: string;
701
- referencedColumns: string[];
702
- }[];
703
- }>;
704
- Functions: Record<string, {
705
- Args: Record<string, unknown> | never;
706
- Returns: unknown;
707
- SetofOptions?: {
708
- isSetofReturn?: boolean | undefined;
709
- isOneToOne?: boolean | undefined;
710
- isNotNullable?: boolean | undefined;
711
- to: string;
712
- from: string;
713
- };
714
- }>;
715
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_5 ? T_5 extends (Database[Schema] extends {
716
- Tables: Record<string, {
717
- Row: Record<string, unknown>;
718
- Insert: Record<string, unknown>;
719
- Update: Record<string, unknown>;
720
- Relationships: {
721
- foreignKeyName: string;
722
- columns: string[];
723
- isOneToOne?: boolean;
724
- referencedRelation: string;
725
- referencedColumns: string[];
726
- }[];
727
- }>;
728
- Views: Record<string, {
729
- Row: Record<string, unknown>;
730
- Insert: Record<string, unknown>;
731
- Update: Record<string, unknown>;
732
- Relationships: {
733
- foreignKeyName: string;
734
- columns: string[];
735
- isOneToOne?: boolean;
736
- referencedRelation: string;
737
- referencedColumns: string[];
738
- }[];
739
- } | {
740
- Row: Record<string, unknown>;
741
- Relationships: {
742
- foreignKeyName: string;
743
- columns: string[];
744
- isOneToOne?: boolean;
745
- referencedRelation: string;
746
- referencedColumns: string[];
747
- }[];
748
- }>;
749
- Functions: Record<string, {
750
- Args: Record<string, unknown> | never;
751
- Returns: unknown;
752
- SetofOptions?: {
753
- isSetofReturn?: boolean | undefined;
754
- isOneToOne?: boolean | undefined;
755
- isNotNullable?: boolean | undefined;
756
- to: string;
757
- from: string;
758
- };
759
- }>;
760
- } ? Database[Schema] : any)["Tables"][Relation] ? T_5 extends {
761
- Relationships: infer R;
762
- } ? R : unknown : never : never, "GET">, "filter"> & /*elided*/ any;
763
- paginate: (page: number, limit: number, count?: number) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_4 ? T_4 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_4 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
764
- __InternalSupabase: {
765
- PostgrestVersion: string;
766
- };
767
- } ? Database["__InternalSupabase"] : {
768
- PostgrestVersion: "12";
769
- } : T_4 extends {
770
- PostgrestVersion: string;
771
- } ? T_4 : never : never : never, Database[Schema] extends {
772
- Tables: Record<string, {
773
- Row: Record<string, unknown>;
774
- Insert: Record<string, unknown>;
775
- Update: Record<string, unknown>;
776
- Relationships: {
777
- foreignKeyName: string;
778
- columns: string[];
779
- isOneToOne?: boolean;
780
- referencedRelation: string;
781
- referencedColumns: string[];
782
- }[];
783
- }>;
784
- Views: Record<string, {
785
- Row: Record<string, unknown>;
786
- Insert: Record<string, unknown>;
787
- Update: Record<string, unknown>;
788
- Relationships: {
789
- foreignKeyName: string;
790
- columns: string[];
791
- isOneToOne?: boolean;
792
- referencedRelation: string;
793
- referencedColumns: string[];
794
- }[];
795
- } | {
796
- Row: Record<string, unknown>;
797
- Relationships: {
798
- foreignKeyName: string;
799
- columns: string[];
800
- isOneToOne?: boolean;
801
- referencedRelation: string;
802
- referencedColumns: string[];
803
- }[];
804
- }>;
805
- Functions: Record<string, {
806
- Args: Record<string, unknown> | never;
807
- Returns: unknown;
808
- SetofOptions?: {
809
- isSetofReturn?: boolean | undefined;
810
- isOneToOne?: boolean | undefined;
811
- isNotNullable?: boolean | undefined;
812
- to: string;
813
- from: string;
814
- };
815
- }>;
816
- } ? Database[Schema] : any, (Database[Schema] extends {
817
- Tables: Record<string, {
818
- Row: Record<string, unknown>;
819
- Insert: Record<string, unknown>;
820
- Update: Record<string, unknown>;
821
- Relationships: {
822
- foreignKeyName: string;
823
- columns: string[];
824
- isOneToOne?: boolean;
825
- referencedRelation: string;
826
- referencedColumns: string[];
827
- }[];
828
- }>;
829
- Views: Record<string, {
830
- Row: Record<string, unknown>;
831
- Insert: Record<string, unknown>;
832
- Update: Record<string, unknown>;
833
- Relationships: {
834
- foreignKeyName: string;
835
- columns: string[];
836
- isOneToOne?: boolean;
837
- referencedRelation: string;
838
- referencedColumns: string[];
839
- }[];
840
- } | {
841
- Row: Record<string, unknown>;
842
- Relationships: {
843
- foreignKeyName: string;
844
- columns: string[];
845
- isOneToOne?: boolean;
846
- referencedRelation: string;
847
- referencedColumns: string[];
848
- }[];
849
- }>;
850
- Functions: Record<string, {
851
- Args: Record<string, unknown> | never;
852
- Returns: unknown;
853
- SetofOptions?: {
854
- isSetofReturn?: boolean | undefined;
855
- isOneToOne?: boolean | undefined;
856
- isNotNullable?: boolean | undefined;
857
- to: string;
858
- from: string;
859
- };
860
- }>;
861
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Select<(Database[Schema] extends {
862
- Tables: Record<string, {
863
- Row: Record<string, unknown>;
864
- Insert: Record<string, unknown>;
865
- Update: Record<string, unknown>;
866
- Relationships: {
867
- foreignKeyName: string;
868
- columns: string[];
869
- isOneToOne?: boolean;
870
- referencedRelation: string;
871
- referencedColumns: string[];
872
- }[];
873
- }>;
874
- Views: Record<string, {
875
- Row: Record<string, unknown>;
876
- Insert: Record<string, unknown>;
877
- Update: Record<string, unknown>;
878
- Relationships: {
879
- foreignKeyName: string;
880
- columns: string[];
881
- isOneToOne?: boolean;
882
- referencedRelation: string;
883
- referencedColumns: string[];
884
- }[];
885
- } | {
886
- Row: Record<string, unknown>;
887
- Relationships: {
888
- foreignKeyName: string;
889
- columns: string[];
890
- isOneToOne?: boolean;
891
- referencedRelation: string;
892
- referencedColumns: string[];
893
- }[];
894
- }>;
895
- Functions: Record<string, {
896
- Args: Record<string, unknown> | never;
897
- Returns: unknown;
898
- SetofOptions?: {
899
- isSetofReturn?: boolean | undefined;
900
- isOneToOne?: boolean | undefined;
901
- isNotNullable?: boolean | undefined;
902
- to: string;
903
- from: string;
904
- };
905
- }>;
906
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Columns>[], Relation, (Database[Schema] extends {
907
- Tables: Record<string, {
908
- Row: Record<string, unknown>;
909
- Insert: Record<string, unknown>;
910
- Update: Record<string, unknown>;
911
- Relationships: {
912
- foreignKeyName: string;
913
- columns: string[];
914
- isOneToOne?: boolean;
915
- referencedRelation: string;
916
- referencedColumns: string[];
917
- }[];
918
- }>;
919
- Views: Record<string, {
920
- Row: Record<string, unknown>;
921
- Insert: Record<string, unknown>;
922
- Update: Record<string, unknown>;
923
- Relationships: {
924
- foreignKeyName: string;
925
- columns: string[];
926
- isOneToOne?: boolean;
927
- referencedRelation: string;
928
- referencedColumns: string[];
929
- }[];
930
- } | {
931
- Row: Record<string, unknown>;
932
- Relationships: {
933
- foreignKeyName: string;
934
- columns: string[];
935
- isOneToOne?: boolean;
936
- referencedRelation: string;
937
- referencedColumns: string[];
938
- }[];
939
- }>;
940
- Functions: Record<string, {
941
- Args: Record<string, unknown> | never;
942
- Returns: unknown;
943
- SetofOptions?: {
944
- isSetofReturn?: boolean | undefined;
945
- isOneToOne?: boolean | undefined;
946
- isNotNullable?: boolean | undefined;
947
- to: string;
948
- from: string;
949
- };
950
- }>;
951
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_5 ? T_5 extends (Database[Schema] extends {
952
- Tables: Record<string, {
953
- Row: Record<string, unknown>;
954
- Insert: Record<string, unknown>;
955
- Update: Record<string, unknown>;
956
- Relationships: {
957
- foreignKeyName: string;
958
- columns: string[];
959
- isOneToOne?: boolean;
960
- referencedRelation: string;
961
- referencedColumns: string[];
962
- }[];
963
- }>;
964
- Views: Record<string, {
965
- Row: Record<string, unknown>;
966
- Insert: Record<string, unknown>;
967
- Update: Record<string, unknown>;
968
- Relationships: {
969
- foreignKeyName: string;
970
- columns: string[];
971
- isOneToOne?: boolean;
972
- referencedRelation: string;
973
- referencedColumns: string[];
974
- }[];
975
- } | {
976
- Row: Record<string, unknown>;
977
- Relationships: {
978
- foreignKeyName: string;
979
- columns: string[];
980
- isOneToOne?: boolean;
981
- referencedRelation: string;
982
- referencedColumns: string[];
983
- }[];
984
- }>;
985
- Functions: Record<string, {
986
- Args: Record<string, unknown> | never;
987
- Returns: unknown;
988
- SetofOptions?: {
989
- isSetofReturn?: boolean | undefined;
990
- isOneToOne?: boolean | undefined;
991
- isNotNullable?: boolean | undefined;
992
- to: string;
993
- from: string;
994
- };
995
- }>;
996
- } ? Database[Schema] : any)["Tables"][Relation] ? T_5 extends {
997
- Relationships: infer R;
998
- } ? R : unknown : never : never, "GET">, "filter"> & /*elided*/ any;
999
- collect: () => PromiseLike< PaginatedList<Select<(Database[Schema] extends {
1000
- Tables: Record<string, {
1001
- Row: Record<string, unknown>;
1002
- Insert: Record<string, unknown>;
1003
- Update: Record<string, unknown>;
1004
- Relationships: {
1005
- foreignKeyName: string;
1006
- columns: string[];
1007
- isOneToOne?: boolean;
1008
- referencedRelation: string;
1009
- referencedColumns: string[];
1010
- }[];
1011
- }>;
1012
- Views: Record<string, {
1013
- Row: Record<string, unknown>;
1014
- Insert: Record<string, unknown>;
1015
- Update: Record<string, unknown>;
1016
- Relationships: {
1017
- foreignKeyName: string;
1018
- columns: string[];
1019
- isOneToOne?: boolean;
1020
- referencedRelation: string;
1021
- referencedColumns: string[];
1022
- }[];
1023
- } | {
1024
- Row: Record<string, unknown>;
1025
- Relationships: {
1026
- foreignKeyName: string;
1027
- columns: string[];
1028
- isOneToOne?: boolean;
1029
- referencedRelation: string;
1030
- referencedColumns: string[];
1031
- }[];
1032
- }>;
1033
- Functions: Record<string, {
1034
- Args: Record<string, unknown> | never;
1035
- Returns: unknown;
1036
- SetofOptions?: {
1037
- isSetofReturn?: boolean | undefined;
1038
- isOneToOne?: boolean | undefined;
1039
- isNotNullable?: boolean | undefined;
1040
- to: string;
1041
- from: string;
1042
- };
1043
- }>;
1044
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Columns>>>;
1045
- };
1046
- count: (method?: CountMethod) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_2 ? T_2 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_2 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
1047
- __InternalSupabase: {
1048
- PostgrestVersion: string;
1049
- };
1050
- } ? Database["__InternalSupabase"] : {
1051
- PostgrestVersion: "12";
1052
- } : T_2 extends {
1053
- PostgrestVersion: string;
1054
- } ? T_2 : never : never : never, Database[Schema] extends {
1055
- Tables: Record<string, {
1056
- Row: Record<string, unknown>;
1057
- Insert: Record<string, unknown>;
1058
- Update: Record<string, unknown>;
1059
- Relationships: {
1060
- foreignKeyName: string;
1061
- columns: string[];
1062
- isOneToOne?: boolean;
1063
- referencedRelation: string;
1064
- referencedColumns: string[];
1065
- }[];
1066
- }>;
1067
- Views: Record<string, {
1068
- Row: Record<string, unknown>;
1069
- Insert: Record<string, unknown>;
1070
- Update: Record<string, unknown>;
1071
- Relationships: {
1072
- foreignKeyName: string;
1073
- columns: string[];
1074
- isOneToOne?: boolean;
1075
- referencedRelation: string;
1076
- referencedColumns: string[];
1077
- }[];
1078
- } | {
1079
- Row: Record<string, unknown>;
1080
- Relationships: {
1081
- foreignKeyName: string;
1082
- columns: string[];
1083
- isOneToOne?: boolean;
1084
- referencedRelation: string;
1085
- referencedColumns: string[];
1086
- }[];
1087
- }>;
1088
- Functions: Record<string, {
1089
- Args: Record<string, unknown> | never;
1090
- Returns: unknown;
1091
- SetofOptions?: {
1092
- isSetofReturn?: boolean | undefined;
1093
- isOneToOne?: boolean | undefined;
1094
- isNotNullable?: boolean | undefined;
1095
- to: string;
1096
- from: string;
1097
- };
1098
- }>;
1099
- } ? Database[Schema] : any, (Database[Schema] extends {
1100
- Tables: Record<string, {
1101
- Row: Record<string, unknown>;
1102
- Insert: Record<string, unknown>;
1103
- Update: Record<string, unknown>;
1104
- Relationships: {
1105
- foreignKeyName: string;
1106
- columns: string[];
1107
- isOneToOne?: boolean;
1108
- referencedRelation: string;
1109
- referencedColumns: string[];
1110
- }[];
1111
- }>;
1112
- Views: Record<string, {
1113
- Row: Record<string, unknown>;
1114
- Insert: Record<string, unknown>;
1115
- Update: Record<string, unknown>;
1116
- Relationships: {
1117
- foreignKeyName: string;
1118
- columns: string[];
1119
- isOneToOne?: boolean;
1120
- referencedRelation: string;
1121
- referencedColumns: string[];
1122
- }[];
1123
- } | {
1124
- Row: Record<string, unknown>;
1125
- Relationships: {
1126
- foreignKeyName: string;
1127
- columns: string[];
1128
- isOneToOne?: boolean;
1129
- referencedRelation: string;
1130
- referencedColumns: string[];
1131
- }[];
1132
- }>;
1133
- Functions: Record<string, {
1134
- Args: Record<string, unknown> | never;
1135
- Returns: unknown;
1136
- SetofOptions?: {
1137
- isSetofReturn?: boolean | undefined;
1138
- isOneToOne?: boolean | undefined;
1139
- isNotNullable?: boolean | undefined;
1140
- to: string;
1141
- from: string;
1142
- };
1143
- }>;
1144
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], UnstableGetResult<Database[Schema] extends {
1145
- Tables: Record<string, {
1146
- Row: Record<string, unknown>;
1147
- Insert: Record<string, unknown>;
1148
- Update: Record<string, unknown>;
1149
- Relationships: {
1150
- foreignKeyName: string;
1151
- columns: string[];
1152
- isOneToOne?: boolean;
1153
- referencedRelation: string;
1154
- referencedColumns: string[];
1155
- }[];
1156
- }>;
1157
- Views: Record<string, {
1158
- Row: Record<string, unknown>;
1159
- Insert: Record<string, unknown>;
1160
- Update: Record<string, unknown>;
1161
- Relationships: {
1162
- foreignKeyName: string;
1163
- columns: string[];
1164
- isOneToOne?: boolean;
1165
- referencedRelation: string;
1166
- referencedColumns: string[];
1167
- }[];
1168
- } | {
1169
- Row: Record<string, unknown>;
1170
- Relationships: {
1171
- foreignKeyName: string;
1172
- columns: string[];
1173
- isOneToOne?: boolean;
1174
- referencedRelation: string;
1175
- referencedColumns: string[];
1176
- }[];
1177
- }>;
1178
- Functions: Record<string, {
1179
- Args: Record<string, unknown> | never;
1180
- Returns: unknown;
1181
- SetofOptions?: {
1182
- isSetofReturn?: boolean | undefined;
1183
- isOneToOne?: boolean | undefined;
1184
- isNotNullable?: boolean | undefined;
1185
- to: string;
1186
- from: string;
1187
- };
1188
- }>;
1189
- } ? Database[Schema] : any, (Database[Schema] extends {
1190
- Tables: Record<string, {
1191
- Row: Record<string, unknown>;
1192
- Insert: Record<string, unknown>;
1193
- Update: Record<string, unknown>;
1194
- Relationships: {
1195
- foreignKeyName: string;
1196
- columns: string[];
1197
- isOneToOne?: boolean;
1198
- referencedRelation: string;
1199
- referencedColumns: string[];
1200
- }[];
1201
- }>;
1202
- Views: Record<string, {
1203
- Row: Record<string, unknown>;
1204
- Insert: Record<string, unknown>;
1205
- Update: Record<string, unknown>;
1206
- Relationships: {
1207
- foreignKeyName: string;
1208
- columns: string[];
1209
- isOneToOne?: boolean;
1210
- referencedRelation: string;
1211
- referencedColumns: string[];
1212
- }[];
1213
- } | {
1214
- Row: Record<string, unknown>;
1215
- Relationships: {
1216
- foreignKeyName: string;
1217
- columns: string[];
1218
- isOneToOne?: boolean;
1219
- referencedRelation: string;
1220
- referencedColumns: string[];
1221
- }[];
1222
- }>;
1223
- Functions: Record<string, {
1224
- Args: Record<string, unknown> | never;
1225
- Returns: unknown;
1226
- SetofOptions?: {
1227
- isSetofReturn?: boolean | undefined;
1228
- isOneToOne?: boolean | undefined;
1229
- isNotNullable?: boolean | undefined;
1230
- to: string;
1231
- from: string;
1232
- };
1233
- }>;
1234
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Relation, (Database[Schema] extends {
1235
- Tables: Record<string, {
1236
- Row: Record<string, unknown>;
1237
- Insert: Record<string, unknown>;
1238
- Update: Record<string, unknown>;
1239
- Relationships: {
1240
- foreignKeyName: string;
1241
- columns: string[];
1242
- isOneToOne?: boolean;
1243
- referencedRelation: string;
1244
- referencedColumns: string[];
1245
- }[];
1246
- }>;
1247
- Views: Record<string, {
1248
- Row: Record<string, unknown>;
1249
- Insert: Record<string, unknown>;
1250
- Update: Record<string, unknown>;
1251
- Relationships: {
1252
- foreignKeyName: string;
1253
- columns: string[];
1254
- isOneToOne?: boolean;
1255
- referencedRelation: string;
1256
- referencedColumns: string[];
1257
- }[];
1258
- } | {
1259
- Row: Record<string, unknown>;
1260
- Relationships: {
1261
- foreignKeyName: string;
1262
- columns: string[];
1263
- isOneToOne?: boolean;
1264
- referencedRelation: string;
1265
- referencedColumns: string[];
1266
- }[];
1267
- }>;
1268
- Functions: Record<string, {
1269
- Args: Record<string, unknown> | never;
1270
- Returns: unknown;
1271
- SetofOptions?: {
1272
- isSetofReturn?: boolean | undefined;
1273
- isOneToOne?: boolean | undefined;
1274
- isNotNullable?: boolean | undefined;
1275
- to: string;
1276
- from: string;
1277
- };
1278
- }>;
1279
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_3 ? T_3 extends (Database[Schema] extends {
1280
- Tables: Record<string, {
1281
- Row: Record<string, unknown>;
1282
- Insert: Record<string, unknown>;
1283
- Update: Record<string, unknown>;
1284
- Relationships: {
1285
- foreignKeyName: string;
1286
- columns: string[];
1287
- isOneToOne?: boolean;
1288
- referencedRelation: string;
1289
- referencedColumns: string[];
1290
- }[];
1291
- }>;
1292
- Views: Record<string, {
1293
- Row: Record<string, unknown>;
1294
- Insert: Record<string, unknown>;
1295
- Update: Record<string, unknown>;
1296
- Relationships: {
1297
- foreignKeyName: string;
1298
- columns: string[];
1299
- isOneToOne?: boolean;
1300
- referencedRelation: string;
1301
- referencedColumns: string[];
1302
- }[];
1303
- } | {
1304
- Row: Record<string, unknown>;
1305
- Relationships: {
1306
- foreignKeyName: string;
1307
- columns: string[];
1308
- isOneToOne?: boolean;
1309
- referencedRelation: string;
1310
- referencedColumns: string[];
1311
- }[];
1312
- }>;
1313
- Functions: Record<string, {
1314
- Args: Record<string, unknown> | never;
1315
- Returns: unknown;
1316
- SetofOptions?: {
1317
- isSetofReturn?: boolean | undefined;
1318
- isOneToOne?: boolean | undefined;
1319
- isNotNullable?: boolean | undefined;
1320
- to: string;
1321
- from: string;
1322
- };
1323
- }>;
1324
- } ? Database[Schema] : any)["Tables"][Relation] ? T_3 extends {
1325
- Relationships: infer R;
1326
- } ? R : unknown : never : never, "*", ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_4 ? T_4 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_4 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
1327
- __InternalSupabase: {
1328
- PostgrestVersion: string;
1329
- };
1330
- } ? Database["__InternalSupabase"] : {
1331
- PostgrestVersion: "12";
1332
- } : T_4 extends {
1333
- PostgrestVersion: string;
1334
- } ? T_4 : never : never : never>[], Relation, (Database[Schema] extends {
1335
- Tables: Record<string, {
1336
- Row: Record<string, unknown>;
1337
- Insert: Record<string, unknown>;
1338
- Update: Record<string, unknown>;
1339
- Relationships: {
1340
- foreignKeyName: string;
1341
- columns: string[];
1342
- isOneToOne?: boolean;
1343
- referencedRelation: string;
1344
- referencedColumns: string[];
1345
- }[];
1346
- }>;
1347
- Views: Record<string, {
1348
- Row: Record<string, unknown>;
1349
- Insert: Record<string, unknown>;
1350
- Update: Record<string, unknown>;
1351
- Relationships: {
1352
- foreignKeyName: string;
1353
- columns: string[];
1354
- isOneToOne?: boolean;
1355
- referencedRelation: string;
1356
- referencedColumns: string[];
1357
- }[];
1358
- } | {
1359
- Row: Record<string, unknown>;
1360
- Relationships: {
1361
- foreignKeyName: string;
1362
- columns: string[];
1363
- isOneToOne?: boolean;
1364
- referencedRelation: string;
1365
- referencedColumns: string[];
1366
- }[];
1367
- }>;
1368
- Functions: Record<string, {
1369
- Args: Record<string, unknown> | never;
1370
- Returns: unknown;
1371
- SetofOptions?: {
1372
- isSetofReturn?: boolean | undefined;
1373
- isOneToOne?: boolean | undefined;
1374
- isNotNullable?: boolean | undefined;
1375
- to: string;
1376
- from: string;
1377
- };
1378
- }>;
1379
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_5 ? T_5 extends (Database[Schema] extends {
1380
- Tables: Record<string, {
1381
- Row: Record<string, unknown>;
1382
- Insert: Record<string, unknown>;
1383
- Update: Record<string, unknown>;
1384
- Relationships: {
1385
- foreignKeyName: string;
1386
- columns: string[];
1387
- isOneToOne?: boolean;
1388
- referencedRelation: string;
1389
- referencedColumns: string[];
1390
- }[];
1391
- }>;
1392
- Views: Record<string, {
1393
- Row: Record<string, unknown>;
1394
- Insert: Record<string, unknown>;
1395
- Update: Record<string, unknown>;
1396
- Relationships: {
1397
- foreignKeyName: string;
1398
- columns: string[];
1399
- isOneToOne?: boolean;
1400
- referencedRelation: string;
1401
- referencedColumns: string[];
1402
- }[];
1403
- } | {
1404
- Row: Record<string, unknown>;
1405
- Relationships: {
1406
- foreignKeyName: string;
1407
- columns: string[];
1408
- isOneToOne?: boolean;
1409
- referencedRelation: string;
1410
- referencedColumns: string[];
1411
- }[];
1412
- }>;
1413
- Functions: Record<string, {
1414
- Args: Record<string, unknown> | never;
1415
- Returns: unknown;
1416
- SetofOptions?: {
1417
- isSetofReturn?: boolean | undefined;
1418
- isOneToOne?: boolean | undefined;
1419
- isNotNullable?: boolean | undefined;
1420
- to: string;
1421
- from: string;
1422
- };
1423
- }>;
1424
- } ? Database[Schema] : any)["Tables"][Relation] ? T_5 extends {
1425
- Relationships: infer R;
1426
- } ? R : unknown : never : never, "GET">, "filter"> & {
1427
- filter: <K extends string = string>(node: FilterNode<K>) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_6 ? T_6 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_6 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
1428
- __InternalSupabase: {
1429
- PostgrestVersion: string;
1430
- };
1431
- } ? Database["__InternalSupabase"] : {
1432
- PostgrestVersion: "12";
1433
- } : T_6 extends {
1434
- PostgrestVersion: string;
1435
- } ? T_6 : never : never : never, Database[Schema] extends {
1436
- Tables: Record<string, {
1437
- Row: Record<string, unknown>;
1438
- Insert: Record<string, unknown>;
1439
- Update: Record<string, unknown>;
1440
- Relationships: {
1441
- foreignKeyName: string;
1442
- columns: string[];
1443
- isOneToOne?: boolean;
1444
- referencedRelation: string;
1445
- referencedColumns: string[];
1446
- }[];
1447
- }>;
1448
- Views: Record<string, {
1449
- Row: Record<string, unknown>;
1450
- Insert: Record<string, unknown>;
1451
- Update: Record<string, unknown>;
1452
- Relationships: {
1453
- foreignKeyName: string;
1454
- columns: string[];
1455
- isOneToOne?: boolean;
1456
- referencedRelation: string;
1457
- referencedColumns: string[];
1458
- }[];
1459
- } | {
1460
- Row: Record<string, unknown>;
1461
- Relationships: {
1462
- foreignKeyName: string;
1463
- columns: string[];
1464
- isOneToOne?: boolean;
1465
- referencedRelation: string;
1466
- referencedColumns: string[];
1467
- }[];
1468
- }>;
1469
- Functions: Record<string, {
1470
- Args: Record<string, unknown> | never;
1471
- Returns: unknown;
1472
- SetofOptions?: {
1473
- isSetofReturn?: boolean | undefined;
1474
- isOneToOne?: boolean | undefined;
1475
- isNotNullable?: boolean | undefined;
1476
- to: string;
1477
- from: string;
1478
- };
1479
- }>;
1480
- } ? Database[Schema] : any, (Database[Schema] extends {
1481
- Tables: Record<string, {
1482
- Row: Record<string, unknown>;
1483
- Insert: Record<string, unknown>;
1484
- Update: Record<string, unknown>;
1485
- Relationships: {
1486
- foreignKeyName: string;
1487
- columns: string[];
1488
- isOneToOne?: boolean;
1489
- referencedRelation: string;
1490
- referencedColumns: string[];
1491
- }[];
1492
- }>;
1493
- Views: Record<string, {
1494
- Row: Record<string, unknown>;
1495
- Insert: Record<string, unknown>;
1496
- Update: Record<string, unknown>;
1497
- Relationships: {
1498
- foreignKeyName: string;
1499
- columns: string[];
1500
- isOneToOne?: boolean;
1501
- referencedRelation: string;
1502
- referencedColumns: string[];
1503
- }[];
1504
- } | {
1505
- Row: Record<string, unknown>;
1506
- Relationships: {
1507
- foreignKeyName: string;
1508
- columns: string[];
1509
- isOneToOne?: boolean;
1510
- referencedRelation: string;
1511
- referencedColumns: string[];
1512
- }[];
1513
- }>;
1514
- Functions: Record<string, {
1515
- Args: Record<string, unknown> | never;
1516
- Returns: unknown;
1517
- SetofOptions?: {
1518
- isSetofReturn?: boolean | undefined;
1519
- isOneToOne?: boolean | undefined;
1520
- isNotNullable?: boolean | undefined;
1521
- to: string;
1522
- from: string;
1523
- };
1524
- }>;
1525
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], UnstableGetResult<Database[Schema] extends {
1526
- Tables: Record<string, {
1527
- Row: Record<string, unknown>;
1528
- Insert: Record<string, unknown>;
1529
- Update: Record<string, unknown>;
1530
- Relationships: {
1531
- foreignKeyName: string;
1532
- columns: string[];
1533
- isOneToOne?: boolean;
1534
- referencedRelation: string;
1535
- referencedColumns: string[];
1536
- }[];
1537
- }>;
1538
- Views: Record<string, {
1539
- Row: Record<string, unknown>;
1540
- Insert: Record<string, unknown>;
1541
- Update: Record<string, unknown>;
1542
- Relationships: {
1543
- foreignKeyName: string;
1544
- columns: string[];
1545
- isOneToOne?: boolean;
1546
- referencedRelation: string;
1547
- referencedColumns: string[];
1548
- }[];
1549
- } | {
1550
- Row: Record<string, unknown>;
1551
- Relationships: {
1552
- foreignKeyName: string;
1553
- columns: string[];
1554
- isOneToOne?: boolean;
1555
- referencedRelation: string;
1556
- referencedColumns: string[];
1557
- }[];
1558
- }>;
1559
- Functions: Record<string, {
1560
- Args: Record<string, unknown> | never;
1561
- Returns: unknown;
1562
- SetofOptions?: {
1563
- isSetofReturn?: boolean | undefined;
1564
- isOneToOne?: boolean | undefined;
1565
- isNotNullable?: boolean | undefined;
1566
- to: string;
1567
- from: string;
1568
- };
1569
- }>;
1570
- } ? Database[Schema] : any, (Database[Schema] extends {
1571
- Tables: Record<string, {
1572
- Row: Record<string, unknown>;
1573
- Insert: Record<string, unknown>;
1574
- Update: Record<string, unknown>;
1575
- Relationships: {
1576
- foreignKeyName: string;
1577
- columns: string[];
1578
- isOneToOne?: boolean;
1579
- referencedRelation: string;
1580
- referencedColumns: string[];
1581
- }[];
1582
- }>;
1583
- Views: Record<string, {
1584
- Row: Record<string, unknown>;
1585
- Insert: Record<string, unknown>;
1586
- Update: Record<string, unknown>;
1587
- Relationships: {
1588
- foreignKeyName: string;
1589
- columns: string[];
1590
- isOneToOne?: boolean;
1591
- referencedRelation: string;
1592
- referencedColumns: string[];
1593
- }[];
1594
- } | {
1595
- Row: Record<string, unknown>;
1596
- Relationships: {
1597
- foreignKeyName: string;
1598
- columns: string[];
1599
- isOneToOne?: boolean;
1600
- referencedRelation: string;
1601
- referencedColumns: string[];
1602
- }[];
1603
- }>;
1604
- Functions: Record<string, {
1605
- Args: Record<string, unknown> | never;
1606
- Returns: unknown;
1607
- SetofOptions?: {
1608
- isSetofReturn?: boolean | undefined;
1609
- isOneToOne?: boolean | undefined;
1610
- isNotNullable?: boolean | undefined;
1611
- to: string;
1612
- from: string;
1613
- };
1614
- }>;
1615
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Relation, (Database[Schema] extends {
1616
- Tables: Record<string, {
1617
- Row: Record<string, unknown>;
1618
- Insert: Record<string, unknown>;
1619
- Update: Record<string, unknown>;
1620
- Relationships: {
1621
- foreignKeyName: string;
1622
- columns: string[];
1623
- isOneToOne?: boolean;
1624
- referencedRelation: string;
1625
- referencedColumns: string[];
1626
- }[];
1627
- }>;
1628
- Views: Record<string, {
1629
- Row: Record<string, unknown>;
1630
- Insert: Record<string, unknown>;
1631
- Update: Record<string, unknown>;
1632
- Relationships: {
1633
- foreignKeyName: string;
1634
- columns: string[];
1635
- isOneToOne?: boolean;
1636
- referencedRelation: string;
1637
- referencedColumns: string[];
1638
- }[];
1639
- } | {
1640
- Row: Record<string, unknown>;
1641
- Relationships: {
1642
- foreignKeyName: string;
1643
- columns: string[];
1644
- isOneToOne?: boolean;
1645
- referencedRelation: string;
1646
- referencedColumns: string[];
1647
- }[];
1648
- }>;
1649
- Functions: Record<string, {
1650
- Args: Record<string, unknown> | never;
1651
- Returns: unknown;
1652
- SetofOptions?: {
1653
- isSetofReturn?: boolean | undefined;
1654
- isOneToOne?: boolean | undefined;
1655
- isNotNullable?: boolean | undefined;
1656
- to: string;
1657
- from: string;
1658
- };
1659
- }>;
1660
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_7 ? T_7 extends (Database[Schema] extends {
1661
- Tables: Record<string, {
1662
- Row: Record<string, unknown>;
1663
- Insert: Record<string, unknown>;
1664
- Update: Record<string, unknown>;
1665
- Relationships: {
1666
- foreignKeyName: string;
1667
- columns: string[];
1668
- isOneToOne?: boolean;
1669
- referencedRelation: string;
1670
- referencedColumns: string[];
1671
- }[];
1672
- }>;
1673
- Views: Record<string, {
1674
- Row: Record<string, unknown>;
1675
- Insert: Record<string, unknown>;
1676
- Update: Record<string, unknown>;
1677
- Relationships: {
1678
- foreignKeyName: string;
1679
- columns: string[];
1680
- isOneToOne?: boolean;
1681
- referencedRelation: string;
1682
- referencedColumns: string[];
1683
- }[];
1684
- } | {
1685
- Row: Record<string, unknown>;
1686
- Relationships: {
1687
- foreignKeyName: string;
1688
- columns: string[];
1689
- isOneToOne?: boolean;
1690
- referencedRelation: string;
1691
- referencedColumns: string[];
1692
- }[];
1693
- }>;
1694
- Functions: Record<string, {
1695
- Args: Record<string, unknown> | never;
1696
- Returns: unknown;
1697
- SetofOptions?: {
1698
- isSetofReturn?: boolean | undefined;
1699
- isOneToOne?: boolean | undefined;
1700
- isNotNullable?: boolean | undefined;
1701
- to: string;
1702
- from: string;
1703
- };
1704
- }>;
1705
- } ? Database[Schema] : any)["Tables"][Relation] ? T_7 extends {
1706
- Relationships: infer R;
1707
- } ? R : unknown : never : never, "*", ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_8 ? T_8 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_8 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
1708
- __InternalSupabase: {
1709
- PostgrestVersion: string;
1710
- };
1711
- } ? Database["__InternalSupabase"] : {
1712
- PostgrestVersion: "12";
1713
- } : T_8 extends {
1714
- PostgrestVersion: string;
1715
- } ? T_8 : never : never : never>[], Relation, (Database[Schema] extends {
1716
- Tables: Record<string, {
1717
- Row: Record<string, unknown>;
1718
- Insert: Record<string, unknown>;
1719
- Update: Record<string, unknown>;
1720
- Relationships: {
1721
- foreignKeyName: string;
1722
- columns: string[];
1723
- isOneToOne?: boolean;
1724
- referencedRelation: string;
1725
- referencedColumns: string[];
1726
- }[];
1727
- }>;
1728
- Views: Record<string, {
1729
- Row: Record<string, unknown>;
1730
- Insert: Record<string, unknown>;
1731
- Update: Record<string, unknown>;
1732
- Relationships: {
1733
- foreignKeyName: string;
1734
- columns: string[];
1735
- isOneToOne?: boolean;
1736
- referencedRelation: string;
1737
- referencedColumns: string[];
1738
- }[];
1739
- } | {
1740
- Row: Record<string, unknown>;
1741
- Relationships: {
1742
- foreignKeyName: string;
1743
- columns: string[];
1744
- isOneToOne?: boolean;
1745
- referencedRelation: string;
1746
- referencedColumns: string[];
1747
- }[];
1748
- }>;
1749
- Functions: Record<string, {
1750
- Args: Record<string, unknown> | never;
1751
- Returns: unknown;
1752
- SetofOptions?: {
1753
- isSetofReturn?: boolean | undefined;
1754
- isOneToOne?: boolean | undefined;
1755
- isNotNullable?: boolean | undefined;
1756
- to: string;
1757
- from: string;
1758
- };
1759
- }>;
1760
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_9 ? T_9 extends (Database[Schema] extends {
1761
- Tables: Record<string, {
1762
- Row: Record<string, unknown>;
1763
- Insert: Record<string, unknown>;
1764
- Update: Record<string, unknown>;
1765
- Relationships: {
1766
- foreignKeyName: string;
1767
- columns: string[];
1768
- isOneToOne?: boolean;
1769
- referencedRelation: string;
1770
- referencedColumns: string[];
1771
- }[];
1772
- }>;
1773
- Views: Record<string, {
1774
- Row: Record<string, unknown>;
1775
- Insert: Record<string, unknown>;
1776
- Update: Record<string, unknown>;
1777
- Relationships: {
1778
- foreignKeyName: string;
1779
- columns: string[];
1780
- isOneToOne?: boolean;
1781
- referencedRelation: string;
1782
- referencedColumns: string[];
1783
- }[];
1784
- } | {
1785
- Row: Record<string, unknown>;
1786
- Relationships: {
1787
- foreignKeyName: string;
1788
- columns: string[];
1789
- isOneToOne?: boolean;
1790
- referencedRelation: string;
1791
- referencedColumns: string[];
1792
- }[];
1793
- }>;
1794
- Functions: Record<string, {
1795
- Args: Record<string, unknown> | never;
1796
- Returns: unknown;
1797
- SetofOptions?: {
1798
- isSetofReturn?: boolean | undefined;
1799
- isOneToOne?: boolean | undefined;
1800
- isNotNullable?: boolean | undefined;
1801
- to: string;
1802
- from: string;
1803
- };
1804
- }>;
1805
- } ? Database[Schema] : any)["Tables"][Relation] ? T_9 extends {
1806
- Relationships: infer R;
1807
- } ? R : unknown : never : never, "GET">, "filter"> & /*elided*/ any;
1808
- paginate: (page: number, limit: number, count?: number) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_6 ? T_6 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_6 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
1809
- __InternalSupabase: {
1810
- PostgrestVersion: string;
1811
- };
1812
- } ? Database["__InternalSupabase"] : {
1813
- PostgrestVersion: "12";
1814
- } : T_6 extends {
1815
- PostgrestVersion: string;
1816
- } ? T_6 : never : never : never, Database[Schema] extends {
1817
- Tables: Record<string, {
1818
- Row: Record<string, unknown>;
1819
- Insert: Record<string, unknown>;
1820
- Update: Record<string, unknown>;
1821
- Relationships: {
1822
- foreignKeyName: string;
1823
- columns: string[];
1824
- isOneToOne?: boolean;
1825
- referencedRelation: string;
1826
- referencedColumns: string[];
1827
- }[];
1828
- }>;
1829
- Views: Record<string, {
1830
- Row: Record<string, unknown>;
1831
- Insert: Record<string, unknown>;
1832
- Update: Record<string, unknown>;
1833
- Relationships: {
1834
- foreignKeyName: string;
1835
- columns: string[];
1836
- isOneToOne?: boolean;
1837
- referencedRelation: string;
1838
- referencedColumns: string[];
1839
- }[];
1840
- } | {
1841
- Row: Record<string, unknown>;
1842
- Relationships: {
1843
- foreignKeyName: string;
1844
- columns: string[];
1845
- isOneToOne?: boolean;
1846
- referencedRelation: string;
1847
- referencedColumns: string[];
1848
- }[];
1849
- }>;
1850
- Functions: Record<string, {
1851
- Args: Record<string, unknown> | never;
1852
- Returns: unknown;
1853
- SetofOptions?: {
1854
- isSetofReturn?: boolean | undefined;
1855
- isOneToOne?: boolean | undefined;
1856
- isNotNullable?: boolean | undefined;
1857
- to: string;
1858
- from: string;
1859
- };
1860
- }>;
1861
- } ? Database[Schema] : any, (Database[Schema] extends {
1862
- Tables: Record<string, {
1863
- Row: Record<string, unknown>;
1864
- Insert: Record<string, unknown>;
1865
- Update: Record<string, unknown>;
1866
- Relationships: {
1867
- foreignKeyName: string;
1868
- columns: string[];
1869
- isOneToOne?: boolean;
1870
- referencedRelation: string;
1871
- referencedColumns: string[];
1872
- }[];
1873
- }>;
1874
- Views: Record<string, {
1875
- Row: Record<string, unknown>;
1876
- Insert: Record<string, unknown>;
1877
- Update: Record<string, unknown>;
1878
- Relationships: {
1879
- foreignKeyName: string;
1880
- columns: string[];
1881
- isOneToOne?: boolean;
1882
- referencedRelation: string;
1883
- referencedColumns: string[];
1884
- }[];
1885
- } | {
1886
- Row: Record<string, unknown>;
1887
- Relationships: {
1888
- foreignKeyName: string;
1889
- columns: string[];
1890
- isOneToOne?: boolean;
1891
- referencedRelation: string;
1892
- referencedColumns: string[];
1893
- }[];
1894
- }>;
1895
- Functions: Record<string, {
1896
- Args: Record<string, unknown> | never;
1897
- Returns: unknown;
1898
- SetofOptions?: {
1899
- isSetofReturn?: boolean | undefined;
1900
- isOneToOne?: boolean | undefined;
1901
- isNotNullable?: boolean | undefined;
1902
- to: string;
1903
- from: string;
1904
- };
1905
- }>;
1906
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], UnstableGetResult<Database[Schema] extends {
1907
- Tables: Record<string, {
1908
- Row: Record<string, unknown>;
1909
- Insert: Record<string, unknown>;
1910
- Update: Record<string, unknown>;
1911
- Relationships: {
1912
- foreignKeyName: string;
1913
- columns: string[];
1914
- isOneToOne?: boolean;
1915
- referencedRelation: string;
1916
- referencedColumns: string[];
1917
- }[];
1918
- }>;
1919
- Views: Record<string, {
1920
- Row: Record<string, unknown>;
1921
- Insert: Record<string, unknown>;
1922
- Update: Record<string, unknown>;
1923
- Relationships: {
1924
- foreignKeyName: string;
1925
- columns: string[];
1926
- isOneToOne?: boolean;
1927
- referencedRelation: string;
1928
- referencedColumns: string[];
1929
- }[];
1930
- } | {
1931
- Row: Record<string, unknown>;
1932
- Relationships: {
1933
- foreignKeyName: string;
1934
- columns: string[];
1935
- isOneToOne?: boolean;
1936
- referencedRelation: string;
1937
- referencedColumns: string[];
1938
- }[];
1939
- }>;
1940
- Functions: Record<string, {
1941
- Args: Record<string, unknown> | never;
1942
- Returns: unknown;
1943
- SetofOptions?: {
1944
- isSetofReturn?: boolean | undefined;
1945
- isOneToOne?: boolean | undefined;
1946
- isNotNullable?: boolean | undefined;
1947
- to: string;
1948
- from: string;
1949
- };
1950
- }>;
1951
- } ? Database[Schema] : any, (Database[Schema] extends {
1952
- Tables: Record<string, {
1953
- Row: Record<string, unknown>;
1954
- Insert: Record<string, unknown>;
1955
- Update: Record<string, unknown>;
1956
- Relationships: {
1957
- foreignKeyName: string;
1958
- columns: string[];
1959
- isOneToOne?: boolean;
1960
- referencedRelation: string;
1961
- referencedColumns: string[];
1962
- }[];
1963
- }>;
1964
- Views: Record<string, {
1965
- Row: Record<string, unknown>;
1966
- Insert: Record<string, unknown>;
1967
- Update: Record<string, unknown>;
1968
- Relationships: {
1969
- foreignKeyName: string;
1970
- columns: string[];
1971
- isOneToOne?: boolean;
1972
- referencedRelation: string;
1973
- referencedColumns: string[];
1974
- }[];
1975
- } | {
1976
- Row: Record<string, unknown>;
1977
- Relationships: {
1978
- foreignKeyName: string;
1979
- columns: string[];
1980
- isOneToOne?: boolean;
1981
- referencedRelation: string;
1982
- referencedColumns: string[];
1983
- }[];
1984
- }>;
1985
- Functions: Record<string, {
1986
- Args: Record<string, unknown> | never;
1987
- Returns: unknown;
1988
- SetofOptions?: {
1989
- isSetofReturn?: boolean | undefined;
1990
- isOneToOne?: boolean | undefined;
1991
- isNotNullable?: boolean | undefined;
1992
- to: string;
1993
- from: string;
1994
- };
1995
- }>;
1996
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Relation, (Database[Schema] extends {
1997
- Tables: Record<string, {
1998
- Row: Record<string, unknown>;
1999
- Insert: Record<string, unknown>;
2000
- Update: Record<string, unknown>;
2001
- Relationships: {
2002
- foreignKeyName: string;
2003
- columns: string[];
2004
- isOneToOne?: boolean;
2005
- referencedRelation: string;
2006
- referencedColumns: string[];
2007
- }[];
2008
- }>;
2009
- Views: Record<string, {
2010
- Row: Record<string, unknown>;
2011
- Insert: Record<string, unknown>;
2012
- Update: Record<string, unknown>;
2013
- Relationships: {
2014
- foreignKeyName: string;
2015
- columns: string[];
2016
- isOneToOne?: boolean;
2017
- referencedRelation: string;
2018
- referencedColumns: string[];
2019
- }[];
2020
- } | {
2021
- Row: Record<string, unknown>;
2022
- Relationships: {
2023
- foreignKeyName: string;
2024
- columns: string[];
2025
- isOneToOne?: boolean;
2026
- referencedRelation: string;
2027
- referencedColumns: string[];
2028
- }[];
2029
- }>;
2030
- Functions: Record<string, {
2031
- Args: Record<string, unknown> | never;
2032
- Returns: unknown;
2033
- SetofOptions?: {
2034
- isSetofReturn?: boolean | undefined;
2035
- isOneToOne?: boolean | undefined;
2036
- isNotNullable?: boolean | undefined;
2037
- to: string;
2038
- from: string;
2039
- };
2040
- }>;
2041
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_7 ? T_7 extends (Database[Schema] extends {
2042
- Tables: Record<string, {
2043
- Row: Record<string, unknown>;
2044
- Insert: Record<string, unknown>;
2045
- Update: Record<string, unknown>;
2046
- Relationships: {
2047
- foreignKeyName: string;
2048
- columns: string[];
2049
- isOneToOne?: boolean;
2050
- referencedRelation: string;
2051
- referencedColumns: string[];
2052
- }[];
2053
- }>;
2054
- Views: Record<string, {
2055
- Row: Record<string, unknown>;
2056
- Insert: Record<string, unknown>;
2057
- Update: Record<string, unknown>;
2058
- Relationships: {
2059
- foreignKeyName: string;
2060
- columns: string[];
2061
- isOneToOne?: boolean;
2062
- referencedRelation: string;
2063
- referencedColumns: string[];
2064
- }[];
2065
- } | {
2066
- Row: Record<string, unknown>;
2067
- Relationships: {
2068
- foreignKeyName: string;
2069
- columns: string[];
2070
- isOneToOne?: boolean;
2071
- referencedRelation: string;
2072
- referencedColumns: string[];
2073
- }[];
2074
- }>;
2075
- Functions: Record<string, {
2076
- Args: Record<string, unknown> | never;
2077
- Returns: unknown;
2078
- SetofOptions?: {
2079
- isSetofReturn?: boolean | undefined;
2080
- isOneToOne?: boolean | undefined;
2081
- isNotNullable?: boolean | undefined;
2082
- to: string;
2083
- from: string;
2084
- };
2085
- }>;
2086
- } ? Database[Schema] : any)["Tables"][Relation] ? T_7 extends {
2087
- Relationships: infer R;
2088
- } ? R : unknown : never : never, "*", ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_8 ? T_8 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_8 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
2089
- __InternalSupabase: {
2090
- PostgrestVersion: string;
2091
- };
2092
- } ? Database["__InternalSupabase"] : {
2093
- PostgrestVersion: "12";
2094
- } : T_8 extends {
2095
- PostgrestVersion: string;
2096
- } ? T_8 : never : never : never>[], Relation, (Database[Schema] extends {
2097
- Tables: Record<string, {
2098
- Row: Record<string, unknown>;
2099
- Insert: Record<string, unknown>;
2100
- Update: Record<string, unknown>;
2101
- Relationships: {
2102
- foreignKeyName: string;
2103
- columns: string[];
2104
- isOneToOne?: boolean;
2105
- referencedRelation: string;
2106
- referencedColumns: string[];
2107
- }[];
2108
- }>;
2109
- Views: Record<string, {
2110
- Row: Record<string, unknown>;
2111
- Insert: Record<string, unknown>;
2112
- Update: Record<string, unknown>;
2113
- Relationships: {
2114
- foreignKeyName: string;
2115
- columns: string[];
2116
- isOneToOne?: boolean;
2117
- referencedRelation: string;
2118
- referencedColumns: string[];
2119
- }[];
2120
- } | {
2121
- Row: Record<string, unknown>;
2122
- Relationships: {
2123
- foreignKeyName: string;
2124
- columns: string[];
2125
- isOneToOne?: boolean;
2126
- referencedRelation: string;
2127
- referencedColumns: string[];
2128
- }[];
2129
- }>;
2130
- Functions: Record<string, {
2131
- Args: Record<string, unknown> | never;
2132
- Returns: unknown;
2133
- SetofOptions?: {
2134
- isSetofReturn?: boolean | undefined;
2135
- isOneToOne?: boolean | undefined;
2136
- isNotNullable?: boolean | undefined;
2137
- to: string;
2138
- from: string;
2139
- };
2140
- }>;
2141
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_9 ? T_9 extends (Database[Schema] extends {
2142
- Tables: Record<string, {
2143
- Row: Record<string, unknown>;
2144
- Insert: Record<string, unknown>;
2145
- Update: Record<string, unknown>;
2146
- Relationships: {
2147
- foreignKeyName: string;
2148
- columns: string[];
2149
- isOneToOne?: boolean;
2150
- referencedRelation: string;
2151
- referencedColumns: string[];
2152
- }[];
2153
- }>;
2154
- Views: Record<string, {
2155
- Row: Record<string, unknown>;
2156
- Insert: Record<string, unknown>;
2157
- Update: Record<string, unknown>;
2158
- Relationships: {
2159
- foreignKeyName: string;
2160
- columns: string[];
2161
- isOneToOne?: boolean;
2162
- referencedRelation: string;
2163
- referencedColumns: string[];
2164
- }[];
2165
- } | {
2166
- Row: Record<string, unknown>;
2167
- Relationships: {
2168
- foreignKeyName: string;
2169
- columns: string[];
2170
- isOneToOne?: boolean;
2171
- referencedRelation: string;
2172
- referencedColumns: string[];
2173
- }[];
2174
- }>;
2175
- Functions: Record<string, {
2176
- Args: Record<string, unknown> | never;
2177
- Returns: unknown;
2178
- SetofOptions?: {
2179
- isSetofReturn?: boolean | undefined;
2180
- isOneToOne?: boolean | undefined;
2181
- isNotNullable?: boolean | undefined;
2182
- to: string;
2183
- from: string;
2184
- };
2185
- }>;
2186
- } ? Database[Schema] : any)["Tables"][Relation] ? T_9 extends {
2187
- Relationships: infer R;
2188
- } ? R : unknown : never : never, "GET">, "filter"> & /*elided*/ any;
2189
- collect: () => PromiseLike< PaginatedList<UnstableGetResult<Database[Schema] extends {
2190
- Tables: Record<string, {
2191
- Row: Record<string, unknown>;
2192
- Insert: Record<string, unknown>;
2193
- Update: Record<string, unknown>;
2194
- Relationships: {
2195
- foreignKeyName: string;
2196
- columns: string[];
2197
- isOneToOne?: boolean;
2198
- referencedRelation: string;
2199
- referencedColumns: string[];
2200
- }[];
2201
- }>;
2202
- Views: Record<string, {
2203
- Row: Record<string, unknown>;
2204
- Insert: Record<string, unknown>;
2205
- Update: Record<string, unknown>;
2206
- Relationships: {
2207
- foreignKeyName: string;
2208
- columns: string[];
2209
- isOneToOne?: boolean;
2210
- referencedRelation: string;
2211
- referencedColumns: string[];
2212
- }[];
2213
- } | {
2214
- Row: Record<string, unknown>;
2215
- Relationships: {
2216
- foreignKeyName: string;
2217
- columns: string[];
2218
- isOneToOne?: boolean;
2219
- referencedRelation: string;
2220
- referencedColumns: string[];
2221
- }[];
2222
- }>;
2223
- Functions: Record<string, {
2224
- Args: Record<string, unknown> | never;
2225
- Returns: unknown;
2226
- SetofOptions?: {
2227
- isSetofReturn?: boolean | undefined;
2228
- isOneToOne?: boolean | undefined;
2229
- isNotNullable?: boolean | undefined;
2230
- to: string;
2231
- from: string;
2232
- };
2233
- }>;
2234
- } ? Database[Schema] : any, (Database[Schema] extends {
2235
- Tables: Record<string, {
2236
- Row: Record<string, unknown>;
2237
- Insert: Record<string, unknown>;
2238
- Update: Record<string, unknown>;
2239
- Relationships: {
2240
- foreignKeyName: string;
2241
- columns: string[];
2242
- isOneToOne?: boolean;
2243
- referencedRelation: string;
2244
- referencedColumns: string[];
2245
- }[];
2246
- }>;
2247
- Views: Record<string, {
2248
- Row: Record<string, unknown>;
2249
- Insert: Record<string, unknown>;
2250
- Update: Record<string, unknown>;
2251
- Relationships: {
2252
- foreignKeyName: string;
2253
- columns: string[];
2254
- isOneToOne?: boolean;
2255
- referencedRelation: string;
2256
- referencedColumns: string[];
2257
- }[];
2258
- } | {
2259
- Row: Record<string, unknown>;
2260
- Relationships: {
2261
- foreignKeyName: string;
2262
- columns: string[];
2263
- isOneToOne?: boolean;
2264
- referencedRelation: string;
2265
- referencedColumns: string[];
2266
- }[];
2267
- }>;
2268
- Functions: Record<string, {
2269
- Args: Record<string, unknown> | never;
2270
- Returns: unknown;
2271
- SetofOptions?: {
2272
- isSetofReturn?: boolean | undefined;
2273
- isOneToOne?: boolean | undefined;
2274
- isNotNullable?: boolean | undefined;
2275
- to: string;
2276
- from: string;
2277
- };
2278
- }>;
2279
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], Relation, (Database[Schema] extends {
2280
- Tables: Record<string, {
2281
- Row: Record<string, unknown>;
2282
- Insert: Record<string, unknown>;
2283
- Update: Record<string, unknown>;
2284
- Relationships: {
2285
- foreignKeyName: string;
2286
- columns: string[];
2287
- isOneToOne?: boolean;
2288
- referencedRelation: string;
2289
- referencedColumns: string[];
2290
- }[];
2291
- }>;
2292
- Views: Record<string, {
2293
- Row: Record<string, unknown>;
2294
- Insert: Record<string, unknown>;
2295
- Update: Record<string, unknown>;
2296
- Relationships: {
2297
- foreignKeyName: string;
2298
- columns: string[];
2299
- isOneToOne?: boolean;
2300
- referencedRelation: string;
2301
- referencedColumns: string[];
2302
- }[];
2303
- } | {
2304
- Row: Record<string, unknown>;
2305
- Relationships: {
2306
- foreignKeyName: string;
2307
- columns: string[];
2308
- isOneToOne?: boolean;
2309
- referencedRelation: string;
2310
- referencedColumns: string[];
2311
- }[];
2312
- }>;
2313
- Functions: Record<string, {
2314
- Args: Record<string, unknown> | never;
2315
- Returns: unknown;
2316
- SetofOptions?: {
2317
- isSetofReturn?: boolean | undefined;
2318
- isOneToOne?: boolean | undefined;
2319
- isNotNullable?: boolean | undefined;
2320
- to: string;
2321
- from: string;
2322
- };
2323
- }>;
2324
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_6 ? T_6 extends (Database[Schema] extends {
2325
- Tables: Record<string, {
2326
- Row: Record<string, unknown>;
2327
- Insert: Record<string, unknown>;
2328
- Update: Record<string, unknown>;
2329
- Relationships: {
2330
- foreignKeyName: string;
2331
- columns: string[];
2332
- isOneToOne?: boolean;
2333
- referencedRelation: string;
2334
- referencedColumns: string[];
2335
- }[];
2336
- }>;
2337
- Views: Record<string, {
2338
- Row: Record<string, unknown>;
2339
- Insert: Record<string, unknown>;
2340
- Update: Record<string, unknown>;
2341
- Relationships: {
2342
- foreignKeyName: string;
2343
- columns: string[];
2344
- isOneToOne?: boolean;
2345
- referencedRelation: string;
2346
- referencedColumns: string[];
2347
- }[];
2348
- } | {
2349
- Row: Record<string, unknown>;
2350
- Relationships: {
2351
- foreignKeyName: string;
2352
- columns: string[];
2353
- isOneToOne?: boolean;
2354
- referencedRelation: string;
2355
- referencedColumns: string[];
2356
- }[];
2357
- }>;
2358
- Functions: Record<string, {
2359
- Args: Record<string, unknown> | never;
2360
- Returns: unknown;
2361
- SetofOptions?: {
2362
- isSetofReturn?: boolean | undefined;
2363
- isOneToOne?: boolean | undefined;
2364
- isNotNullable?: boolean | undefined;
2365
- to: string;
2366
- from: string;
2367
- };
2368
- }>;
2369
- } ? Database[Schema] : any)["Tables"][Relation] ? T_6 extends {
2370
- Relationships: infer R;
2371
- } ? R : unknown : never : never, "*", ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_7 ? T_7 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_7 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
2372
- __InternalSupabase: {
2373
- PostgrestVersion: string;
2374
- };
2375
- } ? Database["__InternalSupabase"] : {
2376
- PostgrestVersion: "12";
2377
- } : T_7 extends {
2378
- PostgrestVersion: string;
2379
- } ? T_7 : never : never : never>>>;
2380
- };
2381
- delete: () => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_2 ? T_2 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_2 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
2382
- __InternalSupabase: {
2383
- PostgrestVersion: string;
2384
- };
2385
- } ? Database["__InternalSupabase"] : {
2386
- PostgrestVersion: "12";
2387
- } : T_2 extends {
2388
- PostgrestVersion: string;
2389
- } ? T_2 : never : never : never, Database[Schema] extends {
2390
- Tables: Record<string, {
2391
- Row: Record<string, unknown>;
2392
- Insert: Record<string, unknown>;
2393
- Update: Record<string, unknown>;
2394
- Relationships: {
2395
- foreignKeyName: string;
2396
- columns: string[];
2397
- isOneToOne?: boolean;
2398
- referencedRelation: string;
2399
- referencedColumns: string[];
2400
- }[];
2401
- }>;
2402
- Views: Record<string, {
2403
- Row: Record<string, unknown>;
2404
- Insert: Record<string, unknown>;
2405
- Update: Record<string, unknown>;
2406
- Relationships: {
2407
- foreignKeyName: string;
2408
- columns: string[];
2409
- isOneToOne?: boolean;
2410
- referencedRelation: string;
2411
- referencedColumns: string[];
2412
- }[];
2413
- } | {
2414
- Row: Record<string, unknown>;
2415
- Relationships: {
2416
- foreignKeyName: string;
2417
- columns: string[];
2418
- isOneToOne?: boolean;
2419
- referencedRelation: string;
2420
- referencedColumns: string[];
2421
- }[];
2422
- }>;
2423
- Functions: Record<string, {
2424
- Args: Record<string, unknown> | never;
2425
- Returns: unknown;
2426
- SetofOptions?: {
2427
- isSetofReturn?: boolean | undefined;
2428
- isOneToOne?: boolean | undefined;
2429
- isNotNullable?: boolean | undefined;
2430
- to: string;
2431
- from: string;
2432
- };
2433
- }>;
2434
- } ? Database[Schema] : any, (Database[Schema] extends {
2435
- Tables: Record<string, {
2436
- Row: Record<string, unknown>;
2437
- Insert: Record<string, unknown>;
2438
- Update: Record<string, unknown>;
2439
- Relationships: {
2440
- foreignKeyName: string;
2441
- columns: string[];
2442
- isOneToOne?: boolean;
2443
- referencedRelation: string;
2444
- referencedColumns: string[];
2445
- }[];
2446
- }>;
2447
- Views: Record<string, {
2448
- Row: Record<string, unknown>;
2449
- Insert: Record<string, unknown>;
2450
- Update: Record<string, unknown>;
2451
- Relationships: {
2452
- foreignKeyName: string;
2453
- columns: string[];
2454
- isOneToOne?: boolean;
2455
- referencedRelation: string;
2456
- referencedColumns: string[];
2457
- }[];
2458
- } | {
2459
- Row: Record<string, unknown>;
2460
- Relationships: {
2461
- foreignKeyName: string;
2462
- columns: string[];
2463
- isOneToOne?: boolean;
2464
- referencedRelation: string;
2465
- referencedColumns: string[];
2466
- }[];
2467
- }>;
2468
- Functions: Record<string, {
2469
- Args: Record<string, unknown> | never;
2470
- Returns: unknown;
2471
- SetofOptions?: {
2472
- isSetofReturn?: boolean | undefined;
2473
- isOneToOne?: boolean | undefined;
2474
- isNotNullable?: boolean | undefined;
2475
- to: string;
2476
- from: string;
2477
- };
2478
- }>;
2479
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], null, Relation, (Database[Schema] extends {
2480
- Tables: Record<string, {
2481
- Row: Record<string, unknown>;
2482
- Insert: Record<string, unknown>;
2483
- Update: Record<string, unknown>;
2484
- Relationships: {
2485
- foreignKeyName: string;
2486
- columns: string[];
2487
- isOneToOne?: boolean;
2488
- referencedRelation: string;
2489
- referencedColumns: string[];
2490
- }[];
2491
- }>;
2492
- Views: Record<string, {
2493
- Row: Record<string, unknown>;
2494
- Insert: Record<string, unknown>;
2495
- Update: Record<string, unknown>;
2496
- Relationships: {
2497
- foreignKeyName: string;
2498
- columns: string[];
2499
- isOneToOne?: boolean;
2500
- referencedRelation: string;
2501
- referencedColumns: string[];
2502
- }[];
2503
- } | {
2504
- Row: Record<string, unknown>;
2505
- Relationships: {
2506
- foreignKeyName: string;
2507
- columns: string[];
2508
- isOneToOne?: boolean;
2509
- referencedRelation: string;
2510
- referencedColumns: string[];
2511
- }[];
2512
- }>;
2513
- Functions: Record<string, {
2514
- Args: Record<string, unknown> | never;
2515
- Returns: unknown;
2516
- SetofOptions?: {
2517
- isSetofReturn?: boolean | undefined;
2518
- isOneToOne?: boolean | undefined;
2519
- isNotNullable?: boolean | undefined;
2520
- to: string;
2521
- from: string;
2522
- };
2523
- }>;
2524
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_3 ? T_3 extends (Database[Schema] extends {
2525
- Tables: Record<string, {
2526
- Row: Record<string, unknown>;
2527
- Insert: Record<string, unknown>;
2528
- Update: Record<string, unknown>;
2529
- Relationships: {
2530
- foreignKeyName: string;
2531
- columns: string[];
2532
- isOneToOne?: boolean;
2533
- referencedRelation: string;
2534
- referencedColumns: string[];
2535
- }[];
2536
- }>;
2537
- Views: Record<string, {
2538
- Row: Record<string, unknown>;
2539
- Insert: Record<string, unknown>;
2540
- Update: Record<string, unknown>;
2541
- Relationships: {
2542
- foreignKeyName: string;
2543
- columns: string[];
2544
- isOneToOne?: boolean;
2545
- referencedRelation: string;
2546
- referencedColumns: string[];
2547
- }[];
2548
- } | {
2549
- Row: Record<string, unknown>;
2550
- Relationships: {
2551
- foreignKeyName: string;
2552
- columns: string[];
2553
- isOneToOne?: boolean;
2554
- referencedRelation: string;
2555
- referencedColumns: string[];
2556
- }[];
2557
- }>;
2558
- Functions: Record<string, {
2559
- Args: Record<string, unknown> | never;
2560
- Returns: unknown;
2561
- SetofOptions?: {
2562
- isSetofReturn?: boolean | undefined;
2563
- isOneToOne?: boolean | undefined;
2564
- isNotNullable?: boolean | undefined;
2565
- to: string;
2566
- from: string;
2567
- };
2568
- }>;
2569
- } ? Database[Schema] : any)["Tables"][Relation] ? T_3 extends {
2570
- Relationships: infer R;
2571
- } ? R : unknown : never : never, "DELETE">, "filter"> & {
2572
- filter: <K extends string = string>(node: FilterNode<K>) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_4 ? T_4 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_4 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
2573
- __InternalSupabase: {
2574
- PostgrestVersion: string;
2575
- };
2576
- } ? Database["__InternalSupabase"] : {
2577
- PostgrestVersion: "12";
2578
- } : T_4 extends {
2579
- PostgrestVersion: string;
2580
- } ? T_4 : never : never : never, Database[Schema] extends {
2581
- Tables: Record<string, {
2582
- Row: Record<string, unknown>;
2583
- Insert: Record<string, unknown>;
2584
- Update: Record<string, unknown>;
2585
- Relationships: {
2586
- foreignKeyName: string;
2587
- columns: string[];
2588
- isOneToOne?: boolean;
2589
- referencedRelation: string;
2590
- referencedColumns: string[];
2591
- }[];
2592
- }>;
2593
- Views: Record<string, {
2594
- Row: Record<string, unknown>;
2595
- Insert: Record<string, unknown>;
2596
- Update: Record<string, unknown>;
2597
- Relationships: {
2598
- foreignKeyName: string;
2599
- columns: string[];
2600
- isOneToOne?: boolean;
2601
- referencedRelation: string;
2602
- referencedColumns: string[];
2603
- }[];
2604
- } | {
2605
- Row: Record<string, unknown>;
2606
- Relationships: {
2607
- foreignKeyName: string;
2608
- columns: string[];
2609
- isOneToOne?: boolean;
2610
- referencedRelation: string;
2611
- referencedColumns: string[];
2612
- }[];
2613
- }>;
2614
- Functions: Record<string, {
2615
- Args: Record<string, unknown> | never;
2616
- Returns: unknown;
2617
- SetofOptions?: {
2618
- isSetofReturn?: boolean | undefined;
2619
- isOneToOne?: boolean | undefined;
2620
- isNotNullable?: boolean | undefined;
2621
- to: string;
2622
- from: string;
2623
- };
2624
- }>;
2625
- } ? Database[Schema] : any, (Database[Schema] extends {
2626
- Tables: Record<string, {
2627
- Row: Record<string, unknown>;
2628
- Insert: Record<string, unknown>;
2629
- Update: Record<string, unknown>;
2630
- Relationships: {
2631
- foreignKeyName: string;
2632
- columns: string[];
2633
- isOneToOne?: boolean;
2634
- referencedRelation: string;
2635
- referencedColumns: string[];
2636
- }[];
2637
- }>;
2638
- Views: Record<string, {
2639
- Row: Record<string, unknown>;
2640
- Insert: Record<string, unknown>;
2641
- Update: Record<string, unknown>;
2642
- Relationships: {
2643
- foreignKeyName: string;
2644
- columns: string[];
2645
- isOneToOne?: boolean;
2646
- referencedRelation: string;
2647
- referencedColumns: string[];
2648
- }[];
2649
- } | {
2650
- Row: Record<string, unknown>;
2651
- Relationships: {
2652
- foreignKeyName: string;
2653
- columns: string[];
2654
- isOneToOne?: boolean;
2655
- referencedRelation: string;
2656
- referencedColumns: string[];
2657
- }[];
2658
- }>;
2659
- Functions: Record<string, {
2660
- Args: Record<string, unknown> | never;
2661
- Returns: unknown;
2662
- SetofOptions?: {
2663
- isSetofReturn?: boolean | undefined;
2664
- isOneToOne?: boolean | undefined;
2665
- isNotNullable?: boolean | undefined;
2666
- to: string;
2667
- from: string;
2668
- };
2669
- }>;
2670
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], null, Relation, (Database[Schema] extends {
2671
- Tables: Record<string, {
2672
- Row: Record<string, unknown>;
2673
- Insert: Record<string, unknown>;
2674
- Update: Record<string, unknown>;
2675
- Relationships: {
2676
- foreignKeyName: string;
2677
- columns: string[];
2678
- isOneToOne?: boolean;
2679
- referencedRelation: string;
2680
- referencedColumns: string[];
2681
- }[];
2682
- }>;
2683
- Views: Record<string, {
2684
- Row: Record<string, unknown>;
2685
- Insert: Record<string, unknown>;
2686
- Update: Record<string, unknown>;
2687
- Relationships: {
2688
- foreignKeyName: string;
2689
- columns: string[];
2690
- isOneToOne?: boolean;
2691
- referencedRelation: string;
2692
- referencedColumns: string[];
2693
- }[];
2694
- } | {
2695
- Row: Record<string, unknown>;
2696
- Relationships: {
2697
- foreignKeyName: string;
2698
- columns: string[];
2699
- isOneToOne?: boolean;
2700
- referencedRelation: string;
2701
- referencedColumns: string[];
2702
- }[];
2703
- }>;
2704
- Functions: Record<string, {
2705
- Args: Record<string, unknown> | never;
2706
- Returns: unknown;
2707
- SetofOptions?: {
2708
- isSetofReturn?: boolean | undefined;
2709
- isOneToOne?: boolean | undefined;
2710
- isNotNullable?: boolean | undefined;
2711
- to: string;
2712
- from: string;
2713
- };
2714
- }>;
2715
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_5 ? T_5 extends (Database[Schema] extends {
2716
- Tables: Record<string, {
2717
- Row: Record<string, unknown>;
2718
- Insert: Record<string, unknown>;
2719
- Update: Record<string, unknown>;
2720
- Relationships: {
2721
- foreignKeyName: string;
2722
- columns: string[];
2723
- isOneToOne?: boolean;
2724
- referencedRelation: string;
2725
- referencedColumns: string[];
2726
- }[];
2727
- }>;
2728
- Views: Record<string, {
2729
- Row: Record<string, unknown>;
2730
- Insert: Record<string, unknown>;
2731
- Update: Record<string, unknown>;
2732
- Relationships: {
2733
- foreignKeyName: string;
2734
- columns: string[];
2735
- isOneToOne?: boolean;
2736
- referencedRelation: string;
2737
- referencedColumns: string[];
2738
- }[];
2739
- } | {
2740
- Row: Record<string, unknown>;
2741
- Relationships: {
2742
- foreignKeyName: string;
2743
- columns: string[];
2744
- isOneToOne?: boolean;
2745
- referencedRelation: string;
2746
- referencedColumns: string[];
2747
- }[];
2748
- }>;
2749
- Functions: Record<string, {
2750
- Args: Record<string, unknown> | never;
2751
- Returns: unknown;
2752
- SetofOptions?: {
2753
- isSetofReturn?: boolean | undefined;
2754
- isOneToOne?: boolean | undefined;
2755
- isNotNullable?: boolean | undefined;
2756
- to: string;
2757
- from: string;
2758
- };
2759
- }>;
2760
- } ? Database[Schema] : any)["Tables"][Relation] ? T_5 extends {
2761
- Relationships: infer R;
2762
- } ? R : unknown : never : never, "DELETE">, "filter"> & /*elided*/ any;
2763
- paginate: (page: number, limit: number, count?: number) => OmitFrom< PostgrestFilterBuilder<("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) extends infer T_4 ? T_4 extends ("public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<keyof Database, "__InternalSupabase">) ? T_4 extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
2764
- __InternalSupabase: {
2765
- PostgrestVersion: string;
2766
- };
2767
- } ? Database["__InternalSupabase"] : {
2768
- PostgrestVersion: "12";
2769
- } : T_4 extends {
2770
- PostgrestVersion: string;
2771
- } ? T_4 : never : never : never, Database[Schema] extends {
2772
- Tables: Record<string, {
2773
- Row: Record<string, unknown>;
2774
- Insert: Record<string, unknown>;
2775
- Update: Record<string, unknown>;
2776
- Relationships: {
2777
- foreignKeyName: string;
2778
- columns: string[];
2779
- isOneToOne?: boolean;
2780
- referencedRelation: string;
2781
- referencedColumns: string[];
2782
- }[];
2783
- }>;
2784
- Views: Record<string, {
2785
- Row: Record<string, unknown>;
2786
- Insert: Record<string, unknown>;
2787
- Update: Record<string, unknown>;
2788
- Relationships: {
2789
- foreignKeyName: string;
2790
- columns: string[];
2791
- isOneToOne?: boolean;
2792
- referencedRelation: string;
2793
- referencedColumns: string[];
2794
- }[];
2795
- } | {
2796
- Row: Record<string, unknown>;
2797
- Relationships: {
2798
- foreignKeyName: string;
2799
- columns: string[];
2800
- isOneToOne?: boolean;
2801
- referencedRelation: string;
2802
- referencedColumns: string[];
2803
- }[];
2804
- }>;
2805
- Functions: Record<string, {
2806
- Args: Record<string, unknown> | never;
2807
- Returns: unknown;
2808
- SetofOptions?: {
2809
- isSetofReturn?: boolean | undefined;
2810
- isOneToOne?: boolean | undefined;
2811
- isNotNullable?: boolean | undefined;
2812
- to: string;
2813
- from: string;
2814
- };
2815
- }>;
2816
- } ? Database[Schema] : any, (Database[Schema] extends {
2817
- Tables: Record<string, {
2818
- Row: Record<string, unknown>;
2819
- Insert: Record<string, unknown>;
2820
- Update: Record<string, unknown>;
2821
- Relationships: {
2822
- foreignKeyName: string;
2823
- columns: string[];
2824
- isOneToOne?: boolean;
2825
- referencedRelation: string;
2826
- referencedColumns: string[];
2827
- }[];
2828
- }>;
2829
- Views: Record<string, {
2830
- Row: Record<string, unknown>;
2831
- Insert: Record<string, unknown>;
2832
- Update: Record<string, unknown>;
2833
- Relationships: {
2834
- foreignKeyName: string;
2835
- columns: string[];
2836
- isOneToOne?: boolean;
2837
- referencedRelation: string;
2838
- referencedColumns: string[];
2839
- }[];
2840
- } | {
2841
- Row: Record<string, unknown>;
2842
- Relationships: {
2843
- foreignKeyName: string;
2844
- columns: string[];
2845
- isOneToOne?: boolean;
2846
- referencedRelation: string;
2847
- referencedColumns: string[];
2848
- }[];
2849
- }>;
2850
- Functions: Record<string, {
2851
- Args: Record<string, unknown> | never;
2852
- Returns: unknown;
2853
- SetofOptions?: {
2854
- isSetofReturn?: boolean | undefined;
2855
- isOneToOne?: boolean | undefined;
2856
- isNotNullable?: boolean | undefined;
2857
- to: string;
2858
- from: string;
2859
- };
2860
- }>;
2861
- } ? Database[Schema] : any)["Tables"][Relation]["Row"], null, Relation, (Database[Schema] extends {
2862
- Tables: Record<string, {
2863
- Row: Record<string, unknown>;
2864
- Insert: Record<string, unknown>;
2865
- Update: Record<string, unknown>;
2866
- Relationships: {
2867
- foreignKeyName: string;
2868
- columns: string[];
2869
- isOneToOne?: boolean;
2870
- referencedRelation: string;
2871
- referencedColumns: string[];
2872
- }[];
2873
- }>;
2874
- Views: Record<string, {
2875
- Row: Record<string, unknown>;
2876
- Insert: Record<string, unknown>;
2877
- Update: Record<string, unknown>;
2878
- Relationships: {
2879
- foreignKeyName: string;
2880
- columns: string[];
2881
- isOneToOne?: boolean;
2882
- referencedRelation: string;
2883
- referencedColumns: string[];
2884
- }[];
2885
- } | {
2886
- Row: Record<string, unknown>;
2887
- Relationships: {
2888
- foreignKeyName: string;
2889
- columns: string[];
2890
- isOneToOne?: boolean;
2891
- referencedRelation: string;
2892
- referencedColumns: string[];
2893
- }[];
2894
- }>;
2895
- Functions: Record<string, {
2896
- Args: Record<string, unknown> | never;
2897
- Returns: unknown;
2898
- SetofOptions?: {
2899
- isSetofReturn?: boolean | undefined;
2900
- isOneToOne?: boolean | undefined;
2901
- isNotNullable?: boolean | undefined;
2902
- to: string;
2903
- from: string;
2904
- };
2905
- }>;
2906
- } ? Database[Schema] : any)["Tables"][Relation] extends infer T_5 ? T_5 extends (Database[Schema] extends {
2907
- Tables: Record<string, {
2908
- Row: Record<string, unknown>;
2909
- Insert: Record<string, unknown>;
2910
- Update: Record<string, unknown>;
2911
- Relationships: {
2912
- foreignKeyName: string;
2913
- columns: string[];
2914
- isOneToOne?: boolean;
2915
- referencedRelation: string;
2916
- referencedColumns: string[];
2917
- }[];
2918
- }>;
2919
- Views: Record<string, {
2920
- Row: Record<string, unknown>;
2921
- Insert: Record<string, unknown>;
2922
- Update: Record<string, unknown>;
2923
- Relationships: {
2924
- foreignKeyName: string;
2925
- columns: string[];
2926
- isOneToOne?: boolean;
2927
- referencedRelation: string;
2928
- referencedColumns: string[];
2929
- }[];
2930
- } | {
2931
- Row: Record<string, unknown>;
2932
- Relationships: {
2933
- foreignKeyName: string;
2934
- columns: string[];
2935
- isOneToOne?: boolean;
2936
- referencedRelation: string;
2937
- referencedColumns: string[];
2938
- }[];
2939
- }>;
2940
- Functions: Record<string, {
2941
- Args: Record<string, unknown> | never;
2942
- Returns: unknown;
2943
- SetofOptions?: {
2944
- isSetofReturn?: boolean | undefined;
2945
- isOneToOne?: boolean | undefined;
2946
- isNotNullable?: boolean | undefined;
2947
- to: string;
2948
- from: string;
2949
- };
2950
- }>;
2951
- } ? Database[Schema] : any)["Tables"][Relation] ? T_5 extends {
2952
- Relationships: infer R;
2953
- } ? R : unknown : never : never, "DELETE">, "filter"> & /*elided*/ any;
2954
- collect: () => PromiseLike< PaginatedList<null>>;
2955
- };
2956
- };
80
+ get query(): PostgrestQueryBuilder<Database, ClientOptions, SchemaName, RelationType, RelationName>;
2957
81
  /**
2958
82
  * Performs a fuzzy search on the specified column of the relation.
2959
83
  * @returns The rows that match the search criteria in descending order of similarity.
2960
84
  * @throws DatabaseApiError if the query fails.
2961
85
  */
2962
- fuzzySearch({ column, searchTerm, minSimilarity, limit, }: FuzzySearchParams<Database, Schema, Type, Relation>): Promise<Row<Database, Schema, Type, Relation>[]>;
86
+ fuzzySearch({ column, searchTerm, minSimilarity, limit, }: FuzzySearchParams<Database, SchemaName, RelationType, RelationName>): Promise<Row<Database, SchemaName, RelationType, RelationName>[]>;
2963
87
  /**
2964
88
  * List all rows in the relation.
2965
89
  * Equivalent to `select('*')` with no filters or pagination.
2966
90
  * @returns Array of rows in the relation.
2967
91
  */
2968
- list(): Promise<Row<Database, Schema, Type, Relation>[]>;
92
+ list(): Promise<Row<Database, SchemaName, RelationType, RelationName>[]>;
2969
93
  /**
2970
94
  * Gets a single row by its ID.
2971
95
  * @param id The ID of the row to find.
@@ -2973,7 +97,7 @@ export declare class DataService<Database extends CoreDatabase, Schema extends S
2973
97
  * @returns The found row or `undefined` if no row with the specified ID exists.
2974
98
  * @throws DatabaseApiError if the query fails.
2975
99
  */
2976
- get<Columns extends SelectColumns<Row<Database, Schema, Type, Relation>>>(id: ID<Database, Schema, Type, Relation>, columns?: Columns): Promise<Select<Row<Database, Schema, Type, Relation>, Columns> | undefined>;
100
+ get<Query extends SelectQuery<Database, SchemaName, RelationType, RelationName> = '*'>(id: ID<Database, SchemaName, RelationType, RelationName>, columns?: Query): Promise<SelectResult<Database, SchemaName, RelationType, RelationName, Query> | undefined>;
2977
101
  /**
2978
102
  * Gets a single row by its ID, throwing an error if no such row exists.
2979
103
  * @param id The ID of the row to find.
@@ -2982,14 +106,14 @@ export declare class DataService<Database extends CoreDatabase, Schema extends S
2982
106
  * @throws RecordNotFoundError if no row with the specified ID exists.
2983
107
  * @throws DatabaseApiError if the query fails for any other reason.
2984
108
  */
2985
- getOrThrow<Columns extends SelectColumns<Row<Database, Schema, Type, Relation>>>(id: ID<Database, Schema, Type, Relation>, columns?: Columns): Promise<Select<Row<Database, Schema, Type, Relation>, Columns>>;
109
+ getOrThrow<Query extends SelectQuery<Database, SchemaName, RelationType, RelationName> = '*'>(id: ID<Database, SchemaName, RelationType, RelationName>, columns?: Query): Promise<SelectResult<Database, SchemaName, RelationType, RelationName, Query>>;
2986
110
  /**
2987
111
  * Deletes a row from the relation by its ID, i.e. by the `id` column.
2988
112
  * @param id The ID of the row to delete.
2989
113
  * @return The deleted row, or `undefined` if no row with the specified ID existed.
2990
114
  * @throws DatabaseApiError if the deletion fails.
2991
115
  */
2992
- delete(id: ID<Database, Schema, Type, Relation>): Promise<Row<Database, Schema, Type, Relation> | undefined>;
116
+ delete(id: ID<Database, SchemaName, RelationType, RelationName>): Promise<Row<Database, SchemaName, RelationType, RelationName> | undefined>;
2993
117
  /**
2994
118
  * Deletes a row from the relation by its ID, throwing an error if no such row exists.
2995
119
  * @param id The ID of the row to delete.
@@ -2997,21 +121,21 @@ export declare class DataService<Database extends CoreDatabase, Schema extends S
2997
121
  * @throws RecordNotFoundError if no row with the specified ID exists.
2998
122
  * @throws DatabaseApiError if the deletion fails for any other reason.
2999
123
  */
3000
- deleteOrThrow(id: ID<Database, Schema, Type, Relation>): Promise<Row<Database, Schema, Type, Relation>>;
124
+ deleteOrThrow(id: ID<Database, SchemaName, RelationType, RelationName>): Promise<Row<Database, SchemaName, RelationType, RelationName>>;
3001
125
  /**
3002
126
  * Inserts a new row into the relation.
3003
127
  * @param insert The data to insert into the relation.
3004
128
  * @returns The inserted row.
3005
129
  * @throws DatabaseApiError if the insertion fails.
3006
130
  */
3007
- insert(insert: Insert<Database, Schema, Type, Relation>): Promise<Row<Database, Schema, Type, Relation>>;
131
+ insert(insert: Insert<Database, SchemaName, RelationType, RelationName>): Promise<Row<Database, SchemaName, RelationType, RelationName>>;
3008
132
  /**
3009
133
  * Inserts or updates a row in the relation.
3010
134
  * @param insert The data to insert or update in the relation.
3011
135
  * @returns The inserted or updated row.
3012
136
  * @throws DatabaseApiError if the upsert operation fails.
3013
137
  */
3014
- upsert(insert: Insert<Database, Schema, Type, Relation>, { onConflict, ...options }?: UpsertOptions<Database, Schema, Type, Relation>): Promise<Row<Database, Schema, Type, Relation>>;
138
+ upsert(insert: Insert<Database, SchemaName, RelationType, RelationName>, { onConflict, ...options }?: UpsertOptions<Database, SchemaName, RelationType, RelationName>): Promise<Row<Database, SchemaName, RelationType, RelationName>>;
3015
139
  /**
3016
140
  * Updates an existing row in the relation by its ID.
3017
141
  *
@@ -3020,24 +144,20 @@ export declare class DataService<Database extends CoreDatabase, Schema extends S
3020
144
  * @returns The updated row.
3021
145
  * @throws DatabaseApiError if the update fails.
3022
146
  */
3023
- update(id: ID<Database, Schema, Type, Relation>, update: Update<Database, Schema, Type, Relation>): Promise<Row<Database, Schema, Type, Relation>>;
147
+ update(id: ID<Database, SchemaName, RelationType, RelationName>, update: Update<Database, SchemaName, RelationType, RelationName>): Promise<Row<Database, SchemaName, RelationType, RelationName>>;
3024
148
  }
3025
- export type TDatabase<Service> = Service extends DataService<infer D> ? D : never;
3026
- export type TSchema<Service> = Service extends DataService<any, infer S> ? S : never;
3027
- export type TRelation<Service> = Service extends DataService<any, any, infer R> ? R : never;
3028
- export type TColumn<Service> = Service extends DataService<infer D, infer S, infer R, infer T> ? ColumnName<D, S, R, T> : never;
3029
- export type TRow<Service> = Service extends DataService<infer D, infer S, infer R, infer T> ? Row<D, S, R, T> : never;
3030
- export interface TableDataServiceParams<Database extends CoreDatabase, Schema extends SchemaName<Database>, Table extends TableName<Database, Schema>> extends OmitFrom<DataServiceParams<Database, Schema>, 'relation'> {
149
+ export interface TableDataServiceParams<Database extends GenericDatabase<SchemaName> & CoreDatabase, ClientOptions extends Required<ClientServerOptions>, SchemaName extends BaseSchemaName<Database>, TableName extends BaseTableName<Database, SchemaName>> extends OmitFrom<DataServiceParams<Database, ClientOptions, SchemaName>, 'relation'> {
3031
150
  /**
3032
151
  * The name of the table that this service interacts with.
3033
152
  */
3034
- table: Table;
153
+ table: TableName;
3035
154
  }
3036
155
  /**
3037
156
  * A service for interacting with a specific table in a database.
3038
157
  * Provides methods for select, insert, delete, and other table operations.
3039
158
  *
3040
159
  * @template Database The database type.
160
+ * @template ClientOptions The options type for the PostgREST client, including the PostgREST version.
3041
161
  * @template SchemaName The name of the schema containing the table.
3042
162
  * @template TableName The name of the table.
3043
163
  * @example
@@ -3047,14 +167,14 @@ export interface TableDataServiceParams<Database extends CoreDatabase, Schema ex
3047
167
  * await table.insert({ id: 'new-id', name: 'New Record' });
3048
168
  * await table.delete('some-id');
3049
169
  */
3050
- export declare class TableDataService<Database extends CoreDatabase, Schema extends SchemaName<Database> = SchemaName<Database>, Table extends TableName<Database, Schema> = TableName<Database, Schema>> extends DataService<Database, Schema, 'Tables', Table> {
3051
- constructor({ database, schema, table, }: TableDataServiceParams<Database, Schema, Table>);
170
+ export declare class TableDataService<Database extends GenericDatabase<BaseSchemaName<Database>> & CoreDatabase, ClientOptions extends Required<ClientServerOptions>, SchemaName extends BaseSchemaName<Database>, TableName extends BaseTableName<Database, SchemaName>> extends DataService<Database, ClientOptions, SchemaName, 'Tables', TableName> {
171
+ constructor({ database, schema, table, }: TableDataServiceParams<Database, ClientOptions, SchemaName, TableName>);
3052
172
  }
3053
- export interface ViewDataServiceParams<Database extends CoreDatabase, Schema extends SchemaName<Database>, View extends ViewName<Database, Schema> = ViewName<Database, Schema>> extends OmitFrom<DataServiceParams<Database, Schema>, 'relation'> {
173
+ export interface ViewDataServiceParams<Database extends GenericDatabase<BaseSchemaName<Database>> & CoreDatabase, ClientOptions extends Required<ClientServerOptions>, SchemaName extends BaseSchemaName<Database>, ViewName extends BaseViewName<Database, SchemaName>> extends OmitFrom<DataServiceParams<Database, ClientOptions, SchemaName>, 'relation'> {
3054
174
  /**
3055
175
  * The name of the view that this service interacts with.
3056
176
  */
3057
- view: View;
177
+ view: ViewName;
3058
178
  }
3059
179
  /**
3060
180
  * A service for interacting with a specific view in a database.
@@ -3062,15 +182,16 @@ export interface ViewDataServiceParams<Database extends CoreDatabase, Schema ext
3062
182
  * Note mutations require an updatable view.
3063
183
  *
3064
184
  * @template Database The database type.
3065
- * @template Schema The name of the schema containing the view.
3066
- * @template View The name of the view.
185
+ * @template ClientOptions The options type for the PostgREST client, including the PostgREST version.
186
+ * @template SchemaName The name of the schema containing the view.
187
+ * @template ViewName The name of the view.
3067
188
  * @example
3068
189
  * const view = new ViewDataService({database, schema: 'public', view: 'my_view'});
3069
190
  * const records = await view.list();
3070
191
  * const record = await view.find('some-id');
3071
192
  */
3072
- export declare class ViewDataService<Database extends CoreDatabase, Schema extends SchemaName<Database> = SchemaName<Database>, View extends ViewName<Database, Schema> = ViewName<Database, Schema>> extends DataService<Database, Schema, 'Views', View> {
3073
- constructor({ database, schema, view, }: ViewDataServiceParams<Database, Schema, View>);
193
+ export declare class ViewDataService<Database extends GenericDatabase<BaseSchemaName<Database>> & CoreDatabase, ClientOptions extends Required<ClientServerOptions>, SchemaName extends BaseSchemaName<Database>, ViewName extends BaseViewName<Database, SchemaName>> extends DataService<Database, ClientOptions, SchemaName, 'Views', ViewName> {
194
+ constructor({ database, schema, view, }: ViewDataServiceParams<Database, ClientOptions, SchemaName, ViewName>);
3074
195
  }
3075
196
  /**
3076
197
  * Asserts that a PostgREST response contains a count, that is the request was successful