Client for FreshBooks API

Hierarchy

  • Client

Constructors

  • FreshBooks API client

    Parameters

    • clientId: string

      The FreshBooks application client id

    • options: Options = {}

      Client config options

    • logger: Logger = _logger

      Custom logger

    Returns Client

Properties

accessToken?: string

Pre-authorized access token for accessing FreshBooks API

accessTokenExpiresAt?: Date

Expiration date of access token

apiUrl: string

Base URL for FreshBooks API

authorizationUrl: string
axios: AxiosInstance
billPayments: {
    create: ((billPayment: BillPayments, accountId: string) => Promise<Result<BillPayments>>);
    delete: ((accountId: string, billPaymentId: number) => Promise<Result<BillPayments>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        billPayments: BillPayments[];
    }>>);
    single: ((accountId: string, billPaymentId: number) => Promise<Result<{
        billPayment: BillPayments;
    }>>);
    update: ((billPayment: BillPayments, accountId: string, billPaymentId: number) => Promise<Result<BillPayments>>);
} = ...

Type declaration

  • create: ((billPayment: BillPayments, accountId: string) => Promise<Result<BillPayments>>)
  • delete: ((accountId: string, billPaymentId: number) => Promise<Result<BillPayments>>)
      • (accountId: string, billPaymentId: number): Promise<Result<BillPayments>>
      • Parameters

        • accountId: string
        • billPaymentId: number

        Returns Promise<Result<BillPayments>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        billPayments: BillPayments[];
    }>>)
  • single: ((accountId: string, billPaymentId: number) => Promise<Result<{
        billPayment: BillPayments;
    }>>)
      • (accountId: string, billPaymentId: number): Promise<Result<{
            billPayment: BillPayments;
        }>>
      • Parameters

        • accountId: string
        • billPaymentId: number

        Returns Promise<Result<{
            billPayment: BillPayments;
        }>>

  • update: ((billPayment: BillPayments, accountId: string, billPaymentId: number) => Promise<Result<BillPayments>>)
billVendors: {
    create: ((vendor: BillVendors, accountId: string) => Promise<Result<BillVendors>>);
    delete: ((accountId: string, vendorId: number) => Promise<Result<BillVendors>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        vendors: BillVendors[];
    }>>);
    single: ((accountId: string, vendorId: number) => Promise<Result<BillVendors>>);
    update: ((vendor: BillVendors, accountId: string, vendorId: number) => Promise<Result<BillVendors>>);
} = ...

Type declaration

bills: {
    archive: ((accountId: string, billId: number) => Promise<Result<Bills>>);
    create: ((bill: Bills, accountId: string) => Promise<Result<Bills>>);
    delete: ((accountId: string, billId: number) => Promise<Result<Bills>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        bills: Bills[];
    }>>);
    single: ((accountId: string, billId: number) => Promise<Result<{
        bill: Bills;
    }>>);
} = ...

Type declaration

  • archive: ((accountId: string, billId: number) => Promise<Result<Bills>>)
      • (accountId: string, billId: number): Promise<Result<Bills>>
      • Parameters

        • accountId: string
        • billId: number

        Returns Promise<Result<Bills>>

  • create: ((bill: Bills, accountId: string) => Promise<Result<Bills>>)
      • (bill: Bills, accountId: string): Promise<Result<Bills>>
      • Parameters

        • bill: Bills
        • accountId: string

        Returns Promise<Result<Bills>>

  • delete: ((accountId: string, billId: number) => Promise<Result<Bills>>)
      • (accountId: string, billId: number): Promise<Result<Bills>>
      • Parameters

        • accountId: string
        • billId: number

        Returns Promise<Result<Bills>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        bills: Bills[];
    }>>)
      • (accountId: string, queryBuilders?: QueryBuilderType[]): Promise<Result<{
            bills: Bills[];
        }>>
      • Parameters

        Returns Promise<Result<{
            bills: Bills[];
        }>>

  • single: ((accountId: string, billId: number) => Promise<Result<{
        bill: Bills;
    }>>)
      • (accountId: string, billId: number): Promise<Result<{
            bill: Bills;
        }>>
      • Parameters

        • accountId: string
        • billId: number

        Returns Promise<Result<{
            bill: Bills;
        }>>

