History

Share secret-backed credential values (#454)

Rhys Sullivan committed 6 months ago

Commit 9639a681 parent 899a99e17 files · +768 −954Browse files

Showing the changes to packages/plugins/openapi/src/api (1 of 17 files). Show all

Unified · Split

packages/plugins/openapi/src/api/group.ts+1−9
@@ -1,6 +1,6 @@
11 import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "@effect/platform";
22 import { Schema } from "effect";
3−import { ScopeId } from "@executor/sdk";
3+import { ScopeId, SecretBackedValue } from "@executor/sdk";
44 import { InternalError } from "@executor/api";
55
66 import { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from "../sdk/errors";
@@ -21,14 +21,6 @@ const scopeIdParam = HttpApiSchema.param("scopeId", ScopeId); · 14 unmodified lines
2121 const namespaceParam = HttpApiSchema.param("namespace", Schema.String);
2222 const sourceScopeIdParam = HttpApiSchema.param("sourceScopeId", ScopeId);
2323
24−const SecretBackedValue = Schema.Union(
25− Schema.String,
26− Schema.Struct({
27− secretId: Schema.String,
28− prefix: Schema.optional(Schema.String),
29− }),
30−);
31−
3224 const SpecFetchCredentialsPayload = Schema.Struct({
3325 headers: Schema.optional(Schema.Record({ key: Schema.String, value: SecretBackedValue })),
3426 queryParams: Schema.optional(Schema.Record({ key: Schema.String, value: SecretBackedValue })),