@isardsat/editorial-common 6.19.4 → 6.20.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 +14 -0
- package/dist/schemas.d.ts +8 -0
- package/dist/schemas.js +4 -0
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas.ts +6 -0
- package/src/types.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @isardsat/editorial-common
|
|
2
2
|
|
|
3
|
+
## 6.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 812bf92: M
|
|
8
|
+
- Update delete item UI
|
|
9
|
+
- Fix IDs collision
|
|
10
|
+
|
|
11
|
+
## 6.19.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 5e1246c: Ensure URL starts with http or / for image metadata fetching
|
|
16
|
+
|
|
3
17
|
## 6.19.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/schemas.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ export declare const EditorialDataItemSchema: z.ZodObject<{
|
|
|
28
28
|
createdAt: z.ZodDefault<z.ZodISODateTime>;
|
|
29
29
|
updatedAt: z.ZodDefault<z.ZodISODateTime>;
|
|
30
30
|
}, z.core.$loose>;
|
|
31
|
+
export declare const EditorialUpdateDataItemSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
isDraft: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
34
|
+
createdAt: z.ZodOptional<z.ZodDefault<z.ZodISODateTime>>;
|
|
35
|
+
updatedAt: z.ZodOptional<z.ZodDefault<z.ZodISODateTime>>;
|
|
36
|
+
type: z.ZodString;
|
|
37
|
+
newId: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$loose>;
|
|
31
39
|
export declare const EditorialDataTypeSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
32
40
|
id: z.ZodString;
|
|
33
41
|
isDraft: z.ZodDefault<z.ZodBoolean>;
|
package/dist/schemas.js
CHANGED
|
@@ -30,6 +30,10 @@ export const EditorialDataItemSchema = z.looseObject({
|
|
|
30
30
|
createdAt: z.iso.datetime().default(() => new Date().toISOString()),
|
|
31
31
|
updatedAt: z.iso.datetime().default(() => new Date().toISOString()),
|
|
32
32
|
});
|
|
33
|
+
export const EditorialUpdateDataItemSchema = EditorialDataItemSchema.partial().extend({
|
|
34
|
+
type: z.string(),
|
|
35
|
+
newId: z.string().optional(),
|
|
36
|
+
});
|
|
33
37
|
export const EditorialDataTypeSchema = z.record(z.string(), EditorialDataItemSchema);
|
|
34
38
|
export const EditorialDataSchema = z.record(z.string(), EditorialDataTypeSchema);
|
|
35
39
|
export const EditorialSchemaItemFieldType = z.enum([
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "@hono/zod-openapi";
|
|
2
|
-
import type { EditorialConfigSchema, EditorialDataItemSchema, EditorialDataObjectWithTypeSchema, EditorialDataSchema, EditorialDataTypeSchema, EditorialSchemaItemFieldSchema, EditorialSchemaItemSchema, EditorialSchemaSchema } from "./schemas.js";
|
|
2
|
+
import type { EditorialConfigSchema, EditorialDataItemSchema, EditorialDataObjectWithTypeSchema, EditorialDataSchema, EditorialDataTypeSchema, EditorialSchemaItemFieldSchema, EditorialSchemaItemSchema, EditorialSchemaSchema, EditorialUpdateDataItemSchema } from "./schemas.js";
|
|
3
3
|
export interface LargeFileHandler {
|
|
4
4
|
list: () => Promise<object[]>;
|
|
5
5
|
delete: () => Promise<void>;
|
|
@@ -9,6 +9,7 @@ export type EditorialConfig = z.infer<typeof EditorialConfigSchema>;
|
|
|
9
9
|
export type EditorialData = z.infer<typeof EditorialDataSchema>;
|
|
10
10
|
export type EditorialDataType = z.infer<typeof EditorialDataTypeSchema>;
|
|
11
11
|
export type EditorialDataItem = z.infer<typeof EditorialDataItemSchema>;
|
|
12
|
+
export type EditorialUpdateDataItem = z.infer<typeof EditorialUpdateDataItemSchema>;
|
|
12
13
|
export type EditorialDataObjectWithType = z.infer<typeof EditorialDataObjectWithTypeSchema>;
|
|
13
14
|
export type EditorialSchemaItemField = z.infer<typeof EditorialSchemaItemFieldSchema>;
|
|
14
15
|
export type EditorialSchemaItem = z.infer<typeof EditorialSchemaItemSchema>;
|
package/package.json
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -34,6 +34,12 @@ export const EditorialDataItemSchema = z.looseObject({
|
|
|
34
34
|
updatedAt: z.iso.datetime().default(() => new Date().toISOString()),
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
export const EditorialUpdateDataItemSchema =
|
|
38
|
+
EditorialDataItemSchema.partial().extend({
|
|
39
|
+
type: z.string(),
|
|
40
|
+
newId: z.string().optional(),
|
|
41
|
+
});
|
|
42
|
+
|
|
37
43
|
export const EditorialDataTypeSchema = z.record(
|
|
38
44
|
z.string(),
|
|
39
45
|
EditorialDataItemSchema,
|
package/src/types.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
EditorialSchemaItemFieldSchema,
|
|
9
9
|
EditorialSchemaItemSchema,
|
|
10
10
|
EditorialSchemaSchema,
|
|
11
|
+
EditorialUpdateDataItemSchema,
|
|
11
12
|
} from "./schemas.js";
|
|
12
13
|
|
|
13
14
|
export interface LargeFileHandler {
|
|
@@ -20,6 +21,9 @@ export type EditorialConfig = z.infer<typeof EditorialConfigSchema>;
|
|
|
20
21
|
export type EditorialData = z.infer<typeof EditorialDataSchema>;
|
|
21
22
|
export type EditorialDataType = z.infer<typeof EditorialDataTypeSchema>;
|
|
22
23
|
export type EditorialDataItem = z.infer<typeof EditorialDataItemSchema>;
|
|
24
|
+
export type EditorialUpdateDataItem = z.infer<
|
|
25
|
+
typeof EditorialUpdateDataItemSchema
|
|
26
|
+
>;
|
|
23
27
|
export type EditorialDataObjectWithType = z.infer<
|
|
24
28
|
typeof EditorialDataObjectWithTypeSchema
|
|
25
29
|
>;
|