@esposter/shared 2.15.1 → 2.16.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +146 -91
  2. package/dist/index.js +13274 -3205
  3. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,12 +1,6 @@
1
1
  import { z } from "zod";
2
+ import { HTMLElement } from "node-html-parser";
2
3
 
3
- //#region src/models/environment/Environment.d.ts
4
- declare enum Environment {
5
- development = "development",
6
- production = "production",
7
- test = "test",
8
- }
9
- //#endregion
10
4
  //#region src/models/shared/Operation.d.ts
11
5
  declare enum Operation {
12
6
  Create = "Create",
@@ -23,16 +17,47 @@ declare class InvalidOperationError extends Error {
23
17
  }
24
18
  //#endregion
25
19
  //#region src/models/error/NotFoundError.d.ts
26
- declare class NotFoundError<T extends string = string> extends Error {
27
- constructor(name: T, id: string);
20
+ declare class NotFoundError<T$1 extends string = string> extends Error {
21
+ constructor(name: T$1, id: string);
28
22
  }
29
23
  //#endregion
30
24
  //#region src/models/error/NotInitializedError.d.ts
31
- declare class NotInitializedError<T extends string = string> extends Error {
32
- constructor(name: T);
25
+ declare class NotInitializedError<T$1 extends string = string> extends Error {
26
+ constructor(name: T$1);
33
27
  }
34
28
  //#endregion
35
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/primitive.d.ts
29
+ //#region src/models/router/RoutePath.d.ts
30
+ declare const RoutePath: {
31
+ readonly About: "/about";
32
+ readonly Anime: "/anime";
33
+ readonly Calendar: "/calendar";
34
+ readonly Clicker: "/clicker";
35
+ readonly Dashboard: "/dashboard";
36
+ readonly DashboardEditor: "/dashboard/editor";
37
+ readonly Docs: "/docs";
38
+ readonly Dungeons: "/dungeons";
39
+ readonly EmailEditor: "/email-editor";
40
+ readonly FlowchartEditor: "/flowchart-editor";
41
+ readonly Github: "https://github.com/Esposter/Esposter";
42
+ readonly Index: "/";
43
+ readonly Login: "/login";
44
+ readonly Messages: (id: string) => string;
45
+ readonly MessagesIndex: "/messages";
46
+ readonly MessagesInvite: (code: string) => string;
47
+ readonly MessagesMessage: (id: string, rowKey: string) => string;
48
+ readonly Post: (id: string) => string;
49
+ readonly PostCreate: "/post/create";
50
+ readonly PostUpdate: (id: string) => string;
51
+ readonly PrivacyPolicy: "/privacy-policy";
52
+ readonly Survey: (id: string) => string;
53
+ readonly Surveyer: "/surveyer";
54
+ readonly TableEditor: "/table-editor";
55
+ readonly UserSettings: "/user/settings";
56
+ readonly WebpageEditor: "/webpage-editor";
57
+ };
58
+ type RoutePath = typeof RoutePath;
59
+ //#endregion
60
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/primitive.d.ts
36
61
  /**
37
62
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
38
63
 
@@ -40,18 +65,18 @@ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/
40
65
  */
41
66
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
42
67
  //#endregion
43
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/basic.d.ts
68
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/basic.d.ts
44
69
  /**
45
70
  Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
46
71
 
47
72
  @category Class
48
73
  */
49
- type Class<T, Arguments extends unknown[] = any[]> = {
50
- prototype: Pick<T, keyof T>;
51
- new (...arguments_: Arguments): T;
74
+ type Class<T$1, Arguments extends unknown[] = any[]> = {
75
+ prototype: Pick<T$1, keyof T$1>;
76
+ new (...arguments_: Arguments): T$1;
52
77
  };
53
78
  //#endregion
54
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-any.d.ts
79
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-any.d.ts
55
80
  /**
56
81
  Returns a boolean for whether the given type is `any`.
57
82
 
@@ -80,9 +105,9 @@ const anyA = get(anyObject, 'a');
80
105
  @category Type Guard
81
106
  @category Utilities
82
107
  */
83
- type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
108
+ type IsAny<T$1> = 0 extends 1 & NoInfer<T$1> ? true : false;
84
109
  //#endregion
85
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-optional-key-of.d.ts
110
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-optional-key-of.d.ts
86
111
  /**
87
112
  Returns a boolean for whether the given key is an optional key of type.
88
113
 
@@ -123,9 +148,9 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
123
148
  @category Type Guard
124
149
  @category Utilities
125
150
  */
126
- 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;
151
+ type IsOptionalKeyOf<Type extends object, Key$1 extends keyof Type> = IsAny<Type | Key$1> extends true ? never : Key$1 extends keyof Type ? Type extends Record<Key$1, Type[Key$1]> ? false : true : false;
127
152
  //#endregion
128
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/optional-keys-of.d.ts
153
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/optional-keys-of.d.ts
129
154
  /**
130
155
  Extract all optional keys from the given type.
131
156
 
@@ -163,7 +188,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
163
188
  ? (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`
164
189
  : never;
165
190
  //#endregion
166
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/required-keys-of.d.ts
191
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/required-keys-of.d.ts
167
192
  /**
168
193
  Extract all required keys from the given type.
169
194
 
@@ -191,7 +216,7 @@ const validator2 = createValidation<User>('surname', value => value.length < 25)
191
216
  type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
192
217
  ? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
193
218
  //#endregion
194
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-never.d.ts
219
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-never.d.ts
195
220
  /**
196
221
  Returns a boolean for whether the given type is `never`.
197
222
 
@@ -233,9 +258,9 @@ endIfEqual('abc', '123');
233
258
  @category Type Guard
234
259
  @category Utilities
235
260
  */
236
- type IsNever<T> = [T] extends [never] ? true : false;
261
+ type IsNever<T$1> = [T$1] extends [never] ? true : false;
237
262
  //#endregion
238
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/if.d.ts
263
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/if.d.ts
239
264
  /**
240
265
  An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
241
266
 
@@ -295,7 +320,7 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
295
320
  */
296
321
  type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
297
322
  //#endregion
298
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/internal/type.d.ts
323
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/internal/type.d.ts
299
324
  /**
300
325
  Matches any primitive, `void`, `Date`, or `RegExp` value.
301
326
  */
@@ -308,41 +333,12 @@ Needed to handle the case of a single call signature with properties.
308
333
  Multiple call signatures cannot currently be supported due to a TypeScript limitation.
309
334
  @see https://github.com/microsoft/TypeScript/issues/29732
310
335
  */
311
- type HasMultipleCallSignatures<T extends (...arguments_: any[]) => unknown> = T extends {
336
+ type HasMultipleCallSignatures<T$1 extends (...arguments_: any[]) => unknown> = T$1 extends {
312
337
  (...arguments_: infer A): unknown;
313
338
  (...arguments_: infer B): unknown;
314
339
  } ? B extends A ? A extends B ? false : true : true : false;
315
340
  //#endregion
316
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-equal.d.ts
317
- /**
318
- Returns a boolean for whether the two given types are equal.
319
-
320
- @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
321
- @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
322
-
323
- Use-cases:
324
- - If you want to make a conditional branch based on the result of a comparison of two types.
325
-
326
- @example
327
- ```
328
- import type {IsEqual} from 'type-fest';
329
-
330
- // This type returns a boolean for whether the given array includes the given item.
331
- // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
332
- type Includes<Value extends readonly any[], Item> =
333
- Value extends readonly [Value[0], ...infer rest]
334
- ? IsEqual<Value[0], Item> extends true
335
- ? true
336
- : Includes<rest, Item>
337
- : false;
338
- ```
339
-
340
- @category Type Guard
341
- @category Utilities
342
- */
343
- type IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
344
- //#endregion
345
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/simplify.d.ts
341
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/simplify.d.ts
346
342
  /**
347
343
  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.
348
344
 
@@ -400,9 +396,40 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
400
396
  @see SimplifyDeep
401
397
  @category Object
402
398
  */
403
- type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
399
+ type Simplify<T$1> = { [KeyType in keyof T$1]: T$1[KeyType] } & {};
404
400
  //#endregion
405
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/omit-index-signature.d.ts
401
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-equal.d.ts
402
+ /**
403
+ Returns a boolean for whether the two given types are equal.
404
+
405
+ @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
406
+ @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
407
+
408
+ Use-cases:
409
+ - If you want to make a conditional branch based on the result of a comparison of two types.
410
+
411
+ @example
412
+ ```
413
+ import type {IsEqual} from 'type-fest';
414
+
415
+ // This type returns a boolean for whether the given array includes the given item.
416
+ // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
417
+ type Includes<Value extends readonly any[], Item> =
418
+ Value extends readonly [Value[0], ...infer rest]
419
+ ? IsEqual<Value[0], Item> extends true
420
+ ? true
421
+ : Includes<rest, Item>
422
+ : false;
423
+ ```
424
+
425
+ @category Type Guard
426
+ @category Utilities
427
+ */
428
+ type IsEqual<A$1, B$1> = [A$1, B$1] extends [infer AA, infer BB] ? [AA] extends [never] ? [BB] extends [never] ? true : false : [BB] extends [never] ? false : _IsEqual<AA, BB> : false;
429
+ // This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
430
+ type _IsEqual<A$1, B$1> = (<G>() => G extends A$1 & G | G ? 1 : 2) extends (<G>() => G extends B$1 & G | G ? 1 : 2) ? true : false;
431
+ //#endregion
432
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/omit-index-signature.d.ts
406
433
  /**
407
434
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
408
435
 
@@ -495,7 +522,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
495
522
  */
496
523
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
497
524
  //#endregion
498
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/pick-index-signature.d.ts
525
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/pick-index-signature.d.ts
499
526
  /**
500
527
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
501
528
 
@@ -543,7 +570,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
543
570
  */
544
571
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
545
572
  //#endregion
546
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/merge.d.ts
573
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/merge.d.ts
547
574
  // Merges two objects without worrying about index signatures.
548
575
  type SimpleMerge<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source;
549
576
 
@@ -583,7 +610,7 @@ export type FooBar = Merge<Foo, Bar>;
583
610
  */
584
611
  type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
585
612
  //#endregion
586
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/internal/object.d.ts
613
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/internal/object.d.ts
587
614
  /**
588
615
  Merges user specified options with default options.
589
616
 
@@ -638,7 +665,7 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
638
665
  */
639
666
  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>>>>;
640
667
  //#endregion
641
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/except.d.ts
668
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/except.d.ts
642
669
  /**
643
670
  Filter out keys from an object.
644
671
 
@@ -666,7 +693,7 @@ type Filtered = Filter<'bar', 'foo'>;
666
693
 
667
694
  @see {Except}
668
695
  */
669
- type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
696
+ type Filter<KeyType$1, ExcludeType> = IsEqual<KeyType$1, ExcludeType> extends true ? never : (KeyType$1 extends ExcludeType ? never : KeyType$1);
670
697
  type ExceptOptions = {
671
698
  /**
672
699
  Disallow assigning non-specified properties.
@@ -735,7 +762,7 @@ type PostPayload = Except<UserData, 'email'>;
735
762
  type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
736
763
  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>> : {});
737
764
  //#endregion
738
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/required-deep.d.ts
765
+ //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/required-deep.d.ts
739
766
  /**
740
767
  Create a type from another type with all keys and nested keys set to required.
741
768
 
@@ -777,15 +804,15 @@ Note that types containing overloaded functions are not made deeply required due
777
804
  @category Set
778
805
  @category Map
779
806
  */
780
- 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;
807
+ type RequiredDeep<T$1> = T$1 extends BuiltIns ? T$1 : T$1 extends Map<infer KeyType, infer ValueType> ? Map<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T$1 extends Set<infer ItemType> ? Set<RequiredDeep<ItemType>> : T$1 extends ReadonlyMap<infer KeyType, infer ValueType> ? ReadonlyMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T$1 extends ReadonlySet<infer ItemType> ? ReadonlySet<RequiredDeep<ItemType>> : T$1 extends WeakMap<infer KeyType, infer ValueType> ? WeakMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T$1 extends WeakSet<infer ItemType> ? WeakSet<RequiredDeep<ItemType>> : T$1 extends Promise<infer ValueType> ? Promise<RequiredDeep<ValueType>> : T$1 extends ((...arguments_: any[]) => unknown) ? IsNever<keyof T$1> extends true ? T$1 : HasMultipleCallSignatures<T$1> extends true ? T$1 : ((...arguments_: Parameters<T$1>) => ReturnType<T$1>) & RequiredObjectDeep<T$1> : T$1 extends object ? RequiredObjectDeep<T$1> : unknown;
781
808
  type RequiredObjectDeep<ObjectType extends object> = { [KeyType in keyof ObjectType]-?: RequiredDeep<ObjectType[KeyType]> };
782
809
  //#endregion
783
810
  //#region src/util/types/PropertyNames.d.ts
784
- type PropertyNames<T> = RequiredDeep<{ [P in keyof T]: P }>;
811
+ type PropertyNames<T$1> = RequiredDeep<{ [P in keyof T$1]: P }>;
785
812
  //#endregion
786
813
  //#region src/models/shared/ItemEntityType.d.ts
787
- interface ItemEntityType<T extends string> {
788
- type: T;
814
+ interface ItemEntityType<T$1 extends string> {
815
+ type: T$1;
789
816
  }
790
817
  declare const ItemEntityTypePropertyNames: PropertyNames<ItemEntityType<string>>;
791
818
  declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
@@ -814,26 +841,50 @@ declare abstract class Serializable {
814
841
  type DeepOmitArray<TArray extends unknown[], TKey> = { [P in keyof TArray]: DeepOmit<TArray[P], TKey> };
815
842
  //#endregion
816
843
  //#region src/util/types/DeepOmit.d.ts
817
- 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 };
844
+ type DeepOmit<T$1, TKey> = T$1 extends Primitive ? T$1 : { [P in Exclude<keyof T$1, TKey>]: T$1[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 };
818
845
  //#endregion
819
846
  //#region src/util/types/DeepOptionalProperties.d.ts
820
- type DeepOptionalProperties<T> = { [K in keyof T as undefined extends T[K] ? K : never]?: DeepOptionalProperties<T[K]> };
847
+ type DeepOptionalProperties<T$1> = { [K in keyof T$1 as undefined extends T$1[K] ? K : never]?: DeepOptionalProperties<T$1[K]> };
821
848
  //#endregion
822
849
  //#region src/util/types/DeepRequiredProperties.d.ts
823
- type DeepRequiredProperties<T> = { [K in keyof T as undefined extends T[K] ? never : K]: DeepRequiredProperties<T[K]> };
850
+ type DeepRequiredProperties<T$1> = { [K in keyof T$1 as undefined extends T$1[K] ? never : K]: DeepRequiredProperties<T$1[K]> };
824
851
  //#endregion
825
852
  //#region src/util/types/DeepOptionalUndefined.d.ts
826
- 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;
853
+ type DeepOptionalUndefined<T$1> = T$1 extends ((...args: unknown[]) => unknown) ? T$1 : T$1 extends (infer U)[] ? DeepOptionalUndefined<U>[] : T$1 extends readonly (infer U)[] ? readonly DeepOptionalUndefined<U>[] : T$1 extends Date ? T$1 : T$1 extends object ? keyof T$1 extends never ? never : DeepOptionalProperties<T$1> extends Record<never, unknown> ? DeepRequiredProperties<T$1> : DeepRequiredProperties<T$1> extends Record<never, unknown> ? DeepOptionalProperties<T$1> : DeepOptionalProperties<T$1> & DeepRequiredProperties<T$1> : T$1;
827
854
  //#endregion
828
855
  //#region src/models/shared/ToData.d.ts
829
- type ToData<T extends Serializable> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
856
+ type ToData<T$1 extends Serializable> = DeepOptionalUndefined<DeepOmit<T$1, "toJSON">>;
830
857
  //#endregion
831
858
  //#region src/models/shared/WithMetadata.d.ts
832
- interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
833
- new (...args: ConstructorParameters<TBase>): InstanceType<TBase> & ItemMetadata;
834
- prototype: InstanceType<TBase> & ItemMetadata;
859
+ interface WithMetadata<TBase$1 extends Class<NonNullable<unknown>>> {
860
+ new (...args: ConstructorParameters<TBase$1>): InstanceType<TBase$1> & ItemMetadata;
861
+ prototype: InstanceType<TBase$1> & ItemMetadata;
835
862
  }
836
863
  //#endregion
864
+ //#region src/services/app/constants.d.ts
865
+ declare const SITE_NAME = "Esposter";
866
+ //#endregion
867
+ //#region src/services/message/constants.d.ts
868
+ declare const MENTION_ID_ATTRIBUTE = "data-id";
869
+ declare const MENTION_LABEL_ATTRIBUTE = "data-label";
870
+ declare const MENTION_TYPE_ATTRIBUTE = "data-type";
871
+ declare const MENTION_TYPE = "mention";
872
+ declare const PUSH_NOTIFICATION_MAX_LENGTH = 100;
873
+ //#endregion
874
+ //#region src/services/message/getCreateMessageNotificationPayload.d.ts
875
+ declare const getCreateMessageNotificationPayload: (message: string, {
876
+ icon,
877
+ title,
878
+ url
879
+ }: {
880
+ icon?: null | string;
881
+ title?: null | string;
882
+ url: string;
883
+ }) => string | undefined;
884
+ //#endregion
885
+ //#region src/services/message/getMentions.d.ts
886
+ declare const getMentions: (message: string) => HTMLElement[];
887
+ //#endregion
837
888
  //#region src/services/prettier/css.d.ts
838
889
  declare const css: typeof String.raw;
839
890
  //#endregion
@@ -843,10 +894,8 @@ declare const html: typeof String.raw;
843
894
  //#region src/services/shared/applyItemMetadataMixin.d.ts
844
895
  declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
845
896
  //#endregion
846
- //#region src/util/environment/constants.d.ts
847
- declare const IS_PRODUCTION: boolean;
848
- declare const IS_TEST: boolean;
849
- declare const IS_DEVELOPMENT: boolean;
897
+ //#region src/services/survey/constants.d.ts
898
+ declare const SURVEY_DISPLAY_NAME = "Surveyer";
850
899
  //#endregion
851
900
  //#region src/util/environment/getIsServer.d.ts
852
901
  declare const getIsServer: () => boolean;
@@ -864,7 +913,7 @@ declare const isPlainObject: (data: unknown) => data is object;
864
913
  declare const jsonDateParse: (text: string) => any;
865
914
  //#endregion
866
915
  //#region src/util/types/MergeObjectsStrict.d.ts
867
- 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;
916
+ type MergeObjectsStrict<T$1 extends object[]> = T$1 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$1 extends [infer TFirst] ? TFirst : never;
868
917
  //#endregion
869
918
  //#region src/util/object/mergeObjectsStrict.d.ts
870
919
  declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
@@ -890,6 +939,9 @@ type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U exten
890
939
  //#region src/util/text/toKebabCase.d.ts
891
940
  declare const toKebabCase: <T extends string>(string: T) => CamelToKebab<T>;
892
941
  //#endregion
942
+ //#region src/util/text/truncate.d.ts
943
+ declare const truncate: (string: string, length: number) => string;
944
+ //#endregion
893
945
  //#region src/util/text/uncapitalize.d.ts
894
946
  declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
895
947
  //#endregion
@@ -900,10 +952,10 @@ declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
900
952
  declare const now: () => string;
901
953
  //#endregion
902
954
  //#region src/util/types/FunctionProperties.d.ts
903
- type FunctionProperties<T> = { [K in keyof T]: T[K] extends Function ? K : never };
955
+ type FunctionProperties<T$1> = { [K in keyof T$1]: T$1[K] extends Function ? K : never };
904
956
  //#endregion
905
957
  //#region src/util/types/ExcludeFunctionProperties.d.ts
906
- type ExcludeFunctionProperties<T> = Except<T, FunctionProperties<T>[keyof T]>;
958
+ type ExcludeFunctionProperties<T$1> = Except<T$1, FunctionProperties<T$1>[keyof T$1]>;
907
959
  //#endregion
908
960
  //#region src/util/types/KebabToCamel.d.ts
909
961
  type KebabToCamel<S extends string> = S extends `${infer T}-${infer U}` ? `${T}${Capitalize<KebabToCamel<U>>}` : S;
@@ -911,23 +963,26 @@ type KebabToCamel<S extends string> = S extends `${infer T}-${infer U}` ? `${T}$
911
963
  //#region src/util/types/MapValue.d.ts
912
964
  type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
913
965
  //#endregion
966
+ //#region src/util/types/PartialByKeys.d.ts
967
+ type PartialByKeys<T$1, K$1 extends keyof T$1 = keyof T$1> = Except<T$1, K$1> & Partial<Pick<T$1, Extract<keyof T$1, K$1>>>;
968
+ //#endregion
914
969
  //#region src/util/types/TupleSplitHead.d.ts
915
- type TupleSplitHead<T extends unknown[], N extends number> = T["length"] extends N ? T : T extends [...infer R, unknown] ? TupleSplitHead<R, N> : never;
970
+ type TupleSplitHead<T$1 extends unknown[], N extends number> = T$1["length"] extends N ? T$1 : T$1 extends [...infer R, unknown] ? TupleSplitHead<R, N> : never;
916
971
  //#endregion
917
972
  //#region src/util/types/TupleSplitTail.d.ts
918
- type TupleSplitTail<T, N extends number, O extends unknown[] = []> = O["length"] extends N ? T : T extends [infer F, ...infer R] ? TupleSplitTail<[...R], N, [...O, F]> : never;
973
+ type TupleSplitTail<T$1, N extends number, O extends unknown[] = []> = O["length"] extends N ? T$1 : T$1 extends [infer F, ...infer R] ? TupleSplitTail<[...R], N, [...O, F]> : never;
919
974
  //#endregion
920
975
  //#region src/util/types/TupleSplit.d.ts
921
- type TupleSplit<T extends unknown[], N extends number> = [TupleSplitHead<T, N>, TupleSplitTail<T, N>];
976
+ type TupleSplit<T$1 extends unknown[], N extends number> = [TupleSplitHead<T$1, N>, TupleSplitTail<T$1, N>];
922
977
  //#endregion
923
978
  //#region src/util/types/SkipFirst.d.ts
924
- type SkipFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[1];
979
+ type SkipFirst<T$1 extends unknown[], N extends number> = TupleSplit<T$1, N>[1];
925
980
  //#endregion
926
981
  //#region src/util/types/TakeFirst.d.ts
927
- type TakeFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[0];
982
+ type TakeFirst<T$1 extends unknown[], N extends number> = TupleSplit<T$1, N>[0];
928
983
  //#endregion
929
984
  //#region src/util/types/TupleSlice.d.ts
930
- type TupleSlice<T extends unknown[], S extends number, E extends number = T["length"]> = SkipFirst<TakeFirst<T, E>, S>;
985
+ type TupleSlice<T$1 extends unknown[], S extends number, E extends number = T$1["length"]> = SkipFirst<TakeFirst<T$1, E>, S>;
931
986
  //#endregion
932
987
  //#region src/util/validation/exhaustiveGuard.d.ts
933
988
  declare const exhaustiveGuard: (value: never) => never;
@@ -939,4 +994,4 @@ declare const UUIDV4_REGEX: RegExp;
939
994
  //#region src/util/id/uuid/uuidValidateV4.d.ts
940
995
  declare const uuidValidateV4: (uuid: string) => boolean;
941
996
  //#endregion
942
- export { CamelToKebab, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, Environment, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, IS_DEVELOPMENT, IS_PRODUCTION, IS_TEST, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PropertyNames, Serializable, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, WithMetadata, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, uncapitalize, uuidValidateV4 };
997
+ export { CamelToKebab, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PUSH_NOTIFICATION_MAX_LENGTH, PartialByKeys, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, WithMetadata, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getCreateMessageNotificationPayload, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };