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"; /** * Departments used by the company */ export declare class Departments extends APIResource { /** * A list of departments. * * - Requires: `API Tier 1` * - Expandable fields: `parent`, `department_hierarchy` * - Sortable fields: `id`, `created_at`, `updated_at` */ list(query?: DepartmentListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new department */ create(body: DepartmentCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific department */ retrieve(id: string, query?: DepartmentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Update a specific department. */ update(id: string, body: DepartmentUpdateParams, options?: RequestOptions): APIPromise; } export type DepartmentsPageCursorURL = PageCursorURL; export interface Department { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The name of the department. */ name: string; /** * Record update date */ updated_at: string; /** * List of departments in the department hierarchy. Refer department_hierarchy_ids * for department hierarchy order. * * Expandable field */ department_hierarchy?: Array; /** * The identifier of departments in the department hierarchy ordered from parent * department to child department. */ department_hierarchy_id?: Array; /** * The parent department. * * Expandable field */ parent?: Department; /** * The parent department. */ parent_id?: string; /** * Reference code of the department. */ reference_code?: string; } /** * Meta information for the response. */ export interface DepartmentRetrieveResponse extends BusinessPartnersAPI.Meta, Department { } export interface DepartmentListParams { cursor?: string; expand?: string; order_by?: string; } export interface DepartmentCreateParams { /** * The name of the department. */ name: string; /** * The parent department. */ parent_id?: string; /** * Reference code of the department. */ reference_code?: string; } export interface DepartmentRetrieveParams { expand?: string; } export interface DepartmentUpdateParams { /** * The name of the department. */ name: string; /** * The parent department. */ parent_id?: string; /** * Reference code of the department. */ reference_code?: string; } export declare namespace Departments { export { type Department as Department, type DepartmentRetrieveResponse as DepartmentRetrieveResponse, type DepartmentsPageCursorURL as DepartmentsPageCursorURL, type DepartmentListParams as DepartmentListParams, type DepartmentCreateParams as DepartmentCreateParams, type DepartmentRetrieveParams as DepartmentRetrieveParams, type DepartmentUpdateParams as DepartmentUpdateParams, }; } //# sourceMappingURL=departments.d.mts.map