/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/internal-sdk/src/models/operations/agentscontrollerupdateagent.ts
83 строки
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 { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AgentsControllerUpdateAgentRequest = { identifier: string; /** * A header for idempotency purposes */ idempotencyKey?: string | undefined; updateAgentRequestDto: components.UpdateAgentRequestDto; }; export type AgentsControllerUpdateAgentResponse = { headers: { [k: string]: Array<string> }; result: components.AgentResponseDto; }; /** @internal */ export type AgentsControllerUpdateAgentRequest$Outbound = { identifier: string; "idempotency-key"?: string | undefined; UpdateAgentRequestDto: components.UpdateAgentRequestDto$Outbound; }; /** @internal */ export const AgentsControllerUpdateAgentRequest$outboundSchema: z.ZodType< AgentsControllerUpdateAgentRequest$Outbound, z.ZodTypeDef, AgentsControllerUpdateAgentRequest > = z.object({ identifier: z.string(), idempotencyKey: z.string().optional(), updateAgentRequestDto: components.UpdateAgentRequestDto$outboundSchema, }).transform((v) => { return remap$(v, { idempotencyKey: "idempotency-key", updateAgentRequestDto: "UpdateAgentRequestDto", }); }); export function agentsControllerUpdateAgentRequestToJSON( agentsControllerUpdateAgentRequest: AgentsControllerUpdateAgentRequest, ): string { return JSON.stringify( AgentsControllerUpdateAgentRequest$outboundSchema.parse( agentsControllerUpdateAgentRequest, ), ); } /** @internal */ export const AgentsControllerUpdateAgentResponse$inboundSchema: z.ZodType< AgentsControllerUpdateAgentResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.AgentResponseDto$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function agentsControllerUpdateAgentResponseFromJSON( jsonString: string, ): SafeParseResult<AgentsControllerUpdateAgentResponse, SDKValidationError> { return safeParse( jsonString, (x) => AgentsControllerUpdateAgentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentsControllerUpdateAgentResponse' from JSON`, ); }