UNPKG

@speckle/shared

Version:

Shared code between various Speckle JS packages

178 lines 6.01 kB
import z from 'zod'; export declare const jobIdSchema: z.ZodEffects<z.ZodString, string, string>; export declare const toJobId: (params: { projectId: string; objectId: string; }) => string; export declare const fromJobId: (jobId: string) => { projectId: string; objectId: string; }; export declare const jobPayload: z.ZodObject<z.objectUtil.extendShape<{ jobId: z.ZodEffects<z.ZodString, string, string>; }, { url: z.ZodString; token: z.ZodString; responseQueue: z.ZodString; }>, "strip", z.ZodTypeAny, { jobId: string; token: string; url: string; responseQueue: string; }, { jobId: string; token: string; url: string; responseQueue: string; }>; export type JobPayload = z.infer<typeof jobPayload>; declare const previewPageResult: z.ZodObject<{ durationSeconds: z.ZodNumber; screenshots: z.ZodRecord<z.ZodString, z.ZodString>; }, "strip", z.ZodTypeAny, { durationSeconds: number; screenshots: Record<string, string>; }, { durationSeconds: number; screenshots: Record<string, string>; }>; declare const previewJobResult: z.ZodObject<z.objectUtil.extendShape<{ durationSeconds: z.ZodNumber; screenshots: z.ZodRecord<z.ZodString, z.ZodString>; }, { loadDurationSeconds: z.ZodOptional<z.ZodNumber>; renderDurationSeconds: z.ZodOptional<z.ZodNumber>; }>, "strip", z.ZodTypeAny, { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }, { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }>; export type PreviewPageResult = z.infer<typeof previewPageResult>; export type PreviewJobResult = z.infer<typeof previewJobResult>; declare const previewSuccessPayload: z.ZodObject<z.objectUtil.extendShape<{ jobId: z.ZodEffects<z.ZodString, string, string>; }, { status: z.ZodLiteral<"success">; result: z.ZodObject<z.objectUtil.extendShape<{ durationSeconds: z.ZodNumber; screenshots: z.ZodRecord<z.ZodString, z.ZodString>; }, { loadDurationSeconds: z.ZodOptional<z.ZodNumber>; renderDurationSeconds: z.ZodOptional<z.ZodNumber>; }>, "strip", z.ZodTypeAny, { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }, { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }>; }>, "strip", z.ZodTypeAny, { status: "success"; jobId: string; result: { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }; }, { status: "success"; jobId: string; result: { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }; }>; export type PreviewSuccessPayload = z.infer<typeof previewSuccessPayload>; export declare const previewResultPayload: z.ZodDiscriminatedUnion<"status", [z.ZodObject<z.objectUtil.extendShape<{ jobId: z.ZodEffects<z.ZodString, string, string>; }, { status: z.ZodLiteral<"success">; result: z.ZodObject<z.objectUtil.extendShape<{ durationSeconds: z.ZodNumber; screenshots: z.ZodRecord<z.ZodString, z.ZodString>; }, { loadDurationSeconds: z.ZodOptional<z.ZodNumber>; renderDurationSeconds: z.ZodOptional<z.ZodNumber>; }>, "strip", z.ZodTypeAny, { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }, { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }>; }>, "strip", z.ZodTypeAny, { status: "success"; jobId: string; result: { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }; }, { status: "success"; jobId: string; result: { durationSeconds: number; screenshots: Record<string, string>; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }; }>, z.ZodObject<z.objectUtil.extendShape<{ jobId: z.ZodEffects<z.ZodString, string, string>; }, { status: z.ZodLiteral<"error">; reason: z.ZodString; result: z.ZodObject<z.objectUtil.extendShape<{ durationSeconds: z.ZodNumber; }, { loadDurationSeconds: z.ZodOptional<z.ZodNumber>; renderDurationSeconds: z.ZodOptional<z.ZodNumber>; }>, "strip", z.ZodTypeAny, { durationSeconds: number; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }, { durationSeconds: number; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }>; }>, "strip", z.ZodTypeAny, { status: "error"; jobId: string; result: { durationSeconds: number; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }; reason: string; }, { status: "error"; jobId: string; result: { durationSeconds: number; loadDurationSeconds?: number | undefined; renderDurationSeconds?: number | undefined; }; reason: string; }>]>; export type PreviewResultPayload = z.infer<typeof previewResultPayload>; export {}; //# sourceMappingURL=job.d.ts.map