@isardsat/editorial-common 6.3.3 → 6.4.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 +6 -0
- package/dist/schemas.d.ts +18 -0
- package/dist/schemas.js +6 -0
- package/dist/types.d.ts +7 -2
- package/package.json +1 -1
- package/src/schemas.ts +6 -0
- package/src/types.ts +8 -2
package/CHANGELOG.md
CHANGED
package/dist/schemas.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { z } from "@hono/zod-openapi";
|
|
|
2
2
|
export declare const EditorialConfigSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
publicUrl: z.ZodString;
|
|
5
|
+
publicDir: z.ZodDefault<z.ZodString>;
|
|
6
|
+
publicDeletedDir: z.ZodDefault<z.ZodString>;
|
|
7
|
+
filesUrl: z.ZodString;
|
|
8
|
+
largeFilesUrl: z.ZodString;
|
|
5
9
|
previewUrl: z.ZodOptional<z.ZodString>;
|
|
6
10
|
silent: z.ZodOptional<z.ZodBoolean>;
|
|
7
11
|
firebase: z.ZodOptional<z.ZodObject<{
|
|
@@ -32,6 +36,10 @@ export declare const EditorialConfigSchema: z.ZodObject<{
|
|
|
32
36
|
}, "strip", z.ZodTypeAny, {
|
|
33
37
|
name: string;
|
|
34
38
|
publicUrl: string;
|
|
39
|
+
publicDir: string;
|
|
40
|
+
publicDeletedDir: string;
|
|
41
|
+
filesUrl: string;
|
|
42
|
+
largeFilesUrl: string;
|
|
35
43
|
previewUrl?: string | undefined;
|
|
36
44
|
silent?: boolean | undefined;
|
|
37
45
|
firebase?: {
|
|
@@ -46,6 +54,10 @@ export declare const EditorialConfigSchema: z.ZodObject<{
|
|
|
46
54
|
}, {
|
|
47
55
|
name: string;
|
|
48
56
|
publicUrl: string;
|
|
57
|
+
filesUrl: string;
|
|
58
|
+
largeFilesUrl: string;
|
|
59
|
+
publicDir?: string | undefined;
|
|
60
|
+
publicDeletedDir?: string | undefined;
|
|
49
61
|
previewUrl?: string | undefined;
|
|
50
62
|
silent?: boolean | undefined;
|
|
51
63
|
firebase?: {
|
|
@@ -230,17 +242,23 @@ export declare const BaseEditorialFileSchema: z.ZodObject<{
|
|
|
230
242
|
name: z.ZodString;
|
|
231
243
|
type: z.ZodEnum<["file", "directory"]>;
|
|
232
244
|
path: z.ZodString;
|
|
245
|
+
relativePath: z.ZodString;
|
|
233
246
|
size: z.ZodNumber;
|
|
247
|
+
isLarge: z.ZodOptional<z.ZodBoolean>;
|
|
234
248
|
}, "strip", z.ZodTypeAny, {
|
|
235
249
|
name: string;
|
|
236
250
|
path: string;
|
|
237
251
|
type: "file" | "directory";
|
|
252
|
+
relativePath: string;
|
|
238
253
|
size: number;
|
|
254
|
+
isLarge?: boolean | undefined;
|
|
239
255
|
}, {
|
|
240
256
|
name: string;
|
|
241
257
|
path: string;
|
|
242
258
|
type: "file" | "directory";
|
|
259
|
+
relativePath: string;
|
|
243
260
|
size: number;
|
|
261
|
+
isLarge?: boolean | undefined;
|
|
244
262
|
}>;
|
|
245
263
|
export type BaseEditorialFile = z.infer<typeof BaseEditorialFileSchema> & {
|
|
246
264
|
children?: BaseEditorialFile[];
|
package/dist/schemas.js
CHANGED
|
@@ -5,6 +5,10 @@ const zod_openapi_1 = require("@hono/zod-openapi");
|
|
|
5
5
|
exports.EditorialConfigSchema = zod_openapi_1.z.object({
|
|
6
6
|
name: zod_openapi_1.z.string(),
|
|
7
7
|
publicUrl: zod_openapi_1.z.string().url(),
|
|
8
|
+
publicDir: zod_openapi_1.z.string().default("public/files"),
|
|
9
|
+
publicDeletedDir: zod_openapi_1.z.string().default("public/files/.deleted"),
|
|
10
|
+
filesUrl: zod_openapi_1.z.string().url(),
|
|
11
|
+
largeFilesUrl: zod_openapi_1.z.string().url(),
|
|
8
12
|
previewUrl: zod_openapi_1.z.string().optional(),
|
|
9
13
|
silent: zod_openapi_1.z.boolean().optional(),
|
|
10
14
|
firebase: zod_openapi_1.z
|
|
@@ -71,7 +75,9 @@ exports.BaseEditorialFileSchema = zod_openapi_1.z.object({
|
|
|
71
75
|
name: zod_openapi_1.z.string(),
|
|
72
76
|
type: zod_openapi_1.z.enum(["file", "directory"]),
|
|
73
77
|
path: zod_openapi_1.z.string(),
|
|
78
|
+
relativePath: zod_openapi_1.z.string(),
|
|
74
79
|
size: zod_openapi_1.z.number(),
|
|
80
|
+
isLarge: zod_openapi_1.z.boolean().optional(),
|
|
75
81
|
});
|
|
76
82
|
exports.EditorialFileSchema = exports.BaseEditorialFileSchema.extend({
|
|
77
83
|
children: zod_openapi_1.z
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type { z } from
|
|
2
|
-
import type { EditorialConfigSchema, EditorialDataItemSchema, EditorialDataObjectWithTypeSchema, EditorialDataSchema, EditorialDataTypeSchema, EditorialSchemaItemFieldSchema, EditorialSchemaItemSchema, EditorialSchemaSchema } from
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { EditorialConfigSchema, EditorialDataItemSchema, EditorialDataObjectWithTypeSchema, EditorialDataSchema, EditorialDataTypeSchema, EditorialSchemaItemFieldSchema, EditorialSchemaItemSchema, EditorialSchemaSchema } from "./schemas.js";
|
|
3
|
+
export interface LargeFileHandler {
|
|
4
|
+
list: () => Promise<object[]>;
|
|
5
|
+
delete: () => Promise<void>;
|
|
6
|
+
upload: () => Promise<void>;
|
|
7
|
+
}
|
|
3
8
|
export type EditorialConfig = z.infer<typeof EditorialConfigSchema>;
|
|
4
9
|
export type EditorialData = z.infer<typeof EditorialDataSchema>;
|
|
5
10
|
export type EditorialDataType = z.infer<typeof EditorialDataTypeSchema>;
|
package/package.json
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -3,6 +3,10 @@ import { z } from "@hono/zod-openapi";
|
|
|
3
3
|
export const EditorialConfigSchema = z.object({
|
|
4
4
|
name: z.string(),
|
|
5
5
|
publicUrl: z.string().url(),
|
|
6
|
+
publicDir: z.string().default("public/files"),
|
|
7
|
+
publicDeletedDir: z.string().default("public/files/.deleted"),
|
|
8
|
+
filesUrl: z.string().url(),
|
|
9
|
+
largeFilesUrl: z.string().url(),
|
|
6
10
|
previewUrl: z.string().optional(),
|
|
7
11
|
silent: z.boolean().optional(),
|
|
8
12
|
firebase: z
|
|
@@ -87,7 +91,9 @@ export const BaseEditorialFileSchema = z.object({
|
|
|
87
91
|
name: z.string(),
|
|
88
92
|
type: z.enum(["file", "directory"]),
|
|
89
93
|
path: z.string(),
|
|
94
|
+
relativePath: z.string(),
|
|
90
95
|
size: z.number(),
|
|
96
|
+
isLarge: z.boolean().optional(),
|
|
91
97
|
});
|
|
92
98
|
|
|
93
99
|
export type BaseEditorialFile = z.infer<typeof BaseEditorialFileSchema> & {
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { z } from
|
|
1
|
+
import type { z } from "zod";
|
|
2
2
|
import type {
|
|
3
3
|
EditorialConfigSchema,
|
|
4
4
|
EditorialDataItemSchema,
|
|
@@ -8,7 +8,13 @@ import type {
|
|
|
8
8
|
EditorialSchemaItemFieldSchema,
|
|
9
9
|
EditorialSchemaItemSchema,
|
|
10
10
|
EditorialSchemaSchema,
|
|
11
|
-
} from
|
|
11
|
+
} from "./schemas.js";
|
|
12
|
+
|
|
13
|
+
export interface LargeFileHandler {
|
|
14
|
+
list: () => Promise<object[]>;
|
|
15
|
+
delete: () => Promise<void>;
|
|
16
|
+
upload: () => Promise<void>;
|
|
17
|
+
}
|
|
12
18
|
|
|
13
19
|
export type EditorialConfig = z.infer<typeof EditorialConfigSchema>;
|
|
14
20
|
export type EditorialData = z.infer<typeof EditorialDataSchema>;
|