Skip to content

Commit

Permalink
Merge pull request #22 from karelhala/insights-client
Browse files Browse the repository at this point in the history
Add new insights client
  • Loading branch information
Hyperkid123 authored Jun 12, 2019
2 parents dc7cc57 + 97da26b commit 9a419f2
Show file tree
Hide file tree
Showing 141 changed files with 7,786 additions and 690 deletions.
38 changes: 7 additions & 31 deletions packages/approval/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,17 +986,14 @@ export const RequestApiAxiosParamCreator = function (configuration?: Configurati
/**
* Return an array of requests
* @summary Return an array of approval requests
* @param {Array<'undecided' | 'approved' | 'denied'>} [decision] Fetch item by given decision (undecided, approved, denied)
* @param {Array<'pending' | 'skipped' | 'notified' | 'finished'>} [state] Fetch item by given state (pending, skipped, notified, finished)
* @param {string} [requester] Fetch item by given requester
* @param {string} [approver] Fetch requests by given approver username
* @param {number} [limit] How many items to return at one time (max 1000)
* @param {number} [offset] Starting Offset
* @param {any} [filter] Filter for querying collections.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRequests(decision?: Array<'undecided' | 'approved' | 'denied'>, state?: Array<'pending' | 'skipped' | 'notified' | 'finished'>, requester?: string, approver?: string, limit?: number, offset?: number, filter?: any, options: any = {}): RequestArgs {
listRequests(approver?: string, limit?: number, offset?: number, filter?: any, options: any = {}): RequestArgs {
const localVarPath = `/requests`;
const localVarUrlObj = url.parse(localVarPath, true);
let baseOptions;
Expand All @@ -1013,18 +1010,6 @@ export const RequestApiAxiosParamCreator = function (configuration?: Configurati
localVarHeaderParameter["Authorization"] = "Basic " + btoa(configuration.username + ":" + configuration.password);
}

if (decision) {
localVarQueryParameter['decision'] = decision;
}

if (state) {
localVarQueryParameter['state'] = state;
}

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

if (approver !== undefined) {
localVarQueryParameter['approver'] = approver;
}
Expand Down Expand Up @@ -1171,18 +1156,15 @@ export const RequestApiFp = function(configuration?: Configuration) {
/**
* Return an array of requests
* @summary Return an array of approval requests
* @param {Array<'undecided' | 'approved' | 'denied'>} [decision] Fetch item by given decision (undecided, approved, denied)
* @param {Array<'pending' | 'skipped' | 'notified' | 'finished'>} [state] Fetch item by given state (pending, skipped, notified, finished)
* @param {string} [requester] Fetch item by given requester
* @param {string} [approver] Fetch requests by given approver username
* @param {number} [limit] How many items to return at one time (max 1000)
* @param {number} [offset] Starting Offset
* @param {any} [filter] Filter for querying collections.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRequests(decision?: Array<'undecided' | 'approved' | 'denied'>, state?: Array<'pending' | 'skipped' | 'notified' | 'finished'>, requester?: string, approver?: string, limit?: number, offset?: number, filter?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestOutCollection> {
const localVarAxiosArgs = RequestApiAxiosParamCreator(configuration).listRequests(decision, state, requester, approver, limit, offset, filter, options);
listRequests(approver?: string, limit?: number, offset?: number, filter?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestOutCollection> {
const localVarAxiosArgs = RequestApiAxiosParamCreator(configuration).listRequests(approver, limit, offset, filter, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
return axios.request(axiosRequestArgs);
Expand Down Expand Up @@ -1242,18 +1224,15 @@ export const RequestApiFactory = function (configuration?: Configuration, basePa
/**
* Return an array of requests
* @summary Return an array of approval requests
* @param {Array<'undecided' | 'approved' | 'denied'>} [decision] Fetch item by given decision (undecided, approved, denied)
* @param {Array<'pending' | 'skipped' | 'notified' | 'finished'>} [state] Fetch item by given state (pending, skipped, notified, finished)
* @param {string} [requester] Fetch item by given requester
* @param {string} [approver] Fetch requests by given approver username
* @param {number} [limit] How many items to return at one time (max 1000)
* @param {number} [offset] Starting Offset
* @param {any} [filter] Filter for querying collections.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRequests(decision?: Array<'undecided' | 'approved' | 'denied'>, state?: Array<'pending' | 'skipped' | 'notified' | 'finished'>, requester?: string, approver?: string, limit?: number, offset?: number, filter?: any, options?: any) {
return RequestApiFp(configuration).listRequests(decision, state, requester, approver, limit, offset, filter, options)(axios, basePath);
listRequests(approver?: string, limit?: number, offset?: number, filter?: any, options?: any) {
return RequestApiFp(configuration).listRequests(approver, limit, offset, filter, options)(axios, basePath);
},
/**
* Return approval requests by given workflow id
Expand Down Expand Up @@ -1304,9 +1283,6 @@ export class RequestApi extends BaseAPI {
/**
* Return an array of requests
* @summary Return an array of approval requests
* @param {Array<'undecided' | 'approved' | 'denied'>} [decision] Fetch item by given decision (undecided, approved, denied)
* @param {Array<'pending' | 'skipped' | 'notified' | 'finished'>} [state] Fetch item by given state (pending, skipped, notified, finished)
* @param {string} [requester] Fetch item by given requester
* @param {string} [approver] Fetch requests by given approver username
* @param {number} [limit] How many items to return at one time (max 1000)
* @param {number} [offset] Starting Offset
Expand All @@ -1315,8 +1291,8 @@ export class RequestApi extends BaseAPI {
* @throws {RequiredError}
* @memberof RequestApi
*/
public listRequests(decision?: Array<'undecided' | 'approved' | 'denied'>, state?: Array<'pending' | 'skipped' | 'notified' | 'finished'>, requester?: string, approver?: string, limit?: number, offset?: number, filter?: any, options?: any) {
return RequestApiFp(this.configuration).listRequests(decision, state, requester, approver, limit, offset, filter, options)(this.axios, this.basePath);
public listRequests(approver?: string, limit?: number, offset?: number, filter?: any, options?: any) {
return RequestApiFp(this.configuration).listRequests(approver, limit, offset, filter, options)(this.axios, this.basePath);
}

/**
Expand Down
22 changes: 11 additions & 11 deletions packages/approval/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ ___

**RequestApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`

*Defined in [api.ts:1229](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1229)*
*Defined in [api.ts:1211](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1211)*

RequestApi - factory interface

Expand All @@ -252,7 +252,7 @@ ___

**RequestApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:1154](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1154)*
*Defined in [api.ts:1139](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1139)*

RequestApi - functional programming interface

Expand All @@ -271,7 +271,7 @@ ___

**StageApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:1355](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1355)*
*Defined in [api.ts:1331](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1331)*

StageApi - axios parameter creator

Expand All @@ -290,7 +290,7 @@ ___

**StageApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`

*Defined in [api.ts:1479](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1479)*
*Defined in [api.ts:1455](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1455)*

StageApi - factory interface

Expand All @@ -311,7 +311,7 @@ ___

**StageApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:1442](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1442)*
*Defined in [api.ts:1418](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1418)*

StageApi - functional programming interface

Expand All @@ -330,7 +330,7 @@ ___

**TemplateApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:1541](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1541)*
*Defined in [api.ts:1517](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1517)*

TemplateApi - axios parameter creator

Expand All @@ -349,7 +349,7 @@ ___

**TemplateApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`

*Defined in [api.ts:1676](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1676)*
*Defined in [api.ts:1652](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1652)*

TemplateApi - factory interface

Expand All @@ -370,7 +370,7 @@ ___

**TemplateApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:1637](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1637)*
*Defined in [api.ts:1613](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1613)*

TemplateApi - functional programming interface

Expand All @@ -389,7 +389,7 @@ ___

**WorkflowApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:1742](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1742)*
*Defined in [api.ts:1718](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1718)*

WorkflowApi - axios parameter creator

Expand All @@ -408,7 +408,7 @@ ___

**WorkflowApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`

*Defined in [api.ts:2127](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2127)*
*Defined in [api.ts:2103](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2103)*

WorkflowApi - factory interface

Expand All @@ -429,7 +429,7 @@ ___

**WorkflowApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`

*Defined in [api.ts:2027](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2027)*
*Defined in [api.ts:2003](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2003)*

WorkflowApi - functional programming interface

Expand Down
13 changes: 5 additions & 8 deletions packages/approval/doc/classes/requestapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ___

**createRequest**(workflowId: *`string`*, requestIn: *[RequestIn](../interfaces/requestin.md)*, options?: *`any`*): `AxiosPromise`<[RequestOut](../modules/requestout.md)>

*Defined in [api.ts:1300](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1300)*
*Defined in [api.ts:1279](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1279)*

Add an approval request by given parameters

Expand All @@ -130,9 +130,9 @@ ___

### listRequests

**listRequests**(decision?: *`Array`<"undecided" \| "approved" \| "denied">*, state?: *`Array`<"pending" \| "skipped" \| "notified" \| "finished">*, requester?: *`string`*, approver?: *`string`*, limit?: *`number`*, offset?: *`number`*, filter?: *`any`*, options?: *`any`*): `AxiosPromise`<[RequestOutCollection](../interfaces/requestoutcollection.md)>
**listRequests**(approver?: *`string`*, limit?: *`number`*, offset?: *`number`*, filter?: *`any`*, options?: *`any`*): `AxiosPromise`<[RequestOutCollection](../interfaces/requestoutcollection.md)>

*Defined in [api.ts:1318](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1318)*
*Defined in [api.ts:1294](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1294)*

Return an array of requests

Expand All @@ -146,9 +146,6 @@ Return an array of requests

| Name | Type |
| ------ | ------ |
| `Optional` decision | `Array`<"undecided" \| "approved" \| "denied"> |
| `Optional` state | `Array`<"pending" \| "skipped" \| "notified" \| "finished"> |
| `Optional` requester | `string` |
| `Optional` approver | `string` |
| `Optional` limit | `number` |
| `Optional` offset | `number` |
Expand All @@ -164,7 +161,7 @@ ___

**listRequestsByWorkflow**(workflowId: *`string`*, limit?: *`number`*, offset?: *`number`*, filter?: *`any`*, options?: *`any`*): `AxiosPromise`<[RequestOutCollection](../interfaces/requestoutcollection.md)>

*Defined in [api.ts:1333](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1333)*
*Defined in [api.ts:1309](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1309)*

Return approval requests by given workflow id

Expand Down Expand Up @@ -193,7 +190,7 @@ ___

**showRequest**(id: *`string`*, options?: *`any`*): `AxiosPromise`<[RequestOut](../modules/requestout.md)>

*Defined in [api.ts:1345](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1345)*
*Defined in [api.ts:1321](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1321)*

Return an approval request by given id

Expand Down
4 changes: 2 additions & 2 deletions packages/approval/doc/classes/stageapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ___

**listStagesByRequest**(requestId: *`string`*, options?: *`any`*): `AxiosPromise`<[StageOutCollection](../interfaces/stageoutcollection.md)>

*Defined in [api.ts:1519](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1519)*
*Defined in [api.ts:1495](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1495)*

Return an array of stages by given request id

Expand All @@ -129,7 +129,7 @@ ___

**showStage**(id: *`string`*, options?: *`any`*): `AxiosPromise`<[StageOut](../modules/stageout.md)>

*Defined in [api.ts:1531](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1531)*
*Defined in [api.ts:1507](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1507)*

Return an approval stage by given id

Expand Down
4 changes: 2 additions & 2 deletions packages/approval/doc/classes/templateapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ___

**listTemplates**(limit?: *`number`*, offset?: *`number`*, filter?: *`any`*, options?: *`any`*): `AxiosPromise`<[TemplateOutCollection](../interfaces/templateoutcollection.md)>

*Defined in [api.ts:1720](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1720)*
*Defined in [api.ts:1696](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1696)*

Return all templates

Expand Down Expand Up @@ -131,7 +131,7 @@ ___

**showTemplate**(id: *`string`*, options?: *`any`*): `AxiosPromise`<[TemplateOut](../interfaces/templateout.md)>

*Defined in [api.ts:1732](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1732)*
*Defined in [api.ts:1708](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L1708)*

Return a template by given id

Expand Down
12 changes: 6 additions & 6 deletions packages/approval/doc/classes/workflowapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ___

**addWorkflowToTemplate**(templateId: *`string`*, workflowIn: *[WorkflowIn](../interfaces/workflowin.md)*, options?: *`any`*): `AxiosPromise`<[WorkflowOut](../interfaces/workflowout.md)>

*Defined in [api.ts:2215](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2215)*
*Defined in [api.ts:2191](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2191)*

Add a workflow by given template id

Expand All @@ -134,7 +134,7 @@ ___

**destroyWorkflow**(id: *`string`*, options?: *`any`*): `AxiosPromise`<`Response`>

*Defined in [api.ts:2227](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2227)*
*Defined in [api.ts:2203](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2203)*

Delete approval workflow by given id

Expand All @@ -160,7 +160,7 @@ ___

**listWorkflows**(limit?: *`number`*, offset?: *`number`*, filter?: *`any`*, options?: *`any`*): `AxiosPromise`<[WorkflowOutCollection](../interfaces/workflowoutcollection.md)>

*Defined in [api.ts:2241](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2241)*
*Defined in [api.ts:2217](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2217)*

Return all approval workflows

Expand Down Expand Up @@ -188,7 +188,7 @@ ___

**listWorkflowsByTemplate**(templateId: *`string`*, limit?: *`number`*, offset?: *`number`*, filter?: *`any`*, options?: *`any`*): `AxiosPromise`<[WorkflowOutCollection](../interfaces/workflowoutcollection.md)>

*Defined in [api.ts:2256](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2256)*
*Defined in [api.ts:2232](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2232)*

Return an array of workflows by given template id

Expand Down Expand Up @@ -217,7 +217,7 @@ ___

**showWorkflow**(id: *`string`*, options?: *`any`*): `AxiosPromise`<[WorkflowOut](../interfaces/workflowout.md)>

*Defined in [api.ts:2268](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2268)*
*Defined in [api.ts:2244](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2244)*

Return an approval workflow by given id

Expand All @@ -243,7 +243,7 @@ ___

**updateWorkflow**(id: *`string`*, workflowIn: *[WorkflowIn](../interfaces/workflowin.md)*, options?: *`any`*): `AxiosPromise`<[WorkflowOut](../interfaces/workflowout.md)>

*Defined in [api.ts:2281](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2281)*
*Defined in [api.ts:2257](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/approval/api.ts#L2257)*

Update an approval workflow by given id

Expand Down
Loading

0 comments on commit 9a419f2

Please sign in to comment.