@voltro/plugin-storage 0.33.0 → 0.35.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 +1968 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +210 -203
- package/dist/rpc.js +32 -16
- package/package.json +4 -4
package/dist/rpc.js
CHANGED
|
@@ -47,7 +47,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
47
47
|
refs: i.Array(d),
|
|
48
48
|
nextOffset: i.NullOr(i.Number)
|
|
49
49
|
}),
|
|
50
|
-
error: t
|
|
50
|
+
error: t,
|
|
51
|
+
guards: [{ scope: "storage:browse" }]
|
|
51
52
|
}), p = a({
|
|
52
53
|
name: "storage.mintUrl",
|
|
53
54
|
input: i.Struct({
|
|
@@ -56,7 +57,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
56
57
|
expiresInSec: i.optional(i.Number)
|
|
57
58
|
}),
|
|
58
59
|
output: i.Struct({ url: i.String }),
|
|
59
|
-
error: i.Union(t, e)
|
|
60
|
+
error: i.Union(t, e),
|
|
61
|
+
openAccess: "per-object authorization: the access policy + grants decide this subject's read (StorageAccessDenied on refusal); a scope here would double-gate what the policy already decides per object"
|
|
60
62
|
}), m = a({
|
|
61
63
|
name: "storage.mintUploadUrl",
|
|
62
64
|
input: i.Struct({
|
|
@@ -65,7 +67,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
65
67
|
expiresInSec: i.optional(i.Number)
|
|
66
68
|
}),
|
|
67
69
|
output: i.Struct({ url: i.String }),
|
|
68
|
-
error: t
|
|
70
|
+
error: t,
|
|
71
|
+
guards: [{ scope: "storage:manage" }]
|
|
69
72
|
}), h = a({
|
|
70
73
|
name: "storage.mintUploadTicket",
|
|
71
74
|
input: i.Struct({
|
|
@@ -82,7 +85,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
82
85
|
uploadUrl: i.String,
|
|
83
86
|
expiresInSec: i.Number
|
|
84
87
|
}),
|
|
85
|
-
error: t
|
|
88
|
+
error: t,
|
|
89
|
+
openAccess: "self-service upload: the ticket binds the calling subject + tenant, caps size, and the finalize path runs limits + scan"
|
|
86
90
|
}), g = a({
|
|
87
91
|
name: "storage.mintPresignedUpload",
|
|
88
92
|
input: i.Struct({
|
|
@@ -99,7 +103,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
99
103
|
finalizeToken: i.String,
|
|
100
104
|
expiresInSec: i.Number
|
|
101
105
|
}),
|
|
102
|
-
error: t
|
|
106
|
+
error: t,
|
|
107
|
+
openAccess: "self-service upload: the finalize token binds the calling subject + tenant; finalizeUpload refuses another subject's token and runs limits + scan"
|
|
103
108
|
}), _ = a({
|
|
104
109
|
name: "storage.finalizeUpload",
|
|
105
110
|
input: i.Struct({ finalizeToken: i.String }),
|
|
@@ -111,7 +116,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
111
116
|
width: i.optional(i.Number),
|
|
112
117
|
height: i.optional(i.Number)
|
|
113
118
|
}),
|
|
114
|
-
error: i.Union(t, n, r)
|
|
119
|
+
error: i.Union(t, n, r),
|
|
120
|
+
openAccess: "authorization is the signed finalize token itself: it binds the minting subject (403 for another caller) and the finalize runs limits + scan"
|
|
115
121
|
}), v = a({
|
|
116
122
|
name: "storage.beginResumableUpload",
|
|
117
123
|
input: i.Struct({
|
|
@@ -132,7 +138,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
132
138
|
chunkSize: i.Number,
|
|
133
139
|
expiresInSec: i.Number
|
|
134
140
|
}),
|
|
135
|
-
error: t
|
|
141
|
+
error: t,
|
|
142
|
+
openAccess: "self-service upload: the resumable token binds the calling subject + tenant and the assembled object runs limits + scan"
|
|
136
143
|
}), y = a({
|
|
137
144
|
name: "storage.beginMultipartUpload",
|
|
138
145
|
input: i.Struct({
|
|
@@ -151,7 +158,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
151
158
|
partSize: i.Number,
|
|
152
159
|
expiresInSec: i.Number
|
|
153
160
|
}),
|
|
154
|
-
error: t
|
|
161
|
+
error: t,
|
|
162
|
+
openAccess: "self-service upload: the multipart token binds the calling subject + tenant; completion refuses another subject's token"
|
|
155
163
|
}), b = a({
|
|
156
164
|
name: "storage.signMultipartPart",
|
|
157
165
|
input: i.Struct({
|
|
@@ -159,7 +167,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
159
167
|
partNumber: i.Number
|
|
160
168
|
}),
|
|
161
169
|
output: i.Struct({ url: i.String }),
|
|
162
|
-
error: t
|
|
170
|
+
error: t,
|
|
171
|
+
openAccess: "authorization is the signed multipart token: parts can only be signed for a session a subject legitimately began"
|
|
163
172
|
}), x = a({
|
|
164
173
|
name: "storage.completeMultipartUpload",
|
|
165
174
|
input: i.Struct({
|
|
@@ -174,12 +183,14 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
174
183
|
url: i.String,
|
|
175
184
|
size: i.Number
|
|
176
185
|
}),
|
|
177
|
-
error: i.Union(t, n)
|
|
186
|
+
error: i.Union(t, n),
|
|
187
|
+
openAccess: "authorization is the signed multipart token: completion refuses a token minted by another subject"
|
|
178
188
|
}), S = a({
|
|
179
189
|
name: "storage.abortMultipartUpload",
|
|
180
190
|
input: i.Struct({ multipartToken: i.String }),
|
|
181
191
|
output: i.Struct({ ok: i.Boolean }),
|
|
182
|
-
error: t
|
|
192
|
+
error: t,
|
|
193
|
+
openAccess: "authorization is the signed multipart token: aborting releases the caller's own upload session"
|
|
183
194
|
}), C = a({
|
|
184
195
|
name: "storage.upload",
|
|
185
196
|
input: i.Struct({
|
|
@@ -193,7 +204,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
193
204
|
id: i.String,
|
|
194
205
|
url: i.String
|
|
195
206
|
}),
|
|
196
|
-
error: i.Union(t, n, r)
|
|
207
|
+
error: i.Union(t, n, r),
|
|
208
|
+
openAccess: "self-service upload: ownerId/tenant come from the calling subject and the put runs limits + scan"
|
|
197
209
|
}), w = a({
|
|
198
210
|
name: "storage.ingestUrl",
|
|
199
211
|
input: i.Struct({
|
|
@@ -209,7 +221,8 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
209
221
|
id: i.String,
|
|
210
222
|
url: i.String
|
|
211
223
|
}),
|
|
212
|
-
error: i.Union(t, n, r)
|
|
224
|
+
error: i.Union(t, n, r),
|
|
225
|
+
guards: [{ scope: "storage:manage" }]
|
|
213
226
|
}), T = o({
|
|
214
227
|
name: "storage.share",
|
|
215
228
|
input: i.Struct({
|
|
@@ -220,17 +233,20 @@ var c = i.Literal("user", "group", "apiKey"), l = i.Literal("read", "write"), u
|
|
|
220
233
|
expiresInDays: i.optional(i.Number)
|
|
221
234
|
}),
|
|
222
235
|
output: i.Struct({ grantId: i.String }),
|
|
223
|
-
error: t
|
|
236
|
+
error: t,
|
|
237
|
+
openAccess: "owner-or-admin enforced in-handler (assertMayAdministerGrants): only the ref's owner or admin:full may grant, which is stricter per object than any global scope"
|
|
224
238
|
}), E = o({
|
|
225
239
|
name: "storage.revoke",
|
|
226
240
|
input: i.Struct({ grantId: i.String }),
|
|
227
241
|
output: i.Struct({ ok: i.Boolean }),
|
|
228
|
-
error: t
|
|
242
|
+
error: t,
|
|
243
|
+
openAccess: "owner-or-admin enforced in-handler: only the owning subject (or admin:full) of the grant's object may revoke; unknown and unowned grants report the same 403"
|
|
229
244
|
}), D = s({
|
|
230
245
|
name: "storage.listGrants",
|
|
231
246
|
input: i.Struct({ refId: i.String }),
|
|
232
247
|
output: i.Struct({ grants: i.Array(u) }),
|
|
233
|
-
error: t
|
|
248
|
+
error: t,
|
|
249
|
+
openAccess: "owner-or-admin enforced in-handler: who an object is shared with is readable only by the object's owner or admin:full"
|
|
234
250
|
}), O = [
|
|
235
251
|
{
|
|
236
252
|
tag: "storage.mintUrl",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "File-storage plugin — one StorageProvider contract, switchable backends (S3 / MinIO / Azure / filesystem / memory / database). Public (CDN-direct) + private (access policy + per-object grants) objects, upload constraints, virus-scan hook, on-the-fly image transforms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"node": ">=24.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@voltro/database": "0.
|
|
47
|
-
"@voltro/env": "0.
|
|
48
|
-
"@voltro/protocol": "0.
|
|
46
|
+
"@voltro/database": "0.35.0",
|
|
47
|
+
"@voltro/env": "0.35.0",
|
|
48
|
+
"@voltro/protocol": "0.35.0"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
51
|
"@aws-sdk/client-s3": "^3.1096.0",
|