@executor-js/plugin-openapi 0.1.0 → 1.4.20

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.
Files changed (41) hide show
  1. package/dist/AddOpenApiSource-FLMNI742.js +19 -0
  2. package/dist/AddOpenApiSource-FLMNI742.js.map +1 -0
  3. package/dist/EditOpenApiSource-I4NIGIIJ.js +665 -0
  4. package/dist/EditOpenApiSource-I4NIGIIJ.js.map +1 -0
  5. package/dist/OpenApiSourceSummary-CM46DB4L.js +122 -0
  6. package/dist/OpenApiSourceSummary-CM46DB4L.js.map +1 -0
  7. package/dist/api/group.d.ts +224 -16
  8. package/dist/api/index.d.ts +634 -0
  9. package/dist/chunk-E7PZ2QGD.js +1303 -0
  10. package/dist/chunk-E7PZ2QGD.js.map +1 -0
  11. package/dist/chunk-GFQUEZUW.js +216 -0
  12. package/dist/chunk-GFQUEZUW.js.map +1 -0
  13. package/dist/chunk-OZ67JNID.js +1447 -0
  14. package/dist/chunk-OZ67JNID.js.map +1 -0
  15. package/dist/chunk-TGDT6QCH.js +1120 -0
  16. package/dist/chunk-TGDT6QCH.js.map +1 -0
  17. package/dist/client.js +165 -0
  18. package/dist/client.js.map +1 -0
  19. package/dist/core.js +8 -10
  20. package/dist/index.js +2 -1
  21. package/dist/react/AddOpenApiSource.d.ts +1 -1
  22. package/dist/react/OpenApiSourceDetailsFields.d.ts +18 -0
  23. package/dist/react/atoms.d.ts +320 -15
  24. package/dist/react/client.d.ts +226 -15
  25. package/dist/sdk/extract.d.ts +54 -3
  26. package/dist/sdk/index.d.ts +1 -1
  27. package/dist/sdk/invoke.d.ts +48 -4
  28. package/dist/sdk/openapi-utils.d.ts +4 -3
  29. package/dist/sdk/parse.d.ts +1 -1
  30. package/dist/sdk/parse.test.d.ts +1 -0
  31. package/dist/sdk/plugin.d.ts +247 -128
  32. package/dist/sdk/preview.d.ts +201 -49
  33. package/dist/sdk/store.d.ts +155 -45
  34. package/dist/sdk/types.d.ts +204 -137
  35. package/dist/sdk/usage-scope-isolation.test.d.ts +1 -0
  36. package/dist/testing/index.d.ts +34 -0
  37. package/dist/testing.js +56 -0
  38. package/dist/testing.js.map +1 -0
  39. package/package.json +16 -4
  40. package/dist/chunk-RBE3CVB4.js +0 -2837
  41. package/dist/chunk-RBE3CVB4.js.map +0 -1
@@ -1,28 +1,33 @@
1
- import { Effect } from "effect";
1
+ import { Effect, Option } from "effect";
2
2
  import { Schema } from "effect";
