@devframes/plugin-assets 0.9.18 → 0.9.19

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.
@@ -10,88 +10,25 @@ interface AssetsCapabilities {
10
10
  * instead of letting the user hit a "method not found" error, the same
11
11
  * `canWrite`-gating idea the git plugin's `GitStatus.canWrite` follows.
12
12
  */
13
- export declare const capabilities: {
14
- name: "devframes:plugin:assets:capabilities";
15
- type?: "query" | undefined;
16
- cacheable?: boolean;
17
- args: readonly [];
18
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
19
- write: boolean;
20
- uploadExtensions: string[] | "*";
21
- }, {
22
- write: boolean;
23
- uploadExtensions: string[] | "*";
24
- }>;
25
- jsonSerializable?: boolean;
26
- agent?: import("devframe").RpcFunctionAgentOptions;
27
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
28
- write: boolean;
29
- uploadExtensions: string[] | "*";
30
- }>>>) | undefined;
31
- handler?: (() => import("devframe/rpc").Thenable<{
32
- write: boolean;
33
- uploadExtensions: string[] | "*";
34
- }>) | undefined;
35
- dump?: import("devframe/rpc").RpcDump<[], import("devframe/rpc").Thenable<{
36
- write: boolean;
37
- uploadExtensions: string[] | "*";
38
- }>, import("devframe").DevframeNodeContext> | undefined;
39
- snapshot?: boolean;
40
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
41
- write: boolean;
42
- uploadExtensions: string[] | "*";
43
- }>>>> | undefined;
44
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
45
- write: boolean;
46
- uploadExtensions: string[] | "*";
47
- }>>> | undefined;
48
- };
13
+ export declare const capabilities: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:capabilities", "query", readonly [], import("devframe/utils/simple-schema").SimpleSchema<{
14
+ write: boolean;
15
+ uploadExtensions: string[] | "*";
16
+ }, {
17
+ write: boolean;
18
+ uploadExtensions: string[] | "*";
19
+ }>, import("devframe").DevframeNodeContext>;
49
20
  //#endregion
50
21
  //#region src/node/rpc/functions/delete.d.ts
51
22
  /** One request covers both single- and multi-select delete. */
52
- export declare const deleteAssets: {
53
- name: "devframes:plugin:assets:delete";
54
- type?: "action" | undefined;
55
- cacheable?: boolean;
56
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
57
- paths: string[];
58
- }, {
59
- paths: string[];
60
- }>];
61
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
62
- deleted: string[];
63
- }, {
64
- deleted: string[];
65
- }>;
66
- jsonSerializable?: boolean;
67
- agent?: import("devframe").RpcFunctionAgentOptions;
68
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
69
- paths: string[];
70
- }], import("devframe/rpc").Thenable<{
71
- deleted: string[];
72
- }>>>) | undefined;
73
- handler?: ((args_0: {
74
- paths: string[];
75
- }) => import("devframe/rpc").Thenable<{
76
- deleted: string[];
77
- }>) | undefined;
78
- dump?: import("devframe/rpc").RpcDump<[{
79
- paths: string[];
80
- }], import("devframe/rpc").Thenable<{
81
- deleted: string[];
82
- }>, import("devframe").DevframeNodeContext> | undefined;
83
- snapshot?: boolean;
84
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
85
- paths: string[];
86
- }], import("devframe/rpc").Thenable<{
87
- deleted: string[];
88
- }>>>> | undefined;
89
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
90
- paths: string[];
91
- }], import("devframe/rpc").Thenable<{
92
- deleted: string[];
93
- }>>> | undefined;
94
- };
23
+ export declare const deleteAssets: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:delete", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
24
+ paths: string[];
25
+ }, {
26
+ paths: string[];
27
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
28
+ deleted: string[];
29
+ }, {
30
+ deleted: string[];
31
+ }>, import("devframe").DevframeNodeContext>;
95
32
  //#endregion
96
33
  //#region src/node/rpc/functions/list.d.ts
97
34
  export declare const assetInfoSchema: import("devframe/utils/simple-schema").SimpleSchema<{
@@ -109,163 +46,42 @@ export declare const assetInfoSchema: import("devframe/utils/simple-schema").Sim
109
46
  mtime: number;
110
47
  fsPath?: string | undefined;
111
48
  }>;
112
- export declare const list: {
113
- name: "devframes:plugin:assets:list";
114
- type?: "query" | undefined;
115
- cacheable?: boolean;
116
- args: readonly [];
117
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
118
- path: string;
119
- type: "image" | "font" | "video" | "audio" | "text" | "other";
120
- publicPath: string;
121
- size: number;
122
- mtime: number;
123
- fsPath?: string | undefined;
124
- }[], {
125
- path: string;
126
- type: "image" | "font" | "video" | "audio" | "text" | "other";
127
- publicPath: string;
128
- size: number;
129
- mtime: number;
130
- fsPath?: string | undefined;
131
- }[]>;
132
- jsonSerializable?: boolean;
133
- agent?: import("devframe").RpcFunctionAgentOptions;
134
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
135
- path: string;
136
- type: "image" | "font" | "video" | "audio" | "text" | "other";
137
- publicPath: string;
138
- size: number;
139
- mtime: number;
140
- fsPath?: string | undefined;
141
- }[]>>>) | undefined;
142
- handler?: (() => import("devframe/rpc").Thenable<{
143
- path: string;
144
- type: "image" | "font" | "video" | "audio" | "text" | "other";
145
- publicPath: string;
146
- size: number;
147
- mtime: number;
148
- fsPath?: string | undefined;
149
- }[]>) | undefined;
150
- dump?: import("devframe/rpc").RpcDump<[], import("devframe/rpc").Thenable<{
151
- path: string;
152
- type: "image" | "font" | "video" | "audio" | "text" | "other";
153
- publicPath: string;
154
- size: number;
155
- mtime: number;
156
- fsPath?: string | undefined;
157
- }[]>, import("devframe").DevframeNodeContext> | undefined;
158
- snapshot?: boolean;
159
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
160
- path: string;
161
- type: "image" | "font" | "video" | "audio" | "text" | "other";
162
- publicPath: string;
163
- size: number;
164
- mtime: number;
165
- fsPath?: string | undefined;
166
- }[]>>>> | undefined;
167
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
168
- path: string;
169
- type: "image" | "font" | "video" | "audio" | "text" | "other";
170
- publicPath: string;
171
- size: number;
172
- mtime: number;
173
- fsPath?: string | undefined;
174
- }[]>>> | undefined;
175
- };
49
+ export declare const list: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:list", "query", readonly [], import("devframe/utils/simple-schema").SimpleSchema<{
50
+ path: string;
51
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
52
+ publicPath: string;
53
+ size: number;
54
+ mtime: number;
55
+ fsPath?: string | undefined;
56
+ }[], {
57
+ path: string;
58
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
59
+ publicPath: string;
60
+ size: number;
61
+ mtime: number;
62
+ fsPath?: string | undefined;
63
+ }[]>, import("devframe").DevframeNodeContext>;
176
64
  //#endregion
177
65
  //#region src/node/rpc/functions/mkdir.d.ts
178
- export declare const mkdir: {
179
- name: "devframes:plugin:assets:mkdir";
180
- type?: "action" | undefined;
181
- cacheable?: boolean;
182
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
183
- path: string;
184
- }, {
185
- path: string;
186
- }>];
187
- returns: import("devframe/utils/simple-schema").SimpleSchema<void, void>;
188
- jsonSerializable?: boolean;
189
- agent?: import("devframe").RpcFunctionAgentOptions;
190
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
191
- path: string;
192
- }], import("devframe/rpc").Thenable<void>>>) | undefined;
193
- handler?: ((args_0: {
194
- path: string;
195
- }) => import("devframe/rpc").Thenable<void>) | undefined;
196
- dump?: import("devframe/rpc").RpcDump<[{
197
- path: string;
198
- }], import("devframe/rpc").Thenable<void>, import("devframe").DevframeNodeContext> | undefined;
199
- snapshot?: boolean;
200
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
201
- path: string;
202
- }], import("devframe/rpc").Thenable<void>>>> | undefined;
203
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
204
- path: string;
205
- }], import("devframe/rpc").Thenable<void>>> | undefined;
206
- };
66
+ export declare const mkdir: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:mkdir", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
67
+ path: string;
68
+ }, {
69
+ path: string;
70
+ }>], import("devframe/utils/simple-schema").SimpleSchema<void, void>, import("devframe").DevframeNodeContext>;
207
71
  //#endregion
208
72
  //#region src/node/rpc/functions/read-image-meta.d.ts
209
- export declare const readImageMeta: {
210
- name: "devframes:plugin:assets:read-image-meta";
211
- type?: "query" | undefined;
212
- cacheable?: boolean;
213
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>];
214
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
215
- width?: number | undefined;
216
- height?: number | undefined;
217
- orientation?: number | undefined;
218
- } | null, {
219
- width?: number | undefined;
220
- height?: number | undefined;
221
- orientation?: number | undefined;
222
- } | null>;
223
- jsonSerializable?: boolean;
224
- agent?: import("devframe").RpcFunctionAgentOptions;
225
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
226
- width?: number | undefined;
227
- height?: number | undefined;
228
- orientation?: number | undefined;
229
- } | null>>>) | undefined;
230
- handler?: ((args_0: string) => import("devframe/rpc").Thenable<{
231
- width?: number | undefined;
232
- height?: number | undefined;
233
- orientation?: number | undefined;
234
- } | null>) | undefined;
235
- dump?: import("devframe/rpc").RpcDump<[string], import("devframe/rpc").Thenable<{
236
- width?: number | undefined;
237
- height?: number | undefined;
238
- orientation?: number | undefined;
239
- } | null>, import("devframe").DevframeNodeContext> | undefined;
240
- snapshot?: boolean;
241
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
242
- width?: number | undefined;
243
- height?: number | undefined;
244
- orientation?: number | undefined;
245
- } | null>>>> | undefined;
246
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
247
- width?: number | undefined;
248
- height?: number | undefined;
249
- orientation?: number | undefined;
250
- } | null>>> | undefined;
251
- };
73
+ export declare const readImageMeta: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:read-image-meta", "query", readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>], import("devframe/utils/simple-schema").SimpleSchema<{
74
+ width?: number | undefined;
75
+ height?: number | undefined;
76
+ orientation?: number | undefined;
77
+ } | null, {
78
+ width?: number | undefined;
79
+ height?: number | undefined;
80
+ orientation?: number | undefined;
81
+ } | null>, import("devframe").DevframeNodeContext>;
252
82
  //#endregion
253
83
  //#region src/node/rpc/functions/read-text.d.ts
254
- export declare const readText: {
255
- name: "devframes:plugin:assets:read-text";
256
- type?: "query" | undefined;
257
- cacheable?: boolean;
258
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>, import("devframe/utils/simple-schema").SimpleSchema<number | undefined, number | undefined>];
259
- returns: import("devframe/utils/simple-schema").SimpleSchema<string | null, string | null>;
260
- jsonSerializable?: boolean;
261
- agent?: import("devframe").RpcFunctionAgentOptions;
262
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>>) | undefined;
263
- handler?: ((args_0: string, args_1: number | undefined) => import("devframe/rpc").Thenable<string | null>) | undefined;
264
- dump?: import("devframe/rpc").RpcDump<[string, number | undefined], import("devframe/rpc").Thenable<string | null>, import("devframe").DevframeNodeContext> | undefined;
265
- snapshot?: boolean;
266
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>>> | undefined;
267
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>> | undefined;
268
- };
84
+ export declare const readText: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:read-text", "query", readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>, import("devframe/utils/simple-schema").SimpleSchema<number | undefined, number | undefined>], import("devframe/utils/simple-schema").SimpleSchema<string | null, string | null>, import("devframe").DevframeNodeContext>;
269
85
  //#endregion
270
86
  //#region src/node/rpc/functions/rename.d.ts
