alepha 0.15.0 → 0.15.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 (222) hide show
  1. package/README.md +43 -98
  2. package/dist/api/audits/index.d.ts +240 -240
  3. package/dist/api/audits/index.d.ts.map +1 -1
  4. package/dist/api/audits/index.js +2 -2
  5. package/dist/api/audits/index.js.map +1 -1
  6. package/dist/api/files/index.d.ts +185 -185
  7. package/dist/api/files/index.d.ts.map +1 -1
  8. package/dist/api/files/index.js +2 -2
  9. package/dist/api/files/index.js.map +1 -1
  10. package/dist/api/jobs/index.d.ts +245 -245
  11. package/dist/api/jobs/index.d.ts.map +1 -1
  12. package/dist/api/notifications/index.browser.js +4 -4
  13. package/dist/api/notifications/index.browser.js.map +1 -1
  14. package/dist/api/notifications/index.d.ts +74 -74
  15. package/dist/api/notifications/index.d.ts.map +1 -1
  16. package/dist/api/notifications/index.js +4 -4
  17. package/dist/api/notifications/index.js.map +1 -1
  18. package/dist/api/parameters/index.d.ts +221 -221
  19. package/dist/api/parameters/index.d.ts.map +1 -1
  20. package/dist/api/users/index.d.ts +1632 -1631
  21. package/dist/api/users/index.d.ts.map +1 -1
  22. package/dist/api/users/index.js +26 -34
  23. package/dist/api/users/index.js.map +1 -1
  24. package/dist/api/verifications/index.d.ts +132 -132
  25. package/dist/api/verifications/index.d.ts.map +1 -1
  26. package/dist/batch/index.d.ts +122 -122
  27. package/dist/batch/index.d.ts.map +1 -1
  28. package/dist/bucket/index.d.ts +163 -163
  29. package/dist/bucket/index.d.ts.map +1 -1
  30. package/dist/cache/core/index.d.ts +46 -46
  31. package/dist/cache/core/index.d.ts.map +1 -1
  32. package/dist/cache/redis/index.d.ts.map +1 -1
  33. package/dist/cache/redis/index.js +2 -2
  34. package/dist/cache/redis/index.js.map +1 -1
  35. package/dist/cli/index.d.ts +5933 -201
  36. package/dist/cli/index.d.ts.map +1 -1
  37. package/dist/cli/index.js +609 -169
  38. package/dist/cli/index.js.map +1 -1
  39. package/dist/command/index.d.ts +296 -296
  40. package/dist/command/index.d.ts.map +1 -1
  41. package/dist/command/index.js +19 -19
  42. package/dist/command/index.js.map +1 -1
  43. package/dist/core/index.browser.js +268 -79
  44. package/dist/core/index.browser.js.map +1 -1
  45. package/dist/core/index.d.ts +768 -694
  46. package/dist/core/index.d.ts.map +1 -1
  47. package/dist/core/index.js +268 -79
  48. package/dist/core/index.js.map +1 -1
  49. package/dist/core/index.native.js +268 -79
  50. package/dist/core/index.native.js.map +1 -1
  51. package/dist/datetime/index.d.ts +44 -44
  52. package/dist/datetime/index.d.ts.map +1 -1
  53. package/dist/email/index.d.ts +25 -25
  54. package/dist/email/index.d.ts.map +1 -1
  55. package/dist/fake/index.d.ts +5409 -5409
  56. package/dist/fake/index.d.ts.map +1 -1
  57. package/dist/fake/index.js +22 -22
  58. package/dist/fake/index.js.map +1 -1
  59. package/dist/file/index.d.ts +435 -435
  60. package/dist/file/index.d.ts.map +1 -1
  61. package/dist/lock/core/index.d.ts +208 -208
  62. package/dist/lock/core/index.d.ts.map +1 -1
  63. package/dist/lock/redis/index.d.ts.map +1 -1
  64. package/dist/logger/index.d.ts +24 -24
  65. package/dist/logger/index.d.ts.map +1 -1
  66. package/dist/logger/index.js +1 -5
  67. package/dist/logger/index.js.map +1 -1
  68. package/dist/mcp/index.d.ts +216 -198
  69. package/dist/mcp/index.d.ts.map +1 -1
  70. package/dist/mcp/index.js +28 -4
  71. package/dist/mcp/index.js.map +1 -1
  72. package/dist/orm/index.browser.js +9 -9
  73. package/dist/orm/index.browser.js.map +1 -1
  74. package/dist/orm/index.bun.js +83 -76
  75. package/dist/orm/index.bun.js.map +1 -1
  76. package/dist/orm/index.d.ts +961 -960
  77. package/dist/orm/index.d.ts.map +1 -1
  78. package/dist/orm/index.js +88 -81
  79. package/dist/orm/index.js.map +1 -1
  80. package/dist/queue/core/index.d.ts +244 -244
  81. package/dist/queue/core/index.d.ts.map +1 -1
  82. package/dist/queue/redis/index.d.ts.map +1 -1
  83. package/dist/redis/index.d.ts +105 -105
  84. package/dist/redis/index.d.ts.map +1 -1
  85. package/dist/retry/index.d.ts +69 -69
  86. package/dist/retry/index.d.ts.map +1 -1
  87. package/dist/router/index.d.ts +6 -6
  88. package/dist/router/index.d.ts.map +1 -1
  89. package/dist/scheduler/index.d.ts +108 -26
  90. package/dist/scheduler/index.d.ts.map +1 -1
  91. package/dist/scheduler/index.js +393 -1
  92. package/dist/scheduler/index.js.map +1 -1
  93. package/dist/security/index.d.ts +532 -209
  94. package/dist/security/index.d.ts.map +1 -1
  95. package/dist/security/index.js +1422 -11
  96. package/dist/security/index.js.map +1 -1
  97. package/dist/server/auth/index.d.ts +1296 -271
  98. package/dist/server/auth/index.d.ts.map +1 -1
  99. package/dist/server/auth/index.js +1249 -18
  100. package/dist/server/auth/index.js.map +1 -1
  101. package/dist/server/cache/index.d.ts +56 -56
  102. package/dist/server/cache/index.d.ts.map +1 -1
  103. package/dist/server/compress/index.d.ts +3 -3
  104. package/dist/server/compress/index.d.ts.map +1 -1
  105. package/dist/server/cookies/index.d.ts +6 -6
  106. package/dist/server/cookies/index.d.ts.map +1 -1
  107. package/dist/server/core/index.d.ts +196 -186
  108. package/dist/server/core/index.d.ts.map +1 -1
  109. package/dist/server/core/index.js +43 -27
  110. package/dist/server/core/index.js.map +1 -1
  111. package/dist/server/cors/index.d.ts +11 -11
  112. package/dist/server/cors/index.d.ts.map +1 -1
  113. package/dist/server/health/index.d.ts.map +1 -1
  114. package/dist/server/helmet/index.d.ts +2 -2
  115. package/dist/server/helmet/index.d.ts.map +1 -1
  116. package/dist/server/links/index.browser.js +9 -1
  117. package/dist/server/links/index.browser.js.map +1 -1
  118. package/dist/server/links/index.d.ts +83 -83
  119. package/dist/server/links/index.d.ts.map +1 -1
  120. package/dist/server/links/index.js +13 -5
  121. package/dist/server/links/index.js.map +1 -1
  122. package/dist/server/metrics/index.d.ts +514 -1
  123. package/dist/server/metrics/index.d.ts.map +1 -1
  124. package/dist/server/metrics/index.js +4462 -4
  125. package/dist/server/metrics/index.js.map +1 -1
  126. package/dist/server/multipart/index.d.ts +6 -6
  127. package/dist/server/multipart/index.d.ts.map +1 -1
  128. package/dist/server/proxy/index.d.ts +102 -102
  129. package/dist/server/proxy/index.d.ts.map +1 -1
  130. package/dist/server/rate-limit/index.d.ts +16 -16
  131. package/dist/server/rate-limit/index.d.ts.map +1 -1
  132. package/dist/server/static/index.d.ts +44 -44
  133. package/dist/server/static/index.d.ts.map +1 -1
  134. package/dist/server/swagger/index.d.ts +47 -47
  135. package/dist/server/swagger/index.d.ts.map +1 -1
  136. package/dist/sms/index.d.ts +11 -11
  137. package/dist/sms/index.d.ts.map +1 -1
  138. package/dist/sms/index.js +3 -3
  139. package/dist/sms/index.js.map +1 -1
  140. package/dist/thread/index.d.ts +71 -71
  141. package/dist/thread/index.d.ts.map +1 -1
  142. package/dist/thread/index.js +2 -2
  143. package/dist/thread/index.js.map +1 -1
  144. package/dist/topic/core/index.d.ts +318 -318
  145. package/dist/topic/core/index.d.ts.map +1 -1
  146. package/dist/topic/redis/index.d.ts +6 -6
  147. package/dist/topic/redis/index.d.ts.map +1 -1
  148. package/dist/vite/index.d.ts +2324 -1719
  149. package/dist/vite/index.d.ts.map +1 -1
  150. package/dist/vite/index.js +123 -475
  151. package/dist/vite/index.js.map +1 -1
  152. package/dist/websocket/index.browser.js +3 -3
  153. package/dist/websocket/index.browser.js.map +1 -1
  154. package/dist/websocket/index.d.ts +275 -275
  155. package/dist/websocket/index.d.ts.map +1 -1
  156. package/dist/websocket/index.js +3 -3
  157. package/dist/websocket/index.js.map +1 -1
  158. package/package.json +9 -9
  159. package/src/api/users/services/SessionService.ts +0 -10
  160. package/src/cli/apps/AlephaCli.ts +2 -2
  161. package/src/cli/apps/AlephaPackageBuilderCli.ts +9 -1
  162. package/src/cli/assets/apiHelloControllerTs.ts +2 -1
  163. package/src/cli/assets/biomeJson.ts +2 -1
  164. package/src/cli/assets/claudeMd.ts +9 -4
  165. package/src/cli/assets/dummySpecTs.ts +2 -1
  166. package/src/cli/assets/editorconfig.ts +2 -1
  167. package/src/cli/assets/mainBrowserTs.ts +2 -1
  168. package/src/cli/assets/mainCss.ts +24 -0
  169. package/src/cli/assets/tsconfigJson.ts +2 -1
  170. package/src/cli/assets/webAppRouterTs.ts +2 -1
  171. package/src/cli/assets/webHelloComponentTsx.ts +6 -2
  172. package/src/cli/atoms/appEntryOptions.ts +13 -0
  173. package/src/cli/atoms/buildOptions.ts +1 -1
  174. package/src/cli/atoms/changelogOptions.ts +1 -1
  175. package/src/cli/commands/build.ts +63 -47
  176. package/src/cli/commands/dev.ts +16 -33
  177. package/src/cli/commands/gen/env.ts +1 -1
  178. package/src/cli/commands/init.ts +17 -8
  179. package/src/cli/commands/lint.ts +1 -1
  180. package/src/cli/defineConfig.ts +9 -0
  181. package/src/cli/index.ts +2 -1
  182. package/src/cli/providers/AppEntryProvider.ts +131 -0
  183. package/src/cli/providers/ViteBuildProvider.ts +82 -0
  184. package/src/cli/providers/ViteDevServerProvider.ts +350 -0
  185. package/src/cli/providers/ViteTemplateProvider.ts +27 -0
  186. package/src/cli/services/AlephaCliUtils.ts +33 -2
  187. package/src/cli/services/PackageManagerUtils.ts +13 -6
  188. package/src/cli/services/ProjectScaffolder.ts +72 -49
  189. package/src/core/Alepha.ts +2 -8
  190. package/src/core/primitives/$module.ts +12 -0
  191. package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +257 -0
  192. package/src/core/providers/KeylessJsonSchemaCodec.ts +396 -14
  193. package/src/core/providers/SchemaValidator.spec.ts +236 -0
  194. package/src/logger/providers/PrettyFormatterProvider.ts +0 -9
  195. package/src/mcp/errors/McpError.ts +30 -0
  196. package/src/mcp/index.ts +3 -0
  197. package/src/mcp/transports/SseMcpTransport.ts +16 -6
  198. package/src/orm/providers/DrizzleKitProvider.ts +3 -5
  199. package/src/orm/services/Repository.ts +11 -0
  200. package/src/server/core/index.ts +1 -1
  201. package/src/server/core/providers/BunHttpServerProvider.ts +1 -1
  202. package/src/server/core/providers/NodeHttpServerProvider.spec.ts +125 -0
  203. package/src/server/core/providers/NodeHttpServerProvider.ts +71 -22
  204. package/src/server/core/providers/ServerLoggerProvider.ts +2 -2
  205. package/src/server/core/providers/ServerProvider.ts +9 -12
  206. package/src/server/links/atoms/apiLinksAtom.ts +7 -0
  207. package/src/server/links/index.browser.ts +2 -0
  208. package/src/server/links/index.ts +2 -0
  209. package/src/vite/index.ts +3 -2
  210. package/src/vite/tasks/buildClient.ts +0 -1
  211. package/src/vite/tasks/buildServer.ts +68 -21
  212. package/src/vite/tasks/copyAssets.ts +5 -4
  213. package/src/vite/tasks/generateSitemap.ts +64 -23
  214. package/src/vite/tasks/index.ts +0 -2
  215. package/src/vite/tasks/prerenderPages.ts +49 -24
  216. package/src/cli/assets/indexHtml.ts +0 -15
  217. package/src/cli/commands/format.ts +0 -23
  218. package/src/vite/helpers/boot.ts +0 -117
  219. package/src/vite/plugins/viteAlephaDev.ts +0 -177
  220. package/src/vite/tasks/devServer.ts +0 -71
  221. package/src/vite/tasks/runAlepha.ts +0 -270
  222. /package/dist/orm/{chunk-DtkW-qnP.js → chunk-DH6iiROE.js} +0 -0
