From 170b16e755ab1a9cb14e9862f23ab30ec6256fcd Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Tue, 3 Feb 2026 10:27:40 -0500 Subject: [PATCH 01/24] API visual first pass --- runtime/parser/schema/project.schema.yaml | 14 +- .../src/features/apis/editor/APIEditor.svelte | 207 +++++ .../apis/editor/APIResponsePreview.svelte | 67 ++ .../apis/editor/VisualAPIEditor.svelte | 772 ++++++++++++++++++ .../features/workspaces/APIWorkspace.svelte | 81 ++ .../(workspace)/files/[...file]/+page.svelte | 2 + 6 files changed, 1140 insertions(+), 3 deletions(-) create mode 100644 web-common/src/features/apis/editor/APIEditor.svelte create mode 100644 web-common/src/features/apis/editor/APIResponsePreview.svelte create mode 100644 web-common/src/features/apis/editor/VisualAPIEditor.svelte create mode 100644 web-common/src/features/workspaces/APIWorkspace.svelte diff --git a/runtime/parser/schema/project.schema.yaml b/runtime/parser/schema/project.schema.yaml index 52a1e48464b5..5f8c65c49a90 100644 --- a/runtime/parser/schema/project.schema.yaml +++ b/runtime/parser/schema/project.schema.yaml @@ -3214,13 +3214,17 @@ definitions: connector: type: string description: Specifies the connector to use with the glob input. + args: + type: object + description: Arguments to pass to the glob resolver. + additionalProperties: true required: - glob - examples: + examples: - type: api + glob: data/*.csv + args: - glob: "data/*.csv" - - title: Resource Status Check type: object description: Uses the status of a resource as data. @@ -3291,6 +3295,10 @@ definitions: connector: type: string description: Specifies the connector to use with the glob input. + args: + type: object + description: Arguments to pass to the glob resolver. + additionalProperties: true required: - glob - title: Resource Status Check diff --git a/web-common/src/features/apis/editor/APIEditor.svelte b/web-common/src/features/apis/editor/APIEditor.svelte new file mode 100644 index 000000000000..6da36b9d85c6 --- /dev/null +++ b/web-common/src/features/apis/editor/APIEditor.svelte @@ -0,0 +1,207 @@ + + +
+
+ + { + if (!content?.length) { + setLineStatuses([], editor); + } + }} + {fileArtifact} + extensions={[customYAMLwithJSONandSQL]} + /> + +
+ +
+ + +
+
+ GET + {fullUrl} +
+ +
+ + + + + +
+ {#if args.length === 0} +

+ No arguments. Click "Add" below. +

+ {:else} + {#each args as arg (arg.id)} +
+ + + +
+ {/each} + {/if} + +
+
+
+ + +
+
+ +
+ +
+
+
diff --git a/web-common/src/features/apis/editor/APIResponsePreview.svelte b/web-common/src/features/apis/editor/APIResponsePreview.svelte new file mode 100644 index 000000000000..1e06c4727eef --- /dev/null +++ b/web-common/src/features/apis/editor/APIResponsePreview.svelte @@ -0,0 +1,67 @@ + + +{#if isLoading} + +{:else if error} + +{:else if !response} +
+ Click "Test API" to see the response +
+{:else if response.length === 0} +
+ API returned an empty response +
+{:else} + +{/if} diff --git a/web-common/src/features/apis/editor/VisualAPIEditor.svelte b/web-common/src/features/apis/editor/VisualAPIEditor.svelte new file mode 100644 index 000000000000..599a1da594a5 --- /dev/null +++ b/web-common/src/features/apis/editor/VisualAPIEditor.svelte @@ -0,0 +1,772 @@ + + +
+
+
+ +
+
+ Build +
+ + +
+ +
+ {#each apiTypes as apiType} + + {/each} +
+
+ + +
+ {#if currentType === "metrics_sql"} +
+ + + + + + + {#each metricsSqlTemplates as template} + applyTemplate(template)}> + {template.label} + + {/each} + + +
+