@esposter/shared 2.32.0 → 2.33.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 CHANGED
@@ -1,18 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import baseSanitizeHtml from "sanitize-html";
3
-
4
- //#region src/test/constants.d.ts
5
3
  declare const AllSpecialValues: {
6
4
  isPlainObject: boolean;
7
5
  value: unknown;
8
6
  }[];
9
- //#endregion
10
- //#region src/models/error/ForbiddenError.d.ts
11
7
  declare class ForbiddenError extends Error {
12
8
  constructor(message: string);
13
9
  }
14
- //#endregion
15
- //#region src/models/shared/Operation.d.ts
16
10
  declare enum Operation {
17
11
  Create = "Create",
18
12
  Delete = "Delete",
@@ -21,36 +15,24 @@ declare enum Operation {
21
15
  Unshift = "Unshift",
22
16
  Update = "Update"
23
17
  }
24
- //#endregion
25
- //#region src/models/error/InvalidOperationError.d.ts
26
18
  declare class InvalidOperationError extends Error {
27
19
  constructor(operation: Operation, name: string, message: string);
28
20
  }
29
- //#endregion
30
- //#region src/models/error/NotFoundError.d.ts
31
21
  declare class NotFoundError<T extends string = string> extends Error {
32
22
  constructor(name: T, id: string);
33
23
  }
34
- //#endregion
35
- //#region src/models/error/NotInitializedError.d.ts
36
24
  declare class NotInitializedError<T extends string = string> extends Error {
37
25
  constructor(name: T);
38
26
  }
39
- //#endregion
40
- //#region src/models/message/ClassifiedMentions.d.ts
41
27
  interface ClassifiedMentions {
42
28
  broadcastIds: string[];
43
29
  regularUserIds: string[];
44
30
  roleIds: string[];
45
31
  }
46
- //#endregion
47
- //#region src/models/message/MentionType.d.ts
48
32
  declare enum MentionType {
49
33
  Role = "role",
50
34
  User = "user"
51
35
  }
52
- //#endregion
53
- //#region src/models/router/RoutePath.d.ts
54
36
  declare const RoutePath: {
55
37
  readonly About: "/about";
56
38
  readonly Achievements: "/achievements";
@@ -86,23 +68,15 @@ declare const RoutePath: {
86
68
  readonly WebpageEditor: "/webpage-editor";
87
69
  };
88
70
  type RoutePath = typeof RoutePath;
89
- //#endregion
90
- //#region src/util/types/GetArrayProps.d.ts
91
71
  type GetArrayProps<T extends unknown[], P extends string, D extends unknown[], R extends boolean> = (D extends [unknown, ...infer Rest] ? GetProperties<T[number], R extends true ? `${P}[number]` : `${P}.[number]`, Rest, false> : never) | {
92
72
  path: R extends true ? "length" : `${P}.length`;
93
73
  value: T["length"];
94
74
  };
95
- //#endregion
96
- //#region src/util/types/KnownKeys.d.ts
97
75
  type KnownKeys<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K] };
98
- //#endregion
99
- //#region src/util/types/GetObjectProps.d.ts
100
76
  type GetObjectProps<T, P extends string, D extends unknown[], R extends boolean> = { [K in keyof KnownKeys<T> & (number | string)]: K extends `${number}` ? never : NonNullable<T[K]> extends Function ? never : (D extends [unknown, ...infer Rest] ? GetProperties<T[K], R extends true ? `${K}` : `${P}.${K}`, Rest, false> : never) | {
101
77
  path: R extends true ? `${K}` : `${P}.${K}`;
102
78
  value: T[K];
103
79
  } }[keyof KnownKeys<T> & (number | string)];
104
- //#endregion
105
- //#region src/util/types/GetPrimitiveProps.d.ts
106
80
  type GetPrimitiveProps<T, P extends string, D extends unknown[], R extends boolean> = T extends string ? {
107
81
  path: R extends true ? "length" : `${P}.length`;
108
82
  value: number;
@@ -110,19 +84,11 @@ type GetPrimitiveProps<T, P extends string, D extends unknown[], R extends boole
110
84
  path: R extends true ? "description" : `${P}.description`;
111
85
  value: string | undefined;
112
86
  } : never;
113
- //#endregion
114
- //#region src/util/types/GetProperties.d.ts
115
87
  type GetProperties<T, P extends string = "", D extends unknown[] = [unknown, unknown, unknown, unknown, unknown], R extends boolean = true> = [T] extends [never] ? never : D extends [] ? never : NonNullable<T> extends infer O ? O extends unknown[] ? GetArrayProps<O, P, D, R> : O extends object ? GetObjectProps<O, P, D, R> : GetPrimitiveProps<O, P, D, R> : never;