callbacks: {
    create: ((callback: Callback, accountId: string) => Promise<Result<Callback>>);
    delete: ((accountId: string, callbackId: string) => Promise<Result<Callback>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        callbacks: Callback[];
        pages: Pagination;
    }>>);
    resendVerification: ((accountId: string, callbackId: string) => Promise<Result<Callback>>);
    single: ((accountId: string, callbackId: string) => Promise<Result<Callback>>);
    update: ((callback: Callback, accountId: string, callbackId: string) => Promise<Result<Callback>>);
    verify: ((accountId: string, callbackId: string, verifier: string) => Promise<Result<Callback>>);
} = ...

Type declaration

  • create: ((callback: Callback, accountId: string) => Promise<Result<Callback>>)
  • delete: ((accountId: string, callbackId: string) => Promise<Result<Callback>>)
      • (accountId: string, callbackId: string): Promise<Result<Callback>>
      • Parameters

        • accountId: string
        • callbackId: string

        Returns Promise<Result<Callback>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        callbacks: Callback[];
        pages: Pagination;
    }>>)
  • resendVerification: ((accountId: string, callbackId: string) => Promise<Result<Callback>>)
      • (accountId: string, callbackId: string): Promise<Result<Callback>>
      • Parameters

        • accountId: string
        • callbackId: string

        Returns Promise<Result<Callback>>

  • single: ((accountId: string, callbackId: string) => Promise<Result<Callback>>)
      • (accountId: string, callbackId: string): Promise<Result<Callback>>
      • Parameters

        • accountId: string
        • callbackId: string

        Returns Promise<Result<Callback>>

  • update: ((callback: Callback, accountId: string, callbackId: string) => Promise<Result<Callback>>)
      • (callback: Callback, accountId: string, callbackId: string): Promise<Result<Callback>>
      • Parameters

        • callback: Callback
        • accountId: string
        • callbackId: string

        Returns Promise<Result<Callback>>

  • verify: ((accountId: string, callbackId: string, verifier: string) => Promise<Result<Callback>>)
      • (accountId: string, callbackId: string, verifier: string): Promise<Result<Callback>>
      • Parameters

        • accountId: string
        • callbackId: string
        • verifier: string

        Returns Promise<Result<Callback>>

clientId: string
clientSecret?: string
clients: {
    create: ((client: Client, accountId: string) => Promise<Result<Client>>);
    delete: ((accountId: string, clientId: string) => Promise<Result<Client>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        clients: Client[];
        pages: Pagination;
    }>>);
    single: ((accountId: string, clientId: string) => Promise<Result<Client>>);
    update: ((client: Client, accountId: string, clientId: string) => Promise<Result<Client>>);
} = ...

Type declaration

  • create: ((client: Client, accountId: string) => Promise<Result<Client>>)
      • (client: Client, accountId: string): Promise<Result<Client>>
      • Parameters

        • client: Client
        • accountId: string

        Returns Promise<Result<Client>>

  • delete: ((accountId: string, clientId: string) => Promise<Result<Client>>)
      • (accountId: string, clientId: string): Promise<Result<Client>>
      • Parameters

        • accountId: string
        • clientId: string

        Returns Promise<Result<Client>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        clients: Client[];
        pages: Pagination;
    }>>)
  • single: ((accountId: string, clientId: string) => Promise<Result<Client>>)
      • (accountId: string, clientId: string): Promise<Result<Client>>
      • Parameters

        • accountId: string
        • clientId: string

        Returns Promise<Result<Client>>

  • update: ((client: Client, accountId: string, clientId: string) => Promise<Result<Client>>)
      • (client: Client, accountId: string, clientId: string): Promise<Result<Client>>
      • Parameters

        • client: Client
        • accountId: string
        • clientId: string

        Returns Promise<Result<Client>>

creditNotes: {
    create: ((creditNote: CreditNote, accountId: string) => Promise<Result<CreditNote>>);
    delete: ((accountId: string, creditId: string) => Promise<Result<CreditNote>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        creditNotes: CreditNote[];
        pages: Pagination;
    }>>);
    single: ((accountId: string, creditId: string) => Promise<Result<CreditNote>>);
    update: ((creditNote: CreditNote, accountId: string, creditId: string) => Promise<Result<CreditNote>>);
} = ...

