UNPKG

xero-node

Version:

Xero NodeJS OAuth 2.0 client for xero-node

179 lines (178 loc) 7.08 kB
/** * Xero Payroll AU API 2.0 * This is the Xero Payroll API 2.0 for orgs in Australia region. * * The version of the OpenAPI document: 12.0.0 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { Timesheet } from '../model/payroll-au-v2/timesheet'; import { TimesheetLine } from '../model/payroll-au-v2/timesheetLine'; import { TimesheetLineObject } from '../model/payroll-au-v2/timesheetLineObject'; import { TimesheetObject } from '../model/payroll-au-v2/timesheetObject'; import { Timesheets } from '../model/payroll-au-v2/timesheets'; import { Authentication } from '../model/payroll-au-v2/models'; import { AxiosResponse } from 'axios'; import { OAuth } from '../model/payroll-au-v2/models'; export declare enum PayrollAuV2ApiApiKeys { } export declare class PayrollAuV2Api { protected _basePath: string; protected defaultHeaders: any; protected _useQuerystring: boolean; protected binaryHeaders: any; protected authentications: { default: Authentication; OAuth2: OAuth; }; constructor(basePath?: string); set useQuerystring(value: boolean); set basePath(basePath: string); get basePath(): string; setDefaultAuthentication(auth: Authentication): void; setApiKey(key: PayrollAuV2ApiApiKeys, value: string): void; set accessToken(token: string); /** * * @summary Approves a specific timesheet * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. */ approveTimesheet(xeroTenantId: string, timesheetID: string, idempotencyKey?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetObject; }>; /** * * @summary Creates a new timesheet * @param xeroTenantId Xero identifier for Tenant * @param timesheet * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. */ createTimesheet(xeroTenantId: string, timesheet: Timesheet, idempotencyKey?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetObject; }>; /** * * @summary Creates a new timesheet line for a specific timesheet using a unique timesheet ID * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet * @param timesheetLine * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. */ createTimesheetLine(xeroTenantId: string, timesheetID: string, timesheetLine: TimesheetLine, idempotencyKey?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetLineObject; }>; /** * * @summary Deletes a specific timesheet * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet */ deleteTimesheet(xeroTenantId: string, timesheetID: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetLine; }>; /** * * @summary Deletes a specific timesheet line * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet * @param timesheetLineID Identifier for the timesheet line */ deleteTimesheetLine(xeroTenantId: string, timesheetID: string, timesheetLineID: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetLine; }>; /** * * @summary Retrieve a specific timesheet by using a unique timesheet ID * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet */ getTimesheet(xeroTenantId: string, timesheetID: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetObject; }>; /** * * @summary Retrieves timesheets * @param xeroTenantId Xero identifier for Tenant * @param page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. * @param filter Filter by employeeId and/or payrollCalendarId * @param status filter results by any timesheets with a matching timesheet status * @param startDate filter results by any timesheets with a startDate on or after the provided date * @param endDate filter results by any timesheets with a endDate on or before the provided date * @param sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest. */ getTimesheets(xeroTenantId: string, page?: number, filter?: string, status?: string, startDate?: string, endDate?: string, sort?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: Timesheets; }>; /** * * @summary Reverts a specific timesheet to draft * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. */ revertTimesheet(xeroTenantId: string, timesheetID: string, idempotencyKey?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetObject; }>; /** * * @summary Updates a specific timesheet line for a specific timesheet * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet * @param timesheetLineID Identifier for the timesheet line * @param timesheetLine * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. */ updateTimesheetLine(xeroTenantId: string, timesheetID: string, timesheetLineID: string, timesheetLine: TimesheetLine, idempotencyKey?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: AxiosResponse; body: TimesheetLineObject; }>; }