@venizia/ignis 0.2.0-21 → 0.2.0-23

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.
@@ -1,555 +1,26 @@
1
- import { z } from '@hono/zod-openapi';
2
- export declare const StaticAssetDefinitions: {
3
- GET_BUCKETS: {
4
- method: "get";
5
- path: string;
6
- responses: {
7
- 200: {
8
- description: string;
9
- content: {
10
- 'application/json': {
11
- schema: z.ZodArray<z.ZodObject<{
12
- name: z.ZodString;
13
- creationDate: z.ZodISODateTime;
14
- }, z.core.$strip>>;
15
- };
16
- };
17
- required: boolean | undefined;
18
- } | {
19
- headers: never;
20
- description: string;
21
- content: {
22
- 'application/json': {
23
- schema: z.ZodArray<z.ZodObject<{
24
- name: z.ZodString;
25
- creationDate: z.ZodISODateTime;
26
- }, z.core.$strip>>;
27
- };
28
- };
29
- required: boolean | undefined;
30
- };
31
- "4xx | 5xx": {
32
- description: string;
33
- content: {
34
- "application/json": {
35
- schema: z.ZodObject<{
36
- statusCode: z.ZodOptional<z.ZodNumber>;
37
- message: z.ZodString;
38
- normalized: z.ZodOptional<z.ZodObject<{
39
- text: z.ZodString;
40
- code: z.ZodString;
41
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
42
- }, z.core.$strip>>;
43
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
44
- requestId: z.ZodOptional<z.ZodString>;
45
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
46
- }, z.core.$strip>;
47
- };
48
- };
49
- required: boolean | undefined;
50
- };
51
- };
52
- };
53
- GET_BUCKET_BY_NAME: {
54
- method: "get";
55
- path: string;
56
- request: {
57
- params: z.ZodObject<{
58
- bucketName: z.ZodString;
59
- }, z.core.$strip>;
60
- };
61
- responses: {
62
- 200: {
63
- description: string;
64
- content: {
65
- 'application/json': {
66
- schema: z.ZodNullable<z.ZodObject<{
67
- name: z.ZodString;
68
- creationDate: z.ZodISODateTime;
69
- }, z.core.$strip>>;
70
- };
71
- };
72
- required: boolean | undefined;
73
- } | {
74
- headers: never;
75
- description: string;
76
- content: {
77
- 'application/json': {
78
- schema: z.ZodNullable<z.ZodObject<{
79
- name: z.ZodString;
80
- creationDate: z.ZodISODateTime;
81
- }, z.core.$strip>>;
82
- };
83
- };
84
- required: boolean | undefined;
85
- };
86
- "4xx | 5xx": {
87
- description: string;
88
- content: {
89
- "application/json": {
90
- schema: z.ZodObject<{
91
- statusCode: z.ZodOptional<z.ZodNumber>;
92
- message: z.ZodString;
93
- normalized: z.ZodOptional<z.ZodObject<{
94
- text: z.ZodString;
95
- code: z.ZodString;
96
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
97
- }, z.core.$strip>>;
98
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
99
- requestId: z.ZodOptional<z.ZodString>;
100
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
101
- }, z.core.$strip>;
102
- };
103
- };
104
- required: boolean | undefined;
105
- };
106
- };
107
- };
108
- CREATE_BUCKET: {
109
- method: "post";
110
- path: string;
111
- request: {
112
- params: z.ZodObject<{
113
- bucketName: z.ZodString;
114
- }, z.core.$strip>;
115
- };
116
- responses: {
117
- 200: {
118
- description: string;
119
- content: {
120
- 'application/json': {
121
- schema: z.ZodNullable<z.ZodObject<{
122
- name: z.ZodString;
123
- creationDate: z.ZodISODateTime;
124
- }, z.core.$strip>>;
125
- };
126
- };
127
- required: boolean | undefined;
128
- } | {
129
- headers: never;
130
- description: string;
131
- content: {
132
- 'application/json': {
133
- schema: z.ZodNullable<z.ZodObject<{
134
- name: z.ZodString;
135
- creationDate: z.ZodISODateTime;
136
- }, z.core.$strip>>;
137
- };
138
- };
139
- required: boolean | undefined;
140
- };
141
- "4xx | 5xx": {
142
- description: string;
143
- content: {
144
- "application/json": {
145
- schema: z.ZodObject<{
146
- statusCode: z.ZodOptional<z.ZodNumber>;
147
- message: z.ZodString;
148
- normalized: z.ZodOptional<z.ZodObject<{
149
- text: z.ZodString;
150
- code: z.ZodString;
151
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
152
- }, z.core.$strip>>;
153
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
154
- requestId: z.ZodOptional<z.ZodString>;
155
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
156
- }, z.core.$strip>;
157
- };
158
- };
159
- required: boolean | undefined;
160
- };
161
- };
162
- };
163
- GET_OBJECT_BY_NAME: {
164
- method: "get";
165
- path: string;
166
- request: {
167
- params: z.ZodObject<{
168
- bucketName: z.ZodString;
169
- objectName: z.ZodString;
170
- }, z.core.$strip>;
171
- };
172
- responses: {
173
- 200: {
174
- description: string;
175
- content: {
176
- 'application/octet-stream': {
177
- schema: {
178
- type: "string";
179
- format: string;
180
- };
181
- };
182
- };
183
- };
184
- "4xx | 5xx": {
185
- description: string;
186
- content: {
187
- 'application/json': {
188
- schema: z.ZodObject<{
189
- statusCode: z.ZodOptional<z.ZodNumber>;
190
- message: z.ZodString;
191
- normalized: z.ZodOptional<z.ZodObject<{
192
- text: z.ZodString;
193
- code: z.ZodString;
194
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
195
- }, z.core.$strip>>;
196
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
197
- requestId: z.ZodOptional<z.ZodString>;
198
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
199
- }, z.core.$strip>;
200
- };
201
- };
202
- required: boolean | undefined;
203
- };
204
- };
205
- };
206
- DOWNLOAD_OBJECT_BY_NAME: {
207
- method: "get";
208
- path: string;
209
- request: {
210
- params: z.ZodObject<{
211
- bucketName: z.ZodString;
212
- objectName: z.ZodString;
213
- }, z.core.$strip>;
214
- };
215
- responses: {
216
- 200: {
217
- description: string;
218
- content: {
219
- 'application/octet-stream': {
220
- schema: {
221
- type: "string";
222
- format: string;
223
- };
224
- };
225
- };
226
- };
227
- "4xx | 5xx": {
228
- description: string;
229
- content: {
230
- 'application/json': {
231
- schema: z.ZodObject<{
232
- statusCode: z.ZodOptional<z.ZodNumber>;
233
- message: z.ZodString;
234
- normalized: z.ZodOptional<z.ZodObject<{
235
- text: z.ZodString;
236
- code: z.ZodString;
237
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
238
- }, z.core.$strip>>;
239
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
240
- requestId: z.ZodOptional<z.ZodString>;
241
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
242
- }, z.core.$strip>;
243
- };
244
- };
245
- required: boolean | undefined;
246
- };
247
- };
248
- };
249
- UPLOAD: {
250
- method: "post";
251
- path: string;
252
- request: {
253
- params: z.ZodObject<{
254
- bucketName: z.ZodString;
255
- }, z.core.$strip>;
256
- query: z.ZodObject<{
257
- principalType: z.ZodOptional<z.ZodString>;
258
- principalId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
259
- variant: z.ZodOptional<z.ZodString>;
260
- folderPath: z.ZodOptional<z.ZodString>;
261
- }, z.core.$strip>;
262
- body: {
263
- content: {
264
- 'multipart/form-data': {
265
- schema: z.ZodObject<{
266
- files: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodArray<z.ZodCustom<File, File>>]>;
267
- }, z.core.$strip>;
268
- };
269
- };
270
- };
271
- };
272
- responses: {
273
- 200: {
274
- description: string;
275
- content: {
276
- 'application/json': {
277
- schema: z.ZodArray<z.ZodObject<{
278
- objectName: z.ZodString;
279
- link: z.ZodString;
280
- bucketName: z.ZodString;
281
- metaLink: z.ZodOptional<z.ZodAny>;
282
- metaLinkError: z.ZodOptional<z.ZodString>;
283
- }, z.core.$strip>>;
284
- };
285
- };
286
- required: boolean | undefined;
287
- } | {
288
- headers: never;
289
- description: string;
290
- content: {
291
- 'application/json': {
292
- schema: z.ZodArray<z.ZodObject<{
293
- objectName: z.ZodString;
294
- link: z.ZodString;
295
- bucketName: z.ZodString;
296
- metaLink: z.ZodOptional<z.ZodAny>;
297
- metaLinkError: z.ZodOptional<z.ZodString>;
298
- }, z.core.$strip>>;
299
- };
300
- };
301
- required: boolean | undefined;
302
- };
303
- "4xx | 5xx": {
304
- description: string;
305
- content: {
306
- "application/json": {
307
- schema: z.ZodObject<{
308
- statusCode: z.ZodOptional<z.ZodNumber>;
309
- message: z.ZodString;
310
- normalized: z.ZodOptional<z.ZodObject<{
311
- text: z.ZodString;
312
- code: z.ZodString;
313
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
314
- }, z.core.$strip>>;
315
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
316
- requestId: z.ZodOptional<z.ZodString>;
317
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
318
- }, z.core.$strip>;
319
- };
320
- };
321
- required: boolean | undefined;
322
- };
323
- };
324
- };
325
- DELETE_BUCKET: {
326
- method: "delete";
327
- path: string;
328
- request: {
329
- params: z.ZodObject<{
330
- bucketName: z.ZodString;
331
- }, z.core.$strip>;
332
- };
333
- responses: {
334
- 200: {
335
- description: string;
336
- content: {
337
- 'application/json': {
338
- schema: z.ZodObject<{
339
- isDeleted: z.ZodBoolean;
340
- }, z.core.$strip>;
341
- };
342
- };
343
- required: boolean | undefined;
344
- } | {
345
- headers: never;
346
- description: string;
347
- content: {
348
- 'application/json': {
349
- schema: z.ZodObject<{
350
- isDeleted: z.ZodBoolean;
351
- }, z.core.$strip>;
352
- };
353
- };
354
- required: boolean | undefined;
355
- };
356
- "4xx | 5xx": {
357
- description: string;
358
- content: {
359
- "application/json": {
360
- schema: z.ZodObject<{
361
- statusCode: z.ZodOptional<z.ZodNumber>;
362
- message: z.ZodString;
363
- normalized: z.ZodOptional<z.ZodObject<{
364
- text: z.ZodString;
365
- code: z.ZodString;
366
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
367
- }, z.core.$strip>>;
368
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
369
- requestId: z.ZodOptional<z.ZodString>;
370
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
371
- }, z.core.$strip>;
372
- };
373
- };
374
- required: boolean | undefined;
375
- };
376
- };
377
- };
378
- DELETE_OBJECT: {
379
- method: "delete";
380
- path: string;
381
- request: {
382
- params: z.ZodObject<{
383
- bucketName: z.ZodString;
384
- objectName: z.ZodString;
385
- }, z.core.$strip>;
386
- };
387
- responses: {
388
- 200: {
389
- description: string;
390
- content: {
391
- 'application/json': {
392
- schema: z.ZodObject<{
393
- success: z.ZodBoolean;
394
- }, z.core.$strip>;
395
- };
396
- };
397
- required: boolean | undefined;
398
- } | {
399
- headers: never;
400
- description: string;
401
- content: {
402
- 'application/json': {
403
- schema: z.ZodObject<{
404
- success: z.ZodBoolean;
405
- }, z.core.$strip>;
406
- };
407
- };
408
- required: boolean | undefined;
409
- };
410
- "4xx | 5xx": {
411
- description: string;
412
- content: {
413
- "application/json": {
414
- schema: z.ZodObject<{
415
- statusCode: z.ZodOptional<z.ZodNumber>;
416
- message: z.ZodString;
417
- normalized: z.ZodOptional<z.ZodObject<{
418
- text: z.ZodString;
419
- code: z.ZodString;
420
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
421
- }, z.core.$strip>>;
422
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
423
- requestId: z.ZodOptional<z.ZodString>;
424
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
425
- }, z.core.$strip>;
426
- };
427
- };
428
- required: boolean | undefined;
429
- };
430
- };
431
- };
432
- LIST_OBJECTS: {
433
- method: "get";
434
- path: string;
435
- request: {
436
- params: z.ZodObject<{
437
- bucketName: z.ZodString;
438
- }, z.core.$strip>;
439
- query: z.ZodObject<{
440
- prefix: z.ZodOptional<z.ZodString>;
441
- recursive: z.ZodOptional<z.ZodString>;
442
- maxKeys: z.ZodOptional<z.ZodString>;
443
- }, z.core.$strip>;
444
- };
445
- responses: {
446
- 200: {
447
- description: string;
448
- content: {
449
- 'application/json': {
450
- schema: z.ZodArray<z.ZodObject<{
451
- name: z.ZodOptional<z.ZodString>;
452
- size: z.ZodOptional<z.ZodNumber>;
453
- lastModified: z.ZodOptional<z.ZodISODateTime>;
454
- etag: z.ZodOptional<z.ZodString>;
455
- prefix: z.ZodOptional<z.ZodString>;
456
- }, z.core.$strip>>;
457
- };
458
- };
459
- required: boolean | undefined;
460
- } | {
461
- headers: never;
462
- description: string;
463
- content: {
464
- 'application/json': {
465
- schema: z.ZodArray<z.ZodObject<{
466
- name: z.ZodOptional<z.ZodString>;
467
- size: z.ZodOptional<z.ZodNumber>;
468
- lastModified: z.ZodOptional<z.ZodISODateTime>;
469
- etag: z.ZodOptional<z.ZodString>;
470
- prefix: z.ZodOptional<z.ZodString>;
471
- }, z.core.$strip>>;
472
- };
473
- };
474
- required: boolean | undefined;
475
- };
476
- "4xx | 5xx": {
477
- description: string;
478
- content: {
479
- "application/json": {
480
- schema: z.ZodObject<{
481
- statusCode: z.ZodOptional<z.ZodNumber>;
482
- message: z.ZodString;
483
- normalized: z.ZodOptional<z.ZodObject<{
484
- text: z.ZodString;
485
- code: z.ZodString;
486
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
487
- }, z.core.$strip>>;
488
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
489
- requestId: z.ZodOptional<z.ZodString>;
490
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
491
- }, z.core.$strip>;
492
- };
493
- };
494
- required: boolean | undefined;
495
- };
496
- };
497
- };
498
- RECREATE_METALINK: {
499
- method: "put";
500
- path: string;
501
- request: {
502
- params: z.ZodObject<{
503
- bucketName: z.ZodString;
504
- objectName: z.ZodString;
505
- }, z.core.$strip>;
506
- };
507
- responses: {
508
- 200: {
509
- description: string;
510
- content: {
511
- 'application/json': {
512
- schema: z.ZodObject<{
513
- success: z.ZodBoolean;
514
- metaLink: z.ZodOptional<z.ZodAny>;
515
- }, z.core.$strip>;
516
- };
517
- };
518
- required: boolean | undefined;
519
- } | {
520
- headers: never;
521
- description: string;
522
- content: {
523
- 'application/json': {
524
- schema: z.ZodObject<{
525
- success: z.ZodBoolean;
526
- metaLink: z.ZodOptional<z.ZodAny>;
527
- }, z.core.$strip>;
528
- };
529
- };
530
- required: boolean | undefined;
531
- };
532
- "4xx | 5xx": {
533
- description: string;
534
- content: {
535
- "application/json": {
536
- schema: z.ZodObject<{
537
- statusCode: z.ZodOptional<z.ZodNumber>;
538
- message: z.ZodString;
539
- normalized: z.ZodOptional<z.ZodObject<{
540
- text: z.ZodString;
541
- code: z.ZodString;
542
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
543
- }, z.core.$strip>>;
544
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
545
- requestId: z.ZodOptional<z.ZodString>;
546
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
547
- }, z.core.$strip>;
548
- };
549
- };
550
- required: boolean | undefined;
551
- };
552
- };
553
- };
554
- };
1
+ import type { IAuthRouteConfig } from '../../../base';
2
+ /** The ten built-in asset routes. Only `path` and `request.params` differ between option combinations. */
3
+ export interface IAssetDefinitions {
4
+ GET_BUCKETS: IAuthRouteConfig;
5
+ GET_BUCKET_BY_NAME: IAuthRouteConfig;
6
+ CREATE_BUCKET: IAuthRouteConfig;
7
+ DELETE_BUCKET: IAuthRouteConfig;
8
+ GET_OBJECT_BY_NAME: IAuthRouteConfig;
9
+ DOWNLOAD_OBJECT_BY_NAME: IAuthRouteConfig;
10
+ UPLOAD: IAuthRouteConfig;
11
+ DELETE_OBJECT: IAuthRouteConfig;
12
+ LIST_OBJECTS: IAuthRouteConfig;
13
+ RECREATE_METALINK: IAuthRouteConfig;
14
+ }
15
+ /**
16
+ * Builds the route configs of one asset controller.
17
+ * `hasConfiguredBucket` drops `/buckets/{bucketName}` and its param from every object route.
18
+ * `rawObjectPath` appends the `{.+}` catch-all, the spelling `@hono/zod-openapi` translates.
19
+ */
20
+ export declare const buildAssetDefinitions: (opts: {
21
+ hasConfiguredBucket?: boolean;
22
+ rawObjectPath?: boolean;
23
+ }) => IAssetDefinitions;
24
+ /** The bucket-in-path shape, unchanged - every existing importer keeps working. */
25
+ export declare const StaticAssetDefinitions: IAssetDefinitions;
555
26
  //# sourceMappingURL=base.definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.definition.d.ts","sourceRoot":"","sources":["../../../../src/components/static-asset/controller/base.definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AActC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoUlC,CAAC"}
1
+ {"version":3,"file":"base.definition.d.ts","sourceRoot":"","sources":["../../../../src/components/static-asset/controller/base.definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAoD/C,0GAA0G;AAC1G,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,aAAa,EAAE,gBAAgB,CAAC;IAChC,aAAa,EAAE,gBAAgB,CAAC;IAChC,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,uBAAuB,EAAE,gBAAgB,CAAC;IAC1C,MAAM,EAAE,gBAAgB,CAAC;IACzB,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,iBAAiB,EAAE,gBAAgB,CAAC;CACrC;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,KAAG,iBA+MH,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,mBAA4B,CAAC"}