alepha 0.10.7 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/files.d.ts +172 -235
- package/api/jobs.d.ts +133 -208
- package/api/notifications.d.ts +112 -225
- package/api/users.d.ts +499 -786
- package/batch.d.ts +8 -8
- package/bucket.d.ts +1 -1
- package/cache.d.ts +12 -12
- package/command.d.ts +11 -11
- package/core.d.ts +312 -221
- package/datetime.d.ts +41 -10
- package/lock.d.ts +8 -8
- package/logger.d.ts +19 -9
- package/package.json +52 -65
- package/postgres.d.ts +488 -1172
- package/queue.d.ts +14 -14
- package/react/auth.d.ts +1 -1
- package/react/form.d.ts +33 -22
- package/react/i18n.d.ts +8 -8
- package/react.d.ts +76 -56
- package/retry.d.ts +8 -8
- package/scheduler.d.ts +1 -1
- package/security.d.ts +4 -4
- package/server/cookies.d.ts +10 -10
- package/server/health.d.ts +31 -8
- package/server/links.d.ts +3 -3
- package/server/multipart.d.ts +2 -2
- package/server/swagger.d.ts +4 -0
- package/server.d.ts +43 -42
- package/topic.d.ts +17 -17
- package/ui.d.ts +365 -46
- package/vite.d.ts +7 -2
package/api/files.d.ts
CHANGED
|
@@ -2,123 +2,92 @@ import { BucketDescriptor } from "alepha/bucket";
|
|
|
2
2
|
import * as _alepha_core1 from "alepha";
|
|
3
3
|
import { Alepha, FileLike, Static } from "alepha";
|
|
4
4
|
import "alepha/server/security";
|
|
5
|
-
import * as
|
|
5
|
+
import * as _alepha_postgres65 from "alepha/postgres";
|
|
6
6
|
import { Page } from "alepha/postgres";
|
|
7
7
|
import * as _alepha_server0 from "alepha/server";
|
|
8
8
|
import { Ok } from "alepha/server";
|
|
9
|
-
import { DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
9
|
+
import { DateTime, DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
10
10
|
import * as _alepha_logger0 from "alepha/logger";
|
|
11
11
|
import { UserAccountToken } from "alepha/security";
|
|
12
|
-
import * as
|
|
12
|
+
import * as typebox188 from "typebox";
|
|
13
|
+
import * as dayjs15 from "dayjs";
|
|
13
14
|
|
|
14
15
|
//#region src/entities/files.d.ts
|
|
15
|
-
declare const files:
|
|
16
|
-
id:
|
|
17
|
-
version:
|
|
18
|
-
createdAt:
|
|
19
|
-
updatedAt:
|
|
20
|
-
blobId:
|
|
21
|
-
creator:
|
|
22
|
-
creatorRealm:
|
|
23
|
-
creatorName:
|
|
24
|
-
bucket:
|
|
25
|
-
expirationDate:
|
|
26
|
-
name:
|
|
27
|
-
size:
|
|
28
|
-
mimeType:
|
|
29
|
-
tags:
|
|
30
|
-
checksum:
|
|
31
|
-
}>, _alepha_postgres50.FromSchema<typebox68.TObject<{
|
|
32
|
-
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
33
|
-
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
34
|
-
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
35
|
-
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
36
|
-
blobId: typebox68.TString;
|
|
37
|
-
creator: typebox68.TOptional<typebox68.TString>;
|
|
38
|
-
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
39
|
-
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
40
|
-
bucket: typebox68.TString;
|
|
41
|
-
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
42
|
-
name: typebox68.TString;
|
|
43
|
-
size: typebox68.TNumber;
|
|
44
|
-
mimeType: typebox68.TString;
|
|
45
|
-
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
46
|
-
checksum: typebox68.TOptional<typebox68.TString>;
|
|
47
|
-
}>>>, typebox68.TObject<{
|
|
48
|
-
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
49
|
-
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
50
|
-
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
51
|
-
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
52
|
-
blobId: typebox68.TString;
|
|
53
|
-
creator: typebox68.TOptional<typebox68.TString>;
|
|
54
|
-
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
55
|
-
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
56
|
-
bucket: typebox68.TString;
|
|
57
|
-
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
58
|
-
name: typebox68.TString;
|
|
59
|
-
size: typebox68.TNumber;
|
|
60
|
-
mimeType: typebox68.TString;
|
|
61
|
-
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
62
|
-
checksum: typebox68.TOptional<typebox68.TString>;
|
|
16
|
+
declare const files: _alepha_postgres65.EntityDescriptor<typebox188.TObject<{
|
|
17
|
+
id: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TString, typeof _alepha_postgres65.PG_PRIMARY_KEY>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
18
|
+
version: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TInteger, typeof _alepha_postgres65.PG_VERSION>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
19
|
+
createdAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_CREATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
20
|
+
updatedAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_UPDATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
21
|
+
blobId: typebox188.TString;
|
|
22
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
23
|
+
creatorRealm: typebox188.TOptional<typebox188.TString>;
|
|
24
|
+
creatorName: typebox188.TOptional<typebox188.TString>;
|
|
25
|
+
bucket: typebox188.TString;
|
|
26
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
27
|
+
name: typebox188.TString;
|
|
28
|
+
size: typebox188.TNumber;
|
|
29
|
+
mimeType: typebox188.TString;
|
|
30
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
31
|
+
checksum: typebox188.TOptional<typebox188.TString>;
|
|
63
32
|
}>>;
|
|
64
|
-
type FileEntity = Static<typeof files
|
|
33
|
+
type FileEntity = Static<typeof files.schema>;
|
|
65
34
|
//#endregion
|
|
66
35
|
//#region src/schemas/fileQuerySchema.d.ts
|
|
67
|
-
declare const fileQuerySchema:
|
|
68
|
-
page:
|
|
69
|
-
size:
|
|
70
|
-
sort:
|
|
71
|
-
bucket:
|
|
72
|
-
tags:
|
|
73
|
-
name:
|
|
74
|
-
mimeType:
|
|
75
|
-
creator:
|
|
76
|
-
createdAfter:
|
|
77
|
-
createdBefore:
|
|
36
|
+
declare const fileQuerySchema: typebox188.TObject<{
|
|
37
|
+
page: typebox188.TOptional<typebox188.TInteger>;
|
|
38
|
+
size: typebox188.TOptional<typebox188.TInteger>;
|
|
39
|
+
sort: typebox188.TOptional<typebox188.TString>;
|
|
40
|
+
bucket: typebox188.TOptional<typebox188.TString>;
|
|
41
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
42
|
+
name: typebox188.TOptional<typebox188.TString>;
|
|
43
|
+
mimeType: typebox188.TOptional<typebox188.TString>;
|
|
44
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
45
|
+
createdAfter: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
46
|
+
createdBefore: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
78
47
|
}>;
|
|
79
48
|
type FileQuery = Static<typeof fileQuerySchema>;
|
|
80
49
|
//#endregion
|
|
81
50
|
//#region src/schemas/fileResourceSchema.d.ts
|
|
82
|
-
declare const fileResourceSchema:
|
|
83
|
-
id:
|
|
84
|
-
version:
|
|
85
|
-
createdAt:
|
|
86
|
-
updatedAt:
|
|
87
|
-
blobId:
|
|
88
|
-
creator:
|
|
89
|
-
creatorRealm:
|
|
90
|
-
creatorName:
|
|
91
|
-
bucket:
|
|
92
|
-
expirationDate:
|
|
93
|
-
name:
|
|
94
|
-
size:
|
|
95
|
-
mimeType:
|
|
96
|
-
tags:
|
|
97
|
-
checksum:
|
|
51
|
+
declare const fileResourceSchema: typebox188.TObject<{
|
|
52
|
+
id: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TString, typeof _alepha_postgres65.PG_PRIMARY_KEY>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
53
|
+
version: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TInteger, typeof _alepha_postgres65.PG_VERSION>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
54
|
+
createdAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_CREATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
55
|
+
updatedAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_UPDATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
56
|
+
blobId: typebox188.TString;
|
|
57
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
58
|
+
creatorRealm: typebox188.TOptional<typebox188.TString>;
|
|
59
|
+
creatorName: typebox188.TOptional<typebox188.TString>;
|
|
60
|
+
bucket: typebox188.TString;
|
|
61
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
62
|
+
name: typebox188.TString;
|
|
63
|
+
size: typebox188.TNumber;
|
|
64
|
+
mimeType: typebox188.TString;
|
|
65
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
66
|
+
checksum: typebox188.TOptional<typebox188.TString>;
|
|
98
67
|
}>;
|
|
99
68
|
type FileResource = Static<typeof fileResourceSchema>;
|
|
100
69
|
//#endregion
|
|
101
70
|
//#region src/schemas/storageStatsSchema.d.ts
|
|
102
|
-
declare const bucketStatsSchema:
|
|
103
|
-
bucket:
|
|
104
|
-
totalSize:
|
|
105
|
-
fileCount:
|
|
71
|
+
declare const bucketStatsSchema: typebox188.TObject<{
|
|
72
|
+
bucket: typebox188.TString;
|
|
73
|
+
totalSize: typebox188.TNumber;
|
|
74
|
+
fileCount: typebox188.TNumber;
|
|
106
75
|
}>;
|
|
107
|
-
declare const mimeTypeStatsSchema:
|
|
108
|
-
mimeType:
|
|
109
|
-
fileCount:
|
|
76
|
+
declare const mimeTypeStatsSchema: typebox188.TObject<{
|
|
77
|
+
mimeType: typebox188.TString;
|
|
78
|
+
fileCount: typebox188.TNumber;
|
|
110
79
|
}>;
|
|
111
|
-
declare const storageStatsSchema:
|
|
112
|
-
totalSize:
|
|
113
|
-
totalFiles:
|
|
114
|
-
byBucket:
|
|
115
|
-
bucket:
|
|
116
|
-
totalSize:
|
|
117
|
-
fileCount:
|
|
80
|
+
declare const storageStatsSchema: typebox188.TObject<{
|
|
81
|
+
totalSize: typebox188.TNumber;
|
|
82
|
+
totalFiles: typebox188.TNumber;
|
|
83
|
+
byBucket: typebox188.TArray<typebox188.TObject<{
|
|
84
|
+
bucket: typebox188.TString;
|
|
85
|
+
totalSize: typebox188.TNumber;
|
|
86
|
+
fileCount: typebox188.TNumber;
|
|
118
87
|
}>>;
|
|
119
|
-
byMimeType:
|
|
120
|
-
mimeType:
|
|
121
|
-
fileCount:
|
|
88
|
+
byMimeType: typebox188.TArray<typebox188.TObject<{
|
|
89
|
+
mimeType: typebox188.TString;
|
|
90
|
+
fileCount: typebox188.TNumber;
|
|
122
91
|
}>>;
|
|
123
92
|
}>;
|
|
124
93
|
type BucketStats = Static<typeof bucketStatsSchema>;
|
|
@@ -129,54 +98,22 @@ type StorageStats = Static<typeof storageStatsSchema>;
|
|
|
129
98
|
declare class FileService {
|
|
130
99
|
protected readonly alepha: Alepha;
|
|
131
100
|
protected readonly log: _alepha_logger0.Logger;
|
|
132
|
-
protected readonly fileRepository:
|
|
133
|
-
id:
|
|
134
|
-
version:
|
|
135
|
-
createdAt:
|
|
136
|
-
updatedAt:
|
|
137
|
-
blobId:
|
|
138
|
-
creator:
|
|
139
|
-
creatorRealm:
|
|
140
|
-
creatorName:
|
|
141
|
-
bucket:
|
|
142
|
-
expirationDate:
|
|
143
|
-
name:
|
|
144
|
-
size:
|
|
145
|
-
mimeType:
|
|
146
|
-
tags:
|
|
147
|
-
checksum:
|
|
148
|
-
}>, _alepha_postgres50.FromSchema<typebox68.TObject<{
|
|
149
|
-
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
150
|
-
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
151
|
-
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
152
|
-
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
153
|
-
blobId: typebox68.TString;
|
|
154
|
-
creator: typebox68.TOptional<typebox68.TString>;
|
|
155
|
-
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
156
|
-
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
157
|
-
bucket: typebox68.TString;
|
|
158
|
-
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
159
|
-
name: typebox68.TString;
|
|
160
|
-
size: typebox68.TNumber;
|
|
161
|
-
mimeType: typebox68.TString;
|
|
162
|
-
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
163
|
-
checksum: typebox68.TOptional<typebox68.TString>;
|
|
164
|
-
}>>>, typebox68.TObject<{
|
|
165
|
-
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
166
|
-
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
167
|
-
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
168
|
-
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
169
|
-
blobId: typebox68.TString;
|
|
170
|
-
creator: typebox68.TOptional<typebox68.TString>;
|
|
171
|
-
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
172
|
-
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
173
|
-
bucket: typebox68.TString;
|
|
174
|
-
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
175
|
-
name: typebox68.TString;
|
|
176
|
-
size: typebox68.TNumber;
|
|
177
|
-
mimeType: typebox68.TString;
|
|
178
|
-
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
179
|
-
checksum: typebox68.TOptional<typebox68.TString>;
|
|
101
|
+
protected readonly fileRepository: _alepha_postgres65.RepositoryDescriptor<typebox188.TObject<{
|
|
102
|
+
id: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TString, typeof _alepha_postgres65.PG_PRIMARY_KEY>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
103
|
+
version: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TInteger, typeof _alepha_postgres65.PG_VERSION>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
104
|
+
createdAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_CREATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
105
|
+
updatedAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_UPDATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
106
|
+
blobId: typebox188.TString;
|
|
107
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
108
|
+
creatorRealm: typebox188.TOptional<typebox188.TString>;
|
|
109
|
+
creatorName: typebox188.TOptional<typebox188.TString>;
|
|
110
|
+
bucket: typebox188.TString;
|
|
111
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
112
|
+
name: typebox188.TString;
|
|
113
|
+
size: typebox188.TNumber;
|
|
114
|
+
mimeType: typebox188.TString;
|
|
115
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
116
|
+
checksum: typebox188.TOptional<typebox188.TString>;
|
|
180
117
|
}>>;
|
|
181
118
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
182
119
|
protected readonly defaultBucket: BucketDescriptor;
|
|
@@ -217,10 +154,10 @@ declare class FileService {
|
|
|
217
154
|
* Calculates an expiration date based on a TTL (time to live) duration.
|
|
218
155
|
*
|
|
219
156
|
* @param ttl - Duration like "1 day", "2 hours", etc.
|
|
220
|
-
* @returns
|
|
157
|
+
* @returns DateTime representation of the expiration date, or undefined if no TTL provided
|
|
221
158
|
* @protected
|
|
222
159
|
*/
|
|
223
|
-
protected getExpirationDate(ttl?: DurationLike):
|
|
160
|
+
protected getExpirationDate(ttl?: DurationLike): DateTime | undefined;
|
|
224
161
|
/**
|
|
225
162
|
* Uploads a file to a bucket and creates a database record with metadata.
|
|
226
163
|
* Automatically calculates and stores the file checksum (SHA-256).
|
|
@@ -235,7 +172,7 @@ declare class FileService {
|
|
|
235
172
|
* @throws {NotFoundError} If the specified bucket doesn't exist
|
|
236
173
|
*/
|
|
237
174
|
uploadFile(file: FileLike, options?: {
|
|
238
|
-
expirationDate?: string |
|
|
175
|
+
expirationDate?: string | DateTime;
|
|
239
176
|
bucket?: string;
|
|
240
177
|
user?: UserAccountToken;
|
|
241
178
|
tags?: string[];
|
|
@@ -264,7 +201,7 @@ declare class FileService {
|
|
|
264
201
|
updateFile(id: string, data: {
|
|
265
202
|
name?: string;
|
|
266
203
|
tags?: string[];
|
|
267
|
-
expirationDate?:
|
|
204
|
+
expirationDate?: DateTime;
|
|
268
205
|
}): Promise<FileEntity>;
|
|
269
206
|
/**
|
|
270
207
|
* Deletes a file from both storage and database.
|
|
@@ -315,34 +252,34 @@ declare class FileController {
|
|
|
315
252
|
* Supports filtering by bucket and tags.
|
|
316
253
|
*/
|
|
317
254
|
readonly findFiles: _alepha_server0.ActionDescriptorFn<{
|
|
318
|
-
query:
|
|
319
|
-
page:
|
|
320
|
-
size:
|
|
321
|
-
sort:
|
|
322
|
-
bucket:
|
|
323
|
-
tags:
|
|
324
|
-
name:
|
|
325
|
-
mimeType:
|
|
326
|
-
creator:
|
|
327
|
-
createdAfter:
|
|
328
|
-
createdBefore:
|
|
255
|
+
query: typebox188.TObject<{
|
|
256
|
+
page: typebox188.TOptional<typebox188.TInteger>;
|
|
257
|
+
size: typebox188.TOptional<typebox188.TInteger>;
|
|
258
|
+
sort: typebox188.TOptional<typebox188.TString>;
|
|
259
|
+
bucket: typebox188.TOptional<typebox188.TString>;
|
|
260
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
261
|
+
name: typebox188.TOptional<typebox188.TString>;
|
|
262
|
+
mimeType: typebox188.TOptional<typebox188.TString>;
|
|
263
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
264
|
+
createdAfter: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
265
|
+
createdBefore: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
329
266
|
}>;
|
|
330
|
-
response:
|
|
331
|
-
id:
|
|
332
|
-
version:
|
|
333
|
-
createdAt:
|
|
334
|
-
updatedAt:
|
|
335
|
-
blobId:
|
|
336
|
-
creator:
|
|
337
|
-
creatorRealm:
|
|
338
|
-
creatorName:
|
|
339
|
-
bucket:
|
|
340
|
-
expirationDate:
|
|
341
|
-
name:
|
|
342
|
-
size:
|
|
343
|
-
mimeType:
|
|
344
|
-
tags:
|
|
345
|
-
checksum:
|
|
267
|
+
response: _alepha_postgres65.TPage<typebox188.TObject<{
|
|
268
|
+
id: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TString, typeof _alepha_postgres65.PG_PRIMARY_KEY>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
269
|
+
version: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TInteger, typeof _alepha_postgres65.PG_VERSION>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
270
|
+
createdAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_CREATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
271
|
+
updatedAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_UPDATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
272
|
+
blobId: typebox188.TString;
|
|
273
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
274
|
+
creatorRealm: typebox188.TOptional<typebox188.TString>;
|
|
275
|
+
creatorName: typebox188.TOptional<typebox188.TString>;
|
|
276
|
+
bucket: typebox188.TString;
|
|
277
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
278
|
+
name: typebox188.TString;
|
|
279
|
+
size: typebox188.TNumber;
|
|
280
|
+
mimeType: typebox188.TString;
|
|
281
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
282
|
+
checksum: typebox188.TOptional<typebox188.TString>;
|
|
346
283
|
}>>;
|
|
347
284
|
}>;
|
|
348
285
|
/**
|
|
@@ -350,13 +287,13 @@ declare class FileController {
|
|
|
350
287
|
* Removes the file from the bucket and cleans up the database record.
|
|
351
288
|
*/
|
|
352
289
|
readonly deleteFile: _alepha_server0.ActionDescriptorFn<{
|
|
353
|
-
params:
|
|
354
|
-
id:
|
|
290
|
+
params: typebox188.TObject<{
|
|
291
|
+
id: typebox188.TString;
|
|
355
292
|
}>;
|
|
356
|
-
response:
|
|
357
|
-
ok:
|
|
358
|
-
id:
|
|
359
|
-
count:
|
|
293
|
+
response: typebox188.TObject<{
|
|
294
|
+
ok: typebox188.TBoolean;
|
|
295
|
+
id: typebox188.TOptional<typebox188.TUnion<[typebox188.TString, typebox188.TInteger]>>;
|
|
296
|
+
count: typebox188.TOptional<typebox188.TNumber>;
|
|
360
297
|
}>;
|
|
361
298
|
}>;
|
|
362
299
|
/**
|
|
@@ -365,29 +302,29 @@ declare class FileController {
|
|
|
365
302
|
* Optionally specify bucket and expiration date.
|
|
366
303
|
*/
|
|
367
304
|
readonly uploadFile: _alepha_server0.ActionDescriptorFn<{
|
|
368
|
-
body:
|
|
305
|
+
body: typebox188.TObject<{
|
|
369
306
|
file: _alepha_core1.TFile;
|
|
370
307
|
}>;
|
|
371
|
-
query:
|
|
372
|
-
expirationDate:
|
|
373
|
-
bucket:
|
|
308
|
+
query: typebox188.TObject<{
|
|
309
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
310
|
+
bucket: typebox188.TOptional<typebox188.TString>;
|
|
374
311
|
}>;
|
|
375
|
-
response:
|
|
376
|
-
id:
|
|
377
|
-
version:
|
|
378
|
-
createdAt:
|
|
379
|
-
updatedAt:
|
|
380
|
-
blobId:
|
|
381
|
-
creator:
|
|
382
|
-
creatorRealm:
|
|
383
|
-
creatorName:
|
|
384
|
-
bucket:
|
|
385
|
-
expirationDate:
|
|
386
|
-
name:
|
|
387
|
-
size:
|
|
388
|
-
mimeType:
|
|
389
|
-
tags:
|
|
390
|
-
checksum:
|
|
312
|
+
response: typebox188.TObject<{
|
|
313
|
+
id: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TString, typeof _alepha_postgres65.PG_PRIMARY_KEY>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
314
|
+
version: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TInteger, typeof _alepha_postgres65.PG_VERSION>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
315
|
+
createdAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_CREATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
316
|
+
updatedAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_UPDATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
317
|
+
blobId: typebox188.TString;
|
|
318
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
319
|
+
creatorRealm: typebox188.TOptional<typebox188.TString>;
|
|
320
|
+
creatorName: typebox188.TOptional<typebox188.TString>;
|
|
321
|
+
bucket: typebox188.TString;
|
|
322
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
323
|
+
name: typebox188.TString;
|
|
324
|
+
size: typebox188.TNumber;
|
|
325
|
+
mimeType: typebox188.TString;
|
|
326
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
327
|
+
checksum: typebox188.TOptional<typebox188.TString>;
|
|
391
328
|
}>;
|
|
392
329
|
}>;
|
|
393
330
|
/**
|
|
@@ -395,30 +332,30 @@ declare class FileController {
|
|
|
395
332
|
* Allows updating name, tags, and expiration date without modifying file content.
|
|
396
333
|
*/
|
|
397
334
|
readonly updateFile: _alepha_server0.ActionDescriptorFn<{
|
|
398
|
-
params:
|
|
399
|
-
id:
|
|
335
|
+
params: typebox188.TObject<{
|
|
336
|
+
id: typebox188.TString;
|
|
400
337
|
}>;
|
|
401
|
-
body:
|
|
402
|
-
name:
|
|
403
|
-
tags:
|
|
404
|
-
expirationDate:
|
|
338
|
+
body: typebox188.TObject<{
|
|
339
|
+
name: typebox188.TOptional<typebox188.TString>;
|
|
340
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
341
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
405
342
|
}>;
|
|
406
|
-
response:
|
|
407
|
-
id:
|
|
408
|
-
version:
|
|
409
|
-
createdAt:
|
|
410
|
-
updatedAt:
|
|
411
|
-
blobId:
|
|
412
|
-
creator:
|
|
413
|
-
creatorRealm:
|
|
414
|
-
creatorName:
|
|
415
|
-
bucket:
|
|
416
|
-
expirationDate:
|
|
417
|
-
name:
|
|
418
|
-
size:
|
|
419
|
-
mimeType:
|
|
420
|
-
tags:
|
|
421
|
-
checksum:
|
|
343
|
+
response: typebox188.TObject<{
|
|
344
|
+
id: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TString, typeof _alepha_postgres65.PG_PRIMARY_KEY>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
345
|
+
version: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TInteger, typeof _alepha_postgres65.PG_VERSION>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
346
|
+
createdAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_CREATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
347
|
+
updatedAt: _alepha_postgres65.PgAttr<_alepha_postgres65.PgAttr<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>, typeof _alepha_postgres65.PG_UPDATED_AT>, typeof _alepha_postgres65.PG_DEFAULT>;
|
|
348
|
+
blobId: typebox188.TString;
|
|
349
|
+
creator: typebox188.TOptional<typebox188.TString>;
|
|
350
|
+
creatorRealm: typebox188.TOptional<typebox188.TString>;
|
|
351
|
+
creatorName: typebox188.TOptional<typebox188.TString>;
|
|
352
|
+
bucket: typebox188.TString;
|
|
353
|
+
expirationDate: typebox188.TOptional<typebox188.TCodec<typebox188.TString, dayjs15.Dayjs>>;
|
|
354
|
+
name: typebox188.TString;
|
|
355
|
+
size: typebox188.TNumber;
|
|
356
|
+
mimeType: typebox188.TString;
|
|
357
|
+
tags: typebox188.TOptional<typebox188.TArray<typebox188.TString>>;
|
|
358
|
+
checksum: typebox188.TOptional<typebox188.TString>;
|
|
422
359
|
}>;
|
|
423
360
|
}>;
|
|
424
361
|
/**
|
|
@@ -427,8 +364,8 @@ declare class FileController {
|
|
|
427
364
|
* Cached with ETag support for 1 year (immutable).
|
|
428
365
|
*/
|
|
429
366
|
readonly streamFile: _alepha_server0.ActionDescriptorFn<{
|
|
430
|
-
params:
|
|
431
|
-
id:
|
|
367
|
+
params: typebox188.TObject<{
|
|
368
|
+
id: typebox188.TString;
|
|
432
369
|
}>;
|
|
433
370
|
response: _alepha_core1.TFile;
|
|
434
371
|
}>;
|
|
@@ -449,17 +386,17 @@ declare class StorageStatsController {
|
|
|
449
386
|
* and breakdowns by bucket and MIME type.
|
|
450
387
|
*/
|
|
451
388
|
readonly getStats: _alepha_server0.ActionDescriptorFn<{
|
|
452
|
-
response:
|
|
453
|
-
totalSize:
|
|
454
|
-
totalFiles:
|
|
455
|
-
byBucket:
|
|
456
|
-
bucket:
|
|
457
|
-
totalSize:
|
|
458
|
-
fileCount:
|
|
389
|
+
response: typebox188.TObject<{
|
|
390
|
+
totalSize: typebox188.TNumber;
|
|
391
|
+
totalFiles: typebox188.TNumber;
|
|
392
|
+
byBucket: typebox188.TArray<typebox188.TObject<{
|
|
393
|
+
bucket: typebox188.TString;
|
|
394
|
+
totalSize: typebox188.TNumber;
|
|
395
|
+
fileCount: typebox188.TNumber;
|
|
459
396
|
}>>;
|
|
460
|
-
byMimeType:
|
|
461
|
-
mimeType:
|
|
462
|
-
fileCount:
|
|
397
|
+
byMimeType: typebox188.TArray<typebox188.TObject<{
|
|
398
|
+
mimeType: typebox188.TString;
|
|
399
|
+
fileCount: typebox188.TNumber;
|
|
463
400
|
}>>;
|
|
464
401
|
}>;
|
|
465
402
|
}>;
|