attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
96 lines • 4.62 kB
TypeScript
import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { ObjectT, ObjectT$Outbound } from "../components/object.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type PostV2ObjectsData = {
/**
* A unique, human-readable slug to access the object through URLs and API calls. Should be formatted in snake case.
*/
apiSlug: string;
/**
* The singular form of the object's name.
*/
singularNoun: string;
/**
* The plural form of the object's name.
*/
pluralNoun: string;
};
export type PostV2ObjectsRequest = {
data: PostV2ObjectsData;
};
/**
* Success
*/
export type PostV2ObjectsResponse = {
data: ObjectT;
};
/** @internal */
export declare const PostV2ObjectsData$inboundSchema: z.ZodType<PostV2ObjectsData, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsData$Outbound = {
api_slug: string;
singular_noun: string;
plural_noun: string;
};
/** @internal */
export declare const PostV2ObjectsData$outboundSchema: z.ZodType<PostV2ObjectsData$Outbound, z.ZodTypeDef, PostV2ObjectsData>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsData$ {
/** @deprecated use `PostV2ObjectsData$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsData, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsData$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsData$Outbound, z.ZodTypeDef, PostV2ObjectsData>;
/** @deprecated use `PostV2ObjectsData$Outbound` instead. */
type Outbound = PostV2ObjectsData$Outbound;
}
export declare function postV2ObjectsDataToJSON(postV2ObjectsData: PostV2ObjectsData): string;
export declare function postV2ObjectsDataFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsData, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsRequest$inboundSchema: z.ZodType<PostV2ObjectsRequest, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsRequest$Outbound = {
data: PostV2ObjectsData$Outbound;
};
/** @internal */
export declare const PostV2ObjectsRequest$outboundSchema: z.ZodType<PostV2ObjectsRequest$Outbound, z.ZodTypeDef, PostV2ObjectsRequest>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsRequest$ {
/** @deprecated use `PostV2ObjectsRequest$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsRequest, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsRequest$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsRequest$Outbound, z.ZodTypeDef, PostV2ObjectsRequest>;
/** @deprecated use `PostV2ObjectsRequest$Outbound` instead. */
type Outbound = PostV2ObjectsRequest$Outbound;
}
export declare function postV2ObjectsRequestToJSON(postV2ObjectsRequest: PostV2ObjectsRequest): string;
export declare function postV2ObjectsRequestFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsRequest, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsResponse$inboundSchema: z.ZodType<PostV2ObjectsResponse, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsResponse$Outbound = {
data: ObjectT$Outbound;
};
/** @internal */
export declare const PostV2ObjectsResponse$outboundSchema: z.ZodType<PostV2ObjectsResponse$Outbound, z.ZodTypeDef, PostV2ObjectsResponse>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsResponse$ {
/** @deprecated use `PostV2ObjectsResponse$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsResponse, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsResponse$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsResponse$Outbound, z.ZodTypeDef, PostV2ObjectsResponse>;
/** @deprecated use `PostV2ObjectsResponse$Outbound` instead. */
type Outbound = PostV2ObjectsResponse$Outbound;
}
export declare function postV2ObjectsResponseToJSON(postV2ObjectsResponse: PostV2ObjectsResponse): string;
export declare function postV2ObjectsResponseFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsResponse, SDKValidationError>;
//# sourceMappingURL=postv2objects.d.ts.map