271
87
  interface RenameArgs {
@@ -279,91 +95,27 @@ interface RenameArgs {
279
95
  */
280
96
  newName: string;
281
97
  }
282
- export declare const rename: {
283
- name: "devframes:plugin:assets:rename";
284
- type?: "action" | undefined;
285
- cacheable?: boolean;
286
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
287
- path: string;
288
- newName: string;
289
- }, {
290
- path: string;
291
- newName: string;
292
- }>];
293
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
294
- path: string;
295
- type: "image" | "font" | "video" | "audio" | "text" | "other";
296
- publicPath: string;
297
- size: number;
298
- mtime: number;
299
- fsPath?: string | undefined;
300
- }, {
301
- path: string;
302
- type: "image" | "font" | "video" | "audio" | "text" | "other";
303
- publicPath: string;
304
- size: number;
305
- mtime: number;
306
- fsPath?: string | undefined;
307
- }>;
308
- jsonSerializable?: boolean;
309
- agent?: import("devframe").RpcFunctionAgentOptions;
310
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
311
- path: string;
312
- newName: string;
313
- }], import("devframe/rpc").Thenable<{
314
- path: string;
315
- type: "image" | "font" | "video" | "audio" | "text" | "other";
316
- publicPath: string;
317
- size: number;
318
- mtime: number;
319
- fsPath?: string | undefined;
320
- }>>>) | undefined;
321
- handler?: ((args_0: {
322
- path: string;
323
- newName: string;
324
- }) => import("devframe/rpc").Thenable<{
325
- path: string;
326
- type: "image" | "font" | "video" | "audio" | "text" | "other";
327
- publicPath: string;
328
- size: number;
329
- mtime: number;
330
- fsPath?: string | undefined;
331
- }>) | undefined;
332
- dump?: import("devframe/rpc").RpcDump<[{
333
- path: string;
334
- newName: string;
335
- }], import("devframe/rpc").Thenable<{
336
- path: string;
337
- type: "image" | "font" | "video" | "audio" | "text" | "other";
338
- publicPath: string;
339
- size: number;
340
- mtime: number;
341
- fsPath?: string | undefined;
342
- }>, import("devframe").DevframeNodeContext> | undefined;
343
- snapshot?: boolean;
344
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
345
- path: string;
346
- newName: string;
347
- }], import("devframe/rpc").Thenable<{
348
- path: string;
349
- type: "image" | "font" | "video" | "audio" | "text" | "other";
350
- publicPath: string;
351
- size: number;
352
- mtime: number;
353
- fsPath?: string | undefined;
354
- }>>>> | undefined;
355
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
356
- path: string;
357
- newName: string;
358
- }], import("devframe/rpc").Thenable<{
359
- path: string;
360
- type: "image" | "font" | "video" | "audio" | "text" | "other";
361
- publicPath: string;
362
- size: number;
363
- mtime: number;
364
- fsPath?: string | undefined;
365
- }>>> | undefined;
366
- };
98
+ export declare const rename: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:rename", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
99
+ path: string;
100
+ newName: string;
101
+ }, {
102
+ path: string;
103
+ newName: string;
104
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
105
+ path: string;
106
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
107
+ publicPath: string;
108
+ size: number;
109
+ mtime: number;
110
+ fsPath?: string | undefined;
111
+ }, {
112
+ path: string;
113
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
114
+ publicPath: string;
115
+ size: number;
116
+ mtime: number;
117
+ fsPath?: string | undefined;
118
+ }>, import("devframe").DevframeNodeContext>;
367
119
  //#endregion
368
120
  //#region src/node/rpc/functions/upload.d.ts
369
121
  /** Streaming channel name, namespaced like every other RPC name in this plugin. */
@@ -373,756 +125,158 @@ export declare const UPLOAD_CHANNEL = "devframes:plugin:assets:upload";
373
125
  * the `upload` channel opened in `setupAssets`; see the client-side
374
126
  * `useUpload` hook for the matching `rpc.streaming.upload()` call.
375
127
  */
376
- export declare const upload: {
377
- name: "devframes:plugin:assets:upload";
378
- type?: "action" | undefined;
379
- cacheable?: boolean;
380
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
381
- path: string;
382
- }, {
383
- path: string;
384
- }>];
385
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
386
- uploadId: string;
387
- }, {
388
- uploadId: string;
389
- }>;
390
- jsonSerializable?: boolean;
391
- agent?: import("devframe").RpcFunctionAgentOptions;
392
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
393
- path: string;
394
- }], import("devframe/rpc").Thenable<{
395
- uploadId: string;
396
- }>>>) | undefined;
397
- handler?: ((args_0: {
398
- path: string;
399
- }) => import("devframe/rpc").Thenable<{
400
- uploadId: string;
401
- }>) | undefined;
402
- dump?: import("devframe/rpc").RpcDump<[{
403
- path: string;
404
- }], import("devframe/rpc").Thenable<{
405
- uploadId: string;
406
- }>, import("devframe").DevframeNodeContext> | undefined;
407
- snapshot?: boolean;
408
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
409
- path: string;
410
- }], import("devframe/rpc").Thenable<{
411
- uploadId: string;
412
- }>>>> | undefined;
413
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
414
- path: string;
415
- }], import("devframe/rpc").Thenable<{
416
- uploadId: string;
417
- }>>> | undefined;
418
- };
128
+ export declare const upload: import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:upload", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
129
+ path: string;
130
+ }, {
131
+ path: string;
132
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
133
+ uploadId: string;
134
+ }, {
135
+ uploadId: string;
136
+ }>, import("devframe").DevframeNodeContext>;
419
137
  //#endregion
420
138
  //#region src/node/rpc/index.d.ts
421
139
  /** Read-only RPC, always registered. */
