Skip to content

Commit

Permalink
chore: update generated API
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed May 15, 2024
1 parent c693ad4 commit 0993b9e
Show file tree
Hide file tree
Showing 47 changed files with 397 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ACLOwnerPanel = ({
<div className='flex items-center'>
Others:
<ACLSelect
value={acl.others || AccessLevel.NONE}
value={acl.others || AccessLevel.None}
handleChange={(newValue: AccessLevel) =>
handleChange({ others: newValue })
}
Expand Down
4 changes: 3 additions & 1 deletion packages/dm-core/src/components/AccessControl/ACLSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const ACLSelect = ({
width={'120px'}
value={value}
onChange={(event: React.ChangeEvent<HTMLSelectElement>) => {
handleChange(AccessLevel[event.target.value as AccessLevel])
handleChange(
AccessLevel[event.target.value as keyof typeof AccessLevel]
)
}}
>
{Object.keys(AccessLevel).map((accessLevelKey) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const ACLUserRolesPanel = ({
<Button
onClick={() =>
handleChange({
[aclKey]: { ...roles, [newRole]: AccessLevel.NONE },
[aclKey]: { ...roles, [newRole]: AccessLevel.None },
})
}
disabled={!newRole}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const AccessControlListComponent = (props: {
owner: '',
roles: {},
users: {},
others: AccessLevel.READ,
others: AccessLevel.Read,
})

const convertACLFromUserIdToUsername = async (
Expand Down
9 changes: 4 additions & 5 deletions packages/dm-core/src/hooks/useDataSources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ import { useEffect, useState } from 'react'
import DmssAPI from 'src/services/api/DmssAPI'

import { AxiosError, AxiosResponse } from 'axios'
import { ErrorResponse } from 'src/services'
import { TDataSource } from 'src/types'
import { DataSourceInformation, ErrorResponse } from 'src/services'

export const useDataSources = (dmssAPI: DmssAPI): TDataSource[] => {
const [dataSources, setDataSources] = useState<TDataSource[]>([])
export const useDataSources = (dmssAPI: DmssAPI): DataSourceInformation[] => {
const [dataSources, setDataSources] = useState<DataSourceInformation[]>([])

useEffect(() => {
dmssAPI
.dataSourceGetAll()
.then((response: AxiosResponse<TDataSource[]>) =>
.then((response: AxiosResponse<DataSourceInformation[]>) =>
setDataSources(response.data)
)
.catch((error: AxiosError<ErrorResponse>) => console.error(error))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ models/export-meta-response.ts
models/get-attribute-response.ts
models/get-blueprint-response.ts
models/index.ts
models/initialuirecipes.ts
models/lookup.ts
models/patdata.ts
models/recipe-attribute.ts
models/recipe.ts
models/repository-type.ts
models/repository.ts
models/storage-attribute.ts
models/storage-data-types.ts
Expand Down
2 changes: 1 addition & 1 deletion packages/dm-core/src/services/api/configs/gen/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Data Modelling Storage Service
* API for basic data modelling interaction
*
* The version of the OpenAPI document: 1.14.0
* The version of the OpenAPI document: 1.26.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Data Modelling Storage Service
* API for basic data modelling interaction
*
* The version of the OpenAPI document: 1.14.0
* The version of the OpenAPI document: 1.26.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Data Modelling Storage Service
* API for basic data modelling interaction
*
* The version of the OpenAPI document: 1.14.0
* The version of the OpenAPI document: 1.26.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Data Modelling Storage Service
* API for basic data modelling interaction
*
* The version of the OpenAPI document: 1.14.0
* The version of the OpenAPI document: 1.26.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Data Modelling Storage Service
* API for basic data modelling interaction
*
* The version of the OpenAPI document: 1.14.0
* The version of the OpenAPI document: 1.26.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -35,11 +35,11 @@ export const BlueprintApiAxiosParamCreator = function (configuration?: Configura
* Get a Blueprint and all Ui- and StorageRecipes connected to it, given a Blueprint address. Args: - type_ref (str): The address of the blueprint. - Example: PROTOCOL://<DATA-SOURCE>/<PACKAGE>/<FOLDER>/<NAME> - context (str): Optional name of application that has Ui-/StorageRecipe lookup table. - user (User): The authenticated user accessing the endpoint, automatically generated from provided bearer token or Access-Key. Returns: - GetBlueprintResponse: An object containing the blueprint, a list of all UI- recipes and a list of all StorageRecipes.
* @summary Get Blueprint
* @param {string} typeRef
* @param {string} [context]
* @param {string | null} [context]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
blueprintGet: async (typeRef: string, context?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
blueprintGet: async (typeRef: string, context?: string | null, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'typeRef' is not null or undefined
assertParamExists('blueprintGet', 'typeRef', typeRef)
const localVarPath = `/api/blueprint/{type_ref}`
Expand Down Expand Up @@ -132,11 +132,11 @@ export const BlueprintApiFp = function(configuration?: Configuration) {
* Get a Blueprint and all Ui- and StorageRecipes connected to it, given a Blueprint address. Args: - type_ref (str): The address of the blueprint. - Example: PROTOCOL://<DATA-SOURCE>/<PACKAGE>/<FOLDER>/<NAME> - context (str): Optional name of application that has Ui-/StorageRecipe lookup table. - user (User): The authenticated user accessing the endpoint, automatically generated from provided bearer token or Access-Key. Returns: - GetBlueprintResponse: An object containing the blueprint, a list of all UI- recipes and a list of all StorageRecipes.
* @summary Get Blueprint
* @param {string} typeRef
* @param {string} [context]
* @param {string | null} [context]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async blueprintGet(typeRef: string, context?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBlueprintResponse>> {
async blueprintGet(typeRef: string, context?: string | null, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBlueprintResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.blueprintGet(typeRef, context, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['BlueprintApi.blueprintGet']?.[index]?.url;
Expand Down Expand Up @@ -206,7 +206,7 @@ export interface BlueprintApiBlueprintGetRequest {
* @type {string}
* @memberof BlueprintApiBlueprintGet
*/
readonly context?: string
readonly context?: string | null
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Data Modelling Storage Service
* API for basic data modelling interaction
*
* The version of the OpenAPI document: 1.14.0
* The version of the OpenAPI document: 1.26.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit 0993b9e

Please sign in to comment.