116
- //#endregion
117
- //#region src/util/types/GetPaths.d.ts
118
88
  type GetPaths<T> = GetProperties<T> extends infer U ? (U extends {
119
89
  path: infer Path;
120
90
  } ? Path : never) : never;
121
- //#endregion
122
- //#region src/util/types/PropertyNames.d.ts
123
91
  type PropertyNames<T> = { [P in GetPaths<T>]: P };
124
- //#endregion
125
- //#region src/models/shared/ItemEntityType.d.ts
126
92
  interface ItemEntityType<T extends string> {
127
93
  type: T;
128
94
  }
@@ -130,8 +96,6 @@ declare const ItemEntityTypePropertyNames: PropertyNames<ItemEntityType<string>>
130
96
  declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
131
97
  type: T;
132
98
  }>;
133
- //#endregion
134
- //#region src/models/shared/ItemMetadata.d.ts
135
99
  declare class ItemMetadata {
136
100
  createdAt: Date;
137
101
  deletedAt: Date | null;
@@ -143,27 +107,19 @@ declare const itemMetadataSchema: z.ZodObject<{
143
107
  deletedAt: z.ZodNullable<z.ZodDate>;
144
108
  updatedAt: z.ZodDate;
145
109
  }>;
146
- //#endregion
147
- //#region src/models/shared/Serializable.d.ts
148
110
  declare abstract class Serializable {
149
111
  toJSON(): this;
150
112
  }
151
- //#endregion
152
- //#region src/models/shared/TakeOne.d.ts
153
113
  interface TakeOne {
154
114
  <T extends readonly unknown[]>(values: T, index?: number): T[number];
155
115
  <T extends object | Record<PropertyKey, unknown>>(values: T, index: keyof T): T[keyof T];
156
116
  }
157
- //#endregion
158
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/primitive.d.ts
159
117
  /**
160
118
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
161
119
 
162
120
  @category Type
163
121
  */
164
122
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
165
- //#endregion
166
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/basic.d.ts
167
123
  /**
168
124
  Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
169
125
 
@@ -173,8 +129,6 @@ type Class<T, Arguments extends unknown[] = any[]> = {
173
129
  prototype: Pick<T, keyof T>;
174
130
  new (...arguments_: Arguments): T;
175
131
  };
176
- //#endregion
177
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-any.d.ts
178
132
  /**
179
133
  Returns a boolean for whether the given type is `any`.
180
134
 
@@ -204,8 +158,6 @@ const anyA = get(anyObject, 'a');
204
158
  @category Utilities
205
159
  */
206
160
  type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
207
- //#endregion
208
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-optional-key-of.d.ts
209
161
  /**
210
162
  Returns a boolean for whether the given key is an optional key of type.
211
163
 
@@ -247,8 +199,6 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
247
199
  @category Utilities
248
200
  */
249
201
  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;
250
- //#endregion
251
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/optional-keys-of.d.ts
252
202
  /**
253
203
  Extract all optional keys from the given type.
254
204
 
@@ -285,8 +235,6 @@ const update2: UpdateOperation<User> = {
285
235
  type OptionalKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
286
236
  ? (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`
287
237
  : never;
288
- //#endregion
289
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/required-keys-of.d.ts
290
238
  /**
291
239
  Extract all required keys from the given type.
292
240
 
@@ -319,8 +267,6 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
319
267
  */
320
268
  type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
321
269
  ? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
322
- //#endregion
323
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-never.d.ts
324
270
  /**
325
271
  Returns a boolean for whether the given type is `never`.
326
272
 
@@ -375,8 +321,6 @@ type B = IsTrueFixed<never>;
375
321
  @category Utilities
376
322
  */
377
323
  type IsNever<T> = [T] extends [never] ? true : false;
378
- //#endregion
379
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/if.d.ts
380
324
  /**
381
325
  An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
382
326
 
@@ -470,8 +414,6 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
470
414
  @category Utilities
471
415
  */
472
416
  type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
473
- //#endregion
474
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/unknown-array.d.ts
475
417
  /**
476
418
  Represents an array with `unknown` value.
477
419
 
@@ -497,8 +439,6 @@ type C = IsArray<string>;
497
439
  @category Array
498
440
  */
499
441
  type UnknownArray = readonly unknown[];
500
- //#endregion
501
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/internal/type.d.ts
502
442
  /**
503
443
  Returns a boolean for whether A is false.
504
444
 
@@ -561,8 +501,6 @@ type IfNotAnyOrNever<T, IfNotAnyOrNever, IfAny = any, IfNever = never> = If<IsAn
561
501
  Indicates the value of `exactOptionalPropertyTypes` compiler option.
562
502
  */
563
503
  type IsExactOptionalPropertyTypesEnabled = [(string | undefined)?] extends [string?] ? false : true;
564
- //#endregion
565
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/internal/array.d.ts
566
504
  /**
567
505
  Transforms a tuple type by replacing it's rest element with a single element that has the same type as the rest element, while keeping all the non-rest elements intact.
568
506
 
@@ -603,8 +541,6 @@ type _CollapseRestElement<TArray extends UnknownArray, ForwardAccumulator extend
603
541
  : TArray extends readonly [(infer First)?, ...infer Rest] ? _CollapseRestElement<Rest, [...ForwardAccumulator, '0' extends OptionalKeysOf<TArray> ? If<IsExactOptionalPropertyTypesEnabled, First, First | undefined> // Add `| undefined` for optional elements, if `exactOptionalPropertyTypes` is disabled.
604
542
  : First], BackwardAccumulator> : never // Should never happen, since `[(infer First)?, ...infer Rest]` is a top-type for arrays.
605
543
  : never; // Should never happen
606
- //#endregion
607
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/internal/characters.d.ts
608
544
  type Whitespace = '\u{9}' // '\t'
609
545
  | '\u{A}' // '\n'
610
546
  | '\u{B}' // '\v'
@@ -614,11 +550,7 @@ type Whitespace = '\u{9}' // '\t'
614
550
  | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
615
551
  type WordSeparators = '-' | '_' | Whitespace;
616
552
  type AsciiPunctuation = '!' | '"' | '#' | '$' | '%' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~';
617
- //#endregion
618
- //#region ../../node_modules/.pnpm/tagged-tag@1.0.0/node_modules/tagged-tag/index.d.ts
619
553
  declare const tag: unique symbol;
620
- //#endregion
621
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/tagged.d.ts
622
554
  // eslint-disable-next-line type-fest/require-exported-types
623
555
  type TagContainer<Token> = {
624
556
  readonly [tag]: Token;
@@ -789,8 +721,6 @@ type Person = {
789
721
  @category Type
790
722
  @deprecated Use {@link Tagged} instead
791
723
  */
792
- //#endregion
793
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-literal.d.ts
794
724
  /**
795
725
  Returns a boolean for whether the given type is a `string` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
796
726
 
@@ -851,8 +781,6 @@ type IsStringLiteral<S> = IfNotAnyOrNever<S, _IsStringLiteral<CollapseLiterals<S
851
781
  type _IsStringLiteral<S> = // If `T` is an infinite string type (e.g., `on${string}`), `Record<T, never>` produces an index signature,
852
782
  // and since `{}` extends index signatures, the result becomes `false`.
853
783
  S extends string ? {} extends Record<S, never> ? false : true : false;
854
- //#endregion
855
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/trim.d.ts
856
784
  /**
857
785
  Remove spaces from the left side.
858
786
  */
@@ -876,8 +804,6 @@ type Example = Trim<' foo '>;
876
804
  @category Template literal
877
805
  */
878
806
  type Trim<V extends string> = TrimLeft<TrimRight<V>>;
879
- //#endregion
880
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/internal/string.d.ts
881
807
  /**
882
808
  Returns a boolean for whether the given string `S` starts with the given string `SearchString`.
883
809
 
@@ -906,8 +832,6 @@ Returns a boolean for whether the string is numeric.
906
832
  This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
907
833
  */
908
834
  type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
909
- //#endregion
910
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/simplify.d.ts
911
835
  /**
912
836
  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.
913
837
 
@@ -967,8 +891,6 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
967
891
  @category Object
968
892
  */
969
893
  type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
970
- //#endregion
971
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-equal.d.ts
972
894
  /**
973
895
  Returns a boolean for whether the two given types are equal.
974
896
 
@@ -998,8 +920,6 @@ type Includes<Value extends readonly any[], Item> =
998
920
  type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false : false;
999
921
  // This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
1000
922
  type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
1001
- //#endregion
1002
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/omit-index-signature.d.ts
1003
923
  /**
1004
924
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
1005
925
 
@@ -1092,8 +1012,6 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
1092
1012
  @category Object
1093
1013
  */
1094
1014
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
1095
- //#endregion
1096
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/pick-index-signature.d.ts
1097
1015
  /**
1098
1016
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
1099
1017
 
@@ -1140,8 +1058,6 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
1140
1058
  @category Object
1141
1059
  */
1142
1060
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
1143
- //#endregion
1144
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/merge.d.ts
1145
1061
  // Merges two objects without worrying about index signatures.
1146
1062
  type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source>;
1147
1063
  /**
@@ -1212,8 +1128,6 @@ type Merge<Destination, Source> = Destination extends unknown // For distributin
1212
1128
  : never;
1213
1129
  // Should never happen
1214
1130
  type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
1215
- //#endregion
1216
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/internal/object.d.ts
1217
1131
  /**
1218
1132
  Merges user specified options with default options.
1219
1133
 
@@ -1297,8 +1211,6 @@ type E = CollapseLiterals<LiteralUnion<'foo' | 'bar', string> | null | undefined
1297
1211
  ```
1298
1212
  */
1299
1213
  type CollapseLiterals<T> = {} extends T ? T : T extends infer U & {} ? U : T;
1300
- //#endregion
1301
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/some-extend.d.ts
1302
1214
  /**
1303
1215
  @see {@link SomeExtend}
1304
1216
  */
@@ -1379,8 +1291,6 @@ type B = SomeExtend<[1?, 2?, '3'?], string | undefined>;
1379
1291
  type SomeExtend<TArray extends UnknownArray, Type, Options extends SomeExtendOptions = {}> = _SomeExtend<CollapseRestElement<TArray>, Type, ApplyDefaultOptions<SomeExtendOptions, DefaultSomeExtendOptions, Options>>;
1380
1292
  type _SomeExtend<TArray extends UnknownArray, Type, Options extends Required<SomeExtendOptions>> = IfNotAnyOrNever<TArray, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true // If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, return `true`.
1381
1293
  ? true : _SomeExtend<Rest, Type, Options> : First extends Type ? true : _SomeExtend<Rest, Type, Options> : false, false, false>;
1382
- //#endregion
1383
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/or-all.d.ts
1384
1294
  /**
1385
1295
  Returns a boolean for whether any of the given elements is `true`.
1386
1296
 
@@ -1450,8 +1360,6 @@ Note: `OrAll<[]>` evaluates to `false` because there are no `true` elements in a
1450
1360
  @see {@link AndAll}
1451
1361
  */
1452
1362
  type OrAll<T extends readonly boolean[]> = SomeExtend<T, true>;
1453
- //#endregion
1454
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/or.d.ts
1455
1363
  /**
1456
1364
  Returns a boolean for whether either of two given types is `true`.
1457
1365
 
@@ -1530,8 +1438,6 @@ type G = Or<never, never>;
1530
1438
  @see {@link Xor}
1531
1439
  */
1532
1440
  type Or<A extends boolean, B extends boolean> = OrAll<[A, B]>;
1533
- //#endregion
1534
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/all-extend.d.ts
1535
1441
  /**
1536
1442
  @see {@link AllExtend}
1537
1443
  */
@@ -1616,8 +1522,6 @@ type B = AllExtend<[1?, 2?, 3?], number | undefined>;
1616
1522
  type AllExtend<TArray extends UnknownArray, Type, Options extends AllExtendOptions = {}> = _AllExtend<CollapseRestElement<TArray>, Type, ApplyDefaultOptions<AllExtendOptions, DefaultAllExtendOptions, Options>>;
1617
1523
  type _AllExtend<TArray extends UnknownArray, Type, Options extends Required<AllExtendOptions>> = IfNotAnyOrNever<TArray, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true // If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, recurse further.
1618
1524
  ? _AllExtend<Rest, Type, Options> : false : First extends Type ? _AllExtend<Rest, Type, Options> : false : true, false, false>;
1619
- //#endregion
1620
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/except.d.ts
1621
1525
  /**
1622
1526
  Filter out keys from an object.
1623
1527
 
@@ -1714,8 +1618,6 @@ type PostPayloadFixed = Except<UserData, 'email'>;
1714
1618
  */
1715
1619
  type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
1716
1620
  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>> : {});
