diff --git a/client/package.json b/client/package.json index f63ed194a64f..1799756bf946 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@galaxyproject/galaxy-client", - "version": "23.1.1", + "version": "24.0.0", "description": "Galaxy client application build system", "keywords": [ "galaxy" @@ -43,6 +43,7 @@ "@sentry/browser": "^7.74.1", "@types/jest": "^29.5.6", "@vueuse/core": "^10.5.0", + "@vueuse/math": "^10.9.0", "assert": "^2.1.0", "axios": "^1.6.2", "babel-runtime": "^6.26.0", diff --git a/client/src/api/datasetCollections.ts b/client/src/api/datasetCollections.ts index 3cf02c98f55a..cc45c5811cf7 100644 --- a/client/src/api/datasetCollections.ts +++ b/client/src/api/datasetCollections.ts @@ -1,4 +1,4 @@ -import { CollectionEntry, DCESummary, HDCADetailed, isHDCA } from "@/api"; +import { CollectionEntry, DCESummary, HDCADetailed, HDCASummary, isHDCA } from "@/api"; import { fetcher } from "@/api/schema"; const DEFAULT_LIMIT = 50; @@ -11,7 +11,16 @@ const getCollectionDetails = fetcher.path("/api/dataset_collections/{id}").metho */ export async function fetchCollectionDetails(params: { id: string }): Promise { const { data } = await getCollectionDetails({ id: params.id }); - return data; + return data as HDCADetailed; +} + +/** + * Fetches the details of a collection. + * @param params.id The ID of the collection (HDCA) to fetch. + */ +export async function fetchCollectionSummary(params: { id: string }): Promise { + const { data } = await getCollectionDetails({ id: params.id, view: "collection" }); + return data as HDCASummary; } const getCollectionContents = fetcher diff --git a/client/src/api/datasets.ts b/client/src/api/datasets.ts index 63b8b5714d9c..c6096ea18f65 100644 --- a/client/src/api/datasets.ts +++ b/client/src/api/datasets.ts @@ -1,6 +1,7 @@ +import axios from "axios"; import type { FetchArgType } from "openapi-typescript-fetch"; -import { DatasetDetails } from "@/api"; +import { HDADetailed } from "@/api"; import { components, fetcher } from "@/api/schema"; import { withPrefix } from "@/utils/redirect"; @@ -11,7 +12,7 @@ type GetDatasetsQuery = Pick; // custom interface for how we use getDatasets interface GetDatasetsOptions extends GetDatasetsQuery { sortBy?: string; - sortDesc?: string; + sortDesc?: boolean; query?: string; } @@ -40,32 +41,28 @@ export const fetchDataset = fetcher.path("/api/datasets/{dataset_id}").method("g export const fetchDatasetStorage = fetcher.path("/api/datasets/{dataset_id}/storage").method("get").create(); -export async function fetchDatasetDetails(params: { id: string }): Promise { +export async function fetchDatasetDetails(params: { id: string }): Promise { const { data } = await fetchDataset({ dataset_id: params.id, view: "detailed" }); // We know that the server will return a DatasetDetails object because of the view parameter // but the type system doesn't, so we have to cast it. - return data as unknown as DatasetDetails; + return data as unknown as HDADetailed; } -const updateHistoryDataset = fetcher.path("/api/histories/{history_id}/contents/{type}s/{id}").method("put").create(); +const updateDataset = fetcher.path("/api/datasets/{dataset_id}").method("put").create(); -export async function undeleteHistoryDataset(historyId: string, datasetId: string) { - const { data } = await updateHistoryDataset({ - history_id: historyId, - id: datasetId, +export async function undeleteDataset(datasetId: string) { + const { data } = await updateDataset({ + dataset_id: datasetId, type: "dataset", deleted: false, }); return data; } -const deleteHistoryDataset = fetcher - .path("/api/histories/{history_id}/contents/{type}s/{id}") - .method("delete") - .create(); +const deleteDataset = fetcher.path("/api/datasets/{dataset_id}").method("delete").create(); -export async function purgeHistoryDataset(historyId: string, datasetId: string) { - const { data } = await deleteHistoryDataset({ history_id: historyId, id: datasetId, type: "dataset", purge: true }); +export async function purgeDataset(datasetId: string) { + const { data } = await deleteDataset({ dataset_id: datasetId, purge: true }); return data; } @@ -92,3 +89,9 @@ export function getCompositeDatasetLink(historyDatasetId: string, path: string) export type DatasetExtraFiles = components["schemas"]["DatasetExtraFiles"]; export const fetchDatasetExtraFiles = fetcher.path("/api/datasets/{dataset_id}/extra_files").method("get").create(); + +export async function fetchDatasetAttributes(datasetId: string) { + const { data } = await axios.get(withPrefix(`/dataset/get_edit?dataset_id=${datasetId}`)); + + return data; +} diff --git a/client/src/api/histories.ts b/client/src/api/histories.ts index fcd1d0c1c1f7..ef0aeaa5df0b 100644 --- a/client/src/api/histories.ts +++ b/client/src/api/histories.ts @@ -12,3 +12,5 @@ export const updateHistoryItemsInBulk = fetcher .path("/api/histories/{history_id}/contents/bulk") .method("put") .create(); +export const sharing = fetcher.path("/api/histories/{history_id}/sharing").method("get").create(); +export const enableLink = fetcher.path("/api/histories/{history_id}/enable_link_access").method("put").create(); diff --git a/client/src/api/index.ts b/client/src/api/index.ts index 4048356ef219..ec217a321012 100644 --- a/client/src/api/index.ts +++ b/client/src/api/index.ts @@ -7,18 +7,72 @@ import { components } from "@/api/schema"; */ export type HistorySummary = components["schemas"]["HistorySummary"]; -export interface HistorySummaryExtended extends HistorySummary { +/** + * Contains minimal information about a History with additional content stats. + * This is a subset of information that can be relatively frequently updated after + * certain actions are performed on the history. + */ +export interface HistoryContentsStats { + id: string; + update_time: string; size: number; contents_active: components["schemas"]["HistoryActiveContentCounts"]; +} + +/** + * Contains summary information plus additional details about the contents and owner of a History. + * This is used by the client API to simplify the handling of History objects. + * + * Data returned by the API when requesting `?view=summary&keys=size,contents_active,user_id`. + */ +export interface HistorySummaryExtended extends HistorySummary, HistoryContentsStats { user_id: string; } +type HistoryDetailedModel = components["schemas"]["HistoryDetailed"]; + /** * Contains additional details about a History. + * + * Data returned by the API when requesting `?view=detailed`. + */ +export interface HistoryDetailed extends HistoryDetailedModel { + // TODO: these fields are not present in the backend schema model `HistoryDetailedModel` but are serialized by the API + // when requesting ?view=detailed. We should consider adding them to the backend schema. + email_hash?: string; + empty: boolean; + hid_counter: number; +} + +type HistoryDetailedCommon = Omit< + HistoryDetailed, + "username" | "state" | "state_ids" | "state_details" | "email_hash" | "empty" +>; + +/** + * Alternative representation of history details used by the client API. + * Shares most of the fields with HistoryDetailed but not all and adds some additional fields. + * + * Data returned by the API when requesting `?view=dev-detailed`. */ -export type HistoryDetailed = components["schemas"]["HistoryDetailed"]; +export interface HistoryDevDetailed extends HistoryDetailedCommon { + contents_active: components["schemas"]["HistoryActiveContentCounts"]; +} -export type AnyHistory = HistorySummary | HistorySummaryExtended | HistoryDetailed; +/** + * Contains all available information about a History. + */ +export type HistoryExtended = HistoryDevDetailed & HistoryDetailed; + +/** + * Represents any amount of information about a History with the minimal being a HistorySummary. + */ +export type AnyHistory = + | HistorySummary + | HistorySummaryExtended + | HistoryDetailed + | HistoryDevDetailed + | HistoryExtended; /** * Contains minimal information about a HistoryContentItem. @@ -28,12 +82,17 @@ export type HistoryContentItemBase = components["schemas"]["EncodedHistoryConten /** * Contains summary information about a HistoryDatasetAssociation. */ -export type DatasetSummary = components["schemas"]["HDASummary"]; +export type HDASummary = components["schemas"]["HDASummary"]; /** * Contains additional details about a HistoryDatasetAssociation. */ -export type DatasetDetails = components["schemas"]["HDADetailed"]; +export type HDADetailed = components["schemas"]["HDADetailed"]; + +/** + * Represents either an HDA or an HDCA with minimal information. + */ +export type HistoryItemSummary = HDASummary | HDCASummary; /** * Contains storage (object store, quota, etc..) details for a dataset. @@ -43,7 +102,7 @@ export type DatasetStorageDetails = components["schemas"]["DatasetStorageDetails /** * Represents a HistoryDatasetAssociation with either summary or detailed information. */ -export type DatasetEntry = DatasetSummary | DatasetDetails; +export type DatasetEntry = HDASummary | HDADetailed; /** * Contains summary information about a DCE (DatasetCollectionElement). @@ -125,7 +184,7 @@ export function isCollectionElement(element: DCESummary): element is DCECollecti /** * Returns true if the given dataset entry is an instance of DatasetDetails. */ -export function hasDetails(entry: DatasetEntry): entry is DatasetDetails { +export function hasDetails(entry: DatasetEntry): entry is HDADetailed { return "peek" in entry; } @@ -174,5 +233,12 @@ export function userOwnsHistory(user: User | AnonymousUser | null, history: AnyH } function hasOwner(history: AnyHistory): history is HistorySummaryExtended { - return "user_id" in history; + return "user_id" in history && history.user_id !== null; } + +export type DatasetHash = components["schemas"]["DatasetHash"]; + +export type DatasetTransform = { + action: "to_posix_lines" | "spaces_to_tabs" | "datatype_groom"; + datatype_ext: "bam" | "qname_sorted.bam" | "qname_input_sorted.bam" | "isa-tab" | "isa-json"; +}; diff --git a/client/src/api/jobs.ts b/client/src/api/jobs.ts index 65399c0beb96..289a440e0fd9 100644 --- a/client/src/api/jobs.ts +++ b/client/src/api/jobs.ts @@ -2,9 +2,20 @@ import { components, fetcher } from "@/api/schema"; export type JobDestinationParams = components["schemas"]["JobDestinationParams"]; +export const getJobDetails = fetcher.path("/api/jobs/{job_id}").method("get").create(); + export const jobLockStatus = fetcher.path("/api/job_lock").method("get").create(); export const jobLockUpdate = fetcher.path("/api/job_lock").method("put").create(); export const fetchJobDestinationParams = fetcher.path("/api/jobs/{job_id}/destination_params").method("get").create(); export const jobsFetcher = fetcher.path("/api/jobs").method("get").create(); + +export type ShowFullJobResponse = components["schemas"]["ShowFullJobResponse"]; +export type JobDetails = components["schemas"]["ShowFullJobResponse"] | components["schemas"]["EncodedJobDetails"]; +export const fetchJobDetails = fetcher.path("/api/jobs/{job_id}").method("get").create(); + +export type JobInputSummary = components["schemas"]["JobInputSummary"]; +export const fetchJobCommonProblems = fetcher.path("/api/jobs/{job_id}/common_problems").method("get").create(); + +export const postJobErrorReport = fetcher.path("/api/jobs/{job_id}/error").method("post").create(); diff --git a/client/src/api/notifications.preferences.ts b/client/src/api/notifications.preferences.ts index 59b910d8c346..8509d7cd2691 100644 --- a/client/src/api/notifications.preferences.ts +++ b/client/src/api/notifications.preferences.ts @@ -1,11 +1,18 @@ import { type components, fetcher } from "@/api/schema"; -export type UserNotificationPreferences = components["schemas"]["UserNotificationPreferences"]; +type UserNotificationPreferences = components["schemas"]["UserNotificationPreferences"]; + +export interface UserNotificationPreferencesExtended extends UserNotificationPreferences { + supportedChannels: string[]; +} const getNotificationsPreferences = fetcher.path("/api/notifications/preferences").method("get").create(); -export async function getNotificationsPreferencesFromServer() { - const { data } = await getNotificationsPreferences({}); - return data; +export async function getNotificationsPreferencesFromServer(): Promise { + const { data, headers } = await getNotificationsPreferences({}); + return { + ...data, + supportedChannels: headers.get("supported-channels")?.split(",") ?? [], + }; } type UpdateUserNotificationPreferencesRequest = components["schemas"]["UpdateUserNotificationPreferencesRequest"]; diff --git a/client/src/api/notifications.ts b/client/src/api/notifications.ts index 2cfaafed6967..b5724618e3a5 100644 --- a/client/src/api/notifications.ts +++ b/client/src/api/notifications.ts @@ -25,7 +25,7 @@ export type NewSharedItemNotificationContentItemType = type UserNotificationUpdateRequest = components["schemas"]["UserNotificationUpdateRequest"]; -type NotificationCreateRequest = components["schemas"]["NotificationCreateRequest"]; +export type NotificationCreateRequest = components["schemas"]["NotificationCreateRequest"]; type NotificationResponse = components["schemas"]["NotificationResponse"]; diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index 9660be2fcda7..a13a0673d97b 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -132,6 +132,18 @@ export interface paths { * To get more information please check the source code. */ get: operations["show_api_datasets__dataset_id__get"]; + /** + * Updates the values for the history dataset (HDA) item with the given ``ID``. + * @description Updates the values for the history content item with the given ``ID``. + */ + put: operations["datasets__update_dataset"]; + /** + * Delete the history dataset content with the given ``ID``. + * @description Delete the history content with the given ``ID`` and path specified type. + * + * **Note**: Currently does not stop any active jobs for which this dataset is an output. + */ + delete: operations["datasets__delete"]; }; "/api/datasets/{dataset_id}/content/{content_type}": { /** Retrieve information about the content of a dataset. */ @@ -1252,6 +1264,9 @@ export interface paths { /** * Returns the current user's preferences for notifications. * @description Anonymous users cannot have notification preferences. They will receive only broadcasted notifications. + * + * - The settings will contain all possible channels, but the client should only show the ones that are really supported by the server. + * The supported channels are returned in the `supported-channels` header. */ get: operations["get_notification_preferences_api_notifications_preferences_get"]; /** @@ -1714,6 +1729,10 @@ export interface paths { /** Remove the object from user's favorites */ delete: operations["remove_favorite_api_users__user_id__favorites__object_type___object_id__delete"]; }; + "/api/users/{user_id}/objectstore_usage": { + /** Return the user's object store usage summary broken down by object store ID */ + get: operations["get_user_objectstore_usage_api_users__user_id__objectstore_usage_get"]; + }; "/api/users/{user_id}/recalculate_disk_usage": { /** Triggers a recalculation of the current user disk usage. */ put: operations["recalculate_disk_usage_by_user_id_api_users__user_id__recalculate_disk_usage_put"]; @@ -2124,6 +2143,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "add_input"; /** Collection Type */ @@ -2159,6 +2179,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "add_step"; /** @@ -2266,6 +2287,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "History"; /** @@ -2382,6 +2404,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "History"; /** @@ -2546,6 +2569,7 @@ export interface components { * Category * @default broadcast * @constant + * @enum {string} */ category?: "broadcast"; /** @@ -2568,6 +2592,7 @@ export interface components { * Category * @default broadcast * @constant + * @enum {string} */ category?: "broadcast"; /** @@ -2610,6 +2635,7 @@ export interface components { * Category * @default broadcast * @constant + * @enum {string} */ category?: "broadcast"; content: components["schemas"]["BroadcastNotificationContent"]; @@ -2658,6 +2684,7 @@ export interface components { /** * Browsable * @constant + * @enum {boolean} */ browsable: true; /** @@ -2715,6 +2742,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "change_datatype"; }; @@ -2725,6 +2753,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "change_dbkey"; }; @@ -2938,6 +2967,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "composite"; /** Tags */ @@ -3038,6 +3068,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "connect"; /** Input */ @@ -3431,6 +3462,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Quota"; /** @@ -3497,6 +3529,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "User"; /** @@ -3594,16 +3627,6 @@ export interface components { */ installed_builds: components["schemas"]["LabelValuePair"][]; }; - /** - * CustomHistoryItem - * @description Can contain any serializable property of the item. - * - * Allows arbitrary custom keys to be specified in the serialization - * parameters without a particular view (predefined set of keys). - */ - CustomHistoryItem: { - [key: string]: unknown | undefined; - }; /** CustomHistoryView */ CustomHistoryView: { /** @@ -3780,6 +3803,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "DatasetCollectionElement"; /** @@ -3829,6 +3853,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "DatasetCollection"; /** @@ -3934,6 +3959,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "HistoryDatasetCollectionAssociation"; tags: components["schemas"]["TagCollection"]; @@ -3969,6 +3995,37 @@ export interface components { * @description A list of extra files associated with a dataset. */ DatasetExtraFiles: components["schemas"]["ExtraFileEntry"][]; + /** DatasetHash */ + DatasetHash: { + /** + * Extra Files Path + * @description The path to the extra files used to generate the hash. + */ + extra_files_path?: string | null; + /** + * Hash Function + * @description The hash function used to generate the hash. + */ + hash_function: components["schemas"]["HashFunctionNames"]; + /** + * Hash Value + * @description The hash value. + */ + hash_value: string; + /** + * ID + * @description Encoded ID of the dataset hash. + * @example 0123456789ABCDEF + */ + id: string; + /** + * Model class + * @description The name of the database model class. + * @constant + * @enum {string} + */ + model_class: "DatasetHash"; + }; /** * DatasetInheritanceChain * @default [] @@ -4005,6 +4062,30 @@ export interface components { */ manage?: string[]; }; + /** DatasetSource */ + DatasetSource: { + /** + * Extra Files Path + * @description The path to the extra files. + */ + extra_files_path?: string | null; + /** + * ID + * @description Encoded ID of the dataset source. + * @example 0123456789ABCDEF + */ + id: string; + /** + * Source URI + * @description The URI of the dataset source. + */ + source_uri: string; + /** + * Transform + * @description The transformations applied to the dataset source. + */ + transform?: Record[] | null; + }; /** DatasetSourceId */ DatasetSourceId: { /** @@ -4281,6 +4362,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "DefaultQuotaAssociation"; /** @@ -4386,7 +4468,6 @@ export interface components { * @description True if the item was successfully removed from disk. */ purged?: boolean | null; - [key: string]: unknown | undefined; }; /** DeleteHistoryPayload */ DeleteHistoryPayload: { @@ -4509,6 +4590,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "disconnect"; /** Input */ @@ -4695,6 +4777,7 @@ export interface components { * Source * @description The source of this dataset, which in the case of the model can only be `hdca`. * @constant + * @enum {string} */ src: "hdca"; }; @@ -4781,6 +4864,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Job"; /** @@ -4979,6 +5063,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "extract_input"; /** Input */ @@ -4992,6 +5077,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "extract_untyped_parameter"; /** Label */ @@ -5011,6 +5097,7 @@ export interface components { /** * FavoriteObjectType * @constant + * @enum {string} */ FavoriteObjectType: "tools"; /** FavoriteObjectsSummary */ @@ -5083,6 +5170,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "files"; /** Tags */ @@ -5098,6 +5186,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "fill_defaults"; }; @@ -5151,6 +5240,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "file"; /** @@ -5216,6 +5306,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "fill_step_defaults"; /** Step */ @@ -5251,6 +5342,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "folder"; /** @@ -5307,6 +5399,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "ftp_import"; /** Tags */ @@ -5336,6 +5429,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "ftp_import"; /** Tags */ @@ -5379,6 +5473,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Group"; /** @@ -5398,6 +5493,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "GroupQuotaAssociation"; }; @@ -5415,6 +5511,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Group"; /** name of the group */ @@ -5479,6 +5576,244 @@ export interface components { /** Name */ name: string; }; + /** HDACustom */ + HDACustom: { + /** + * Accessible + * @description Whether this item is accessible to the current user due to permissions. + */ + accessible?: boolean | null; + /** + * Annotation + * @description An annotation to provide details or to help understand the purpose and usage of this item. + */ + annotation?: string | null; + /** + * API Type + * @deprecated + * @description TODO + */ + api_type?: "file" | null; + /** Copied From Ldda Id */ + copied_from_ldda_id?: string | null; + /** + * Create Time + * @description The time and date this item was created. + */ + create_time?: string | null; + /** + * Created from basename + * @description The basename of the output that produced this dataset. + */ + created_from_basename?: string | null; + /** + * Creating Job ID + * @description The encoded ID of the job that created this dataset. + */ + creating_job?: string | null; + /** + * Data Type + * @description The fully qualified name of the class implementing the data type of this dataset. + */ + data_type?: string | null; + /** + * Dataset ID + * @description The encoded ID of the dataset associated with this item. + * @example 0123456789ABCDEF + */ + dataset_id?: string; + /** + * Deleted + * @description Whether this item is marked as deleted. + */ + deleted?: boolean | null; + /** + * Display Applications + * @description Contains new-style display app urls. + */ + display_apps?: components["schemas"]["DisplayApp"][] | null; + /** + * Legacy Display Applications + * @description Contains old-style display app urls. + */ + display_types?: components["schemas"]["DisplayApp"][] | null; + /** + * Download URL + * @description The URL to download this item from the server. + */ + download_url?: string | null; + /** + * DRS ID + * @description The DRS ID of the dataset. + */ + drs_id?: string | null; + /** + * Extension + * @description The extension of the dataset. + */ + extension?: string | null; + /** + * File extension + * @description The extension of the file. + */ + file_ext?: string | null; + /** + * File Name + * @description The full path to the dataset file. + */ + file_name?: string | null; + /** + * File Size + * @description The file size in bytes. + */ + file_size?: number | null; + /** + * Genome Build + * @description TODO + */ + genome_build?: string | null; + /** + * Hashes + * @description The list of hashes associated with this dataset. + */ + hashes?: components["schemas"]["DatasetHash"][] | null; + /** + * HDA or LDDA + * @description Whether this dataset belongs to a history (HDA) or a library (LDDA). + */ + hda_ldda?: components["schemas"]["DatasetSourceType"] | null; + /** + * HID + * @description The index position of this item in the History. + */ + hid?: number | null; + /** + * History Content Type + * @description This is always `dataset` for datasets. + */ + history_content_type?: "dataset" | null; + /** + * History ID + * @example 0123456789ABCDEF + */ + history_id?: string; + /** + * Id + * @example 0123456789ABCDEF + */ + id?: string; + /** + * Metadata Files + * @description Collection of metadata files associated with this dataset. + */ + meta_files?: components["schemas"]["MetadataFile"][] | null; + /** + * Metadata + * @description The metadata associated with this dataset. + */ + metadata?: Record | null; + /** + * Miscellaneous Blurb + * @description TODO + */ + misc_blurb?: string | null; + /** + * Miscellaneous Information + * @description TODO + */ + misc_info?: string | null; + /** + * Model class + * @description The name of the database model class. + * @constant + */ + model_class?: "HistoryDatasetAssociation"; + /** + * Name + * @description The name of the item. + */ + name?: string | null; + /** + * Peek + * @description A few lines of contents from the start of the file. + */ + peek?: string | null; + /** + * Permissions + * @description Role-based access and manage control permissions for the dataset. + */ + permissions?: components["schemas"]["DatasetPermissions"] | null; + /** + * Purged + * @description Whether this dataset has been removed from disk. + */ + purged?: boolean | null; + /** + * Rerunnable + * @description Whether the job creating this dataset can be run again. + */ + rerunnable?: boolean | null; + /** + * Resubmitted + * @description Whether the job creating this dataset has been resubmitted. + */ + resubmitted?: boolean | null; + /** + * Sources + * @description The list of sources associated with this dataset. + */ + sources?: components["schemas"]["DatasetSource"][] | null; + /** + * State + * @description The current state of this dataset. + */ + state?: components["schemas"]["DatasetState"] | null; + tags?: components["schemas"]["TagCollection"] | null; + /** + * Type + * @description This is always `file` for datasets. + */ + type?: "file" | null; + /** + * Type - ID + * @description The type and the encoded ID of this item. Used for caching. + */ + type_id?: string | null; + /** + * Update Time + * @description The last time and date this item was updated. + */ + update_time?: string | null; + /** + * URL + * @deprecated + * @description The relative URL to access this item. + */ + url?: string | null; + /** Uuid */ + uuid?: string | null; + /** + * Validated State + * @description The state of the datatype validation for this dataset. + */ + validated_state?: components["schemas"]["DatasetValidatedState"] | null; + /** + * Validated State Message + * @description The message with details about the datatype validation result for this dataset. + */ + validated_state_message?: string | null; + /** + * Visible + * @description Whether this item is visible or hidden to the user by default. + */ + visible?: boolean | null; + /** + * Visualizations + * @description The collection of visualizations that can be applied to this dataset. + */ + visualizations?: components["schemas"]["Visualization"][] | null; + [key: string]: unknown | undefined; + }; /** * HDADetailed * @description History Dataset Association detailed information. @@ -5500,6 +5835,7 @@ export interface components { * @description TODO * @default file * @constant + * @enum {string} */ api_type?: "file"; /** Copied From Ldda Id */ @@ -5550,6 +5886,11 @@ export interface components { * @description The URL to download this item from the server. */ download_url: string; + /** + * DRS ID + * @description The DRS ID of the dataset. + */ + drs_id: string; /** * Extension * @description The extension of the dataset. @@ -5576,6 +5917,11 @@ export interface components { * @default ? */ genome_build?: string | null; + /** + * Hashes + * @description The list of hashes associated with this dataset. + */ + hashes: components["schemas"]["DatasetHash"][]; /** * HDA or LDDA * @description Whether this dataset belongs to a history (HDA) or a library (LDDA). @@ -5591,6 +5937,7 @@ export interface components { * History Content Type * @description This is always `dataset` for datasets. * @constant + * @enum {string} */ history_content_type: "dataset"; /** @@ -5613,18 +5960,6 @@ export interface components { * @description The metadata associated with this dataset. */ metadata?: Record | null; - /** - * Metadata Data Lines - * @description TODO - * @default 0 - */ - metadata_data_lines?: number; - /** - * Metadata DBKey - * @description TODO - * @default ? - */ - metadata_dbkey?: string | null; /** * Miscellaneous Blurb * @description TODO @@ -5639,6 +5974,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "HistoryDatasetAssociation"; /** @@ -5671,6 +6007,11 @@ export interface components { * @description Whether the job creating this dataset has been resubmitted. */ resubmitted: boolean; + /** + * Sources + * @description The list of sources associated with this dataset. + */ + sources: components["schemas"]["DatasetSource"][]; /** * State * @description The current state of this dataset. @@ -5682,6 +6023,7 @@ export interface components { * @description This is always `file` for datasets. * @default file * @constant + * @enum {string} */ type?: "file"; /** @@ -5721,12 +6063,6 @@ export interface components { * @description Whether this item is visible or hidden to the user by default. */ visible: boolean; - /** - * Visualizations - * @description The collection of visualizations that can be applied to this dataset. - */ - visualizations: components["schemas"]["Visualization"][]; - [key: string]: unknown | undefined; }; /** * HDAObject @@ -5755,6 +6091,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "HistoryDatasetAssociation"; /** @@ -5794,6 +6131,12 @@ export interface components { * @description The extension of the dataset. */ extension: string | null; + /** + * Genome Build + * @description TODO + * @default ? + */ + genome_build?: string | null; /** * HID * @description The index position of this item in the History. @@ -5803,6 +6146,7 @@ export interface components { * History Content Type * @description This is always `dataset` for datasets. * @constant + * @enum {string} */ history_content_type: "dataset"; /** @@ -5857,7 +6201,6 @@ export interface components { * @description Whether this item is visible or hidden to the user by default. */ visible: boolean; - [key: string]: unknown | undefined; }; /** * HDCADetailed @@ -5914,6 +6257,7 @@ export interface components { * History Content Type * @description This is always `dataset_collection` for dataset collections. * @constant + * @enum {string} */ history_content_type: "dataset_collection"; /** @@ -5950,6 +6294,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "HistoryDatasetCollectionAssociation"; /** @@ -5978,6 +6323,7 @@ export interface components { * @description This is always `collection` for dataset collections. * @default collection * @constant + * @enum {string} */ type?: "collection"; /** @@ -6001,7 +6347,6 @@ export interface components { * @description Whether this item is visible or hidden to the user by default. */ visible: boolean; - [key: string]: unknown | undefined; }; /** * HDCASummary @@ -6047,6 +6392,7 @@ export interface components { * History Content Type * @description This is always `dataset_collection` for dataset collections. * @constant + * @enum {string} */ history_content_type: "dataset_collection"; /** @@ -6078,6 +6424,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "HistoryDatasetCollectionAssociation"; /** @@ -6101,6 +6448,7 @@ export interface components { * @description This is always `collection` for dataset collections. * @default collection * @constant + * @enum {string} */ type?: "collection"; /** @@ -6124,7 +6472,6 @@ export interface components { * @description Whether this item is visible or hidden to the user by default. */ visible: boolean; - [key: string]: unknown | undefined; }; /** * HDCJobStateSummary @@ -6227,11 +6574,18 @@ export interface components { * @enum {string} */ HashFunctionNameEnum: "MD5" | "SHA-1" | "SHA-256" | "SHA-512"; + /** + * HashFunctionNames + * @description Hash function names that can be used to generate checksums for datasets. + * @enum {string} + */ + HashFunctionNames: "MD5" | "SHA-1" | "SHA-256" | "SHA-512"; /** HdaDestination */ HdaDestination: { /** * Type * @constant + * @enum {string} */ type: "hdas"; }; @@ -6295,6 +6649,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "hdca"; }; @@ -6378,19 +6733,38 @@ export interface components { * This model is based on the Discourse API response for the search endpoint. */ HelpForumSearchResponse: { - /** Categories */ - categories: components["schemas"]["HelpForumCategory"][] | null; - grouped_search_result: components["schemas"]["HelpForumGroupedSearchResult"] | null; - /** Groups */ - groups: components["schemas"]["HelpForumGroup"][] | null; - /** Posts */ - posts: components["schemas"]["HelpForumPost"][] | null; - /** Tags */ - tags: components["schemas"]["HelpForumTag"][] | null; - /** Topics */ - topics: components["schemas"]["HelpForumTopic"][] | null; - /** Users */ - users: components["schemas"]["HelpForumUser"][] | null; + /** + * Categories + * @description The list of categories returned by the search. + */ + categories?: components["schemas"]["HelpForumCategory"][] | null; + /** @description The grouped search result. */ + grouped_search_result?: components["schemas"]["HelpForumGroupedSearchResult"] | null; + /** + * Groups + * @description The list of groups returned by the search. + */ + groups?: components["schemas"]["HelpForumGroup"][] | null; + /** + * Posts + * @description The list of posts returned by the search. + */ + posts?: components["schemas"]["HelpForumPost"][]; + /** + * Tags + * @description The list of tags returned by the search. + */ + tags?: components["schemas"]["HelpForumTag"][] | null; + /** + * Topics + * @description The list of topics returned by the search. + */ + topics?: components["schemas"]["HelpForumTopic"][]; + /** + * Users + * @description The list of users returned by the search. + */ + users?: components["schemas"]["HelpForumUser"][] | null; }; /** * HelpForumTag @@ -6418,7 +6792,7 @@ export interface components { * Bookmarked * @description Whether the topic is bookmarked. */ - bookmarked: boolean | null; + bookmarked?: boolean | null; /** * Bumped * @description Whether the topic was bumped. @@ -6473,7 +6847,7 @@ export interface components { * Liked * @description Whether the topic is liked. */ - liked: boolean | null; + liked?: boolean | null; /** * Pinned * @description Whether the topic is pinned. @@ -6503,7 +6877,7 @@ export interface components { * Tags Descriptions * @description The descriptions of the tags of the topic. */ - tags_descriptions: Record | null; + tags_descriptions?: Record | null; /** * Title * @description The title of the topic. @@ -6513,7 +6887,7 @@ export interface components { * Unpinned * @description Whether the topic is unpinned. */ - unpinned: boolean | null; + unpinned?: boolean | null; /** * Unseen * @description Whether the topic is unseen. @@ -6624,11 +6998,11 @@ export interface components { * Can contain different views and kinds of items. */ HistoryContentsResult: ( + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] )[]; /** * HistoryContentsWithStatsResult @@ -6640,11 +7014,11 @@ export interface components { * @description The items matching the search query. Only the items fitting in the current page limit will be returned. */ contents: ( + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] )[]; /** * Stats @@ -6708,6 +7082,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "History"; /** @@ -6822,6 +7197,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "History"; /** @@ -6864,9 +7240,8 @@ export interface components { */ Hyperlink: { /** - * HRef - * Format: uri - * @description Specifies the linked document, resource, or location. + * Href + * @description The URL of the linked document. */ href: string; /** @@ -6891,6 +7266,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model: "ImplicitCollectionJobs"; /** @@ -6934,6 +7310,7 @@ export interface components { * src * @description Indicates that the tool data should be resolved by a URI. * @constant + * @enum {string} */ src: "uri"; /** @@ -7006,6 +7383,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "data_collection_input"; /** When */ @@ -7048,6 +7426,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "data_input"; /** When */ @@ -7090,6 +7469,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "parameter_input"; /** When */ @@ -7187,6 +7567,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "ToolShedRepository"; /** @@ -7222,6 +7603,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "history_deleted"; }; @@ -7230,6 +7612,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "cancelled_on_review"; /** @@ -7243,6 +7626,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "user_request"; }; @@ -7256,6 +7640,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "workflow_output_not_found"; /** Workflow step id of step that caused a warning. */ @@ -7277,6 +7662,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "collection_failed"; /** @@ -7301,6 +7687,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "dataset_failed"; /** @@ -7319,6 +7706,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "expression_evaluation_failed"; /** @@ -7343,6 +7731,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "job_failed"; /** @@ -7363,6 +7752,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "output_not_found"; /** @@ -7381,6 +7771,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "when_not_boolean"; /** @@ -7443,6 +7834,7 @@ export interface components { /** * Model * @constant + * @enum {string} */ model: "WorkflowInvocation"; /** @@ -7469,6 +7861,7 @@ export interface components { * Source * @description Source model of the output dataset. * @constant + * @enum {string} */ src: "hda"; /** @@ -7489,6 +7882,7 @@ export interface components { * Source * @description Source model of the output dataset collection. * @constant + * @enum {string} */ src: "hdca"; /** @@ -7563,6 +7957,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Report"; /** @@ -7570,6 +7965,7 @@ export interface components { * @description Format of the invocation report. * @default markdown * @constant + * @enum {string} */ render_format?: "markdown"; /** @@ -7630,6 +8026,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "WorkflowInvocationStep"; /** @@ -7695,6 +8092,7 @@ export interface components { * @description The source model of the output. * @default hdca * @constant + * @enum {string} */ src?: "hdca"; }; @@ -7709,6 +8107,7 @@ export interface components { /** * Model * @constant + * @enum {string} */ model: "ImplicitCollectionJobs"; /** @@ -7735,6 +8134,7 @@ export interface components { /** * Model * @constant + * @enum {string} */ model: "Job"; /** @@ -7761,6 +8161,7 @@ export interface components { /** * Model * @constant + * @enum {string} */ model: "WorkflowInvocationStep"; /** @@ -7789,6 +8190,7 @@ export interface components { * @description The source model of the output. * @default hda * @constant + * @enum {string} */ src?: "hda"; /** @@ -7812,6 +8214,7 @@ export interface components { /** * Reason * @constant + * @enum {string} */ reason: "unexpected_failure"; /** @@ -8046,6 +8449,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Job"; /** @@ -8227,6 +8631,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Job"; /** @@ -8425,6 +8830,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model: "Job"; /** @@ -8496,6 +8902,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Job"; /** @@ -8629,6 +9036,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "library"; }; @@ -8669,6 +9077,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "library_folder"; }; @@ -8712,6 +9121,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "LibraryFolder"; /** @@ -8760,6 +9170,7 @@ export interface components { /** * LibraryFolderPermissionAction * @constant + * @enum {string} */ LibraryFolderPermissionAction: "set_permissions"; /** LibraryFolderPermissionsPayload */ @@ -8817,6 +9228,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Library"; /** @@ -8927,6 +9339,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Library"; /** @@ -9054,6 +9467,7 @@ export interface components { * * The user will always receive notifications from these categories. * @constant + * @enum {string} */ MandatoryNotificationCategory: "broadcast"; /** MaterializeDatasetInstanceAPIRequest */ @@ -9079,6 +9493,7 @@ export interface components { * Category * @default message * @constant + * @enum {string} */ category?: "message"; /** @@ -9206,6 +9621,7 @@ export interface components { * Category * @default new_shared_item * @constant + * @enum {string} */ category?: "new_shared_item"; /** @@ -9270,6 +9686,7 @@ export interface components { * Channels * @description The channels that the user wants to receive notifications from for this category. * @default { + * "email": true, * "push": true * } */ @@ -9286,6 +9703,12 @@ export interface components { * @description The settings for each channel of a notification category. */ NotificationChannelSettings: { + /** + * Email + * @description Whether the user wants to receive email notifications for this category. This setting will be ignored unless the server supports asynchronous tasks. + * @default true + */ + email?: boolean; /** * Push * @description Whether the user wants to receive push notifications in the browser for this category. @@ -9334,10 +9757,7 @@ export interface components { */ variant: components["schemas"]["NotificationVariant"]; }; - /** - * NotificationCreateRequest - * @description Contains the recipients and the notification to create. - */ + /** NotificationCreateRequest */ NotificationCreateRequest: { /** * Notification @@ -9348,7 +9768,7 @@ export interface components { * Recipients * @description The recipients of the notification. Can be a combination of users, groups and roles. */ - recipients: components["schemas"]["NotificationRecipients"]; + recipients: components["schemas"]["NotificationRecipientsRequest"]; }; /** NotificationCreatedResponse */ NotificationCreatedResponse: { @@ -9363,11 +9783,8 @@ export interface components { */ total_notifications_sent: number; }; - /** - * NotificationRecipients - * @description The recipients of a notification. Can be a combination of users, groups and roles. - */ - NotificationRecipients: { + /** NotificationRecipientsRequest */ + NotificationRecipientsRequest: { /** * Group IDs * @description The list of encoded group IDs of the groups that should receive the notification. @@ -9624,6 +10041,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Page"; /** @@ -9699,6 +10117,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Page"; /** @@ -9789,6 +10208,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "pasted"; /** Tags */ @@ -9848,6 +10268,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "path"; /** Tags */ @@ -9895,6 +10316,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "pause"; /** When */ @@ -10065,6 +10487,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Quota"; /** @@ -10117,6 +10540,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Quota"; /** @@ -10295,6 +10719,7 @@ export interface components { /** * Class * @constant + * @enum {string} */ class: "Directory"; /** @@ -10318,6 +10743,7 @@ export interface components { /** * Class * @constant + * @enum {string} */ class: "File"; /** @@ -10369,6 +10795,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "remove_unlabeled_workflow_outputs"; }; @@ -10455,6 +10882,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Role"; /** @@ -10546,6 +10974,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "server_dir"; /** Tags */ @@ -10977,6 +11406,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "Job"; /** @@ -11207,6 +11637,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "StoredWorkflow"; /** @@ -11317,6 +11748,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "subworkflow"; /** When */ @@ -11508,6 +11940,7 @@ export interface components { /** * Type * @constant + * @enum {string} */ type: "tool"; /** When */ @@ -11630,6 +12063,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_annotation"; /** Annotation */ @@ -11668,6 +12102,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_creator"; /** Creator */ @@ -11766,6 +12201,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_license"; /** License */ @@ -11776,6 +12212,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_name"; /** Name */ @@ -11794,6 +12231,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_output_label"; /** Output */ @@ -11847,6 +12285,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_report"; report: components["schemas"]["Report"]; @@ -11856,6 +12295,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_step_label"; /** @@ -11874,6 +12314,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "update_step_position"; position_shift: components["schemas"]["Position"]; @@ -11901,6 +12342,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "upgrade_all_steps"; }; @@ -11909,6 +12351,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "upgrade_subworkflow"; /** Content Id */ @@ -11924,6 +12367,7 @@ export interface components { /** * Action Type * @constant + * @enum {string} */ action_type: "upgrade_tool"; /** @@ -11979,6 +12423,7 @@ export interface components { /** * Src * @constant + * @enum {string} */ src: "url"; /** Tags */ @@ -12074,6 +12519,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "User"; /** @@ -12200,12 +12646,20 @@ export interface components { */ notification_ids: string[]; }; + /** UserObjectstoreUsage */ + UserObjectstoreUsage: { + /** Object Store Id */ + object_store_id: string; + /** Total Disk Usage */ + total_disk_usage: number; + }; /** UserQuota */ UserQuota: { /** * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "UserQuotaAssociation"; /** @@ -12350,6 +12804,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "WorkflowInvocation"; /** @@ -12430,6 +12885,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model_class: "WorkflowInvocation"; /** @@ -12494,6 +12950,7 @@ export interface components { * Model class * @description The name of the database model class. * @constant + * @enum {string} */ model: "WorkflowInvocation"; /** @@ -13036,8 +13493,10 @@ export interface operations { /** Returns detailed information about the given collection. */ parameters: { /** @description The type of collection instance. Either `history` (default) or `library`. */ + /** @description The view of collection instance to return. */ query?: { instance_type?: "history" | "library"; + view?: string; }; /** @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?: { @@ -13052,7 +13511,7 @@ export interface operations { /** @description Successful Response */ 200: { content: { - "application/json": components["schemas"]["HDCADetailed"]; + "application/json": components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"]; }; }; /** @description Validation Error */ @@ -13249,11 +13708,11 @@ export interface operations { 200: { content: { "application/json": ( + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] )[]; }; }; @@ -13340,6 +13799,116 @@ export interface operations { }; }; }; + datasets__update_dataset: { + /** + * Updates the values for the history dataset (HDA) item with the given ``ID``. + * @description Updates the values for the history content item with the given ``ID``. + */ + parameters: { + /** @description View to be passed to the serializer */ + /** @description Comma-separated list of keys to be passed to the serializer */ + query?: { + view?: string | null; + keys?: string | null; + }; + /** @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 | null; + }; + /** @description The ID of the item (`HDA`/`HDCA`) */ + path: { + dataset_id: string; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["UpdateHistoryContentsPayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": + | components["schemas"]["HDACustom"] + | components["schemas"]["HDADetailed"] + | components["schemas"]["HDASummary"] + | components["schemas"]["HDCADetailed"] + | components["schemas"]["HDCASummary"]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + datasets__delete: { + /** + * Delete the history dataset content with the given ``ID``. + * @description Delete the history content with the given ``ID`` and path specified type. + * + * **Note**: Currently does not stop any active jobs for which this dataset is an output. + */ + parameters: { + /** + * @deprecated + * @description Whether to remove from disk the target HDA or child HDAs of the target HDCA. + */ + /** + * @deprecated + * @description When deleting a dataset collection, whether to also delete containing datasets. + */ + /** + * @deprecated + * @description Whether to stop the creating job if all outputs of the job have been deleted. + */ + /** @description View to be passed to the serializer */ + /** @description Comma-separated list of keys to be passed to the serializer */ + query?: { + purge?: boolean | null; + recursive?: boolean | null; + stop_job?: boolean | null; + view?: string | null; + keys?: string | null; + }; + /** @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 | null; + }; + /** @description The ID of the item (`HDA`/`HDCA`) */ + path: { + dataset_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteHistoryContentPayload"]; + }; + }; + responses: { + /** @description Request has been executed. */ + 200: { + content: { + "application/json": components["schemas"]["DeleteHistoryContentResult"]; + }; + }; + /** @description Request accepted, processing will finish later. */ + 202: { + content: { + "application/json": components["schemas"]["DeleteHistoryContentResult"]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; get_structured_content_api_datasets__dataset_id__content__content_type__get: { /** Retrieve information about the content of a dataset. */ parameters: { @@ -13429,7 +13998,10 @@ export interface operations { /** @description Successful Response */ 200: { content: { - "application/json": components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"]; + "application/json": + | components["schemas"]["HDACustom"] + | components["schemas"]["HDADetailed"] + | components["schemas"]["HDASummary"]; }; }; /** @description Validation Error */ @@ -15238,6 +15810,7 @@ export interface operations { parameters?: { /** @description The maximum number of items to return. */ /** @description Starts at the beginning skip the first ( offset - 1 ) items and begin returning at the Nth item */ + /** @description Whether to include archived histories. */ /** @description Sort index by this specified attribute */ /** @description Sort in descending order? */ /** @@ -15289,6 +15862,7 @@ export interface operations { show_own?: boolean; show_published?: boolean; show_shared?: boolean; + show_archived?: boolean | null; sort_by?: "create_time" | "name" | "update_time" | "username"; sort_desc?: boolean; search?: string | null; @@ -16176,17 +16750,17 @@ export interface operations { 200: { content: { "application/json": + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] | ( + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] )[]; }; }; @@ -16765,11 +17339,11 @@ export interface operations { 200: { content: { "application/json": + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] - | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"]; + | components["schemas"]["HDCASummary"]; }; }; /** @description Validation Error */ @@ -16816,11 +17390,11 @@ export interface operations { 200: { content: { "application/json": + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] - | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"]; + | components["schemas"]["HDCASummary"]; }; }; /** @description Validation Error */ @@ -17048,17 +17622,17 @@ export interface operations { 200: { content: { "application/json": + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] | ( + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] )[]; }; }; @@ -17104,11 +17678,11 @@ export interface operations { 200: { content: { "application/json": + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] - | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"]; + | components["schemas"]["HDCASummary"]; }; }; /** @description Validation Error */ @@ -17154,11 +17728,11 @@ export interface operations { 200: { content: { "application/json": + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] - | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"]; + | components["schemas"]["HDCASummary"]; }; }; /** @description Validation Error */ @@ -17385,11 +17959,11 @@ export interface operations { 200: { content: { "application/json": ( + | components["schemas"]["HDACustom"] | components["schemas"]["HDADetailed"] | components["schemas"]["HDASummary"] | components["schemas"]["HDCADetailed"] | components["schemas"]["HDCASummary"] - | components["schemas"]["CustomHistoryItem"] )[]; }; }; @@ -19604,7 +20178,9 @@ export interface operations { /** @description Successful Response */ 200: { content: { - "application/json": components["schemas"]["NotificationCreatedResponse"]; + "application/json": + | components["schemas"]["NotificationCreatedResponse"] + | components["schemas"]["AsyncTaskResultSummary"]; }; }; /** @description Validation Error */ @@ -19776,6 +20352,9 @@ export interface operations { /** * Returns the current user's preferences for notifications. * @description Anonymous users cannot have notification preferences. They will receive only broadcasted notifications. + * + * - The settings will contain all possible channels, but the client should only show the ones that are really supported by the server. + * The supported channels are returned in the `supported-channels` header. */ 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. */ @@ -22350,6 +22929,33 @@ export interface operations { }; }; }; + get_user_objectstore_usage_api_users__user_id__objectstore_usage_get: { + /** Return the user's object store usage summary broken down by object store ID */ + 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 | null; + }; + /** @description The ID of the user to get or 'current'. */ + path: { + user_id: string | "current"; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["UserObjectstoreUsage"][]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; recalculate_disk_usage_by_user_id_api_users__user_id__recalculate_disk_usage_put: { /** Triggers a recalculation of the current user disk usage. */ parameters: { diff --git a/client/src/api/users.ts b/client/src/api/users.ts index 7a59d96ea839..2b3fca5b279d 100644 --- a/client/src/api/users.ts +++ b/client/src/api/users.ts @@ -3,6 +3,7 @@ import { fetcher } from "@/api/schema"; export const createApiKey = fetcher.path("/api/users/{user_id}/api_key").method("post").create(); export const deleteUser = fetcher.path("/api/users/{user_id}").method("delete").create(); export const fetchQuotaUsages = fetcher.path("/api/users/{user_id}/usage").method("get").create(); +export const fetchObjectStoreUsages = fetcher.path("/api/users/{user_id}/objectstore_usage").method("get").create(); export const recalculateDiskUsage = fetcher.path("/api/users/current/recalculate_disk_usage").method("put").create(); export const recalculateDiskUsageByUserId = fetcher .path("/api/users/{user_id}/recalculate_disk_usage") diff --git a/client/src/api/workflows.ts b/client/src/api/workflows.ts index 0febc403426d..0082f1db63f9 100644 --- a/client/src/api/workflows.ts +++ b/client/src/api/workflows.ts @@ -3,3 +3,6 @@ import { fetcher } from "@/api/schema"; export const workflowsFetcher = fetcher.path("/api/workflows").method("get").create(); export const invocationCountsFetcher = fetcher.path("/api/workflows/{workflow_id}/counts").method("get").create(); + +export const sharing = fetcher.path("/api/workflows/{workflow_id}/sharing").method("get").create(); +export const enableLink = fetcher.path("/api/workflows/{workflow_id}/enable_link_access").method("put").create(); diff --git a/client/src/components/ActivityBar/ActivityBar.vue b/client/src/components/ActivityBar/ActivityBar.vue index 9a440d5ddd27..40baad944a5a 100644 --- a/client/src/components/ActivityBar/ActivityBar.vue +++ b/client/src/components/ActivityBar/ActivityBar.vue @@ -16,12 +16,16 @@ import ActivityItem from "./ActivityItem.vue"; import InteractiveItem from "./Items/InteractiveItem.vue"; import NotificationItem from "./Items/NotificationItem.vue"; import UploadItem from "./Items/UploadItem.vue"; +import AdminPanel from "@/components/admin/AdminPanel.vue"; import FlexPanel from "@/components/Panels/FlexPanel.vue"; import MultiviewPanel from "@/components/Panels/MultiviewPanel.vue"; import NotificationsPanel from "@/components/Panels/NotificationsPanel.vue"; import SettingsPanel from "@/components/Panels/SettingsPanel.vue"; import ToolPanel from "@/components/Panels/ToolPanel.vue"; +// require user to long click before dragging +const DRAG_DELAY = 50; + const { config, isConfigLoaded } = useConfig(); const route = useRoute(); @@ -31,7 +35,7 @@ const { hashedUserId } = useHashedUserId(); const eventStore = useEventStore(); const activityStore = useActivityStore(); -const { isAnonymous } = storeToRefs(userStore); +const { isAdmin, isAnonymous } = storeToRefs(userStore); const emit = defineEmits(["dragstart"]); @@ -149,6 +153,7 @@ watch( :class="{ 'activity-popper-disabled': isDragging }" :force-fallback="true" chosen-class="activity-chosen-class" + :delay="DRAG_DELAY" drag-class="activity-drag-class" ghost-class="activity-chosen-class" @start="isDragging = true" @@ -173,7 +178,7 @@ watch( :to="activity.to" @click="onToggleSidebar()" /> - + + @@ -219,6 +233,7 @@ watch( + @@ -244,6 +259,11 @@ watch( display: none; } +.activity-footer { + border-top: $border-default; + border-top-style: dotted; +} + .activity-popper-disabled { .popper-element { display: none; diff --git a/client/src/components/ActivityBar/ActivityItem.vue b/client/src/components/ActivityBar/ActivityItem.vue index c6ce2a2ee75b..0586a1657f99 100644 --- a/client/src/components/ActivityBar/ActivityItem.vue +++ b/client/src/components/ActivityBar/ActivityItem.vue @@ -24,6 +24,7 @@ export interface Props { progressStatus?: string; options?: Option[]; to?: string; + variant?: string; } const props = withDefaults(defineProps(), { @@ -37,6 +38,7 @@ const props = withDefaults(defineProps(), { to: undefined, tooltip: undefined, tooltipPlacement: "right", + variant: "primary", }); const emit = defineEmits<{ @@ -70,7 +72,7 @@ function onClick(evt: MouseEvent): void { width: `${Math.round(progressPercentage)}%`, }" /> - + - - diff --git a/client/src/components/Common/FilterMenu.test.ts b/client/src/components/Common/FilterMenu.test.ts index c9955acee309..8474981948dc 100644 --- a/client/src/components/Common/FilterMenu.test.ts +++ b/client/src/components/Common/FilterMenu.test.ts @@ -1,7 +1,9 @@ +import { createTestingPinia } from "@pinia/testing"; import { getLocalVue } from "@tests/jest/helpers"; import { mount, Wrapper } from "@vue/test-utils"; import { HistoryFilters } from "@/components/History/HistoryFilters"; +import { WorkflowFilters } from "@/components/Workflow/WorkflowFilters"; import Filtering, { compare, contains, equals, toBool, toDate } from "@/utils/filtering"; import FilterMenu from "./FilterMenu.vue"; @@ -80,6 +82,7 @@ describe("FilterMenu", () => { stubs: { icon: { template: "
" }, }, + pinia: createTestingPinia(), }); } @@ -89,11 +92,13 @@ describe("FilterMenu", () => { await searchButton.trigger("click"); } - async function expectCorrectEmits(showAdvanced: boolean, filterText: string, filterClass: Filtering) { + async function expectCorrectEmits(filterText: string, filterClass: Filtering, showAdvanced?: boolean) { + if (showAdvanced !== undefined) { + const toggleEmit = (wrapper.emitted()?.["update:show-advanced"]?.length ?? 0) - 1; + expect(wrapper.emitted()["update:show-advanced"]?.[toggleEmit]?.[0]).toEqual(showAdvanced); + await wrapper.setProps({ showAdvanced: wrapper.emitted()["update:show-advanced"]?.[toggleEmit]?.[0] }); + } const filterEmit = (wrapper.emitted()["update:filter-text"]?.length ?? 0) - 1; - const toggleEmit = (wrapper.emitted()?.["update:show-advanced"]?.length ?? 0) - 1; - expect(wrapper.emitted()["update:show-advanced"]?.[toggleEmit]?.[0]).toEqual(showAdvanced); - await wrapper.setProps({ showAdvanced: wrapper.emitted()["update:show-advanced"]?.[toggleEmit]?.[0] }); const receivedText = wrapper.emitted()["update:filter-text"]?.[filterEmit]?.[0]; const receivedDict = filterClass.getQueryDict(receivedText); const parsedDict = filterClass.getQueryDict(filterText); @@ -185,11 +190,11 @@ describe("FilterMenu", () => { // perform search await performSearch(); await expectCorrectEmits( - false, "create_time>'January 1, 2022' create_time<'January 1, 2023' " + "filter_key:item-filter has_help:has-help-filter list_item:1234 " + "number>1234 number<5678 name:name-filter radio:true bool_def:true", - TestFilters + TestFilters, + false ); }); @@ -209,17 +214,17 @@ describe("FilterMenu", () => { // -------- Test keyup.enter key: --------- // toggles view out and performs a search await filterName.trigger("keyup.enter"); - await expectCorrectEmits(false, "name:'sample name'", TestFilters); + await expectCorrectEmits("name:'sample name'", TestFilters, false); // Test: clearing the filterText const clearButton = wrapper.find("[data-description='reset query']"); await clearButton.trigger("click"); - await expectCorrectEmits(false, "", TestFilters); + await expectCorrectEmits("", TestFilters, false); // Test: toggling view back in const toggleButton = wrapper.find("[data-description='toggle advanced search']"); await toggleButton.trigger("click"); - await expectCorrectEmits(true, "", TestFilters); + await expectCorrectEmits("", TestFilters, true); // -------- Test keyup.esc key: --------- // toggles view out only (doesn't cause a new search / doesn't emulate enter) @@ -232,7 +237,7 @@ describe("FilterMenu", () => { // press esc key from name field (should not change emitted filterText unlike enter key) await filterName.trigger("keyup.esc"); - await expectCorrectEmits(false, "", TestFilters); + await expectCorrectEmits("", TestFilters, false); }); /** @@ -260,13 +265,13 @@ describe("FilterMenu", () => { // expect "deleted = any" filter to be applied await performSearch(); - await expectCorrectEmits(false, "visible:true", HistoryFilters); + await expectCorrectEmits("visible:true", HistoryFilters, false); // -------- Testing visible filter now: --------- const toggleButton = wrapper.find("[data-description='toggle advanced search']"); await toggleButton.trigger("click"); - await expectCorrectEmits(true, "visible:true", HistoryFilters); + await expectCorrectEmits("visible:true", HistoryFilters, true); const visibleFilterBtnGrp = wrapper.find("[data-description='filter visible']"); const visibleFilterAnyBtn = visibleFilterBtnGrp.find(".btn-secondary"); expect(visibleFilterAnyBtn.text()).toBe("Any"); @@ -283,13 +288,34 @@ describe("FilterMenu", () => { // expect "visible = any" filter to be applied await performSearch(); - await expectCorrectEmits(false, "deleted:any visible:any", HistoryFilters); + await expectCorrectEmits("deleted:any visible:any", HistoryFilters, false); // -------- Testing repeated search if it prevents bug: --------- // (bug reported here: https://github.com/galaxyproject/galaxy/issues/16211) await toggleButton.trigger("click"); - await expectCorrectEmits(true, "deleted:any visible:any", HistoryFilters); + await expectCorrectEmits("deleted:any visible:any", HistoryFilters, true); await performSearch(); - await expectCorrectEmits(false, "deleted:any visible:any", HistoryFilters); + await expectCorrectEmits("deleted:any visible:any", HistoryFilters, false); + }); + + /** + * Testing the default values of the filters defined in the HistoryFilters: Filtering + * class, ensuring the default values are reflected in the radio-group buttons + */ + it("test compact menu with checkbox filters on WorkflowFilters", async () => { + const myWorkflowFilters = WorkflowFilters("my"); + setUpWrapper("Workflows", "search workflows", myWorkflowFilters); + // a compact `FilterMenu` only needs to be opened once (doesn't toggle out automatically) + await wrapper.setProps({ showAdvanced: true, view: "compact" }); + + // -------- Testing auto search on value change: --------- + const nameFilterInput = wrapper.find("#workflows-advanced-filter-name"); + await nameFilterInput.setValue("myworkflow"); + await expectCorrectEmits("name:myworkflow", myWorkflowFilters); + + // -------- Testing deleted filter first: --------- + const deletedFilterCheckbox = wrapper.find("[data-description='filter deleted'] input"); + await deletedFilterCheckbox.setChecked(); + await expectCorrectEmits("name:myworkflow is:deleted", myWorkflowFilters); }); }); diff --git a/client/src/components/Common/FilterMenu.vue b/client/src/components/Common/FilterMenu.vue index f3deb4ee9894..f33bdb70960c 100644 --- a/client/src/components/Common/FilterMenu.vue +++ b/client/src/components/Common/FilterMenu.vue @@ -1,13 +1,13 @@