@executor-js/plugin-openapi 0.1.0 → 0.2.1
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-EV3NJHLA.js +19 -0
- package/dist/AddOpenApiSource-EV3NJHLA.js.map +1 -0
- package/dist/EditOpenApiSource-J7NXCVT5.js +665 -0
- package/dist/EditOpenApiSource-J7NXCVT5.js.map +1 -0
- package/dist/OpenApiSourceSummary-K5WZD5NR.js +122 -0
- package/dist/OpenApiSourceSummary-K5WZD5NR.js.map +1 -0
- package/dist/api/group.d.ts +79 -10
- package/dist/api/index.d.ts +384 -0
- package/dist/chunk-2BXVRXGL.js +1345 -0
- package/dist/chunk-2BXVRXGL.js.map +1 -0
- package/dist/chunk-E4QUTDQ2.js +1120 -0
- package/dist/chunk-E4QUTDQ2.js.map +1 -0
- package/dist/chunk-LBTK5F65.js +216 -0
- package/dist/chunk-LBTK5F65.js.map +1 -0
- package/dist/chunk-TRD7KSKA.js +1444 -0
- package/dist/chunk-TRD7KSKA.js.map +1 -0
- package/dist/client.js +165 -0
- package/dist/client.js.map +1 -0
- package/dist/core.js +8 -10
- package/dist/index.js +2 -1
- package/dist/react/AddOpenApiSource.d.ts +1 -1
- package/dist/react/OpenApiSourceDetailsFields.d.ts +18 -0
- package/dist/react/atoms.d.ts +158 -13
- package/dist/react/client.d.ts +84 -15
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/openapi-utils.d.ts +4 -3
- package/dist/sdk/parse.d.ts +1 -1
- package/dist/sdk/parse.test.d.ts +1 -0
- package/dist/sdk/plugin.d.ts +136 -125
- package/dist/sdk/store.d.ts +132 -47
- package/dist/sdk/types.d.ts +19 -44
- package/dist/sdk/usage-scope-isolation.test.d.ts +1 -0
- package/dist/testing/index.d.ts +34 -0
- package/dist/testing.js +56 -0
- package/dist/testing.js.map +1 -0
- package/package.json +16 -4
- package/dist/chunk-RBE3CVB4.js +0 -2837
- package/dist/chunk-RBE3CVB4.js.map +0 -1
package/dist/react/atoms.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ScopeId } from "@executor-js/sdk/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
2
|
+
import * as Atom from "effect/unstable/reactivity/Atom";
|
|
3
|
+
import * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
|
|
4
|
+
export declare const openApiSourceAtom: (scopeId: ScopeId, namespace: string) => Atom.Atom<AsyncResult.AsyncResult<import("../sdk/store").StoredSourceSchema | null, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
5
|
+
export declare const openApiSourceBindingsAtom: (scopeId: ScopeId, namespace: string, sourceScopeId: ScopeId) => Atom.Atom<AsyncResult.AsyncResult<readonly import("../sdk").OpenApiSourceBindingRef[], import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
6
|
+
export declare const previewOpenApiSpec: Atom.AtomResultFn<{
|
|
5
7
|
readonly params: {
|
|
6
8
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
7
9
|
};
|
|
@@ -25,25 +27,132 @@ export declare const previewOpenApiSpec: import("effect/unstable/reactivity/Atom
|
|
|
25
27
|
readonly responseMode?: "decoded-only" | undefined;
|
|
26
28
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
27
29
|
}, import("../sdk").SpecPreview, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
28
|
-
export declare const addOpenApiSpec:
|
|
30
|
+
export declare const addOpenApiSpec: Atom.AtomResultFn<{
|
|
29
31
|
readonly params: {
|
|
30
32
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
31
33
|
};
|
|
32
34
|
readonly payload: {
|
|
35
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
33
36
|
readonly spec: string;
|
|
34
37
|
readonly name?: string | undefined;
|
|
35
38
|
readonly namespace?: string | undefined;
|
|
36
|
-
readonly oauth2?:
|
|
39
|
+
readonly oauth2?: {
|
|
40
|
+
readonly kind: "oauth2";
|
|
41
|
+
readonly scopes: readonly string[];
|
|
42
|
+
readonly authorizationUrl: string | null;
|
|
43
|
+
readonly clientSecretSlot: string | null;
|
|
44
|
+
readonly securitySchemeName: string;
|
|
45
|
+
readonly flow: "authorizationCode" | "clientCredentials";
|
|
46
|
+
readonly tokenUrl: string;
|
|
47
|
+
readonly clientIdSlot: string;
|
|
48
|
+
readonly connectionSlot: string;
|
|
49
|
+
readonly issuerUrl?: string | null | undefined;
|
|
50
|
+
} | undefined;
|
|
37
51
|
readonly headers?: {
|
|
38
|
-
readonly [x: string]:
|
|
52
|
+
readonly [x: string]: string | {
|
|
53
|
+
readonly secretId: string;
|
|
54
|
+
readonly prefix?: string | undefined;
|
|
55
|
+
} | {
|
|
56
|
+
readonly secretId: string;
|
|
57
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
58
|
+
readonly prefix?: string | undefined;
|
|
59
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
60
|
+
} | {
|
|
61
|
+
readonly kind: "binding";
|
|
62
|
+
readonly slot: string;
|
|
63
|
+
readonly prefix?: string | undefined;
|
|
64
|
+
};
|
|
39
65
|
} | undefined;
|
|
66
|
+
readonly baseUrl?: string | undefined;
|
|
40
67
|
readonly queryParams?: {
|
|
41
68
|
readonly [x: string]: string | {
|
|
42
69
|
readonly secretId: string;
|
|
43
70
|
readonly prefix?: string | undefined;
|
|
71
|
+
} | {
|
|
72
|
+
readonly secretId: string;
|
|
73
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
74
|
+
readonly prefix?: string | undefined;
|
|
75
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
readonly kind: "binding";
|
|
78
|
+
readonly slot: string;
|
|
79
|
+
readonly prefix?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
} | undefined;
|
|
82
|
+
readonly specFetchCredentials?: {
|
|
83
|
+
readonly headers?: {
|
|
84
|
+
readonly [x: string]: string | {
|
|
85
|
+
readonly secretId: string;
|
|
86
|
+
readonly prefix?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
} | undefined;
|
|
89
|
+
readonly queryParams?: {
|
|
90
|
+
readonly [x: string]: string | {
|
|
91
|
+
readonly secretId: string;
|
|
92
|
+
readonly prefix?: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
} | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
readonly credentialTargetScope?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
97
|
+
};
|
|
98
|
+
readonly responseMode?: "decoded-only" | undefined;
|
|
99
|
+
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
readonly namespace: string;
|
|
102
|
+
readonly toolCount: number;
|
|
103
|
+
}, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
104
|
+
export declare const addOpenApiSpecOptimistic: (arg: string & import("effect/Brand").Brand<"ScopeId">) => Atom.AtomResultFn<{
|
|
105
|
+
readonly params: {
|
|
106
|
+
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
107
|
+
};
|
|
108
|
+
readonly payload: {
|
|
109
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
110
|
+
readonly spec: string;
|
|
111
|
+
readonly name?: string | undefined;
|
|
112
|
+
readonly namespace?: string | undefined;
|
|
113
|
+
readonly oauth2?: {
|
|
114
|
+
readonly kind: "oauth2";
|
|
115
|
+
readonly scopes: readonly string[];
|
|
116
|
+
readonly authorizationUrl: string | null;
|
|
117
|
+
readonly clientSecretSlot: string | null;
|
|
118
|
+
readonly securitySchemeName: string;
|
|
119
|
+
readonly flow: "authorizationCode" | "clientCredentials";
|
|
120
|
+
readonly tokenUrl: string;
|
|
121
|
+
readonly clientIdSlot: string;
|
|
122
|
+
readonly connectionSlot: string;
|
|
123
|
+
readonly issuerUrl?: string | null | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
readonly headers?: {
|
|
126
|
+
readonly [x: string]: string | {
|
|
127
|
+
readonly secretId: string;
|
|
128
|
+
readonly prefix?: string | undefined;
|
|
129
|
+
} | {
|
|
130
|
+
readonly secretId: string;
|
|
131
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
132
|
+
readonly prefix?: string | undefined;
|
|
133
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
134
|
+
} | {
|
|
135
|
+
readonly kind: "binding";
|
|
136
|
+
readonly slot: string;
|
|
137
|
+
readonly prefix?: string | undefined;
|
|
44
138
|
};
|
|
45
139
|
} | undefined;
|
|
46
140
|
readonly baseUrl?: string | undefined;
|
|
141
|
+
readonly queryParams?: {
|
|
142
|
+
readonly [x: string]: string | {
|
|
143
|
+
readonly secretId: string;
|
|
144
|
+
readonly prefix?: string | undefined;
|
|
145
|
+
} | {
|
|
146
|
+
readonly secretId: string;
|
|
147
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
148
|
+
readonly prefix?: string | undefined;
|
|
149
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
150
|
+
} | {
|
|
151
|
+
readonly kind: "binding";
|
|
152
|
+
readonly slot: string;
|
|
153
|
+
readonly prefix?: string | undefined;
|
|
154
|
+
};
|
|
155
|
+
} | undefined;
|
|
47
156
|
readonly specFetchCredentials?: {
|
|
48
157
|
readonly headers?: {
|
|
49
158
|
readonly [x: string]: string | {
|
|
@@ -58,6 +167,7 @@ export declare const addOpenApiSpec: import("effect/unstable/reactivity/Atom").A
|
|
|
58
167
|
};
|
|
59
168
|
} | undefined;
|
|
60
169
|
} | undefined;
|
|
170
|
+
readonly credentialTargetScope?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
61
171
|
};
|
|
62
172
|
readonly responseMode?: "decoded-only" | undefined;
|
|
63
173
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
@@ -65,31 +175,65 @@ export declare const addOpenApiSpec: import("effect/unstable/reactivity/Atom").A
|
|
|
65
175
|
readonly namespace: string;
|
|
66
176
|
readonly toolCount: number;
|
|
67
177
|
}, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
68
|
-
export declare const updateOpenApiSource:
|
|
178
|
+
export declare const updateOpenApiSource: Atom.AtomResultFn<{
|
|
69
179
|
readonly params: {
|
|
70
180
|
readonly namespace: string;
|
|
71
181
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
72
182
|
};
|
|
73
183
|
readonly payload: {
|
|
184
|
+
readonly sourceScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
74
185
|
readonly name?: string | undefined;
|
|
75
|
-
readonly oauth2?:
|
|
186
|
+
readonly oauth2?: {
|
|
187
|
+
readonly kind: "oauth2";
|
|
188
|
+
readonly scopes: readonly string[];
|
|
189
|
+
readonly authorizationUrl: string | null;
|
|
190
|
+
readonly clientSecretSlot: string | null;
|
|
191
|
+
readonly securitySchemeName: string;
|
|
192
|
+
readonly flow: "authorizationCode" | "clientCredentials";
|
|
193
|
+
readonly tokenUrl: string;
|
|
194
|
+
readonly clientIdSlot: string;
|
|
195
|
+
readonly connectionSlot: string;
|
|
196
|
+
readonly issuerUrl?: string | null | undefined;
|
|
197
|
+
} | undefined;
|
|
76
198
|
readonly headers?: {
|
|
77
|
-
readonly [x: string]:
|
|
199
|
+
readonly [x: string]: string | {
|
|
200
|
+
readonly secretId: string;
|
|
201
|
+
readonly prefix?: string | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
readonly secretId: string;
|
|
204
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
205
|
+
readonly prefix?: string | undefined;
|
|
206
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
207
|
+
} | {
|
|
208
|
+
readonly kind: "binding";
|
|
209
|
+
readonly slot: string;
|
|
210
|
+
readonly prefix?: string | undefined;
|
|
211
|
+
};
|
|
78
212
|
} | undefined;
|
|
213
|
+
readonly baseUrl?: string | undefined;
|
|
79
214
|
readonly queryParams?: {
|
|
80
215
|
readonly [x: string]: string | {
|
|
81
216
|
readonly secretId: string;
|
|
82
217
|
readonly prefix?: string | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
readonly secretId: string;
|
|
220
|
+
readonly targetScope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
221
|
+
readonly prefix?: string | undefined;
|
|
222
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
readonly kind: "binding";
|
|
225
|
+
readonly slot: string;
|
|
226
|
+
readonly prefix?: string | undefined;
|
|
83
227
|
};
|
|
84
228
|
} | undefined;
|
|
85
|
-
readonly
|
|
229
|
+
readonly credentialTargetScope?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
86
230
|
};
|
|
87
231
|
readonly responseMode?: "decoded-only" | undefined;
|
|
88
232
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
89
233
|
}, {
|
|
90
234
|
readonly updated: boolean;
|
|
91
235
|
}, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
92
|
-
export declare const setOpenApiSourceBinding:
|
|
236
|
+
export declare const setOpenApiSourceBinding: Atom.AtomResultFn<{
|
|
93
237
|
readonly params: {
|
|
94
238
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
95
239
|
};
|
|
@@ -97,12 +241,13 @@ export declare const setOpenApiSourceBinding: import("effect/unstable/reactivity
|
|
|
97
241
|
readonly value: {
|
|
98
242
|
readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
|
|
99
243
|
readonly kind: "secret";
|
|
244
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
100
245
|
} | {
|
|
101
246
|
readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
|
|
102
247
|
readonly kind: "connection";
|
|
103
248
|
} | {
|
|
104
|
-
readonly kind: "text";
|
|
105
249
|
readonly text: string;
|
|
250
|
+
readonly kind: "text";
|
|
106
251
|
};
|
|
107
252
|
readonly sourceId: string;
|
|
108
253
|
readonly scope: string & import("effect/Brand").Brand<"ScopeId">;
|
|
@@ -112,7 +257,7 @@ export declare const setOpenApiSourceBinding: import("effect/unstable/reactivity
|
|
|
112
257
|
readonly responseMode?: "decoded-only" | undefined;
|
|
113
258
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
114
259
|
}, import("../sdk").OpenApiSourceBindingRef, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
115
|
-
export declare const removeOpenApiSourceBinding:
|
|
260
|
+
export declare const removeOpenApiSourceBinding: Atom.AtomResultFn<{
|
|
116
261
|
readonly params: {
|
|
117
262
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
118
263
|
};
|
package/dist/react/client.d.ts
CHANGED
|
@@ -12,9 +12,11 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
12
12
|
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
13
13
|
}>]>>>;
|
|
14
14
|
}>>;
|
|
15
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../sdk").SpecPreview>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
15
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../sdk").SpecPreview>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addSpec", "POST", "/scopes/:scopeId/openapi/specs", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
16
16
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
17
17
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
18
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
19
|
+
readonly credentialTargetScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
18
20
|
readonly spec: import("effect/Schema").String;
|
|
19
21
|
readonly specFetchCredentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
20
22
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
@@ -29,37 +31,103 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
29
31
|
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
30
32
|
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
31
33
|
readonly namespace: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
32
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").
|
|
33
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
34
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
34
35
|
readonly secretId: import("effect/Schema").String;
|
|
35
36
|
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
38
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
39
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
40
|
+
readonly secretId: import("effect/Schema").String;
|
|
41
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
42
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
43
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
44
|
+
readonly slot: import("effect/Schema").String;
|
|
45
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
46
|
+
}>]>]>>>;
|
|
47
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
48
|
+
readonly secretId: import("effect/Schema").String;
|
|
49
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
50
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
51
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
52
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
53
|
+
readonly secretId: import("effect/Schema").String;
|
|
54
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
55
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
56
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
57
|
+
readonly slot: import("effect/Schema").String;
|
|
58
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
59
|
+
}>]>]>>>;
|
|
60
|
+
readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
61
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
62
|
+
readonly securitySchemeName: import("effect/Schema").String;
|
|
63
|
+
readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
64
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
65
|
+
readonly authorizationUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
66
|
+
readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
67
|
+
readonly clientIdSlot: import("effect/Schema").String;
|
|
68
|
+
readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
69
|
+
readonly connectionSlot: import("effect/Schema").String;
|
|
70
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
71
|
+
}>>;
|
|
38
72
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
39
73
|
readonly toolCount: import("effect/Schema").Number;
|
|
40
74
|
readonly namespace: import("effect/Schema").String;
|
|
41
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
75
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/openapi/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
42
76
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
43
77
|
namespace: import("effect/Schema").String;
|
|
44
|
-
}>>, 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<typeof import("../sdk/store").StoredSourceSchema>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
78
|
+
}>>, 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<typeof import("../sdk/store").StoredSourceSchema>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/openapi/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
45
79
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
46
80
|
namespace: import("effect/Schema").String;
|
|
47
81
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
82
|
+
readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
48
83
|
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
49
84
|
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
50
|
-
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").
|
|
51
|
-
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
85
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
52
86
|
readonly secretId: import("effect/Schema").String;
|
|
53
87
|
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
54
|
-
|
|
55
|
-
|
|
88
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
89
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
90
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
91
|
+
readonly secretId: import("effect/Schema").String;
|
|
92
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
93
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
94
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
95
|
+
readonly slot: import("effect/Schema").String;
|
|
96
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
97
|
+
}>]>]>>>;
|
|
98
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
99
|
+
readonly secretId: import("effect/Schema").String;
|
|
100
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
101
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
102
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
103
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
104
|
+
readonly secretId: import("effect/Schema").String;
|
|
105
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
106
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
107
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
108
|
+
readonly slot: import("effect/Schema").String;
|
|
109
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
110
|
+
}>]>]>>>;
|
|
111
|
+
readonly credentialTargetScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
112
|
+
readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
113
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
114
|
+
readonly securitySchemeName: import("effect/Schema").String;
|
|
115
|
+
readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
116
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
117
|
+
readonly authorizationUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
118
|
+
readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
119
|
+
readonly clientIdSlot: import("effect/Schema").String;
|
|
120
|
+
readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
121
|
+
readonly connectionSlot: import("effect/Schema").String;
|
|
122
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
123
|
+
}>>;
|
|
56
124
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
57
125
|
readonly updated: import("effect/Schema").Boolean;
|
|
58
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
126
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").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<import("effect/Schema").Struct<{
|
|
59
127
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
60
128
|
namespace: import("effect/Schema").String;
|
|
61
129
|
sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
62
|
-
}>>, 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").$Array<typeof import("../sdk").OpenApiSourceBindingRef>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
130
|
+
}>>, 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").$Array<typeof import("../sdk").OpenApiSourceBindingRef>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/openapi/source-bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
63
131
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
64
132
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
65
133
|
readonly sourceId: import("effect/Schema").String;
|
|
@@ -69,6 +137,7 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
69
137
|
readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
70
138
|
readonly kind: import("effect/Schema").Literal<"secret">;
|
|
71
139
|
readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
|
|
140
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
72
141
|
}>, import("effect/Schema").Struct<{
|
|
73
142
|
readonly kind: import("effect/Schema").Literal<"connection">;
|
|
74
143
|
readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
|
|
@@ -76,7 +145,7 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
76
145
|
readonly kind: import("effect/Schema").Literal<"text">;
|
|
77
146
|
readonly text: import("effect/Schema").String;
|
|
78
147
|
}>]>;
|
|
79
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../sdk").OpenApiSourceBindingRef>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
148
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../sdk").OpenApiSourceBindingRef>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/openapi/source-bindings/remove", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
80
149
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
81
150
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
82
151
|
readonly sourceId: import("effect/Schema").String;
|
|
@@ -85,4 +154,4 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
85
154
|
readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
86
155
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
87
156
|
readonly removed: import("effect/Schema").Boolean;
|
|
88
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/
|
|
157
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never>, false>>;
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export { openapiSchema, type OpenapiSchema, type OpenapiStore, type StoredOperat
|
|
|
6
6
|
export { previewSpec, SecurityScheme, AuthStrategy, HeaderPreset, OAuth2Preset, OAuth2Flows, OAuth2AuthorizationCodeFlow, OAuth2ClientCredentialsFlow, PreviewOperation, SpecPreview, } from "./preview";
|
|
7
7
|
export { DocResolver, resolveBaseUrl, substituteUrlVariables, preferredContent, } from "./openapi-utils";
|
|
8
8
|
export { OpenApiParseError, OpenApiExtractionError, OpenApiInvocationError, OpenApiOAuthError, } from "./errors";
|
|
9
|
-
export { EncodingObject, ExtractedOperation, ExtractionResult,
|
|
9
|
+
export { EncodingObject, ExtractedOperation, ExtractionResult, InvocationResult, MediaBinding, OAuth2SourceConfig, OpenApiSourceBindingInput, OpenApiSourceBindingRef, OpenApiSourceBindingValue, OperationBinding, OperationParameter, OperationRequestBody, ServerInfo, ServerVariable, OperationId, HttpMethod, ParameterLocation, } from "./types";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types";
|
|
2
2
|
import type { ParsedDocument } from "./parse";
|
|
3
|
+
import type { ServerVariable } from "./types";
|
|
3
4
|
export type ParameterObject = OpenAPIV3.ParameterObject | OpenAPIV3_1.ParameterObject;
|
|
4
5
|
export type OperationObject = OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject;
|
|
5
6
|
export type PathItemObject = OpenAPIV3.PathItemObject | OpenAPIV3_1.PathItemObject;
|
|
@@ -15,12 +16,12 @@ export declare class DocResolver {
|
|
|
15
16
|
}
|
|
16
17
|
/** Substitute `{var}` placeholders in a templated URL using a plain map. */
|
|
17
18
|
export declare const substituteUrlVariables: (url: string, values: Record<string, string>) => string;
|
|
19
|
+
export declare const OPENAPI_MAX_SERVER_VARIABLE_OPTIONS = 64;
|
|
18
20
|
type ServerLike = {
|
|
19
21
|
url: string;
|
|
20
|
-
variables: import("effect/Option").Option<Record<string,
|
|
21
|
-
default: string;
|
|
22
|
-
} | string>>;
|
|
22
|
+
variables: import("effect/Option").Option<Record<string, ServerVariable | string>>;
|
|
23
23
|
};
|
|
24
|
+
export declare const expandServerUrlOptions: (server: ServerLike, limit?: number) => readonly string[];
|
|
24
25
|
export declare const resolveBaseUrl: (servers: readonly ServerLike[]) => string;
|
|
25
26
|
/**
|
|
26
27
|
* Return all declared media entries in spec order. `Object.entries` on a
|
package/dist/sdk/parse.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare class OpenApiExtractionErrorFromParse extends OpenApiExtractionError {
|
|
|
14
14
|
* HttpClient so the caller chooses the transport via layer — in Cloudflare
|
|
15
15
|
* Workers, `FetchHttpClient.layer` binds to the Workers-native `fetch` and
|
|
16
16
|
* avoids json-schema-ref-parser's Node-polyfill http resolver, which hangs
|
|
17
|
-
* in production. Bounded by a
|
|
17
|
+
* in production. Bounded by a 60s timeout.
|
|
18
18
|
*/
|
|
19
19
|
export declare const fetchSpecText: (url: string, credentials?: SpecFetchCredentials | undefined) => Effect.Effect<string, OpenApiParseError, HttpClient.HttpClient>;
|
|
20
20
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|