@microfocus/alm-octane-js-rest-sdk
Version:
NodeJS wrapper for the OpenText Core Software Delivery Platform API
44 lines • 1.51 kB
TypeScript
/**
* @class
* This is used to build Octane API resource URLs.
*
* @param {Number} sharedSpace - Octane shared space id
* @param {Number} workspace - Octane workspace id
*/
declare class UrlBuilder {
private _sharedSpace;
private _workspace;
private _requestUrl;
private _isFirstParam;
constructor(sharedSpace: number, workspace: number);
setEntityUrl(entityName: string): void;
limit(limit: number): void;
offset(offset: number): void;
fields(fieldNames: string[]): void;
orderBy(fieldNames: string[]): void;
query(query: string): void;
queryParameter(name: string, value: any): void;
script(): void;
/**
* The fieldNames are assigned to the requestUrl.jsonPropertyName as a single string containing fieldNames separated
* by commas
*
* @param {Object} fieldNames - The fields will be added to the request URL in the 'jsonProperty' parameter.
* @param jsonProperty - The name of the property which will be added to the URL
*/
putFieldNamesInJson(fieldNames: string[], jsonProperty: string): void;
at(id: number): void;
/**
* @returns {String} - An Octane API URL
*/
build(): string;
/**
* Adds a query parameter to the builtUrl
*
* @returns - A new URL containing the query parameters.
*/
addParam(builtUrl: string, paramName: string, paramValue: any): string;
resetRequestUrl(): void;
}
export default UrlBuilder;
//# sourceMappingURL=urlBuilder.d.ts.map