attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
82 lines • 3.07 kB
TypeScript
import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type ObjectId = {
/**
* A UUID to identify the workspace this object belongs to.
*/
workspaceId: string;
/**
* A UUID to identify the object.
*/
objectId: string;
};
export type ObjectT = {
id: ObjectId;
/**
* A unique, human-readable slug to access the object through URLs and API calls. Formatted in snake case.
*/
apiSlug: string | null;
/**
* The singular form of the object's name.
*/
singularNoun: string | null;
/**
* The plural form of the object's name.
*/
pluralNoun: string | null;
/**
* When the object was created.
*/
createdAt: string;
};
/** @internal */
export declare const ObjectId$inboundSchema: z.ZodType<ObjectId, z.ZodTypeDef, unknown>;
/** @internal */
export type ObjectId$Outbound = {
workspace_id: string;
object_id: string;
};
/** @internal */
export declare const ObjectId$outboundSchema: z.ZodType<ObjectId$Outbound, z.ZodTypeDef, ObjectId>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace ObjectId$ {
/** @deprecated use `ObjectId$inboundSchema` instead. */
const inboundSchema: z.ZodType<ObjectId, z.ZodTypeDef, unknown>;
/** @deprecated use `ObjectId$outboundSchema` instead. */
const outboundSchema: z.ZodType<ObjectId$Outbound, z.ZodTypeDef, ObjectId>;
/** @deprecated use `ObjectId$Outbound` instead. */
type Outbound = ObjectId$Outbound;
}
export declare function objectIdToJSON(objectId: ObjectId): string;
export declare function objectIdFromJSON(jsonString: string): SafeParseResult<ObjectId, SDKValidationError>;
/** @internal */
export declare const ObjectT$inboundSchema: z.ZodType<ObjectT, z.ZodTypeDef, unknown>;
/** @internal */
export type ObjectT$Outbound = {
id: ObjectId$Outbound;
api_slug: string | null;
singular_noun: string | null;
plural_noun: string | null;
created_at: string;
};
/** @internal */
export declare const ObjectT$outboundSchema: z.ZodType<ObjectT$Outbound, z.ZodTypeDef, ObjectT>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace ObjectT$ {
/** @deprecated use `ObjectT$inboundSchema` instead. */
const inboundSchema: z.ZodType<ObjectT, z.ZodTypeDef, unknown>;
/** @deprecated use `ObjectT$outboundSchema` instead. */
const outboundSchema: z.ZodType<ObjectT$Outbound, z.ZodTypeDef, ObjectT>;
/** @deprecated use `ObjectT$Outbound` instead. */
type Outbound = ObjectT$Outbound;
}
export declare function objectToJSON(objectT: ObjectT): string;
export declare function objectFromJSON(jsonString: string): SafeParseResult<ObjectT, SDKValidationError>;
//# sourceMappingURL=object.d.ts.map