Type declaration

  • create: ((creditNote: CreditNote, accountId: string) => Promise<Result<CreditNote>>)
  • delete: ((accountId: string, creditId: string) => Promise<Result<CreditNote>>)
      • (accountId: string, creditId: string): Promise<Result<CreditNote>>
      • Parameters

        • accountId: string
        • creditId: string

        Returns Promise<Result<CreditNote>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        creditNotes: CreditNote[];
        pages: Pagination;
    }>>)
  • single: ((accountId: string, creditId: string) => Promise<Result<CreditNote>>)
      • (accountId: string, creditId: string): Promise<Result<CreditNote>>
      • Parameters

        • accountId: string
        • creditId: string

        Returns Promise<Result<CreditNote>>

  • update: ((creditNote: CreditNote, accountId: string, creditId: string) => Promise<Result<CreditNote>>)
expenseCategories: {
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        categories: ExpenseCategory[];
        pages: Pagination;
    }>>);
    single: ((accountId: string, expenseCategoryId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<ExpenseCategory>>);
} = ...

Type declaration

expenses: {
    create: ((expense: Expense, accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Expense>>);
    delete: ((accountId: string, expenseId: string) => Promise<Result<Expense>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        expenses: Expense[];
        pages: Pagination;
    }>>);
    single: ((accountId: string, expenseId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Expense>>);
    update: ((expense: Expense, accountId: string, expenseId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Expense>>);
} = ...

Type declaration

invoices: {
    create: ((invoice: Invoice, accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Invoice>>);
    delete: ((accountId: string, invoiceId: string) => Promise<Result<Invoice>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        invoices: Invoice[];
        pages: Pagination;
    }>>);
    shareLink: ((accountId: string, invoiceId: string) => Promise<Result<Invoice>>);
    single: ((accountId: string, invoiceId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Invoice>>);
    update: ((accountId: string, invoiceId: string, data: any, queryBuilders?: QueryBuilderType[]) => Promise<Result<Invoice>>);
} = ...

Type declaration

  • create: ((invoice: Invoice, accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Invoice>>)
  • delete: ((accountId: string, invoiceId: string) => Promise<Result<Invoice>>)
      • (accountId: string, invoiceId: string): Promise<Result<Invoice>>
      • Parameters

        • accountId: string
        • invoiceId: string

        Returns Promise<Result<Invoice>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        invoices: Invoice[];
        pages: Pagination;
    }>>)
  • shareLink: ((accountId: string, invoiceId: string) => Promise<Result<Invoice>>)
      • (accountId: string, invoiceId: string): Promise<Result<Invoice>>
      • Parameters

        • accountId: string
        • invoiceId: string

        Returns Promise<Result<Invoice>>

  • single: ((accountId: string, invoiceId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<Invoice>>)
  • update: ((accountId: string, invoiceId: string, data: any, queryBuilders?: QueryBuilderType[]) => Promise<Result<Invoice>>)
      • (accountId: string, invoiceId: string, data: any, queryBuilders?: QueryBuilderType[]): Promise<Result<Invoice>>
      • Parameters

        • accountId: string
        • invoiceId: string
        • data: any
        • Optional queryBuilders: QueryBuilderType[]

        Returns Promise<Result<Invoice>>

items: {
    create: ((accountId: string, data: any) => Promise<Result<Item>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        items: Item[];
        pages: Pagination;
    }>>);
    single: ((accountId: string, itemId: string) => Promise<Result<Item>>);
    update: ((accountId: string, itemId: string, data: any) => Promise<Result<Item>>);
} = ...

Type declaration

  • create: ((accountId: string, data: any) => Promise<Result<Item>>)
      • (accountId: string, data: any): Promise<Result<Item>>
      • Parameters

        • accountId: string
        • data: any

        Returns Promise<Result<Item>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        items: Item[];
        pages: Pagination;
    }>>)
  • single: ((accountId: string, itemId: string) => Promise<Result<Item>>)
      • (accountId: string, itemId: string): Promise<Result<Item>>
      • Parameters

        • accountId: string
        • itemId: string

        Returns Promise<Result<Item>>

  • update: ((accountId: string, itemId: string, data: any) => Promise<Result<Item>>)
      • (accountId: string, itemId: string, data: any): Promise<Result<Item>>
      • Parameters

        • accountId: string
        • itemId: string
        • data: any

        Returns Promise<Result<Item>>

