UNPKG

quickbooks-api

Version:

A modular TypeScript SDK for seamless integration with Intuit QuickBooks APIs. Provides robust authentication handling and future-ready foundation for accounting, payments, and commerce operations.

48 lines (46 loc) 2.04 kB
import { ApiClient } from '../api-client.js'; import { type Customer } from '../../../types/types.js'; import { CustomerQueryBuilder } from './customer-query-builder.js'; /** * API Client */ export declare class CustomerAPI { protected readonly apiClient: ApiClient; readonly getAllCustomers: (options?: import("../../../app.js").CustomerOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Customer>>; readonly getCustomerById: (id: string, options?: import("../../../app.js").CustomerOptions | undefined) => Promise<Customer | null>; readonly getCustomersForDateRange: (startDate: Date, endDate: Date, options?: import("../../../app.js").CustomerOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Customer>>; readonly getUpdatedCustomers: (lastUpdatedDate: Date, options?: import("../../../app.js").CustomerOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Customer>>; readonly rawCustomerQuery: (queryBuilder: CustomerQueryBuilder) => Promise<import("../../../app.js").SearchResponse<Customer>>; /** * Constructor * @param apiClient - The API Client */ constructor(apiClient: ApiClient); /** * Get the Company Endpoint * @returns The Company Endpoint with the attached token realmId */ protected getCompanyEndpoint(): Promise<string>; /** * Format the Response * @param response - The Response * @returns The Customers */ protected formatResponse(response: { QueryResponse?: { Customer?: Customer[]; }; }): Array<Customer>; getUrl(): Promise<URL>; /** * Get the Query Builder * @returns The Query Builder */ getQueryBuilder(): Promise<CustomerQueryBuilder>; /** * Checks if there is a next page * @param queryBuilder - The Query Builder * @returns {boolean} True if there is a next page, false otherwise */ protected hasNextPage(queryBuilder: CustomerQueryBuilder): Promise<boolean>; }