// 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'; /** * Levels and tracks used by the company for workers */ export class Tracks extends APIResource { /** * A list of tracks. * * - Requires: `API Tier 2` * - Sortable fields: `id`, `created_at`, `updated_at` */ list( query: TrackListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/tracks/', PageCursorURL, { query, ...options }); } /** * Retrieve a specific track */ retrieve(id: string, options?: RequestOptions): APIPromise { return this._client.get(path`/tracks/${id}/`, options); } } export type TracksPageCursorURL = PageCursorURL; export interface Track { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The name of the track. Must be unique within the company or organization. */ name: string; /** * Record update date */ updated_at: string; } /** * Meta information for the response. */ export interface TrackRetrieveResponse extends BusinessPartnersAPI.Meta, Track {} export interface TrackListParams { cursor?: string; order_by?: string; } export declare namespace Tracks { export { type Track as Track, type TrackRetrieveResponse as TrackRetrieveResponse, type TracksPageCursorURL as TracksPageCursorURL, type TrackListParams as TrackListParams, }; }