Showing the changes to packages/plugins/openapi/src/api (1 of 17 files). Show all
Unified · Split
| @@ -1,6 +1,6 @@ | |||
| 1 | import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "@effect/platform"; | 1 | import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "@effect/platform"; |
| 2 | import { Schema } from "effect"; | 2 | import { Schema } from "effect"; |
| 3 | import { ScopeId } from "@executor/sdk"; | 3 | import { ScopeId, SecretBackedValue } from "@executor/sdk"; |
| 4 | import { InternalError } from "@executor/api"; | 4 | import { InternalError } from "@executor/api"; |
| 5 | 5 | ||
| 6 | import { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from "../sdk/errors"; | 6 | import { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from "../sdk/errors"; |
| @@ -21,14 +21,6 @@ const scopeIdParam = HttpApiSchema.param("scopeId", ScopeId); · 14 unmodified lines | |||
| 21 | const namespaceParam = HttpApiSchema.param("namespace", Schema.String); | 21 | const namespaceParam = HttpApiSchema.param("namespace", Schema.String); |
| 22 | const sourceScopeIdParam = HttpApiSchema.param("sourceScopeId", ScopeId); | 22 | const sourceScopeIdParam = HttpApiSchema.param("sourceScopeId", ScopeId); |
| 23 | 23 | ||
| 24 | const SecretBackedValue = Schema.Union( | ||
| 25 | Schema.String, | ||
| 26 | Schema.Struct({ | ||
| 27 | secretId: Schema.String, | ||
| 28 | prefix: Schema.optional(Schema.String), | ||
| 29 | }), | ||
| 30 | ); | ||
| 31 | |||
| 32 | const SpecFetchCredentialsPayload = Schema.Struct({ | 24 | const SpecFetchCredentialsPayload = Schema.Struct({ |
| 33 | headers: Schema.optional(Schema.Record({ key: Schema.String, value: SecretBackedValue })), | 25 | headers: Schema.optional(Schema.Record({ key: Schema.String, value: SecretBackedValue })), |
| 34 | queryParams: Schema.optional(Schema.Record({ key: Schema.String, value: SecretBackedValue })), | 26 | queryParams: Schema.optional(Schema.Record({ key: Schema.String, value: SecretBackedValue })), |