attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
25 lines • 2.05 kB
TypeScript
import { AttioCore } from "../core.js";
import { RequestOptions } from "../lib/sdks.js";
import { APIError } from "../models/errors/apierror.js";
import { BillingError, PostV2ListsInvalidRequestError, PostV2ListsNotFoundError } from "../models/errors/getv2objectsobject.js";
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
import { PostV2ListsRequest, PostV2ListsResponse } from "../models/operations/postv2lists.js";
import { APIPromise } from "../types/async.js";
import { Result } from "../types/fp.js";
/**
* Create a list
*
* @remarks
* Creates a new list.
*
* Once you have your list, add attributes to it using the [Create attribute](/reference/post_v2-target-identifier-attributes) API, and add records to it using the [Add records to list](/reference/post_v2-lists-list-entries) API.
*
* New lists must specify which records can be added with the `parent_object` parameter which accepts either an object slug or an object ID. Permissions for the list are controlled with the `workspace_access` and `workspace_member_access` parameters.
*
* Please note that new lists must have either `workspace_access` set to `"full-access"` or one or more element of `workspace_member_access` with a `"full-access"` level. It is also possible to receive a `403` billing error if your workspace is not on a plan that supports either advanced workspace or workspace member-level access for lists.
*
* Required scopes: `list_configuration:read-write`.
*/
export declare function listsCreate(client: AttioCore, request: PostV2ListsRequest, options?: RequestOptions): APIPromise<Result<PostV2ListsResponse, PostV2ListsInvalidRequestError | BillingError | PostV2ListsNotFoundError | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
//# sourceMappingURL=listsCreate.d.ts.map