1717
- //#endregion
1718
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/promisable.d.ts
1719
1621
  /**
1720
1622
  Create a type that represents either the value or the value wrapped in `PromiseLike`.
1721
1623
 
@@ -1741,8 +1643,6 @@ await logger(() => Promise.resolve('bar'));
1741
1643
  @category Async
1742
1644
  */
1743
1645
  type Promisable<T> = T | PromiseLike<T>;
1744
- //#endregion
1745
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-lowercase.d.ts
1746
1646
  /**
1747
1647
  Returns a boolean for whether the given string literal is lowercase.
1748
1648
 
@@ -1769,8 +1669,6 @@ type _IsLowercase<S extends string, Accumulator extends boolean[] = []> = S exte
1769
1669
  Returns a boolean for whether an individual part of the string is lowercase.
1770
1670
  */
1771
1671
  type IsLowercaseHelper<S extends string> = S extends Lowercase<string> ? true : S extends Uppercase<string> | Capitalize<string> | `${string}${Uppercase<string>}${string}` ? false : boolean;
1772
- //#endregion
1773
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/is-uppercase.d.ts
1774
1672
  /**
1775
1673
  Returns a boolean for whether the given string literal is uppercase.
1776
1674
 
@@ -1797,8 +1695,6 @@ type _IsUppercase<S extends string, Accumulator extends boolean[] = []> = S exte
1797
1695
  Returns a boolean for whether an individual part of the string is uppercase.
1798
1696
  */
