Skip to content

Commit

Permalink
feature: update the api client
Browse files Browse the repository at this point in the history
Added search for environments and creation of test runs with the addition of an environment slug
  • Loading branch information
gibiw committed Jul 15, 2024
1 parent d2de668 commit de3482d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 9 deletions.
6 changes: 6 additions & 0 deletions qaseio/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [email protected]

## What's new

Added search for environments and creation of test runs with the addition of an environment slug.

# [email protected]

## What's new
Expand Down
2 changes: 1 addition & 1 deletion qaseio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qaseio",
"version": "2.1.5",
"version": "2.1.6",
"description": "Qase TMS Javascript API Client",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
30 changes: 23 additions & 7 deletions qaseio/src/generated/api/environments-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config
* This method allows to retrieve all environments stored in selected project.
* @summary Get all environments
* @param {string} code Code of project, where to search entities.
* @param {string} [search] A search string. Will return all environments with titles containing provided string.
* @param {string} [slug] A search string. Will return all environments with slugs equal to provided string.
* @param {number} [limit] A number of entities in result set.
* @param {number} [offset] How many entities should be skipped.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEnvironments: async (code: string, limit?: number, offset?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
getEnvironments: async (code: string, search?: string, slug?: string, limit?: number, offset?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('getEnvironments', 'code', code)
const localVarPath = `/v1/environment/{code}`
Expand All @@ -189,6 +191,14 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config
// authentication TokenAuth required
await setApiKeyToObject(localVarHeaderParameter, "Token", configuration)

if (search !== undefined) {
localVarQueryParameter['search'] = search;
}

if (slug !== undefined) {
localVarQueryParameter['slug'] = slug;
}

if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
Expand Down Expand Up @@ -305,13 +315,15 @@ export const EnvironmentsApiFp = function(configuration?: Configuration) {
* This method allows to retrieve all environments stored in selected project.
* @summary Get all environments
* @param {string} code Code of project, where to search entities.
* @param {string} [search] A search string. Will return all environments with titles containing provided string.
* @param {string} [slug] A search string. Will return all environments with slugs equal to provided string.
* @param {number} [limit] A number of entities in result set.
* @param {number} [offset] How many entities should be skipped.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEnvironments(code: string, limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EnvironmentListResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEnvironments(code, limit, offset, options);
async getEnvironments(code: string, search?: string, slug?: string, limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EnvironmentListResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEnvironments(code, search, slug, limit, offset, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -374,13 +386,15 @@ export const EnvironmentsApiFactory = function (configuration?: Configuration, b
* This method allows to retrieve all environments stored in selected project.
* @summary Get all environments
* @param {string} code Code of project, where to search entities.
* @param {string} [search] A search string. Will return all environments with titles containing provided string.
* @param {string} [slug] A search string. Will return all environments with slugs equal to provided string.
* @param {number} [limit] A number of entities in result set.
* @param {number} [offset] How many entities should be skipped.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEnvironments(code: string, limit?: number, offset?: number, options?: any): AxiosPromise<EnvironmentListResponse> {
return localVarFp.getEnvironments(code, limit, offset, options).then((request) => request(axios, basePath));
getEnvironments(code: string, search?: string, slug?: string, limit?: number, offset?: number, options?: any): AxiosPromise<EnvironmentListResponse> {
return localVarFp.getEnvironments(code, search, slug, limit, offset, options).then((request) => request(axios, basePath));
},
/**
* This method updates an environment.
Expand Down Expand Up @@ -447,14 +461,16 @@ export class EnvironmentsApi extends BaseAPI {
* This method allows to retrieve all environments stored in selected project.
* @summary Get all environments
* @param {string} code Code of project, where to search entities.
* @param {string} [search] A search string. Will return all environments with titles containing provided string.
* @param {string} [slug] A search string. Will return all environments with slugs equal to provided string.
* @param {number} [limit] A number of entities in result set.
* @param {number} [offset] How many entities should be skipped.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnvironmentsApi
*/
public getEnvironments(code: string, limit?: number, offset?: number, options?: AxiosRequestConfig) {
return EnvironmentsApiFp(this.configuration).getEnvironments(code, limit, offset, options).then((request) => request(this.axios, this.basePath));
public getEnvironments(code: string, search?: string, slug?: string, limit?: number, offset?: number, options?: AxiosRequestConfig) {
return EnvironmentsApiFp(this.configuration).getEnvironments(code, search, slug, limit, offset, options).then((request) => request(this.axios, this.basePath));
}

/**
Expand Down
8 changes: 7 additions & 1 deletion qaseio/src/generated/model/run-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ export interface RunCreate {
*/
'environment_id'?: number;
/**
*
*
* @type {string}
* @memberof RunCreate
*/
'environment_slug'?: string;
/**
*
* @type {number}
* @memberof RunCreate
*/
Expand Down
6 changes: 6 additions & 0 deletions qaseio/src/generated/model/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,11 @@ export interface Run {
* @memberof Run
*/
'cases'?: Array<number>;
/**
*
* @type {number}
* @memberof Run
*/
'plan_id'?: number | null;
}

0 comments on commit de3482d

Please sign in to comment.