diff --git a/package.json b/package.json index 648b433..233942a 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "test:integration": "playwright test", "test:unit": "vitest", "openapi": "openapi-generator-cli", - "openapi:identity": "openapi-generator-cli generate -g typescript-fetch --generate-alias-as-model --global-property skipFormModel=false -i https://raw.githubusercontent.com/unikorn-cloud/identity/main/openapi/server.spec.yaml -o src/lib/openapi/identity", - "openapi:server": "openapi-generator-cli generate -g typescript-fetch --generate-alias-as-model -i https://raw.githubusercontent.com/unikorn-cloud/unikorn/main/pkg/server/openapi/server.spec.yaml -o src/lib/openapi/server" + "openapi:identity": "openapi-generator-cli generate -g typescript-fetch --generate-alias-as-model --global-property skipFormModel=false -i https://raw.githubusercontent.com/unikorn-cloud/identity/main/pkg/openapi/server.spec.yaml -o src/lib/openapi/identity", + "openapi:server": "openapi-generator-cli generate -g typescript-fetch --generate-alias-as-model -i https://raw.githubusercontent.com/unikorn-cloud/unikorn/main/pkg/openapi/server.spec.yaml -o src/lib/openapi/server" }, "devDependencies": { "@playwright/test": "^1.28.1", diff --git a/src/lib/StatusIcon.svelte b/src/lib/StatusIcon.svelte index 83b78d7..a95259c 100644 --- a/src/lib/StatusIcon.svelte +++ b/src/lib/StatusIcon.svelte @@ -1,19 +1,19 @@ +
+
+ + {metadata.name} + {#if metadata.description} + {metadata.description} + {/if} +
+
diff --git a/src/lib/openapi/identity/.openapi-generator/FILES b/src/lib/openapi/identity/.openapi-generator/FILES index 20949cb..c796c7e 100644 --- a/src/lib/openapi/identity/.openapi-generator/FILES +++ b/src/lib/openapi/identity/.openapi-generator/FILES @@ -11,31 +11,43 @@ models/AvailableGroups.ts models/Claim.ts models/CodeChallengeMethod.ts models/GrantType.ts -models/Group.ts models/GroupIDs.ts +models/GroupRead.ts +models/GroupSpec.ts +models/GroupWrite.ts models/Groups.ts models/JsonWebKey.ts models/JsonWebKeySet.ts models/LoginRequestOptions.ts models/Oauth2Error.ts -models/Oauth2Provider.ts -models/Oauth2ProviderCreate.ts +models/Oauth2ProviderRead.ts +models/Oauth2ProviderSpec.ts models/Oauth2ProviderType.ts +models/Oauth2ProviderWrite.ts models/Oauth2Providers.ts models/OpenidConfiguration.ts -models/Organization.ts +models/OrganizationRead.ts +models/OrganizationScopedResourceReadMetadata.ts +models/OrganizationSpec.ts models/OrganizationType.ts +models/OrganizationWrite.ts models/Organizations.ts -models/Project.ts -models/ProjectMetadata.ts +models/ProjectRead.ts models/ProjectSpec.ts +models/ProjectWrite.ts models/Projects.ts models/ProviderGroupList.ts models/ProviderScope.ts +models/ResourceMetadata.ts +models/ResourceProvisioningStatus.ts +models/ResourceReadMetadata.ts +models/ResourceWriteMetadata.ts models/ResponseType.ts models/RoleList.ts models/Scope.ts models/SigningAlgorithm.ts +models/SystemOauth2ProviderRead.ts +models/SystemOauth2Providers.ts models/Token.ts models/TokenRequestOptions.ts models/UserList.ts diff --git a/src/lib/openapi/identity/apis/DefaultApi.ts b/src/lib/openapi/identity/apis/DefaultApi.ts index 6fc17eb..fe2b25f 100644 --- a/src/lib/openapi/identity/apis/DefaultApi.ts +++ b/src/lib/openapi/identity/apis/DefaultApi.ts @@ -17,18 +17,20 @@ import * as runtime from '../runtime'; import type { Acl, AvailableGroups, - Group, + GroupRead, + GroupWrite, Groups, JsonWebKeySet, LoginRequestOptions, Oauth2Error, - Oauth2ProviderCreate, + Oauth2ProviderWrite, Oauth2Providers, OpenidConfiguration, - Organization, + OrganizationRead, + OrganizationWrite, Organizations, - Project, - ProjectSpec, + ProjectRead, + ProjectWrite, Projects, RoleList, Token, @@ -39,8 +41,10 @@ import { AclToJSON, AvailableGroupsFromJSON, AvailableGroupsToJSON, - GroupFromJSON, - GroupToJSON, + GroupReadFromJSON, + GroupReadToJSON, + GroupWriteFromJSON, + GroupWriteToJSON, GroupsFromJSON, GroupsToJSON, JsonWebKeySetFromJSON, @@ -49,20 +53,22 @@ import { LoginRequestOptionsToJSON, Oauth2ErrorFromJSON, Oauth2ErrorToJSON, - Oauth2ProviderCreateFromJSON, - Oauth2ProviderCreateToJSON, + Oauth2ProviderWriteFromJSON, + Oauth2ProviderWriteToJSON, Oauth2ProvidersFromJSON, Oauth2ProvidersToJSON, OpenidConfigurationFromJSON, OpenidConfigurationToJSON, - OrganizationFromJSON, - OrganizationToJSON, + OrganizationReadFromJSON, + OrganizationReadToJSON, + OrganizationWriteFromJSON, + OrganizationWriteToJSON, OrganizationsFromJSON, OrganizationsToJSON, - ProjectFromJSON, - ProjectToJSON, - ProjectSpecFromJSON, - ProjectSpecToJSON, + ProjectReadFromJSON, + ProjectReadToJSON, + ProjectWriteFromJSON, + ProjectWriteToJSON, ProjectsFromJSON, ProjectsToJSON, RoleListFromJSON, @@ -73,99 +79,99 @@ import { TokenRequestOptionsToJSON, } from '../models/index'; -export interface ApiV1OrganizationsOrganizationAclGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDAclGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationAvailableGroupsGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDAvailableGroupsGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationGroupsGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDGroupsGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationGroupsGroupidDeleteRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDGroupsGroupidDeleteRequest { + organizationID: string; groupid: string; } -export interface ApiV1OrganizationsOrganizationGroupsGroupidGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDGroupsGroupidGetRequest { + organizationID: string; groupid: string; } -export interface ApiV1OrganizationsOrganizationGroupsGroupidPutRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDGroupsGroupidPutRequest { + organizationID: string; groupid: string; - group: Group; + groupWrite: GroupWrite; } -export interface ApiV1OrganizationsOrganizationGroupsPostRequest { - organization: string; - group: Group; +export interface ApiV1OrganizationsOrganizationIDGroupsPostRequest { + organizationID: string; + groupWrite: GroupWrite; } -export interface ApiV1OrganizationsOrganizationOauth2providersGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDOauth2providersGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationOauth2providersPostRequest { - organization: string; - oauth2ProviderCreate: Oauth2ProviderCreate; +export interface ApiV1OrganizationsOrganizationIDOauth2providersPostRequest { + organizationID: string; + oauth2ProviderWrite: Oauth2ProviderWrite; } -export interface ApiV1OrganizationsOrganizationOauth2providersProviderDeleteRequest { - organization: string; - provider: string; +export interface ApiV1OrganizationsOrganizationIDOauth2providersProviderIDDeleteRequest { + organizationID: string; + providerID: string; } -export interface ApiV1OrganizationsOrganizationOauth2providersProviderPutRequest { - organization: string; - provider: string; - oauth2ProviderCreate: Oauth2ProviderCreate; +export interface ApiV1OrganizationsOrganizationIDOauth2providersProviderIDPutRequest { + organizationID: string; + providerID: string; + oauth2ProviderWrite: Oauth2ProviderWrite; } -export interface ApiV1OrganizationsOrganizationProjectsGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDProjectsGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationProjectsPostRequest { - organization: string; - projectSpec: ProjectSpec; +export interface ApiV1OrganizationsOrganizationIDProjectsPostRequest { + organizationID: string; + projectWrite: ProjectWrite; } -export interface ApiV1OrganizationsOrganizationProjectsProjectDeleteRequest { - organization: string; - project: string; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDDeleteRequest { + organizationID: string; + projectID: string; } -export interface ApiV1OrganizationsOrganizationProjectsProjectGetRequest { - organization: string; - project: string; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDGetRequest { + organizationID: string; + projectID: string; } -export interface ApiV1OrganizationsOrganizationProjectsProjectPutRequest { - organization: string; - project: string; - projectSpec: ProjectSpec; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDPutRequest { + organizationID: string; + projectID: string; + projectWrite: ProjectWrite; } -export interface ApiV1OrganizationsOrganizationPutRequest { - organization: string; - organization2: Organization; +export interface ApiV1OrganizationsOrganizationIDPutRequest { + organizationID: string; + organizationWrite: OrganizationWrite; } -export interface ApiV1OrganizationsOrganizationRolesGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDRolesGetRequest { + organizationID: string; } export interface ApiV1OrganizationsPostRequest { - organization: Organization; + organizationWrite: OrganizationWrite; } export interface Oauth2V2LoginPostRequest { @@ -246,9 +252,9 @@ export class DefaultApi extends runtime.BaseAPI { /** * Returns access control properties for the user. */ - async apiV1OrganizationsOrganizationAclGetRaw(requestParameters: ApiV1OrganizationsOrganizationAclGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationAclGet.'); + async apiV1OrganizationsOrganizationIDAclGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDAclGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDAclGet.'); } const queryParameters: any = {}; @@ -261,7 +267,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/acl`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/acl`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -273,17 +279,17 @@ export class DefaultApi extends runtime.BaseAPI { /** * Returns access control properties for the user. */ - async apiV1OrganizationsOrganizationAclGet(requestParameters: ApiV1OrganizationsOrganizationAclGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationAclGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDAclGet(requestParameters: ApiV1OrganizationsOrganizationIDAclGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDAclGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Returns a list of groups that are defined for the organization in the domain provider. */ - async apiV1OrganizationsOrganizationAvailableGroupsGetRaw(requestParameters: ApiV1OrganizationsOrganizationAvailableGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationAvailableGroupsGet.'); + async apiV1OrganizationsOrganizationIDAvailableGroupsGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDAvailableGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDAvailableGroupsGet.'); } const queryParameters: any = {}; @@ -296,7 +302,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/available-groups`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/available-groups`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -308,17 +314,17 @@ export class DefaultApi extends runtime.BaseAPI { /** * Returns a list of groups that are defined for the organization in the domain provider. */ - async apiV1OrganizationsOrganizationAvailableGroupsGet(requestParameters: ApiV1OrganizationsOrganizationAvailableGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationAvailableGroupsGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDAvailableGroupsGet(requestParameters: ApiV1OrganizationsOrganizationIDAvailableGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDAvailableGroupsGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Get an organization. */ - async apiV1OrganizationsOrganizationGetRaw(requestParameters: ApiV1OrganizationsOrganizationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationGet.'); + async apiV1OrganizationsOrganizationIDGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDGet.'); } const queryParameters: any = {}; @@ -331,29 +337,29 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationReadFromJSON(jsonValue)); } /** * Get an organization. */ - async apiV1OrganizationsOrganizationGet(requestParameters: ApiV1OrganizationsOrganizationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDGet(requestParameters: ApiV1OrganizationsOrganizationIDGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Returns a list of groups that are defined for the organization. */ - async apiV1OrganizationsOrganizationGroupsGetRaw(requestParameters: ApiV1OrganizationsOrganizationGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationGroupsGet.'); + async apiV1OrganizationsOrganizationIDGroupsGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGet.'); } const queryParameters: any = {}; @@ -366,7 +372,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/groups`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/groups`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -378,21 +384,21 @@ export class DefaultApi extends runtime.BaseAPI { /** * Returns a list of groups that are defined for the organization. */ - async apiV1OrganizationsOrganizationGroupsGet(requestParameters: ApiV1OrganizationsOrganizationGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationGroupsGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDGroupsGet(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDGroupsGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Allows the deletion of an existing group. */ - async apiV1OrganizationsOrganizationGroupsGroupidDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationGroupsGroupidDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidDelete.'); + async apiV1OrganizationsOrganizationIDGroupsGroupidDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGroupidDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidDelete.'); } if (requestParameters.groupid === null || requestParameters.groupid === undefined) { - throw new runtime.RequiredError('groupid','Required parameter requestParameters.groupid was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidDelete.'); + throw new runtime.RequiredError('groupid','Required parameter requestParameters.groupid was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidDelete.'); } const queryParameters: any = {}; @@ -405,7 +411,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/groups/{groupid}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"groupid"}}`, encodeURIComponent(String(requestParameters.groupid))), + path: `/api/v1/organizations/{organizationID}/groups/{groupid}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"groupid"}}`, encodeURIComponent(String(requestParameters.groupid))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -417,20 +423,20 @@ export class DefaultApi extends runtime.BaseAPI { /** * Allows the deletion of an existing group. */ - async apiV1OrganizationsOrganizationGroupsGroupidDelete(requestParameters: ApiV1OrganizationsOrganizationGroupsGroupidDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationGroupsGroupidDeleteRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDGroupsGroupidDelete(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGroupidDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDGroupsGroupidDeleteRaw(requestParameters, initOverrides); } /** * Allows a single group to be polled. */ - async apiV1OrganizationsOrganizationGroupsGroupidGetRaw(requestParameters: ApiV1OrganizationsOrganizationGroupsGroupidGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidGet.'); + async apiV1OrganizationsOrganizationIDGroupsGroupidGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGroupidGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidGet.'); } if (requestParameters.groupid === null || requestParameters.groupid === undefined) { - throw new runtime.RequiredError('groupid','Required parameter requestParameters.groupid was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidGet.'); + throw new runtime.RequiredError('groupid','Required parameter requestParameters.groupid was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidGet.'); } const queryParameters: any = {}; @@ -443,37 +449,37 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/groups/{groupid}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"groupid"}}`, encodeURIComponent(String(requestParameters.groupid))), + path: `/api/v1/organizations/{organizationID}/groups/{groupid}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"groupid"}}`, encodeURIComponent(String(requestParameters.groupid))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => GroupReadFromJSON(jsonValue)); } /** * Allows a single group to be polled. */ - async apiV1OrganizationsOrganizationGroupsGroupidGet(requestParameters: ApiV1OrganizationsOrganizationGroupsGroupidGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationGroupsGroupidGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDGroupsGroupidGet(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGroupidGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDGroupsGroupidGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Allows a group to be updated. */ - async apiV1OrganizationsOrganizationGroupsGroupidPutRaw(requestParameters: ApiV1OrganizationsOrganizationGroupsGroupidPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidPut.'); + async apiV1OrganizationsOrganizationIDGroupsGroupidPutRaw(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGroupidPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidPut.'); } if (requestParameters.groupid === null || requestParameters.groupid === undefined) { - throw new runtime.RequiredError('groupid','Required parameter requestParameters.groupid was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidPut.'); + throw new runtime.RequiredError('groupid','Required parameter requestParameters.groupid was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidPut.'); } - if (requestParameters.group === null || requestParameters.group === undefined) { - throw new runtime.RequiredError('group','Required parameter requestParameters.group was null or undefined when calling apiV1OrganizationsOrganizationGroupsGroupidPut.'); + if (requestParameters.groupWrite === null || requestParameters.groupWrite === undefined) { + throw new runtime.RequiredError('groupWrite','Required parameter requestParameters.groupWrite was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsGroupidPut.'); } const queryParameters: any = {}; @@ -488,11 +494,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/groups/{groupid}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"groupid"}}`, encodeURIComponent(String(requestParameters.groupid))), + path: `/api/v1/organizations/{organizationID}/groups/{groupid}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"groupid"}}`, encodeURIComponent(String(requestParameters.groupid))), method: 'PUT', headers: headerParameters, query: queryParameters, - body: GroupToJSON(requestParameters.group), + body: GroupWriteToJSON(requestParameters.groupWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -501,20 +507,20 @@ export class DefaultApi extends runtime.BaseAPI { /** * Allows a group to be updated. */ - async apiV1OrganizationsOrganizationGroupsGroupidPut(requestParameters: ApiV1OrganizationsOrganizationGroupsGroupidPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationGroupsGroupidPutRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDGroupsGroupidPut(requestParameters: ApiV1OrganizationsOrganizationIDGroupsGroupidPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDGroupsGroupidPutRaw(requestParameters, initOverrides); } /** * Allows creation of a new group. */ - async apiV1OrganizationsOrganizationGroupsPostRaw(requestParameters: ApiV1OrganizationsOrganizationGroupsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationGroupsPost.'); + async apiV1OrganizationsOrganizationIDGroupsPostRaw(requestParameters: ApiV1OrganizationsOrganizationIDGroupsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsPost.'); } - if (requestParameters.group === null || requestParameters.group === undefined) { - throw new runtime.RequiredError('group','Required parameter requestParameters.group was null or undefined when calling apiV1OrganizationsOrganizationGroupsPost.'); + if (requestParameters.groupWrite === null || requestParameters.groupWrite === undefined) { + throw new runtime.RequiredError('groupWrite','Required parameter requestParameters.groupWrite was null or undefined when calling apiV1OrganizationsOrganizationIDGroupsPost.'); } const queryParameters: any = {}; @@ -529,11 +535,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/groups`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/groups`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'POST', headers: headerParameters, query: queryParameters, - body: GroupToJSON(requestParameters.group), + body: GroupWriteToJSON(requestParameters.groupWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -542,16 +548,16 @@ export class DefaultApi extends runtime.BaseAPI { /** * Allows creation of a new group. */ - async apiV1OrganizationsOrganizationGroupsPost(requestParameters: ApiV1OrganizationsOrganizationGroupsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationGroupsPostRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDGroupsPost(requestParameters: ApiV1OrganizationsOrganizationIDGroupsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDGroupsPostRaw(requestParameters, initOverrides); } /** * Lists an organization\'s identity providers. */ - async apiV1OrganizationsOrganizationOauth2providersGetRaw(requestParameters: ApiV1OrganizationsOrganizationOauth2providersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersGet.'); + async apiV1OrganizationsOrganizationIDOauth2providersGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersGet.'); } const queryParameters: any = {}; @@ -564,7 +570,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/oauth2providers`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/oauth2providers`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -576,21 +582,21 @@ export class DefaultApi extends runtime.BaseAPI { /** * Lists an organization\'s identity providers. */ - async apiV1OrganizationsOrganizationOauth2providersGet(requestParameters: ApiV1OrganizationsOrganizationOauth2providersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationOauth2providersGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDOauth2providersGet(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDOauth2providersGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Create an organization\'s identity provider. */ - async apiV1OrganizationsOrganizationOauth2providersPostRaw(requestParameters: ApiV1OrganizationsOrganizationOauth2providersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersPost.'); + async apiV1OrganizationsOrganizationIDOauth2providersPostRaw(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersPost.'); } - if (requestParameters.oauth2ProviderCreate === null || requestParameters.oauth2ProviderCreate === undefined) { - throw new runtime.RequiredError('oauth2ProviderCreate','Required parameter requestParameters.oauth2ProviderCreate was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersPost.'); + if (requestParameters.oauth2ProviderWrite === null || requestParameters.oauth2ProviderWrite === undefined) { + throw new runtime.RequiredError('oauth2ProviderWrite','Required parameter requestParameters.oauth2ProviderWrite was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersPost.'); } const queryParameters: any = {}; @@ -605,11 +611,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/oauth2providers`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/oauth2providers`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'POST', headers: headerParameters, query: queryParameters, - body: Oauth2ProviderCreateToJSON(requestParameters.oauth2ProviderCreate), + body: Oauth2ProviderWriteToJSON(requestParameters.oauth2ProviderWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -618,20 +624,20 @@ export class DefaultApi extends runtime.BaseAPI { /** * Create an organization\'s identity provider. */ - async apiV1OrganizationsOrganizationOauth2providersPost(requestParameters: ApiV1OrganizationsOrganizationOauth2providersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationOauth2providersPostRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDOauth2providersPost(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDOauth2providersPostRaw(requestParameters, initOverrides); } /** * Delete an organization\'s identity provider. */ - async apiV1OrganizationsOrganizationOauth2providersProviderDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationOauth2providersProviderDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersProviderDelete.'); + async apiV1OrganizationsOrganizationIDOauth2providersProviderIDDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersProviderIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersProviderIDDelete.'); } - if (requestParameters.provider === null || requestParameters.provider === undefined) { - throw new runtime.RequiredError('provider','Required parameter requestParameters.provider was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersProviderDelete.'); + if (requestParameters.providerID === null || requestParameters.providerID === undefined) { + throw new runtime.RequiredError('providerID','Required parameter requestParameters.providerID was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersProviderIDDelete.'); } const queryParameters: any = {}; @@ -644,7 +650,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/oauth2providers/{provider}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"provider"}}`, encodeURIComponent(String(requestParameters.provider))), + path: `/api/v1/organizations/{organizationID}/oauth2providers/{providerID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"providerID"}}`, encodeURIComponent(String(requestParameters.providerID))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -656,24 +662,24 @@ export class DefaultApi extends runtime.BaseAPI { /** * Delete an organization\'s identity provider. */ - async apiV1OrganizationsOrganizationOauth2providersProviderDelete(requestParameters: ApiV1OrganizationsOrganizationOauth2providersProviderDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationOauth2providersProviderDeleteRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDOauth2providersProviderIDDelete(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersProviderIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDOauth2providersProviderIDDeleteRaw(requestParameters, initOverrides); } /** * Update an organization\'s identity provider. */ - async apiV1OrganizationsOrganizationOauth2providersProviderPutRaw(requestParameters: ApiV1OrganizationsOrganizationOauth2providersProviderPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersProviderPut.'); + async apiV1OrganizationsOrganizationIDOauth2providersProviderIDPutRaw(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersProviderIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersProviderIDPut.'); } - if (requestParameters.provider === null || requestParameters.provider === undefined) { - throw new runtime.RequiredError('provider','Required parameter requestParameters.provider was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersProviderPut.'); + if (requestParameters.providerID === null || requestParameters.providerID === undefined) { + throw new runtime.RequiredError('providerID','Required parameter requestParameters.providerID was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersProviderIDPut.'); } - if (requestParameters.oauth2ProviderCreate === null || requestParameters.oauth2ProviderCreate === undefined) { - throw new runtime.RequiredError('oauth2ProviderCreate','Required parameter requestParameters.oauth2ProviderCreate was null or undefined when calling apiV1OrganizationsOrganizationOauth2providersProviderPut.'); + if (requestParameters.oauth2ProviderWrite === null || requestParameters.oauth2ProviderWrite === undefined) { + throw new runtime.RequiredError('oauth2ProviderWrite','Required parameter requestParameters.oauth2ProviderWrite was null or undefined when calling apiV1OrganizationsOrganizationIDOauth2providersProviderIDPut.'); } const queryParameters: any = {}; @@ -688,11 +694,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/oauth2providers/{provider}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"provider"}}`, encodeURIComponent(String(requestParameters.provider))), + path: `/api/v1/organizations/{organizationID}/oauth2providers/{providerID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"providerID"}}`, encodeURIComponent(String(requestParameters.providerID))), method: 'PUT', headers: headerParameters, query: queryParameters, - body: Oauth2ProviderCreateToJSON(requestParameters.oauth2ProviderCreate), + body: Oauth2ProviderWriteToJSON(requestParameters.oauth2ProviderWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -701,16 +707,16 @@ export class DefaultApi extends runtime.BaseAPI { /** * Update an organization\'s identity provider. */ - async apiV1OrganizationsOrganizationOauth2providersProviderPut(requestParameters: ApiV1OrganizationsOrganizationOauth2providersProviderPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationOauth2providersProviderPutRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDOauth2providersProviderIDPut(requestParameters: ApiV1OrganizationsOrganizationIDOauth2providersProviderIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDOauth2providersProviderIDPutRaw(requestParameters, initOverrides); } /** * List all projects for the organization. */ - async apiV1OrganizationsOrganizationProjectsGetRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsGet.'); + async apiV1OrganizationsOrganizationIDProjectsGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsGet.'); } const queryParameters: any = {}; @@ -723,7 +729,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/projects`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -735,21 +741,21 @@ export class DefaultApi extends runtime.BaseAPI { /** * List all projects for the organization. */ - async apiV1OrganizationsOrganizationProjectsGet(requestParameters: ApiV1OrganizationsOrganizationProjectsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationProjectsGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsGet(requestParameters: ApiV1OrganizationsOrganizationIDProjectsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDProjectsGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates a new project resource for the user\'s organization. */ - async apiV1OrganizationsOrganizationProjectsPostRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsPost.'); + async apiV1OrganizationsOrganizationIDProjectsPostRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsPost.'); } - if (requestParameters.projectSpec === null || requestParameters.projectSpec === undefined) { - throw new runtime.RequiredError('projectSpec','Required parameter requestParameters.projectSpec was null or undefined when calling apiV1OrganizationsOrganizationProjectsPost.'); + if (requestParameters.projectWrite === null || requestParameters.projectWrite === undefined) { + throw new runtime.RequiredError('projectWrite','Required parameter requestParameters.projectWrite was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsPost.'); } const queryParameters: any = {}; @@ -764,11 +770,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/projects`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'POST', headers: headerParameters, query: queryParameters, - body: ProjectSpecToJSON(requestParameters.projectSpec), + body: ProjectWriteToJSON(requestParameters.projectWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -777,20 +783,20 @@ export class DefaultApi extends runtime.BaseAPI { /** * Creates a new project resource for the user\'s organization. */ - async apiV1OrganizationsOrganizationProjectsPost(requestParameters: ApiV1OrganizationsOrganizationProjectsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsPostRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsPost(requestParameters: ApiV1OrganizationsOrganizationIDProjectsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsPostRaw(requestParameters, initOverrides); } /** * Deletes the project associated with the authenticated user\'s scoped authorisation token. This is a cascading operation and will delete all contained cluster managers and clusters. */ - async apiV1OrganizationsOrganizationProjectsProjectDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectDelete.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDDelete.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectDelete.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDDelete.'); } const queryParameters: any = {}; @@ -803,7 +809,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -815,20 +821,20 @@ export class DefaultApi extends runtime.BaseAPI { /** * Deletes the project associated with the authenticated user\'s scoped authorisation token. This is a cascading operation and will delete all contained cluster managers and clusters. */ - async apiV1OrganizationsOrganizationProjectsProjectDelete(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectDeleteRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDDelete(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDDeleteRaw(requestParameters, initOverrides); } /** * Gets a project. */ - async apiV1OrganizationsOrganizationProjectsProjectGetRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectGet.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDGet.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectGet.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDGet.'); } const queryParameters: any = {}; @@ -841,37 +847,37 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectReadFromJSON(jsonValue)); } /** * Gets a project. */ - async apiV1OrganizationsOrganizationProjectsProjectGet(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationProjectsProjectGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDGet(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDProjectsProjectIDGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Updates a project. */ - async apiV1OrganizationsOrganizationProjectsProjectPutRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectPut.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDPutRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDPut.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectPut.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDPut.'); } - if (requestParameters.projectSpec === null || requestParameters.projectSpec === undefined) { - throw new runtime.RequiredError('projectSpec','Required parameter requestParameters.projectSpec was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectPut.'); + if (requestParameters.projectWrite === null || requestParameters.projectWrite === undefined) { + throw new runtime.RequiredError('projectWrite','Required parameter requestParameters.projectWrite was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDPut.'); } const queryParameters: any = {}; @@ -886,11 +892,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))), method: 'PUT', headers: headerParameters, query: queryParameters, - body: ProjectSpecToJSON(requestParameters.projectSpec), + body: ProjectWriteToJSON(requestParameters.projectWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -899,20 +905,20 @@ export class DefaultApi extends runtime.BaseAPI { /** * Updates a project. */ - async apiV1OrganizationsOrganizationProjectsProjectPut(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectPutRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDPut(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDPutRaw(requestParameters, initOverrides); } /** * Allows an organization to be updated. */ - async apiV1OrganizationsOrganizationPutRaw(requestParameters: ApiV1OrganizationsOrganizationPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationPut.'); + async apiV1OrganizationsOrganizationIDPutRaw(requestParameters: ApiV1OrganizationsOrganizationIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDPut.'); } - if (requestParameters.organization2 === null || requestParameters.organization2 === undefined) { - throw new runtime.RequiredError('organization2','Required parameter requestParameters.organization2 was null or undefined when calling apiV1OrganizationsOrganizationPut.'); + if (requestParameters.organizationWrite === null || requestParameters.organizationWrite === undefined) { + throw new runtime.RequiredError('organizationWrite','Required parameter requestParameters.organizationWrite was null or undefined when calling apiV1OrganizationsOrganizationIDPut.'); } const queryParameters: any = {}; @@ -927,11 +933,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'PUT', headers: headerParameters, query: queryParameters, - body: OrganizationToJSON(requestParameters.organization2), + body: OrganizationWriteToJSON(requestParameters.organizationWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -940,16 +946,16 @@ export class DefaultApi extends runtime.BaseAPI { /** * Allows an organization to be updated. */ - async apiV1OrganizationsOrganizationPut(requestParameters: ApiV1OrganizationsOrganizationPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationPutRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDPut(requestParameters: ApiV1OrganizationsOrganizationIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDPutRaw(requestParameters, initOverrides); } /** * Returns roles that can be used by the organization. */ - async apiV1OrganizationsOrganizationRolesGetRaw(requestParameters: ApiV1OrganizationsOrganizationRolesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationRolesGet.'); + async apiV1OrganizationsOrganizationIDRolesGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDRolesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDRolesGet.'); } const queryParameters: any = {}; @@ -962,7 +968,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/roles`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/roles`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -974,8 +980,8 @@ export class DefaultApi extends runtime.BaseAPI { /** * Returns roles that can be used by the organization. */ - async apiV1OrganizationsOrganizationRolesGet(requestParameters: ApiV1OrganizationsOrganizationRolesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationRolesGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDRolesGet(requestParameters: ApiV1OrganizationsOrganizationIDRolesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDRolesGetRaw(requestParameters, initOverrides); return await response.value(); } @@ -983,8 +989,8 @@ export class DefaultApi extends runtime.BaseAPI { * Allows creation of an organization. */ async apiV1OrganizationsPostRaw(requestParameters: ApiV1OrganizationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsPost.'); + if (requestParameters.organizationWrite === null || requestParameters.organizationWrite === undefined) { + throw new runtime.RequiredError('organizationWrite','Required parameter requestParameters.organizationWrite was null or undefined when calling apiV1OrganizationsPost.'); } const queryParameters: any = {}; @@ -1003,7 +1009,7 @@ export class DefaultApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: OrganizationToJSON(requestParameters.organization), + body: OrganizationWriteToJSON(requestParameters.organizationWrite), }, initOverrides); return new runtime.VoidApiResponse(response); diff --git a/src/lib/openapi/identity/models/GroupRead.ts b/src/lib/openapi/identity/models/GroupRead.ts new file mode 100644 index 0000000..7c7a25e --- /dev/null +++ b/src/lib/openapi/identity/models/GroupRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { GroupSpec } from './GroupSpec'; +import { + GroupSpecFromJSON, + GroupSpecFromJSONTyped, + GroupSpecToJSON, +} from './GroupSpec'; +import type { OrganizationScopedResourceReadMetadata } from './OrganizationScopedResourceReadMetadata'; +import { + OrganizationScopedResourceReadMetadataFromJSON, + OrganizationScopedResourceReadMetadataFromJSONTyped, + OrganizationScopedResourceReadMetadataToJSON, +} from './OrganizationScopedResourceReadMetadata'; + +/** + * A group when read. + * @export + * @interface GroupRead + */ +export interface GroupRead { + /** + * + * @type {OrganizationScopedResourceReadMetadata} + * @memberof GroupRead + */ + metadata: OrganizationScopedResourceReadMetadata; + /** + * + * @type {GroupSpec} + * @memberof GroupRead + */ + spec: GroupSpec; +} + +/** + * Check if a given object implements the GroupRead interface. + */ +export function instanceOfGroupRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function GroupReadFromJSON(json: any): GroupRead { + return GroupReadFromJSONTyped(json, false); +} + +export function GroupReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': OrganizationScopedResourceReadMetadataFromJSON(json['metadata']), + 'spec': GroupSpecFromJSON(json['spec']), + }; +} + +export function GroupReadToJSON(value?: GroupRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': OrganizationScopedResourceReadMetadataToJSON(value.metadata), + 'spec': GroupSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/GroupSpec.ts b/src/lib/openapi/identity/models/GroupSpec.ts new file mode 100644 index 0000000..0eded40 --- /dev/null +++ b/src/lib/openapi/identity/models/GroupSpec.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ProviderGroupList } from './ProviderGroupList'; +import { + ProviderGroupListFromJSON, + ProviderGroupListFromJSONTyped, + ProviderGroupListToJSON, +} from './ProviderGroupList'; +import type { RoleList } from './RoleList'; +import { + RoleListFromJSON, + RoleListFromJSONTyped, + RoleListToJSON, +} from './RoleList'; +import type { UserList } from './UserList'; +import { + UserListFromJSON, + UserListFromJSONTyped, + UserListToJSON, +} from './UserList'; + +/** + * A group. + * @export + * @interface GroupSpec + */ +export interface GroupSpec { + /** + * + * @type {UserList} + * @memberof GroupSpec + */ + users?: UserList; + /** + * + * @type {RoleList} + * @memberof GroupSpec + */ + roles: RoleList; + /** + * + * @type {ProviderGroupList} + * @memberof GroupSpec + */ + providerGroups?: ProviderGroupList; +} + +/** + * Check if a given object implements the GroupSpec interface. + */ +export function instanceOfGroupSpec(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "roles" in value; + + return isInstance; +} + +export function GroupSpecFromJSON(json: any): GroupSpec { + return GroupSpecFromJSONTyped(json, false); +} + +export function GroupSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupSpec { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'users': !exists(json, 'users') ? undefined : UserListFromJSON(json['users']), + 'roles': RoleListFromJSON(json['roles']), + 'providerGroups': !exists(json, 'providerGroups') ? undefined : ProviderGroupListFromJSON(json['providerGroups']), + }; +} + +export function GroupSpecToJSON(value?: GroupSpec | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'users': UserListToJSON(value.users), + 'roles': RoleListToJSON(value.roles), + 'providerGroups': ProviderGroupListToJSON(value.providerGroups), + }; +} + diff --git a/src/lib/openapi/identity/models/GroupWrite.ts b/src/lib/openapi/identity/models/GroupWrite.ts new file mode 100644 index 0000000..f4acce8 --- /dev/null +++ b/src/lib/openapi/identity/models/GroupWrite.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { GroupSpec } from './GroupSpec'; +import { + GroupSpecFromJSON, + GroupSpecFromJSONTyped, + GroupSpecToJSON, +} from './GroupSpec'; +import type { ResourceWriteMetadata } from './ResourceWriteMetadata'; +import { + ResourceWriteMetadataFromJSON, + ResourceWriteMetadataFromJSONTyped, + ResourceWriteMetadataToJSON, +} from './ResourceWriteMetadata'; + +/** + * A group when created or updated. + * @export + * @interface GroupWrite + */ +export interface GroupWrite { + /** + * + * @type {ResourceWriteMetadata} + * @memberof GroupWrite + */ + metadata: ResourceWriteMetadata; + /** + * + * @type {GroupSpec} + * @memberof GroupWrite + */ + spec: GroupSpec; +} + +/** + * Check if a given object implements the GroupWrite interface. + */ +export function instanceOfGroupWrite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function GroupWriteFromJSON(json: any): GroupWrite { + return GroupWriteFromJSONTyped(json, false); +} + +export function GroupWriteFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupWrite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceWriteMetadataFromJSON(json['metadata']), + 'spec': GroupSpecFromJSON(json['spec']), + }; +} + +export function GroupWriteToJSON(value?: GroupWrite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceWriteMetadataToJSON(value.metadata), + 'spec': GroupSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/Groups.ts b/src/lib/openapi/identity/models/Groups.ts index 04e7930..44cfd17 100644 --- a/src/lib/openapi/identity/models/Groups.ts +++ b/src/lib/openapi/identity/models/Groups.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { Group } from './Group'; +import type { GroupRead } from './GroupRead'; import { - GroupFromJSON, - GroupFromJSONTyped, - GroupToJSON, -} from './Group'; + GroupReadFromJSON, + GroupReadFromJSONTyped, + GroupReadToJSON, +} from './GroupRead'; /** * A list of groups. * @export * @interface Groups */ -export interface Groups extends Array { +export interface Groups extends Array { } /** diff --git a/src/lib/openapi/identity/models/Oauth2ProviderRead.ts b/src/lib/openapi/identity/models/Oauth2ProviderRead.ts new file mode 100644 index 0000000..b08ac8f --- /dev/null +++ b/src/lib/openapi/identity/models/Oauth2ProviderRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Oauth2ProviderSpec } from './Oauth2ProviderSpec'; +import { + Oauth2ProviderSpecFromJSON, + Oauth2ProviderSpecFromJSONTyped, + Oauth2ProviderSpecToJSON, +} from './Oauth2ProviderSpec'; +import type { OrganizationScopedResourceReadMetadata } from './OrganizationScopedResourceReadMetadata'; +import { + OrganizationScopedResourceReadMetadataFromJSON, + OrganizationScopedResourceReadMetadataFromJSONTyped, + OrganizationScopedResourceReadMetadataToJSON, +} from './OrganizationScopedResourceReadMetadata'; + +/** + * An OAuth2 provider when read. + * @export + * @interface Oauth2ProviderRead + */ +export interface Oauth2ProviderRead { + /** + * + * @type {OrganizationScopedResourceReadMetadata} + * @memberof Oauth2ProviderRead + */ + metadata: OrganizationScopedResourceReadMetadata; + /** + * + * @type {Oauth2ProviderSpec} + * @memberof Oauth2ProviderRead + */ + spec: Oauth2ProviderSpec; +} + +/** + * Check if a given object implements the Oauth2ProviderRead interface. + */ +export function instanceOfOauth2ProviderRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function Oauth2ProviderReadFromJSON(json: any): Oauth2ProviderRead { + return Oauth2ProviderReadFromJSONTyped(json, false); +} + +export function Oauth2ProviderReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): Oauth2ProviderRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': OrganizationScopedResourceReadMetadataFromJSON(json['metadata']), + 'spec': Oauth2ProviderSpecFromJSON(json['spec']), + }; +} + +export function Oauth2ProviderReadToJSON(value?: Oauth2ProviderRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': OrganizationScopedResourceReadMetadataToJSON(value.metadata), + 'spec': Oauth2ProviderSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/Oauth2ProviderSpec.ts b/src/lib/openapi/identity/models/Oauth2ProviderSpec.ts new file mode 100644 index 0000000..a4450a0 --- /dev/null +++ b/src/lib/openapi/identity/models/Oauth2ProviderSpec.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Oauth2ProviderType } from './Oauth2ProviderType'; +import { + Oauth2ProviderTypeFromJSON, + Oauth2ProviderTypeFromJSONTyped, + Oauth2ProviderTypeToJSON, +} from './Oauth2ProviderType'; + +/** + * An oauth2 provider. + * @export + * @interface Oauth2ProviderSpec + */ +export interface Oauth2ProviderSpec { + /** + * + * @type {Oauth2ProviderType} + * @memberof Oauth2ProviderSpec + */ + type?: Oauth2ProviderType; + /** + * The OIDC issuer, typically where to perform auto discovery relative to. + * @type {string} + * @memberof Oauth2ProviderSpec + */ + issuer: string; + /** + * The client identification, only shown for super admin or organization owned providers + * that you are an admin for. + * + * @type {string} + * @memberof Oauth2ProviderSpec + */ + clientID: string; + /** + * The client secret, only shown for super admin or organization owned providers + * that you are an admin for. + * + * @type {string} + * @memberof Oauth2ProviderSpec + */ + clientSecret?: string; +} + +/** + * Check if a given object implements the Oauth2ProviderSpec interface. + */ +export function instanceOfOauth2ProviderSpec(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "issuer" in value; + isInstance = isInstance && "clientID" in value; + + return isInstance; +} + +export function Oauth2ProviderSpecFromJSON(json: any): Oauth2ProviderSpec { + return Oauth2ProviderSpecFromJSONTyped(json, false); +} + +export function Oauth2ProviderSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): Oauth2ProviderSpec { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': !exists(json, 'type') ? undefined : Oauth2ProviderTypeFromJSON(json['type']), + 'issuer': json['issuer'], + 'clientID': json['clientID'], + 'clientSecret': !exists(json, 'clientSecret') ? undefined : json['clientSecret'], + }; +} + +export function Oauth2ProviderSpecToJSON(value?: Oauth2ProviderSpec | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': Oauth2ProviderTypeToJSON(value.type), + 'issuer': value.issuer, + 'clientID': value.clientID, + 'clientSecret': value.clientSecret, + }; +} + diff --git a/src/lib/openapi/identity/models/Oauth2ProviderWrite.ts b/src/lib/openapi/identity/models/Oauth2ProviderWrite.ts new file mode 100644 index 0000000..0c69b8c --- /dev/null +++ b/src/lib/openapi/identity/models/Oauth2ProviderWrite.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Oauth2ProviderSpec } from './Oauth2ProviderSpec'; +import { + Oauth2ProviderSpecFromJSON, + Oauth2ProviderSpecFromJSONTyped, + Oauth2ProviderSpecToJSON, +} from './Oauth2ProviderSpec'; +import type { ResourceWriteMetadata } from './ResourceWriteMetadata'; +import { + ResourceWriteMetadataFromJSON, + ResourceWriteMetadataFromJSONTyped, + ResourceWriteMetadataToJSON, +} from './ResourceWriteMetadata'; + +/** + * An OAuth2 provider when created or updated. + * @export + * @interface Oauth2ProviderWrite + */ +export interface Oauth2ProviderWrite { + /** + * + * @type {ResourceWriteMetadata} + * @memberof Oauth2ProviderWrite + */ + metadata: ResourceWriteMetadata; + /** + * + * @type {Oauth2ProviderSpec} + * @memberof Oauth2ProviderWrite + */ + spec: Oauth2ProviderSpec; +} + +/** + * Check if a given object implements the Oauth2ProviderWrite interface. + */ +export function instanceOfOauth2ProviderWrite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function Oauth2ProviderWriteFromJSON(json: any): Oauth2ProviderWrite { + return Oauth2ProviderWriteFromJSONTyped(json, false); +} + +export function Oauth2ProviderWriteFromJSONTyped(json: any, ignoreDiscriminator: boolean): Oauth2ProviderWrite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceWriteMetadataFromJSON(json['metadata']), + 'spec': Oauth2ProviderSpecFromJSON(json['spec']), + }; +} + +export function Oauth2ProviderWriteToJSON(value?: Oauth2ProviderWrite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceWriteMetadataToJSON(value.metadata), + 'spec': Oauth2ProviderSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/Oauth2Providers.ts b/src/lib/openapi/identity/models/Oauth2Providers.ts index 0715100..1569b7f 100644 --- a/src/lib/openapi/identity/models/Oauth2Providers.ts +++ b/src/lib/openapi/identity/models/Oauth2Providers.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { Oauth2Provider } from './Oauth2Provider'; +import type { Oauth2ProviderRead } from './Oauth2ProviderRead'; import { - Oauth2ProviderFromJSON, - Oauth2ProviderFromJSONTyped, - Oauth2ProviderToJSON, -} from './Oauth2Provider'; + Oauth2ProviderReadFromJSON, + Oauth2ProviderReadFromJSONTyped, + Oauth2ProviderReadToJSON, +} from './Oauth2ProviderRead'; /** * A list of oauth2 providers. * @export * @interface Oauth2Providers */ -export interface Oauth2Providers extends Array { +export interface Oauth2Providers extends Array { } /** diff --git a/src/lib/openapi/identity/models/OrganizationRead.ts b/src/lib/openapi/identity/models/OrganizationRead.ts new file mode 100644 index 0000000..e483b21 --- /dev/null +++ b/src/lib/openapi/identity/models/OrganizationRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OrganizationSpec } from './OrganizationSpec'; +import { + OrganizationSpecFromJSON, + OrganizationSpecFromJSONTyped, + OrganizationSpecToJSON, +} from './OrganizationSpec'; +import type { ResourceReadMetadata } from './ResourceReadMetadata'; +import { + ResourceReadMetadataFromJSON, + ResourceReadMetadataFromJSONTyped, + ResourceReadMetadataToJSON, +} from './ResourceReadMetadata'; + +/** + * An organization when read. + * @export + * @interface OrganizationRead + */ +export interface OrganizationRead { + /** + * + * @type {ResourceReadMetadata} + * @memberof OrganizationRead + */ + metadata: ResourceReadMetadata; + /** + * + * @type {OrganizationSpec} + * @memberof OrganizationRead + */ + spec: OrganizationSpec; +} + +/** + * Check if a given object implements the OrganizationRead interface. + */ +export function instanceOfOrganizationRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function OrganizationReadFromJSON(json: any): OrganizationRead { + return OrganizationReadFromJSONTyped(json, false); +} + +export function OrganizationReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceReadMetadataFromJSON(json['metadata']), + 'spec': OrganizationSpecFromJSON(json['spec']), + }; +} + +export function OrganizationReadToJSON(value?: OrganizationRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceReadMetadataToJSON(value.metadata), + 'spec': OrganizationSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/OrganizationScopedResourceReadMetadata.ts b/src/lib/openapi/identity/models/OrganizationScopedResourceReadMetadata.ts new file mode 100644 index 0000000..893d140 --- /dev/null +++ b/src/lib/openapi/identity/models/OrganizationScopedResourceReadMetadata.ts @@ -0,0 +1,126 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceProvisioningStatus } from './ResourceProvisioningStatus'; +import { + ResourceProvisioningStatusFromJSON, + ResourceProvisioningStatusFromJSONTyped, + ResourceProvisioningStatusToJSON, +} from './ResourceProvisioningStatus'; + +/** + * + * @export + * @interface OrganizationScopedResourceReadMetadata + */ +export interface OrganizationScopedResourceReadMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + description?: string; + /** + * The unique resource ID. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + id: string; + /** + * The time the resource was created. + * @type {Date} + * @memberof OrganizationScopedResourceReadMetadata + */ + creationTime: Date; + /** + * The time the resource was deleted. + * @type {Date} + * @memberof OrganizationScopedResourceReadMetadata + */ + deletionTime?: Date; + /** + * + * @type {ResourceProvisioningStatus} + * @memberof OrganizationScopedResourceReadMetadata + */ + provisioningStatus: ResourceProvisioningStatus; + /** + * The organization identifier the resource belongs to. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + organizationId: string; +} + +/** + * Check if a given object implements the OrganizationScopedResourceReadMetadata interface. + */ +export function instanceOfOrganizationScopedResourceReadMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "creationTime" in value; + isInstance = isInstance && "provisioningStatus" in value; + isInstance = isInstance && "organizationId" in value; + + return isInstance; +} + +export function OrganizationScopedResourceReadMetadataFromJSON(json: any): OrganizationScopedResourceReadMetadata { + return OrganizationScopedResourceReadMetadataFromJSONTyped(json, false); +} + +export function OrganizationScopedResourceReadMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationScopedResourceReadMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'id': json['id'], + 'creationTime': (new Date(json['creationTime'])), + 'deletionTime': !exists(json, 'deletionTime') ? undefined : (new Date(json['deletionTime'])), + 'provisioningStatus': ResourceProvisioningStatusFromJSON(json['provisioningStatus']), + 'organizationId': json['organizationId'], + }; +} + +export function OrganizationScopedResourceReadMetadataToJSON(value?: OrganizationScopedResourceReadMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'id': value.id, + 'creationTime': (value.creationTime.toISOString()), + 'deletionTime': value.deletionTime === undefined ? undefined : (value.deletionTime.toISOString()), + 'provisioningStatus': ResourceProvisioningStatusToJSON(value.provisioningStatus), + 'organizationId': value.organizationId, + }; +} + diff --git a/src/lib/openapi/identity/models/OrganizationSpec.ts b/src/lib/openapi/identity/models/OrganizationSpec.ts new file mode 100644 index 0000000..9796076 --- /dev/null +++ b/src/lib/openapi/identity/models/OrganizationSpec.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OrganizationType } from './OrganizationType'; +import { + OrganizationTypeFromJSON, + OrganizationTypeFromJSONTyped, + OrganizationTypeToJSON, +} from './OrganizationType'; +import type { ProviderScope } from './ProviderScope'; +import { + ProviderScopeFromJSON, + ProviderScopeFromJSONTyped, + ProviderScopeToJSON, +} from './ProviderScope'; + +/** + * An organization. + * @export + * @interface OrganizationSpec + */ +export interface OrganizationSpec { + /** + * + * @type {OrganizationType} + * @memberof OrganizationSpec + */ + organizationType: OrganizationType; + /** + * The email domain of the organization. + * @type {string} + * @memberof OrganizationSpec + */ + domain?: string; + /** + * + * @type {ProviderScope} + * @memberof OrganizationSpec + */ + providerScope?: ProviderScope; + /** + * The ID of the provider to use, the scope is determined by useCustomProvider. + * If false, this refers to a built in provider, if true, then to an organization + * specific one. + * @type {string} + * @memberof OrganizationSpec + */ + providerID?: string; + /** + * When set this identifies the customer ID for the google managed organization. + * This enables the access to, and use of, Google groups as a source of truth + * for RBAC. + * @type {string} + * @memberof OrganizationSpec + */ + googleCustomerID?: string; +} + +/** + * Check if a given object implements the OrganizationSpec interface. + */ +export function instanceOfOrganizationSpec(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "organizationType" in value; + + return isInstance; +} + +export function OrganizationSpecFromJSON(json: any): OrganizationSpec { + return OrganizationSpecFromJSONTyped(json, false); +} + +export function OrganizationSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationSpec { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'organizationType': OrganizationTypeFromJSON(json['organizationType']), + 'domain': !exists(json, 'domain') ? undefined : json['domain'], + 'providerScope': !exists(json, 'providerScope') ? undefined : ProviderScopeFromJSON(json['providerScope']), + 'providerID': !exists(json, 'providerID') ? undefined : json['providerID'], + 'googleCustomerID': !exists(json, 'googleCustomerID') ? undefined : json['googleCustomerID'], + }; +} + +export function OrganizationSpecToJSON(value?: OrganizationSpec | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'organizationType': OrganizationTypeToJSON(value.organizationType), + 'domain': value.domain, + 'providerScope': ProviderScopeToJSON(value.providerScope), + 'providerID': value.providerID, + 'googleCustomerID': value.googleCustomerID, + }; +} + diff --git a/src/lib/openapi/identity/models/OrganizationWrite.ts b/src/lib/openapi/identity/models/OrganizationWrite.ts new file mode 100644 index 0000000..69ccfb8 --- /dev/null +++ b/src/lib/openapi/identity/models/OrganizationWrite.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OrganizationSpec } from './OrganizationSpec'; +import { + OrganizationSpecFromJSON, + OrganizationSpecFromJSONTyped, + OrganizationSpecToJSON, +} from './OrganizationSpec'; +import type { ResourceWriteMetadata } from './ResourceWriteMetadata'; +import { + ResourceWriteMetadataFromJSON, + ResourceWriteMetadataFromJSONTyped, + ResourceWriteMetadataToJSON, +} from './ResourceWriteMetadata'; + +/** + * An organization when created or updated. + * @export + * @interface OrganizationWrite + */ +export interface OrganizationWrite { + /** + * + * @type {ResourceWriteMetadata} + * @memberof OrganizationWrite + */ + metadata: ResourceWriteMetadata; + /** + * + * @type {OrganizationSpec} + * @memberof OrganizationWrite + */ + spec: OrganizationSpec; +} + +/** + * Check if a given object implements the OrganizationWrite interface. + */ +export function instanceOfOrganizationWrite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function OrganizationWriteFromJSON(json: any): OrganizationWrite { + return OrganizationWriteFromJSONTyped(json, false); +} + +export function OrganizationWriteFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationWrite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceWriteMetadataFromJSON(json['metadata']), + 'spec': OrganizationSpecFromJSON(json['spec']), + }; +} + +export function OrganizationWriteToJSON(value?: OrganizationWrite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceWriteMetadataToJSON(value.metadata), + 'spec': OrganizationSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/Organizations.ts b/src/lib/openapi/identity/models/Organizations.ts index 5ad3c2f..713819e 100644 --- a/src/lib/openapi/identity/models/Organizations.ts +++ b/src/lib/openapi/identity/models/Organizations.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { Organization } from './Organization'; +import type { OrganizationRead } from './OrganizationRead'; import { - OrganizationFromJSON, - OrganizationFromJSONTyped, - OrganizationToJSON, -} from './Organization'; + OrganizationReadFromJSON, + OrganizationReadFromJSONTyped, + OrganizationReadToJSON, +} from './OrganizationRead'; /** * A list of organizations. * @export * @interface Organizations */ -export interface Organizations extends Array { +export interface Organizations extends Array { } /** diff --git a/src/lib/openapi/identity/models/ProjectRead.ts b/src/lib/openapi/identity/models/ProjectRead.ts new file mode 100644 index 0000000..a5fd9e7 --- /dev/null +++ b/src/lib/openapi/identity/models/ProjectRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OrganizationScopedResourceReadMetadata } from './OrganizationScopedResourceReadMetadata'; +import { + OrganizationScopedResourceReadMetadataFromJSON, + OrganizationScopedResourceReadMetadataFromJSONTyped, + OrganizationScopedResourceReadMetadataToJSON, +} from './OrganizationScopedResourceReadMetadata'; +import type { ProjectSpec } from './ProjectSpec'; +import { + ProjectSpecFromJSON, + ProjectSpecFromJSONTyped, + ProjectSpecToJSON, +} from './ProjectSpec'; + +/** + * A project when read. + * @export + * @interface ProjectRead + */ +export interface ProjectRead { + /** + * + * @type {OrganizationScopedResourceReadMetadata} + * @memberof ProjectRead + */ + metadata: OrganizationScopedResourceReadMetadata; + /** + * + * @type {ProjectSpec} + * @memberof ProjectRead + */ + spec: ProjectSpec; +} + +/** + * Check if a given object implements the ProjectRead interface. + */ +export function instanceOfProjectRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function ProjectReadFromJSON(json: any): ProjectRead { + return ProjectReadFromJSONTyped(json, false); +} + +export function ProjectReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': OrganizationScopedResourceReadMetadataFromJSON(json['metadata']), + 'spec': ProjectSpecFromJSON(json['spec']), + }; +} + +export function ProjectReadToJSON(value?: ProjectRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': OrganizationScopedResourceReadMetadataToJSON(value.metadata), + 'spec': ProjectSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/ProjectSpec.ts b/src/lib/openapi/identity/models/ProjectSpec.ts index 5386b0a..f807be0 100644 --- a/src/lib/openapi/identity/models/ProjectSpec.ts +++ b/src/lib/openapi/identity/models/ProjectSpec.ts @@ -26,12 +26,6 @@ import { * @interface ProjectSpec */ export interface ProjectSpec { - /** - * - * @type {string} - * @memberof ProjectSpec - */ - name: string; /** * * @type {GroupIDs} @@ -45,7 +39,6 @@ export interface ProjectSpec { */ export function instanceOfProjectSpec(value: object): boolean { let isInstance = true; - isInstance = isInstance && "name" in value; return isInstance; } @@ -60,7 +53,6 @@ export function ProjectSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean } return { - 'name': json['name'], 'groupIDs': !exists(json, 'groupIDs') ? undefined : GroupIDsFromJSON(json['groupIDs']), }; } @@ -74,7 +66,6 @@ export function ProjectSpecToJSON(value?: ProjectSpec | null): any { } return { - 'name': value.name, 'groupIDs': GroupIDsToJSON(value.groupIDs), }; } diff --git a/src/lib/openapi/identity/models/ProjectWrite.ts b/src/lib/openapi/identity/models/ProjectWrite.ts new file mode 100644 index 0000000..4b56fc7 --- /dev/null +++ b/src/lib/openapi/identity/models/ProjectWrite.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ProjectSpec } from './ProjectSpec'; +import { + ProjectSpecFromJSON, + ProjectSpecFromJSONTyped, + ProjectSpecToJSON, +} from './ProjectSpec'; +import type { ResourceWriteMetadata } from './ResourceWriteMetadata'; +import { + ResourceWriteMetadataFromJSON, + ResourceWriteMetadataFromJSONTyped, + ResourceWriteMetadataToJSON, +} from './ResourceWriteMetadata'; + +/** + * A project when created or updated. + * @export + * @interface ProjectWrite + */ +export interface ProjectWrite { + /** + * + * @type {ResourceWriteMetadata} + * @memberof ProjectWrite + */ + metadata: ResourceWriteMetadata; + /** + * + * @type {ProjectSpec} + * @memberof ProjectWrite + */ + spec: ProjectSpec; +} + +/** + * Check if a given object implements the ProjectWrite interface. + */ +export function instanceOfProjectWrite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function ProjectWriteFromJSON(json: any): ProjectWrite { + return ProjectWriteFromJSONTyped(json, false); +} + +export function ProjectWriteFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectWrite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceWriteMetadataFromJSON(json['metadata']), + 'spec': ProjectSpecFromJSON(json['spec']), + }; +} + +export function ProjectWriteToJSON(value?: ProjectWrite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceWriteMetadataToJSON(value.metadata), + 'spec': ProjectSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/Projects.ts b/src/lib/openapi/identity/models/Projects.ts index c76bbd2..863984b 100644 --- a/src/lib/openapi/identity/models/Projects.ts +++ b/src/lib/openapi/identity/models/Projects.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { Project } from './Project'; +import type { ProjectRead } from './ProjectRead'; import { - ProjectFromJSON, - ProjectFromJSONTyped, - ProjectToJSON, -} from './Project'; + ProjectReadFromJSON, + ProjectReadFromJSONTyped, + ProjectReadToJSON, +} from './ProjectRead'; /** * A list of projects. * @export * @interface Projects */ -export interface Projects extends Array { +export interface Projects extends Array { } /** diff --git a/src/lib/openapi/identity/models/ResourceMetadata.ts b/src/lib/openapi/identity/models/ResourceMetadata.ts new file mode 100644 index 0000000..9ecf231 --- /dev/null +++ b/src/lib/openapi/identity/models/ResourceMetadata.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * Resource metadata valid for all API resource reads and writes. + * @export + * @interface ResourceMetadata + */ +export interface ResourceMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof ResourceMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof ResourceMetadata + */ + description?: string; +} + +/** + * Check if a given object implements the ResourceMetadata interface. + */ +export function instanceOfResourceMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function ResourceMetadataFromJSON(json: any): ResourceMetadata { + return ResourceMetadataFromJSONTyped(json, false); +} + +export function ResourceMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + }; +} + +export function ResourceMetadataToJSON(value?: ResourceMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + }; +} + diff --git a/src/lib/openapi/identity/models/ResourceProvisioningStatus.ts b/src/lib/openapi/identity/models/ResourceProvisioningStatus.ts new file mode 100644 index 0000000..662f074 --- /dev/null +++ b/src/lib/openapi/identity/models/ResourceProvisioningStatus.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The provisioning state of a resource. + * @export + */ +export const ResourceProvisioningStatus = { + Unknown: 'unknown', + Provisioning: 'provisioning', + Provisioned: 'provisioned', + Deprovisioning: 'deprovisioning', + Error: 'error' +} as const; +export type ResourceProvisioningStatus = typeof ResourceProvisioningStatus[keyof typeof ResourceProvisioningStatus]; + + +export function ResourceProvisioningStatusFromJSON(json: any): ResourceProvisioningStatus { + return ResourceProvisioningStatusFromJSONTyped(json, false); +} + +export function ResourceProvisioningStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceProvisioningStatus { + return json as ResourceProvisioningStatus; +} + +export function ResourceProvisioningStatusToJSON(value?: ResourceProvisioningStatus | null): any { + return value as any; +} + diff --git a/src/lib/openapi/identity/models/ResourceReadMetadata.ts b/src/lib/openapi/identity/models/ResourceReadMetadata.ts new file mode 100644 index 0000000..a7c9da9 --- /dev/null +++ b/src/lib/openapi/identity/models/ResourceReadMetadata.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceProvisioningStatus } from './ResourceProvisioningStatus'; +import { + ResourceProvisioningStatusFromJSON, + ResourceProvisioningStatusFromJSONTyped, + ResourceProvisioningStatusToJSON, +} from './ResourceProvisioningStatus'; + +/** + * Resource metadata valid for all reads. + * @export + * @interface ResourceReadMetadata + */ +export interface ResourceReadMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof ResourceReadMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof ResourceReadMetadata + */ + description?: string; + /** + * The unique resource ID. + * @type {string} + * @memberof ResourceReadMetadata + */ + id: string; + /** + * The time the resource was created. + * @type {Date} + * @memberof ResourceReadMetadata + */ + creationTime: Date; + /** + * The time the resource was deleted. + * @type {Date} + * @memberof ResourceReadMetadata + */ + deletionTime?: Date; + /** + * + * @type {ResourceProvisioningStatus} + * @memberof ResourceReadMetadata + */ + provisioningStatus: ResourceProvisioningStatus; +} + +/** + * Check if a given object implements the ResourceReadMetadata interface. + */ +export function instanceOfResourceReadMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "creationTime" in value; + isInstance = isInstance && "provisioningStatus" in value; + + return isInstance; +} + +export function ResourceReadMetadataFromJSON(json: any): ResourceReadMetadata { + return ResourceReadMetadataFromJSONTyped(json, false); +} + +export function ResourceReadMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceReadMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'id': json['id'], + 'creationTime': (new Date(json['creationTime'])), + 'deletionTime': !exists(json, 'deletionTime') ? undefined : (new Date(json['deletionTime'])), + 'provisioningStatus': ResourceProvisioningStatusFromJSON(json['provisioningStatus']), + }; +} + +export function ResourceReadMetadataToJSON(value?: ResourceReadMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'id': value.id, + 'creationTime': (value.creationTime.toISOString()), + 'deletionTime': value.deletionTime === undefined ? undefined : (value.deletionTime.toISOString()), + 'provisioningStatus': ResourceProvisioningStatusToJSON(value.provisioningStatus), + }; +} + diff --git a/src/lib/openapi/identity/models/ResourceWriteMetadata.ts b/src/lib/openapi/identity/models/ResourceWriteMetadata.ts new file mode 100644 index 0000000..b4485fa --- /dev/null +++ b/src/lib/openapi/identity/models/ResourceWriteMetadata.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * Resource metadata valid for all API resource reads and writes. + * @export + * @interface ResourceWriteMetadata + */ +export interface ResourceWriteMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof ResourceWriteMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof ResourceWriteMetadata + */ + description?: string; +} + +/** + * Check if a given object implements the ResourceWriteMetadata interface. + */ +export function instanceOfResourceWriteMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function ResourceWriteMetadataFromJSON(json: any): ResourceWriteMetadata { + return ResourceWriteMetadataFromJSONTyped(json, false); +} + +export function ResourceWriteMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceWriteMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + }; +} + +export function ResourceWriteMetadataToJSON(value?: ResourceWriteMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + }; +} + diff --git a/src/lib/openapi/identity/models/SystemOauth2ProviderRead.ts b/src/lib/openapi/identity/models/SystemOauth2ProviderRead.ts new file mode 100644 index 0000000..b46497d --- /dev/null +++ b/src/lib/openapi/identity/models/SystemOauth2ProviderRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Oauth2ProviderSpec } from './Oauth2ProviderSpec'; +import { + Oauth2ProviderSpecFromJSON, + Oauth2ProviderSpecFromJSONTyped, + Oauth2ProviderSpecToJSON, +} from './Oauth2ProviderSpec'; +import type { ResourceReadMetadata } from './ResourceReadMetadata'; +import { + ResourceReadMetadataFromJSON, + ResourceReadMetadataFromJSONTyped, + ResourceReadMetadataToJSON, +} from './ResourceReadMetadata'; + +/** + * An OAuth2 provider when read. + * @export + * @interface SystemOauth2ProviderRead + */ +export interface SystemOauth2ProviderRead { + /** + * + * @type {ResourceReadMetadata} + * @memberof SystemOauth2ProviderRead + */ + metadata: ResourceReadMetadata; + /** + * + * @type {Oauth2ProviderSpec} + * @memberof SystemOauth2ProviderRead + */ + spec: Oauth2ProviderSpec; +} + +/** + * Check if a given object implements the SystemOauth2ProviderRead interface. + */ +export function instanceOfSystemOauth2ProviderRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function SystemOauth2ProviderReadFromJSON(json: any): SystemOauth2ProviderRead { + return SystemOauth2ProviderReadFromJSONTyped(json, false); +} + +export function SystemOauth2ProviderReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemOauth2ProviderRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceReadMetadataFromJSON(json['metadata']), + 'spec': Oauth2ProviderSpecFromJSON(json['spec']), + }; +} + +export function SystemOauth2ProviderReadToJSON(value?: SystemOauth2ProviderRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceReadMetadataToJSON(value.metadata), + 'spec': Oauth2ProviderSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/identity/models/SystemOauth2Providers.ts b/src/lib/openapi/identity/models/SystemOauth2Providers.ts new file mode 100644 index 0000000..1b221d4 --- /dev/null +++ b/src/lib/openapi/identity/models/SystemOauth2Providers.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Unikorn Identity API + * The Unikorn Identity API provides an OIDC compliant interface for use with all Unikorn services and proxies. As it\'s intended use is for multi-tenant cloud deployments it acts as an aggregation layer for other 3rd party OIDC services, dispatching login requests to the required OIDC backend. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SystemOauth2ProviderRead } from './SystemOauth2ProviderRead'; +import { + SystemOauth2ProviderReadFromJSON, + SystemOauth2ProviderReadFromJSONTyped, + SystemOauth2ProviderReadToJSON, +} from './SystemOauth2ProviderRead'; + +/** + * A list of system provided oauth2 providers. + * @export + * @interface SystemOauth2Providers + */ +export interface SystemOauth2Providers extends Array { +} + +/** + * Check if a given object implements the SystemOauth2Providers interface. + */ +export function instanceOfSystemOauth2Providers(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function SystemOauth2ProvidersFromJSON(json: any): SystemOauth2Providers { + return SystemOauth2ProvidersFromJSONTyped(json, false); +} + +export function SystemOauth2ProvidersFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemOauth2Providers { + return json; +} + +export function SystemOauth2ProvidersToJSON(value?: SystemOauth2Providers | null): any { + return value; +} + diff --git a/src/lib/openapi/identity/models/index.ts b/src/lib/openapi/identity/models/index.ts index a875c65..6dc08b6 100644 --- a/src/lib/openapi/identity/models/index.ts +++ b/src/lib/openapi/identity/models/index.ts @@ -10,31 +10,43 @@ export * from './AvailableGroups'; export * from './Claim'; export * from './CodeChallengeMethod'; export * from './GrantType'; -export * from './Group'; export * from './GroupIDs'; +export * from './GroupRead'; +export * from './GroupSpec'; +export * from './GroupWrite'; export * from './Groups'; export * from './JsonWebKey'; export * from './JsonWebKeySet'; export * from './LoginRequestOptions'; export * from './Oauth2Error'; -export * from './Oauth2Provider'; -export * from './Oauth2ProviderCreate'; +export * from './Oauth2ProviderRead'; +export * from './Oauth2ProviderSpec'; export * from './Oauth2ProviderType'; +export * from './Oauth2ProviderWrite'; export * from './Oauth2Providers'; export * from './OpenidConfiguration'; -export * from './Organization'; +export * from './OrganizationRead'; +export * from './OrganizationScopedResourceReadMetadata'; +export * from './OrganizationSpec'; export * from './OrganizationType'; +export * from './OrganizationWrite'; export * from './Organizations'; -export * from './Project'; -export * from './ProjectMetadata'; +export * from './ProjectRead'; export * from './ProjectSpec'; +export * from './ProjectWrite'; export * from './Projects'; export * from './ProviderGroupList'; export * from './ProviderScope'; +export * from './ResourceMetadata'; +export * from './ResourceProvisioningStatus'; +export * from './ResourceReadMetadata'; +export * from './ResourceWriteMetadata'; export * from './ResponseType'; export * from './RoleList'; export * from './Scope'; export * from './SigningAlgorithm'; +export * from './SystemOauth2ProviderRead'; +export * from './SystemOauth2Providers'; export * from './Token'; export * from './TokenRequestOptions'; export * from './UserList'; diff --git a/src/lib/openapi/server/.openapi-generator/FILES b/src/lib/openapi/server/.openapi-generator/FILES index 60b69a8..ca1f352 100644 --- a/src/lib/openapi/server/.openapi-generator/FILES +++ b/src/lib/openapi/server/.openapi-generator/FILES @@ -1,37 +1,42 @@ apis/DefaultApi.ts apis/index.ts index.ts -models/Application.ts models/ApplicationDependencies.ts models/ApplicationDependency.ts +models/ApplicationRead.ts models/ApplicationRecommends.ts +models/ApplicationSpec.ts models/ApplicationTags.ts models/ApplicationVersion.ts models/ApplicationVersions.ts models/Applications.ts -models/ClusterManager.ts -models/ClusterManagerMetadata.ts -models/ClusterManagerSpec.ts +models/ClusterManagerRead.ts +models/ClusterManagerWrite.ts models/ClusterManagers.ts models/Flavor.ts models/Flavors.ts models/Image.ts models/ImageVersions.ts models/Images.ts -models/KubernetesCluster.ts models/KubernetesClusterAPI.ts models/KubernetesClusterAutoscaling.ts -models/KubernetesClusterMetadata.ts models/KubernetesClusterNetwork.ts +models/KubernetesClusterRead.ts models/KubernetesClusterSpec.ts models/KubernetesClusterWorkloadPool.ts models/KubernetesClusterWorkloadPools.ts +models/KubernetesClusterWrite.ts models/KubernetesClusters.ts models/MachinePool.ts models/Oauth2Error.ts -models/Region.ts +models/OrganizationScopedResourceReadMetadata.ts +models/ProjectScopedResourceReadMetadata.ts +models/RegionRead.ts models/Regions.ts models/ResourceMetadata.ts +models/ResourceProvisioningStatus.ts +models/ResourceReadMetadata.ts +models/ResourceWriteMetadata.ts models/Volume.ts models/index.ts runtime.ts diff --git a/src/lib/openapi/server/apis/DefaultApi.ts b/src/lib/openapi/server/apis/DefaultApi.ts index c0b57ff..0dce8d1 100644 --- a/src/lib/openapi/server/apis/DefaultApi.ts +++ b/src/lib/openapi/server/apis/DefaultApi.ts @@ -16,11 +16,11 @@ import * as runtime from '../runtime'; import type { Applications, - ClusterManagerSpec, + ClusterManagerWrite, ClusterManagers, Flavors, Images, - KubernetesClusterSpec, + KubernetesClusterWrite, KubernetesClusters, Oauth2Error, Regions, @@ -28,16 +28,16 @@ import type { import { ApplicationsFromJSON, ApplicationsToJSON, - ClusterManagerSpecFromJSON, - ClusterManagerSpecToJSON, + ClusterManagerWriteFromJSON, + ClusterManagerWriteToJSON, ClusterManagersFromJSON, ClusterManagersToJSON, FlavorsFromJSON, FlavorsToJSON, ImagesFromJSON, ImagesToJSON, - KubernetesClusterSpecFromJSON, - KubernetesClusterSpecToJSON, + KubernetesClusterWriteFromJSON, + KubernetesClusterWriteToJSON, KubernetesClustersFromJSON, KubernetesClustersToJSON, Oauth2ErrorFromJSON, @@ -46,64 +46,64 @@ import { RegionsToJSON, } from '../models/index'; -export interface ApiV1OrganizationsOrganizationClustermanagersGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDClustermanagersGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationClustersGetRequest { - organization: string; +export interface ApiV1OrganizationsOrganizationIDClustersGetRequest { + organizationID: string; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDeleteRequest { - organization: string; - project: string; - clusterManager: string; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDeleteRequest { + organizationID: string; + projectID: string; + clusterManagerID: string; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPutRequest { - organization: string; - project: string; - clusterManager: string; - clusterManagerSpec: ClusterManagerSpec; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPutRequest { + organizationID: string; + projectID: string; + clusterManagerID: string; + clusterManagerWrite: ClusterManagerWrite; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustermanagersPostRequest { - organization: string; - project: string; - clusterManagerSpec: ClusterManagerSpec; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPostRequest { + organizationID: string; + projectID: string; + clusterManagerWrite: ClusterManagerWrite; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustersClusterDeleteRequest { - organization: string; - project: string; - cluster: string; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDeleteRequest { + organizationID: string; + projectID: string; + clusterID: string; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGetRequest { - organization: string; - project: string; - cluster: string; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGetRequest { + organizationID: string; + projectID: string; + clusterID: string; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustersClusterPutRequest { - organization: string; - project: string; - cluster: string; - kubernetesClusterSpec: KubernetesClusterSpec; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPutRequest { + organizationID: string; + projectID: string; + clusterID: string; + kubernetesClusterWrite: KubernetesClusterWrite; } -export interface ApiV1OrganizationsOrganizationProjectsProjectClustersPostRequest { - organization: string; - project: string; - kubernetesClusterSpec: KubernetesClusterSpec; +export interface ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersPostRequest { + organizationID: string; + projectID: string; + kubernetesClusterWrite: KubernetesClusterWrite; } -export interface ApiV1RegionsRegionNameFlavorsGetRequest { - regionName: string; +export interface ApiV1RegionsRegionIDFlavorsGetRequest { + regionID: string; } -export interface ApiV1RegionsRegionNameImagesGetRequest { - regionName: string; +export interface ApiV1RegionsRegionIDImagesGetRequest { + regionID: string; } /** @@ -145,9 +145,9 @@ export class DefaultApi extends runtime.BaseAPI { /** * Lists cluster managers within the organization. */ - async apiV1OrganizationsOrganizationClustermanagersGetRaw(requestParameters: ApiV1OrganizationsOrganizationClustermanagersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationClustermanagersGet.'); + async apiV1OrganizationsOrganizationIDClustermanagersGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDClustermanagersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDClustermanagersGet.'); } const queryParameters: any = {}; @@ -160,7 +160,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/clustermanagers`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/clustermanagers`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -172,17 +172,17 @@ export class DefaultApi extends runtime.BaseAPI { /** * Lists cluster managers within the organization. */ - async apiV1OrganizationsOrganizationClustermanagersGet(requestParameters: ApiV1OrganizationsOrganizationClustermanagersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationClustermanagersGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDClustermanagersGet(requestParameters: ApiV1OrganizationsOrganizationIDClustermanagersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDClustermanagersGetRaw(requestParameters, initOverrides); return await response.value(); } /** * List all clusters within the organization. */ - async apiV1OrganizationsOrganizationClustersGetRaw(requestParameters: ApiV1OrganizationsOrganizationClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationClustersGet.'); + async apiV1OrganizationsOrganizationIDClustersGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDClustersGet.'); } const queryParameters: any = {}; @@ -195,7 +195,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/clusters`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))), + path: `/api/v1/organizations/{organizationID}/clusters`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -207,25 +207,25 @@ export class DefaultApi extends runtime.BaseAPI { /** * List all clusters within the organization. */ - async apiV1OrganizationsOrganizationClustersGet(requestParameters: ApiV1OrganizationsOrganizationClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1OrganizationsOrganizationClustersGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDClustersGet(requestParameters: ApiV1OrganizationsOrganizationIDClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1OrganizationsOrganizationIDClustersGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Deletes a cluster manager from within the scoped project. This is a cascading operation and will delete all contained clusters. */ - async apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDelete.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDelete.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDelete.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDelete.'); } - if (requestParameters.clusterManager === null || requestParameters.clusterManager === undefined) { - throw new runtime.RequiredError('clusterManager','Required parameter requestParameters.clusterManager was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDelete.'); + if (requestParameters.clusterManagerID === null || requestParameters.clusterManagerID === undefined) { + throw new runtime.RequiredError('clusterManagerID','Required parameter requestParameters.clusterManagerID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDelete.'); } const queryParameters: any = {}; @@ -238,7 +238,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clustermanagers/{clusterManager}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"clusterManager"}}`, encodeURIComponent(String(requestParameters.clusterManager))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clustermanagers/{clusterManagerID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))).replace(`{${"clusterManagerID"}}`, encodeURIComponent(String(requestParameters.clusterManagerID))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -250,28 +250,28 @@ export class DefaultApi extends runtime.BaseAPI { /** * Deletes a cluster manager from within the scoped project. This is a cascading operation and will delete all contained clusters. */ - async apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDelete(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDeleteRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDelete(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDeleteRaw(requestParameters, initOverrides); } /** * Updates a cluster manager within the scoped project. */ - async apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPutRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPut.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPutRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPut.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPut.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPut.'); } - if (requestParameters.clusterManager === null || requestParameters.clusterManager === undefined) { - throw new runtime.RequiredError('clusterManager','Required parameter requestParameters.clusterManager was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPut.'); + if (requestParameters.clusterManagerID === null || requestParameters.clusterManagerID === undefined) { + throw new runtime.RequiredError('clusterManagerID','Required parameter requestParameters.clusterManagerID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPut.'); } - if (requestParameters.clusterManagerSpec === null || requestParameters.clusterManagerSpec === undefined) { - throw new runtime.RequiredError('clusterManagerSpec','Required parameter requestParameters.clusterManagerSpec was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPut.'); + if (requestParameters.clusterManagerWrite === null || requestParameters.clusterManagerWrite === undefined) { + throw new runtime.RequiredError('clusterManagerWrite','Required parameter requestParameters.clusterManagerWrite was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPut.'); } const queryParameters: any = {}; @@ -286,11 +286,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clustermanagers/{clusterManager}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"clusterManager"}}`, encodeURIComponent(String(requestParameters.clusterManager))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clustermanagers/{clusterManagerID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))).replace(`{${"clusterManagerID"}}`, encodeURIComponent(String(requestParameters.clusterManagerID))), method: 'PUT', headers: headerParameters, query: queryParameters, - body: ClusterManagerSpecToJSON(requestParameters.clusterManagerSpec), + body: ClusterManagerWriteToJSON(requestParameters.clusterManagerWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -299,24 +299,24 @@ export class DefaultApi extends runtime.BaseAPI { /** * Updates a cluster manager within the scoped project. */ - async apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPut(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerPutRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPut(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDPutRaw(requestParameters, initOverrides); } /** * Creates a new cluster manager within the project. */ - async apiV1OrganizationsOrganizationProjectsProjectClustermanagersPostRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustermanagersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersPost.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPostRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPost.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersPost.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPost.'); } - if (requestParameters.clusterManagerSpec === null || requestParameters.clusterManagerSpec === undefined) { - throw new runtime.RequiredError('clusterManagerSpec','Required parameter requestParameters.clusterManagerSpec was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustermanagersPost.'); + if (requestParameters.clusterManagerWrite === null || requestParameters.clusterManagerWrite === undefined) { + throw new runtime.RequiredError('clusterManagerWrite','Required parameter requestParameters.clusterManagerWrite was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPost.'); } const queryParameters: any = {}; @@ -331,11 +331,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clustermanagers`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clustermanagers`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))), method: 'POST', headers: headerParameters, query: queryParameters, - body: ClusterManagerSpecToJSON(requestParameters.clusterManagerSpec), + body: ClusterManagerWriteToJSON(requestParameters.clusterManagerWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -344,24 +344,24 @@ export class DefaultApi extends runtime.BaseAPI { /** * Creates a new cluster manager within the project. */ - async apiV1OrganizationsOrganizationProjectsProjectClustermanagersPost(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustermanagersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustermanagersPostRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPost(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersPostRaw(requestParameters, initOverrides); } /** * Delete a cluster from within a the selected cluster manager. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersClusterDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersClusterDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterDelete.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDeleteRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDelete.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterDelete.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDelete.'); } - if (requestParameters.cluster === null || requestParameters.cluster === undefined) { - throw new runtime.RequiredError('cluster','Required parameter requestParameters.cluster was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterDelete.'); + if (requestParameters.clusterID === null || requestParameters.clusterID === undefined) { + throw new runtime.RequiredError('clusterID','Required parameter requestParameters.clusterID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDelete.'); } const queryParameters: any = {}; @@ -374,7 +374,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clusters/{cluster}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"cluster"}}`, encodeURIComponent(String(requestParameters.cluster))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clusters/{clusterID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))).replace(`{${"clusterID"}}`, encodeURIComponent(String(requestParameters.clusterID))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -386,24 +386,24 @@ export class DefaultApi extends runtime.BaseAPI { /** * Delete a cluster from within a the selected cluster manager. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersClusterDelete(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersClusterDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustersClusterDeleteRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDelete(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDeleteRaw(requestParameters, initOverrides); } /** * Get a cluster\'s Kubernetes configuration. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGetRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGet.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGetRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGet.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGet.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGet.'); } - if (requestParameters.cluster === null || requestParameters.cluster === undefined) { - throw new runtime.RequiredError('cluster','Required parameter requestParameters.cluster was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGet.'); + if (requestParameters.clusterID === null || requestParameters.clusterID === undefined) { + throw new runtime.RequiredError('clusterID','Required parameter requestParameters.clusterID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGet.'); } const queryParameters: any = {}; @@ -416,7 +416,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clusters/{cluster}/kubeconfig`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"cluster"}}`, encodeURIComponent(String(requestParameters.cluster))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clusters/{clusterID}/kubeconfig`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))).replace(`{${"clusterID"}}`, encodeURIComponent(String(requestParameters.clusterID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -428,28 +428,28 @@ export class DefaultApi extends runtime.BaseAPI { /** * Get a cluster\'s Kubernetes configuration. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGet(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGetRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGet(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGetRaw(requestParameters, initOverrides); } /** * Update a cluster within the selected cluster manager. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersClusterPutRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersClusterPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterPut.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPutRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPut.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterPut.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPut.'); } - if (requestParameters.cluster === null || requestParameters.cluster === undefined) { - throw new runtime.RequiredError('cluster','Required parameter requestParameters.cluster was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterPut.'); + if (requestParameters.clusterID === null || requestParameters.clusterID === undefined) { + throw new runtime.RequiredError('clusterID','Required parameter requestParameters.clusterID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPut.'); } - if (requestParameters.kubernetesClusterSpec === null || requestParameters.kubernetesClusterSpec === undefined) { - throw new runtime.RequiredError('kubernetesClusterSpec','Required parameter requestParameters.kubernetesClusterSpec was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersClusterPut.'); + if (requestParameters.kubernetesClusterWrite === null || requestParameters.kubernetesClusterWrite === undefined) { + throw new runtime.RequiredError('kubernetesClusterWrite','Required parameter requestParameters.kubernetesClusterWrite was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPut.'); } const queryParameters: any = {}; @@ -464,11 +464,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clusters/{cluster}`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"cluster"}}`, encodeURIComponent(String(requestParameters.cluster))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clusters/{clusterID}`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))).replace(`{${"clusterID"}}`, encodeURIComponent(String(requestParameters.clusterID))), method: 'PUT', headers: headerParameters, query: queryParameters, - body: KubernetesClusterSpecToJSON(requestParameters.kubernetesClusterSpec), + body: KubernetesClusterWriteToJSON(requestParameters.kubernetesClusterWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -477,24 +477,24 @@ export class DefaultApi extends runtime.BaseAPI { /** * Update a cluster within the selected cluster manager. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersClusterPut(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersClusterPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustersClusterPutRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPut(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDPutRaw(requestParameters, initOverrides); } /** * Creates a new cluster within the selected cluster manager. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersPostRaw(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.organization === null || requestParameters.organization === undefined) { - throw new runtime.RequiredError('organization','Required parameter requestParameters.organization was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersPost.'); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersPostRaw(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.organizationID === null || requestParameters.organizationID === undefined) { + throw new runtime.RequiredError('organizationID','Required parameter requestParameters.organizationID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersPost.'); } - if (requestParameters.project === null || requestParameters.project === undefined) { - throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersPost.'); + if (requestParameters.projectID === null || requestParameters.projectID === undefined) { + throw new runtime.RequiredError('projectID','Required parameter requestParameters.projectID was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersPost.'); } - if (requestParameters.kubernetesClusterSpec === null || requestParameters.kubernetesClusterSpec === undefined) { - throw new runtime.RequiredError('kubernetesClusterSpec','Required parameter requestParameters.kubernetesClusterSpec was null or undefined when calling apiV1OrganizationsOrganizationProjectsProjectClustersPost.'); + if (requestParameters.kubernetesClusterWrite === null || requestParameters.kubernetesClusterWrite === undefined) { + throw new runtime.RequiredError('kubernetesClusterWrite','Required parameter requestParameters.kubernetesClusterWrite was null or undefined when calling apiV1OrganizationsOrganizationIDProjectsProjectIDClustersPost.'); } const queryParameters: any = {}; @@ -509,11 +509,11 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/organizations/{organization}/projects/{project}/clusters`.replace(`{${"organization"}}`, encodeURIComponent(String(requestParameters.organization))).replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))), + path: `/api/v1/organizations/{organizationID}/projects/{projectID}/clusters`.replace(`{${"organizationID"}}`, encodeURIComponent(String(requestParameters.organizationID))).replace(`{${"projectID"}}`, encodeURIComponent(String(requestParameters.projectID))), method: 'POST', headers: headerParameters, query: queryParameters, - body: KubernetesClusterSpecToJSON(requestParameters.kubernetesClusterSpec), + body: KubernetesClusterWriteToJSON(requestParameters.kubernetesClusterWrite), }, initOverrides); return new runtime.VoidApiResponse(response); @@ -522,8 +522,8 @@ export class DefaultApi extends runtime.BaseAPI { /** * Creates a new cluster within the selected cluster manager. */ - async apiV1OrganizationsOrganizationProjectsProjectClustersPost(requestParameters: ApiV1OrganizationsOrganizationProjectsProjectClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiV1OrganizationsOrganizationProjectsProjectClustersPostRaw(requestParameters, initOverrides); + async apiV1OrganizationsOrganizationIDProjectsProjectIDClustersPost(requestParameters: ApiV1OrganizationsOrganizationIDProjectsProjectIDClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiV1OrganizationsOrganizationIDProjectsProjectIDClustersPostRaw(requestParameters, initOverrides); } /** @@ -560,9 +560,9 @@ export class DefaultApi extends runtime.BaseAPI { /** * Lists all compute flavors that the authenticated user has access to */ - async apiV1RegionsRegionNameFlavorsGetRaw(requestParameters: ApiV1RegionsRegionNameFlavorsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.regionName === null || requestParameters.regionName === undefined) { - throw new runtime.RequiredError('regionName','Required parameter requestParameters.regionName was null or undefined when calling apiV1RegionsRegionNameFlavorsGet.'); + async apiV1RegionsRegionIDFlavorsGetRaw(requestParameters: ApiV1RegionsRegionIDFlavorsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.regionID === null || requestParameters.regionID === undefined) { + throw new runtime.RequiredError('regionID','Required parameter requestParameters.regionID was null or undefined when calling apiV1RegionsRegionIDFlavorsGet.'); } const queryParameters: any = {}; @@ -575,7 +575,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/regions/{regionName}/flavors`.replace(`{${"regionName"}}`, encodeURIComponent(String(requestParameters.regionName))), + path: `/api/v1/regions/{regionID}/flavors`.replace(`{${"regionID"}}`, encodeURIComponent(String(requestParameters.regionID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -587,17 +587,17 @@ export class DefaultApi extends runtime.BaseAPI { /** * Lists all compute flavors that the authenticated user has access to */ - async apiV1RegionsRegionNameFlavorsGet(requestParameters: ApiV1RegionsRegionNameFlavorsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1RegionsRegionNameFlavorsGetRaw(requestParameters, initOverrides); + async apiV1RegionsRegionIDFlavorsGet(requestParameters: ApiV1RegionsRegionIDFlavorsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1RegionsRegionIDFlavorsGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Lists all compute images that the authenticated user has access to. */ - async apiV1RegionsRegionNameImagesGetRaw(requestParameters: ApiV1RegionsRegionNameImagesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.regionName === null || requestParameters.regionName === undefined) { - throw new runtime.RequiredError('regionName','Required parameter requestParameters.regionName was null or undefined when calling apiV1RegionsRegionNameImagesGet.'); + async apiV1RegionsRegionIDImagesGetRaw(requestParameters: ApiV1RegionsRegionIDImagesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.regionID === null || requestParameters.regionID === undefined) { + throw new runtime.RequiredError('regionID','Required parameter requestParameters.regionID was null or undefined when calling apiV1RegionsRegionIDImagesGet.'); } const queryParameters: any = {}; @@ -610,7 +610,7 @@ export class DefaultApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/api/v1/regions/{regionName}/images`.replace(`{${"regionName"}}`, encodeURIComponent(String(requestParameters.regionName))), + path: `/api/v1/regions/{regionID}/images`.replace(`{${"regionID"}}`, encodeURIComponent(String(requestParameters.regionID))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -622,8 +622,8 @@ export class DefaultApi extends runtime.BaseAPI { /** * Lists all compute images that the authenticated user has access to. */ - async apiV1RegionsRegionNameImagesGet(requestParameters: ApiV1RegionsRegionNameImagesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.apiV1RegionsRegionNameImagesGetRaw(requestParameters, initOverrides); + async apiV1RegionsRegionIDImagesGet(requestParameters: ApiV1RegionsRegionIDImagesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiV1RegionsRegionIDImagesGetRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/src/lib/openapi/server/models/ApplicationRead.ts b/src/lib/openapi/server/models/ApplicationRead.ts new file mode 100644 index 0000000..c01ef6e --- /dev/null +++ b/src/lib/openapi/server/models/ApplicationRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ApplicationSpec } from './ApplicationSpec'; +import { + ApplicationSpecFromJSON, + ApplicationSpecFromJSONTyped, + ApplicationSpecToJSON, +} from './ApplicationSpec'; +import type { ResourceReadMetadata } from './ResourceReadMetadata'; +import { + ResourceReadMetadataFromJSON, + ResourceReadMetadataFromJSONTyped, + ResourceReadMetadataToJSON, +} from './ResourceReadMetadata'; + +/** + * + * @export + * @interface ApplicationRead + */ +export interface ApplicationRead { + /** + * + * @type {ResourceReadMetadata} + * @memberof ApplicationRead + */ + metadata: ResourceReadMetadata; + /** + * + * @type {ApplicationSpec} + * @memberof ApplicationRead + */ + spec: ApplicationSpec; +} + +/** + * Check if a given object implements the ApplicationRead interface. + */ +export function instanceOfApplicationRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function ApplicationReadFromJSON(json: any): ApplicationRead { + return ApplicationReadFromJSONTyped(json, false); +} + +export function ApplicationReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceReadMetadataFromJSON(json['metadata']), + 'spec': ApplicationSpecFromJSON(json['spec']), + }; +} + +export function ApplicationReadToJSON(value?: ApplicationRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceReadMetadataToJSON(value.metadata), + 'spec': ApplicationSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/server/models/ApplicationSpec.ts b/src/lib/openapi/server/models/ApplicationSpec.ts new file mode 100644 index 0000000..0ad81aa --- /dev/null +++ b/src/lib/openapi/server/models/ApplicationSpec.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ApplicationTags } from './ApplicationTags'; +import { + ApplicationTagsFromJSON, + ApplicationTagsFromJSONTyped, + ApplicationTagsToJSON, +} from './ApplicationTags'; +import type { ApplicationVersions } from './ApplicationVersions'; +import { + ApplicationVersionsFromJSON, + ApplicationVersionsFromJSONTyped, + ApplicationVersionsToJSON, +} from './ApplicationVersions'; + +/** + * An application. + * @export + * @interface ApplicationSpec + */ +export interface ApplicationSpec { + /** + * Human readable application name. + * @type {string} + * @memberof ApplicationSpec + */ + humanReadableName: string; + /** + * Documentation link for the application. + * @type {string} + * @memberof ApplicationSpec + */ + documentation: string; + /** + * The license under which the application is released. + * @type {string} + * @memberof ApplicationSpec + */ + license: string; + /** + * A base64 encoded SVG icon. This should work in both light and dark themes. + * @type {string} + * @memberof ApplicationSpec + */ + icon: string; + /** + * + * @type {ApplicationVersions} + * @memberof ApplicationSpec + */ + versions: ApplicationVersions; + /** + * + * @type {ApplicationTags} + * @memberof ApplicationSpec + */ + tags?: ApplicationTags; +} + +/** + * Check if a given object implements the ApplicationSpec interface. + */ +export function instanceOfApplicationSpec(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "humanReadableName" in value; + isInstance = isInstance && "documentation" in value; + isInstance = isInstance && "license" in value; + isInstance = isInstance && "icon" in value; + isInstance = isInstance && "versions" in value; + + return isInstance; +} + +export function ApplicationSpecFromJSON(json: any): ApplicationSpec { + return ApplicationSpecFromJSONTyped(json, false); +} + +export function ApplicationSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationSpec { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'humanReadableName': json['humanReadableName'], + 'documentation': json['documentation'], + 'license': json['license'], + 'icon': json['icon'], + 'versions': ApplicationVersionsFromJSON(json['versions']), + 'tags': !exists(json, 'tags') ? undefined : ApplicationTagsFromJSON(json['tags']), + }; +} + +export function ApplicationSpecToJSON(value?: ApplicationSpec | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'humanReadableName': value.humanReadableName, + 'documentation': value.documentation, + 'license': value.license, + 'icon': value.icon, + 'versions': ApplicationVersionsToJSON(value.versions), + 'tags': ApplicationTagsToJSON(value.tags), + }; +} + diff --git a/src/lib/openapi/server/models/Applications.ts b/src/lib/openapi/server/models/Applications.ts index dac2817..357bf27 100644 --- a/src/lib/openapi/server/models/Applications.ts +++ b/src/lib/openapi/server/models/Applications.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { Application } from './Application'; +import type { ApplicationRead } from './ApplicationRead'; import { - ApplicationFromJSON, - ApplicationFromJSONTyped, - ApplicationToJSON, -} from './Application'; + ApplicationReadFromJSON, + ApplicationReadFromJSONTyped, + ApplicationReadToJSON, +} from './ApplicationRead'; /** * A list of appications. * @export * @interface Applications */ -export interface Applications extends Array { +export interface Applications extends Array { } /** diff --git a/src/lib/openapi/server/models/ClusterManagerRead.ts b/src/lib/openapi/server/models/ClusterManagerRead.ts new file mode 100644 index 0000000..6032111 --- /dev/null +++ b/src/lib/openapi/server/models/ClusterManagerRead.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ProjectScopedResourceReadMetadata } from './ProjectScopedResourceReadMetadata'; +import { + ProjectScopedResourceReadMetadataFromJSON, + ProjectScopedResourceReadMetadataFromJSONTyped, + ProjectScopedResourceReadMetadataToJSON, +} from './ProjectScopedResourceReadMetadata'; + +/** + * A cluster manager. + * @export + * @interface ClusterManagerRead + */ +export interface ClusterManagerRead { + /** + * + * @type {ProjectScopedResourceReadMetadata} + * @memberof ClusterManagerRead + */ + metadata: ProjectScopedResourceReadMetadata; +} + +/** + * Check if a given object implements the ClusterManagerRead interface. + */ +export function instanceOfClusterManagerRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + + return isInstance; +} + +export function ClusterManagerReadFromJSON(json: any): ClusterManagerRead { + return ClusterManagerReadFromJSONTyped(json, false); +} + +export function ClusterManagerReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterManagerRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ProjectScopedResourceReadMetadataFromJSON(json['metadata']), + }; +} + +export function ClusterManagerReadToJSON(value?: ClusterManagerRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ProjectScopedResourceReadMetadataToJSON(value.metadata), + }; +} + diff --git a/src/lib/openapi/server/models/ClusterManagerWrite.ts b/src/lib/openapi/server/models/ClusterManagerWrite.ts new file mode 100644 index 0000000..c5e2535 --- /dev/null +++ b/src/lib/openapi/server/models/ClusterManagerWrite.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceWriteMetadata } from './ResourceWriteMetadata'; +import { + ResourceWriteMetadataFromJSON, + ResourceWriteMetadataFromJSONTyped, + ResourceWriteMetadataToJSON, +} from './ResourceWriteMetadata'; + +/** + * A cluster manager. + * @export + * @interface ClusterManagerWrite + */ +export interface ClusterManagerWrite { + /** + * + * @type {ResourceWriteMetadata} + * @memberof ClusterManagerWrite + */ + metadata: ResourceWriteMetadata; +} + +/** + * Check if a given object implements the ClusterManagerWrite interface. + */ +export function instanceOfClusterManagerWrite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + + return isInstance; +} + +export function ClusterManagerWriteFromJSON(json: any): ClusterManagerWrite { + return ClusterManagerWriteFromJSONTyped(json, false); +} + +export function ClusterManagerWriteFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterManagerWrite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceWriteMetadataFromJSON(json['metadata']), + }; +} + +export function ClusterManagerWriteToJSON(value?: ClusterManagerWrite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceWriteMetadataToJSON(value.metadata), + }; +} + diff --git a/src/lib/openapi/server/models/ClusterManagers.ts b/src/lib/openapi/server/models/ClusterManagers.ts index 2b5442f..a44a0f4 100644 --- a/src/lib/openapi/server/models/ClusterManagers.ts +++ b/src/lib/openapi/server/models/ClusterManagers.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { ClusterManager } from './ClusterManager'; +import type { ClusterManagerRead } from './ClusterManagerRead'; import { - ClusterManagerFromJSON, - ClusterManagerFromJSONTyped, - ClusterManagerToJSON, -} from './ClusterManager'; + ClusterManagerReadFromJSON, + ClusterManagerReadFromJSONTyped, + ClusterManagerReadToJSON, +} from './ClusterManagerRead'; /** * A list of cluster managers. * @export * @interface ClusterManagers */ -export interface ClusterManagers extends Array { +export interface ClusterManagers extends Array { } /** diff --git a/src/lib/openapi/server/models/KubernetesClusterRead.ts b/src/lib/openapi/server/models/KubernetesClusterRead.ts new file mode 100644 index 0000000..f7c66fe --- /dev/null +++ b/src/lib/openapi/server/models/KubernetesClusterRead.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { KubernetesClusterSpec } from './KubernetesClusterSpec'; +import { + KubernetesClusterSpecFromJSON, + KubernetesClusterSpecFromJSONTyped, + KubernetesClusterSpecToJSON, +} from './KubernetesClusterSpec'; +import type { ProjectScopedResourceReadMetadata } from './ProjectScopedResourceReadMetadata'; +import { + ProjectScopedResourceReadMetadataFromJSON, + ProjectScopedResourceReadMetadataFromJSONTyped, + ProjectScopedResourceReadMetadataToJSON, +} from './ProjectScopedResourceReadMetadata'; + +/** + * Kubernetes cluster read. + * @export + * @interface KubernetesClusterRead + */ +export interface KubernetesClusterRead { + /** + * + * @type {ProjectScopedResourceReadMetadata} + * @memberof KubernetesClusterRead + */ + metadata: ProjectScopedResourceReadMetadata; + /** + * + * @type {KubernetesClusterSpec} + * @memberof KubernetesClusterRead + */ + spec: KubernetesClusterSpec; +} + +/** + * Check if a given object implements the KubernetesClusterRead interface. + */ +export function instanceOfKubernetesClusterRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function KubernetesClusterReadFromJSON(json: any): KubernetesClusterRead { + return KubernetesClusterReadFromJSONTyped(json, false); +} + +export function KubernetesClusterReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): KubernetesClusterRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ProjectScopedResourceReadMetadataFromJSON(json['metadata']), + 'spec': KubernetesClusterSpecFromJSON(json['spec']), + }; +} + +export function KubernetesClusterReadToJSON(value?: KubernetesClusterRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ProjectScopedResourceReadMetadataToJSON(value.metadata), + 'spec': KubernetesClusterSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/server/models/KubernetesClusterSpec.ts b/src/lib/openapi/server/models/KubernetesClusterSpec.ts index e0e75ef..7048aa8 100644 --- a/src/lib/openapi/server/models/KubernetesClusterSpec.ts +++ b/src/lib/openapi/server/models/KubernetesClusterSpec.ts @@ -26,12 +26,6 @@ import { * @interface KubernetesClusterSpec */ export interface KubernetesClusterSpec { - /** - * Cluster name. - * @type {string} - * @memberof KubernetesClusterSpec - */ - name: string; /** * The region to provision the cluster in. * @type {string} @@ -64,7 +58,6 @@ export interface KubernetesClusterSpec { */ export function instanceOfKubernetesClusterSpec(value: object): boolean { let isInstance = true; - isInstance = isInstance && "name" in value; isInstance = isInstance && "region" in value; isInstance = isInstance && "version" in value; isInstance = isInstance && "workloadPools" in value; @@ -82,7 +75,6 @@ export function KubernetesClusterSpecFromJSONTyped(json: any, ignoreDiscriminato } return { - 'name': json['name'], 'region': json['region'], 'clusterManager': !exists(json, 'clusterManager') ? undefined : json['clusterManager'], 'version': json['version'], @@ -99,7 +91,6 @@ export function KubernetesClusterSpecToJSON(value?: KubernetesClusterSpec | null } return { - 'name': value.name, 'region': value.region, 'clusterManager': value.clusterManager, 'version': value.version, diff --git a/src/lib/openapi/server/models/KubernetesClusterWrite.ts b/src/lib/openapi/server/models/KubernetesClusterWrite.ts new file mode 100644 index 0000000..b292ba8 --- /dev/null +++ b/src/lib/openapi/server/models/KubernetesClusterWrite.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { KubernetesClusterSpec } from './KubernetesClusterSpec'; +import { + KubernetesClusterSpecFromJSON, + KubernetesClusterSpecFromJSONTyped, + KubernetesClusterSpecToJSON, +} from './KubernetesClusterSpec'; +import type { ResourceWriteMetadata } from './ResourceWriteMetadata'; +import { + ResourceWriteMetadataFromJSON, + ResourceWriteMetadataFromJSONTyped, + ResourceWriteMetadataToJSON, +} from './ResourceWriteMetadata'; + +/** + * Kubernetes cluster create or update. + * @export + * @interface KubernetesClusterWrite + */ +export interface KubernetesClusterWrite { + /** + * + * @type {ResourceWriteMetadata} + * @memberof KubernetesClusterWrite + */ + metadata: ResourceWriteMetadata; + /** + * + * @type {KubernetesClusterSpec} + * @memberof KubernetesClusterWrite + */ + spec: KubernetesClusterSpec; +} + +/** + * Check if a given object implements the KubernetesClusterWrite interface. + */ +export function instanceOfKubernetesClusterWrite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "spec" in value; + + return isInstance; +} + +export function KubernetesClusterWriteFromJSON(json: any): KubernetesClusterWrite { + return KubernetesClusterWriteFromJSONTyped(json, false); +} + +export function KubernetesClusterWriteFromJSONTyped(json: any, ignoreDiscriminator: boolean): KubernetesClusterWrite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceWriteMetadataFromJSON(json['metadata']), + 'spec': KubernetesClusterSpecFromJSON(json['spec']), + }; +} + +export function KubernetesClusterWriteToJSON(value?: KubernetesClusterWrite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceWriteMetadataToJSON(value.metadata), + 'spec': KubernetesClusterSpecToJSON(value.spec), + }; +} + diff --git a/src/lib/openapi/server/models/KubernetesClusters.ts b/src/lib/openapi/server/models/KubernetesClusters.ts index 639acd2..af8fd82 100644 --- a/src/lib/openapi/server/models/KubernetesClusters.ts +++ b/src/lib/openapi/server/models/KubernetesClusters.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { KubernetesCluster } from './KubernetesCluster'; +import type { KubernetesClusterRead } from './KubernetesClusterRead'; import { - KubernetesClusterFromJSON, - KubernetesClusterFromJSONTyped, - KubernetesClusterToJSON, -} from './KubernetesCluster'; + KubernetesClusterReadFromJSON, + KubernetesClusterReadFromJSONTyped, + KubernetesClusterReadToJSON, +} from './KubernetesClusterRead'; /** * A list of Kubernetes clusters. * @export * @interface KubernetesClusters */ -export interface KubernetesClusters extends Array { +export interface KubernetesClusters extends Array { } /** diff --git a/src/lib/openapi/server/models/OrganizationScopedResourceReadMetadata.ts b/src/lib/openapi/server/models/OrganizationScopedResourceReadMetadata.ts new file mode 100644 index 0000000..c735a4a --- /dev/null +++ b/src/lib/openapi/server/models/OrganizationScopedResourceReadMetadata.ts @@ -0,0 +1,126 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceProvisioningStatus } from './ResourceProvisioningStatus'; +import { + ResourceProvisioningStatusFromJSON, + ResourceProvisioningStatusFromJSONTyped, + ResourceProvisioningStatusToJSON, +} from './ResourceProvisioningStatus'; + +/** + * + * @export + * @interface OrganizationScopedResourceReadMetadata + */ +export interface OrganizationScopedResourceReadMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + description?: string; + /** + * The unique resource ID. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + id: string; + /** + * The time the resource was created. + * @type {Date} + * @memberof OrganizationScopedResourceReadMetadata + */ + creationTime: Date; + /** + * The time the resource was deleted. + * @type {Date} + * @memberof OrganizationScopedResourceReadMetadata + */ + deletionTime?: Date; + /** + * + * @type {ResourceProvisioningStatus} + * @memberof OrganizationScopedResourceReadMetadata + */ + provisioningStatus: ResourceProvisioningStatus; + /** + * The organization identifier the resource belongs to. + * @type {string} + * @memberof OrganizationScopedResourceReadMetadata + */ + organizationId: string; +} + +/** + * Check if a given object implements the OrganizationScopedResourceReadMetadata interface. + */ +export function instanceOfOrganizationScopedResourceReadMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "creationTime" in value; + isInstance = isInstance && "provisioningStatus" in value; + isInstance = isInstance && "organizationId" in value; + + return isInstance; +} + +export function OrganizationScopedResourceReadMetadataFromJSON(json: any): OrganizationScopedResourceReadMetadata { + return OrganizationScopedResourceReadMetadataFromJSONTyped(json, false); +} + +export function OrganizationScopedResourceReadMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationScopedResourceReadMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'id': json['id'], + 'creationTime': (new Date(json['creationTime'])), + 'deletionTime': !exists(json, 'deletionTime') ? undefined : (new Date(json['deletionTime'])), + 'provisioningStatus': ResourceProvisioningStatusFromJSON(json['provisioningStatus']), + 'organizationId': json['organizationId'], + }; +} + +export function OrganizationScopedResourceReadMetadataToJSON(value?: OrganizationScopedResourceReadMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'id': value.id, + 'creationTime': (value.creationTime.toISOString()), + 'deletionTime': value.deletionTime === undefined ? undefined : (value.deletionTime.toISOString()), + 'provisioningStatus': ResourceProvisioningStatusToJSON(value.provisioningStatus), + 'organizationId': value.organizationId, + }; +} + diff --git a/src/lib/openapi/server/models/ProjectScopedResourceReadMetadata.ts b/src/lib/openapi/server/models/ProjectScopedResourceReadMetadata.ts new file mode 100644 index 0000000..f1e3a7b --- /dev/null +++ b/src/lib/openapi/server/models/ProjectScopedResourceReadMetadata.ts @@ -0,0 +1,135 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceProvisioningStatus } from './ResourceProvisioningStatus'; +import { + ResourceProvisioningStatusFromJSON, + ResourceProvisioningStatusFromJSONTyped, + ResourceProvisioningStatusToJSON, +} from './ResourceProvisioningStatus'; + +/** + * + * @export + * @interface ProjectScopedResourceReadMetadata + */ +export interface ProjectScopedResourceReadMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof ProjectScopedResourceReadMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof ProjectScopedResourceReadMetadata + */ + description?: string; + /** + * The unique resource ID. + * @type {string} + * @memberof ProjectScopedResourceReadMetadata + */ + id: string; + /** + * The time the resource was created. + * @type {Date} + * @memberof ProjectScopedResourceReadMetadata + */ + creationTime: Date; + /** + * The time the resource was deleted. + * @type {Date} + * @memberof ProjectScopedResourceReadMetadata + */ + deletionTime?: Date; + /** + * + * @type {ResourceProvisioningStatus} + * @memberof ProjectScopedResourceReadMetadata + */ + provisioningStatus: ResourceProvisioningStatus; + /** + * The organization identifier the resource belongs to. + * @type {string} + * @memberof ProjectScopedResourceReadMetadata + */ + organizationId: string; + /** + * The project identifier the resource belongs to. + * @type {string} + * @memberof ProjectScopedResourceReadMetadata + */ + projectId: string; +} + +/** + * Check if a given object implements the ProjectScopedResourceReadMetadata interface. + */ +export function instanceOfProjectScopedResourceReadMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "creationTime" in value; + isInstance = isInstance && "provisioningStatus" in value; + isInstance = isInstance && "organizationId" in value; + isInstance = isInstance && "projectId" in value; + + return isInstance; +} + +export function ProjectScopedResourceReadMetadataFromJSON(json: any): ProjectScopedResourceReadMetadata { + return ProjectScopedResourceReadMetadataFromJSONTyped(json, false); +} + +export function ProjectScopedResourceReadMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectScopedResourceReadMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'id': json['id'], + 'creationTime': (new Date(json['creationTime'])), + 'deletionTime': !exists(json, 'deletionTime') ? undefined : (new Date(json['deletionTime'])), + 'provisioningStatus': ResourceProvisioningStatusFromJSON(json['provisioningStatus']), + 'organizationId': json['organizationId'], + 'projectId': json['projectId'], + }; +} + +export function ProjectScopedResourceReadMetadataToJSON(value?: ProjectScopedResourceReadMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'id': value.id, + 'creationTime': (value.creationTime.toISOString()), + 'deletionTime': value.deletionTime === undefined ? undefined : (value.deletionTime.toISOString()), + 'provisioningStatus': ResourceProvisioningStatusToJSON(value.provisioningStatus), + 'organizationId': value.organizationId, + 'projectId': value.projectId, + }; +} + diff --git a/src/lib/openapi/server/models/RegionRead.ts b/src/lib/openapi/server/models/RegionRead.ts new file mode 100644 index 0000000..abec2a3 --- /dev/null +++ b/src/lib/openapi/server/models/RegionRead.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceReadMetadata } from './ResourceReadMetadata'; +import { + ResourceReadMetadataFromJSON, + ResourceReadMetadataFromJSONTyped, + ResourceReadMetadataToJSON, +} from './ResourceReadMetadata'; + +/** + * A region. + * @export + * @interface RegionRead + */ +export interface RegionRead { + /** + * + * @type {ResourceReadMetadata} + * @memberof RegionRead + */ + metadata: ResourceReadMetadata; +} + +/** + * Check if a given object implements the RegionRead interface. + */ +export function instanceOfRegionRead(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "metadata" in value; + + return isInstance; +} + +export function RegionReadFromJSON(json: any): RegionRead { + return RegionReadFromJSONTyped(json, false); +} + +export function RegionReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegionRead { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'metadata': ResourceReadMetadataFromJSON(json['metadata']), + }; +} + +export function RegionReadToJSON(value?: RegionRead | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'metadata': ResourceReadMetadataToJSON(value.metadata), + }; +} + diff --git a/src/lib/openapi/server/models/Regions.ts b/src/lib/openapi/server/models/Regions.ts index 67765af..106d539 100644 --- a/src/lib/openapi/server/models/Regions.ts +++ b/src/lib/openapi/server/models/Regions.ts @@ -13,19 +13,19 @@ */ import { exists, mapValues } from '../runtime'; -import type { Region } from './Region'; +import type { RegionRead } from './RegionRead'; import { - RegionFromJSON, - RegionFromJSONTyped, - RegionToJSON, -} from './Region'; + RegionReadFromJSON, + RegionReadFromJSONTyped, + RegionReadToJSON, +} from './RegionRead'; /** * A list of regions. * @export * @interface Regions */ -export interface Regions extends Array { +export interface Regions extends Array { } /** diff --git a/src/lib/openapi/server/models/ResourceMetadata.ts b/src/lib/openapi/server/models/ResourceMetadata.ts index fb1317b..71d5ab6 100644 --- a/src/lib/openapi/server/models/ResourceMetadata.ts +++ b/src/lib/openapi/server/models/ResourceMetadata.ts @@ -14,53 +14,24 @@ import { exists, mapValues } from '../runtime'; /** - * A resources's metadata + * Resource metadata valid for all API resource reads and writes. * @export * @interface ResourceMetadata */ export interface ResourceMetadata { /** - * Where the resource is related to a project, this is populated. + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. * @type {string} * @memberof ResourceMetadata */ - project?: string; + name: string; /** - * Where the resource is scoped to a cluster manager, this is populated. + * The resource description, this optionally augments the name with more context. * @type {string} * @memberof ResourceMetadata */ - clustermanager?: string; - /** - * Where the resource is scoped to a region, this is populated, - * @type {string} - * @memberof ResourceMetadata - */ - region?: string; - /** - * The time the resource was created. - * @type {Date} - * @memberof ResourceMetadata - */ - creationTime: Date; - /** - * The time the resource was deleted. - * @type {Date} - * @memberof ResourceMetadata - */ - deletionTime?: Date; - /** - * The current status of the resource. Intially the status will be "Unknown" until - * the resource is reconciled by the relevant controller. It then will transition to - * "Provisioning" and will be ready for use when it changes to "Provisioned". The status - * will also transition to the "Provisioning" status during an update. The - * status will change to "Deprovisioning" when a delete request is being processed. - * It may also change to "Error" if an unexpected error occurred during any operation. - * Errors may be transient. - * @type {string} - * @memberof ResourceMetadata - */ - status: string; + description?: string; } /** @@ -68,8 +39,7 @@ export interface ResourceMetadata { */ export function instanceOfResourceMetadata(value: object): boolean { let isInstance = true; - isInstance = isInstance && "creationTime" in value; - isInstance = isInstance && "status" in value; + isInstance = isInstance && "name" in value; return isInstance; } @@ -84,12 +54,8 @@ export function ResourceMetadataFromJSONTyped(json: any, ignoreDiscriminator: bo } return { - 'project': !exists(json, 'project') ? undefined : json['project'], - 'clustermanager': !exists(json, 'clustermanager') ? undefined : json['clustermanager'], - 'region': !exists(json, 'region') ? undefined : json['region'], - 'creationTime': (new Date(json['creationTime'])), - 'deletionTime': !exists(json, 'deletionTime') ? undefined : (new Date(json['deletionTime'])), - 'status': json['status'], + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], }; } @@ -102,12 +68,8 @@ export function ResourceMetadataToJSON(value?: ResourceMetadata | null): any { } return { - 'project': value.project, - 'clustermanager': value.clustermanager, - 'region': value.region, - 'creationTime': (value.creationTime.toISOString()), - 'deletionTime': value.deletionTime === undefined ? undefined : (value.deletionTime.toISOString()), - 'status': value.status, + 'name': value.name, + 'description': value.description, }; } diff --git a/src/lib/openapi/server/models/ResourceProvisioningStatus.ts b/src/lib/openapi/server/models/ResourceProvisioningStatus.ts new file mode 100644 index 0000000..52a1d7d --- /dev/null +++ b/src/lib/openapi/server/models/ResourceProvisioningStatus.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The provisioning state of a resource. + * @export + */ +export const ResourceProvisioningStatus = { + Unknown: 'unknown', + Provisioning: 'provisioning', + Provisioned: 'provisioned', + Deprovisioning: 'deprovisioning', + Error: 'error' +} as const; +export type ResourceProvisioningStatus = typeof ResourceProvisioningStatus[keyof typeof ResourceProvisioningStatus]; + + +export function ResourceProvisioningStatusFromJSON(json: any): ResourceProvisioningStatus { + return ResourceProvisioningStatusFromJSONTyped(json, false); +} + +export function ResourceProvisioningStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceProvisioningStatus { + return json as ResourceProvisioningStatus; +} + +export function ResourceProvisioningStatusToJSON(value?: ResourceProvisioningStatus | null): any { + return value as any; +} + diff --git a/src/lib/openapi/server/models/ResourceReadMetadata.ts b/src/lib/openapi/server/models/ResourceReadMetadata.ts new file mode 100644 index 0000000..fe6b3e0 --- /dev/null +++ b/src/lib/openapi/server/models/ResourceReadMetadata.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ResourceProvisioningStatus } from './ResourceProvisioningStatus'; +import { + ResourceProvisioningStatusFromJSON, + ResourceProvisioningStatusFromJSONTyped, + ResourceProvisioningStatusToJSON, +} from './ResourceProvisioningStatus'; + +/** + * Resource metadata valid for all reads. + * @export + * @interface ResourceReadMetadata + */ +export interface ResourceReadMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof ResourceReadMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof ResourceReadMetadata + */ + description?: string; + /** + * The unique resource ID. + * @type {string} + * @memberof ResourceReadMetadata + */ + id: string; + /** + * The time the resource was created. + * @type {Date} + * @memberof ResourceReadMetadata + */ + creationTime: Date; + /** + * The time the resource was deleted. + * @type {Date} + * @memberof ResourceReadMetadata + */ + deletionTime?: Date; + /** + * + * @type {ResourceProvisioningStatus} + * @memberof ResourceReadMetadata + */ + provisioningStatus: ResourceProvisioningStatus; +} + +/** + * Check if a given object implements the ResourceReadMetadata interface. + */ +export function instanceOfResourceReadMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "creationTime" in value; + isInstance = isInstance && "provisioningStatus" in value; + + return isInstance; +} + +export function ResourceReadMetadataFromJSON(json: any): ResourceReadMetadata { + return ResourceReadMetadataFromJSONTyped(json, false); +} + +export function ResourceReadMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceReadMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'id': json['id'], + 'creationTime': (new Date(json['creationTime'])), + 'deletionTime': !exists(json, 'deletionTime') ? undefined : (new Date(json['deletionTime'])), + 'provisioningStatus': ResourceProvisioningStatusFromJSON(json['provisioningStatus']), + }; +} + +export function ResourceReadMetadataToJSON(value?: ResourceReadMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + 'id': value.id, + 'creationTime': (value.creationTime.toISOString()), + 'deletionTime': value.deletionTime === undefined ? undefined : (value.deletionTime.toISOString()), + 'provisioningStatus': ResourceProvisioningStatusToJSON(value.provisioningStatus), + }; +} + diff --git a/src/lib/openapi/server/models/ResourceWriteMetadata.ts b/src/lib/openapi/server/models/ResourceWriteMetadata.ts new file mode 100644 index 0000000..ebafb49 --- /dev/null +++ b/src/lib/openapi/server/models/ResourceWriteMetadata.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Kubernetes Service API + * The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. + * + * The version of the OpenAPI document: 0.2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * Resource metadata valid for all API resource reads and writes. + * @export + * @interface ResourceWriteMetadata + */ +export interface ResourceWriteMetadata { + /** + * A valid Kubenetes label value, typically used for resource names that can be + * indexed in the database. + * @type {string} + * @memberof ResourceWriteMetadata + */ + name: string; + /** + * The resource description, this optionally augments the name with more context. + * @type {string} + * @memberof ResourceWriteMetadata + */ + description?: string; +} + +/** + * Check if a given object implements the ResourceWriteMetadata interface. + */ +export function instanceOfResourceWriteMetadata(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function ResourceWriteMetadataFromJSON(json: any): ResourceWriteMetadata { + return ResourceWriteMetadataFromJSONTyped(json, false); +} + +export function ResourceWriteMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceWriteMetadata { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + 'description': !exists(json, 'description') ? undefined : json['description'], + }; +} + +export function ResourceWriteMetadataToJSON(value?: ResourceWriteMetadata | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + 'description': value.description, + }; +} + diff --git a/src/lib/openapi/server/models/index.ts b/src/lib/openapi/server/models/index.ts index 1775eb2..8850422 100644 --- a/src/lib/openapi/server/models/index.ts +++ b/src/lib/openapi/server/models/index.ts @@ -1,34 +1,39 @@ /* tslint:disable */ /* eslint-disable */ -export * from './Application'; export * from './ApplicationDependencies'; export * from './ApplicationDependency'; +export * from './ApplicationRead'; export * from './ApplicationRecommends'; +export * from './ApplicationSpec'; export * from './ApplicationTags'; export * from './ApplicationVersion'; export * from './ApplicationVersions'; export * from './Applications'; -export * from './ClusterManager'; -export * from './ClusterManagerMetadata'; -export * from './ClusterManagerSpec'; +export * from './ClusterManagerRead'; +export * from './ClusterManagerWrite'; export * from './ClusterManagers'; export * from './Flavor'; export * from './Flavors'; export * from './Image'; export * from './ImageVersions'; export * from './Images'; -export * from './KubernetesCluster'; export * from './KubernetesClusterAPI'; export * from './KubernetesClusterAutoscaling'; -export * from './KubernetesClusterMetadata'; export * from './KubernetesClusterNetwork'; +export * from './KubernetesClusterRead'; export * from './KubernetesClusterSpec'; export * from './KubernetesClusterWorkloadPool'; export * from './KubernetesClusterWorkloadPools'; +export * from './KubernetesClusterWrite'; export * from './KubernetesClusters'; export * from './MachinePool'; export * from './Oauth2Error'; -export * from './Region'; +export * from './OrganizationScopedResourceReadMetadata'; +export * from './ProjectScopedResourceReadMetadata'; +export * from './RegionRead'; export * from './Regions'; export * from './ResourceMetadata'; +export * from './ResourceProvisioningStatus'; +export * from './ResourceReadMetadata'; +export * from './ResourceWriteMetadata'; export * from './Volume'; diff --git a/src/lib/shell/ShellAppBar.svelte b/src/lib/shell/ShellAppBar.svelte index 4079a33..688a846 100644 --- a/src/lib/shell/ShellAppBar.svelte +++ b/src/lib/shell/ShellAppBar.svelte @@ -43,13 +43,13 @@ }); let organizations: Models.Organizations; - let organization: string; + let organizationID: string; - let currentOrganization: string; + let currentOrganizationID: string; // Grab the organization out of session storage first. organizationStore.subscribe((o: string) => { - currentOrganization = o; + currentOrganizationID = o; }); token.subscribe((at: InternalToken) => { @@ -61,14 +61,16 @@ organizations = v; // Try reuse the current organization if we can. - const existingOrganization = v.find((o) => o.name == currentOrganization); + const existingOrganization = v.find((o) => o.metadata.id == currentOrganizationID); - organization = existingOrganization ? currentOrganization : organizations[0].name; + organizationID = existingOrganization + ? currentOrganizationID + : organizations[0].metadata.id; }) .catch((e: Error) => error(e)); }); - $: if (organization) organizationStore.set(organization); + $: if (organizationID) organizationStore.set(organizationID); function doLogout(): void { logout(); @@ -96,9 +98,9 @@
- {#each organizations || [] as organization} - + {/each} diff --git a/src/lib/validation/index.ts b/src/lib/validation/index.ts index 7ded167..6f0389f 100644 --- a/src/lib/validation/index.ts +++ b/src/lib/validation/index.ts @@ -3,7 +3,7 @@ export type NamedResource = { }; export type NamedResourceWithSpec = { - spec: NamedResource; + metadata: NamedResource; }; export type NamedResourceUnion = NamedResource | NamedResourceWithSpec; @@ -21,8 +21,8 @@ export function namedResourceNames( if (!resources) return []; return resources.map((x) => { - if ('spec' in x) { - return (x as NamedResourceWithSpec).spec.name; + if ('metadata' in x) { + return (x as NamedResourceWithSpec).metadata.name; } return x.name; diff --git a/src/routes/(shell)/applications/catalog/+page.svelte b/src/routes/(shell)/applications/catalog/+page.svelte index b53f32a..e4b07d4 100644 --- a/src/routes/(shell)/applications/catalog/+page.svelte +++ b/src/routes/(shell)/applications/catalog/+page.svelte @@ -38,25 +38,25 @@
- {@html atob(application.icon)} + {@html atob(application.spec.icon)}
- {#each application.tags || [] as tag} + {#each application.spec.tags || [] as tag}
{tag}
{/each}
-

{application.humanReadableName}

+

{application.metadata.name}

Description
-

{application.description}

+

{application.metadata.description}

{/each} diff --git a/src/routes/(shell)/identity/groups/+page.svelte b/src/routes/(shell)/identity/groups/+page.svelte index ee321db..2c3a2fa 100644 --- a/src/routes/(shell)/identity/groups/+page.svelte +++ b/src/routes/(shell)/identity/groups/+page.svelte @@ -30,43 +30,43 @@ token.subscribe((token: InternalToken) => (at = token)); - let organization: string; + let organizationID: string; - organizationStore.subscribe((value: string) => (organization = value)); + organizationStore.subscribe((value: string) => (organizationID = value)); let groups: Models.Groups; - function update(at: InternalToken, organization: string) { - if (!at || !organization) return; + function update(at: InternalToken, organizationID: string) { + if (!at || !organizationID) return; const parameters = { - organization: organization + organizationID: organizationID }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsGet(parameters) + .apiV1OrganizationsOrganizationIDGroupsGet(parameters) .then((v: Models.Groups) => (groups = v)) .catch((e: Error) => Clients.error(e)); } - $: update(at, organization); + $: update(at, organizationID); - function remove(resource: Models.Group) { + function remove(resource: Models.GroupRead) { const modal: ModalSettings = { type: 'confirm', title: `Are you sure?`, - body: `Removing project "${resource.name}" will also remove all resources owned by it.`, + body: `Removing project "${resource.metadata.name}" will also remove all resources owned by it.`, response: (ok: boolean) => { if (!ok) return; const parameters = { - organization: organization, - groupid: resource.id + organizationID: organizationID, + groupid: resource.metadata.id }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsGroupidDelete(parameters) - .then(() => update(at, organization)) + .apiV1OrganizationsOrganizationIDGroupsGroupidDelete(parameters) + .then(() => update(at, organizationID)) .catch((e: Error) => Clients.error(e)); } }; @@ -83,11 +83,10 @@ {#each groups || [] as resource} - -
- {resource.name} -
- + diff --git a/src/routes/(shell)/identity/groups/create/+page.svelte b/src/routes/(shell)/identity/groups/create/+page.svelte index df83ef6..840d9e2 100644 --- a/src/routes/(shell)/identity/groups/create/+page.svelte +++ b/src/routes/(shell)/identity/groups/create/+page.svelte @@ -28,7 +28,7 @@ let at: InternalToken; - let organization: string; + let organizationID: string; let groups: Models.Groups; @@ -44,56 +44,59 @@ let availableRoles: string[]; - organizationStore.subscribe((value: string) => (organization = value)); + organizationStore.subscribe((value: string) => (organizationID = value)); token.subscribe((token: InternalToken) => (at = token)); - function update(at: InternalToken, organization: string) { - if (!at || !organization) return; + function update(at: InternalToken, organizationID: string) { + if (!at || !organizationID) return; const parameters = { - organization: organization + organizationID: organizationID }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsGet(parameters) + .apiV1OrganizationsOrganizationIDGroupsGet(parameters) .then((v: Models.Groups) => (groups = v)) .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationRolesGet(parameters) + .apiV1OrganizationsOrganizationIDRolesGet(parameters) .then((v: Models.RoleList) => (availableRoles = v)) .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationAvailableGroupsGet(parameters) + .apiV1OrganizationsOrganizationIDAvailableGroupsGet(parameters) .then((v: Models.AvailableGroups) => (availableGroups = v)) .catch((e: Error) => Clients.error(e)); } - $: update(at, organization); + $: update(at, organizationID); /* Cluster name must be valid, and it must be unique */ $: step1Valid = Validation.unique( group, - (groups || []).map((group) => group.name) + (groups || []).map((group) => group.metadata.name) ) && roles.length > 0; function complete() { const parameters = { - organization: organization, - group: { - id: 'ignored', - name: group, - roles: roles, - users: users, - providerGroups: selectedGroups + organizationID: organizationID, + groupWrite: { + metadata: { + name: group + }, + spec: { + roles: roles, + users: users, + providerGroups: selectedGroups + } } }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsPost(parameters) + .apiV1OrganizationsOrganizationIDGroupsPost(parameters) .then(() => window.location.assign('/identity/groups')) .catch((e: Error) => Clients.error(e)); } diff --git a/src/routes/(shell)/identity/groups/view/[id]/+page.svelte b/src/routes/(shell)/identity/groups/view/[id]/+page.svelte index 472f64e..fc8284a 100644 --- a/src/routes/(shell)/identity/groups/view/[id]/+page.svelte +++ b/src/routes/(shell)/identity/groups/view/[id]/+page.svelte @@ -26,53 +26,56 @@ token.subscribe((token: InternalToken) => (at = token)); - let organization: string; + let organizationID: string; - organizationStore.subscribe((value: string) => (organization = value)); + organizationStore.subscribe((value: string) => (organizationID = value)); - let group: Models.Group; + let group: Models.GroupRead; let availableRoles: string[]; let availableGroups: Models.AvailableGroups; - function update(at: InternalToken, organization: string) { - if (!at || !organization) return; + function update(at: InternalToken, organizationID: string) { + if (!at || !organizationID) return; const parameters = { - organization: organization, + organizationID: organizationID, groupid: $page.params.id }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsGroupidGet(parameters) - .then((v: Models.Group) => (group = v)) + .apiV1OrganizationsOrganizationIDGroupsGroupidGet(parameters) + .then((v: Models.GroupRead) => { + if (!v.spec.providerGroups) v.spec.providerGroups = []; + group = v; + }) .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationRolesGet(parameters) + .apiV1OrganizationsOrganizationIDRolesGet(parameters) .then((v: Models.RoleList) => (availableRoles = v)) .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationAvailableGroupsGet(parameters) + .apiV1OrganizationsOrganizationIDAvailableGroupsGet(parameters) .then((v: Models.AvailableGroups) => (availableGroups = v)) .catch((e: Error) => Clients.error(e)); } - $: update(at, organization); + $: update(at, organizationID); function submit() { - if (!at || !organization) return; + if (!at || !organizationID) return; const parameters = { - organization: organization, - groupid: group.id, - group: group + organizationID: organizationID, + groupid: $page.params.id, + groupWrite: group }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsGroupidPut(parameters) + .apiV1OrganizationsOrganizationIDGroupsGroupidPut(parameters) .then(() => window.location.assign('/identity/groups')) .catch((e: Error) => Clients.error(e)); } @@ -82,12 +85,12 @@ {#if group} -

{group.name}

+

{group.metadata.name}

diff --git a/src/routes/(shell)/identity/organizations/+page.svelte b/src/routes/(shell)/identity/organizations/+page.svelte index e2e2a97..8d6b896 100644 --- a/src/routes/(shell)/identity/organizations/+page.svelte +++ b/src/routes/(shell)/identity/organizations/+page.svelte @@ -35,13 +35,10 @@ {#each organizations || [] as resource} - -
- {resource.name} -
-
+ {/each}
diff --git a/src/routes/(shell)/identity/organizations/view/[id]/+page.svelte b/src/routes/(shell)/identity/organizations/view/[id]/+page.svelte index b223714..86b6386 100644 --- a/src/routes/(shell)/identity/organizations/view/[id]/+page.svelte +++ b/src/routes/(shell)/identity/organizations/view/[id]/+page.svelte @@ -25,7 +25,7 @@ token.subscribe((token: InternalToken) => (at = token)); - let organization: Identity.Organization; + let organization: Identity.OrganizationRead; let providers: Identity.Oauth2Providers; @@ -35,12 +35,12 @@ if (!at) return; const parameters = { - organization: $page.params.id + organizationID: $page.params.id }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGet(parameters) - .then((v: Identity.Organization) => (organization = v)) + .apiV1OrganizationsOrganizationIDGet(parameters) + .then((v: Identity.OrganizationRead) => (organization = v)) .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) @@ -49,7 +49,7 @@ .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationOauth2providersGet(parameters) + .apiV1OrganizationsOrganizationIDOauth2providersGet(parameters) .then((v: Identity.Oauth2Providers) => (organizationProviders = v)) .catch((e: Error) => Clients.error(e)); } @@ -60,20 +60,34 @@ // Update the organization. // TODO: input validation! const parameters = { - organization: $page.params.id, - organization2: organization + organizationID: $page.params.id, + organizationWrite: organization }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationPut(parameters) + .apiV1OrganizationsOrganizationIDPut(parameters) .then(() => window.location.assign('/identity/organizations')) .catch((e: Error) => Clients.error(e)); } + + function getOauth2ProviderType( + providers: Identity.Oauth2Providers, + organization: Identity.OrganizationRead + ): Identity.Oauth2ProviderType | undefined { + if (!providers || !organization) return undefined; + + const provider = providers.find((x) => x.metadata.id == organization.spec.providerID); + if (!provider) return undefined; + + return provider.spec.type; + } + + $: oauth2ProviderType = getOauth2ProviderType(providers, organization); {#if organization} -

{organization.name}

+

{organization.metadata.name}

- {#if organization.organizationType == Identity.OrganizationType.Domain} + {#if organization.spec.organizationType == Identity.OrganizationType.Domain} @@ -112,21 +126,21 @@ available identity providers such as Google or Microsoft. Selecting organization allows you to define your own identity provider for the organization. - {#each Object.entries(Identity.ProviderScope) as [symbol, value]} {/each} - {#if organization.providerScope == Identity.ProviderScope.Global} + {#if organization.spec.providerScope == Identity.ProviderScope.Global} - {#each providers || [] as p} - + {/each} - {#if ((providers || []).find((x) => x.name == organization.providerName) || {}).type == Identity.Oauth2ProviderType.Google} + {#if oauth2ProviderType == Identity.Oauth2ProviderType.Google}
diff --git a/src/routes/(shell)/identity/projects/view/[id]/+page.svelte b/src/routes/(shell)/identity/projects/view/[id]/+page.svelte index 5bcfcee..38211f0 100644 --- a/src/routes/(shell)/identity/projects/view/[id]/+page.svelte +++ b/src/routes/(shell)/identity/projects/view/[id]/+page.svelte @@ -26,44 +26,44 @@ token.subscribe((token: InternalToken) => (at = token)); - let organization: string; + let organizationID: string; - organizationStore.subscribe((value: string) => (organization = value)); + organizationStore.subscribe((value: string) => (organizationID = value)); - let project: Models.Project; + let project: Models.ProjectRead; let groups: Models.Groups; - function update(at: InternalToken, organization: string) { - if (!at || !organization) return; + function update(at: InternalToken, organizationID: string) { + if (!at || !organizationID) return; const parameters = { - organization: organization, - project: $page.params.id + organizationID: organizationID, + projectID: $page.params.id }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationProjectsProjectGet(parameters) - .then((v: Models.Project) => (project = v)) + .apiV1OrganizationsOrganizationIDProjectsProjectIDGet(parameters) + .then((v: Models.ProjectRead) => (project = v)) .catch((e: Error) => Clients.error(e)); Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationGroupsGet(parameters) + .apiV1OrganizationsOrganizationIDGroupsGet(parameters) .then((v: Models.Groups) => (groups = v)) .catch((e: Error) => Clients.error(e)); } - $: update(at, organization); + $: update(at, organizationID); function submit() { const parameters = { - organization: organization, - project: project.spec.name, - projectSpec: project.spec + organizationID: organizationID, + projectID: $page.params.id, + projectWrite: project }; Clients.identityClient(toastStore, at) - .apiV1OrganizationsOrganizationProjectsProjectPut(parameters) + .apiV1OrganizationsOrganizationIDProjectsProjectIDPut(parameters) .then(() => window.location.assign('/identity/projects')) .catch((e: Error) => Clients.error(e)); } @@ -71,7 +71,7 @@ {#if project} -

{project.spec.name}

+

{project.metadata.name}

diff --git a/src/routes/(shell)/infrastructure/clustermanagers/+page.svelte b/src/routes/(shell)/infrastructure/clustermanagers/+page.svelte index c84b1c8..163c3cc 100644 --- a/src/routes/(shell)/infrastructure/clustermanagers/+page.svelte +++ b/src/routes/(shell)/infrastructure/clustermanagers/+page.svelte @@ -31,10 +31,10 @@ let resources: Models.ClusterManagers; - let organization: string; + let organizationID: string; organizationStore.subscribe((value: string) => { - organization = value; + organizationID = value; update(); }); @@ -47,34 +47,34 @@ }); function update(): void { - if (!at || !organization) return; + if (!at || !organizationID) return; const parameters = { - organization: organization + organizationID: organizationID }; client(toastStore, at) - .apiV1OrganizationsOrganizationClustermanagersGet(parameters) + .apiV1OrganizationsOrganizationIDClustermanagersGet(parameters) .then((v: Models.ClusterManagers) => (resources = v)) .catch((e: Error) => error(e)); } - function remove(resource: Models.ClusterManager): void { + function remove(resource: Models.ClusterManagerRead): void { const modal: ModalSettings = { type: 'confirm', title: `Are you sure?`, - body: `Removing control plane "${resource.spec.name}" will remove all resources owned by it.`, + body: `Removing control plane "${resource.metadata.name}" will remove all resources owned by it.`, response: (ok: boolean) => { if (!ok) return; const parameters = { - organization: organization, - project: resource.metadata.project, - clusterManager: resource.spec.name + organizationID: organizationID, + projectID: resource.metadata.projectId, + clusterManagerID: resource.metadata.id }; client(toastStore, at) - .apiV1OrganizationsOrganizationProjectsProjectClustermanagersClusterManagerDelete( + .apiV1OrganizationsOrganizationIDProjectsProjectIDClustermanagersClusterManagerIDDelete( parameters ) .catch((e: Error) => error(e)); @@ -83,19 +83,12 @@ modalStore.trigger(modal); } - - import StatusIcon from '$lib/StatusIcon.svelte'; {#each resources || [] as resource} - -
- -
{resource.spec.name}
-
- + diff --git a/src/routes/(shell)/infrastructure/clusters/+page.svelte b/src/routes/(shell)/infrastructure/clusters/+page.svelte index 152653a..6c37010 100644 --- a/src/routes/(shell)/infrastructure/clusters/+page.svelte +++ b/src/routes/(shell)/infrastructure/clusters/+page.svelte @@ -34,10 +34,10 @@ let resources: Models.KubernetesClusters; - let organization: string; + let organizationID: string; organizationStore.subscribe((value: string) => { - organization = value; + organizationID = value; update(); }); @@ -50,35 +50,35 @@ }); function update(): void { - if (!at || !organization) return; + if (!at || !organizationID) return; const parameters = { - organization: organization + organizationID: organizationID }; Clients.client(toastStore, at) - .apiV1OrganizationsOrganizationClustersGet(parameters) + .apiV1OrganizationsOrganizationIDClustersGet(parameters) .then((v: Models.KubernetesClusters) => (resources = v)) .catch((e: Error) => Clients.error(e)); } - function remove(resource: Models.KubernetesCluster): void { + function remove(resource: Models.KubernetesClusterRead): void { const modal: ModalSettings = { type: 'confirm', title: `Are you sure?`, - body: `Remove cluster "${resource.spec.name}".`, + body: `Remove cluster "${resource.metadata.name}".`, response: (ok: boolean) => { if (!ok) return; if (!resource.metadata) return; const parameters = { - organization: organization, - project: resource.metadata.project, - cluster: resource.spec.name + organizationID: organizationID, + projectID: resource.metadata.projectId, + clusterID: resource.metadata.id }; Clients.client(toastStore, at) - .apiV1OrganizationsOrganizationProjectsProjectClustersClusterDelete(parameters) + .apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDDelete(parameters) .catch((e: Error) => Clients.error(e)); } }; @@ -86,15 +86,17 @@ modalStore.trigger(modal); } - function getKubeconfig(resource: Models.KubernetesCluster): void { + function getKubeconfig(resource: Models.KubernetesClusterRead): void { const parameters = { - organization: organization, - project: resource.metadata.project, - cluster: resource.spec.name + organizationID: organizationID, + projectID: resource.metadata.projectId, + clusterID: resource.metadata.id }; Clients.client(toastStore, at) - .apiV1OrganizationsOrganizationProjectsProjectClustersClusterKubeconfigGetRaw(parameters) + .apiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDKubeconfigGetRaw( + parameters + ) .then((x) => x.raw.blob()) .then((x) => { if (browser) { @@ -103,7 +105,7 @@ const a = document.createElement('a'); a.style.display = 'none'; a.href = url; - a.download = `kubeconfig-${resource.spec.name}.yaml`; + a.download = `kubeconfig-${resource.metadata.name}.yaml`; document.body.appendChild(a); a.click(); @@ -113,8 +115,6 @@ }) .catch((e: Error) => Clients.error(e)); } - - import StatusIcon from '$lib/StatusIcon.svelte'; @@ -128,12 +128,7 @@ {#each resources || [] as resource} - -
- -
{resource.spec.name}
-
- +