/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/internal-sdk/src/models/components/createagentrequestdto.ts
68 строк
2 KB
AdemDev
feat(providers): add LINE Messaging API chat provider fixes NV-7614 (#11148)
13 июл 2026, 11:20
Не верифицирован
13 июл 2026, 11:20
51e40a8
Код
Авторство
О чём код?
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { ManagedRuntimeDto, ManagedRuntimeDto$Outbound, ManagedRuntimeDto$outboundSchema, } from "./managedruntimedto.js"; export const Runtime = { SelfHosted: "self-hosted", Managed: "managed", } as const; export type Runtime = ClosedEnum<typeof Runtime>; export type CreateAgentRequestDto = { /** * Required when not adopting an existing managed agent (i.e. when managedRuntime.externalAgentId is absent). Optional in adopt mode where the name is resolved from the provider. */ name: string; /** * Required when not adopting an existing managed agent. Auto-generated from the provider agent name when omitted in adopt mode. */ identifier: string; description?: string | undefined; active?: boolean | undefined; runtime?: Runtime | undefined; managedRuntime?: ManagedRuntimeDto | undefined; }; /** @internal */ export const Runtime$outboundSchema: z.ZodNativeEnum<typeof Runtime> = z .nativeEnum(Runtime); /** @internal */ export type CreateAgentRequestDto$Outbound = { name: string; identifier: string; description?: string | undefined; active: boolean; runtime?: string | undefined; managedRuntime?: ManagedRuntimeDto$Outbound | undefined; }; /** @internal */ export const CreateAgentRequestDto$outboundSchema: z.ZodType< CreateAgentRequestDto$Outbound, z.ZodTypeDef, CreateAgentRequestDto > = z.object({ name: z.string(), identifier: z.string(), description: z.string().optional(), active: z.boolean().default(true), runtime: Runtime$outboundSchema.optional(), managedRuntime: ManagedRuntimeDto$outboundSchema.optional(), }); export function createAgentRequestDtoToJSON( createAgentRequestDto: CreateAgentRequestDto, ): string { return JSON.stringify( CreateAgentRequestDto$outboundSchema.parse(createAgentRequestDto), ); }