@venizia/ignis-docs 0.2.0 → 0.2.1-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +14 -14
  2. package/content/best-practices/api-usage-examples.md +39 -19
  3. package/content/best-practices/architectural-patterns.md +24 -13
  4. package/content/best-practices/architecture-decisions.md +29 -16
  5. package/content/best-practices/code-style-standards/advanced-patterns.md +43 -31
  6. package/content/best-practices/code-style-standards/constants-configuration.md +19 -4
  7. package/content/best-practices/code-style-standards/control-flow.md +33 -1
  8. package/content/best-practices/code-style-standards/documentation.md +28 -8
  9. package/content/best-practices/code-style-standards/function-patterns.md +15 -4
  10. package/content/best-practices/code-style-standards/index.md +7 -2
  11. package/content/best-practices/code-style-standards/naming-conventions.md +27 -3
  12. package/content/best-practices/code-style-standards/route-definitions.md +9 -5
  13. package/content/best-practices/code-style-standards/tooling.md +14 -1
  14. package/content/best-practices/code-style-standards/type-safety.md +39 -6
  15. package/content/best-practices/common-pitfalls.md +59 -35
  16. package/content/best-practices/contribution-workflow.md +8 -4
  17. package/content/best-practices/data-modeling.md +78 -62
  18. package/content/best-practices/deployment-strategies.md +56 -19
  19. package/content/best-practices/error-handling.md +247 -153
  20. package/content/best-practices/index.md +6 -0
  21. package/content/best-practices/performance-optimization.md +26 -13
  22. package/content/best-practices/security-guidelines.md +35 -9
  23. package/content/best-practices/testing-strategies.md +7 -2
  24. package/content/best-practices/troubleshooting-tips.md +27 -17
  25. package/content/extensions/components/api-reference.md +109 -323
  26. package/content/extensions/components/authentication/api.md +489 -602
  27. package/content/extensions/components/authentication/errors.md +135 -498
  28. package/content/extensions/components/authentication/index.md +89 -801
  29. package/content/extensions/components/authentication/usage.md +231 -955
  30. package/content/extensions/components/authorization/api.md +991 -644
  31. package/content/extensions/components/authorization/errors.md +204 -208
  32. package/content/extensions/components/authorization/getting-started.md +227 -0
  33. package/content/extensions/components/authorization/index.md +88 -795
  34. package/content/extensions/components/authorization/usage.md +219 -528
  35. package/content/extensions/components/health-check.md +77 -243
  36. package/content/extensions/components/index.md +24 -90
  37. package/content/extensions/components/mail/api.md +553 -285
  38. package/content/extensions/components/mail/errors.md +76 -62
  39. package/content/extensions/components/mail/index.md +111 -463
  40. package/content/extensions/components/mail/usage.md +139 -173
  41. package/content/extensions/components/request-tracker.md +70 -173
  42. package/content/extensions/components/socket-io/api.md +462 -785
  43. package/content/extensions/components/socket-io/errors.md +49 -51
  44. package/content/extensions/components/socket-io/index.md +69 -372
  45. package/content/extensions/components/socket-io/usage.md +212 -105
  46. package/content/extensions/components/static-asset/api.md +461 -141
  47. package/content/extensions/components/static-asset/errors.md +121 -53
  48. package/content/extensions/components/static-asset/index.md +84 -606
  49. package/content/extensions/components/static-asset/usage.md +184 -299
  50. package/content/extensions/components/template/index.md +3 -3
  51. package/content/extensions/components/websocket/api.md +311 -404
  52. package/content/extensions/components/websocket/errors.md +47 -56
  53. package/content/extensions/components/websocket/index.md +75 -407
  54. package/content/extensions/components/websocket/usage.md +120 -338
  55. package/content/extensions/helpers/cron/index.md +52 -160
  56. package/content/extensions/helpers/crypto/index.md +67 -480
  57. package/content/extensions/helpers/crypto/reference.md +528 -0
  58. package/content/extensions/helpers/env/index.md +64 -178
  59. package/content/extensions/helpers/error/index.md +286 -196
  60. package/content/extensions/helpers/index.md +61 -47
  61. package/content/extensions/helpers/inversion/index.md +76 -550
  62. package/content/extensions/helpers/inversion/reference.md +530 -0
  63. package/content/extensions/helpers/kafka/admin.md +23 -3
  64. package/content/extensions/helpers/kafka/compile-binary.md +83 -52
  65. package/content/extensions/helpers/kafka/consumer.md +65 -28
  66. package/content/extensions/helpers/kafka/examples.md +46 -253
  67. package/content/extensions/helpers/kafka/index.md +55 -617
  68. package/content/extensions/helpers/kafka/producer.md +156 -22
  69. package/content/extensions/helpers/kafka/schema-registry.md +59 -79
  70. package/content/extensions/helpers/logger/hf-logger.md +220 -0
  71. package/content/extensions/helpers/logger/index.md +78 -552
  72. package/content/extensions/helpers/logger/pino.md +105 -0
  73. package/content/extensions/helpers/logger/reference.md +937 -0
  74. package/content/extensions/helpers/network/api.md +276 -195
  75. package/content/extensions/helpers/network/index.md +87 -524
  76. package/content/extensions/helpers/queue/index.md +80 -897
  77. package/content/extensions/helpers/queue/reference.md +494 -0
  78. package/content/extensions/helpers/redis/index.md +86 -640
  79. package/content/extensions/helpers/redis/reference.md +784 -0
  80. package/content/extensions/helpers/secrets/index.md +136 -0
  81. package/content/extensions/helpers/socket-io/api.md +325 -204
  82. package/content/extensions/helpers/socket-io/index.md +79 -429
  83. package/content/extensions/helpers/storage/api.md +584 -464
  84. package/content/extensions/helpers/storage/index.md +80 -573
  85. package/content/extensions/helpers/types/index.md +75 -495
  86. package/content/extensions/helpers/types/reference.md +689 -0
  87. package/content/extensions/helpers/uid/index.md +176 -189
  88. package/content/extensions/helpers/websocket/api.md +366 -214
  89. package/content/extensions/helpers/websocket/index.md +68 -503
  90. package/content/extensions/helpers/worker-thread/index.md +62 -396
  91. package/content/extensions/helpers/worker-thread/reference.md +428 -0
  92. package/content/extensions/index.md +38 -39
  93. package/content/extensions/src-details/mcp-server.md +96 -548
  94. package/content/guides/core-concepts/persistent/datasources.md +2 -2
  95. package/content/guides/core-concepts/persistent/index.md +5 -1
  96. package/content/guides/core-concepts/persistent/models.md +1 -1
  97. package/content/guides/core-concepts/persistent/pglite.md +218 -0
  98. package/content/guides/core-concepts/persistent/postgres-drivers.md +21 -15
  99. package/content/guides/core-concepts/persistent/search-meilisearch.md +22 -12
  100. package/content/guides/core-concepts/persistent/search-typesense.md +28 -16
  101. package/content/guides/core-concepts/persistent/sqlite.md +296 -0
  102. package/content/guides/core-concepts/persistent/transactions.md +12 -11
  103. package/content/guides/core-concepts/secrets-vault.md +177 -0
  104. package/content/guides/core-concepts/services.md +1 -1
  105. package/content/guides/get-started/5-minute-quickstart.md +59 -206
  106. package/content/guides/get-started/philosophy.md +135 -670
  107. package/content/guides/get-started/setup.md +53 -74
  108. package/content/guides/migrations/redis-helpers-migration.md +5 -4
  109. package/content/guides/migrations/scoped-rbac-migration.md +5 -5
  110. package/content/guides/migrations/unified-connectors-migration.md +8 -7
  111. package/content/guides/tutorials/ecommerce-api.md +3 -8
  112. package/content/guides/tutorials/realtime-chat.md +1 -1
  113. package/content/references/base/application.md +64 -22
  114. package/content/references/base/components.md +3 -3
  115. package/content/references/base/connectors.md +79 -136
  116. package/content/references/base/controllers.md +12 -12
  117. package/content/references/base/datasources-reference.md +600 -0
  118. package/content/references/base/datasources.md +84 -444
  119. package/content/references/base/dependency-injection.md +25 -46
  120. package/content/references/base/filter-system/application-usage.md +95 -123
  121. package/content/references/base/filter-system/array-operators.md +33 -43
  122. package/content/references/base/filter-system/comparison-operators.md +55 -63
  123. package/content/references/base/filter-system/default-filter.md +144 -350
  124. package/content/references/base/filter-system/fields-order-pagination.md +116 -148
  125. package/content/references/base/filter-system/index.md +114 -253
  126. package/content/references/base/filter-system/json-filtering.md +52 -181
  127. package/content/references/base/filter-system/list-operators.md +28 -44
  128. package/content/references/base/filter-system/logical-operators.md +69 -114
  129. package/content/references/base/filter-system/null-operators.md +41 -98
  130. package/content/references/base/filter-system/pattern-matching.md +48 -51
  131. package/content/references/base/filter-system/quick-reference.md +93 -196
  132. package/content/references/base/filter-system/range-operators.md +22 -38
  133. package/content/references/base/filter-system/tips.md +70 -133
  134. package/content/references/base/filter-system/use-cases.md +173 -232
  135. package/content/references/base/grpc-controllers.md +53 -17
  136. package/content/references/base/index.md +5 -3
  137. package/content/references/base/middlewares.md +43 -28
  138. package/content/references/base/models-reference.md +886 -0
  139. package/content/references/base/models.md +81 -1452
  140. package/content/references/base/providers.md +8 -8
  141. package/content/references/base/repositories/advanced.md +281 -419
  142. package/content/references/base/repositories/index.md +84 -644
  143. package/content/references/base/repositories/mixins.md +25 -21
  144. package/content/references/base/repositories/relations.md +194 -375
  145. package/content/references/base/repositories/soft-deletable.md +67 -55
  146. package/content/references/base/secrets.md +267 -0
  147. package/content/references/base/services.md +8 -6
  148. package/content/references/configuration/environment-variables.md +73 -21
  149. package/content/references/configuration/index.md +51 -31
  150. package/content/references/index.md +1 -1
  151. package/content/references/quick-reference.md +3 -16
  152. package/content/references/utilities/crypto.md +35 -76
  153. package/content/references/utilities/date.md +33 -73
  154. package/content/references/utilities/duration.md +85 -0
  155. package/content/references/utilities/index.md +6 -2
  156. package/content/references/utilities/jsx-reference.md +298 -0
  157. package/content/references/utilities/jsx.md +82 -525
  158. package/content/references/utilities/module.md +81 -61
  159. package/content/references/utilities/parse.md +34 -64
  160. package/content/references/utilities/performance.md +33 -58
  161. package/content/references/utilities/promise.md +28 -62
  162. package/content/references/utilities/request.md +58 -218
  163. package/content/references/utilities/retry.md +139 -0
  164. package/content/references/utilities/schema.md +43 -137
  165. package/content/references/utilities/statuses-reference.md +361 -0
  166. package/content/references/utilities/statuses.md +63 -667
  167. package/dist/mcp-server/index.js +0 -0
  168. package/dist/mcp-server/tools/github/list-project-files.tool.d.ts +1 -1
  169. package/dist/mcp-server/tools/github/list-project-files.tool.d.ts.map +1 -1
  170. package/dist/mcp-server/tools/github/list-project-files.tool.js +3 -3
  171. package/dist/mcp-server/tools/github/search-code.tool.js +1 -1
  172. package/dist/mcp-server/tools/github/verify-dependencies.tool.js +1 -1
  173. package/dist/mcp-server/tools/github/view-source-file.tool.js +1 -1
  174. package/package.json +24 -23
