Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit a48a1b6

Browse files
committed
feat: get previews on supported resources
1 parent ed4983a commit a48a1b6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

polyproto/core/routes/rawr.tsp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,26 +208,29 @@ namespace polyproto.core.Routes.ResourceAddressingWithRelativeRoots {
208208
@get
209209
@added(Version.`v1.0-beta.1`)
210210
@summary("List your uploaded resources")
211-
// TODO: Maybe you could query resources with previews enabled?
212211
op getResourceList(
213212
@query limit?: uint32 = 50,
214213
@query sort?: polyproto.core.Models.ResourceListSorting,
214+
215+
@doc("Whether to request content previews for supported file formats")
216+
@query
217+
previews?: boolean = false,
215218
): {
216219
@statusCode statusCode: 200;
217220
@body body: {
218221
resourceId: string;
219222
size: uint64;
220223
access: polyproto.core.Models.ResourceAccessProperties;
224+
225+
@doc("Only present, if `previews` was set to `true` in the request, and if the response contains preview-supported file types.")
226+
preview?: File;
221227
}[];
222228
} | {
223229
@statusCode _: 204;
224230

225231
@header(#{ name: "Content-Length" })
226232
contentLength: 0;
227233
};
228-
229-
// TODO: Information about how much storage space you have still
230-
// remaining is likely a good idea for a route.
231234
}
232235

233236
/**

0 commit comments

Comments
 (0)