@m1212e/rumble 0.23.24 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/out/client/generate.d.cts +1 -12
- package/out/client/generate.d.cts.map +1 -1
- package/out/client/generate.d.mts +1 -12
- package/out/client/generate.d.mts.map +1 -1
- package/out/client.cjs +26 -2
- package/out/client.cjs.map +1 -1
- package/out/client.d.cts +17 -38
- package/out/client.d.cts.map +1 -1
- package/out/client.d.mts +17 -38
- package/out/client.d.mts.map +1 -1
- package/out/client.mjs +28 -4
- package/out/client.mjs.map +1 -1
- package/out/generate-CM3XjmlO.cjs.map +1 -1
- package/out/index.cjs +78 -53
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts +233 -244
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts +234 -244
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +77 -52
- package/out/index.mjs.map +1 -1
- package/package.json +32 -32
package/out/index.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ import { SQLiteAsyncDatabase } from "drizzle-orm/sqlite-core";
|
|
|
6
6
|
import { IncomingMessage, RequestListener, ServerResponse } from "node:http";
|
|
7
7
|
import { Http2ServerRequest, Http2ServerResponse } from "node:http2";
|
|
8
8
|
import { Socket } from "node:net";
|
|
9
|
+
import "@whatwg-node/fetch";
|
|
9
10
|
import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
|
|
10
11
|
import { useSofa } from "@m1212e/sofa-api";
|
|
11
12
|
import { ServerOptions } from "graphql-ws";
|
|
@@ -13,7 +14,7 @@ import { YogaServerOptions, createPubSub } from "graphql-yoga";
|
|
|
13
14
|
import { Tracer } from "@opentelemetry/api";
|
|
14
15
|
import SchemaBuilder from "@pothos/core";
|
|
15
16
|
import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
|
|
16
|
-
|
|
17
|
+
//#endregion
|
|
17
18
|
//#region lib/helpers/asserts.d.ts
|
|
18
19
|
/**
|
|
19
20
|
*
|
|
@@ -34,7 +35,7 @@ import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
|
|
|
34
35
|
db.query.users
|
|
35
36
|
.findFirst({
|
|
36
37
|
...query,
|
|
37
|
-
where: ctx.abilities.users.filter("read").single.where,
|
|
38
|
+
where: (await ctx.abilities.users.filter("read")).single.where,
|
|
38
39
|
})
|
|
39
40
|
// note that we need to manually raise an error if the value is not found
|
|
40
41
|
.then(assertFindFirstExists)
|
|
@@ -45,7 +46,7 @@ import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
|
|
|
45
46
|
});
|
|
46
47
|
* ```
|
|
47
48
|
*/
|
|
48
|
-
declare const assertFindFirstExists: <T>(value: T | undefined) => T;
|
|
49
|
+
export declare const assertFindFirstExists: <T>(value: T | undefined) => T;
|
|
49
50
|
/**
|
|
50
51
|
*
|
|
51
52
|
* Helper function to map a drizzle findFirst query result,
|
|
@@ -73,7 +74,7 @@ declare const assertFindFirstExists: <T>(value: T | undefined) => T;
|
|
|
73
74
|
.where(
|
|
74
75
|
and(
|
|
75
76
|
eq(schema.users.id, args.userId),
|
|
76
|
-
ctx.abilities.users.filter("update").single.where
|
|
77
|
+
(await ctx.abilities.users.filter("update")).single.where
|
|
77
78
|
)
|
|
78
79
|
)
|
|
79
80
|
.returning({ id: schema.users.id, name: schema.users.name })
|
|
@@ -85,7 +86,7 @@ declare const assertFindFirstExists: <T>(value: T | undefined) => T;
|
|
|
85
86
|
});
|
|
86
87
|
* ```
|
|
87
88
|
*/
|
|
88
|
-
declare const assertFirstEntryExists: <T>(value: T[]) => T;
|
|
89
|
+
export declare const assertFirstEntryExists: <T>(value: T[]) => T;
|
|
89
90
|
//#endregion
|
|
90
91
|
//#region lib/helpers/mapNullFieldsToUndefined.d.ts
|
|
91
92
|
/**
|
|
@@ -132,7 +133,7 @@ declare const assertFirstEntryExists: <T>(value: T[]) => T;
|
|
|
132
133
|
return db.query.user
|
|
133
134
|
.findFirst(
|
|
134
135
|
query(
|
|
135
|
-
ctx.abilities.user.filter('read').merge(
|
|
136
|
+
(await ctx.abilities.user.filter('read')).merge(
|
|
136
137
|
{
|
|
137
138
|
where: { id: user.id },
|
|
138
139
|
}
|
|
@@ -146,7 +147,7 @@ declare const assertFirstEntryExists: <T>(value: T[]) => T;
|
|
|
146
147
|
*
|
|
147
148
|
* ```
|
|
148
149
|
*/
|
|
149
|
-
declare function mapNullFieldsToUndefined<T extends object>(obj: T): { [K in keyof T]: T[K] extends null ? undefined : Exclude<T[K], null
|
|
150
|
+
export declare function mapNullFieldsToUndefined<T extends object>(obj: T): { [K in keyof T]: T[K] extends null ? undefined : Exclude<T[K], null>; };
|
|
150
151
|
//#endregion
|
|
151
152
|
//#region lib/types/drizzleInstanceType.d.ts
|
|
152
153
|
type DrizzleInstance = PgAsyncDatabase<any, any> | SQLiteAsyncDatabase<any, any, any> | MySqlAsyncDatabase<any, any>;
|
|
@@ -159,7 +160,7 @@ type DrizzleQueryFunction<DB extends DrizzleInstance> = DB["query"];
|
|
|
159
160
|
*/
|
|
160
161
|
type TableRelationNames<DB extends DrizzleInstance> = { [K in keyof DB["_"]["relations"]]: DB["_"]["relations"][K] extends {
|
|
161
162
|
table: infer TTable;
|
|
162
|
-
} ? TTable extends Table<any> ? K : never : never }[keyof DB["_"]["relations"]] & keyof DrizzleQueryFunction<DB>;
|
|
163
|
+
} ? TTable extends Table<any> ? K : never : never; }[keyof DB["_"]["relations"]] & keyof DrizzleQueryFunction<DB>;
|
|
163
164
|
/**
|
|
164
165
|
* Type representing the input parameters for the `findMany` method of a specific table in the Drizzle query function.
|
|
165
166
|
*/
|
|
@@ -190,10 +191,15 @@ type FilterPrefetchCombo<Context, FilteredEntityType, PrefetchReturnType = never
|
|
|
190
191
|
* `PostalAddress`.
|
|
191
192
|
*/
|
|
192
193
|
type AddressShape = {
|
|
193
|
-
/** The street address, which may be multiple lines separated by newlines. */
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
/** The street address, which may be multiple lines separated by newlines. */
|
|
195
|
+
streetAddress?: string | null;
|
|
196
|
+
/** City or town. */
|
|
197
|
+
locality?: string | null;
|
|
198
|
+
/** State, province, prefecture or region. */
|
|
199
|
+
region?: string | null;
|
|
200
|
+
/** Postal or zip code. */
|
|
201
|
+
postalCode?: string | null;
|
|
202
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
197
203
|
countryCode?: string | null;
|
|
198
204
|
};
|
|
199
205
|
/**
|
|
@@ -363,9 +369,10 @@ type DateTimeWhereInputArgument = {
|
|
|
363
369
|
OR?: DateTimeWhereInputArgument[];
|
|
364
370
|
NOT?: DateTimeWhereInputArgument;
|
|
365
371
|
};
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
372
|
+
declare namespace helpers_d_exports {
|
|
373
|
+
export { AnyTuple, CamelCase, Equal$2 as Equal, Every, Expect, Extends, Head$1 as Head, IsArrayStrict, IsNever$1 as IsNever, IsTuple, Iterator$1 as Iterator, KebabCase, Not$2 as Not, Prettify$1 as Prettify, Primitive$1 as Primitive, RecursivePrettify, SnakeCase, Some, Split$2 as Split, Stringifiable, UnionToIntersection, UnionToTuple };
|
|
374
|
+
}
|
|
375
|
+
type Equal$2<a, b> = (<T>() => T extends a ? 1 : 2) extends (<T>() => T extends b ? 1 : 2) ? true : false;
|
|
369
376
|
/**
|
|
370
377
|
* HACK:
|
|
371
378
|
* Special function for never because `Equal<T, never>` doesn't
|
|
@@ -373,6 +380,10 @@ type Equal$1<a, b> = (<T>() => T extends a ? 1 : 2) extends (<T>() => T extends
|
|
|
373
380
|
* probably a TS bug).
|
|
374
381
|
*/
|
|
375
382
|
type IsNever$1<T> = [T] extends [never] ? true : false;
|
|
383
|
+
type Expect<a extends true> = a;
|
|
384
|
+
type Some<bools extends boolean[]> = true extends bools[number] ? true : false;
|
|
385
|
+
type Every<bools extends boolean[]> = bools[number] extends true ? true : false;
|
|
386
|
+
type Extends<a, b> = [a] extends [b] ? true : false;
|
|
376
387
|
type Not$2<a extends boolean> = a extends true ? false : true;
|
|
377
388
|
/**
|
|
378
389
|
* trick to combine multiple unions of objects into a single object
|
|
@@ -381,7 +392,9 @@ type Not$2<a extends boolean> = a extends true ? false : true;
|
|
|
381
392
|
* @returns Intersection of objects
|
|
382
393
|
*/
|
|
383
394
|
type UnionToIntersection<union> = (union extends any ? (k: union) => void : never) extends ((k: infer intersection) => void) ? intersection : never;
|
|
384
|
-
type Prettify$1<T> = { [K in keyof T]: T[K] } | never;
|
|
395
|
+
type Prettify$1<T> = { [K in keyof T]: T[K]; } | never;
|
|
396
|
+
type RecursivePrettify<T> = IsArrayStrict<T> extends true ? RecursivePrettify<Extract<T, readonly any[]>[number]>[] : { [K in keyof T]: RecursivePrettify<T[K]>; };
|
|
397
|
+
type AnyTuple = readonly [any, ...any];
|
|
385
398
|
declare namespace Iterator$1 {
|
|
386
399
|
type Get<it extends readonly any[]> = it["length"];
|
|
387
400
|
type Iterator<n extends number, it extends any[] = []> = it["length"] extends n ? it : Iterator$1<n, [any, ...it]>;
|
|
@@ -431,7 +444,7 @@ type Primitive$1 = string | number | boolean | bigint | null | undefined | symbo
|
|
|
431
444
|
type Head$1<xs> = xs extends [infer first, ...any] ? first : never;
|
|
432
445
|
//#endregion
|
|
433
446
|
//#region node_modules/hotscript/dist/internals/core/impl/MergeArgs.d.ts
|
|
434
|
-
type ExcludePlaceholders<xs, output extends any[] = []> = xs extends [infer first, ...infer rest] ? Equal$
|
|
447
|
+
type ExcludePlaceholders<xs, output extends any[] = []> = xs extends [infer first, ...infer rest] ? Equal$2<first, _> extends true ? ExcludePlaceholders<rest, output> : ExcludePlaceholders<rest, [...output, first]> : output;
|
|
435
448
|
type MergeArgsRec<pipedArgs extends any[], partialArgs extends any[], output extends any[] = []> = partialArgs extends [infer partialFirst, ...infer partialRest] ? IsNever$1<partialFirst> extends true ? MergeArgsRec<pipedArgs, partialRest, [...output, partialFirst]> : [partialFirst] extends [_] ? pipedArgs extends [infer pipedFirst, ...infer pipedRest] ? MergeArgsRec<pipedRest, partialRest, [...output, pipedFirst]> : [...output, ...ExcludePlaceholders<partialRest>] : MergeArgsRec<pipedArgs, partialRest, [...output, partialFirst]> : [...output, ...pipedArgs];
|
|
436
449
|
type EmptyIntoPlaceholder<x> = IsNever$1<x> extends true ? never : [x] extends [unset] ? _ : x;
|
|
437
450
|
type MapEmptyIntoPlaceholder<xs, output extends any[] = []> = xs extends [infer first, ...infer rest] ? MapEmptyIntoPlaceholder<rest, [...output, EmptyIntoPlaceholder<first>]> : output;
|
|
@@ -464,7 +477,7 @@ type rawArgs = typeof rawArgs;
|
|
|
464
477
|
*/
|
|
465
478
|
interface Fn {
|
|
466
479
|
[rawArgs]: unknown;
|
|
467
|
-
args: this[rawArgs] extends infer args extends unknown[] ? args : never;
|
|
480
|
+
args: this[rawArgs] extends (infer args extends unknown[]) ? args : never;
|
|
468
481
|
arg0: this[rawArgs] extends [infer arg, ...any] ? arg : never;
|
|
469
482
|
arg1: this[rawArgs] extends [any, infer arg, ...any] ? arg : never;
|
|
470
483
|
arg2: this[rawArgs] extends [any, any, infer arg, ...any] ? arg : never;
|
|
@@ -482,7 +495,7 @@ type unset = typeof unset;
|
|
|
482
495
|
*/
|
|
483
496
|
type _ = typeof _;
|
|
484
497
|
interface args$1<Constraint extends unknown[] = unknown[]> extends Fn {
|
|
485
|
-
return: this["args"] extends infer args extends Constraint ? args : never;
|
|
498
|
+
return: this["args"] extends (infer args extends Constraint) ? args : never;
|
|
486
499
|
}
|
|
487
500
|
/**
|
|
488
501
|
* Call a HOTScript function with the given arguments.
|
|
@@ -573,7 +586,7 @@ type ComposeLeftImpl<fns extends Fn[], args extends any[]> = fns extends [infer
|
|
|
573
586
|
* type T1 = Call<AppendTo123, 4>; // [1, 2, 3, 4]
|
|
574
587
|
*/
|
|
575
588
|
interface PartialApply<fn extends Fn, partialArgs extends unknown[]> extends Fn {
|
|
576
|
-
return: MergeArgs<this["args"], partialArgs> extends infer args extends unknown[] ? Apply<fn, args$1> : never;
|
|
589
|
+
return: MergeArgs<this["args"], partialArgs> extends (infer args extends unknown[]) ? Apply<fn, args$1> : never;
|
|
577
590
|
}
|
|
578
591
|
//#endregion
|
|
579
592
|
//#region node_modules/hotscript/dist/internals/numbers/impl/absolute.d.ts
|
|
@@ -629,11 +642,11 @@ type CompareDigitNumbers<T extends DigitNumber, U extends DigitNumber> = Sign<T>
|
|
|
629
642
|
* @param U - Second number
|
|
630
643
|
* @returns 0 if T = U, 1 if T > U, -1 if T < U
|
|
631
644
|
*/
|
|
632
|
-
type Compare$1<T extends number | bigint, U extends number | bigint> = Equal$
|
|
645
|
+
type Compare$1<T extends number | bigint, U extends number | bigint> = Equal$2<T, U> extends true ? 0 : CompareDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>;
|
|
633
646
|
type LessThan$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends -1 ? true : false;
|
|
634
647
|
type GreaterThan$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 ? true : false;
|
|
635
|
-
type Equal<T extends number | bigint, U extends number | bigint> = Equal$
|
|
636
|
-
type NotEqual<T extends number | bigint, U extends number | bigint> = Equal$
|
|
648
|
+
type Equal$1<T extends number | bigint, U extends number | bigint> = Equal$2<T, U>;
|
|
649
|
+
type NotEqual$1<T extends number | bigint, U extends number | bigint> = Equal$2<T, U> extends true ? false : true;
|
|
637
650
|
type LessThanOrEqual$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends -1 | 0 ? true : false;
|
|
638
651
|
type GreaterThanOrEqual$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 | 0 ? true : false;
|
|
639
652
|
type Max<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 | 0 ? T : U;
|
|
@@ -733,6 +746,9 @@ type PowerDigits<T extends Digit[], U extends Digit[], Acc extends Digit[] = [1]
|
|
|
733
746
|
type PowerSign<S extends "" | "-", U extends DigitNumber> = S extends "-" ? Num<U> extends [...Digit[], 0 | 2 | 4 | 6 | 8] ? "" : "-" : "";
|
|
734
747
|
type PowerDigitNumbers<T extends DigitNumber, U extends DigitNumber> = Sign<U> extends "-" ? MakeDigitNumber<Sign<T>, [0]> : MakeDigitNumber<PowerSign<Sign<T>, U>, PowerDigits<Num<T>, Num<U>>>;
|
|
735
748
|
type Power<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<PowerDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
|
|
749
|
+
declare namespace numbers_d_exports {
|
|
750
|
+
export { Abs, Add, Compare$1 as Compare, Div, Equal$1 as Equal, GreaterThan$1 as GreaterThan, GreaterThanOrEqual$1 as GreaterThanOrEqual, LessThan$1 as LessThan, LessThanOrEqual$1 as LessThanOrEqual, Max, Min, Mod, Mul, Negate, NotEqual$1 as NotEqual, Power, Sub };
|
|
751
|
+
}
|
|
736
752
|
//#endregion
|
|
737
753
|
//#region node_modules/hotscript/dist/internals/numbers/Numbers.d.ts
|
|
738
754
|
declare namespace Numbers {
|
|
@@ -920,7 +936,7 @@ declare namespace Numbers {
|
|
|
920
936
|
*/
|
|
921
937
|
export type Equal<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<EqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
|
|
922
938
|
interface EqualFn extends Fn {
|
|
923
|
-
return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Equal<a, b> : never;
|
|
939
|
+
return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Equal$1<a, b> : never;
|
|
924
940
|
}
|
|
925
941
|
/**
|
|
926
942
|
* Check if two numbers are not equal
|
|
@@ -936,7 +952,7 @@ declare namespace Numbers {
|
|
|
936
952
|
*/
|
|
937
953
|
export type NotEqual<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<NotEqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
|
|
938
954
|
interface NotEqualFn extends Fn {
|
|
939
|
-
return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? NotEqual<a, b> : never;
|
|
955
|
+
return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? NotEqual$1<a, b> : never;
|
|
940
956
|
}
|
|
941
957
|
/**
|
|
942
958
|
* Check if a number is less than another
|
|
@@ -1154,7 +1170,7 @@ declare namespace Tuples {
|
|
|
1154
1170
|
*/
|
|
1155
1171
|
export type Map<fn extends Fn | unset | _ = unset, tuple extends readonly any[] | unset = unset> = PartialApply<MapFn, [fn, tuple]>;
|
|
1156
1172
|
interface MapFn extends Fn {
|
|
1157
|
-
return: this["args"] extends [infer fn extends Fn, infer tuple extends unknown[]] ? { [key in keyof tuple]: Call<fn, tuple[key]
|
|
1173
|
+
return: this["args"] extends [infer fn extends Fn, infer tuple extends unknown[]] ? { [key in keyof tuple]: Call<fn, tuple[key]>; } : never;
|
|
1158
1174
|
}
|
|
1159
1175
|
interface FlatMapReducer<fn extends Fn> extends Fn {
|
|
1160
1176
|
return: this["args"] extends [infer acc extends any[], infer item] ? [...acc, ...Extract<Call<fn, item>, readonly any[]>] : never;
|
|
@@ -1470,7 +1486,7 @@ declare namespace Tuples {
|
|
|
1470
1486
|
return: this["args"] extends [infer Index extends number, ...any] ? Apply<fn, Call<Tuples.Map<Tuples.At<Index>, arrs>>> : never;
|
|
1471
1487
|
}
|
|
1472
1488
|
interface ZipWithFn<fn extends Fn> extends Fn {
|
|
1473
|
-
return: this["args"] extends infer arrays extends unknown[][] ? Pipe<arrays, [Tuples.Map<Objects.Get<"length">>, Tuples.Min, Numbers.Abs, Numbers.Sub<_, 1>, Tuples.Range<0, _>, Tuples.Map<ZipWithMapper<fn, arrays>>]> : never;
|
|
1489
|
+
return: this["args"] extends (infer arrays extends unknown[][]) ? Pipe<arrays, [Tuples.Map<Objects.Get<"length">>, Tuples.Min, Numbers.Abs, Numbers.Sub<_, 1>, Tuples.Range<0, _>, Tuples.Map<ZipWithMapper<fn, arrays>>]> : never;
|
|
1474
1490
|
}
|
|
1475
1491
|
/**
|
|
1476
1492
|
* Zip two tuples together.
|
|
@@ -1525,7 +1541,7 @@ declare namespace Tuples {
|
|
|
1525
1541
|
export interface GroupBy<fn extends Fn> extends Fn {
|
|
1526
1542
|
return: GroupByImpl<this["arg0"], fn>;
|
|
1527
1543
|
}
|
|
1528
|
-
type GroupByImplRec<xs, fn extends Fn, acc = {}> = xs extends [infer first, ...infer rest] ? Call<fn, first> extends infer key extends PropertyKey ? GroupByImplRec<rest, fn, Std._Omit<acc, key> & { [K in key]: [...(key extends keyof acc ? Extract<acc[key], readonly any[]> : []), first] }> : never : acc;
|
|
1544
|
+
type GroupByImplRec<xs, fn extends Fn, acc = {}> = xs extends [infer first, ...infer rest] ? Call<fn, first> extends (infer key extends PropertyKey) ? GroupByImplRec<rest, fn, Std._Omit<acc, key> & { [K in key]: [...(key extends keyof acc ? Extract<acc[key], readonly any[]> : []), first]; }> : never : acc;
|
|
1529
1545
|
export type GroupByImpl<xs, fn extends Fn> = Prettify$1<GroupByImplRec<xs, fn>>;
|
|
1530
1546
|
/**
|
|
1531
1547
|
* Range takes a `start` and an `end` integer and produces
|
|
@@ -1543,7 +1559,7 @@ declare namespace Tuples {
|
|
|
1543
1559
|
*/
|
|
1544
1560
|
export type Range<start extends number | _ | unset = unset, end extends number | _ | unset = unset> = PartialApply<RangeFn, [start, end]>;
|
|
1545
1561
|
interface RangeFn extends Fn {
|
|
1546
|
-
return: this["args"] extends [infer start extends number, infer end extends number] ? Call<Numbers.LessThanOrEqual, start, end> extends true ? Pipe<start, [Numbers.Sub<end, _>, Numbers.Add<1>, Numbers.Abs]> extends infer length extends number ? RangeImpl<start, length> : never : never : never;
|
|
1562
|
+
return: this["args"] extends [infer start extends number, infer end extends number] ? Call<Numbers.LessThanOrEqual, start, end> extends true ? Pipe<start, [Numbers.Sub<end, _>, Numbers.Add<1>, Numbers.Abs]> extends (infer length extends number) ? RangeImpl<start, length> : never : never : never;
|
|
1547
1563
|
}
|
|
1548
1564
|
type RangeImpl<start extends number, length extends number, output extends any[] = []> = output["length"] extends length ? output : RangeImpl<start, length, [...output, Call<Numbers.Add<start, output["length"]>>]>;
|
|
1549
1565
|
/**
|
|
@@ -1873,9 +1889,11 @@ type ascii = {
|
|
|
1873
1889
|
};
|
|
1874
1890
|
type CharacterCompare<Char1 extends string, Char2 extends string> = Char1 extends Char2 ? 0 : Char1 extends keyof ascii ? Char2 extends keyof ascii ? Call<Numbers.Compare, ascii[Char1], ascii[Char2]> : 1 : -1;
|
|
1875
1891
|
type CharactersCompare<T extends string[], U extends string[]> = T extends [infer N1 extends string, ...infer R1 extends string[]] ? U extends [infer N2 extends string, ...infer R2 extends string[]] ? CharacterCompare<N1, N2> extends 0 ? CharactersCompare<R1, R2> : CharacterCompare<N1, N2> : 1 : U extends [string, ...string[]] ? -1 : 0;
|
|
1876
|
-
type Compare<T extends string, U extends string> = Equal$
|
|
1892
|
+
type Compare<T extends string, U extends string> = Equal$2<T, U> extends true ? 0 : CharactersCompare<StringToTuple<T>, StringToTuple<U>>;
|
|
1877
1893
|
type LessThan<T extends string, U extends string> = Compare<T, U> extends -1 ? true : false;
|
|
1878
1894
|
type LessThanOrEqual<T extends string, U extends string> = Compare<T, U> extends 1 ? false : true;
|
|
1895
|
+
type Equal<T extends string, U extends string> = Equal$2<T, U>;
|
|
1896
|
+
type NotEqual<T extends string, U extends string> = Equal$2<T, U> extends true ? false : true;
|
|
1879
1897
|
type GreaterThan<T extends string, U extends string> = Compare<T, U> extends 1 ? true : false;
|
|
1880
1898
|
type GreaterThanOrEqual<T extends string, U extends string> = Compare<T, U> extends -1 ? false : true;
|
|
1881
1899
|
//#endregion
|
|
@@ -1954,9 +1972,12 @@ declare namespace StringIterator {
|
|
|
1954
1972
|
}
|
|
1955
1973
|
//#endregion
|
|
1956
1974
|
//#region node_modules/hotscript/dist/internals/strings/impl/length.d.ts
|
|
1957
|
-
type LengthUp<Str extends string, Length extends number | bigint = 0, It extends StringIterator.Iterator = StringIterator.Init> = StringIterator.Double<It> extends infer $DoubleIt extends StringIterator.Iterator ? StringIterator.CutAt<Str, $DoubleIt> extends `${infer $Rest}` ? StringIterator.Size<It> extends 12 ? LengthDown<$Rest, Add<Length, StringIterator.Value<$DoubleIt>>, $DoubleIt> : LengthUp<$Rest, Add<Length, StringIterator.Value<$DoubleIt>>, $DoubleIt> : StringIterator.CutAt<Str, It> extends `${infer $Rest}` ? LengthUp<$Rest, Add<Length, StringIterator.Value<It>>, It> : LengthDown<Str, Length, StringIterator.Prev<It>> : never;
|
|
1975
|
+
type LengthUp<Str extends string, Length extends number | bigint = 0, It extends StringIterator.Iterator = StringIterator.Init> = StringIterator.Double<It> extends (infer $DoubleIt extends StringIterator.Iterator) ? StringIterator.CutAt<Str, $DoubleIt> extends `${infer $Rest}` ? StringIterator.Size<It> extends 12 ? LengthDown<$Rest, Add<Length, StringIterator.Value<$DoubleIt>>, $DoubleIt> : LengthUp<$Rest, Add<Length, StringIterator.Value<$DoubleIt>>, $DoubleIt> : StringIterator.CutAt<Str, It> extends `${infer $Rest}` ? LengthUp<$Rest, Add<Length, StringIterator.Value<It>>, It> : LengthDown<Str, Length, StringIterator.Prev<It>> : never;
|
|
1958
1976
|
type LengthDown<Str extends string, Length extends number | bigint, It> = It extends StringIterator.Iterator ? StringIterator.CutAt<Str, It> extends `${infer $Rest}` ? LengthDown<$Rest, Add<Length, StringIterator.Value<It>>, It> : LengthDown<Str, Length, StringIterator.Prev<It>> : Length;
|
|
1959
1977
|
type Length<T extends string> = T extends "" ? 0 : LengthUp<T>;
|
|
1978
|
+
declare namespace strings_d_exports {
|
|
1979
|
+
export { Compare, Equal, GreaterThan, GreaterThanOrEqual, Length, LessThan, LessThanOrEqual, NotEqual, Repeat, Replace, ReplaceReducer, Split$1 as Split, StringToTuple, Trim, TrimLeft, TrimRight };
|
|
1980
|
+
}
|
|
1960
1981
|
//#endregion
|
|
1961
1982
|
//#region node_modules/hotscript/dist/internals/strings/Strings.d.ts
|
|
1962
1983
|
declare namespace Strings {
|
|
@@ -2357,22 +2378,23 @@ declare namespace Strings {
|
|
|
2357
2378
|
}
|
|
2358
2379
|
export {};
|
|
2359
2380
|
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
type
|
|
2364
|
-
type
|
|
2365
|
-
type
|
|
2381
|
+
declare namespace objects_d_exports {
|
|
2382
|
+
export { AllPaths, Assign, Create, Entries, FromEntries, GetFromPath, Keys, TransformObjectDeep, Update, Values };
|
|
2383
|
+
}
|
|
2384
|
+
type Keys<src> = src extends readonly unknown[] ? { [key in keyof src]: key; }[number] extends (infer res) ? res extends string ? Call<Strings.ToNumber, res> & keyof src : res & keyof src : never : keyof src;
|
|
2385
|
+
type Values<src> = Keys<src> extends (infer keys extends keyof src) ? src[keys] : never;
|
|
2386
|
+
type FromEntries<entries extends [PropertyKey, any]> = { [entry in entries as entry[0]]: entry[1]; } | never;
|
|
2387
|
+
type Entries<T> = Keys<T> extends (infer keys extends keyof T) ? { [K in keys]: [K, T[K]]; }[keys] : never;
|
|
2366
2388
|
type Assign<xs extends readonly any[]> = Prettify$1<UnionToIntersection<xs[number]>>;
|
|
2367
2389
|
type GetFromPath<Obj, path> = RecursiveGet<Obj, ParsePath<path>>;
|
|
2368
2390
|
type ParsePath<path, output extends string[] = [], currentChunk extends string = ""> = path extends number ? [`${path}`] : path extends `${infer first}${infer rest}` ? first extends "." | "[" | "]" ? ParsePath<rest, [...output, ...(currentChunk extends "" ? [] : [currentChunk])], ""> : ParsePath<rest, output, `${currentChunk}${first}`> : [...output, ...(currentChunk extends "" ? [] : [currentChunk])];
|
|
2369
2391
|
type RecursiveGet<Obj, pathList> = Obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof Obj ? RecursiveGet<Obj[first], rest> : [first, Obj] extends [`${number}` | "number", readonly any[]] ? RecursiveGet<Extract<Obj, any[]>[number], rest> : undefined : Obj : never;
|
|
2370
|
-
type TransformObjectDeep<fn extends Fn, type> = type extends Function | Date ? type : type extends Map<infer keys, infer values> ? Map<TransformObjectDeep<fn, keys>, TransformObjectDeep<fn, values>> : type extends ReadonlyMap<infer keys, infer values> ? ReadonlyMap<TransformObjectDeep<fn, keys>, TransformObjectDeep<fn, values>> : type extends WeakMap<infer keys, infer values> ? WeakMap<Extract<TransformObjectDeep<fn, keys>, object>, TransformObjectDeep<fn, values>> : type extends Set<infer values> ? Set<TransformObjectDeep<fn, values>> : type extends ReadonlySet<infer values> ? ReadonlySet<TransformObjectDeep<fn, values>> : type extends WeakSet<infer values> ? WeakSet<Extract<TransformObjectDeep<fn, values>, object>> : type extends Array<infer values> ? IsTuple<type> extends true ? Call<fn, { [Key in keyof type]: TransformObjectDeep<fn, type[Key]
|
|
2392
|
+
type TransformObjectDeep<fn extends Fn, type> = type extends Function | Date ? type : type extends Map<infer keys, infer values> ? Map<TransformObjectDeep<fn, keys>, TransformObjectDeep<fn, values>> : type extends ReadonlyMap<infer keys, infer values> ? ReadonlyMap<TransformObjectDeep<fn, keys>, TransformObjectDeep<fn, values>> : type extends WeakMap<infer keys, infer values> ? WeakMap<Extract<TransformObjectDeep<fn, keys>, object>, TransformObjectDeep<fn, values>> : type extends Set<infer values> ? Set<TransformObjectDeep<fn, values>> : type extends ReadonlySet<infer values> ? ReadonlySet<TransformObjectDeep<fn, values>> : type extends WeakSet<infer values> ? WeakSet<Extract<TransformObjectDeep<fn, values>, object>> : type extends Array<infer values> ? IsTuple<type> extends true ? Call<fn, { [Key in keyof type]: TransformObjectDeep<fn, type[Key]>; }> : Array<TransformObjectDeep<fn, values> | undefined> : type extends Promise<infer value> ? Promise<TransformObjectDeep<fn, value>> : type extends object ? Call<fn, { [Key in keyof type]: TransformObjectDeep<fn, type[Key]>; }> : Equal$2<type, unknown> extends true ? unknown : Partial<type>;
|
|
2371
2393
|
type Update<obj, path, fnOrValue> = RecursiveUpdate<obj, ParsePath<path>, fnOrValue>;
|
|
2372
|
-
type RecursiveUpdate<obj, pathList, fnOrValue> = obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof obj ? { [K in keyof obj]: Equal$
|
|
2373
|
-
type Create<pattern, args extends unknown[]> = pattern extends infer p extends Fn ? Apply<p, args> : pattern extends Primitive$1 ? pattern : pattern extends readonly [any, ...any] ? { [key in keyof pattern]: Create<pattern[key], args
|
|
2394
|
+
type RecursiveUpdate<obj, pathList, fnOrValue> = obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof obj ? { [K in keyof obj]: Equal$2<first, K> extends true ? RecursiveUpdate<obj[K], rest, fnOrValue> : obj[K]; } : [first, obj] extends ["number", readonly any[]] ? RecursiveUpdate<Extract<obj, any[]>[number], rest, fnOrValue>[] : Assign<[obj, { [K in Extract<first, PropertyKey>]: RecursiveUpdate<{}, rest, fnOrValue>; }]> : fnOrValue extends Fn ? Call<Extract<fnOrValue, Fn>, obj> : fnOrValue : never;
|
|
2395
|
+
type Create<pattern, args extends unknown[]> = pattern extends (infer p extends Fn) ? Apply<p, args> : pattern extends Primitive$1 ? pattern : pattern extends readonly [any, ...any] ? { [key in keyof pattern]: Create<pattern[key], args>; } : pattern extends readonly (infer V)[] ? Create<V, args>[] : pattern extends object ? { [key in keyof pattern]: Create<pattern[key], args>; } : pattern;
|
|
2374
2396
|
type JoinPath<A extends string, B extends string, Sep extends string = ""> = [A] extends [never] ? B : [B] extends [never] ? A : `${A}${Sep}${B}`;
|
|
2375
|
-
type AllPaths<T, ParentPath extends string = never> = T extends Primitive$1 ? ParentPath : unknown extends T ? JoinPath<ParentPath, string, "."> : T extends readonly any[] ? Keys<T> extends infer key extends string | number ? JoinPath<ParentPath, `[${key}]`> | AllPaths<T[number], JoinPath<ParentPath, `[${key}]`>> : never : keyof T extends infer key extends keyof T & string ? key extends any ? JoinPath<ParentPath, key, "."> | AllPaths<T[key], JoinPath<ParentPath, key, ".">> : never : ParentPath;
|
|
2397
|
+
type AllPaths<T, ParentPath extends string = never> = T extends Primitive$1 ? ParentPath : unknown extends T ? JoinPath<ParentPath, string, "."> : T extends readonly any[] ? Keys<T> extends (infer key extends string | number) ? JoinPath<ParentPath, `[${key}]`> | AllPaths<T[number], JoinPath<ParentPath, `[${key}]`>> : never : keyof T extends (infer key extends keyof T & string) ? key extends any ? JoinPath<ParentPath, key, "."> | AllPaths<T[key], JoinPath<ParentPath, key, ".">> : never : ParentPath;
|
|
2376
2398
|
//#endregion
|
|
2377
2399
|
//#region node_modules/hotscript/dist/internals/objects/Objects.d.ts
|
|
2378
2400
|
declare namespace Objects {
|
|
@@ -2400,7 +2422,7 @@ declare namespace Objects {
|
|
|
2400
2422
|
export interface Entries extends Fn {
|
|
2401
2423
|
return: Entries<this["arg0"]>;
|
|
2402
2424
|
}
|
|
2403
|
-
type MapValuesImpl<T, fn extends Fn> = { [K in keyof T]: Call<fn, T[K], K
|
|
2425
|
+
type MapValuesImpl<T, fn extends Fn> = { [K in keyof T]: Call<fn, T[K], K>; };
|
|
2404
2426
|
/**
|
|
2405
2427
|
* Map over values in an object type.
|
|
2406
2428
|
* @param fn - The function to run on every object value
|
|
@@ -2417,7 +2439,7 @@ declare namespace Objects {
|
|
|
2417
2439
|
export interface MapValues<fn extends Fn> extends Fn {
|
|
2418
2440
|
return: MapValuesImpl<this["arg0"], fn>;
|
|
2419
2441
|
}
|
|
2420
|
-
type MapKeysImpl<T, fn extends Fn> = { [K in keyof T as Extract<Call<fn, K>, PropertyKey>]: T[K] };
|
|
2442
|
+
type MapKeysImpl<T, fn extends Fn> = { [K in keyof T as Extract<Call<fn, K>, PropertyKey>]: T[K]; };
|
|
2421
2443
|
/**
|
|
2422
2444
|
* Map over keys in an object type.
|
|
2423
2445
|
* @param fn - The function to run on every object key
|
|
@@ -2479,7 +2501,7 @@ declare namespace Objects {
|
|
|
2479
2501
|
export interface CamelCase extends Fn {
|
|
2480
2502
|
return: Call<MapKeys<Strings.CamelCase>, this["arg0"]>;
|
|
2481
2503
|
}
|
|
2482
|
-
type MapKeysDeepImpl<T, fn extends Fn> = IsArrayStrict<T> extends true ? MapKeysDeepImpl<Extract<T, readonly any[]>[number], fn>[] : T extends object ? { [K in keyof T as Extract<Call<fn, K>, PropertyKey>]: Prettify$1<MapKeysDeepImpl<T[K], fn
|
|
2504
|
+
type MapKeysDeepImpl<T, fn extends Fn> = IsArrayStrict<T> extends true ? MapKeysDeepImpl<Extract<T, readonly any[]>[number], fn>[] : T extends object ? { [K in keyof T as Extract<Call<fn, K>, PropertyKey>]: Prettify$1<MapKeysDeepImpl<T[K], fn>>; } : T;
|
|
2483
2505
|
/**
|
|
2484
2506
|
* Recursively transform all keys in a structure of object types
|
|
2485
2507
|
* @param fn - The function to apply to every key
|
|
@@ -2562,7 +2584,7 @@ declare namespace Objects {
|
|
|
2562
2584
|
interface PickFn extends Fn {
|
|
2563
2585
|
return: PickImpl<this["arg1"], this["arg0"]>;
|
|
2564
2586
|
}
|
|
2565
|
-
type PickImpl<obj, keys> = { [key in Extract<keyof obj, keys>]: obj[key] };
|
|
2587
|
+
type PickImpl<obj, keys> = { [key in Extract<keyof obj, keys>]: obj[key]; };
|
|
2566
2588
|
/**
|
|
2567
2589
|
* Only keep keys of an object if they aren't
|
|
2568
2590
|
* assignable to some type.
|
|
@@ -2581,7 +2603,7 @@ declare namespace Objects {
|
|
|
2581
2603
|
interface OmitFn extends Fn {
|
|
2582
2604
|
return: OmitImpl<this["arg1"], this["arg0"]>;
|
|
2583
2605
|
}
|
|
2584
|
-
type OmitImpl<obj, keys> = { [key in Exclude<keyof obj, keys>]: obj[key] };
|
|
2606
|
+
type OmitImpl<obj, keys> = { [key in Exclude<keyof obj, keys>]: obj[key]; };
|
|
2585
2607
|
/**
|
|
2586
2608
|
* Only keep keys of an object if the predicate function
|
|
2587
2609
|
* returns true
|
|
@@ -2691,7 +2713,7 @@ declare namespace Objects {
|
|
|
2691
2713
|
*/
|
|
2692
2714
|
export type Mutable<obj = unset> = PartialApply<MutableFn, [obj]>;
|
|
2693
2715
|
interface MutableFn extends Fn {
|
|
2694
|
-
return: this["args"] extends [infer obj, ...any] ? { -readonly [key in keyof obj]: obj[key] } : never;
|
|
2716
|
+
return: this["args"] extends [infer obj, ...any] ? { -readonly [key in keyof obj]: obj[key]; } : never;
|
|
2695
2717
|
}
|
|
2696
2718
|
/**
|
|
2697
2719
|
* Makes all levels of an object optional
|
|
@@ -2902,7 +2924,7 @@ declare type IntersectUnion$1<UNION> = (UNION extends unknown ? (arg: UNION) =>
|
|
|
2902
2924
|
declare type IsNever<TYPE> = [TYPE] extends [never] ? true : false;
|
|
2903
2925
|
//#endregion
|
|
2904
2926
|
//#region node_modules/ts-algebra/lib/utils/merge.d.ts
|
|
2905
|
-
declare type DeepMergeUnsafe<TYPE_A, TYPE_B> = IsObject<TYPE_A> extends true ? IsObject<TYPE_B> extends true ? { [KEY in keyof (TYPE_A & TYPE_B)]: KEY extends keyof TYPE_B ? KEY extends keyof TYPE_A ? DeepMergeUnsafe<TYPE_A[KEY], TYPE_B[KEY]> : TYPE_B[KEY] : KEY extends keyof TYPE_A ? TYPE_A[KEY] : never } : TYPE_B : IsArray<TYPE_A> extends true ? IsArray<TYPE_B> extends true ? TYPE_B extends unknown[] ? [...(TYPE_A extends unknown[] ? TYPE_A : never), TYPE_B] : never : TYPE_B : TYPE_B;
|
|
2927
|
+
declare type DeepMergeUnsafe<TYPE_A, TYPE_B> = IsObject<TYPE_A> extends true ? IsObject<TYPE_B> extends true ? { [KEY in keyof (TYPE_A & TYPE_B)]: KEY extends keyof TYPE_B ? KEY extends keyof TYPE_A ? DeepMergeUnsafe<TYPE_A[KEY], TYPE_B[KEY]> : TYPE_B[KEY] : KEY extends keyof TYPE_A ? TYPE_A[KEY] : never; } : TYPE_B : IsArray<TYPE_A> extends true ? IsArray<TYPE_B> extends true ? TYPE_B extends unknown[] ? [...(TYPE_A extends unknown[] ? TYPE_A : never), TYPE_B] : never : TYPE_B : TYPE_B;
|
|
2906
2928
|
//#endregion
|
|
2907
2929
|
//#region node_modules/ts-algebra/lib/utils/not.d.ts
|
|
2908
2930
|
declare type Not$1<BOOL extends boolean> = BOOL extends false ? true : BOOL extends true ? false : never;
|
|
@@ -2911,7 +2933,7 @@ declare type Not$1<BOOL extends boolean> = BOOL extends false ? true : BOOL exte
|
|
|
2911
2933
|
declare type Or<BOOL_A extends boolean, BOOL_B extends boolean> = BOOL_A extends true ? true : BOOL_B extends true ? true : false;
|
|
2912
2934
|
//#endregion
|
|
2913
2935
|
//#region node_modules/ts-algebra/lib/utils/prettify.d.ts
|
|
2914
|
-
declare type Prettify<TYPE> = IsObject<TYPE> extends true ? { [KEY in keyof TYPE]: KEY extends keyof TYPE ? TYPE[KEY] : never } : TYPE;
|
|
2936
|
+
declare type Prettify<TYPE> = IsObject<TYPE> extends true ? { [KEY in keyof TYPE]: KEY extends keyof TYPE ? TYPE[KEY] : never; } : TYPE;
|
|
2915
2937
|
//#endregion
|
|
2916
2938
|
//#region node_modules/ts-algebra/lib/utils/tail.d.ts
|
|
2917
2939
|
declare type Tail$2<ARRAY extends unknown[]> = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer TAIL] ? TAIL : ARRAY;
|
|
@@ -2971,7 +2993,7 @@ declare type ResolveEnum<META_ENUM extends EnumType, OPTIONS extends ResolveOpti
|
|
|
2971
2993
|
//#region node_modules/ts-algebra/lib/meta-types/object.d.ts
|
|
2972
2994
|
declare type ObjectTypeId = "object";
|
|
2973
2995
|
declare type _Object<VALUES extends Record<string, Type> = {}, REQUIRED_KEYS extends string = never, OPEN_PROPS extends Type = Never, CLOSE_ON_RESOLVE extends boolean = false, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = _$Object<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, IS_SERIALIZED, DESERIALIZED>;
|
|
2974
|
-
declare type _$Object<VALUES = {}, REQUIRED_KEYS = never, OPEN_PROPS = Never, CLOSE_ON_RESOLVE = false, IS_SERIALIZED = false, DESERIALIZED = never> = DoesExtend$1<true, { [KEY in Extract<REQUIRED_KEYS, string>]: KEY extends keyof VALUES ? DoesExtend$1<VALUES[KEY], NeverType> : DoesExtend$1<OPEN_PROPS, NeverType
|
|
2996
|
+
declare type _$Object<VALUES = {}, REQUIRED_KEYS = never, OPEN_PROPS = Never, CLOSE_ON_RESOLVE = false, IS_SERIALIZED = false, DESERIALIZED = never> = DoesExtend$1<true, { [KEY in Extract<REQUIRED_KEYS, string>]: KEY extends keyof VALUES ? DoesExtend$1<VALUES[KEY], NeverType> : DoesExtend$1<OPEN_PROPS, NeverType>; }[Extract<REQUIRED_KEYS, string>]> extends true ? Never : {
|
|
2975
2997
|
type: ObjectTypeId;
|
|
2976
2998
|
values: VALUES;
|
|
2977
2999
|
required: REQUIRED_KEYS;
|
|
@@ -3002,7 +3024,7 @@ declare type ResolveObject<META_OBJECT extends ObjectType, OPTIONS extends Resol
|
|
|
3002
3024
|
[KEY: string]: Resolve<ObjectOpenProps<META_OBJECT>, OPTIONS>;
|
|
3003
3025
|
}, {
|
|
3004
3026
|
[KEY: string]: Resolve<Any, OPTIONS>;
|
|
3005
|
-
}>, {}>, DeepMergeUnsafe<{ [KEY in Exclude<keyof ObjectValues<META_OBJECT>, ObjectRequiredKeys<META_OBJECT>>]?: Resolve<ObjectValues<META_OBJECT>[KEY], OPTIONS
|
|
3027
|
+
}>, {}>, DeepMergeUnsafe<{ [KEY in Exclude<keyof ObjectValues<META_OBJECT>, ObjectRequiredKeys<META_OBJECT>>]?: Resolve<ObjectValues<META_OBJECT>[KEY], OPTIONS>; }, { [KEY in ObjectRequiredKeys<META_OBJECT>]: KEY extends keyof ObjectValues<META_OBJECT> ? Resolve<ObjectValues<META_OBJECT>[KEY], OPTIONS> : Resolve<Any, OPTIONS>; }>>>;
|
|
3006
3028
|
//#endregion
|
|
3007
3029
|
//#region node_modules/ts-algebra/lib/meta-types/primitive.d.ts
|
|
3008
3030
|
declare type PrimitiveTypeId = "primitive";
|
|
@@ -3061,11 +3083,11 @@ declare type UnionType = {
|
|
|
3061
3083
|
};
|
|
3062
3084
|
declare type UnionValues<META_UNION extends UnionType> = META_UNION["values"];
|
|
3063
3085
|
declare type ResolveUnion<META_UNION extends UnionType, OPTIONS extends ResolveOptions> = RecurseOnUnion<UnionValues<META_UNION>, OPTIONS>;
|
|
3064
|
-
declare type RecurseOnUnion<VALUES extends Type, OPTIONS extends ResolveOptions> = VALUES extends infer META_TYPE ? $Resolve<META_TYPE, OPTIONS> : never;
|
|
3086
|
+
declare type RecurseOnUnion<VALUES extends Type, OPTIONS extends ResolveOptions> = VALUES extends (infer META_TYPE) ? $Resolve<META_TYPE, OPTIONS> : never;
|
|
3065
3087
|
//#endregion
|
|
3066
3088
|
//#region node_modules/ts-algebra/lib/meta-types/type.d.ts
|
|
3067
3089
|
declare type Type = NeverType | AnyType | ConstType | EnumType | PrimitiveType | ArrayType | TupleType | ObjectType | UnionType;
|
|
3068
|
-
declare type SerializableType = Type extends infer META_TYPE ? META_TYPE extends {
|
|
3090
|
+
declare type SerializableType = Type extends (infer META_TYPE) ? META_TYPE extends {
|
|
3069
3091
|
isSerialized: boolean;
|
|
3070
3092
|
deserialized: unknown;
|
|
3071
3093
|
} ? META_TYPE : never : never;
|
|
@@ -3114,7 +3136,7 @@ declare type ResolveAny<META_ANY extends AnyType, OPTIONS extends ResolveOptions
|
|
|
3114
3136
|
//#endregion
|
|
3115
3137
|
//#region node_modules/ts-algebra/lib/meta-types/intersection/union.d.ts
|
|
3116
3138
|
declare type IntersectUnion<META_UNION extends UnionType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? META_UNION : META_TYPE extends ConstType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends EnumType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends PrimitiveType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends ArrayType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends TupleType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends ObjectType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_UNION, META_TYPE> : Never : Never;
|
|
3117
|
-
declare type DistributeIntersection<META_UNION extends UnionType, META_TYPE> = $Union<UnionValues<META_UNION> extends infer UNION_VALUE ? $Intersect<UNION_VALUE, META_TYPE> : never>;
|
|
3139
|
+
declare type DistributeIntersection<META_UNION extends UnionType, META_TYPE> = $Union<UnionValues<META_UNION> extends (infer UNION_VALUE) ? $Intersect<UNION_VALUE, META_TYPE> : never>;
|
|
3118
3140
|
//#endregion
|
|
3119
3141
|
//#region node_modules/ts-algebra/lib/meta-types/intersection/utils.d.ts
|
|
3120
3142
|
declare type IntersectIsSerialized<SERIALIZABLE_META_TYPE_A extends SerializableType, SERIALIZABLE_META_TYPE_B extends SerializableType> = Or<IsSerialized<SERIALIZABLE_META_TYPE_A>, IsSerialized<SERIALIZABLE_META_TYPE_B>>;
|
|
@@ -3132,14 +3154,14 @@ declare type IntersectConstToArray<META_CONST extends ConstType, META_ARRAY exte
|
|
|
3132
3154
|
declare type IntersectConstToTuple<META_CONST extends ConstType, META_TUPLE extends TupleType> = CheckExtendsResolved<META_CONST, META_TUPLE>;
|
|
3133
3155
|
declare type IntersectConstToObject<META_CONST extends ConstType, META_OBJECT extends ObjectType> = If<IsObject<ConstValue<META_CONST>>, IntersectObjectConstToObject<META_CONST, META_OBJECT>, Never>;
|
|
3134
3156
|
declare type IntersectObjectConstToObject<META_CONST extends ConstType, META_OBJECT extends ObjectType, INTERSECTED_META_OBJECT = IntersectConstValuesToObjectValues<ConstValue<META_CONST>, META_OBJECT>> = If<IsNever<NeverKeys<INTERSECTED_META_OBJECT>>, IntersectConstSerializationParams<META_CONST, META_OBJECT>, Never>;
|
|
3135
|
-
declare type IntersectConstValuesToObjectValues<CONST_VALUE, META_OBJECT extends ObjectType> = { [KEY in Extract<keyof CONST_VALUE | ObjectRequiredKeys<META_OBJECT>, string>]: KEY extends keyof CONST_VALUE ? Intersect<Const<CONST_VALUE[KEY]>, ObjectValue<META_OBJECT, KEY>> : Never };
|
|
3136
|
-
declare type NeverKeys<META_OBJECT> = { [KEY in keyof META_OBJECT]: META_OBJECT[KEY] extends Never ? KEY : never }[keyof META_OBJECT];
|
|
3157
|
+
declare type IntersectConstValuesToObjectValues<CONST_VALUE, META_OBJECT extends ObjectType> = { [KEY in Extract<keyof CONST_VALUE | ObjectRequiredKeys<META_OBJECT>, string>]: KEY extends keyof CONST_VALUE ? Intersect<Const<CONST_VALUE[KEY]>, ObjectValue<META_OBJECT, KEY>> : Never; };
|
|
3158
|
+
declare type NeverKeys<META_OBJECT> = { [KEY in keyof META_OBJECT]: META_OBJECT[KEY] extends Never ? KEY : never; }[keyof META_OBJECT];
|
|
3137
3159
|
//#endregion
|
|
3138
3160
|
//#region node_modules/ts-algebra/lib/meta-types/intersection/enum.d.ts
|
|
3139
3161
|
declare type IntersectEnumSerializationParams<META_ENUM_VALUES, META_ENUM extends EnumType, SERIALIZABLE_META_TYPE extends SerializableType> = Enum<META_ENUM_VALUES, IntersectIsSerialized<META_ENUM, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_ENUM, SERIALIZABLE_META_TYPE>>;
|
|
3140
3162
|
declare type IntersectEnum<META_ENUM extends EnumType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectEnumSerializationParams<EnumValues<META_ENUM>, META_ENUM, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToEnum<META_TYPE, META_ENUM> : META_TYPE extends EnumType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends PrimitiveType ? IntersectEnumToPrimitive<META_ENUM, META_TYPE> : META_TYPE extends ArrayType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends TupleType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends ObjectType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_ENUM> : Never : Never;
|
|
3141
3163
|
declare type FilterEnum<META_ENUM extends EnumType, SERIALIZABLE_META_TYPE extends SerializableType> = IntersectEnumSerializationParams<FilterEnumValues<EnumValues<META_ENUM>, SERIALIZABLE_META_TYPE>, META_ENUM, SERIALIZABLE_META_TYPE>;
|
|
3142
|
-
declare type FilterEnumValues<ENUM_VALUES, SERIALIZABLE_META_TYPE> = ENUM_VALUES extends infer ENUM_VALUE ? $Intersect<Const<ENUM_VALUE>, SERIALIZABLE_META_TYPE> extends Never ? never : ENUM_VALUE : never;
|
|
3164
|
+
declare type FilterEnumValues<ENUM_VALUES, SERIALIZABLE_META_TYPE> = ENUM_VALUES extends (infer ENUM_VALUE) ? $Intersect<Const<ENUM_VALUE>, SERIALIZABLE_META_TYPE> extends Never ? never : ENUM_VALUE : never;
|
|
3143
3165
|
declare type IntersectEnumToPrimitive<META_ENUM extends EnumType, META_PRIMITIVE extends PrimitiveType> = FilterEnum<META_ENUM, META_PRIMITIVE>;
|
|
3144
3166
|
declare type IntersectEnumToArray<META_ENUM extends EnumType, META_ARRAY extends ArrayType> = FilterEnum<META_ENUM, META_ARRAY>;
|
|
3145
3167
|
declare type IntersectEnumToTuple<META_ENUM extends EnumType, META_TUPLE extends TupleType> = FilterEnum<META_ENUM, META_TUPLE>;
|
|
@@ -3164,8 +3186,8 @@ declare type IntersectArrays<META_ARRAY_A extends ArrayType, META_ARRAY_B extend
|
|
|
3164
3186
|
declare type IntersectObjectSerializationParams<VALUES extends Record<string, Type>, REQUIRED_KEYS extends string, OPEN_PROPS extends Type, CLOSE_ON_RESOLVE extends boolean, META_OBJECT extends ObjectType, SERIALIZABLE_META_TYPE extends SerializableType> = $MergeObjectPropsToSerializable<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, META_OBJECT, SERIALIZABLE_META_TYPE>;
|
|
3165
3187
|
declare type $MergeObjectPropsToSerializable<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, META_OBJECT extends ObjectType, SERIALIZABLE_META_TYPE extends SerializableType> = _$Object<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, IntersectIsSerialized<META_OBJECT, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_OBJECT, SERIALIZABLE_META_TYPE>>;
|
|
3166
3188
|
declare type IntersectObject<META_OBJECT extends ObjectType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectObjectSerializationParams<ObjectValues<META_OBJECT>, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, META_OBJECT, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToObject<META_TYPE, META_OBJECT> : META_TYPE extends EnumType ? IntersectEnumToObject<META_TYPE, META_OBJECT> : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? Never : META_TYPE extends TupleType ? Never : META_TYPE extends ObjectType ? IntersectObjects<META_OBJECT, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_OBJECT> : Never : Never;
|
|
3167
|
-
declare type IntersectObjects<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, INTERSECTED_VALUES extends Record<string, unknown> = IntersectObjectsValues<META_OBJECT_A, META_OBJECT_B>, INTERSECTED_OPEN_PROPS = Intersect<ObjectOpenProps<META_OBJECT_A>, ObjectOpenProps<META_OBJECT_B>>, INTERSECTED_CLOSE_ON_RESOLVE = Or<IsObjectClosedOnResolve<META_OBJECT_A>, IsObjectClosedOnResolve<META_OBJECT_B>>> = $MergeObjectPropsToSerializable<{ [KEY in keyof INTERSECTED_VALUES]: INTERSECTED_VALUES[KEY] }, ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, INTERSECTED_OPEN_PROPS, INTERSECTED_CLOSE_ON_RESOLVE, META_OBJECT_A, META_OBJECT_B>;
|
|
3168
|
-
declare type IntersectObjectsValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B>, string>]: $Intersect<ObjectValue<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY
|
|
3189
|
+
declare type IntersectObjects<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, INTERSECTED_VALUES extends Record<string, unknown> = IntersectObjectsValues<META_OBJECT_A, META_OBJECT_B>, INTERSECTED_OPEN_PROPS = Intersect<ObjectOpenProps<META_OBJECT_A>, ObjectOpenProps<META_OBJECT_B>>, INTERSECTED_CLOSE_ON_RESOLVE = Or<IsObjectClosedOnResolve<META_OBJECT_A>, IsObjectClosedOnResolve<META_OBJECT_B>>> = $MergeObjectPropsToSerializable<{ [KEY in keyof INTERSECTED_VALUES]: INTERSECTED_VALUES[KEY]; }, ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, INTERSECTED_OPEN_PROPS, INTERSECTED_CLOSE_ON_RESOLVE, META_OBJECT_A, META_OBJECT_B>;
|
|
3190
|
+
declare type IntersectObjectsValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B>, string>]: $Intersect<ObjectValue<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY>>; };
|
|
3169
3191
|
//#endregion
|
|
3170
3192
|
//#region node_modules/ts-algebra/lib/meta-types/intersection/primitive.d.ts
|
|
3171
3193
|
declare type IntersectPrimitiveSerializationParams<META_PRIMITIVE extends PrimitiveType, SERIALIZABLE_META_TYPE extends SerializableType> = Primitive<PrimitiveValue<META_PRIMITIVE>, IntersectIsSerialized<META_PRIMITIVE, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_PRIMITIVE, SERIALIZABLE_META_TYPE>>;
|
|
@@ -3179,7 +3201,7 @@ declare type Intersect<META_TYPE_A extends Type, META_TYPE_B extends Type> = $In
|
|
|
3179
3201
|
declare type $Intersect<META_TYPE_A, META_TYPE_B> = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? IntersectAny<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ConstType ? IntersectConst<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends EnumType ? IntersectEnum<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends PrimitiveType ? IntersectPrimitive<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ArrayType ? IntersectArray<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends TupleType ? IntersectTuple<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ObjectType ? IntersectObject<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends UnionType ? IntersectUnion<META_TYPE_A, META_TYPE_B> : Never;
|
|
3180
3202
|
//#endregion
|
|
3181
3203
|
//#region node_modules/ts-algebra/lib/meta-types/exclusion/union.d.ts
|
|
3182
|
-
declare type ExcludeFromUnion<META_UNION extends UnionType, META_TYPE> = $Union<UnionValues<META_UNION> extends infer META_UNION_VALUE ? _$Exclude<META_UNION_VALUE, META_TYPE> : never>;
|
|
3204
|
+
declare type ExcludeFromUnion<META_UNION extends UnionType, META_TYPE> = $Union<UnionValues<META_UNION> extends (infer META_UNION_VALUE) ? _$Exclude<META_UNION_VALUE, META_TYPE> : never>;
|
|
3183
3205
|
declare type ExcludeUnion<META_TYPE, META_UNION extends UnionType> = If<IsNever<UnionValues<META_UNION>>, META_TYPE, RecurseOnUnionValues<META_TYPE, UnionLast<UnionValues<META_UNION>>, META_UNION>>;
|
|
3184
3206
|
declare type RecurseOnUnionValues<META_TYPE, META_UNION_VALUE, META_UNION extends UnionType> = $Intersect<_$Exclude<META_TYPE, META_UNION_VALUE>, _$Exclude<META_TYPE, $Union<Exclude<UnionValues<META_UNION>, META_UNION_VALUE>>>>;
|
|
3185
3207
|
//#endregion
|
|
@@ -3197,13 +3219,13 @@ declare type CheckNotExtendsResolved<META_CONST extends ConstType, META_TYPE ext
|
|
|
3197
3219
|
}> ? Never : META_CONST;
|
|
3198
3220
|
declare type ExcludeObject<META_CONST extends ConstType, META_OBJECT extends ObjectType> = If<IsObject<ConstValue<META_CONST>>, ObjectRequiredKeys<META_OBJECT> extends keyof ConstValue<META_CONST> ? ExcludeObjectFromConst<META_CONST, META_OBJECT> : META_CONST, META_CONST>;
|
|
3199
3221
|
declare type ExcludeObjectFromConst<META_CONST extends ConstType, META_OBJECT extends ObjectType, EXCLUDED_CONST_VALUES = ExcludeConstValues<ConstValue<META_CONST>, META_OBJECT>> = If<IsNever<RepresentableKeys$1<EXCLUDED_CONST_VALUES>>, Never, META_CONST>;
|
|
3200
|
-
declare type ExcludeConstValues<VALUE, META_OBJECT extends ObjectType> = { [KEY in keyof VALUE]: KEY extends keyof ObjectValues<META_OBJECT> ? _Exclude<Const<VALUE[KEY]>, ObjectValues<META_OBJECT>[KEY]> : IsObjectOpen<META_OBJECT> extends true ? _Exclude<Const<VALUE[KEY]>, ObjectOpenProps<META_OBJECT>> : Const<VALUE[KEY]
|
|
3201
|
-
declare type RepresentableKeys$1<VALUES> = { [KEY in keyof VALUES]: VALUES[KEY] extends Never ? never : KEY }[keyof VALUES];
|
|
3222
|
+
declare type ExcludeConstValues<VALUE, META_OBJECT extends ObjectType> = { [KEY in keyof VALUE]: KEY extends keyof ObjectValues<META_OBJECT> ? _Exclude<Const<VALUE[KEY]>, ObjectValues<META_OBJECT>[KEY]> : IsObjectOpen<META_OBJECT> extends true ? _Exclude<Const<VALUE[KEY]>, ObjectOpenProps<META_OBJECT>> : Const<VALUE[KEY]>; };
|
|
3223
|
+
declare type RepresentableKeys$1<VALUES> = { [KEY in keyof VALUES]: VALUES[KEY] extends Never ? never : KEY; }[keyof VALUES];
|
|
3202
3224
|
//#endregion
|
|
3203
3225
|
//#region node_modules/ts-algebra/lib/meta-types/exclusion/enum.d.ts
|
|
3204
3226
|
declare type ExcludeFromEnum<META_ENUM extends EnumType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ENUM : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends EnumType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends PrimitiveType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends ArrayType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends TupleType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends ObjectType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_ENUM, META_TYPE> : Never : Never;
|
|
3205
3227
|
declare type FilterEnumExcluded<META_ENUM extends EnumType, META_TYPE extends Type> = Enum<FilterEnumExcludedValues<EnumValues<META_ENUM>, META_TYPE>>;
|
|
3206
|
-
declare type FilterEnumExcludedValues<ENUM_VALUES, META_TYPE extends Type> = ENUM_VALUES extends infer ENUM_VALUE ? _Exclude<Const<ENUM_VALUE>, META_TYPE> extends NeverType ? never : ENUM_VALUE : never;
|
|
3228
|
+
declare type FilterEnumExcludedValues<ENUM_VALUES, META_TYPE extends Type> = ENUM_VALUES extends (infer ENUM_VALUE) ? _Exclude<Const<ENUM_VALUE>, META_TYPE> extends NeverType ? never : ENUM_VALUE : never;
|
|
3207
3229
|
declare type ExcludeEnum<META_TYPE extends Type, ENUM_TYPE extends EnumType, ENUM_VALUES = EnumValues<ENUM_TYPE>> = ExcludeEnumValue<META_TYPE, UnionLast<ENUM_VALUES>, ENUM_VALUES>;
|
|
3208
3230
|
declare type ExcludeEnumValue<META_TYPE extends Type, LAST_ENUM_VALUE, ENUM_VALUES> = $Intersect<_Exclude<META_TYPE, Const<LAST_ENUM_VALUE>>, _Exclude<META_TYPE, Enum<Exclude<ENUM_VALUES, LAST_ENUM_VALUE>>>>;
|
|
3209
3231
|
//#endregion
|
|
@@ -3242,18 +3264,18 @@ declare type ExcludeObjects<META_OBJECT_A extends ObjectType, META_OBJECT_B exte
|
|
|
3242
3264
|
onlyOne: PropagateExclusions$1<META_OBJECT_A, VALUE_EXCLUSION_RESULTS>;
|
|
3243
3265
|
none: OmitOmittableKeys<META_OBJECT_A, VALUE_EXCLUSION_RESULTS>;
|
|
3244
3266
|
}[And$1<IsObjectOpen<META_OBJECT_A>, Not$1<DoesExtend$1<OPEN_PROPS_EXCLUSION, NeverType>>> extends true ? "moreThanTwo" : GetUnionLength<REPRESENTABLE_KEYS>] : META_OBJECT_A;
|
|
3245
|
-
declare type ExcludeObjectValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B> | ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, string>]: ValueExclusionResult<ObjectValue<META_OBJECT_A, KEY>, IsAllowedIn<META_OBJECT_A, KEY>, IsRequiredIn<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY>, IsAllowedIn<META_OBJECT_B, KEY>, IsRequiredIn<META_OBJECT_B, KEY
|
|
3267
|
+
declare type ExcludeObjectValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B> | ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, string>]: ValueExclusionResult<ObjectValue<META_OBJECT_A, KEY>, IsAllowedIn<META_OBJECT_A, KEY>, IsRequiredIn<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY>, IsAllowedIn<META_OBJECT_B, KEY>, IsRequiredIn<META_OBJECT_B, KEY>>; };
|
|
3246
3268
|
declare type GetUnionLength<UNION> = If<IsNever<UNION>, "none", If<IsNever<UnionPop<UNION>>, "onlyOne", "moreThanTwo">>;
|
|
3247
3269
|
declare type IsAllowedIn<META_OBJECT extends ObjectType, KEY extends string> = Or<DoesExtend$1<KEY, keyof ObjectValues<META_OBJECT>>, IsObjectOpen<META_OBJECT>>;
|
|
3248
3270
|
declare type IsRequiredIn<META_OBJECT extends ObjectType, KEY extends string> = DoesExtend$1<KEY, ObjectRequiredKeys<META_OBJECT>>;
|
|
3249
3271
|
declare type DoesObjectSizesMatch<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = If<And$1<IsObjectOpen<META_OBJECT_A>, Not$1<IsObjectOpen<META_OBJECT_B>>>, false, And$1<IsExcludedSmallEnough$1<VALUE_EXCLUSION_RESULTS>, IsExcludedBigEnough$1<VALUE_EXCLUSION_RESULTS>>>;
|
|
3250
|
-
declare type IsExcludedSmallEnough$1<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not$1<DoesExtend$1<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfSourceScope<VALUE_EXCLUSION_RESULTS[KEY]
|
|
3251
|
-
declare type IsExcludedBigEnough$1<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not$1<DoesExtend$1<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfExcludedScope<VALUE_EXCLUSION_RESULTS[KEY]
|
|
3252
|
-
declare type RepresentableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: ExclusionResult<VALUE_EXCLUSION_RESULTS[KEY]> extends NeverType ? never : KEY }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
|
|
3253
|
-
declare type PropagateExclusions$1<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: PropagateExclusion<VALUE_EXCLUSION_RESULTS[KEY]
|
|
3254
|
-
declare type OmitOmittableKeys<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>, OMITTABLE_KEYS extends string = OmittableKeys<VALUE_EXCLUSION_RESULTS>, OMITTABLE_KEYS_COUNT extends string = GetUnionLength<OMITTABLE_KEYS>> = OMITTABLE_KEYS_COUNT extends "moreThanTwo" ? META_OBJECT : OMITTABLE_KEYS_COUNT extends "onlyOne" ? _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: KEY extends OMITTABLE_KEYS ? Never : SourceValue<VALUE_EXCLUSION_RESULTS[KEY]
|
|
3255
|
-
declare type OmittableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: IsOmittable<VALUE_EXCLUSION_RESULTS[KEY]> extends true ? KEY : never }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
|
|
3256
|
-
declare type ExcludeConstFromObject<META_OBJECT extends ObjectType, META_CONST extends ConstType, CONST_VALUE = ConstValue<META_CONST>> = If<IsObject<CONST_VALUE>, _$Exclude<META_OBJECT, _Object<{ [KEY in Extract<keyof CONST_VALUE, string>]: Const<CONST_VALUE[KEY]
|
|
3272
|
+
declare type IsExcludedSmallEnough$1<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not$1<DoesExtend$1<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfSourceScope<VALUE_EXCLUSION_RESULTS[KEY]>; }[keyof VALUE_EXCLUSION_RESULTS]>>;
|
|
3273
|
+
declare type IsExcludedBigEnough$1<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not$1<DoesExtend$1<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfExcludedScope<VALUE_EXCLUSION_RESULTS[KEY]>; }[keyof VALUE_EXCLUSION_RESULTS]>>;
|
|
3274
|
+
declare type RepresentableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: ExclusionResult<VALUE_EXCLUSION_RESULTS[KEY]> extends NeverType ? never : KEY; }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
|
|
3275
|
+
declare type PropagateExclusions$1<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: PropagateExclusion<VALUE_EXCLUSION_RESULTS[KEY]>; }, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_OBJECT>, Deserialized<META_OBJECT>>;
|
|
3276
|
+
declare type OmitOmittableKeys<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>, OMITTABLE_KEYS extends string = OmittableKeys<VALUE_EXCLUSION_RESULTS>, OMITTABLE_KEYS_COUNT extends string = GetUnionLength<OMITTABLE_KEYS>> = OMITTABLE_KEYS_COUNT extends "moreThanTwo" ? META_OBJECT : OMITTABLE_KEYS_COUNT extends "onlyOne" ? _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: KEY extends OMITTABLE_KEYS ? Never : SourceValue<VALUE_EXCLUSION_RESULTS[KEY]>; }, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_OBJECT>, Deserialized<META_OBJECT>> : Never;
|
|
3277
|
+
declare type OmittableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: IsOmittable<VALUE_EXCLUSION_RESULTS[KEY]> extends true ? KEY : never; }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
|
|
3278
|
+
declare type ExcludeConstFromObject<META_OBJECT extends ObjectType, META_CONST extends ConstType, CONST_VALUE = ConstValue<META_CONST>> = If<IsObject<CONST_VALUE>, _$Exclude<META_OBJECT, _Object<{ [KEY in Extract<keyof CONST_VALUE, string>]: Const<CONST_VALUE[KEY]>; }, Extract<keyof CONST_VALUE, string>, Never, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_CONST>, Deserialized<META_CONST>>>, META_OBJECT>;
|
|
3257
3279
|
//#endregion
|
|
3258
3280
|
//#region node_modules/ts-algebra/lib/meta-types/exclusion/primitive.d.ts
|
|
3259
3281
|
declare type ExcludeFromPrimitive<META_PRIMITIVE extends PrimitiveType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_PRIMITIVE : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_PRIMITIVE : META_TYPE extends EnumType ? META_PRIMITIVE : META_TYPE extends PrimitiveType ? PrimitiveValue<META_PRIMITIVE> extends PrimitiveValue<META_TYPE> ? Never : META_PRIMITIVE : META_TYPE extends ArrayType ? META_PRIMITIVE : META_TYPE extends TupleType ? META_PRIMITIVE : META_TYPE extends ObjectType ? META_PRIMITIVE : META_TYPE extends UnionType ? ExcludeUnion<META_PRIMITIVE, META_TYPE> : Never : Never;
|
|
@@ -3282,6 +3304,9 @@ declare type ExtractConstValues<CONST_VALUES extends unknown[], RESULT extends u
|
|
|
3282
3304
|
//#region node_modules/ts-algebra/lib/meta-types/exclusion/index.d.ts
|
|
3283
3305
|
declare type _Exclude<META_TYPE_A extends Type, META_TYPE_B extends Type> = _$Exclude<META_TYPE_A, META_TYPE_B>;
|
|
3284
3306
|
declare type _$Exclude<META_TYPE_A, META_TYPE_B> = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? ExcludeFromAny<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ConstType ? ExcludeFromConst<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends EnumType ? ExcludeFromEnum<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends PrimitiveType ? ExcludeFromPrimitive<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ArrayType ? ExcludeFromArray<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends TupleType ? ExcludeFromTuple<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ObjectType ? ExcludeFromObject<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends UnionType ? ExcludeFromUnion<META_TYPE_A, META_TYPE_B> : Never;
|
|
3307
|
+
declare namespace index_d_exports {
|
|
3308
|
+
export { _$Array as $Array, _$Exclude as $Exclude, $Intersect, _$Object as $Object, $Primitive, $Resolve, $Tuple, $Union, Any, AnyType, _Array as Array, ArrayType, Const, ConstType, Enum, EnumType, _Exclude as Exclude, Intersect, Never, NeverType, _Object as Object, ObjectType, Primitive, PrimitiveType, Resolve, Tuple, TupleType, Type, Union, UnionType };
|
|
3309
|
+
}
|
|
3285
3310
|
//#endregion
|
|
3286
3311
|
//#region node_modules/json-schema-to-ts/lib/types/definitions/deserializationPattern.d.ts
|
|
3287
3312
|
type DeserializationPattern = Readonly<{
|
|
@@ -3365,7 +3390,7 @@ type FromSchemaDefaultOptions = {
|
|
|
3365
3390
|
};
|
|
3366
3391
|
//#endregion
|
|
3367
3392
|
//#region node_modules/json-schema-to-ts/lib/types/parse-options.d.ts
|
|
3368
|
-
type IndexReferencesById<SCHEMA_REFERENCES extends readonly JSONSchemaReference[]> = { [REF_SCHEMA in SCHEMA_REFERENCES[number] as REF_SCHEMA["$id"]]: REF_SCHEMA };
|
|
3393
|
+
type IndexReferencesById<SCHEMA_REFERENCES extends readonly JSONSchemaReference[]> = { [REF_SCHEMA in SCHEMA_REFERENCES[number] as REF_SCHEMA["$id"]]: REF_SCHEMA; };
|
|
3369
3394
|
type ParseOptions<ROOT_SCHEMA extends JSONSchema$1, OPTIONS extends FromSchemaOptions> = {
|
|
3370
3395
|
parseNotKeyword: OPTIONS["parseNotKeyword"] extends boolean ? OPTIONS["parseNotKeyword"] : FromSchemaDefaultOptions["parseNotKeyword"];
|
|
3371
3396
|
parseIfThenElseKeywords: OPTIONS["parseIfThenElseKeywords"] extends boolean ? OPTIONS["parseIfThenElseKeywords"] : FromSchemaDefaultOptions["parseIfThenElseKeywords"];
|
|
@@ -3401,7 +3426,7 @@ type Split<STRING extends string, SEPARATOR extends string = "", RESULT extends
|
|
|
3401
3426
|
type Tail$1<ARRAY extends unknown[]> = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer ARRAY_TAIL] ? ARRAY_TAIL : ARRAY;
|
|
3402
3427
|
//#endregion
|
|
3403
3428
|
//#region node_modules/json-schema-to-ts/lib/types/type-utils/writable.d.ts
|
|
3404
|
-
type Writable<TYPE> = TYPE extends ((...args: unknown[]) => unknown) | Date | RegExp ? TYPE : TYPE extends ReadonlyMap<infer KEYS, infer VALUES> ? Map<Writable<KEYS>, Writable<VALUES>> : TYPE extends ReadonlySet<infer VALUES> ? Set<Writable<VALUES>> : TYPE extends ReadonlyArray<unknown> ? `${bigint}` extends `${keyof TYPE & any}` ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]
|
|
3429
|
+
type Writable<TYPE> = TYPE extends ((...args: unknown[]) => unknown) | Date | RegExp ? TYPE : TYPE extends ReadonlyMap<infer KEYS, infer VALUES> ? Map<Writable<KEYS>, Writable<VALUES>> : TYPE extends ReadonlySet<infer VALUES> ? Set<Writable<VALUES>> : TYPE extends ReadonlyArray<unknown> ? `${bigint}` extends `${keyof TYPE & any}` ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]>; } : Writable<TYPE[number]>[] : TYPE extends object ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]>; } : TYPE;
|
|
3405
3430
|
//#endregion
|
|
3406
3431
|
//#region node_modules/json-schema-to-ts/lib/types/parse-schema/utils.d.ts
|
|
3407
3432
|
type RemoveInvalidAdditionalItems<SCHEMA extends JSONSchema$1> = SCHEMA extends Readonly<{
|
|
@@ -3460,11 +3485,11 @@ type IfThenElseSchema = JSONSchema$1 & {
|
|
|
3460
3485
|
then?: JSONSchema$1;
|
|
3461
3486
|
else?: JSONSchema$1;
|
|
3462
3487
|
};
|
|
3463
|
-
type ParseIfThenElseSchema<IF_THEN_ELSE_SCHEMA extends IfThenElseSchema, OPTIONS extends ParseSchemaOptions, REST_SCHEMA extends JSONSchema$1 = Omit<IF_THEN_ELSE_SCHEMA, "if" | "then" | "else">, IF_SCHEMA extends JSONSchema$1 = MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["if"]>, PARSED_THEN_SCHEMA =
|
|
3488
|
+
type ParseIfThenElseSchema<IF_THEN_ELSE_SCHEMA extends IfThenElseSchema, OPTIONS extends ParseSchemaOptions, REST_SCHEMA extends JSONSchema$1 = Omit<IF_THEN_ELSE_SCHEMA, "if" | "then" | "else">, IF_SCHEMA extends JSONSchema$1 = MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["if"]>, PARSED_THEN_SCHEMA = IF_THEN_ELSE_SCHEMA extends {
|
|
3464
3489
|
then: JSONSchema$1;
|
|
3465
|
-
} ? $Intersect<ParseSchema<IF_SCHEMA, OPTIONS>, ParseSchema<MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["then"]>, OPTIONS>> : ParseSchema<IF_SCHEMA, OPTIONS
|
|
3490
|
+
} ? $Intersect<ParseSchema<IF_SCHEMA, OPTIONS>, ParseSchema<MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["then"]>, OPTIONS>> : ParseSchema<IF_SCHEMA, OPTIONS>, PARSED_ELSE_SCHEMA = IF_THEN_ELSE_SCHEMA extends {
|
|
3466
3491
|
else: JSONSchema$1;
|
|
3467
|
-
} ? $Intersect<_$Exclude<ParseSchema<REST_SCHEMA, OPTIONS>, ParseSchema<IF_SCHEMA, OPTIONS>>, ParseSchema<MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["else"]>, OPTIONS>> : _$Exclude<ParseSchema<REST_SCHEMA, OPTIONS>, ParseSchema<IF_SCHEMA, OPTIONS
|
|
3492
|
+
} ? $Intersect<_$Exclude<ParseSchema<REST_SCHEMA, OPTIONS>, ParseSchema<IF_SCHEMA, OPTIONS>>, ParseSchema<MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["else"]>, OPTIONS>> : _$Exclude<ParseSchema<REST_SCHEMA, OPTIONS>, ParseSchema<IF_SCHEMA, OPTIONS>>> = $Intersect<$Union<PARSED_THEN_SCHEMA | PARSED_ELSE_SCHEMA>, ParseSchema<REST_SCHEMA, OPTIONS>>;
|
|
3468
3493
|
//#endregion
|
|
3469
3494
|
//#region node_modules/json-schema-to-ts/lib/types/parse-schema/multipleTypes.d.ts
|
|
3470
3495
|
type MultipleTypesSchema = JSONSchema$1 & Readonly<{
|
|
@@ -3498,10 +3523,10 @@ type ParseOneOfSchema<ONE_OF_SCHEMA extends OneOfSchema, OPTIONS extends ParseSc
|
|
|
3498
3523
|
type RecurseOnOneOfSchema<SUB_SCHEMAS extends readonly JSONSchema$1[], ROOT_ONE_OF_SCHEMA extends OneOfSchema, OPTIONS extends ParseSchemaOptions, RESULT = never> = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnOneOfSchema<SUB_SCHEMAS_TAIL, ROOT_ONE_OF_SCHEMA, OPTIONS, RESULT | $Intersect<ParseSchema<Omit<ROOT_ONE_OF_SCHEMA, "oneOf">, OPTIONS>, ParseSchema<MergeSubSchema<Omit<ROOT_ONE_OF_SCHEMA, "oneOf">, SUB_SCHEMAS_HEAD>, OPTIONS>>> : never : never : RESULT;
|
|
3499
3524
|
//#endregion
|
|
3500
3525
|
//#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/utils.d.ts
|
|
3501
|
-
type ParseReference<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions, REFERENCE_SOURCE extends JSONSchema$1, PATH_IN_SOURCE extends string | undefined, MATCHING_REFERENCE extends JSONSchema$1 =
|
|
3526
|
+
type ParseReference<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions, REFERENCE_SOURCE extends JSONSchema$1, PATH_IN_SOURCE extends string | undefined, MATCHING_REFERENCE extends JSONSchema$1 = PATH_IN_SOURCE extends string ? DeepGet<REFERENCE_SOURCE, Tail$1<Split<PATH_IN_SOURCE, "/">>, false> : REFERENCE_SOURCE> = $Intersect<ParseSchema<MATCHING_REFERENCE, OPTIONS>, ParseSchema<MergeSubSchema<MATCHING_REFERENCE, SCHEMA>, OPTIONS>>;
|
|
3502
3527
|
//#endregion
|
|
3503
3528
|
//#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/external.d.ts
|
|
3504
|
-
type ParseExternalReferenceSchema<REF_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, EXTERNAL_REFERENCE_ID extends string, SUB_PATH extends string | undefined> = OPTIONS["references"] extends { [KEY in EXTERNAL_REFERENCE_ID]: JSONSchema$1 } ? ParseReference<Omit<REF_SCHEMA, "$ref">, OPTIONS, OPTIONS["references"][EXTERNAL_REFERENCE_ID], SUB_PATH> : OPTIONS extends {
|
|
3529
|
+
type ParseExternalReferenceSchema<REF_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, EXTERNAL_REFERENCE_ID extends string, SUB_PATH extends string | undefined> = OPTIONS["references"] extends { [KEY in EXTERNAL_REFERENCE_ID]: JSONSchema$1; } ? ParseReference<Omit<REF_SCHEMA, "$ref">, OPTIONS, OPTIONS["references"][EXTERNAL_REFERENCE_ID], SUB_PATH> : OPTIONS extends {
|
|
3505
3530
|
rootSchema: IdSchema;
|
|
3506
3531
|
} ? ParseExternalReferenceWithoutDirectorySchema<Omit<REF_SCHEMA, "$ref">, OPTIONS, EXTERNAL_REFERENCE_ID, SUB_PATH> : Never;
|
|
3507
3532
|
type ParseDirectory<REFERENCE extends string> = Join<Pop<Split<REFERENCE, "/">>, "/">;
|
|
@@ -3572,14 +3597,14 @@ type ObjectSchema$1 = JSONSchema$1 & Readonly<{
|
|
|
3572
3597
|
}>;
|
|
3573
3598
|
type ParseObjectSchema<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSchemaOptions> = OBJECT_SCHEMA extends Readonly<{
|
|
3574
3599
|
properties: Readonly<Record<string, JSONSchema$1>>;
|
|
3575
|
-
}> ? _$Object<{ [KEY in keyof OBJECT_SCHEMA["properties"]]: ParseSchema<OBJECT_SCHEMA["properties"][KEY], OPTIONS
|
|
3600
|
+
}> ? _$Object<{ [KEY in keyof OBJECT_SCHEMA["properties"]]: ParseSchema<OBJECT_SCHEMA["properties"][KEY], OPTIONS>; }, GetRequired<OBJECT_SCHEMA, OPTIONS>, GetOpenProps<OBJECT_SCHEMA, OPTIONS>, GetClosedOnResolve<OBJECT_SCHEMA>> : _$Object<{}, GetRequired<OBJECT_SCHEMA, OPTIONS>, GetOpenProps<OBJECT_SCHEMA, OPTIONS>, GetClosedOnResolve<OBJECT_SCHEMA>>;
|
|
3576
3601
|
type GetRequired<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSchemaOptions> = (OBJECT_SCHEMA extends Readonly<{
|
|
3577
3602
|
required: ReadonlyArray<string>;
|
|
3578
3603
|
}> ? OBJECT_SCHEMA["required"][number] : never) | (OPTIONS["keepDefaultedPropertiesOptional"] extends true ? never : OBJECT_SCHEMA extends Readonly<{
|
|
3579
3604
|
properties: Readonly<Record<string, JSONSchema$1>>;
|
|
3580
3605
|
}> ? { [KEY in keyof OBJECT_SCHEMA["properties"] & string]: OBJECT_SCHEMA["properties"][KEY] extends Readonly<{
|
|
3581
3606
|
default: unknown;
|
|
3582
|
-
}> ? KEY : never }[keyof OBJECT_SCHEMA["properties"] & string] : never);
|
|
3607
|
+
}> ? KEY : never; }[keyof OBJECT_SCHEMA["properties"] & string] : never);
|
|
3583
3608
|
type GetOpenProps<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSchemaOptions> = OBJECT_SCHEMA extends Readonly<{
|
|
3584
3609
|
additionalProperties: JSONSchema$1;
|
|
3585
3610
|
}> ? OBJECT_SCHEMA extends Readonly<{
|
|
@@ -3590,8 +3615,8 @@ type GetOpenProps<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSch
|
|
|
3590
3615
|
type GetClosedOnResolve<OBJECT_SCHEMA extends ObjectSchema$1> = OBJECT_SCHEMA extends Readonly<{
|
|
3591
3616
|
unevaluatedProperties: false;
|
|
3592
3617
|
}> ? true : false;
|
|
3593
|
-
type PatternProps<PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema$1>>, OPTIONS extends ParseSchemaOptions> = $Union<{ [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS
|
|
3594
|
-
type AdditionalAndPatternProps<ADDITIONAL_PROPERTIES_SCHEMA extends JSONSchema$1, PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema$1>>, OPTIONS extends ParseSchemaOptions> = ADDITIONAL_PROPERTIES_SCHEMA extends boolean ? PatternProps<PATTERN_PROPERTY_SCHEMAS, OPTIONS> : $Union<ParseSchema<ADDITIONAL_PROPERTIES_SCHEMA, OPTIONS> | { [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS
|
|
3618
|
+
type PatternProps<PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema$1>>, OPTIONS extends ParseSchemaOptions> = $Union<{ [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS>; }[keyof PATTERN_PROPERTY_SCHEMAS]>;
|
|
3619
|
+
type AdditionalAndPatternProps<ADDITIONAL_PROPERTIES_SCHEMA extends JSONSchema$1, PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema$1>>, OPTIONS extends ParseSchemaOptions> = ADDITIONAL_PROPERTIES_SCHEMA extends boolean ? PatternProps<PATTERN_PROPERTY_SCHEMAS, OPTIONS> : $Union<ParseSchema<ADDITIONAL_PROPERTIES_SCHEMA, OPTIONS> | { [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS>; }[keyof PATTERN_PROPERTY_SCHEMAS]>;
|
|
3595
3620
|
//#endregion
|
|
3596
3621
|
//#region node_modules/json-schema-to-ts/lib/types/parse-schema/singleType.d.ts
|
|
3597
3622
|
type SingleTypeSchema = JSONSchema$1 & Readonly<{
|
|
@@ -3618,7 +3643,7 @@ type ParseSchemaOptions = {
|
|
|
3618
3643
|
references: Record<string, JSONSchema$1>;
|
|
3619
3644
|
deserialize: DeserializationPattern[] | false;
|
|
3620
3645
|
};
|
|
3621
|
-
type ParseSchema<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions, RESULT =
|
|
3646
|
+
type ParseSchema<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions, RESULT = JSONSchema$1 extends SCHEMA ? Any : SCHEMA extends true | string ? Any : SCHEMA extends false ? Never : SCHEMA extends NullableSchema ? ParseNullableSchema<SCHEMA, OPTIONS> : SCHEMA extends ReferencingSchema ? ParseReferenceSchema<SCHEMA, OPTIONS> : And<DoesExtend<OPTIONS["parseIfThenElseKeywords"], true>, DoesExtend<SCHEMA, IfThenElseSchema>> extends true ? SCHEMA extends IfThenElseSchema ? ParseIfThenElseSchema<SCHEMA, OPTIONS> : never : And<DoesExtend<OPTIONS["parseNotKeyword"], true>, DoesExtend<SCHEMA, NotSchema>> extends true ? SCHEMA extends NotSchema ? ParseNotSchema<SCHEMA, OPTIONS> : never : SCHEMA extends AllOfSchema ? ParseAllOfSchema<SCHEMA, OPTIONS> : SCHEMA extends OneOfSchema ? ParseOneOfSchema<SCHEMA, OPTIONS> : SCHEMA extends AnyOfSchema ? ParseAnyOfSchema<SCHEMA, OPTIONS> : SCHEMA extends EnumSchema ? ParseEnumSchema<SCHEMA, OPTIONS> : SCHEMA extends ConstSchema ? ParseConstSchema<SCHEMA, OPTIONS> : SCHEMA extends MultipleTypesSchema ? ParseMultipleTypesSchema<SCHEMA, OPTIONS> : SCHEMA extends SingleTypeSchema ? ParseSingleTypeSchema<SCHEMA, OPTIONS> : Any> = OPTIONS extends {
|
|
3622
3647
|
deserialize: DeserializationPattern[];
|
|
3623
3648
|
} ? $Intersect<DeserializeSchema<SCHEMA, OPTIONS>, RESULT> : RESULT;
|
|
3624
3649
|
//#endregion
|
|
@@ -3762,7 +3787,7 @@ type ServerAdapterInitialContext = {
|
|
|
3762
3787
|
};
|
|
3763
3788
|
//#endregion
|
|
3764
3789
|
//#region node_modules/fets/typings/types.d.ts
|
|
3765
|
-
type StatusCodeMap$1<T> = { [TKey in StatusCode$1]?: T };
|
|
3790
|
+
type StatusCodeMap$1<T> = { [TKey in StatusCode$1]?: T; };
|
|
3766
3791
|
//#endregion
|
|
3767
3792
|
//#region node_modules/fets/typings/typed-fetch.d.ts
|
|
3768
3793
|
type OkStatusCode$1 = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
|
|
@@ -4044,7 +4069,7 @@ type TypedResponse<TJSON = unknown, THeaders extends Record<string, string> = Re
|
|
|
4044
4069
|
*/
|
|
4045
4070
|
ok: TStatusCode extends OkStatusCode ? true : false;
|
|
4046
4071
|
};
|
|
4047
|
-
type TypedResponseWithJSONStatusMap<TResponseJSONStatusMap extends StatusCodeMap$1<any>> = { [TStatusCode in keyof TResponseJSONStatusMap]: TStatusCode extends StatusCode ? TypedResponse<TResponseJSONStatusMap[TStatusCode], Record<string, string>, TStatusCode> : never }[keyof TResponseJSONStatusMap];
|
|
4072
|
+
type TypedResponseWithJSONStatusMap<TResponseJSONStatusMap extends StatusCodeMap$1<any>> = { [TStatusCode in keyof TResponseJSONStatusMap]: TStatusCode extends StatusCode ? TypedResponse<TResponseJSONStatusMap[TStatusCode], Record<string, string>, TStatusCode> : never; }[keyof TResponseJSONStatusMap];
|
|
4048
4073
|
type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE';
|
|
4049
4074
|
type TypedRequest<TJSON = any, TFormData extends Record<string, FormDataEntryValue | undefined> = Record<string, FormDataEntryValue | undefined>, THeaders extends Record<string, string | undefined> = Record<string, string | undefined>, TMethod extends HTTPMethod = HTTPMethod, TQueryParams = any, TPathParams extends Record<string, any> = Record<string, any>> = Omit<Request, 'json' | 'method' | 'headers' | 'formData'> & TypedBody<TJSON, TFormData, THeaders> & {
|
|
4050
4075
|
parsedUrl: URL;
|
|
@@ -4070,7 +4095,7 @@ interface TypedFormData<TMap extends Record<string, FormDataEntryValue | undefin
|
|
|
4070
4095
|
type ClientRequestInit = Omit<RequestInit, 'body' | 'method' | 'headers'>;
|
|
4071
4096
|
//#endregion
|
|
4072
4097
|
//#region node_modules/fets/typings/types.d.cts
|
|
4073
|
-
type Simplify<T> = { [KeyType in keyof T]: Simplify<T[KeyType]
|
|
4098
|
+
type Simplify<T> = { [KeyType in keyof T]: Simplify<T[KeyType]>; } & {};
|
|
4074
4099
|
type JSONSchema = Exclude<JSONSchema$1, boolean>;
|
|
4075
4100
|
interface OpenAPIInfo {
|
|
4076
4101
|
title?: string;
|
|
@@ -4156,7 +4181,7 @@ type ArrayItemValue<TJSONSchema extends JSONSchema> = TJSONSchema extends {
|
|
|
4156
4181
|
} ? TItems : never;
|
|
4157
4182
|
type HasCircularAnyOfRef<T extends JSONSchema> = T extends {
|
|
4158
4183
|
properties: Record<string, JSONSchema>;
|
|
4159
|
-
} ? true extends { [K in keyof T['properties']]: PropIntroducesCycle<T['properties'][K], T
|
|
4184
|
+
} ? true extends { [K in keyof T['properties']]: PropIntroducesCycle<T['properties'][K], T>; }[keyof T['properties']] ? true : false : false;
|
|
4160
4185
|
type PropIntroducesCycle<S, Root> = S extends {
|
|
4161
4186
|
anyOf: infer Items extends readonly JSONSchema[];
|
|
4162
4187
|
} ? TupleIntroducesCycle<Items, Root> : S extends {
|
|
@@ -4167,7 +4192,7 @@ type PropIntroducesCycle<S, Root> = S extends {
|
|
|
4167
4192
|
$id: string;
|
|
4168
4193
|
} ? false : S extends {
|
|
4169
4194
|
properties: infer P extends Record<string, JSONSchema>;
|
|
4170
|
-
} ? true extends { [K in keyof P]: PropIntroducesCycle<P[K], Root
|
|
4195
|
+
} ? true extends { [K in keyof P]: PropIntroducesCycle<P[K], Root>; }[keyof P] ? true : AdditionalPropertiesCycle<S, Root> : AdditionalPropertiesCycle<S, Root>;
|
|
4171
4196
|
type AdditionalPropertiesCycle<S, Root> = S extends {
|
|
4172
4197
|
additionalProperties: infer AP extends JSONSchema;
|
|
4173
4198
|
} ? PropIntroducesCycle<AP, Root> : false;
|
|
@@ -4177,7 +4202,7 @@ type MemberIntroducesCycle<Item, Root> = Item extends {
|
|
|
4177
4202
|
} ? [Item] extends [Root] ? true : HasSelfCircularAnyOf<Item> : false;
|
|
4178
4203
|
type HasSelfCircularAnyOf<T> = T extends {
|
|
4179
4204
|
properties: Record<string, JSONSchema>;
|
|
4180
|
-
} ? true extends { [K in keyof T['properties']]: DirectSelfAnyOf<T['properties'][K], T
|
|
4205
|
+
} ? true extends { [K in keyof T['properties']]: DirectSelfAnyOf<T['properties'][K], T>; }[keyof T['properties']] ? true : false : false;
|
|
4181
4206
|
type DirectSelfAnyOf<S, Root> = S extends {
|
|
4182
4207
|
anyOf: infer Items extends readonly JSONSchema[];
|
|
4183
4208
|
} ? TupleHasSelf<Items, Root> : S extends {
|
|
@@ -4188,7 +4213,7 @@ type DirectSelfAnyOf<S, Root> = S extends {
|
|
|
4188
4213
|
$id: string;
|
|
4189
4214
|
} ? false : S extends {
|
|
4190
4215
|
properties: infer P extends Record<string, JSONSchema>;
|
|
4191
|
-
} ? true extends { [K in keyof P]: DirectSelfAnyOf<P[K], Root
|
|
4216
|
+
} ? true extends { [K in keyof P]: DirectSelfAnyOf<P[K], Root>; }[keyof P] ? true : AdditionalPropertiesSelf<S, Root> : AdditionalPropertiesSelf<S, Root>;
|
|
4192
4217
|
type AdditionalPropertiesSelf<S, Root> = S extends {
|
|
4193
4218
|
additionalProperties: infer AP extends JSONSchema;
|
|
4194
4219
|
} ? DirectSelfAnyOf<AP, Root> : false;
|
|
@@ -4246,7 +4271,7 @@ type DirectTypeValue<T extends JSONSchema> = T extends {
|
|
|
4246
4271
|
} ? AP extends false ? Record<string, never> : DirectIndexSignature<AP> : T extends {
|
|
4247
4272
|
type: 'object';
|
|
4248
4273
|
} ? Record<string, unknown> : unknown;
|
|
4249
|
-
type DirectNamedProps<Props extends Record<string, JSONSchema>, Req extends readonly string[] | undefined = undefined> = [Req] extends [readonly string[]] ? { [K in Extract<keyof Props, Req[number]>]: DirectType<Props[K]
|
|
4274
|
+
type DirectNamedProps<Props extends Record<string, JSONSchema>, Req extends readonly string[] | undefined = undefined> = [Req] extends [readonly string[]] ? { [K in Extract<keyof Props, Req[number]>]: DirectType<Props[K]>; } & { [K in Exclude<keyof Props, Req[number]>]?: DirectType<Props[K]>; } : { [K in keyof Props]?: DirectType<Props[K]>; };
|
|
4250
4275
|
type DirectIndexSignature<AP> = AP extends false ? unknown : AP extends true ? Record<string, unknown> : AP extends JSONSchema ? Record<string, DirectType<AP>> : Record<string, unknown>;
|
|
4251
4276
|
type DirectUnionType<Items extends readonly JSONSchema[]> = Items extends readonly [infer Head extends JSONSchema, ...infer Tail extends readonly JSONSchema[]] ? DirectType<Head> | DirectUnionType<Tail> : never;
|
|
4252
4277
|
type DirectIntersectionType<Items extends readonly JSONSchema[]> = Items extends readonly [infer Head extends JSONSchema, ...infer Tail extends readonly JSONSchema[]] ? DirectType<Head> & DirectIntersectionType<Tail> : unknown;
|
|
@@ -4275,14 +4300,14 @@ type FromSchema<T> = T extends {
|
|
|
4275
4300
|
}];
|
|
4276
4301
|
}> : never;
|
|
4277
4302
|
type PromiseOrValue<T> = T | Promise<T>;
|
|
4278
|
-
type StatusCodeMap<T> = { [TKey in StatusCode]?: T };
|
|
4303
|
+
type StatusCodeMap<T> = { [TKey in StatusCode]?: T; };
|
|
4279
4304
|
interface RouterBaseObject<TServerContext, TComponents extends RouterComponentsBase, TRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>> {
|
|
4280
4305
|
openAPIDocument: OpenAPIDocument;
|
|
4281
4306
|
handle: ServerAdapterRequestHandler<TServerContext>;
|
|
4282
4307
|
route<const TRouteSchemas extends RouteSchemas, TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequestFromRouteSchemas<TComponents, TRouteSchemas, TMethod, TPath>, TTypedResponse extends TypedResponseFromRouteSchemas<TComponents, TRouteSchemas>>(opts: RouteWithSchemasOpts<TServerContext, TComponents, TRouteSchemas, TMethod, TPath, TTypedRequest, TTypedResponse>): Router<TServerContext, TComponents, TRouterSDK & RouterSDK<TPath, TTypedRequest, TTypedResponse>>;
|
|
4283
4308
|
route<TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequest<any, Record<string, FormDataEntryValue | undefined>, Record<string, string | undefined>, TMethod, any, Record<ExtractPathParamsWithPattern<TPath>, string>>, TTypedResponse extends TypedResponse>(opts: RouteWithTypesOpts<TServerContext, TMethod, TPath, TTypedRequest, TTypedResponse>): Router<TServerContext, TComponents, TRouterSDK & RouterSDK<TPath, TTypedRequest, TTypedResponse>>;
|
|
4284
4309
|
use<TSubServerContext, TSubComponents extends RouterComponentsBase, TSubRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>>(subRouter: Router<TSubServerContext, TSubComponents, TSubRouterSDK>): Router<TServerContext, TComponents, TRouterSDK & TSubRouterSDK>;
|
|
4285
|
-
use<const TPrefix extends string, TSubServerContext, TSubComponents extends RouterComponentsBase, TSubRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>>(prefix: TPrefix, subRouter: Router<TSubServerContext, TSubComponents, TSubRouterSDK>): Router<TServerContext, TComponents, TRouterSDK & { [TKey in keyof TSubRouterSDK as TKey extends string ? `${TPrefix}${TKey}` : TKey]: TSubRouterSDK[TKey] }>;
|
|
4310
|
+
use<const TPrefix extends string, TSubServerContext, TSubComponents extends RouterComponentsBase, TSubRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>>(prefix: TPrefix, subRouter: Router<TSubServerContext, TSubComponents, TSubRouterSDK>): Router<TServerContext, TComponents, TRouterSDK & { [TKey in keyof TSubRouterSDK as TKey extends string ? `${TPrefix}${TKey}` : TKey]: TSubRouterSDK[TKey]; }>;
|
|
4286
4311
|
__client: TRouterSDK;
|
|
4287
4312
|
__onRouterInitHooks: OnRouterInitHook<TServerContext>[];
|
|
4288
4313
|
__routes: RouteWithSchemasOpts<any, RouterComponentsBase, RouteSchemas, HTTPMethod, string, TypedRequest, TypedResponse>[];
|
|
@@ -4294,7 +4319,6 @@ type RouteHandler<TServerContext = {}, TTypedRequest extends TypedRequest = Type
|
|
|
4294
4319
|
* The request object represents the incoming HTTP request.
|
|
4295
4320
|
* This object implements [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) interface.
|
|
4296
4321
|
*/
|
|
4297
|
-
|
|
4298
4322
|
request: TTypedRequest, context: TServerContext) => PromiseOrValue<TTypedResponse>;
|
|
4299
4323
|
type OnRouterInitHook<TServerContext> = (router: Router<TServerContext, any, any>) => void;
|
|
4300
4324
|
type ObjectSchemaWithPrimitiveProperties = JSONSchema & {
|
|
@@ -4337,7 +4361,7 @@ type RouterSDKOpts<TTypedRequest extends TypedRequest = TypedRequest, TMethod ex
|
|
|
4337
4361
|
} : {
|
|
4338
4362
|
formData: TFormData;
|
|
4339
4363
|
}) : never;
|
|
4340
|
-
type RouterSDK<TPath extends string = string, TTypedRequest extends TypedRequest = TypedRequest, TTypedResponse extends TypedResponse = TypedResponse> = { [TPathKey in TPath]: { [TMethod in Lowercase<TTypedRequest['method']>]: Partial<RouterSDKOpts<TTypedRequest, TTypedRequest['method']>> extends RouterSDKOpts<TTypedRequest, TTypedRequest['method']> ? (opts?: RouterSDKOpts<TTypedRequest, TTypedRequest['method']> & ClientRequestInit) => ClientTypedResponsePromise<Exclude<TTypedResponse, undefined>> : (opts: RouterSDKOpts<TTypedRequest, TTypedRequest['method']> & ClientRequestInit) => ClientTypedResponsePromise<Exclude<TTypedResponse, undefined
|
|
4364
|
+
type RouterSDK<TPath extends string = string, TTypedRequest extends TypedRequest = TypedRequest, TTypedResponse extends TypedResponse = TypedResponse> = { [TPathKey in TPath]: { [TMethod in Lowercase<TTypedRequest['method']>]: Partial<RouterSDKOpts<TTypedRequest, TTypedRequest['method']>> extends RouterSDKOpts<TTypedRequest, TTypedRequest['method']> ? (opts?: RouterSDKOpts<TTypedRequest, TTypedRequest['method']> & ClientRequestInit) => ClientTypedResponsePromise<Exclude<TTypedResponse, undefined>> : (opts: RouterSDKOpts<TTypedRequest, TTypedRequest['method']> & ClientRequestInit) => ClientTypedResponsePromise<Exclude<TTypedResponse, undefined>>; }; };
|
|
4341
4365
|
type FromSchemaWithComponents<TComponents, TSchema extends JSONSchema> = TComponents extends {
|
|
4342
4366
|
schemas: Record<string, JSONSchema>;
|
|
4343
4367
|
} ? FromSchema<{
|
|
@@ -4358,7 +4382,7 @@ type TypedRequestFromRouteSchemas<TComponents extends RouterComponentsBase, TRou
|
|
|
4358
4382
|
} ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['params']> extends Record<string, any> ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['params']> : never : Record<ExtractPathParamsWithPattern<TPath>, string>> : TypedRequest<any, Partial<Record<string, FormDataEntryValue>>, Partial<Record<string, string>>, TMethod, any, Record<ExtractPathParamsWithPattern<TPath>, string>>;
|
|
4359
4383
|
type TypedResponseFromRouteSchemas<TComponents extends RouterComponentsBase, TRouteSchemas extends RouteSchemas> = TRouteSchemas extends {
|
|
4360
4384
|
responses: StatusCodeMap<JSONSchema>;
|
|
4361
|
-
} ? TypedResponseWithJSONStatusMap<{ [TStatusCode in keyof TRouteSchemas['responses']]: TRouteSchemas['responses'][TStatusCode] extends JSONSchema ? FromSchemaWithComponents<TComponents, TRouteSchemas['responses'][TStatusCode]> : never }> : TypedResponse;
|
|
4385
|
+
} ? TypedResponseWithJSONStatusMap<{ [TStatusCode in keyof TRouteSchemas['responses']]: TRouteSchemas['responses'][TStatusCode] extends JSONSchema ? FromSchemaWithComponents<TComponents, TRouteSchemas['responses'][TStatusCode]> : never; }> : TypedResponse;
|
|
4362
4386
|
type RouteWithSchemasOpts<TServerContext, TComponents extends RouterComponentsBase, TRouteSchemas extends RouteSchemas, TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequestFromRouteSchemas<TComponents, TRouteSchemas, TMethod, TPath>, TTypedResponse extends TypedResponseFromRouteSchemas<TComponents, TRouteSchemas>> = {
|
|
4363
4387
|
schemas: TRouteSchemas;
|
|
4364
4388
|
security?: SecuritySchemeRefsFromComponents<TComponents>[];
|
|
@@ -4540,27 +4564,28 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
|
|
|
4540
4564
|
};
|
|
4541
4565
|
//#endregion
|
|
4542
4566
|
//#region lib/rumble.d.ts
|
|
4543
|
-
declare const rumble: <UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, PothosConfig extends CustomRumblePothosConfig, Schema extends Record<string, any>, Action extends string = "
|
|
4567
|
+
export declare const rumble: <UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, PothosConfig extends CustomRumblePothosConfig, Schema extends Record<string, any>, Action extends string = "delete" | "read" | "update">(rumbleInput: RumbleInput<UserContext, DB, RequestEvent, Action, PothosConfig> & {
|
|
4544
4568
|
schema: Schema;
|
|
4545
4569
|
}) => {
|
|
4546
4570
|
/**
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4571
|
+
* The ability builder. Use it to declare whats allowed for each entity in your DB.
|
|
4572
|
+
*
|
|
4573
|
+
* @example
|
|
4574
|
+
*
|
|
4575
|
+
* ```ts
|
|
4576
|
+
* // users can edit themselves
|
|
4577
|
+
abilityBuilder.users
|
|
4578
|
+
.allow(["read", "update", "delete"])
|
|
4579
|
+
.when(({ userId }) => ({ where: eq(schema.users.id, userId) }));
|
|
4580
|
+
|
|
4581
|
+
// everyone can read posts
|
|
4582
|
+
abilityBuilder.posts.allow("read");
|
|
4583
|
+
*
|
|
4584
|
+
* ```
|
|
4585
|
+
*/
|
|
4561
4586
|
abilityBuilder: { [key in TableRelationNames<DB>]: {
|
|
4562
4587
|
allow: (action: Action | Action[]) => {
|
|
4563
|
-
when: (queryFilter: DrizzleQueryFunctionInput<DB, key> |
|
|
4588
|
+
when: (queryFilter: ((context: UserContext) => "allow" | Promise<"allow" | DrizzleQueryFunctionInput<DB, key> | undefined> | DrizzleQueryFunctionInput<DB, key> | undefined) | DrizzleQueryFunctionInput<DB, key>) => void;
|
|
4564
4589
|
};
|
|
4565
4590
|
filter: (action: Action | Action[]) => {
|
|
4566
4591
|
prefetch: <PrefetchReturnType>(prefetch: Prefetch<UserContext, PrefetchReturnType>) => {
|
|
@@ -4570,38 +4595,35 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4570
4595
|
};
|
|
4571
4596
|
_: {
|
|
4572
4597
|
runtimeFilters: Map<Action, FilterPrefetchCombo<UserContext, any, any>[]>;
|
|
4573
|
-
queryFilters: Map<Action, "unrestricted" | (DrizzleQueryFunctionInput<DB, key> |
|
|
4598
|
+
queryFilters: Map<Action, "unrestricted" | (((context: UserContext) => "allow" | Promise<"allow" | DrizzleQueryFunctionInput<DB, key> | undefined> | DrizzleQueryFunctionInput<DB, key> | undefined) | DrizzleQueryFunctionInput<DB, key>)[]>;
|
|
4574
4599
|
};
|
|
4575
|
-
} } & {
|
|
4600
|
+
}; } & {
|
|
4576
4601
|
_: {
|
|
4577
|
-
registeredFilters({
|
|
4578
|
-
action,
|
|
4579
|
-
table
|
|
4580
|
-
}: {
|
|
4602
|
+
registeredFilters({ action, table }: {
|
|
4581
4603
|
table: TableRelationNames<DB>;
|
|
4582
4604
|
action: Action;
|
|
4583
4605
|
}): Filter<UserContext, DrizzleTableValueType<DB, TableRelationNames<DB>>>[];
|
|
4584
|
-
build(): (ctx: UserContext) => { [
|
|
4585
|
-
filter: (action: Action) => {
|
|
4606
|
+
build(): (ctx: UserContext) => { [key in TableRelationNames<DB>]: {
|
|
4607
|
+
filter: (action: Action) => Promise<{
|
|
4586
4608
|
query: {
|
|
4587
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4588
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4609
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4610
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4589
4611
|
};
|
|
4590
4612
|
sql: {
|
|
4591
4613
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4592
4614
|
};
|
|
4593
4615
|
} & {
|
|
4594
|
-
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB,
|
|
4616
|
+
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB, key>>) => {
|
|
4595
4617
|
query: {
|
|
4596
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4597
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4618
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4619
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4598
4620
|
};
|
|
4599
4621
|
sql: {
|
|
4600
4622
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4601
4623
|
};
|
|
4602
4624
|
};
|
|
4603
|
-
}
|
|
4604
|
-
} };
|
|
4625
|
+
}>;
|
|
4626
|
+
}; };
|
|
4605
4627
|
};
|
|
4606
4628
|
};
|
|
4607
4629
|
/**
|
|
@@ -4609,29 +4631,30 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4609
4631
|
*/
|
|
4610
4632
|
schemaBuilder: PothosSchemaTypes.SchemaBuilder<PothosSchemaTypes.ExtendDefaultTypes<{
|
|
4611
4633
|
Context: Awaited<UserContext & {
|
|
4612
|
-
abilities: { [
|
|
4613
|
-
filter: (action: Action) => {
|
|
4634
|
+
abilities: { [key in TableRelationNames<DB>]: {
|
|
4635
|
+
filter: (action: Action) => Promise<{
|
|
4614
4636
|
query: {
|
|
4615
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4616
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4637
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4638
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4617
4639
|
};
|
|
4618
4640
|
sql: {
|
|
4619
4641
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4620
4642
|
};
|
|
4621
4643
|
} & {
|
|
4622
|
-
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB,
|
|
4644
|
+
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB, key>>) => {
|
|
4623
4645
|
query: {
|
|
4624
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4625
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4646
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4647
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4626
4648
|
};
|
|
4627
4649
|
sql: {
|
|
4628
4650
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4629
4651
|
};
|
|
4630
4652
|
};
|
|
4631
|
-
}
|
|
4632
|
-
} };
|
|
4653
|
+
}>;
|
|
4654
|
+
}; };
|
|
4633
4655
|
}>;
|
|
4634
4656
|
DrizzleRelations: DB["_"]["relations"];
|
|
4657
|
+
AsyncSelections: true;
|
|
4635
4658
|
Objects: {
|
|
4636
4659
|
Address: AddressShape;
|
|
4637
4660
|
};
|
|
@@ -4760,40 +4783,36 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4760
4783
|
/**
|
|
4761
4784
|
* A function for creating default objects for your schema
|
|
4762
4785
|
*/
|
|
4763
|
-
object: <TableName extends TableRelationNames<DB>, RefName extends string>({
|
|
4764
|
-
table,
|
|
4765
|
-
refName,
|
|
4766
|
-
readAction,
|
|
4767
|
-
adjust
|
|
4768
|
-
}: {
|
|
4786
|
+
object: <TableName extends TableRelationNames<DB>, RefName extends string>({ table, refName, readAction, adjust }: {
|
|
4769
4787
|
table: TableName;
|
|
4770
4788
|
refName?: RefName | undefined;
|
|
4771
4789
|
readAction?: Action | undefined;
|
|
4772
4790
|
adjust?: ((t: import("@pothos/plugin-drizzle").DrizzleObjectFieldBuilder<PothosSchemaTypes.ExtendDefaultTypes<{
|
|
4773
4791
|
Context: Awaited<UserContext & {
|
|
4774
|
-
abilities: { [
|
|
4775
|
-
filter: (action: Action) => {
|
|
4792
|
+
abilities: { [key in TableRelationNames<DB>]: {
|
|
4793
|
+
filter: (action: Action) => Promise<{
|
|
4776
4794
|
query: {
|
|
4777
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4778
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4795
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4796
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4779
4797
|
};
|
|
4780
4798
|
sql: {
|
|
4781
4799
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4782
4800
|
};
|
|
4783
4801
|
} & {
|
|
4784
|
-
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB,
|
|
4802
|
+
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB, key>>) => {
|
|
4785
4803
|
query: {
|
|
4786
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4787
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4804
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4805
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4788
4806
|
};
|
|
4789
4807
|
sql: {
|
|
4790
4808
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4791
4809
|
};
|
|
4792
4810
|
};
|
|
4793
|
-
}
|
|
4794
|
-
} };
|
|
4811
|
+
}>;
|
|
4812
|
+
}; };
|
|
4795
4813
|
}>;
|
|
4796
4814
|
DrizzleRelations: DB["_"]["relations"];
|
|
4815
|
+
AsyncSelections: true;
|
|
4797
4816
|
Objects: {
|
|
4798
4817
|
Address: AddressShape;
|
|
4799
4818
|
};
|
|
@@ -4850,46 +4869,47 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4850
4869
|
DefaultFieldNullability: false;
|
|
4851
4870
|
}>, (DB["_"]["relations"] & {})[TableName], DrizzleTableValueType<DB, TableName>, { [Key in keyof Extract<(DB["_"]["relations"] & {})[TableName]["table"], {
|
|
4852
4871
|
_: {
|
|
4853
|
-
brand:
|
|
4872
|
+
brand: 'Table';
|
|
4854
4873
|
};
|
|
4855
4874
|
}>["_"]["columns"] & string]: Extract<(DB["_"]["relations"] & {})[TableName]["table"], {
|
|
4856
4875
|
_: {
|
|
4857
|
-
brand:
|
|
4876
|
+
brand: 'Table';
|
|
4858
4877
|
};
|
|
4859
4878
|
}>["_"]["columns"][Key]["_"]["notNull"] extends true ? Extract<(DB["_"]["relations"] & {})[TableName]["table"], {
|
|
4860
4879
|
_: {
|
|
4861
|
-
brand:
|
|
4880
|
+
brand: 'Table';
|
|
4862
4881
|
};
|
|
4863
4882
|
}>["_"]["columns"][Key]["_"]["data"] : Extract<(DB["_"]["relations"] & {})[TableName]["table"], {
|
|
4864
4883
|
_: {
|
|
4865
|
-
brand:
|
|
4884
|
+
brand: 'Table';
|
|
4866
4885
|
};
|
|
4867
|
-
}>["_"]["columns"][Key]["_"]["data"] | null } extends infer T ? { [K in keyof T]: T[K] } : never>) => import("@pothos/core").FieldMap) | undefined;
|
|
4886
|
+
}>["_"]["columns"][Key]["_"]["data"] | null; } extends (infer T) ? { [K in keyof T]: T[K]; } : never>) => import("@pothos/core").FieldMap) | undefined;
|
|
4868
4887
|
}) => import("@pothos/plugin-drizzle").DrizzleObjectRef<PothosSchemaTypes.ExtendDefaultTypes<{
|
|
4869
4888
|
Context: Awaited<UserContext & {
|
|
4870
|
-
abilities: { [
|
|
4871
|
-
filter: (action: Action) => {
|
|
4889
|
+
abilities: { [key in TableRelationNames<DB>]: {
|
|
4890
|
+
filter: (action: Action) => Promise<{
|
|
4872
4891
|
query: {
|
|
4873
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4874
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4892
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4893
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4875
4894
|
};
|
|
4876
4895
|
sql: {
|
|
4877
4896
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4878
4897
|
};
|
|
4879
4898
|
} & {
|
|
4880
|
-
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB,
|
|
4899
|
+
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB, key>>) => {
|
|
4881
4900
|
query: {
|
|
4882
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4883
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4901
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
4902
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4884
4903
|
};
|
|
4885
4904
|
sql: {
|
|
4886
4905
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4887
4906
|
};
|
|
4888
4907
|
};
|
|
4889
|
-
}
|
|
4890
|
-
} };
|
|
4908
|
+
}>;
|
|
4909
|
+
}; };
|
|
4891
4910
|
}>;
|
|
4892
4911
|
DrizzleRelations: DB["_"]["relations"];
|
|
4912
|
+
AsyncSelections: true;
|
|
4893
4913
|
Objects: {
|
|
4894
4914
|
Address: AddressShape;
|
|
4895
4915
|
};
|
|
@@ -4952,59 +4972,52 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4952
4972
|
/**
|
|
4953
4973
|
* A function for creating where args to filter entities
|
|
4954
4974
|
*/
|
|
4955
|
-
whereArg: <TableName extends keyof DrizzleQueryFunction<DB>,
|
|
4956
|
-
table,
|
|
4957
|
-
refName,
|
|
4958
|
-
dbName
|
|
4959
|
-
}: Partial<{
|
|
4975
|
+
whereArg: <TableName extends keyof DrizzleQueryFunction<DB>, RefName extends string>({ table, refName, dbName }: Partial<{
|
|
4960
4976
|
table: TableName;
|
|
4961
|
-
refName:
|
|
4977
|
+
refName: RefName | undefined;
|
|
4962
4978
|
dbName: string;
|
|
4963
4979
|
}> & ({
|
|
4964
|
-
dbName: string;
|
|
4965
|
-
} | {
|
|
4966
4980
|
table: TableName;
|
|
4981
|
+
} | {
|
|
4982
|
+
dbName: string;
|
|
4967
4983
|
})) => any;
|
|
4968
4984
|
/**
|
|
4969
4985
|
* A function for creating order args to sort entities
|
|
4970
4986
|
*/
|
|
4971
|
-
orderArg: <
|
|
4972
|
-
table,
|
|
4973
|
-
refName,
|
|
4974
|
-
dbName
|
|
4975
|
-
}: Partial<{
|
|
4987
|
+
orderArg: <RefName extends string, TableName extends keyof DrizzleQueryFunction<DB>>({ table, refName, dbName }: Partial<{
|
|
4976
4988
|
table: TableName;
|
|
4977
|
-
refName:
|
|
4989
|
+
refName: RefName | undefined;
|
|
4978
4990
|
dbName: string;
|
|
4979
4991
|
}> & ({
|
|
4980
|
-
dbName: string;
|
|
4981
|
-
} | {
|
|
4982
4992
|
table: TableName;
|
|
4993
|
+
} | {
|
|
4994
|
+
dbName: string;
|
|
4983
4995
|
})) => PothosSchemaTypes.InputObjectRef<PothosSchemaTypes.ExtendDefaultTypes<{
|
|
4984
4996
|
Context: Awaited<UserContext & {
|
|
4985
|
-
abilities: { [
|
|
4986
|
-
filter: (action: Action) => {
|
|
4997
|
+
abilities: { [key in TableRelationNames<DB>]: {
|
|
4998
|
+
filter: (action: Action) => Promise<{
|
|
4987
4999
|
query: {
|
|
4988
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4989
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
5000
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
5001
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4990
5002
|
};
|
|
4991
5003
|
sql: {
|
|
4992
5004
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
4993
5005
|
};
|
|
4994
5006
|
} & {
|
|
4995
|
-
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB,
|
|
5007
|
+
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB, key>>) => {
|
|
4996
5008
|
query: {
|
|
4997
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
4998
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
5009
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
5010
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
4999
5011
|
};
|
|
5000
5012
|
sql: {
|
|
5001
5013
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
5002
5014
|
};
|
|
5003
5015
|
};
|
|
5004
|
-
}
|
|
5005
|
-
} };
|
|
5016
|
+
}>;
|
|
5017
|
+
}; };
|
|
5006
5018
|
}>;
|
|
5007
5019
|
DrizzleRelations: DB["_"]["relations"];
|
|
5020
|
+
AsyncSelections: true;
|
|
5008
5021
|
Objects: {
|
|
5009
5022
|
Address: AddressShape;
|
|
5010
5023
|
};
|
|
@@ -5066,40 +5079,28 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
5066
5079
|
* A function for creating default READ queries.
|
|
5067
5080
|
* Make sure the objects for the table you are creating the queries for are implemented
|
|
5068
5081
|
*/
|
|
5069
|
-
query: <
|
|
5070
|
-
table
|
|
5071
|
-
readAction,
|
|
5072
|
-
listAction,
|
|
5073
|
-
findFirst,
|
|
5074
|
-
findMany
|
|
5075
|
-
}: {
|
|
5076
|
-
table: TableName_1;
|
|
5082
|
+
query: <TableName extends TableRelationNames<DB>>({ table, readAction, listAction, findFirst, findMany }: {
|
|
5083
|
+
table: TableName;
|
|
5077
5084
|
readAction?: Action | undefined;
|
|
5078
5085
|
listAction?: Action | undefined;
|
|
5079
5086
|
findMany?: ((p: {
|
|
5080
5087
|
tx: DB | Parameters<Parameters<DB["transaction"]>[0]>[0];
|
|
5081
|
-
filter: Parameters<DrizzleQueryFunction<DB>[
|
|
5082
|
-
queryArgs: Parameters<DrizzleQueryFunction<DB>[
|
|
5083
|
-
}) => ReturnType<DrizzleQueryFunction<DB>[
|
|
5088
|
+
filter: Parameters<DrizzleQueryFunction<DB>[TableName]["findMany"]>[0];
|
|
5089
|
+
queryArgs: Parameters<DrizzleQueryFunction<DB>[TableName]["findMany"]>[0];
|
|
5090
|
+
}) => ReturnType<DrizzleQueryFunction<DB>[TableName]["findMany"]>) | undefined;
|
|
5084
5091
|
findFirst?: ((p: {
|
|
5085
5092
|
tx: DB;
|
|
5086
|
-
filter: Parameters<DrizzleQueryFunction<DB>[
|
|
5087
|
-
queryArgs: Parameters<DrizzleQueryFunction<DB>[
|
|
5088
|
-
}) => ReturnType<DrizzleQueryFunction<DB>[
|
|
5093
|
+
filter: Parameters<DrizzleQueryFunction<DB>[TableName]["findFirst"]>[0];
|
|
5094
|
+
queryArgs: Parameters<DrizzleQueryFunction<DB>[TableName]["findFirst"]>[0];
|
|
5095
|
+
}) => ReturnType<DrizzleQueryFunction<DB>[TableName]["findFirst"]>) | undefined;
|
|
5089
5096
|
}) => void;
|
|
5090
5097
|
/**
|
|
5091
5098
|
* A function for creating a pubsub instance for a table. Use this to publish or subscribe events
|
|
5092
5099
|
*/
|
|
5093
|
-
pubsub: <
|
|
5094
|
-
table
|
|
5095
|
-
}: {
|
|
5096
|
-
table: TableName_1;
|
|
5100
|
+
pubsub: <TableName extends keyof DrizzleQueryFunction<DB>>({ table }: {
|
|
5101
|
+
table: TableName;
|
|
5097
5102
|
}) => {
|
|
5098
|
-
registerOnInstance({
|
|
5099
|
-
instance,
|
|
5100
|
-
action,
|
|
5101
|
-
primaryKeyValue
|
|
5102
|
-
}: {
|
|
5103
|
+
registerOnInstance({ instance, action, primaryKeyValue }: {
|
|
5103
5104
|
instance: {
|
|
5104
5105
|
register: (id: string) => void;
|
|
5105
5106
|
};
|
|
@@ -5115,8 +5116,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
5115
5116
|
* The other helpers use this helper internally so in most cases you do not have to
|
|
5116
5117
|
* call this helper directly, unless you need the reference to an enum type
|
|
5117
5118
|
*/
|
|
5118
|
-
enum_: <TsName extends keyof { [K in keyof Schema as Schema[K] extends import("drizzle-orm/pg-core").PgEnum<any> | import("drizzle-orm/pg-core").PgEnumObject<any> ? K : never]: Schema[K] } = never, EnumArg extends import("drizzle-orm/pg-core").PgEnum<any> | import("drizzle-orm/pg-core").PgEnumObject<any> = never, EnumColumn extends import("drizzle-orm").Column = never,
|
|
5119
|
-
refName?:
|
|
5119
|
+
enum_: <TsName extends keyof { [K in keyof Schema as Schema[K] extends import("drizzle-orm/pg-core").PgEnum<any> | import("drizzle-orm/pg-core").PgEnumObject<any> ? K : never]: Schema[K]; } = never, EnumArg extends import("drizzle-orm/pg-core").PgEnum<any> | import("drizzle-orm/pg-core").PgEnumObject<any> = never, EnumColumn extends import("drizzle-orm").Column = never, RefName extends string = string>(args: {
|
|
5120
|
+
refName?: RefName | undefined;
|
|
5120
5121
|
} & ({
|
|
5121
5122
|
tsName: TsName;
|
|
5122
5123
|
enum?: never;
|
|
@@ -5131,29 +5132,30 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
5131
5132
|
enum?: never;
|
|
5132
5133
|
})) => PothosSchemaTypes.EnumRef<PothosSchemaTypes.ExtendDefaultTypes<{
|
|
5133
5134
|
Context: Awaited<UserContext & {
|
|
5134
|
-
abilities: { [
|
|
5135
|
-
filter: (action: Action) => {
|
|
5135
|
+
abilities: { [key in TableRelationNames<DB>]: {
|
|
5136
|
+
filter: (action: Action) => Promise<{
|
|
5136
5137
|
query: {
|
|
5137
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
5138
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
5138
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
5139
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
5139
5140
|
};
|
|
5140
5141
|
sql: {
|
|
5141
5142
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
5142
5143
|
};
|
|
5143
5144
|
} & {
|
|
5144
|
-
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB,
|
|
5145
|
+
merge: (p: NonNullable<DrizzleQueryFunctionInput<DB, key>>) => {
|
|
5145
5146
|
query: {
|
|
5146
|
-
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
5147
|
-
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][
|
|
5147
|
+
single: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findFirst"]>[0]>>, "where">;
|
|
5148
|
+
many: Pick<NonNullable<NonNullable<Parameters<DB["query"][key]["findMany"]>[0]>>, "limit" | "where">;
|
|
5148
5149
|
};
|
|
5149
5150
|
sql: {
|
|
5150
5151
|
readonly where: import("drizzle-orm").SQL<unknown> | undefined;
|
|
5151
5152
|
};
|
|
5152
5153
|
};
|
|
5153
|
-
}
|
|
5154
|
-
} };
|
|
5154
|
+
}>;
|
|
5155
|
+
}; };
|
|
5155
5156
|
}>;
|
|
5156
5157
|
DrizzleRelations: DB["_"]["relations"];
|
|
5158
|
+
AsyncSelections: true;
|
|
5157
5159
|
Objects: {
|
|
5158
5160
|
Address: AddressShape;
|
|
5159
5161
|
};
|
|
@@ -5208,24 +5210,16 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
5208
5210
|
AddressInput: AddressInputShape;
|
|
5209
5211
|
};
|
|
5210
5212
|
DefaultFieldNullability: false;
|
|
5211
|
-
}>, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer T ? T extends Schema[TsName] ? T extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : T extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends {
|
|
5213
|
+
}>, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends (infer T) ? T extends Schema[TsName] ? T extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : T extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends {
|
|
5212
5214
|
enumValues: infer CV extends readonly [string, ...string[]];
|
|
5213
|
-
} ? CV[number] : string, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer
|
|
5215
|
+
} ? CV[number] : string, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends (infer T) ? T extends Schema[TsName] ? T extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : T extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends {
|
|
5214
5216
|
enumValues: infer CV extends readonly [string, ...string[]];
|
|
5215
5217
|
} ? CV[number] : string>;
|
|
5216
5218
|
/**
|
|
5217
5219
|
* Create a client to consume a rumble graphql api at the specified location.
|
|
5218
5220
|
* Requires GraphQL, does not work with the SOFA REST API.
|
|
5219
5221
|
*/
|
|
5220
|
-
clientCreator: ({
|
|
5221
|
-
apiUrl,
|
|
5222
|
-
outputPath,
|
|
5223
|
-
rumbleImportPath,
|
|
5224
|
-
useExternalUrqlClient,
|
|
5225
|
-
removeExisting,
|
|
5226
|
-
forceReactivity,
|
|
5227
|
-
autoIncludeIdField
|
|
5228
|
-
}: {
|
|
5222
|
+
clientCreator: ({ apiUrl, outputPath, rumbleImportPath, useExternalUrqlClient, removeExisting, forceReactivity, autoIncludeIdField }: {
|
|
5229
5223
|
outputPath: string;
|
|
5230
5224
|
apiUrl?: string;
|
|
5231
5225
|
rumbleImportPath?: string;
|
|
@@ -5237,12 +5231,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
5237
5231
|
/**
|
|
5238
5232
|
* A function for creating count queries for your tables
|
|
5239
5233
|
*/
|
|
5240
|
-
countQuery: <
|
|
5241
|
-
table
|
|
5242
|
-
listAction,
|
|
5243
|
-
isAllowed
|
|
5244
|
-
}: {
|
|
5245
|
-
table: TableName_1;
|
|
5234
|
+
countQuery: <TableName extends TableRelationNames<DB>>({ table, listAction, isAllowed }: {
|
|
5235
|
+
table: TableName;
|
|
5246
5236
|
listAction?: Action | undefined;
|
|
5247
5237
|
isAllowed?: ((context: UserContext) => boolean | Promise<boolean>) | undefined;
|
|
5248
5238
|
}) => void;
|
|
@@ -5259,7 +5249,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
5259
5249
|
* An error that gets raised by rumble whenever something does not go according to plan.
|
|
5260
5250
|
* Mostly internals, configuration errors or other unexpected things.
|
|
5261
5251
|
*/
|
|
5262
|
-
declare class RumbleError extends Error {
|
|
5252
|
+
export declare class RumbleError extends Error {
|
|
5263
5253
|
constructor(message: string);
|
|
5264
5254
|
}
|
|
5265
5255
|
/**
|
|
@@ -5267,7 +5257,6 @@ declare class RumbleError extends Error {
|
|
|
5267
5257
|
* information safely exposeable to the user.
|
|
5268
5258
|
* E.g. the assert helpers issue these.
|
|
5269
5259
|
*/
|
|
5270
|
-
declare class RumbleErrorSafe extends GraphQLError {}
|
|
5260
|
+
export declare class RumbleErrorSafe extends GraphQLError {}
|
|
5271
5261
|
//#endregion
|
|
5272
|
-
export { RumbleError, RumbleErrorSafe, assertFindFirstExists, assertFirstEntryExists, mapNullFieldsToUndefined, rumble };
|
|
5273
5262
|
//# sourceMappingURL=index.d.cts.map
|