From 24782018fb3fdf9cbf31f276d3ed4123e486b1a8 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Wed, 22 Oct 2025 02:49:56 +0000 Subject: [PATCH] [XAPI-1200] Fix build scripts (#389) * [XAPI-1200] Handle output folder deletion in main script * [XAPI-1200] Use locally built docker image * [XAPI-1200] Check java installed and using correct version * [XAPI-1200] Rename docker file no longer just used for docs * [XAPI-1200] Added docker to run post generation checks in code-gen repo * [XAPI-1200] Update repository Now matches what is in upstream after manual change previously * [XAPI-1200] Do python processing with uv with pinned package versions * [XAPI-1200] Remove flake8 It's not doing anything right now, and we should move to ruff in the future anyway * [XAPI-1200] Newline fix * [XAPI-1200] Check java versions 11-21 * [XAPI-1200] Remove flake8 and other pip/python installing This is handled with uv now * [XAPI-1200] Run tests in uv * [XAPI-1200] Access host from inside container * [XAPI-1200] Use uv directly instead of docker --------- Co-authored-by: Ryan McCarthy --- docs/accounting/index.html | 5 + docs/payroll-nz/index.html | 183 ---------------------------- docs/payroll-uk/index.html | 183 ---------------------------- src/gen/api/accountingApi.ts | 2 +- src/gen/api/appStoreApi.ts | 2 +- src/gen/api/assetApi.ts | 2 +- src/gen/api/bankfeedsApi.ts | 2 +- src/gen/api/filesApi.ts | 2 +- src/gen/api/financeApi.ts | 2 +- src/gen/api/payrollAUApi.ts | 2 +- src/gen/api/payrollNZApi.ts | 84 +------------ src/gen/api/payrollUKApi.ts | 85 +------------ src/gen/api/projectApi.ts | 2 +- src/gen/model/accounting/contact.ts | 15 +++ src/gen/model/accounting/models.ts | 1 + 15 files changed, 31 insertions(+), 541 deletions(-) diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 741f401c4..a20c83712 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -2104,6 +2104,11 @@ "type" : "string", "description" : "Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)" }, + "TaxNumberType" : { + "type" : "string", + "description" : "Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers", + "enum" : [ "SSN", "EIN", "ITIN", "ATIN" ] + }, "AccountsReceivableTaxType" : { "type" : "string", "description" : "The tax type from TaxRates" diff --git a/docs/payroll-nz/index.html b/docs/payroll-nz/index.html index 292f19f34..67ae9be64 100644 --- a/docs/payroll-nz/index.html +++ b/docs/payroll-nz/index.html @@ -4297,9 +4297,6 @@
  • updateEmployeeTax
  • -
  • - updatePayRun -
  • updatePaySlipLineItems
  • @@ -14301,186 +14298,6 @@

    Parameters

    }, "required" : true } - - - - -
    -
    -
    -
    -

    updatePayRun

    -

    Updates a pay run

    -
    -
    -
    -

    -

    -

    -
    -
    /PayRuns/{PayRunID}
    -

    -

    Usage and SDK Samples

    -

    - -
    - -
    -
    await xero.setTokenSet(tokenSet);
    -
    -const xeroTenantId = 'xeroTenantId_example';
    -const payRunID = '38400000-8cf0-11bd-b23e-10b96e4ef00d';
    -const idempotencyKey = 'KEY_VALUE';
    -const startDate = '2020-10-28'
    -const paymentDate = '2020-10-30'
    -
    -const payRunCalendar: PayRunCalendar = { 
    -  calendarType: CalendarType.Weekly,
    -  periodStartDate: startDate,
    -  paymentDate: paymentDate
    -}; 
    -
    -try {
    -  const response = await xero.accountingApi.updatePayRun(xeroTenantId, payRunID, payRun, idempotencyKey);
    -  console.log(response.body || response.response.statusCode)
    -} catch (err) {
    -  const error = JSON.stringify(err.response.body, null, 2)
    -  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
    -}
    -
    -
    -

    Scopes

    - - - - - - - -
    payroll.payrunsGrant read-write access to payroll payruns
    -

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    PayRunID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Identifier for the pay run -
    -
    -
    - Required -
    -
    -
    -
    -
    Header parameters
    - - - - - - - - - - - - - -
    NameDescription
    Xero-Tenant-Id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    -
    -
    -
    Idempotency-Key - - -
    -
    -
    - - String - - -
    -This allows you to safely retry requests without the risk of duplicate processing. 128 character max. -
    -
    -
    -
    -
    -
    Body parameters
    - - - - - - -
    NameDescription
    payRun * -
    -
    - - PayRun - - -
    - -
    -
    -
    - Required -
    -
    -
    diff --git a/docs/payroll-uk/index.html b/docs/payroll-uk/index.html index 9ceb26bf9..9bb8944d6 100644 --- a/docs/payroll-uk/index.html +++ b/docs/payroll-uk/index.html @@ -3807,9 +3807,6 @@
  • updateEmployeeSalaryAndWage
  • -
  • - updatePayRun -
  • updateTimesheetLine
  • @@ -13573,186 +13570,6 @@

    Parameters

    }, "required" : true } - - - -
    -
    -
    -
    -
    -

    updatePayRun

    -

    Updates a specific pay run

    -
    -
    -
    -

    -

    -

    -
    -
    /PayRuns/{PayRunID}
    -

    -

    Usage and SDK Samples

    -

    - -
    - -
    -
    await xero.setTokenSet(tokenSet);
    -
    -const xeroTenantId = 'xeroTenantId_example';
    -const payRunID = '38400000-8cf0-11bd-b23e-10b96e4ef00d';
    -const idempotencyKey = 'KEY_VALUE';
    -const startDate = '2020-10-28'
    -const paymentDate = '2020-10-30'
    -
    -const payRunCalendar: PayRunCalendar = { 
    -  calendarType: CalendarType.Weekly,
    -  periodStartDate: startDate,
    -  paymentDate: paymentDate
    -}; 
    -
    -try {
    -  const response = await xero.accountingApi.updatePayRun(xeroTenantId, payRunID, payRun, idempotencyKey);
    -  console.log(response.body || response.response.statusCode)
    -} catch (err) {
    -  const error = JSON.stringify(err.response.body, null, 2)
    -  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
    -}
    -
    -
    -

    Scopes

    - - - - - - - -
    payroll.payrunsGrant read-write access to payroll payruns
    -

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    PayRunID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Identifier for the pay run -
    -
    -
    - Required -
    -
    -
    -
    -
    Header parameters
    - - - - - - - - - - - - - -
    NameDescription
    Xero-Tenant-Id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    -
    -
    -
    Idempotency-Key - - -
    -
    -
    - - String - - -
    -This allows you to safely retry requests without the risk of duplicate processing. 128 character max. -
    -
    -
    -
    -
    -
    Body parameters
    - - - - - - -
    NameDescription
    payRun * -
    -
    - - PayRun - - -
    - -
    -
    -
    - Required -
    -
    -
    diff --git a/src/gen/api/accountingApi.ts b/src/gen/api/accountingApi.ts index c469bf9dc..42d436aa4 100644 --- a/src/gen/api/accountingApi.ts +++ b/src/gen/api/accountingApi.ts @@ -2,7 +2,7 @@ * Xero Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/appStoreApi.ts b/src/gen/api/appStoreApi.ts index 118701718..50fa680ec 100644 --- a/src/gen/api/appStoreApi.ts +++ b/src/gen/api/appStoreApi.ts @@ -2,7 +2,7 @@ * Xero AppStore API * These endpoints are for Xero Partners to interact with the App Store Billing platform * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/assetApi.ts b/src/gen/api/assetApi.ts index 01521cce4..cad0dca20 100644 --- a/src/gen/api/assetApi.ts +++ b/src/gen/api/assetApi.ts @@ -2,7 +2,7 @@ * Xero Assets API * The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc. * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/bankfeedsApi.ts b/src/gen/api/bankfeedsApi.ts index 4f3c11983..39b5a3351 100644 --- a/src/gen/api/bankfeedsApi.ts +++ b/src/gen/api/bankfeedsApi.ts @@ -2,7 +2,7 @@ * Xero Bank Feeds API * The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you\'re an existing financial services partner that wants access, contact your local Partner Manager. If you\'re a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner. * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/filesApi.ts b/src/gen/api/filesApi.ts index d5e907a3a..59964fc8a 100644 --- a/src/gen/api/filesApi.ts +++ b/src/gen/api/filesApi.ts @@ -2,7 +2,7 @@ * Xero Files API * These endpoints are specific to Xero Files API * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/financeApi.ts b/src/gen/api/financeApi.ts index cf4d83d66..690375b68 100644 --- a/src/gen/api/financeApi.ts +++ b/src/gen/api/financeApi.ts @@ -2,7 +2,7 @@ * Xero Finance API * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/payrollAUApi.ts b/src/gen/api/payrollAUApi.ts index 30fe03fe8..7983c3fa8 100644 --- a/src/gen/api/payrollAUApi.ts +++ b/src/gen/api/payrollAUApi.ts @@ -2,7 +2,7 @@ * Xero Payroll AU API * This is the Xero Payroll API for orgs in Australia region. * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/payrollNZApi.ts b/src/gen/api/payrollNZApi.ts index 888346c0d..a7b488b70 100644 --- a/src/gen/api/payrollNZApi.ts +++ b/src/gen/api/payrollNZApi.ts @@ -2,7 +2,7 @@ * Xero Payroll NZ * This is the Xero Payroll API for orgs in the NZ region. * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -5489,88 +5489,6 @@ export class PayrollNzApi { }); }); } - /** - * - * @summary Updates a pay run - * @param xeroTenantId Xero identifier for Tenant - * @param payRunID Identifier for the pay run - * @param payRun - * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - */ - public async updatePayRun (xeroTenantId: string, payRunID: string, payRun: PayRun, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: PayRunObject; }> { - const localVarPath = this.basePath + '/PayRuns/{PayRunID}' - .replace('{' + 'PayRunID' + '}', encodeURIComponent(String(payRunID))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - let acceptHeadersFromSpec = [ - "application/json" - ]; - const isBufferType = acceptHeadersFromSpec.includes("application/pdf")|| acceptHeadersFromSpec.includes("application/octet-stream") || acceptHeadersFromSpec.includes("application/jpg"); - const responseTypeOption = isBufferType ? "arraybuffer" : "json"; - - // verify required parameter 'xeroTenantId' is not null or undefined - if (xeroTenantId === null || xeroTenantId === undefined) { - throw new Error('Required parameter xeroTenantId was null or undefined when calling updatePayRun.'); - } - - // verify required parameter 'payRunID' is not null or undefined - if (payRunID === null || payRunID === undefined) { - throw new Error('Required parameter payRunID was null or undefined when calling updatePayRun.'); - } - - // verify required parameter 'payRun' is not null or undefined - if (payRun === null || payRun === undefined) { - throw new Error('Required parameter payRun was null or undefined when calling updatePayRun.'); - } - - localVarHeaderParams['Xero-Tenant-Id'] = ObjectSerializer.serialize(xeroTenantId, "string"); - localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); - localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); - (Object).assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - - let localVarRequestOptions: AxiosRequestConfig = { - method: 'PUT', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - responseType: responseTypeOption, - data: ObjectSerializer.serialize(payRun, "PayRun"), - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions)); - - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).data = localVarFormParams; - localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'Content-Type': 'multipart/form-data' }; - } else { - localVarRequestOptions.data = localVarFormParams; - localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; - } - } - return new Promise<{ response: AxiosResponse; body: PayRunObject; }>(async (resolve, reject) => { - let body = null - try { - const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "PayRunObject"); - if (response.status && response.status >= 200 && response.status <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: response, body: body }); - } - } - catch(error) { - const errorResponse = new ApiError(error) - reject(JSON.stringify(errorResponse.generateError())) - } - }); - }); - } /** * * @summary Creates an employee pay slip diff --git a/src/gen/api/payrollUKApi.ts b/src/gen/api/payrollUKApi.ts index b95ad7269..e41090dc9 100644 --- a/src/gen/api/payrollUKApi.ts +++ b/src/gen/api/payrollUKApi.ts @@ -2,7 +2,7 @@ * Xero Payroll UK * This is the Xero Payroll API for orgs in the UK region. * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,6 @@ import { LeavePeriods } from '../model/payroll-uk/leavePeriods'; import { LeaveType } from '../model/payroll-uk/leaveType'; import { LeaveTypeObject } from '../model/payroll-uk/leaveTypeObject'; import { LeaveTypes } from '../model/payroll-uk/leaveTypes'; -import { PayRun } from '../model/payroll-uk/payRun'; import { PayRunCalendar } from '../model/payroll-uk/payRunCalendar'; import { PayRunCalendarObject } from '../model/payroll-uk/payRunCalendarObject'; import { PayRunCalendars } from '../model/payroll-uk/payRunCalendars'; @@ -5402,88 +5401,6 @@ export class PayrollUkApi { }); }); } - /** - * - * @summary Updates a specific pay run - * @param xeroTenantId Xero identifier for Tenant - * @param payRunID Identifier for the pay run - * @param payRun - * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - */ - public async updatePayRun (xeroTenantId: string, payRunID: string, payRun: PayRun, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: PayRunObject; }> { - const localVarPath = this.basePath + '/PayRuns/{PayRunID}' - .replace('{' + 'PayRunID' + '}', encodeURIComponent(String(payRunID))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - let acceptHeadersFromSpec = [ - "application/json" - ]; - const isBufferType = acceptHeadersFromSpec.includes("application/pdf")|| acceptHeadersFromSpec.includes("application/octet-stream") || acceptHeadersFromSpec.includes("application/jpg"); - const responseTypeOption = isBufferType ? "arraybuffer" : "json"; - - // verify required parameter 'xeroTenantId' is not null or undefined - if (xeroTenantId === null || xeroTenantId === undefined) { - throw new Error('Required parameter xeroTenantId was null or undefined when calling updatePayRun.'); - } - - // verify required parameter 'payRunID' is not null or undefined - if (payRunID === null || payRunID === undefined) { - throw new Error('Required parameter payRunID was null or undefined when calling updatePayRun.'); - } - - // verify required parameter 'payRun' is not null or undefined - if (payRun === null || payRun === undefined) { - throw new Error('Required parameter payRun was null or undefined when calling updatePayRun.'); - } - - localVarHeaderParams['Xero-Tenant-Id'] = ObjectSerializer.serialize(xeroTenantId, "string"); - localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); - localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); - (Object).assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - - let localVarRequestOptions: AxiosRequestConfig = { - method: 'PUT', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - responseType: responseTypeOption, - data: ObjectSerializer.serialize(payRun, "PayRun"), - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions)); - - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).data = localVarFormParams; - localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'Content-Type': 'multipart/form-data' }; - } else { - localVarRequestOptions.data = localVarFormParams; - localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; - } - } - return new Promise<{ response: AxiosResponse; body: PayRunObject; }>(async (resolve, reject) => { - let body = null - try { - const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "PayRunObject"); - if (response.status && response.status >= 200 && response.status <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: response, body: body }); - } - } - catch(error) { - const errorResponse = new ApiError(error) - reject(JSON.stringify(errorResponse.generateError())) - } - }); - }); - } /** * * @summary Updates a specific timesheet line for a specific timesheet diff --git a/src/gen/api/projectApi.ts b/src/gen/api/projectApi.ts index 0b3cb4581..169e48792 100644 --- a/src/gen/api/projectApi.ts +++ b/src/gen/api/projectApi.ts @@ -2,7 +2,7 @@ * Xero Projects API * This is the Xero Projects API * - * The version of the OpenAPI document: 9.1.0 + * The version of the OpenAPI document: 9.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/model/accounting/contact.ts b/src/gen/model/accounting/contact.ts index f4af8e643..9ec45305e 100644 --- a/src/gen/model/accounting/contact.ts +++ b/src/gen/model/accounting/contact.ts @@ -65,6 +65,10 @@ export class Contact { */ 'taxNumber'?: string; /** + * Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers + */ + 'taxNumberType'?: Contact.TaxNumberTypeEnum; + /** * The tax type from TaxRates */ 'accountsReceivableTaxType'?: string; @@ -234,6 +238,11 @@ export class Contact { "baseName": "TaxNumber", "type": "string" }, + { + "name": "taxNumberType", + "baseName": "TaxNumberType", + "type": "Contact.TaxNumberTypeEnum" + }, { "name": "accountsReceivableTaxType", "baseName": "AccountsReceivableTaxType", @@ -391,6 +400,12 @@ export namespace Contact { ARCHIVED = 'ARCHIVED', GDPRREQUEST = 'GDPRREQUEST' } + export enum TaxNumberTypeEnum { + SSN = 'SSN', + EIN = 'EIN', + ITIN = 'ITIN', + ATIN = 'ATIN' + } export enum SalesDefaultLineAmountTypeEnum { INCLUSIVE = 'INCLUSIVE', EXCLUSIVE = 'EXCLUSIVE', diff --git a/src/gen/model/accounting/models.ts b/src/gen/model/accounting/models.ts index 028fc90cb..5268439a1 100644 --- a/src/gen/model/accounting/models.ts +++ b/src/gen/model/accounting/models.ts @@ -300,6 +300,7 @@ let enumsMap: {[index: string]: any} = { "BrandingTheme.TypeEnum": BrandingTheme.TypeEnum, "Budget.TypeEnum": Budget.TypeEnum, "Contact.ContactStatusEnum": Contact.ContactStatusEnum, + "Contact.TaxNumberTypeEnum": Contact.TaxNumberTypeEnum, "Contact.SalesDefaultLineAmountTypeEnum": Contact.SalesDefaultLineAmountTypeEnum, "Contact.PurchasesDefaultLineAmountTypeEnum": Contact.PurchasesDefaultLineAmountTypeEnum, "ContactGroup.StatusEnum": ContactGroup.StatusEnum,