Required role: | Admin | Required permission: | CanAccess |
GET | /async/products/search |
---|
"use strict";
export class PaginationBase {
/** @param {{skip?:number,take?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?number}
* @description The number of query results to skip. */
skip;
/**
* @type {?number}
* @description The number of query results to include. */
take;
}
export class SearchProductsBase extends PaginationBase {
/** @param {{productId?:number,accountId?:number,name?:string,nameStartsWith?:string,nameEndsWith?:string,nameContains?:string,version?:string,versionStartsWith?:string,versionEndsWith?:string,versionContains?:string,description?:string,descriptionStartsWith?:string,descriptionEndsWith?:string,descriptionContains?:string,includeOrders?:boolean,skipOrders?:number,takeOrders?:number,skip?:number,take?:number,skip?:number,take?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?number}
* @description The unique identifier of the account associated with the product. */
productId;
/**
* @type {?number}
* @description The unique identifier of the account associated with the product. */
accountId;
/**
* @type {?string}
* @description The name of the product. */
name;
/**
* @type {?string}
* @description Search by using the name of the product that starts with the specified value. */
nameStartsWith;
/**
* @type {?string}
* @description Search by using the name of the product that ends with the specified value. */
nameEndsWith;
/**
* @type {?string}
* @description Search by using the name of the product that contains the specified value. */
nameContains;
/**
* @type {?string}
* @description The version of the product. */
version;
/**
* @type {?string}
* @description Search by using the version of the product that starts with the specified value. */
versionStartsWith;
/**
* @type {?string}
* @description Search by using the version of the product that ends with the specified value. */
versionEndsWith;
/**
* @type {?string}
* @description Search by using the version of the product that contains the specified value. */
versionContains;
/**
* @type {?string}
* @description The description of the product. */
description;
/**
* @type {?string}
* @description Search by using the description of the product that starts with the specified value. */
descriptionStartsWith;
/**
* @type {?string}
* @description Search by using the description of the product that ends with the specified value. */
descriptionEndsWith;
/**
* @type {?string}
* @description Search by using the description of the product that contains the specified value. */
descriptionContains;
/**
* @type {?boolean}
* @description Should the related orders of the account be included in the retrieved products? */
includeOrders;
/**
* @type {?number}
* @description Specifies the number of orders to skip per product. Applicable only when 'IncludeOrders' is true. */
skipOrders;
/**
* @type {?number}
* @description Specifies the number of orders to include per product. Applicable only when 'IncludeOrders' is true. */
takeOrders;
/**
* @type {?number}
* @description The number of query results to skip. */
skip;
/**
* @type {?number}
* @description The number of query results to include. */
take;
}
export class Product {
/** @param {{id?:number,index?:number,name?:string,version?:string,description?:string,tags?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The unique identifier of the product. */
id;
/**
* @type {number}
* @description The position of this instance in a collection of 'Product' instances */
index;
/**
* @type {string}
* @description The name of the product. */
name;
/**
* @type {string}
* @description The version of the product. */
version;
/**
* @type {?string}
* @description The version of the product. */
description;
/**
* @type {string[]}
* @description Tags associated with the product. */
tags;
}
export class ProductQueryResponse extends QueryResponse {
/** @param {{ordersMap?:{ [index: number]: Order[]; },offset?:number,total?:number,results?:Product[],meta?:{ [index: string]: string; },responseStatus?:ResponseStatus,offset?:number,total?:number,results?:T[],meta?:{ [index: string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {{ [index: number]: Order[]; }}
* @description The dictionary of orders associated with each found product. */
ordersMap;
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {Product[]} */
results;
/** @type {{ [index: string]: string; }} */
meta;
/** @type {ResponseStatus} */
responseStatus;
}
export class SearchProductsAsync extends SearchProductsBase {
/** @param {{productId?:number,accountId?:number,name?:string,nameStartsWith?:string,nameEndsWith?:string,nameContains?:string,version?:string,versionStartsWith?:string,versionEndsWith?:string,versionContains?:string,description?:string,descriptionStartsWith?:string,descriptionEndsWith?:string,descriptionContains?:string,includeOrders?:boolean,skipOrders?:number,takeOrders?:number,skip?:number,take?:number,productId?:number,accountId?:number,name?:string,nameStartsWith?:string,nameEndsWith?:string,nameContains?:string,version?:string,versionStartsWith?:string,versionEndsWith?:string,versionContains?:string,description?:string,descriptionStartsWith?:string,descriptionEndsWith?:string,descriptionContains?:string,includeOrders?:boolean,skipOrders?:number,takeOrders?:number,skip?:number,take?:number,skip?:number,take?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?number}
* @description The unique identifier of the account associated with the product. */
productId;
/**
* @type {?number}
* @description The unique identifier of the account associated with the product. */
accountId;
/**
* @type {?string}
* @description The name of the product. */
name;
/**
* @type {?string}
* @description Search by using the name of the product that starts with the specified value. */
nameStartsWith;
/**
* @type {?string}
* @description Search by using the name of the product that ends with the specified value. */
nameEndsWith;
/**
* @type {?string}
* @description Search by using the name of the product that contains the specified value. */
nameContains;
/**
* @type {?string}
* @description The version of the product. */
version;
/**
* @type {?string}
* @description Search by using the version of the product that starts with the specified value. */
versionStartsWith;
/**
* @type {?string}
* @description Search by using the version of the product that ends with the specified value. */
versionEndsWith;
/**
* @type {?string}
* @description Search by using the version of the product that contains the specified value. */
versionContains;
/**
* @type {?string}
* @description The description of the product. */
description;
/**
* @type {?string}
* @description Search by using the description of the product that starts with the specified value. */
descriptionStartsWith;
/**
* @type {?string}
* @description Search by using the description of the product that ends with the specified value. */
descriptionEndsWith;
/**
* @type {?string}
* @description Search by using the description of the product that contains the specified value. */
descriptionContains;
/**
* @type {?boolean}
* @description Should the related orders of the account be included in the retrieved products? */
includeOrders;
/**
* @type {?number}
* @description Specifies the number of orders to skip per product. Applicable only when 'IncludeOrders' is true. */
skipOrders;
/**
* @type {?number}
* @description Specifies the number of orders to include per product. Applicable only when 'IncludeOrders' is true. */
takeOrders;
/**
* @type {?number}
* @description The number of query results to skip. */
skip;
/**
* @type {?number}
* @description The number of query results to include. */
take;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{offset?:number,total?:number,results?:T[],meta?:{ [index: string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {T[]} */
results;
/** @type {{ [index: string]: string; }} */
meta;
/** @type {ResponseStatus} */
responseStatus;
}
JavaScript SearchProductsAsync DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /async/products/search HTTP/1.1 Host: taxfiling.pwc.de Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"ordersMap":{"0":[{"id":0,"productId":0,"accountId":0,"name":"String","serviceName":"String","requestTimestamp":"\/Date(-62135596800000-0000)\/","responseTimestamp":"\/Date(-62135596800000-0000)\/","requestUri":"String","requestHttpMethod":"String","requestDuration":"PT0S","responseStatusCode":"Continue","clientIPAddress":"String","unitOfMeasurement":"String","processType":"String","dataType":"String","dataName":"String","creationDate":"\/Date(-62135596800000-0000)\/","expiryDate":"\/Date(-62135596800000-0000)\/","isTest":false}]},"offset":0,"total":0,"results":[{"id":0,"index":0,"name":"String","version":"String","description":"String","tags":["String"]}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}