attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
511 lines • 32.6 kB
JavaScript
/*
* 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";
import { InputValueUnion$inboundSchema, InputValueUnion$outboundSchema, } from "../components/inputvalueunion.js";
/**
* Whether the attribute is on an object or a list.
*/
export const PatchV2TargetIdentifierAttributesAttributeTarget = {
Objects: "objects",
Lists: "lists",
};
export const PatchV2TargetIdentifierAttributesAttributeTypeStatic = {
Static: "static",
};
export const PatchV2TargetIdentifierAttributesAttributeTypeDynamic = {
Dynamic: "dynamic",
};
/**
* For actor reference attributes, you may pass a dynamic value of `"current-user"`. When creating new records or entries, this will cause the actor reference value to be populated with either the workspace member or API token that created the record/entry.
*/
export const PatchV2TargetIdentifierAttributesAttributeTemplate = {
CurrentUser: "current-user",
};
/**
* The ISO4217 code representing the currency that values for this attribute should be stored in.
*/
export const PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode = {
Aud: "AUD",
Brl: "BRL",
Bel: "BEL",
Cad: "CAD",
Cny: "CNY",
Cop: "COP",
Czk: "CZK",
Dkk: "DKK",
Eur: "EUR",
Hkd: "HKD",
Isk: "ISK",
Inr: "INR",
Ils: "ILS",
Jpy: "JPY",
Krw: "KRW",
Myr: "MYR",
Mxn: "MXN",
Ntd: "NTD",
Nzd: "NZD",
Ngn: "NGN",
Nok: "NOK",
Xpf: "XPF",
Pen: "PEN",
Php: "PHP",
Pln: "PLN",
Gbp: "GBP",
Sar: "SAR",
Sgd: "SGD",
Zar: "ZAR",
Sek: "SEK",
Chf: "CHF",
Aed: "AED",
Usd: "USD",
};
/**
* How the currency should be displayed across the app. "code" will display the ISO currency code e.g. "USD", "name" will display the localized currency name e.g. "British pound", "narrowSymbol" will display "$1" instead of "US$1" and "symbol" will display a localized currency symbol such as "$".
*/
export const PatchV2TargetIdentifierAttributesAttributeDisplayType = {
Code: "code",
Name: "name",
NarrowSymbol: "narrowSymbol",
Symbol: "symbol",
};
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTarget$inboundSchema = z
.nativeEnum(PatchV2TargetIdentifierAttributesAttributeTarget);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTarget$outboundSchema = PatchV2TargetIdentifierAttributesAttributeTarget$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeTarget$;
(function (PatchV2TargetIdentifierAttributesAttributeTarget$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTarget$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTarget$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeTarget$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTarget$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTarget$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeTarget$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeTarget$ || (PatchV2TargetIdentifierAttributesAttributeTarget$ = {}));
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTypeStatic$inboundSchema = z.nativeEnum(PatchV2TargetIdentifierAttributesAttributeTypeStatic);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTypeStatic$outboundSchema = PatchV2TargetIdentifierAttributesAttributeTypeStatic$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeTypeStatic$;
(function (PatchV2TargetIdentifierAttributesAttributeTypeStatic$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTypeStatic$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTypeStatic$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeTypeStatic$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTypeStatic$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTypeStatic$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeTypeStatic$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeTypeStatic$ || (PatchV2TargetIdentifierAttributesAttributeTypeStatic$ = {}));
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$inboundSchema = z.object({
type: PatchV2TargetIdentifierAttributesAttributeTypeStatic$inboundSchema,
template: z.array(InputValueUnion$inboundSchema),
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$outboundSchema = z.object({
type: PatchV2TargetIdentifierAttributesAttributeTypeStatic$outboundSchema,
template: z.array(InputValueUnion$outboundSchema),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$;
(function (PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$ || (PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$ = {}));
export function patchV2TargetIdentifierAttributesAttributeDefaultValueStaticToJSON(patchV2TargetIdentifierAttributesAttributeDefaultValueStatic) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeDefaultValueStatic));
}
export function patchV2TargetIdentifierAttributesAttributeDefaultValueStaticFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTypeDynamic$inboundSchema = z.nativeEnum(PatchV2TargetIdentifierAttributesAttributeTypeDynamic);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTypeDynamic$outboundSchema = PatchV2TargetIdentifierAttributesAttributeTypeDynamic$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeTypeDynamic$;
(function (PatchV2TargetIdentifierAttributesAttributeTypeDynamic$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTypeDynamic$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTypeDynamic$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeTypeDynamic$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTypeDynamic$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTypeDynamic$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeTypeDynamic$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeTypeDynamic$ || (PatchV2TargetIdentifierAttributesAttributeTypeDynamic$ = {}));
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTemplate$inboundSchema = z
.nativeEnum(PatchV2TargetIdentifierAttributesAttributeTemplate);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeTemplate$outboundSchema = PatchV2TargetIdentifierAttributesAttributeTemplate$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeTemplate$;
(function (PatchV2TargetIdentifierAttributesAttributeTemplate$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTemplate$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTemplate$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeTemplate$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeTemplate$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeTemplate$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeTemplate$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeTemplate$ || (PatchV2TargetIdentifierAttributesAttributeTemplate$ = {}));
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$inboundSchema = z.object({
type: PatchV2TargetIdentifierAttributesAttributeTypeDynamic$inboundSchema,
template: z.any().optional(),
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$outboundSchema = z.object({
type: PatchV2TargetIdentifierAttributesAttributeTypeDynamic$outboundSchema,
template: z.any().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$;
(function (PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$ || (PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$ = {}));
export function patchV2TargetIdentifierAttributesAttributeDefaultValueDynamicToJSON(patchV2TargetIdentifierAttributesAttributeDefaultValueDynamic) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeDefaultValueDynamic));
}
export function patchV2TargetIdentifierAttributesAttributeDefaultValueDynamicFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$inboundSchema = z.union([
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$inboundSchema),
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$inboundSchema),
]);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$outboundSchema = z.union([
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$outboundSchema),
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$;
(function (PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$ || (PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$ = {}));
export function patchV2TargetIdentifierAttributesAttributeDefaultValueUnionToJSON(patchV2TargetIdentifierAttributesAttributeDefaultValueUnion) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeDefaultValueUnion));
}
export function patchV2TargetIdentifierAttributesAttributeDefaultValueUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeDefaultValueUnion' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$inboundSchema = z.nativeEnum(PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$outboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$;
(function (PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$ || (PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$ = {}));
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDisplayType$inboundSchema = z.nativeEnum(PatchV2TargetIdentifierAttributesAttributeDisplayType);
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeDisplayType$outboundSchema = PatchV2TargetIdentifierAttributesAttributeDisplayType$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeDisplayType$;
(function (PatchV2TargetIdentifierAttributesAttributeDisplayType$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDisplayType$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDisplayType$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeDisplayType$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeDisplayType$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeDisplayType$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeDisplayType$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeDisplayType$ || (PatchV2TargetIdentifierAttributesAttributeDisplayType$ = {}));
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeCurrency$inboundSchema = z.object({
default_currency_code: PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$inboundSchema,
display_type: PatchV2TargetIdentifierAttributesAttributeDisplayType$inboundSchema,
}).transform((v) => {
return remap$(v, {
"default_currency_code": "defaultCurrencyCode",
"display_type": "displayType",
});
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeCurrency$outboundSchema = z.object({
defaultCurrencyCode: PatchV2TargetIdentifierAttributesAttributeDefaultCurrencyCode$outboundSchema,
displayType: PatchV2TargetIdentifierAttributesAttributeDisplayType$outboundSchema,
}).transform((v) => {
return remap$(v, {
defaultCurrencyCode: "default_currency_code",
displayType: "display_type",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeCurrency$;
(function (PatchV2TargetIdentifierAttributesAttributeCurrency$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeCurrency$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeCurrency$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeCurrency$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeCurrency$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeCurrency$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeCurrency$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeCurrency$ || (PatchV2TargetIdentifierAttributesAttributeCurrency$ = {}));
export function patchV2TargetIdentifierAttributesAttributeCurrencyToJSON(patchV2TargetIdentifierAttributesAttributeCurrency) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeCurrency$outboundSchema.parse(patchV2TargetIdentifierAttributesAttributeCurrency));
}
export function patchV2TargetIdentifierAttributesAttributeCurrencyFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeCurrency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeCurrency' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeRecordReference$inboundSchema = z.object({
allowed_objects: z.array(z.string()),
}).transform((v) => {
return remap$(v, {
"allowed_objects": "allowedObjects",
});
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeRecordReference$outboundSchema = z.object({
allowedObjects: z.array(z.string()),
}).transform((v) => {
return remap$(v, {
allowedObjects: "allowed_objects",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeRecordReference$;
(function (PatchV2TargetIdentifierAttributesAttributeRecordReference$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeRecordReference$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeRecordReference$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeRecordReference$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeRecordReference$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeRecordReference$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeRecordReference$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeRecordReference$ || (PatchV2TargetIdentifierAttributesAttributeRecordReference$ = {}));
export function patchV2TargetIdentifierAttributesAttributeRecordReferenceToJSON(patchV2TargetIdentifierAttributesAttributeRecordReference) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeRecordReference$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeRecordReference));
}
export function patchV2TargetIdentifierAttributesAttributeRecordReferenceFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeRecordReference$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeRecordReference' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeConfig$inboundSchema = z.object({
currency: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeCurrency$inboundSchema).optional(),
record_reference: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeRecordReference$inboundSchema).optional(),
}).transform((v) => {
return remap$(v, {
"record_reference": "recordReference",
});
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeConfig$outboundSchema = z.object({
currency: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeCurrency$outboundSchema).optional(),
recordReference: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeRecordReference$outboundSchema).optional(),
}).transform((v) => {
return remap$(v, {
recordReference: "record_reference",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeConfig$;
(function (PatchV2TargetIdentifierAttributesAttributeConfig$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeConfig$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeConfig$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeConfig$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeConfig$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeConfig$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeConfig$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeConfig$ || (PatchV2TargetIdentifierAttributesAttributeConfig$ = {}));
export function patchV2TargetIdentifierAttributesAttributeConfigToJSON(patchV2TargetIdentifierAttributesAttributeConfig) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeConfig$outboundSchema.parse(patchV2TargetIdentifierAttributesAttributeConfig));
}
export function patchV2TargetIdentifierAttributesAttributeConfigFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeConfig' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeData$inboundSchema = z.object({
title: z.string().optional(),
description: z.nullable(z.string()).optional(),
api_slug: z.string().optional(),
is_required: z.boolean().optional(),
is_unique: z.boolean().optional(),
default_value: z.nullable(z.union([
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$inboundSchema),
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$inboundSchema),
])).optional(),
config: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeConfig$inboundSchema).optional(),
is_archived: z.boolean().optional(),
}).transform((v) => {
return remap$(v, {
"api_slug": "apiSlug",
"is_required": "isRequired",
"is_unique": "isUnique",
"default_value": "defaultValue",
"is_archived": "isArchived",
});
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeData$outboundSchema = z.object({
title: z.string().optional(),
description: z.nullable(z.string()).optional(),
apiSlug: z.string().optional(),
isRequired: z.boolean().optional(),
isUnique: z.boolean().optional(),
defaultValue: z.nullable(z.union([
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueDynamic$outboundSchema),
z.lazy(() => PatchV2TargetIdentifierAttributesAttributeDefaultValueStatic$outboundSchema),
])).optional(),
config: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeConfig$outboundSchema).optional(),
isArchived: z.boolean().optional(),
}).transform((v) => {
return remap$(v, {
apiSlug: "api_slug",
isRequired: "is_required",
isUnique: "is_unique",
defaultValue: "default_value",
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 PatchV2TargetIdentifierAttributesAttributeData$;
(function (PatchV2TargetIdentifierAttributesAttributeData$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeData$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeData$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeData$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeData$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeData$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeData$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeData$ || (PatchV2TargetIdentifierAttributesAttributeData$ = {}));
export function patchV2TargetIdentifierAttributesAttributeDataToJSON(patchV2TargetIdentifierAttributesAttributeData) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeData$outboundSchema.parse(patchV2TargetIdentifierAttributesAttributeData));
}
export function patchV2TargetIdentifierAttributesAttributeDataFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeData' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeRequestBody$inboundSchema = z.object({
data: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeData$inboundSchema),
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeRequestBody$outboundSchema = z.object({
data: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeData$outboundSchema),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TargetIdentifierAttributesAttributeRequestBody$;
(function (PatchV2TargetIdentifierAttributesAttributeRequestBody$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeRequestBody$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeRequestBody$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeRequestBody$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeRequestBody$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeRequestBody$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeRequestBody$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeRequestBody$ || (PatchV2TargetIdentifierAttributesAttributeRequestBody$ = {}));
export function patchV2TargetIdentifierAttributesAttributeRequestBodyToJSON(patchV2TargetIdentifierAttributesAttributeRequestBody) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeRequestBody$outboundSchema.parse(patchV2TargetIdentifierAttributesAttributeRequestBody));
}
export function patchV2TargetIdentifierAttributesAttributeRequestBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeRequestBody' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeRequest$inboundSchema = z.object({
target: PatchV2TargetIdentifierAttributesAttributeTarget$inboundSchema,
identifier: z.string(),
attribute: z.string(),
RequestBody: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeRequestBody$inboundSchema),
}).transform((v) => {
return remap$(v, {
"RequestBody": "requestBody",
});
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeRequest$outboundSchema = z.object({
target: PatchV2TargetIdentifierAttributesAttributeTarget$outboundSchema,
identifier: z.string(),
attribute: z.string(),
requestBody: z.lazy(() => PatchV2TargetIdentifierAttributesAttributeRequestBody$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 PatchV2TargetIdentifierAttributesAttributeRequest$;
(function (PatchV2TargetIdentifierAttributesAttributeRequest$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeRequest$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeRequest$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeRequest$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeRequest$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeRequest$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeRequest$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeRequest$ || (PatchV2TargetIdentifierAttributesAttributeRequest$ = {}));
export function patchV2TargetIdentifierAttributesAttributeRequestToJSON(patchV2TargetIdentifierAttributesAttributeRequest) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeRequest$outboundSchema.parse(patchV2TargetIdentifierAttributesAttributeRequest));
}
export function patchV2TargetIdentifierAttributesAttributeRequestFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeRequest' from JSON`);
}
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeResponse$inboundSchema = z.object({
data: Attribute$inboundSchema,
});
/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeResponse$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 PatchV2TargetIdentifierAttributesAttributeResponse$;
(function (PatchV2TargetIdentifierAttributesAttributeResponse$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeResponse$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeResponse$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeResponse$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeResponse$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeResponse$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeResponse$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeResponse$ || (PatchV2TargetIdentifierAttributesAttributeResponse$ = {}));
export function patchV2TargetIdentifierAttributesAttributeResponseToJSON(patchV2TargetIdentifierAttributesAttributeResponse) {
return JSON.stringify(PatchV2TargetIdentifierAttributesAttributeResponse$outboundSchema.parse(patchV2TargetIdentifierAttributesAttributeResponse));
}
export function patchV2TargetIdentifierAttributesAttributeResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TargetIdentifierAttributesAttributeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeResponse' from JSON`);
}
//# sourceMappingURL=patchv2targetidentifierattributesattribute.js.map