// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import * as AccountsAPI from './accounts/accounts'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; export class Teams extends APIResource { /** * Create a team */ create(body: TeamCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/teams', { body, ...options }); } /** * Update a team */ update(id: string, body: TeamUpdateParams, options?: RequestOptions): APIPromise { return this._client.patch(path`/teams/${id}`, { body, ...options }); } /** * Get a list of teams */ list(options?: RequestOptions): APIPromise { return this._client.get('/teams', options); } } export interface Team { id?: string; name?: string; users?: Array; } export interface TeamResponse { data?: Team; request_id?: string; } export interface TeamListResponse { data?: Array; pagination?: AccountsAPI.Pagination; request_id?: string; } export interface TeamCreateParams { /** * The name of the team */ name: string; /** * The list of user IDs to add to the team */ user_ids?: Array; } export interface TeamUpdateParams { /** * The name of the team */ name?: string; /** * The list of user IDs to update the team with */ user_ids?: Array; } export declare namespace Teams { export { type Team as Team, type TeamResponse as TeamResponse, type TeamListResponse as TeamListResponse, type TeamCreateParams as TeamCreateParams, type TeamUpdateParams as TeamUpdateParams, }; }