@esposter/shared 2.14.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +399 -62
- package/dist/index.js +5672 -19
- package/package.json +13 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TableEntity } from "@azure/data-tables";
|
|
3
|
+
|
|
1
4
|
//#region src/models/azure/BinaryOperator.d.ts
|
|
2
5
|
declare enum BinaryOperator {
|
|
3
6
|
eq = "eq",
|
|
@@ -8,11 +11,31 @@ declare enum BinaryOperator {
|
|
|
8
11
|
ne = "ne",
|
|
9
12
|
}
|
|
10
13
|
//#endregion
|
|
11
|
-
//#region src/models/azure/
|
|
12
|
-
declare enum
|
|
13
|
-
|
|
14
|
+
//#region src/models/azure/SearchOperator.d.ts
|
|
15
|
+
declare enum SearchOperator {
|
|
16
|
+
arrayContains = "arrayContains",
|
|
14
17
|
}
|
|
15
18
|
//#endregion
|
|
19
|
+
//#region src/models/azure/SerializableValue.d.ts
|
|
20
|
+
declare const SERIALIZABLE_VALUE_MAX_LENGTH = 100;
|
|
21
|
+
type SerializableValue = boolean | Date | null | number | string;
|
|
22
|
+
declare const serializableValueSchema: z.ZodType<SerializableValue>;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/models/azure/Clause.d.ts
|
|
25
|
+
type Clause = {
|
|
26
|
+
key: string;
|
|
27
|
+
not?: boolean;
|
|
28
|
+
} & ({
|
|
29
|
+
operator: BinaryOperator;
|
|
30
|
+
value: SerializableValue;
|
|
31
|
+
} | {
|
|
32
|
+
operator: Exclude<SearchOperator, SearchOperator.arrayContains>;
|
|
33
|
+
value: SerializableValue;
|
|
34
|
+
} | {
|
|
35
|
+
operator: SearchOperator.arrayContains;
|
|
36
|
+
value: SerializableValue[];
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
16
39
|
//#region src/models/azure/UnaryOperator.d.ts
|
|
17
40
|
declare enum UnaryOperator {
|
|
18
41
|
and = "and",
|
|
@@ -45,52 +68,26 @@ declare class NotInitializedError<T extends string = string> extends Error {
|
|
|
45
68
|
constructor(name: T);
|
|
46
69
|
}
|
|
47
70
|
//#endregion
|
|
48
|
-
//#region
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
declare const isRowKey: (rowKey: string) => string;
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region src/services/prettier/css.d.ts
|
|
58
|
-
declare const css: typeof String.raw;
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/services/prettier/html.d.ts
|
|
61
|
-
declare const html: typeof String.raw;
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/util/id/constants.d.ts
|
|
64
|
-
declare const ID_SEPARATOR = "|";
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/util/object/isPlainObject.d.ts
|
|
67
|
-
declare const isPlainObject: (data: unknown) => data is object;
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/util/types/MergeObjectsStrict.d.ts
|
|
70
|
-
type MergeObjectsStrict<T extends object[]> = T extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K] } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T extends [infer TFirst] ? TFirst : never;
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/util/object/mergeObjectsStrict.d.ts
|
|
73
|
-
declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/util/text/capitalize.d.ts
|
|
76
|
-
declare const capitalize: (string: string) => string;
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/util/text/streamToText.d.ts
|
|
79
|
-
declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>;
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/util/types/CamelToKebab.d.ts
|
|
82
|
-
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : S;
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/util/text/toKebabCase.d.ts
|
|
85
|
-
declare const toKebabCase: <T extends string>(string: T) => CamelToKebab<T>;
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/util/text/uncapitalize.d.ts
|
|
88
|
-
declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
|
|
71
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/primitive.d.ts
|
|
72
|
+
/**
|
|
73
|
+
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
74
|
+
|
|
75
|
+
@category Type
|
|
76
|
+
*/
|
|
77
|
+
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
89
78
|
//#endregion
|
|
90
|
-
//#region
|
|
91
|
-
|
|
79
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/basic.d.ts
|
|
80
|
+
/**
|
|
81
|
+
Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
|
|
82
|
+
|
|
83
|
+
@category Class
|
|
84
|
+
*/
|
|
85
|
+
type Class<T, Arguments extends unknown[] = any[]> = {
|
|
86
|
+
prototype: Pick<T, keyof T>;
|
|
87
|
+
new (...arguments_: Arguments): T;
|
|
88
|
+
};
|
|
92
89
|
//#endregion
|
|
93
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
90
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-any.d.ts
|
|
94
91
|
/**
|
|
95
92
|
Returns a boolean for whether the given type is `any`.
|
|
96
93
|
|
|
@@ -121,7 +118,7 @@ const anyA = get(anyObject, 'a');
|
|
|
121
118
|
*/
|
|
122
119
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
123
120
|
//#endregion
|
|
124
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
121
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
125
122
|
/**
|
|
126
123
|
Returns a boolean for whether the given key is an optional key of type.
|
|
127
124
|
|
|
@@ -164,7 +161,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
164
161
|
*/
|
|
165
162
|
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
166
163
|
//#endregion
|
|
167
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
164
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
168
165
|
/**
|
|
169
166
|
Extract all optional keys from the given type.
|
|
170
167
|
|
|
@@ -202,7 +199,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
|
|
|
202
199
|
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
203
200
|
: never;
|
|
204
201
|
//#endregion
|
|
205
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
202
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/required-keys-of.d.ts
|
|
206
203
|
/**
|
|
207
204
|
Extract all required keys from the given type.
|
|
208
205
|
|
|
@@ -230,7 +227,7 @@ const validator2 = createValidation<User>('surname', value => value.length < 25)
|
|
|
230
227
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
231
228
|
? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
|
|
232
229
|
//#endregion
|
|
233
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
230
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-never.d.ts
|
|
234
231
|
/**
|
|
235
232
|
Returns a boolean for whether the given type is `never`.
|
|
236
233
|
|
|
@@ -274,7 +271,7 @@ endIfEqual('abc', '123');
|
|
|
274
271
|
*/
|
|
275
272
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
276
273
|
//#endregion
|
|
277
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
274
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/if.d.ts
|
|
278
275
|
/**
|
|
279
276
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
280
277
|
|
|
@@ -334,7 +331,25 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
|
|
|
334
331
|
*/
|
|
335
332
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
336
333
|
//#endregion
|
|
337
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
334
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/internal/type.d.ts
|
|
335
|
+
/**
|
|
336
|
+
Matches any primitive, `void`, `Date`, or `RegExp` value.
|
|
337
|
+
*/
|
|
338
|
+
type BuiltIns = Primitive | void | Date | RegExp;
|
|
339
|
+
/**
|
|
340
|
+
Test if the given function has multiple call signatures.
|
|
341
|
+
|
|
342
|
+
Needed to handle the case of a single call signature with properties.
|
|
343
|
+
|
|
344
|
+
Multiple call signatures cannot currently be supported due to a TypeScript limitation.
|
|
345
|
+
@see https://github.com/microsoft/TypeScript/issues/29732
|
|
346
|
+
*/
|
|
347
|
+
type HasMultipleCallSignatures<T extends (...arguments_: any[]) => unknown> = T extends {
|
|
348
|
+
(...arguments_: infer A): unknown;
|
|
349
|
+
(...arguments_: infer B): unknown;
|
|
350
|
+
} ? B extends A ? A extends B ? false : true : true : false;
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-equal.d.ts
|
|
338
353
|
/**
|
|
339
354
|
Returns a boolean for whether the two given types are equal.
|
|
340
355
|
|
|
@@ -363,7 +378,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
363
378
|
*/
|
|
364
379
|
type IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
365
380
|
//#endregion
|
|
366
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
381
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/simplify.d.ts
|
|
367
382
|
/**
|
|
368
383
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
369
384
|
|
|
@@ -423,7 +438,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
423
438
|
*/
|
|
424
439
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
425
440
|
//#endregion
|
|
426
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
441
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
427
442
|
/**
|
|
428
443
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
429
444
|
|
|
@@ -516,7 +531,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
516
531
|
*/
|
|
517
532
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
518
533
|
//#endregion
|
|
519
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
534
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
520
535
|
/**
|
|
521
536
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
522
537
|
|
|
@@ -564,7 +579,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
564
579
|
*/
|
|
565
580
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
566
581
|
//#endregion
|
|
567
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
582
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/merge.d.ts
|
|
568
583
|
// Merges two objects without worrying about index signatures.
|
|
569
584
|
type SimpleMerge<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source;
|
|
570
585
|
|
|
@@ -604,7 +619,7 @@ export type FooBar = Merge<Foo, Bar>;
|
|
|
604
619
|
*/
|
|
605
620
|
type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
606
621
|
//#endregion
|
|
607
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
622
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/internal/object.d.ts
|
|
608
623
|
/**
|
|
609
624
|
Merges user specified options with default options.
|
|
610
625
|
|
|
@@ -659,7 +674,7 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
|
|
|
659
674
|
*/
|
|
660
675
|
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
|
|
661
676
|
//#endregion
|
|
662
|
-
//#region ../../node_modules/.pnpm/type-fest@5.0.
|
|
677
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/except.d.ts
|
|
663
678
|
/**
|
|
664
679
|
Filter out keys from an object.
|
|
665
680
|
|
|
@@ -687,7 +702,7 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
687
702
|
|
|
688
703
|
@see {Except}
|
|
689
704
|
*/
|
|
690
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
705
|
+
type Filter$1<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
691
706
|
type ExceptOptions = {
|
|
692
707
|
/**
|
|
693
708
|
Disallow assigning non-specified properties.
|
|
@@ -754,7 +769,182 @@ type PostPayload = Except<UserData, 'email'>;
|
|
|
754
769
|
@category Object
|
|
755
770
|
*/
|
|
756
771
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
757
|
-
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
772
|
+
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter$1<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/required-deep.d.ts
|
|
775
|
+
/**
|
|
776
|
+
Create a type from another type with all keys and nested keys set to required.
|
|
777
|
+
|
|
778
|
+
Use-cases:
|
|
779
|
+
- Creating optional configuration interfaces where the underlying implementation still requires all options to be fully specified.
|
|
780
|
+
- Modeling the resulting type after a deep merge with a set of defaults.
|
|
781
|
+
|
|
782
|
+
@example
|
|
783
|
+
```
|
|
784
|
+
import type {RequiredDeep} from 'type-fest';
|
|
785
|
+
|
|
786
|
+
type Settings = {
|
|
787
|
+
textEditor?: {
|
|
788
|
+
fontSize?: number;
|
|
789
|
+
fontColor?: string;
|
|
790
|
+
fontWeight?: number | undefined;
|
|
791
|
+
};
|
|
792
|
+
autocomplete?: boolean;
|
|
793
|
+
autosave?: boolean | undefined;
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
type RequiredSettings = RequiredDeep<Settings>;
|
|
797
|
+
//=> {
|
|
798
|
+
// textEditor: {
|
|
799
|
+
// fontSize: number;
|
|
800
|
+
// fontColor: string;
|
|
801
|
+
// fontWeight: number | undefined;
|
|
802
|
+
// };
|
|
803
|
+
// autocomplete: boolean;
|
|
804
|
+
// autosave: boolean | undefined;
|
|
805
|
+
// }
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
Note that types containing overloaded functions are not made deeply required due to a [TypeScript limitation](https://github.com/microsoft/TypeScript/issues/29732).
|
|
809
|
+
|
|
810
|
+
@category Utilities
|
|
811
|
+
@category Object
|
|
812
|
+
@category Array
|
|
813
|
+
@category Set
|
|
814
|
+
@category Map
|
|
815
|
+
*/
|
|
816
|
+
type RequiredDeep<T> = T extends BuiltIns ? T : T extends Map<infer KeyType, infer ValueType> ? Map<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T extends Set<infer ItemType> ? Set<RequiredDeep<ItemType>> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? ReadonlyMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T extends ReadonlySet<infer ItemType> ? ReadonlySet<RequiredDeep<ItemType>> : T extends WeakMap<infer KeyType, infer ValueType> ? WeakMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T extends WeakSet<infer ItemType> ? WeakSet<RequiredDeep<ItemType>> : T extends Promise<infer ValueType> ? Promise<RequiredDeep<ValueType>> : T extends ((...arguments_: any[]) => unknown) ? {} extends RequiredObjectDeep<T> ? T : HasMultipleCallSignatures<T> extends true ? T : ((...arguments_: Parameters<T>) => ReturnType<T>) & RequiredObjectDeep<T> : T extends object ? RequiredObjectDeep<T> : unknown;
|
|
817
|
+
type RequiredObjectDeep<ObjectType extends object> = { [KeyType in keyof ObjectType]-?: RequiredDeep<ObjectType[KeyType]> };
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region src/util/types/PropertyNames.d.ts
|
|
820
|
+
type PropertyNames<T> = RequiredDeep<{ [P in keyof T]: P }>;
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region src/models/shared/ItemMetadata.d.ts
|
|
823
|
+
declare class ItemMetadata {
|
|
824
|
+
createdAt: Date;
|
|
825
|
+
deletedAt: Date | null;
|
|
826
|
+
updatedAt: Date;
|
|
827
|
+
}
|
|
828
|
+
declare const ItemMetadataPropertyNames: PropertyNames<ItemMetadata>;
|
|
829
|
+
declare const itemMetadataSchema: z.ZodObject<{
|
|
830
|
+
createdAt: z.ZodDate;
|
|
831
|
+
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
832
|
+
updatedAt: z.ZodDate;
|
|
833
|
+
}>;
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region src/models/shared/Serializable.d.ts
|
|
836
|
+
declare abstract class Serializable {
|
|
837
|
+
toJSON(): string;
|
|
838
|
+
}
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region src/util/types/DeepOmitArray.d.ts
|
|
841
|
+
type DeepOmitArray<TArray extends unknown[], TKey> = { [P in keyof TArray]: DeepOmit<TArray[P], TKey> };
|
|
842
|
+
//#endregion
|
|
843
|
+
//#region src/util/types/DeepOmit.d.ts
|
|
844
|
+
type DeepOmit<T, TKey> = T extends Primitive ? T : { [P in Exclude<keyof T, TKey>]: T[P] extends infer TP ? TP extends Date | Function | Primitive ? TP : TP extends unknown[] ? DeepOmitArray<TP, TKey> : Record<string, unknown> extends TP ? TP : DeepOmit<TP, TKey> : never };
|
|
845
|
+
//#endregion
|
|
846
|
+
//#region src/util/types/DeepOptionalProperties.d.ts
|
|
847
|
+
type DeepOptionalProperties<T> = { [K in keyof T as undefined extends T[K] ? K : never]?: DeepOptionalProperties<T[K]> };
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region src/util/types/DeepRequiredProperties.d.ts
|
|
850
|
+
type DeepRequiredProperties<T> = { [K in keyof T as undefined extends T[K] ? never : K]: DeepRequiredProperties<T[K]> };
|
|
851
|
+
//#endregion
|
|
852
|
+
//#region src/util/types/DeepOptionalUndefined.d.ts
|
|
853
|
+
type DeepOptionalUndefined<T> = T extends ((...args: unknown[]) => unknown) ? T : T extends (infer U)[] ? DeepOptionalUndefined<U>[] : T extends readonly (infer U)[] ? readonly DeepOptionalUndefined<U>[] : T extends Date ? T : T extends object ? keyof T extends never ? never : DeepOptionalProperties<T> extends Record<never, unknown> ? DeepRequiredProperties<T> : DeepRequiredProperties<T> extends Record<never, unknown> ? DeepOptionalProperties<T> : DeepOptionalProperties<T> & DeepRequiredProperties<T> : T;
|
|
854
|
+
//#endregion
|
|
855
|
+
//#region src/models/shared/ToData.d.ts
|
|
856
|
+
type ToData<T extends Serializable> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
|
|
857
|
+
//#endregion
|
|
858
|
+
//#region src/services/azure/constants.d.ts
|
|
859
|
+
declare const RangeOperators: (BinaryOperator | SearchOperator)[];
|
|
860
|
+
declare const CLAUSE_REGEX: RegExp;
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region src/services/azure/deserializeClause.d.ts
|
|
863
|
+
declare const deserializeClause: (string: string) => Extract<Clause, {
|
|
864
|
+
operator: BinaryOperator;
|
|
865
|
+
}>;
|
|
866
|
+
//#endregion
|
|
867
|
+
//#region src/services/azure/deserializeValue.d.ts
|
|
868
|
+
declare const deserializeValue: (string: string) => SerializableValue;
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region src/services/azure/escapeValue.d.ts
|
|
871
|
+
declare const escapeValue: (value: string) => string;
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region src/services/azure/serializeClause.d.ts
|
|
874
|
+
declare const serializeClause: (clause: Clause) => string;
|
|
875
|
+
//#endregion
|
|
876
|
+
//#region src/services/azure/serializeClauses.d.ts
|
|
877
|
+
declare const serializeClauses: (clauses: Clause[]) => string;
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region src/services/azure/serializeValue.d.ts
|
|
880
|
+
declare const serializeValue: (value: SerializableValue) => string;
|
|
881
|
+
//#endregion
|
|
882
|
+
//#region src/services/message/constants.d.ts
|
|
883
|
+
declare const MENTION_MAX_LENGTH = 100;
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region src/services/prettier/css.d.ts
|
|
886
|
+
declare const css: typeof String.raw;
|
|
887
|
+
//#endregion
|
|
888
|
+
//#region src/services/prettier/html.d.ts
|
|
889
|
+
declare const html: typeof String.raw;
|
|
890
|
+
//#endregion
|
|
891
|
+
//#region src/services/shared/applyItemMetadataMixin.d.ts
|
|
892
|
+
interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
|
|
893
|
+
new (...args: ConstructorParameters<TBase>): InstanceType<TBase> & ItemMetadata;
|
|
894
|
+
prototype: InstanceType<TBase> & ItemMetadata;
|
|
895
|
+
}
|
|
896
|
+
declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
|
|
897
|
+
//#endregion
|
|
898
|
+
//#region src/services/user/constants.d.ts
|
|
899
|
+
declare const USER_NAME_MAX_LENGTH = 100;
|
|
900
|
+
//#endregion
|
|
901
|
+
//#region src/util/environment/getIsServer.d.ts
|
|
902
|
+
declare const getIsServer: () => boolean;
|
|
903
|
+
//#endregion
|
|
904
|
+
//#region src/util/id/constants.d.ts
|
|
905
|
+
declare const ID_SEPARATOR = "|";
|
|
906
|
+
//#endregion
|
|
907
|
+
//#region src/util/object/getPropertyNames.d.ts
|
|
908
|
+
declare const getPropertyNames: <T>() => PropertyNames<T>;
|
|
909
|
+
//#endregion
|
|
910
|
+
//#region src/util/object/isPlainObject.d.ts
|
|
911
|
+
declare const isPlainObject: (data: unknown) => data is object;
|
|
912
|
+
//#endregion
|
|
913
|
+
//#region src/util/types/MergeObjectsStrict.d.ts
|
|
914
|
+
type MergeObjectsStrict<T extends object[]> = T extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K] } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T extends [infer TFirst] ? TFirst : never;
|
|
915
|
+
//#endregion
|
|
916
|
+
//#region src/util/object/mergeObjectsStrict.d.ts
|
|
917
|
+
declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
|
|
918
|
+
//#endregion
|
|
919
|
+
//#region src/util/reactivity/getRawData.d.ts
|
|
920
|
+
declare const getRawData: <T>(data: T) => T;
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region src/util/reactivity/toRawDeep.d.ts
|
|
923
|
+
declare const toRawDeep: <T extends object>(data: T) => T;
|
|
924
|
+
//#endregion
|
|
925
|
+
//#region src/util/text/capitalize.d.ts
|
|
926
|
+
declare const capitalize: (string: string) => string;
|
|
927
|
+
//#endregion
|
|
928
|
+
//#region src/util/text/streamToText.d.ts
|
|
929
|
+
declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>;
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region src/util/types/CamelToKebab.d.ts
|
|
932
|
+
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : S;
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region src/util/text/toKebabCase.d.ts
|
|
935
|
+
declare const toKebabCase: <T extends string>(string: T) => CamelToKebab<T>;
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region src/util/text/uncapitalize.d.ts
|
|
938
|
+
declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
|
|
939
|
+
//#endregion
|
|
940
|
+
//#region src/util/time/hrtime.d.ts
|
|
941
|
+
declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
|
|
942
|
+
//#endregion
|
|
943
|
+
//#region src/util/time/now.d.ts
|
|
944
|
+
declare const now: () => string;
|
|
945
|
+
//#endregion
|
|
946
|
+
//#region src/util/types/FunctionProperties.d.ts
|
|
947
|
+
type FunctionProperties<T> = { [K in keyof T]: T[K] extends Function ? K : never };
|
|
758
948
|
//#endregion
|
|
759
949
|
//#region src/util/types/ExcludeFunctionProperties.d.ts
|
|
760
950
|
type ExcludeFunctionProperties<T> = Except<T, FunctionProperties<T>[keyof T]>;
|
|
@@ -786,6 +976,153 @@ type TupleSlice<T extends unknown[], S extends number, E extends number = T["len
|
|
|
786
976
|
//#region src/util/validation/exhaustiveGuard.d.ts
|
|
787
977
|
declare const exhaustiveGuard: (value: never) => never;
|
|
788
978
|
//#endregion
|
|
979
|
+
//#region src/models/azure/table/CompositeKey.d.ts
|
|
980
|
+
declare class CompositeKey implements OmitIndexSignature<TableEntity> {
|
|
981
|
+
partitionKey: string;
|
|
982
|
+
rowKey: string;
|
|
983
|
+
}
|
|
984
|
+
declare const CompositeKeyPropertyNames: PropertyNames<CompositeKey>;
|
|
985
|
+
//#endregion
|
|
986
|
+
//#region src/models/azure/table/CompositeKeyEntity.d.ts
|
|
987
|
+
interface CompositeKeyEntityConstraint extends z.ZodRawShape {
|
|
988
|
+
partitionKey: z.ZodString | z.ZodUUID;
|
|
989
|
+
rowKey: z.ZodString | z.ZodUUID;
|
|
990
|
+
}
|
|
991
|
+
declare class CompositeKeyEntity extends Serializable implements CompositeKey {
|
|
992
|
+
partitionKey: string;
|
|
993
|
+
rowKey: string;
|
|
994
|
+
}
|
|
995
|
+
declare const createCompositeKeyEntitySchema: <TEntity extends CompositeKeyEntityConstraint>(schema: z.ZodObject<TEntity>) => z.ZodObject<TEntity>;
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region src/models/azure/table/AzureEntity.d.ts
|
|
998
|
+
declare const AzureEntity: ReturnType<typeof applyItemMetadataMixin<typeof CompositeKeyEntity>>;
|
|
999
|
+
type AzureEntity = typeof AzureEntity.prototype;
|
|
1000
|
+
declare const createAzureEntitySchema: <TEntity extends CompositeKeyEntityConstraint>(schema: z.ZodObject<TEntity>) => z.ZodObject<TEntity & typeof itemMetadataSchema.shape>;
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region src/models/azure/table/FileEntity.d.ts
|
|
1003
|
+
declare class FileEntity {
|
|
1004
|
+
filename: string;
|
|
1005
|
+
id: string;
|
|
1006
|
+
mimetype: string;
|
|
1007
|
+
size: number;
|
|
1008
|
+
constructor(init?: Partial<FileEntity>);
|
|
1009
|
+
}
|
|
1010
|
+
declare const FileEntityPropertyNames: PropertyNames<FileEntity>;
|
|
1011
|
+
declare const fileEntitySchema: z.ZodObject<{
|
|
1012
|
+
filename: z.ZodString;
|
|
1013
|
+
id: z.ZodUUID;
|
|
1014
|
+
mimetype: z.ZodString;
|
|
1015
|
+
size: z.ZodNumber;
|
|
1016
|
+
}>;
|
|
1017
|
+
//#endregion
|
|
1018
|
+
//#region src/models/message/filter/FilterType.d.ts
|
|
1019
|
+
declare enum FilterType {
|
|
1020
|
+
From = "From",
|
|
1021
|
+
Mentions = "Mentions",
|
|
1022
|
+
Has = "Has",
|
|
1023
|
+
Before = "Before",
|
|
1024
|
+
During = "During",
|
|
1025
|
+
After = "After",
|
|
1026
|
+
Pinned = "Pinned",
|
|
1027
|
+
}
|
|
1028
|
+
declare const filterTypeSchema: z.ZodType<FilterType>;
|
|
1029
|
+
//#endregion
|
|
1030
|
+
//#region src/models/message/filter/Filter.d.ts
|
|
1031
|
+
interface Filter {
|
|
1032
|
+
type: FilterType;
|
|
1033
|
+
value: SerializableValue;
|
|
1034
|
+
}
|
|
1035
|
+
declare const filterSchema: z.ZodType<Filter>;
|
|
1036
|
+
//#endregion
|
|
1037
|
+
//#region src/models/message/filter/FilterTypeHas.d.ts
|
|
1038
|
+
declare enum FilterTypeHas {
|
|
1039
|
+
Link = "Link",
|
|
1040
|
+
Embed = "Embed",
|
|
1041
|
+
Image = "Image",
|
|
1042
|
+
Video = "Video",
|
|
1043
|
+
Sound = "Sound",
|
|
1044
|
+
Forward = "Forward",
|
|
1045
|
+
}
|
|
1046
|
+
//#endregion
|
|
1047
|
+
//#region src/models/message/webhook/EmbedAuthor.d.ts
|
|
1048
|
+
interface EmbedAuthor {
|
|
1049
|
+
icon_url?: string;
|
|
1050
|
+
name: string;
|
|
1051
|
+
url?: string;
|
|
1052
|
+
}
|
|
1053
|
+
declare const embedAuthorSchema: z.ZodType<EmbedAuthor>;
|
|
1054
|
+
//#endregion
|
|
1055
|
+
//#region src/models/message/webhook/EmbedField.d.ts
|
|
1056
|
+
interface EmbedField {
|
|
1057
|
+
inline?: boolean;
|
|
1058
|
+
name: string;
|
|
1059
|
+
value: string;
|
|
1060
|
+
}
|
|
1061
|
+
declare const embedFieldSchema: z.ZodType<EmbedField>;
|
|
1062
|
+
//#endregion
|
|
1063
|
+
//#region src/models/message/webhook/EmbedFooter.d.ts
|
|
1064
|
+
interface EmbedFooter {
|
|
1065
|
+
icon_url?: string;
|
|
1066
|
+
text: string;
|
|
1067
|
+
}
|
|
1068
|
+
declare const embedFooterSchema: z.ZodType<EmbedFooter>;
|
|
1069
|
+
//#endregion
|
|
1070
|
+
//#region src/models/message/webhook/Embed.d.ts
|
|
1071
|
+
interface Embed {
|
|
1072
|
+
author?: EmbedAuthor;
|
|
1073
|
+
color?: number;
|
|
1074
|
+
description?: string;
|
|
1075
|
+
fields?: EmbedField[];
|
|
1076
|
+
footer?: EmbedFooter;
|
|
1077
|
+
image?: {
|
|
1078
|
+
url: string;
|
|
1079
|
+
};
|
|
1080
|
+
thumbnail?: {
|
|
1081
|
+
url: string;
|
|
1082
|
+
};
|
|
1083
|
+
timestamp?: string;
|
|
1084
|
+
title?: string;
|
|
1085
|
+
url?: string;
|
|
1086
|
+
}
|
|
1087
|
+
declare const embedSchema: z.ZodType<Embed>;
|
|
1088
|
+
//#endregion
|
|
1089
|
+
//#region src/models/message/webhook/WebhookPayload.d.ts
|
|
1090
|
+
interface WebhookPayload {
|
|
1091
|
+
avatarUrl?: string;
|
|
1092
|
+
content?: string;
|
|
1093
|
+
embeds?: Embed[];
|
|
1094
|
+
username?: string;
|
|
1095
|
+
}
|
|
1096
|
+
declare const webhookPayloadSchema: z.ZodType<WebhookPayload>;
|
|
1097
|
+
//#endregion
|
|
1098
|
+
//#region src/services/azure/container/constants.d.ts
|
|
1099
|
+
declare const FILENAME_MAX_LENGTH = 1e3;
|
|
1100
|
+
declare const FILE_MAX_LENGTH = 10;
|
|
1101
|
+
//#endregion
|
|
1102
|
+
//#region src/services/azure/search/getSearchNonNullClause.d.ts
|
|
1103
|
+
declare const getSearchNonNullClause: (key: Clause["key"]) => Clause;
|
|
1104
|
+
//#endregion
|
|
1105
|
+
//#region src/services/azure/search/getSearchNullClause.d.ts
|
|
1106
|
+
declare const getSearchNullClause: (key: Clause["key"]) => Clause;
|
|
1107
|
+
//#endregion
|
|
1108
|
+
//#region src/services/azure/table/constants.d.ts
|
|
1109
|
+
declare const AZURE_SELF_DESTRUCT_TIMER: string;
|
|
1110
|
+
declare const AZURE_SELF_DESTRUCT_TIMER_SMALL: string;
|
|
1111
|
+
declare const KeysToCapitalize: Set<string>;
|
|
1112
|
+
declare const KeysToUncapitalize: Set<string>;
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region src/services/azure/table/deserializeKey.d.ts
|
|
1115
|
+
declare const deserializeKey: (key: string) => string;
|
|
1116
|
+
//#endregion
|
|
1117
|
+
//#region src/services/azure/table/getReverseTickedTimestamp.d.ts
|
|
1118
|
+
declare const getReverseTickedTimestamp: (timestamp?: string) => string;
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region src/services/azure/table/getTableNullClause.d.ts
|
|
1121
|
+
declare const getTableNullClause: (key: Clause["key"]) => Clause;
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/services/azure/table/serializeKey.d.ts
|
|
1124
|
+
declare const serializeKey: (key: string) => string;
|
|
1125
|
+
//#endregion
|
|
789
1126
|
//#region src/util/id/uuid/constants.d.ts
|
|
790
1127
|
declare const NIL = "00000000-0000-0000-0000-000000000000";
|
|
791
1128
|
declare const UUIDV4_REGEX: RegExp;
|
|
@@ -793,4 +1130,4 @@ declare const UUIDV4_REGEX: RegExp;
|
|
|
793
1130
|
//#region src/util/id/uuid/uuidValidateV4.d.ts
|
|
794
1131
|
declare const uuidValidateV4: (uuid: string) => boolean;
|
|
795
1132
|
//#endregion
|
|
796
|
-
export { BinaryOperator, CamelToKebab, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, KebabToCamel,
|
|
1133
|
+
export { AZURE_SELF_DESTRUCT_TIMER, AZURE_SELF_DESTRUCT_TIMER_SMALL, AzureEntity, BinaryOperator, CLAUSE_REGEX, CamelToKebab, Clause, CompositeKey, CompositeKeyEntity, CompositeKeyEntityConstraint, CompositeKeyPropertyNames, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, Embed, EmbedAuthor, EmbedField, EmbedFooter, ExcludeFunctionProperties, FILENAME_MAX_LENGTH, FILE_MAX_LENGTH, FileEntity, FileEntityPropertyNames, Filter, FilterType, FilterTypeHas, FunctionProperties, ID_SEPARATOR, InvalidOperationError, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, KeysToCapitalize, KeysToUncapitalize, MENTION_MAX_LENGTH, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PropertyNames, RangeOperators, SERIALIZABLE_VALUE_MAX_LENGTH, SearchOperator, Serializable, SerializableValue, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, USER_NAME_MAX_LENGTH, UUIDV4_REGEX, UnaryOperator, WebhookPayload, applyItemMetadataMixin, capitalize, createAzureEntitySchema, createCompositeKeyEntitySchema, css, deserializeClause, deserializeKey, deserializeValue, embedAuthorSchema, embedFieldSchema, embedFooterSchema, embedSchema, escapeValue, exhaustiveGuard, fileEntitySchema, filterSchema, filterTypeSchema, getIsServer, getPropertyNames, getRawData, getReverseTickedTimestamp, getSearchNonNullClause, getSearchNullClause, getTableNullClause, hrtime, html, isPlainObject, itemMetadataSchema, mergeObjectsStrict, now, serializableValueSchema, serializeClause, serializeClauses, serializeKey, serializeValue, streamToText, toKebabCase, toRawDeep, uncapitalize, uuidValidateV4, webhookPayloadSchema };
|