Comparing version 0.11.0 to 0.11.1
import { z } from 'zod'; | ||
import { type Node, type NodeEdge } from './Node'; | ||
export type Journey = { | ||
id: string; | ||
name: string; | ||
nodes: Node[]; | ||
edges: NodeEdge[]; | ||
createdAt: number; | ||
createdById: string; | ||
updatedAt: number; | ||
updatedById: string; | ||
workspaceId: string; | ||
}; | ||
export type Journey = z.infer<typeof journeySchema>; | ||
export type CreateJourneyBody = z.input<typeof createJourneySchema>; | ||
@@ -21,6 +10,93 @@ export type CreateJourneyArgs = z.output<typeof createJourneySchema>; | ||
export type SearchJourneyArgs = z.output<typeof searchJourneySchema>; | ||
export declare const journeySchema: z.ZodObject<{ | ||
id: z.ZodEffects<z.ZodString, string, string>; | ||
name: z.ZodString; | ||
nodes: z.ZodArray<z.ZodType<import("./Node").Node, z.ZodTypeDef, import("./Node").Node>, "many">; | ||
edges: z.ZodArray<z.ZodType<import("./Node").NodeEdge, z.ZodTypeDef, import("./Node").NodeEdge>, "many">; | ||
createdAt: z.ZodNumber; | ||
createdById: z.ZodEffects<z.ZodString, string, string>; | ||
createdBy: z.ZodUnion<[z.ZodObject<{ | ||
id: z.ZodString; | ||
name: z.ZodString; | ||
email: z.ZodString; | ||
profileImageUrl: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
}, { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
}>, z.ZodNull]>; | ||
updatedAt: z.ZodNumber; | ||
updatedById: z.ZodEffects<z.ZodString, string, string>; | ||
updatedBy: z.ZodUnion<[z.ZodObject<{ | ||
id: z.ZodString; | ||
name: z.ZodString; | ||
email: z.ZodString; | ||
profileImageUrl: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
}, { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
}>, z.ZodNull]>; | ||
workspaceId: z.ZodEffects<z.ZodString, string, string>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
name: string; | ||
createdAt: number; | ||
updatedAt: number; | ||
createdBy: { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
} | null; | ||
updatedBy: { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
} | null; | ||
workspaceId: string; | ||
nodes: import("./Node").Node[]; | ||
edges: import("./Node").NodeEdge[]; | ||
createdById: string; | ||
updatedById: string; | ||
}, { | ||
id: string; | ||
name: string; | ||
createdAt: number; | ||
updatedAt: number; | ||
createdBy: { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
} | null; | ||
updatedBy: { | ||
id: string; | ||
name: string; | ||
email: string; | ||
profileImageUrl?: string | undefined; | ||
} | null; | ||
workspaceId: string; | ||
nodes: import("./Node").Node[]; | ||
edges: import("./Node").NodeEdge[]; | ||
createdById: string; | ||
updatedById: string; | ||
}>; | ||
export declare const createJourneySchema: z.ZodObject<{ | ||
name: z.ZodString; | ||
nodes: z.ZodArray<z.ZodType<Node, z.ZodTypeDef, Node>, "many">; | ||
edges: z.ZodArray<z.ZodType<NodeEdge, z.ZodTypeDef, NodeEdge>, "many">; | ||
nodes: z.ZodArray<z.ZodType<import("./Node").Node, z.ZodTypeDef, import("./Node").Node>, "many">; | ||
edges: z.ZodArray<z.ZodType<import("./Node").NodeEdge, z.ZodTypeDef, import("./Node").NodeEdge>, "many">; | ||
workspaceId: z.ZodEffects<z.ZodString, string, string>; | ||
@@ -30,22 +106,22 @@ }, "strip", z.ZodTypeAny, { | ||
workspaceId: string; | ||
nodes: Node[]; | ||
edges: NodeEdge[]; | ||
nodes: import("./Node").Node[]; | ||
edges: import("./Node").NodeEdge[]; | ||
}, { | ||
name: string; | ||
workspaceId: string; | ||
nodes: Node[]; | ||
edges: NodeEdge[]; | ||
nodes: import("./Node").Node[]; | ||
edges: import("./Node").NodeEdge[]; | ||
}>; | ||
export declare const updateJourneySchema: z.ZodObject<{ | ||
name: z.ZodOptional<z.ZodString>; | ||
nodes: z.ZodOptional<z.ZodArray<z.ZodType<Node, z.ZodTypeDef, Node>, "many">>; | ||
edges: z.ZodOptional<z.ZodArray<z.ZodType<NodeEdge, z.ZodTypeDef, NodeEdge>, "many">>; | ||
nodes: z.ZodOptional<z.ZodArray<z.ZodType<import("./Node").Node, z.ZodTypeDef, import("./Node").Node>, "many">>; | ||
edges: z.ZodOptional<z.ZodArray<z.ZodType<import("./Node").NodeEdge, z.ZodTypeDef, import("./Node").NodeEdge>, "many">>; | ||
}, "strip", z.ZodTypeAny, { | ||
name?: string | undefined; | ||
nodes?: Node[] | undefined; | ||
edges?: NodeEdge[] | undefined; | ||
nodes?: import("./Node").Node[] | undefined; | ||
edges?: import("./Node").NodeEdge[] | undefined; | ||
}, { | ||
name?: string | undefined; | ||
nodes?: Node[] | undefined; | ||
edges?: NodeEdge[] | undefined; | ||
nodes?: import("./Node").Node[] | undefined; | ||
edges?: import("./Node").NodeEdge[] | undefined; | ||
}>; | ||
@@ -52,0 +128,0 @@ export declare const getJourneySchema: z.ZodObject<{ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.searchJourneySchema = exports.getJourneySchema = exports.updateJourneySchema = exports.createJourneySchema = void 0; | ||
exports.searchJourneySchema = exports.getJourneySchema = exports.updateJourneySchema = exports.createJourneySchema = exports.journeySchema = void 0; | ||
const zod_1 = require("zod"); | ||
@@ -8,2 +8,16 @@ const Node_1 = require("./Node"); | ||
const Search_1 = require("./Search"); | ||
const Account_1 = require("./Account"); | ||
exports.journeySchema = zod_1.z.object({ | ||
id: Id_1.idSchema, | ||
name: zod_1.z.string(), | ||
nodes: zod_1.z.array(Node_1.nodeSchema), | ||
edges: zod_1.z.array(Node_1.nodeEdgeSchema), | ||
createdAt: zod_1.z.number(), | ||
createdById: Id_1.idSchema, | ||
createdBy: Account_1.basicAccountSchema.or(zod_1.z.null()), | ||
updatedAt: zod_1.z.number(), | ||
updatedById: Id_1.idSchema, | ||
updatedBy: Account_1.basicAccountSchema.or(zod_1.z.null()), | ||
workspaceId: Id_1.idSchema, | ||
}); | ||
exports.createJourneySchema = zod_1.z.object({ | ||
@@ -10,0 +24,0 @@ name: zod_1.z.string(), |
@@ -37,2 +37,4 @@ import { z } from 'zod'; | ||
workspaceId: string; | ||
createdById: string; | ||
updatedById: string; | ||
srcUrl: string; | ||
@@ -51,4 +53,2 @@ horizontalSize: number; | ||
animationOut: import("./LayerAnimation").LayerAnimation; | ||
createdById: string; | ||
updatedById: string; | ||
bgColor?: string | undefined; | ||
@@ -61,2 +61,4 @@ }, { | ||
workspaceId: string; | ||
createdById: string; | ||
updatedById: string; | ||
srcUrl: string; | ||
@@ -75,4 +77,2 @@ horizontalSize: number; | ||
animationOut: import("./LayerAnimation").LayerAnimation; | ||
createdById: string; | ||
updatedById: string; | ||
bgColor?: string | undefined; | ||
@@ -79,0 +79,0 @@ }>; |
{ | ||
"name": "lz-schema", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
70112
1971