UNCLASSIFIED

You need to sign in or sign up before continuing.
Commit e1a9ee09 authored by Christopher Zell's avatar Christopher Zell
Browse files

slimmed way down

parent 9efbe5c1
This source diff could not be displayed because it is too large. You can view the blob instead.
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}
......
......@@ -326,395 +326,6 @@
},
"type": "object"
},
"AppClientCountMetricDto": {
"additionalProperties": false,
"properties": {
"appSource": {
"type": "string"
},
"endpoints": {
"items": {
"$ref": "model-types.json#/definitions/EndpointCountMetricDto"
},
"type": "array"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"AppClientSummaryDto": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"AppClientSummaryDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/AppClientSummaryDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"AppClientUserDetailsDto": {
"additionalProperties": false,
"properties": {
"appClientDeveloperEmails": {
"items": {
"type": "string"
},
"type": "array"
},
"appEndpointPrivs": {
"items": {
"$ref": "model-types.json#/definitions/AppEndpointClientInfoDto"
},
"type": "array"
},
"clusterUrl": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"privileges": {
"items": {
"$ref": "model-types.json#/definitions/PrivilegeDto"
},
"type": "array"
}
},
"type": "object"
},
"AppClientUserDto": {
"additionalProperties": false,
"properties": {
"appClientDeveloperEmails": {
"items": {
"type": "string"
},
"type": "array"
},
"clusterUrl": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"privileges": {
"items": {
"$ref": "model-types.json#/definitions/PrivilegeDto"
},
"type": "array"
}
},
"required": [
"name"
],
"type": "object"
},
"AppClientUserDtoResponseWrapped": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/AppClientUserDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"AppClientUserPrivDto": {
"additionalProperties": false,
"properties": {
"appClientUser": {
"type": "string"
},
"appClientUserName": {
"type": "string"
},
"appEndpoint": {
"type": "string"
},
"id": {
"type": "string"
},
"privilege": {
"type": "string"
}
},
"required": [
"appClientUser",
"appEndpoint"
],
"type": "object"
},
"AppEndPointPrivDto": {
"additionalProperties": false,
"description": "App Source UUID",
"properties": {
"appClientUserId": {
"type": "string"
},
"appEndpointId": {
"type": "string"
},
"appSourceId": {
"type": "string"
}
},
"type": "object"
},
"AppEndpointClientInfoDto": {
"additionalProperties": false,
"properties": {
"appSourceId": {
"type": "string"
},
"appSourceName": {
"type": "string"
},
"basePath": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"id": {
"type": "string"
},
"method": {
"$ref": "model-types.json#/definitions/AppEndpointClientInfoDtoMethodEnum"
},
"path": {
"type": "string"
}
},
"type": "object"
},
"AppEndpointClientInfoDtoMethodEnum": {
"enum": [
"GET",
"HEAD",
"POST",
"PUT",
"PATCH",
"DELETE",
"OPTIONS",
"TRACE"
],
"type": "string"
},
"AppEndpointCountMetricDto": {
"additionalProperties": false,
"properties": {
"appClients": {
"items": {
"$ref": "model-types.json#/definitions/CountMetricDto"
},
"type": "array"
},
"appSource": {
"type": "string"
},
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"requestType": {
"type": "string"
}
},
"required": [
"path",
"requestType"
],
"type": "object"
},
"AppEndpointDto": {
"additionalProperties": false,
"properties": {
"deleted": {
"type": "boolean"
},
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"requestType": {
"type": "string"
}
},
"required": [
"path",
"requestType"
],
"type": "object"
},
"AppSourceCountMetricDto": {
"additionalProperties": false,
"properties": {
"appClients": {
"items": {
"$ref": "model-types.json#/definitions/CountMetricDto"
},
"type": "array"
},
"endpoints": {
"items": {
"$ref": "model-types.json#/definitions/EndpointCountMetricDto"
},
"type": "array"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"AppSourceDetailsDto": {
"additionalProperties": false,
"properties": {
"appClients": {
"items": {
"$ref": "model-types.json#/definitions/AppClientUserPrivDto"
},
"type": "array"
},
"appSourceAdminUserEmails": {
"items": {
"type": "string"
},
"type": "array"
},
"appSourcePath": {
"type": "string"
},
"clientCount": {
"type": "number"
},
"endpointCount": {
"type": "number"
},
"endpoints": {
"items": {
"$ref": "model-types.json#/definitions/AppEndpointDto"
},
"type": "array"
},
"healthUrl": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"reportStatus": {
"type": "boolean"
},
"throttleEnabled": {
"type": "boolean"
},
"throttleRequestCount": {
"type": "number"
}
},
"required": [
"name"
],
"type": "object"
},
"AppSourceDto": {
"additionalProperties": false,
"properties": {
"clientCount": {
"type": "number"
},
"endpointCount": {
"type": "number"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"AppSourceDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/AppSourceDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"AppSourceMetricDto": {
"additionalProperties": false,
"properties": {
"endpoints": {
"items": {
"$ref": "model-types.json#/definitions/EndpointMetricDto"
},
"type": "array"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"AppVersionInfoDto": {
"additionalProperties": false,
"properties": {
......@@ -727,24 +338,8 @@
"CoastGuardsman": {
"$ref": "model-types.json#/definitions/PersonDto"
},
"CountMetricDto": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"sum": {
"type": "number"
}
},
"type": "object"
},
"DashboardUserDto": {
"additionalProperties": false,
"description": "Admin To Remove Email",
"properties": {
"email": {
"type": "string"
......@@ -776,89 +371,6 @@
],
"type": "object"
},
"EndpointCountMetricDto": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"method": {
"type": "string"
},
"path": {
"type": "string"
},
"sum": {
"type": "number"
}
},
"type": "object"
},
"EndpointMetricDto": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"requestType": {
"type": "string"
},
"values": {
"items": {
"$ref": "model-types.json#/definitions/MeterValueDto"
},
"type": "array"
}
},
"required": [
"path",
"requestType"
],
"type": "object"
},
"EventInfoDto": {
"additionalProperties": false,
"properties": {
"eventCount": {
"type": "number"
},
"eventType": {
"$ref": "model-types.json#/definitions/EventInfoDtoEventTypeEnum"
}
},
"type": "object"
},
"EventInfoDtoEventTypeEnum": {
"enum": [
"PERSON_CHANGE",
"PERSON_DELETE",
"ORGANIZATION_CHANGE",
"ORGANIZATION_DELETE",
"PERSON_ORG_ADD",
"PERSON_ORG_REMOVE",
"SUB_ORG_ADD",
"SUB_ORG_REMOVE"
],
"type": "string"
},
"EventInfoDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/EventInfoDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"ExceptionResponse": {
"additionalProperties": false,
"properties": {
......@@ -1004,6 +516,7 @@
]
},
"members": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -1028,6 +541,7 @@
]
},
"subordinateOrganizations": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -1051,25 +565,6 @@
},
"type": "object"
},
"GenericStringArrayResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"type": "string"
},
"type": "array"
},
"pagination": {
"$ref": "model-types.json#/definitions/Pagination"
}
},
"required": [
"data",
"pagination"
],
"type": "object"
},
"Group": {
"additionalProperties": false,
"properties": {
......@@ -1086,6 +581,7 @@
]
},
"members": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -1110,6 +606,7 @@
]
},
"subordinateOrganizations": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -1303,121 +800,52 @@
"remove",
"replace",
"copy",
"move",
"test"
],
"type": "string"
},
"JsonPatchStringValue": {
"additionalProperties": false,
"properties": {
"op": {
"$ref": "model-types.json#/definitions/JsonPatchStringValueOpEnum"
},
"path": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
},
"JsonPatchStringValueOpEnum": {
"enum": [
"add",
"remove",
"replace",
"copy",
"move",
"test"
],
"type": "string"
},
"KpiSummaryDto": {
"additionalProperties": false,
"properties": {
"appClientToAppSourceRequestCount": {
"type": "number"
},
"appSourceCount": {
"type": "number"
},
"averageLatencyForSuccessfulRequests": {
"type": "number"
},
"endDate": {
"type": "string"
},
"startDate": {
"type": "string"
},
"uniqueVisitorCounts": {
"items": {
"$ref": "model-types.json#/definitions/UniqueVisitorCountDto"
},
"type": "array"
}
},
"required": [
"startDate",
"endDate",
"appSourceCount",
"appClientToAppSourceRequestCount"
],
"type": "object"
},
"KpiSummaryDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/KpiSummaryDto"
},
"type": "array"
}
},
"required": [
"data"
"move",
"test"
],
"type": "object"
"type": "string"
},
"LogfileDto": {
"JsonPatchStringValue": {
"additionalProperties": false,
"properties": {
"downloadUri": {
"op": {
"$ref": "model-types.json#/definitions/JsonPatchStringValueOpEnum"
},
"path": {
"type": "string"
},
"name": {
"value": {
"type": "string"
}
},
"type": "object"
},
"Marine": {
"$ref": "model-types.json#/definitions/PersonDto"
"JsonPatchStringValueOpEnum": {
"enum": [
"add",
"remove",
"replace",
"copy",
"move",
"test"
],
"type": "string"
},
"MeterValueDto": {
"LogfileDto": {
"additionalProperties": false,
"properties": {
"appClient": {
"type": "string"
},
"count": {
"type": "number"
},
"id": {
"type": "string"
},
"metricName": {
"downloadUri": {
"type": "string"
},
"timestamp": {
"name": {
"type": "string"
}
},
"type": "object"
},
"Marine": {
"$ref": "model-types.json#/definitions/PersonDto"
},
"OrganizationDto": {
"additionalProperties": false,
"properties": {
......@@ -1434,6 +862,7 @@
]
},
"members": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -1452,6 +881,7 @@
]
},
"subordinateOrganizations": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -1812,67 +1242,6 @@
],
"type": "object"
},
"PrivilegeIdPair": {
"additionalProperties": false,
"properties": {
"priv": {
"$ref": "model-types.json#/definitions/PrivilegeDto"
},
"userPrivPairId": {
"type": "string"
}
},
"type": "object"
},
"PubSubLedgerEntryDto": {
"additionalProperties": false,
"properties": {
"countForEventType": {
"type": "number"
},
"data": {
"type": "string"
},
"dateCreated": {
"type": "string"
},
"eventType": {
"$ref": "model-types.json#/definitions/PubSubLedgerEntryDtoEventTypeEnum"
},
"id": {
"type": "string"
}
},
"type": "object"
},
"PubSubLedgerEntryDtoEventTypeEnum": {
"enum": [
"PERSON_CHANGE",
"PERSON_DELETE",
"ORGANIZATION_CHANGE",
"ORGANIZATION_DELETE",
"PERSON_ORG_ADD",
"PERSON_ORG_REMOVE",
"SUB_ORG_ADD",
"SUB_ORG_REMOVE"
],
"type": "string"
},
"PubSubLedgerEntryDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/PubSubLedgerEntryDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"Rank": {
"additionalProperties": false,
"properties": {
......@@ -1906,148 +1275,6 @@
"Sailor": {
"$ref": "model-types.json#/definitions/PersonDto"
},
"ScratchStorageAppRegistryDto": {
"additionalProperties": false,
"properties": {
"aclMode": {
"type": "boolean"
},
"appHasImplicitRead": {
"type": "boolean"
},
"appName": {
"type": "string"
},
"id": {
"type": "string"
},
"userPrivs": {
"items": {
"$ref": "model-types.json#/definitions/UserWithPrivs"
},
"type": "array"
}
},
"required": [
"appName"
],
"type": "object"
},
"ScratchStorageAppRegistryDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/ScratchStorageAppRegistryDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"ScratchStorageAppUserPrivDto": {
"additionalProperties": false,
"description": "Application User-Priv Object",
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"privilegeId": {
"type": "number"
}
},
"required": [
"email",
"privilegeId"
],
"type": "object"
},
"ScratchStorageEntryDto": {
"additionalProperties": false,
"properties": {
"appId": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"appId"
],
"type": "object"
},
"ScratchStorageEntryDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/ScratchStorageEntryDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"ScratchStorageUserDto": {
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"email"
],
"type": "object"
},
"ScratchStorageUserDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/ScratchStorageUserDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"ScratchValuePatchJsonDto": {
"additionalProperties": false,
"description": "Object specifying the json path to execute and the new value",
"properties": {
"jsonPath": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"jsonPath"
],
"type": "object"
},
"Soldier": {
"$ref": "model-types.json#/definitions/PersonDto"
},
......@@ -2070,6 +1297,7 @@
]
},
"members": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -2094,6 +1322,7 @@
]
},
"subordinateOrganizations": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -2105,86 +1334,6 @@
],
"type": "object"
},
"SubscriberDto": {
"additionalProperties": false,
"properties": {
"appClientUser": {
"type": "string"
},
"id": {
"type": "string"
},
"secret": {
"type": "string"
},
"subscribedEvent": {
"$ref": "model-types.json#/definitions/SubscriberDtoSubscribedEventEnum"
},
"subscriberAddress": {
"type": "string"
}
},
"required": [
"appClientUser",
"subscribedEvent"
],
"type": "object"
},
"SubscriberDtoResponseWrapper": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "model-types.json#/definitions/SubscriberDto"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"SubscriberDtoSubscribedEventEnum": {
"enum": [
"PERSON_CHANGE",
"PERSON_DELETE",
"ORGANIZATION_CHANGE",
"ORGANIZATION_DELETE",
"PERSON_ORG_ADD",
"PERSON_ORG_REMOVE",
"SUB_ORG_ADD",
"SUB_ORG_REMOVE"
],
"type": "string"
},
"UniqueVisitorCountDto": {
"additionalProperties": false,
"properties": {
"requestCount": {
"type": "number"
},
"uniqueCount": {
"type": "number"
},
"visitorType": {
"$ref": "model-types.json#/definitions/UniqueVisitorCountDtoVisitorTypeEnum"
}
},
"required": [
"visitorType",
"uniqueCount",
"requestCount"
],
"type": "object"
},
"UniqueVisitorCountDtoVisitorTypeEnum": {
"enum": [
"DASHBOARD_USER",
"APP_CLIENT"
],
"type": "string"
},
"UserInfoDto": {
"additionalProperties": false,
"properties": {
......@@ -2218,24 +1367,6 @@
},
"type": "object"
},
"UserWithPrivs": {
"additionalProperties": false,
"properties": {
"emailAddress": {
"type": "string"
},
"privs": {
"items": {
"$ref": "model-types.json#/definitions/PrivilegeIdPair"
},
"type": "array"
},
"userId": {
"type": "string"
}
},
"type": "object"
},
"ValidationError": {
"additionalProperties": false,
"description": "Field will only exist if there are validation errors",
......@@ -2281,6 +1412,7 @@
]
},
"members": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......@@ -2305,6 +1437,7 @@
]
},
"subordinateOrganizations": {
"description": "Field cannot be modified through JSON Patch",
"items": {
"type": "string"
},
......
.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';
/* 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 { AppClientUserDetailsDto } from '../models';
// @ts-ignore
import { AppClientUserDto } from '../models';
// @ts-ignore
import { AppClientUserDtoResponseWrapped } from '../models';
// @ts-ignore
import { ExceptionResponse } from '../models';
// @ts-ignore
import { PrivilegeDtoResponseWrapper } from '../models';
/**
* AppClientControllerApi - axios parameter creator
* @export
*/
export const AppClientControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Adds a App Client User. Requires DASHBOARD_ADMIN access.
* @summary Adds an App Client
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAppClientUser: async (appClientUserDto: AppClientUserDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appClientUserDto' is not null or undefined
if (appClientUserDto === null || appClientUserDto === undefined) {
throw new RequiredError('appClientUserDto','Required parameter appClientUserDto was null or undefined when calling createAppClientUser.');
}
const localVarPath = `/v2/app-client`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof appClientUserDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(appClientUserDto !== undefined ? appClientUserDto : {})
: (appClientUserDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Deletes an existing App Client. Requires DASHBOARD_ADMIN access.
* @summary Deletes an App Client
* @param {string} id App Client ID to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAppClient: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteAppClient.');
}
const localVarPath = `/v2/app-client/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...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,
};
},
/**
* Get an App Client by its UUID. Requires DASHBOARD_ADMIN or be an App Client Developer of that UUID.
* @summary Get an App Client\'s Information
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppClientRecord: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getAppClientRecord.');
}
const localVarPath = `/v2/app-client/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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,
};
},
/**
* Retrieves application client user information. Requires Dashboard Admin access or App Client Developer.
* @summary Retrieves all application client user information
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppClientUsersWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/app-client`;
// 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,
};
},
/**
* Gets all the app client privileges so that privilege names can be mapped to their IDs. Must be a DASHBOARD_ADMIN or APP_CLIENT_DEVELOPER
* @summary Gets all available privileges available for an app-client
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getClientTypePrivsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/app-client/privs`;
// 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,
};
},
/**
* Updates an existing Application Client. Requires DASHBOARD_ADMIN access to change any attribute,or be APP_CLIENT_DEVELOPER role for app client of given UUID to be able to manage change App Client Developers - any of fields changed as APP_CLIENT_DEVELOPER will not be changed.
* @summary Updates an existing Application Client
* @param {string} id App Client ID to update
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAppClient: async (id: string, appClientUserDto: AppClientUserDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling updateAppClient.');
}
// verify required parameter 'appClientUserDto' is not null or undefined
if (appClientUserDto === null || appClientUserDto === undefined) {
throw new RequiredError('appClientUserDto','Required parameter appClientUserDto was null or undefined when calling updateAppClient.');
}
const localVarPath = `/v2/app-client/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof appClientUserDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(appClientUserDto !== undefined ? appClientUserDto : {})
: (appClientUserDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
}
};
/**
* AppClientControllerApi - functional programming interface
* @export
*/
export const AppClientControllerApiFp = function(configuration?: Configuration) {
return {
/**
* Adds a App Client User. Requires DASHBOARD_ADMIN access.
* @summary Adds an App Client
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAppClientUser(appClientUserDto: AppClientUserDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientUserDto>> {
const localVarAxiosArgs = await AppClientControllerApiAxiosParamCreator(configuration).createAppClientUser(appClientUserDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Deletes an existing App Client. Requires DASHBOARD_ADMIN access.
* @summary Deletes an App Client
* @param {string} id App Client ID to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAppClient(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientUserDto>> {
const localVarAxiosArgs = await AppClientControllerApiAxiosParamCreator(configuration).deleteAppClient(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Get an App Client by its UUID. Requires DASHBOARD_ADMIN or be an App Client Developer of that UUID.
* @summary Get an App Client\'s Information
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAppClientRecord(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientUserDetailsDto>> {
const localVarAxiosArgs = await AppClientControllerApiAxiosParamCreator(configuration).getAppClientRecord(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Retrieves application client user information. Requires Dashboard Admin access or App Client Developer.
* @summary Retrieves all application client user information
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAppClientUsersWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientUserDtoResponseWrapped>> {
const localVarAxiosArgs = await AppClientControllerApiAxiosParamCreator(configuration).getAppClientUsersWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Gets all the app client privileges so that privilege names can be mapped to their IDs. Must be a DASHBOARD_ADMIN or APP_CLIENT_DEVELOPER
* @summary Gets all available privileges available for an app-client
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getClientTypePrivsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PrivilegeDtoResponseWrapper>> {
const localVarAxiosArgs = await AppClientControllerApiAxiosParamCreator(configuration).getClientTypePrivsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Updates an existing Application Client. Requires DASHBOARD_ADMIN access to change any attribute,or be APP_CLIENT_DEVELOPER role for app client of given UUID to be able to manage change App Client Developers - any of fields changed as APP_CLIENT_DEVELOPER will not be changed.
* @summary Updates an existing Application Client
* @param {string} id App Client ID to update
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateAppClient(id: string, appClientUserDto: AppClientUserDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientUserDto>> {
const localVarAxiosArgs = await AppClientControllerApiAxiosParamCreator(configuration).updateAppClient(id, appClientUserDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* AppClientControllerApi - factory interface
* @export
*/
export const AppClientControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
* Adds a App Client User. Requires DASHBOARD_ADMIN access.
* @summary Adds an App Client
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAppClientUser(appClientUserDto: AppClientUserDto, options?: any): AxiosPromise<AppClientUserDto> {
return AppClientControllerApiFp(configuration).createAppClientUser(appClientUserDto, options).then((request) => request(axios, basePath));
},
/**
* Deletes an existing App Client. Requires DASHBOARD_ADMIN access.
* @summary Deletes an App Client
* @param {string} id App Client ID to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAppClient(id: string, options?: any): AxiosPromise<AppClientUserDto> {
return AppClientControllerApiFp(configuration).deleteAppClient(id, options).then((request) => request(axios, basePath));
},
/**
* Get an App Client by its UUID. Requires DASHBOARD_ADMIN or be an App Client Developer of that UUID.
* @summary Get an App Client\'s Information
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppClientRecord(id: string, options?: any): AxiosPromise<AppClientUserDetailsDto> {
return AppClientControllerApiFp(configuration).getAppClientRecord(id, options).then((request) => request(axios, basePath));
},
/**
* Retrieves application client user information. Requires Dashboard Admin access or App Client Developer.
* @summary Retrieves all application client user information
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppClientUsersWrapped(options?: any): AxiosPromise<AppClientUserDtoResponseWrapped> {
return AppClientControllerApiFp(configuration).getAppClientUsersWrapped(options).then((request) => request(axios, basePath));
},
/**
* Gets all the app client privileges so that privilege names can be mapped to their IDs. Must be a DASHBOARD_ADMIN or APP_CLIENT_DEVELOPER
* @summary Gets all available privileges available for an app-client
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getClientTypePrivsWrapped(options?: any): AxiosPromise<PrivilegeDtoResponseWrapper> {
return AppClientControllerApiFp(configuration).getClientTypePrivsWrapped(options).then((request) => request(axios, basePath));
},
/**
* Updates an existing Application Client. Requires DASHBOARD_ADMIN access to change any attribute,or be APP_CLIENT_DEVELOPER role for app client of given UUID to be able to manage change App Client Developers - any of fields changed as APP_CLIENT_DEVELOPER will not be changed.
* @summary Updates an existing Application Client
* @param {string} id App Client ID to update
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAppClient(id: string, appClientUserDto: AppClientUserDto, options?: any): AxiosPromise<AppClientUserDto> {
return AppClientControllerApiFp(configuration).updateAppClient(id, appClientUserDto, options).then((request) => request(axios, basePath));
},
};
};
/**
* AppClientControllerApi - interface
* @export
* @interface AppClientControllerApi
*/
export interface AppClientControllerApiInterface {
/**
* Adds a App Client User. Requires DASHBOARD_ADMIN access.
* @summary Adds an App Client
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApiInterface
*/
createAppClientUser(appClientUserDto: AppClientUserDto, options?: any): AxiosPromise<AppClientUserDto>;
/**
* Deletes an existing App Client. Requires DASHBOARD_ADMIN access.
* @summary Deletes an App Client
* @param {string} id App Client ID to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApiInterface
*/
deleteAppClient(id: string, options?: any): AxiosPromise<AppClientUserDto>;
/**
* Get an App Client by its UUID. Requires DASHBOARD_ADMIN or be an App Client Developer of that UUID.
* @summary Get an App Client\'s Information
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApiInterface
*/
getAppClientRecord(id: string, options?: any): AxiosPromise<AppClientUserDetailsDto>;
/**
* Retrieves application client user information. Requires Dashboard Admin access or App Client Developer.
* @summary Retrieves all application client user information
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApiInterface
*/
getAppClientUsersWrapped(options?: any): AxiosPromise<AppClientUserDtoResponseWrapped>;
/**
* Gets all the app client privileges so that privilege names can be mapped to their IDs. Must be a DASHBOARD_ADMIN or APP_CLIENT_DEVELOPER
* @summary Gets all available privileges available for an app-client
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApiInterface
*/
getClientTypePrivsWrapped(options?: any): AxiosPromise<PrivilegeDtoResponseWrapper>;
/**
* Updates an existing Application Client. Requires DASHBOARD_ADMIN access to change any attribute,or be APP_CLIENT_DEVELOPER role for app client of given UUID to be able to manage change App Client Developers - any of fields changed as APP_CLIENT_DEVELOPER will not be changed.
* @summary Updates an existing Application Client
* @param {string} id App Client ID to update
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApiInterface
*/
updateAppClient(id: string, appClientUserDto: AppClientUserDto, options?: any): AxiosPromise<AppClientUserDto>;
}
/**
* AppClientControllerApi - object-oriented interface
* @export
* @class AppClientControllerApi
* @extends {BaseAPI}
*/
export class AppClientControllerApi extends BaseAPI implements AppClientControllerApiInterface {
/**
* Adds a App Client User. Requires DASHBOARD_ADMIN access.
* @summary Adds an App Client
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApi
*/
public createAppClientUser(appClientUserDto: AppClientUserDto, options?: any) {
return AppClientControllerApiFp(this.configuration).createAppClientUser(appClientUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Deletes an existing App Client. Requires DASHBOARD_ADMIN access.
* @summary Deletes an App Client
* @param {string} id App Client ID to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApi
*/
public deleteAppClient(id: string, options?: any) {
return AppClientControllerApiFp(this.configuration).deleteAppClient(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Get an App Client by its UUID. Requires DASHBOARD_ADMIN or be an App Client Developer of that UUID.
* @summary Get an App Client\'s Information
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApi
*/
public getAppClientRecord(id: string, options?: any) {
return AppClientControllerApiFp(this.configuration).getAppClientRecord(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves application client user information. Requires Dashboard Admin access or App Client Developer.
* @summary Retrieves all application client user information
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApi
*/
public getAppClientUsersWrapped(options?: any) {
return AppClientControllerApiFp(this.configuration).getAppClientUsersWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* Gets all the app client privileges so that privilege names can be mapped to their IDs. Must be a DASHBOARD_ADMIN or APP_CLIENT_DEVELOPER
* @summary Gets all available privileges available for an app-client
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApi
*/
public getClientTypePrivsWrapped(options?: any) {
return AppClientControllerApiFp(this.configuration).getClientTypePrivsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* Updates an existing Application Client. Requires DASHBOARD_ADMIN access to change any attribute,or be APP_CLIENT_DEVELOPER role for app client of given UUID to be able to manage change App Client Developers - any of fields changed as APP_CLIENT_DEVELOPER will not be changed.
* @summary Updates an existing Application Client
* @param {string} id App Client ID to update
* @param {AppClientUserDto} appClientUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppClientControllerApi
*/
public updateAppClient(id: string, appClientUserDto: AppClientUserDto, options?: any) {
return AppClientControllerApiFp(this.configuration).updateAppClient(id, appClientUserDto, options).then((request) => request(this.axios, this.basePath));
}
}
/* 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 { AppClientSummaryDtoResponseWrapper } from '../models';
// @ts-ignore
import { AppEndPointPrivDto } from '../models';
// @ts-ignore
import { AppSourceDetailsDto } from '../models';
// @ts-ignore
import { AppSourceDtoResponseWrapper } from '../models';
// @ts-ignore
import { DashboardUserDto } from '../models';
// @ts-ignore
import { ExceptionResponse } from '../models';
/**
* AppSourceControllerApi - axios parameter creator
* @export
*/
export const AppSourceControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Adds single app source admin by email address to provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addAppSourceAdmin: async (id: string, dashboardUserDto: DashboardUserDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling addAppSourceAdmin.');
}
// verify required parameter 'dashboardUserDto' is not null or undefined
if (dashboardUserDto === null || dashboardUserDto === undefined) {
throw new RequiredError('dashboardUserDto','Required parameter dashboardUserDto was null or undefined when calling addAppSourceAdmin.');
}
const localVarPath = `/v2/app-source/admins/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof dashboardUserDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(dashboardUserDto !== undefined ? dashboardUserDto : {})
: (dashboardUserDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Adds an app source\'s endpoint to app client privilege relationship
* @param {AppEndPointPrivDto} appEndPointPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addClientToEndpointPriv: async (appEndPointPrivDto: AppEndPointPrivDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appEndPointPrivDto' is not null or undefined
if (appEndPointPrivDto === null || appEndPointPrivDto === undefined) {
throw new RequiredError('appEndPointPrivDto','Required parameter appEndPointPrivDto was null or undefined when calling addClientToEndpointPriv.');
}
const localVarPath = `/v2/app-source/app-clients`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof appEndPointPrivDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(appEndPointPrivDto !== undefined ? appEndPointPrivDto : {})
: (appEndPointPrivDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requires DASHBOARD_ADMIN rights
* @summary Creates an App Source including App Client permissions.
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAppSource: async (appSourceDetailsDto: AppSourceDetailsDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appSourceDetailsDto' is not null or undefined
if (appSourceDetailsDto === null || appSourceDetailsDto === undefined) {
throw new RequiredError('appSourceDetailsDto','Required parameter appSourceDetailsDto was null or undefined when calling createAppSource.');
}
const localVarPath = `/v2/app-source`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof appSourceDetailsDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(appSourceDetailsDto !== undefined ? appSourceDetailsDto : {})
: (appSourceDetailsDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes the App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAppSource: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteAppSource.');
}
const localVarPath = `/v2/app-source/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...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,
};
},
/**
* Requires DASHBOARD_ADMIN or APP_SOURCE_ADMIN rights.
* @summary Returns the details for an App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppSourceDetails: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getAppSourceDetails.');
}
const localVarPath = `/v2/app-source/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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,
};
},
/**
* Requires DASHBOARD_ADMIN rights
* @summary Gets all App Sources.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppSourcesWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/app-source`;
// 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,
};
},
/**
*
* @summary Gets a list of the available app clients (their names and UUIDs)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAvailableAppClientsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/app-source/app-clients`;
// 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,
};
},
/**
*
* @summary Gets a copy of the openapispec file for the app source
* @param {string} appId App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSpecFile: async (appId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling getSpecFile.');
}
const localVarPath = `/v2/app-source/spec/{appId}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)));
// 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,
};
},
/**
*
* @summary Gets a copy of the openapispec file for the app source related to the endpoint
* @param {string} endpointPrivId App Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSpecFileByEndpointPriv: async (endpointPrivId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'endpointPrivId' is not null or undefined
if (endpointPrivId === null || endpointPrivId === undefined) {
throw new RequiredError('endpointPrivId','Required parameter endpointPrivId was null or undefined when calling getSpecFileByEndpointPriv.');
}
const localVarPath = `/v2/app-source/spec/endpoint-priv/{endpointPrivId}`
.replace(`{${"endpointPrivId"}}`, encodeURIComponent(String(endpointPrivId)));
// 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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes ALL app client privileges from provided App Source. No App Clients will be able to use this app source\'s endpoints.
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeAllAppClientPrivs: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling removeAllAppClientPrivs.');
}
const localVarPath = `/v2/app-source/app-clients/all/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Deletes a single app source admin by email address from provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeAppSourceAdmin: async (id: string, dashboardUserDto: DashboardUserDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling removeAppSourceAdmin.');
}
// verify required parameter 'dashboardUserDto' is not null or undefined
if (dashboardUserDto === null || dashboardUserDto === undefined) {
throw new RequiredError('dashboardUserDto','Required parameter dashboardUserDto was null or undefined when calling removeAppSourceAdmin.');
}
const localVarPath = `/v2/app-source/admins/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof dashboardUserDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(dashboardUserDto !== undefined ? dashboardUserDto : {})
: (dashboardUserDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes an app source\'s endpoint to app client privilege relationship
* @param {string} appId App Source UUID
* @param {string} privId App Source Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeClientToEndPointPriv: async (appId: string, privId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling removeClientToEndPointPriv.');
}
// verify required parameter 'privId' is not null or undefined
if (privId === null || privId === undefined) {
throw new RequiredError('privId','Required parameter privId was null or undefined when calling removeClientToEndPointPriv.');
}
const localVarPath = `/v2/app-source/app-clients/{appId}/{privId}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)))
.replace(`{${"privId"}}`, encodeURIComponent(String(privId)));
// 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: 'DELETE', ...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,
};
},
/**
* Requires DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Admin users can also be managed via this request method. Emails for app source admins to a given App Source UUID will be implicitly added as new DashboardUsers with the APP_SOURCE_ADMIN privilege. Conversely a PUT that takes away an email that was there before will be deleted as a DashboardUser if that email address does not have any other privileges in the system or its an app source admin to some other app source application.
* @summary Updates the details for an App Source
* @param {string} id App Source id to update
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAppSourceDetails: async (id: string, appSourceDetailsDto: AppSourceDetailsDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling updateAppSourceDetails.');
}
// verify required parameter 'appSourceDetailsDto' is not null or undefined
if (appSourceDetailsDto === null || appSourceDetailsDto === undefined) {
throw new RequiredError('appSourceDetailsDto','Required parameter appSourceDetailsDto was null or undefined when calling updateAppSourceDetails.');
}
const localVarPath = `/v2/app-source/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof appSourceDetailsDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(appSourceDetailsDto !== undefined ? appSourceDetailsDto : {})
: (appSourceDetailsDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
}
};
/**
* AppSourceControllerApi - functional programming interface
* @export
*/
export const AppSourceControllerApiFp = function(configuration?: Configuration) {
return {
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Adds single app source admin by email address to provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).addAppSourceAdmin(id, dashboardUserDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Adds an app source\'s endpoint to app client privilege relationship
* @param {AppEndPointPrivDto} appEndPointPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addClientToEndpointPriv(appEndPointPrivDto: AppEndPointPrivDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).addClientToEndpointPriv(appEndPointPrivDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requires DASHBOARD_ADMIN rights
* @summary Creates an App Source including App Client permissions.
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAppSource(appSourceDetailsDto: AppSourceDetailsDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).createAppSource(appSourceDetailsDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes the App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAppSource(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).deleteAppSource(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requires DASHBOARD_ADMIN or APP_SOURCE_ADMIN rights.
* @summary Returns the details for an App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAppSourceDetails(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).getAppSourceDetails(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requires DASHBOARD_ADMIN rights
* @summary Gets all App Sources.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAppSourcesWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDtoResponseWrapper>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).getAppSourcesWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary Gets a list of the available app clients (their names and UUIDs)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAvailableAppClientsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientSummaryDtoResponseWrapper>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).getAvailableAppClientsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary Gets a copy of the openapispec file for the app source
* @param {string} appId App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getSpecFile(appId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).getSpecFile(appId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary Gets a copy of the openapispec file for the app source related to the endpoint
* @param {string} endpointPrivId App Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getSpecFileByEndpointPriv(endpointPrivId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).getSpecFileByEndpointPriv(endpointPrivId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes ALL app client privileges from provided App Source. No App Clients will be able to use this app source\'s endpoints.
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async removeAllAppClientPrivs(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).removeAllAppClientPrivs(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Deletes a single app source admin by email address from provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async removeAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).removeAppSourceAdmin(id, dashboardUserDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes an app source\'s endpoint to app client privilege relationship
* @param {string} appId App Source UUID
* @param {string} privId App Source Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async removeClientToEndPointPriv(appId: string, privId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).removeClientToEndPointPriv(appId, privId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requires DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Admin users can also be managed via this request method. Emails for app source admins to a given App Source UUID will be implicitly added as new DashboardUsers with the APP_SOURCE_ADMIN privilege. Conversely a PUT that takes away an email that was there before will be deleted as a DashboardUser if that email address does not have any other privileges in the system or its an app source admin to some other app source application.
* @summary Updates the details for an App Source
* @param {string} id App Source id to update
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateAppSourceDetails(id: string, appSourceDetailsDto: AppSourceDetailsDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceDetailsDto>> {
const localVarAxiosArgs = await AppSourceControllerApiAxiosParamCreator(configuration).updateAppSourceDetails(id, appSourceDetailsDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* AppSourceControllerApi - factory interface
* @export
*/
export const AppSourceControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Adds single app source admin by email address to provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).addAppSourceAdmin(id, dashboardUserDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Adds an app source\'s endpoint to app client privilege relationship
* @param {AppEndPointPrivDto} appEndPointPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addClientToEndpointPriv(appEndPointPrivDto: AppEndPointPrivDto, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).addClientToEndpointPriv(appEndPointPrivDto, options).then((request) => request(axios, basePath));
},
/**
* Requires DASHBOARD_ADMIN rights
* @summary Creates an App Source including App Client permissions.
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAppSource(appSourceDetailsDto: AppSourceDetailsDto, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).createAppSource(appSourceDetailsDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes the App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAppSource(id: string, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).deleteAppSource(id, options).then((request) => request(axios, basePath));
},
/**
* Requires DASHBOARD_ADMIN or APP_SOURCE_ADMIN rights.
* @summary Returns the details for an App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppSourceDetails(id: string, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).getAppSourceDetails(id, options).then((request) => request(axios, basePath));
},
/**
* Requires DASHBOARD_ADMIN rights
* @summary Gets all App Sources.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAppSourcesWrapped(options?: any): AxiosPromise<AppSourceDtoResponseWrapper> {
return AppSourceControllerApiFp(configuration).getAppSourcesWrapped(options).then((request) => request(axios, basePath));
},
/**
*
* @summary Gets a list of the available app clients (their names and UUIDs)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAvailableAppClientsWrapped(options?: any): AxiosPromise<AppClientSummaryDtoResponseWrapper> {
return AppSourceControllerApiFp(configuration).getAvailableAppClientsWrapped(options).then((request) => request(axios, basePath));
},
/**
*
* @summary Gets a copy of the openapispec file for the app source
* @param {string} appId App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSpecFile(appId: string, options?: any): AxiosPromise<any> {
return AppSourceControllerApiFp(configuration).getSpecFile(appId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Gets a copy of the openapispec file for the app source related to the endpoint
* @param {string} endpointPrivId App Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSpecFileByEndpointPriv(endpointPrivId: string, options?: any): AxiosPromise<any> {
return AppSourceControllerApiFp(configuration).getSpecFileByEndpointPriv(endpointPrivId, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes ALL app client privileges from provided App Source. No App Clients will be able to use this app source\'s endpoints.
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeAllAppClientPrivs(id: string, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).removeAllAppClientPrivs(id, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Deletes a single app source admin by email address from provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).removeAppSourceAdmin(id, dashboardUserDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes an app source\'s endpoint to app client privilege relationship
* @param {string} appId App Source UUID
* @param {string} privId App Source Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeClientToEndPointPriv(appId: string, privId: string, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).removeClientToEndPointPriv(appId, privId, options).then((request) => request(axios, basePath));
},
/**
* Requires DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Admin users can also be managed via this request method. Emails for app source admins to a given App Source UUID will be implicitly added as new DashboardUsers with the APP_SOURCE_ADMIN privilege. Conversely a PUT that takes away an email that was there before will be deleted as a DashboardUser if that email address does not have any other privileges in the system or its an app source admin to some other app source application.
* @summary Updates the details for an App Source
* @param {string} id App Source id to update
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAppSourceDetails(id: string, appSourceDetailsDto: AppSourceDetailsDto, options?: any): AxiosPromise<AppSourceDetailsDto> {
return AppSourceControllerApiFp(configuration).updateAppSourceDetails(id, appSourceDetailsDto, options).then((request) => request(axios, basePath));
},
};
};
/**
* AppSourceControllerApi - interface
* @export
* @interface AppSourceControllerApi
*/
export interface AppSourceControllerApiInterface {
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Adds single app source admin by email address to provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
addAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Adds an app source\'s endpoint to app client privilege relationship
* @param {AppEndPointPrivDto} appEndPointPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
addClientToEndpointPriv(appEndPointPrivDto: AppEndPointPrivDto, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requires DASHBOARD_ADMIN rights
* @summary Creates an App Source including App Client permissions.
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
createAppSource(appSourceDetailsDto: AppSourceDetailsDto, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes the App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
deleteAppSource(id: string, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requires DASHBOARD_ADMIN or APP_SOURCE_ADMIN rights.
* @summary Returns the details for an App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
getAppSourceDetails(id: string, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requires DASHBOARD_ADMIN rights
* @summary Gets all App Sources.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
getAppSourcesWrapped(options?: any): AxiosPromise<AppSourceDtoResponseWrapper>;
/**
*
* @summary Gets a list of the available app clients (their names and UUIDs)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
getAvailableAppClientsWrapped(options?: any): AxiosPromise<AppClientSummaryDtoResponseWrapper>;
/**
*
* @summary Gets a copy of the openapispec file for the app source
* @param {string} appId App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
getSpecFile(appId: string, options?: any): AxiosPromise<any>;
/**
*
* @summary Gets a copy of the openapispec file for the app source related to the endpoint
* @param {string} endpointPrivId App Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
getSpecFileByEndpointPriv(endpointPrivId: string, options?: any): AxiosPromise<any>;
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes ALL app client privileges from provided App Source. No App Clients will be able to use this app source\'s endpoints.
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
removeAllAppClientPrivs(id: string, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Deletes a single app source admin by email address from provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
removeAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes an app source\'s endpoint to app client privilege relationship
* @param {string} appId App Source UUID
* @param {string} privId App Source Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
removeClientToEndPointPriv(appId: string, privId: string, options?: any): AxiosPromise<AppSourceDetailsDto>;
/**
* Requires DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Admin users can also be managed via this request method. Emails for app source admins to a given App Source UUID will be implicitly added as new DashboardUsers with the APP_SOURCE_ADMIN privilege. Conversely a PUT that takes away an email that was there before will be deleted as a DashboardUser if that email address does not have any other privileges in the system or its an app source admin to some other app source application.
* @summary Updates the details for an App Source
* @param {string} id App Source id to update
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApiInterface
*/
updateAppSourceDetails(id: string, appSourceDetailsDto: AppSourceDetailsDto, options?: any): AxiosPromise<AppSourceDetailsDto>;
}
/**
* AppSourceControllerApi - object-oriented interface
* @export
* @class AppSourceControllerApi
* @extends {BaseAPI}
*/
export class AppSourceControllerApi extends BaseAPI implements AppSourceControllerApiInterface {
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Adds single app source admin by email address to provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public addAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any) {
return AppSourceControllerApiFp(this.configuration).addAppSourceAdmin(id, dashboardUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Adds an app source\'s endpoint to app client privilege relationship
* @param {AppEndPointPrivDto} appEndPointPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public addClientToEndpointPriv(appEndPointPrivDto: AppEndPointPrivDto, options?: any) {
return AppSourceControllerApiFp(this.configuration).addClientToEndpointPriv(appEndPointPrivDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requires DASHBOARD_ADMIN rights
* @summary Creates an App Source including App Client permissions.
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public createAppSource(appSourceDetailsDto: AppSourceDetailsDto, options?: any) {
return AppSourceControllerApiFp(this.configuration).createAppSource(appSourceDetailsDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes the App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public deleteAppSource(id: string, options?: any) {
return AppSourceControllerApiFp(this.configuration).deleteAppSource(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requires DASHBOARD_ADMIN or APP_SOURCE_ADMIN rights.
* @summary Returns the details for an App Source
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public getAppSourceDetails(id: string, options?: any) {
return AppSourceControllerApiFp(this.configuration).getAppSourceDetails(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requires DASHBOARD_ADMIN rights
* @summary Gets all App Sources.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public getAppSourcesWrapped(options?: any) {
return AppSourceControllerApiFp(this.configuration).getAppSourcesWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Gets a list of the available app clients (their names and UUIDs)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public getAvailableAppClientsWrapped(options?: any) {
return AppSourceControllerApiFp(this.configuration).getAvailableAppClientsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Gets a copy of the openapispec file for the app source
* @param {string} appId App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public getSpecFile(appId: string, options?: any) {
return AppSourceControllerApiFp(this.configuration).getSpecFile(appId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Gets a copy of the openapispec file for the app source related to the endpoint
* @param {string} endpointPrivId App Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public getSpecFileByEndpointPriv(endpointPrivId: string, options?: any) {
return AppSourceControllerApiFp(this.configuration).getSpecFileByEndpointPriv(endpointPrivId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes ALL app client privileges from provided App Source. No App Clients will be able to use this app source\'s endpoints.
* @param {string} id App Source UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public removeAllAppClientPrivs(id: string, options?: any) {
return AppSourceControllerApiFp(this.configuration).removeAllAppClientPrivs(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Request payload is a DashboardUserDto, but only needed/required fields are the email address.
* @summary Deletes a single app source admin by email address from provided App Source
* @param {string} id App Source UUID
* @param {DashboardUserDto} dashboardUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public removeAppSourceAdmin(id: string, dashboardUserDto: DashboardUserDto, options?: any) {
return AppSourceControllerApiFp(this.configuration).removeAppSourceAdmin(id, dashboardUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id.
* @summary Deletes an app source\'s endpoint to app client privilege relationship
* @param {string} appId App Source UUID
* @param {string} privId App Source Endpoint Privilege UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public removeClientToEndPointPriv(appId: string, privId: string, options?: any) {
return AppSourceControllerApiFp(this.configuration).removeClientToEndPointPriv(appId, privId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requires DASHBOARD_ADMIN rights or be APP_SOURCE_ADMIN of given App Id. Admin users can also be managed via this request method. Emails for app source admins to a given App Source UUID will be implicitly added as new DashboardUsers with the APP_SOURCE_ADMIN privilege. Conversely a PUT that takes away an email that was there before will be deleted as a DashboardUser if that email address does not have any other privileges in the system or its an app source admin to some other app source application.
* @summary Updates the details for an App Source
* @param {string} id App Source id to update
* @param {AppSourceDetailsDto} appSourceDetailsDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AppSourceControllerApi
*/
public updateAppSourceDetails(id: string, appSourceDetailsDto: AppSourceDetailsDto, options?: any) {
return AppSourceControllerApiFp(this.configuration).updateAppSourceDetails(id, appSourceDetailsDto, options).then((request) => request(this.axios, this.basePath));
}
}
/* 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));
}
}
/* 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 { AppClientCountMetricDto } from '../models';
// @ts-ignore
import { AppEndpointCountMetricDto } from '../models';
// @ts-ignore
import { AppSourceCountMetricDto } from '../models';
// @ts-ignore
import { AppSourceMetricDto } from '../models';
// @ts-ignore
import { EndpointMetricDto } from '../models';
// @ts-ignore
import { ExceptionResponse } from '../models';
/**
* MetricsControllerApi - axios parameter creator
* @export
*/
export const MetricsControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Retrieves all stored metric values for given app source
* @summary Retrieves all stored metrics values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllMetricsForAppSource: async (id: string, startDate: string, endDate: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getAllMetricsForAppSource.');
}
// 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 getAllMetricsForAppSource.');
}
// verify required parameter 'endDate' is not null or undefined
if (endDate === null || endDate === undefined) {
throw new RequiredError('endDate','Required parameter endDate was null or undefined when calling getAllMetricsForAppSource.');
}
const localVarPath = `/v2/metrics/appsource/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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() :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString() :
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 stored metric values for given endpoint
* @summary Retrieves all stored metrics values for given endpoint
* @param {string} id Endpoint Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllMetricsForEndpoint: async (id: string, startDate: string, endDate: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getAllMetricsForEndpoint.');
}
// 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 getAllMetricsForEndpoint.');
}
// verify required parameter 'endDate' is not null or undefined
if (endDate === null || endDate === undefined) {
throw new RequiredError('endDate','Required parameter endDate was null or undefined when calling getAllMetricsForEndpoint.');
}
const localVarPath = `/v2/metrics/endpoint/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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() :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString() :
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 sum of stored metric values for given app client name on given app source for each endpoint
* @summary Retrieves sum of stored metric values for given app client name on given app source
* @param {string} id App Source Id to search with
* @param {string} name App Client Name to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCountOfMetricsForAppClient: async (id: string, name: string, startDate: string, endDate: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getCountOfMetricsForAppClient.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new RequiredError('name','Required parameter name was null or undefined when calling getCountOfMetricsForAppClient.');
}
// 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 getCountOfMetricsForAppClient.');
}
// verify required parameter 'endDate' is not null or undefined
if (endDate === null || endDate === undefined) {
throw new RequiredError('endDate','Required parameter endDate was null or undefined when calling getCountOfMetricsForAppClient.');
}
const localVarPath = `/v2/metrics/count/{id}/appclient`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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 (name !== undefined) {
localVarQueryParameter['name'] = name;
}
if (startDate !== undefined) {
localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
(startDate as any).toISOString() :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString() :
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 sum of stored metric values for given app source for each endppoint and for each app client
* @summary Retrieves sum of stored metric values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCountOfMetricsForAppSource: async (id: string, startDate: string, endDate: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getCountOfMetricsForAppSource.');
}
// 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 getCountOfMetricsForAppSource.');
}
// verify required parameter 'endDate' is not null or undefined
if (endDate === null || endDate === undefined) {
throw new RequiredError('endDate','Required parameter endDate was null or undefined when calling getCountOfMetricsForAppSource.');
}
const localVarPath = `/v2/metrics/count/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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() :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString() :
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 sum of stored metric values for given endpoint path on given app source for each app client
* @summary Retrieves sum of stored metric values for given endpoint path on given app source
* @param {string} id App Source Id to search with
* @param {string} path Endpoint Path to search with
* @param {'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE'} method Endpoint Request Method Type
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCountOfMetricsForEndpoint: async (id: string, path: string, method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE', startDate: string, endDate: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getCountOfMetricsForEndpoint.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new RequiredError('path','Required parameter path was null or undefined when calling getCountOfMetricsForEndpoint.');
}
// verify required parameter 'method' is not null or undefined
if (method === null || method === undefined) {
throw new RequiredError('method','Required parameter method was null or undefined when calling getCountOfMetricsForEndpoint.');
}
// 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 getCountOfMetricsForEndpoint.');
}
// verify required parameter 'endDate' is not null or undefined
if (endDate === null || endDate === undefined) {
throw new RequiredError('endDate','Required parameter endDate was null or undefined when calling getCountOfMetricsForEndpoint.');
}
const localVarPath = `/v2/metrics/count/{id}/endpoint`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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 (path !== undefined) {
localVarQueryParameter['path'] = path;
}
if (method !== undefined) {
localVarQueryParameter['method'] = method;
}
if (startDate !== undefined) {
localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
(startDate as any).toISOString() :
startDate;
}
if (endDate !== undefined) {
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
(endDate as any).toISOString() :
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,
};
},
}
};
/**
* MetricsControllerApi - functional programming interface
* @export
*/
export const MetricsControllerApiFp = function(configuration?: Configuration) {
return {
/**
* Retrieves all stored metric values for given app source
* @summary Retrieves all stored metrics values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceMetricDto>> {
const localVarAxiosArgs = await MetricsControllerApiAxiosParamCreator(configuration).getAllMetricsForAppSource(id, 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 stored metric values for given endpoint
* @summary Retrieves all stored metrics values for given endpoint
* @param {string} id Endpoint Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllMetricsForEndpoint(id: string, startDate: string, endDate: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EndpointMetricDto>> {
const localVarAxiosArgs = await MetricsControllerApiAxiosParamCreator(configuration).getAllMetricsForEndpoint(id, 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 sum of stored metric values for given app client name on given app source for each endpoint
* @summary Retrieves sum of stored metric values for given app client name on given app source
* @param {string} id App Source Id to search with
* @param {string} name App Client Name to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCountOfMetricsForAppClient(id: string, name: string, startDate: string, endDate: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppClientCountMetricDto>> {
const localVarAxiosArgs = await MetricsControllerApiAxiosParamCreator(configuration).getCountOfMetricsForAppClient(id, name, 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 sum of stored metric values for given app source for each endppoint and for each app client
* @summary Retrieves sum of stored metric values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCountOfMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppSourceCountMetricDto>> {
const localVarAxiosArgs = await MetricsControllerApiAxiosParamCreator(configuration).getCountOfMetricsForAppSource(id, 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 sum of stored metric values for given endpoint path on given app source for each app client
* @summary Retrieves sum of stored metric values for given endpoint path on given app source
* @param {string} id App Source Id to search with
* @param {string} path Endpoint Path to search with
* @param {'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE'} method Endpoint Request Method Type
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCountOfMetricsForEndpoint(id: string, path: string, method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE', startDate: string, endDate: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AppEndpointCountMetricDto>> {
const localVarAxiosArgs = await MetricsControllerApiAxiosParamCreator(configuration).getCountOfMetricsForEndpoint(id, path, method, 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);
};
},
}
};
/**
* MetricsControllerApi - factory interface
* @export
*/
export const MetricsControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
* Retrieves all stored metric values for given app source
* @summary Retrieves all stored metrics values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any): AxiosPromise<AppSourceMetricDto> {
return MetricsControllerApiFp(configuration).getAllMetricsForAppSource(id, startDate, endDate, options).then((request) => request(axios, basePath));
},
/**
* Retrieves all stored metric values for given endpoint
* @summary Retrieves all stored metrics values for given endpoint
* @param {string} id Endpoint Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllMetricsForEndpoint(id: string, startDate: string, endDate: string, options?: any): AxiosPromise<EndpointMetricDto> {
return MetricsControllerApiFp(configuration).getAllMetricsForEndpoint(id, startDate, endDate, options).then((request) => request(axios, basePath));
},
/**
* Retrieves sum of stored metric values for given app client name on given app source for each endpoint
* @summary Retrieves sum of stored metric values for given app client name on given app source
* @param {string} id App Source Id to search with
* @param {string} name App Client Name to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCountOfMetricsForAppClient(id: string, name: string, startDate: string, endDate: string, options?: any): AxiosPromise<AppClientCountMetricDto> {
return MetricsControllerApiFp(configuration).getCountOfMetricsForAppClient(id, name, startDate, endDate, options).then((request) => request(axios, basePath));
},
/**
* Retrieves sum of stored metric values for given app source for each endppoint and for each app client
* @summary Retrieves sum of stored metric values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCountOfMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any): AxiosPromise<AppSourceCountMetricDto> {
return MetricsControllerApiFp(configuration).getCountOfMetricsForAppSource(id, startDate, endDate, options).then((request) => request(axios, basePath));
},
/**
* Retrieves sum of stored metric values for given endpoint path on given app source for each app client
* @summary Retrieves sum of stored metric values for given endpoint path on given app source
* @param {string} id App Source Id to search with
* @param {string} path Endpoint Path to search with
* @param {'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE'} method Endpoint Request Method Type
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCountOfMetricsForEndpoint(id: string, path: string, method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE', startDate: string, endDate: string, options?: any): AxiosPromise<AppEndpointCountMetricDto> {
return MetricsControllerApiFp(configuration).getCountOfMetricsForEndpoint(id, path, method, startDate, endDate, options).then((request) => request(axios, basePath));
},
};
};
/**
* MetricsControllerApi - interface
* @export
* @interface MetricsControllerApi
*/
export interface MetricsControllerApiInterface {
/**
* Retrieves all stored metric values for given app source
* @summary Retrieves all stored metrics values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApiInterface
*/
getAllMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any): AxiosPromise<AppSourceMetricDto>;
/**
* Retrieves all stored metric values for given endpoint
* @summary Retrieves all stored metrics values for given endpoint
* @param {string} id Endpoint Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApiInterface
*/
getAllMetricsForEndpoint(id: string, startDate: string, endDate: string, options?: any): AxiosPromise<EndpointMetricDto>;
/**
* Retrieves sum of stored metric values for given app client name on given app source for each endpoint
* @summary Retrieves sum of stored metric values for given app client name on given app source
* @param {string} id App Source Id to search with
* @param {string} name App Client Name to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApiInterface
*/
getCountOfMetricsForAppClient(id: string, name: string, startDate: string, endDate: string, options?: any): AxiosPromise<AppClientCountMetricDto>;
/**
* Retrieves sum of stored metric values for given app source for each endppoint and for each app client
* @summary Retrieves sum of stored metric values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApiInterface
*/
getCountOfMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any): AxiosPromise<AppSourceCountMetricDto>;
/**
* Retrieves sum of stored metric values for given endpoint path on given app source for each app client
* @summary Retrieves sum of stored metric values for given endpoint path on given app source
* @param {string} id App Source Id to search with
* @param {string} path Endpoint Path to search with
* @param {'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE'} method Endpoint Request Method Type
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApiInterface
*/
getCountOfMetricsForEndpoint(id: string, path: string, method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE', startDate: string, endDate: string, options?: any): AxiosPromise<AppEndpointCountMetricDto>;
}
/**
* MetricsControllerApi - object-oriented interface
* @export
* @class MetricsControllerApi
* @extends {BaseAPI}
*/
export class MetricsControllerApi extends BaseAPI implements MetricsControllerApiInterface {
/**
* Retrieves all stored metric values for given app source
* @summary Retrieves all stored metrics values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApi
*/
public getAllMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any) {
return MetricsControllerApiFp(this.configuration).getAllMetricsForAppSource(id, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves all stored metric values for given endpoint
* @summary Retrieves all stored metrics values for given endpoint
* @param {string} id Endpoint Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApi
*/
public getAllMetricsForEndpoint(id: string, startDate: string, endDate: string, options?: any) {
return MetricsControllerApiFp(this.configuration).getAllMetricsForEndpoint(id, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves sum of stored metric values for given app client name on given app source for each endpoint
* @summary Retrieves sum of stored metric values for given app client name on given app source
* @param {string} id App Source Id to search with
* @param {string} name App Client Name to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApi
*/
public getCountOfMetricsForAppClient(id: string, name: string, startDate: string, endDate: string, options?: any) {
return MetricsControllerApiFp(this.configuration).getCountOfMetricsForAppClient(id, name, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves sum of stored metric values for given app source for each endppoint and for each app client
* @summary Retrieves sum of stored metric values for given app source
* @param {string} id App Source Id to search with
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApi
*/
public getCountOfMetricsForAppSource(id: string, startDate: string, endDate: string, options?: any) {
return MetricsControllerApiFp(this.configuration).getCountOfMetricsForAppSource(id, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves sum of stored metric values for given endpoint path on given app source for each app client
* @summary Retrieves sum of stored metric values for given endpoint path on given app source
* @param {string} id App Source Id to search with
* @param {string} path Endpoint Path to search with
* @param {'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE'} method Endpoint Request Method Type
* @param {string} startDate Earliest date to include
* @param {string} endDate Latest date to include
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsControllerApi
*/
public getCountOfMetricsForEndpoint(id: string, path: string, method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'TRACE', startDate: string, endDate: string, options?: any) {
return MetricsControllerApiFp(this.configuration).getCountOfMetricsForEndpoint(id, path, method, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
}
}
......@@ -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));
}
}
/* 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 { GenericStringArrayResponseWrapper } from '../models';
// @ts-ignore
import { PrivilegeDtoResponseWrapper } from '../models';
// @ts-ignore
import { ScratchStorageAppRegistryDto } from '../models';
// @ts-ignore
import { ScratchStorageAppRegistryDtoResponseWrapper } from '../models';
// @ts-ignore
import { ScratchStorageAppUserPrivDto } from '../models';
// @ts-ignore
import { ScratchStorageEntryDto } from '../models';
// @ts-ignore
import { ScratchStorageEntryDtoResponseWrapper } from '../models';
// @ts-ignore
import { ScratchStorageUserDto } from '../models';
// @ts-ignore
import { ScratchStorageUserDtoResponseWrapper } from '../models';
// @ts-ignore
import { ScratchValuePatchJsonDto } from '../models';
/**
* ScratchStorageControllerApi - axios parameter creator
* @export
*/
export const ScratchStorageControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Space user by their P1 email address
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addNewScratchUser: async (scratchStorageUserDto: ScratchStorageUserDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'scratchStorageUserDto' is not null or undefined
if (scratchStorageUserDto === null || scratchStorageUserDto === undefined) {
throw new RequiredError('scratchStorageUserDto','Required parameter scratchStorageUserDto was null or undefined when calling addNewScratchUser.');
}
const localVarPath = `/v2/scratch/users`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchStorageUserDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchStorageUserDto !== undefined ? scratchStorageUserDto : {})
: (scratchStorageUserDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Adds a user privilege to this app\'s data
* @param {string} id Application UUID
* @param {ScratchStorageAppUserPrivDto} scratchStorageAppUserPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addUserPriv: async (id: string, scratchStorageAppUserPrivDto: ScratchStorageAppUserPrivDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling addUserPriv.');
}
// verify required parameter 'scratchStorageAppUserPrivDto' is not null or undefined
if (scratchStorageAppUserPrivDto === null || scratchStorageAppUserPrivDto === undefined) {
throw new RequiredError('scratchStorageAppUserPrivDto','Required parameter scratchStorageAppUserPrivDto was null or undefined when calling addUserPriv.');
}
const localVarPath = `/v2/scratch/apps/{id}/user`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchStorageAppUserPrivDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchStorageAppUserPrivDto !== undefined ? scratchStorageAppUserPrivDto : {})
: (scratchStorageAppUserPrivDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes all key-value pairs for a given App Id
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAllKeyValuePairsForAppId: async (appId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling deleteAllKeyValuePairsForAppId.');
}
const localVarPath = `/v2/scratch/{appId}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)));
// 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: 'DELETE', ...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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes this application from the Common API registry (removes from scratch space use)
* @param {string} id Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExistingAppEntry: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteExistingAppEntry.');
}
const localVarPath = `/v2/scratch/apps/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...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,
};
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes a key-value pair for a given App Id
* @param {string} appId Application UUID
* @param {string} key Key name of the key-value pair to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteKeyValuePair: async (appId: string, key: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling deleteKeyValuePair.');
}
// verify required parameter 'key' is not null or undefined
if (key === null || key === undefined) {
throw new RequiredError('key','Required parameter key was null or undefined when calling deleteKeyValuePair.');
}
const localVarPath = `/v2/scratch/{appId}/key/{key}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)))
.replace(`{${"key"}}`, encodeURIComponent(String(key)));
// 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: 'DELETE', ...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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes a scratch user
* @param {string} id Scratch User Id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteScratchUser: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteScratchUser.');
}
const localVarPath = `/v2/scratch/users/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edit existing scratch space app information (its name)
* @param {string} id Application UUID
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
editExistingAppEntry: async (id: string, scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling editExistingAppEntry.');
}
// verify required parameter 'scratchStorageAppRegistryDto' is not null or undefined
if (scratchStorageAppRegistryDto === null || scratchStorageAppRegistryDto === undefined) {
throw new RequiredError('scratchStorageAppRegistryDto','Required parameter scratchStorageAppRegistryDto was null or undefined when calling editExistingAppEntry.');
}
const localVarPath = `/v2/scratch/apps/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchStorageAppRegistryDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchStorageAppRegistryDto !== undefined ? scratchStorageAppRegistryDto : {})
: (scratchStorageAppRegistryDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edits an existing Scratch Space user information
* @param {string} id Scratch User Id
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
editScratchUser: async (id: string, scratchStorageUserDto: ScratchStorageUserDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling editScratchUser.');
}
// verify required parameter 'scratchStorageUserDto' is not null or undefined
if (scratchStorageUserDto === null || scratchStorageUserDto === undefined) {
throw new RequiredError('scratchStorageUserDto','Required parameter scratchStorageUserDto was null or undefined when calling editScratchUser.');
}
const localVarPath = `/v2/scratch/users/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchStorageUserDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchStorageUserDto !== undefined ? scratchStorageUserDto : {})
: (scratchStorageUserDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all key-value pairs for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllKeyValuePairsForAppIdWrapped: async (appId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling getAllKeyValuePairsForAppIdWrapped.');
}
const localVarPath = `/v2/scratch/{appId}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)));
// 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,
};
},
/**
* Requires request to be under DASHBOARD_ADMIN privileges
* @summary Retrieves all key-value pairs for all scratch space consuming apps
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllKeyValuePairsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/scratch`;
// 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,
};
},
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all keys for for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllKeysForAppIdWrapped: async (appId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling getAllKeysForAppIdWrapped.');
}
const localVarPath = `/v2/scratch/apps/{appId}/keys`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)));
// 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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Space users (ID, email...)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllUsersWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/scratch/users`;
// 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,
};
},
/**
* App ID is the UUID of the owning application
* @summary Retrieves a single key-value pair for for a single app
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKeyValueByKeyName: async (appId: string, keyName: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling getKeyValueByKeyName.');
}
// verify required parameter 'keyName' is not null or undefined
if (keyName === null || keyName === undefined) {
throw new RequiredError('keyName','Required parameter keyName was null or undefined when calling getKeyValueByKeyName.');
}
const localVarPath = `/v2/scratch/{appId}/{keyName}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)))
.replace(`{${"keyName"}}`, encodeURIComponent(String(keyName)));
// 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,
};
},
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and returns the JsonPath query invoked onto that JSON structure. Returns JSON string matching the specified JSON Path
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {string} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKeyValueByKeyNameAsJson: async (appId: string, keyName: string, body: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling getKeyValueByKeyNameAsJson.');
}
// verify required parameter 'keyName' is not null or undefined
if (keyName === null || keyName === undefined) {
throw new RequiredError('keyName','Required parameter keyName was null or undefined when calling getKeyValueByKeyNameAsJson.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body','Required parameter body was null or undefined when calling getKeyValueByKeyNameAsJson.');
}
const localVarPath = `/v2/scratch/{appId}/{keyName}/jsonize`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)))
.replace(`{${"keyName"}}`, encodeURIComponent(String(keyName)));
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'text/plain;charset=UTF-8';
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};
const nonString = typeof body !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(body !== undefined ? body : {})
: (body || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or have SCRATCH_ADMIN rights for given app ID.
* @summary Gets a single Scratch Storage app\'s record that is registered with Common API
* @param {string} appId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchAppById: async (appId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling getScratchAppById.');
}
const localVarPath = `/v2/scratch/apps/{appId}`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)));
// 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,
};
},
/**
* Gets all the SCRATCH space privileges so that privilege names can be mapped to their IDs
* @summary Gets all SCRATCH space privileges available
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchPrivsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/scratch/users/privs`;
// 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,
};
},
/**
* Each Scratch Storage App returned will only contain user privileges for the Authorized User. It will not contain the privileges of other users.
* @summary Gets all Scratch Storage apps that the current Authorized User is a user of
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchSpaceAppsByAuthorizedUser: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/scratch/apps/self`;
// 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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Storage apps that are registered with Common API if requesteris a dashboard admin, otherwise returns the scratch space apps the requester is a scratch admin for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchSpaceAppsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/scratch/apps`;
// 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,
};
},
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and attempts to update a portion of it from given JSON Patch spec with provided value. Returns NO_CONTENT response on successful update.
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {ScratchValuePatchJsonDto} scratchValuePatchJsonDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchKeyValuePairAsJson: async (appId: string, keyName: string, scratchValuePatchJsonDto: ScratchValuePatchJsonDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined
if (appId === null || appId === undefined) {
throw new RequiredError('appId','Required parameter appId was null or undefined when calling patchKeyValuePairAsJson.');
}
// verify required parameter 'keyName' is not null or undefined
if (keyName === null || keyName === undefined) {
throw new RequiredError('keyName','Required parameter keyName was null or undefined when calling patchKeyValuePairAsJson.');
}
// verify required parameter 'scratchValuePatchJsonDto' is not null or undefined
if (scratchValuePatchJsonDto === null || scratchValuePatchJsonDto === undefined) {
throw new RequiredError('scratchValuePatchJsonDto','Required parameter scratchValuePatchJsonDto was null or undefined when calling patchKeyValuePairAsJson.');
}
const localVarPath = `/v2/scratch/{appId}/{keyName}/jsonize`
.replace(`{${"appId"}}`, encodeURIComponent(String(appId)))
.replace(`{${"keyName"}}`, encodeURIComponent(String(keyName)));
// 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: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchValuePatchJsonDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchValuePatchJsonDto !== undefined ? scratchValuePatchJsonDto : {})
: (scratchValuePatchJsonDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Strorage consuming app name to the Common API scratch storage space
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postNewScratchSpaceApp: async (scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'scratchStorageAppRegistryDto' is not null or undefined
if (scratchStorageAppRegistryDto === null || scratchStorageAppRegistryDto === undefined) {
throw new RequiredError('scratchStorageAppRegistryDto','Required parameter scratchStorageAppRegistryDto was null or undefined when calling postNewScratchSpaceApp.');
}
const localVarPath = `/v2/scratch/apps`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchStorageAppRegistryDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchStorageAppRegistryDto !== undefined ? scratchStorageAppRegistryDto : {})
: (scratchStorageAppRegistryDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Removes a user privilege from this app\'s data
* @param {string} id Application UUID
* @param {string} appPrivIdEntry UUID of the User-Priv set to remove
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeUserPriv: async (id: string, appPrivIdEntry: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling removeUserPriv.');
}
// verify required parameter 'appPrivIdEntry' is not null or undefined
if (appPrivIdEntry === null || appPrivIdEntry === undefined) {
throw new RequiredError('appPrivIdEntry','Required parameter appPrivIdEntry was null or undefined when calling removeUserPriv.');
}
const localVarPath = `/v2/scratch/apps/{id}/user/{appPrivIdEntry}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
.replace(`{${"appPrivIdEntry"}}`, encodeURIComponent(String(appPrivIdEntry)));
// 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: 'DELETE', ...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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s ACL mode setting
* @param {string} id Application UUID
* @param {boolean} aclMode Value of the ACL Mode setting - true or false
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setAclModeSetting: async (id: string, aclMode: boolean, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling setAclModeSetting.');
}
// verify required parameter 'aclMode' is not null or undefined
if (aclMode === null || aclMode === undefined) {
throw new RequiredError('aclMode','Required parameter aclMode was null or undefined when calling setAclModeSetting.');
}
const localVarPath = `/v2/scratch/apps/{id}/aclMode`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (aclMode !== undefined) {
localVarQueryParameter['aclMode'] = aclMode;
}
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,
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s implicit read field
* @param {string} id Application UUID
* @param {boolean} priv Application User-Priv Object
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setImplicitReadSetting: async (id: string, priv: boolean, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling setImplicitReadSetting.');
}
// verify required parameter 'priv' is not null or undefined
if (priv === null || priv === undefined) {
throw new RequiredError('priv','Required parameter priv was null or undefined when calling setImplicitReadSetting.');
}
const localVarPath = `/v2/scratch/apps/{id}/implicitRead`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (priv !== undefined) {
localVarQueryParameter['priv'] = priv;
}
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,
};
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Adds or updates a key-value pair for a given App Id
* @param {ScratchStorageEntryDto} scratchStorageEntryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setKeyValuePair: async (scratchStorageEntryDto: ScratchStorageEntryDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'scratchStorageEntryDto' is not null or undefined
if (scratchStorageEntryDto === null || scratchStorageEntryDto === undefined) {
throw new RequiredError('scratchStorageEntryDto','Required parameter scratchStorageEntryDto was null or undefined when calling setKeyValuePair.');
}
const localVarPath = `/v2/scratch`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof scratchStorageEntryDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(scratchStorageEntryDto !== undefined ? scratchStorageEntryDto : {})
: (scratchStorageEntryDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
}
};
/**
* ScratchStorageControllerApi - functional programming interface
* @export
*/
export const ScratchStorageControllerApiFp = function(configuration?: Configuration) {
return {
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Space user by their P1 email address
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addNewScratchUser(scratchStorageUserDto: ScratchStorageUserDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageUserDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).addNewScratchUser(scratchStorageUserDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Adds a user privilege to this app\'s data
* @param {string} id Application UUID
* @param {ScratchStorageAppUserPrivDto} scratchStorageAppUserPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addUserPriv(id: string, scratchStorageAppUserPrivDto: ScratchStorageAppUserPrivDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).addUserPriv(id, scratchStorageAppUserPrivDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes all key-value pairs for a given App Id
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAllKeyValuePairsForAppId(appId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageEntryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).deleteAllKeyValuePairsForAppId(appId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes this application from the Common API registry (removes from scratch space use)
* @param {string} id Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteExistingAppEntry(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).deleteExistingAppEntry(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes a key-value pair for a given App Id
* @param {string} appId Application UUID
* @param {string} key Key name of the key-value pair to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteKeyValuePair(appId: string, key: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageEntryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).deleteKeyValuePair(appId, key, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes a scratch user
* @param {string} id Scratch User Id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteScratchUser(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageUserDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).deleteScratchUser(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edit existing scratch space app information (its name)
* @param {string} id Application UUID
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async editExistingAppEntry(id: string, scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).editExistingAppEntry(id, scratchStorageAppRegistryDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edits an existing Scratch Space user information
* @param {string} id Scratch User Id
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async editScratchUser(id: string, scratchStorageUserDto: ScratchStorageUserDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageUserDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).editScratchUser(id, scratchStorageUserDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all key-value pairs for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllKeyValuePairsForAppIdWrapped(appId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ScratchStorageEntryDtoResponseWrapper>>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getAllKeyValuePairsForAppIdWrapped(appId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requires request to be under DASHBOARD_ADMIN privileges
* @summary Retrieves all key-value pairs for all scratch space consuming apps
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllKeyValuePairsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageEntryDtoResponseWrapper>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getAllKeyValuePairsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all keys for for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllKeysForAppIdWrapped(appId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenericStringArrayResponseWrapper>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getAllKeysForAppIdWrapped(appId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Space users (ID, email...)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllUsersWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageUserDtoResponseWrapper>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getAllUsersWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* App ID is the UUID of the owning application
* @summary Retrieves a single key-value pair for for a single app
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getKeyValueByKeyName(appId: string, keyName: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageEntryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getKeyValueByKeyName(appId, keyName, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and returns the JsonPath query invoked onto that JSON structure. Returns JSON string matching the specified JSON Path
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {string} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getKeyValueByKeyNameAsJson(appId: string, keyName: string, body: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getKeyValueByKeyNameAsJson(appId, keyName, body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights or have SCRATCH_ADMIN rights for given app ID.
* @summary Gets a single Scratch Storage app\'s record that is registered with Common API
* @param {string} appId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getScratchAppById(appId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getScratchAppById(appId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Gets all the SCRATCH space privileges so that privilege names can be mapped to their IDs
* @summary Gets all SCRATCH space privileges available
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getScratchPrivsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PrivilegeDtoResponseWrapper>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getScratchPrivsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Each Scratch Storage App returned will only contain user privileges for the Authorized User. It will not contain the privileges of other users.
* @summary Gets all Scratch Storage apps that the current Authorized User is a user of
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getScratchSpaceAppsByAuthorizedUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ScratchStorageAppRegistryDto>>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getScratchSpaceAppsByAuthorizedUser(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Storage apps that are registered with Common API if requesteris a dashboard admin, otherwise returns the scratch space apps the requester is a scratch admin for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getScratchSpaceAppsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDtoResponseWrapper>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).getScratchSpaceAppsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and attempts to update a portion of it from given JSON Patch spec with provided value. Returns NO_CONTENT response on successful update.
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {ScratchValuePatchJsonDto} scratchValuePatchJsonDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async patchKeyValuePairAsJson(appId: string, keyName: string, scratchValuePatchJsonDto: ScratchValuePatchJsonDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).patchKeyValuePairAsJson(appId, keyName, scratchValuePatchJsonDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Strorage consuming app name to the Common API scratch storage space
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async postNewScratchSpaceApp(scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).postNewScratchSpaceApp(scratchStorageAppRegistryDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Removes a user privilege from this app\'s data
* @param {string} id Application UUID
* @param {string} appPrivIdEntry UUID of the User-Priv set to remove
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async removeUserPriv(id: string, appPrivIdEntry: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).removeUserPriv(id, appPrivIdEntry, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s ACL mode setting
* @param {string} id Application UUID
* @param {boolean} aclMode Value of the ACL Mode setting - true or false
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async setAclModeSetting(id: string, aclMode: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).setAclModeSetting(id, aclMode, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s implicit read field
* @param {string} id Application UUID
* @param {boolean} priv Application User-Priv Object
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async setImplicitReadSetting(id: string, priv: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageAppRegistryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).setImplicitReadSetting(id, priv, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Adds or updates a key-value pair for a given App Id
* @param {ScratchStorageEntryDto} scratchStorageEntryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async setKeyValuePair(scratchStorageEntryDto: ScratchStorageEntryDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ScratchStorageEntryDto>> {
const localVarAxiosArgs = await ScratchStorageControllerApiAxiosParamCreator(configuration).setKeyValuePair(scratchStorageEntryDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* ScratchStorageControllerApi - factory interface
* @export
*/
export const ScratchStorageControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Space user by their P1 email address
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addNewScratchUser(scratchStorageUserDto: ScratchStorageUserDto, options?: any): AxiosPromise<ScratchStorageUserDto> {
return ScratchStorageControllerApiFp(configuration).addNewScratchUser(scratchStorageUserDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Adds a user privilege to this app\'s data
* @param {string} id Application UUID
* @param {ScratchStorageAppUserPrivDto} scratchStorageAppUserPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addUserPriv(id: string, scratchStorageAppUserPrivDto: ScratchStorageAppUserPrivDto, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).addUserPriv(id, scratchStorageAppUserPrivDto, options).then((request) => request(axios, basePath));
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes all key-value pairs for a given App Id
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAllKeyValuePairsForAppId(appId: string, options?: any): AxiosPromise<ScratchStorageEntryDto> {
return ScratchStorageControllerApiFp(configuration).deleteAllKeyValuePairsForAppId(appId, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes this application from the Common API registry (removes from scratch space use)
* @param {string} id Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExistingAppEntry(id: string, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).deleteExistingAppEntry(id, options).then((request) => request(axios, basePath));
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes a key-value pair for a given App Id
* @param {string} appId Application UUID
* @param {string} key Key name of the key-value pair to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteKeyValuePair(appId: string, key: string, options?: any): AxiosPromise<ScratchStorageEntryDto> {
return ScratchStorageControllerApiFp(configuration).deleteKeyValuePair(appId, key, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes a scratch user
* @param {string} id Scratch User Id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteScratchUser(id: string, options?: any): AxiosPromise<ScratchStorageUserDto> {
return ScratchStorageControllerApiFp(configuration).deleteScratchUser(id, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edit existing scratch space app information (its name)
* @param {string} id Application UUID
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
editExistingAppEntry(id: string, scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).editExistingAppEntry(id, scratchStorageAppRegistryDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edits an existing Scratch Space user information
* @param {string} id Scratch User Id
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
editScratchUser(id: string, scratchStorageUserDto: ScratchStorageUserDto, options?: any): AxiosPromise<ScratchStorageUserDto> {
return ScratchStorageControllerApiFp(configuration).editScratchUser(id, scratchStorageUserDto, options).then((request) => request(axios, basePath));
},
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all key-value pairs for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllKeyValuePairsForAppIdWrapped(appId: string, options?: any): AxiosPromise<Array<ScratchStorageEntryDtoResponseWrapper>> {
return ScratchStorageControllerApiFp(configuration).getAllKeyValuePairsForAppIdWrapped(appId, options).then((request) => request(axios, basePath));
},
/**
* Requires request to be under DASHBOARD_ADMIN privileges
* @summary Retrieves all key-value pairs for all scratch space consuming apps
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllKeyValuePairsWrapped(options?: any): AxiosPromise<ScratchStorageEntryDtoResponseWrapper> {
return ScratchStorageControllerApiFp(configuration).getAllKeyValuePairsWrapped(options).then((request) => request(axios, basePath));
},
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all keys for for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllKeysForAppIdWrapped(appId: string, options?: any): AxiosPromise<GenericStringArrayResponseWrapper> {
return ScratchStorageControllerApiFp(configuration).getAllKeysForAppIdWrapped(appId, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Space users (ID, email...)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllUsersWrapped(options?: any): AxiosPromise<ScratchStorageUserDtoResponseWrapper> {
return ScratchStorageControllerApiFp(configuration).getAllUsersWrapped(options).then((request) => request(axios, basePath));
},
/**
* App ID is the UUID of the owning application
* @summary Retrieves a single key-value pair for for a single app
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKeyValueByKeyName(appId: string, keyName: string, options?: any): AxiosPromise<ScratchStorageEntryDto> {
return ScratchStorageControllerApiFp(configuration).getKeyValueByKeyName(appId, keyName, options).then((request) => request(axios, basePath));
},
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and returns the JsonPath query invoked onto that JSON structure. Returns JSON string matching the specified JSON Path
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {string} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getKeyValueByKeyNameAsJson(appId: string, keyName: string, body: string, options?: any): AxiosPromise<string> {
return ScratchStorageControllerApiFp(configuration).getKeyValueByKeyNameAsJson(appId, keyName, body, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights or have SCRATCH_ADMIN rights for given app ID.
* @summary Gets a single Scratch Storage app\'s record that is registered with Common API
* @param {string} appId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchAppById(appId: string, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).getScratchAppById(appId, options).then((request) => request(axios, basePath));
},
/**
* Gets all the SCRATCH space privileges so that privilege names can be mapped to their IDs
* @summary Gets all SCRATCH space privileges available
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchPrivsWrapped(options?: any): AxiosPromise<PrivilegeDtoResponseWrapper> {
return ScratchStorageControllerApiFp(configuration).getScratchPrivsWrapped(options).then((request) => request(axios, basePath));
},
/**
* Each Scratch Storage App returned will only contain user privileges for the Authorized User. It will not contain the privileges of other users.
* @summary Gets all Scratch Storage apps that the current Authorized User is a user of
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchSpaceAppsByAuthorizedUser(options?: any): AxiosPromise<Array<ScratchStorageAppRegistryDto>> {
return ScratchStorageControllerApiFp(configuration).getScratchSpaceAppsByAuthorizedUser(options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Storage apps that are registered with Common API if requesteris a dashboard admin, otherwise returns the scratch space apps the requester is a scratch admin for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getScratchSpaceAppsWrapped(options?: any): AxiosPromise<ScratchStorageAppRegistryDtoResponseWrapper> {
return ScratchStorageControllerApiFp(configuration).getScratchSpaceAppsWrapped(options).then((request) => request(axios, basePath));
},
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and attempts to update a portion of it from given JSON Patch spec with provided value. Returns NO_CONTENT response on successful update.
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {ScratchValuePatchJsonDto} scratchValuePatchJsonDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchKeyValuePairAsJson(appId: string, keyName: string, scratchValuePatchJsonDto: ScratchValuePatchJsonDto, options?: any): AxiosPromise<object> {
return ScratchStorageControllerApiFp(configuration).patchKeyValuePairAsJson(appId, keyName, scratchValuePatchJsonDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Strorage consuming app name to the Common API scratch storage space
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postNewScratchSpaceApp(scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).postNewScratchSpaceApp(scratchStorageAppRegistryDto, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Removes a user privilege from this app\'s data
* @param {string} id Application UUID
* @param {string} appPrivIdEntry UUID of the User-Priv set to remove
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeUserPriv(id: string, appPrivIdEntry: string, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).removeUserPriv(id, appPrivIdEntry, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s ACL mode setting
* @param {string} id Application UUID
* @param {boolean} aclMode Value of the ACL Mode setting - true or false
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setAclModeSetting(id: string, aclMode: boolean, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).setAclModeSetting(id, aclMode, options).then((request) => request(axios, basePath));
},
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s implicit read field
* @param {string} id Application UUID
* @param {boolean} priv Application User-Priv Object
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setImplicitReadSetting(id: string, priv: boolean, options?: any): AxiosPromise<ScratchStorageAppRegistryDto> {
return ScratchStorageControllerApiFp(configuration).setImplicitReadSetting(id, priv, options).then((request) => request(axios, basePath));
},
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Adds or updates a key-value pair for a given App Id
* @param {ScratchStorageEntryDto} scratchStorageEntryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setKeyValuePair(scratchStorageEntryDto: ScratchStorageEntryDto, options?: any): AxiosPromise<ScratchStorageEntryDto> {
return ScratchStorageControllerApiFp(configuration).setKeyValuePair(scratchStorageEntryDto, options).then((request) => request(axios, basePath));
},
};
};
/**
* ScratchStorageControllerApi - interface
* @export
* @interface ScratchStorageControllerApi
*/
export interface ScratchStorageControllerApiInterface {
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Space user by their P1 email address
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
addNewScratchUser(scratchStorageUserDto: ScratchStorageUserDto, options?: any): AxiosPromise<ScratchStorageUserDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Adds a user privilege to this app\'s data
* @param {string} id Application UUID
* @param {ScratchStorageAppUserPrivDto} scratchStorageAppUserPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
addUserPriv(id: string, scratchStorageAppUserPrivDto: ScratchStorageAppUserPrivDto, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes all key-value pairs for a given App Id
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
deleteAllKeyValuePairsForAppId(appId: string, options?: any): AxiosPromise<ScratchStorageEntryDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes this application from the Common API registry (removes from scratch space use)
* @param {string} id Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
deleteExistingAppEntry(id: string, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes a key-value pair for a given App Id
* @param {string} appId Application UUID
* @param {string} key Key name of the key-value pair to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
deleteKeyValuePair(appId: string, key: string, options?: any): AxiosPromise<ScratchStorageEntryDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes a scratch user
* @param {string} id Scratch User Id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
deleteScratchUser(id: string, options?: any): AxiosPromise<ScratchStorageUserDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edit existing scratch space app information (its name)
* @param {string} id Application UUID
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
editExistingAppEntry(id: string, scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edits an existing Scratch Space user information
* @param {string} id Scratch User Id
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
editScratchUser(id: string, scratchStorageUserDto: ScratchStorageUserDto, options?: any): AxiosPromise<ScratchStorageUserDto>;
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all key-value pairs for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getAllKeyValuePairsForAppIdWrapped(appId: string, options?: any): AxiosPromise<Array<ScratchStorageEntryDtoResponseWrapper>>;
/**
* Requires request to be under DASHBOARD_ADMIN privileges
* @summary Retrieves all key-value pairs for all scratch space consuming apps
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getAllKeyValuePairsWrapped(options?: any): AxiosPromise<ScratchStorageEntryDtoResponseWrapper>;
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all keys for for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getAllKeysForAppIdWrapped(appId: string, options?: any): AxiosPromise<GenericStringArrayResponseWrapper>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Space users (ID, email...)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getAllUsersWrapped(options?: any): AxiosPromise<ScratchStorageUserDtoResponseWrapper>;
/**
* App ID is the UUID of the owning application
* @summary Retrieves a single key-value pair for for a single app
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getKeyValueByKeyName(appId: string, keyName: string, options?: any): AxiosPromise<ScratchStorageEntryDto>;
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and returns the JsonPath query invoked onto that JSON structure. Returns JSON string matching the specified JSON Path
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {string} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getKeyValueByKeyNameAsJson(appId: string, keyName: string, body: string, options?: any): AxiosPromise<string>;
/**
* Requester has to have DASHBOARD_ADMIN rights or have SCRATCH_ADMIN rights for given app ID.
* @summary Gets a single Scratch Storage app\'s record that is registered with Common API
* @param {string} appId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getScratchAppById(appId: string, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* Gets all the SCRATCH space privileges so that privilege names can be mapped to their IDs
* @summary Gets all SCRATCH space privileges available
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getScratchPrivsWrapped(options?: any): AxiosPromise<PrivilegeDtoResponseWrapper>;
/**
* Each Scratch Storage App returned will only contain user privileges for the Authorized User. It will not contain the privileges of other users.
* @summary Gets all Scratch Storage apps that the current Authorized User is a user of
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getScratchSpaceAppsByAuthorizedUser(options?: any): AxiosPromise<Array<ScratchStorageAppRegistryDto>>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Storage apps that are registered with Common API if requesteris a dashboard admin, otherwise returns the scratch space apps the requester is a scratch admin for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
getScratchSpaceAppsWrapped(options?: any): AxiosPromise<ScratchStorageAppRegistryDtoResponseWrapper>;
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and attempts to update a portion of it from given JSON Patch spec with provided value. Returns NO_CONTENT response on successful update.
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {ScratchValuePatchJsonDto} scratchValuePatchJsonDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
patchKeyValuePairAsJson(appId: string, keyName: string, scratchValuePatchJsonDto: ScratchValuePatchJsonDto, options?: any): AxiosPromise<object>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Strorage consuming app name to the Common API scratch storage space
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
postNewScratchSpaceApp(scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Removes a user privilege from this app\'s data
* @param {string} id Application UUID
* @param {string} appPrivIdEntry UUID of the User-Priv set to remove
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
removeUserPriv(id: string, appPrivIdEntry: string, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s ACL mode setting
* @param {string} id Application UUID
* @param {boolean} aclMode Value of the ACL Mode setting - true or false
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
setAclModeSetting(id: string, aclMode: boolean, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s implicit read field
* @param {string} id Application UUID
* @param {boolean} priv Application User-Priv Object
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
setImplicitReadSetting(id: string, priv: boolean, options?: any): AxiosPromise<ScratchStorageAppRegistryDto>;
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Adds or updates a key-value pair for a given App Id
* @param {ScratchStorageEntryDto} scratchStorageEntryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApiInterface
*/
setKeyValuePair(scratchStorageEntryDto: ScratchStorageEntryDto, options?: any): AxiosPromise<ScratchStorageEntryDto>;
}
/**
* ScratchStorageControllerApi - object-oriented interface
* @export
* @class ScratchStorageControllerApi
* @extends {BaseAPI}
*/
export class ScratchStorageControllerApi extends BaseAPI implements ScratchStorageControllerApiInterface {
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Space user by their P1 email address
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public addNewScratchUser(scratchStorageUserDto: ScratchStorageUserDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).addNewScratchUser(scratchStorageUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Adds a user privilege to this app\'s data
* @param {string} id Application UUID
* @param {ScratchStorageAppUserPrivDto} scratchStorageAppUserPrivDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public addUserPriv(id: string, scratchStorageAppUserPrivDto: ScratchStorageAppUserPrivDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).addUserPriv(id, scratchStorageAppUserPrivDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes all key-value pairs for a given App Id
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public deleteAllKeyValuePairsForAppId(appId: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).deleteAllKeyValuePairsForAppId(appId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes this application from the Common API registry (removes from scratch space use)
* @param {string} id Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public deleteExistingAppEntry(id: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).deleteExistingAppEntry(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Deletes a key-value pair for a given App Id
* @param {string} appId Application UUID
* @param {string} key Key name of the key-value pair to delete
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public deleteKeyValuePair(appId: string, key: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).deleteKeyValuePair(appId, key, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Deletes a scratch user
* @param {string} id Scratch User Id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public deleteScratchUser(id: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).deleteScratchUser(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edit existing scratch space app information (its name)
* @param {string} id Application UUID
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public editExistingAppEntry(id: string, scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).editExistingAppEntry(id, scratchStorageAppRegistryDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Edits an existing Scratch Space user information
* @param {string} id Scratch User Id
* @param {ScratchStorageUserDto} scratchStorageUserDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public editScratchUser(id: string, scratchStorageUserDto: ScratchStorageUserDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).editScratchUser(id, scratchStorageUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all key-value pairs for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getAllKeyValuePairsForAppIdWrapped(appId: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getAllKeyValuePairsForAppIdWrapped(appId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requires request to be under DASHBOARD_ADMIN privileges
* @summary Retrieves all key-value pairs for all scratch space consuming apps
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getAllKeyValuePairsWrapped(options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getAllKeyValuePairsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* App ID is the UUID of the owning application. Note if app is in ACL mode, then this endpointwill not work unless requester is a SCRATCH_ADMIN - since ACL mode restricts read/write on a key bykey basis
* @summary Retrieves all keys for for a single app
* @param {string} appId Application UUID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getAllKeysForAppIdWrapped(appId: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getAllKeysForAppIdWrapped(appId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Space users (ID, email...)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getAllUsersWrapped(options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getAllUsersWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* App ID is the UUID of the owning application
* @summary Retrieves a single key-value pair for for a single app
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getKeyValueByKeyName(appId: string, keyName: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getKeyValueByKeyName(appId, keyName, options).then((request) => request(this.axios, this.basePath));
}
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and returns the JsonPath query invoked onto that JSON structure. Returns JSON string matching the specified JSON Path
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {string} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getKeyValueByKeyNameAsJson(appId: string, keyName: string, body: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getKeyValueByKeyNameAsJson(appId, keyName, body, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights or have SCRATCH_ADMIN rights for given app ID.
* @summary Gets a single Scratch Storage app\'s record that is registered with Common API
* @param {string} appId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getScratchAppById(appId: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getScratchAppById(appId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Gets all the SCRATCH space privileges so that privilege names can be mapped to their IDs
* @summary Gets all SCRATCH space privileges available
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getScratchPrivsWrapped(options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getScratchPrivsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* Each Scratch Storage App returned will only contain user privileges for the Authorized User. It will not contain the privileges of other users.
* @summary Gets all Scratch Storage apps that the current Authorized User is a user of
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getScratchSpaceAppsByAuthorizedUser(options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getScratchSpaceAppsByAuthorizedUser(options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Gets the entire table of Scratch Storage apps that are registered with Common API if requesteris a dashboard admin, otherwise returns the scratch space apps the requester is a scratch admin for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public getScratchSpaceAppsWrapped(options?: any) {
return ScratchStorageControllerApiFp(this.configuration).getScratchSpaceAppsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* App ID is the UUID of the owning application
* @summary Treats the key\'s value as JSON and attempts to update a portion of it from given JSON Patch spec with provided value. Returns NO_CONTENT response on successful update.
* @param {string} appId Application UUID
* @param {string} keyName Key Name to look up
* @param {ScratchValuePatchJsonDto} scratchValuePatchJsonDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public patchKeyValuePairAsJson(appId: string, keyName: string, scratchValuePatchJsonDto: ScratchValuePatchJsonDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).patchKeyValuePairAsJson(appId, keyName, scratchValuePatchJsonDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Adds a new Scratch Strorage consuming app name to the Common API scratch storage space
* @param {ScratchStorageAppRegistryDto} scratchStorageAppRegistryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public postNewScratchSpaceApp(scratchStorageAppRegistryDto: ScratchStorageAppRegistryDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).postNewScratchSpaceApp(scratchStorageAppRegistryDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights
* @summary Removes a user privilege from this app\'s data
* @param {string} id Application UUID
* @param {string} appPrivIdEntry UUID of the User-Priv set to remove
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public removeUserPriv(id: string, appPrivIdEntry: string, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).removeUserPriv(id, appPrivIdEntry, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s ACL mode setting
* @param {string} id Application UUID
* @param {boolean} aclMode Value of the ACL Mode setting - true or false
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public setAclModeSetting(id: string, aclMode: boolean, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).setAclModeSetting(id, aclMode, options).then((request) => request(this.axios, this.basePath));
}
/**
* Requester has to have DASHBOARD_ADMIN rights, or have SCRATCH_ADMIN rights for given app ID
* @summary Sets or un-sets the app\'s implicit read field
* @param {string} id Application UUID
* @param {boolean} priv Application User-Priv Object
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public setImplicitReadSetting(id: string, priv: boolean, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).setImplicitReadSetting(id, priv, options).then((request) => request(this.axios, this.basePath));
}
/**
* SCRATCH_WRITE privileges are required for the requester for the given App Id
* @summary Adds or updates a key-value pair for a given App Id
* @param {ScratchStorageEntryDto} scratchStorageEntryDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScratchStorageControllerApi
*/
public setKeyValuePair(scratchStorageEntryDto: ScratchStorageEntryDto, options?: any) {
return ScratchStorageControllerApiFp(this.configuration).setKeyValuePair(scratchStorageEntryDto, options).then((request) => request(this.axios, this.basePath));
}
}
/* 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 { EventInfoDto } from '../models';
// @ts-ignore
import { EventInfoDtoResponseWrapper } from '../models';
// @ts-ignore
import { ExceptionResponse } from '../models';
// @ts-ignore
import { PubSubLedgerEntryDtoResponseWrapper } from '../models';
// @ts-ignore
import { SubscriberDto } from '../models';
// @ts-ignore
import { SubscriberDtoResponseWrapper } from '../models';
/**
* SubscriberControllerApi - axios parameter creator
* @export
*/
export const SubscriberControllerApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Deletes a subscription by its UUID
* @summary Deletes a subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelSubscription: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling cancelSubscription.');
}
const localVarPath = `/v2/subscriptions/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'DELETE', ...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,
};
},
/**
* Adds a new subscription, or updates an existing subscription
* @summary Adds/updates a subscription
* @param {SubscriberDto} subscriberDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSubscription: async (subscriberDto: SubscriberDto, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'subscriberDto' is not null or undefined
if (subscriberDto === null || subscriberDto === undefined) {
throw new RequiredError('subscriberDto','Required parameter subscriberDto was null or undefined when calling createSubscription.');
}
const localVarPath = `/v2/subscriptions`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof subscriberDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(subscriberDto !== undefined ? subscriberDto : {})
: (subscriberDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Retrieves all subscriptions
* @summary Retrieves all registered subscriptions
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllSubscriptionsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/subscriptions`;
// 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,
};
},
/**
* Date/time needs to be in zulu time with format yyyy-MM-ddTHH:mm:ss
* @summary Retrieves all ledger entries from specified date/time regardless of event type
* @param {string} [sinceDateTime]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEventSinceDateWrapped: async (sinceDateTime?: string, options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/subscriptions/events/replay`;
// 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 (sinceDateTime !== undefined) {
localVarQueryParameter['sinceDateTime'] = sinceDateTime;
}
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,
};
},
/**
* Simply provide a list of type EventInfoDto containing the event types and the LAST event count received for that event. The returned list will contain, as its start point, the point in time at which the oldest of those event types(s)/event count(s) occurred at - the remainder of that list will be event entries containing only events specified in the request body. Note the event count(s) provided should be equal to the actual count received from Common. This endpoint will know to return events from that count + 1.
* @summary Retrieves all ledger entries from specified event count(s) and event types(s)
* @param {Array<EventInfoDto>} eventInfoDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEventsSinceCountAndTypeWrapped: async (eventInfoDto: Array<EventInfoDto>, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'eventInfoDto' is not null or undefined
if (eventInfoDto === null || eventInfoDto === undefined) {
throw new RequiredError('eventInfoDto','Required parameter eventInfoDto was null or undefined when calling getEventsSinceCountAndTypeWrapped.');
}
const localVarPath = `/v2/subscriptions/events/replay-events`;
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const nonString = typeof eventInfoDto !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(localVarRequestOptions.headers['Content-Type'])
: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify(eventInfoDto !== undefined ? eventInfoDto : {})
: (eventInfoDto || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Retrieves latest counts for each event type in a key-value pair object
* @summary Retrieves most current counts for each event type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLatestCountsWrapped: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/v2/subscriptions/events/latest`;
// 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,
};
},
/**
* Retrieve a subscription by its UUID
* @summary Retrieves a registered subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSubscription: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling getSubscription.');
}
const localVarPath = `/v2/subscriptions/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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,
};
},
}
};
/**
* SubscriberControllerApi - functional programming interface
* @export
*/
export const SubscriberControllerApiFp = function(configuration?: Configuration) {
return {
/**
* Deletes a subscription by its UUID
* @summary Deletes a subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async cancelSubscription(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberDto>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).cancelSubscription(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Adds a new subscription, or updates an existing subscription
* @summary Adds/updates a subscription
* @param {SubscriberDto} subscriberDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createSubscription(subscriberDto: SubscriberDto, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberDto>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).createSubscription(subscriberDto, 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 subscriptions
* @summary Retrieves all registered subscriptions
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllSubscriptionsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberDtoResponseWrapper>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).getAllSubscriptionsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Date/time needs to be in zulu time with format yyyy-MM-ddTHH:mm:ss
* @summary Retrieves all ledger entries from specified date/time regardless of event type
* @param {string} [sinceDateTime]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEventSinceDateWrapped(sinceDateTime?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PubSubLedgerEntryDtoResponseWrapper>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).getEventSinceDateWrapped(sinceDateTime, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Simply provide a list of type EventInfoDto containing the event types and the LAST event count received for that event. The returned list will contain, as its start point, the point in time at which the oldest of those event types(s)/event count(s) occurred at - the remainder of that list will be event entries containing only events specified in the request body. Note the event count(s) provided should be equal to the actual count received from Common. This endpoint will know to return events from that count + 1.
* @summary Retrieves all ledger entries from specified event count(s) and event types(s)
* @param {Array<EventInfoDto>} eventInfoDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEventsSinceCountAndTypeWrapped(eventInfoDto: Array<EventInfoDto>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PubSubLedgerEntryDtoResponseWrapper>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).getEventsSinceCountAndTypeWrapped(eventInfoDto, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Retrieves latest counts for each event type in a key-value pair object
* @summary Retrieves most current counts for each event type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getLatestCountsWrapped(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventInfoDtoResponseWrapper>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).getLatestCountsWrapped(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Retrieve a subscription by its UUID
* @summary Retrieves a registered subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getSubscription(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberDto>> {
const localVarAxiosArgs = await SubscriberControllerApiAxiosParamCreator(configuration).getSubscription(id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* SubscriberControllerApi - factory interface
* @export
*/
export const SubscriberControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
* Deletes a subscription by its UUID
* @summary Deletes a subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelSubscription(id: string, options?: any): AxiosPromise<SubscriberDto> {
return SubscriberControllerApiFp(configuration).cancelSubscription(id, options).then((request) => request(axios, basePath));
},
/**
* Adds a new subscription, or updates an existing subscription
* @summary Adds/updates a subscription
* @param {SubscriberDto} subscriberDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSubscription(subscriberDto: SubscriberDto, options?: any): AxiosPromise<SubscriberDto> {
return SubscriberControllerApiFp(configuration).createSubscription(subscriberDto, options).then((request) => request(axios, basePath));
},
/**
* Retrieves all subscriptions
* @summary Retrieves all registered subscriptions
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllSubscriptionsWrapped(options?: any): AxiosPromise<SubscriberDtoResponseWrapper> {
return SubscriberControllerApiFp(configuration).getAllSubscriptionsWrapped(options).then((request) => request(axios, basePath));
},
/**
* Date/time needs to be in zulu time with format yyyy-MM-ddTHH:mm:ss
* @summary Retrieves all ledger entries from specified date/time regardless of event type
* @param {string} [sinceDateTime]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEventSinceDateWrapped(sinceDateTime?: string, options?: any): AxiosPromise<PubSubLedgerEntryDtoResponseWrapper> {
return SubscriberControllerApiFp(configuration).getEventSinceDateWrapped(sinceDateTime, options).then((request) => request(axios, basePath));
},
/**
* Simply provide a list of type EventInfoDto containing the event types and the LAST event count received for that event. The returned list will contain, as its start point, the point in time at which the oldest of those event types(s)/event count(s) occurred at - the remainder of that list will be event entries containing only events specified in the request body. Note the event count(s) provided should be equal to the actual count received from Common. This endpoint will know to return events from that count + 1.
* @summary Retrieves all ledger entries from specified event count(s) and event types(s)
* @param {Array<EventInfoDto>} eventInfoDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEventsSinceCountAndTypeWrapped(eventInfoDto: Array<EventInfoDto>, options?: any): AxiosPromise<PubSubLedgerEntryDtoResponseWrapper> {
return SubscriberControllerApiFp(configuration).getEventsSinceCountAndTypeWrapped(eventInfoDto, options).then((request) => request(axios, basePath));
},
/**
* Retrieves latest counts for each event type in a key-value pair object
* @summary Retrieves most current counts for each event type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLatestCountsWrapped(options?: any): AxiosPromise<EventInfoDtoResponseWrapper> {
return SubscriberControllerApiFp(configuration).getLatestCountsWrapped(options).then((request) => request(axios, basePath));
},
/**
* Retrieve a subscription by its UUID
* @summary Retrieves a registered subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSubscription(id: string, options?: any): AxiosPromise<SubscriberDto> {
return SubscriberControllerApiFp(configuration).getSubscription(id, options).then((request) => request(axios, basePath));
},
};
};
/**
* SubscriberControllerApi - interface
* @export
* @interface SubscriberControllerApi
*/
export interface SubscriberControllerApiInterface {
/**
* Deletes a subscription by its UUID
* @summary Deletes a subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
cancelSubscription(id: string, options?: any): AxiosPromise<SubscriberDto>;
/**
* Adds a new subscription, or updates an existing subscription
* @summary Adds/updates a subscription
* @param {SubscriberDto} subscriberDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
createSubscription(subscriberDto: SubscriberDto, options?: any): AxiosPromise<SubscriberDto>;
/**
* Retrieves all subscriptions
* @summary Retrieves all registered subscriptions
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
getAllSubscriptionsWrapped(options?: any): AxiosPromise<SubscriberDtoResponseWrapper>;
/**
* Date/time needs to be in zulu time with format yyyy-MM-ddTHH:mm:ss
* @summary Retrieves all ledger entries from specified date/time regardless of event type
* @param {string} [sinceDateTime]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
getEventSinceDateWrapped(sinceDateTime?: string, options?: any): AxiosPromise<PubSubLedgerEntryDtoResponseWrapper>;
/**
* Simply provide a list of type EventInfoDto containing the event types and the LAST event count received for that event. The returned list will contain, as its start point, the point in time at which the oldest of those event types(s)/event count(s) occurred at - the remainder of that list will be event entries containing only events specified in the request body. Note the event count(s) provided should be equal to the actual count received from Common. This endpoint will know to return events from that count + 1.
* @summary Retrieves all ledger entries from specified event count(s) and event types(s)
* @param {Array<EventInfoDto>} eventInfoDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
getEventsSinceCountAndTypeWrapped(eventInfoDto: Array<EventInfoDto>, options?: any): AxiosPromise<PubSubLedgerEntryDtoResponseWrapper>;
/**
* Retrieves latest counts for each event type in a key-value pair object
* @summary Retrieves most current counts for each event type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
getLatestCountsWrapped(options?: any): AxiosPromise<EventInfoDtoResponseWrapper>;
/**
* Retrieve a subscription by its UUID
* @summary Retrieves a registered subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApiInterface
*/
getSubscription(id: string, options?: any): AxiosPromise<SubscriberDto>;
}
/**
* SubscriberControllerApi - object-oriented interface
* @export
* @class SubscriberControllerApi
* @extends {BaseAPI}
*/
export class SubscriberControllerApi extends BaseAPI implements SubscriberControllerApiInterface {
/**
* Deletes a subscription by its UUID
* @summary Deletes a subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public cancelSubscription(id: string, options?: any) {
return SubscriberControllerApiFp(this.configuration).cancelSubscription(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Adds a new subscription, or updates an existing subscription
* @summary Adds/updates a subscription
* @param {SubscriberDto} subscriberDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public createSubscription(subscriberDto: SubscriberDto, options?: any) {
return SubscriberControllerApiFp(this.configuration).createSubscription(subscriberDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves all subscriptions
* @summary Retrieves all registered subscriptions
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public getAllSubscriptionsWrapped(options?: any) {
return SubscriberControllerApiFp(this.configuration).getAllSubscriptionsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* Date/time needs to be in zulu time with format yyyy-MM-ddTHH:mm:ss
* @summary Retrieves all ledger entries from specified date/time regardless of event type
* @param {string} [sinceDateTime]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public getEventSinceDateWrapped(sinceDateTime?: string, options?: any) {
return SubscriberControllerApiFp(this.configuration).getEventSinceDateWrapped(sinceDateTime, options).then((request) => request(this.axios, this.basePath));
}
/**
* Simply provide a list of type EventInfoDto containing the event types and the LAST event count received for that event. The returned list will contain, as its start point, the point in time at which the oldest of those event types(s)/event count(s) occurred at - the remainder of that list will be event entries containing only events specified in the request body. Note the event count(s) provided should be equal to the actual count received from Common. This endpoint will know to return events from that count + 1.
* @summary Retrieves all ledger entries from specified event count(s) and event types(s)
* @param {Array<EventInfoDto>} eventInfoDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public getEventsSinceCountAndTypeWrapped(eventInfoDto: Array<EventInfoDto>, options?: any) {
return SubscriberControllerApiFp(this.configuration).getEventsSinceCountAndTypeWrapped(eventInfoDto, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves latest counts for each event type in a key-value pair object
* @summary Retrieves most current counts for each event type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public getLatestCountsWrapped(options?: any) {
return SubscriberControllerApiFp(this.configuration).getLatestCountsWrapped(options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieve a subscription by its UUID
* @summary Retrieves a registered subscription
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SubscriberControllerApi
*/
public getSubscription(id: string, options?: any) {
return SubscriberControllerApiFp(this.configuration).getSubscription(id, options).then((request) => request(this.axios, this.basePath));
}
}
/* 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