journalEntries: {
    create: ((journalEntry: JournalEntry, accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<JournalEntry>>);
} = ...

Type declaration

journalEntryAccounts: {
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        journalEntryAccounts: JournalEntryAccount[];
        pages: Pagination;
    }>>);
} = ...

Type declaration

journalEntryDetails: {
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        journalEntryAccounts: JournalEntryDetail[];
        pages: Pagination;
    }>>);
} = ...

Type declaration

logger: Logger
otherIncomes: {
    create: ((otherIncome: OtherIncome, accountId: string) => Promise<Result<OtherIncome>>);
    delete: ((accountId: string, otherIncomeId: string) => Promise<Result<OtherIncome>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        otherIncomes: OtherIncome[];
        pages: Pagination;
    }>>);
    single: ((accountId: string, otherIncomeId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<OtherIncome>>);
    update: ((accountId: string, otherIncomeId: string, data: any) => Promise<Result<OtherIncome>>);
} = ...

Type declaration

paymentOptions: {
    create: ((accountId: string, invoiceId: string, data: any) => Promise<Result<PaymentOptions>>);
    default: ((accountId: string) => Promise<Result<PaymentOptions>>);
    single: ((accountId: string, invoiceId: string) => Promise<Result<PaymentOptions>>);
} = ...

Type declaration

  • create: ((accountId: string, invoiceId: string, data: any) => Promise<Result<PaymentOptions>>)
      • (accountId: string, invoiceId: string, data: any): Promise<Result<PaymentOptions>>
      • Parameters

        • accountId: string
        • invoiceId: string
        • data: any

        Returns Promise<Result<PaymentOptions>>

  • default: ((accountId: string) => Promise<Result<PaymentOptions>>)
  • single: ((accountId: string, invoiceId: string) => Promise<Result<PaymentOptions>>)
      • (accountId: string, invoiceId: string): Promise<Result<PaymentOptions>>
      • Parameters

        • accountId: string
        • invoiceId: string

        Returns Promise<Result<PaymentOptions>>

payments: {
    create: ((accountId: string, data: any) => Promise<Result<Payment>>);
    delete: ((accountId: string, paymentId: string) => Promise<Result<Payment>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        payments: Payment[];
    }>>);
    single: ((accountId: string, paymentId: string) => Promise<Result<Payment>>);
    update: ((accountId: string, paymentId: string, data: any) => Promise<Result<Payment>>);
} = ...

Type declaration

  • create: ((accountId: string, data: any) => Promise<Result<Payment>>)
      • (accountId: string, data: any): Promise<Result<Payment>>
      • Parameters

        • accountId: string
        • data: any

        Returns Promise<Result<Payment>>

  • delete: ((accountId: string, paymentId: string) => Promise<Result<Payment>>)
      • (accountId: string, paymentId: string): Promise<Result<Payment>>
      • Parameters

        • accountId: string
        • paymentId: string

        Returns Promise<Result<Payment>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        payments: Payment[];
    }>>)
  • single: ((accountId: string, paymentId: string) => Promise<Result<Payment>>)
      • (accountId: string, paymentId: string): Promise<Result<Payment>>
      • Parameters

        • accountId: string
        • paymentId: string

        Returns Promise<Result<Payment>>

  • update: ((accountId: string, paymentId: string, data: any) => Promise<Result<Payment>>)
      • (accountId: string, paymentId: string, data: any): Promise<Result<Payment>>
      • Parameters

        • accountId: string
        • paymentId: string
        • data: any

        Returns Promise<Result<Payment>>

projects: {
    create: ((project: Project, businessId: number) => Promise<Result<Project>>);
    delete: ((businessId: number, projectId: number) => Promise<Result<Project>>);
    list: ((businessId: number, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        projects: Project[];
    }>>);
    single: ((businessId: number, projectId: number) => Promise<Result<Project>>);
    update: ((project: Project, businessId: number, projectId: number) => Promise<Result<Project>>);
} = ...

