@executor-js/plugin-openapi 0.0.2 → 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.
Files changed (41) hide show
  1. package/dist/AddOpenApiSource-EV3NJHLA.js +19 -0
  2. package/dist/AddOpenApiSource-EV3NJHLA.js.map +1 -0
  3. package/dist/EditOpenApiSource-J7NXCVT5.js +665 -0
  4. package/dist/EditOpenApiSource-J7NXCVT5.js.map +1 -0
  5. package/dist/OpenApiSourceSummary-K5WZD5NR.js +122 -0
  6. package/dist/OpenApiSourceSummary-K5WZD5NR.js.map +1 -0
  7. package/dist/api/group.d.ts +79 -10
  8. package/dist/api/index.d.ts +384 -0
  9. package/dist/chunk-2BXVRXGL.js +1345 -0
  10. package/dist/chunk-2BXVRXGL.js.map +1 -0
  11. package/dist/chunk-E4QUTDQ2.js +1120 -0
  12. package/dist/chunk-E4QUTDQ2.js.map +1 -0
  13. package/dist/chunk-LBTK5F65.js +216 -0
  14. package/dist/chunk-LBTK5F65.js.map +1 -0
  15. package/dist/chunk-TRD7KSKA.js +1444 -0
  16. package/dist/chunk-TRD7KSKA.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 +158 -13
  24. package/dist/react/client.d.ts +85 -349
  25. package/dist/react/plugin-client.d.ts +2 -0
  26. package/dist/react/source-plugin.d.ts +1 -1
  27. package/dist/sdk/index.d.ts +1 -1
  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 +154 -34
  32. package/dist/sdk/store.d.ts +132 -47
  33. package/dist/sdk/types.d.ts +19 -44
  34. package/dist/sdk/upstream-failures.test.d.ts +1 -0
  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-ZZ7TQ4JC.js +0 -2602
  41. package/dist/chunk-ZZ7TQ4JC.js.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import type { ScopeId } from "@executor-js/sdk/core";
2
- export declare const openApiSourceAtom: (scopeId: ScopeId, namespace: string) => import("effect/unstable/reactivity/Atom").Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<import("../sdk/store").StoredSourceSchema | null, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
3
- export declare const openApiSourceBindingsAtom: (scopeId: ScopeId, namespace: string, sourceScopeId: ScopeId) => import("effect/unstable/reactivity/Atom").Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<readonly import("../sdk").OpenApiSourceBindingRef[], import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
4
- export declare const previewOpenApiSpec: import("effect/unstable/reactivity/Atom").AtomResultFn<{
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: import("effect/unstable/reactivity/Atom").AtomResultFn<{
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?: import("../sdk").OAuth2Auth | import("../sdk").OAuth2SourceConfig | undefined;
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]: unknown;
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: import("effect/unstable/reactivity/Atom").AtomResultFn<{
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?: import("../sdk").OAuth2Auth | import("../sdk").OAuth2SourceConfig | undefined;
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]: unknown;
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 baseUrl?: string | undefined;
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: import("effect/unstable/reactivity/Atom").AtomResultFn<{
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: import("effect/unstable/reactivity/Atom").AtomResultFn<{
260
+ export declare const removeOpenApiSourceBinding: Atom.AtomResultFn<{
116
261
  readonly params: {
117
262
  readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
118
263
  };