UNPKG

attio-js

Version:

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

96 lines 5.23 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 { Attribute$inboundSchema, Attribute$outboundSchema, } from "../components/attribute.js"; /** * Whether the attributes are on an object or a list. */ export const GetV2TargetIdentifierAttributesTarget = { Objects: "objects", Lists: "lists", }; /** @internal */ export const GetV2TargetIdentifierAttributesTarget$inboundSchema = z.nativeEnum(GetV2TargetIdentifierAttributesTarget); /** @internal */ export const GetV2TargetIdentifierAttributesTarget$outboundSchema = GetV2TargetIdentifierAttributesTarget$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2TargetIdentifierAttributesTarget$; (function (GetV2TargetIdentifierAttributesTarget$) { /** @deprecated use `GetV2TargetIdentifierAttributesTarget$inboundSchema` instead. */ GetV2TargetIdentifierAttributesTarget$.inboundSchema = GetV2TargetIdentifierAttributesTarget$inboundSchema; /** @deprecated use `GetV2TargetIdentifierAttributesTarget$outboundSchema` instead. */ GetV2TargetIdentifierAttributesTarget$.outboundSchema = GetV2TargetIdentifierAttributesTarget$outboundSchema; })(GetV2TargetIdentifierAttributesTarget$ || (GetV2TargetIdentifierAttributesTarget$ = {})); /** @internal */ export const GetV2TargetIdentifierAttributesRequest$inboundSchema = z.object({ target: GetV2TargetIdentifierAttributesTarget$inboundSchema, identifier: z.string(), limit: z.number().int().optional(), offset: z.number().int().optional(), show_archived: z.boolean().optional(), }).transform((v) => { return remap$(v, { "show_archived": "showArchived", }); }); /** @internal */ export const GetV2TargetIdentifierAttributesRequest$outboundSchema = z.object({ target: GetV2TargetIdentifierAttributesTarget$outboundSchema, identifier: z.string(), limit: z.number().int().optional(), offset: z.number().int().optional(), showArchived: z.boolean().optional(), }).transform((v) => { return remap$(v, { showArchived: "show_archived", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2TargetIdentifierAttributesRequest$; (function (GetV2TargetIdentifierAttributesRequest$) { /** @deprecated use `GetV2TargetIdentifierAttributesRequest$inboundSchema` instead. */ GetV2TargetIdentifierAttributesRequest$.inboundSchema = GetV2TargetIdentifierAttributesRequest$inboundSchema; /** @deprecated use `GetV2TargetIdentifierAttributesRequest$outboundSchema` instead. */ GetV2TargetIdentifierAttributesRequest$.outboundSchema = GetV2TargetIdentifierAttributesRequest$outboundSchema; })(GetV2TargetIdentifierAttributesRequest$ || (GetV2TargetIdentifierAttributesRequest$ = {})); export function getV2TargetIdentifierAttributesRequestToJSON(getV2TargetIdentifierAttributesRequest) { return JSON.stringify(GetV2TargetIdentifierAttributesRequest$outboundSchema.parse(getV2TargetIdentifierAttributesRequest)); } export function getV2TargetIdentifierAttributesRequestFromJSON(jsonString) { return safeParse(jsonString, (x) => GetV2TargetIdentifierAttributesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2TargetIdentifierAttributesRequest' from JSON`); } /** @internal */ export const GetV2TargetIdentifierAttributesResponse$inboundSchema = z.object({ data: z.array(Attribute$inboundSchema), }); /** @internal */ export const GetV2TargetIdentifierAttributesResponse$outboundSchema = z.object({ data: z.array(Attribute$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2TargetIdentifierAttributesResponse$; (function (GetV2TargetIdentifierAttributesResponse$) { /** @deprecated use `GetV2TargetIdentifierAttributesResponse$inboundSchema` instead. */ GetV2TargetIdentifierAttributesResponse$.inboundSchema = GetV2TargetIdentifierAttributesResponse$inboundSchema; /** @deprecated use `GetV2TargetIdentifierAttributesResponse$outboundSchema` instead. */ GetV2TargetIdentifierAttributesResponse$.outboundSchema = GetV2TargetIdentifierAttributesResponse$outboundSchema; })(GetV2TargetIdentifierAttributesResponse$ || (GetV2TargetIdentifierAttributesResponse$ = {})); export function getV2TargetIdentifierAttributesResponseToJSON(getV2TargetIdentifierAttributesResponse) { return JSON.stringify(GetV2TargetIdentifierAttributesResponse$outboundSchema.parse(getV2TargetIdentifierAttributesResponse)); } export function getV2TargetIdentifierAttributesResponseFromJSON(jsonString) { return safeParse(jsonString, (x) => GetV2TargetIdentifierAttributesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2TargetIdentifierAttributesResponse' from JSON`); } //# sourceMappingURL=getv2targetidentifierattributes.js.map