Type declaration

  • create: ((project: Project, businessId: number) => Promise<Result<Project>>)
      • (project: Project, businessId: number): Promise<Result<Project>>
      • Parameters

        • project: Project
        • businessId: number

        Returns Promise<Result<Project>>

  • delete: ((businessId: number, projectId: number) => Promise<Result<Project>>)
      • (businessId: number, projectId: number): Promise<Result<Project>>
      • Parameters

        • businessId: number
        • projectId: number

        Returns Promise<Result<Project>>

  • list: ((businessId: number, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        projects: Project[];
    }>>)
  • single: ((businessId: number, projectId: number) => Promise<Result<Project>>)
      • (businessId: number, projectId: number): Promise<Result<Project>>
      • Parameters

        • businessId: number
        • projectId: number

        Returns Promise<Result<Project>>

  • update: ((project: Project, businessId: number, projectId: number) => Promise<Result<Project>>)
      • (project: Project, businessId: number, projectId: number): Promise<Result<Project>>
      • Parameters

        • project: Project
        • businessId: number
        • projectId: number

        Returns Promise<Result<Project>>

redirectUri?: string
refreshToken?: string

Pre-authorized token for renewing access token

reports: {
    paymentsCollected: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        callbacks: Callback[];
        pages: Pagination;
    }>>);
    profitLoss: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        callbacks: Callback[];
        pages: Pagination;
    }>>);
    taxSummary: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        callbacks: Callback[];
        pages: Pagination;
    }>>);
} = ...

Type declaration

services: {
    create: ((service: Service, businessId: number) => Promise<Result<Service>>);
    list: ((businessId: number) => Promise<Result<{
        pages: Pagination;
        timeEntries: Service[];
    }>>);
    rate: {
        create: ((service: ServiceRate, businessId: number, serviceId: number) => Promise<Result<ServiceRate>>);
        single: ((businessId: number, serviceId: number) => Promise<Result<ServiceRate>>);
        update: ((service: ServiceRate, businessId: number, serviceId: number) => Promise<Result<ServiceRate>>);
    };
    single: ((businessId: number, serviceId: number) => Promise<Result<Service>>);
} = ...

Type declaration

  • create: ((service: Service, businessId: number) => Promise<Result<Service>>)
      • (service: Service, businessId: number): Promise<Result<Service>>
      • Parameters

        • service: Service
        • businessId: number

        Returns Promise<Result<Service>>

  • list: ((businessId: number) => Promise<Result<{
        pages: Pagination;
        timeEntries: Service[];
    }>>)
      • (businessId: number): Promise<Result<{
            pages: Pagination;
            timeEntries: Service[];
        }>>
      • Parameters

        • businessId: number

        Returns Promise<Result<{
            pages: Pagination;
            timeEntries: Service[];
        }>>

  • rate: {
        create: ((service: ServiceRate, businessId: number, serviceId: number) => Promise<Result<ServiceRate>>);
        single: ((businessId: number, serviceId: number) => Promise<Result<ServiceRate>>);
        update: ((service: ServiceRate, businessId: number, serviceId: number) => Promise<Result<ServiceRate>>);
    }
    • create: ((service: ServiceRate, businessId: number, serviceId: number) => Promise<Result<ServiceRate>>)
    • single: ((businessId: number, serviceId: number) => Promise<Result<ServiceRate>>)
        • (businessId: number, serviceId: number): Promise<Result<ServiceRate>>
        • Parameters

          • businessId: number
          • serviceId: number

          Returns Promise<Result<ServiceRate>>

    • update: ((service: ServiceRate, businessId: number, serviceId: number) => Promise<Result<ServiceRate>>)
  • single: ((businessId: number, serviceId: number) => Promise<Result<Service>>)
      • (businessId: number, serviceId: number): Promise<Result<Service>>
      • Parameters

        • businessId: number
        • serviceId: number

        Returns Promise<Result<Service>>

tasks: {
    create: ((task: Tasks, accountId: string) => Promise<Result<Tasks>>);
    delete: ((accountId: string, taskId: number) => Promise<Result<Tasks>>);
    list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        tasks: Tasks[];
    }>>);
    single: ((accountId: string, taskId: number) => Promise<Result<Tasks>>);
    update: ((task: Tasks, accountId: string, taskId: number) => Promise<Result<Tasks>>);
} = ...

