Skip to content

Commit

Permalink
631-added the logic to accept buffer type
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeet-joy-tw committed Feb 12, 2024
1 parent 77648d1 commit 372f937
Show file tree
Hide file tree
Showing 12 changed files with 226 additions and 122 deletions.
7 changes: 7 additions & 0 deletions docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4377,6 +4377,13 @@
"items" : {
"$ref" : "#/components/schemas/ValidationError"
}
},
"Warnings" : {
"type" : "array",
"description" : "Displays array of warning messages from the API",
"items" : {
"$ref" : "#/components/schemas/ValidationError"
}
}
},
"description" : "",
Expand Down
310 changes: 199 additions & 111 deletions src/gen/api/accountingApi.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/gen/api/appStoreApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/assetApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/bankfeedsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/gen/api/filesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Files API
* These endpoints are specific to Xero Files API
*
* The version of the OpenAPI document: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -1327,7 +1327,7 @@ export class FilesApi {
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
* @param mimeType
*/
public async uploadFile (xeroTenantId: string, body: fs.ReadStream | Readable, name: string, filename: string, idempotencyKey?: string, mimeType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: FileObject; }> {
public async uploadFile (xeroTenantId: string, body: fs.ReadStream | Readable | Buffer , name: string, filename: string, idempotencyKey?: string, mimeType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: FileObject; }> {
const localVarPath = this.basePath + '/Files';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
Expand Down Expand Up @@ -1433,7 +1433,7 @@ export class FilesApi {
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
* @param mimeType
*/
public async uploadFileToFolder (xeroTenantId: string, folderId: string, body: fs.ReadStream | Readable, name: string, filename: string, idempotencyKey?: string, mimeType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: FileObject; }> {
public async uploadFileToFolder (xeroTenantId: string, folderId: string, body: fs.ReadStream | Readable | Buffer , name: string, filename: string, idempotencyKey?: string, mimeType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: FileObject; }> {
const localVarPath = this.basePath + '/Files/{FolderId}'
.replace('{' + 'FolderId' + '}', encodeURIComponent(String(folderId)));
let localVarQueryParameters: any = {};
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/financeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/payrollAUApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/payrollNZApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/payrollUKApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/api/projectApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Projects API
* This is the Xero Projects API
*
* The version of the OpenAPI document: 3.0.0
* The version of the OpenAPI document: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
9 changes: 9 additions & 0 deletions src/gen/model/accounting/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ export class Payment {
* Displays array of validation error messages from the API
*/
'validationErrors'?: Array<ValidationError>;
/**
* Displays array of warning messages from the API
*/
'warnings'?: Array<ValidationError>;

static discriminator: string | undefined = undefined;

Expand Down Expand Up @@ -235,6 +239,11 @@ export class Payment {
"name": "validationErrors",
"baseName": "ValidationErrors",
"type": "Array<ValidationError>"
},
{
"name": "warnings",
"baseName": "Warnings",
"type": "Array<ValidationError>"
} ];

static getAttributeTypeMap() {
Expand Down

0 comments on commit 372f937

Please sign in to comment.