@voltro/plugin-storage 0.1.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 +52 -0
- package/LICENSE +57 -0
- package/README.md +26 -0
- package/SECURITY.md +56 -0
- package/THIRD-PARTY-NOTICES.md +11075 -0
- package/dist/index.d.ts +1255 -0
- package/dist/index.js +2806 -0
- package/dist/rpc.d.ts +272 -0
- package/dist/rpc.js +365 -0
- package/dist/types.d.ts +646 -0
- package/dist/types.js +16 -0
- package/package.json +62 -0
package/dist/rpc.d.ts
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { ActionProcedureDescriptor } from '@voltro/protocol';
|
|
2
|
+
import { MutationProcedureDescriptor } from '@voltro/protocol';
|
|
3
|
+
import { PluginRpcClientDescriptor } from '@voltro/protocol';
|
|
4
|
+
import { QueryProcedureDescriptor } from '@voltro/protocol';
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
|
|
7
|
+
export declare const abortMultipartUploadDescriptor: ActionProcedureDescriptor<"storage.abortMultipartUpload", Schema.Struct<{
|
|
8
|
+
multipartToken: typeof Schema.String;
|
|
9
|
+
}>, Schema.Struct<{
|
|
10
|
+
ok: typeof Schema.Boolean;
|
|
11
|
+
}>, typeof StorageError>;
|
|
12
|
+
|
|
13
|
+
export declare const beginMultipartUploadDescriptor: ActionProcedureDescriptor<"storage.beginMultipartUpload", Schema.Struct<{
|
|
14
|
+
contentType: typeof Schema.String;
|
|
15
|
+
size: typeof Schema.Number;
|
|
16
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
17
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
18
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
19
|
+
alt: Schema.optional<typeof Schema.String>;
|
|
20
|
+
caption: Schema.optional<typeof Schema.String>;
|
|
21
|
+
partSize: Schema.optional<typeof Schema.Number>;
|
|
22
|
+
expiresInSec: Schema.optional<typeof Schema.Number>;
|
|
23
|
+
}>, Schema.Struct<{
|
|
24
|
+
multipartToken: typeof Schema.String;
|
|
25
|
+
partSize: typeof Schema.Number;
|
|
26
|
+
expiresInSec: typeof Schema.Number;
|
|
27
|
+
}>, typeof StorageError>;
|
|
28
|
+
|
|
29
|
+
export declare const beginResumableUploadDescriptor: ActionProcedureDescriptor<"storage.beginResumableUpload", Schema.Struct<{
|
|
30
|
+
contentType: typeof Schema.String;
|
|
31
|
+
size: typeof Schema.Number;
|
|
32
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
33
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
34
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
35
|
+
alt: Schema.optional<typeof Schema.String>;
|
|
36
|
+
caption: Schema.optional<typeof Schema.String>;
|
|
37
|
+
chunkSize: Schema.optional<typeof Schema.Number>;
|
|
38
|
+
expiresInSec: Schema.optional<typeof Schema.Number>;
|
|
39
|
+
}>, Schema.Struct<{
|
|
40
|
+
uploadId: typeof Schema.String;
|
|
41
|
+
resumableToken: typeof Schema.String;
|
|
42
|
+
uploadUrl: typeof Schema.String;
|
|
43
|
+
chunkSize: typeof Schema.Number;
|
|
44
|
+
expiresInSec: typeof Schema.Number;
|
|
45
|
+
}>, typeof StorageError>;
|
|
46
|
+
|
|
47
|
+
export declare const completeMultipartUploadDescriptor: ActionProcedureDescriptor<"storage.completeMultipartUpload", Schema.Struct<{
|
|
48
|
+
multipartToken: typeof Schema.String;
|
|
49
|
+
parts: Schema.Array$<Schema.Struct<{
|
|
50
|
+
partNumber: typeof Schema.Number;
|
|
51
|
+
etag: typeof Schema.String;
|
|
52
|
+
}>>;
|
|
53
|
+
}>, Schema.Struct<{
|
|
54
|
+
id: typeof Schema.String;
|
|
55
|
+
url: typeof Schema.String;
|
|
56
|
+
size: typeof Schema.Number;
|
|
57
|
+
}>, Schema.Union<[typeof StorageError, typeof StorageRejected]>>;
|
|
58
|
+
|
|
59
|
+
export declare const finalizeUploadDescriptor: ActionProcedureDescriptor<"storage.finalizeUpload", Schema.Struct<{
|
|
60
|
+
finalizeToken: typeof Schema.String;
|
|
61
|
+
}>, Schema.Struct<{
|
|
62
|
+
id: typeof Schema.String;
|
|
63
|
+
url: typeof Schema.String;
|
|
64
|
+
contentType: typeof Schema.String;
|
|
65
|
+
size: typeof Schema.Number;
|
|
66
|
+
width: Schema.optional<typeof Schema.Number>;
|
|
67
|
+
height: Schema.optional<typeof Schema.Number>;
|
|
68
|
+
}>, Schema.Union<[typeof StorageError, typeof StorageRejected, typeof StorageScanRejected]>>;
|
|
69
|
+
|
|
70
|
+
export declare const ingestUrlDescriptor: ActionProcedureDescriptor<"storage.ingestUrl", Schema.Struct<{
|
|
71
|
+
url: typeof Schema.String;
|
|
72
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
73
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
74
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
75
|
+
alt: Schema.optional<typeof Schema.String>;
|
|
76
|
+
caption: Schema.optional<typeof Schema.String>;
|
|
77
|
+
key: Schema.optional<typeof Schema.String>;
|
|
78
|
+
}>, Schema.Struct<{
|
|
79
|
+
id: typeof Schema.String;
|
|
80
|
+
url: typeof Schema.String;
|
|
81
|
+
}>, Schema.Union<[typeof StorageError, typeof StorageRejected, typeof StorageScanRejected]>>;
|
|
82
|
+
|
|
83
|
+
export declare const listGrantsDescriptor: QueryProcedureDescriptor<"storage.listGrants", Schema.Struct<{
|
|
84
|
+
refId: typeof Schema.String;
|
|
85
|
+
}>, Schema.Struct<{
|
|
86
|
+
grants: Schema.Array$<Schema.Struct<{
|
|
87
|
+
id: typeof Schema.String;
|
|
88
|
+
refId: typeof Schema.String;
|
|
89
|
+
principalType: Schema.Literal<["user", "group", "apiKey"]>;
|
|
90
|
+
principalId: typeof Schema.String;
|
|
91
|
+
permission: Schema.Literal<["read", "write"]>;
|
|
92
|
+
createdAt: typeof Schema.String;
|
|
93
|
+
expiresAt: Schema.NullOr<typeof Schema.String>;
|
|
94
|
+
createdBy: Schema.NullOr<typeof Schema.String>;
|
|
95
|
+
}>>;
|
|
96
|
+
}>, typeof StorageError>;
|
|
97
|
+
|
|
98
|
+
/** Browse / search the stored refs by folder-prefix / tags / ownerId, paged.
|
|
99
|
+
* The media-library / file-manager read (F6). Tenant is taken from the caller
|
|
100
|
+
* subject server-side — a client can't list another tenant's objects. */
|
|
101
|
+
export declare const listRefsDescriptor: QueryProcedureDescriptor<"storage.listRefs", Schema.Struct<{
|
|
102
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
103
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
104
|
+
ownerId: Schema.optional<typeof Schema.String>;
|
|
105
|
+
includeDerived: Schema.optional<typeof Schema.Boolean>;
|
|
106
|
+
limit: Schema.optional<typeof Schema.Number>;
|
|
107
|
+
offset: Schema.optional<typeof Schema.Number>;
|
|
108
|
+
}>, Schema.Struct<{
|
|
109
|
+
refs: Schema.Array$<Schema.Struct<{
|
|
110
|
+
id: typeof Schema.String;
|
|
111
|
+
tenantId: Schema.NullOr<typeof Schema.String>;
|
|
112
|
+
ownerId: Schema.NullOr<typeof Schema.String>;
|
|
113
|
+
bucket: typeof Schema.String;
|
|
114
|
+
key: typeof Schema.String;
|
|
115
|
+
contentType: typeof Schema.String;
|
|
116
|
+
size: typeof Schema.Number;
|
|
117
|
+
checksum: typeof Schema.String;
|
|
118
|
+
visibility: Schema.Literal<["public", "private"]>;
|
|
119
|
+
hasPassword: typeof Schema.Boolean;
|
|
120
|
+
createdAt: typeof Schema.String;
|
|
121
|
+
width: Schema.NullOr<typeof Schema.Number>;
|
|
122
|
+
height: Schema.NullOr<typeof Schema.Number>;
|
|
123
|
+
duration: Schema.NullOr<typeof Schema.Number>;
|
|
124
|
+
placeholder: Schema.NullOr<typeof Schema.String>;
|
|
125
|
+
folder: Schema.NullOr<typeof Schema.String>;
|
|
126
|
+
tags: Schema.NullOr<Schema.Array$<typeof Schema.String>>;
|
|
127
|
+
alt: Schema.NullOr<typeof Schema.String>;
|
|
128
|
+
caption: Schema.NullOr<typeof Schema.String>;
|
|
129
|
+
derivedFrom: Schema.NullOr<typeof Schema.String>;
|
|
130
|
+
kind: Schema.NullOr<typeof Schema.String>;
|
|
131
|
+
}>>;
|
|
132
|
+
nextOffset: Schema.NullOr<typeof Schema.Number>;
|
|
133
|
+
}>, typeof StorageError>;
|
|
134
|
+
|
|
135
|
+
export declare const mintPresignedUploadDescriptor: ActionProcedureDescriptor<"storage.mintPresignedUpload", Schema.Struct<{
|
|
136
|
+
contentType: typeof Schema.String;
|
|
137
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
138
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
139
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
140
|
+
alt: Schema.optional<typeof Schema.String>;
|
|
141
|
+
caption: Schema.optional<typeof Schema.String>;
|
|
142
|
+
expiresInSec: Schema.optional<typeof Schema.Number>;
|
|
143
|
+
}>, Schema.Struct<{
|
|
144
|
+
uploadUrl: typeof Schema.String;
|
|
145
|
+
finalizeToken: typeof Schema.String;
|
|
146
|
+
expiresInSec: typeof Schema.Number;
|
|
147
|
+
}>, typeof StorageError>;
|
|
148
|
+
|
|
149
|
+
export declare const mintUploadTicketDescriptor: ActionProcedureDescriptor<"storage.mintUploadTicket", Schema.Struct<{
|
|
150
|
+
contentType: typeof Schema.String;
|
|
151
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
152
|
+
key: Schema.optional<typeof Schema.String>;
|
|
153
|
+
folder: Schema.optional<typeof Schema.String>;
|
|
154
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
155
|
+
alt: Schema.optional<typeof Schema.String>;
|
|
156
|
+
caption: Schema.optional<typeof Schema.String>;
|
|
157
|
+
expiresInSec: Schema.optional<typeof Schema.Number>;
|
|
158
|
+
}>, Schema.Struct<{
|
|
159
|
+
uploadUrl: typeof Schema.String;
|
|
160
|
+
expiresInSec: typeof Schema.Number;
|
|
161
|
+
}>, typeof StorageError>;
|
|
162
|
+
|
|
163
|
+
export declare const mintUploadUrlDescriptor: ActionProcedureDescriptor<"storage.mintUploadUrl", Schema.Struct<{
|
|
164
|
+
key: typeof Schema.String;
|
|
165
|
+
contentType: typeof Schema.String;
|
|
166
|
+
expiresInSec: Schema.optional<typeof Schema.Number>;
|
|
167
|
+
}>, Schema.Struct<{
|
|
168
|
+
url: typeof Schema.String;
|
|
169
|
+
}>, typeof StorageError>;
|
|
170
|
+
|
|
171
|
+
export declare const mintUrlDescriptor: ActionProcedureDescriptor<"storage.mintUrl", Schema.Struct<{
|
|
172
|
+
id: typeof Schema.String;
|
|
173
|
+
password: Schema.optional<typeof Schema.String>;
|
|
174
|
+
expiresInSec: Schema.optional<typeof Schema.Number>;
|
|
175
|
+
}>, Schema.Struct<{
|
|
176
|
+
url: typeof Schema.String;
|
|
177
|
+
}>, Schema.Union<[typeof StorageError, typeof StorageAccessDenied]>>;
|
|
178
|
+
|
|
179
|
+
export declare const revokeDescriptor: MutationProcedureDescriptor<"storage.revoke", Schema.Struct<{
|
|
180
|
+
grantId: typeof Schema.String;
|
|
181
|
+
}>, Schema.Struct<{
|
|
182
|
+
ok: typeof Schema.Boolean;
|
|
183
|
+
}>, typeof StorageError>;
|
|
184
|
+
|
|
185
|
+
export declare const shareDescriptor: MutationProcedureDescriptor<"storage.share", Schema.Struct<{
|
|
186
|
+
refId: typeof Schema.String;
|
|
187
|
+
principalType: Schema.Literal<["user", "group", "apiKey"]>;
|
|
188
|
+
principalId: typeof Schema.String;
|
|
189
|
+
permission: Schema.optional<Schema.Literal<["read", "write"]>>;
|
|
190
|
+
expiresInDays: Schema.optional<typeof Schema.Number>;
|
|
191
|
+
}>, Schema.Struct<{
|
|
192
|
+
grantId: typeof Schema.String;
|
|
193
|
+
}>, typeof StorageError>;
|
|
194
|
+
|
|
195
|
+
export declare const signMultipartPartDescriptor: ActionProcedureDescriptor<"storage.signMultipartPart", Schema.Struct<{
|
|
196
|
+
multipartToken: typeof Schema.String;
|
|
197
|
+
partNumber: typeof Schema.Number;
|
|
198
|
+
}>, Schema.Struct<{
|
|
199
|
+
url: typeof Schema.String;
|
|
200
|
+
}>, typeof StorageError>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Access to a private object was refused. Distinct from `StorageError` so
|
|
204
|
+
* handlers can tell "not allowed" (403) from "backend blew up" (5xx) and
|
|
205
|
+
* the wire-error union carries it typed.
|
|
206
|
+
*/
|
|
207
|
+
declare class StorageAccessDenied extends StorageAccessDenied_base {
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare const StorageAccessDenied_base: Schema.TaggedErrorClass<StorageAccessDenied, "StorageAccessDenied", {
|
|
211
|
+
readonly _tag: Schema.tag<"StorageAccessDenied">;
|
|
212
|
+
} & {
|
|
213
|
+
refId: typeof Schema.String;
|
|
214
|
+
reason: typeof Schema.String;
|
|
215
|
+
}>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Storage failure. `transient` drives retry — `true` for 429 / 5xx /
|
|
219
|
+
* network blips, `false` for 4xx / config / not-found. Surfaced typed so
|
|
220
|
+
* handlers can `Effect.catchTag('StorageError', …)`.
|
|
221
|
+
*/
|
|
222
|
+
declare class StorageError extends StorageError_base {
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare const StorageError_base: Schema.TaggedErrorClass<StorageError, "StorageError", {
|
|
226
|
+
readonly _tag: Schema.tag<"StorageError">;
|
|
227
|
+
} & {
|
|
228
|
+
provider: typeof Schema.String;
|
|
229
|
+
message: typeof Schema.String;
|
|
230
|
+
transient: typeof Schema.Boolean;
|
|
231
|
+
status: Schema.optional<typeof Schema.Number>;
|
|
232
|
+
}>;
|
|
233
|
+
|
|
234
|
+
/** An upload was rejected by a constraint (size / content-type / magic-byte
|
|
235
|
+
* mismatch). `reason` is a stable code; `detail` is human-readable. */
|
|
236
|
+
declare class StorageRejected extends StorageRejected_base {
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
declare const StorageRejected_base: Schema.TaggedErrorClass<StorageRejected, "StorageRejected", {
|
|
240
|
+
readonly _tag: Schema.tag<"StorageRejected">;
|
|
241
|
+
} & {
|
|
242
|
+
/** `'too-large' | 'content-type-not-allowed' | 'content-mismatch'` */
|
|
243
|
+
reason: typeof Schema.String;
|
|
244
|
+
detail: typeof Schema.String;
|
|
245
|
+
}>;
|
|
246
|
+
|
|
247
|
+
/** Declared for the codegen (`VoltroPlugin.rpcClientDescriptors`) so each tag is
|
|
248
|
+
* emitted into the generated client group. Kept in lockstep with the exports. */
|
|
249
|
+
export declare const storageRpcClientImports: ReadonlyArray<PluginRpcClientDescriptor>;
|
|
250
|
+
|
|
251
|
+
/** An upload was rejected by the virus scanner. */
|
|
252
|
+
declare class StorageScanRejected extends StorageScanRejected_base {
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
declare const StorageScanRejected_base: Schema.TaggedErrorClass<StorageScanRejected, "StorageScanRejected", {
|
|
256
|
+
readonly _tag: Schema.tag<"StorageScanRejected">;
|
|
257
|
+
} & {
|
|
258
|
+
threat: typeof Schema.String;
|
|
259
|
+
}>;
|
|
260
|
+
|
|
261
|
+
export declare const uploadDescriptor: ActionProcedureDescriptor<"storage.upload", Schema.Struct<{
|
|
262
|
+
bytesBase64: typeof Schema.String;
|
|
263
|
+
contentType: typeof Schema.String;
|
|
264
|
+
visibility: Schema.optional<Schema.Literal<["public", "private"]>>;
|
|
265
|
+
key: Schema.optional<typeof Schema.String>;
|
|
266
|
+
password: Schema.optional<typeof Schema.String>;
|
|
267
|
+
}>, Schema.Struct<{
|
|
268
|
+
id: typeof Schema.String;
|
|
269
|
+
url: typeof Schema.String;
|
|
270
|
+
}>, Schema.Union<[typeof StorageError, typeof StorageRejected, typeof StorageScanRejected]>>;
|
|
271
|
+
|
|
272
|
+
export { }
|
package/dist/rpc.js
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { StorageAccessDenied as e, StorageError as t, StorageRejected as n, StorageScanRejected as r } from "./types.js";
|
|
2
|
+
import { Schema as i } from "effect";
|
|
3
|
+
import { defineAction as a, defineMutation as o, defineQuery as s } from "@voltro/protocol";
|
|
4
|
+
//#region src/rpc.ts
|
|
5
|
+
var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u = i.Struct({
|
|
6
|
+
id: i.String,
|
|
7
|
+
refId: i.String,
|
|
8
|
+
principalType: c,
|
|
9
|
+
principalId: i.String,
|
|
10
|
+
permission: l,
|
|
11
|
+
createdAt: i.String,
|
|
12
|
+
expiresAt: i.NullOr(i.String),
|
|
13
|
+
createdBy: i.NullOr(i.String)
|
|
14
|
+
}), d = i.Struct({
|
|
15
|
+
id: i.String,
|
|
16
|
+
tenantId: i.NullOr(i.String),
|
|
17
|
+
ownerId: i.NullOr(i.String),
|
|
18
|
+
bucket: i.String,
|
|
19
|
+
key: i.String,
|
|
20
|
+
contentType: i.String,
|
|
21
|
+
size: i.Number,
|
|
22
|
+
checksum: i.String,
|
|
23
|
+
visibility: i.Literal("public", "private"),
|
|
24
|
+
hasPassword: i.Boolean,
|
|
25
|
+
createdAt: i.String,
|
|
26
|
+
width: i.NullOr(i.Number),
|
|
27
|
+
height: i.NullOr(i.Number),
|
|
28
|
+
duration: i.NullOr(i.Number),
|
|
29
|
+
placeholder: i.NullOr(i.String),
|
|
30
|
+
folder: i.NullOr(i.String),
|
|
31
|
+
tags: i.NullOr(i.Array(i.String)),
|
|
32
|
+
alt: i.NullOr(i.String),
|
|
33
|
+
caption: i.NullOr(i.String),
|
|
34
|
+
derivedFrom: i.NullOr(i.String),
|
|
35
|
+
kind: i.NullOr(i.String)
|
|
36
|
+
}), f = s({
|
|
37
|
+
name: "storage.listRefs",
|
|
38
|
+
input: i.Struct({
|
|
39
|
+
folder: i.optional(i.String),
|
|
40
|
+
tags: i.optional(i.Array(i.String)),
|
|
41
|
+
ownerId: i.optional(i.String),
|
|
42
|
+
includeDerived: i.optional(i.Boolean),
|
|
43
|
+
limit: i.optional(i.Number),
|
|
44
|
+
offset: i.optional(i.Number)
|
|
45
|
+
}),
|
|
46
|
+
output: i.Struct({
|
|
47
|
+
refs: i.Array(d),
|
|
48
|
+
nextOffset: i.NullOr(i.Number)
|
|
49
|
+
}),
|
|
50
|
+
error: t
|
|
51
|
+
}), p = a({
|
|
52
|
+
name: "storage.mintUrl",
|
|
53
|
+
input: i.Struct({
|
|
54
|
+
id: i.String,
|
|
55
|
+
password: i.optional(i.String),
|
|
56
|
+
expiresInSec: i.optional(i.Number)
|
|
57
|
+
}),
|
|
58
|
+
output: i.Struct({ url: i.String }),
|
|
59
|
+
error: i.Union(t, e)
|
|
60
|
+
}), m = a({
|
|
61
|
+
name: "storage.mintUploadUrl",
|
|
62
|
+
input: i.Struct({
|
|
63
|
+
key: i.String,
|
|
64
|
+
contentType: i.String,
|
|
65
|
+
expiresInSec: i.optional(i.Number)
|
|
66
|
+
}),
|
|
67
|
+
output: i.Struct({ url: i.String }),
|
|
68
|
+
error: t
|
|
69
|
+
}), h = a({
|
|
70
|
+
name: "storage.mintUploadTicket",
|
|
71
|
+
input: i.Struct({
|
|
72
|
+
contentType: i.String,
|
|
73
|
+
visibility: i.optional(i.Literal("public", "private")),
|
|
74
|
+
key: i.optional(i.String),
|
|
75
|
+
folder: i.optional(i.String),
|
|
76
|
+
tags: i.optional(i.Array(i.String)),
|
|
77
|
+
alt: i.optional(i.String),
|
|
78
|
+
caption: i.optional(i.String),
|
|
79
|
+
expiresInSec: i.optional(i.Number)
|
|
80
|
+
}),
|
|
81
|
+
output: i.Struct({
|
|
82
|
+
uploadUrl: i.String,
|
|
83
|
+
expiresInSec: i.Number
|
|
84
|
+
}),
|
|
85
|
+
error: t
|
|
86
|
+
}), g = a({
|
|
87
|
+
name: "storage.mintPresignedUpload",
|
|
88
|
+
input: i.Struct({
|
|
89
|
+
contentType: i.String,
|
|
90
|
+
visibility: i.optional(i.Literal("public", "private")),
|
|
91
|
+
folder: i.optional(i.String),
|
|
92
|
+
tags: i.optional(i.Array(i.String)),
|
|
93
|
+
alt: i.optional(i.String),
|
|
94
|
+
caption: i.optional(i.String),
|
|
95
|
+
expiresInSec: i.optional(i.Number)
|
|
96
|
+
}),
|
|
97
|
+
output: i.Struct({
|
|
98
|
+
uploadUrl: i.String,
|
|
99
|
+
finalizeToken: i.String,
|
|
100
|
+
expiresInSec: i.Number
|
|
101
|
+
}),
|
|
102
|
+
error: t
|
|
103
|
+
}), _ = a({
|
|
104
|
+
name: "storage.finalizeUpload",
|
|
105
|
+
input: i.Struct({ finalizeToken: i.String }),
|
|
106
|
+
output: i.Struct({
|
|
107
|
+
id: i.String,
|
|
108
|
+
url: i.String,
|
|
109
|
+
contentType: i.String,
|
|
110
|
+
size: i.Number,
|
|
111
|
+
width: i.optional(i.Number),
|
|
112
|
+
height: i.optional(i.Number)
|
|
113
|
+
}),
|
|
114
|
+
error: i.Union(t, n, r)
|
|
115
|
+
}), v = a({
|
|
116
|
+
name: "storage.beginResumableUpload",
|
|
117
|
+
input: i.Struct({
|
|
118
|
+
contentType: i.String,
|
|
119
|
+
size: i.Number,
|
|
120
|
+
visibility: i.optional(i.Literal("public", "private")),
|
|
121
|
+
folder: i.optional(i.String),
|
|
122
|
+
tags: i.optional(i.Array(i.String)),
|
|
123
|
+
alt: i.optional(i.String),
|
|
124
|
+
caption: i.optional(i.String),
|
|
125
|
+
chunkSize: i.optional(i.Number),
|
|
126
|
+
expiresInSec: i.optional(i.Number)
|
|
127
|
+
}),
|
|
128
|
+
output: i.Struct({
|
|
129
|
+
uploadId: i.String,
|
|
130
|
+
resumableToken: i.String,
|
|
131
|
+
uploadUrl: i.String,
|
|
132
|
+
chunkSize: i.Number,
|
|
133
|
+
expiresInSec: i.Number
|
|
134
|
+
}),
|
|
135
|
+
error: t
|
|
136
|
+
}), y = a({
|
|
137
|
+
name: "storage.beginMultipartUpload",
|
|
138
|
+
input: i.Struct({
|
|
139
|
+
contentType: i.String,
|
|
140
|
+
size: i.Number,
|
|
141
|
+
visibility: i.optional(i.Literal("public", "private")),
|
|
142
|
+
folder: i.optional(i.String),
|
|
143
|
+
tags: i.optional(i.Array(i.String)),
|
|
144
|
+
alt: i.optional(i.String),
|
|
145
|
+
caption: i.optional(i.String),
|
|
146
|
+
partSize: i.optional(i.Number),
|
|
147
|
+
expiresInSec: i.optional(i.Number)
|
|
148
|
+
}),
|
|
149
|
+
output: i.Struct({
|
|
150
|
+
multipartToken: i.String,
|
|
151
|
+
partSize: i.Number,
|
|
152
|
+
expiresInSec: i.Number
|
|
153
|
+
}),
|
|
154
|
+
error: t
|
|
155
|
+
}), b = a({
|
|
156
|
+
name: "storage.signMultipartPart",
|
|
157
|
+
input: i.Struct({
|
|
158
|
+
multipartToken: i.String,
|
|
159
|
+
partNumber: i.Number
|
|
160
|
+
}),
|
|
161
|
+
output: i.Struct({ url: i.String }),
|
|
162
|
+
error: t
|
|
163
|
+
}), x = a({
|
|
164
|
+
name: "storage.completeMultipartUpload",
|
|
165
|
+
input: i.Struct({
|
|
166
|
+
multipartToken: i.String,
|
|
167
|
+
parts: i.Array(i.Struct({
|
|
168
|
+
partNumber: i.Number,
|
|
169
|
+
etag: i.String
|
|
170
|
+
}))
|
|
171
|
+
}),
|
|
172
|
+
output: i.Struct({
|
|
173
|
+
id: i.String,
|
|
174
|
+
url: i.String,
|
|
175
|
+
size: i.Number
|
|
176
|
+
}),
|
|
177
|
+
error: i.Union(t, n)
|
|
178
|
+
}), S = a({
|
|
179
|
+
name: "storage.abortMultipartUpload",
|
|
180
|
+
input: i.Struct({ multipartToken: i.String }),
|
|
181
|
+
output: i.Struct({ ok: i.Boolean }),
|
|
182
|
+
error: t
|
|
183
|
+
}), C = a({
|
|
184
|
+
name: "storage.upload",
|
|
185
|
+
input: i.Struct({
|
|
186
|
+
bytesBase64: i.String,
|
|
187
|
+
contentType: i.String,
|
|
188
|
+
visibility: i.optional(i.Literal("public", "private")),
|
|
189
|
+
key: i.optional(i.String),
|
|
190
|
+
password: i.optional(i.String)
|
|
191
|
+
}),
|
|
192
|
+
output: i.Struct({
|
|
193
|
+
id: i.String,
|
|
194
|
+
url: i.String
|
|
195
|
+
}),
|
|
196
|
+
error: i.Union(t, n, r)
|
|
197
|
+
}), w = a({
|
|
198
|
+
name: "storage.ingestUrl",
|
|
199
|
+
input: i.Struct({
|
|
200
|
+
url: i.String,
|
|
201
|
+
visibility: i.optional(i.Literal("public", "private")),
|
|
202
|
+
folder: i.optional(i.String),
|
|
203
|
+
tags: i.optional(i.Array(i.String)),
|
|
204
|
+
alt: i.optional(i.String),
|
|
205
|
+
caption: i.optional(i.String),
|
|
206
|
+
key: i.optional(i.String)
|
|
207
|
+
}),
|
|
208
|
+
output: i.Struct({
|
|
209
|
+
id: i.String,
|
|
210
|
+
url: i.String
|
|
211
|
+
}),
|
|
212
|
+
error: i.Union(t, n, r)
|
|
213
|
+
}), T = o({
|
|
214
|
+
name: "storage.share",
|
|
215
|
+
input: i.Struct({
|
|
216
|
+
refId: i.String,
|
|
217
|
+
principalType: c,
|
|
218
|
+
principalId: i.String,
|
|
219
|
+
permission: i.optional(l),
|
|
220
|
+
expiresInDays: i.optional(i.Number)
|
|
221
|
+
}),
|
|
222
|
+
output: i.Struct({ grantId: i.String }),
|
|
223
|
+
error: t
|
|
224
|
+
}), E = o({
|
|
225
|
+
name: "storage.revoke",
|
|
226
|
+
input: i.Struct({ grantId: i.String }),
|
|
227
|
+
output: i.Struct({ ok: i.Boolean }),
|
|
228
|
+
error: t
|
|
229
|
+
}), D = s({
|
|
230
|
+
name: "storage.listGrants",
|
|
231
|
+
input: i.Struct({ refId: i.String }),
|
|
232
|
+
output: i.Struct({ grants: i.Array(u) }),
|
|
233
|
+
error: t
|
|
234
|
+
}), O = [
|
|
235
|
+
{
|
|
236
|
+
tag: "storage.mintUrl",
|
|
237
|
+
kind: "action",
|
|
238
|
+
import: {
|
|
239
|
+
module: "@voltro/plugin-storage/rpc",
|
|
240
|
+
name: "mintUrlDescriptor"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
tag: "storage.mintUploadUrl",
|
|
245
|
+
kind: "action",
|
|
246
|
+
import: {
|
|
247
|
+
module: "@voltro/plugin-storage/rpc",
|
|
248
|
+
name: "mintUploadUrlDescriptor"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
tag: "storage.mintUploadTicket",
|
|
253
|
+
kind: "action",
|
|
254
|
+
import: {
|
|
255
|
+
module: "@voltro/plugin-storage/rpc",
|
|
256
|
+
name: "mintUploadTicketDescriptor"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
tag: "storage.mintPresignedUpload",
|
|
261
|
+
kind: "action",
|
|
262
|
+
import: {
|
|
263
|
+
module: "@voltro/plugin-storage/rpc",
|
|
264
|
+
name: "mintPresignedUploadDescriptor"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
tag: "storage.finalizeUpload",
|
|
269
|
+
kind: "action",
|
|
270
|
+
import: {
|
|
271
|
+
module: "@voltro/plugin-storage/rpc",
|
|
272
|
+
name: "finalizeUploadDescriptor"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
tag: "storage.beginResumableUpload",
|
|
277
|
+
kind: "action",
|
|
278
|
+
import: {
|
|
279
|
+
module: "@voltro/plugin-storage/rpc",
|
|
280
|
+
name: "beginResumableUploadDescriptor"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
tag: "storage.beginMultipartUpload",
|
|
285
|
+
kind: "action",
|
|
286
|
+
import: {
|
|
287
|
+
module: "@voltro/plugin-storage/rpc",
|
|
288
|
+
name: "beginMultipartUploadDescriptor"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
tag: "storage.signMultipartPart",
|
|
293
|
+
kind: "action",
|
|
294
|
+
import: {
|
|
295
|
+
module: "@voltro/plugin-storage/rpc",
|
|
296
|
+
name: "signMultipartPartDescriptor"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
tag: "storage.completeMultipartUpload",
|
|
301
|
+
kind: "action",
|
|
302
|
+
import: {
|
|
303
|
+
module: "@voltro/plugin-storage/rpc",
|
|
304
|
+
name: "completeMultipartUploadDescriptor"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
tag: "storage.abortMultipartUpload",
|
|
309
|
+
kind: "action",
|
|
310
|
+
import: {
|
|
311
|
+
module: "@voltro/plugin-storage/rpc",
|
|
312
|
+
name: "abortMultipartUploadDescriptor"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
tag: "storage.upload",
|
|
317
|
+
kind: "action",
|
|
318
|
+
import: {
|
|
319
|
+
module: "@voltro/plugin-storage/rpc",
|
|
320
|
+
name: "uploadDescriptor"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
tag: "storage.ingestUrl",
|
|
325
|
+
kind: "action",
|
|
326
|
+
import: {
|
|
327
|
+
module: "@voltro/plugin-storage/rpc",
|
|
328
|
+
name: "ingestUrlDescriptor"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
tag: "storage.share",
|
|
333
|
+
kind: "mutation",
|
|
334
|
+
import: {
|
|
335
|
+
module: "@voltro/plugin-storage/rpc",
|
|
336
|
+
name: "shareDescriptor"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
tag: "storage.revoke",
|
|
341
|
+
kind: "mutation",
|
|
342
|
+
import: {
|
|
343
|
+
module: "@voltro/plugin-storage/rpc",
|
|
344
|
+
name: "revokeDescriptor"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
tag: "storage.listGrants",
|
|
349
|
+
kind: "query",
|
|
350
|
+
import: {
|
|
351
|
+
module: "@voltro/plugin-storage/rpc",
|
|
352
|
+
name: "listGrantsDescriptor"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
tag: "storage.listRefs",
|
|
357
|
+
kind: "query",
|
|
358
|
+
import: {
|
|
359
|
+
module: "@voltro/plugin-storage/rpc",
|
|
360
|
+
name: "listRefsDescriptor"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
];
|
|
364
|
+
//#endregion
|
|
365
|
+
export { S as abortMultipartUploadDescriptor, y as beginMultipartUploadDescriptor, v as beginResumableUploadDescriptor, x as completeMultipartUploadDescriptor, _ as finalizeUploadDescriptor, w as ingestUrlDescriptor, D as listGrantsDescriptor, f as listRefsDescriptor, g as mintPresignedUploadDescriptor, h as mintUploadTicketDescriptor, m as mintUploadUrlDescriptor, p as mintUrlDescriptor, E as revokeDescriptor, T as shareDescriptor, b as signMultipartPartDescriptor, O as storageRpcClientImports, C as uploadDescriptor };
|