UNPKG

attio-js

Version:

Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.

164 lines 11.1 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { SelectOption$inboundSchema, SelectOption$outboundSchema, } from "../components/selectoption.js"; /** * Whether the attribute is on an object or a list. */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget = { Objects: "objects", Lists: "lists", }; /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema = z.nativeEnum(PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$; (function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$ || (PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$ = {})); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema = z.object({ title: z.string().optional(), is_archived: z.boolean().optional(), }).transform((v) => { return remap$(v, { "is_archived": "isArchived", }); }); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema = z.object({ title: z.string().optional(), isArchived: z.boolean().optional(), }).transform((v) => { return remap$(v, { isArchived: "is_archived", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$; (function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$ || (PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$ = {})); export function patchV2TargetIdentifierAttributesAttributeOptionsOptionDataToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionData) { return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema .parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionData)); } export function patchV2TargetIdentifierAttributesAttributeOptionsOptionDataFromJSON(jsonString) { return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionData' from JSON`); } /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema = z.object({ data: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema), }); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema = z.object({ data: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$; (function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$ || (PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$ = {})); export function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody) { return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema .parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody)); } export function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody' from JSON`); } /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema = z.object({ target: PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema, identifier: z.string(), attribute: z.string(), option: z.string(), RequestBody: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema), }).transform((v) => { return remap$(v, { "RequestBody": "requestBody", }); }); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema = z.object({ target: PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema, identifier: z.string(), attribute: z.string(), option: z.string(), requestBody: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$; (function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$ || (PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$ = {})); export function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequest) { return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema .parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequest)); } export function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestFromJSON(jsonString) { return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest' from JSON`); } /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema = z.object({ data: SelectOption$inboundSchema, }); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema = z.object({ data: SelectOption$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$; (function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$ || (PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$ = {})); export function patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionResponse) { return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema .parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionResponse)); } export function patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseFromJSON(jsonString) { return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse' from JSON`); } //# sourceMappingURL=patchv2targetidentifierattributesattributeoptionsoption.js.map