1799
1697
  type IsUppercaseHelper<S extends string> = S extends Uppercase<string> ? true : S extends Lowercase<string> | Uncapitalize<string> | `${string}${Lowercase<string>}${string}` ? false : boolean;
1800
- //#endregion
1801
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/words.d.ts
1802
1698
  type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
1803
1699
  type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
1804
1700
  /**
@@ -1894,8 +1790,6 @@ type WordsImplementation<Sentence extends string, Options extends Required<Words
1894
1790
  : [true, true] extends [IsLowercase<LastCharacter>, IsUppercase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...WordsImplementation<RemainingCharacters, Options, FirstCharacter, FirstCharacter>] // Case change: upper to lower, brings back the last character, push word
1895
1791
  : [true, true] extends [IsUppercase<LastCharacter>, IsLowercase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] // No case change: concat word
1896
1792
  : WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
1897
- //#endregion
1898
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/delimiter-case.d.ts
1899
1793
  type _DefaultDelimiterCaseOptions = Merge<_DefaultWordsOptions, {
1900
1794
  splitOnNumbers: false;
1901
1795
  }>;
@@ -1945,8 +1839,6 @@ const rawCliOptions: OddlyCasedProperties<SomeOptions> = {
1945
1839
  */
1946
1840
  type DelimiterCase<Value, Delimiter extends string, Options extends WordsOptions = {}> = Value extends string ? Delimiter extends string // For distributing `Delimiter`