@@ -80,114 +80,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
80
80
  //#region ../../src/orm/primitives/$entity.d.ts
81
81
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
82
82
  /**
83
- * The database table name that will be created for this entity.
84
- * If not provided, name will be inferred from the $repository variable name.
85
- */
83
+ * The database table name that will be created for this entity.
84
+ * If not provided, name will be inferred from the $repository variable name.
85
+ */
86
86
  name: string;
87
87
  /**
88
- * TypeBox schema defining the table structure and column types.
89
- */
88
+ * TypeBox schema defining the table structure and column types.
89
+ */
90
90
  schema: T;
91
91
  /**
92
- * Database indexes to create for query optimization.
93
- */
92
+ * Database indexes to create for query optimization.
93
+ */
94
94
  indexes?: (Keys | {
95
95
  /**
96
- * Single column to index.
97
- */
96
+ * Single column to index.
97
+ */
98
98
  column: Keys;
99
99
  /**
100
- * Whether this should be a unique index (enforces uniqueness constraint).
101
- */
100
+ * Whether this should be a unique index (enforces uniqueness constraint).
101
+ */
102
102
  unique?: boolean;
103
103
  /**
104
- * Custom name for the index. If not provided, generates name automatically.
105
- */
104
+ * Custom name for the index. If not provided, generates name automatically.
105
+ */
106
106
  name?: string;
107
107
  } | {
108
108
  /**
109
- * Multiple columns for composite index (order matters for query optimization).
110
- */
109
+ * Multiple columns for composite index (order matters for query optimization).
110
+ */
111
111
  columns: Keys[];
112
112
  /**
113
- * Whether this should be a unique index (enforces uniqueness constraint).
114
- */
113
+ * Whether this should be a unique index (enforces uniqueness constraint).
114
+ */
115
115
  unique?: boolean;
116
116
  /**
117
- * Custom name for the index. If not provided, generates name automatically.
118
- */
117
+ * Custom name for the index. If not provided, generates name automatically.
118
+ */
119
119
  name?: string;
120
120
  })[];
121
121
  /**
122
- * Foreign key constraints to maintain referential integrity.
123
- */
122
+ * Foreign key constraints to maintain referential integrity.
123
+ */
124
124
  foreignKeys?: Array<{
125
125
  /**
126
- * Optional name for the foreign key constraint.
127
- */
126
+ * Optional name for the foreign key constraint.
127
+ */
128
128
  name?: string;
129
129
  /**
130
- * Local columns that reference the foreign table.
131
- */
130
+ * Local columns that reference the foreign table.
131
+ */
132
132
  columns: Array<keyof Static<T>>;
133
133
  /**
134
- * Referenced columns in the foreign table.
135
- * Must be EntityColumn references from other entities.
136
- */
134
+ * Referenced columns in the foreign table.
135
+ * Must be EntityColumn references from other entities.
136
+ */
137
137
  foreignColumns: Array<() => EntityColumn<any>>;
138
138
  }>;
139
139
  /**
140
- * Additional table constraints for data validation.
141
- *
142
- * Constraints enforce business rules at the database level, providing
143
- * an additional layer of data integrity beyond application validation.
144
- *
145
- * **Constraint Types**:
146
- * - **Unique constraints**: Prevent duplicate values across columns
147
- * - **Check constraints**: Enforce custom validation rules with SQL expressions
148
- *
149
- * @example
150
- * ```ts
151
- * constraints: [
152
- * {
153
- * name: "unique_user_email",
154
- * columns: ["email"],
155
- * unique: true
156
- * },
157
- * {
158
- * name: "valid_age_range",
159
- * columns: ["age"],
160
- * check: sql`age >= 0 AND age <= 150`
161
- * },
162
- * {
163
- * name: "unique_user_username_per_tenant",
164
- * columns: ["tenantId", "username"],
165
- * unique: true
166
- * }
167
- * ]
168
- * ```
169
- */
140
+ * Additional table constraints for data validation.
141
+ *
142
+ * Constraints enforce business rules at the database level, providing
143
+ * an additional layer of data integrity beyond application validation.
144
+ *
145
+ * **Constraint Types**:
146
+ * - **Unique constraints**: Prevent duplicate values across columns
147
+ * - **Check constraints**: Enforce custom validation rules with SQL expressions
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * constraints: [
152
+ * {
153
+ * name: "unique_user_email",
154
+ * columns: ["email"],
155
+ * unique: true
156
+ * },
157
+ * {
158
+ * name: "valid_age_range",
159
+ * columns: ["age"],
160
+ * check: sql`age >= 0 AND age <= 150`
161
+ * },
162
+ * {
163
+ * name: "unique_user_username_per_tenant",
164
+ * columns: ["tenantId", "username"],
165
+ * unique: true
166
+ * }
167
+ * ]
168
+ * ```
169
+ */
170
170
  constraints?: Array<{
171
171
  /**
172
- * Columns involved in this constraint.
173
- */
172
+ * Columns involved in this constraint.
173
+ */
174
174
  columns: Array<keyof Static<T>>;
175
175
  /**
176
- * Optional name for the constraint.
177
- */
176
+ * Optional name for the constraint.
177
+ */
178
178
  name?: string;
179
179
  /**
180
- * Whether this is a unique constraint.
181
- */
180
+ * Whether this is a unique constraint.
181
+ */
182
182
  unique?: boolean | {};
183
183
  /**
184
- * SQL expression for check constraint validation.
185
- */
184
+ * SQL expression for check constraint validation.
185
+ */
186
186
  check?: SQL;
187
187
  }>;
188
188
  /**
189
- * Advanced Drizzle ORM configuration for complex table setups.
190
- */
189
+ * Advanced Drizzle ORM configuration for complex table setups.
190
+ */
191
191
  config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
192
192
  }
193
193
  declare class EntityPrimitive<T extends TObject = TObject> {
@@ -235,8 +235,8 @@ type PgSymbols = {
235
235
  [PG_REF]: PgRefOptions;
236
236
  [PG_ENUM]: PgEnumOptions;
237
237
  /**
238
- * @deprecated Use `PG_IDENTITY` instead.
239
- */
238
+ * @deprecated Use `PG_IDENTITY` instead.
239
+ */
240
240
  [PG_SERIAL]: {};
241
241
  };
242
242
  type PgSymbolKeys = keyof PgSymbols;
@@ -339,57 +339,57 @@ declare class FileService {
339
339
  protected onUploadFile: alepha160.HookPrimitive<"bucket:file:uploaded">;
340
340
  protected onDeleteBucketFile: alepha160.HookPrimitive<"bucket:file:deleted">;
341
341
  /**
342
- * Calculates SHA-256 checksum of a file.
343
- *
344
- * @param file - The file to calculate checksum for
345
- * @returns Hexadecimal string representation of the SHA-256 hash
346
- * @protected
347
- */
342
+ * Calculates SHA-256 checksum of a file.
343
+ *
344
+ * @param file - The file to calculate checksum for
345
+ * @returns Hexadecimal string representation of the SHA-256 hash
346
+ * @protected
347
+ */
348
348
  protected calculateChecksum(file: FileLike): Promise<string>;
349
349
  /**
350
- * Gets a bucket primitive by name.
351
- *
352
- * @param bucketName - The name of the bucket to retrieve (defaults to "default")
353
- * @returns The bucket primitive
354
- * @throws {NotFoundError} If the bucket is not found
355
- */
350
+ * Gets a bucket primitive by name.
351
+ *
352
+ * @param bucketName - The name of the bucket to retrieve (defaults to "default")
353
+ * @returns The bucket primitive
354
+ * @throws {NotFoundError} If the bucket is not found
355
+ */
356
356
  bucket(bucketName?: string): BucketPrimitive;
357
357
  /**
358
- * Finds files matching the given query criteria with pagination support.
359
- * Supports filtering by bucket, tags, name, mimeType, creator, and date range.
360
- *
361
- * @param q - Query parameters including bucket, tags, name, mimeType, creator, date range, pagination, and sorting
362
- * @returns Paginated list of file entities
363
- */
358
+ * Finds files matching the given query criteria with pagination support.
359
+ * Supports filtering by bucket, tags, name, mimeType, creator, and date range.
360
+ *
361
+ * @param q - Query parameters including bucket, tags, name, mimeType, creator, date range, pagination, and sorting
362
+ * @returns Paginated list of file entities
363
+ */
364
364
  findFiles(q?: FileQuery): Promise<Page<FileEntity>>;
365
365
  /**
366
- * Finds files that have expired based on their expiration date.
367
- * Limited to 1000 files per call to prevent memory issues.
368
- *
369
- * @returns Array of expired file entities
370
- */
366
+ * Finds files that have expired based on their expiration date.
367
+ * Limited to 1000 files per call to prevent memory issues.
368
+ *
369
+ * @returns Array of expired file entities
370
+ */
371
371
  findExpiredFiles(): Promise<FileEntity[]>;
372
372
  /**
373
- * Calculates an expiration date based on a TTL (time to live) duration.
374
- *
375
- * @param ttl - Duration like "1 day", "2 hours", etc.
376
- * @returns DateTime representation of the expiration date, or undefined if no TTL provided
377
- * @protected
378
- */
373
+ * Calculates an expiration date based on a TTL (time to live) duration.
374
+ *
375
+ * @param ttl - Duration like "1 day", "2 hours", etc.
376
+ * @returns DateTime representation of the expiration date, or undefined if no TTL provided
377
+ * @protected
378
+ */
379
379
  protected getExpirationDate(ttl?: DurationLike): string | undefined;
380
380
  /**
381
- * Uploads a file to a bucket and creates a database record with metadata.
382
- * Automatically calculates and stores the file checksum (SHA-256).
383
- *
384
- * @param file - The file to upload
385
- * @param options - Upload options including bucket, expiration, user, and tags
386
- * @param options.bucket - Target bucket name (defaults to "default")
387
- * @param options.expirationDate - When the file should expire
388
- * @param options.user - User performing the upload (for audit trail)
389
- * @param options.tags - Tags to associate with the file
390
- * @returns The created file entity with all metadata
391
- * @throws {NotFoundError} If the specified bucket doesn't exist
392
- */
381
+ * Uploads a file to a bucket and creates a database record with metadata.
382
+ * Automatically calculates and stores the file checksum (SHA-256).
383
+ *
384
+ * @param file - The file to upload
385
+ * @param options - Upload options including bucket, expiration, user, and tags
386
+ * @param options.bucket - Target bucket name (defaults to "default")
387
+ * @param options.expirationDate - When the file should expire
388
+ * @param options.user - User performing the upload (for audit trail)
389
+ * @param options.tags - Tags to associate with the file
390
+ * @returns The created file entity with all metadata
391
+ * @throws {NotFoundError} If the specified bucket doesn't exist
392
+ */
393
393
  uploadFile(file: FileLike, options?: {
394
394
  expirationDate?: string | DateTime;
395
395
  bucket?: string;
@@ -397,63 +397,63 @@ declare class FileService {
397
397
  tags?: string[];
398
398
  }): Promise<FileEntity>;
399
399
  /**
400
- * Streams a file from storage by its database ID.
401
- *
402
- * @param id - The database ID (UUID) of the file to stream
403
- * @returns The file object ready for streaming/downloading
404
- * @throws {NotFoundError} If the file doesn't exist in the database
405
- * @throws {FileNotFoundError} If the file exists in database but not in storage
406
- */
400
+ * Streams a file from storage by its database ID.
401
+ *
402
+ * @param id - The database ID (UUID) of the file to stream
403
+ * @returns The file object ready for streaming/downloading
404
+ * @throws {NotFoundError} If the file doesn't exist in the database
405
+ * @throws {FileNotFoundError} If the file exists in database but not in storage
406
+ */
407
407
  streamFile(id: string): Promise<FileLike>;
408
408
  /**
409
- * Updates file metadata (name, tags, expiration date).
410
- * Does not modify the actual file content in storage.
411
- *
412
- * @param id - The database ID (UUID) of the file to update
413
- * @param data - Partial file data to update
414
- * @param data.name - New file name
415
- * @param data.tags - New tags array
416
- * @param data.expirationDate - New expiration date
417
- * @returns The updated file entity
418
- * @throws {NotFoundError} If the file doesn't exist in the database
419
- */
409
+ * Updates file metadata (name, tags, expiration date).
410
+ * Does not modify the actual file content in storage.
411
+ *
412
+ * @param id - The database ID (UUID) of the file to update
413
+ * @param data - Partial file data to update
414
+ * @param data.name - New file name
415
+ * @param data.tags - New tags array
416
+ * @param data.expirationDate - New expiration date
417
+ * @returns The updated file entity
418
+ * @throws {NotFoundError} If the file doesn't exist in the database
419
+ */
420
420
  updateFile(id: string, data: {
421
421
  name?: string;
422
422
  tags?: string[];
423
423
  expirationDate?: DateTime | string;
424
424
  }): Promise<FileEntity>;
425
425
  /**
426
- * Deletes a file from both storage and database.
427
- * Handles cases where file is already deleted from storage gracefully.
428
- * Always ensures database record is removed even if storage deletion fails.
429
- *
430
- * @param id - The database ID (UUID) of the file to delete
431
- * @returns Success response with the deleted file ID
432
- * @throws {NotFoundError} If the file doesn't exist in the database
433
- */
426
+ * Deletes a file from both storage and database.
427
+ * Handles cases where file is already deleted from storage gracefully.
428
+ * Always ensures database record is removed even if storage deletion fails.
429
+ *
430
+ * @param id - The database ID (UUID) of the file to delete
431
+ * @returns Success response with the deleted file ID
432
+ * @throws {NotFoundError} If the file doesn't exist in the database
433
+ */
434
434
  deleteFile(id: string): Promise<Ok>;
435
435
  /**
436
- * Retrieves a file entity by its ID.
437
- * If already an entity object, returns it as-is (convenience method).
438
- *
439
- * @param id - Either a UUID string or an existing FileEntity object
440
- * @returns The file entity
441
- * @throws {NotFoundError} If the file doesn't exist in the database
442
- */
436
+ * Retrieves a file entity by its ID.
437
+ * If already an entity object, returns it as-is (convenience method).
438
+ *
439
+ * @param id - Either a UUID string or an existing FileEntity object
440
+ * @returns The file entity
441
+ * @throws {NotFoundError} If the file doesn't exist in the database
442
+ */
443
443
  getFileById(id: string | FileEntity): Promise<FileEntity>;
444
444
  /**
445
- * Gets storage statistics including total size, file count, and breakdowns by bucket and MIME type.
446
- *
447
- * @returns Storage statistics with aggregated data
448
- */
445
+ * Gets storage statistics including total size, file count, and breakdowns by bucket and MIME type.
446
+ *
447
+ * @returns Storage statistics with aggregated data
448
+ */
449
449
  getStorageStats(): Promise<StorageStats>;
450
450
  /**
451
- * Converts a file entity to a file resource (API response format).
452
- * Currently a pass-through, but allows for future transformation logic.
453
- *
454
- * @param entity - The file entity to convert
455
- * @returns The file resource for API responses
456
- */
451
+ * Converts a file entity to a file resource (API response format).
452
+ * Currently a pass-through, but allows for future transformation logic.
453
+ *
454
+ * @param entity - The file entity to convert
455
+ * @returns The file resource for API responses
456
+ */
457
457
  entityToResource(entity: FileEntity): FileResource;
458
458
  }
459
459
  //#endregion
@@ -467,10 +467,10 @@ declare class AdminFileStatsController {
467
467
  protected readonly group = "admin:files";
468
468
  protected readonly fileService: FileService;
469
469
  /**
470
- * GET /files/stats - Gets storage statistics.
471
- * Returns aggregated data including total size, file count,
472
- * and breakdowns by bucket and MIME type.
473
- */
470
+ * GET /files/stats - Gets storage statistics.
471
+ * Returns aggregated data including total size, file count,
472
+ * and breakdowns by bucket and MIME type.
473
+ */
474
474
  readonly getStats: alepha_server0.ActionPrimitiveFn<{
475
475
  response: alepha160.TObject<{
476
476
  totalSize: alepha160.TNumber;
@@ -498,9 +498,9 @@ declare class FileController {
498
498
  protected readonly group = "files";
499
499
  protected readonly fileService: FileService;
500
500
  /**
501
- * GET /files - Lists files with optional filtering and pagination.
502
- * Supports filtering by bucket and tags.
503
- */
501
+ * GET /files - Lists files with optional filtering and pagination.
502
+ * Supports filtering by bucket and tags.
503
+ */
504
504
  readonly findFiles: alepha_server0.ActionPrimitiveFn<{
505
505
  query: alepha160.TObject<{
506
506
  page: alepha160.TOptional<alepha160.TInteger>;
@@ -533,9 +533,9 @@ declare class FileController {
533
533
  }>>;
534
534
  }>;
535
535
  /**
536
- * DELETE /files/:id - Deletes a file from both storage and database.
537
- * Removes the file from the bucket and cleans up the database record.
538
- */
536
+ * DELETE /files/:id - Deletes a file from both storage and database.
537
+ * Removes the file from the bucket and cleans up the database record.
538
+ */
539
539
  readonly deleteFile: alepha_server0.ActionPrimitiveFn<{
540
540
  params: alepha160.TObject<{
541
541
  id: alepha160.TString;
@@ -547,10 +547,10 @@ declare class FileController {
547
547
  }>;
548
548
  }>;
549
549
  /**
550
- * POST /files - Uploads a new file to storage.
551
- * Creates a database record with metadata and calculates checksum.
552
- * Optionally specify bucket and expiration date.
553
- */
550
+ * POST /files - Uploads a new file to storage.
551
+ * Creates a database record with metadata and calculates checksum.
552
+ * Optionally specify bucket and expiration date.
553
+ */
554
554
  readonly uploadFile: alepha_server0.ActionPrimitiveFn<{
555
555
  body: alepha160.TObject<{
556
556
  file: alepha160.TFile;
@@ -578,9 +578,9 @@ declare class FileController {
578
578
  }>;
579
579
  }>;
580
580
  /**
581
- * PATCH /files/:id - Updates file metadata.
582
- * Allows updating name, tags, and expiration date without modifying file content.
583
- */
581
+ * PATCH /files/:id - Updates file metadata.
582
+ * Allows updating name, tags, and expiration date without modifying file content.
583
+ */
584
584
  readonly updateFile: alepha_server0.ActionPrimitiveFn<{
585
585
  params: alepha160.TObject<{
586
586
  id: alepha160.TString;
@@ -609,10 +609,10 @@ declare class FileController {
609
609
  }>;
610
610
  }>;
611
611
  /**
612
- * GET /files/:id - Streams/downloads a file by its ID.
613
- * Returns the file content with appropriate Content-Type header.
614
- * Cached with ETag support for 1 year (immutable).
615
- */
612
+ * GET /files/:id - Streams/downloads a file by its ID.
613
+ * Returns the file content with appropriate Content-Type header.
614
+ * Cached with ETag support for 1 year (immutable).
615
+ */
616
616
  readonly streamFile: alepha_server0.ActionPrimitiveFn<{
617
617
  params: alepha160.TObject<{
618
618
  id: alepha160.TString;
@@ -631,22 +631,22 @@ declare class FileJobs {
631
631
  declare module "alepha/bucket" {
632
632
  interface BucketFileOptions {
633
633
  /**
634
- * Time to live for the files in the bucket.
635
- */
634
+ * Time to live for the files in the bucket.
635
+ */
636
636
  ttl?: DurationLike;
637
637
  /**
638
- * Tags for the bucket.
639
- */
638
+ * Tags for the bucket.
639
+ */
640
640
  tags?: string[];
641
641
  /**
642
- * User performing the operation.
643
- */
642
+ * User performing the operation.
643
+ */
644
644
  user?: UserAccountToken;
645
645
  /**
646
- * Whether to persist the file metadata in the database.
647
- *
648
- * @default true
649
- */
646
+ * Whether to persist the file metadata in the database.
647
+ *
648
+ * @default true
649
+ */
650
650
  persist?: boolean;
651
651
  }
652
652
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/files/entities/files.ts","../../../src/api/files/schemas/fileQuerySchema.ts","../../../src/orm/schemas/insertSchema.ts","../../../src/orm/schemas/updateSchema.ts","../../../src/orm/primitives/$entity.ts","../../../src/orm/constants/PG_SYMBOLS.ts","../../../src/orm/helpers/pgAttr.ts","../../../src/api/files/schemas/fileResourceSchema.ts","../../../src/api/files/schemas/storageStatsSchema.ts","../../../src/api/files/services/FileService.ts","../../../src/api/files/controllers/AdminFileStatsController.ts","../../../src/api/files/controllers/FileController.ts","../../../src/api/files/jobs/FileJobs.ts","../../../src/api/files/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;cAGa,KAAA,EAAK,YAAA,CAAA,eAAA,WAAA,OAAA;EAAA,EAAA,0CA6BhB,SAAA,CAAA,OAAA;;;;;;;;;;;;;;;;KAEU,UAAA,GAAa,MAAA,QAAc,KAAA,CAAM,MAAA;;;cC9BhC,eAAA,YAAe,OAAA;EAAA,IAAA,sBAQ1B,SAAA,CAAA,QAAA;EAAA,IAAA;;;;;;;;;;KAEU,SAAA,GAAY,MAAA,QAAc,eAAA;;;;ACDtC;;;;;;;KAAY,aAAA,WAAwB,OAAA,IAAW,OAAA,eACjC,CAAA,iBAAkB,CAAA,eAAgB,CAAA;EAAA,CACvC,UAAA;AAAA;EAAA;AAAA,IAEH,SAAA,CAAU,CAAA,eAAgB,CAAA,KAC1B,CAAA,eAAgB,CAAA;;;;ACDtB;;;;;;;;KAAY,aAAA,WAAwB,OAAA,IAAW,OAAA,eACjC,CAAA,iBAAkB,CAAA,eAAgB,CAAA,UAAW,SAAA,YACrD,SAAA,CAAU,MAAA,EAAQ,CAAA,EAAG,KAAA,MACrB,CAAA,eAAgB,CAAA;;;UCgBL,sBAAA,WACL,OAAA,eACG,MAAA,CAAO,CAAA;EAAA;;;;EAAA,IAAA;EAAA;;;EAAA,MAAA,EAWZ,CAAA;EAAA;;;EAAA,OAAA,IAMJ,IAAA;IAAA;;;IAAA,MAAA,EAKU,IAAA;IAAA;;;IAAA,MAAA;IAAA;;;IAAA,IAAA;EAAA;IAAA;;;IAAA,OAAA,EAcC,IAAA;IAAA;;;IAAA,MAAA;IAAA;;;IAAA,IAAA;EAAA;EAAA;;;EAAA,WAAA,GAeD,KAAA;IAAA;;;IAAA,IAAA;IAAA;;;IAAA,OAAA,EAQH,KAAA,OAAY,MAAA,CAAO,CAAA;IAAA;;;;IAAA,cAAA,EAKZ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AA;EAAA,mBAAA,KAAA;EAAA,mBAAA,WAAA,EAGmB,WAAA;EAAA;;;;EAAA,SAAA,SAAA,iBAML,iBAAA;IAAA,KAAA;gCANK,SAAA,CAAA,QAAA;MAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAqBJ,iBAAA;IAAA,MAAA;UAfD,SAAA,CAAA,OAAA;IAAA;IAAA,QAAA;;;;;;;;;;;sCAkCC,iBAAA;IAAA,IAAA;YAnBA,SAAA,CAAA,KAAA;IAAA;IAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;sCA4CA,iBAAA;IAAA,MAAA;UAzBA,SAAA,CAAA,OAAA;IAAA;IAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAiDA,iBAAA;IAAA,MAAA;UAxBA,SAAA,CAAA,OAAA;IAAA;IAAA,QAAA;;;;;cC1Ef,QAAA;EAAA,mBAAA,WAAA,EACmB,WAAA;EAAA,SAAA,UAAA,EAAA,iBAAA,CAEJ,kBAAA;AAAA;;;;;;ACWc;;UAShC,YAAA;IAAA;;;IAAA,IAAA;IAAA;;;IAAA,IAAA,GAUC,gBAAA;IAAA;;;AAqBX;;IArBW,OAAA;EAAA;AAAA;AAAA;;;AAqBX;;;;;AArBW,cAqBE,cAAA,EAAc,SAAA,CAAA,OAAA,CAYzB,SAAA,CAZyB,MAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/files/entities/files.ts","../../../src/api/files/schemas/fileQuerySchema.ts","../../../src/orm/schemas/insertSchema.ts","../../../src/orm/schemas/updateSchema.ts","../../../src/orm/primitives/$entity.ts","../../../src/orm/constants/PG_SYMBOLS.ts","../../../src/orm/helpers/pgAttr.ts","../../../src/api/files/schemas/fileResourceSchema.ts","../../../src/api/files/schemas/storageStatsSchema.ts","../../../src/api/files/services/FileService.ts","../../../src/api/files/controllers/AdminFileStatsController.ts","../../../src/api/files/controllers/FileController.ts","../../../src/api/files/jobs/FileJobs.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A,iBAAU,iBAAA;;UAzBA,SAAA,CAAA,OAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;EXnBhB;;;;;EAAA,SWoEM,UAAA,iBAAU,iBAAA;;UAxBA,SAAA,CAAA,OAAA;IAAA;;;;;;cC1Ef,QAAA;EAAA,mBACQ,WAAA,EAAW,WAAA;EAAA,SAEd,UAAA,EAFc,iBAAA,CAEJ,kBAAA;AAAA;;;;YCgBhB,iBAAA;;;;IAIR,GAAA,GAAM,YAAA;;;;IAKN,IAAA;Ib7BS;;;IakCT,IAAA,GAAO,gBAAA;;;;;;IAOP,OAAA;EAAA;AAAA;;;;;;;;;cAcS,cAAA,EAAc,SAAA,CAAA,OAAA,CAYzB,SAAA,CAZyB,MAAA"}
@@ -478,8 +478,8 @@ var FileJobs = class {
478
478
  description: "Purge files that are marked for deletion",
479
479
  cron: "*/15 * * * *",
480
480
  handler: async () => {
481
- const files$1 = await this.fileService.findExpiredFiles();
482
- await Promise.all(files$1.map((file) => this.fileService.deleteFile(file.id)));
481
+ const files = await this.fileService.findExpiredFiles();
482
+ await Promise.all(files.map((file) => this.fileService.deleteFile(file.id)));
483
483
  }
484
484
  });
485
485
  };