// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import * as BusinessPartnersAPI from './business-partners'; import { APIPromise } from '../core/api-promise'; import { PageCursorURL, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; /** * Teams at the company */ export class Teams extends APIResource { /** * A list of teams. * * - Requires: `API Tier 1` * - Expandable fields: `parent` * - Sortable fields: `id`, `created_at`, `updated_at` */ list( query: TeamListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/teams/', PageCursorURL, { query, ...options }); } /** * Retrieve a specific team */ retrieve( id: string, query: TeamRetrieveParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { return this._client.get(path`/teams/${id}/`, { query, ...options }); } } export type TeamsPageCursorURL = PageCursorURL; export interface Team { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The name of the team. */ name: string; /** * Record update date */ updated_at: string; /** * The parent team * * Expandable field */ parent?: Team; /** * The parent team */ parent_id?: string; } /** * Meta information for the response. */ export interface TeamRetrieveResponse extends BusinessPartnersAPI.Meta, Team {} export interface TeamListParams { cursor?: string; expand?: string; order_by?: string; } export interface TeamRetrieveParams { expand?: string; } export declare namespace Teams { export { type Team as Team, type TeamRetrieveResponse as TeamRetrieveResponse, type TeamsPageCursorURL as TeamsPageCursorURL, type TeamListParams as TeamListParams, type TeamRetrieveParams as TeamRetrieveParams, }; }