1947
1841
  ? IsStringLiteral<Value> extends false ? Value : Lowercase<DelimiterCaseFromArray<Words<Value, ApplyDefaultOptions<WordsOptions, _DefaultDelimiterCaseOptions, Options>>, Delimiter>> : never : Value;
1948
- //#endregion
1949
- //#region ../../node_modules/.pnpm/type-fest@5.7.0/node_modules/type-fest/source/kebab-case.d.ts
1950
1842
  /**
1951
1843
  Convert a string literal to kebab-case.
1952
1844
 
@@ -1985,27 +1877,15 @@ const rawCliOptions: KebabCasedProperties<CliOptions> = {
1985
1877
  @category Template literal
1986
1878
  */
1987
1879
  type KebabCase<Value, Options extends WordsOptions = {}> = DelimiterCase<Value, '-', ApplyDefaultOptions<WordsOptions, _DefaultDelimiterCaseOptions, Options>>;
1988
- //#endregion
1989
- //#region src/util/types/DeepOmit.d.ts
1990
1880
  type DeepOmit<T, TKey extends PropertyKey> = [T] extends [Date | Function | Primitive] ? T : [Record<string, unknown>] extends [T] ? T : T extends object ? T extends unknown[] ? T extends readonly unknown[] ? { [K in keyof T]: DeepOmit<T[K], TKey> } : DeepOmit<T[number], TKey>[] : { [P in keyof T as P extends TKey ? never : P]: DeepOmit<T[P], TKey> } : T;
1991
- //#endregion
1992
- //#region src/util/types/DeepOptionalUndefined.d.ts
1993
1881
  type DeepOptionalUndefined<T> = T extends Date | Function | Primitive ? T : T extends unknown[] ? { [K in keyof T]: DeepOptionalUndefined<T[K]> } : T extends object ? { [K in keyof T as undefined extends T[K] ? K : never]?: DeepOptionalUndefined<T[K]> } & { [K in keyof T as undefined extends T[K] ? never : K]: DeepOptionalUndefined<T[K]> } extends infer O ? { [K in keyof O]: O[K] } : never : T;
1994
- //#endregion
1995
- //#region src/models/shared/ToData.d.ts
1996
1882
  type ToData<T> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
1997
- //#endregion
1998
- //#region src/models/shared/WithMetadata.d.ts
1999
1883
  interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
