@isardsat/editorial-common 6.7.0 → 6.8.1
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 +12 -0
- package/dist/schemas.d.ts +75 -226
- package/dist/schemas.js +12 -24
- package/dist/types.d.ts +1 -1
- package/package.json +3 -3
- package/src/schemas.ts +21 -33
- package/src/types.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/schemas.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
export declare const EditorialConfigSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
|
-
publicUrl: z.
|
|
4
|
+
publicUrl: z.ZodURL;
|
|
5
5
|
publicDir: z.ZodDefault<z.ZodString>;
|
|
6
6
|
publicDeletedDir: z.ZodDefault<z.ZodString>;
|
|
7
|
-
filesUrl: z.
|
|
8
|
-
largeFilesUrl: z.
|
|
7
|
+
filesUrl: z.ZodURL;
|
|
8
|
+
largeFilesUrl: z.ZodURL;
|
|
9
9
|
previewUrl: z.ZodOptional<z.ZodString>;
|
|
10
10
|
silent: z.ZodOptional<z.ZodBoolean>;
|
|
11
11
|
firebase: z.ZodOptional<z.ZodObject<{
|
|
@@ -16,274 +16,123 @@ export declare const EditorialConfigSchema: z.ZodObject<{
|
|
|
16
16
|
storageBucket: z.ZodString;
|
|
17
17
|
messagingSenderId: z.ZodString;
|
|
18
18
|
dbUsersPath: z.ZodString;
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
authDomain: string;
|
|
22
|
-
databaseURL: string;
|
|
23
|
-
projectId: string;
|
|
24
|
-
storageBucket: string;
|
|
25
|
-
messagingSenderId: string;
|
|
26
|
-
dbUsersPath: string;
|
|
27
|
-
}, {
|
|
28
|
-
apiKey: string;
|
|
29
|
-
authDomain: string;
|
|
30
|
-
databaseURL: string;
|
|
31
|
-
projectId: string;
|
|
32
|
-
storageBucket: string;
|
|
33
|
-
messagingSenderId: string;
|
|
34
|
-
dbUsersPath: string;
|
|
35
|
-
}>>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
name: string;
|
|
38
|
-
publicUrl: string;
|
|
39
|
-
publicDir: string;
|
|
40
|
-
publicDeletedDir: string;
|
|
41
|
-
filesUrl: string;
|
|
42
|
-
largeFilesUrl: string;
|
|
43
|
-
previewUrl?: string | undefined;
|
|
44
|
-
silent?: boolean | undefined;
|
|
45
|
-
firebase?: {
|
|
46
|
-
apiKey: string;
|
|
47
|
-
authDomain: string;
|
|
48
|
-
databaseURL: string;
|
|
49
|
-
projectId: string;
|
|
50
|
-
storageBucket: string;
|
|
51
|
-
messagingSenderId: string;
|
|
52
|
-
dbUsersPath: string;
|
|
53
|
-
} | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
name: string;
|
|
56
|
-
publicUrl: string;
|
|
57
|
-
filesUrl: string;
|
|
58
|
-
largeFilesUrl: string;
|
|
59
|
-
publicDir?: string | undefined;
|
|
60
|
-
publicDeletedDir?: string | undefined;
|
|
61
|
-
previewUrl?: string | undefined;
|
|
62
|
-
silent?: boolean | undefined;
|
|
63
|
-
firebase?: {
|
|
64
|
-
apiKey: string;
|
|
65
|
-
authDomain: string;
|
|
66
|
-
databaseURL: string;
|
|
67
|
-
projectId: string;
|
|
68
|
-
storageBucket: string;
|
|
69
|
-
messagingSenderId: string;
|
|
70
|
-
dbUsersPath: string;
|
|
71
|
-
} | undefined;
|
|
72
|
-
}>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
73
21
|
export declare const EditorialDataObjectWithTypeSchema: z.ZodObject<{
|
|
74
22
|
id: z.ZodString;
|
|
75
23
|
type: z.ZodString;
|
|
76
|
-
},
|
|
77
|
-
id: z.ZodString;
|
|
78
|
-
type: z.ZodString;
|
|
79
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
80
|
-
id: z.ZodString;
|
|
81
|
-
type: z.ZodString;
|
|
82
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
24
|
+
}, z.core.$loose>;
|
|
83
25
|
export declare const EditorialDataItemSchema: z.ZodObject<{
|
|
84
26
|
id: z.ZodString;
|
|
85
27
|
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
86
|
-
createdAt: z.ZodDefault<z.
|
|
87
|
-
updatedAt: z.ZodDefault<z.
|
|
88
|
-
},
|
|
89
|
-
id: z.ZodString;
|
|
90
|
-
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
91
|
-
createdAt: z.ZodDefault<z.ZodString>;
|
|
92
|
-
updatedAt: z.ZodDefault<z.ZodString>;
|
|
93
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
94
|
-
id: z.ZodString;
|
|
95
|
-
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
96
|
-
createdAt: z.ZodDefault<z.ZodString>;
|
|
97
|
-
updatedAt: z.ZodDefault<z.ZodString>;
|
|
98
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
28
|
+
createdAt: z.ZodDefault<z.ZodISODateTime>;
|
|
29
|
+
updatedAt: z.ZodDefault<z.ZodISODateTime>;
|
|
30
|
+
}, z.core.$loose>;
|
|
99
31
|
export declare const EditorialDataTypeSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
100
32
|
id: z.ZodString;
|
|
101
33
|
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
-
createdAt: z.ZodDefault<z.
|
|
103
|
-
updatedAt: z.ZodDefault<z.
|
|
104
|
-
},
|
|
105
|
-
id: z.ZodString;
|
|
106
|
-
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
107
|
-
createdAt: z.ZodDefault<z.ZodString>;
|
|
108
|
-
updatedAt: z.ZodDefault<z.ZodString>;
|
|
109
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
110
|
-
id: z.ZodString;
|
|
111
|
-
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
112
|
-
createdAt: z.ZodDefault<z.ZodString>;
|
|
113
|
-
updatedAt: z.ZodDefault<z.ZodString>;
|
|
114
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
34
|
+
createdAt: z.ZodDefault<z.ZodISODateTime>;
|
|
35
|
+
updatedAt: z.ZodDefault<z.ZodISODateTime>;
|
|
36
|
+
}, z.core.$loose>>;
|
|
115
37
|
export declare const EditorialDataSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
116
38
|
id: z.ZodString;
|
|
117
39
|
isDraft: z.ZodDefault<z.ZodBoolean>;
|
|
118
|
-
createdAt: z.ZodDefault<z.
|
|
119
|
-
updatedAt: z.ZodDefault<z.
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
40
|
+
createdAt: z.ZodDefault<z.ZodISODateTime>;
|
|
41
|
+
updatedAt: z.ZodDefault<z.ZodISODateTime>;
|
|
42
|
+
}, z.core.$loose>>>;
|
|
43
|
+
export declare const EditorialSchemaItemFieldType: z.ZodEnum<{
|
|
44
|
+
string: "string";
|
|
45
|
+
number: "number";
|
|
46
|
+
boolean: "boolean";
|
|
47
|
+
url: "url";
|
|
48
|
+
date: "date";
|
|
49
|
+
datetime: "datetime";
|
|
50
|
+
markdown: "markdown";
|
|
51
|
+
color: "color";
|
|
52
|
+
select: "select";
|
|
53
|
+
}>;
|
|
132
54
|
export declare const EditorialSchemaItemFieldSchema: z.ZodObject<{
|
|
133
|
-
type: z.ZodEnum<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
55
|
+
type: z.ZodEnum<{
|
|
56
|
+
string: "string";
|
|
57
|
+
number: "number";
|
|
58
|
+
boolean: "boolean";
|
|
59
|
+
url: "url";
|
|
60
|
+
date: "date";
|
|
61
|
+
datetime: "datetime";
|
|
62
|
+
markdown: "markdown";
|
|
63
|
+
color: "color";
|
|
64
|
+
select: "select";
|
|
65
|
+
}>;
|
|
141
66
|
displayName: z.ZodString;
|
|
142
67
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
143
68
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
144
|
-
|
|
69
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
145
70
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
-
}, z.
|
|
147
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
148
|
-
displayName: z.ZodString;
|
|
149
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
150
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
151
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
71
|
+
}, z.core.$loose>;
|
|
154
72
|
export declare const EditorialSchemaItemSchema: z.ZodObject<{
|
|
155
73
|
displayName: z.ZodString;
|
|
156
74
|
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
157
75
|
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
158
|
-
type: z.ZodEnum<
|
|
76
|
+
type: z.ZodEnum<{
|
|
77
|
+
string: "string";
|
|
78
|
+
number: "number";
|
|
79
|
+
boolean: "boolean";
|
|
80
|
+
url: "url";
|
|
81
|
+
date: "date";
|
|
82
|
+
datetime: "datetime";
|
|
83
|
+
markdown: "markdown";
|
|
84
|
+
color: "color";
|
|
85
|
+
select: "select";
|
|
86
|
+
}>;
|
|
159
87
|
displayName: z.ZodString;
|
|
160
88
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
161
89
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
162
|
-
|
|
90
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
163
91
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
displayName: z.ZodString;
|
|
167
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
168
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
169
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
172
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
173
|
-
displayName: z.ZodString;
|
|
174
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
175
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
176
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
178
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
179
|
-
}, "strip", z.ZodTypeAny, {
|
|
180
|
-
displayName: string;
|
|
181
|
-
fields: Record<string, z.objectOutputType<{
|
|
182
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
183
|
-
displayName: z.ZodString;
|
|
184
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
185
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
186
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
189
|
-
singleton?: boolean | undefined;
|
|
190
|
-
}, {
|
|
191
|
-
displayName: string;
|
|
192
|
-
fields: Record<string, z.objectInputType<{
|
|
193
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
194
|
-
displayName: z.ZodString;
|
|
195
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
196
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
197
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
200
|
-
singleton?: boolean | undefined;
|
|
201
|
-
}>;
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
202
94
|
export declare const EditorialSchemaSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
203
95
|
displayName: z.ZodString;
|
|
204
96
|
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
205
97
|
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
206
|
-
type: z.ZodEnum<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
219
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
220
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
98
|
+
type: z.ZodEnum<{
|
|
99
|
+
string: "string";
|
|
100
|
+
number: "number";
|
|
101
|
+
boolean: "boolean";
|
|
102
|
+
url: "url";
|
|
103
|
+
date: "date";
|
|
104
|
+
datetime: "datetime";
|
|
105
|
+
markdown: "markdown";
|
|
106
|
+
color: "color";
|
|
107
|
+
select: "select";
|
|
108
|
+
}>;
|
|
221
109
|
displayName: z.ZodString;
|
|
222
110
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
223
111
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
224
|
-
|
|
112
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
225
113
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
-
}, z.
|
|
227
|
-
},
|
|
228
|
-
displayName: string;
|
|
229
|
-
fields: Record<string, z.objectOutputType<{
|
|
230
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
231
|
-
displayName: z.ZodString;
|
|
232
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
233
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
234
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
235
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
236
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
237
|
-
singleton?: boolean | undefined;
|
|
238
|
-
}, {
|
|
239
|
-
displayName: string;
|
|
240
|
-
fields: Record<string, z.objectInputType<{
|
|
241
|
-
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
|
|
242
|
-
displayName: z.ZodString;
|
|
243
|
-
displayExtra: z.ZodOptional<z.ZodString>;
|
|
244
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
245
|
-
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
246
|
-
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
247
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
248
|
-
singleton?: boolean | undefined;
|
|
249
|
-
}>>;
|
|
114
|
+
}, z.core.$loose>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
250
116
|
export declare const BaseEditorialFileSchema: z.ZodObject<{
|
|
251
117
|
name: z.ZodString;
|
|
252
|
-
type: z.ZodEnum<
|
|
118
|
+
type: z.ZodEnum<{
|
|
119
|
+
file: "file";
|
|
120
|
+
directory: "directory";
|
|
121
|
+
}>;
|
|
253
122
|
path: z.ZodString;
|
|
254
123
|
relativePath: z.ZodString;
|
|
255
124
|
size: z.ZodNumber;
|
|
256
125
|
isLarge: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
-
},
|
|
258
|
-
name: string;
|
|
259
|
-
path: string;
|
|
260
|
-
type: "file" | "directory";
|
|
261
|
-
relativePath: string;
|
|
262
|
-
size: number;
|
|
263
|
-
isLarge?: boolean | undefined;
|
|
264
|
-
}, {
|
|
265
|
-
name: string;
|
|
266
|
-
path: string;
|
|
267
|
-
type: "file" | "directory";
|
|
268
|
-
relativePath: string;
|
|
269
|
-
size: number;
|
|
270
|
-
isLarge?: boolean | undefined;
|
|
271
|
-
}>;
|
|
126
|
+
}, z.core.$strip>;
|
|
272
127
|
export type BaseEditorialFile = z.infer<typeof BaseEditorialFileSchema> & {
|
|
273
128
|
children?: BaseEditorialFile[];
|
|
274
129
|
};
|
|
275
130
|
export declare const EditorialFileSchema: z.ZodType<BaseEditorialFile>;
|
|
276
131
|
export declare const EditorialFilesResponseSchema: z.ZodObject<{
|
|
277
|
-
files: z.ZodArray<z.ZodType<BaseEditorialFile, z.
|
|
132
|
+
files: z.ZodArray<z.ZodType<BaseEditorialFile, unknown, z.core.$ZodTypeInternals<BaseEditorialFile, unknown>>>;
|
|
278
133
|
totalSize: z.ZodNumber;
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
totalSize: number;
|
|
282
|
-
}, {
|
|
283
|
-
files: BaseEditorialFile[];
|
|
284
|
-
totalSize: number;
|
|
285
|
-
}>;
|
|
286
|
-
export declare const EditorialFilesSchema: z.ZodArray<z.ZodType<BaseEditorialFile, z.ZodTypeDef, BaseEditorialFile>, "many">;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export declare const EditorialFilesSchema: z.ZodArray<z.ZodType<BaseEditorialFile, unknown, z.core.$ZodTypeInternals<BaseEditorialFile, unknown>>>;
|
|
287
136
|
export type EditorialFile = z.infer<typeof EditorialFileSchema>;
|
|
288
137
|
export type EditorialFiles = z.infer<typeof EditorialFilesSchema>;
|
|
289
138
|
export type EditorialFilesResponse = z.infer<typeof EditorialFilesResponseSchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -4,11 +4,11 @@ exports.EditorialFilesSchema = exports.EditorialFilesResponseSchema = exports.Ed
|
|
|
4
4
|
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
|
-
publicUrl: zod_openapi_1.z.
|
|
7
|
+
publicUrl: zod_openapi_1.z.url(),
|
|
8
8
|
publicDir: zod_openapi_1.z.string().default("public/files"),
|
|
9
9
|
publicDeletedDir: zod_openapi_1.z.string().default("public/files/.deleted"),
|
|
10
|
-
filesUrl: zod_openapi_1.z.
|
|
11
|
-
largeFilesUrl: zod_openapi_1.z.
|
|
10
|
+
filesUrl: zod_openapi_1.z.url(),
|
|
11
|
+
largeFilesUrl: zod_openapi_1.z.url(),
|
|
12
12
|
previewUrl: zod_openapi_1.z.string().optional(),
|
|
13
13
|
silent: zod_openapi_1.z.boolean().optional(),
|
|
14
14
|
firebase: zod_openapi_1.z
|
|
@@ -23,26 +23,16 @@ exports.EditorialConfigSchema = zod_openapi_1.z.object({
|
|
|
23
23
|
})
|
|
24
24
|
.optional(),
|
|
25
25
|
});
|
|
26
|
-
exports.EditorialDataObjectWithTypeSchema = zod_openapi_1.z
|
|
27
|
-
.object({
|
|
26
|
+
exports.EditorialDataObjectWithTypeSchema = zod_openapi_1.z.looseObject({
|
|
28
27
|
id: zod_openapi_1.z.string(),
|
|
29
28
|
type: zod_openapi_1.z.string(),
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
exports.EditorialDataItemSchema = zod_openapi_1.z
|
|
33
|
-
.object({
|
|
29
|
+
});
|
|
30
|
+
exports.EditorialDataItemSchema = zod_openapi_1.z.looseObject({
|
|
34
31
|
id: zod_openapi_1.z.string(),
|
|
35
32
|
isDraft: zod_openapi_1.z.boolean().default(false),
|
|
36
|
-
createdAt: zod_openapi_1.z
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.default(() => new Date().toISOString()),
|
|
40
|
-
updatedAt: zod_openapi_1.z
|
|
41
|
-
.string()
|
|
42
|
-
.datetime()
|
|
43
|
-
.default(() => new Date().toISOString()),
|
|
44
|
-
})
|
|
45
|
-
.passthrough();
|
|
33
|
+
createdAt: zod_openapi_1.z.iso.datetime().default(() => new Date().toISOString()),
|
|
34
|
+
updatedAt: zod_openapi_1.z.iso.datetime().default(() => new Date().toISOString()),
|
|
35
|
+
});
|
|
46
36
|
exports.EditorialDataTypeSchema = zod_openapi_1.z.record(zod_openapi_1.z.string(), exports.EditorialDataItemSchema);
|
|
47
37
|
exports.EditorialDataSchema = zod_openapi_1.z.record(zod_openapi_1.z.string(), exports.EditorialDataTypeSchema);
|
|
48
38
|
exports.EditorialSchemaItemFieldType = zod_openapi_1.z.enum([
|
|
@@ -56,16 +46,14 @@ exports.EditorialSchemaItemFieldType = zod_openapi_1.z.enum([
|
|
|
56
46
|
"select",
|
|
57
47
|
"url",
|
|
58
48
|
]);
|
|
59
|
-
exports.EditorialSchemaItemFieldSchema = zod_openapi_1.z
|
|
60
|
-
.object({
|
|
49
|
+
exports.EditorialSchemaItemFieldSchema = zod_openapi_1.z.looseObject({
|
|
61
50
|
type: exports.EditorialSchemaItemFieldType,
|
|
62
51
|
displayName: zod_openapi_1.z.string(),
|
|
63
52
|
displayExtra: zod_openapi_1.z.string().optional(),
|
|
64
53
|
placeholder: zod_openapi_1.z.string().optional(),
|
|
65
|
-
|
|
54
|
+
optional: zod_openapi_1.z.boolean().default(false),
|
|
66
55
|
showInSummary: zod_openapi_1.z.boolean().optional(),
|
|
67
|
-
})
|
|
68
|
-
.passthrough();
|
|
56
|
+
});
|
|
69
57
|
exports.EditorialSchemaItemSchema = zod_openapi_1.z.object({
|
|
70
58
|
displayName: zod_openapi_1.z.string(),
|
|
71
59
|
singleton: zod_openapi_1.z.boolean().optional(),
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { z } from "zod";
|
|
1
|
+
import type { z } from "@hono/zod-openapi";
|
|
2
2
|
import type { EditorialConfigSchema, EditorialDataItemSchema, EditorialDataObjectWithTypeSchema, EditorialDataSchema, EditorialDataTypeSchema, EditorialSchemaItemFieldSchema, EditorialSchemaItemSchema, EditorialSchemaSchema } from "./schemas.js";
|
|
3
3
|
export interface LargeFileHandler {
|
|
4
4
|
list: () => Promise<object[]>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isardsat/editorial-common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@hono/zod-openapi": "^
|
|
8
|
-
"zod": "^
|
|
7
|
+
"@hono/zod-openapi": "^1.1.3",
|
|
8
|
+
"zod": "^4.1.11"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@tsconfig/node22": "^22.0.0",
|
package/src/schemas.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { z } from "@hono/zod-openapi";
|
|
|
2
2
|
|
|
3
3
|
export const EditorialConfigSchema = z.object({
|
|
4
4
|
name: z.string(),
|
|
5
|
-
publicUrl: z.
|
|
5
|
+
publicUrl: z.url(),
|
|
6
6
|
publicDir: z.string().default("public/files"),
|
|
7
7
|
publicDeletedDir: z.string().default("public/files/.deleted"),
|
|
8
|
-
filesUrl: z.
|
|
9
|
-
largeFilesUrl: z.
|
|
8
|
+
filesUrl: z.url(),
|
|
9
|
+
largeFilesUrl: z.url(),
|
|
10
10
|
previewUrl: z.string().optional(),
|
|
11
11
|
silent: z.boolean().optional(),
|
|
12
12
|
firebase: z
|
|
@@ -22,27 +22,17 @@ export const EditorialConfigSchema = z.object({
|
|
|
22
22
|
.optional(),
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
export const EditorialDataObjectWithTypeSchema = z
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
30
|
-
.passthrough();
|
|
25
|
+
export const EditorialDataObjectWithTypeSchema = z.looseObject({
|
|
26
|
+
id: z.string(),
|
|
27
|
+
type: z.string(),
|
|
28
|
+
});
|
|
31
29
|
|
|
32
|
-
export const EditorialDataItemSchema = z
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.datetime()
|
|
39
|
-
.default(() => new Date().toISOString()),
|
|
40
|
-
updatedAt: z
|
|
41
|
-
.string()
|
|
42
|
-
.datetime()
|
|
43
|
-
.default(() => new Date().toISOString()),
|
|
44
|
-
})
|
|
45
|
-
.passthrough();
|
|
30
|
+
export const EditorialDataItemSchema = z.looseObject({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
isDraft: z.boolean().default(false),
|
|
33
|
+
createdAt: z.iso.datetime().default(() => new Date().toISOString()),
|
|
34
|
+
updatedAt: z.iso.datetime().default(() => new Date().toISOString()),
|
|
35
|
+
});
|
|
46
36
|
|
|
47
37
|
export const EditorialDataTypeSchema = z.record(
|
|
48
38
|
z.string(),
|
|
@@ -66,16 +56,14 @@ export const EditorialSchemaItemFieldType = z.enum([
|
|
|
66
56
|
"url",
|
|
67
57
|
]);
|
|
68
58
|
|
|
69
|
-
export const EditorialSchemaItemFieldSchema = z
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
.passthrough();
|
|
59
|
+
export const EditorialSchemaItemFieldSchema = z.looseObject({
|
|
60
|
+
type: EditorialSchemaItemFieldType,
|
|
61
|
+
displayName: z.string(),
|
|
62
|
+
displayExtra: z.string().optional(),
|
|
63
|
+
placeholder: z.string().optional(),
|
|
64
|
+
optional: z.boolean().default(false),
|
|
65
|
+
showInSummary: z.boolean().optional(),
|
|
66
|
+
});
|
|
79
67
|
|
|
80
68
|
export const EditorialSchemaItemSchema = z.object({
|
|
81
69
|
displayName: z.string(),
|
package/src/types.ts
CHANGED