Skip to content

Commit

Permalink
Merge pull request #306 from RedHatInsights/create-pull-request/patch
Browse files Browse the repository at this point in the history
chore(nightly-sync): API sync and client generation
  • Loading branch information
florkbr authored Nov 6, 2024
2 parents 86e80fe + 1993b22 commit 51e0e8f
Show file tree
Hide file tree
Showing 57 changed files with 1,573 additions and 7,475 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions packages/integrations/EndpointResourceV1CreateEndpoint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/b
import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration';

// @ts-ignore
import type { Endpoint, EndpointDTO } from '../types';
import type { Endpoint } from '../types';


export type EndpointResourceV1CreateEndpointParams = {
/**
*
* @type { EndpointDTO }
* @type { Endpoint }
* @memberof EndpointResourceV1CreateEndpointApi
*/
endpointDTO: EndpointDTO,
endpoint: Endpoint,
options?: AxiosRequestConfig
}

const isEndpointResourceV1CreateEndpointObjectParams = (params: [EndpointResourceV1CreateEndpointParams] | unknown[]): params is [EndpointResourceV1CreateEndpointParams] => {
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'endpointDTO')
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'endpoint')
}
/**
* Creates a new endpoint by providing data such as a description, a name, and the endpoint properties. Use this endpoint to create endpoints for integration with third-party services such as webhooks, Slack, or Google Chat.
Expand All @@ -31,9 +31,9 @@ const isEndpointResourceV1CreateEndpointObjectParams = (params: [EndpointResourc
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
export const endpointResourceV1CreateEndpointParamCreator = async (...config: ([EndpointResourceV1CreateEndpointParams] | [EndpointDTO, AxiosRequestConfig])): Promise<RequestArgs> => {
const params = isEndpointResourceV1CreateEndpointObjectParams(config) ? config[0] : ['endpointDTO', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as EndpointResourceV1CreateEndpointParams;
const { endpointDTO, options = {} } = params;
export const endpointResourceV1CreateEndpointParamCreator = async (...config: ([EndpointResourceV1CreateEndpointParams] | [Endpoint, AxiosRequestConfig])): Promise<RequestArgs> => {
const params = isEndpointResourceV1CreateEndpointObjectParams(config) ? config[0] : ['endpoint', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as EndpointResourceV1CreateEndpointParams;
const { endpoint, options = {} } = params;
const localVarPath = `/endpoints`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
Expand All @@ -51,7 +51,7 @@ export const endpointResourceV1CreateEndpointParamCreator = async (...config: ([
return {
urlObj: localVarUrlObj,
options: localVarRequestOptions,
serializeData: endpointDTO,
serializeData: endpoint,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/b
import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration';

// @ts-ignore
import type { EndpointDTO } from '../types';
import type { Endpoint } from '../types';


export type EndpointResourceV1GetEndpointParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/b
import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration';

// @ts-ignore
import type { EndpointDTO, RequestSystemSubscriptionProperties } from '../types';
import type { Endpoint, RequestSystemSubscriptionProperties } from '../types';


export type EndpointResourceV1GetOrCreateDrawerSubscriptionEndpointParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/b
import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration';

// @ts-ignore
import type { EndpointDTO, RequestSystemSubscriptionProperties } from '../types';
import type { Endpoint, RequestSystemSubscriptionProperties } from '../types';


export type EndpointResourceV1GetOrCreateEmailSubscriptionEndpointParams = {
Expand Down
16 changes: 8 additions & 8 deletions packages/integrations/EndpointResourceV1UpdateEndpoint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/b
import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration';

// @ts-ignore
import type { EndpointDTO } from '../types';
import type { Endpoint } from '../types';


export type EndpointResourceV1UpdateEndpointParams = {
Expand All @@ -20,15 +20,15 @@ export type EndpointResourceV1UpdateEndpointParams = {
id: string,
/**
*
* @type { EndpointDTO }
* @type { Endpoint }
* @memberof EndpointResourceV1UpdateEndpointApi
*/
endpointDTO: EndpointDTO,
endpoint: Endpoint,
options?: AxiosRequestConfig
}

const isEndpointResourceV1UpdateEndpointObjectParams = (params: [EndpointResourceV1UpdateEndpointParams] | unknown[]): params is [EndpointResourceV1UpdateEndpointParams] => {
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'id') && Object.prototype.hasOwnProperty.call(params, 'endpointDTO')
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'id') && Object.prototype.hasOwnProperty.call(params, 'endpoint')
}
/**
* Updates the endpoint configuration. Use this to update an existing endpoint. Any changes to the endpoint take place immediately.
Expand All @@ -37,9 +37,9 @@ const isEndpointResourceV1UpdateEndpointObjectParams = (params: [EndpointResourc
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
export const endpointResourceV1UpdateEndpointParamCreator = async (...config: ([EndpointResourceV1UpdateEndpointParams] | [string, EndpointDTO, AxiosRequestConfig])): Promise<RequestArgs> => {
const params = isEndpointResourceV1UpdateEndpointObjectParams(config) ? config[0] : ['id', 'endpointDTO', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as EndpointResourceV1UpdateEndpointParams;
const { id, endpointDTO, options = {} } = params;
export const endpointResourceV1UpdateEndpointParamCreator = async (...config: ([EndpointResourceV1UpdateEndpointParams] | [string, Endpoint, AxiosRequestConfig])): Promise<RequestArgs> => {
const params = isEndpointResourceV1UpdateEndpointObjectParams(config) ? config[0] : ['id', 'endpoint', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as EndpointResourceV1UpdateEndpointParams;
const { id, endpoint, options = {} } = params;
const localVarPath = `/endpoints/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
Expand All @@ -58,7 +58,7 @@ export const endpointResourceV1UpdateEndpointParamCreator = async (...config: ([
return {
urlObj: localVarUrlObj,
options: localVarRequestOptions,
serializeData: endpointDTO,
serializeData: endpoint,
};
}

Expand Down
Loading

0 comments on commit 51e0e8f

Please sign in to comment.