attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
57 lines • 2.86 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { ObjectT$inboundSchema, ObjectT$outboundSchema, } from "../components/object.js";
/** @internal */
export const GetV2ObjectsObjectRequest$inboundSchema = z.object({
object: z.string(),
});
/** @internal */
export const GetV2ObjectsObjectRequest$outboundSchema = z.object({
object: 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 GetV2ObjectsObjectRequest$;
(function (GetV2ObjectsObjectRequest$) {
/** @deprecated use `GetV2ObjectsObjectRequest$inboundSchema` instead. */
GetV2ObjectsObjectRequest$.inboundSchema = GetV2ObjectsObjectRequest$inboundSchema;
/** @deprecated use `GetV2ObjectsObjectRequest$outboundSchema` instead. */
GetV2ObjectsObjectRequest$.outboundSchema = GetV2ObjectsObjectRequest$outboundSchema;
})(GetV2ObjectsObjectRequest$ || (GetV2ObjectsObjectRequest$ = {}));
export function getV2ObjectsObjectRequestToJSON(getV2ObjectsObjectRequest) {
return JSON.stringify(GetV2ObjectsObjectRequest$outboundSchema.parse(getV2ObjectsObjectRequest));
}
export function getV2ObjectsObjectRequestFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2ObjectsObjectRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2ObjectsObjectRequest' from JSON`);
}
/** @internal */
export const GetV2ObjectsObjectResponse$inboundSchema = z.object({
data: ObjectT$inboundSchema,
});
/** @internal */
export const GetV2ObjectsObjectResponse$outboundSchema = z.object({
data: ObjectT$outboundSchema,
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2ObjectsObjectResponse$;
(function (GetV2ObjectsObjectResponse$) {
/** @deprecated use `GetV2ObjectsObjectResponse$inboundSchema` instead. */
GetV2ObjectsObjectResponse$.inboundSchema = GetV2ObjectsObjectResponse$inboundSchema;
/** @deprecated use `GetV2ObjectsObjectResponse$outboundSchema` instead. */
GetV2ObjectsObjectResponse$.outboundSchema = GetV2ObjectsObjectResponse$outboundSchema;
})(GetV2ObjectsObjectResponse$ || (GetV2ObjectsObjectResponse$ = {}));
export function getV2ObjectsObjectResponseToJSON(getV2ObjectsObjectResponse) {
return JSON.stringify(GetV2ObjectsObjectResponse$outboundSchema.parse(getV2ObjectsObjectResponse));
}
export function getV2ObjectsObjectResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2ObjectsObjectResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2ObjectsObjectResponse' from JSON`);
}
//# sourceMappingURL=getv2objectsobject.js.map