import { APIResource } from "../core/resource.mjs"; import * as BusinessPartnersAPI from "./business-partners.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../core/pagination.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; /** * Teams at the company */ export declare class Teams extends APIResource { /** * A list of teams. * * - Requires: `API Tier 1` * - Expandable fields: `parent` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /teams/?expand=expand&order_by=order_by&limit=50&cursor=cursor HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * { * "name": "date_of_birth", * "reason": "Insufficient entitlements" * } * ] * }, * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": {}, * "name": "string" * }, * "name": "string" * } * ], * "next_link": "string" * } * ``` */ list(query?: TeamListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new team * * @example HTTP * Representative request and response shapes. * ``` * POST /teams/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "name": "name" * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": {}, * "name": "string" * }, * "name": "string" * }, * "name": "string" * }, * "name": "string" * } * ``` */ create(body: TeamCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific team * * @example HTTP * Representative request and response shapes. * ``` * GET /teams/{id}/?expand=expand HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * {} * ] * } * } * ``` */ retrieve(id: string, query?: TeamRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Update a specific team. * * @example HTTP * Representative request and response shapes. * ``` * PATCH /teams/{id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * {} * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "parent_id": "string", * "parent": {}, * "name": "string" * }, * "name": "string" * }, * "name": "string" * }, * "name": "string" * } * ``` */ update(id: string, body?: TeamUpdateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete a team * * @example HTTP * Representative request and response shapes. * ``` * DELETE /teams/{id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 204 No Content * ``` */ delete(id: string, options?: RequestOptions): APIPromise; } 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; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; order_by?: string; } export interface TeamCreateParams { /** * The name of the team. */ name: string; /** * The parent team */ parent_id?: string; } export interface TeamRetrieveParams { expand?: string; } export interface TeamUpdateParams { /** * The name of the team. */ name?: string; /** * The parent team */ parent_id?: string; } export declare namespace Teams { export { type Team as Team, type TeamRetrieveResponse as TeamRetrieveResponse, type TeamsPageCursorURL as TeamsPageCursorURL, type TeamListParams as TeamListParams, type TeamCreateParams as TeamCreateParams, type TeamRetrieveParams as TeamRetrieveParams, type TeamUpdateParams as TeamUpdateParams, }; } //# sourceMappingURL=teams.d.mts.map