@executor-js/plugin-openapi 0.0.1 → 0.1.0
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/README.md +24 -23
- package/dist/api/group.d.ts +94 -38
- package/dist/api/handlers.d.ts +2 -2
- package/dist/chunk-RBE3CVB4.js +2837 -0
- package/dist/chunk-RBE3CVB4.js.map +1 -0
- package/dist/core.js +44 -50
- package/dist/core.js.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/react/AddOpenApiSource.d.ts +13 -0
- package/dist/react/EditOpenApiSource.d.ts +2 -2
- package/dist/react/OpenApiSourceSummary.d.ts +3 -1
- package/dist/react/atoms.d.ts +129 -0
- package/dist/react/client.d.ts +88 -3
- package/dist/react/plugin-client.d.ts +2 -0
- package/dist/react/source-plugin.d.ts +1 -1
- package/dist/sdk/client-credentials-oauth.test.d.ts +1 -0
- package/dist/sdk/credential-status.d.ts +23 -0
- package/dist/sdk/credential-status.test.d.ts +1 -0
- package/dist/sdk/errors.d.ts +11 -10
- package/dist/sdk/form-urlencoded-body.test.d.ts +1 -0
- package/dist/sdk/index.d.ts +8 -10
- package/dist/sdk/invoke.d.ts +8 -17
- package/dist/sdk/multi-scope-bearer.test.d.ts +1 -0
- package/dist/sdk/multi-scope-oauth.test.d.ts +1 -0
- package/dist/sdk/non-json-body.test.d.ts +1 -0
- package/dist/sdk/oauth-refresh.test.d.ts +1 -0
- package/dist/sdk/openapi-utils.d.ts +35 -4
- package/dist/sdk/parse.d.ts +28 -4
- package/dist/sdk/plugin.d.ts +278 -23
- package/dist/sdk/preview-oauth2.test.d.ts +1 -0
- package/dist/sdk/preview.d.ts +86 -161
- package/dist/sdk/store.d.ts +201 -0
- package/dist/sdk/types.d.ts +234 -266
- package/dist/sdk/upstream-failures.test.d.ts +1 -0
- package/package.json +11 -22
- package/dist/chunk-KPGROAQO.js +0 -1279
- package/dist/chunk-KPGROAQO.js.map +0 -1
- package/dist/promise.d.ts +0 -6
- package/dist/sdk/config-file-store.d.ts +0 -10
- package/dist/sdk/kv-operation-store.d.ts +0 -4
- package/dist/sdk/operation-store.d.ts +0 -36
- package/dist/sdk/stored-source.d.ts +0 -51
|
@@ -13,12 +13,43 @@ export declare class DocResolver {
|
|
|
13
13
|
resolve<T>(value: T | OpenAPIV3.ReferenceObject | OpenAPIV3_1.ReferenceObject): T | null;
|
|
14
14
|
private resolvePointer;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/** Substitute `{var}` placeholders in a templated URL using a plain map. */
|
|
17
|
+
export declare const substituteUrlVariables: (url: string, values: Record<string, string>) => string;
|
|
18
|
+
type ServerLike = {
|
|
17
19
|
url: string;
|
|
18
|
-
variables: import("effect/Option").Option<Record<string,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
variables: import("effect/Option").Option<Record<string, {
|
|
21
|
+
default: string;
|
|
22
|
+
} | string>>;
|
|
23
|
+
};
|
|
24
|
+
export declare const resolveBaseUrl: (servers: readonly ServerLike[]) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Return all declared media entries in spec order. `Object.entries` on a
|
|
27
|
+
* plain object preserves insertion order in modern engines, which matches
|
|
28
|
+
* spec declaration order as the parser produced it.
|
|
29
|
+
*/
|
|
30
|
+
export declare const declaredContents: (content: Record<string, MediaTypeObject> | undefined) => ReadonlyArray<{
|
|
31
|
+
mediaType: string;
|
|
32
|
+
media: MediaTypeObject;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Pick the default media type for a requestBody or response. Matches
|
|
36
|
+
* swagger-client behaviour: **first declared wins** (not JSON-first). Spec
|
|
37
|
+
* authors order content entries to signal intent (upload-heavy endpoints
|
|
38
|
+
* declare multipart first, JSON second); respecting that order avoids
|
|
39
|
+
* silently downgrading a multipart endpoint to JSON.
|
|
40
|
+
*
|
|
41
|
+
* For response bodies we still want a JSON preference because the server
|
|
42
|
+
* picks the response content type, not the client — the old `application/
|
|
43
|
+
* json` preference is preserved via `preferredResponseContent` below.
|
|
44
|
+
*/
|
|
21
45
|
export declare const preferredContent: (content: Record<string, MediaTypeObject> | undefined) => {
|
|
22
46
|
mediaType: string;
|
|
23
47
|
media: MediaTypeObject;
|
|
24
48
|
} | undefined;
|
|
49
|
+
/** Response-side content picker — still JSON-first because the server
|
|
50
|
+
* picks the response media type, so we want to advertise a preference. */
|
|
51
|
+
export declare const preferredResponseContent: (content: Record<string, MediaTypeObject> | undefined) => {
|
|
52
|
+
mediaType: string;
|
|
53
|
+
media: MediaTypeObject;
|
|
54
|
+
} | undefined;
|
|
55
|
+
export {};
|
package/dist/sdk/parse.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
|
-
import {
|
|
3
|
+
import { HttpClient } from "effect/unstable/http";
|
|
4
|
+
import { OpenApiExtractionError, OpenApiParseError } from "./errors";
|
|
4
5
|
export type ParsedDocument = OpenAPIV3.Document | OpenAPIV3_1.Document;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export interface SpecFetchCredentials {
|
|
7
|
+
readonly headers?: Record<string, string>;
|
|
8
|
+
readonly queryParams?: Record<string, string>;
|
|
9
|
+
}
|
|
8
10
|
declare class OpenApiExtractionErrorFromParse extends OpenApiExtractionError {
|
|
9
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Fetch an OpenAPI spec URL and return its body text. Uses the Effect
|
|
14
|
+
* HttpClient so the caller chooses the transport via layer — in Cloudflare
|
|
15
|
+
* Workers, `FetchHttpClient.layer` binds to the Workers-native `fetch` and
|
|
16
|
+
* avoids json-schema-ref-parser's Node-polyfill http resolver, which hangs
|
|
17
|
+
* in production. Bounded by a 20s timeout.
|
|
18
|
+
*/
|
|
19
|
+
export declare const fetchSpecText: (url: string, credentials?: SpecFetchCredentials | undefined) => Effect.Effect<string, OpenApiParseError, HttpClient.HttpClient>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve an input string to spec text — if it's a URL, fetch it via
|
|
22
|
+
* HttpClient; otherwise return it as-is.
|
|
23
|
+
*/
|
|
24
|
+
export declare const resolveSpecText: (input: string, credentials?: SpecFetchCredentials) => Effect.Effect<string, OpenApiParseError, HttpClient.HttpClient>;
|
|
25
|
+
/**
|
|
26
|
+
* Parse an OpenAPI document from spec text and validate it's OpenAPI 3.x.
|
|
27
|
+
*
|
|
28
|
+
* NOTE: does NOT resolve `$ref`s. `DocResolver` + `normalizeOpenApiRefs`
|
|
29
|
+
* downstream work on refs lazily, so inlining them here would just waste
|
|
30
|
+
* memory — and for big specs (e.g. Cloudflare's API) that blows through
|
|
31
|
+
* the 128MB Cloudflare Workers memory cap.
|
|
32
|
+
*/
|
|
33
|
+
export declare const parse: (text: string) => Effect.Effect<ParsedDocument, OpenApiParseError | OpenApiExtractionErrorFromParse, never>;
|
|
10
34
|
export {};
|
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -1,40 +1,295 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
import { HttpClient } from "@effect/platform";
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
3
2
|
import type { Layer } from "effect";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
3
|
+
import { HttpClient } from "effect/unstable/http";
|
|
4
|
+
import { OpenApiExtensionService } from "../api/handlers";
|
|
5
|
+
import { type StorageFailure } from "@executor-js/sdk/core";
|
|
6
|
+
import { type ConfigFileSink } from "@executor-js/config";
|
|
7
|
+
import { OpenApiExtractionError, OpenApiOAuthError, OpenApiParseError } from "./errors";
|
|
6
8
|
import { SpecPreview } from "./preview";
|
|
7
|
-
import { type
|
|
8
|
-
|
|
9
|
+
import { type OpenapiStore, type SourceConfig, type StoredSource } from "./store";
|
|
10
|
+
import { HeaderValue as HeaderValueSchema, OAuth2Auth, OAuth2SourceConfig, OpenApiSourceBindingInput, type OpenApiSourceBindingRef, type ConfiguredHeaderValue as ConfiguredHeaderValueValue, type HeaderValue as HeaderValueValue } from "./types";
|
|
9
11
|
export type HeaderValue = HeaderValueValue;
|
|
12
|
+
export type ConfiguredHeaderValue = ConfiguredHeaderValueValue;
|
|
13
|
+
export type OpenApiHeaderInput = HeaderValue | ConfiguredHeaderValue;
|
|
14
|
+
export type OpenApiOAuthInput = OAuth2Auth | OAuth2SourceConfig;
|
|
15
|
+
export interface OpenApiSpecFetchCredentials {
|
|
16
|
+
readonly headers?: Record<string, HeaderValue>;
|
|
17
|
+
readonly queryParams?: Record<string, HeaderValue>;
|
|
18
|
+
}
|
|
19
|
+
export interface OpenApiPreviewInput {
|
|
20
|
+
readonly spec: string;
|
|
21
|
+
readonly specFetchCredentials?: OpenApiSpecFetchCredentials;
|
|
22
|
+
}
|
|
10
23
|
export interface OpenApiSpecConfig {
|
|
11
24
|
readonly spec: string;
|
|
25
|
+
readonly specFetchCredentials?: OpenApiSpecFetchCredentials;
|
|
26
|
+
/**
|
|
27
|
+
* Executor scope id that owns this source row. Must be one of the
|
|
28
|
+
* executor's configured scopes. Typical shape: an admin adds the
|
|
29
|
+
* source at the outermost (organization) scope so it's visible to
|
|
30
|
+
* every inner (per-user) scope via fall-through reads.
|
|
31
|
+
*/
|
|
32
|
+
readonly scope: string;
|
|
12
33
|
readonly name?: string;
|
|
13
34
|
readonly baseUrl?: string;
|
|
14
35
|
readonly namespace?: string;
|
|
15
|
-
|
|
16
|
-
readonly
|
|
36
|
+
readonly headers?: Record<string, OpenApiHeaderInput>;
|
|
37
|
+
readonly queryParams?: Record<string, HeaderValue>;
|
|
38
|
+
readonly oauth2?: OpenApiOAuthInput;
|
|
17
39
|
}
|
|
18
40
|
export interface OpenApiUpdateSourceInput {
|
|
19
41
|
readonly name?: string;
|
|
20
42
|
readonly baseUrl?: string;
|
|
21
|
-
readonly headers?: Record<string,
|
|
43
|
+
readonly headers?: Record<string, OpenApiHeaderInput>;
|
|
44
|
+
readonly queryParams?: Record<string, HeaderValue>;
|
|
45
|
+
/** Refresh the source's stored OAuth2 metadata after a successful
|
|
46
|
+
* re-authenticate. */
|
|
47
|
+
readonly oauth2?: OpenApiOAuthInput;
|
|
22
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Errors any OpenAPI extension method may surface. The first three are
|
|
51
|
+
* plugin-domain tagged errors that flow directly to clients (4xx, each
|
|
52
|
+
* carrying its own `HttpApiSchema` status). `StorageFailure` covers
|
|
53
|
+
* raw backend failures (`StorageError`) plus `UniqueViolationError`;
|
|
54
|
+
* the HTTP edge (`@executor-js/api`'s `withCapture`) translates
|
|
55
|
+
* `StorageError` to the opaque `InternalError({ traceId })` at Layer
|
|
56
|
+
* composition. `UniqueViolationError` passes through — plugins can
|
|
57
|
+
* `Effect.catchTag` it if they want a friendlier user-facing error.
|
|
58
|
+
*/
|
|
59
|
+
export type OpenApiExtensionFailure = OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError | StorageFailure;
|
|
23
60
|
export interface OpenApiPluginExtension {
|
|
24
|
-
|
|
25
|
-
readonly previewSpec: (specText: string) => Effect.Effect<SpecPreview, Error>;
|
|
26
|
-
/** Add an OpenAPI spec and register its operations as tools */
|
|
61
|
+
readonly previewSpec: (input: string | OpenApiPreviewInput) => Effect.Effect<SpecPreview, OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError | StorageFailure>;
|
|
27
62
|
readonly addSpec: (config: OpenApiSpecConfig) => Effect.Effect<{
|
|
63
|
+
readonly sourceId: string;
|
|
28
64
|
readonly toolCount: number;
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
readonly
|
|
34
|
-
|
|
35
|
-
readonly
|
|
65
|
+
}, OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError | StorageFailure>;
|
|
66
|
+
readonly removeSpec: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
67
|
+
readonly getSource: (namespace: string, scope: string) => Effect.Effect<StoredSource | null, StorageFailure>;
|
|
68
|
+
readonly updateSource: (namespace: string, scope: string, input: OpenApiUpdateSourceInput) => Effect.Effect<void, StorageFailure>;
|
|
69
|
+
readonly listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly OpenApiSourceBindingRef[], StorageFailure>;
|
|
70
|
+
readonly setSourceBinding: (input: OpenApiSourceBindingInput) => Effect.Effect<OpenApiSourceBindingRef, StorageFailure>;
|
|
71
|
+
readonly removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
72
|
+
}
|
|
73
|
+
export interface OpenApiPluginOptions {
|
|
74
|
+
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient, never, never>;
|
|
75
|
+
/** If provided, source add/remove is mirrored to executor.jsonc
|
|
76
|
+
* (best-effort — file errors are logged, not raised). */
|
|
77
|
+
readonly configFile?: ConfigFileSink;
|
|
36
78
|
}
|
|
37
|
-
export declare const openApiPlugin: (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
79
|
+
export declare const openApiPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"openapi", {
|
|
80
|
+
previewSpec: (input: string | OpenApiPreviewInput) => Effect.Effect<SpecPreview, StorageFailure | OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError, never>;
|
|
81
|
+
addSpec: (config: OpenApiSpecConfig) => Effect.Effect<{
|
|
82
|
+
sourceId: string;
|
|
83
|
+
toolCount: number;
|
|
84
|
+
}, StorageFailure | OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError, never>;
|
|
85
|
+
removeSpec: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
|
|
86
|
+
getSource: (namespace: string, scope: string) => Effect.Effect<{
|
|
87
|
+
config: SourceConfig;
|
|
88
|
+
namespace: string;
|
|
89
|
+
scope: string;
|
|
90
|
+
name: string;
|
|
91
|
+
legacy?: {
|
|
92
|
+
readonly headers?: Record<string, HeaderValueSchema>;
|
|
93
|
+
readonly oauth2?: OAuth2Auth;
|
|
94
|
+
};
|
|
95
|
+
} | null, StorageFailure, never>;
|
|
96
|
+
updateSource: (namespace: string, scope: string, input: OpenApiUpdateSourceInput) => Effect.Effect<void, StorageFailure, never>;
|
|
97
|
+
listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly OpenApiSourceBindingRef[], StorageFailure, never>;
|
|
98
|
+
setSourceBinding: (input: OpenApiSourceBindingInput) => Effect.Effect<OpenApiSourceBindingRef, StorageFailure, never>;
|
|
99
|
+
removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
|
|
100
|
+
}, OpenapiStore, OpenApiPluginOptions, {
|
|
101
|
+
readonly openapi_source: {
|
|
102
|
+
readonly fields: {
|
|
103
|
+
readonly id: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly required: true;
|
|
106
|
+
};
|
|
107
|
+
readonly scope_id: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
readonly required: true;
|
|
110
|
+
readonly index: true;
|
|
111
|
+
};
|
|
112
|
+
readonly name: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly required: true;
|
|
115
|
+
};
|
|
116
|
+
readonly spec: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
readonly required: true;
|
|
119
|
+
};
|
|
120
|
+
readonly source_url: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly required: false;
|
|
123
|
+
};
|
|
124
|
+
readonly base_url: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly required: false;
|
|
127
|
+
};
|
|
128
|
+
readonly headers: {
|
|
129
|
+
readonly type: "json";
|
|
130
|
+
readonly required: false;
|
|
131
|
+
};
|
|
132
|
+
readonly query_params: {
|
|
133
|
+
readonly type: "json";
|
|
134
|
+
readonly required: false;
|
|
135
|
+
};
|
|
136
|
+
readonly oauth2: {
|
|
137
|
+
readonly type: "json";
|
|
138
|
+
readonly required: false;
|
|
139
|
+
};
|
|
140
|
+
readonly invocation_config: {
|
|
141
|
+
readonly type: "json";
|
|
142
|
+
readonly required: true;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly openapi_operation: {
|
|
147
|
+
readonly fields: {
|
|
148
|
+
readonly id: {
|
|
149
|
+
readonly type: "string";
|
|
150
|
+
readonly required: true;
|
|
151
|
+
};
|
|
152
|
+
readonly scope_id: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly required: true;
|
|
155
|
+
readonly index: true;
|
|
156
|
+
};
|
|
157
|
+
readonly source_id: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly required: true;
|
|
160
|
+
readonly index: true;
|
|
161
|
+
};
|
|
162
|
+
readonly binding: {
|
|
163
|
+
readonly type: "json";
|
|
164
|
+
readonly required: true;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
readonly openapi_source_binding: {
|
|
169
|
+
readonly fields: {
|
|
170
|
+
readonly id: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly required: true;
|
|
173
|
+
};
|
|
174
|
+
readonly source_id: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly required: true;
|
|
177
|
+
readonly index: true;
|
|
178
|
+
};
|
|
179
|
+
readonly source_scope_id: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
readonly required: true;
|
|
182
|
+
readonly index: true;
|
|
183
|
+
};
|
|
184
|
+
readonly target_scope_id: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
readonly required: true;
|
|
187
|
+
readonly index: true;
|
|
188
|
+
};
|
|
189
|
+
readonly slot: {
|
|
190
|
+
readonly type: "string";
|
|
191
|
+
readonly required: true;
|
|
192
|
+
readonly index: true;
|
|
193
|
+
};
|
|
194
|
+
readonly value: {
|
|
195
|
+
readonly type: "json";
|
|
196
|
+
readonly required: true;
|
|
197
|
+
};
|
|
198
|
+
readonly created_at: {
|
|
199
|
+
readonly type: "date";
|
|
200
|
+
readonly required: true;
|
|
201
|
+
};
|
|
202
|
+
readonly updated_at: {
|
|
203
|
+
readonly type: "date";
|
|
204
|
+
readonly required: true;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
}, typeof OpenApiExtensionService, Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").ApiGroup<"executor", "openapi">, never, import("effect/unstable/http/HttpRouter").Request<"Requires", OpenApiExtensionService>>, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"openapi", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"previewSpec", "POST", "/scopes/:scopeId/openapi/preview", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
209
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
210
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
211
|
+
readonly spec: Schema.String;
|
|
212
|
+
readonly specFetchCredentials: Schema.optional<Schema.Struct<{
|
|
213
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
214
|
+
readonly secretId: Schema.String;
|
|
215
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
216
|
+
}>]>>>;
|
|
217
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
218
|
+
readonly secretId: Schema.String;
|
|
219
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
220
|
+
}>]>>>;
|
|
221
|
+
}>>;
|
|
222
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof SpecPreview>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addSpec", "POST", "/scopes/:scopeId/openapi/specs", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
223
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
224
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
225
|
+
readonly spec: Schema.String;
|
|
226
|
+
readonly specFetchCredentials: Schema.optional<Schema.Struct<{
|
|
227
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
228
|
+
readonly secretId: Schema.String;
|
|
229
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
230
|
+
}>]>>>;
|
|
231
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
232
|
+
readonly secretId: Schema.String;
|
|
233
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
234
|
+
}>]>>>;
|
|
235
|
+
}>>;
|
|
236
|
+
readonly name: Schema.optional<Schema.String>;
|
|
237
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
238
|
+
readonly namespace: Schema.optional<Schema.String>;
|
|
239
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
240
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
241
|
+
readonly secretId: Schema.String;
|
|
242
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
243
|
+
}>]>>>;
|
|
244
|
+
readonly oauth2: Schema.optional<Schema.Union<readonly [typeof OAuth2Auth, typeof OAuth2SourceConfig]>>;
|
|
245
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
246
|
+
readonly toolCount: Schema.Number;
|
|
247
|
+
readonly namespace: Schema.String;
|
|
248
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/openapi/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
249
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
250
|
+
namespace: Schema.String;
|
|
251
|
+
}>>, 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<Schema.NullOr<typeof import("./store").StoredSourceSchema>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/openapi/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
252
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
253
|
+
namespace: Schema.String;
|
|
254
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
255
|
+
readonly name: Schema.optional<Schema.String>;
|
|
256
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
257
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
258
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
259
|
+
readonly secretId: Schema.String;
|
|
260
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
261
|
+
}>]>>>;
|
|
262
|
+
readonly oauth2: Schema.optional<Schema.Union<readonly [typeof OAuth2Auth, typeof OAuth2SourceConfig]>>;
|
|
263
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
264
|
+
readonly updated: Schema.Boolean;
|
|
265
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listSourceBindings", "GET", "/scopes/:scopeId/openapi/sources/:namespace/base/:sourceScopeId/bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
266
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
267
|
+
namespace: Schema.String;
|
|
268
|
+
sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
269
|
+
}>>, 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<Schema.$Array<typeof OpenApiSourceBindingRef>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/openapi/source-bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
270
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
271
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
272
|
+
readonly sourceId: Schema.String;
|
|
273
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
274
|
+
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
275
|
+
readonly slot: Schema.String;
|
|
276
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
277
|
+
readonly kind: Schema.Literal<"secret">;
|
|
278
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
279
|
+
}>, Schema.Struct<{
|
|
280
|
+
readonly kind: Schema.Literal<"connection">;
|
|
281
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
282
|
+
}>, Schema.Struct<{
|
|
283
|
+
readonly kind: Schema.Literal<"text">;
|
|
284
|
+
readonly text: Schema.String;
|
|
285
|
+
}>]>;
|
|
286
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof OpenApiSourceBindingRef>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/openapi/source-bindings/remove", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<Schema.Struct<{
|
|
287
|
+
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
288
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
289
|
+
readonly sourceId: Schema.String;
|
|
290
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
291
|
+
readonly slot: Schema.String;
|
|
292
|
+
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
293
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
294
|
+
readonly removed: Schema.Boolean;
|
|
295
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never>, false>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|