UNPKG

attio-js

Version:

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

150 lines 10.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 PostV2TargetIdentifierAttributesAttributeOptionsTarget = { Objects: "objects", Lists: "lists", }; /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema = z.nativeEnum(PostV2TargetIdentifierAttributesAttributeOptionsTarget); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesAttributeOptionsTarget$; (function (PostV2TargetIdentifierAttributesAttributeOptionsTarget$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsTarget$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsTarget$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsTarget$ || (PostV2TargetIdentifierAttributesAttributeOptionsTarget$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema = z.object({ title: z.string(), }); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema = z.object({ title: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesAttributeOptionsData$; (function (PostV2TargetIdentifierAttributesAttributeOptionsData$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsData$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsData$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsData$ || (PostV2TargetIdentifierAttributesAttributeOptionsData$ = {})); export function postV2TargetIdentifierAttributesAttributeOptionsDataToJSON(postV2TargetIdentifierAttributesAttributeOptionsData) { return JSON.stringify(PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema.parse(postV2TargetIdentifierAttributesAttributeOptionsData)); } export function postV2TargetIdentifierAttributesAttributeOptionsDataFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsData' from JSON`); } /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema = z.object({ data: z.lazy(() => PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema), }); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema = z.object({ data: z.lazy(() => PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$; (function (PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$ || (PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$ = {})); export function postV2TargetIdentifierAttributesAttributeOptionsRequestBodyToJSON(postV2TargetIdentifierAttributesAttributeOptionsRequestBody) { return JSON.stringify(PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema .parse(postV2TargetIdentifierAttributesAttributeOptionsRequestBody)); } export function postV2TargetIdentifierAttributesAttributeOptionsRequestBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsRequestBody' from JSON`); } /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema = z.object({ target: PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema, identifier: z.string(), attribute: z.string(), RequestBody: z.lazy(() => PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema), }).transform((v) => { return remap$(v, { "RequestBody": "requestBody", }); }); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema = z.object({ target: PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema, identifier: z.string(), attribute: z.string(), requestBody: z.lazy(() => PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$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 PostV2TargetIdentifierAttributesAttributeOptionsRequest$; (function (PostV2TargetIdentifierAttributesAttributeOptionsRequest$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsRequest$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsRequest$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsRequest$ || (PostV2TargetIdentifierAttributesAttributeOptionsRequest$ = {})); export function postV2TargetIdentifierAttributesAttributeOptionsRequestToJSON(postV2TargetIdentifierAttributesAttributeOptionsRequest) { return JSON.stringify(PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema .parse(postV2TargetIdentifierAttributesAttributeOptionsRequest)); } export function postV2TargetIdentifierAttributesAttributeOptionsRequestFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsRequest' from JSON`); } /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema = z.object({ data: SelectOption$inboundSchema, }); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsResponse$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 PostV2TargetIdentifierAttributesAttributeOptionsResponse$; (function (PostV2TargetIdentifierAttributesAttributeOptionsResponse$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsResponse$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsResponse$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsResponse$ || (PostV2TargetIdentifierAttributesAttributeOptionsResponse$ = {})); export function postV2TargetIdentifierAttributesAttributeOptionsResponseToJSON(postV2TargetIdentifierAttributesAttributeOptionsResponse) { return JSON.stringify(PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema .parse(postV2TargetIdentifierAttributesAttributeOptionsResponse)); } export function postV2TargetIdentifierAttributesAttributeOptionsResponseFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsResponse' from JSON`); } //# sourceMappingURL=postv2targetidentifierattributesattributeoptions.js.map