Type declaration

  • create: ((task: Tasks, accountId: string) => Promise<Result<Tasks>>)
      • (task: Tasks, accountId: string): Promise<Result<Tasks>>
      • Parameters

        • task: Tasks
        • accountId: string

        Returns Promise<Result<Tasks>>

  • delete: ((accountId: string, taskId: number) => Promise<Result<Tasks>>)
      • (accountId: string, taskId: number): Promise<Result<Tasks>>
      • Parameters

        • accountId: string
        • taskId: number

        Returns Promise<Result<Tasks>>

  • list: ((accountId: string, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        tasks: Tasks[];
    }>>)
  • single: ((accountId: string, taskId: number) => Promise<Result<Tasks>>)
      • (accountId: string, taskId: number): Promise<Result<Tasks>>
      • Parameters

        • accountId: string
        • taskId: number

        Returns Promise<Result<Tasks>>

  • update: ((task: Tasks, accountId: string, taskId: number) => Promise<Result<Tasks>>)
      • (task: Tasks, accountId: string, taskId: number): Promise<Result<Tasks>>
      • Parameters

        • task: Tasks
        • accountId: string
        • taskId: number

        Returns Promise<Result<Tasks>>

timeEntries: {
    create: ((timeEntry: TimeEntry, businessId: number) => Promise<Result<TimeEntry>>);
    delete: ((businessId: number, timeEntryId: number) => Promise<Result<TimeEntry>>);
    list: ((businessId: number, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        timeEntries: TimeEntry[];
    }>>);
    single: ((businessId: number, timeEntryId: number) => Promise<Result<TimeEntry>>);
    update: ((timeEntry: TimeEntry, businessId: number, timeEntryId: number) => Promise<Result<TimeEntry>>);
} = ...

Type declaration

  • create: ((timeEntry: TimeEntry, businessId: number) => Promise<Result<TimeEntry>>)
  • delete: ((businessId: number, timeEntryId: number) => Promise<Result<TimeEntry>>)
      • (businessId: number, timeEntryId: number): Promise<Result<TimeEntry>>
      • Parameters

        • businessId: number
        • timeEntryId: number

        Returns Promise<Result<TimeEntry>>

  • list: ((businessId: number, queryBuilders?: QueryBuilderType[]) => Promise<Result<{
        pages: Pagination;
        timeEntries: TimeEntry[];
    }>>)
  • single: ((businessId: number, timeEntryId: number) => Promise<Result<TimeEntry>>)
      • (businessId: number, timeEntryId: number): Promise<Result<TimeEntry>>
      • Parameters

        • businessId: number
        • timeEntryId: number

        Returns Promise<Result<TimeEntry>>

  • update: ((timeEntry: TimeEntry, businessId: number, timeEntryId: number) => Promise<Result<TimeEntry>>)
      • (timeEntry: TimeEntry, businessId: number, timeEntryId: number): Promise<Result<TimeEntry>>
      • Parameters

        • timeEntry: TimeEntry
        • businessId: number
        • timeEntryId: number

        Returns Promise<Result<TimeEntry>>

users: {
    me: (() => Promise<Result<User>>);
} = ...

Type declaration

  • me: (() => Promise<Result<User>>)
      • (): Promise<Result<User>>
      • Returns Promise<Result<User>>

Methods

  • Parameters

    • grantType: "authorization_code" | "refresh_token"
    • codeType: "code" | "refresh_token"
    • code: string

    Returns Promise<undefined | {
        accessToken: string;
        accessTokenExpiresAt: Date;
        refreshToken: string;
    }>

  • Type Parameters

    • S

    • T

    Parameters

    • method: Method
    • url: string
    • Optional config: any
    • Optional data: S
    • Optional name: string

    Returns Promise<Result<T>>

  • Parameters

    • code: string

    Returns Promise<undefined | {
        accessToken: string;
        accessTokenExpiresAt: Date;
        refreshToken: string;
    }>

  • Parameters

    • Optional refreshToken: string

    Returns Promise<undefined | {
        accessToken: string;
        accessTokenExpiresAt: Date;
        refreshToken: string;
    }>

Generated using TypeDoc