43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { z } from "zod/v4";
|
|
|
|
import { SupportValuesSchema } from "../api/domain/support-values";
|
|
|
|
export type { SupportInput } from "../api/domain/support-values";
|
|
|
|
export { SupportValuesSchema };
|
|
|
|
export const SupportToolSchema = z.strictObject({
|
|
id: z.uuid(),
|
|
name: z.string(),
|
|
active: z.boolean(),
|
|
});
|
|
|
|
export const SupportConnectionSchema = z.strictObject({
|
|
id: z.uuid(),
|
|
companyId: z.uuid(),
|
|
assetId: z.uuid(),
|
|
values: SupportValuesSchema,
|
|
history: z.array(
|
|
z.strictObject({
|
|
id: z.uuid(),
|
|
values: SupportValuesSchema,
|
|
actorId: z.uuid(),
|
|
actorName: z.string(),
|
|
recordedAt: z.iso.datetime(),
|
|
})
|
|
),
|
|
});
|
|
|
|
export const SupportListSchema = z.strictObject({
|
|
connections: z.array(SupportConnectionSchema),
|
|
tools: z.array(SupportToolSchema),
|
|
});
|
|
|
|
export const SupportResponseSchema = z.strictObject({ connection: SupportConnectionSchema });
|
|
|
|
export type SupportConnectionDTO = z.infer<typeof SupportConnectionSchema>;
|
|
|
|
export type SupportToolDTO = z.infer<typeof SupportToolSchema>;
|
|
|
|
export type SupportListDTO = z.infer<typeof SupportListSchema>;
|