UNCLASSIFIED

Commit e1a9ee09 authored by Christopher Zell's avatar Christopher Zell
Browse files

slimmed way down

parent 9efbe5c1
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,7 +7,6 @@ import ProtectedRoute from './components/ProtectedRoute/ProtectedRoute';
import {useAuthorizedUserState} from './state/authorized-user/authorized-user-state';
import withLoading from './hocs/UseLoading/WithLoading';
import {PrivilegeType} from './state/privilege/privilege-type';
import {MetricPageProtectedWrapper} from './pages/AppSource/Metrics/MetricPageProtectedWrapper';
import {NotFoundPage} from './pages/NotFound/NotFoundPage';
import {NotAuthorizedPage} from './pages/NotAuthorized/NotAuthorizedPage';
import {ToastContainer} from './components/Toast/ToastContainer/ToastContainer';
......@@ -66,12 +65,6 @@ function AppContent() {
}
})}
<ProtectedRoute
exact
path={RoutePath.APP_SOURCE_METRIC}
component={MetricPageProtectedWrapper}
requiredPrivilege={[PrivilegeType.DASHBOARD_ADMIN, PrivilegeType.APP_SOURCE_ADMIN]}
/>
<ProtectedRoute
exact
path={RoutePath.API_TEST}
......
This diff is collapsed.
.api-spec-cell-renderer {
text-align: center;
justify-content: space-between;
&__btn {
margin: 0 !important;
}
}
\ No newline at end of file
import { ICellRendererParams } from 'ag-grid-community';
import DownloadIcon from '../../icons/DownloadIcon';
import { AppEndpointClientInfoDto, AppSourceDetailsDto } from '../../openapi';
import { useAppSourceState } from '../../state/app-source/app-source-state';
import Button from '../Button/Button';
import DownloadFile from '../../utils/download-file-util';
import './ApiSpecCellRenderer.scss';
import { ApiSpecCellRendererProps } from './ApiSpecCellRendererProps';
function ApiSpecCellRenderer(props: Partial<ICellRendererParams> & ApiSpecCellRendererProps) {
const state = useAppSourceState();
const download = (data: AppSourceDetailsDto | AppEndpointClientInfoDto) => {
let name: string;
let byEndpoint = false;
if('name' in data) {
name = data.name;
} else {
name = data.appSourceName!;
byEndpoint = true;
}
DownloadFile(name, byEndpoint, byEndpoint ? state.fetchAPISpecFileByEndpointId(data.id!) : state.fetchAPISpecFile(data.id!));
}
const showAsText = props.showAsText && props.value;
return (
<div className="api-spec-cell-renderer">
<Button type="button" onClick={() => download(props.data)} unstyled className="api-spec-cell-renderer__btn" disableMobileFullWidth data-testid="api-spec-btn-cell-renderer">
<DownloadIcon iconTitle={'api-spec-download'} size={showAsText ? 1 : 1.25} />
</Button>
{(showAsText) ? <a data-testid="api-spec-link-cell-renderer" onClick={() => download(props.data)}>{" "+ props.value}</a> : ''}
</div>
);
}
export default ApiSpecCellRenderer;
export interface ApiSpecCellRendererProps {
showAsText?: boolean;
}
\ No newline at end of file
import { render } from '@testing-library/react';
import ApiSpecCellRenderer from '../ApiSpecCellRenderer';
jest.mock('axios');
describe('API Spec Cell Renderer', () => {
it('Renders correctly', async () => {
const page = render(
<ApiSpecCellRenderer showAsText={false}/>
);
expect(page.getByTestId('api-spec-btn-cell-renderer')).toBeTruthy();
});
it('Show text when property is set', async () => {
const page = render(
<ApiSpecCellRenderer showAsText={true} value={'test-value'} data={{appSourceName: ''}}/>
);
expect(page.queryByText('test-value')).toBeInTheDocument();
});
it('Do not show text when property is set', async () => {
const page = render(
<ApiSpecCellRenderer showAsText={false} value={'test-value'} data={{name: ''}}/>
);
expect(page.queryByText('test-value')).not.toBeInTheDocument();
});
});
......@@ -3,7 +3,6 @@ import { render } from '@testing-library/react';
import Sidebar from '../Sidebar';
import { MemoryRouter } from 'react-router-dom';
import { RouteItem } from '../../../routes';
import HealthPage from '../../../pages/Health/HealthPage';
import { PrivilegeType } from '../../../state/privilege/privilege-type';
import PersonPage from '../../../pages/Person/PersonPage';
import {DashboardUserDto} from '../../../openapi/models';
......@@ -14,12 +13,6 @@ import AuthorizedUserService from '../../../state/authorized-user/authorized-use
import {useAuthorizedUserState} from '../../../state/authorized-user/authorized-user-state';
const testRoutes: RouteItem[] = [
{
path: '/health',
name: 'Health',
component: HealthPage,
requiredPrivileges: [PrivilegeType.DASHBOARD_USER]
},
{
path: "/person",
name: "Person",
......
......@@ -2,21 +2,14 @@
.npmignore
.openapi-generator-ignore
api.ts
apis/app-client-controller-api.ts
apis/app-source-controller-api.ts
apis/app-version-controller-api.ts
apis/dashboard-user-controller-api.ts
apis/http-logs-controller-api.ts
apis/kpi-controller-api.ts
apis/logfile-controller-api.ts
apis/metrics-controller-api.ts
apis/organization-controller-api.ts
apis/person-controller-api.ts
apis/privilege-controller-api.ts
apis/puckboard-etl-controller-api.ts
apis/rank-controller-api.ts
apis/scratch-storage-controller-api.ts
apis/subscriber-controller-api.ts
apis/user-info-controller-api.ts
base.ts
configuration.ts
......@@ -24,38 +17,16 @@ git_push.sh
index.ts
models/airman-all-of.ts
models/airman.ts
models/app-client-count-metric-dto.ts
models/app-client-summary-dto-response-wrapper.ts
models/app-client-summary-dto.ts
models/app-client-user-details-dto.ts
models/app-client-user-dto-response-wrapped.ts
models/app-client-user-dto.ts
models/app-client-user-priv-dto.ts
models/app-end-point-priv-dto.ts
models/app-endpoint-client-info-dto.ts
models/app-endpoint-count-metric-dto.ts
models/app-endpoint-dto.ts
models/app-source-count-metric-dto.ts
models/app-source-details-dto.ts
models/app-source-dto-response-wrapper.ts
models/app-source-dto.ts
models/app-source-metric-dto.ts
models/app-version-info-dto.ts
models/coast-guardsman.ts
models/count-metric-dto.ts
models/dashboard-user-dto-response-wrapper.ts
models/dashboard-user-dto.ts
models/endpoint-count-metric-dto.ts
models/endpoint-metric-dto.ts
models/event-info-dto-response-wrapper.ts
models/event-info-dto.ts
models/exception-response.ts
models/filter-condition.ts
models/filter-criteria.ts
models/filter-dto.ts
models/flight-all-of.ts
models/flight.ts
models/generic-string-array-response-wrapper.ts
models/group.ts
models/http-log-dto-pagination-response-wrapper.ts
models/http-log-entry-details-dto.ts
......@@ -65,11 +36,8 @@ models/json-patch-object-array-value.ts
models/json-patch-object-value.ts
models/json-patch-string-array-value.ts
models/json-patch-string-value.ts
models/kpi-summary-dto-response-wrapper.ts
models/kpi-summary-dto.ts
models/logfile-dto.ts
models/marine.ts
models/meter-value-dto.ts
models/organization-dto-pagination-response-wrapper.ts
models/organization-dto-response-wrapper.ts
models/organization-dto.ts
......@@ -83,26 +51,11 @@ models/person-find-dto.ts
models/platform-jwt-dto.ts
models/privilege-dto-response-wrapper.ts
models/privilege-dto.ts
models/privilege-id-pair.ts
models/pub-sub-ledger-entry-dto-response-wrapper.ts
models/pub-sub-ledger-entry-dto.ts
models/rank.ts
models/sailor.ts
models/scratch-storage-app-registry-dto-response-wrapper.ts
models/scratch-storage-app-registry-dto.ts
models/scratch-storage-app-user-priv-dto.ts
models/scratch-storage-entry-dto-response-wrapper.ts
models/scratch-storage-entry-dto.ts
models/scratch-storage-user-dto-response-wrapper.ts
models/scratch-storage-user-dto.ts
models/scratch-value-patch-json-dto.ts
models/soldier.ts
models/spaceman.ts
models/squadron.ts
models/subscriber-dto-response-wrapper.ts
models/subscriber-dto.ts
models/unique-visitor-count-dto.ts
models/user-info-dto.ts
models/user-with-privs.ts
models/validation-error.ts
models/wing.ts
......@@ -14,20 +14,13 @@
export * from './apis/app-client-controller-api';
export * from './apis/app-source-controller-api';
export * from './apis/app-version-controller-api';
export * from './apis/dashboard-user-controller-api';
export * from './apis/http-logs-controller-api';
export * from './apis/kpi-controller-api';
export * from './apis/logfile-controller-api';
export * from './apis/metrics-controller-api';
export * from './apis/organization-controller-api';
export * from './apis/person-controller-api';
export * from './apis/privilege-controller-api';
export * from './apis/puckboard-etl-controller-api';
export * from './apis/rank-controller-api';
export * from './apis/scratch-storage-controller-api';
export * from './apis/subscriber-controller-api';
export * from './apis/user-info-controller-api';
This diff is collapsed.
This diff is collapsed.
/* tslint:disable */
/* eslint-disable */
/**
* TRON Common API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { ExceptionResponse } from '../models';
// @ts-ignore
import { KpiSummaryDto } from '../models';
// @ts-ignore
import { KpiSummaryDtoResponseWrapper } from '../models';
/**
* KpiControllerApi - axios parameter creator
* @export
*/
export const KpiControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Retrieves previously recorded KPIs. The KPIs will be reported in weekly increments. Monday is the start of the week and Sunday is the end of the week.
* @summary Retrieves previously recorded KPIs.
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the previous week from today if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKpiSeries: async (startDate: string, endDate?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'startDate' is not null or undefined
if (startDate === null || startDate === undefined) {
throw new RequiredError('startDate','Required parameter startDate was null or undefined when calling getKpiSeries.');
}
const localVarPath = `/v2/kpi/series`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (startDate !== undefined) {
localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
(startDate as any).toISOString().substr(0,10) :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString().substr(0,10) :
endDate;
}
const queryParameters = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
queryParameters.set(key, localVarQueryParameter[key]);
}
for (const key in options.query) {
queryParameters.set(key, options.query[key]);
}
localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Retrieves all KPI information between two dates.
* @summary Retrieves all KPI information
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the current date if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKpiSummary: async (startDate: string, endDate?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'startDate' is not null or undefined
if (startDate === null || startDate === undefined) {
throw new RequiredError('startDate','Required parameter startDate was null or undefined when calling getKpiSummary.');
}
const localVarPath = `/v2/kpi/summary`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (startDate !== undefined) {
localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
(startDate as any).toISOString().substr(0,10) :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString().substr(0,10) :
endDate;
}
const queryParameters = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
queryParameters.set(key, localVarQueryParameter[key]);
}
for (const key in options.query) {
queryParameters.set(key, options.query[key]);
}
localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
}
};
/**
* KpiControllerApi - functional programming interface
* @export
*/
export const KpiControllerApiFp = function(configuration?: Configuration) {
return {
/**
* Retrieves previously recorded KPIs. The KPIs will be reported in weekly increments. Monday is the start of the week and Sunday is the end of the week.
* @summary Retrieves previously recorded KPIs.
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the previous week from today if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getKpiSeries(startDate: string, endDate?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<KpiSummaryDtoResponseWrapper>> {
const localVarAxiosArgs = await KpiControllerApiAxiosParamCreator(configuration).getKpiSeries(startDate, endDate, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Retrieves all KPI information between two dates.
* @summary Retrieves all KPI information
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the current date if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getKpiSummary(startDate: string, endDate?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<KpiSummaryDto>> {
const localVarAxiosArgs = await KpiControllerApiAxiosParamCreator(configuration).getKpiSummary(startDate, endDate, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* KpiControllerApi - factory interface
* @export
*/
export const KpiControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
* Retrieves previously recorded KPIs. The KPIs will be reported in weekly increments. Monday is the start of the week and Sunday is the end of the week.
* @summary Retrieves previously recorded KPIs.
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the previous week from today if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKpiSeries(startDate: string, endDate?: string, options?: any): AxiosPromise<KpiSummaryDtoResponseWrapper> {
return KpiControllerApiFp(configuration).getKpiSeries(startDate, endDate, options).then((request) => request(axios, basePath));
},
/**
* Retrieves all KPI information between two dates.
* @summary Retrieves all KPI information
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the current date if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKpiSummary(startDate: string, endDate?: string, options?: any): AxiosPromise<KpiSummaryDto> {
return KpiControllerApiFp(configuration).getKpiSummary(startDate, endDate, options).then((request) => request(axios, basePath));
},
};
};
/**
* KpiControllerApi - interface
* @export
* @interface KpiControllerApi
*/
export interface KpiControllerApiInterface {
/**
* Retrieves previously recorded KPIs. The KPIs will be reported in weekly increments. Monday is the start of the week and Sunday is the end of the week.
* @summary Retrieves previously recorded KPIs.
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the previous week from today if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof KpiControllerApiInterface
*/
getKpiSeries(startDate: string, endDate?: string, options?: any): AxiosPromise<KpiSummaryDtoResponseWrapper>;
/**
* Retrieves all KPI information between two dates.
* @summary Retrieves all KPI information
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the current date if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof KpiControllerApiInterface
*/
getKpiSummary(startDate: string, endDate?: string, options?: any): AxiosPromise<KpiSummaryDto>;
}
/**
* KpiControllerApi - object-oriented interface
* @export
* @class KpiControllerApi
* @extends {BaseAPI}
*/
export class KpiControllerApi extends BaseAPI implements KpiControllerApiInterface {
/**
* Retrieves previously recorded KPIs. The KPIs will be reported in weekly increments. Monday is the start of the week and Sunday is the end of the week.
* @summary Retrieves previously recorded KPIs.
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the previous week from today if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof KpiControllerApi
*/
public getKpiSeries(startDate: string, endDate?: string, options?: any) {
return KpiControllerApiFp(this.configuration).getKpiSeries(startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves all KPI information between two dates.
* @summary Retrieves all KPI information
* @param {string} startDate Earliest date to include in UTC.
* @param {string} [endDate] Latest date to include in UTC. Will default to the current date if not provided.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof KpiControllerApi
*/
public getKpiSummary(startDate: string, endDate?: string, options?: any) {
return KpiControllerApiFp(this.configuration).getKpiSummary(startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
}
This diff is collapsed.
......@@ -661,7 +661,7 @@ export const OrganizationControllerApiAxiosParamCreator = function (configuratio
};
},
/**
* Patches an existing organization
* Patches an existing organization. Fields (subordinateOrganizations and members) cannot be modified through this operation.
* @summary Patches an existing organization
* @param {string} id Organization ID to patch
* @param {Array<JsonPatchStringArrayValue | JsonPatchStringValue | JsonPatchObjectValue | JsonPatchObjectArrayValue>} jsonPatchStringArrayValueJsonPatchStringValueJsonPatchObjectValueJsonPatchObjectArrayValue
......@@ -1012,7 +1012,7 @@ export const OrganizationControllerApiFp = function(configuration?: Configuratio
};
},
/**
* Patches an existing organization
* Patches an existing organization. Fields (subordinateOrganizations and members) cannot be modified through this operation.
* @summary Patches an existing organization
* @param {string} id Organization ID to patch
* @param {Array<JsonPatchStringArrayValue | JsonPatchStringValue | JsonPatchObjectValue | JsonPatchObjectArrayValue>} jsonPatchStringArrayValueJsonPatchStringValueJsonPatchObjectValueJsonPatchObjectArrayValue
......@@ -1193,7 +1193,7 @@ export const OrganizationControllerApiFactory = function (configuration?: Config
return OrganizationControllerApiFp(configuration).getOrganizationsWrapped(type, branch, search, people, organizations, page, size, sort, options).then((request) => request(axios, basePath));
},
/**
* Patches an existing organization
* Patches an existing organization. Fields (subordinateOrganizations and members) cannot be modified through this operation.
* @summary Patches an existing organization
* @param {string} id Organization ID to patch
* @param {Array<JsonPatchStringArrayValue | JsonPatchStringValue | JsonPatchObjectValue | JsonPatchObjectArrayValue>} jsonPatchStringArrayValueJsonPatchStringValueJsonPatchObjectValueJsonPatchObjectArrayValue
......@@ -1362,7 +1362,7 @@ export interface OrganizationControllerApiInterface {
getOrganizationsWrapped(type?: 'SQUADRON' | 'GROUP' | 'FLIGHT' | 'WING' | 'OTHER_USAF' | 'DIVISION' | 'REGIMENT' | 'BRIGADE' | 'BATTALION' | 'COMPANY' | 'TROOP' | 'OTHER_USA' | 'OTHER_USN' | 'OTHER_USSF' | 'OTHER_USCG' | 'OTHER_USMC' | 'ORGANIZATION', branch?: 'OTHER' | 'USA' | 'USAF' | 'USMC' | 'USN' | 'USSF' | 'USCG', search?: string, people?: string, organizations?: string, page?: number, size?: number, sort?: Array<string>, options?: any): AxiosPromise<OrganizationDtoPaginationResponseWrapper>;
/**
* Patches an existing organization
* Patches an existing organization. Fields (subordinateOrganizations and members) cannot be modified through this operation.
* @summary Patches an existing organization
* @param {string} id Organization ID to patch
* @param {Array<JsonPatchStringArrayValue | JsonPatchStringValue | JsonPatchObjectValue | JsonPatchObjectArrayValue>} jsonPatchStringArrayValueJsonPatchStringValueJsonPatchObjectValueJsonPatchObjectArrayValue
......@@ -1553,7 +1553,7 @@ export class OrganizationControllerApi extends BaseAPI implements OrganizationCo
}
/**
* Patches an existing organization
* Patches an existing organization. Fields (subordinateOrganizations and members) cannot be modified through this operation.
* @summary Patches an existing organization
* @param {string} id Organization ID to patch
* @param {Array<JsonPatchStringArrayValue | JsonPatchStringValue | JsonPatchObjectValue | JsonPatchObjectArrayValue>} jsonPatchStringArrayValueJsonPatchStringValueJsonPatchObjectValueJsonPatchObjectArrayValue
......
/* tslint:disable */
/* eslint-disable */
/**
* TRON Common API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
/**
* PuckboardEtlControllerApi - axios parameter creator
* @export
*/
export const PuckboardEtlControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPuckboardData: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/puckboard/extract`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
const queryParameters = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
queryParameters.set(key, localVarQueryParameter[key]);
}
for (const key in options.query) {
queryParameters.set(key, options.query[key]);
}
localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @param {string} [type]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
testPuckboardComms: async (type?: string, options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/puckboard/test`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (type !== undefined) {
localVarQueryParameter['type'] = type;
}
const queryParameters = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
queryParameters.set(key, localVarQueryParameter[key]);
}
for (const key in options.query) {
queryParameters.set(key, options.query[key]);
}
localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
}
};
/**
* PuckboardEtlControllerApi - functional programming interface
* @export
*/
export const PuckboardEtlControllerApiFp = function(configuration?: Configuration) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getPuckboardData(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await PuckboardEtlControllerApiAxiosParamCreator(configuration).getPuckboardData(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @param {string} [type]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async testPuckboardComms(type?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await PuckboardEtlControllerApiAxiosParamCreator(configuration).testPuckboardComms(type, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* PuckboardEtlControllerApi - factory interface
* @export
*/
export const PuckboardEtlControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPuckboardData(options?: any): AxiosPromise<object> {
return PuckboardEtlControllerApiFp(configuration).getPuckboardData(options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} [type]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
testPuckboardComms(type?: string, options?: any): AxiosPromise<object> {
return PuckboardEtlControllerApiFp(configuration).testPuckboardComms(type, options).then((request) => request(axios, basePath));
},
};
};
/**
* PuckboardEtlControllerApi - interface
* @export
* @interface PuckboardEtlControllerApi
*/
export interface PuckboardEtlControllerApiInterface {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PuckboardEtlControllerApiInterface
*/
getPuckboardData(options?: any): AxiosPromise<object>;
/**
*
* @param {string} [type]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PuckboardEtlControllerApiInterface
*/
testPuckboardComms(type?: string, options?: any): AxiosPromise<object>;
}
/**
* PuckboardEtlControllerApi - object-oriented interface
* @export
* @class PuckboardEtlControllerApi
* @extends {BaseAPI}
*/
export class PuckboardEtlControllerApi extends BaseAPI implements PuckboardEtlControllerApiInterface {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PuckboardEtlControllerApi
*/
public getPuckboardData(options?: any) {
return PuckboardEtlControllerApiFp(this.configuration).getPuckboardData(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} [type]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PuckboardEtlControllerApi
*/
public testPuckboardComms(type?: string, options?: any) {
return PuckboardEtlControllerApiFp(this.configuration).testPuckboardComms(type, options).then((request) => request(this.axios, this.basePath));
}
}
This diff is collapsed.
This diff is collapsed.
/* tslint:disable */
/* eslint-disable */
/**
* TRON Common API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EndpointCountMetricDto } from './endpoint-count-metric-dto';
/**
*
* @export
* @interface AppClientCountMetricDto
*/
export interface AppClientCountMetricDto {
/**
*
* @type {string}
* @memberof AppClientCountMetricDto
*/
id?: string;
/**
*
* @type {string}
* @memberof AppClientCountMetricDto
*/
name?: string;
/**
*
* @type {string}
* @memberof AppClientCountMetricDto
*/
appSource?: string;
/**
*
* @type {Array<EndpointCountMetricDto>}
* @memberof AppClientCountMetricDto
*/
endpoints?: Array<EndpointCountMetricDto>;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment