alepha 0.13.3 → 0.13.4
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/README.md +7 -7
- package/dist/api-files/index.d.ts +175 -175
- package/dist/api-jobs/index.d.ts +156 -156
- package/dist/api-notifications/index.d.ts +147 -147
- package/dist/api-verifications/index.d.ts +12 -12
- package/dist/core/index.browser.js +5 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +221 -219
- package/dist/core/index.js +5 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +5 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/email/index.d.ts +4 -4
- package/dist/orm/index.d.ts +19 -19
- package/dist/server-auth/index.d.ts +152 -152
- package/dist/server-security/index.d.ts +9 -9
- package/package.json +1 -1
- package/src/core/Alepha.ts +14 -0
- package/src/core/primitives/$module.ts +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,9 @@ Easy mode for building TypeScript applications.
|
|
|
19
19
|
<a href="https://github.com/feunard/alepha"><img src="https://img.shields.io/github/stars/feunard/alepha.svg?style=social" alt="GitHub stars"/></a>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
+
> [!WARNING]
|
|
23
|
+
> **Early Development** — Alepha is under active development. The API is stabilizing but may change. First stable release planned for early 2026. Follow the repo to stay updated.
|
|
24
|
+
|
|
22
25
|
## What is this?
|
|
23
26
|
|
|
24
27
|
Build API endpoints (Docker or Serverless), React applications (SSR, CSR or SSG), and more!
|
|
@@ -33,12 +36,7 @@ For more information, please visit the [documentation](https://feunard.github.io
|
|
|
33
36
|
|
|
34
37
|
## Examples
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- API endpoint with automatic OpenAPI documentation
|
|
39
|
-
- Full-stack React application with server-side rendering
|
|
40
|
-
|
|
41
|
-
### Requirements
|
|
39
|
+
**Requirements**
|
|
42
40
|
|
|
43
41
|
- [Node.js](https://nodejs.org/) v22 or higher
|
|
44
42
|
|
|
@@ -98,8 +96,10 @@ Run the development server:
|
|
|
98
96
|
|
|
99
97
|
```bash
|
|
100
98
|
$ npx alepha dev
|
|
101
|
-
# alepha dev comes with hot-reload and full TypeScript support
|
|
99
|
+
# alepha dev comes with hot-reload and full TypeScript support
|
|
100
|
+
# but you can also run:
|
|
102
101
|
$ node ./src/main.ts
|
|
102
|
+
$ bun ./src/main.ts
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Then, open your browser at `http://localhost:3000/docs/` and enjoy your automatically generated documentation.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha135 from "alepha";
|
|
2
2
|
import { Alepha, FileLike, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
3
|
import { BucketPrimitive } from "alepha/bucket";
|
|
4
|
-
import * as
|
|
4
|
+
import * as alepha_orm47 from "alepha/orm";
|
|
5
5
|
import { Page } from "alepha/orm";
|
|
6
6
|
import * as alepha_server0 from "alepha/server";
|
|
7
7
|
import { Ok } from "alepha/server";
|
|
@@ -18,37 +18,37 @@ import "postgres";
|
|
|
18
18
|
import "drizzle-orm/sqlite-core";
|
|
19
19
|
|
|
20
20
|
//#region src/api-files/entities/files.d.ts
|
|
21
|
-
declare const files:
|
|
22
|
-
id:
|
|
23
|
-
version:
|
|
24
|
-
createdAt:
|
|
25
|
-
updatedAt:
|
|
26
|
-
blobId:
|
|
27
|
-
creator:
|
|
28
|
-
creatorRealm:
|
|
29
|
-
creatorName:
|
|
30
|
-
bucket:
|
|
31
|
-
expirationDate:
|
|
32
|
-
name:
|
|
33
|
-
size:
|
|
34
|
-
mimeType:
|
|
35
|
-
tags:
|
|
36
|
-
checksum:
|
|
21
|
+
declare const files: alepha_orm47.EntityPrimitive<alepha135.TObject<{
|
|
22
|
+
id: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_PRIMARY_KEY>, typeof alepha_orm47.PG_DEFAULT>;
|
|
23
|
+
version: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TInteger, typeof alepha_orm47.PG_VERSION>, typeof alepha_orm47.PG_DEFAULT>;
|
|
24
|
+
createdAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_CREATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
25
|
+
updatedAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_UPDATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
26
|
+
blobId: alepha135.TString;
|
|
27
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
28
|
+
creatorRealm: alepha135.TOptional<alepha135.TString>;
|
|
29
|
+
creatorName: alepha135.TOptional<alepha135.TString>;
|
|
30
|
+
bucket: alepha135.TString;
|
|
31
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
32
|
+
name: alepha135.TString;
|
|
33
|
+
size: alepha135.TNumber;
|
|
34
|
+
mimeType: alepha135.TString;
|
|
35
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
36
|
+
checksum: alepha135.TOptional<alepha135.TString>;
|
|
37
37
|
}>>;
|
|
38
38
|
type FileEntity = Static<typeof files.schema>;
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/api-files/schemas/fileQuerySchema.d.ts
|
|
41
|
-
declare const fileQuerySchema:
|
|
42
|
-
page:
|
|
43
|
-
size:
|
|
44
|
-
sort:
|
|
45
|
-
bucket:
|
|
46
|
-
tags:
|
|
47
|
-
name:
|
|
48
|
-
mimeType:
|
|
49
|
-
creator:
|
|
50
|
-
createdAfter:
|
|
51
|
-
createdBefore:
|
|
41
|
+
declare const fileQuerySchema: alepha135.TObject<{
|
|
42
|
+
page: alepha135.TOptional<alepha135.TInteger>;
|
|
43
|
+
size: alepha135.TOptional<alepha135.TInteger>;
|
|
44
|
+
sort: alepha135.TOptional<alepha135.TString>;
|
|
45
|
+
bucket: alepha135.TOptional<alepha135.TString>;
|
|
46
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
47
|
+
name: alepha135.TOptional<alepha135.TString>;
|
|
48
|
+
mimeType: alepha135.TOptional<alepha135.TString>;
|
|
49
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
50
|
+
createdAfter: alepha135.TOptional<alepha135.TString>;
|
|
51
|
+
createdBefore: alepha135.TOptional<alepha135.TString>;
|
|
52
52
|
}>;
|
|
53
53
|
type FileQuery = Static<typeof fileQuerySchema>;
|
|
54
54
|
//#endregion
|
|
@@ -272,7 +272,7 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
|
|
|
272
272
|
declare module "alepha" {
|
|
273
273
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
274
274
|
}
|
|
275
|
-
declare const envSchema:
|
|
275
|
+
declare const envSchema: alepha135.TObject<{
|
|
276
276
|
/**
|
|
277
277
|
* Main configuration for database connection.
|
|
278
278
|
* Accept a string in the format of a Postgres connection URL.
|
|
@@ -280,21 +280,21 @@ declare const envSchema: alepha160.TObject<{
|
|
|
280
280
|
* or
|
|
281
281
|
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
282
282
|
*/
|
|
283
|
-
DATABASE_URL:
|
|
283
|
+
DATABASE_URL: alepha135.TOptional<alepha135.TString>;
|
|
284
284
|
/**
|
|
285
285
|
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
286
286
|
*
|
|
287
287
|
* It will monkey patch drizzle tables.
|
|
288
288
|
*/
|
|
289
|
-
POSTGRES_SCHEMA:
|
|
289
|
+
POSTGRES_SCHEMA: alepha135.TOptional<alepha135.TString>;
|
|
290
290
|
}>;
|
|
291
291
|
//#endregion
|
|
292
292
|
//#region src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
293
293
|
/**
|
|
294
294
|
* Configuration options for the Node.js SQLite database provider.
|
|
295
295
|
*/
|
|
296
|
-
declare const nodeSqliteOptions:
|
|
297
|
-
path:
|
|
296
|
+
declare const nodeSqliteOptions: alepha135.Atom<alepha135.TObject<{
|
|
297
|
+
path: alepha135.TOptional<alepha135.TString>;
|
|
298
298
|
}>, "alepha.postgres.node-sqlite.options">;
|
|
299
299
|
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
300
300
|
declare module "alepha" {
|
|
@@ -378,46 +378,46 @@ declare module "alepha" {
|
|
|
378
378
|
}
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region src/api-files/schemas/fileResourceSchema.d.ts
|
|
381
|
-
declare const fileResourceSchema:
|
|
382
|
-
id: PgAttr<PgAttr<
|
|
383
|
-
version: PgAttr<PgAttr<
|
|
384
|
-
createdAt: PgAttr<PgAttr<
|
|
385
|
-
updatedAt: PgAttr<PgAttr<
|
|
386
|
-
blobId:
|
|
387
|
-
creator:
|
|
388
|
-
creatorRealm:
|
|
389
|
-
creatorName:
|
|
390
|
-
bucket:
|
|
391
|
-
expirationDate:
|
|
392
|
-
name:
|
|
393
|
-
size:
|
|
394
|
-
mimeType:
|
|
395
|
-
tags:
|
|
396
|
-
checksum:
|
|
381
|
+
declare const fileResourceSchema: alepha135.TObject<{
|
|
382
|
+
id: PgAttr<PgAttr<alepha135.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
383
|
+
version: PgAttr<PgAttr<alepha135.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
384
|
+
createdAt: PgAttr<PgAttr<alepha135.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
385
|
+
updatedAt: PgAttr<PgAttr<alepha135.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
386
|
+
blobId: alepha135.TString;
|
|
387
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
388
|
+
creatorRealm: alepha135.TOptional<alepha135.TString>;
|
|
389
|
+
creatorName: alepha135.TOptional<alepha135.TString>;
|
|
390
|
+
bucket: alepha135.TString;
|
|
391
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
392
|
+
name: alepha135.TString;
|
|
393
|
+
size: alepha135.TNumber;
|
|
394
|
+
mimeType: alepha135.TString;
|
|
395
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
396
|
+
checksum: alepha135.TOptional<alepha135.TString>;
|
|
397
397
|
}>;
|
|
398
398
|
type FileResource = Static<typeof fileResourceSchema>;
|
|
399
399
|
//#endregion
|
|
400
400
|
//#region src/api-files/schemas/storageStatsSchema.d.ts
|
|
401
|
-
declare const bucketStatsSchema:
|
|
402
|
-
bucket:
|
|
403
|
-
totalSize:
|
|
404
|
-
fileCount:
|
|
401
|
+
declare const bucketStatsSchema: alepha135.TObject<{
|
|
402
|
+
bucket: alepha135.TString;
|
|
403
|
+
totalSize: alepha135.TNumber;
|
|
404
|
+
fileCount: alepha135.TNumber;
|
|
405
405
|
}>;
|
|
406
|
-
declare const mimeTypeStatsSchema:
|
|
407
|
-
mimeType:
|
|
408
|
-
fileCount:
|
|
406
|
+
declare const mimeTypeStatsSchema: alepha135.TObject<{
|
|
407
|
+
mimeType: alepha135.TString;
|
|
408
|
+
fileCount: alepha135.TNumber;
|
|
409
409
|
}>;
|
|
410
|
-
declare const storageStatsSchema:
|
|
411
|
-
totalSize:
|
|
412
|
-
totalFiles:
|
|
413
|
-
byBucket:
|
|
414
|
-
bucket:
|
|
415
|
-
totalSize:
|
|
416
|
-
fileCount:
|
|
410
|
+
declare const storageStatsSchema: alepha135.TObject<{
|
|
411
|
+
totalSize: alepha135.TNumber;
|
|
412
|
+
totalFiles: alepha135.TNumber;
|
|
413
|
+
byBucket: alepha135.TArray<alepha135.TObject<{
|
|
414
|
+
bucket: alepha135.TString;
|
|
415
|
+
totalSize: alepha135.TNumber;
|
|
416
|
+
fileCount: alepha135.TNumber;
|
|
417
417
|
}>>;
|
|
418
|
-
byMimeType:
|
|
419
|
-
mimeType:
|
|
420
|
-
fileCount:
|
|
418
|
+
byMimeType: alepha135.TArray<alepha135.TObject<{
|
|
419
|
+
mimeType: alepha135.TString;
|
|
420
|
+
fileCount: alepha135.TNumber;
|
|
421
421
|
}>>;
|
|
422
422
|
}>;
|
|
423
423
|
type BucketStats = Static<typeof bucketStatsSchema>;
|
|
@@ -428,27 +428,27 @@ type StorageStats = Static<typeof storageStatsSchema>;
|
|
|
428
428
|
declare class FileService {
|
|
429
429
|
protected readonly alepha: Alepha;
|
|
430
430
|
protected readonly log: alepha_logger0.Logger;
|
|
431
|
-
protected readonly fileRepository:
|
|
432
|
-
id:
|
|
433
|
-
version:
|
|
434
|
-
createdAt:
|
|
435
|
-
updatedAt:
|
|
436
|
-
blobId:
|
|
437
|
-
creator:
|
|
438
|
-
creatorRealm:
|
|
439
|
-
creatorName:
|
|
440
|
-
bucket:
|
|
441
|
-
expirationDate:
|
|
442
|
-
name:
|
|
443
|
-
size:
|
|
444
|
-
mimeType:
|
|
445
|
-
tags:
|
|
446
|
-
checksum:
|
|
431
|
+
protected readonly fileRepository: alepha_orm47.Repository<alepha135.TObject<{
|
|
432
|
+
id: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_PRIMARY_KEY>, typeof alepha_orm47.PG_DEFAULT>;
|
|
433
|
+
version: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TInteger, typeof alepha_orm47.PG_VERSION>, typeof alepha_orm47.PG_DEFAULT>;
|
|
434
|
+
createdAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_CREATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
435
|
+
updatedAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_UPDATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
436
|
+
blobId: alepha135.TString;
|
|
437
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
438
|
+
creatorRealm: alepha135.TOptional<alepha135.TString>;
|
|
439
|
+
creatorName: alepha135.TOptional<alepha135.TString>;
|
|
440
|
+
bucket: alepha135.TString;
|
|
441
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
442
|
+
name: alepha135.TString;
|
|
443
|
+
size: alepha135.TNumber;
|
|
444
|
+
mimeType: alepha135.TString;
|
|
445
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
446
|
+
checksum: alepha135.TOptional<alepha135.TString>;
|
|
447
447
|
}>>;
|
|
448
448
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
449
449
|
protected readonly defaultBucket: BucketPrimitive;
|
|
450
|
-
protected onUploadFile:
|
|
451
|
-
protected onDeleteBucketFile:
|
|
450
|
+
protected onUploadFile: alepha135.HookPrimitive<"bucket:file:uploaded">;
|
|
451
|
+
protected onDeleteBucketFile: alepha135.HookPrimitive<"bucket:file:deleted">;
|
|
452
452
|
/**
|
|
453
453
|
* Calculates SHA-256 checksum of a file.
|
|
454
454
|
*
|
|
@@ -582,34 +582,34 @@ declare class FileController {
|
|
|
582
582
|
* Supports filtering by bucket and tags.
|
|
583
583
|
*/
|
|
584
584
|
readonly findFiles: alepha_server0.ActionPrimitiveFn<{
|
|
585
|
-
query:
|
|
586
|
-
page:
|
|
587
|
-
size:
|
|
588
|
-
sort:
|
|
589
|
-
bucket:
|
|
590
|
-
tags:
|
|
591
|
-
name:
|
|
592
|
-
mimeType:
|
|
593
|
-
creator:
|
|
594
|
-
createdAfter:
|
|
595
|
-
createdBefore:
|
|
585
|
+
query: alepha135.TObject<{
|
|
586
|
+
page: alepha135.TOptional<alepha135.TInteger>;
|
|
587
|
+
size: alepha135.TOptional<alepha135.TInteger>;
|
|
588
|
+
sort: alepha135.TOptional<alepha135.TString>;
|
|
589
|
+
bucket: alepha135.TOptional<alepha135.TString>;
|
|
590
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
591
|
+
name: alepha135.TOptional<alepha135.TString>;
|
|
592
|
+
mimeType: alepha135.TOptional<alepha135.TString>;
|
|
593
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
594
|
+
createdAfter: alepha135.TOptional<alepha135.TString>;
|
|
595
|
+
createdBefore: alepha135.TOptional<alepha135.TString>;
|
|
596
596
|
}>;
|
|
597
|
-
response:
|
|
598
|
-
id:
|
|
599
|
-
version:
|
|
600
|
-
createdAt:
|
|
601
|
-
updatedAt:
|
|
602
|
-
blobId:
|
|
603
|
-
creator:
|
|
604
|
-
creatorRealm:
|
|
605
|
-
creatorName:
|
|
606
|
-
bucket:
|
|
607
|
-
expirationDate:
|
|
608
|
-
name:
|
|
609
|
-
size:
|
|
610
|
-
mimeType:
|
|
611
|
-
tags:
|
|
612
|
-
checksum:
|
|
597
|
+
response: alepha135.TPage<alepha135.TObject<{
|
|
598
|
+
id: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_PRIMARY_KEY>, typeof alepha_orm47.PG_DEFAULT>;
|
|
599
|
+
version: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TInteger, typeof alepha_orm47.PG_VERSION>, typeof alepha_orm47.PG_DEFAULT>;
|
|
600
|
+
createdAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_CREATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
601
|
+
updatedAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_UPDATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
602
|
+
blobId: alepha135.TString;
|
|
603
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
604
|
+
creatorRealm: alepha135.TOptional<alepha135.TString>;
|
|
605
|
+
creatorName: alepha135.TOptional<alepha135.TString>;
|
|
606
|
+
bucket: alepha135.TString;
|
|
607
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
608
|
+
name: alepha135.TString;
|
|
609
|
+
size: alepha135.TNumber;
|
|
610
|
+
mimeType: alepha135.TString;
|
|
611
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
612
|
+
checksum: alepha135.TOptional<alepha135.TString>;
|
|
613
613
|
}>>;
|
|
614
614
|
}>;
|
|
615
615
|
/**
|
|
@@ -617,13 +617,13 @@ declare class FileController {
|
|
|
617
617
|
* Removes the file from the bucket and cleans up the database record.
|
|
618
618
|
*/
|
|
619
619
|
readonly deleteFile: alepha_server0.ActionPrimitiveFn<{
|
|
620
|
-
params:
|
|
621
|
-
id:
|
|
620
|
+
params: alepha135.TObject<{
|
|
621
|
+
id: alepha135.TString;
|
|
622
622
|
}>;
|
|
623
|
-
response:
|
|
624
|
-
ok:
|
|
625
|
-
id:
|
|
626
|
-
count:
|
|
623
|
+
response: alepha135.TObject<{
|
|
624
|
+
ok: alepha135.TBoolean;
|
|
625
|
+
id: alepha135.TOptional<alepha135.TUnion<[alepha135.TString, alepha135.TInteger]>>;
|
|
626
|
+
count: alepha135.TOptional<alepha135.TNumber>;
|
|
627
627
|
}>;
|
|
628
628
|
}>;
|
|
629
629
|
/**
|
|
@@ -632,29 +632,29 @@ declare class FileController {
|
|
|
632
632
|
* Optionally specify bucket and expiration date.
|
|
633
633
|
*/
|
|
634
634
|
readonly uploadFile: alepha_server0.ActionPrimitiveFn<{
|
|
635
|
-
body:
|
|
636
|
-
file:
|
|
635
|
+
body: alepha135.TObject<{
|
|
636
|
+
file: alepha135.TFile;
|
|
637
637
|
}>;
|
|
638
|
-
query:
|
|
639
|
-
expirationDate:
|
|
640
|
-
bucket:
|
|
638
|
+
query: alepha135.TObject<{
|
|
639
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
640
|
+
bucket: alepha135.TOptional<alepha135.TString>;
|
|
641
641
|
}>;
|
|
642
|
-
response:
|
|
643
|
-
id:
|
|
644
|
-
version:
|
|
645
|
-
createdAt:
|
|
646
|
-
updatedAt:
|
|
647
|
-
blobId:
|
|
648
|
-
creator:
|
|
649
|
-
creatorRealm:
|
|
650
|
-
creatorName:
|
|
651
|
-
bucket:
|
|
652
|
-
expirationDate:
|
|
653
|
-
name:
|
|
654
|
-
size:
|
|
655
|
-
mimeType:
|
|
656
|
-
tags:
|
|
657
|
-
checksum:
|
|
642
|
+
response: alepha135.TObject<{
|
|
643
|
+
id: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_PRIMARY_KEY>, typeof alepha_orm47.PG_DEFAULT>;
|
|
644
|
+
version: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TInteger, typeof alepha_orm47.PG_VERSION>, typeof alepha_orm47.PG_DEFAULT>;
|
|
645
|
+
createdAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_CREATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
646
|
+
updatedAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_UPDATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
647
|
+
blobId: alepha135.TString;
|
|
648
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
649
|
+
creatorRealm: alepha135.TOptional<alepha135.TString>;
|
|
650
|
+
creatorName: alepha135.TOptional<alepha135.TString>;
|
|
651
|
+
bucket: alepha135.TString;
|
|
652
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
653
|
+
name: alepha135.TString;
|
|
654
|
+
size: alepha135.TNumber;
|
|
655
|
+
mimeType: alepha135.TString;
|
|
656
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
657
|
+
checksum: alepha135.TOptional<alepha135.TString>;
|
|
658
658
|
}>;
|
|
659
659
|
}>;
|
|
660
660
|
/**
|
|
@@ -662,30 +662,30 @@ declare class FileController {
|
|
|
662
662
|
* Allows updating name, tags, and expiration date without modifying file content.
|
|
663
663
|
*/
|
|
664
664
|
readonly updateFile: alepha_server0.ActionPrimitiveFn<{
|
|
665
|
-
params:
|
|
666
|
-
id:
|
|
665
|
+
params: alepha135.TObject<{
|
|
666
|
+
id: alepha135.TString;
|
|
667
667
|
}>;
|
|
668
|
-
body:
|
|
669
|
-
name:
|
|
670
|
-
tags:
|
|
671
|
-
expirationDate:
|
|
668
|
+
body: alepha135.TObject<{
|
|
669
|
+
name: alepha135.TOptional<alepha135.TString>;
|
|
670
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
671
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
672
672
|
}>;
|
|
673
|
-
response:
|
|
674
|
-
id:
|
|
675
|
-
version:
|
|
676
|
-
createdAt:
|
|
677
|
-
updatedAt:
|
|
678
|
-
blobId:
|
|
679
|
-
creator:
|
|
680
|
-
creatorRealm:
|
|
681
|
-
creatorName:
|
|
682
|
-
bucket:
|
|
683
|
-
expirationDate:
|
|
684
|
-
name:
|
|
685
|
-
size:
|
|
686
|
-
mimeType:
|
|
687
|
-
tags:
|
|
688
|
-
checksum:
|
|
673
|
+
response: alepha135.TObject<{
|
|
674
|
+
id: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_PRIMARY_KEY>, typeof alepha_orm47.PG_DEFAULT>;
|
|
675
|
+
version: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TInteger, typeof alepha_orm47.PG_VERSION>, typeof alepha_orm47.PG_DEFAULT>;
|
|
676
|
+
createdAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_CREATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
677
|
+
updatedAt: alepha_orm47.PgAttr<alepha_orm47.PgAttr<alepha135.TString, typeof alepha_orm47.PG_UPDATED_AT>, typeof alepha_orm47.PG_DEFAULT>;
|
|
678
|
+
blobId: alepha135.TString;
|
|
679
|
+
creator: alepha135.TOptional<alepha135.TString>;
|
|
680
|
+
creatorRealm: alepha135.TOptional<alepha135.TString>;
|
|
681
|
+
creatorName: alepha135.TOptional<alepha135.TString>;
|
|
682
|
+
bucket: alepha135.TString;
|
|
683
|
+
expirationDate: alepha135.TOptional<alepha135.TString>;
|
|
684
|
+
name: alepha135.TString;
|
|
685
|
+
size: alepha135.TNumber;
|
|
686
|
+
mimeType: alepha135.TString;
|
|
687
|
+
tags: alepha135.TOptional<alepha135.TArray<alepha135.TString>>;
|
|
688
|
+
checksum: alepha135.TOptional<alepha135.TString>;
|
|
689
689
|
}>;
|
|
690
690
|
}>;
|
|
691
691
|
/**
|
|
@@ -694,10 +694,10 @@ declare class FileController {
|
|
|
694
694
|
* Cached with ETag support for 1 year (immutable).
|
|
695
695
|
*/
|
|
696
696
|
readonly streamFile: alepha_server0.ActionPrimitiveFn<{
|
|
697
|
-
params:
|
|
698
|
-
id:
|
|
697
|
+
params: alepha135.TObject<{
|
|
698
|
+
id: alepha135.TString;
|
|
699
699
|
}>;
|
|
700
|
-
response:
|
|
700
|
+
response: alepha135.TFile;
|
|
701
701
|
}>;
|
|
702
702
|
}
|
|
703
703
|
//#endregion
|
|
@@ -716,17 +716,17 @@ declare class StorageStatsController {
|
|
|
716
716
|
* and breakdowns by bucket and MIME type.
|
|
717
717
|
*/
|
|
718
718
|
readonly getStats: alepha_server0.ActionPrimitiveFn<{
|
|
719
|
-
response:
|
|
720
|
-
totalSize:
|
|
721
|
-
totalFiles:
|
|
722
|
-
byBucket:
|
|
723
|
-
bucket:
|
|
724
|
-
totalSize:
|
|
725
|
-
fileCount:
|
|
719
|
+
response: alepha135.TObject<{
|
|
720
|
+
totalSize: alepha135.TNumber;
|
|
721
|
+
totalFiles: alepha135.TNumber;
|
|
722
|
+
byBucket: alepha135.TArray<alepha135.TObject<{
|
|
723
|
+
bucket: alepha135.TString;
|
|
724
|
+
totalSize: alepha135.TNumber;
|
|
725
|
+
fileCount: alepha135.TNumber;
|
|
726
726
|
}>>;
|
|
727
|
-
byMimeType:
|
|
728
|
-
mimeType:
|
|
729
|
-
fileCount:
|
|
727
|
+
byMimeType: alepha135.TArray<alepha135.TObject<{
|
|
728
|
+
mimeType: alepha135.TString;
|
|
729
|
+
fileCount: alepha135.TNumber;
|
|
730
730
|
}>>;
|
|
731
731
|
}>;
|
|
732
732
|
}>;
|
|
@@ -763,7 +763,7 @@ declare module "alepha/bucket" {
|
|
|
763
763
|
*
|
|
764
764
|
* @module alepha.api.files
|
|
765
765
|
*/
|
|
766
|
-
declare const AlephaApiFiles:
|
|
766
|
+
declare const AlephaApiFiles: alepha135.Service<alepha135.Module>;
|
|
767
767
|
//#endregion
|
|
768
768
|
export { AlephaApiFiles, BucketStats, FileController, FileEntity, FileService, MimeTypeStats, StorageStats, StorageStatsController, bucketStatsSchema, files, mimeTypeStatsSchema, storageStatsSchema };
|
|
769
769
|
//# sourceMappingURL=index.d.ts.map
|