attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
92 lines • 3.3 kB
TypeScript
import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type StatusId = {
/**
* The ID of the workspace
*/
workspaceId: string;
/**
* The ID of the object
*/
objectId: string;
/**
* The ID of the attribute
*/
attributeId: string;
/**
* The ID of the status
*/
statusId: string;
};
export type Status = {
id: StatusId;
/**
* The title of the status
*/
title: string;
/**
* Whether or not to archive the status. See our [archiving guide](/docs/archiving-vs-deleting) for more information on archiving.
*/
isArchived: boolean;
/**
* Whether arriving at this status triggers a celebration effect in the UI
*/
celebrationEnabled: boolean;
/**
* Target time for a record to spend in given status expressed as a ISO-8601 duration string
*/
targetTimeInStatus: string | null;
};
/** @internal */
export declare const StatusId$inboundSchema: z.ZodType<StatusId, z.ZodTypeDef, unknown>;
/** @internal */
export type StatusId$Outbound = {
workspace_id: string;
object_id: string;
attribute_id: string;
status_id: string;
};
/** @internal */
export declare const StatusId$outboundSchema: z.ZodType<StatusId$Outbound, z.ZodTypeDef, StatusId>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace StatusId$ {
/** @deprecated use `StatusId$inboundSchema` instead. */
const inboundSchema: z.ZodType<StatusId, z.ZodTypeDef, unknown>;
/** @deprecated use `StatusId$outboundSchema` instead. */
const outboundSchema: z.ZodType<StatusId$Outbound, z.ZodTypeDef, StatusId>;
/** @deprecated use `StatusId$Outbound` instead. */
type Outbound = StatusId$Outbound;
}
export declare function statusIdToJSON(statusId: StatusId): string;
export declare function statusIdFromJSON(jsonString: string): SafeParseResult<StatusId, SDKValidationError>;
/** @internal */
export declare const Status$inboundSchema: z.ZodType<Status, z.ZodTypeDef, unknown>;
/** @internal */
export type Status$Outbound = {
id: StatusId$Outbound;
title: string;
is_archived: boolean;
celebration_enabled: boolean;
target_time_in_status: string | null;
};
/** @internal */
export declare const Status$outboundSchema: z.ZodType<Status$Outbound, z.ZodTypeDef, Status>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace Status$ {
/** @deprecated use `Status$inboundSchema` instead. */
const inboundSchema: z.ZodType<Status, z.ZodTypeDef, unknown>;
/** @deprecated use `Status$outboundSchema` instead. */
const outboundSchema: z.ZodType<Status$Outbound, z.ZodTypeDef, Status>;
/** @deprecated use `Status$Outbound` instead. */
type Outbound = Status$Outbound;
}
export declare function statusToJSON(status: Status): string;
export declare function statusFromJSON(jsonString: string): SafeParseResult<Status, SDKValidationError>;
//# sourceMappingURL=status.d.ts.map