3
- import { ServerInfo } from "./types";
4
- declare const OAuth2AuthorizationCodeFlow_base: Schema.Class<OAuth2AuthorizationCodeFlow, Schema.Struct<{
3
+ export declare const OAuth2AuthorizationCodeFlow: Schema.Struct<{
5
4
  readonly authorizationUrl: Schema.String;
6
5
  readonly tokenUrl: Schema.String;
7
6
  readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
8
7
  readonly scopes: Schema.$Record<Schema.String, Schema.String>;
9
- }>, {}>;
10
- export declare class OAuth2AuthorizationCodeFlow extends OAuth2AuthorizationCodeFlow_base {
11
- }
12
- declare const OAuth2ClientCredentialsFlow_base: Schema.Class<OAuth2ClientCredentialsFlow, Schema.Struct<{
8
+ }>;
9
+ export type OAuth2AuthorizationCodeFlow = typeof OAuth2AuthorizationCodeFlow.Type;
10
+ export declare const OAuth2ClientCredentialsFlow: Schema.Struct<{
13
11
  readonly tokenUrl: Schema.String;
14
12
  readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
15
13
  readonly scopes: Schema.$Record<Schema.String, Schema.String>;
16
- }>, {}>;
17
- export declare class OAuth2ClientCredentialsFlow extends OAuth2ClientCredentialsFlow_base {
18
- }
19
- declare const OAuth2Flows_base: Schema.Class<OAuth2Flows, Schema.Struct<{
20
- readonly authorizationCode: Schema.OptionFromOptional<typeof OAuth2AuthorizationCodeFlow>;
21
- readonly clientCredentials: Schema.OptionFromOptional<typeof OAuth2ClientCredentialsFlow>;
22
- }>, {}>;
23
- export declare class OAuth2Flows extends OAuth2Flows_base {
24
- }
25
- declare const SecurityScheme_base: Schema.Class<SecurityScheme, Schema.Struct<{
14
+ }>;
15
+ export type OAuth2ClientCredentialsFlow = typeof OAuth2ClientCredentialsFlow.Type;
16
+ export declare const OAuth2Flows: Schema.Struct<{
17
+ readonly authorizationCode: Schema.OptionFromOptional<Schema.Struct<{
18
+ readonly authorizationUrl: Schema.String;
19
+ readonly tokenUrl: Schema.String;
20
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
21
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
22
+ }>>;
23
+ readonly clientCredentials: Schema.OptionFromOptional<Schema.Struct<{
24
+ readonly tokenUrl: Schema.String;
25
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
26
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
27
+ }>>;
28
+ }>;
29
+ export type OAuth2Flows = typeof OAuth2Flows.Type;
30
+ export declare const SecurityScheme: Schema.Struct<{
26
31
  /** Key name in components.securitySchemes (e.g. "api_token") */
27
32
  readonly name: Schema.String;
28
33
  /** OpenAPI security scheme type */
@@ -37,29 +42,38 @@ declare const SecurityScheme_base: Schema.Class<SecurityScheme, Schema.Struct<{
37
42
  readonly headerName: Schema.OptionFromOptional<Schema.String>;
38
43
  readonly description: Schema.OptionFromOptional<Schema.String>;
39
44
  /** For type: "oauth2" — declared flows (authorizationCode / clientCredentials only; implicit and password are deprecated). */
40
- readonly flows: Schema.OptionFromOptional<typeof OAuth2Flows>;
45
+ readonly flows: Schema.OptionFromOptional<Schema.Struct<{
46
+ readonly authorizationCode: Schema.OptionFromOptional<Schema.Struct<{
47
+ readonly authorizationUrl: Schema.String;
48
+ readonly tokenUrl: Schema.String;
49
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
50
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
51
+ }>>;
52
+ readonly clientCredentials: Schema.OptionFromOptional<Schema.Struct<{
53
+ readonly tokenUrl: Schema.String;
54
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
55
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
56
+ }>>;
57
+ }>>;
41
58
  /** For type: "openIdConnect" — the discovery URL. */
42
59
  readonly openIdConnectUrl: Schema.OptionFromOptional<Schema.String>;
43
- }>, {}>;
44
- export declare class SecurityScheme extends SecurityScheme_base {
45
- }
46
- declare const AuthStrategy_base: Schema.Class<AuthStrategy, Schema.Struct<{
60
+ }>;
61
+ export type SecurityScheme = typeof SecurityScheme.Type;
62
+ export declare const AuthStrategy: Schema.Struct<{
47
63
  /** The security schemes required together for this strategy */
48
64
  readonly schemes: Schema.$Array<Schema.String>;
49
- }>, {}>;
50
- export declare class AuthStrategy extends AuthStrategy_base {
51
- }
52
- declare const HeaderPreset_base: Schema.Class<HeaderPreset, Schema.Struct<{
65
+ }>;
66
+ export type AuthStrategy = typeof AuthStrategy.Type;
67
+ export declare const HeaderPreset: Schema.Struct<{
53
68
  /** Human-readable label for the UI (e.g. "Bearer Token", "API Key + Email") */
54
69
  readonly label: Schema.String;
55
70
  /** Headers this strategy needs. Value is null when the user must provide it. */
56
71
  readonly headers: Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>;
57
72
  /** Which headers should be stored as secrets */
58
73
  readonly secretHeaders: Schema.$Array<Schema.String>;
59
- }>, {}>;
60
- export declare class HeaderPreset extends HeaderPreset_base {
61
- }
62
- declare const OAuth2Preset_base: Schema.Class<OAuth2Preset, Schema.Struct<{
74
+ }>;
75
+ export type HeaderPreset = typeof HeaderPreset.Type;
76
+ export declare const OAuth2Preset: Schema.Struct<{
63
77
  /** Human-readable label for the UI (e.g. "OAuth2 (Authorization Code) — oauth_app") */
64
78
  readonly label: Schema.String;
65
79
  /** The source security scheme this preset came from (components.securitySchemes key). */
@@ -74,39 +88,177 @@ declare const OAuth2Preset_base: Schema.Class<OAuth2Preset, Schema.Struct<{
74
88
  readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
75
89
  /** Declared scopes for this flow: `{ scope: description }`. */
76
90
  readonly scopes: Schema.$Record<Schema.String, Schema.String>;
77
- }>, {}>;
78
- export declare class OAuth2Preset extends OAuth2Preset_base {
79
- }
80
- declare const PreviewOperation_base: Schema.Class<PreviewOperation, Schema.Struct<{
91
+ }>;
92
+ export type OAuth2Preset = typeof OAuth2Preset.Type;
93
+ export declare const PreviewOperation: Schema.Struct<{
81
94
  readonly operationId: Schema.String;
82
95
  readonly method: Schema.Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
83
96
  readonly path: Schema.String;
84
97
  readonly summary: Schema.OptionFromOptional<Schema.String>;
85
98
  readonly tags: Schema.$Array<Schema.String>;
86
99
  readonly deprecated: Schema.Boolean;
87
- }>, {}>;
88
- export declare class PreviewOperation extends PreviewOperation_base {
89
- }
90
- declare const SpecPreview_base: Schema.Class<SpecPreview, Schema.Struct<{
100
+ }>;
101
+ export type PreviewOperation = typeof PreviewOperation.Type;
102
+ export declare const SpecPreview: Schema.Struct<{
91
103
  readonly title: Schema.OptionFromOptional<Schema.String>;
92
104
  readonly version: Schema.OptionFromOptional<Schema.String>;
93
105
  /** Reuses ServerInfo from extraction */
94
- readonly servers: Schema.$Array<typeof ServerInfo>;
106
+ readonly servers: Schema.$Array<Schema.Struct<{
107
+ readonly url: Schema.String;
108
+ readonly description: Schema.OptionFromOptional<Schema.String>;
109
+ readonly variables: Schema.OptionFromOptional<Schema.$Record<Schema.String, Schema.Struct<{
110
+ readonly default: Schema.String;
111
+ readonly enum: Schema.OptionFromOptional<Schema.$Array<Schema.String>>;
112
+ readonly description: Schema.OptionFromOptional<Schema.String>;
113
+ }>>>;
114
+ }>>;
95
115
  readonly operationCount: Schema.Number;
96
116
  /** Lightweight operation list for the add-source UI */
97
- readonly operations: Schema.$Array<typeof PreviewOperation>;
117
+ readonly operations: Schema.$Array<Schema.Struct<{
118
+ readonly operationId: Schema.String;
119
+ readonly method: Schema.Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
120
+ readonly path: Schema.String;
121
+ readonly summary: Schema.OptionFromOptional<Schema.String>;
122
+ readonly tags: Schema.$Array<Schema.String>;
123
+ readonly deprecated: Schema.Boolean;
124
+ }>>;
98
125
  readonly tags: Schema.$Array<Schema.String>;
99
- readonly securitySchemes: Schema.$Array<typeof SecurityScheme>;
126
+ readonly securitySchemes: Schema.$Array<Schema.Struct<{
127
+ /** Key name in components.securitySchemes (e.g. "api_token") */
128
+ readonly name: Schema.String;
129
+ /** OpenAPI security scheme type */
130
+ readonly type: Schema.Literals<readonly ["http", "apiKey", "oauth2", "openIdConnect"]>;
131
+ /** For type: "http" — e.g. "bearer", "basic" */
132
+ readonly scheme: Schema.OptionFromOptional<Schema.String>;
133
+ /** For type: "http" with scheme "bearer" — e.g. "JWT" */
134
+ readonly bearerFormat: Schema.OptionFromOptional<Schema.String>;
135
+ /** For type: "apiKey" — where the key goes */
136
+ readonly in: Schema.OptionFromOptional<Schema.Literals<readonly ["header", "query", "cookie"]>>;
137
+ /** For type: "apiKey" — the header/query/cookie name */
138
+ readonly headerName: Schema.OptionFromOptional<Schema.String>;
139
+ readonly description: Schema.OptionFromOptional<Schema.String>;
140
+ /** For type: "oauth2" — declared flows (authorizationCode / clientCredentials only; implicit and password are deprecated). */
141
+ readonly flows: Schema.OptionFromOptional<Schema.Struct<{
142
+ readonly authorizationCode: Schema.OptionFromOptional<Schema.Struct<{
143
+ readonly authorizationUrl: Schema.String;
144
+ readonly tokenUrl: Schema.String;
145
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
146
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
147
+ }>>;
148
+ readonly clientCredentials: Schema.OptionFromOptional<Schema.Struct<{
149
+ readonly tokenUrl: Schema.String;
150
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
151
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
152
+ }>>;
153
+ }>>;
154
+ /** For type: "openIdConnect" — the discovery URL. */
155
+ readonly openIdConnectUrl: Schema.OptionFromOptional<Schema.String>;
156
+ }>>;
100
157
  /** Valid auth strategies (each is a set of schemes used together) */
101
- readonly authStrategies: Schema.$Array<typeof AuthStrategy>;
158
+ readonly authStrategies: Schema.$Array<Schema.Struct<{
159
+ /** The security schemes required together for this strategy */
160
+ readonly schemes: Schema.$Array<Schema.String>;
161
+ }>>;
102
162
  /** Pre-built header presets derived from auth strategies */
103
- readonly headerPresets: Schema.$Array<typeof HeaderPreset>;
163
+ readonly headerPresets: Schema.$Array<Schema.Struct<{
164
+ /** Human-readable label for the UI (e.g. "Bearer Token", "API Key + Email") */
165
+ readonly label: Schema.String;
166
+ /** Headers this strategy needs. Value is null when the user must provide it. */
167
+ readonly headers: Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>;
168
+ /** Which headers should be stored as secrets */
169
+ readonly secretHeaders: Schema.$Array<Schema.String>;
170
+ }>>;
104
171
  /** OAuth2 presets — one per (oauth2 scheme × supported flow) combination */
105
- readonly oauth2Presets: Schema.$Array<typeof OAuth2Preset>;
106
- }>, {}>;
107
- export declare class SpecPreview extends SpecPreview_base {
108
- }
172
+ readonly oauth2Presets: Schema.$Array<Schema.Struct<{
173
+ /** Human-readable label for the UI (e.g. "OAuth2 (Authorization Code) — oauth_app") */
174
+ readonly label: Schema.String;
175
+ /** The source security scheme this preset came from (components.securitySchemes key). */
176
+ readonly securitySchemeName: Schema.String;
177
+ /** Which OAuth2 flow this preset uses. */
178
+ readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
179
+ /** For authorizationCode: user-agent redirect URL (from the spec). */
180
+ readonly authorizationUrl: Schema.OptionFromOptional<Schema.String>;
181
+ /** Token endpoint to exchange the code / refresh. */
182
+ readonly tokenUrl: Schema.String;
183
+ /** Optional refresh endpoint if the spec declares one separately. */
184
+ readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
185
+ /** Declared scopes for this flow: `{ scope: description }`. */
186
+ readonly scopes: Schema.$Record<Schema.String, Schema.String>;
187
+ }>>;
188
+ }>;
189
+ export type SpecPreview = typeof SpecPreview.Type;
109
190
  /** Preview an OpenAPI spec — extract metadata without registering anything.
110
191
  * Accepts either a URL or raw JSON/YAML text. */
111
- export declare const previewSpec: (input: string) => Effect.Effect<SpecPreview, import("./errors").OpenApiParseError | import("./errors").OpenApiExtractionError, import("effect/unstable/http/HttpClient").HttpClient>;
112
- export {};
192
+ export declare const previewSpec: (input: string) => Effect.Effect<{
193
+ readonly title: Option.Option<string>;
194
+ readonly servers: readonly {
195
+ readonly url: string;
196
+ readonly description: Option.Option<string>;
197
+ readonly variables: Option.Option<{
198
+ readonly [x: string]: {
199
+ readonly description: Option.Option<string>;
200
+ readonly default: string;
201
+ readonly enum: Option.Option<readonly string[]>;
202
+ };
203
+ }>;
204
+ }[];
205
+ readonly tags: readonly string[];
206
+ readonly version: Option.Option<string>;
207
+ readonly securitySchemes: readonly {
208
+ readonly type: "oauth2" | "http" | "apiKey" | "openIdConnect";
209
+ readonly in: Option.Option<"query" | "header" | "cookie">;
210
+ readonly name: string;
211
+ readonly description: Option.Option<string>;
212
+ readonly scheme: Option.Option<string>;
213
+ readonly bearerFormat: Option.Option<string>;
214
+ readonly headerName: Option.Option<string>;
215
+ readonly flows: Option.Option<{
216
+ readonly authorizationCode: Option.Option<{
217
+ readonly scopes: {
218
+ readonly [x: string]: string;
219
+ };
220
+ readonly authorizationUrl: string;
221
+ readonly tokenUrl: string;
222
+ readonly refreshUrl: Option.Option<string>;
223
+ }>;
224
+ readonly clientCredentials: Option.Option<{
225
+ readonly scopes: {
226
+ readonly [x: string]: string;
227
+ };
228
+ readonly tokenUrl: string;
229
+ readonly refreshUrl: Option.Option<string>;
230
+ }>;
231
+ }>;
232
+ readonly openIdConnectUrl: Option.Option<string>;
233
+ }[];
234
+ readonly operations: readonly {
235
+ readonly method: "delete" | "options" | "get" | "put" | "post" | "head" | "patch" | "trace";
236
+ readonly tags: readonly string[];
237
+ readonly summary: Option.Option<string>;
238
+ readonly operationId: string;
239
+ readonly deprecated: boolean;
240
+ readonly path: string;
241
+ }[];
242
+ readonly authStrategies: readonly {
243
+ readonly schemes: readonly string[];
244
+ }[];
245
+ readonly headerPresets: readonly {
246
+ readonly headers: {
247
+ readonly [x: string]: string | null;
248
+ };
249
+ readonly secretHeaders: readonly string[];
250
+ readonly label: string;
251
+ }[];
252
+ readonly oauth2Presets: readonly {
253
+ readonly scopes: {
254
+ readonly [x: string]: string;
255
+ };
256
+ readonly authorizationUrl: Option.Option<string>;
257
+ readonly securitySchemeName: string;
258
+ readonly flow: "authorizationCode" | "clientCredentials";
259
+ readonly tokenUrl: string;
260
+ readonly refreshUrl: Option.Option<string>;
261
+ readonly label: string;
262
+ }[];
263
+ readonly operationCount: number;
264
+ }, import("./errors").OpenApiParseError | import("./errors").OpenApiExtractionError, import("effect/unstable/http/HttpClient").HttpClient>;
@@ -1,6 +1,6 @@
1
1
  import { Effect, Schema } from "effect";
2
2
  import { type StorageDeps, type StorageFailure } from "@executor-js/sdk/core";
3
- import { ConfiguredHeaderValue, ConfiguredHeaderBinding, HeaderValue, OAuth2Auth, OAuth2SourceConfig, OpenApiSourceBindingInput, OpenApiSourceBindingRef, OperationBinding } from "./types";
3
+ import { ConfiguredHeaderValue, OAuth2SourceConfig, OperationBinding } from "./types";
4
4
  export declare const openapiSchema: {
5
5
  readonly openapi_source: {
6
6
  readonly fields: {
@@ -29,25 +29,35 @@ export declare const openapiSchema: {
29
29
  readonly type: "string";
30
30
  readonly required: false;
31
31
  };
32
- readonly headers: {
32
+ readonly oauth2: {
33
33
  readonly type: "json";
34
34
  readonly required: false;
35
35
  };
36
- readonly query_params: {
37
- readonly type: "json";
38
- readonly required: false;
36
+ };
37
+ };
38
+ readonly openapi_operation: {
39
+ readonly fields: {
40
+ readonly id: {
41
+ readonly type: "string";
42
+ readonly required: true;
39
43
  };
40
- readonly oauth2: {
41
- readonly type: "json";
42
- readonly required: false;
44
+ readonly scope_id: {
45
+ readonly type: "string";
46
+ readonly required: true;
47
+ readonly index: true;
48
+ };
49
+ readonly source_id: {
50
+ readonly type: "string";
51
+ readonly required: true;
52
+ readonly index: true;
43
53
  };
44
- readonly invocation_config: {
54
+ readonly binding: {
45
55
  readonly type: "json";
46
56
  readonly required: true;
47
57
  };
48
58
  };
49
59
  };
50
- readonly openapi_operation: {
60
+ readonly openapi_source_header: {
51
61
  readonly fields: {
52
62
  readonly id: {
53
63
  readonly type: "string";
@@ -63,50 +73,140 @@ export declare const openapiSchema: {
63
73
  readonly required: true;
64
74
  readonly index: true;
65
75
  };
66
- readonly binding: {
67
- readonly type: "json";
76
+ readonly name: {
77
+ readonly type: "string";
68
78
  readonly required: true;
69
79
  };
80
+ readonly kind: {
81
+ readonly type: ["text", "binding"];
82
+ readonly required: true;
83
+ };
84
+ readonly text_value: {
85
+ readonly type: "string";
86
+ readonly required: false;
87
+ };
88
+ readonly slot_key: {
89
+ readonly type: "string";
90
+ readonly required: false;
91
+ };
92
+ readonly prefix: {
93
+ readonly type: "string";
94
+ readonly required: false;
95
+ };
70
96
  };
71
97
  };
72
- readonly openapi_source_binding: {
98
+ readonly openapi_source_query_param: {
73
99
  readonly fields: {
74
100
  readonly id: {
75
101
  readonly type: "string";
76
102
  readonly required: true;
77
103
  };
104
+ readonly scope_id: {
105
+ readonly type: "string";
106
+ readonly required: true;
107
+ readonly index: true;
108
+ };
78
109
  readonly source_id: {
79
110
  readonly type: "string";
80
111
  readonly required: true;
81
112
  readonly index: true;
82
113
  };
83
- readonly source_scope_id: {
114
+ readonly name: {
115
+ readonly type: "string";
116
+ readonly required: true;
117
+ };
118
+ readonly kind: {
119
+ readonly type: ["text", "binding"];
120
+ readonly required: true;
121
+ };
122
+ readonly text_value: {
123
+ readonly type: "string";
124
+ readonly required: false;
125
+ };
126
+ readonly slot_key: {
127
+ readonly type: "string";
128
+ readonly required: false;
129
+ };
130
+ readonly prefix: {
131
+ readonly type: "string";
132
+ readonly required: false;
133
+ };
134
+ };
135
+ };
136
+ readonly openapi_source_spec_fetch_header: {
137
+ readonly fields: {
138
+ readonly id: {
139
+ readonly type: "string";
140
+ readonly required: true;
141
+ };
142
+ readonly scope_id: {
84
143
  readonly type: "string";
85
144
  readonly required: true;
86
145
  readonly index: true;
87
146
  };
88
- readonly target_scope_id: {
147
+ readonly source_id: {
89
148
  readonly type: "string";
90
149
  readonly required: true;
91
150
  readonly index: true;
92
151
  };
93
- readonly slot: {
152
+ readonly name: {
153
+ readonly type: "string";
154
+ readonly required: true;
155
+ };
156
+ readonly kind: {
157
+ readonly type: ["text", "binding"];
158
+ readonly required: true;
159
+ };
160
+ readonly text_value: {
161
+ readonly type: "string";
162
+ readonly required: false;
163
+ };
164
+ readonly slot_key: {
165
+ readonly type: "string";
166
+ readonly required: false;
167
+ };
168
+ readonly prefix: {
169
+ readonly type: "string";
170
+ readonly required: false;
171
+ };
172
+ };
173
+ };
174
+ readonly openapi_source_spec_fetch_query_param: {
175
+ readonly fields: {
176
+ readonly id: {
177
+ readonly type: "string";
178
+ readonly required: true;
179
+ };
180
+ readonly scope_id: {
94
181
  readonly type: "string";
95
182
  readonly required: true;
96
183
  readonly index: true;
97
184
  };
98
- readonly value: {
99
- readonly type: "json";
185
+ readonly source_id: {
186
+ readonly type: "string";
100
187
  readonly required: true;
188
+ readonly index: true;
101
189
  };
102
- readonly created_at: {
103
- readonly type: "date";
190
+ readonly name: {
191
+ readonly type: "string";
104
192
  readonly required: true;
105
193
  };
106
- readonly updated_at: {
107
- readonly type: "date";
194
+ readonly kind: {
195
+ readonly type: ["text", "binding"];
108
196
  readonly required: true;
109
197
  };
198
+ readonly text_value: {
199
+ readonly type: "string";
200
+ readonly required: false;
201
+ };
202
+ readonly slot_key: {
203
+ readonly type: "string";
204
+ readonly required: false;
205
+ };
206
+ readonly prefix: {
207
+ readonly type: "string";
208
+ readonly required: false;
209
+ };
110
210
  };
111
211
  };
112
212
  };
@@ -119,13 +219,13 @@ export interface SourceConfig {
119
219
  readonly baseUrl?: string;
120
220
  readonly namespace?: string;
121
221
  readonly headers?: Record<string, ConfiguredHeaderValue>;
122
- readonly queryParams?: Record<string, HeaderValue>;
222
+ readonly queryParams?: Record<string, ConfiguredHeaderValue>;
123
223
  readonly specFetchCredentials?: OpenApiSpecFetchCredentials;
124
224
  readonly oauth2?: OAuth2SourceConfig;
125
225
  }
126
226
  export interface OpenApiSpecFetchCredentials {
127
- readonly headers?: Record<string, HeaderValue>;
128
- readonly queryParams?: Record<string, HeaderValue>;
227
+ readonly headers?: Record<string, ConfiguredHeaderValue>;
228
+ readonly queryParams?: Record<string, ConfiguredHeaderValue>;
129
229
  }
130
230
  export interface StoredSource {
131
231
  readonly namespace: string;
@@ -135,39 +235,53 @@ export interface StoredSource {
135
235
  readonly scope: string;
136
236
  readonly name: string;
137
237
  readonly config: SourceConfig;
138
- readonly legacy?: {
139
- readonly headers?: Record<string, HeaderValue>;
140
- readonly oauth2?: OAuth2Auth;
141
- };
142
238
  }
143
- declare const StoredSourceSchema_base: Schema.Class<StoredSourceSchema, Schema.Struct<{
239
+ export declare const StoredSourceSchema: Schema.Struct<{
144
240
  readonly namespace: Schema.String;
241
+ readonly scope: Schema.String;
145
242
  readonly name: Schema.String;
146
243
  readonly config: Schema.Struct<{
147
244
  readonly spec: Schema.String;
148
245
  readonly sourceUrl: Schema.optional<Schema.String>;
149
246
  readonly baseUrl: Schema.optional<Schema.String>;
150
247
  readonly namespace: Schema.optional<Schema.String>;
151
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, typeof ConfiguredHeaderBinding]>>>;
248
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
249
+ readonly kind: Schema.Literal<"binding">;
250
+ readonly slot: Schema.String;
251
+ readonly prefix: Schema.optional<Schema.String>;
252
+ }>]>>>;
152
253
  readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
153
- readonly secretId: Schema.String;
254
+ readonly kind: Schema.Literal<"binding">;
255
+ readonly slot: Schema.String;
154
256
  readonly prefix: Schema.optional<Schema.String>;
155
257
  }>]>>>;
156
258
  readonly specFetchCredentials: Schema.optional<Schema.Struct<{
157
259
  readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
158
- readonly secretId: Schema.String;
260
+ readonly kind: Schema.Literal<"binding">;
261
+ readonly slot: Schema.String;
159
262
  readonly prefix: Schema.optional<Schema.String>;
160
263
  }>]>>>;
161
264
  readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
162
- readonly secretId: Schema.String;
265
+ readonly kind: Schema.Literal<"binding">;
266
+ readonly slot: Schema.String;
163
267
  readonly prefix: Schema.optional<Schema.String>;
164
268
  }>]>>>;
165
269
  }>>;
166
- readonly oauth2: Schema.optional<typeof OAuth2SourceConfig>;
270
+ readonly oauth2: Schema.optional<Schema.Struct<{
271
+ readonly kind: Schema.Literal<"oauth2">;
272
+ readonly securitySchemeName: Schema.String;
273
+ readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
274
+ readonly tokenUrl: Schema.String;
275
+ readonly authorizationUrl: Schema.NullOr<Schema.String>;
276
+ readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
277
+ readonly clientIdSlot: Schema.String;
278
+ readonly clientSecretSlot: Schema.NullOr<Schema.String>;
279
+ readonly connectionSlot: Schema.String;
280
+ readonly scopes: Schema.$Array<Schema.String>;
281
+ }>>;
167
282
  }>;
168
- }>, {}>;
169
- export declare class StoredSourceSchema extends StoredSourceSchema_base {
170
- }
283
+ }>;
284
+ export type StoredSourceSchema = typeof StoredSourceSchema.Type;
171
285
  export type StoredSourceSchemaType = typeof StoredSourceSchema.Type;
172
286
  export interface StoredOperation {
173
287
  readonly toolId: string;
@@ -175,6 +289,7 @@ export interface StoredOperation {
175
289
  readonly binding: OperationBinding;
176
290
  }
177
291
  export declare const headerBindingSlot: (headerName: string) => string;
292
+ export declare const queryParamBindingSlot: (name: string) => string;
178
293
  export declare const oauth2ClientIdSlot: (securitySchemeName: string) => string;
179
294
  export declare const oauth2ClientSecretSlot: (securitySchemeName: string) => string;
180
295
  export declare const oauth2ConnectionSlot: (securitySchemeName: string) => string;
@@ -184,7 +299,7 @@ export interface OpenapiStore {
184
299
  readonly name?: string;
185
300
  readonly baseUrl?: string;
186
301
  readonly headers?: Record<string, ConfiguredHeaderValue>;
187
- readonly queryParams?: Record<string, HeaderValue>;
302
+ readonly queryParams?: Record<string, ConfiguredHeaderValue>;
188
303
  readonly oauth2?: OAuth2SourceConfig;
189
304
  }) => Effect.Effect<void, StorageFailure>;
190
305
  readonly getSource: (namespace: string, scope: string) => Effect.Effect<StoredSource | null, StorageFailure>;
@@ -192,10 +307,5 @@ export interface OpenapiStore {
192
307
  readonly getOperationByToolId: (toolId: string, scope: string) => Effect.Effect<StoredOperation | null, StorageFailure>;
193
308
  readonly listOperationsBySource: (sourceId: string, scope: string) => Effect.Effect<readonly StoredOperation[], StorageFailure>;
194
309
  readonly removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure>;
195
- readonly listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly OpenApiSourceBindingRef[], StorageFailure>;
196
- readonly resolveSourceBinding: (sourceId: string, sourceScope: string, slot: string) => Effect.Effect<OpenApiSourceBindingRef | null, StorageFailure>;
197
- readonly setSourceBinding: (input: OpenApiSourceBindingInput) => Effect.Effect<OpenApiSourceBindingRef, StorageFailure>;
198
- readonly removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure>;
199
310
  }
200
- export declare const makeDefaultOpenapiStore: ({ adapter, scopes, }: StorageDeps<OpenapiSchema>) => OpenapiStore;
201
- export {};
311
+ export declare const makeDefaultOpenapiStore: ({ adapter }: StorageDeps<OpenapiSchema>) => OpenapiStore;