diff --git a/client/package.json b/client/package.json index 2ccea43f22ce..4d02c0efa73c 100644 --- a/client/package.json +++ b/client/package.json @@ -36,6 +36,7 @@ "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/vue-fontawesome": "^2.0.9", + "@guolao/vue-monaco-editor": "^1.5.4", "@handsontable/vue": "^2.0.0", "@hirez_io/observer-spy": "^2.1.2", "@johmun/vue-tags-input": "^2.1.0", @@ -86,6 +87,9 @@ "lucide-vue": "^0.344.0", "markdown-it": "^13.0.2", "markdown-it-regexp": "^0.4.0", + "monaco-editor": "^0.52.2", + "monaco-editor-webpack-plugin": "^7.1.0", + "monaco-yaml": "^5.2.3", "object-hash": "^3.0.0", "openapi-fetch": "^0.10.6", "pinia": "^2.1.7", @@ -99,6 +103,7 @@ "rxjs": "^7.8.1", "rxjs-spy": "^8.0.2", "rxjs-spy-devtools-plugin": "^0.0.4", + "schema-to-ts": "^0.0.2", "simplify-js": "^1.2.4", "slugify": "^1.6.6", "stream-browserify": "^3.0.0", @@ -123,7 +128,8 @@ "vue2-teleport": "^1.0.1", "vuedraggable": "^2.24.3", "winbox": "^0.2.82", - "xml-beautifier": "^0.5.0" + "xml-beautifier": "^0.5.0", + "yaml": "^2.6.1" }, "scripts": { "develop": "NODE_ENV=development gulp && webpack-dev-server", diff --git a/client/src/api/index.ts b/client/src/api/index.ts index ff5517ba05f1..7303da47e265 100644 --- a/client/src/api/index.ts +++ b/client/src/api/index.ts @@ -330,3 +330,6 @@ export type AsyncTaskResultSummary = components["schemas"]["AsyncTaskResultSumma export type CollectionElementIdentifiers = components["schemas"]["CollectionElementIdentifier"][]; export type CreateNewCollectionPayload = components["schemas"]["CreateNewCollectionPayload"]; +export type UnprivilegedToolResponse = components["schemas"]["UnprivilegedToolResponse"]; +export type UserToolSource = components["schemas"]["UserToolSource-Input"]; +export type DynamicUnprivilegedToolCreatePayload = components["schemas"]["DynamicUnprivilegedToolCreatePayload"]; diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index f3aa397fa3da..67f4cd7e1821 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -932,6 +932,48 @@ export interface paths { patch?: never; trace?: never; }; + "/api/dynamic_tools": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Index */ + get: operations["index_api_dynamic_tools_get"]; + put?: never; + /** Create */ + post: operations["create_api_dynamic_tools_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dynamic_tools/{dynamic_tool_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Show */ + get: operations["show_api_dynamic_tools__dynamic_tool_id__get"]; + put?: never; + post?: never; + /** + * Delete + * @description DELETE /api/dynamic_tools/{encoded_dynamic_tool_id|tool_uuid} + * + * Deactivate the specified dynamic tool. Deactivated tools will not + * be loaded into the toolbox. + */ + delete: operations["delete_api_dynamic_tools__dynamic_tool_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/file_source_instances": { parameters: { query?: never; @@ -4586,6 +4628,82 @@ export interface paths { patch?: never; trace?: never; }; + "/api/unprivileged_tools": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Index */ + get: operations["index_api_unprivileged_tools_get"]; + put?: never; + /** Create */ + post: operations["create_api_unprivileged_tools_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/unprivileged_tools/build": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Build */ + post: operations["build_api_unprivileged_tools_build_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/unprivileged_tools/runtime_model": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Runtime Model */ + post: operations["runtime_model_api_unprivileged_tools_runtime_model_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/unprivileged_tools/{uuid}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Show */ + get: operations["show_api_unprivileged_tools__uuid__get"]; + put?: never; + post?: never; + /** + * Delete + * @description DELETE /api/unprivileged_tools/{encoded_dynamic_tool_id|tool_uuid} + * + * Deactivate the specified dynamic tool. Deactivated tools will not + * be loaded into the toolbox. + */ + delete: operations["delete_api_unprivileged_tools__uuid__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/users": { parameters: { query?: never; @@ -6059,6 +6177,70 @@ export interface components { */ type: string; }; + /** AdminToolSource */ + AdminToolSource: { + /** Citations */ + citations?: components["schemas"]["Citation"][] | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + class: "GalaxyTool"; + /** Command */ + command: string; + /** Container */ + container?: string | null; + /** Description */ + description?: string | null; + /** Edam Operations */ + edam_operations?: string[] | null; + /** Edam Topics */ + edam_topics?: string[] | null; + help?: components["schemas"]["HelpContent"] | null; + /** Id */ + id?: string | null; + /** + * Inputs + * @default [] + */ + inputs: components["schemas"]["GalaxyToolParameterModel-Input"][]; + /** License */ + license?: string | null; + /** Name */ + name?: string | null; + /** + * Outputs + * @default [] + */ + outputs: ( + | components["schemas"]["IncomingToolOutputDataset"] + | components["schemas"]["IncomingToolOutputCollection-Input"] + | components["schemas"]["ToolOutputText"] + | components["schemas"]["ToolOutputInteger"] + | components["schemas"]["ToolOutputFloat"] + | components["schemas"]["ToolOutputBoolean"] + )[]; + /** Profile */ + profile?: number | null; + /** + * Requirements + * @default [] + */ + requirements: + | ( + | components["schemas"]["JavascriptRequirement"] + | components["schemas"]["ResourceRequirement"] + | components["schemas"]["ContainerRequirement"] + )[] + | null; + /** + * Version + * @default 1.0 + */ + version: string | null; + /** Xrefs */ + xrefs?: components["schemas"]["XrefDict"][] | null; + }; /** AnonUserModel */ AnonUserModel: { /** @@ -6369,6 +6551,43 @@ export interface components { ) | ("cloud" | "quota" | "no_quota" | "restricted" | "user_defined"); }; + /** BaseUrlParameterModel */ + BaseUrlParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_baseurl + * @constant + */ + parameter_type: "gx_baseurl"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "baseurl"; + }; /** BasicRoleModel */ BasicRoleModel: { /** @@ -6484,6 +6703,52 @@ export interface components { /** Targets */ targets: unknown; }; + /** BooleanParameterModel */ + BooleanParameterModel: { + /** Argument */ + argument?: string | null; + /** Falsevalue */ + falsevalue?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_boolean + * @constant + */ + parameter_type: "gx_boolean"; + /** Truevalue */ + truevalue?: string | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "boolean"; + /** + * Value + * @default false + */ + value: boolean | null; + }; /** BroadcastNotificationContent */ BroadcastNotificationContent: { /** @@ -6750,6 +7015,13 @@ export interface components { */ type: string; }; + /** Citation */ + Citation: { + /** Content */ + content: string; + /** Type */ + type: string; + }; /** ClaimLandingPayload */ ClaimLandingPayload: { /** Client Secret */ @@ -6811,6 +7083,45 @@ export interface components { * @enum {string} */ ColletionSourceType: "hda" | "ldda" | "hdca" | "new_collection"; + /** ColorParameterModel */ + ColorParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_color + * @constant + */ + parameter_type: "gx_color"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "color"; + /** Value */ + value?: string | null; + }; /** CompositeDataElement */ CompositeDataElement: { /** Md5 */ @@ -6964,6 +7275,166 @@ export interface components { */ source: string | null; }; + /** ConditionalParameterModel */ + "ConditionalParameterModel-Input": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_conditional + * @constant + */ + parameter_type: "gx_conditional"; + /** Test Parameter */ + test_parameter: + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["SelectParameterModel"]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "conditional"; + /** Whens */ + whens: components["schemas"]["ConditionalWhen-Input"][]; + }; + /** ConditionalParameterModel */ + "ConditionalParameterModel-Output": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_conditional + * @constant + */ + parameter_type: "gx_conditional"; + /** Test Parameter */ + test_parameter: + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["SelectParameterModel"]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "conditional"; + /** Whens */ + whens: components["schemas"]["ConditionalWhen-Output"][]; + }; + /** ConditionalWhen */ + "ConditionalWhen-Input": { + /** Discriminator */ + discriminator: boolean | string; + /** Is Default When */ + is_default_when: boolean; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Input"] + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Input"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Input"] + | components["schemas"]["RepeatParameterModel-Input"] + | components["schemas"]["SectionParameterModel-Input"] + )[]; + }; + /** ConditionalWhen */ + "ConditionalWhen-Output": { + /** Discriminator */ + discriminator: boolean | string; + /** Is Default When */ + is_default_when: boolean; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Output"] + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Output"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Output"] + | components["schemas"]["RepeatParameterModel-Output"] + | components["schemas"]["SectionParameterModel-Output"] + )[]; + }; /** ConnectAction */ ConnectAction: { /** @@ -6978,6 +7449,25 @@ export interface components { | components["schemas"]["OutputReferenceByOrderIndex"] | components["schemas"]["OutputReferenceByLabel"]; }; + /** Container */ + Container: { + /** Container Id */ + container_id: string; + /** + * Type + * @enum {string} + */ + type: "docker" | "singularity"; + }; + /** ContainerRequirement */ + ContainerRequirement: { + container: components["schemas"]["Container"]; + /** + * Type + * @constant + */ + type: "container"; + }; /** ContentsObject */ ContentsObject: { /** @@ -7899,6 +8389,169 @@ export interface components { */ username_and_slug?: string | null; }; + /** CwlBooleanParameterModel */ + CwlBooleanParameterModel: { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_boolean + * @constant + */ + parameter_type: "cwl_boolean"; + }; + /** CwlDirectoryParameterModel */ + CwlDirectoryParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default cwl_directory + * @constant + */ + parameter_type: "cwl_directory"; + }; + /** CwlFileParameterModel */ + CwlFileParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default cwl_file + * @constant + */ + parameter_type: "cwl_file"; + }; + /** CwlFloatParameterModel */ + CwlFloatParameterModel: { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_float + * @constant + */ + parameter_type: "cwl_float"; + }; + /** CwlIntegerParameterModel */ + CwlIntegerParameterModel: { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_integer + * @constant + */ + parameter_type: "cwl_integer"; + }; + /** CwlNullParameterModel */ + CwlNullParameterModel: { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_null + * @constant + */ + parameter_type: "cwl_null"; + }; + /** CwlStringParameterModel */ + CwlStringParameterModel: { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_string + * @constant + */ + parameter_type: "cwl_string"; + }; + /** CwlUnionParameterModel */ + "CwlUnionParameterModel-Input": { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_union + * @constant + */ + parameter_type: "cwl_union"; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Input"] + )[]; + }; + /** CwlUnionParameterModel */ + "CwlUnionParameterModel-Output": { + /** Name */ + name: string; + /** + * Parameter Type + * @default cwl_union + * @constant + */ + parameter_type: "cwl_union"; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Output"] + )[]; + }; /** * DCESummary * @description Dataset Collection Element summary information. @@ -7986,6 +8639,97 @@ export interface components { */ populated?: boolean; }; + /** DataCollectionParameterModel */ + DataCollectionParameterModel: { + /** Argument */ + argument?: string | null; + /** Collection Type */ + collection_type?: string | null; + /** + * Extensions + * @default [ + * "data" + * ] + */ + extensions: string[]; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_data_collection + * @constant + */ + parameter_type: "gx_data_collection"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "data_collection"; + /** Value */ + value: { + [key: string]: unknown; + } | null; + }; + /** DataColumnParameterModel */ + DataColumnParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Multiple */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_data_column + * @constant + */ + parameter_type: "gx_data_column"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "data_column"; + /** Value */ + value?: number | number[] | null; + }; /** DataElementsFromTarget */ DataElementsFromTarget: { /** @@ -8042,6 +8786,59 @@ export interface components { * @enum {string} */ DataItemSourceType: "hda" | "ldda" | "hdca" | "dce" | "dc"; + /** DataParameterModel */ + DataParameterModel: { + /** Argument */ + argument?: string | null; + /** + * Extensions + * @default [ + * "data" + * ] + */ + extensions: string[]; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Max */ + max?: number | null; + /** Min */ + min?: number | null; + /** + * Multiple + * @default false + */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_data + * @constant + */ + parameter_type: "gx_data"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "data"; + }; /** DatasetAssociationRoles */ DatasetAssociationRoles: { /** @@ -8693,6 +9490,53 @@ export interface components { */ username: string; }; + /** DirectoryUriParameterModel */ + DirectoryUriParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_directory_uri + * @constant + */ + parameter_type: "gx_directory_uri"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "directory"; + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[]; + }; /** DisconnectAction */ DisconnectAction: { /** @@ -8736,6 +9580,120 @@ export interface components { /** Version */ version: string; }; + /** DrillDownOptionsDict */ + "DrillDownOptionsDict-Input": { + /** Name */ + name: string | null; + /** Options */ + options: components["schemas"]["DrillDownOptionsDict-Input"][]; + /** Selected */ + selected: boolean; + /** Value */ + value: string; + }; + /** DrillDownOptionsDict */ + "DrillDownOptionsDict-Output": { + /** Name */ + name: string | null; + /** Options */ + options: components["schemas"]["DrillDownOptionsDict-Output"][]; + /** Selected */ + selected: boolean; + /** Value */ + value: string; + }; + /** DrillDownParameterModel */ + "DrillDownParameterModel-Input": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Hierarchy + * @enum {string} + */ + hierarchy: "recurse" | "exact"; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Multiple */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** Options */ + options?: components["schemas"]["DrillDownOptionsDict-Input"][] | null; + /** + * Parameter Type + * @default gx_drill_down + * @constant + */ + parameter_type: "gx_drill_down"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "drill_down"; + }; + /** DrillDownParameterModel */ + "DrillDownParameterModel-Output": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Hierarchy + * @enum {string} + */ + hierarchy: "recurse" | "exact"; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Multiple */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** Options */ + options?: components["schemas"]["DrillDownOptionsDict-Output"][] | null; + /** + * Parameter Type + * @default gx_drill_down + * @constant + */ + parameter_type: "gx_drill_down"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "drill_down"; + }; /** DrsObject */ DrsObject: { /** @@ -8823,11 +9781,87 @@ export interface components { */ version?: string | null; }; + /** DynamicToolCreatePayload */ + DynamicToolCreatePayload: { + /** + * Active + * @default true + */ + active: boolean | null; + /** + * Allow Load + * @default true + */ + allow_load: boolean | null; + /** + * Hidden + * @default false + */ + hidden: boolean | null; + /** Representation */ + representation: components["schemas"]["UserToolSource-Input"] | components["schemas"]["AdminToolSource"]; + /** + * Src + * @default representation + * @constant + */ + src: "representation"; + /** Uuid */ + uuid?: string | null; + }; + /** DynamicUnprivilegedToolCreatePayload */ + DynamicUnprivilegedToolCreatePayload: { + /** + * Active + * @default true + */ + active: boolean | null; + /** + * Allow Load + * @default true + */ + allow_load: boolean | null; + /** + * Hidden + * @default false + */ + hidden: boolean | null; + representation: components["schemas"]["UserToolSource-Input"]; + /** + * Src + * @default representation + * @constant + */ + src: "representation"; + /** Uuid */ + uuid?: string | null; + }; /** * ElementsFromType * @enum {string} */ ElementsFromType: "archive" | "bagit" | "bagit_archive" | "directory"; + /** EmptyFieldParameterValidatorModel */ + EmptyFieldParameterValidatorModel: { + /** + * Implicit + * @default false + */ + implicit: boolean; + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default empty_field + * @constant + */ + type: "empty_field"; + }; /** EncodedDataItemSourceId */ EncodedDataItemSourceId: { /** @@ -9159,6 +10193,34 @@ export interface components { }; /** ExportTaskListResponse */ ExportTaskListResponse: components["schemas"]["ObjectExportTaskResponse"][]; + /** + * ExpressionParameterValidatorModel + * @description Check if a one line python expression given expression evaluates to True. + * + * The expression is given is the content of the validator tag. + */ + ExpressionParameterValidatorModel: { + /** Expression */ + expression: string; + /** + * Implicit + * @default false + */ + implicit: boolean; + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default expression + * @constant + */ + type: "expression"; + }; /** ExtraFileEntry */ ExtraFileEntry: { /** @description The class of this entry, either File or Directory. */ @@ -9402,6 +10464,38 @@ export interface components { */ update_time: string; }; + /** FilePatternDatasetCollectionDescription */ + FilePatternDatasetCollectionDescription: { + /** Assign Primary Output */ + assign_primary_output: boolean; + /** Directory */ + directory: string | null; + /** + * Discover Via + * @constant + */ + discover_via: "pattern"; + /** Format */ + format: string | null; + /** Match Relative Path */ + match_relative_path: boolean; + /** Pattern */ + pattern: string; + /** Recurse */ + recurse: boolean; + /** + * Sort Comp + * @enum {string} + */ + sort_comp: "lexical" | "numeric"; + /** + * Sort Key + * @enum {string} + */ + sort_key: "filename" | "name" | "designation" | "dbkey"; + /** Visible */ + visible: boolean; + }; /** FileSourceTemplateSummaries */ FileSourceTemplateSummaries: components["schemas"]["FileSourceTemplateSummary"][]; /** FileSourceTemplateSummary */ @@ -9547,6 +10641,54 @@ export interface components { /** Step */ step: components["schemas"]["StepReferenceByOrderIndex"] | components["schemas"]["StepReferenceByLabel"]; }; + /** FloatParameterModel */ + FloatParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Max */ + max?: number | null; + /** Min */ + min?: number | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_float + * @constant + */ + parameter_type: "gx_float"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "float"; + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][]; + /** Value */ + value?: number | null; + }; /** FolderLibraryFolderItem */ FolderLibraryFolderItem: { /** Can Manage */ @@ -9675,6 +10817,87 @@ export interface components { /** Tags */ tags?: string[] | null; }; + /** GalaxyToolParameterModel */ + "GalaxyToolParameterModel-Input": + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Input"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Input"] + | components["schemas"]["RepeatParameterModel-Input"] + | components["schemas"]["SectionParameterModel-Input"]; + /** GalaxyToolParameterModel */ + "GalaxyToolParameterModel-Output": + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Output"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Output"] + | components["schemas"]["RepeatParameterModel-Output"] + | components["schemas"]["SectionParameterModel-Output"]; + /** GenomeBuildParameterModel */ + GenomeBuildParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Multiple */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_genomebuild + * @constant + */ + parameter_type: "gx_genomebuild"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "genomebuild"; + }; /** * GroupCreatePayload * @description Payload schema for creating a group. @@ -9782,6 +11005,45 @@ export interface components { */ url: string; }; + /** GroupTagParameterModel */ + GroupTagParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Multiple */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_group_tag + * @constant + */ + parameter_type: "gx_group_tag"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "group_tag"; + }; /** GroupUpdatePayload */ GroupUpdatePayload: { /** name of the group */ @@ -11112,6 +12374,16 @@ export interface components { */ type: "hdca"; }; + /** HelpContent */ + HelpContent: { + /** Content */ + content: string; + /** + * Format + * @enum {string} + */ + format: "restructuredtext" | "plain_text" | "markdown"; + }; /** * HelpForumCategory * @description Model for a category in the help forum. @@ -11366,6 +12638,55 @@ export interface components { HelpForumUser: { [key: string]: unknown; }; + /** HiddenParameterModel */ + HiddenParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_hidden + * @constant + */ + parameter_type: "gx_hidden"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "hidden"; + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[]; + /** Value */ + value: string | null; + }; /** * HistoryActiveContentCounts * @description Contains the number of active, deleted or hidden items in a History. @@ -11776,6 +13097,112 @@ export interface components { */ uri: string; }; + /** InRangeParameterValidatorModel */ + InRangeParameterValidatorModel: { + /** + * Exclude Max + * @default false + */ + exclude_max: boolean; + /** + * Exclude Min + * @default false + */ + exclude_min: boolean; + /** + * Implicit + * @default false + */ + implicit: boolean; + /** Max */ + max?: number | null; + /** Message */ + message?: string | null; + /** Min */ + min?: number | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default in_range + * @constant + */ + type: "in_range"; + }; + /** IncomingToolOutputCollection */ + "IncomingToolOutputCollection-Input": { + /** Hidden */ + hidden?: boolean | null; + /** Label */ + label?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name?: string | null; + structure: components["schemas"]["ToolOutputCollectionStructure"]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "collection"; + }; + /** IncomingToolOutputCollection */ + "IncomingToolOutputCollection-Output": { + /** Hidden */ + hidden?: boolean | null; + /** Label */ + label?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name?: string | null; + structure: components["schemas"]["ToolOutputCollectionStructure"]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "collection"; + }; + /** IncomingToolOutputDataset */ + IncomingToolOutputDataset: { + /** Discover Datasets */ + discover_datasets?: + | ( + | components["schemas"]["FilePatternDatasetCollectionDescription"] + | components["schemas"]["ToolProvidedMetadataDatasetCollection"] + )[] + | null; + /** + * Format + * @description The short name for the output datatype. + */ + format?: string | null; + /** Format Source */ + format_source?: string | null; + /** From Work Dir */ + from_work_dir?: string | null; + /** Hidden */ + hidden?: boolean | null; + /** Label */ + label?: string | null; + /** Metadata Source */ + metadata_source?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name?: string | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "data"; + }; /** InputDataCollectionStep */ InputDataCollectionStep: { /** @@ -12018,6 +13445,51 @@ export interface components { /** Uninstalled */ uninstalled: boolean; }; + /** IntegerParameterModel */ + IntegerParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Max */ + max?: number | null; + /** Min */ + min?: number | null; + /** Name */ + name: string; + /** Optional */ + optional: boolean; + /** + * Parameter Type + * @default gx_integer + * @constant + */ + parameter_type: "gx_integer"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "integer"; + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][]; + /** Value */ + value?: number | null; + }; /** InvocationCancellationHistoryDeletedResponse */ InvocationCancellationHistoryDeletedResponse: { /** @@ -12884,6 +14356,16 @@ export interface components { * @enum {string} */ ItemsFromSrc: "url" | "files" | "path" | "ftp_import" | "server_dir"; + /** JavascriptRequirement */ + JavascriptRequirement: { + /** Expression Lib */ + expression_lib: string[] | null; + /** + * Type + * @constant + */ + type: "javascript"; + }; /** JobBaseModel */ JobBaseModel: { /** @@ -13394,6 +14876,15 @@ export interface components { */ user_id?: string | null; }; + /** LabelValue */ + LabelValue: { + /** Label */ + label: string; + /** Selected */ + selected: boolean; + /** Value */ + value: string; + }; /** * LabelValuePair * @description Generic Label/Value pair model. @@ -13442,6 +14933,31 @@ export interface components { */ LIBRARY_MODIFY_in: string[] | string | null; }; + /** LengthParameterValidatorModel */ + LengthParameterValidatorModel: { + /** + * Implicit + * @default false + */ + implicit: boolean; + /** Max */ + max?: number | null; + /** Message */ + message?: string | null; + /** Min */ + min?: number | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default length + * @constant + */ + type: "length"; + }; /** LibraryAvailablePermissions */ LibraryAvailablePermissions: { /** @@ -14596,6 +16112,27 @@ export interface components { */ slug: string; }; + /** NoOptionsParameterValidatorModel */ + NoOptionsParameterValidatorModel: { + /** + * Implicit + * @default false + */ + implicit: boolean; + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default no_options + * @constant + */ + type: "no_options"; + }; /** * NotificationBroadcastUpdateRequest * @description A notification update request specific for broadcasting. @@ -15234,6 +16771,29 @@ export interface components { */ to_posix_lines: boolean; }; + /** PathBasedDynamicToolCreatePayload */ + PathBasedDynamicToolCreatePayload: { + /** Active */ + active?: boolean | null; + /** + * Allow Load + * @default true + */ + allow_load: boolean; + /** Hidden */ + hidden?: boolean | null; + /** Path */ + path: string; + /** + * Src + * @constant + */ + src: "from_path"; + /** Tool Directory */ + tool_directory?: string | null; + /** Uuid */ + uuid?: string | null; + }; /** PathDataElement */ PathDataElement: { /** Md5 */ @@ -15762,6 +17322,36 @@ export interface components { */ type: "regex"; }; + /** + * RegexParameterValidatorModel + * @description Check if a regular expression **matches** the value, i.e. appears + * at the beginning of the value. To enforce a match of the complete value use + * ``$`` at the end of the expression. The expression is given is the content + * of the validator tag. Note that for ``selects`` each option is checked + * separately. + */ + RegexParameterValidatorModel: { + /** Expression */ + expression: string; + /** + * Implicit + * @default false + */ + implicit: boolean; + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default regex + * @constant + */ + type: "regex"; + }; /** ReloadFeedback */ ReloadFeedback: { /** Failed */ @@ -15853,6 +17443,148 @@ export interface components { */ action_type: "remove_unlabeled_workflow_outputs"; }; + /** RepeatParameterModel */ + "RepeatParameterModel-Input": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Max */ + max?: number | null; + /** Min */ + min?: number | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_repeat + * @constant + */ + parameter_type: "gx_repeat"; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Input"] + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Input"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Input"] + | components["schemas"]["RepeatParameterModel-Input"] + | components["schemas"]["SectionParameterModel-Input"] + )[]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "repeat"; + }; + /** RepeatParameterModel */ + "RepeatParameterModel-Output": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Max */ + max?: number | null; + /** Min */ + min?: number | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_repeat + * @constant + */ + parameter_type: "gx_repeat"; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Output"] + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Output"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Output"] + | components["schemas"]["RepeatParameterModel-Output"] + | components["schemas"]["SectionParameterModel-Output"] + )[]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "repeat"; + }; /** Report */ Report: { /** Markdown */ @@ -15897,6 +17629,38 @@ export interface components { * @enum {string} */ Requirement: "logged_in" | "new_history" | "admin"; + /** ResourceRequirement */ + ResourceRequirement: { + /** Cores Max */ + cores_max: number | null; + /** Cores Min */ + cores_min: number | null; + /** Cuda Compute Capability */ + cuda_compute_capability: number | null; + /** Cuda Device Count Max */ + cuda_device_count_max: number | null; + /** Cuda Device Count Min */ + cuda_device_count_min: number | null; + /** Cuda Version Min */ + cuda_version_min: number | null; + /** Gpu Memory Min */ + gpu_memory_min: number | null; + /** Ram Max */ + ram_max: number | null; + /** Ram Min */ + ram_min: number | null; + /** Shm Size */ + shm_size: number | null; + /** Tmpdir Max */ + tmpdir_max: number | null; + /** Tmpdir Min */ + tmpdir_min: number | null; + /** + * Type + * @constant + */ + type: "resource"; + }; /** RoleDefinitionModel */ RoleDefinitionModel: { /** @@ -15914,6 +17678,12 @@ export interface components { * @description Name of the role */ name: string; + /** + * Role Type + * @default admin + * @enum {string} + */ + role_type: "admin" | "user_tool_create" | "user_tool_execute"; /** * User IDs * @default [] @@ -15959,6 +17729,43 @@ export interface components { RootModel_Dict_str__int__: { [key: string]: number; }; + /** RulesParameterModel */ + RulesParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_rules + * @constant + */ + parameter_type: "gx_rules"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "rules"; + }; /** SearchJobsPayload */ SearchJobsPayload: { /** @@ -15981,6 +17788,189 @@ export interface components { } & { [key: string]: unknown; }; + /** SectionParameterModel */ + "SectionParameterModel-Input": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_section + * @constant + */ + parameter_type: "gx_section"; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Input"] + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Input"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Input"] + | components["schemas"]["RepeatParameterModel-Input"] + | components["schemas"]["SectionParameterModel-Input"] + )[]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "section"; + }; + /** SectionParameterModel */ + "SectionParameterModel-Output": { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_section + * @constant + */ + parameter_type: "gx_section"; + /** Parameters */ + parameters: ( + | components["schemas"]["CwlIntegerParameterModel"] + | components["schemas"]["CwlFloatParameterModel"] + | components["schemas"]["CwlStringParameterModel"] + | components["schemas"]["CwlBooleanParameterModel"] + | components["schemas"]["CwlNullParameterModel"] + | components["schemas"]["CwlFileParameterModel"] + | components["schemas"]["CwlDirectoryParameterModel"] + | components["schemas"]["CwlUnionParameterModel-Output"] + | components["schemas"]["TextParameterModel"] + | components["schemas"]["IntegerParameterModel"] + | components["schemas"]["FloatParameterModel"] + | components["schemas"]["BooleanParameterModel"] + | components["schemas"]["HiddenParameterModel"] + | components["schemas"]["SelectParameterModel"] + | components["schemas"]["DataParameterModel"] + | components["schemas"]["DataCollectionParameterModel"] + | components["schemas"]["DataColumnParameterModel"] + | components["schemas"]["DirectoryUriParameterModel"] + | components["schemas"]["RulesParameterModel"] + | components["schemas"]["DrillDownParameterModel-Output"] + | components["schemas"]["GroupTagParameterModel"] + | components["schemas"]["BaseUrlParameterModel"] + | components["schemas"]["GenomeBuildParameterModel"] + | components["schemas"]["ColorParameterModel"] + | components["schemas"]["ConditionalParameterModel-Output"] + | components["schemas"]["RepeatParameterModel-Output"] + | components["schemas"]["SectionParameterModel-Output"] + )[]; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "section"; + }; + /** SelectParameterModel */ + SelectParameterModel: { + /** Argument */ + argument?: string | null; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** + * Multiple + * @default false + */ + multiple: boolean; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** Options */ + options?: components["schemas"]["LabelValue"][] | null; + /** + * Parameter Type + * @default gx_select + * @constant + */ + parameter_type: "gx_select"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "select"; + /** + * Validators + * @default [] + */ + validators: components["schemas"]["NoOptionsParameterValidatorModel"][]; + }; /** ServerDirElement */ ServerDirElement: { /** Md5 */ @@ -17032,6 +19022,65 @@ export interface components { [key: string]: string | boolean | number; }; }; + /** TextParameterModel */ + TextParameterModel: { + /** + * Area + * @default false + */ + area: boolean; + /** Argument */ + argument?: string | null; + /** + * Default Options + * @default [] + */ + default_options: components["schemas"]["LabelValue"][]; + /** Help */ + help?: string | null; + /** + * Hidden + * @default false + */ + hidden: boolean; + /** + * Is Dynamic + * @default false + */ + is_dynamic: boolean; + /** Label */ + label?: string | null; + /** Name */ + name: string; + /** + * Optional + * @default false + */ + optional: boolean; + /** + * Parameter Type + * @default gx_text + * @constant + */ + parameter_type: "gx_text"; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "text"; + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[]; + /** Value */ + value?: string | null; + }; /** ToolDataDetails */ ToolDataDetails: { /** @@ -17112,6 +19161,112 @@ export interface components { */ values: string; }; + /** ToolOutputBoolean */ + ToolOutputBoolean: { + /** Hidden */ + hidden: unknown; + /** Label */ + label?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name: unknown; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "boolean"; + }; + /** ToolOutputCollectionStructure */ + ToolOutputCollectionStructure: { + /** Collection Type */ + collection_type?: string | null; + /** Collection Type From Rules */ + collection_type_from_rules?: string | null; + /** Collection Type Source */ + collection_type_source?: string | null; + /** Discover Datasets */ + discover_datasets?: + | ( + | components["schemas"]["FilePatternDatasetCollectionDescription"] + | components["schemas"]["ToolProvidedMetadataDatasetCollection"] + )[] + | null; + /** Structured Like */ + structured_like?: string | null; + }; + /** ToolOutputFloat */ + ToolOutputFloat: { + /** Hidden */ + hidden: unknown; + /** Label */ + label?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name: unknown; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "float"; + }; + /** ToolOutputInteger */ + ToolOutputInteger: { + /** Hidden */ + hidden: unknown; + /** Label */ + label?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name: unknown; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "integer"; + }; + /** ToolOutputText */ + ToolOutputText: { + /** Hidden */ + hidden: unknown; + /** Label */ + label?: string | null; + /** + * Name + * @description Parameter name. Used when referencing parameter in workflows. + */ + name: unknown; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: "text"; + }; + /** ToolProvidedMetadataDatasetCollection */ + ToolProvidedMetadataDatasetCollection: { + /** Assign Primary Output */ + assign_primary_output: boolean; + /** Directory */ + directory: string | null; + /** + * Discover Via + * @constant + */ + discover_via: "tool_provided_metadata"; + /** Format */ + format: string | null; + /** Match Relative Path */ + match_relative_path: boolean; + /** Recurse */ + recurse: boolean; + /** Visible */ + visible: boolean; + }; /** ToolReportForDataset */ ToolReportForDataset: { /** @@ -17287,6 +19442,30 @@ export interface components { */ ids: string[]; }; + /** UnprivilegedToolResponse */ + UnprivilegedToolResponse: { + /** Active */ + active: boolean; + /** + * Create Time + * Format: date-time + */ + create_time: string; + /** Hidden */ + hidden: boolean; + /** + * Id + * @example 0123456789ABCDEF + */ + id: string; + representation: components["schemas"]["UserToolSource-Output"]; + /** Tool Format */ + tool_format: string | null; + /** Tool Id */ + tool_id: string | null; + /** Uuid */ + uuid: string; + }; /** UpdateAnnotationAction */ UpdateAnnotationAction: { /** @@ -18138,6 +20317,130 @@ export interface components { /** Total Disk Usage */ total_disk_usage: number; }; + /** UserToolSource */ + "UserToolSource-Input": { + /** Citations */ + citations?: components["schemas"]["Citation"][] | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + class: "GalaxyUserTool"; + /** Container */ + container: string; + /** Description */ + description?: string | null; + /** Edam Operations */ + edam_operations?: string[] | null; + /** Edam Topics */ + edam_topics?: string[] | null; + help?: components["schemas"]["HelpContent"] | null; + /** Id */ + id: string | null; + /** + * Inputs + * @default [] + */ + inputs: components["schemas"]["GalaxyToolParameterModel-Input"][]; + /** License */ + license?: string | null; + /** Name */ + name: string; + /** + * Outputs + * @default [] + */ + outputs: ( + | components["schemas"]["IncomingToolOutputDataset"] + | components["schemas"]["IncomingToolOutputCollection-Input"] + | components["schemas"]["ToolOutputText"] + | components["schemas"]["ToolOutputInteger"] + | components["schemas"]["ToolOutputFloat"] + | components["schemas"]["ToolOutputBoolean"] + )[]; + /** + * Requirements + * @default [] + */ + requirements: + | ( + | components["schemas"]["JavascriptRequirement"] + | components["schemas"]["ResourceRequirement"] + | components["schemas"]["ContainerRequirement"] + )[] + | null; + /** + * shell_command + * @description A string that contains the command to be executed. Parameters can be referenced inside $(). + */ + shell_command: string; + /** Version */ + version: string | null; + /** Xrefs */ + xrefs?: components["schemas"]["XrefDict"][] | null; + }; + /** UserToolSource */ + "UserToolSource-Output": { + /** Citations */ + citations?: components["schemas"]["Citation"][] | null; + /** + * Class + * @constant + */ + class: "GalaxyUserTool"; + /** Container */ + container: string; + /** Description */ + description?: string | null; + /** Edam Operations */ + edam_operations?: string[] | null; + /** Edam Topics */ + edam_topics?: string[] | null; + help?: components["schemas"]["HelpContent"] | null; + /** Id */ + id: string | null; + /** + * Inputs + * @default [] + */ + inputs: components["schemas"]["GalaxyToolParameterModel-Output"][]; + /** License */ + license?: string | null; + /** Name */ + name: string; + /** + * Outputs + * @default [] + */ + outputs: ( + | components["schemas"]["IncomingToolOutputDataset"] + | components["schemas"]["IncomingToolOutputCollection-Output"] + | components["schemas"]["ToolOutputText"] + | components["schemas"]["ToolOutputInteger"] + | components["schemas"]["ToolOutputFloat"] + | components["schemas"]["ToolOutputBoolean"] + )[]; + /** + * Requirements + * @default [] + */ + requirements: + | ( + | components["schemas"]["JavascriptRequirement"] + | components["schemas"]["ResourceRequirement"] + | components["schemas"]["ContainerRequirement"] + )[] + | null; + /** + * shell_command + * @description A string that contains the command to be executed. Parameters can be referenced inside $(). + */ + shell_command: string; + /** Version */ + version: string | null; + /** Xrefs */ + xrefs?: components["schemas"]["XrefDict"][] | null; + }; /** UserUpdatePayload */ UserUpdatePayload: { /** @@ -18947,6 +21250,13 @@ export interface components { */ target_uri: string; }; + /** XrefDict */ + XrefDict: { + /** Type */ + type: string; + /** Value */ + value: string; + }; /** XrefItem */ XrefItem: { /** @@ -20787,11 +23097,215 @@ export interface operations { }; }; }; - show_storage_api_datasets__dataset_id__storage_get: { + show_storage_api_datasets__dataset_id__storage_get: { + parameters: { + query?: { + /** @description Whether this dataset belongs to a history (HDA) or a library (LDDA). */ + hda_ldda?: components["schemas"]["DatasetSourceType"]; + }; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + /** @description The ID of the History Dataset. */ + dataset_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatasetStorageDetails"]; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + display_api_datasets__history_content_id__display_get: { + parameters: { + query?: { + /** @description Whether to get preview contents to be directly displayed on the web. If preview is False (default) the contents will be downloaded instead. */ + preview?: boolean; + /** @description If non-null, get the specified filename from the extra files for this dataset. */ + filename?: string | null; + /** @description The file extension when downloading the display data. Use the value `data` to let the server infer it from the data type. */ + to_ext?: string | null; + /** @description The query parameter 'raw' should be considered experimental and may be dropped at some point in the future without warning. Generally, data should be processed by its datatype prior to display. */ + raw?: boolean; + /** @description Set this for datatypes that allow chunked display through the display_data method to enable chunking. This specifies a byte offset into the target dataset's display. */ + offset?: number | null; + /** @description If offset is set, this recommends 'how large' the next chunk should be. This is not respected or interpreted uniformly and should be interpreted as a very loose recommendation. Different datatypes interpret 'largeness' differently - for bam datasets this is a number of lines whereas for tabular datatypes this is interpreted as a number of bytes. */ + ck_size?: number | null; + }; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + /** @description The ID of the History Dataset. */ + history_content_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + display_api_datasets__history_content_id__display_head: { + parameters: { + query?: { + /** @description Whether to get preview contents to be directly displayed on the web. If preview is False (default) the contents will be downloaded instead. */ + preview?: boolean; + /** @description If non-null, get the specified filename from the extra files for this dataset. */ + filename?: string | null; + /** @description The file extension when downloading the display data. Use the value `data` to let the server infer it from the data type. */ + to_ext?: string | null; + /** @description The query parameter 'raw' should be considered experimental and may be dropped at some point in the future without warning. Generally, data should be processed by its datatype prior to display. */ + raw?: boolean; + /** @description Set this for datatypes that allow chunked display through the display_data method to enable chunking. This specifies a byte offset into the target dataset's display. */ + offset?: number | null; + /** @description If offset is set, this recommends 'how large' the next chunk should be. This is not respected or interpreted uniformly and should be interpreted as a very loose recommendation. Different datatypes interpret 'largeness' differently - for bam datasets this is a number of lines whereas for tabular datatypes this is interpreted as a number of bytes. */ + ck_size?: number | null; + }; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + /** @description The ID of the History Dataset. */ + history_content_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + datasets__get_metadata_file: { + parameters: { + query: { + /** @description The name of the metadata file to retrieve. */ + metadata_file: string; + }; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + /** @description The ID of the History Dataset. */ + history_content_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + get_metadata_file_datasets_api_datasets__history_content_id__metadata_file_head: { parameters: { - query?: { - /** @description Whether this dataset belongs to a history (HDA) or a library (LDDA). */ - hda_ldda?: components["schemas"]["DatasetSourceType"]; + query: { + /** @description The name of the metadata file to retrieve. */ + metadata_file: string; }; header?: { /** @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. */ @@ -20799,7 +23313,7 @@ export interface operations { }; path: { /** @description The ID of the History Dataset. */ - dataset_id: string; + history_content_id: string; }; cookie?: never; }; @@ -20811,7 +23325,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatasetStorageDetails"]; + "application/json": unknown; }; }; /** @description Request Error */ @@ -20834,40 +23348,28 @@ export interface operations { }; }; }; - display_api_datasets__history_content_id__display_get: { + index_api_datatypes_get: { parameters: { query?: { - /** @description Whether to get preview contents to be directly displayed on the web. If preview is False (default) the contents will be downloaded instead. */ - preview?: boolean; - /** @description If non-null, get the specified filename from the extra files for this dataset. */ - filename?: string | null; - /** @description The file extension when downloading the display data. Use the value `data` to let the server infer it from the data type. */ - to_ext?: string | null; - /** @description The query parameter 'raw' should be considered experimental and may be dropped at some point in the future without warning. Generally, data should be processed by its datatype prior to display. */ - raw?: boolean; - /** @description Set this for datatypes that allow chunked display through the display_data method to enable chunking. This specifies a byte offset into the target dataset's display. */ - offset?: number | null; - /** @description If offset is set, this recommends 'how large' the next chunk should be. This is not respected or interpreted uniformly and should be interpreted as a very loose recommendation. Different datatypes interpret 'largeness' differently - for bam datasets this is a number of lines whereas for tabular datatypes this is interpreted as a number of bytes. */ - ck_size?: number | null; - }; - header?: { - /** @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. */ - "run-as"?: string | null; - }; - path: { - /** @description The ID of the History Dataset. */ - history_content_id: string; + /** @description Whether to return only the datatype's extension rather than the datatype's details */ + extension_only?: boolean | null; + /** @description Whether to return only datatypes which can be uploaded */ + upload_only?: boolean | null; }; + header?: never; + path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description Successful Response */ + /** @description List of data types */ 200: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": components["schemas"]["DatatypeDetails"][] | string[]; + }; }; /** @description Request Error */ "4XX": { @@ -20889,41 +23391,22 @@ export interface operations { }; }; }; - display_api_datasets__history_content_id__display_head: { + converters_api_datatypes_converters_get: { parameters: { - query?: { - /** @description Whether to get preview contents to be directly displayed on the web. If preview is False (default) the contents will be downloaded instead. */ - preview?: boolean; - /** @description If non-null, get the specified filename from the extra files for this dataset. */ - filename?: string | null; - /** @description The file extension when downloading the display data. Use the value `data` to let the server infer it from the data type. */ - to_ext?: string | null; - /** @description The query parameter 'raw' should be considered experimental and may be dropped at some point in the future without warning. Generally, data should be processed by its datatype prior to display. */ - raw?: boolean; - /** @description Set this for datatypes that allow chunked display through the display_data method to enable chunking. This specifies a byte offset into the target dataset's display. */ - offset?: number | null; - /** @description If offset is set, this recommends 'how large' the next chunk should be. This is not respected or interpreted uniformly and should be interpreted as a very loose recommendation. Different datatypes interpret 'largeness' differently - for bam datasets this is a number of lines whereas for tabular datatypes this is interpreted as a number of bytes. */ - ck_size?: number | null; - }; - header?: { - /** @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. */ - "run-as"?: string | null; - }; - path: { - /** @description The ID of the History Dataset. */ - history_content_id: string; - }; + query?: never; + header?: never; + path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description Successful Response */ + /** @description List of all datatype converters */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": unknown; + "application/json": components["schemas"]["DatatypeConverterList"]; }; }; /** @description Request Error */ @@ -20946,30 +23429,25 @@ export interface operations { }; }; }; - datasets__get_metadata_file: { + edam_data_api_datatypes_edam_data_get: { parameters: { - query: { - /** @description The name of the metadata file to retrieve. */ - metadata_file: string; - }; - header?: { - /** @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. */ - "run-as"?: string | null; - }; - path: { - /** @description The ID of the History Dataset. */ - history_content_id: string; - }; + query?: never; + header?: never; + path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description Successful Response */ + /** @description Dictionary/map of datatypes and EDAM data */ 200: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + [key: string]: string; + }; + }; }; /** @description Request Error */ "4XX": { @@ -20991,31 +23469,22 @@ export interface operations { }; }; }; - get_metadata_file_datasets_api_datasets__history_content_id__metadata_file_head: { + edam_data_detailed_api_datatypes_edam_data_detailed_get: { parameters: { - query: { - /** @description The name of the metadata file to retrieve. */ - metadata_file: string; - }; - header?: { - /** @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. */ - "run-as"?: string | null; - }; - path: { - /** @description The ID of the History Dataset. */ - history_content_id: string; - }; + query?: never; + header?: never; + path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description Successful Response */ + /** @description Dictionary of EDAM data details containing the EDAM iri, label, and definition */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": unknown; + "application/json": components["schemas"]["DatatypesEDAMDetailsDict"]; }; }; /** @description Request Error */ @@ -21038,27 +23507,24 @@ export interface operations { }; }; }; - index_api_datatypes_get: { + edam_formats_api_datatypes_edam_formats_get: { parameters: { - query?: { - /** @description Whether to return only the datatype's extension rather than the datatype's details */ - extension_only?: boolean | null; - /** @description Whether to return only datatypes which can be uploaded */ - upload_only?: boolean | null; - }; + query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description List of data types */ + /** @description Dictionary/map of datatypes and EDAM formats */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatatypeDetails"][] | string[]; + "application/json": { + [key: string]: string; + }; }; }; /** @description Request Error */ @@ -21081,7 +23547,7 @@ export interface operations { }; }; }; - converters_api_datatypes_converters_get: { + edam_formats_detailed_api_datatypes_edam_formats_detailed_get: { parameters: { query?: never; header?: never; @@ -21090,13 +23556,13 @@ export interface operations { }; requestBody?: never; responses: { - /** @description List of all datatype converters */ + /** @description Dictionary of EDAM format details containing the EDAM iri, label, and definition */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatatypeConverterList"]; + "application/json": components["schemas"]["DatatypesEDAMDetailsDict"]; }; }; /** @description Request Error */ @@ -21119,7 +23585,7 @@ export interface operations { }; }; }; - edam_data_api_datatypes_edam_data_get: { + mapping_api_datatypes_mapping_get: { parameters: { query?: never; header?: never; @@ -21128,15 +23594,13 @@ export interface operations { }; requestBody?: never; responses: { - /** @description Dictionary/map of datatypes and EDAM data */ + /** @description Dictionary to map data types with their classes */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": { - [key: string]: string; - }; + "application/json": components["schemas"]["DatatypesMap"]; }; }; /** @description Request Error */ @@ -21159,7 +23623,7 @@ export interface operations { }; }; }; - edam_data_detailed_api_datatypes_edam_data_detailed_get: { + sniffers_api_datatypes_sniffers_get: { parameters: { query?: never; header?: never; @@ -21168,13 +23632,13 @@ export interface operations { }; requestBody?: never; responses: { - /** @description Dictionary of EDAM data details containing the EDAM iri, label, and definition */ + /** @description List of datatype sniffers */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatatypesEDAMDetailsDict"]; + "application/json": string[]; }; }; /** @description Request Error */ @@ -21197,24 +23661,27 @@ export interface operations { }; }; }; - edam_formats_api_datatypes_edam_formats_get: { + types_and_mapping_api_datatypes_types_and_mapping_get: { parameters: { - query?: never; + query?: { + /** @description Whether to return only the datatype's extension rather than the datatype's details */ + extension_only?: boolean | null; + /** @description Whether to return only datatypes which can be uploaded */ + upload_only?: boolean | null; + }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description Dictionary/map of datatypes and EDAM formats */ + /** @description Dictionary to map data types with their classes */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": { - [key: string]: string; - }; + "application/json": components["schemas"]["DatatypesCombinedMap"]; }; }; /** @description Request Error */ @@ -21237,7 +23704,7 @@ export interface operations { }; }; }; - edam_formats_detailed_api_datatypes_edam_formats_detailed_get: { + display_applications_index_api_display_applications_get: { parameters: { query?: never; header?: never; @@ -21246,13 +23713,13 @@ export interface operations { }; requestBody?: never; responses: { - /** @description Dictionary of EDAM format details containing the EDAM iri, label, and definition */ + /** @description Successful Response */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatatypesEDAMDetailsDict"]; + "application/json": components["schemas"]["DisplayApplication"][]; }; }; /** @description Request Error */ @@ -21275,22 +23742,31 @@ export interface operations { }; }; }; - mapping_api_datatypes_mapping_get: { + display_applications_reload_api_display_applications_reload_post: { parameters: { query?: never; - header?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; path?: never; cookie?: never; }; - requestBody?: never; + requestBody?: { + content: { + "application/json": { + [key: string]: string[]; + } | null; + }; + }; responses: { - /** @description Dictionary to map data types with their classes */ + /** @description Successful Response */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatatypesMap"]; + "application/json": components["schemas"]["ReloadFeedback"]; }; }; /** @description Request Error */ @@ -21313,23 +23789,27 @@ export interface operations { }; }; }; - sniffers_api_datatypes_sniffers_get: { + download_api_drs_download__object_id__get: { parameters: { query?: never; - header?: never; - path?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + /** @description The ID of the group */ + object_id: string; + }; cookie?: never; }; requestBody?: never; responses: { - /** @description List of datatype sniffers */ + /** @description Successful Response */ 200: { headers: { [name: string]: unknown; }; - content: { - "application/json": string[]; - }; + content?: never; }; /** @description Request Error */ "4XX": { @@ -21351,27 +23831,22 @@ export interface operations { }; }; }; - types_and_mapping_api_datatypes_types_and_mapping_get: { + index_api_dynamic_tools_get: { parameters: { - query?: { - /** @description Whether to return only the datatype's extension rather than the datatype's details */ - extension_only?: boolean | null; - /** @description Whether to return only datatypes which can be uploaded */ - upload_only?: boolean | null; - }; + query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { - /** @description Dictionary to map data types with their classes */ + /** @description Successful Response */ 200: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatatypesCombinedMap"]; + "application/json": unknown; }; }; /** @description Request Error */ @@ -21394,14 +23869,23 @@ export interface operations { }; }; }; - display_applications_index_api_display_applications_get: { + create_api_dynamic_tools_post: { parameters: { query?: never; - header?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; path?: never; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": + | components["schemas"]["DynamicToolCreatePayload"] + | components["schemas"]["PathBasedDynamicToolCreatePayload"]; + }; + }; responses: { /** @description Successful Response */ 200: { @@ -21409,7 +23893,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DisplayApplication"][]; + "application/json": unknown; }; }; /** @description Request Error */ @@ -21432,23 +23916,16 @@ export interface operations { }; }; }; - display_applications_reload_api_display_applications_reload_post: { + show_api_dynamic_tools__dynamic_tool_id__get: { parameters: { query?: never; - header?: { - /** @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. */ - "run-as"?: string | null; + header?: never; + path: { + dynamic_tool_id: string; }; - path?: never; cookie?: never; }; - requestBody?: { - content: { - "application/json": { - [key: string]: string[]; - } | null; - }; - }; + requestBody?: never; responses: { /** @description Successful Response */ 200: { @@ -21456,7 +23933,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["ReloadFeedback"]; + "application/json": unknown; }; }; /** @description Request Error */ @@ -21479,7 +23956,7 @@ export interface operations { }; }; }; - download_api_drs_download__object_id__get: { + delete_api_dynamic_tools__dynamic_tool_id__delete: { parameters: { query?: never; header?: { @@ -21487,8 +23964,7 @@ export interface operations { "run-as"?: string | null; }; path: { - /** @description The ID of the group */ - object_id: string; + dynamic_tool_id: string; }; cookie?: never; }; @@ -21499,7 +23975,9 @@ export interface operations { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": unknown; + }; }; /** @description Request Error */ "4XX": { @@ -33739,6 +36217,272 @@ export interface operations { }; }; }; + index_api_unprivileged_tools_get: { + parameters: { + query?: { + active?: boolean; + }; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnprivilegedToolResponse"][]; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + create_api_unprivileged_tools_post: { + parameters: { + query?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DynamicUnprivilegedToolCreatePayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnprivilegedToolResponse"]; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + build_api_unprivileged_tools_build_post: { + parameters: { + query: { + history_id: string; + }; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DynamicUnprivilegedToolCreatePayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + runtime_model_api_unprivileged_tools_runtime_model_post: { + parameters: { + query?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DynamicUnprivilegedToolCreatePayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + show_api_unprivileged_tools__uuid__get: { + parameters: { + query?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnprivilegedToolResponse"]; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; + delete_api_unprivileged_tools__uuid__delete: { + parameters: { + query?: never; + header?: { + /** @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. */ + "run-as"?: string | null; + }; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Request Error */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + /** @description Server Error */ + "5XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageExceptionModel"]; + }; + }; + }; + }; get_users_api_users_get: { parameters: { query?: { diff --git a/client/src/components/ActivityBar/ActivityBar.vue b/client/src/components/ActivityBar/ActivityBar.vue index 63d593b44c40..54d8916bce64 100644 --- a/client/src/components/ActivityBar/ActivityBar.vue +++ b/client/src/components/ActivityBar/ActivityBar.vue @@ -12,6 +12,7 @@ import { convertDropData } from "@/stores/activitySetup"; import { useActivityStore } from "@/stores/activityStore"; import type { Activity } from "@/stores/activityStoreTypes"; import { useEventStore } from "@/stores/eventStore"; +import { useUnprivilegedToolStore } from "@/stores/unprivilegedToolStore"; import { useUserStore } from "@/stores/userStore"; import InvocationsPanel from "../Panels/InvocationsPanel.vue"; @@ -25,6 +26,7 @@ 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"; +import UserToolPanel from "@/components/Panels/UserToolPanel.vue"; import VisualizationPanel from "@/components/Visualizations/VisualizationPanel.vue"; const props = withDefaults( @@ -67,6 +69,9 @@ const userStore = useUserStore(); const eventStore = useEventStore(); const activityStore = useActivityStore(props.activityBarId); +const unprivilegedToolStore = useUnprivilegedToolStore(); +const { canUseUnprivilegedTools } = storeToRefs(unprivilegedToolStore); + if (props.initialActivity) { activityStore.toggledSideBar = props.initialActivity; } @@ -90,7 +95,11 @@ const emit = defineEmits<{ }>(); // activities from store -const { activities, isSideBarOpen, sidePanelWidth } = storeToRefs(activityStore); +const { activities: storeActivities, isSideBarOpen, sidePanelWidth } = storeToRefs(activityStore); + +const activities = computed(() => + storeActivities.value.filter((activity) => activity.id !== "user-defined-tools" || canUseUnprivilegedTools.value) +); // drag references const dragTarget: Ref = ref(null); @@ -143,7 +152,7 @@ function onDragEnter(evt: MouseEvent) { function onDragLeave(evt: MouseEvent) { if (dragItem.value && dragTarget.value == evt.target) { const dragId = dragItem.value.id; - activities.value = activities.value.filter((a) => a.id !== dragId); + storeActivities.value = storeActivities.value.filter((a) => a.id !== dragId); } } @@ -161,7 +170,7 @@ function onDragOver(evt: MouseEvent) { if (targetActivity && targetActivity.id !== dragId) { const activitiesTemp = activities.value.filter((a) => a.id !== dragId); activitiesTemp.splice(targetIndex, 0, dragItem.value); - activities.value = activitiesTemp; + storeActivities.value = activitiesTemp; } } } @@ -335,6 +344,7 @@ defineExpose({ + +import { library } from "@fortawesome/fontawesome-svg-core"; +import { faEye } from "@fortawesome/free-regular-svg-icons"; +import { faArrowDown, faInfoCircle, faPlus, faWrench } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; +import { storeToRefs } from "pinia"; +import { computed } from "vue"; +import { useRoute, useRouter } from "vue-router/composables"; + +import { type UnprivilegedToolResponse } from "@/api"; +import { useUnprivilegedToolStore } from "@/stores/unprivilegedToolStore"; + +import ActivityPanel from "./ActivityPanel.vue"; +import Heading from "@/components/Common/Heading.vue"; +import ScrollList from "@/components/ScrollList/ScrollList.vue"; +import UtcDate from "@/components/UtcDate.vue"; + +interface Props { + inPanel?: boolean; + limit?: number; + inWorkflowEditor?: boolean; +} + +const props = withDefaults(defineProps(), { + inPanel: false, + limit: 20, + inWorkflowEditor: false, +}); + +const emit = defineEmits(["unprivileged-tool-clicked", "onInsertTool", "onEditTool", "onCreateTool"]); + +library.add(faEye, faArrowDown, faInfoCircle, faPlus); + +const unprivilegedToolStore = useUnprivilegedToolStore(); +const { unprivilegedTools, canUseUnprivilegedTools } = storeToRefs(unprivilegedToolStore); + +async function loadUnprivilegedTools(offset: number, limit: number) { + return { items: unprivilegedTools.value || [], total: unprivilegedTools.value?.length || 0 }; +} +const uuidRegex = /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/; + +const route = useRoute(); +const router = useRouter(); + +const currentItemId = computed(() => { + if (route.query.tool_uuid) { + return route.query.tool_uuid; + } + const path = route.path; + const match = path.match(uuidRegex); + return match ? match[0] : undefined; +}); + +function cardClicked(tool: UnprivilegedToolResponse) { + if (props.inPanel) { + emit("unprivileged-tool-clicked", tool); + } + if (props.inWorkflowEditor) { + emit("onInsertTool", tool.representation.id, tool.representation.name, tool.uuid); + } else { + router.push(`/?tool_uuid=${tool.uuid}`); + } +} + +function editTool(toolUuid: string) { + const route = `/tools/editor/${toolUuid}`; + if (props.inWorkflowEditor && toolUuid) { + emit("onEditTool"); + } + router.push(route); +} + +function newTool() { + const route = "/tools/editor"; + if (props.inWorkflowEditor) { + emit("onCreateTool"); + } + router.push(route); +} + + + + + diff --git a/client/src/components/ScrollList/ScrollList.vue b/client/src/components/ScrollList/ScrollList.vue new file mode 100644 index 000000000000..a0ee24eced99 --- /dev/null +++ b/client/src/components/ScrollList/ScrollList.vue @@ -0,0 +1,176 @@ + + + diff --git a/client/src/components/Tool/Buttons/ToolOptionsButton.vue b/client/src/components/Tool/Buttons/ToolOptionsButton.vue index 5e93551698d2..bee9695f1c5c 100644 --- a/client/src/components/Tool/Buttons/ToolOptionsButton.vue +++ b/client/src/components/Tool/Buttons/ToolOptionsButton.vue @@ -21,6 +21,10 @@ const props = defineProps({ type: String, required: true, }, + toolUuid: { + type: String, + default: null, + }, sharableUrl: { type: String, default: null, @@ -98,7 +102,7 @@ function onLink() { Download - + See in Tool Shed diff --git a/client/src/components/Tool/CustomToolEditor.vue b/client/src/components/Tool/CustomToolEditor.vue new file mode 100644 index 000000000000..bbe470430c4f --- /dev/null +++ b/client/src/components/Tool/CustomToolEditor.vue @@ -0,0 +1,125 @@ + + + diff --git a/client/src/components/Tool/MonarchYamlJs.ts b/client/src/components/Tool/MonarchYamlJs.ts new file mode 100644 index 000000000000..f0a0a5b0d5ed --- /dev/null +++ b/client/src/components/Tool/MonarchYamlJs.ts @@ -0,0 +1,130 @@ +import { type languages } from "monaco-editor/esm/vs/editor/editor.api"; + +// The actual IMonarchLanguageBracket shape doesn't work at runtime ... +const brackets = [ + ["{", "}", "delimiter.curly"], + ["$(", ")", "delimiter.parenthesis"], + ["[", "]", "delimiter.square"], + ["(", ")", "delimiter.parenthesis"], + ["<", ">", "delimiter.angle"], +] as any as languages.IMonarchLanguageBracket[]; + +export const monarchConfig: languages.IMonarchLanguage = { + brackets: brackets, + tokenizer: { + root: [ + [ + /(requirements)(:)(\s*)/, + [ + { token: "type.yaml", next: "@requirements", log: "requirements" }, + "operators.yaml", + "whitespace.yaml", + ], + ], + [ + /(shell_command)(:)(\s*)(\|)/, + [{ token: "type.yaml", next: "@shellCommand" }, "operators.yaml", "whitespace.yaml", "operators.yaml"], + ], + [ + /(shell_command)(:)(\s*)/, + [{ token: "type.yaml", next: "@shellCommand" }, "operator.yaml", "whitespace.yaml"], + ], + [/.*/, { token: "@rematch", nextEmbedded: "yaml", next: "@yamlRest" }], + ], + shellCommand: [ + [ + /\$\(/, + { + token: "@rematch", + bracket: "@open", + next: "jsEmbedded", + log: "Open fragment", + }, + ], + [ + /./, + { + cases: { + "@eos": { + token: "source.js", + next: "@pop", + log: "@eos", + }, + default: { + token: "source.js", + log: "default", + }, + }, + }, + ], + ], + jsEmbedded: [ + /* known problems: + - end sequence `//end)` is awkward, if not used we only pop out of syntax highlighting at the end of a line + - we always pop out of the embedded js highlighting on the end of the line + - if we don't pop out at the of the line we might mark the whole document in js syntax + - if we pop out of the embedded state on `)` the first function call (or other use of `)`) will end the js highlighting + */ + [/\/\/end(?=\))/, { token: "comment", next: "@pop", nextEmbedded: "@pop", log: "pop embedded inline" }], + [/$/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop", log: "pop" }], + [/[^(]+/, { token: "source.js", nextEmbedded: "javascript", log: "embedded source.js" }], + ], + requirements: [ + // Match array item in `requirements` + [ + /(\s*)(-)(\s*)(type)(:)(\s*)(javascript)/, + [ + "whitespace", + "operators", + "whitespace", + "type", + "operators", + "whitespace", + { token: "string.yaml", next: "@javascriptRequirement", log: "array of" }, + ], + ], + [/.*/, { token: "@rematch", next: "@root" }], // Back to root if no match + ], + + javascriptRequirement: [ + // Match `expression_lib` key followed by a block scalar array item + [/\s*(expression_lib):\s*/, { token: "type.yaml", next: "@expressionLib", log: "expressionLib" }], + [/.*/, { token: "@rematch", next: "@root" }], // Back to root if no match + ], + + expressionLib: [ + // Match array item with block scalar `- |` + [ + /\s*-\s*\|/, + { token: "key", nextEmbedded: "javascript", next: "@jsBlockMultiline", log: "jsBlockMultiLine" }, + ], + [/.*/, { token: "@rematch", next: "@root" }], // Back to root if no match + ], + // Inline JavaScript ends at the end of the line + inlineJs: [ + [ + /$/, + { + token: "@rematch", + nextEmbedded: "@pop", + next: "@pop", + }, + ], + ], + jsBlockMultiline: [ + [ + /^\s*\w+:|^\s*$/, + { + token: "@rematch", + nextEmbedded: "@pop", + next: "@pop", + }, + ], // Key or blank line (end condition) + ], + // Delegate to YAML tokenizer for the rest + yamlRest: [ + // Include YAML language tokenizer here + [/$/, { token: "@rematch", nextEmbedded: "@pop", next: "@pop" }], + ], + }, +}; diff --git a/client/src/components/Tool/ToolCard.vue b/client/src/components/Tool/ToolCard.vue index 53983093ecbc..9557fb08d453 100644 --- a/client/src/components/Tool/ToolCard.vue +++ b/client/src/components/Tool/ToolCard.vue @@ -31,6 +31,10 @@ const props = defineProps({ required: false, default: "1.0", }, + toolUuid: { + type: String, + default: null, + }, title: { type: String, required: true, @@ -131,7 +135,11 @@ const showHelpForum = computed(() => isConfigLoaded.value && config.value.enable :version="props.version" :versions="versions" @onChangeVersion="onChangeVersion" /> - + { this.formConfig = data; }) @@ -334,6 +339,7 @@ export default { history_id: historyId, tool_id: this.formConfig.id, tool_version: this.formConfig.version, + tool_uuid: this.uuid, inputs: { ...this.formData, }, diff --git a/client/src/components/Tool/ToolSource.vue b/client/src/components/Tool/ToolSource.vue index 2489f8c5cd1a..b492dccfd1ea 100644 --- a/client/src/components/Tool/ToolSource.vue +++ b/client/src/components/Tool/ToolSource.vue @@ -1,5 +1,5 @@ diff --git a/client/src/components/Tool/ToolSourceSchema.json b/client/src/components/Tool/ToolSourceSchema.json new file mode 100644 index 000000000000..d2526793af76 --- /dev/null +++ b/client/src/components/Tool/ToolSourceSchema.json @@ -0,0 +1 @@ +{"$defs": {"BaseUrlParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_baseurl", "default": "gx_baseurl", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "baseurl", "title": "Type", "type": "string"}}, "required": ["name", "type"], "title": "BaseUrlParameterModel", "type": "object"}, "BooleanParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_boolean", "default": "gx_boolean", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "boolean", "title": "Type", "type": "string"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Value"}, "truevalue": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Truevalue"}, "falsevalue": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Falsevalue"}}, "required": ["name", "type"], "title": "BooleanParameterModel", "type": "object"}, "Citation": {"properties": {"type": {"title": "Type", "type": "string"}, "content": {"title": "Content", "type": "string"}}, "required": ["type", "content"], "title": "Citation", "type": "object"}, "ColorParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_color", "default": "gx_color", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "color", "title": "Type", "type": "string"}, "value": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Value"}}, "required": ["name", "type"], "title": "ColorParameterModel", "type": "object"}, "ConditionalParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_conditional", "default": "gx_conditional", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "conditional", "title": "Type", "type": "string"}, "test_parameter": {"anyOf": [{"$ref": "#/$defs/BooleanParameterModel"}, {"$ref": "#/$defs/SelectParameterModel"}], "title": "Test Parameter"}, "whens": {"items": {"$ref": "#/$defs/ConditionalWhen"}, "title": "Whens", "type": "array"}}, "required": ["name", "type", "test_parameter", "whens"], "title": "ConditionalParameterModel", "type": "object"}, "ConditionalWhen": {"additionalProperties": false, "properties": {"discriminator": {"anyOf": [{"type": "boolean"}, {"type": "string"}], "title": "Discriminator"}, "parameters": {"items": {"anyOf": [{"$ref": "#/$defs/CwlIntegerParameterModel"}, {"$ref": "#/$defs/CwlFloatParameterModel"}, {"$ref": "#/$defs/CwlStringParameterModel"}, {"$ref": "#/$defs/CwlBooleanParameterModel"}, {"$ref": "#/$defs/CwlNullParameterModel"}, {"$ref": "#/$defs/CwlFileParameterModel"}, {"$ref": "#/$defs/CwlDirectoryParameterModel"}, {"$ref": "#/$defs/CwlUnionParameterModel"}, {"$ref": "#/$defs/TextParameterModel"}, {"$ref": "#/$defs/IntegerParameterModel"}, {"$ref": "#/$defs/FloatParameterModel"}, {"$ref": "#/$defs/BooleanParameterModel"}, {"$ref": "#/$defs/HiddenParameterModel"}, {"$ref": "#/$defs/SelectParameterModel"}, {"$ref": "#/$defs/DataParameterModel"}, {"$ref": "#/$defs/DataCollectionParameterModel"}, {"$ref": "#/$defs/DataColumnParameterModel"}, {"$ref": "#/$defs/DirectoryUriParameterModel"}, {"$ref": "#/$defs/RulesParameterModel"}, {"$ref": "#/$defs/DrillDownParameterModel"}, {"$ref": "#/$defs/GroupTagParameterModel"}, {"$ref": "#/$defs/BaseUrlParameterModel"}, {"$ref": "#/$defs/GenomeBuildParameterModel"}, {"$ref": "#/$defs/ColorParameterModel"}, {"$ref": "#/$defs/ConditionalParameterModel"}, {"$ref": "#/$defs/RepeatParameterModel"}, {"$ref": "#/$defs/SectionParameterModel"}]}, "title": "Parameters", "type": "array"}, "is_default_when": {"title": "Is Default When", "type": "boolean"}}, "required": ["discriminator", "parameters", "is_default_when"], "title": "ConditionalWhen", "type": "object"}, "Container": {"properties": {"type": {"enum": ["docker", "singularity"], "title": "Type", "type": "string"}, "container_id": {"title": "Container Id", "type": "string"}}, "required": ["type", "container_id"], "title": "Container", "type": "object"}, "ContainerRequirement": {"properties": {"type": {"const": "container", "title": "Type", "type": "string"}, "container": {"$ref": "#/$defs/Container"}}, "required": ["type", "container"], "title": "ContainerRequirement", "type": "object"}, "CwlBooleanParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_boolean", "default": "cwl_boolean", "title": "Parameter Type", "type": "string"}}, "required": ["name"], "title": "CwlBooleanParameterModel", "type": "object"}, "CwlDirectoryParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_directory", "default": "cwl_directory", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}}, "required": ["name"], "title": "CwlDirectoryParameterModel", "type": "object"}, "CwlFileParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_file", "default": "cwl_file", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}}, "required": ["name"], "title": "CwlFileParameterModel", "type": "object"}, "CwlFloatParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_float", "default": "cwl_float", "title": "Parameter Type", "type": "string"}}, "required": ["name"], "title": "CwlFloatParameterModel", "type": "object"}, "CwlIntegerParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_integer", "default": "cwl_integer", "title": "Parameter Type", "type": "string"}}, "required": ["name"], "title": "CwlIntegerParameterModel", "type": "object"}, "CwlNullParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_null", "default": "cwl_null", "title": "Parameter Type", "type": "string"}}, "required": ["name"], "title": "CwlNullParameterModel", "type": "object"}, "CwlStringParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_string", "default": "cwl_string", "title": "Parameter Type", "type": "string"}}, "required": ["name"], "title": "CwlStringParameterModel", "type": "object"}, "CwlUnionParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "cwl_union", "default": "cwl_union", "title": "Parameter Type", "type": "string"}, "parameters": {"items": {"anyOf": [{"$ref": "#/$defs/CwlIntegerParameterModel"}, {"$ref": "#/$defs/CwlFloatParameterModel"}, {"$ref": "#/$defs/CwlStringParameterModel"}, {"$ref": "#/$defs/CwlBooleanParameterModel"}, {"$ref": "#/$defs/CwlNullParameterModel"}, {"$ref": "#/$defs/CwlFileParameterModel"}, {"$ref": "#/$defs/CwlDirectoryParameterModel"}, {"$ref": "#/$defs/CwlUnionParameterModel"}]}, "title": "Parameters", "type": "array"}}, "required": ["name", "parameters"], "title": "CwlUnionParameterModel", "type": "object"}, "DataCollectionParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_data_collection", "default": "gx_data_collection", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "data_collection", "title": "Type", "type": "string"}, "collection_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Collection Type"}, "extensions": {"default": ["data"], "items": {"type": "string"}, "title": "Extensions", "type": "array"}, "value": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Value"}}, "required": ["name", "type", "value"], "title": "DataCollectionParameterModel", "type": "object"}, "DataColumnParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_data_column", "default": "gx_data_column", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "data_column", "title": "Type", "type": "string"}, "multiple": {"title": "Multiple", "type": "boolean"}, "value": {"anyOf": [{"type": "integer"}, {"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Value"}}, "required": ["name", "type", "multiple"], "title": "DataColumnParameterModel", "type": "object"}, "DataParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_data", "default": "gx_data", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "data", "title": "Type", "type": "string"}, "extensions": {"default": ["data"], "items": {"type": "string"}, "title": "Extensions", "type": "array"}, "multiple": {"default": false, "title": "Multiple", "type": "boolean"}, "min": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Min"}, "max": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Max"}}, "required": ["name", "type"], "title": "DataParameterModel", "type": "object"}, "DirectoryUriParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_directory_uri", "default": "gx_directory_uri", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "directory", "title": "Type", "type": "string"}, "validators": {"default": [], "items": {"anyOf": [{"$ref": "#/$defs/LengthParameterValidatorModel"}, {"$ref": "#/$defs/RegexParameterValidatorModel"}, {"$ref": "#/$defs/ExpressionParameterValidatorModel"}, {"$ref": "#/$defs/EmptyFieldParameterValidatorModel"}]}, "title": "Validators", "type": "array"}}, "required": ["name", "type"], "title": "DirectoryUriParameterModel", "type": "object"}, "DrillDownOptionsDict": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "value": {"title": "Value", "type": "string"}, "options": {"items": {"$ref": "#/$defs/DrillDownOptionsDict"}, "title": "Options", "type": "array"}, "selected": {"title": "Selected", "type": "boolean"}}, "required": ["name", "value", "options", "selected"], "title": "DrillDownOptionsDict", "type": "object"}, "DrillDownParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_drill_down", "default": "gx_drill_down", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "drill_down", "title": "Type", "type": "string"}, "options": {"anyOf": [{"items": {"$ref": "#/$defs/DrillDownOptionsDict"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Options"}, "multiple": {"title": "Multiple", "type": "boolean"}, "hierarchy": {"enum": ["recurse", "exact"], "title": "Hierarchy", "type": "string"}}, "required": ["name", "type", "multiple", "hierarchy"], "title": "DrillDownParameterModel", "type": "object"}, "EmptyFieldParameterValidatorModel": {"additionalProperties": false, "properties": {"type": {"const": "empty_field", "default": "empty_field", "title": "Type", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "implicit": {"default": false, "title": "Implicit", "type": "boolean"}, "negate": {"default": false, "title": "Negate", "type": "boolean"}}, "title": "EmptyFieldParameterValidatorModel", "type": "object"}, "ExpressionParameterValidatorModel": {"additionalProperties": false, "description": "Check if a one line python expression given expression evaluates to True.\n\nThe expression is given is the content of the validator tag.", "properties": {"type": {"const": "expression", "default": "expression", "title": "Type", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "implicit": {"default": false, "title": "Implicit", "type": "boolean"}, "negate": {"default": false, "title": "Negate", "type": "boolean"}, "expression": {"title": "Expression", "type": "string"}}, "required": ["expression"], "title": "ExpressionParameterValidatorModel", "type": "object"}, "FilePatternDatasetCollectionDescription": {"properties": {"discover_via": {"const": "pattern", "title": "Discover Via", "type": "string"}, "format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Format"}, "visible": {"title": "Visible", "type": "boolean"}, "assign_primary_output": {"title": "Assign Primary Output", "type": "boolean"}, "directory": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Directory"}, "recurse": {"title": "Recurse", "type": "boolean"}, "match_relative_path": {"title": "Match Relative Path", "type": "boolean"}, "sort_key": {"enum": ["filename", "name", "designation", "dbkey"], "title": "Sort Key", "type": "string"}, "sort_comp": {"enum": ["lexical", "numeric"], "title": "Sort Comp", "type": "string"}, "pattern": {"title": "Pattern", "type": "string"}}, "required": ["discover_via", "format", "visible", "assign_primary_output", "directory", "recurse", "match_relative_path", "sort_key", "sort_comp", "pattern"], "title": "FilePatternDatasetCollectionDescription", "type": "object"}, "FloatParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_float", "default": "gx_float", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "float", "title": "Type", "type": "string"}, "value": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Value"}, "min": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Min"}, "max": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Max"}, "validators": {"default": [], "items": {"$ref": "#/$defs/InRangeParameterValidatorModel"}, "title": "Validators", "type": "array"}}, "required": ["name", "type"], "title": "FloatParameterModel", "type": "object"}, "GalaxyToolParameterModel": {"discriminator": {"mapping": {"baseurl": "#/$defs/BaseUrlParameterModel", "boolean": "#/$defs/BooleanParameterModel", "color": "#/$defs/ColorParameterModel", "conditional": "#/$defs/ConditionalParameterModel", "data": "#/$defs/DataParameterModel", "data_collection": "#/$defs/DataCollectionParameterModel", "data_column": "#/$defs/DataColumnParameterModel", "directory": "#/$defs/DirectoryUriParameterModel", "drill_down": "#/$defs/DrillDownParameterModel", "float": "#/$defs/FloatParameterModel", "genomebuild": "#/$defs/GenomeBuildParameterModel", "group_tag": "#/$defs/GroupTagParameterModel", "hidden": "#/$defs/HiddenParameterModel", "integer": "#/$defs/IntegerParameterModel", "repeat": "#/$defs/RepeatParameterModel", "rules": "#/$defs/RulesParameterModel", "section": "#/$defs/SectionParameterModel", "select": "#/$defs/SelectParameterModel", "text": "#/$defs/TextParameterModel"}, "propertyName": "type"}, "oneOf": [{"$ref": "#/$defs/TextParameterModel"}, {"$ref": "#/$defs/IntegerParameterModel"}, {"$ref": "#/$defs/FloatParameterModel"}, {"$ref": "#/$defs/BooleanParameterModel"}, {"$ref": "#/$defs/HiddenParameterModel"}, {"$ref": "#/$defs/SelectParameterModel"}, {"$ref": "#/$defs/DataParameterModel"}, {"$ref": "#/$defs/DataCollectionParameterModel"}, {"$ref": "#/$defs/DataColumnParameterModel"}, {"$ref": "#/$defs/DirectoryUriParameterModel"}, {"$ref": "#/$defs/RulesParameterModel"}, {"$ref": "#/$defs/DrillDownParameterModel"}, {"$ref": "#/$defs/GroupTagParameterModel"}, {"$ref": "#/$defs/BaseUrlParameterModel"}, {"$ref": "#/$defs/GenomeBuildParameterModel"}, {"$ref": "#/$defs/ColorParameterModel"}, {"$ref": "#/$defs/ConditionalParameterModel"}, {"$ref": "#/$defs/RepeatParameterModel"}, {"$ref": "#/$defs/SectionParameterModel"}], "title": "GalaxyToolParameterModel"}, "GenomeBuildParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_genomebuild", "default": "gx_genomebuild", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "genomebuild", "title": "Type", "type": "string"}, "multiple": {"title": "Multiple", "type": "boolean"}}, "required": ["name", "type", "multiple"], "title": "GenomeBuildParameterModel", "type": "object"}, "GroupTagParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_group_tag", "default": "gx_group_tag", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "group_tag", "title": "Type", "type": "string"}, "multiple": {"title": "Multiple", "type": "boolean"}}, "required": ["name", "type", "multiple"], "title": "GroupTagParameterModel", "type": "object"}, "HelpContent": {"properties": {"format": {"enum": ["restructuredtext", "plain_text", "markdown"], "title": "Format", "type": "string"}, "content": {"title": "Content", "type": "string"}}, "required": ["format", "content"], "title": "HelpContent", "type": "object"}, "HiddenParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_hidden", "default": "gx_hidden", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "hidden", "title": "Type", "type": "string"}, "value": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value"}, "validators": {"default": [], "items": {"anyOf": [{"$ref": "#/$defs/LengthParameterValidatorModel"}, {"$ref": "#/$defs/RegexParameterValidatorModel"}, {"$ref": "#/$defs/ExpressionParameterValidatorModel"}, {"$ref": "#/$defs/EmptyFieldParameterValidatorModel"}]}, "title": "Validators", "type": "array"}}, "required": ["name", "type", "value"], "title": "HiddenParameterModel", "type": "object"}, "InRangeParameterValidatorModel": {"additionalProperties": false, "properties": {"type": {"const": "in_range", "default": "in_range", "title": "Type", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "implicit": {"default": false, "title": "Implicit", "type": "boolean"}, "min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "default": null, "title": "Min"}, "max": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "default": null, "title": "Max"}, "exclude_min": {"default": false, "title": "Exclude Min", "type": "boolean"}, "exclude_max": {"default": false, "title": "Exclude Max", "type": "boolean"}, "negate": {"default": false, "title": "Negate", "type": "boolean"}}, "title": "InRangeParameterValidatorModel", "type": "object"}, "IntegerParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_integer", "default": "gx_integer", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"title": "Optional", "type": "boolean"}, "type": {"const": "integer", "title": "Type", "type": "string"}, "value": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Value"}, "min": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Min"}, "max": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Max"}, "validators": {"default": [], "items": {"$ref": "#/$defs/InRangeParameterValidatorModel"}, "title": "Validators", "type": "array"}}, "required": ["name", "optional", "type"], "title": "IntegerParameterModel", "type": "object"}, "JavascriptRequirement": {"properties": {"type": {"const": "javascript", "title": "Type", "type": "string"}, "expression_lib": {"anyOf": [{"items": {"description": "Provide Javascript/ECMAScript 5.1 code here that will be available for expressions inside the `shell_command` field.", "examples": ["function pickValue() {\n if (inputs.conditional_parameter.test_parameter == \"a\") {\n return inputs.conditional_parameter.integer_parameter\n } else {\n return inputs.conditional_parameter.boolean_parameter\n }\n}"], "title": "expression_lib", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Expression Lib"}}, "required": ["type", "expression_lib"], "title": "JavascriptRequirement", "type": "object"}, "LabelValue": {"properties": {"label": {"title": "Label", "type": "string"}, "value": {"title": "Value", "type": "string"}, "selected": {"title": "Selected", "type": "boolean"}}, "required": ["label", "value", "selected"], "title": "LabelValue", "type": "object"}, "LengthParameterValidatorModel": {"additionalProperties": false, "properties": {"type": {"const": "length", "default": "length", "title": "Type", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "implicit": {"default": false, "title": "Implicit", "type": "boolean"}, "min": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Min"}, "max": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Max"}, "negate": {"default": false, "title": "Negate", "type": "boolean"}}, "title": "LengthParameterValidatorModel", "type": "object"}, "NoOptionsParameterValidatorModel": {"additionalProperties": false, "properties": {"type": {"const": "no_options", "default": "no_options", "title": "Type", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "implicit": {"default": false, "title": "Implicit", "type": "boolean"}, "negate": {"default": false, "title": "Negate", "type": "boolean"}}, "title": "NoOptionsParameterValidatorModel", "type": "object"}, "RegexParameterValidatorModel": {"additionalProperties": false, "description": "Check if a regular expression **matches** the value, i.e. appears\nat the beginning of the value. To enforce a match of the complete value use\n``$`` at the end of the expression. The expression is given is the content\nof the validator tag. Note that for ``selects`` each option is checked\nseparately.", "properties": {"type": {"const": "regex", "default": "regex", "title": "Type", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "implicit": {"default": false, "title": "Implicit", "type": "boolean"}, "negate": {"default": false, "title": "Negate", "type": "boolean"}, "expression": {"title": "Expression", "type": "string"}}, "required": ["expression"], "title": "RegexParameterValidatorModel", "type": "object"}, "RepeatParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_repeat", "default": "gx_repeat", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "repeat", "title": "Type", "type": "string"}, "parameters": {"items": {"anyOf": [{"$ref": "#/$defs/CwlIntegerParameterModel"}, {"$ref": "#/$defs/CwlFloatParameterModel"}, {"$ref": "#/$defs/CwlStringParameterModel"}, {"$ref": "#/$defs/CwlBooleanParameterModel"}, {"$ref": "#/$defs/CwlNullParameterModel"}, {"$ref": "#/$defs/CwlFileParameterModel"}, {"$ref": "#/$defs/CwlDirectoryParameterModel"}, {"$ref": "#/$defs/CwlUnionParameterModel"}, {"$ref": "#/$defs/TextParameterModel"}, {"$ref": "#/$defs/IntegerParameterModel"}, {"$ref": "#/$defs/FloatParameterModel"}, {"$ref": "#/$defs/BooleanParameterModel"}, {"$ref": "#/$defs/HiddenParameterModel"}, {"$ref": "#/$defs/SelectParameterModel"}, {"$ref": "#/$defs/DataParameterModel"}, {"$ref": "#/$defs/DataCollectionParameterModel"}, {"$ref": "#/$defs/DataColumnParameterModel"}, {"$ref": "#/$defs/DirectoryUriParameterModel"}, {"$ref": "#/$defs/RulesParameterModel"}, {"$ref": "#/$defs/DrillDownParameterModel"}, {"$ref": "#/$defs/GroupTagParameterModel"}, {"$ref": "#/$defs/BaseUrlParameterModel"}, {"$ref": "#/$defs/GenomeBuildParameterModel"}, {"$ref": "#/$defs/ColorParameterModel"}, {"$ref": "#/$defs/ConditionalParameterModel"}, {"$ref": "#/$defs/RepeatParameterModel"}, {"$ref": "#/$defs/SectionParameterModel"}]}, "title": "Parameters", "type": "array"}, "min": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Min"}, "max": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Max"}}, "required": ["name", "type", "parameters"], "title": "RepeatParameterModel", "type": "object"}, "ResourceRequirement": {"properties": {"type": {"const": "resource", "title": "Type", "type": "string"}, "cores_min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Cores Min"}, "cores_max": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Cores Max"}, "ram_min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Ram Min"}, "ram_max": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Ram Max"}, "tmpdir_min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Tmpdir Min"}, "tmpdir_max": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Tmpdir Max"}, "cuda_version_min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Cuda Version Min"}, "cuda_compute_capability": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Cuda Compute Capability"}, "gpu_memory_min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Gpu Memory Min"}, "cuda_device_count_min": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Cuda Device Count Min"}, "cuda_device_count_max": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Cuda Device Count Max"}, "shm_size": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "null"}], "title": "Shm Size"}}, "required": ["type", "cores_min", "cores_max", "ram_min", "ram_max", "tmpdir_min", "tmpdir_max", "cuda_version_min", "cuda_compute_capability", "gpu_memory_min", "cuda_device_count_min", "cuda_device_count_max", "shm_size"], "title": "ResourceRequirement", "type": "object"}, "RulesParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_rules", "default": "gx_rules", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "rules", "title": "Type", "type": "string"}}, "required": ["name", "type"], "title": "RulesParameterModel", "type": "object"}, "SectionParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_section", "default": "gx_section", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "section", "title": "Type", "type": "string"}, "parameters": {"items": {"anyOf": [{"$ref": "#/$defs/CwlIntegerParameterModel"}, {"$ref": "#/$defs/CwlFloatParameterModel"}, {"$ref": "#/$defs/CwlStringParameterModel"}, {"$ref": "#/$defs/CwlBooleanParameterModel"}, {"$ref": "#/$defs/CwlNullParameterModel"}, {"$ref": "#/$defs/CwlFileParameterModel"}, {"$ref": "#/$defs/CwlDirectoryParameterModel"}, {"$ref": "#/$defs/CwlUnionParameterModel"}, {"$ref": "#/$defs/TextParameterModel"}, {"$ref": "#/$defs/IntegerParameterModel"}, {"$ref": "#/$defs/FloatParameterModel"}, {"$ref": "#/$defs/BooleanParameterModel"}, {"$ref": "#/$defs/HiddenParameterModel"}, {"$ref": "#/$defs/SelectParameterModel"}, {"$ref": "#/$defs/DataParameterModel"}, {"$ref": "#/$defs/DataCollectionParameterModel"}, {"$ref": "#/$defs/DataColumnParameterModel"}, {"$ref": "#/$defs/DirectoryUriParameterModel"}, {"$ref": "#/$defs/RulesParameterModel"}, {"$ref": "#/$defs/DrillDownParameterModel"}, {"$ref": "#/$defs/GroupTagParameterModel"}, {"$ref": "#/$defs/BaseUrlParameterModel"}, {"$ref": "#/$defs/GenomeBuildParameterModel"}, {"$ref": "#/$defs/ColorParameterModel"}, {"$ref": "#/$defs/ConditionalParameterModel"}, {"$ref": "#/$defs/RepeatParameterModel"}, {"$ref": "#/$defs/SectionParameterModel"}]}, "title": "Parameters", "type": "array"}}, "required": ["name", "type", "parameters"], "title": "SectionParameterModel", "type": "object"}, "SelectParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_select", "default": "gx_select", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "select", "title": "Type", "type": "string"}, "options": {"anyOf": [{"items": {"$ref": "#/$defs/LabelValue"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Options"}, "multiple": {"default": false, "title": "Multiple", "type": "boolean"}, "validators": {"default": [], "items": {"$ref": "#/$defs/NoOptionsParameterValidatorModel"}, "title": "Validators", "type": "array"}}, "required": ["name", "type"], "title": "SelectParameterModel", "type": "object"}, "TextParameterModel": {"properties": {"name": {"title": "Name", "type": "string"}, "parameter_type": {"const": "gx_text", "default": "gx_text", "title": "Parameter Type", "type": "string"}, "hidden": {"default": false, "title": "Hidden", "type": "boolean"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "help": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Help"}, "argument": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Argument"}, "is_dynamic": {"default": false, "title": "Is Dynamic", "type": "boolean"}, "optional": {"default": false, "title": "Optional", "type": "boolean"}, "type": {"const": "text", "title": "Type", "type": "string"}, "area": {"default": false, "title": "Area", "type": "boolean"}, "value": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Value"}, "default_options": {"default": [], "items": {"$ref": "#/$defs/LabelValue"}, "title": "Default Options", "type": "array"}, "validators": {"default": [], "items": {"anyOf": [{"$ref": "#/$defs/LengthParameterValidatorModel"}, {"$ref": "#/$defs/RegexParameterValidatorModel"}, {"$ref": "#/$defs/ExpressionParameterValidatorModel"}, {"$ref": "#/$defs/EmptyFieldParameterValidatorModel"}]}, "title": "Validators", "type": "array"}}, "required": ["name", "type"], "title": "TextParameterModel", "type": "object"}, "ToolOutputBoolean": {"properties": {"name": {"description": "Parameter name. Used when referencing parameter in workflows.", "title": "Name"}, "label": {"anyOf": [{"description": "Output label. Will be used as dataset name in history.", "type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "hidden": {"title": "Hidden"}, "type": {"const": "boolean", "title": "Type", "type": "string"}}, "required": ["name", "hidden", "type"], "title": "ToolOutputBoolean", "type": "object"}, "ToolOutputCollectionG_Annotated_Union_bool__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___Annotated_Union_str__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Parameter name. Used when referencing parameter in workflows.", "title": "Name"}, "label": {"anyOf": [{"description": "Output label. Will be used as dataset name in history.", "type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "hidden": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "title": "Hidden"}, "type": {"const": "collection", "title": "Type", "type": "string"}, "structure": {"$ref": "#/$defs/ToolOutputCollectionStructure"}}, "required": ["type", "structure"], "title": "ToolOutputCollectionG[Annotated[Union[bool, NoneType], FieldInfo(annotation=NoneType, required=False, default=None)], Annotated[Union[str, NoneType], FieldInfo(annotation=NoneType, required=False, default=None)]]", "type": "object"}, "ToolOutputCollectionStructure": {"properties": {"collection_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Collection Type"}, "collection_type_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Collection Type Source"}, "collection_type_from_rules": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Collection Type From Rules"}, "structured_like": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Structured Like"}, "discover_datasets": {"anyOf": [{"items": {"anyOf": [{"$ref": "#/$defs/FilePatternDatasetCollectionDescription"}, {"$ref": "#/$defs/ToolProvidedMetadataDatasetCollection"}]}, "type": "array"}, {"type": "null"}], "default": null, "title": "Discover Datasets"}}, "title": "ToolOutputCollectionStructure", "type": "object"}, "ToolOutputDatasetG_Annotated_Union_bool__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___Annotated_Union_str__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Parameter name. Used when referencing parameter in workflows.", "title": "Name"}, "label": {"anyOf": [{"description": "Output label. Will be used as dataset name in history.", "type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "hidden": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "title": "Hidden"}, "type": {"const": "data", "title": "Type", "type": "string"}, "format": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "The short name for the output datatype.", "title": "Format"}, "format_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Format Source"}, "metadata_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Metadata Source"}, "discover_datasets": {"anyOf": [{"items": {"anyOf": [{"$ref": "#/$defs/FilePatternDatasetCollectionDescription"}, {"$ref": "#/$defs/ToolProvidedMetadataDatasetCollection"}]}, "type": "array"}, {"type": "null"}], "default": null, "title": "Discover Datasets"}, "from_work_dir": {"anyOf": [{"description": "Relative path to a file produced by the tool in its working directory. Output\u2019s contents are set to this file\u2019s contents.", "title": "from_work_dir", "type": "string"}, {"type": "null"}], "default": null, "title": "From Work Dir"}}, "required": ["type"], "title": "ToolOutputDatasetG[Annotated[Union[bool, NoneType], FieldInfo(annotation=NoneType, required=False, default=None)], Annotated[Union[str, NoneType], FieldInfo(annotation=NoneType, required=False, default=None)]]", "type": "object"}, "ToolOutputFloat": {"properties": {"name": {"description": "Parameter name. Used when referencing parameter in workflows.", "title": "Name"}, "label": {"anyOf": [{"description": "Output label. Will be used as dataset name in history.", "type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "hidden": {"title": "Hidden"}, "type": {"const": "float", "title": "Type", "type": "string"}}, "required": ["name", "hidden", "type"], "title": "ToolOutputFloat", "type": "object"}, "ToolOutputInteger": {"properties": {"name": {"description": "Parameter name. Used when referencing parameter in workflows.", "title": "Name"}, "label": {"anyOf": [{"description": "Output label. Will be used as dataset name in history.", "type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "hidden": {"title": "Hidden"}, "type": {"const": "integer", "title": "Type", "type": "string"}}, "required": ["name", "hidden", "type"], "title": "ToolOutputInteger", "type": "object"}, "ToolOutputText": {"properties": {"name": {"description": "Parameter name. Used when referencing parameter in workflows.", "title": "Name"}, "label": {"anyOf": [{"description": "Output label. Will be used as dataset name in history.", "type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "hidden": {"title": "Hidden"}, "type": {"const": "text", "title": "Type", "type": "string"}}, "required": ["name", "hidden", "type"], "title": "ToolOutputText", "type": "object"}, "ToolProvidedMetadataDatasetCollection": {"properties": {"discover_via": {"const": "tool_provided_metadata", "title": "Discover Via", "type": "string"}, "format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Format"}, "visible": {"title": "Visible", "type": "boolean"}, "assign_primary_output": {"title": "Assign Primary Output", "type": "boolean"}, "directory": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Directory"}, "recurse": {"title": "Recurse", "type": "boolean"}, "match_relative_path": {"title": "Match Relative Path", "type": "boolean"}}, "required": ["discover_via", "format", "visible", "assign_primary_output", "directory", "recurse", "match_relative_path"], "title": "ToolProvidedMetadataDatasetCollection", "type": "object"}, "XrefDict": {"properties": {"value": {"title": "Value", "type": "string"}, "type": {"title": "Type", "type": "string"}}, "required": ["value", "type"], "title": "XrefDict", "type": "object"}}, "properties": {"class": {"const": "GalaxyUserTool", "title": "Class", "type": "string"}, "id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Version"}, "name": {"title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Description"}, "container": {"title": "Container", "type": "string"}, "requirements": {"anyOf": [{"items": {"anyOf": [{"$ref": "#/$defs/JavascriptRequirement"}, {"$ref": "#/$defs/ResourceRequirement"}, {"$ref": "#/$defs/ContainerRequirement"}]}, "type": "array"}, {"type": "null"}], "default": [], "title": "Requirements"}, "shell_command": {"description": "A string that contains the command to be executed. Parameters can be referenced inside $().", "examples": ["head -n '$(inputs.n_lines)' '$(inputs.data_input.path)'"], "title": "shell_command", "type": "string"}, "inputs": {"default": [], "items": {"$ref": "#/$defs/GalaxyToolParameterModel"}, "title": "Inputs", "type": "array"}, "outputs": {"default": [], "items": {"discriminator": {"mapping": {"boolean": "#/$defs/ToolOutputBoolean", "collection": "#/$defs/ToolOutputCollectionG_Annotated_Union_bool__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___Annotated_Union_str__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___", "data": "#/$defs/ToolOutputDatasetG_Annotated_Union_bool__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___Annotated_Union_str__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___", "float": "#/$defs/ToolOutputFloat", "integer": "#/$defs/ToolOutputInteger", "text": "#/$defs/ToolOutputText"}, "propertyName": "type"}, "oneOf": [{"$ref": "#/$defs/ToolOutputDatasetG_Annotated_Union_bool__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___Annotated_Union_str__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___"}, {"$ref": "#/$defs/ToolOutputCollectionG_Annotated_Union_bool__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___Annotated_Union_str__NoneType___FieldInfo_annotation_NoneType__required_False__default_None___"}, {"$ref": "#/$defs/ToolOutputText"}, {"$ref": "#/$defs/ToolOutputInteger"}, {"$ref": "#/$defs/ToolOutputFloat"}, {"$ref": "#/$defs/ToolOutputBoolean"}]}, "title": "Outputs", "type": "array"}, "citations": {"anyOf": [{"items": {"$ref": "#/$defs/Citation"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Citations"}, "license": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "License"}, "edam_operations": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Edam Operations"}, "edam_topics": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Edam Topics"}, "xrefs": {"anyOf": [{"items": {"$ref": "#/$defs/XrefDict"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Xrefs"}, "help": {"anyOf": [{"$ref": "#/$defs/HelpContent"}, {"type": "null"}], "default": null}}, "required": ["class", "id", "version", "name", "container", "shell_command"], "title": "UserToolSource", "type": "object"} diff --git a/client/src/components/Tool/YamlJs.ts b/client/src/components/Tool/YamlJs.ts new file mode 100644 index 000000000000..849b78478b74 --- /dev/null +++ b/client/src/components/Tool/YamlJs.ts @@ -0,0 +1,338 @@ +import * as monaco from "monaco-editor"; +import { editor } from "monaco-editor"; +import { type IPosition, type MonacoEditor } from "monaco-types"; +import { configureMonacoYaml } from "monaco-yaml"; + +import { extractEmbeddedJs } from "./extractEmbeddedJs"; +import { monarchConfig } from "./MonarchYamlJs"; +import { fetchAndConvertSchemaToInterface } from "./runTimeModel"; +import TOOL_SOURCE_SCHEMA from "./ToolSourceSchema.json"; +import { buildProviderFunctions } from "./yaml"; + +const LANG = "yaml-with-js"; + +const embeddedModelUri = monaco.Uri.parse("file://embedded-model.js"); +const defModelUri = monaco.Uri.parse("file://runtime-defs.ts"); + +export async function setupMonaco(monaco: MonacoEditor) { + // Define the custom YAML language with embedded JavaScript + monaco.languages.register({ id: LANG }); + monaco.languages.register({ id: "typescript" }); + monaco.languages.register({ id: "javascript" }); + monaco.languages.register({ id: "yaml" }); + const disposables: monaco.IDisposable[] = []; + + disposables.push(monaco.languages.setMonarchTokensProvider(LANG, monarchConfig)); + disposables.push( + monaco.languages.setLanguageConfiguration(LANG, { + comments: { lineComment: "#" }, + brackets: [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["$(", ")"], + ], + autoClosingPairs: [ + { open: "{", close: "}" }, + { open: "[", close: "]" }, + { open: "(", close: ")" }, + { open: '"', close: '"' }, + { open: "'", close: "'" }, + { open: "$(", close: ")" }, + ], + surroundingPairs: [ + { open: "{", close: "}" }, + { open: "[", close: "]" }, + { open: "(", close: ")" }, + { open: '"', close: '"' }, + { open: "'", close: "'" }, + ], + }) + ); + + // Set TypeScript/JavaScript configuration + monaco.languages.typescript.typescriptDefaults.setCompilerOptions({ + target: monaco.languages.typescript.ScriptTarget.ES2017, + allowNonTsExtensions: true, + strict: true, + moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs, + checkJs: true, + noEmit: true, + lib: ["es2017"], + }); + monaco.languages.typescript.typescriptDefaults.setEagerModelSync(true); + addExtraLibs(); + + const { dispose } = configureMonacoYaml(monaco, { + enableSchemaRequest: false, + schemas: [ + { + // If YAML file is opened matching this glob + fileMatch: ["tool.yml"], + // The following schema will be applied + schema: TOOL_SOURCE_SCHEMA, + // And the URI will be linked to as the source. + uri: "https://schema.galaxyproject.org/customTool.json", + }, + ], + }); + const { dispose: disposeWorker, providerFunctions } = buildProviderFunctions(monaco, { + enableSchemaRequest: false, + schemas: [ + { + // If YAML file is opened matching this glob + fileMatch: ["tool.yml"], + // The following schema will be applied + schema: TOOL_SOURCE_SCHEMA, + // And the URI will be linked to as the source. + uri: "https://schema.galaxyproject.org/customTool.json", + }, + ], + }); + disposables.push(disposeWorker); + const moreDisposeables = await setupEditor(providerFunctions); + function disposeEditor() { + dispose(); + monaco.editor.getModels().map((model) => model.dispose()); + [...disposables, ...moreDisposeables].map((disposable) => disposable.dispose()); + } + return disposeEditor; +} + +export async function setupEditor(providerFunctions: any) { + const disposables = []; + // Virtual model for JavaScript + const yamlModel = editor.getModels().find((item) => item.getLanguageId() == LANG)!; + const embeddedModel = editor.getModel(embeddedModelUri) || editor.createModel("", "typescript", embeddedModelUri); + mixJsYamlProviders(providerFunctions); + disposables.push(monaco.languages.registerHoverProvider(LANG, providerFunctions)); + disposables.push( + monaco.languages.registerCompletionItemProvider(LANG, { + triggerCharacters: ["."], + provideCompletionItems: providerFunctions.provideCompletionItems, + }) + ); + disposables.push(monaco.languages.registerDefinitionProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerDocumentSymbolProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerDocumentFormattingEditProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerLinkProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerCodeActionProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerFoldingRangeProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerOnTypeFormattingEditProvider(LANG, providerFunctions)); + disposables.push(monaco.languages.registerSelectionRangeProvider(LANG, providerFunctions)); + + attachDiagnosticsProvider(yamlModel, embeddedModel, providerFunctions.provideMarkerData); + return disposables; +} + +function extractExpressionLibJavaScript(yamlContent: string) { + const scriptRegex = /(expression_lib):\s*-\s*\|([\s\S]*?)(?=\n\s*-\s|\n\s*\w+:|\n\s*$)/g; + const match = scriptRegex.exec(yamlContent); + if (match) { + if (match[2]) { + return match[2]; + } else if (match[3]) { + return match[3]; + } + } + return ""; +} + +const fragment = ` +declare global { + const inputs: components["schemas"]["inputs"] +} +`; + +async function addExtraLibs(yamlContent?: string) { + if (yamlContent) { + const { schemaInterface, error } = await fetchAndConvertSchemaToInterface(yamlContent); + if (error) { + console.error(error); + } else { + const runtimeFragment = `${schemaInterface}\n${fragment}`; + const runtimeModel = editor.getModel(defModelUri) || editor.createModel("", "typescript", defModelUri); + if (runtimeModel.getValue() != runtimeFragment) { + runtimeModel.setValue(runtimeFragment); + } + } + } +} + +export async function contentSync(yamlContent: string, scriptContent: string, embeddedModel: editor.ITextModel) { + // Keep the embedded JavaScript model in sync with the YAML editor + if (yamlContent) { + await addExtraLibs(yamlContent); + } + embeddedModel.setValue(scriptContent); +} + +async function mixJsYamlProviders(yamlProviderFunctions: any) { + // Complete and hover consume position and return null if not in focus, + // so execute JS provider, then yaml as fallback + const yamlProvideCompletionItems = yamlProviderFunctions.provideCompletionItems; + const yamlProvideHover = yamlProviderFunctions.provideHover; + yamlProviderFunctions.provideCompletionItems = async (model: editor.ITextModel, position: IPosition) => { + const jsCompletions = await provideCompletionItems(model, position); + if (jsCompletions?.suggestions?.length > 0) { + return jsCompletions; + } else { + return await yamlProvideCompletionItems(model, position); + } + }; + yamlProviderFunctions.provideHover = async (model: editor.ITextModel, position: IPosition) => + (await provideHover(model, position)) || (await yamlProvideHover(model, position)); +} + +async function languageServiceForModel(model: editor.ITextModel) { + const worker = await monaco.languages.typescript.getTypeScriptWorker(); + const languageService = await worker(model.uri); + return languageService; +} + +async function allModels(model: editor.ITextModel) { + const yamlContent = model.getValue(); + const embeddedModel = monaco.editor.getModel(embeddedModelUri)!; + const embeddedStart = yamlContent.indexOf(embeddedModel.getValue()); + const models = [{ start: embeddedStart, model: embeddedModel }]; + const embeddedContents = extractEmbeddedJs(yamlContent); + const fragmentModels = embeddedContents.map((fragment, index) => { + const fragmentModel = getOrCreateFragmentModel(index, fragment.fragment); + return { + start: fragment.start, + model: fragmentModel, + }; + }); + return [...models, ...fragmentModels]; +} + +function getOrCreateFragmentModel(index: number, value: string) { + const modelUri = monaco.Uri.parse(`file://temp-fragment-${index}`); + const fragmentModel = monaco.editor.getModel(modelUri) || monaco.editor.createModel(value, "typescript", modelUri); + fragmentModel.setValue(value); + return fragmentModel; +} + +async function modelForCurrentPosition(model: editor.ITextModel, position: IPosition) { + const yamlContent = model.getValue(); + const embeddedContents = extractEmbeddedJs(yamlContent); + const offsetForPosition = model.getOffsetAt(position); + const fragmentIndex = embeddedContents.findIndex( + (content) => content.start <= offsetForPosition && content.start + content.fragment.length >= offsetForPosition + ); + if (fragmentIndex >= 0) { + const fragment = embeddedContents[fragmentIndex]!; + const offsetWithinFragment = offsetForPosition - fragment.start; + const fragmentModel = getOrCreateFragmentModel(fragmentIndex, fragment.fragment); + return { offset: offsetWithinFragment, model: fragmentModel }; + } + const embeddedContent = extractExpressionLibJavaScript(yamlContent); + if (embeddedContent) { + const offsetWithinFragment = offsetForPosition - yamlContent.indexOf(embeddedContent); + if (offsetWithinFragment < 0 || offsetWithinFragment > embeddedContent.length) { + return undefined; + } + const embeddedModel = monaco.editor.getModel(embeddedModelUri)!; + embeddedModel.setValue(embeddedContent); + return { offset: offsetWithinFragment, model: embeddedModel }; + } + return undefined; +} + +// Add IntelliSense for the embedded JavaScript +async function provideCompletionItems(model: editor.ITextModel, position: IPosition) { + let completionInfo: any; + const currentData = await modelForCurrentPosition(model, position); + if (currentData) { + const { offset, model: currentModel } = currentData; + const languageService = await languageServiceForModel(currentModel); + completionInfo = await languageService.getCompletionsAtPosition(currentModel.uri.toString(), offset); + + if (completionInfo && completionInfo.entries) { + const wordInfo = model.getWordUntilPosition(position); + + return { + suggestions: completionInfo.entries.map((entry: any) => ({ + label: entry.name, + kind: monaco.languages.CompletionItemKind[entry.kind[0].toUpperCase() + entry.kind.slice(1)], + insertText: entry.name, + range: { + startLineNumber: position.lineNumber, + startColumn: wordInfo.startColumn, + endLineNumber: position.lineNumber, + endColumn: wordInfo.endColumn, + }, + })), + }; + } + } + + return { suggestions: [] }; +} + +function attachDiagnosticsProvider( + yamlModel: editor.ITextModel, + embeddedModel: editor.ITextModel, + provideMarkerData: any +) { + monaco.editor.setModelMarkers(yamlModel, "owner", []); // Clear existing markers. + + yamlModel.onDidChangeContent(async () => { + const yamlContent = yamlModel.getValue(); + const embeddedJavaScript = extractExpressionLibJavaScript(yamlContent); + // contentSync makes API call, we could consider updating the marker + // only when fetch complete, but doesn't seem to be a problem ... + await contentSync(yamlContent, embeddedJavaScript, embeddedModel); + const yamlMarkers = await provideMarkerData(yamlModel); + const models = await allModels(yamlModel); + const worker = await monaco.languages.typescript.getTypeScriptWorker(); + const markers = [...yamlMarkers]; + const promises = models.map(async (modelData) => { + const languageService = await worker(modelData.model.uri); + const diagnostics = await languageService.getSemanticDiagnostics(modelData.model.uri.toString()); + diagnostics.forEach((diagnostic) => { + const startPosition = yamlModel.getPositionAt(modelData.start + diagnostic.start!); + const endPosition = yamlModel.getPositionAt(modelData.start + diagnostic.start! + diagnostic.length!); + markers.push({ + severity: monaco.MarkerSeverity.Error, // Severity: Error, Warning, or Info + message: + typeof diagnostic.messageText === "string" + ? diagnostic.messageText + : diagnostic.messageText.messageText, + startLineNumber: startPosition.lineNumber, + startColumn: startPosition.column, + endLineNumber: endPosition.lineNumber, + endColumn: endPosition.column, + }); + }); + }); + await Promise.all(promises); + monaco.editor.setModelMarkers(yamlModel, "owner", markers); + }); +} + +async function provideHover(model: editor.ITextModel, position: IPosition) { + const currentData = await modelForCurrentPosition(model, position); + if (currentData) { + const languageService = await languageServiceForModel(currentData.model); + const quickInfo = await languageService.getQuickInfoAtPosition( + currentData.model.uri.toString(), + currentData.offset + ); + if (quickInfo) { + return { + range: { + startLineNumber: position.lineNumber, + startColumn: position.column, + endLineNumber: position.lineNumber, + endColumn: position.column, + }, + contents: [ + { value: quickInfo.displayParts.map((p: any) => p.text).join("") }, + { value: quickInfo.documentation }, + ], + }; + } + } + return null; +} diff --git a/client/src/components/Tool/extractEmbeddedJs.test.ts b/client/src/components/Tool/extractEmbeddedJs.test.ts new file mode 100644 index 000000000000..0b884750f16e --- /dev/null +++ b/client/src/components/Tool/extractEmbeddedJs.test.ts @@ -0,0 +1,59 @@ +import { extractEmbeddedJs } from "./extractEmbeddedJs"; + +describe("extractEmbeddedJs", () => { + it("should extract single JavaScript fragment", () => { + const input = "Text before $(simple) text after."; + const result = extractEmbeddedJs(input); + expect(result).toEqual([{ fragment: "simple)", start: 14 }]); + }); + + it("should extract multiple JavaScript fragments", () => { + const input = "Text $(first) middle $(second) end."; + const result = extractEmbeddedJs(input); + expect(result).toEqual([ + { fragment: "first)", start: 7 }, + { fragment: "second)", start: 23 }, + ]); + }); + + it("should handle nested JavaScript fragments", () => { + const input = "$(function() { return $(nested); })"; + const result = extractEmbeddedJs(input); + expect(result).toEqual([{ fragment: "function() { return $(nested); })", start: 2 }]); + }); + + it("should handle text without embedded JavaScript", () => { + const input = "This has no embedded JavaScript."; + const result = extractEmbeddedJs(input); + expect(result).toEqual([]); + }); + + it("should handle multiple nested fragments", () => { + const input = "$(outer($(inner))) $(another)"; + const result = extractEmbeddedJs(input); + expect(result).toEqual([ + { fragment: "outer($(inner)))", start: 2 }, + { fragment: "another)", start: 21 }, + ]); + }); + + it("should handle incomplete fragments gracefully", () => { + const input = "Some text $(incomplete"; + const result = extractEmbeddedJs(input); + expect(result).toEqual([]); + }); + + it("should skip shell_command prefix", () => { + const input = "shell_command: $(first)"; + const regex = /shell_command:\w+/; + const result = extractEmbeddedJs(input, regex); + expect(result).toEqual([{ fragment: "first)", start: 17 }]); + }); + + it("should skip shell_command prefix and stop at next line", () => { + const input = "shell_command: $(first)\n$(second)"; + const regex = /shell_command:(.*)$/m; + const result = extractEmbeddedJs(input, regex); + expect(result).toEqual([{ fragment: "first)", start: 17 }]); + }); +}); diff --git a/client/src/components/Tool/extractEmbeddedJs.ts b/client/src/components/Tool/extractEmbeddedJs.ts new file mode 100644 index 000000000000..88f3ef065e7d --- /dev/null +++ b/client/src/components/Tool/extractEmbeddedJs.ts @@ -0,0 +1,41 @@ +export function extractEmbeddedJs(inputString: string, fieldRegex?: RegExp): { fragment: string; start: number }[] { + let i = 0; + let end = inputString.length; + if (fieldRegex) { + const fieldMatch = fieldRegex.exec(inputString); + if (fieldMatch && fieldMatch.length) { + i = fieldMatch.index; + end = i + fieldMatch[0].length; + } + } + const matches: { fragment: string; start: number }[] = []; + + while (i < end) { + if (inputString[i] === "$" && inputString[i + 1] === "(") { + let depth = 0; + const startIndex = i + 2; + i += 2; // Skip past "$(" + + while (i < end) { + if (inputString[i] === "(") { + depth++; + } else if (inputString[i] === ")") { + if (depth === 0) { + // Match ends + matches.push({ + fragment: inputString.substring(startIndex, i + 1), + start: startIndex, + }); + break; + } + depth--; + } + i++; + } + } else { + i++; + } + } + + return matches; +} diff --git a/client/src/components/Tool/rebuild.py b/client/src/components/Tool/rebuild.py new file mode 100644 index 000000000000..e3e19e9a2cd8 --- /dev/null +++ b/client/src/components/Tool/rebuild.py @@ -0,0 +1,6 @@ +import json + +from galaxy.tool_util_models import UserToolSource + +with open("ToolSourceSchema.json", "w") as fh: + fh.write(json.dumps(UserToolSource.model_json_schema())) diff --git a/client/src/components/Tool/runTimeModel.ts b/client/src/components/Tool/runTimeModel.ts new file mode 100644 index 000000000000..b7222fbd473b --- /dev/null +++ b/client/src/components/Tool/runTimeModel.ts @@ -0,0 +1,32 @@ +import { schemaToInterface } from "schema-to-ts"; +import { parse } from "yaml"; + +import { GalaxyApi } from "@/api"; + +async function fetchRuntimeSchema(toolSource: any) { + const { data, error } = await GalaxyApi().POST("/api/unprivileged_tools/runtime_model", { + body: { + active: true, + allow_load: false, + hidden: false, + representation: toolSource, + src: "representation", + }, + }); + return { data, error }; +} + +export async function fetchAndConvertSchemaToInterface(yamlString: string) { + let toolSource = {}; + try { + toolSource = parse(yamlString); + } catch (error) { + return { schemaInterface: "", error }; + } + const { data, error } = await fetchRuntimeSchema(toolSource); + if (error) { + return { schemaInterface: "", error }; + } + const schemaInterface = await schemaToInterface(data as any); + return { schemaInterface, error }; +} diff --git a/client/src/components/Tool/services.js b/client/src/components/Tool/services.js index 4bf2d5e3702a..66b67d041da8 100644 --- a/client/src/components/Tool/services.js +++ b/client/src/components/Tool/services.js @@ -2,9 +2,10 @@ import axios from "axios"; import { getAppRoot } from "onload/loadConfig"; import { rethrowSimple } from "utils/simple-error"; -export async function updateToolFormData(tool_id, tool_version, history_id, inputs) { +export async function updateToolFormData(tool_id, tool_uuid, tool_version, history_id, inputs) { const current_state = { tool_id: tool_id, + tool_uuid: tool_uuid, tool_version: tool_version, inputs: inputs, history_id: history_id, diff --git a/client/src/components/Tool/yaml.ts b/client/src/components/Tool/yaml.ts new file mode 100644 index 000000000000..c0ac0578cf67 --- /dev/null +++ b/client/src/components/Tool/yaml.ts @@ -0,0 +1,335 @@ +import { + fromCodeActionContext, + fromFormattingOptions, + fromPosition, + fromRange, + toCodeAction, + toCompletionList, + toDocumentSymbol, + toFoldingRange, + toHover, + toLink, + toLocationLink, + toMarkerData, + toSelectionRanges, + toTextEdit, +} from "monaco-languageserver-types"; +import { type IDisposable, type IPosition, type MonacoEditor } from "monaco-types"; +import { createWorkerManager } from "monaco-worker-manager"; +import { type CompletionItemKind, type FormattingOptions } from "vscode-languageserver-types"; + +export interface JSONSchema { + id?: string; + $id?: string; + $schema?: string; + url?: string; + type?: string[] | string; + title?: string; + closestTitle?: string; + versions?: Record; + default?: unknown; + definitions?: Record; + description?: string; + properties?: Record; + patternProperties?: Record; + additionalProperties?: JSONSchema | boolean; + minProperties?: number; + maxProperties?: number; + dependencies?: Record; + items?: (JSONSchema | boolean)[] | JSONSchema | boolean; + minItems?: number; + maxItems?: number; + uniqueItems?: boolean; + additionalItems?: JSONSchema | boolean; + pattern?: string; + minLength?: number; + maxLength?: number; + minimum?: number; + maximum?: number; + exclusiveMinimum?: boolean | number; + exclusiveMaximum?: boolean | number; + multipleOf?: number; + required?: string[]; + $ref?: string; + anyOf?: (JSONSchema | boolean)[]; + allOf?: (JSONSchema | boolean)[]; + oneOf?: (JSONSchema | boolean)[]; + not?: JSONSchema | boolean; + enum?: unknown[]; + format?: string; + const?: unknown; + contains?: JSONSchema | boolean; + propertyNames?: JSONSchema | boolean; + examples?: unknown[]; + $comment?: string; + if?: JSONSchema | boolean; + then?: JSONSchema | boolean; + else?: JSONSchema | boolean; + defaultSnippets?: { + label?: string; + description?: string; + markdownDescription?: string; + type?: string; + suggestionKind?: CompletionItemKind; + sortText?: string; + body?: unknown; + bodyText?: string; + }[]; + errorMessage?: string; + patternErrorMessage?: string; + deprecationMessage?: string; + enumDescriptions?: string[]; + markdownEnumDescriptions?: string[]; + markdownDescription?: string; + doNotSuggest?: boolean; + allowComments?: boolean; + schemaSequence?: JSONSchema[]; + filePatternAssociation?: string; +} + +export interface SchemasSettings { + /** + * A `Uri` file match which will trigger the schema validation. This may be a glob or an exact + * path. + * + * @example '.gitlab-ci.yml' + * @example 'file://**\/.github/actions/*.yaml' + */ + fileMatch: string[]; + + /** + * The JSON schema which will be used for validation. If not specified, it will be downloaded from + * `uri`. + */ + schema?: JSONSchema; + + /** + * The source URI of the JSON schema. The JSON schema will be downloaded from here if no schema + * was supplied. It will also be displayed as the source in hover tooltips. + */ + uri: string; +} + +export interface MonacoYamlOptions { + /** + * If set, enable schema based autocompletion. + * + * @default true + */ + readonly completion?: boolean; + + /** + * A list of custom tags. + * + * @default [] + */ + readonly customTags?: string[]; + + /** + * If set, the schema service will load schema content on-demand. + * + * @default false + */ + readonly enableSchemaRequest?: boolean; + + /** + * If true, formatting using Prettier is enabled. Setting this to `false` does **not** exclude + * Prettier from the bundle. + * + * @default true + */ + readonly format?: boolean; + + /** + * If set, enable hover typs based the JSON schema. + * + * @default true + */ + readonly hover?: boolean; + + /** + * If true, a different diffing algorithm is used to generate error messages. + * + * @default false + */ + readonly isKubernetes?: boolean; + + /** + * A list of known schemas and/or associations of schemas to file names. + * + * @default [] + */ + readonly schemas?: SchemasSettings[]; + + /** + * If set, the validator will be enabled and perform syntax validation as well as schema + * based validation. + * + * @default true + */ + readonly validate?: boolean; + + /** + * The YAML version to use for parsing. + * + * @default '1.2' + */ + readonly yamlVersion?: "1.1" | "1.2"; +} + +export interface MonacoYaml extends IDisposable { + /** + * Recondigure `monaco-yaml`. + */ + update: (options: MonacoYamlOptions) => Promise; +} + +export function buildProviderFunctions(monaco: MonacoEditor, options?: MonacoYamlOptions) { + const createData: MonacoYamlOptions = { + completion: true, + customTags: [], + enableSchemaRequest: false, + format: true, + isKubernetes: false, + hover: true, + schemas: [], + validate: true, + yamlVersion: "1.2", + ...options, + }; + + const workerManager = createWorkerManager(monaco, { + label: "yaml", + moduleId: "monaco-yaml/yaml.worker", + createData, + }); + + const providerFunctions = { + autoFormatTriggerCharacters: ["\n"], + triggerCharacters: [" ", ":"], + displayName: "yaml", + + async provideMarkerData(model: any) { + const worker = await workerManager.getWorker(model.uri); + const diagnostics = await (worker as any).doValidation(String(model.uri)); + + return diagnostics?.map(toMarkerData); + }, + + async resetMarkerData(model: any) { + const worker = await workerManager.getWorker(model.uri); + await (worker as any).resetSchema(String(model.uri)); + }, + + async provideCompletionItems(model: any, position: IPosition) { + const wordInfo = model.getWordUntilPosition(position); + const worker = await workerManager.getWorker(model.uri); + const info = await (worker as any).doComplete(String(model.uri), fromPosition(position)); + + if (info) { + return toCompletionList(info, { + range: { + startLineNumber: position.lineNumber, + startColumn: wordInfo.startColumn, + endLineNumber: position.lineNumber, + endColumn: wordInfo.endColumn, + }, + }); + } + }, + + async provideHover(model: any, position: IPosition) { + const worker = await workerManager.getWorker(model.uri); + const info = await (worker as any).doHover(String(model.uri), fromPosition(position)); + + if (info) { + return toHover(info); + } + }, + + async provideDefinition(model: any, position: IPosition) { + const worker = await workerManager.getWorker(model.uri); + const locationLinks = await (worker as any).doDefinition(String(model.uri), fromPosition(position)); + + return locationLinks?.map(toLocationLink); + }, + + async provideDocumentSymbols(model: any) { + const worker = await workerManager.getWorker(model.uri); + const items = await (worker as any).findDocumentSymbols(String(model.uri)); + + return items?.map(toDocumentSymbol); + }, + + async provideDocumentFormattingEdits(model: any) { + const worker = await workerManager.getWorker(model.uri); + const edits = await (worker as any).format(String(model.uri)); + + return edits?.map(toTextEdit); + }, + + async provideLinks(model: any) { + const worker = await workerManager.getWorker(model.uri); + const links = await (worker as any).findLinks(String(model.uri)); + + if (links) { + return { + links: links.map(toLink), + }; + } + }, + + async provideCodeActions(model: any, range: any, context: any) { + const worker = await workerManager.getWorker(model.uri); + const codeActions = await (worker as any).getCodeAction( + String(model.uri), + fromRange(range), + fromCodeActionContext(context) + ); + + if (codeActions) { + return { + actions: codeActions.map(toCodeAction), + dispose() { + // This is required by the TypeScript interface, but it’s not implemented. + }, + }; + } + }, + + async provideFoldingRanges(model: any) { + const worker = await workerManager.getWorker(model.uri); + const foldingRanges = await (worker as any).getFoldingRanges(String(model.uri)); + + return foldingRanges?.map(toFoldingRange); + }, + + async provideOnTypeFormattingEdits( + model: any, + position: IPosition, + ch: any, + formattingOptions: FormattingOptions + ) { + const worker = await workerManager.getWorker(model.uri); + const edits = await (worker as any).doDocumentOnTypeFormatting( + String(model.uri), + fromPosition(position), + ch, + fromFormattingOptions(formattingOptions) + ); + + return edits?.map(toTextEdit); + }, + + async provideSelectionRanges(model: any, positions: IPosition[]) { + const worker = await workerManager.getWorker(model.uri); + const selectionRanges = await (worker as any).getSelectionRanges( + String(model.uri), + positions.map(fromPosition) + ); + + return selectionRanges?.map(toSelectionRanges); + }, + }; + return { dispose: workerManager, providerFunctions }; +} diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index d3e8dda05c1b..9bea04e39eac 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -29,7 +29,7 @@ +