2000
1884
  new (...args: ConstructorParameters<TBase>): InstanceType<TBase> & ItemMetadata;
2001
1885
  prototype: InstanceType<TBase> & ItemMetadata;
2002
1886
  }
2003
- //#endregion
2004
- //#region src/services/app/constants.d.ts
2005
1887
  declare const MAX_READ_LIMIT = 1000;
2006
1888
  declare const SITE_NAME = "Esposter";
2007
- //#endregion
2008
- //#region ../../node_modules/.pnpm/neverthrow@8.2.0/node_modules/neverthrow/dist/index.d.ts
2009
1889
  interface ErrorConfig {
2010
1890
  withStackTrace: boolean;
2011
1891
  }
@@ -2301,26 +2181,12 @@ declare type Traverse<T, Depth extends number = 5> = Combine<T, Depth> extends [
2301
2181
  declare type TraverseWithAllErrors<T, Depth extends number = 5> = Traverse<T, Depth> extends Result<infer Oks, infer Errs> ? Result<Oks, Errs[]> : never;
2302
2182
  declare type CombineResults<T extends readonly Result<unknown, unknown>[]> = IsLiteralArray<T> extends 1 ? Traverse<T> : Result<ExtractOkTypes<T>, ExtractErrTypes<T>[number]>;
2303
2183
  declare type CombineResultsWithAllErrorsArray<T extends readonly Result<unknown, unknown>[]> = IsLiteralArray<T> extends 1 ? TraverseWithAllErrors<T> : Result<ExtractOkTypes<T>, ExtractErrTypes<T>[number][]>;
2304
- //#endregion
2305
- //#region src/services/error/getResult.d.ts
2306
2184
  declare const getResult: <T>(fn: () => T) => Result<T, Error>;
2307
- //#endregion
2308
- //#region src/services/error/getResultAsync.d.ts
2309
2185
  declare const getResultAsync: <T>(fn: () => Promise<T>) => ResultAsync<T, Error>;
2310
- //#endregion
2311
- //#region src/services/error/toAppError.d.ts
2312
2186
  declare const toAppError: (error: unknown) => Error;
2313
- //#endregion
2314
- //#region src/services/error/withFinalizer.d.ts
2315
2187
  declare const withFinalizer: <T>(fn: () => T, finalizer?: () => void) => T;
2316
- //#endregion
2317
- //#region src/services/error/withFinalizerAsync.d.ts
2318
2188
  declare const withFinalizerAsync: <T>(fn: () => Promisable<T>, finalizer?: () => Promisable<void>) => Promise<T>;
2319
- //#endregion
2320
- //#region src/services/message/classifyMentions.d.ts
2321
2189
  declare const classifyMentions: (message: string) => ClassifiedMentions;
2322
- //#endregion
2323
- //#region src/services/message/constants.d.ts
2324
2190
  declare const MENTION_ID_ATTRIBUTE = "data-id";
2325
2191
  declare const MENTION_ITEM_TYPE_ATTRIBUTE = "data-mention-type";
2326
2192
  declare const MENTION_LABEL_ATTRIBUTE = "data-label";
@@ -2328,8 +2194,6 @@ declare const MENTION_TYPE_ATTRIBUTE = "data-type";
2328
2194
  declare const MENTION_TYPE = "mention";
2329
2195
  declare const MENTION_HERE_ID = "@here";
2330
2196
  declare const MENTION_EVERYONE_ID = "@everyone";
2331
- //#endregion
2332
- //#region ../../node_modules/.pnpm/node-html-parser@8.0.4/node_modules/node-html-parser/dist/void-tag.d.ts
2333
2197
  declare class VoidTag {
2334
2198
  addClosingSlash: boolean;
2335
2199
  private voidTags;
@@ -2337,15 +2201,11 @@ declare class VoidTag {
2337
2201
  formatNode(tag: string, attrs: string, innerHTML: string): string;
2338
2202
  isVoidElement(tag: string): boolean;
2339
2203
  }
2340
- //#endregion
2341
- //#region ../../node_modules/.pnpm/node-html-parser@8.0.4/node_modules/node-html-parser/dist/nodes/type.d.ts
2342
2204
  declare enum NodeType {
2343
2205
  ELEMENT_NODE = 1,
2344
2206
  TEXT_NODE = 3,
2345
2207
  COMMENT_NODE = 8
2346
2208
  }
2347
- //#endregion
2348
- //#region ../../node_modules/.pnpm/node-html-parser@8.0.4/node_modules/node-html-parser/dist/nodes/node.d.ts
2349
2209
  /**
2350
2210
  * Node Class as base class for TextNode and HTMLElement.
2351
2211
  */
@@ -2368,8 +2228,6 @@ declare abstract class Node {
2368
2228
  get textContent(): string;
2369
2229
  set textContent(val: string);
2370
2230
  }
2371
- //#endregion
2372
- //#region ../../node_modules/.pnpm/node-html-parser@8.0.4/node_modules/node-html-parser/dist/nodes/html.d.ts
2373
2231
  interface KeyAttributes {
2374
2232
  id?: string;
2375
2233
  class?: string;
@@ -2627,129 +2485,48 @@ interface Options {
2627
2485
  };
2628
2486
  closeAllByClosing?: boolean;
2629
2487
  }
2630
- //#endregion
2631
- //#region src/services/message/getMentions.d.ts
2632
2488
  declare const getMentions: (message: string) => HTMLElement[];
2633
- //#endregion
2634
- //#region src/services/prettier/css.d.ts
2635
2489
  declare const css: typeof String.raw;
2636
- //#endregion
2637
- //#region src/services/prettier/html.d.ts
2638
2490
  declare const html: typeof String.raw;
2639
- //#endregion
2640
- //#region src/services/sanitizeHtml/sanitizeHtml.d.ts
2641
2491
  declare const sanitizeHtml: (...[html, options]: Parameters<typeof baseSanitizeHtml>) => string;
2642
- //#endregion
2643
- //#region src/services/sanitizeHtml/sanitizeMessageHtml.d.ts
2644
2492
  declare const sanitizeMessageHtml: (html: string) => string;
2645
- //#endregion
2646
- //#region src/services/shared/applyItemMetadataMixin.d.ts
2647
2493
  declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
2648
- //#endregion
2649
- //#region src/services/survey/constants.d.ts
2650
2494
  declare const SURVEY_DISPLAY_NAME = "Surveyer";
2651
- //#endregion
2652
- //#region src/util/array/takeOne.d.ts
2653
2495
  declare const takeOne: TakeOne;
2654
- //#endregion
2655
- //#region src/util/environment/getIsServer.d.ts
2656
2496
  declare const getIsServer: () => boolean;
2657
- //#endregion
2658
- //#region src/util/function/noop.d.ts
2659
2497
  declare const noop: () => void;
2660
- //#endregion
2661
- //#region src/util/id/constants.d.ts
2662
2498
  declare const ID_SEPARATOR = "|";
2663
- //#endregion
2664
- //#region src/util/object/checkIsPlainObject.d.ts
2665
2499
  declare const checkIsPlainObject: (data: unknown) => data is object;
2666
- //#endregion
2667
- //#region src/util/object/getPropertyNames.d.ts
2668
2500
  declare const getPropertyNames: <T>() => PropertyNames<T>;
2669
- //#endregion
2670
- //#region src/util/object/jsonDateParse.d.ts
2671
2501
  declare const jsonDateParse: <T = any>(text: string) => T;
2672
- //#endregion
2673
- //#region src/util/types/MergeObjectsStrict.d.ts
2674
2502
  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;
2675
- //#endregion
2676
- //#region src/util/object/mergeObjectsStrict.d.ts
2677
2503
  declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
2678
- //#endregion
2679
- //#region src/util/reactivity/getRawData.d.ts
2680
2504
  declare const getRawData: <T>(data: T) => T;
2681
- //#endregion
2682
- //#region src/util/reactivity/toRawDeep.d.ts
2683
2505
  declare const toRawDeep: <T extends object>(data: T) => T;
2684
- //#endregion
2685
- //#region src/util/text/capitalize.d.ts
2686
2506
  declare const capitalize: (string: string) => string;
2687
- //#endregion
2688
- //#region src/util/text/normalizeString.d.ts
2689
2507
  declare const normalizeString: (value: null | string | undefined) => string;
2690
2508
  declare const createNormalizedStringSchema: (maxLength: number, schema?: z.ZodString) => z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
2691
- //#endregion
2692
- //#region src/util/text/streamToText.d.ts
2693
2509
  declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>;
2694
- //#endregion
2695
- //#region src/util/text/toKebabCase.d.ts
2696
2510
  declare const toKebabCase: <T extends string>(string: T) => KebabCase<T>;
2697
- //#endregion
2698
- //#region src/util/text/truncate.d.ts
2699
2511
  declare const truncate: (string: string, length: number) => string;
2700
- //#endregion
2701
- //#region src/util/text/uncapitalize.d.ts
2702
2512
  declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
2703
- //#endregion
2704
- //#region src/util/time/hrtime.d.ts
2705
2513
  declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
2706
- //#endregion
2707
- //#region src/util/time/now.d.ts
2708
2514
  declare const now: () => string;
2709
- //#endregion
2710
- //#region src/util/types/BuildTuple.d.ts
2711
2515
  type BuildTuple<N extends number, T = unknown, R extends unknown[] = []> = R["length"] extends N ? R : BuildTuple<N, T, [...R, T]>;
2712
- //#endregion
2713
- //#region src/util/types/FunctionProperties.d.ts
2714
2516
  type FunctionProperties<T> = { [K in keyof T]: T[K] extends Function ? K : never };
2715
- //#endregion
2716
- //#region src/util/types/ExcludeFunctionProperties.d.ts
2717
2517
  type ExcludeFunctionProperties<T> = Except<T, FunctionProperties<T>[keyof T]>;
2718
- //#endregion
2719
- //#region src/util/types/MapValue.d.ts
2720
2518
  type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
2721
- //#endregion
2722
- //#region src/util/types/TupleSplit.d.ts
2723
2519
  type TupleSplit<T extends unknown[], N extends number> = T extends [...BuildTuple<N>, ...infer R] ? [T extends [...infer H, ...R] ? H : BuildTuple<N, T[number]>, R] : [T, []];
2724
- //#endregion
2725
- //#region src/util/types/SkipFirst.d.ts
2726
2520
  type SkipFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[1];
2727
- //#endregion
2728
- //#region src/util/types/TakeFirst.d.ts
2729
2521
  type TakeFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[0];
2730
- //#endregion
2731
- //#region src/util/types/TupleSlice.d.ts
2732
2522
  type TupleSlice<T extends unknown[], S extends number, E extends number = T["length"]> = E extends T["length"] ? SkipFirst<T, S> : SkipFirst<TakeFirst<T, E>, S>;
2733
- //#endregion
2734
- //#region src/util/types/TupleSplitHead.d.ts
2735
2523
  type TupleSplitHead<T extends unknown[], N extends number> = TupleSplit<T, N>[0];
2736
- //#endregion
2737
- //#region src/util/types/TupleSplitTail.d.ts
2738
2524
  type TupleSplitTail<T extends unknown[], N extends number> = TupleSplit<T, N>[1];
2739
- //#endregion
2740
- //#region src/util/validation/exhaustiveGuard.d.ts
2741
2525
  declare const exhaustiveGuard: (value: never) => never;
2742
- //#endregion
2743
- //#region src/util/zod/createUniqueArraySchema.d.ts
2744
2526
  type CreateUniqueArraySchema = (<TOutput extends object, TInput, TSchema extends z.ZodType<TOutput, TInput>>(schema: TSchema, key: UniqueArraySchemaKey<TSchema>) => z.ZodArray<TSchema>) & (<TSchema extends z.ZodType>(schema: TSchema) => z.ZodArray<TSchema>);
2745
2527
  type UniqueArraySchemaKey<TSchema extends z.ZodType> = TSchema extends z.ZodObject ? keyof TSchema["shape"] & string : keyof z.output<TSchema> & string;
2746
2528
  declare const createUniqueArraySchema: CreateUniqueArraySchema;
2747
- //#endregion
2748
- //#region src/util/id/uuid/constants.d.ts
2749
2529
  declare const NIL = "00000000-0000-0000-0000-000000000000";
2750
2530
  declare const UUIDV4_REGEX: RegExp;
2751
- //#endregion
2752
- //#region src/util/id/uuid/uuidValidateV4.d.ts
2753
2531
  declare const uuidValidateV4: (uuid: string) => boolean;
2754
- //#endregion
2755
2532
  export { AllSpecialValues, BuildTuple, ClassifiedMentions, CreateUniqueArraySchema, DeepOmit, DeepOptionalUndefined, ExcludeFunctionProperties, ForbiddenError, FunctionProperties, GetArrayProps, GetObjectProps, GetPaths, GetPrimitiveProps, GetProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KnownKeys, MAX_READ_LIMIT, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_ITEM_TYPE_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MentionType, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, TakeOne, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, UniqueArraySchemaKey, WithMetadata, applyItemMetadataMixin, capitalize, checkIsPlainObject, classifyMentions, createItemEntityTypeSchema, createNormalizedStringSchema, createUniqueArraySchema, css, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, getResult, getResultAsync, hrtime, html, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, noop, normalizeString, now, sanitizeHtml, sanitizeMessageHtml, streamToText, takeOne, toAppError, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4, withFinalizer, withFinalizerAsync };