@sylphx/contract 0.3.0 → 0.4.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/CHANGELOG.md +6 -0
- package/dist/endpoints/auth.d.ts +41 -0
- package/dist/endpoints/auth.d.ts.map +1 -1
- package/dist/endpoints/auth.js +8 -1
- package/dist/endpoints/storage.d.ts +183 -125
- package/dist/endpoints/storage.d.ts.map +1 -1
- package/dist/endpoints/storage.js +96 -59
- package/dist/index.d.ts +219 -114
- package/dist/index.d.ts.map +1 -1
- package/dist/schemas/auth.d.ts +54 -0
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/auth.js +22 -0
- package/dist/schemas/storage.d.ts +259 -198
- package/dist/schemas/storage.d.ts.map +1 -1
- package/dist/schemas/storage.js +159 -140
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sylphx/contract
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#469](https://github.com/SylphxAI/platform/pull/469) [`ba02c04`](https://github.com/SylphxAI/platform/commit/ba02c0412712dc8a5f19d17c16707eb5ae11ec47) Thanks [@shtse8](https://github.com/shtse8)! - Replace the legacy storage upload-token surface with ADR-100 storage uploads v2: upload sessions, multipart resume, file actions, soft-delete/restore, signed URLs, copy, and version restore are now contract-first with no legacy alias envelopes.
|
|
8
|
+
|
|
3
9
|
## 0.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/endpoints/auth.d.ts
CHANGED
|
@@ -47,6 +47,47 @@ export declare const authEndpoints: {
|
|
|
47
47
|
emailVerified: typeof Schema.Boolean;
|
|
48
48
|
}>>;
|
|
49
49
|
}>>;
|
|
50
|
+
readonly getPrincipal: import("../endpoint.js").Endpoint<"GET", "/auth/principal", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Union<[Schema.Struct<{
|
|
51
|
+
principalType: Schema.Literal<["user"]>;
|
|
52
|
+
user: Schema.Struct<{
|
|
53
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "UserId">;
|
|
54
|
+
email: typeof Schema.String;
|
|
55
|
+
name: Schema.NullOr<typeof Schema.String>;
|
|
56
|
+
}>;
|
|
57
|
+
orgs: Schema.Array$<Schema.Struct<{
|
|
58
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "OrgId">;
|
|
59
|
+
slug: typeof Schema.String;
|
|
60
|
+
name: typeof Schema.String;
|
|
61
|
+
email: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
62
|
+
billingEmail: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
63
|
+
logoUrl: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
64
|
+
metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
65
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
66
|
+
}>>;
|
|
67
|
+
}>, Schema.Struct<{
|
|
68
|
+
principalType: Schema.Literal<["service_token"]>;
|
|
69
|
+
serviceToken: Schema.Struct<{
|
|
70
|
+
id: typeof Schema.String;
|
|
71
|
+
name: typeof Schema.String;
|
|
72
|
+
tokenType: Schema.Literal<["service", "oidc"]>;
|
|
73
|
+
tokenPrefix: Schema.NullOr<typeof Schema.String>;
|
|
74
|
+
orgId: typeof Schema.String;
|
|
75
|
+
projectId: Schema.NullOr<typeof Schema.String>;
|
|
76
|
+
environmentId: Schema.NullOr<typeof Schema.String>;
|
|
77
|
+
scopes: Schema.Array$<typeof Schema.String>;
|
|
78
|
+
expiresAt: Schema.NullOr<typeof Schema.String>;
|
|
79
|
+
}>;
|
|
80
|
+
org: Schema.Struct<{
|
|
81
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "OrgId">;
|
|
82
|
+
slug: typeof Schema.String;
|
|
83
|
+
name: typeof Schema.String;
|
|
84
|
+
email: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
85
|
+
billingEmail: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
86
|
+
logoUrl: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
87
|
+
metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
88
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
89
|
+
}>;
|
|
90
|
+
}>]>>;
|
|
50
91
|
readonly deviceInit: import("../endpoint.js").Endpoint<"POST", "/auth/device", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
51
92
|
client_id: typeof Schema.String;
|
|
52
93
|
scope: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/endpoints/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/endpoints/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAuC/B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2NhB,CAAA"}
|
package/dist/endpoints/auth.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { Schema } from 'effect';
|
|
11
11
|
import { defineEndpoint } from '../endpoint.js';
|
|
12
|
-
import { AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitRequest, DeviceInitResponse, DevicePollResponse, OAuthIntrospectRequest, OAuthIntrospectResponse, OAuthRevokeRequest, OAuthRevokeResponse, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeResponse, PlatformSessionsListResponse, ResendEmailVerificationRequest, ResendEmailVerificationResponse, SessionResult, SignInInput, SignInResult, SignUpInput, SignUpResult, } from '../schemas/auth.js';
|
|
12
|
+
import { AuthenticatedPrincipal, AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitRequest, DeviceInitResponse, DevicePollResponse, OAuthIntrospectRequest, OAuthIntrospectResponse, OAuthRevokeRequest, OAuthRevokeResponse, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeResponse, PlatformSessionsListResponse, ResendEmailVerificationRequest, ResendEmailVerificationResponse, SessionResult, SignInInput, SignInResult, SignUpInput, SignUpResult, } from '../schemas/auth.js';
|
|
13
13
|
export const authEndpoints = {
|
|
14
14
|
signIn: defineEndpoint({
|
|
15
15
|
method: 'POST',
|
|
@@ -52,6 +52,13 @@ export const authEndpoints = {
|
|
|
52
52
|
summary: 'Get the current authenticated session (null when absent)',
|
|
53
53
|
tags: ['auth'],
|
|
54
54
|
}),
|
|
55
|
+
getPrincipal: defineEndpoint({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
path: '/auth/principal',
|
|
58
|
+
response: AuthenticatedPrincipal,
|
|
59
|
+
summary: 'Get the current authenticated user or service-token principal',
|
|
60
|
+
tags: ['auth', 'principal'],
|
|
61
|
+
}),
|
|
55
62
|
deviceInit: defineEndpoint({
|
|
56
63
|
method: 'POST',
|
|
57
64
|
path: '/auth/device',
|
|
@@ -1,165 +1,223 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Storage endpoints — BaaS plane.
|
|
2
|
+
* Storage endpoints — BaaS plane. Per ADR-100.
|
|
3
|
+
*
|
|
4
|
+
* One resource (`uploads`) for upload sessions, one resource (`files`) for
|
|
5
|
+
* everything else. Verb suffix `:action` on `files` follows Google AIP-136.
|
|
6
|
+
*
|
|
7
|
+
* No legacy aliases. No polymorphic POSTs. Mirrors `@sylphx/sdk/storage.ts`.
|
|
3
8
|
*/
|
|
4
9
|
import { Schema } from 'effect';
|
|
5
10
|
export declare const storageEndpoints: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
readonly upload: import("../endpoint.js").Endpoint<"POST", "/storage/upload", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
13
|
-
filename: typeof Schema.String;
|
|
14
|
-
contentType: Schema.optional<typeof Schema.String>;
|
|
15
|
-
size: Schema.optional<typeof Schema.Number>;
|
|
16
|
-
path: Schema.optional<typeof Schema.String>;
|
|
17
|
-
type: Schema.optional<Schema.Literal<["file", "avatar"]>>;
|
|
18
|
-
userId: Schema.optional<typeof Schema.String>;
|
|
11
|
+
readonly createUpload: import("../endpoint.js").Endpoint<"POST", "/storage/uploads", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
12
|
+
filename: Schema.filter<typeof Schema.String>;
|
|
13
|
+
contentType: Schema.filter<typeof Schema.String>;
|
|
14
|
+
size: Schema.filter<typeof Schema.Number>;
|
|
15
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
16
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
19
17
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
18
|
+
checksumSha256: Schema.optional<typeof Schema.String>;
|
|
19
|
+
ifNoneMatch: Schema.optional<Schema.Literal<["*"]>>;
|
|
20
|
+
}>, Schema.Union<[Schema.Struct<{
|
|
21
|
+
method: Schema.Literal<["PUT"]>;
|
|
22
|
+
uploadId: Schema.brand<typeof Schema.String, "UploadId">;
|
|
23
|
+
fileId: Schema.brand<typeof Schema.String, "FileId">;
|
|
24
|
+
url: typeof Schema.String;
|
|
25
|
+
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
26
|
+
expiresAt: typeof Schema.DateFromString;
|
|
27
|
+
}>, Schema.Struct<{
|
|
28
|
+
method: Schema.Literal<["MULTIPART"]>;
|
|
29
|
+
uploadId: Schema.brand<typeof Schema.String, "UploadId">;
|
|
30
|
+
fileId: Schema.brand<typeof Schema.String, "FileId">;
|
|
31
|
+
partSize: typeof Schema.Number;
|
|
32
|
+
partCount: typeof Schema.Number;
|
|
33
|
+
parts: Schema.Array$<Schema.Struct<{
|
|
34
|
+
partNumber: Schema.filter<typeof Schema.Number>;
|
|
35
|
+
url: typeof Schema.String;
|
|
36
|
+
expiresAt: typeof Schema.DateFromString;
|
|
37
|
+
}>>;
|
|
38
|
+
expiresAt: typeof Schema.DateFromString;
|
|
39
|
+
}>]>>;
|
|
40
|
+
readonly abortUpload: import("../endpoint.js").Endpoint<"DELETE", "/storage/uploads/:uploadId", Schema.Struct<{
|
|
41
|
+
uploadId: typeof Schema.String;
|
|
42
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{}>>;
|
|
43
|
+
readonly presignUploadPart: import("../endpoint.js").Endpoint<"POST", "/storage/uploads/:uploadId/parts/:partNumber", Schema.Struct<{
|
|
44
|
+
uploadId: typeof Schema.String;
|
|
45
|
+
partNumber: typeof Schema.NumberFromString;
|
|
46
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
47
|
+
url: typeof Schema.String;
|
|
48
|
+
expiresAt: typeof Schema.DateFromString;
|
|
49
|
+
}>>;
|
|
50
|
+
readonly completeUpload: import("../endpoint.js").Endpoint<"POST", "/storage/uploads/:uploadId:complete", Schema.Struct<{
|
|
51
|
+
uploadId: typeof Schema.String;
|
|
52
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
53
|
+
parts: Schema.Array$<Schema.Struct<{
|
|
54
|
+
partNumber: Schema.filter<typeof Schema.Number>;
|
|
55
|
+
etag: Schema.filter<typeof Schema.String>;
|
|
56
|
+
}>>;
|
|
20
57
|
}>, Schema.Struct<{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
storageKey: Schema.optional<typeof Schema.String>;
|
|
27
|
-
tokenPayload: Schema.optional<typeof Schema.String>;
|
|
28
|
-
url: Schema.optional<typeof Schema.String>;
|
|
29
|
-
uploadEndpoint: Schema.optional<typeof Schema.String>;
|
|
30
|
-
clientPayload: Schema.optional<typeof Schema.String>;
|
|
31
|
-
maxSize: Schema.optional<typeof Schema.Number>;
|
|
32
|
-
maxMultipartSize: Schema.optional<typeof Schema.Number>;
|
|
33
|
-
multipartThreshold: Schema.optional<typeof Schema.Number>;
|
|
34
|
-
allowedContentTypes: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
35
|
-
instructions: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
58
|
+
fileId: Schema.brand<typeof Schema.String, "FileId">;
|
|
59
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
60
|
+
size: typeof Schema.Number;
|
|
61
|
+
etag: typeof Schema.String;
|
|
62
|
+
checksumSha256: typeof Schema.String;
|
|
36
63
|
}>>;
|
|
37
|
-
readonly
|
|
64
|
+
readonly listFiles: import("../endpoint.js").Endpoint<"GET", "/storage/files", Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
65
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
66
|
+
cursor: Schema.optional<typeof Schema.String>;
|
|
67
|
+
limit: Schema.optional<typeof Schema.Number>;
|
|
68
|
+
includeDeleted: Schema.optional<typeof Schema.Boolean>;
|
|
69
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
70
|
+
files: Schema.Array$<Schema.Struct<{
|
|
71
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
72
|
+
filename: typeof Schema.String;
|
|
73
|
+
contentType: typeof Schema.String;
|
|
74
|
+
size: typeof Schema.Number;
|
|
75
|
+
checksumSha256: typeof Schema.String;
|
|
76
|
+
etag: typeof Schema.String;
|
|
77
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
78
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
79
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
80
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
81
|
+
isDeleted: typeof Schema.Boolean;
|
|
82
|
+
createdAt: typeof Schema.DateFromString;
|
|
83
|
+
updatedAt: typeof Schema.DateFromString;
|
|
84
|
+
}>>;
|
|
85
|
+
nextCursor: Schema.NullOr<typeof Schema.String>;
|
|
86
|
+
}>>;
|
|
87
|
+
readonly getFile: import("../endpoint.js").Endpoint<"GET", "/storage/files/:fileId", Schema.Struct<{
|
|
88
|
+
fileId: typeof Schema.String;
|
|
89
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
90
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
38
91
|
filename: typeof Schema.String;
|
|
39
92
|
contentType: typeof Schema.String;
|
|
40
|
-
size:
|
|
41
|
-
|
|
42
|
-
|
|
93
|
+
size: typeof Schema.Number;
|
|
94
|
+
checksumSha256: typeof Schema.String;
|
|
95
|
+
etag: typeof Schema.String;
|
|
96
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
97
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
98
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
99
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
100
|
+
isDeleted: typeof Schema.Boolean;
|
|
101
|
+
createdAt: typeof Schema.DateFromString;
|
|
102
|
+
updatedAt: typeof Schema.DateFromString;
|
|
103
|
+
}>>;
|
|
104
|
+
readonly deleteFile: import("../endpoint.js").Endpoint<"DELETE", "/storage/files/:fileId", Schema.Struct<{
|
|
43
105
|
fileId: typeof Schema.String;
|
|
44
|
-
|
|
106
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
107
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
108
|
+
isDeleted: Schema.Literal<[true]>;
|
|
109
|
+
}>>;
|
|
110
|
+
readonly restoreFile: import("../endpoint.js").Endpoint<"POST", "/storage/files/:fileId:restore", Schema.Struct<{
|
|
111
|
+
fileId: typeof Schema.String;
|
|
112
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
113
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
114
|
+
filename: typeof Schema.String;
|
|
115
|
+
contentType: typeof Schema.String;
|
|
116
|
+
size: typeof Schema.Number;
|
|
117
|
+
checksumSha256: typeof Schema.String;
|
|
118
|
+
etag: typeof Schema.String;
|
|
119
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
120
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
121
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
122
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
123
|
+
isDeleted: typeof Schema.Boolean;
|
|
124
|
+
createdAt: typeof Schema.DateFromString;
|
|
125
|
+
updatedAt: typeof Schema.DateFromString;
|
|
45
126
|
}>>;
|
|
46
|
-
|
|
47
|
-
* Generate a time-limited signed URL for accessing a private file.
|
|
48
|
-
* Signed URLs avoid exposing permanent credentials and can be scoped
|
|
49
|
-
* to a specific user via the `userId` field.
|
|
50
|
-
*/
|
|
51
|
-
readonly signedUrl: import("../endpoint.js").Endpoint<"POST", "/storage/signed-url", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
127
|
+
readonly signFileUrl: import("../endpoint.js").Endpoint<"POST", "/storage/files/:fileId:signedUrl", Schema.Struct<{
|
|
52
128
|
fileId: typeof Schema.String;
|
|
53
|
-
|
|
129
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
130
|
+
expiresIn: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
54
131
|
disposition: Schema.optional<Schema.Literal<["attachment", "inline"]>>;
|
|
55
132
|
userId: Schema.optional<typeof Schema.String>;
|
|
56
133
|
}>, Schema.Struct<{
|
|
57
134
|
url: typeof Schema.String;
|
|
58
|
-
expiresAt: typeof Schema.
|
|
135
|
+
expiresAt: typeof Schema.DateFromString;
|
|
59
136
|
file: Schema.Struct<{
|
|
60
|
-
id: typeof Schema.String
|
|
137
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
61
138
|
filename: typeof Schema.String;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
139
|
+
contentType: typeof Schema.String;
|
|
140
|
+
size: typeof Schema.Number;
|
|
141
|
+
checksumSha256: typeof Schema.String;
|
|
142
|
+
etag: typeof Schema.String;
|
|
143
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
144
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
145
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
146
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
147
|
+
isDeleted: typeof Schema.Boolean;
|
|
148
|
+
createdAt: typeof Schema.DateFromString;
|
|
149
|
+
updatedAt: typeof Schema.DateFromString;
|
|
65
150
|
}>;
|
|
66
151
|
}>>;
|
|
67
|
-
readonly
|
|
68
|
-
|
|
69
|
-
limit: Schema.optional<typeof Schema.String>;
|
|
70
|
-
cursor: Schema.optional<typeof Schema.String>;
|
|
152
|
+
readonly copyFile: import("../endpoint.js").Endpoint<"POST", "/storage/files/:fileId:copy", Schema.Struct<{
|
|
153
|
+
fileId: typeof Schema.String;
|
|
71
154
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
72
|
-
|
|
73
|
-
id: typeof Schema.String;
|
|
74
|
-
size: typeof Schema.Number;
|
|
75
|
-
name: Schema.optional<typeof Schema.String>;
|
|
76
|
-
filename: Schema.optional<typeof Schema.String>;
|
|
77
|
-
path: Schema.optional<typeof Schema.String>;
|
|
78
|
-
key: Schema.optional<typeof Schema.String>;
|
|
79
|
-
url: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
80
|
-
contentType: Schema.optional<typeof Schema.String>;
|
|
81
|
-
mimeType: Schema.optional<typeof Schema.String>;
|
|
82
|
-
isPrivate: Schema.optional<typeof Schema.Boolean>;
|
|
83
|
-
metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
84
|
-
createdAt: Schema.optional<typeof Schema.String>;
|
|
85
|
-
uploadedAt: Schema.optional<typeof Schema.String>;
|
|
86
|
-
}>>;
|
|
87
|
-
nextCursor: Schema.NullOr<typeof Schema.String>;
|
|
88
|
-
hasMore: Schema.optional<typeof Schema.Boolean>;
|
|
89
|
-
}>>;
|
|
90
|
-
readonly get: import("../endpoint.js").Endpoint<"GET", "/storage/files/:id", Schema.Struct<{
|
|
91
|
-
id: typeof Schema.String;
|
|
92
|
-
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
93
|
-
id: typeof Schema.String;
|
|
94
|
-
size: typeof Schema.Number;
|
|
95
|
-
name: Schema.optional<typeof Schema.String>;
|
|
155
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
96
156
|
filename: Schema.optional<typeof Schema.String>;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
157
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
158
|
+
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
159
|
+
}>, Schema.Struct<{
|
|
160
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
161
|
+
filename: typeof Schema.String;
|
|
162
|
+
contentType: typeof Schema.String;
|
|
163
|
+
size: typeof Schema.Number;
|
|
164
|
+
checksumSha256: typeof Schema.String;
|
|
165
|
+
etag: typeof Schema.String;
|
|
166
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
167
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
168
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
169
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
170
|
+
isDeleted: typeof Schema.Boolean;
|
|
171
|
+
createdAt: typeof Schema.DateFromString;
|
|
172
|
+
updatedAt: typeof Schema.DateFromString;
|
|
111
173
|
}>>;
|
|
112
|
-
readonly
|
|
113
|
-
|
|
174
|
+
readonly listFileVersions: import("../endpoint.js").Endpoint<"GET", "/storage/files/:fileId/versions", Schema.Struct<{
|
|
175
|
+
fileId: typeof Schema.String;
|
|
114
176
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
115
177
|
versions: Schema.Array$<Schema.Struct<{
|
|
116
|
-
id: typeof Schema.String
|
|
117
|
-
fileId: typeof Schema.String
|
|
178
|
+
id: Schema.brand<typeof Schema.String, "FileVersionId">;
|
|
179
|
+
fileId: Schema.brand<typeof Schema.String, "FileId">;
|
|
118
180
|
versionNumber: typeof Schema.Number;
|
|
119
|
-
|
|
120
|
-
contentType:
|
|
121
|
-
checksumSha256:
|
|
122
|
-
|
|
181
|
+
size: typeof Schema.Number;
|
|
182
|
+
contentType: typeof Schema.String;
|
|
183
|
+
checksumSha256: typeof Schema.String;
|
|
184
|
+
etag: typeof Schema.String;
|
|
185
|
+
createdAt: typeof Schema.DateFromString;
|
|
123
186
|
createdBy: Schema.NullOr<typeof Schema.String>;
|
|
124
187
|
isCurrent: typeof Schema.Boolean;
|
|
125
188
|
}>>;
|
|
126
189
|
}>>;
|
|
127
|
-
readonly
|
|
128
|
-
|
|
190
|
+
readonly restoreFileVersion: import("../endpoint.js").Endpoint<"POST", "/storage/files/:fileId/versions/:versionId:restore", Schema.Struct<{
|
|
191
|
+
fileId: typeof Schema.String;
|
|
129
192
|
versionId: typeof Schema.String;
|
|
130
193
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
131
|
-
|
|
194
|
+
file: Schema.Struct<{
|
|
195
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
196
|
+
filename: typeof Schema.String;
|
|
197
|
+
contentType: typeof Schema.String;
|
|
198
|
+
size: typeof Schema.Number;
|
|
199
|
+
checksumSha256: typeof Schema.String;
|
|
200
|
+
etag: typeof Schema.String;
|
|
201
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
202
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
203
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
204
|
+
url: Schema.NullOr<typeof Schema.String>;
|
|
205
|
+
isDeleted: typeof Schema.Boolean;
|
|
206
|
+
createdAt: typeof Schema.DateFromString;
|
|
207
|
+
updatedAt: typeof Schema.DateFromString;
|
|
208
|
+
}>;
|
|
132
209
|
version: Schema.Struct<{
|
|
133
|
-
id: typeof Schema.String
|
|
134
|
-
fileId: typeof Schema.String
|
|
210
|
+
id: Schema.brand<typeof Schema.String, "FileVersionId">;
|
|
211
|
+
fileId: Schema.brand<typeof Schema.String, "FileId">;
|
|
135
212
|
versionNumber: typeof Schema.Number;
|
|
136
|
-
|
|
137
|
-
contentType:
|
|
138
|
-
checksumSha256:
|
|
139
|
-
|
|
213
|
+
size: typeof Schema.Number;
|
|
214
|
+
contentType: typeof Schema.String;
|
|
215
|
+
checksumSha256: typeof Schema.String;
|
|
216
|
+
etag: typeof Schema.String;
|
|
217
|
+
createdAt: typeof Schema.DateFromString;
|
|
140
218
|
createdBy: Schema.NullOr<typeof Schema.String>;
|
|
141
219
|
isCurrent: typeof Schema.Boolean;
|
|
142
220
|
}>;
|
|
143
221
|
}>>;
|
|
144
|
-
readonly restoreFile: import("../endpoint.js").Endpoint<"POST", "/storage/files/:id/restore", Schema.Struct<{
|
|
145
|
-
id: typeof Schema.String;
|
|
146
|
-
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
147
|
-
success: Schema.Literal<[true]>;
|
|
148
|
-
file: Schema.Struct<{
|
|
149
|
-
id: typeof Schema.String;
|
|
150
|
-
size: typeof Schema.Number;
|
|
151
|
-
name: Schema.optional<typeof Schema.String>;
|
|
152
|
-
filename: Schema.optional<typeof Schema.String>;
|
|
153
|
-
path: Schema.optional<typeof Schema.String>;
|
|
154
|
-
key: Schema.optional<typeof Schema.String>;
|
|
155
|
-
url: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
156
|
-
contentType: Schema.optional<typeof Schema.String>;
|
|
157
|
-
mimeType: Schema.optional<typeof Schema.String>;
|
|
158
|
-
isPrivate: Schema.optional<typeof Schema.Boolean>;
|
|
159
|
-
metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
160
|
-
createdAt: Schema.optional<typeof Schema.String>;
|
|
161
|
-
uploadedAt: Schema.optional<typeof Schema.String>;
|
|
162
|
-
}>;
|
|
163
|
-
}>>;
|
|
164
222
|
};
|
|
165
223
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/endpoints/storage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/endpoints/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAgC/B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwInB,CAAA"}
|