import { Client } from '../client'; import { BaseError } from '../errors'; import { UriHelper } from '../uri-helper'; import { ThBaseHandler } from '../base'; export interface BranchesOptions { user?: string; base?: string; } export interface BranchesQuery { limit?: number; uri?: string; query?: { deleted?: boolean; active?: boolean; }; } export interface BranchesResponse { data: Array>; metadata: Record; next?: () => Promise; } export interface BranchResponse { data?: Branch; metadata?: { count?: number; patch?: any; }; msg?: string; } export interface ExternalCustomIdQuery { provided_id: string; branch?: string; } export interface ExternalCustomIdResponse { external_custom_id: string; } export interface SearchQuery { q: string; fields?: string[]; } export interface Branch { id?: string; branch_number?: number; name: string; email?: string; custom_id?: string; external_custom_id?: string | null; cost_center?: string | null; receipt_header?: string; receipt_footer?: string; active?: boolean; deleted?: boolean; configuration?: string; timezone_default?: string | null; currency_default?: string | null; shift_plan_enabled?: boolean; available_in_online_booking?: boolean; } export declare class Branches extends ThBaseHandler { static baseEndpoint: string; endpoint: string; http: Client; options: BranchesOptions; uriHelper: UriHelper; constructor(options: BranchesOptions, http: Client); getAll(queryOrOptions?: BranchesQuery | undefined): Promise; get(branchId: string): Promise; put(branchId: string, branch: Branch): Promise; create(branch: Branch): Promise; count(): Promise; delete(branchId: string): Promise; getUniqueExternalId(query: ExternalCustomIdQuery): Promise; search(query: string | SearchQuery): Promise; } export declare class BranchesFetchFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class BranchFetchFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class BranchPutFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class BranchCreationFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class BranchesCountFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class BranchDeleteFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class ExternalCustomIdGetUniqueFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class BranchesSearchFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); }