attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
349 lines • 19.7 kB
TypeScript
import * as z from "zod";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
* The direction to sort the results by.
*/
export declare const PostV2ObjectsObjectRecordsQueryDirection2: {
readonly Asc: "asc";
readonly Desc: "desc";
};
/**
* The direction to sort the results by.
*/
export type PostV2ObjectsObjectRecordsQueryDirection2 = ClosedEnum<typeof PostV2ObjectsObjectRecordsQueryDirection2>;
/**
* Sort by path
*/
export type PostV2ObjectsObjectRecordsQuerySort2 = {
/**
* The direction to sort the results by.
*/
direction: PostV2ObjectsObjectRecordsQueryDirection2;
/**
* You may use the `path` property to traverse record reference attributes and parent records on list entries. `path` accepts an array of tuples where the first element of each tuple is the slug or ID of a list/object, and the second element is the slug or ID of an attribute on that list/object. The first element of the first tuple must correspond to the list or object that you are querying. For example, if you wanted to sort by the name of the parent record (a company) on a list with the slug "sales", you would pass the value `[['sales', 'parent_record'], ['companies', 'name']]`.
*/
path: Array<Array<string>>;
/**
* Which field on the value to sort by e.g. "last_name" on a name value.
*/
field?: string | undefined;
};
/**
* The direction to sort the results by.
*/
export declare const PostV2ObjectsObjectRecordsQueryDirection1: {
readonly Asc: "asc";
readonly Desc: "desc";
};
/**
* The direction to sort the results by.
*/
export type PostV2ObjectsObjectRecordsQueryDirection1 = ClosedEnum<typeof PostV2ObjectsObjectRecordsQueryDirection1>;
/**
* Sort by attribute
*/
export type PostV2ObjectsObjectRecordsQuerySort1 = {
/**
* The direction to sort the results by.
*/
direction: PostV2ObjectsObjectRecordsQueryDirection1;
/**
* A slug or ID to identify the attribute to sort by.
*/
attribute: string;
/**
* Which field on the value to sort by e.g. "last_name" on a name value.
*/
field?: string | undefined;
};
export type PostV2ObjectsObjectRecordsQuerySortUnion = PostV2ObjectsObjectRecordsQuerySort1 | PostV2ObjectsObjectRecordsQuerySort2;
export type PostV2ObjectsObjectRecordsQueryRequestBody = {
/**
* An object used to filter results to a subset of results. See the [full guide to filtering and sorting here](/docs/filtering-and-sorting).
*/
filter?: {
[k: string]: any;
} | undefined;
/**
* An object used to sort results. See the [full guide to filtering and sorting here](/docs/filtering-and-sorting).
*/
sorts?: Array<PostV2ObjectsObjectRecordsQuerySort1 | PostV2ObjectsObjectRecordsQuerySort2> | undefined;
/**
* The maximum number of results to return. Defaults to 500. See the [full guide to pagination here](/docs/pagination).
*/
limit?: number | undefined;
/**
* The number of results to skip over before returning. Defaults to 0. See the [full guide to pagination here](/docs/pagination).
*/
offset?: number | undefined;
};
export type PostV2ObjectsObjectRecordsQueryRequest = {
object: string;
requestBody: PostV2ObjectsObjectRecordsQueryRequestBody;
};
export type PostV2ObjectsObjectRecordsQueryId = {
/**
* A UUID identifying the workspace this record belongs to.
*/
workspaceId: string;
/**
* A UUID identifying the object this record belongs to.
*/
objectId: string;
/**
* A UUID identifying this record.
*/
recordId: string;
};
export type PostV2ObjectsObjectRecordsQueryData = {
id: PostV2ObjectsObjectRecordsQueryId;
/**
* When this record was created.
*/
createdAt: string;
/**
* A record type with an attribute `api_slug` as the key, and an array of value objects as the values.
*/
values: {
[k: string]: any;
};
};
/**
* Success
*/
export type PostV2ObjectsObjectRecordsQueryResponse = {
data: Array<PostV2ObjectsObjectRecordsQueryData>;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryDirection2$inboundSchema: z.ZodNativeEnum<typeof PostV2ObjectsObjectRecordsQueryDirection2>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryDirection2$outboundSchema: z.ZodNativeEnum<typeof PostV2ObjectsObjectRecordsQueryDirection2>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryDirection2$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryDirection2$inboundSchema` instead. */
const inboundSchema: z.ZodNativeEnum<{
readonly Asc: "asc";
readonly Desc: "desc";
}>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryDirection2$outboundSchema` instead. */
const outboundSchema: z.ZodNativeEnum<{
readonly Asc: "asc";
readonly Desc: "desc";
}>;
}
/** @internal */
export declare const PostV2ObjectsObjectRecordsQuerySort2$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort2, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQuerySort2$Outbound = {
direction: string;
path: Array<Array<string>>;
field?: string | undefined;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQuerySort2$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort2$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQuerySort2>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQuerySort2$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySort2$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort2, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySort2$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort2$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQuerySort2>;
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySort2$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQuerySort2$Outbound;
}
export declare function postV2ObjectsObjectRecordsQuerySort2ToJSON(postV2ObjectsObjectRecordsQuerySort2: PostV2ObjectsObjectRecordsQuerySort2): string;
export declare function postV2ObjectsObjectRecordsQuerySort2FromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQuerySort2, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryDirection1$inboundSchema: z.ZodNativeEnum<typeof PostV2ObjectsObjectRecordsQueryDirection1>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryDirection1$outboundSchema: z.ZodNativeEnum<typeof PostV2ObjectsObjectRecordsQueryDirection1>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryDirection1$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryDirection1$inboundSchema` instead. */
const inboundSchema: z.ZodNativeEnum<{
readonly Asc: "asc";
readonly Desc: "desc";
}>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryDirection1$outboundSchema` instead. */
const outboundSchema: z.ZodNativeEnum<{
readonly Asc: "asc";
readonly Desc: "desc";
}>;
}
/** @internal */
export declare const PostV2ObjectsObjectRecordsQuerySort1$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort1, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQuerySort1$Outbound = {
direction: string;
attribute: string;
field?: string | undefined;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQuerySort1$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort1$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQuerySort1>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQuerySort1$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySort1$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort1, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySort1$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySort1$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQuerySort1>;
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySort1$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQuerySort1$Outbound;
}
export declare function postV2ObjectsObjectRecordsQuerySort1ToJSON(postV2ObjectsObjectRecordsQuerySort1: PostV2ObjectsObjectRecordsQuerySort1): string;
export declare function postV2ObjectsObjectRecordsQuerySort1FromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQuerySort1, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQuerySortUnion$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySortUnion, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQuerySortUnion$Outbound = PostV2ObjectsObjectRecordsQuerySort1$Outbound | PostV2ObjectsObjectRecordsQuerySort2$Outbound;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQuerySortUnion$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySortUnion$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQuerySortUnion>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQuerySortUnion$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySortUnion$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySortUnion, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySortUnion$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQuerySortUnion$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQuerySortUnion>;
/** @deprecated use `PostV2ObjectsObjectRecordsQuerySortUnion$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQuerySortUnion$Outbound;
}
export declare function postV2ObjectsObjectRecordsQuerySortUnionToJSON(postV2ObjectsObjectRecordsQuerySortUnion: PostV2ObjectsObjectRecordsQuerySortUnion): string;
export declare function postV2ObjectsObjectRecordsQuerySortUnionFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQuerySortUnion, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryRequestBody$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequestBody, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQueryRequestBody$Outbound = {
filter?: {
[k: string]: any;
} | undefined;
sorts?: Array<PostV2ObjectsObjectRecordsQuerySort1$Outbound | PostV2ObjectsObjectRecordsQuerySort2$Outbound> | undefined;
limit?: number | undefined;
offset?: number | undefined;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryRequestBody$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequestBody$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryRequestBody>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryRequestBody$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryRequestBody$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequestBody, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryRequestBody$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequestBody$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryRequestBody>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryRequestBody$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQueryRequestBody$Outbound;
}
export declare function postV2ObjectsObjectRecordsQueryRequestBodyToJSON(postV2ObjectsObjectRecordsQueryRequestBody: PostV2ObjectsObjectRecordsQueryRequestBody): string;
export declare function postV2ObjectsObjectRecordsQueryRequestBodyFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQueryRequestBody, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryRequest$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequest, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQueryRequest$Outbound = {
object: string;
RequestBody: PostV2ObjectsObjectRecordsQueryRequestBody$Outbound;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryRequest$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequest$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryRequest>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryRequest$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryRequest$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequest, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryRequest$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryRequest$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryRequest>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryRequest$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQueryRequest$Outbound;
}
export declare function postV2ObjectsObjectRecordsQueryRequestToJSON(postV2ObjectsObjectRecordsQueryRequest: PostV2ObjectsObjectRecordsQueryRequest): string;
export declare function postV2ObjectsObjectRecordsQueryRequestFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQueryRequest, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryId$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryId, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQueryId$Outbound = {
workspace_id: string;
object_id: string;
record_id: string;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryId$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryId$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryId>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryId$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryId$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryId, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryId$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryId$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryId>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryId$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQueryId$Outbound;
}
export declare function postV2ObjectsObjectRecordsQueryIdToJSON(postV2ObjectsObjectRecordsQueryId: PostV2ObjectsObjectRecordsQueryId): string;
export declare function postV2ObjectsObjectRecordsQueryIdFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQueryId, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryData$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryData, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQueryData$Outbound = {
id: PostV2ObjectsObjectRecordsQueryId$Outbound;
created_at: string;
values: {
[k: string]: any;
};
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryData$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryData$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryData>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryData$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryData$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryData, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryData$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryData$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryData>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryData$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQueryData$Outbound;
}
export declare function postV2ObjectsObjectRecordsQueryDataToJSON(postV2ObjectsObjectRecordsQueryData: PostV2ObjectsObjectRecordsQueryData): string;
export declare function postV2ObjectsObjectRecordsQueryDataFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQueryData, SDKValidationError>;
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryResponse$inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryResponse, z.ZodTypeDef, unknown>;
/** @internal */
export type PostV2ObjectsObjectRecordsQueryResponse$Outbound = {
data: Array<PostV2ObjectsObjectRecordsQueryData$Outbound>;
};
/** @internal */
export declare const PostV2ObjectsObjectRecordsQueryResponse$outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryResponse$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryResponse>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace PostV2ObjectsObjectRecordsQueryResponse$ {
/** @deprecated use `PostV2ObjectsObjectRecordsQueryResponse$inboundSchema` instead. */
const inboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryResponse, z.ZodTypeDef, unknown>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryResponse$outboundSchema` instead. */
const outboundSchema: z.ZodType<PostV2ObjectsObjectRecordsQueryResponse$Outbound, z.ZodTypeDef, PostV2ObjectsObjectRecordsQueryResponse>;
/** @deprecated use `PostV2ObjectsObjectRecordsQueryResponse$Outbound` instead. */
type Outbound = PostV2ObjectsObjectRecordsQueryResponse$Outbound;
}
export declare function postV2ObjectsObjectRecordsQueryResponseToJSON(postV2ObjectsObjectRecordsQueryResponse: PostV2ObjectsObjectRecordsQueryResponse): string;
export declare function postV2ObjectsObjectRecordsQueryResponseFromJSON(jsonString: string): SafeParseResult<PostV2ObjectsObjectRecordsQueryResponse, SDKValidationError>;
//# sourceMappingURL=postv2objectsobjectrecordsquery.d.ts.map