@executor-js/plugin-openapi 0.0.1-beta.6 → 0.0.2
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 -37
- package/dist/api/handlers.d.ts +2 -2
- package/dist/chunk-ZZ7TQ4JC.js +2602 -0
- package/dist/chunk-ZZ7TQ4JC.js.map +1 -0
- package/dist/core.js +46 -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 +421 -3
- 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 +169 -22
- package/dist/sdk/preview-oauth2.test.d.ts +1 -0
- package/dist/sdk/preview.d.ts +89 -125
- package/dist/sdk/store.d.ts +201 -0
- package/dist/sdk/types.d.ts +234 -266
- package/package.json +11 -22
- package/dist/chunk-V3D5A6HA.js +0 -1224
- package/dist/chunk-V3D5A6HA.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 -35
- package/dist/sdk/stored-source.d.ts +0 -46
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1,294 +1,262 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
export declare const OperationId: Schema.brand<
|
|
2
|
+
export declare const OperationId: Schema.brand<Schema.String, "OperationId">;
|
|
3
3
|
export type OperationId = typeof OperationId.Type;
|
|
4
|
-
export declare const HttpMethod: Schema.
|
|
4
|
+
export declare const HttpMethod: Schema.Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
5
5
|
export type HttpMethod = typeof HttpMethod.Type;
|
|
6
|
-
export declare const ParameterLocation: Schema.
|
|
6
|
+
export declare const ParameterLocation: Schema.Literals<readonly ["path", "query", "header", "cookie"]>;
|
|
7
7
|
export type ParameterLocation = typeof ParameterLocation.Type;
|
|
8
|
-
declare const OperationParameter_base: Schema.Class<OperationParameter, {
|
|
9
|
-
name:
|
|
10
|
-
location: Schema.
|
|
11
|
-
required:
|
|
12
|
-
schema: Schema.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
explode: Schema.optionalWith<typeof Schema.Boolean, {
|
|
19
|
-
as: "Option";
|
|
20
|
-
}>;
|
|
21
|
-
allowReserved: Schema.optionalWith<typeof Schema.Boolean, {
|
|
22
|
-
as: "Option";
|
|
23
|
-
}>;
|
|
24
|
-
description: Schema.optionalWith<typeof Schema.String, {
|
|
25
|
-
as: "Option";
|
|
26
|
-
}>;
|
|
27
|
-
}, Schema.Struct.Encoded<{
|
|
28
|
-
name: typeof Schema.String;
|
|
29
|
-
location: Schema.Literal<["path", "query", "header", "cookie"]>;
|
|
30
|
-
required: typeof Schema.Boolean;
|
|
31
|
-
schema: Schema.optionalWith<typeof Schema.Unknown, {
|
|
32
|
-
as: "Option";
|
|
33
|
-
}>;
|
|
34
|
-
style: Schema.optionalWith<typeof Schema.String, {
|
|
35
|
-
as: "Option";
|
|
36
|
-
}>;
|
|
37
|
-
explode: Schema.optionalWith<typeof Schema.Boolean, {
|
|
38
|
-
as: "Option";
|
|
39
|
-
}>;
|
|
40
|
-
allowReserved: Schema.optionalWith<typeof Schema.Boolean, {
|
|
41
|
-
as: "Option";
|
|
42
|
-
}>;
|
|
43
|
-
description: Schema.optionalWith<typeof Schema.String, {
|
|
44
|
-
as: "Option";
|
|
45
|
-
}>;
|
|
46
|
-
}>, never, {
|
|
47
|
-
readonly name: string;
|
|
48
|
-
} & {
|
|
49
|
-
readonly description: import("effect/Option").Option<string>;
|
|
50
|
-
} & {
|
|
51
|
-
readonly required: boolean;
|
|
52
|
-
} & {
|
|
53
|
-
readonly schema: import("effect/Option").Option<unknown>;
|
|
54
|
-
} & {
|
|
55
|
-
readonly location: "query" | "path" | "header" | "cookie";
|
|
56
|
-
} & {
|
|
57
|
-
readonly style: import("effect/Option").Option<string>;
|
|
58
|
-
} & {
|
|
59
|
-
readonly explode: import("effect/Option").Option<boolean>;
|
|
60
|
-
} & {
|
|
61
|
-
readonly allowReserved: import("effect/Option").Option<boolean>;
|
|
62
|
-
}, {}, {}>;
|
|
8
|
+
declare const OperationParameter_base: Schema.Class<OperationParameter, Schema.Struct<{
|
|
9
|
+
readonly name: Schema.String;
|
|
10
|
+
readonly location: Schema.Literals<readonly ["path", "query", "header", "cookie"]>;
|
|
11
|
+
readonly required: Schema.Boolean;
|
|
12
|
+
readonly schema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
13
|
+
readonly style: Schema.OptionFromOptional<Schema.String>;
|
|
14
|
+
readonly explode: Schema.OptionFromOptional<Schema.Boolean>;
|
|
15
|
+
readonly allowReserved: Schema.OptionFromOptional<Schema.Boolean>;
|
|
16
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
17
|
+
}>, {}>;
|
|
63
18
|
export declare class OperationParameter extends OperationParameter_base {
|
|
64
19
|
}
|
|
65
|
-
declare const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
20
|
+
declare const EncodingObject_base: Schema.Class<EncodingObject, Schema.Struct<{
|
|
21
|
+
readonly contentType: Schema.OptionFromOptional<Schema.String>;
|
|
22
|
+
readonly style: Schema.OptionFromOptional<Schema.String>;
|
|
23
|
+
readonly explode: Schema.OptionFromOptional<Schema.Boolean>;
|
|
24
|
+
readonly allowReserved: Schema.OptionFromOptional<Schema.Boolean>;
|
|
25
|
+
}>, {}>;
|
|
26
|
+
/**
|
|
27
|
+
* OpenAPI 3.x `Encoding Object` (§4.8.15). Declared per-property inside a
|
|
28
|
+
* multipart/form-data or application/x-www-form-urlencoded request body.
|
|
29
|
+
*
|
|
30
|
+
* - `contentType` — for multipart, overrides the per-part `Content-Type`
|
|
31
|
+
* header (e.g. `application/json` for a JSON-encoded metadata part).
|
|
32
|
+
* - `style` / `explode` / `allowReserved` — for form-urlencoded, control
|
|
33
|
+
* array / object serialization the same way parameter-level style does.
|
|
34
|
+
*/
|
|
35
|
+
export declare class EncodingObject extends EncodingObject_base {
|
|
36
|
+
}
|
|
37
|
+
declare const MediaBinding_base: Schema.Class<MediaBinding, Schema.Struct<{
|
|
38
|
+
readonly contentType: Schema.String;
|
|
39
|
+
readonly schema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
40
|
+
readonly encoding: Schema.OptionFromOptional<Schema.$Record<Schema.String, typeof EncodingObject>>;
|
|
41
|
+
}>, {}>;
|
|
42
|
+
export declare class MediaBinding extends MediaBinding_base {
|
|
43
|
+
}
|
|
44
|
+
declare const OperationRequestBody_base: Schema.Class<OperationRequestBody, Schema.Struct<{
|
|
45
|
+
readonly required: Schema.Boolean;
|
|
46
|
+
/** Default media type — first declared in spec order (not JSON-first).
|
|
47
|
+
* Used when the caller does not override via the tool's `contentType` arg. */
|
|
48
|
+
readonly contentType: Schema.String;
|
|
49
|
+
/** Schema of the default media type. Kept for backward compat with stored
|
|
50
|
+
* bindings from before `contents` was added. */
|
|
51
|
+
readonly schema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
52
|
+
/** All declared media types in spec order. Populated by `extract.ts`
|
|
53
|
+
* going forward; older persisted bindings may have this unset and will
|
|
54
|
+
* fall back to `{contentType, schema}`. */
|
|
55
|
+
readonly contents: Schema.OptionFromOptional<Schema.$Array<typeof MediaBinding>>;
|
|
56
|
+
}>, {}>;
|
|
84
57
|
export declare class OperationRequestBody extends OperationRequestBody_base {
|
|
85
58
|
}
|
|
86
|
-
declare const ExtractedOperation_base: Schema.Class<ExtractedOperation, {
|
|
87
|
-
operationId: Schema.brand<
|
|
88
|
-
method: Schema.
|
|
89
|
-
pathTemplate:
|
|
90
|
-
summary: Schema.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
as: "Option";
|
|
100
|
-
}>;
|
|
101
|
-
inputSchema: Schema.optionalWith<typeof Schema.Unknown, {
|
|
102
|
-
as: "Option";
|
|
103
|
-
}>;
|
|
104
|
-
outputSchema: Schema.optionalWith<typeof Schema.Unknown, {
|
|
105
|
-
as: "Option";
|
|
106
|
-
}>;
|
|
107
|
-
deprecated: Schema.optionalWith<typeof Schema.Boolean, {
|
|
108
|
-
default: () => false;
|
|
109
|
-
}>;
|
|
110
|
-
}, Schema.Struct.Encoded<{
|
|
111
|
-
operationId: Schema.brand<typeof Schema.String, "OperationId">;
|
|
112
|
-
method: Schema.Literal<["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
113
|
-
pathTemplate: typeof Schema.String;
|
|
114
|
-
summary: Schema.optionalWith<typeof Schema.String, {
|
|
115
|
-
as: "Option";
|
|
116
|
-
}>;
|
|
117
|
-
description: Schema.optionalWith<typeof Schema.String, {
|
|
118
|
-
as: "Option";
|
|
119
|
-
}>;
|
|
120
|
-
tags: Schema.Array$<typeof Schema.String>;
|
|
121
|
-
parameters: Schema.Array$<typeof OperationParameter>;
|
|
122
|
-
requestBody: Schema.optionalWith<typeof OperationRequestBody, {
|
|
123
|
-
as: "Option";
|
|
124
|
-
}>;
|
|
125
|
-
inputSchema: Schema.optionalWith<typeof Schema.Unknown, {
|
|
126
|
-
as: "Option";
|
|
127
|
-
}>;
|
|
128
|
-
outputSchema: Schema.optionalWith<typeof Schema.Unknown, {
|
|
129
|
-
as: "Option";
|
|
130
|
-
}>;
|
|
131
|
-
deprecated: Schema.optionalWith<typeof Schema.Boolean, {
|
|
132
|
-
default: () => false;
|
|
133
|
-
}>;
|
|
134
|
-
}>, never, {
|
|
135
|
-
readonly description: import("effect/Option").Option<string>;
|
|
136
|
-
} & {
|
|
137
|
-
readonly inputSchema: import("effect/Option").Option<unknown>;
|
|
138
|
-
} & {
|
|
139
|
-
readonly outputSchema: import("effect/Option").Option<unknown>;
|
|
140
|
-
} & {
|
|
141
|
-
readonly tags: readonly string[];
|
|
142
|
-
} & {
|
|
143
|
-
readonly summary: import("effect/Option").Option<string>;
|
|
144
|
-
} & {
|
|
145
|
-
readonly parameters: readonly OperationParameter[];
|
|
146
|
-
} & {
|
|
147
|
-
readonly operationId: string & import("effect/Brand").Brand<"OperationId">;
|
|
148
|
-
} & {
|
|
149
|
-
readonly requestBody: import("effect/Option").Option<OperationRequestBody>;
|
|
150
|
-
} & {
|
|
151
|
-
readonly deprecated?: boolean | undefined;
|
|
152
|
-
} & {
|
|
153
|
-
readonly method: "delete" | "get" | "put" | "post" | "options" | "head" | "patch" | "trace";
|
|
154
|
-
} & {
|
|
155
|
-
readonly pathTemplate: string;
|
|
156
|
-
}, {}, {}>;
|
|
59
|
+
declare const ExtractedOperation_base: Schema.Class<ExtractedOperation, Schema.Struct<{
|
|
60
|
+
readonly operationId: Schema.brand<Schema.String, "OperationId">;
|
|
61
|
+
readonly method: Schema.Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
62
|
+
readonly pathTemplate: Schema.String;
|
|
63
|
+
readonly summary: Schema.OptionFromOptional<Schema.String>;
|
|
64
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
65
|
+
readonly tags: Schema.$Array<Schema.String>;
|
|
66
|
+
readonly parameters: Schema.$Array<typeof OperationParameter>;
|
|
67
|
+
readonly requestBody: Schema.OptionFromOptional<typeof OperationRequestBody>;
|
|
68
|
+
readonly inputSchema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
69
|
+
readonly outputSchema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
70
|
+
readonly deprecated: Schema.Boolean;
|
|
71
|
+
}>, {}>;
|
|
157
72
|
export declare class ExtractedOperation extends ExtractedOperation_base {
|
|
158
73
|
}
|
|
159
|
-
declare const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
} & {
|
|
172
|
-
readonly variables: import("effect/Option").Option<{
|
|
173
|
-
readonly [x: string]: string;
|
|
174
|
-
}>;
|
|
175
|
-
}, {}, {}>;
|
|
74
|
+
declare const ServerVariable_base: Schema.Class<ServerVariable, Schema.Struct<{
|
|
75
|
+
readonly default: Schema.String;
|
|
76
|
+
readonly enum: Schema.OptionFromOptional<Schema.$Array<Schema.String>>;
|
|
77
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
78
|
+
}>, {}>;
|
|
79
|
+
export declare class ServerVariable extends ServerVariable_base {
|
|
80
|
+
}
|
|
81
|
+
declare const ServerInfo_base: Schema.Class<ServerInfo, Schema.Struct<{
|
|
82
|
+
readonly url: Schema.String;
|
|
83
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
84
|
+
readonly variables: Schema.OptionFromOptional<Schema.$Record<Schema.String, typeof ServerVariable>>;
|
|
85
|
+
}>, {}>;
|
|
176
86
|
export declare class ServerInfo extends ServerInfo_base {
|
|
177
87
|
}
|
|
178
|
-
declare const ExtractionResult_base: Schema.Class<ExtractionResult, {
|
|
179
|
-
title: Schema.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}>;
|
|
185
|
-
servers: Schema.Array$<typeof ServerInfo>;
|
|
186
|
-
operations: Schema.Array$<typeof ExtractedOperation>;
|
|
187
|
-
}, Schema.Struct.Encoded<{
|
|
188
|
-
title: Schema.optionalWith<typeof Schema.String, {
|
|
189
|
-
as: "Option";
|
|
190
|
-
}>;
|
|
191
|
-
version: Schema.optionalWith<typeof Schema.String, {
|
|
192
|
-
as: "Option";
|
|
193
|
-
}>;
|
|
194
|
-
servers: Schema.Array$<typeof ServerInfo>;
|
|
195
|
-
operations: Schema.Array$<typeof ExtractedOperation>;
|
|
196
|
-
}>, never, {
|
|
197
|
-
readonly title: import("effect/Option").Option<string>;
|
|
198
|
-
} & {
|
|
199
|
-
readonly servers: readonly ServerInfo[];
|
|
200
|
-
} & {
|
|
201
|
-
readonly version: import("effect/Option").Option<string>;
|
|
202
|
-
} & {
|
|
203
|
-
readonly operations: readonly ExtractedOperation[];
|
|
204
|
-
}, {}, {}>;
|
|
88
|
+
declare const ExtractionResult_base: Schema.Class<ExtractionResult, Schema.Struct<{
|
|
89
|
+
readonly title: Schema.OptionFromOptional<Schema.String>;
|
|
90
|
+
readonly version: Schema.OptionFromOptional<Schema.String>;
|
|
91
|
+
readonly servers: Schema.$Array<typeof ServerInfo>;
|
|
92
|
+
readonly operations: Schema.$Array<typeof ExtractedOperation>;
|
|
93
|
+
}>, {}>;
|
|
205
94
|
export declare class ExtractionResult extends ExtractionResult_base {
|
|
206
95
|
}
|
|
207
|
-
declare const OperationBinding_base: Schema.Class<OperationBinding, {
|
|
208
|
-
method: Schema.
|
|
209
|
-
pathTemplate:
|
|
210
|
-
parameters: Schema
|
|
211
|
-
requestBody: Schema.
|
|
212
|
-
|
|
213
|
-
}>;
|
|
214
|
-
}, Schema.Struct.Encoded<{
|
|
215
|
-
method: Schema.Literal<["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
216
|
-
pathTemplate: typeof Schema.String;
|
|
217
|
-
parameters: Schema.Array$<typeof OperationParameter>;
|
|
218
|
-
requestBody: Schema.optionalWith<typeof OperationRequestBody, {
|
|
219
|
-
as: "Option";
|
|
220
|
-
}>;
|
|
221
|
-
}>, never, {
|
|
222
|
-
readonly parameters: readonly OperationParameter[];
|
|
223
|
-
} & {
|
|
224
|
-
readonly requestBody: import("effect/Option").Option<OperationRequestBody>;
|
|
225
|
-
} & {
|
|
226
|
-
readonly method: "delete" | "get" | "put" | "post" | "options" | "head" | "patch" | "trace";
|
|
227
|
-
} & {
|
|
228
|
-
readonly pathTemplate: string;
|
|
229
|
-
}, {}, {}>;
|
|
96
|
+
declare const OperationBinding_base: Schema.Class<OperationBinding, Schema.Struct<{
|
|
97
|
+
readonly method: Schema.Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
98
|
+
readonly pathTemplate: Schema.String;
|
|
99
|
+
readonly parameters: Schema.$Array<typeof OperationParameter>;
|
|
100
|
+
readonly requestBody: Schema.OptionFromOptional<typeof OperationRequestBody>;
|
|
101
|
+
}>, {}>;
|
|
230
102
|
export declare class OperationBinding extends OperationBinding_base {
|
|
231
103
|
}
|
|
232
104
|
/**
|
|
233
105
|
* A header value — either a static string or a reference to a secret.
|
|
234
106
|
* Stored as JSON-serializable data.
|
|
235
107
|
*/
|
|
236
|
-
export declare const HeaderValue: Schema.Union<[
|
|
237
|
-
secretId:
|
|
238
|
-
prefix: Schema.optional<
|
|
108
|
+
export declare const HeaderValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
109
|
+
readonly secretId: Schema.String;
|
|
110
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
239
111
|
}>]>;
|
|
240
112
|
export type HeaderValue = typeof HeaderValue.Type;
|
|
241
|
-
declare const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
113
|
+
declare const ConfiguredHeaderBinding_base: Schema.Class<ConfiguredHeaderBinding, Schema.Struct<{
|
|
114
|
+
readonly kind: Schema.Literal<"binding">;
|
|
115
|
+
readonly slot: Schema.String;
|
|
116
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
117
|
+
}>, {}>;
|
|
118
|
+
export declare class ConfiguredHeaderBinding extends ConfiguredHeaderBinding_base {
|
|
119
|
+
}
|
|
120
|
+
export declare const ConfiguredHeaderValue: Schema.Union<readonly [Schema.String, typeof ConfiguredHeaderBinding]>;
|
|
121
|
+
export type ConfiguredHeaderValue = typeof ConfiguredHeaderValue.Type;
|
|
122
|
+
export declare const OpenApiSourceBindingValue: Schema.Union<readonly [Schema.Struct<{
|
|
123
|
+
readonly kind: Schema.Literal<"secret">;
|
|
124
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
125
|
+
}>, Schema.Struct<{
|
|
126
|
+
readonly kind: Schema.Literal<"connection">;
|
|
127
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
128
|
+
}>, Schema.Struct<{
|
|
129
|
+
readonly kind: Schema.Literal<"text">;
|
|
130
|
+
readonly text: Schema.String;
|
|
131
|
+
}>]>;
|
|
132
|
+
export type OpenApiSourceBindingValue = typeof OpenApiSourceBindingValue.Type;
|
|
133
|
+
export declare const OpenApiSourceBindingInputSchema: Schema.Struct<{
|
|
134
|
+
readonly sourceId: Schema.String;
|
|
135
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
136
|
+
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
137
|
+
readonly slot: Schema.String;
|
|
138
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
139
|
+
readonly kind: Schema.Literal<"secret">;
|
|
140
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
141
|
+
}>, Schema.Struct<{
|
|
142
|
+
readonly kind: Schema.Literal<"connection">;
|
|
143
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
144
|
+
}>, Schema.Struct<{
|
|
145
|
+
readonly kind: Schema.Literal<"text">;
|
|
146
|
+
readonly text: Schema.String;
|
|
147
|
+
}>]>;
|
|
148
|
+
}>;
|
|
149
|
+
declare const OpenApiSourceBindingInput_base: Schema.Class<OpenApiSourceBindingInput, Schema.Struct<{
|
|
150
|
+
readonly sourceId: Schema.String;
|
|
151
|
+
readonly sourceScope: Schema.brand<Schema.String, "ScopeId">;
|
|
152
|
+
readonly scope: Schema.brand<Schema.String, "ScopeId">;
|
|
153
|
+
readonly slot: Schema.String;
|
|
154
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
155
|
+
readonly kind: Schema.Literal<"secret">;
|
|
156
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
157
|
+
}>, Schema.Struct<{
|
|
158
|
+
readonly kind: Schema.Literal<"connection">;
|
|
159
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
160
|
+
}>, Schema.Struct<{
|
|
161
|
+
readonly kind: Schema.Literal<"text">;
|
|
162
|
+
readonly text: Schema.String;
|
|
163
|
+
}>]>;
|
|
164
|
+
}>, {}>;
|
|
165
|
+
export declare class OpenApiSourceBindingInput extends OpenApiSourceBindingInput_base {
|
|
166
|
+
}
|
|
167
|
+
declare const OpenApiSourceBindingRef_base: Schema.Class<OpenApiSourceBindingRef, Schema.Struct<{
|
|
168
|
+
readonly sourceId: Schema.String;
|
|
169
|
+
readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
170
|
+
readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
171
|
+
readonly slot: Schema.String;
|
|
172
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
173
|
+
readonly kind: Schema.Literal<"secret">;
|
|
174
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
175
|
+
}>, Schema.Struct<{
|
|
176
|
+
readonly kind: Schema.Literal<"connection">;
|
|
177
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
178
|
+
}>, Schema.Struct<{
|
|
179
|
+
readonly kind: Schema.Literal<"text">;
|
|
180
|
+
readonly text: Schema.String;
|
|
181
|
+
}>]>;
|
|
182
|
+
readonly createdAt: Schema.Date;
|
|
183
|
+
readonly updatedAt: Schema.Date;
|
|
184
|
+
}>, {}>;
|
|
185
|
+
export declare class OpenApiSourceBindingRef extends OpenApiSourceBindingRef_base {
|
|
186
|
+
}
|
|
187
|
+
export declare const OAuth2Flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
188
|
+
export type OAuth2Flow = typeof OAuth2Flow.Type;
|
|
189
|
+
declare const OAuth2Auth_base: Schema.Class<OAuth2Auth, Schema.Struct<{
|
|
190
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
191
|
+
/** Id of the Connection that owns this sign-in. Points at the core
|
|
192
|
+
* `connection` table; resolve via `ctx.connections.get(id)` or
|
|
193
|
+
* `ctx.connections.accessToken(id)`. Updated when the user signs in
|
|
194
|
+
* again from the source detail UI (a fresh connection is minted and
|
|
195
|
+
* this pointer is rewritten). */
|
|
196
|
+
readonly connectionId: Schema.String;
|
|
197
|
+
/** Key into `components.securitySchemes` this auth came from. Kept here
|
|
198
|
+
* so a spec with multiple OAuth2 schemes can wire each one to its own
|
|
199
|
+
* connection. */
|
|
200
|
+
readonly securitySchemeName: Schema.String;
|
|
201
|
+
/** OAuth2 grant type used for this source. Determines which flow the
|
|
202
|
+
* sign-in button runs (authorizationCode opens a browser popup;
|
|
203
|
+
* clientCredentials is server-to-server). */
|
|
204
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
205
|
+
/** Absolute token endpoint URL. */
|
|
206
|
+
readonly tokenUrl: Schema.String;
|
|
207
|
+
/** Absolute authorization endpoint URL. Only used for authorizationCode
|
|
208
|
+
* flows; clientCredentials has no user consent step. */
|
|
209
|
+
readonly authorizationUrl: Schema.NullOr<Schema.String>;
|
|
210
|
+
/** Expected issuer for ID token validation. Defaults to authorization origin. */
|
|
211
|
+
readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
212
|
+
/** Secret id holding the OAuth client_id. */
|
|
213
|
+
readonly clientIdSecretId: Schema.String;
|
|
214
|
+
/** Secret id holding the OAuth client_secret. Optional for public
|
|
215
|
+
* clients (PKCE-only authorizationCode). */
|
|
216
|
+
readonly clientSecretSecretId: Schema.NullOr<Schema.String>;
|
|
217
|
+
/** OAuth scopes requested on sign-in. Stored as a static list so the
|
|
218
|
+
* sign-in button can re-request the same capabilities without having
|
|
219
|
+
* to re-derive them from the OpenAPI spec. */
|
|
220
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
221
|
+
}>, {}>;
|
|
222
|
+
export declare class OAuth2Auth extends OAuth2Auth_base {
|
|
223
|
+
}
|
|
224
|
+
declare const OAuth2SourceConfig_base: Schema.Class<OAuth2SourceConfig, Schema.Struct<{
|
|
225
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
226
|
+
readonly securitySchemeName: Schema.String;
|
|
227
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
228
|
+
readonly tokenUrl: Schema.String;
|
|
229
|
+
readonly authorizationUrl: Schema.NullOr<Schema.String>;
|
|
230
|
+
readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
231
|
+
readonly clientIdSlot: Schema.String;
|
|
232
|
+
readonly clientSecretSlot: Schema.NullOr<Schema.String>;
|
|
233
|
+
readonly connectionSlot: Schema.String;
|
|
234
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
235
|
+
}>, {}>;
|
|
236
|
+
export declare class OAuth2SourceConfig extends OAuth2SourceConfig_base {
|
|
237
|
+
}
|
|
238
|
+
declare const InvocationConfig_base: Schema.Class<InvocationConfig, Schema.Struct<{
|
|
239
|
+
readonly baseUrl: Schema.String;
|
|
252
240
|
/** Headers applied to every request. Values can reference secrets. */
|
|
253
|
-
headers: Schema.
|
|
254
|
-
secretId:
|
|
255
|
-
prefix: Schema.optional<
|
|
256
|
-
}>]
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
};
|
|
265
|
-
} | undefined;
|
|
266
|
-
} & {
|
|
267
|
-
readonly baseUrl: string;
|
|
268
|
-
}, {}, {}>;
|
|
241
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
242
|
+
readonly secretId: Schema.String;
|
|
243
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
244
|
+
}>]>>>;
|
|
245
|
+
/**
|
|
246
|
+
* Optional OAuth2 auth — if set, the invoker resolves/refreshes the
|
|
247
|
+
* access token and injects `Authorization: Bearer <token>` on every
|
|
248
|
+
* request. Coexists with `headers` but wins for the Authorization header.
|
|
249
|
+
*/
|
|
250
|
+
readonly oauth2: Schema.OptionFromOptional<typeof OAuth2Auth>;
|
|
251
|
+
}>, {}>;
|
|
269
252
|
export declare class InvocationConfig extends InvocationConfig_base {
|
|
270
253
|
}
|
|
271
|
-
declare const InvocationResult_base: Schema.Class<InvocationResult, {
|
|
272
|
-
status:
|
|
273
|
-
headers: Schema
|
|
274
|
-
data: Schema.NullOr<
|
|
275
|
-
error: Schema.NullOr<
|
|
276
|
-
}
|
|
277
|
-
status: typeof Schema.Number;
|
|
278
|
-
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
279
|
-
data: Schema.NullOr<typeof Schema.Unknown>;
|
|
280
|
-
error: Schema.NullOr<typeof Schema.Unknown>;
|
|
281
|
-
}>, never, {
|
|
282
|
-
readonly data: unknown;
|
|
283
|
-
} & {
|
|
284
|
-
readonly error: unknown;
|
|
285
|
-
} & {
|
|
286
|
-
readonly status: number;
|
|
287
|
-
} & {
|
|
288
|
-
readonly headers: {
|
|
289
|
-
readonly [x: string]: string;
|
|
290
|
-
};
|
|
291
|
-
}, {}, {}>;
|
|
254
|
+
declare const InvocationResult_base: Schema.Class<InvocationResult, Schema.Struct<{
|
|
255
|
+
readonly status: Schema.Number;
|
|
256
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
257
|
+
readonly data: Schema.NullOr<Schema.Unknown>;
|
|
258
|
+
readonly error: Schema.NullOr<Schema.Unknown>;
|
|
259
|
+
}>, {}>;
|
|
292
260
|
export declare class InvocationResult extends InvocationResult_base {
|
|
293
261
|
}
|
|
294
262
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executor-js/plugin-openapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
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"
|
|
@@ -40,31 +40,26 @@
|
|
|
40
40
|
"typecheck:slow": "bunx tsc --noEmit -p tsconfig.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
47
|
-
"@executor-js/sdk": "0.0.1-beta.6",
|
|
48
|
-
"effect": "^3.21.0",
|
|
43
|
+
"@effect/platform-node": "4.0.0-beta.59",
|
|
44
|
+
"@executor-js/config": "0.0.2",
|
|
45
|
+
"@executor-js/sdk": "0.0.2",
|
|
46
|
+
"effect": "4.0.0-beta.59",
|
|
49
47
|
"openapi-types": "^12.1.3",
|
|
50
48
|
"yaml": "^2.7.1"
|
|
51
49
|
},
|
|
52
50
|
"devDependencies": {
|
|
53
|
-
"@effect
|
|
54
|
-
"@effect/vitest": "
|
|
55
|
-
"@executor/
|
|
56
|
-
"@executor/react": "1.4.3-beta.0",
|
|
51
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
52
|
+
"@effect/vitest": "4.0.0-beta.59",
|
|
53
|
+
"@executor-js/storage-core": "0.0.2",
|
|
57
54
|
"@types/node": "^24.3.1",
|
|
58
55
|
"@types/react": "^19.1.0",
|
|
59
56
|
"bun-types": "^1.2.22",
|
|
60
57
|
"react": "^19.1.0",
|
|
61
58
|
"tsup": "^8.5.0",
|
|
62
|
-
"vitest": "^4.1.
|
|
59
|
+
"vitest": "^4.1.5"
|
|
63
60
|
},
|
|
64
61
|
"peerDependencies": {
|
|
65
|
-
"@effect
|
|
66
|
-
"@executor/api": "1.4.3-beta.0",
|
|
67
|
-
"@executor/react": "1.4.3-beta.0",
|
|
62
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
68
63
|
"@tanstack/react-router": "^1.168.10",
|
|
69
64
|
"react": "^19.1.0"
|
|
70
65
|
},
|
|
@@ -72,17 +67,11 @@
|
|
|
72
67
|
"react": {
|
|
73
68
|
"optional": true
|
|
74
69
|
},
|
|
75
|
-
"@effect
|
|
70
|
+
"@effect/atom-react": {
|
|
76
71
|
"optional": true
|
|
77
72
|
},
|
|
78
73
|
"@tanstack/react-router": {
|
|
79
74
|
"optional": true
|
|
80
|
-
},
|
|
81
|
-
"@executor/api": {
|
|
82
|
-
"optional": true
|
|
83
|
-
},
|
|
84
|
-
"@executor/react": {
|
|
85
|
-
"optional": true
|
|
86
75
|
}
|
|
87
76
|
}
|
|
88
77
|
}
|