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.
44 lines (42 loc) • 2.12 kB
TypeScript
import { ApiClient } from '../api-client.js';
import { type Account } from '../../../types/types.js';
import { AccountQueryBuilder } from './account-query-builder.js';
/**
* API Client
*/
export declare class AccountAPI {
protected readonly apiClient: ApiClient;
readonly getAllAccounts: (options?: import("../../../app.js").AccountOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Account>>;
readonly getAccountById: (id: string, options?: import("../../../app.js").AccountOptions | undefined) => Promise<Account | null>;
readonly getAccountsCreatedForDateRange: (startDate: Date, endDate: Date, options?: import("../../../app.js").AccountOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Account>>;
readonly getAccountsForDateRange: (startDate: Date, endDate: Date, options?: import("../../../app.js").AccountOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Account>>;
readonly getUpdatedAccounts: (lastUpdatedDate: Date, options?: import("../../../app.js").AccountOptions | undefined) => Promise<import("../../../app.js").SearchResponse<Account>>;
readonly rawAccountQuery: (queryBuilder: AccountQueryBuilder) => Promise<import("../../../app.js").SearchResponse<Account>>;
/**
* 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 Accounts
*/
protected formatResponse(response: any): Array<Account>;
/**
* Get the Query Builder
* @returns The Query Builder
*/
getQueryBuilder(): Promise<AccountQueryBuilder>;
/**
* 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: AccountQueryBuilder): Promise<boolean>;
}