From 0f0425764f05d284b459c106be6c0ab720e18535 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 17 Aug 2023 13:14:40 -0400 Subject: [PATCH] Rebuild schema for object store APIs. --- client/src/api/schema/schema.ts | 283 +++++++++++++++++++++++++++++++- 1 file changed, 282 insertions(+), 1 deletion(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index 057ea7c8c031..ed897471b072 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -1077,6 +1077,22 @@ export interface paths { */ delete: operations["delete_user_notification_api_notifications__notification_id__delete"]; }; + "/api/object_store_instances": { + /** Get a list of persisted object store instances defined by the requesting user. */ + get: operations["object_stores__instances_index"]; + /** Create a user-bound object store. */ + post: operations["object_stores__create_instance"]; + }; + "/api/object_store_instances/{user_object_store_id}": { + /** Get a list of persisted object store instances defined by the requesting user. */ + get: operations["object_stores__instances_get"]; + /** Update or upgrade user object store instance. */ + put: operations["object_stores__instances_update"]; + }; + "/api/object_store_templates": { + /** Get a list of object store templates available to build user defined object stores from */ + get: operations["object_stores__templates_index"]; + }; "/api/object_stores": { /** Get a list of (currently only concrete) object stores configured with this Galaxy instance. */ get: operations["index_api_object_stores_get"]; @@ -2034,7 +2050,7 @@ export interface components { | "more_stable" | "less_stable" ) - | ("cloud" | "quota" | "no_quota" | "restricted"); + | ("cloud" | "quota" | "no_quota" | "restricted" | "user_defined"); }; /** * BasicRoleModel @@ -2775,6 +2791,25 @@ export interface components { /** Store Dict */ store_dict?: Record; }; + /** CreateInstancePayload */ + CreateInstancePayload: { + /** Description */ + description?: string; + /** Name */ + name: string; + /** Secrets */ + secrets: { + [key: string]: string | undefined; + }; + /** Template Id */ + template_id: string; + /** Template Version */ + template_version: number; + /** Variables */ + variables: { + [key: string]: (string | boolean | number) | undefined; + }; + }; /** * CreateLibrariesFromStore * @description Base model definition with common configuration used by all derived models. @@ -7494,6 +7529,66 @@ export interface components { */ up_to_date: boolean; }; + /** ObjectStoreTemplateSecret */ + ObjectStoreTemplateSecret: { + /** Help */ + help?: string; + /** Name */ + name: string; + }; + /** + * ObjectStoreTemplateSummaries + * @description Represents a collection of ObjectStoreTemplate summaries. + */ + ObjectStoreTemplateSummaries: components["schemas"]["ObjectStoreTemplateSummary"][]; + /** + * ObjectStoreTemplateSummary + * @description Version of ObjectStoreTemplate we can send to the UI/API. + * + * The configuration key in the child type may have secretes + * and shouldn't be exposed over the API - at least to non-admins. + */ + ObjectStoreTemplateSummary: { + /** Badges */ + badges: components["schemas"]["BadgeDict"][]; + /** Description */ + description?: string; + /** + * Hidden + * @default false + */ + hidden?: boolean; + /** Id */ + id: string; + /** Name */ + name?: string; + /** Secrets */ + secrets?: components["schemas"]["ObjectStoreTemplateSecret"][]; + /** + * Type + * @enum {string} + */ + type: "s3" | "azure_blob" | "disk" | "generic_s3"; + /** Variables */ + variables?: components["schemas"]["ObjectStoreTemplateVariable"][]; + /** + * Version + * @default 0 + */ + version?: number; + }; + /** ObjectStoreTemplateVariable */ + ObjectStoreTemplateVariable: { + /** Help */ + help?: string; + /** Name */ + name: string; + /** + * Type + * @enum {string} + */ + type: "string" | "boolean" | "integer"; + }; /** Organization */ Organization: { /** @@ -8992,6 +9087,24 @@ export interface components { */ visible?: boolean; }; + /** UpdateInstancePayload */ + UpdateInstancePayload: { + /** Description */ + description?: string; + /** Name */ + name?: string; + /** Variables */ + variables?: { + [key: string]: (string | boolean | number) | undefined; + }; + }; + /** UpdateInstanceSecretPayload */ + UpdateInstanceSecretPayload: { + /** Secret Name */ + secret_name: string; + /** Secret Value */ + secret_value: string; + }; /** * UpdateLibraryFolderPayload * @description Base model definition with common configuration used by all derived models. @@ -9100,6 +9213,19 @@ export interface components { [key: string]: components["schemas"]["NotificationCategorySettings"] | undefined; }; }; + /** UpgradeInstancePayload */ + UpgradeInstancePayload: { + /** Secrets */ + secrets: { + [key: string]: string | undefined; + }; + /** Template Version */ + template_version: number; + /** Variables */ + variables: { + [key: string]: (string | boolean | number) | undefined; + }; + }; /** * UrlDataElement * @description Base model definition with common configuration used by all derived models. @@ -9172,6 +9298,37 @@ export interface components { */ enabled: boolean; }; + /** UserConcreteObjectStoreModel */ + UserConcreteObjectStoreModel: { + /** Badges */ + badges: components["schemas"]["BadgeDict"][]; + /** Description */ + description?: string; + /** Id */ + id: number; + /** Name */ + name?: string; + /** Object Store Id */ + object_store_id?: string; + /** Private */ + private: boolean; + quota: components["schemas"]["QuotaModel"]; + /** Secrets */ + secrets: string[]; + /** Template Id */ + template_id: string; + /** Template Version */ + template_version: number; + /** + * Type + * @enum {string} + */ + type: "s3" | "azure_blob" | "disk" | "generic_s3"; + /** Variables */ + variables?: { + [key: string]: (string | boolean | number) | undefined; + }; + }; /** * UserCreationPayload * @description Base model definition with common configuration used by all derived models. @@ -15459,6 +15616,130 @@ export interface operations { }; }; }; + object_stores__instances_index: { + /** Get a list of persisted object store instances defined by the requesting user. */ + parameters?: { + /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ + header?: { + "run-as"?: string; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["UserConcreteObjectStoreModel"][]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + object_stores__create_instance: { + /** Create a user-bound object store. */ + parameters?: { + /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ + header?: { + "run-as"?: string; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateInstancePayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["UserConcreteObjectStoreModel"]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + object_stores__instances_get: { + /** Get a list of persisted object store instances defined by the requesting user. */ + parameters: { + /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ + header?: { + "run-as"?: string; + }; + /** @description The model ID for a persisted UserObjectStore object. */ + path: { + user_object_store_id: string; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["UserConcreteObjectStoreModel"]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + object_stores__instances_update: { + /** Update or upgrade user object store instance. */ + parameters: { + /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ + header?: { + "run-as"?: string; + }; + /** @description The model ID for a persisted UserObjectStore object. */ + path: { + user_object_store_id: string; + }; + }; + requestBody: { + content: { + "application/json": + | components["schemas"]["UpdateInstanceSecretPayload"] + | components["schemas"]["UpgradeInstancePayload"] + | components["schemas"]["UpdateInstancePayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["UserConcreteObjectStoreModel"]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + object_stores__templates_index: { + /** Get a list of object store templates available to build user defined object stores from */ + responses: { + /** @description A list of the configured object store templates. */ + 200: { + content: { + "application/json": components["schemas"]["ObjectStoreTemplateSummaries"]; + }; + }; + }; + }; index_api_object_stores_get: { /** Get a list of (currently only concrete) object stores configured with this Galaxy instance. */ parameters?: {