422
- export declare const readFunctions: readonly [{
423
- name: "devframes:plugin:assets:list";
424
- type?: "query" | undefined;
425
- cacheable?: boolean;
426
- args: readonly [];
427
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
428
- path: string;
429
- type: "image" | "font" | "video" | "audio" | "text" | "other";
430
- publicPath: string;
431
- size: number;
432
- mtime: number;
433
- fsPath?: string | undefined;
434
- }[], {
435
- path: string;
436
- type: "image" | "font" | "video" | "audio" | "text" | "other";
437
- publicPath: string;
438
- size: number;
439
- mtime: number;
440
- fsPath?: string | undefined;
441
- }[]>;
442
- jsonSerializable?: boolean;
443
- agent?: import("devframe").RpcFunctionAgentOptions;
444
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
445
- path: string;
446
- type: "image" | "font" | "video" | "audio" | "text" | "other";
447
- publicPath: string;
448
- size: number;
449
- mtime: number;
450
- fsPath?: string | undefined;
451
- }[]>>>) | undefined;
452
- handler?: (() => import("devframe/rpc").Thenable<{
453
- path: string;
454
- type: "image" | "font" | "video" | "audio" | "text" | "other";
455
- publicPath: string;
456
- size: number;
457
- mtime: number;
458
- fsPath?: string | undefined;
459
- }[]>) | undefined;
460
- dump?: import("devframe/rpc").RpcDump<[], import("devframe/rpc").Thenable<{
461
- path: string;
462
- type: "image" | "font" | "video" | "audio" | "text" | "other";
463
- publicPath: string;
464
- size: number;
465
- mtime: number;
466
- fsPath?: string | undefined;
467
- }[]>, import("devframe").DevframeNodeContext> | undefined;
468
- snapshot?: boolean;
469
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
470
- path: string;
471
- type: "image" | "font" | "video" | "audio" | "text" | "other";
472
- publicPath: string;
473
- size: number;
474
- mtime: number;
475
- fsPath?: string | undefined;
476
- }[]>>>> | undefined;
477
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
478
- path: string;
479
- type: "image" | "font" | "video" | "audio" | "text" | "other";
480
- publicPath: string;
481
- size: number;
482
- mtime: number;
483
- fsPath?: string | undefined;
484
- }[]>>> | undefined;
140
+ export declare const readFunctions: readonly [import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:list", "query", readonly [], import("devframe/utils/simple-schema").SimpleSchema<{
141
+ path: string;
142
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
143
+ publicPath: string;
144
+ size: number;
145
+ mtime: number;
146
+ fsPath?: string | undefined;
147
+ }[], {
148
+ path: string;
149
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
150
+ publicPath: string;
151
+ size: number;
152
+ mtime: number;
153
+ fsPath?: string | undefined;
154
+ }[]>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:read-image-meta", "query", readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>], import("devframe/utils/simple-schema").SimpleSchema<{
155
+ width?: number | undefined;
156
+ height?: number | undefined;
157
+ orientation?: number | undefined;
158
+ } | null, {
159
+ width?: number | undefined;
160
+ height?: number | undefined;
161
+ orientation?: number | undefined;
162
+ } | null>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:read-text", "query", readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>, import("devframe/utils/simple-schema").SimpleSchema<number | undefined, number | undefined>], import("devframe/utils/simple-schema").SimpleSchema<string | null, string | null>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:capabilities", "query", readonly [], import("devframe/utils/simple-schema").SimpleSchema<{
163
+ write: boolean;
164
+ uploadExtensions: string[] | "*";
485
165
  }, {
486
- name: "devframes:plugin:assets:read-image-meta";
487
- type?: "query" | undefined;
488
- cacheable?: boolean;
489
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>];
490
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
491
- width?: number | undefined;
492
- height?: number | undefined;
493
- orientation?: number | undefined;
494
- } | null, {
495
- width?: number | undefined;
496
- height?: number | undefined;
497
- orientation?: number | undefined;
498
- } | null>;
499
- jsonSerializable?: boolean;
500
- agent?: import("devframe").RpcFunctionAgentOptions;
501
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
502
- width?: number | undefined;
503
- height?: number | undefined;
504
- orientation?: number | undefined;
505
- } | null>>>) | undefined;
506
- handler?: ((args_0: string) => import("devframe/rpc").Thenable<{
507
- width?: number | undefined;
508
- height?: number | undefined;
509
- orientation?: number | undefined;
510
- } | null>) | undefined;
511
- dump?: import("devframe/rpc").RpcDump<[string], import("devframe/rpc").Thenable<{
512
- width?: number | undefined;
513
- height?: number | undefined;
514
- orientation?: number | undefined;
515
- } | null>, import("devframe").DevframeNodeContext> | undefined;
516
- snapshot?: boolean;
517
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
518
- width?: number | undefined;
519
- height?: number | undefined;
520
- orientation?: number | undefined;
521
- } | null>>>> | undefined;
522
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
523
- width?: number | undefined;
524
- height?: number | undefined;
525
- orientation?: number | undefined;
526
- } | null>>> | undefined;
166
+ write: boolean;
167
+ uploadExtensions: string[] | "*";
168
+ }>, import("devframe").DevframeNodeContext>];
169
+ /** Mutating RPC, registered only when write actions are enabled. */
170
+ export declare const writeFunctions: readonly [import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:upload", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
171
+ path: string;
527
172
  }, {
528
- name: "devframes:plugin:assets:read-text";
529
- type?: "query" | undefined;
530
- cacheable?: boolean;
531
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>, import("devframe/utils/simple-schema").SimpleSchema<number | undefined, number | undefined>];
532
- returns: import("devframe/utils/simple-schema").SimpleSchema<string | null, string | null>;
533
- jsonSerializable?: boolean;
534
- agent?: import("devframe").RpcFunctionAgentOptions;
535
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>>) | undefined;
536
- handler?: ((args_0: string, args_1: number | undefined) => import("devframe/rpc").Thenable<string | null>) | undefined;
537
- dump?: import("devframe/rpc").RpcDump<[string, number | undefined], import("devframe/rpc").Thenable<string | null>, import("devframe").DevframeNodeContext> | undefined;
538
- snapshot?: boolean;
539
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>>> | undefined;
540
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>> | undefined;
173
+ path: string;
174
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
175
+ uploadId: string;
541
176
  }, {
542
- name: "devframes:plugin:assets:capabilities";
543
- type?: "query" | undefined;
544
- cacheable?: boolean;
545
- args: readonly [];
546
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
547
- write: boolean;
548
- uploadExtensions: string[] | "*";
549
- }, {
550
- write: boolean;
551
- uploadExtensions: string[] | "*";
552
- }>;
553
- jsonSerializable?: boolean;
554
- agent?: import("devframe").RpcFunctionAgentOptions;
555
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
556
- write: boolean;
557
- uploadExtensions: string[] | "*";
558
- }>>>) | undefined;
559
- handler?: (() => import("devframe/rpc").Thenable<{
560
- write: boolean;
561
- uploadExtensions: string[] | "*";
562
- }>) | undefined;
563
- dump?: import("devframe/rpc").RpcDump<[], import("devframe/rpc").Thenable<{
564
- write: boolean;
565
- uploadExtensions: string[] | "*";
566
- }>, import("devframe").DevframeNodeContext> | undefined;
567
- snapshot?: boolean;
568
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
569
- write: boolean;
570
- uploadExtensions: string[] | "*";
571
- }>>>> | undefined;
572
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
573
- write: boolean;
574
- uploadExtensions: string[] | "*";
575
- }>>> | undefined;
576
- }];
577
- /** Mutating RPC, registered only when write actions are enabled. */
578
- export declare const writeFunctions: readonly [{
579
- name: "devframes:plugin:assets:upload";
580
- type?: "action" | undefined;
581
- cacheable?: boolean;
582
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
583
- path: string;
584
- }, {
585
- path: string;
586
- }>];
587
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
588
- uploadId: string;
589
- }, {
590
- uploadId: string;
591
- }>;
592
- jsonSerializable?: boolean;
593
- agent?: import("devframe").RpcFunctionAgentOptions;
594
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
595
- path: string;
596
- }], import("devframe/rpc").Thenable<{
597
- uploadId: string;
598
- }>>>) | undefined;
599
- handler?: ((args_0: {
600
- path: string;
601
- }) => import("devframe/rpc").Thenable<{
602
- uploadId: string;
603
- }>) | undefined;
604
- dump?: import("devframe/rpc").RpcDump<[{
605
- path: string;
606
- }], import("devframe/rpc").Thenable<{
607
- uploadId: string;
608
- }>, import("devframe").DevframeNodeContext> | undefined;
609
- snapshot?: boolean;
610
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
611
- path: string;
612
- }], import("devframe/rpc").Thenable<{
613
- uploadId: string;
614
- }>>>> | undefined;
615
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
616
- path: string;
617
- }], import("devframe/rpc").Thenable<{
618
- uploadId: string;
619
- }>>> | undefined;
177
+ uploadId: string;
178
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:rename", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
179
+ path: string;
180
+ newName: string;
620
181
  }, {
621
- name: "devframes:plugin:assets:rename";
622
- type?: "action" | undefined;
623
- cacheable?: boolean;
624
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
625
- path: string;
626
- newName: string;
627
- }, {
628
- path: string;
629
- newName: string;
630
- }>];
631
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
632
- path: string;
633
- type: "image" | "font" | "video" | "audio" | "text" | "other";
634
- publicPath: string;
635
- size: number;
636
- mtime: number;
637
- fsPath?: string | undefined;
638
- }, {
639
- path: string;
640
- type: "image" | "font" | "video" | "audio" | "text" | "other";
641
- publicPath: string;
642
- size: number;
643
- mtime: number;
644
- fsPath?: string | undefined;
645
- }>;
646
- jsonSerializable?: boolean;
647
- agent?: import("devframe").RpcFunctionAgentOptions;
648
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
649
- path: string;
650
- newName: string;
651
- }], import("devframe/rpc").Thenable<{
652
- path: string;
653
- type: "image" | "font" | "video" | "audio" | "text" | "other";
654
- publicPath: string;
655
- size: number;
656
- mtime: number;
657
- fsPath?: string | undefined;
658
- }>>>) | undefined;
659
- handler?: ((args_0: {
660
- path: string;
661
- newName: string;
662
- }) => import("devframe/rpc").Thenable<{
663
- path: string;
664
- type: "image" | "font" | "video" | "audio" | "text" | "other";
665
- publicPath: string;
666
- size: number;
667
- mtime: number;
668
- fsPath?: string | undefined;
669
- }>) | undefined;
670
- dump?: import("devframe/rpc").RpcDump<[{
671
- path: string;
672
- newName: string;
673
- }], import("devframe/rpc").Thenable<{
674
- path: string;
675
- type: "image" | "font" | "video" | "audio" | "text" | "other";
676
- publicPath: string;
677
- size: number;
678
- mtime: number;
679
- fsPath?: string | undefined;
680
- }>, import("devframe").DevframeNodeContext> | undefined;
681
- snapshot?: boolean;
682
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
683
- path: string;
684
- newName: string;
685
- }], import("devframe/rpc").Thenable<{
686
- path: string;
687
- type: "image" | "font" | "video" | "audio" | "text" | "other";
688
- publicPath: string;
689
- size: number;
690
- mtime: number;
691
- fsPath?: string | undefined;
692
- }>>>> | undefined;
693
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
694
- path: string;
695
- newName: string;
696
- }], import("devframe/rpc").Thenable<{
697
- path: string;
698
- type: "image" | "font" | "video" | "audio" | "text" | "other";
699
- publicPath: string;
700
- size: number;
701
- mtime: number;
702
- fsPath?: string | undefined;
703
- }>>> | undefined;
182
+ path: string;
183
+ newName: string;
184
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
185
+ path: string;
186
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
187
+ publicPath: string;
188
+ size: number;
189
+ mtime: number;
190
+ fsPath?: string | undefined;
704
191
  }, {
705
- name: "devframes:plugin:assets:delete";
706
- type?: "action" | undefined;
707
- cacheable?: boolean;
708
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
709
- paths: string[];
710
- }, {
711
- paths: string[];
712
- }>];
713
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
714
- deleted: string[];
715
- }, {
716
- deleted: string[];
717
- }>;
718
- jsonSerializable?: boolean;
719
- agent?: import("devframe").RpcFunctionAgentOptions;
720
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
721
- paths: string[];
722
- }], import("devframe/rpc").Thenable<{
723
- deleted: string[];
724
- }>>>) | undefined;
725
- handler?: ((args_0: {
726
- paths: string[];
727
- }) => import("devframe/rpc").Thenable<{
728
- deleted: string[];
729
- }>) | undefined;
730
- dump?: import("devframe/rpc").RpcDump<[{
731
- paths: string[];
732
- }], import("devframe/rpc").Thenable<{
733
- deleted: string[];
734
- }>, import("devframe").DevframeNodeContext> | undefined;
735
- snapshot?: boolean;
736
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
737
- paths: string[];
738
- }], import("devframe/rpc").Thenable<{
739
- deleted: string[];
740
- }>>>> | undefined;
741
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
742
- paths: string[];
743
- }], import("devframe/rpc").Thenable<{
744
- deleted: string[];
745
- }>>> | undefined;
192
+ path: string;
193
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
194
+ publicPath: string;
195
+ size: number;
196
+ mtime: number;
197
+ fsPath?: string | undefined;
198
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:delete", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
199
+ paths: string[];
746
200
  }, {
747
- name: "devframes:plugin:assets:mkdir";
748
- type?: "action" | undefined;
749
- cacheable?: boolean;
750
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
751
- path: string;
752
- }, {
753
- path: string;
754
- }>];
755
- returns: import("devframe/utils/simple-schema").SimpleSchema<void, void>;
756
- jsonSerializable?: boolean;
757
- agent?: import("devframe").RpcFunctionAgentOptions;
758
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
759
- path: string;
760
- }], import("devframe/rpc").Thenable<void>>>) | undefined;
761
- handler?: ((args_0: {
762
- path: string;
763
- }) => import("devframe/rpc").Thenable<void>) | undefined;
764
- dump?: import("devframe/rpc").RpcDump<[{
765
- path: string;
766
- }], import("devframe/rpc").Thenable<void>, import("devframe").DevframeNodeContext> | undefined;
767
- snapshot?: boolean;
768
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
769
- path: string;
770
- }], import("devframe/rpc").Thenable<void>>>> | undefined;
771
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
772
- path: string;
773
- }], import("devframe/rpc").Thenable<void>>> | undefined;
774
- }];
775
- export declare const serverFunctions: readonly [{
776
- name: "devframes:plugin:assets:list";
777
- type?: "query" | undefined;
778
- cacheable?: boolean;
779
- args: readonly [];
780
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
781
- path: string;
782
- type: "image" | "font" | "video" | "audio" | "text" | "other";
783
- publicPath: string;
784
- size: number;
785
- mtime: number;
786
- fsPath?: string | undefined;
787
- }[], {
788
- path: string;
789
- type: "image" | "font" | "video" | "audio" | "text" | "other";
790
- publicPath: string;
791
- size: number;
792
- mtime: number;
793
- fsPath?: string | undefined;
794
- }[]>;
795
- jsonSerializable?: boolean;
796
- agent?: import("devframe").RpcFunctionAgentOptions;
797
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
798
- path: string;
799
- type: "image" | "font" | "video" | "audio" | "text" | "other";
800
- publicPath: string;
801
- size: number;
802
- mtime: number;
803
- fsPath?: string | undefined;
804
- }[]>>>) | undefined;
805
- handler?: (() => import("devframe/rpc").Thenable<{
806
- path: string;
807
- type: "image" | "font" | "video" | "audio" | "text" | "other";
808
- publicPath: string;
809
- size: number;
810
- mtime: number;
811
- fsPath?: string | undefined;
812
- }[]>) | undefined;
813
- dump?: import("devframe/rpc").RpcDump<[], import("devframe/rpc").Thenable<{
814
- path: string;
815
- type: "image" | "font" | "video" | "audio" | "text" | "other";
816
- publicPath: string;
817
- size: number;
818
- mtime: number;
819
- fsPath?: string | undefined;
820
- }[]>, import("devframe").DevframeNodeContext> | undefined;
821
- snapshot?: boolean;
822
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
823
- path: string;
824
- type: "image" | "font" | "video" | "audio" | "text" | "other";
825
- publicPath: string;
826
- size: number;
827
- mtime: number;
828
- fsPath?: string | undefined;
829
- }[]>>>> | undefined;
830
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
831
- path: string;
832
- type: "image" | "font" | "video" | "audio" | "text" | "other";
833
- publicPath: string;
834
- size: number;
835
- mtime: number;
836
- fsPath?: string | undefined;
837
- }[]>>> | undefined;
201
+ paths: string[];
202
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
203
+ deleted: string[];
838
204
  }, {
839
- name: "devframes:plugin:assets:read-image-meta";
840
- type?: "query" | undefined;
841
- cacheable?: boolean;
842
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>];
843
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
844
- width?: number | undefined;
845
- height?: number | undefined;
846
- orientation?: number | undefined;
847
- } | null, {
848
- width?: number | undefined;
849
- height?: number | undefined;
850
- orientation?: number | undefined;
851
- } | null>;
852
- jsonSerializable?: boolean;
853
- agent?: import("devframe").RpcFunctionAgentOptions;
854
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
855
- width?: number | undefined;
856
- height?: number | undefined;
857
- orientation?: number | undefined;
858
- } | null>>>) | undefined;
859
- handler?: ((args_0: string) => import("devframe/rpc").Thenable<{
860
- width?: number | undefined;
861
- height?: number | undefined;
862
- orientation?: number | undefined;
863
- } | null>) | undefined;
864
- dump?: import("devframe/rpc").RpcDump<[string], import("devframe/rpc").Thenable<{
865
- width?: number | undefined;
866
- height?: number | undefined;
867
- orientation?: number | undefined;
868
- } | null>, import("devframe").DevframeNodeContext> | undefined;
869
- snapshot?: boolean;
870
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
871
- width?: number | undefined;
872
- height?: number | undefined;
873
- orientation?: number | undefined;
874
- } | null>>>> | undefined;
875
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string], import("devframe/rpc").Thenable<{
876
- width?: number | undefined;
877
- height?: number | undefined;
878
- orientation?: number | undefined;
879
- } | null>>> | undefined;
205
+ deleted: string[];
206
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:mkdir", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
207
+ path: string;
880
208
  }, {
881
- name: "devframes:plugin:assets:read-text";
882
- type?: "query" | undefined;
883
- cacheable?: boolean;
884
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>, import("devframe/utils/simple-schema").SimpleSchema<number | undefined, number | undefined>];
885
- returns: import("devframe/utils/simple-schema").SimpleSchema<string | null, string | null>;
886
- jsonSerializable?: boolean;
887
- agent?: import("devframe").RpcFunctionAgentOptions;
888
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>>) | undefined;
889
- handler?: ((args_0: string, args_1: number | undefined) => import("devframe/rpc").Thenable<string | null>) | undefined;
890
- dump?: import("devframe/rpc").RpcDump<[string, number | undefined], import("devframe/rpc").Thenable<string | null>, import("devframe").DevframeNodeContext> | undefined;
891
- snapshot?: boolean;
892
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>>> | undefined;
893
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[string, number | undefined], import("devframe/rpc").Thenable<string | null>>> | undefined;
209
+ path: string;
210
+ }>], import("devframe/utils/simple-schema").SimpleSchema<void, void>, import("devframe").DevframeNodeContext>];
211
+ export declare const serverFunctions: readonly [import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:list", "query", readonly [], import("devframe/utils/simple-schema").SimpleSchema<{
212
+ path: string;
213
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
214
+ publicPath: string;
215
+ size: number;
216
+ mtime: number;
217
+ fsPath?: string | undefined;
218
+ }[], {
219
+ path: string;
220
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
221
+ publicPath: string;
222
+ size: number;
223
+ mtime: number;
224
+ fsPath?: string | undefined;
225
+ }[]>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:read-image-meta", "query", readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>], import("devframe/utils/simple-schema").SimpleSchema<{
226
+ width?: number | undefined;
227
+ height?: number | undefined;
228
+ orientation?: number | undefined;
229
+ } | null, {
230
+ width?: number | undefined;
231
+ height?: number | undefined;
232
+ orientation?: number | undefined;
233
+ } | null>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:read-text", "query", readonly [import("devframe/utils/simple-schema").SimpleSchema<string, string>, import("devframe/utils/simple-schema").SimpleSchema<number | undefined, number | undefined>], import("devframe/utils/simple-schema").SimpleSchema<string | null, string | null>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:capabilities", "query", readonly [], import("devframe/utils/simple-schema").SimpleSchema<{
234
+ write: boolean;
235
+ uploadExtensions: string[] | "*";
236
+ }, {
237
+ write: boolean;
238
+ uploadExtensions: string[] | "*";
239
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:upload", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
240
+ path: string;
894
241
  }, {
895
- name: "devframes:plugin:assets:capabilities";
896
- type?: "query" | undefined;
897
- cacheable?: boolean;
898
- args: readonly [];
899
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
900
- write: boolean;
901
- uploadExtensions: string[] | "*";
902
- }, {
903
- write: boolean;
904
- uploadExtensions: string[] | "*";
905
- }>;
906
- jsonSerializable?: boolean;
907
- agent?: import("devframe").RpcFunctionAgentOptions;
908
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
909
- write: boolean;
910
- uploadExtensions: string[] | "*";
911
- }>>>) | undefined;
912
- handler?: (() => import("devframe/rpc").Thenable<{
913
- write: boolean;
914
- uploadExtensions: string[] | "*";
915
- }>) | undefined;
916
- dump?: import("devframe/rpc").RpcDump<[], import("devframe/rpc").Thenable<{
917
- write: boolean;
918
- uploadExtensions: string[] | "*";
919
- }>, import("devframe").DevframeNodeContext> | undefined;
920
- snapshot?: boolean;
921
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
922
- write: boolean;
923
- uploadExtensions: string[] | "*";
924
- }>>>> | undefined;
925
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[], import("devframe/rpc").Thenable<{
926
- write: boolean;
927
- uploadExtensions: string[] | "*";
928
- }>>> | undefined;
242
+ path: string;
243
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
244
+ uploadId: string;
245
+ }, {
246
+ uploadId: string;
247
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:rename", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
248
+ path: string;
249
+ newName: string;
250
+ }, {
251
+ path: string;
252
+ newName: string;
253
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
254
+ path: string;
255
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
256
+ publicPath: string;
257
+ size: number;
258
+ mtime: number;
259
+ fsPath?: string | undefined;
929
260
  }, {
930
- name: "devframes:plugin:assets:upload";
931
- type?: "action" | undefined;
932
- cacheable?: boolean;
933
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
934
- path: string;
935
- }, {
936
- path: string;
937
- }>];
938
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
939
- uploadId: string;
940
- }, {
941
- uploadId: string;
942
- }>;
943
- jsonSerializable?: boolean;
944
- agent?: import("devframe").RpcFunctionAgentOptions;
945
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
946
- path: string;
947
- }], import("devframe/rpc").Thenable<{
948
- uploadId: string;
949
- }>>>) | undefined;
950
- handler?: ((args_0: {
951
- path: string;
952
- }) => import("devframe/rpc").Thenable<{
953
- uploadId: string;
954
- }>) | undefined;
955
- dump?: import("devframe/rpc").RpcDump<[{
956
- path: string;
957
- }], import("devframe/rpc").Thenable<{
958
- uploadId: string;
959
- }>, import("devframe").DevframeNodeContext> | undefined;
960
- snapshot?: boolean;
961
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
962
- path: string;
963
- }], import("devframe/rpc").Thenable<{
964
- uploadId: string;
965
- }>>>> | undefined;
966
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
967
- path: string;
968
- }], import("devframe/rpc").Thenable<{
969
- uploadId: string;
970
- }>>> | undefined;
261
+ path: string;
262
+ type: "image" | "font" | "video" | "audio" | "text" | "other";
263
+ publicPath: string;
264
+ size: number;
265
+ mtime: number;
266
+ fsPath?: string | undefined;
267
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:delete", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
268
+ paths: string[];
971
269
  }, {
972
- name: "devframes:plugin:assets:rename";
973
- type?: "action" | undefined;
974
- cacheable?: boolean;
975
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
976
- path: string;
977
- newName: string;
978
- }, {
979
- path: string;
980
- newName: string;
981
- }>];
982
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
983
- path: string;
984
- type: "image" | "font" | "video" | "audio" | "text" | "other";
985
- publicPath: string;
986
- size: number;
987
- mtime: number;
988
- fsPath?: string | undefined;
989
- }, {
990
- path: string;
991
- type: "image" | "font" | "video" | "audio" | "text" | "other";
992
- publicPath: string;
993
- size: number;
994
- mtime: number;
995
- fsPath?: string | undefined;
996
- }>;
997
- jsonSerializable?: boolean;
998
- agent?: import("devframe").RpcFunctionAgentOptions;
999
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1000
- path: string;
1001
- newName: string;
1002
- }], import("devframe/rpc").Thenable<{
1003
- path: string;
1004
- type: "image" | "font" | "video" | "audio" | "text" | "other";
1005
- publicPath: string;
1006
- size: number;
1007
- mtime: number;
1008
- fsPath?: string | undefined;
1009
- }>>>) | undefined;
1010
- handler?: ((args_0: {
1011
- path: string;
1012
- newName: string;
1013
- }) => import("devframe/rpc").Thenable<{
1014
- path: string;
1015
- type: "image" | "font" | "video" | "audio" | "text" | "other";
1016
- publicPath: string;
1017
- size: number;
1018
- mtime: number;
1019
- fsPath?: string | undefined;
1020
- }>) | undefined;
1021
- dump?: import("devframe/rpc").RpcDump<[{
1022
- path: string;
1023
- newName: string;
1024
- }], import("devframe/rpc").Thenable<{
1025
- path: string;
1026
- type: "image" | "font" | "video" | "audio" | "text" | "other";
1027
- publicPath: string;
1028
- size: number;
1029
- mtime: number;
1030
- fsPath?: string | undefined;
1031
- }>, import("devframe").DevframeNodeContext> | undefined;
1032
- snapshot?: boolean;
1033
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1034
- path: string;
1035
- newName: string;
1036
- }], import("devframe/rpc").Thenable<{
1037
- path: string;
1038
- type: "image" | "font" | "video" | "audio" | "text" | "other";
1039
- publicPath: string;
1040
- size: number;
1041
- mtime: number;
1042
- fsPath?: string | undefined;
1043
- }>>>> | undefined;
1044
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1045
- path: string;
1046
- newName: string;
1047
- }], import("devframe/rpc").Thenable<{
1048
- path: string;
1049
- type: "image" | "font" | "video" | "audio" | "text" | "other";
1050
- publicPath: string;
1051
- size: number;
1052
- mtime: number;
1053
- fsPath?: string | undefined;
1054
- }>>> | undefined;
270
+ paths: string[];
271
+ }>], import("devframe/utils/simple-schema").SimpleSchema<{
272
+ deleted: string[];
1055
273
  }, {
1056
- name: "devframes:plugin:assets:delete";
1057
- type?: "action" | undefined;
1058
- cacheable?: boolean;
1059
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
1060
- paths: string[];
1061
- }, {
1062
- paths: string[];
1063
- }>];
1064
- returns: import("devframe/utils/simple-schema").SimpleSchema<{
1065
- deleted: string[];
1066
- }, {
1067
- deleted: string[];
1068
- }>;
1069
- jsonSerializable?: boolean;
1070
- agent?: import("devframe").RpcFunctionAgentOptions;
1071
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1072
- paths: string[];
1073
- }], import("devframe/rpc").Thenable<{
1074
- deleted: string[];
1075
- }>>>) | undefined;
1076
- handler?: ((args_0: {
1077
- paths: string[];
1078
- }) => import("devframe/rpc").Thenable<{
1079
- deleted: string[];
1080
- }>) | undefined;
1081
- dump?: import("devframe/rpc").RpcDump<[{
1082
- paths: string[];
1083
- }], import("devframe/rpc").Thenable<{
1084
- deleted: string[];
1085
- }>, import("devframe").DevframeNodeContext> | undefined;
1086
- snapshot?: boolean;
1087
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1088
- paths: string[];
1089
- }], import("devframe/rpc").Thenable<{
1090
- deleted: string[];
1091
- }>>>> | undefined;
1092
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1093
- paths: string[];
1094
- }], import("devframe/rpc").Thenable<{
1095
- deleted: string[];
1096
- }>>> | undefined;
274
+ deleted: string[];
275
+ }>, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithSchemas<"devframes:plugin:assets:mkdir", "action", readonly [import("devframe/utils/simple-schema").SimpleSchema<{
276
+ path: string;
1097
277
  }, {
1098
- name: "devframes:plugin:assets:mkdir";
1099
- type?: "action" | undefined;
1100
- cacheable?: boolean;
1101
- args: readonly [import("devframe/utils/simple-schema").SimpleSchema<{
1102
- path: string;
1103
- }, {
1104
- path: string;
1105
- }>];
1106
- returns: import("devframe/utils/simple-schema").SimpleSchema<void, void>;
1107
- jsonSerializable?: boolean;
1108
- agent?: import("devframe").RpcFunctionAgentOptions;
1109
- setup?: ((context: import("devframe").DevframeNodeContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1110
- path: string;
1111
- }], import("devframe/rpc").Thenable<void>>>) | undefined;
1112
- handler?: ((args_0: {
1113
- path: string;
1114
- }) => import("devframe/rpc").Thenable<void>) | undefined;
1115
- dump?: import("devframe/rpc").RpcDump<[{
1116
- path: string;
1117
- }], import("devframe/rpc").Thenable<void>, import("devframe").DevframeNodeContext> | undefined;
1118
- snapshot?: boolean;
1119
- __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1120
- path: string;
1121
- }], import("devframe/rpc").Thenable<void>>>> | undefined;
1122
- __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[{
1123
- path: string;
1124
- }], import("devframe/rpc").Thenable<void>>> | undefined;
1125
- }];
278
+ path: string;
279
+ }>], import("devframe/utils/simple-schema").SimpleSchema<void, void>, import("devframe").DevframeNodeContext>];
1126
280
  declare module 'devframe' {
1127
281
  interface DevframeRpcServerFunctions extends RpcDefinitionsToFunctions<typeof serverFunctions> {}
1128
282
  }