@@ -0,0 +1,689 @@
1
+ ---
2
+ title: Types - Full Reference
3
+ description: Complete reference for every utility type, resolver function, and constant class exported from @venizia/ignis-helpers
4
+ difficulty: intermediate
5
+ ---
6
+
7
+ # Types - Full Reference
8
+
9
+ Exhaustive reference for every utility type, resolver function, and constant class in `@venizia/ignis-helpers`, including the full `HTTP` and `GRPC` constant tables. For a readable introduction and the common tasks, start with the [Types overview](/extensions/helpers/types/).
10
+
11
+ **Files:**
12
+
13
+ - [`packages/helpers/src/common/types.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/types.ts) - utility types, resolvers, field-mapping types
14
+ - [`packages/helpers/src/common/constants/app.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/app.ts) - `Defaults`, `RuntimeModules`, `DataTypes`
15
+ - [`packages/helpers/src/common/constants/http.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/http.ts) - `HTTP`
16
+ - [`packages/helpers/src/common/constants/grpc.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/grpc.ts) - `GRPC`
17
+ - [`packages/helpers/src/common/constants/mime.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/mime.ts) - `MimeTypes`
18
+ - [`packages/helpers/src/common/constants/index.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/index.ts) - constants barrel
19
+
20
+ ## Find what you need
21
+
22
+ | Looking for | Go to |
23
+ |---|---|
24
+ | An escape hatch (`any`, a loose object) | [General Purpose Types](#general-purpose-types) |
25
+ | A value that may be absent, or a callback that may be async | [Nullable and Promise Types](#nullable-and-promise-types) |
26
+ | A constructor or class type parameter | [Class and Constructor Types](#class-and-constructor-types) |
27
+ | Telling a class from a plain function at runtime | [isClass](#isclass) |
28
+ | Making object keys optional or required, or flattening `A & B` | [Object Utility Types](#object-utility-types) |
29
+ | A union type derived from a const class | [Const Value Extraction Types](#const-value-extraction-types) |
30
+ | An option that accepts an eager value or a resolver function | [Value Resolution Types and Functions](#value-resolution-types-and-functions) |
31
+ | A config-driven field-to-type mapping | [Field Mapping Types](#field-mapping-types) |
32
+ | DI container getter types, the `configure()` interface | [DI and Lifecycle Types](#di-and-lifecycle-types) |
33
+ | JSX component prop types | [JSX Types](#jsx-types) |
34
+ | Query pagination defaults, the application name | [Defaults](#defaults) |
35
+ | Detecting Bun vs Node at runtime | [RuntimeModules](#runtimemodules) |
36
+ | Schema data type constants | [DataTypes](#datatypes) |
37
+ | HTTP headers, methods, status codes | [HTTP](#http) |
38
+ | gRPC methods, headers, status codes | [GRPC](#grpc) |
39
+ | Content-type classification (image, video, text) | [MimeTypes](#mimetypes) |
40
+
41
+ ## Import paths
42
+
43
+ ```typescript
44
+ // Types
45
+ import type {
46
+ TNullable,
47
+ AnyType,
48
+ AnyObject,
49
+ TOptions,
50
+ ValueOrPromise,
51
+ ValueOf,
52
+ ValueOptional,
53
+ ValueOptionalExcept,
54
+ TPrettify,
55
+ TConstructor,
56
+ TAbstractConstructor,
57
+ TClass,
58
+ TAbstractClass,
59
+ TMixinTarget,
60
+ TAbstractMixinTarget,
61
+ TResolver,
62
+ TAsyncResolver,
63
+ TValueOrResolver,
64
+ TValueOrAsyncResolver,
65
+ TStringConstValue,
66
+ TNumberConstValue,
67
+ TConstValue,
68
+ TFieldMappingDataType,
69
+ IFieldMapping,
70
+ TFieldMappingNames,
71
+ TObjectFromFieldMappings,
72
+ TInjectionGetter,
73
+ IConfigurable,
74
+ } from '@venizia/ignis-helpers';
75
+
76
+ // isClass (source-level class-syntax check, re-exported from @venizia/ignis-inversion)
77
+ import { isClass } from '@venizia/ignis-helpers';
78
+
79
+ // Resolver functions
80
+ import { resolveValue, resolveValueAsync, resolveClass } from '@venizia/ignis-helpers';
81
+
82
+ // Constants
83
+ import { Defaults, RuntimeModules, DataTypes, HTTP, GRPC, MimeTypes } from '@venizia/ignis-helpers';
84
+
85
+ // Derived constant types
86
+ import type {
87
+ TRuntimeModule,
88
+ TMimeTypes,
89
+ THttpMethod,
90
+ THttpProtocol,
91
+ THttpResultCode,
92
+ TGrpcMethod,
93
+ TGrpcResultCode,
94
+ } from '@venizia/ignis-helpers';
95
+
96
+ // JSX types (re-exported from hono/jsx)
97
+ import type { Child, FC, PropsWithChildren } from '@venizia/ignis-helpers';
98
+ ```
99
+
100
+ All of the above resolve through the root `@venizia/ignis-helpers` barrel. It re-exports `./common` in full, which includes `./common/types` and `./common/constants`.
101
+
102
+ ## General Purpose Types
103
+
104
+ `Source ->` [`types.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/types.ts)
105
+
106
+ ```typescript
107
+ type AnyType = any;
108
+ type AnyObject = Record<string | symbol | number, any>;
109
+ type TOptions<T extends object = {}> = T;
110
+ ```
111
+
112
+ | Type | Meaning | Use |
113
+ |------|---------|-----|
114
+ | `AnyType` | Alias for `any` | Escape hatch when a shape truly cannot be known at compile time |
115
+ | `AnyObject` | Loosely-typed record | Objects whose keys and value types are not known at compile time |
116
+ | `TOptions<T>` | Identity wrapper around `T` (defaults to `{}`) | Semantic marker that a parameter follows the framework's options-object pattern |
117
+
118
+ ## Nullable and Promise Types
119
+
120
+ ```typescript
121
+ type TNullable<T> = T | undefined | null;
122
+ type ValueOrPromise<T> = T | Promise<T>;
123
+ ```
124
+
125
+ | Type | Meaning | Use |
126
+ |------|---------|-----|
127
+ | `TNullable<T>` | `T \| undefined \| null` | A value that may be absent in either JavaScript "no value" form |
128
+ | `ValueOrPromise<T>` | `T \| Promise<T>` | A method or callback that may be implemented sync or async |
129
+
130
+ ## Class and Constructor Types
131
+
132
+ ```typescript
133
+ type TConstructor<T> = new (...args: any[]) => T;
134
+ type TAbstractConstructor<T> = abstract new (...args: any[]) => T;
135
+ type TClass<T> = TConstructor<T> & { [property: string]: any };
136
+ type TAbstractClass<T> = TAbstractConstructor<T> & { [property: string]: any };
137
+ type TMixinTarget<T> = TConstructor<{ [P in keyof T]: T[P] }>;
138
+ type TAbstractMixinTarget<T> = TAbstractConstructor<{ [P in keyof T]: T[P] }>;
139
+ ```
140
+
141
+ | Type | Meaning | Use |
142
+ |------|---------|-----|
143
+ | `TConstructor<T>` | A concrete `new (...args) => T` constructor | Typing a parameter that must be `new`-able |
144
+ | `TAbstractConstructor<T>` | An `abstract new (...args) => T` constructor | Typing a parameter that accepts an abstract class reference |
145
+ | `TClass<T>` | `TConstructor<T>` plus an index signature for static members | The most commonly used class type - a concrete class with arbitrary static properties |
146
+ | `TAbstractClass<T>` | `TAbstractConstructor<T>` plus an index signature for static members | Same as `TClass`, for abstract classes |
147
+ | `TMixinTarget<T>` | `TConstructor` over a mapped-identity copy of `T` | Types a mixin factory's `Base` parameter so the returned class keeps `T`'s shape |
148
+ | `TAbstractMixinTarget<T>` | `TAbstractConstructor` over a mapped-identity copy of `T` | Same as `TMixinTarget`, for mixins over an abstract base |
149
+
150
+ ```typescript
151
+ function MyMixin<T extends TMixinTarget<BaseClass>>(Base: T) {
152
+ return class extends Base {
153
+ // additional methods
154
+ };
155
+ }
156
+ ```
157
+
158
+ ### isClass
159
+
160
+ `Source ->` [`packages/inversion/src/common/types.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/common/types.ts)
161
+
162
+ ```typescript
163
+ const isClass: <T>(target: any) => target is TClass<T>;
164
+ ```
165
+
166
+ Declared in `@venizia/ignis-inversion` and re-exported by `helpers`. It's the single predicate that tells a constructor from a resolver function. The boot booters, controller factories, and `resolveValue`/`resolveValueAsync`/`resolveClass` all branch on it.
167
+
168
+ - **Filters to functions with a `prototype`** - true of every non-arrow function, so this alone is not sufficient.
169
+ - **Decompiles the function via `Function.prototype.toString`** and regex-tests that the source text literally starts with the `class` keyword.
170
+ - **Sound only when targeting ES2024+** - a class is emitted as `class`, never as an ES5 constructor function. Bundling this package down to ES5 breaks the predicate.
171
+
172
+ ## Object Utility Types
173
+
174
+ ```typescript
175
+ type ValueOf<T> = T[keyof T];
176
+ type ValueOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
177
+ type ValueOptionalExcept<T, K extends keyof T> = Pick<T, K> & Partial<Omit<T, K>>;
178
+ type TPrettify<T> = { [K in keyof T]: T[K] } & {};
179
+ ```
180
+
181
+ | Type | Meaning | Use |
182
+ |------|---------|-----|
183
+ | `ValueOf<T>` | Union of all value types of `T` | Deriving a union type from an object type, most often a const class |
184
+ | `ValueOptional<T, K>` | `T` with keys `K` made optional, the rest unchanged | Relaxing specific required fields |
185
+ | `ValueOptionalExcept<T, K>` | `T` with everything optional except keys `K` | The inverse - only `K` stays required |
186
+ | `TPrettify<T>` | Flattens an intersection (`A & B`) into one object type | Readable IDE hover tooltips when combining types with `&` |
187
+
188
+ ## Const Value Extraction Types
189
+
190
+ ```typescript
191
+ type TStringConstValue<T extends TClass<any>> = Extract<ValueOf<T>, string>;
192
+ type TNumberConstValue<T extends TClass<any>> = Extract<ValueOf<T>, number>;
193
+ type TConstValue<T extends TClass<any>> = Extract<ValueOf<T>, string | number>;
194
+ ```
195
+
196
+ | Type | Meaning | Use |
197
+ |------|---------|-----|
198
+ | `TStringConstValue<T>` | The string-valued subset of `ValueOf<T>` | Deriving a string union from a const class with mixed value types |
199
+ | `TNumberConstValue<T>` | The number-valued subset of `ValueOf<T>` | Deriving a numeric union from a const class with mixed value types |
200
+ | `TConstValue<T>` | The string-or-number-valued subset of `ValueOf<T>` | The common case - deriving a union type from a const class (`RuntimeModules`, `MimeTypes`) |
201
+
202
+ ```typescript
203
+ type TRuntimeModule = TConstValue<typeof RuntimeModules>; // 'node' | 'bun'
204
+ type TMimeTypes = TConstValue<typeof MimeTypes>; // 'unknown' | 'image' | 'video' | 'text'
205
+ ```
206
+
207
+ ## Value Resolution Types and Functions
208
+
209
+ Types and functions for lazy/deferred value resolution - a core pattern in the framework's DI and configuration systems.
210
+
211
+ ### Types
212
+
213
+ ```typescript
214
+ type TResolver<T> = (...args: any[]) => T;
215
+ type TAsyncResolver<T> = (...args: any[]) => T | Promise<T>;
216
+ type TValueOrResolver<T> = T | TResolver<T>;
217
+ type TValueOrAsyncResolver<T> = T | TAsyncResolver<T>;
218
+ ```
219
+
220
+ | Type | Meaning | Use |
221
+ |------|---------|-----|
222
+ | `TResolver<T>` | A sync function returning `T` | Deferred value production |
223
+ | `TAsyncResolver<T>` | A function returning `T` or `Promise<T>` | Deferred value production that may be async |
224
+ | `TValueOrResolver<T>` | `T \| TResolver<T>` | Config options that accept an eager value or a sync resolver |
225
+ | `TValueOrAsyncResolver<T>` | `T \| TAsyncResolver<T>` | Config options that accept an eager value or a sync/async resolver |
226
+
227
+ ### resolveValue
228
+
229
+ ```typescript
230
+ const resolveValue: <T>(valueOrResolver: TValueOrResolver<T>) => T;
231
+ ```
232
+
233
+ Synchronously resolves a lazy value.
234
+
235
+ | Input | Result |
236
+ |---|---|
237
+ | Non-function value | Returned as-is |
238
+ | Class constructor | Returned as-is - detected via `isClass()`, never invoked |
239
+ | Resolver function | Invoked; the return value is returned |
240
+
241
+ ### resolveValueAsync
242
+
243
+ ```typescript
244
+ const resolveValueAsync: <T>(valueOrResolver: TValueOrAsyncResolver<T>) => Promise<T>;
245
+ ```
246
+
247
+ Async version of `resolveValue`. Same three cases, but the resolver's return value is `await`-ed before being returned.
248
+
249
+ ### resolveClass
250
+
251
+ ```typescript
252
+ const resolveClass: <T>(
253
+ ref: TClass<T> | TResolver<TClass<T>> | string,
254
+ ) => TClass<T> | string;
255
+ ```
256
+
257
+ Resolves lazy class references.
258
+
259
+ | Input | Result |
260
+ |---|---|
261
+ | String binding key | Returned as-is, for DI key lookups |
262
+ | Class constructor | Returned as-is |
263
+ | Resolver function | Invoked via `resolveValue`; the result is returned |
264
+
265
+ ### Resolution example
266
+
267
+ ```typescript
268
+ import { TValueOrAsyncResolver, resolveValueAsync } from '@venizia/ignis-helpers';
269
+
270
+ interface DatabaseConfig {
271
+ host: string;
272
+ port: number;
273
+ }
274
+
275
+ type ConfigOption = TValueOrAsyncResolver<DatabaseConfig>;
276
+
277
+ // Direct value
278
+ const config1: ConfigOption = { host: 'localhost', port: 5432 };
279
+
280
+ // Sync resolver
281
+ const config2: ConfigOption = () => ({ host: 'localhost', port: 5432 });
282
+
283
+ // Async resolver
284
+ const config3: ConfigOption = async () => {
285
+ const config = await fetchConfigFromVault();
286
+ return config;
287
+ };
288
+
289
+ // Resolve any of the above uniformly
290
+ const resolved = await resolveValueAsync(config3);
291
+ ```
292
+
293
+ ## Field Mapping Types
294
+
295
+ Types for declarative field-to-type mappings, used for configuration-driven data transformation.
296
+
297
+ ```typescript
298
+ type TFieldMappingDataType = 'string' | 'number' | 'strings' | 'numbers' | 'boolean';
299
+
300
+ interface IFieldMapping {
301
+ name: string;
302
+ type: TFieldMappingDataType;
303
+ default?: string | number | Array<string> | Array<number> | boolean;
304
+ }
305
+
306
+ type TFieldMappingNames<T extends Array<IFieldMapping>> = Extract<
307
+ T[number],
308
+ { type: Exclude<T[number]['type'], undefined> }
309
+ >['name'];
310
+
311
+ type TObjectFromFieldMappings<
312
+ T extends readonly {
313
+ name: string;
314
+ type: string;
315
+ [extra: string | symbol]: any;
316
+ }[],
317
+ > = {
318
+ [K in T[number]['name']]: /* mapped to the declared type */
319
+ };
320
+ ```
321
+
322
+ | Type | Meaning | Use |
323
+ |------|---------|-----|
324
+ | `TFieldMappingDataType` | Union of the five supported field kinds | Constrains `IFieldMapping.type` |
325
+ | `IFieldMapping` | `{ name, type, default? }` | Declares one field's name, runtime type, and optional default |
326
+ | `TFieldMappingNames<T>` | Union of `name` values from a field-mapping array type | Extracts the set of declared field names |
327
+ | `TObjectFromFieldMappings<T>` | An object type keyed by `T[number]['name']` | Maps each declared type to its runtime TypeScript equivalent: `'string'` -> `string`, `'number'` -> `number`, `'strings'` -> `string[]`, `'numbers'` -> `number[]`, `'boolean'` -> `boolean` |
328
+
329
+ ## DI and Lifecycle Types
330
+
331
+ ```typescript
332
+ type TInjectionGetter = <T>(opts: { key: string | symbol }) => T;
333
+
334
+ interface IConfigurable<Options extends object = any, Result = any> {
335
+ configure(opts?: Options): ValueOrPromise<Result>;
336
+ }
337
+ ```
338
+
339
+ | Type | Meaning | Use |
340
+ |------|---------|-----|
341
+ | `TInjectionGetter` | A function retrieving `T` from the IoC container by binding key | Typing a container-getter parameter |
342
+ | `IConfigurable<Options, Result>` | Interface with one `configure(opts?)` method | Implemented by helpers and components that expose an explicit initialization step |
343
+
344
+ ## JSX Types
345
+
346
+ Re-exported from `hono/jsx` for convenience when building JSX-based views:
347
+
348
+ ```typescript
349
+ export type { Child, FC, PropsWithChildren } from 'hono/jsx';
350
+ ```
351
+
352
+ | Type | Meaning |
353
+ |------|---------|
354
+ | `FC` | Function component type |
355
+ | `Child` | Valid child element type |
356
+ | `PropsWithChildren` | Props type that includes a `children` property |
357
+
358
+ ## Constants
359
+
360
+ ### Defaults
361
+
362
+ `Source ->` [`constants/app.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/app.ts)
363
+
364
+ ```typescript
365
+ class Defaults {
366
+ static readonly APPLICATION_NAME: string; // process.env.APP_ENV_APPLICATION_NAME ?? 'APP'
367
+ static readonly QUERY_LIMIT = 50;
368
+ static readonly QUERY_OFFSET = 0;
369
+ }
370
+ ```
371
+
372
+ Application-wide defaults for query pagination and application naming. `APPLICATION_NAME` is evaluated once, at module load.
373
+
374
+ ### RuntimeModules
375
+
376
+ ```typescript
377
+ class RuntimeModules {
378
+ static readonly NODE = 'node';
379
+ static readonly BUN = 'bun';
380
+
381
+ static detect(): TRuntimeModule;
382
+ static isBun(): boolean;
383
+ static isNode(): boolean;
384
+ }
385
+
386
+ type TRuntimeModule = TConstValue<typeof RuntimeModules>; // 'node' | 'bun'
387
+ ```
388
+
389
+ Runtime detection utility.
390
+
391
+ | Method | Behavior |
392
+ |---|---|
393
+ | `detect()` | Returns `'bun'` if `typeof Bun !== 'undefined'`, else `'node'` |
394
+ | `isBun()` | Calls `detect()` and compares to `'bun'` - no caching, runs the check every time |
395
+ | `isNode()` | Calls `detect()` and compares to `'node'` - no caching, runs the check every time |
396
+
397
+ ### DataTypes
398
+
399
+ ```typescript
400
+ class DataTypes {
401
+ static readonly NUMBER = 'NUMBER';
402
+ static readonly TEXT = 'TEXT';
403
+ static readonly BYTE = 'BYTE';
404
+ static readonly JSON = 'JSON';
405
+ static readonly BOOLEAN = 'BOOLEAN';
406
+
407
+ static readonly SCHEME_SET: Set<string>;
408
+ static isValid(orgType: string): boolean;
409
+ }
410
+ ```
411
+
412
+ Schema data type constants with validation. `SCHEME_SET` contains all five valid type strings, and `isValid()` checks membership.
413
+
414
+ ### HTTP
415
+
416
+ `Source ->` [`constants/http.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/http.ts)
417
+
418
+ The `HTTP` class groups all HTTP-related constants into nested objects: `Headers`, `HeaderValues`, `Methods`, `Protocols`, and `ResultCodes`.
419
+
420
+ #### HTTP.Headers
421
+
422
+ Grouped by category, matching the source file's comments:
423
+
424
+ | Group | Constant | Value |
425
+ |-------|----------|-------|
426
+ | **Content** | `CONTENT_DISPOSITION` | `'content-disposition'` |
427
+ | | `CONTENT_ENCODING` | `'content-encoding'` |
428
+ | | `CONTENT_LENGTH` | `'content-length'` |
429
+ | | `CONTENT_TYPE` | `'content-type'` |
430
+ | | `CONTENT_RANGE` | `'content-range'` |
431
+ | | `CONTENT_SECURITY_POLICY` | `'content-security-policy'` |
432
+ | **Request** (content negotiation & conditionals) | `ACCEPT` | `'accept'` |
433
+ | | `ACCEPT_ENCODING` | `'accept-encoding'` |
434
+ | | `ACCEPT_LANGUAGE` | `'accept-language'` |
435
+ | | `AUTHORIZATION` | `'authorization'` |
436
+ | | `COOKIE` | `'cookie'` |
437
+ | | `HOST` | `'host'` |
438
+ | | `IF_MODIFIED_SINCE` | `'if-modified-since'` |
439
+ | | `IF_NONE_MATCH` | `'if-none-match'` |
440
+ | | `ORIGIN` | `'origin'` |
441
+ | | `REFERER` | `'referer'` |
442
+ | | `USER_AGENT` | `'user-agent'` |
443
+ | **Response** (caching, auth challenges & redirects) | `ALLOW` | `'allow'` |
444
+ | | `CACHE_CONTROL` | `'cache-control'` |
445
+ | | `ETAG` | `'etag'` |
446
+ | | `LAST_MODIFIED` | `'last-modified'` |
447
+ | | `LOCATION` | `'location'` |
448
+ | | `RETRY_AFTER` | `'retry-after'` |
449
+ | | `SET_COOKIE` | `'set-cookie'` |
450
+ | | `VARY` | `'vary'` |
451
+ | | `WWW_AUTHENTICATE` | `'www-authenticate'` |
452
+ | **CORS** (RFC 6454 / Fetch spec) | `ACCESS_CONTROL_ALLOW_CREDENTIALS` | `'access-control-allow-credentials'` |
453
+ | | `ACCESS_CONTROL_ALLOW_HEADERS` | `'access-control-allow-headers'` |
454
+ | | `ACCESS_CONTROL_ALLOW_METHODS` | `'access-control-allow-methods'` |
455
+ | | `ACCESS_CONTROL_ALLOW_ORIGIN` | `'access-control-allow-origin'` |
456
+ | | `ACCESS_CONTROL_EXPOSE_HEADERS` | `'access-control-expose-headers'` |
457
+ | | `ACCESS_CONTROL_MAX_AGE` | `'access-control-max-age'` |
458
+ | | `ACCESS_CONTROL_REQUEST_HEADERS` | `'access-control-request-headers'` |
459
+ | | `ACCESS_CONTROL_REQUEST_METHOD` | `'access-control-request-method'` |
460
+ | **Transport** | `CONNECTION` | `'connection'` |
461
+ | | `TRANSFER_ENCODING` | `'transfer-encoding'` |
462
+ | | `UPGRADE` | `'upgrade'` |
463
+ | **Security** | `STRICT_TRANSPORT_SECURITY` | `'strict-transport-security'` |
464
+ | | `X_CONTENT_TYPE_OPTIONS` | `'x-content-type-options'` |
465
+ | | `X_FRAME_OPTIONS` | `'x-frame-options'` |
466
+ | **Proxy / forwarding** (de facto standard) | `FORWARDED` | `'forwarded'` |
467
+ | | `X_FORWARDED_FOR` | `'x-forwarded-for'` |
468
+ | | `X_FORWARDED_HOST` | `'x-forwarded-host'` |
469
+ | | `X_FORWARDED_PROTO` | `'x-forwarded-proto'` |
470
+ | **Rate limiting** (de facto standard) | `X_RATELIMIT_LIMIT` | `'x-ratelimit-limit'` |
471
+ | | `X_RATELIMIT_REMAINING` | `'x-ratelimit-remaining'` |
472
+ | | `X_RATELIMIT_RESET` | `'x-ratelimit-reset'` |
473
+ | **IGNIS custom** | `REQUEST_TRACING_ID` | `'x-request-id'` |
474
+ | | `REQUEST_DEVICE_INFO` | `'x-device-info'` |
475
+ | | `REQUEST_CHANNEL` | `'x-request-channel'` |
476
+ | | `REQUEST_COUNT_DATA` | `'x-request-count'` |
477
+ | | `RESPONSE_COUNT_DATA` | `'x-response-count'` |
478
+ | | `RESPONSE_FORMAT` | `'x-response-format'` |
479
+
480
+ #### HTTP.HeaderValues
481
+
482
+ | Group | Constant | Value |
483
+ |-------|----------|-------|
484
+ | **Application** | `APPLICATION_FORM_URLENCODED` | `'application/x-www-form-urlencoded'` |
485
+ | | `APPLICATION_GRAPHQL_JSON` | `'application/graphql+json'` |
486
+ | | `APPLICATION_GZIP` | `'application/gzip'` |
487
+ | | `APPLICATION_JAVASCRIPT` | `'application/javascript'` |
488
+ | | `APPLICATION_JSON` | `'application/json'` |
489
+ | | `APPLICATION_MSGPACK` | `'application/msgpack'` |
490
+ | | `APPLICATION_NDJSON` | `'application/x-ndjson'` |
491
+ | | `APPLICATION_OCTET_STREAM` | `'application/octet-stream'` |
492
+ | | `APPLICATION_PDF` | `'application/pdf'` |
493
+ | | `APPLICATION_PROTOBUF` | `'application/x-protobuf'` |
494
+ | | `APPLICATION_XML` | `'application/xml'` |
495
+ | | `APPLICATION_ZIP` | `'application/zip'` |
496
+ | **Multipart** | `MULTIPART_FORM_DATA` | `'multipart/form-data'` |
497
+ | **Text** | `TEXT_CSS` | `'text/css'` |
498
+ | | `TEXT_CSV` | `'text/csv'` |
499
+ | | `TEXT_EVENT_STREAM` | `'text/event-stream'` |
500
+ | | `TEXT_HTML` | `'text/html'` |
501
+ | | `TEXT_PLAIN` | `'text/plain'` |
502
+ | | `TEXT_XML` | `'text/xml'` |
503
+ | **Image** | `IMAGE_GIF` | `'image/gif'` |
504
+ | | `IMAGE_JPEG` | `'image/jpeg'` |
505
+ | | `IMAGE_PNG` | `'image/png'` |
506
+ | | `IMAGE_SVG` | `'image/svg+xml'` |
507
+ | | `IMAGE_WEBP` | `'image/webp'` |
508
+
509
+ #### HTTP.Methods
510
+
511
+ | Constant | Value |
512
+ |----------|-------|
513
+ | `HTTP.Methods.GET` | `'get'` |
514
+ | `HTTP.Methods.POST` | `'post'` |
515
+ | `HTTP.Methods.PUT` | `'put'` |
516
+ | `HTTP.Methods.PATCH` | `'patch'` |
517
+ | `HTTP.Methods.DELETE` | `'delete'` |
518
+ | `HTTP.Methods.HEAD` | `'head'` |
519
+ | `HTTP.Methods.OPTIONS` | `'options'` |
520
+ | `HTTP.Methods.QUERY` | `'query'` (RFC 10008 `QUERY` method) |
521
+
522
+ > [!IMPORTANT]
523
+ > All `HTTP.Methods.*` tokens are lowercase. `@hono/zod-openapi` route definitions accept no other case.
524
+
525
+ Every IGNIS network fetcher uppercases the method at the wire boundary, via `method.toUpperCase()`. But undici, Node's `fetch` implementation, only normalizes six of the eight methods on its own:
526
+
527
+ | Undici normalizes it on its own | Undici does not |
528
+ |---|---|
529
+ | `delete`, `get`, `head`, `options`, `post`, `put` | `patch`, `query` |
530
+
531
+ A lowercase `patch` or `query` sent as-is travels verbatim over Node, and the server rejects it. Bun's `fetch` uppercases every method, which hides the bug until the app runs on Node.
532
+
533
+ #### HTTP.Protocols
534
+
535
+ | Constant | Value |
536
+ |----------|-------|
537
+ | `HTTP.Protocols.HTTP` | `'http'` |
538
+ | `HTTP.Protocols.HTTPS` | `'https'` |
539
+
540
+ #### HTTP.ResultCodes
541
+
542
+ Status codes are grouped by class under `HTTP.ResultCodes.RS_1` through `HTTP.ResultCodes.RS_5` - for example, `HTTP.ResultCodes.RS_4.NotFound`.
543
+
544
+ | Group | Constant | Value |
545
+ |-------|----------|-------|
546
+ | **RS_1** (1xx) | `Continue` | `100` |
547
+ | | `SwitchingProtocols` | `101` |
548
+ | | `EarlyHints` | `103` |
549
+ | **RS_2** (2xx) | `Ok` | `200` |
550
+ | | `Created` | `201` |
551
+ | | `Accepted` | `202` |
552
+ | | `NonAuthoritativeInformation` | `203` |
553
+ | | `NoContent` | `204` |
554
+ | | `ResetContent` | `205` |
555
+ | | `PartialContent` | `206` |
556
+ | | `MultiStatus` | `207` |
557
+ | **RS_3** (3xx) | `MovedPermanently` | `301` |
558
+ | | `Found` | `302` |
559
+ | | `NotModified` | `304` |
560
+ | | `TemporaryRedirect` | `307` |
561
+ | | `PermanentRedirect` | `308` |
562
+ | **RS_4** (4xx) | `BadRequest` | `400` |
563
+ | | `Unauthorized` | `401` |
564
+ | | `PaymentRequired` | `402` |
565
+ | | `Forbidden` | `403` |
566
+ | | `NotFound` | `404` |
567
+ | | `MethodNotAllowed` | `405` |
568
+ | | `NotAcceptable` | `406` |
569
+ | | `RequestTimeout` | `408` |
570
+ | | `Conflict` | `409` |
571
+ | | `Gone` | `410` |
572
+ | | `LengthRequired` | `411` |
573
+ | | `PreconditionFailed` | `412` |
574
+ | | `ContentTooLarge` | `413` |
575
+ | | `URITooLong` | `414` |
576
+ | | `UnsupportedMediaType` | `415` |
577
+ | | `RangeNotSatisfiable` | `416` |
578
+ | | `ExpectationFailed` | `417` |
579
+ | | `UnprocessableEntity` | `422` |
580
+ | | `Locked` | `423` |
581
+ | | `FailedDependency` | `424` |
582
+ | | `TooEarly` | `425` |
583
+ | | `UpgradeRequired` | `426` |
584
+ | | `PreconditionRequired` | `428` |
585
+ | | `TooManyRequests` | `429` |
586
+ | | `RequestHeaderFieldsTooLarge` | `431` |
587
+ | | `UnavailableForLegalReasons` | `451` |
588
+ | **RS_5** (5xx) | `InternalServerError` | `500` |
589
+ | | `NotImplemented` | `501` |
590
+ | | `BadGateway` | `502` |
591
+ | | `ServiceUnavailable` | `503` |
592
+ | | `GatewayTimeout` | `504` |
593
+ | | `HTTPVersionNotSupported` | `505` |
594
+ | | `InsufficientStorage` | `507` |
595
+ | | `LoopDetected` | `508` |
596
+ | | `NetworkAuthenticationRequired` | `511` |
597
+
598
+ #### Derived types
599
+
600
+ ```typescript
601
+ type THttpMethod = ValueOf<typeof HTTP.Methods> | Uppercase<ValueOf<typeof HTTP.Methods>>;
602
+ // 'get' | 'post' | ... | 'query' | 'GET' | 'POST' | ... | 'QUERY'
603
+
604
+ type THttpProtocol = ValueOf<typeof HTTP.Protocols> | Uppercase<ValueOf<typeof HTTP.Protocols>>;
605
+ // 'http' | 'https' | 'HTTP' | 'HTTPS'
606
+
607
+ type THttpResultCode = ValueOf<typeof HTTP.ResultCodes>;
608
+ // union of the RS_1..RS_5 group objects (not a flat number union)
609
+ ```
610
+
611
+ ### GRPC
612
+
613
+ `Source ->` [`constants/grpc.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/grpc.ts)
614
+
615
+ gRPC protocol constants for methods, headers, content types, and status codes.
616
+
617
+ | Property | Type | Description |
618
+ |----------|------|-------------|
619
+ | `GRPC.Methods.UNARY` | `'unary'` | Single request, single response |
620
+ | `GRPC.Methods.SERVER_STREAMING` | `'server_streaming'` | Single request, stream of responses |
621
+ | `GRPC.Methods.CLIENT_STREAMING` | `'client_streaming'` | Stream of requests, single response |
622
+ | `GRPC.Methods.BIDI_STREAMING` | `'bidi_streaming'` | Bidirectional streaming |
623
+ | `GRPC.Headers.CONTENT_TYPE` | `'content-type'` | HTTP content type header |
624
+ | `GRPC.Headers.TE` | `'te'` | Transfer encoding header |
625
+ | `GRPC.Headers.USER_AGENT` | `'user-agent'` | User agent header |
626
+ | `GRPC.Headers.GRPC_TIMEOUT` | `'grpc-timeout'` | gRPC timeout header |
627
+ | `GRPC.Headers.GRPC_ENCODING` | `'grpc-encoding'` | gRPC encoding header |
628
+ | `GRPC.Headers.GRPC_ACCEPT_ENCODING` | `'grpc-accept-encoding'` | gRPC accepted encodings header |
629
+ | `GRPC.Headers.GRPC_MESSAGE_TYPE` | `'grpc-message-type'` | gRPC message type header |
630
+ | `GRPC.Headers.GRPC_STATUS` | `'grpc-status'` | gRPC status code header |
631
+ | `GRPC.Headers.GRPC_MESSAGE` | `'grpc-message'` | gRPC error message header |
632
+ | `GRPC.Headers.GRPC_STATUS_DETAILS_BIN` | `'grpc-status-details-bin'` | gRPC binary status details header |
633
+ | `GRPC.Headers.GRPC_PREVIOUS_RPC_ATTEMPTS` | `'grpc-previous-rpc-attempts'` | gRPC previous RPC attempts header |
634
+ | `GRPC.Headers.GRPC_RETRY_PUSHBACK_MS` | `'grpc-retry-pushback-ms'` | gRPC retry pushback milliseconds header |
635
+ | `GRPC.Headers.GRPC_TRACE_BIN` | `'grpc-trace-bin'` | gRPC binary trace context header |
636
+ | `GRPC.Headers.GRPC_TAGS_BIN` | `'grpc-tags-bin'` | gRPC binary tags header |
637
+ | `GRPC.HeaderValues.GRPC` | `'application/grpc'` | Standard gRPC content type |
638
+ | `GRPC.HeaderValues.GRPC_PROTO` | `'application/grpc+proto'` | gRPC Protobuf content type |
639
+ | `GRPC.HeaderValues.GRPC_JSON` | `'application/grpc+json'` | gRPC JSON content type |
640
+ | `GRPC.HeaderValues.GRPC_WEB` | `'application/grpc-web'` | gRPC-Web content type |
641
+ | `GRPC.HeaderValues.GRPC_WEB_PROTO` | `'application/grpc-web+proto'` | gRPC-Web Protobuf content type |
642
+ | `GRPC.HeaderValues.GRPC_WEB_JSON` | `'application/grpc-web+json'` | gRPC-Web JSON content type |
643
+ | `GRPC.HeaderValues.GRPC_WEB_TEXT` | `'application/grpc-web-text'` | gRPC-Web text content type |
644
+ | `GRPC.ResultCodes.OK` | `0` | Success |
645
+ | `GRPC.ResultCodes.CANCELLED` | `1` | Operation cancelled |
646
+ | `GRPC.ResultCodes.UNKNOWN` | `2` | Unknown error |
647
+ | `GRPC.ResultCodes.INVALID_ARGUMENT` | `3` | Invalid argument |
648
+ | `GRPC.ResultCodes.DEADLINE_EXCEEDED` | `4` | Deadline exceeded |
649
+ | `GRPC.ResultCodes.NOT_FOUND` | `5` | Not found |
650
+ | `GRPC.ResultCodes.ALREADY_EXISTS` | `6` | Already exists |
651
+ | `GRPC.ResultCodes.PERMISSION_DENIED` | `7` | Permission denied |
652
+ | `GRPC.ResultCodes.RESOURCE_EXHAUSTED` | `8` | Resource exhausted |
653
+ | `GRPC.ResultCodes.FAILED_PRECONDITION` | `9` | Failed precondition |
654
+ | `GRPC.ResultCodes.ABORTED` | `10` | Operation aborted |
655
+ | `GRPC.ResultCodes.OUT_OF_RANGE` | `11` | Out of range |
656
+ | `GRPC.ResultCodes.UNIMPLEMENTED` | `12` | Unimplemented |
657
+ | `GRPC.ResultCodes.INTERNAL` | `13` | Internal server error |
658
+ | `GRPC.ResultCodes.UNAVAILABLE` | `14` | Service unavailable |
659
+ | `GRPC.ResultCodes.DATA_LOSS` | `15` | Unrecoverable data loss |
660
+ | `GRPC.ResultCodes.UNAUTHENTICATED` | `16` | Unauthenticated |
661
+
662
+ ```typescript
663
+ type TGrpcMethod = ValueOf<typeof GRPC.Methods>;
664
+ type TGrpcResultCode = ValueOf<typeof GRPC.ResultCodes>;
665
+ ```
666
+
667
+ ### MimeTypes
668
+
669
+ `Source ->` [`constants/mime.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/helpers/src/common/constants/mime.ts)
670
+
671
+ ```typescript
672
+ class MimeTypes {
673
+ static readonly UNKNOWN = 'unknown';
674
+ static readonly IMAGE = 'image';
675
+ static readonly VIDEO = 'video';
676
+ static readonly TEXT = 'text';
677
+ }
678
+
679
+ type TMimeTypes = TConstValue<typeof MimeTypes>; // 'unknown' | 'image' | 'video' | 'text'
680
+ ```
681
+
682
+ Content type classification constants.
683
+
684
+ ## See also
685
+
686
+ - [Types overview](/extensions/helpers/types/) - introduction and the most common tasks
687
+ - [Dependency Injection](/guides/core-concepts/dependency-injection) - `TInjectionGetter` and DI-adjacent types in use
688
+ - [Repository Mixins](/references/base/repositories/mixins) - `TMixinTarget` in use
689
+ - [Helpers Overview](/extensions/helpers/) - all available helpers