import { APIResource } from "../../core/resource.mjs"; import * as LimitsAPI from "./limits.mjs"; import { LimitUpdateParams, Limits, ProjectLimits, UpdateProjectLimitsRequest } from "./limits.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { OffsetPagination, type OffsetPaginationParams, PagePromise } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Create and manage projects for resource isolation within an organization. */ export declare class Projects extends APIResource { limits: LimitsAPI.Limits; /** * Create a new project within the authenticated organization. * * @example * ```ts * const project = await client.projects.create({ * name: 'staging', * }); * ``` */ create(body: ProjectCreateParams, options?: RequestOptions): APIPromise; /** * Get a project by its ID or by its name. Names are unique within an organization. * * @example * ```ts * const project = await client.projects.retrieve('id'); * ``` */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Update a project's name or status. * * @example * ```ts * const project = await client.projects.update('id'); * ``` */ update(id: string, body: ProjectUpdateParams, options?: RequestOptions): APIPromise; /** * List projects for the authenticated organization. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const project of client.projects.list()) { * // ... * } * ``` */ list(query?: ProjectListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Soft-delete a project. The project must be empty (no active resources). * * @example * ```ts * await client.projects.delete('id'); * ``` */ delete(id: string, options?: RequestOptions): APIPromise; } export type ProjectsOffsetPagination = OffsetPagination; export interface CreateProjectRequest { /** * Project name (1-255 characters) */ name: string; } export interface Project { /** * Unique project identifier */ id: string; /** * When the project was created */ created_at: string; /** * Project name */ name: string; /** * Project status */ status: 'active' | 'archived'; /** * When the project was last updated */ updated_at: string; } export interface UpdateProjectRequest { /** * New project name */ name?: string; /** * New project status */ status?: 'active' | 'archived'; } export interface ProjectCreateParams { /** * Project name (1-255 characters) */ name: string; } export interface ProjectUpdateParams { /** * New project name */ name?: string; /** * New project status */ status?: 'active' | 'archived'; } export interface ProjectListParams extends OffsetPaginationParams { /** * Case-insensitive substring match against project name */ query?: string; } export declare namespace Projects { export { type CreateProjectRequest as CreateProjectRequest, type Project as Project, type UpdateProjectRequest as UpdateProjectRequest, type ProjectsOffsetPagination as ProjectsOffsetPagination, type ProjectCreateParams as ProjectCreateParams, type ProjectUpdateParams as ProjectUpdateParams, type ProjectListParams as ProjectListParams, }; export { Limits as Limits, type ProjectLimits as ProjectLimits, type UpdateProjectLimitsRequest as UpdateProjectLimitsRequest, type LimitUpdateParams as LimitUpdateParams, }; } //# sourceMappingURL=projects.d.mts.map