-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
23 lines (23 loc) · 1.66 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { config as MSSQLConfig } from 'mssql';
import type { DiamondCashReceipt, DiamondExtendedGPInvoice } from './diamond/types.js';
import type { GPAccount, GPCustomer, GPInvoice, GPInvoiceDocumentType, GPItemWithQuantities, GPItemWithQuantity, GPVendor } from './gp/types.js';
export interface DynamicsGPOptions {
cacheTTL: number;
documentCacheTTL: number;
}
export declare class DynamicsGP {
#private;
constructor(mssqlConfig: MSSQLConfig, options?: Partial<DynamicsGPOptions>);
clearCaches(): void;
getAccountByAccountIndex(accountIndex: number | string): Promise<GPAccount | undefined>;
getCustomerByCustomerNumber(customerNumber: string): Promise<GPCustomer | undefined>;
getInvoiceByInvoiceNumber(invoiceNumber: string, invoiceDocumentTypeOrAbbreviationOrName?: number | string): Promise<GPInvoice | undefined>;
getInvoiceDocumentTypes(): Promise<GPInvoiceDocumentType[]>;
getItemByItemNumber(itemNumber: string): Promise<GPItemWithQuantities | undefined>;
getItemsByLocationCodes(locationCodes?: string[]): Promise<GPItemWithQuantity[]>;
getVendorByVendorId(vendorId: string): Promise<GPVendor | undefined>;
getDiamondCashReceiptByDocumentNumber(documentNumber: number | string): Promise<DiamondCashReceipt | undefined>;
getDiamondExtendedInvoiceByInvoiceNumber(invoiceNumber: string, invoiceDocumentTypeOrAbbreviationOrName?: number | string): Promise<DiamondExtendedGPInvoice | undefined>;
}
export type { GPAccount, GPCustomer, GPInvoice, GPInvoiceDocumentType, GPItemWithQuantities, GPItemWithQuantity, GPVendor } from './gp/types.js';
export type { DiamondCashReceipt, DiamondExtendedGPInvoice } from './diamond/types.js';