@executor-js/plugin-openapi 1.4.28 → 1.4.30
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-FLMNI742.js → AddOpenApiSource-KSOMPQ2R.js} +4 -4
- package/dist/{EditOpenApiSource-I4NIGIIJ.js → EditOpenApiSource-AOA7APR2.js} +301 -192
- package/dist/EditOpenApiSource-AOA7APR2.js.map +1 -0
- package/dist/{OpenApiSourceSummary-CM46DB4L.js → OpenApiSourceSummary-Y3S6ZBOZ.js} +4 -4
- package/dist/OpenApiSourceSummary-Y3S6ZBOZ.js.map +1 -0
- package/dist/api/group.d.ts +124 -118
- package/dist/api/index.d.ts +148 -369
- package/dist/chunk-BB5IAKRG.js +136 -0
- package/dist/chunk-BB5IAKRG.js.map +1 -0
- package/dist/{chunk-E7PZ2QGD.js → chunk-EOXXE5DG.js} +17 -455
- package/dist/chunk-EOXXE5DG.js.map +1 -0
- package/dist/{chunk-OZ67JNID.js → chunk-NIKLYJ3X.js} +830 -319
- package/dist/chunk-NIKLYJ3X.js.map +1 -0
- package/dist/{chunk-TGDT6QCH.js → chunk-YJMXYKYX.js} +178 -117
- package/dist/chunk-YJMXYKYX.js.map +1 -0
- package/dist/{chunk-GFQUEZUW.js → chunk-ZZBTLFTA.js} +78 -93
- package/dist/chunk-ZZBTLFTA.js.map +1 -0
- package/dist/client.js +7 -137
- package/dist/client.js.map +1 -1
- package/dist/core.js +5 -10
- package/dist/index.js +3 -2
- package/dist/react/atoms.d.ts +83 -223
- package/dist/react/client.d.ts +123 -117
- package/dist/sdk/credential-status.d.ts +3 -3
- package/dist/sdk/extract.d.ts +19 -19
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/invoke.d.ts +7 -7
- package/dist/sdk/parse.d.ts +2 -3
- package/dist/sdk/plugin.d.ts +181 -275
- package/dist/sdk/preview.d.ts +12 -12
- package/dist/sdk/source-contracts.d.ts +55 -0
- package/dist/sdk/store.d.ts +6 -269
- package/dist/sdk/types.d.ts +16 -65
- package/dist/testing/index.d.ts +149 -11
- package/dist/testing.js +419 -33
- package/dist/testing.js.map +1 -1
- package/dist/testing.test.d.ts +1 -0
- package/package.json +3 -4
- package/dist/EditOpenApiSource-I4NIGIIJ.js.map +0 -1
- package/dist/OpenApiSourceSummary-CM46DB4L.js.map +0 -1
- package/dist/chunk-E7PZ2QGD.js.map +0 -1
- package/dist/chunk-GFQUEZUW.js.map +0 -1
- package/dist/chunk-OZ67JNID.js.map +0 -1
- package/dist/chunk-TGDT6QCH.js.map +0 -1
- /package/dist/{AddOpenApiSource-FLMNI742.js.map → AddOpenApiSource-KSOMPQ2R.js.map} +0 -0
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { Effect, Option } from "effect";
|
|
1
|
+
import { Effect, Option, Schema } from "effect";
|
|
2
2
|
import type { Layer } from "effect";
|
|
3
3
|
import { HttpClient } from "effect/unstable/http";
|
|
4
|
-
import { type StorageFailure } from "@executor-js/sdk/core";
|
|
4
|
+
import { CredentialBindingRef, type StorageFailure } from "@executor-js/sdk/core";
|
|
5
5
|
import { type ConfigFileSink } from "@executor-js/config";
|
|
6
6
|
import { OpenApiExtractionError, OpenApiOAuthError, OpenApiParseError } from "./errors";
|
|
7
|
-
import { SpecPreview } from "./preview";
|
|
7
|
+
import { type SpecPreview } from "./preview";
|
|
8
8
|
import { type OpenapiStore, type SourceConfig, type StoredSource } from "./store";
|
|
9
|
-
import { OAuth2SourceConfig,
|
|
9
|
+
import { OAuth2SourceConfig, type ConfiguredHeaderValue as ConfiguredHeaderValueValue, type HeaderValue as HeaderValueValue } from "./types";
|
|
10
10
|
export type HeaderValue = HeaderValueValue;
|
|
11
11
|
export type ConfiguredHeaderValue = ConfiguredHeaderValueValue;
|
|
12
|
-
export type OpenApiHeaderInput = HeaderValue | ConfiguredHeaderValue;
|
|
13
|
-
export type OpenApiCredentialInput = OpenApiCredentialInputValue;
|
|
14
12
|
export type OpenApiOAuthInput = OAuth2SourceConfig;
|
|
13
|
+
export type OpenApiSpecInput = typeof OpenApiSpecInputSchema.Type;
|
|
14
|
+
export type OpenApiSecretShapeInput = typeof OpenApiSecretShapeInputSchema.Type;
|
|
15
|
+
export type OpenApiConfiguredValueInput = string | OpenApiSecretShapeInput | ConfiguredHeaderValueValue;
|
|
15
16
|
export interface OpenApiSpecFetchCredentialsInput {
|
|
17
|
+
readonly headers?: Record<string, OpenApiConfiguredValueInput>;
|
|
18
|
+
readonly queryParams?: Record<string, OpenApiConfiguredValueInput>;
|
|
19
|
+
}
|
|
20
|
+
export interface OpenApiPreviewSpecFetchCredentialsInput {
|
|
16
21
|
readonly headers?: Record<string, HeaderValue>;
|
|
17
22
|
readonly queryParams?: Record<string, HeaderValue>;
|
|
18
23
|
}
|
|
19
24
|
export interface OpenApiPreviewInput {
|
|
20
25
|
readonly spec: string;
|
|
21
|
-
readonly specFetchCredentials?:
|
|
26
|
+
readonly specFetchCredentials?: OpenApiPreviewSpecFetchCredentialsInput;
|
|
22
27
|
}
|
|
23
28
|
export interface OpenApiSpecConfig {
|
|
24
|
-
readonly spec:
|
|
29
|
+
readonly spec: OpenApiSpecInput;
|
|
25
30
|
readonly specFetchCredentials?: OpenApiSpecFetchCredentialsInput;
|
|
26
31
|
/**
|
|
27
32
|
* Executor scope id that owns this source row. Must be one of the
|
|
@@ -30,24 +35,30 @@ export interface OpenApiSpecConfig {
|
|
|
30
35
|
* every inner (per-user) scope via fall-through reads.
|
|
31
36
|
*/
|
|
32
37
|
readonly scope: string;
|
|
33
|
-
readonly name
|
|
34
|
-
readonly baseUrl
|
|
35
|
-
readonly namespace
|
|
36
|
-
readonly headers?: Record<string,
|
|
37
|
-
readonly queryParams?: Record<string,
|
|
38
|
+
readonly name: string;
|
|
39
|
+
readonly baseUrl: string;
|
|
40
|
+
readonly namespace: string;
|
|
41
|
+
readonly headers?: Record<string, OpenApiConfiguredValueInput>;
|
|
42
|
+
readonly queryParams?: Record<string, OpenApiConfiguredValueInput>;
|
|
38
43
|
readonly oauth2?: OpenApiOAuthInput;
|
|
39
|
-
readonly credentialTargetScope?: string;
|
|
40
44
|
}
|
|
41
|
-
export interface
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly headers?: Record<string, OpenApiCredentialInput>;
|
|
45
|
-
readonly queryParams?: Record<string, OpenApiCredentialInput>;
|
|
46
|
-
readonly credentialTargetScope?: string;
|
|
47
|
-
/** Refresh the source's stored OAuth2 metadata after a successful
|
|
48
|
-
* re-authenticate. */
|
|
49
|
-
readonly oauth2?: OpenApiOAuthInput;
|
|
45
|
+
export interface OpenApiSourceRef {
|
|
46
|
+
readonly id: string;
|
|
47
|
+
readonly scope: string;
|
|
50
48
|
}
|
|
49
|
+
export type OpenApiConfigureCredentialInput = string | {
|
|
50
|
+
readonly kind: "text";
|
|
51
|
+
readonly text: string;
|
|
52
|
+
readonly prefix?: string;
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "secret";
|
|
55
|
+
readonly secretId: string;
|
|
56
|
+
readonly secretScope?: string;
|
|
57
|
+
readonly prefix?: string;
|
|
58
|
+
} | {
|
|
59
|
+
readonly kind: "connection";
|
|
60
|
+
readonly connectionId: string;
|
|
61
|
+
};
|
|
51
62
|
/**
|
|
52
63
|
* Errors any OpenAPI extension method may surface. The first three are
|
|
53
64
|
* plugin-domain tagged errors that flow directly to clients (4xx, each
|
|
@@ -67,11 +78,132 @@ export interface OpenApiPluginExtension {
|
|
|
67
78
|
}, OpenApiParseError | OpenApiExtractionError | OpenApiOAuthError | StorageFailure>;
|
|
68
79
|
readonly removeSpec: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
69
80
|
readonly getSource: (namespace: string, scope: string) => Effect.Effect<StoredSource | null, StorageFailure>;
|
|
70
|
-
readonly
|
|
71
|
-
readonly listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly OpenApiSourceBindingRef[], StorageFailure>;
|
|
72
|
-
readonly setSourceBinding: (input: OpenApiSourceBindingInput) => Effect.Effect<OpenApiSourceBindingRef, StorageFailure>;
|
|
73
|
-
readonly removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
81
|
+
readonly configure: (source: OpenApiSourceRef, input: OpenApiConfigureInput) => Effect.Effect<readonly CredentialBindingRef[], StorageFailure>;
|
|
74
82
|
}
|
|
83
|
+
declare const OpenApiSpecInputSchema: Schema.Union<readonly [Schema.Struct<{
|
|
84
|
+
readonly kind: Schema.Literal<"url">;
|
|
85
|
+
readonly url: Schema.String;
|
|
86
|
+
}>, Schema.Struct<{
|
|
87
|
+
readonly kind: Schema.Literal<"blob">;
|
|
88
|
+
readonly value: Schema.String;
|
|
89
|
+
}>]>;
|
|
90
|
+
declare const OpenApiSecretShapeInputSchema: Schema.Struct<{
|
|
91
|
+
readonly kind: Schema.Literal<"secret">;
|
|
92
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
93
|
+
}>;
|
|
94
|
+
declare const OpenApiConfigureInputSchema: Schema.Struct<{
|
|
95
|
+
readonly scope: Schema.String;
|
|
96
|
+
readonly name: Schema.optional<Schema.String>;
|
|
97
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
98
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
99
|
+
readonly kind: Schema.Literal<"text">;
|
|
100
|
+
readonly text: Schema.String;
|
|
101
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
102
|
+
}>, Schema.Struct<{
|
|
103
|
+
readonly kind: Schema.Literal<"secret">;
|
|
104
|
+
readonly secretId: Schema.String;
|
|
105
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
106
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
107
|
+
}>, Schema.Struct<{
|
|
108
|
+
readonly kind: Schema.Literal<"connection">;
|
|
109
|
+
readonly connectionId: Schema.String;
|
|
110
|
+
}>]>>>;
|
|
111
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
112
|
+
readonly kind: Schema.Literal<"text">;
|
|
113
|
+
readonly text: Schema.String;
|
|
114
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
115
|
+
}>, Schema.Struct<{
|
|
116
|
+
readonly kind: Schema.Literal<"secret">;
|
|
117
|
+
readonly secretId: Schema.String;
|
|
118
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
119
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
120
|
+
}>, Schema.Struct<{
|
|
121
|
+
readonly kind: Schema.Literal<"connection">;
|
|
122
|
+
readonly connectionId: Schema.String;
|
|
123
|
+
}>]>>>;
|
|
124
|
+
readonly specFetchCredentials: Schema.optional<Schema.Struct<{
|
|
125
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
126
|
+
readonly kind: Schema.Literal<"text">;
|
|
127
|
+
readonly text: Schema.String;
|
|
128
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
129
|
+
}>, Schema.Struct<{
|
|
130
|
+
readonly kind: Schema.Literal<"secret">;
|
|
131
|
+
readonly secretId: Schema.String;
|
|
132
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
133
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
134
|
+
}>, Schema.Struct<{
|
|
135
|
+
readonly kind: Schema.Literal<"connection">;
|
|
136
|
+
readonly connectionId: Schema.String;
|
|
137
|
+
}>]>>>;
|
|
138
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
139
|
+
readonly kind: Schema.Literal<"text">;
|
|
140
|
+
readonly text: Schema.String;
|
|
141
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
142
|
+
}>, Schema.Struct<{
|
|
143
|
+
readonly kind: Schema.Literal<"secret">;
|
|
144
|
+
readonly secretId: Schema.String;
|
|
145
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
146
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
147
|
+
}>, Schema.Struct<{
|
|
148
|
+
readonly kind: Schema.Literal<"connection">;
|
|
149
|
+
readonly connectionId: Schema.String;
|
|
150
|
+
}>]>>>;
|
|
151
|
+
}>>;
|
|
152
|
+
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
153
|
+
readonly clientId: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
154
|
+
readonly kind: Schema.Literal<"text">;
|
|
155
|
+
readonly text: Schema.String;
|
|
156
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
157
|
+
}>, Schema.Struct<{
|
|
158
|
+
readonly kind: Schema.Literal<"secret">;
|
|
159
|
+
readonly secretId: Schema.String;
|
|
160
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
161
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
162
|
+
}>, Schema.Struct<{
|
|
163
|
+
readonly kind: Schema.Literal<"connection">;
|
|
164
|
+
readonly connectionId: Schema.String;
|
|
165
|
+
}>]>>;
|
|
166
|
+
readonly clientSecret: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
167
|
+
readonly kind: Schema.Literal<"text">;
|
|
168
|
+
readonly text: Schema.String;
|
|
169
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
170
|
+
}>, Schema.Struct<{
|
|
171
|
+
readonly kind: Schema.Literal<"secret">;
|
|
172
|
+
readonly secretId: Schema.String;
|
|
173
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
174
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
175
|
+
}>, Schema.Struct<{
|
|
176
|
+
readonly kind: Schema.Literal<"connection">;
|
|
177
|
+
readonly connectionId: Schema.String;
|
|
178
|
+
}>]>>;
|
|
179
|
+
readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
180
|
+
readonly kind: Schema.Literal<"text">;
|
|
181
|
+
readonly text: Schema.String;
|
|
182
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
183
|
+
}>, Schema.Struct<{
|
|
184
|
+
readonly kind: Schema.Literal<"secret">;
|
|
185
|
+
readonly secretId: Schema.String;
|
|
186
|
+
readonly secretScope: Schema.optional<Schema.String>;
|
|
187
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
188
|
+
}>, Schema.Struct<{
|
|
189
|
+
readonly kind: Schema.Literal<"connection">;
|
|
190
|
+
readonly connectionId: Schema.String;
|
|
191
|
+
}>]>>;
|
|
192
|
+
}>>;
|
|
193
|
+
readonly oauth2Source: Schema.optional<Schema.Struct<{
|
|
194
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
195
|
+
readonly securitySchemeName: Schema.String;
|
|
196
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
197
|
+
readonly tokenUrl: Schema.String;
|
|
198
|
+
readonly authorizationUrl: Schema.withDecodingDefault<Schema.optional<Schema.NullOr<Schema.String>>>;
|
|
199
|
+
readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
200
|
+
readonly clientIdSlot: Schema.String;
|
|
201
|
+
readonly clientSecretSlot: Schema.NullOr<Schema.String>;
|
|
202
|
+
readonly connectionSlot: Schema.String;
|
|
203
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
204
|
+
}>>;
|
|
205
|
+
}>;
|
|
206
|
+
export type OpenApiConfigureInput = typeof OpenApiConfigureInputSchema.Type;
|
|
75
207
|
export interface OpenApiPluginOptions {
|
|
76
208
|
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient, never, never>;
|
|
77
209
|
/** If provided, source add/remove is mirrored to executor.jsonc
|
|
@@ -80,28 +212,36 @@ export interface OpenApiPluginOptions {
|
|
|
80
212
|
}
|
|
81
213
|
export declare const openApiPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"openapi", {
|
|
82
214
|
previewSpec: (input: string | OpenApiPreviewInput) => Effect.Effect<{
|
|
215
|
+
readonly version: Option.Option<string>;
|
|
216
|
+
readonly operations: readonly {
|
|
217
|
+
readonly summary: Option.Option<string>;
|
|
218
|
+
readonly method: "post" | "options" | "delete" | "get" | "put" | "head" | "patch" | "trace";
|
|
219
|
+
readonly deprecated: boolean;
|
|
220
|
+
readonly path: string;
|
|
221
|
+
readonly tags: readonly string[];
|
|
222
|
+
readonly operationId: string;
|
|
223
|
+
}[];
|
|
83
224
|
readonly title: Option.Option<string>;
|
|
84
225
|
readonly servers: readonly {
|
|
85
226
|
readonly url: string;
|
|
86
227
|
readonly description: Option.Option<string>;
|
|
87
228
|
readonly variables: Option.Option<{
|
|
88
229
|
readonly [x: string]: {
|
|
89
|
-
readonly description: Option.Option<string>;
|
|
90
230
|
readonly default: string;
|
|
231
|
+
readonly description: Option.Option<string>;
|
|
91
232
|
readonly enum: Option.Option<readonly string[]>;
|
|
92
233
|
};
|
|
93
234
|
}>;
|
|
94
235
|
}[];
|
|
95
236
|
readonly tags: readonly string[];
|
|
96
|
-
readonly version: Option.Option<string>;
|
|
97
237
|
readonly securitySchemes: readonly {
|
|
238
|
+
readonly name: string;
|
|
98
239
|
readonly type: "oauth2" | "http" | "apiKey" | "openIdConnect";
|
|
99
240
|
readonly in: Option.Option<"query" | "header" | "cookie">;
|
|
100
|
-
readonly name: string;
|
|
101
241
|
readonly description: Option.Option<string>;
|
|
242
|
+
readonly headerName: Option.Option<string>;
|
|
102
243
|
readonly scheme: Option.Option<string>;
|
|
103
244
|
readonly bearerFormat: Option.Option<string>;
|
|
104
|
-
readonly headerName: Option.Option<string>;
|
|
105
245
|
readonly flows: Option.Option<{
|
|
106
246
|
readonly authorizationCode: Option.Option<{
|
|
107
247
|
readonly scopes: {
|
|
@@ -121,14 +261,6 @@ export declare const openApiPlugin: import("@executor-js/sdk/core").ConfiguredPl
|
|
|
121
261
|
}>;
|
|
122
262
|
readonly openIdConnectUrl: Option.Option<string>;
|
|
123
263
|
}[];
|
|
124
|
-
readonly operations: readonly {
|
|
125
|
-
readonly method: "delete" | "options" | "get" | "put" | "post" | "head" | "patch" | "trace";
|
|
126
|
-
readonly tags: readonly string[];
|
|
127
|
-
readonly summary: Option.Option<string>;
|
|
128
|
-
readonly operationId: string;
|
|
129
|
-
readonly deprecated: boolean;
|
|
130
|
-
readonly path: string;
|
|
131
|
-
}[];
|
|
132
264
|
readonly authStrategies: readonly {
|
|
133
265
|
readonly schemes: readonly string[];
|
|
134
266
|
}[];
|
|
@@ -163,252 +295,26 @@ export declare const openApiPlugin: import("@executor-js/sdk/core").ConfiguredPl
|
|
|
163
295
|
scope: string;
|
|
164
296
|
name: string;
|
|
165
297
|
} | null, StorageFailure, never>;
|
|
166
|
-
|
|
167
|
-
listSourceBindings: (sourceId: string, sourceScope: string) => Effect.Effect<readonly {
|
|
298
|
+
configure: (source: OpenApiSourceRef, input: OpenApiConfigureInput) => Effect.Effect<readonly {
|
|
168
299
|
readonly value: {
|
|
169
|
-
readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
|
|
170
|
-
readonly kind: "secret";
|
|
171
|
-
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
172
|
-
} | {
|
|
173
|
-
readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
|
|
174
|
-
readonly kind: "connection";
|
|
175
|
-
} | {
|
|
176
300
|
readonly text: string;
|
|
177
301
|
readonly kind: "text";
|
|
178
|
-
}
|
|
179
|
-
readonly createdAt: Date;
|
|
180
|
-
readonly sourceId: string;
|
|
181
|
-
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
182
|
-
readonly updatedAt: Date;
|
|
183
|
-
readonly slot: string;
|
|
184
|
-
readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
185
|
-
}[], StorageFailure, never>;
|
|
186
|
-
setSourceBinding: (input: OpenApiSourceBindingInput) => Effect.Effect<{
|
|
187
|
-
readonly value: {
|
|
302
|
+
} | {
|
|
188
303
|
readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
|
|
189
304
|
readonly kind: "secret";
|
|
190
305
|
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
191
306
|
} | {
|
|
192
307
|
readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
|
|
193
308
|
readonly kind: "connection";
|
|
194
|
-
} | {
|
|
195
|
-
readonly text: string;
|
|
196
|
-
readonly kind: "text";
|
|
197
309
|
};
|
|
198
|
-
readonly
|
|
199
|
-
readonly sourceId: string;
|
|
310
|
+
readonly id: string & import("effect/Brand").Brand<"CredentialBindingId">;
|
|
200
311
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
312
|
+
readonly createdAt: Date;
|
|
201
313
|
readonly updatedAt: Date;
|
|
202
|
-
readonly
|
|
314
|
+
readonly pluginId: string;
|
|
315
|
+
readonly sourceId: string;
|
|
203
316
|
readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}, OpenapiStore, OpenApiPluginOptions, {
|
|
207
|
-
|
|
208
|
-
readonly fields: {
|
|
209
|
-
readonly id: {
|
|
210
|
-
readonly type: "string";
|
|
211
|
-
readonly required: true;
|
|
212
|
-
};
|
|
213
|
-
readonly scope_id: {
|
|
214
|
-
readonly type: "string";
|
|
215
|
-
readonly required: true;
|
|
216
|
-
readonly index: true;
|
|
217
|
-
};
|
|
218
|
-
readonly name: {
|
|
219
|
-
readonly type: "string";
|
|
220
|
-
readonly required: true;
|
|
221
|
-
};
|
|
222
|
-
readonly spec: {
|
|
223
|
-
readonly type: "string";
|
|
224
|
-
readonly required: true;
|
|
225
|
-
};
|
|
226
|
-
readonly source_url: {
|
|
227
|
-
readonly type: "string";
|
|
228
|
-
readonly required: false;
|
|
229
|
-
};
|
|
230
|
-
readonly base_url: {
|
|
231
|
-
readonly type: "string";
|
|
232
|
-
readonly required: false;
|
|
233
|
-
};
|
|
234
|
-
readonly oauth2: {
|
|
235
|
-
readonly type: "json";
|
|
236
|
-
readonly required: false;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
readonly openapi_operation: {
|
|
241
|
-
readonly fields: {
|
|
242
|
-
readonly id: {
|
|
243
|
-
readonly type: "string";
|
|
244
|
-
readonly required: true;
|
|
245
|
-
};
|
|
246
|
-
readonly scope_id: {
|
|
247
|
-
readonly type: "string";
|
|
248
|
-
readonly required: true;
|
|
249
|
-
readonly index: true;
|
|
250
|
-
};
|
|
251
|
-
readonly source_id: {
|
|
252
|
-
readonly type: "string";
|
|
253
|
-
readonly required: true;
|
|
254
|
-
readonly index: true;
|
|
255
|
-
};
|
|
256
|
-
readonly binding: {
|
|
257
|
-
readonly type: "json";
|
|
258
|
-
readonly required: true;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
readonly openapi_source_header: {
|
|
263
|
-
readonly fields: {
|
|
264
|
-
readonly id: {
|
|
265
|
-
readonly type: "string";
|
|
266
|
-
readonly required: true;
|
|
267
|
-
};
|
|
268
|
-
readonly scope_id: {
|
|
269
|
-
readonly type: "string";
|
|
270
|
-
readonly required: true;
|
|
271
|
-
readonly index: true;
|
|
272
|
-
};
|
|
273
|
-
readonly source_id: {
|
|
274
|
-
readonly type: "string";
|
|
275
|
-
readonly required: true;
|
|
276
|
-
readonly index: true;
|
|
277
|
-
};
|
|
278
|
-
readonly name: {
|
|
279
|
-
readonly type: "string";
|
|
280
|
-
readonly required: true;
|
|
281
|
-
};
|
|
282
|
-
readonly kind: {
|
|
283
|
-
readonly type: ["text", "binding"];
|
|
284
|
-
readonly required: true;
|
|
285
|
-
};
|
|
286
|
-
readonly text_value: {
|
|
287
|
-
readonly type: "string";
|
|
288
|
-
readonly required: false;
|
|
289
|
-
};
|
|
290
|
-
readonly slot_key: {
|
|
291
|
-
readonly type: "string";
|
|
292
|
-
readonly required: false;
|
|
293
|
-
};
|
|
294
|
-
readonly prefix: {
|
|
295
|
-
readonly type: "string";
|
|
296
|
-
readonly required: false;
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
readonly openapi_source_query_param: {
|
|
301
|
-
readonly fields: {
|
|
302
|
-
readonly id: {
|
|
303
|
-
readonly type: "string";
|
|
304
|
-
readonly required: true;
|
|
305
|
-
};
|
|
306
|
-
readonly scope_id: {
|
|
307
|
-
readonly type: "string";
|
|
308
|
-
readonly required: true;
|
|
309
|
-
readonly index: true;
|
|
310
|
-
};
|
|
311
|
-
readonly source_id: {
|
|
312
|
-
readonly type: "string";
|
|
313
|
-
readonly required: true;
|
|
314
|
-
readonly index: true;
|
|
315
|
-
};
|
|
316
|
-
readonly name: {
|
|
317
|
-
readonly type: "string";
|
|
318
|
-
readonly required: true;
|
|
319
|
-
};
|
|
320
|
-
readonly kind: {
|
|
321
|
-
readonly type: ["text", "binding"];
|
|
322
|
-
readonly required: true;
|
|
323
|
-
};
|
|
324
|
-
readonly text_value: {
|
|
325
|
-
readonly type: "string";
|
|
326
|
-
readonly required: false;
|
|
327
|
-
};
|
|
328
|
-
readonly slot_key: {
|
|
329
|
-
readonly type: "string";
|
|
330
|
-
readonly required: false;
|
|
331
|
-
};
|
|
332
|
-
readonly prefix: {
|
|
333
|
-
readonly type: "string";
|
|
334
|
-
readonly required: false;
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
readonly openapi_source_spec_fetch_header: {
|
|
339
|
-
readonly fields: {
|
|
340
|
-
readonly id: {
|
|
341
|
-
readonly type: "string";
|
|
342
|
-
readonly required: true;
|
|
343
|
-
};
|
|
344
|
-
readonly scope_id: {
|
|
345
|
-
readonly type: "string";
|
|
346
|
-
readonly required: true;
|
|
347
|
-
readonly index: true;
|
|
348
|
-
};
|
|
349
|
-
readonly source_id: {
|
|
350
|
-
readonly type: "string";
|
|
351
|
-
readonly required: true;
|
|
352
|
-
readonly index: true;
|
|
353
|
-
};
|
|
354
|
-
readonly name: {
|
|
355
|
-
readonly type: "string";
|
|
356
|
-
readonly required: true;
|
|
357
|
-
};
|
|
358
|
-
readonly kind: {
|
|
359
|
-
readonly type: ["text", "binding"];
|
|
360
|
-
readonly required: true;
|
|
361
|
-
};
|
|
362
|
-
readonly text_value: {
|
|
363
|
-
readonly type: "string";
|
|
364
|
-
readonly required: false;
|
|
365
|
-
};
|
|
366
|
-
readonly slot_key: {
|
|
367
|
-
readonly type: "string";
|
|
368
|
-
readonly required: false;
|
|
369
|
-
};
|
|
370
|
-
readonly prefix: {
|
|
371
|
-
readonly type: "string";
|
|
372
|
-
readonly required: false;
|
|
373
|
-
};
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
readonly openapi_source_spec_fetch_query_param: {
|
|
377
|
-
readonly fields: {
|
|
378
|
-
readonly id: {
|
|
379
|
-
readonly type: "string";
|
|
380
|
-
readonly required: true;
|
|
381
|
-
};
|
|
382
|
-
readonly scope_id: {
|
|
383
|
-
readonly type: "string";
|
|
384
|
-
readonly required: true;
|
|
385
|
-
readonly index: true;
|
|
386
|
-
};
|
|
387
|
-
readonly source_id: {
|
|
388
|
-
readonly type: "string";
|
|
389
|
-
readonly required: true;
|
|
390
|
-
readonly index: true;
|
|
391
|
-
};
|
|
392
|
-
readonly name: {
|
|
393
|
-
readonly type: "string";
|
|
394
|
-
readonly required: true;
|
|
395
|
-
};
|
|
396
|
-
readonly kind: {
|
|
397
|
-
readonly type: ["text", "binding"];
|
|
398
|
-
readonly required: true;
|
|
399
|
-
};
|
|
400
|
-
readonly text_value: {
|
|
401
|
-
readonly type: "string";
|
|
402
|
-
readonly required: false;
|
|
403
|
-
};
|
|
404
|
-
readonly slot_key: {
|
|
405
|
-
readonly type: "string";
|
|
406
|
-
readonly required: false;
|
|
407
|
-
};
|
|
408
|
-
readonly prefix: {
|
|
409
|
-
readonly type: "string";
|
|
410
|
-
readonly required: false;
|
|
411
|
-
};
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
}, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
317
|
+
readonly slotKey: string;
|
|
318
|
+
}[], StorageFailure, never>;
|
|
319
|
+
}, OpenapiStore, OpenApiPluginOptions, {}, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
320
|
+
export {};
|
package/dist/sdk/preview.d.ts
CHANGED
|
@@ -190,28 +190,36 @@ export type SpecPreview = typeof SpecPreview.Type;
|
|
|
190
190
|
/** Preview an OpenAPI spec — extract metadata without registering anything.
|
|
191
191
|
* Accepts either a URL or raw JSON/YAML text. */
|
|
192
192
|
export declare const previewSpec: (input: string) => Effect.Effect<{
|
|
193
|
+
readonly version: Option.Option<string>;
|
|
194
|
+
readonly operations: readonly {
|
|
195
|
+
readonly summary: Option.Option<string>;
|
|
196
|
+
readonly method: "post" | "options" | "delete" | "get" | "put" | "head" | "patch" | "trace";
|
|
197
|
+
readonly deprecated: boolean;
|
|
198
|
+
readonly path: string;
|
|
199
|
+
readonly tags: readonly string[];
|
|
200
|
+
readonly operationId: string;
|
|
201
|
+
}[];
|
|
193
202
|
readonly title: Option.Option<string>;
|
|
194
203
|
readonly servers: readonly {
|
|
195
204
|
readonly url: string;
|
|
196
205
|
readonly description: Option.Option<string>;
|
|
197
206
|
readonly variables: Option.Option<{
|
|
198
207
|
readonly [x: string]: {
|
|
199
|
-
readonly description: Option.Option<string>;
|
|
200
208
|
readonly default: string;
|
|
209
|
+
readonly description: Option.Option<string>;
|
|
201
210
|
readonly enum: Option.Option<readonly string[]>;
|
|
202
211
|
};
|
|
203
212
|
}>;
|
|
204
213
|
}[];
|
|
205
214
|
readonly tags: readonly string[];
|
|
206
|
-
readonly version: Option.Option<string>;
|
|
207
215
|
readonly securitySchemes: readonly {
|
|
216
|
+
readonly name: string;
|
|
208
217
|
readonly type: "oauth2" | "http" | "apiKey" | "openIdConnect";
|
|
209
218
|
readonly in: Option.Option<"query" | "header" | "cookie">;
|
|
210
|
-
readonly name: string;
|
|
211
219
|
readonly description: Option.Option<string>;
|
|
220
|
+
readonly headerName: Option.Option<string>;
|
|
212
221
|
readonly scheme: Option.Option<string>;
|
|
213
222
|
readonly bearerFormat: Option.Option<string>;
|
|
214
|
-
readonly headerName: Option.Option<string>;
|
|
215
223
|
readonly flows: Option.Option<{
|
|
216
224
|
readonly authorizationCode: Option.Option<{
|
|
217
225
|
readonly scopes: {
|
|
@@ -231,14 +239,6 @@ export declare const previewSpec: (input: string) => Effect.Effect<{
|
|
|
231
239
|
}>;
|
|
232
240
|
readonly openIdConnectUrl: Option.Option<string>;
|
|
233
241
|
}[];
|
|
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
242
|
readonly authStrategies: readonly {
|
|
243
243
|
readonly schemes: readonly string[];
|
|
244
244
|
}[];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const StoredSourceSchema: Schema.Struct<{
|
|
3
|
+
readonly namespace: Schema.String;
|
|
4
|
+
readonly scope: Schema.String;
|
|
5
|
+
readonly name: Schema.String;
|
|
6
|
+
readonly config: Schema.Struct<{
|
|
7
|
+
readonly spec: Schema.optional<Schema.String>;
|
|
8
|
+
readonly sourceUrl: Schema.optional<Schema.String>;
|
|
9
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
10
|
+
readonly namespace: Schema.optional<Schema.String>;
|
|
11
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
12
|
+
readonly kind: Schema.Literal<"binding">;
|
|
13
|
+
readonly slot: Schema.String;
|
|
14
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
15
|
+
}>]>>>;
|
|
16
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
17
|
+
readonly kind: Schema.Literal<"binding">;
|
|
18
|
+
readonly slot: Schema.String;
|
|
19
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
20
|
+
}>]>>>;
|
|
21
|
+
readonly specFetchCredentials: Schema.optional<Schema.Struct<{
|
|
22
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
23
|
+
readonly kind: Schema.Literal<"binding">;
|
|
24
|
+
readonly slot: Schema.String;
|
|
25
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
26
|
+
}>]>>>;
|
|
27
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
28
|
+
readonly kind: Schema.Literal<"binding">;
|
|
29
|
+
readonly slot: Schema.String;
|
|
30
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
31
|
+
}>]>>>;
|
|
32
|
+
}>>;
|
|
33
|
+
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
34
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
35
|
+
readonly securitySchemeName: Schema.String;
|
|
36
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
37
|
+
readonly tokenUrl: Schema.String;
|
|
38
|
+
readonly authorizationUrl: Schema.withDecodingDefault<Schema.optional<Schema.NullOr<Schema.String>>>;
|
|
39
|
+
readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
40
|
+
readonly clientIdSlot: Schema.String;
|
|
41
|
+
readonly clientSecretSlot: Schema.NullOr<Schema.String>;
|
|
42
|
+
readonly connectionSlot: Schema.String;
|
|
43
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
44
|
+
}>>;
|
|
45
|
+
}>;
|
|
46
|
+
}>;
|
|
47
|
+
export type StoredSourceSchema = typeof StoredSourceSchema.Type;
|
|
48
|
+
export type StoredSourceSchemaType = typeof StoredSourceSchema.Type;
|
|
49
|
+
export declare const headerBindingSlot: (headerName: string) => string;
|
|
50
|
+
export declare const queryParamBindingSlot: (name: string) => string;
|
|
51
|
+
export declare const specFetchHeaderBindingSlot: (headerName: string) => string;
|
|
52
|
+
export declare const specFetchQueryParamBindingSlot: (name: string) => string;
|
|
53
|
+
export declare const oauth2ClientIdSlot: (securitySchemeName: string) => string;
|
|
54
|
+
export declare const oauth2ClientSecretSlot: (securitySchemeName: string) => string;
|
|
55
|
+
export declare const oauth2ConnectionSlot: (securitySchemeName: string) => string;
|