@isardsat/editorial-common 6.0.3 → 6.0.5
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 +13 -1
- package/dist/schemas.d.ts +15 -26
- package/dist/schemas.js +12 -17
- package/package.json +1 -1
- package/src/schemas.ts +12 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# @isardsat/editorial-common
|
|
2
2
|
|
|
3
|
+
## 6.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bcb0c8a: Fix admin URLs
|
|
8
|
+
|
|
9
|
+
## 6.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4936462: Fix broken release
|
|
14
|
+
|
|
3
15
|
## 6.0.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
6
18
|
|
|
7
|
-
-
|
|
19
|
+
- 0c196b0: Fix build errors
|
|
8
20
|
|
|
9
21
|
## 6.0.2
|
|
10
22
|
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
2
|
export declare const EditorialConfigSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
publicUrl: z.ZodString;
|
|
@@ -64,23 +64,23 @@ export declare const EditorialDataSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z
|
|
|
64
64
|
createdAt: z.ZodDefault<z.ZodString>;
|
|
65
65
|
updatedAt: z.ZodDefault<z.ZodString>;
|
|
66
66
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
67
|
-
export declare const EditorialSchemaItemFieldType: z.ZodEnum<["string", "
|
|
67
|
+
export declare const EditorialSchemaItemFieldType: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
68
68
|
export declare const EditorialSchemaItemFieldSchema: z.ZodObject<{
|
|
69
|
-
type: z.ZodEnum<["string", "
|
|
69
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
70
70
|
displayName: z.ZodString;
|
|
71
71
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
72
72
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
73
73
|
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
74
74
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
75
75
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
76
|
-
type: z.ZodEnum<["string", "
|
|
76
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
77
77
|
displayName: z.ZodString;
|
|
78
78
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
79
79
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
80
80
|
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
81
81
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
82
82
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
83
|
-
type: z.ZodEnum<["string", "
|
|
83
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
84
84
|
displayName: z.ZodString;
|
|
85
85
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
86
86
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -91,21 +91,21 @@ export declare const EditorialSchemaItemSchema: z.ZodObject<{
|
|
|
91
91
|
displayName: z.ZodString;
|
|
92
92
|
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
93
93
|
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
94
|
-
type: z.ZodEnum<["string", "
|
|
94
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
95
95
|
displayName: z.ZodString;
|
|
96
96
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
97
97
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
98
98
|
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
99
99
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
100
100
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
101
|
-
type: z.ZodEnum<["string", "
|
|
101
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
102
102
|
displayName: z.ZodString;
|
|
103
103
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
104
104
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
105
105
|
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
106
106
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
107
107
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
108
|
-
type: z.ZodEnum<["string", "
|
|
108
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
109
109
|
displayName: z.ZodString;
|
|
110
110
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
111
111
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -115,7 +115,7 @@ export declare const EditorialSchemaItemSchema: z.ZodObject<{
|
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
displayName: string;
|
|
117
117
|
fields: Record<string, z.objectOutputType<{
|
|
118
|
-
type: z.ZodEnum<["string", "
|
|
118
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
119
119
|
displayName: z.ZodString;
|
|
120
120
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
121
121
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -126,7 +126,7 @@ export declare const EditorialSchemaItemSchema: z.ZodObject<{
|
|
|
126
126
|
}, {
|
|
127
127
|
displayName: string;
|
|
128
128
|
fields: Record<string, z.objectInputType<{
|
|
129
|
-
type: z.ZodEnum<["string", "
|
|
129
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
130
130
|
displayName: z.ZodString;
|
|
131
131
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
132
132
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -139,21 +139,21 @@ export declare const EditorialSchemaSchema: z.ZodRecord<z.ZodString, z.ZodObject
|
|
|
139
139
|
displayName: z.ZodString;
|
|
140
140
|
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
141
141
|
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
142
|
-
type: z.ZodEnum<["string", "
|
|
142
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
143
143
|
displayName: z.ZodString;
|
|
144
144
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
145
145
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
146
146
|
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
147
147
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
148
148
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
149
|
-
type: z.ZodEnum<["string", "
|
|
149
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
150
150
|
displayName: z.ZodString;
|
|
151
151
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
152
152
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
153
153
|
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
154
154
|
showInSummary: z.ZodOptional<z.ZodBoolean>;
|
|
155
155
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
156
|
-
type: z.ZodEnum<["string", "
|
|
156
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
157
157
|
displayName: z.ZodString;
|
|
158
158
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
159
159
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -163,7 +163,7 @@ export declare const EditorialSchemaSchema: z.ZodRecord<z.ZodString, z.ZodObject
|
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
164
|
displayName: string;
|
|
165
165
|
fields: Record<string, z.objectOutputType<{
|
|
166
|
-
type: z.ZodEnum<["string", "
|
|
166
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
167
167
|
displayName: z.ZodString;
|
|
168
168
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
169
169
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -174,7 +174,7 @@ export declare const EditorialSchemaSchema: z.ZodRecord<z.ZodString, z.ZodObject
|
|
|
174
174
|
}, {
|
|
175
175
|
displayName: string;
|
|
176
176
|
fields: Record<string, z.objectInputType<{
|
|
177
|
-
type: z.ZodEnum<["string", "
|
|
177
|
+
type: z.ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "color"]>;
|
|
178
178
|
displayName: z.ZodString;
|
|
179
179
|
displayExtra: z.ZodOptional<z.ZodString>;
|
|
180
180
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -203,17 +203,6 @@ export type BaseEditorialFile = z.infer<typeof BaseEditorialFileSchema> & {
|
|
|
203
203
|
children?: BaseEditorialFile[];
|
|
204
204
|
};
|
|
205
205
|
export declare const EditorialFileSchema: z.ZodType<BaseEditorialFile>;
|
|
206
|
-
export declare const EditorialFilesResponseSchema: z.ZodObject<{
|
|
207
|
-
files: z.ZodArray<z.ZodType<BaseEditorialFile, z.ZodTypeDef, BaseEditorialFile>, "many">;
|
|
208
|
-
totalSize: z.ZodNumber;
|
|
209
|
-
}, "strip", z.ZodTypeAny, {
|
|
210
|
-
files: BaseEditorialFile[];
|
|
211
|
-
totalSize: number;
|
|
212
|
-
}, {
|
|
213
|
-
files: BaseEditorialFile[];
|
|
214
|
-
totalSize: number;
|
|
215
|
-
}>;
|
|
216
206
|
export declare const EditorialFilesSchema: z.ZodArray<z.ZodType<BaseEditorialFile, z.ZodTypeDef, BaseEditorialFile>, "many">;
|
|
217
207
|
export type EditorialFile = z.infer<typeof EditorialFileSchema>;
|
|
218
208
|
export type EditorialFiles = z.infer<typeof EditorialFilesSchema>;
|
|
219
|
-
export type EditorialFilesResponse = z.infer<typeof EditorialFilesResponseSchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EditorialFilesSchema = exports.
|
|
3
|
+
exports.EditorialFilesSchema = exports.EditorialFileSchema = exports.BaseEditorialFileSchema = exports.EditorialSchemaSchema = exports.EditorialSchemaItemSchema = exports.EditorialSchemaItemFieldSchema = exports.EditorialSchemaItemFieldType = exports.EditorialDataSchema = exports.EditorialDataTypeSchema = exports.EditorialDataItemSchema = exports.EditorialDataObjectWithTypeSchema = exports.EditorialConfigSchema = void 0;
|
|
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(),
|
|
@@ -30,16 +30,15 @@ exports.EditorialDataItemSchema = zod_openapi_1.z
|
|
|
30
30
|
exports.EditorialDataTypeSchema = zod_openapi_1.z.record(zod_openapi_1.z.string(), exports.EditorialDataItemSchema);
|
|
31
31
|
exports.EditorialDataSchema = zod_openapi_1.z.record(zod_openapi_1.z.string(), exports.EditorialDataTypeSchema);
|
|
32
32
|
exports.EditorialSchemaItemFieldType = zod_openapi_1.z.enum([
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"color",
|
|
33
|
+
'string',
|
|
34
|
+
'boolean',
|
|
35
|
+
'date',
|
|
36
|
+
'datetime',
|
|
37
|
+
'markdown',
|
|
38
|
+
'number',
|
|
39
|
+
'color',
|
|
40
|
+
'select',
|
|
41
|
+
'color',
|
|
43
42
|
]);
|
|
44
43
|
exports.EditorialSchemaItemFieldSchema = zod_openapi_1.z
|
|
45
44
|
.object({
|
|
@@ -59,7 +58,7 @@ exports.EditorialSchemaItemSchema = zod_openapi_1.z.object({
|
|
|
59
58
|
exports.EditorialSchemaSchema = zod_openapi_1.z.record(zod_openapi_1.z.string(), exports.EditorialSchemaItemSchema);
|
|
60
59
|
exports.BaseEditorialFileSchema = zod_openapi_1.z.object({
|
|
61
60
|
name: zod_openapi_1.z.string(),
|
|
62
|
-
type: zod_openapi_1.z.enum([
|
|
61
|
+
type: zod_openapi_1.z.enum(['file', 'directory']),
|
|
63
62
|
path: zod_openapi_1.z.string(),
|
|
64
63
|
size: zod_openapi_1.z.number(),
|
|
65
64
|
});
|
|
@@ -67,11 +66,7 @@ exports.EditorialFileSchema = exports.BaseEditorialFileSchema.extend({
|
|
|
67
66
|
children: zod_openapi_1.z
|
|
68
67
|
.lazy(() => exports.EditorialFileSchema.array())
|
|
69
68
|
.openapi({
|
|
70
|
-
type:
|
|
69
|
+
type: 'array',
|
|
71
70
|
}),
|
|
72
71
|
});
|
|
73
|
-
exports.EditorialFilesResponseSchema = zod_openapi_1.z.object({
|
|
74
|
-
files: zod_openapi_1.z.array(exports.EditorialFileSchema),
|
|
75
|
-
totalSize: zod_openapi_1.z.number(),
|
|
76
|
-
});
|
|
77
72
|
exports.EditorialFilesSchema = zod_openapi_1.z.array(exports.EditorialFileSchema);
|
package/package.json
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
2
|
|
|
3
3
|
export const EditorialConfigSchema = z.object({
|
|
4
4
|
name: z.string(),
|
|
@@ -39,16 +39,15 @@ export const EditorialDataSchema = z.record(
|
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
export const EditorialSchemaItemFieldType = z.enum([
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"color",
|
|
42
|
+
'string',
|
|
43
|
+
'boolean',
|
|
44
|
+
'date',
|
|
45
|
+
'datetime',
|
|
46
|
+
'markdown',
|
|
47
|
+
'number',
|
|
48
|
+
'color',
|
|
49
|
+
'select',
|
|
50
|
+
'color',
|
|
52
51
|
]);
|
|
53
52
|
|
|
54
53
|
export const EditorialSchemaItemFieldSchema = z
|
|
@@ -75,7 +74,7 @@ export const EditorialSchemaSchema = z.record(
|
|
|
75
74
|
|
|
76
75
|
export const BaseEditorialFileSchema = z.object({
|
|
77
76
|
name: z.string(),
|
|
78
|
-
type: z.enum([
|
|
77
|
+
type: z.enum(['file', 'directory']),
|
|
79
78
|
path: z.string(),
|
|
80
79
|
size: z.number(),
|
|
81
80
|
});
|
|
@@ -89,18 +88,10 @@ export const EditorialFileSchema: z.ZodType<BaseEditorialFile> =
|
|
|
89
88
|
children: z
|
|
90
89
|
.lazy(() => EditorialFileSchema.array())
|
|
91
90
|
.openapi({
|
|
92
|
-
type:
|
|
91
|
+
type: 'array',
|
|
93
92
|
}),
|
|
94
93
|
});
|
|
95
94
|
|
|
96
|
-
export const EditorialFilesResponseSchema = z.object({
|
|
97
|
-
files: z.array(EditorialFileSchema),
|
|
98
|
-
totalSize: z.number(),
|
|
99
|
-
});
|
|
100
|
-
|
|
101
95
|
export const EditorialFilesSchema = z.array(EditorialFileSchema);
|
|
102
96
|
export type EditorialFile = z.infer<typeof EditorialFileSchema>;
|
|
103
97
|
export type EditorialFiles = z.infer<typeof EditorialFilesSchema>;
|
|
104
|
-
export type EditorialFilesResponse = z.infer<
|
|
105
|
-
typeof EditorialFilesResponseSchema
|
|
106
|
-
>;
|