@executor-js/plugin-openapi 1.5.15 → 1.5.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddOpenApiSource-U7AYB224.js +369 -0
- package/dist/AddOpenApiSource-U7AYB224.js.map +1 -0
- package/dist/{OpenApiAccountsPanel-X5Z5XKRM.js → OpenApiAccountsPanel-GHFHHE6P.js} +15 -39
- package/dist/OpenApiAccountsPanel-GHFHHE6P.js.map +1 -0
- package/dist/{UpdateSpecSection-Z2DEEWZW.js → UpdateSpecSection-PLCBUU4I.js} +4 -4
- package/dist/UpdateSpecSection-PLCBUU4I.js.map +1 -0
- package/dist/api/group.d.ts +0 -21
- package/dist/api/index.d.ts +0 -21
- package/dist/{chunk-ZTOOUP67.js → chunk-3FM2SWM4.js} +542 -580
- package/dist/chunk-3FM2SWM4.js.map +1 -0
- package/dist/chunk-CKBX4SXK.js +95 -0
- package/dist/chunk-CKBX4SXK.js.map +1 -0
- package/dist/{chunk-NJ4Q3VF4.js → chunk-CPPTKUOW.js} +5 -14
- package/dist/chunk-CPPTKUOW.js.map +1 -0
- package/dist/{chunk-O54VFSWE.js → chunk-KVPUDOJZ.js} +18 -4
- package/dist/chunk-KVPUDOJZ.js.map +1 -0
- package/dist/{chunk-PAHWRRS3.js → chunk-QQFCICLX.js} +4 -13
- package/dist/chunk-QQFCICLX.js.map +1 -0
- package/dist/client.js +4 -5
- package/dist/client.js.map +1 -1
- package/dist/core.js +25 -15
- package/dist/core.js.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/react/atoms.d.ts +0 -22
- package/dist/react/client.d.ts +0 -21
- package/dist/react/index.d.ts +2 -0
- package/dist/sdk/backing.d.ts +54 -0
- package/dist/sdk/config.d.ts +0 -2
- package/dist/sdk/derive-auth.d.ts +5 -3
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/plugin.d.ts +4 -10
- package/dist/sdk/presets.d.ts +0 -1
- package/dist/sdk/preview.d.ts +79 -0
- package/dist/testing/index.d.ts +0 -6
- package/package.json +6 -5
- package/dist/AddOpenApiSource-IRMLVLDK.js +0 -765
- package/dist/AddOpenApiSource-IRMLVLDK.js.map +0 -1
- package/dist/OpenApiAccountsPanel-X5Z5XKRM.js.map +0 -1
- package/dist/UpdateSpecSection-Z2DEEWZW.js.map +0 -1
- package/dist/chunk-MZWZQ24W.js +0 -226
- package/dist/chunk-MZWZQ24W.js.map +0 -1
- package/dist/chunk-NJ4Q3VF4.js.map +0 -1
- package/dist/chunk-O54VFSWE.js.map +0 -1
- package/dist/chunk-PAHWRRS3.js.map +0 -1
- package/dist/chunk-UOLBAX5D.js +0 -712
- package/dist/chunk-UOLBAX5D.js.map +0 -1
- package/dist/chunk-ZTOOUP67.js.map +0 -1
- package/dist/react/GoogleProductPicker.d.ts +0 -9
- package/dist/sdk/google-discovery.d.ts +0 -43
- package/dist/sdk/google-discovery.test.d.ts +0 -1
- package/dist/sdk/google-oauth-batches.d.ts +0 -13
- package/dist/sdk/google-oauth-batches.test.d.ts +0 -1
- package/dist/sdk/google-oauth-scopes.d.ts +0 -3
- package/dist/sdk/google-oauth-scopes.test.d.ts +0 -1
- package/dist/sdk/google-presets.d.ts +0 -16
- package/dist/sdk/google-presets.test.d.ts +0 -1
- package/dist/sdk/google-product-picker-scopes.test.d.ts +0 -1
- /package/dist/sdk/{google-bundle.test.d.ts → store.test.d.ts} +0 -0
package/dist/react/client.d.ts
CHANGED
|
@@ -14,14 +14,6 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
14
14
|
}>>>;
|
|
15
15
|
}>>;
|
|
16
16
|
readonly operationCount: import("effect/Schema").Number;
|
|
17
|
-
readonly operations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
18
|
-
readonly operationId: import("effect/Schema").String;
|
|
19
|
-
readonly method: import("effect/Schema").Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
20
|
-
readonly path: import("effect/Schema").String;
|
|
21
|
-
readonly summary: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
22
|
-
readonly tags: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
23
|
-
readonly deprecated: import("effect/Schema").Boolean;
|
|
24
|
-
}>>;
|
|
25
17
|
readonly tags: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
26
18
|
readonly securitySchemes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
27
19
|
readonly name: import("effect/Schema").String;
|
|
@@ -71,12 +63,6 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
71
63
|
}>, import("effect/Schema").Struct<{
|
|
72
64
|
readonly kind: import("effect/Schema").Literal<"blob">;
|
|
73
65
|
readonly value: import("effect/Schema").String;
|
|
74
|
-
}>, import("effect/Schema").Struct<{
|
|
75
|
-
readonly kind: import("effect/Schema").Literal<"googleDiscovery">;
|
|
76
|
-
readonly url: import("effect/Schema").String;
|
|
77
|
-
}>, import("effect/Schema").Struct<{
|
|
78
|
-
readonly kind: import("effect/Schema").Literal<"googleDiscoveryBundle">;
|
|
79
|
-
readonly urls: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
80
66
|
}>]>;
|
|
81
67
|
readonly slug: import("effect/Schema").String;
|
|
82
68
|
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -118,7 +104,6 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
118
104
|
slug: import("effect/Schema").String;
|
|
119
105
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
120
106
|
readonly sourceUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
121
|
-
readonly googleDiscoveryUrls: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
122
107
|
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
123
108
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
124
109
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
@@ -191,12 +176,6 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
191
176
|
}>, import("effect/Schema").Struct<{
|
|
192
177
|
readonly kind: import("effect/Schema").Literal<"blob">;
|
|
193
178
|
readonly value: import("effect/Schema").String;
|
|
194
|
-
}>, import("effect/Schema").Struct<{
|
|
195
|
-
readonly kind: import("effect/Schema").Literal<"googleDiscovery">;
|
|
196
|
-
readonly url: import("effect/Schema").String;
|
|
197
|
-
}>, import("effect/Schema").Struct<{
|
|
198
|
-
readonly kind: import("effect/Schema").Literal<"googleDiscoveryBundle">;
|
|
199
|
-
readonly urls: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
200
179
|
}>]>>;
|
|
201
180
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
202
181
|
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { openApiIntegrationPlugin } from "./source-plugin";
|
|
2
2
|
export { OpenApiClient } from "./client";
|
|
3
|
+
export { OpenApiSourceDetailsFields } from "./OpenApiSourceDetailsFields";
|
|
4
|
+
export { authenticationFromEditorValue, authMethodsFromConfig, editorValueFromAuthentication, openApiWireAuthInput, placementsFromApiKey, templateFromPlacements, } from "./auth-method-config";
|
|
3
5
|
export { previewOpenApiSpec, addOpenApiSpec, removeOpenApiSpec, openapiConfigure, openApiConfigAtom, openApiConfigFamily, openApiIntegrationAtom, openApiIntegrationFamily, } from "./atoms";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { Layer } from "effect";
|
|
3
|
+
import { HttpClient } from "effect/unstable/http";
|
|
4
|
+
import { type PluginCtx, type ResolveToolsResult, type StorageFailure, type ToolDef, type ToolInvocationCredential } from "@executor-js/sdk/core";
|
|
5
|
+
import { type OpenApiIntegrationConfig } from "./config";
|
|
6
|
+
import { OpenApiExtractionError, OpenApiParseError } from "./errors";
|
|
7
|
+
import { type ToolDefinition } from "./definitions";
|
|
8
|
+
import { type ParsedDocument } from "./parse";
|
|
9
|
+
import { type OpenapiStore, type StoredOperation } from "./store";
|
|
10
|
+
export declare const extractOpenApiUpstreamMessage: (body: unknown, status: number) => string;
|
|
11
|
+
/** Rewrite OpenAPI `#/components/schemas/X` refs to standard `#/$defs/X`. */
|
|
12
|
+
export declare const normalizeOpenApiRefs: (node: unknown) => unknown;
|
|
13
|
+
export interface CompiledOpenApiSpec {
|
|
14
|
+
readonly definitions: readonly ToolDefinition[];
|
|
15
|
+
readonly hoistedDefs: Record<string, unknown>;
|
|
16
|
+
readonly title: string | undefined;
|
|
17
|
+
readonly description: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const compileOpenApiDocument: (doc: ParsedDocument) => Effect.Effect<CompiledOpenApiSpec, OpenApiExtractionError>;
|
|
20
|
+
export declare const compileOpenApiSpec: (specText: string) => Effect.Effect<CompiledOpenApiSpec, OpenApiParseError | OpenApiExtractionError>;
|
|
21
|
+
export declare const openApiToolDefsFromCompiled: (compiled: CompiledOpenApiSpec) => readonly ToolDef[];
|
|
22
|
+
export declare const openApiStoredOperationsFromCompiled: (integration: string, compiled: CompiledOpenApiSpec) => readonly StoredOperation[];
|
|
23
|
+
export declare const loadOpenApiSpecText: (storage: OpenapiStore, config: OpenApiIntegrationConfig) => Effect.Effect<string | null, StorageFailure>;
|
|
24
|
+
export declare const resolveOpenApiBackedTools: ({ config, storage, }: {
|
|
25
|
+
readonly config: unknown;
|
|
26
|
+
readonly storage: OpenapiStore;
|
|
27
|
+
}) => Effect.Effect<ResolveToolsResult, StorageFailure>;
|
|
28
|
+
export declare const invokeOpenApiBackedTool: (input: {
|
|
29
|
+
readonly ctx: PluginCtx<OpenapiStore>;
|
|
30
|
+
readonly toolRow: {
|
|
31
|
+
readonly integration: string;
|
|
32
|
+
readonly name: string;
|
|
33
|
+
};
|
|
34
|
+
readonly credential: ToolInvocationCredential;
|
|
35
|
+
readonly args: unknown;
|
|
36
|
+
readonly httpClientLayer: Layer.Layer<HttpClient.HttpClient, never, never>;
|
|
37
|
+
}) => Effect.Effect<{
|
|
38
|
+
readonly ok: false;
|
|
39
|
+
readonly error: import("@executor-js/sdk/core").ToolError;
|
|
40
|
+
} | {
|
|
41
|
+
readonly ok: true;
|
|
42
|
+
readonly data: unknown;
|
|
43
|
+
readonly http?: import("@executor-js/sdk/core").ToolHttpMeta;
|
|
44
|
+
}, StorageFailure | OpenApiExtractionError | import("./errors").OpenApiInvocationError, never>;
|
|
45
|
+
export declare const resolveOpenApiBackedAnnotations: (input: {
|
|
46
|
+
readonly ctx: PluginCtx<OpenapiStore>;
|
|
47
|
+
readonly integration: string;
|
|
48
|
+
readonly toolRows: readonly {
|
|
49
|
+
readonly name: string;
|
|
50
|
+
}[];
|
|
51
|
+
}) => Effect.Effect<Record<string, {
|
|
52
|
+
requiresApproval?: boolean;
|
|
53
|
+
approvalDescription?: string;
|
|
54
|
+
}>, StorageFailure, never>;
|
package/dist/sdk/config.d.ts
CHANGED
|
@@ -24,8 +24,6 @@ export declare const OpenApiIntegrationConfigSchema: Schema.Struct<{
|
|
|
24
24
|
readonly specHash: Schema.optional<Schema.String>;
|
|
25
25
|
/** Origin URL the spec was fetched from, when known. Enables refresh. */
|
|
26
26
|
readonly sourceUrl: Schema.optional<Schema.String>;
|
|
27
|
-
/** Google Discovery bundle URLs, when the spec came from a Google bundle. */
|
|
28
|
-
readonly googleDiscoveryUrls: Schema.optional<Schema.$Array<Schema.String>>;
|
|
29
27
|
/** Optional base URL override. */
|
|
30
28
|
readonly baseUrl: Schema.optional<Schema.String>;
|
|
31
29
|
/** Static headers applied to every request (no secret material). */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { HeaderPreset, OAuth2Preset, SpecPreview } from "./preview";
|
|
1
|
+
import type { HeaderPreset, OAuth2Preset, SpecPreview, SpecPreviewSummary } from "./preview";
|
|
2
2
|
import type { Authentication } from "./types";
|
|
3
|
+
type PreviewAuthMetadata = SpecPreview | SpecPreviewSummary;
|
|
3
4
|
export declare function resolveOAuthUrl(url: string, baseUrl: string): string;
|
|
4
5
|
export declare const resolvedOAuthScopes: (apiScopes: Iterable<string>, identityScopes: OAuth2Preset["identityScopes"]) => string[];
|
|
5
6
|
export declare const detectedAuthenticationTemplates: (headerPresets: readonly HeaderPreset[], oauth2Presets: readonly OAuth2Preset[], baseUrl: string) => readonly Authentication[];
|
|
6
|
-
export declare const firstBaseUrlForPreview: (preview:
|
|
7
|
+
export declare const firstBaseUrlForPreview: (preview: PreviewAuthMetadata) => string;
|
|
7
8
|
/** The fallback `addSpec` uses when no explicit template was passed: every
|
|
8
9
|
* spec-detected method, resolved against the integration's base URL. */
|
|
9
|
-
export declare const deriveAuthenticationTemplateFromPreview: (preview:
|
|
10
|
+
export declare const deriveAuthenticationTemplateFromPreview: (preview: PreviewAuthMetadata, baseUrl: string | undefined) => readonly Authentication[];
|
|
11
|
+
export {};
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { parse, resolveSpecText, fetchSpecText } from "./parse";
|
|
2
|
-
export { convertGoogleDiscoveryBundleToOpenApi, convertGoogleDiscoveryToOpenApi, fetchGoogleDiscoveryDocument, isGoogleDiscoveryUrl, type GoogleDiscoveryOpenApiConversion, } from "./google-discovery";
|
|
3
2
|
export { extract } from "./extract";
|
|
4
3
|
export { invoke, invokeWithLayer, annotationsForOperation } from "./invoke";
|
|
4
|
+
export { compileOpenApiDocument, compileOpenApiSpec, extractOpenApiUpstreamMessage, invokeOpenApiBackedTool, loadOpenApiSpecText, normalizeOpenApiRefs, openApiStoredOperationsFromCompiled, openApiToolDefsFromCompiled, resolveOpenApiBackedAnnotations, resolveOpenApiBackedTools, type CompiledOpenApiSpec, } from "./backing";
|
|
5
|
+
export type { ParsedDocument } from "./parse";
|
|
5
6
|
export { openApiPlugin, type OpenApiSpecConfig, type OpenApiConfigureInput, type OpenApiSpecInput, type OpenApiPreviewInput, type OpenApiPluginExtension, type OpenApiPluginOptions, } from "./plugin";
|
|
6
7
|
export { type OpenapiStore, type StoredOperation, makeDefaultOpenapiStore } from "./store";
|
|
7
8
|
export { decodeOpenApiIntegrationConfig, renderAuthTemplate, AuthenticationSchema, OpenApiIntegrationConfigSchema, type OpenApiIntegrationConfig, type RenderedAuth, } from "./config";
|
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface OpenApiSpecConfig {
|
|
|
29
29
|
readonly headers?: Record<string, string>;
|
|
30
30
|
/** Static query params applied to every request. */
|
|
31
31
|
readonly queryParams?: Record<string, string>;
|
|
32
|
-
/** Auth methods a connection's value renders through
|
|
32
|
+
/** Auth methods a connection's value renders through - canonical
|
|
33
33
|
* placements or the request-shaped authoring dialect. */
|
|
34
34
|
readonly authenticationTemplate?: readonly AuthenticationInput[];
|
|
35
35
|
}
|
|
@@ -47,7 +47,7 @@ export interface OpenApiConfigureInput {
|
|
|
47
47
|
readonly mode?: "merge" | "replace";
|
|
48
48
|
}
|
|
49
49
|
/** What changed in the tool catalog when a spec was updated in place. Tool
|
|
50
|
-
* names, not addresses
|
|
50
|
+
* names, not addresses - the same diff applies to every connection. */
|
|
51
51
|
export interface UpdateSpecResult {
|
|
52
52
|
readonly slug: IntegrationSlug;
|
|
53
53
|
readonly toolCount: number;
|
|
@@ -56,7 +56,7 @@ export interface UpdateSpecResult {
|
|
|
56
56
|
}
|
|
57
57
|
export interface OpenApiUpdateSpecInput {
|
|
58
58
|
/** New spec source. Omit to re-fetch from the integration's stored
|
|
59
|
-
* `sourceUrl
|
|
59
|
+
* `sourceUrl`. */
|
|
60
60
|
readonly spec?: OpenApiSpecInput;
|
|
61
61
|
}
|
|
62
62
|
export interface OpenApiPluginExtension {
|
|
@@ -66,7 +66,7 @@ export interface OpenApiPluginExtension {
|
|
|
66
66
|
readonly toolCount: number;
|
|
67
67
|
}, OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError | IntegrationAlreadyExistsError | StorageFailure>;
|
|
68
68
|
/** Re-resolve the integration's spec (from its stored source URL, or the
|
|
69
|
-
* provided input) and rebuild its tools IN PLACE
|
|
69
|
+
* provided input) and rebuild its tools IN PLACE - connections,
|
|
70
70
|
* credentials, policies, and the curated description are untouched. */
|
|
71
71
|
readonly updateSpec: (slug: string, input?: OpenApiUpdateSpecInput) => Effect.Effect<UpdateSpecResult, OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError | IntegrationNotFoundError | StorageFailure>;
|
|
72
72
|
readonly removeSpec: (slug: string) => Effect.Effect<void, StorageFailure>;
|
|
@@ -84,12 +84,6 @@ declare const OpenApiSpecInputSchema: Schema.Union<readonly [Schema.Struct<{
|
|
|
84
84
|
}>, Schema.Struct<{
|
|
85
85
|
readonly kind: Schema.Literal<"blob">;
|
|
86
86
|
readonly value: Schema.String;
|
|
87
|
-
}>, Schema.Struct<{
|
|
88
|
-
readonly kind: Schema.Literal<"googleDiscovery">;
|
|
89
|
-
readonly url: Schema.String;
|
|
90
|
-
}>, Schema.Struct<{
|
|
91
|
-
readonly kind: Schema.Literal<"googleDiscoveryBundle">;
|
|
92
|
-
readonly urls: Schema.$Array<Schema.String>;
|
|
93
87
|
}>]>;
|
|
94
88
|
export declare const describeOpenApiAuthMethods: (record: IntegrationRecord) => readonly AuthMethodDescriptor[];
|
|
95
89
|
export declare const describeOpenApiIntegrationDisplay: (record: IntegrationRecord) => {
|
package/dist/sdk/presets.d.ts
CHANGED
package/dist/sdk/preview.d.ts
CHANGED
|
@@ -193,6 +193,85 @@ export declare const SpecPreview: Schema.Struct<{
|
|
|
193
193
|
}>>;
|
|
194
194
|
}>;
|
|
195
195
|
export type SpecPreview = typeof SpecPreview.Type;
|
|
196
|
+
export declare const SpecPreviewSummary: Schema.Struct<{
|
|
197
|
+
readonly title: Schema.OptionFromOptional<Schema.String>;
|
|
198
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
199
|
+
readonly version: Schema.OptionFromOptional<Schema.String>;
|
|
200
|
+
readonly servers: Schema.$Array<Schema.Struct<{
|
|
201
|
+
readonly url: Schema.String;
|
|
202
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
203
|
+
readonly variables: Schema.OptionFromOptional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
204
|
+
readonly default: Schema.String;
|
|
205
|
+
readonly enum: Schema.OptionFromOptional<Schema.$Array<Schema.String>>;
|
|
206
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
207
|
+
}>>>;
|
|
208
|
+
}>>;
|
|
209
|
+
readonly operationCount: Schema.Number;
|
|
210
|
+
readonly tags: Schema.$Array<Schema.String>;
|
|
211
|
+
readonly securitySchemes: Schema.$Array<Schema.Struct<{
|
|
212
|
+
/** Key name in components.securitySchemes (e.g. "api_token") */
|
|
213
|
+
readonly name: Schema.String;
|
|
214
|
+
/** OpenAPI security scheme type */
|
|
215
|
+
readonly type: Schema.Literals<readonly ["http", "apiKey", "oauth2", "openIdConnect"]>;
|
|
216
|
+
/** For type: "http" — e.g. "bearer", "basic" */
|
|
217
|
+
readonly scheme: Schema.OptionFromOptional<Schema.String>;
|
|
218
|
+
/** For type: "http" with scheme "bearer" — e.g. "JWT" */
|
|
219
|
+
readonly bearerFormat: Schema.OptionFromOptional<Schema.String>;
|
|
220
|
+
/** For type: "apiKey" — where the key goes */
|
|
221
|
+
readonly in: Schema.OptionFromOptional<Schema.Literals<readonly ["header", "query", "cookie"]>>;
|
|
222
|
+
/** For type: "apiKey" — the header/query/cookie name */
|
|
223
|
+
readonly headerName: Schema.OptionFromOptional<Schema.String>;
|
|
224
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
225
|
+
/** For type: "oauth2" — declared flows (authorizationCode / clientCredentials only; implicit and password are deprecated). */
|
|
226
|
+
readonly flows: Schema.OptionFromOptional<Schema.Struct<{
|
|
227
|
+
readonly authorizationCode: Schema.OptionFromOptional<Schema.Struct<{
|
|
228
|
+
readonly authorizationUrl: Schema.String;
|
|
229
|
+
readonly tokenUrl: Schema.String;
|
|
230
|
+
readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
|
|
231
|
+
readonly scopes: Schema.$Record<Schema.String, Schema.String>;
|
|
232
|
+
}>>;
|
|
233
|
+
readonly clientCredentials: Schema.OptionFromOptional<Schema.Struct<{
|
|
234
|
+
readonly tokenUrl: Schema.String;
|
|
235
|
+
readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
|
|
236
|
+
readonly scopes: Schema.$Record<Schema.String, Schema.String>;
|
|
237
|
+
}>>;
|
|
238
|
+
}>>;
|
|
239
|
+
/** For type: "openIdConnect" — the discovery URL. */
|
|
240
|
+
readonly openIdConnectUrl: Schema.OptionFromOptional<Schema.String>;
|
|
241
|
+
}>>;
|
|
242
|
+
readonly authStrategies: Schema.$Array<Schema.Struct<{
|
|
243
|
+
/** The security schemes required together for this strategy */
|
|
244
|
+
readonly schemes: Schema.$Array<Schema.String>;
|
|
245
|
+
}>>;
|
|
246
|
+
readonly headerPresets: Schema.$Array<Schema.Struct<{
|
|
247
|
+
/** Human-readable label for the UI (e.g. "Bearer Token", "API Key + Email") */
|
|
248
|
+
readonly label: Schema.String;
|
|
249
|
+
/** Headers this strategy needs. Value is null when the user must provide it. */
|
|
250
|
+
readonly headers: Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>;
|
|
251
|
+
/** Which headers should be stored as secrets */
|
|
252
|
+
readonly secretHeaders: Schema.$Array<Schema.String>;
|
|
253
|
+
}>>;
|
|
254
|
+
readonly oauth2Presets: Schema.$Array<Schema.Struct<{
|
|
255
|
+
/** Human-readable label for the UI (e.g. "OAuth2 (Authorization Code) — oauth_app") */
|
|
256
|
+
readonly label: Schema.String;
|
|
257
|
+
/** The source security scheme this preset came from (components.securitySchemes key). */
|
|
258
|
+
readonly securitySchemeName: Schema.String;
|
|
259
|
+
/** Which OAuth2 flow this preset uses. */
|
|
260
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
261
|
+
/** For authorizationCode: user-agent redirect URL (from the spec). */
|
|
262
|
+
readonly authorizationUrl: Schema.OptionFromOptional<Schema.String>;
|
|
263
|
+
/** Token endpoint to exchange the code / refresh. */
|
|
264
|
+
readonly tokenUrl: Schema.String;
|
|
265
|
+
/** Optional refresh endpoint if the spec declares one separately. */
|
|
266
|
+
readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
|
|
267
|
+
/** Declared scopes for this flow: `{ scope: description }`. */
|
|
268
|
+
readonly scopes: Schema.$Record<Schema.String, Schema.String>;
|
|
269
|
+
/** Identity scopes to request alongside API scopes. `"auto"` discovers standard OIDC scopes. */
|
|
270
|
+
readonly identityScopes: Schema.Union<readonly [Schema.Literal<"auto">, Schema.Literal<false>, Schema.$Array<Schema.String>]>;
|
|
271
|
+
}>>;
|
|
272
|
+
}>;
|
|
273
|
+
export type SpecPreviewSummary = typeof SpecPreviewSummary.Type;
|
|
274
|
+
export declare const specPreviewSummary: (preview: SpecPreview) => SpecPreviewSummary;
|
|
196
275
|
/** Preview already-resolved spec text — extract metadata without registering
|
|
197
276
|
* anything and without any HTTP dependency. */
|
|
198
277
|
export declare const previewSpecText: (specText: string) => Effect.Effect<{
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -129,12 +129,6 @@ export declare const makeOpenApiHttpApiTestAddSpecPayload: (api: HttpApi.Any, op
|
|
|
129
129
|
} | {
|
|
130
130
|
readonly value: string;
|
|
131
131
|
readonly kind: "blob";
|
|
132
|
-
} | {
|
|
133
|
-
readonly kind: "googleDiscovery";
|
|
134
|
-
readonly url: string;
|
|
135
|
-
} | {
|
|
136
|
-
readonly kind: "googleDiscoveryBundle";
|
|
137
|
-
readonly urls: readonly string[];
|
|
138
132
|
};
|
|
139
133
|
slug: string;
|
|
140
134
|
baseUrl: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executor-js/plugin-openapi",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.16",
|
|
4
4
|
"homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/openapi",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/RhysSullivan/executor/issues"
|
|
@@ -53,15 +53,16 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@effect/platform-node": "4.0.0-beta.59",
|
|
56
|
-
"@executor-js/config": "1.5.
|
|
57
|
-
"@executor-js/sdk": "1.5.
|
|
56
|
+
"@executor-js/config": "1.5.16",
|
|
57
|
+
"@executor-js/sdk": "1.5.16",
|
|
58
|
+
"js-yaml": "4.1.1",
|
|
58
59
|
"lucide-react": "^1.7.0",
|
|
59
|
-
"openapi-types": "^12.1.3"
|
|
60
|
-
"yaml": "^2.7.1"
|
|
60
|
+
"openapi-types": "^12.1.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@effect/atom-react": "4.0.0-beta.59",
|
|
64
64
|
"@effect/vitest": "4.0.0-beta.59",
|
|
65
|
+
"@types/js-yaml": "4.0.9",
|
|
65
66
|
"@types/node": "^24.3.1",
|
|
66
67
|
"@types/react": "^19.1.0",
|
|
67
68
|
"bun-types": "^1.2.22",
|