attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
84 lines • 5.28 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { Attribute$inboundSchema, Attribute$outboundSchema, } from "../components/attribute.js";
/**
* Whether the attribute is on an object or a list.
*/
export const GetV2TargetIdentifierAttributesAttributeTarget = {
Objects: "objects",
Lists: "lists",
};
/** @internal */
export const GetV2TargetIdentifierAttributesAttributeTarget$inboundSchema = z
.nativeEnum(GetV2TargetIdentifierAttributesAttributeTarget);
/** @internal */
export const GetV2TargetIdentifierAttributesAttributeTarget$outboundSchema = GetV2TargetIdentifierAttributesAttributeTarget$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2TargetIdentifierAttributesAttributeTarget$;
(function (GetV2TargetIdentifierAttributesAttributeTarget$) {
/** @deprecated use `GetV2TargetIdentifierAttributesAttributeTarget$inboundSchema` instead. */
GetV2TargetIdentifierAttributesAttributeTarget$.inboundSchema = GetV2TargetIdentifierAttributesAttributeTarget$inboundSchema;
/** @deprecated use `GetV2TargetIdentifierAttributesAttributeTarget$outboundSchema` instead. */
GetV2TargetIdentifierAttributesAttributeTarget$.outboundSchema = GetV2TargetIdentifierAttributesAttributeTarget$outboundSchema;
})(GetV2TargetIdentifierAttributesAttributeTarget$ || (GetV2TargetIdentifierAttributesAttributeTarget$ = {}));
/** @internal */
export const GetV2TargetIdentifierAttributesAttributeRequest$inboundSchema = z.object({
target: GetV2TargetIdentifierAttributesAttributeTarget$inboundSchema,
identifier: z.string(),
attribute: z.string(),
});
/** @internal */
export const GetV2TargetIdentifierAttributesAttributeRequest$outboundSchema = z.object({
target: GetV2TargetIdentifierAttributesAttributeTarget$outboundSchema,
identifier: z.string(),
attribute: 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 GetV2TargetIdentifierAttributesAttributeRequest$;
(function (GetV2TargetIdentifierAttributesAttributeRequest$) {
/** @deprecated use `GetV2TargetIdentifierAttributesAttributeRequest$inboundSchema` instead. */
GetV2TargetIdentifierAttributesAttributeRequest$.inboundSchema = GetV2TargetIdentifierAttributesAttributeRequest$inboundSchema;
/** @deprecated use `GetV2TargetIdentifierAttributesAttributeRequest$outboundSchema` instead. */
GetV2TargetIdentifierAttributesAttributeRequest$.outboundSchema = GetV2TargetIdentifierAttributesAttributeRequest$outboundSchema;
})(GetV2TargetIdentifierAttributesAttributeRequest$ || (GetV2TargetIdentifierAttributesAttributeRequest$ = {}));
export function getV2TargetIdentifierAttributesAttributeRequestToJSON(getV2TargetIdentifierAttributesAttributeRequest) {
return JSON.stringify(GetV2TargetIdentifierAttributesAttributeRequest$outboundSchema.parse(getV2TargetIdentifierAttributesAttributeRequest));
}
export function getV2TargetIdentifierAttributesAttributeRequestFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2TargetIdentifierAttributesAttributeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2TargetIdentifierAttributesAttributeRequest' from JSON`);
}
/** @internal */
export const GetV2TargetIdentifierAttributesAttributeResponse$inboundSchema = z.object({
data: Attribute$inboundSchema,
});
/** @internal */
export const GetV2TargetIdentifierAttributesAttributeResponse$outboundSchema = z.object({
data: 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 GetV2TargetIdentifierAttributesAttributeResponse$;
(function (GetV2TargetIdentifierAttributesAttributeResponse$) {
/** @deprecated use `GetV2TargetIdentifierAttributesAttributeResponse$inboundSchema` instead. */
GetV2TargetIdentifierAttributesAttributeResponse$.inboundSchema = GetV2TargetIdentifierAttributesAttributeResponse$inboundSchema;
/** @deprecated use `GetV2TargetIdentifierAttributesAttributeResponse$outboundSchema` instead. */
GetV2TargetIdentifierAttributesAttributeResponse$.outboundSchema = GetV2TargetIdentifierAttributesAttributeResponse$outboundSchema;
})(GetV2TargetIdentifierAttributesAttributeResponse$ || (GetV2TargetIdentifierAttributesAttributeResponse$ = {}));
export function getV2TargetIdentifierAttributesAttributeResponseToJSON(getV2TargetIdentifierAttributesAttributeResponse) {
return JSON.stringify(GetV2TargetIdentifierAttributesAttributeResponse$outboundSchema.parse(getV2TargetIdentifierAttributesAttributeResponse));
}
export function getV2TargetIdentifierAttributesAttributeResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2TargetIdentifierAttributesAttributeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2TargetIdentifierAttributesAttributeResponse' from JSON`);
}
//# sourceMappingURL=getv2targetidentifierattributesattribute.js.map