@executor-js/plugin-openapi 0.2.1 → 1.4.21
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 → AddOpenApiSource-FLMNI742.js} +4 -4
- package/dist/{EditOpenApiSource-J7NXCVT5.js → EditOpenApiSource-I4NIGIIJ.js} +8 -8
- package/dist/EditOpenApiSource-I4NIGIIJ.js.map +1 -0
- package/dist/{OpenApiSourceSummary-K5WZD5NR.js → OpenApiSourceSummary-CM46DB4L.js} +3 -3
- package/dist/api/group.d.ts +146 -7
- package/dist/api/index.d.ts +257 -7
- package/dist/{chunk-2BXVRXGL.js → chunk-E7PZ2QGD.js} +70 -112
- package/dist/chunk-E7PZ2QGD.js.map +1 -0
- package/dist/{chunk-LBTK5F65.js → chunk-GFQUEZUW.js} +7 -7
- package/dist/chunk-GFQUEZUW.js.map +1 -0
- package/dist/{chunk-TRD7KSKA.js → chunk-OZ67JNID.js} +11 -8
- package/dist/chunk-OZ67JNID.js.map +1 -0
- package/dist/{chunk-E4QUTDQ2.js → chunk-TGDT6QCH.js} +11 -11
- package/dist/chunk-TGDT6QCH.js.map +1 -0
- package/dist/client.js +3 -3
- package/dist/core.js +2 -2
- package/dist/index.js +2 -2
- package/dist/react/atoms.d.ts +164 -4
- package/dist/react/client.d.ts +146 -4
- package/dist/sdk/extract.d.ts +54 -3
- package/dist/sdk/invoke.d.ts +48 -4
- package/dist/sdk/plugin.d.ts +112 -4
- package/dist/sdk/preview.d.ts +201 -49
- package/dist/sdk/store.d.ts +36 -11
- package/dist/sdk/types.d.ts +191 -99
- package/package.json +4 -4
- package/dist/EditOpenApiSource-J7NXCVT5.js.map +0 -1
- package/dist/chunk-2BXVRXGL.js.map +0 -1
- package/dist/chunk-E4QUTDQ2.js.map +0 -1
- package/dist/chunk-LBTK5F65.js.map +0 -1
- package/dist/chunk-TRD7KSKA.js.map +0 -1
- /package/dist/{AddOpenApiSource-EV3NJHLA.js.map → AddOpenApiSource-FLMNI742.js.map} +0 -0
- /package/dist/{OpenApiSourceSummary-K5WZD5NR.js.map → OpenApiSourceSummary-CM46DB4L.js.map} +0 -0
package/dist/client.js
CHANGED
|
@@ -137,9 +137,9 @@ var openApiPresets = [
|
|
|
137
137
|
];
|
|
138
138
|
|
|
139
139
|
// src/react/source-plugin.ts
|
|
140
|
-
var importAdd = () => import("./AddOpenApiSource-
|
|
141
|
-
var importEdit = () => import("./EditOpenApiSource-
|
|
142
|
-
var importSummary = () => import("./OpenApiSourceSummary-
|
|
140
|
+
var importAdd = () => import("./AddOpenApiSource-FLMNI742.js");
|
|
141
|
+
var importEdit = () => import("./EditOpenApiSource-I4NIGIIJ.js");
|
|
142
|
+
var importSummary = () => import("./OpenApiSourceSummary-CM46DB4L.js");
|
|
143
143
|
var openApiSourcePlugin = {
|
|
144
144
|
key: "openapi",
|
|
145
145
|
label: "OpenAPI",
|
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
invokeWithLayer,
|
|
5
5
|
openApiPlugin,
|
|
6
6
|
resolveHeaders
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OZ67JNID.js";
|
|
8
8
|
import {
|
|
9
9
|
AuthStrategy,
|
|
10
10
|
DocResolver,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
resolveBaseUrl,
|
|
48
48
|
resolveSpecText,
|
|
49
49
|
substituteUrlVariables
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-E7PZ2QGD.js";
|
|
51
51
|
export {
|
|
52
52
|
AuthStrategy,
|
|
53
53
|
DocResolver,
|
package/dist/index.js
CHANGED
package/dist/react/atoms.d.ts
CHANGED
|
@@ -1,8 +1,78 @@
|
|
|
1
1
|
import type { ScopeId } from "@executor-js/sdk/core";
|
|
2
2
|
import * as Atom from "effect/unstable/reactivity/Atom";
|
|
3
3
|
import * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
|
|
4
|
-
export declare const openApiSourceAtom: (scopeId: ScopeId, namespace: string) => Atom.Atom<AsyncResult.AsyncResult<
|
|
5
|
-
|
|
4
|
+
export declare const openApiSourceAtom: (scopeId: ScopeId, namespace: string) => Atom.Atom<AsyncResult.AsyncResult<{
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly scope: string;
|
|
7
|
+
readonly namespace: string;
|
|
8
|
+
readonly config: {
|
|
9
|
+
readonly spec: string;
|
|
10
|
+
readonly namespace?: string | undefined;
|
|
11
|
+
readonly oauth2?: {
|
|
12
|
+
readonly kind: "oauth2";
|
|
13
|
+
readonly scopes: readonly string[];
|
|
14
|
+
readonly authorizationUrl: string | null;
|
|
15
|
+
readonly clientSecretSlot: string | null;
|
|
16
|
+
readonly securitySchemeName: string;
|
|
17
|
+
readonly flow: "authorizationCode" | "clientCredentials";
|
|
18
|
+
readonly tokenUrl: string;
|
|
19
|
+
readonly clientIdSlot: string;
|
|
20
|
+
readonly connectionSlot: string;
|
|
21
|
+
readonly issuerUrl?: string | null | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
readonly headers?: {
|
|
24
|
+
readonly [x: string]: string | {
|
|
25
|
+
readonly kind: "binding";
|
|
26
|
+
readonly slot: string;
|
|
27
|
+
readonly prefix?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
} | undefined;
|
|
30
|
+
readonly sourceUrl?: string | undefined;
|
|
31
|
+
readonly baseUrl?: string | undefined;
|
|
32
|
+
readonly queryParams?: {
|
|
33
|
+
readonly [x: string]: string | {
|
|
34
|
+
readonly kind: "binding";
|
|
35
|
+
readonly slot: string;
|
|
36
|
+
readonly prefix?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
} | undefined;
|
|
39
|
+
readonly specFetchCredentials?: {
|
|
40
|
+
readonly headers?: {
|
|
41
|
+
readonly [x: string]: string | {
|
|
42
|
+
readonly kind: "binding";
|
|
43
|
+
readonly slot: string;
|
|
44
|
+
readonly prefix?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
} | undefined;
|
|
47
|
+
readonly queryParams?: {
|
|
48
|
+
readonly [x: string]: string | {
|
|
49
|
+
readonly kind: "binding";
|
|
50
|
+
readonly slot: string;
|
|
51
|
+
readonly prefix?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
} | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
};
|
|
56
|
+
} | null, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
57
|
+
export declare const openApiSourceBindingsAtom: (scopeId: ScopeId, namespace: string, sourceScopeId: ScopeId) => Atom.Atom<AsyncResult.AsyncResult<readonly {
|
|
58
|
+
readonly value: {
|
|
59
|
+
readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
|
|
60
|
+
readonly kind: "secret";
|
|
61
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
|
|
64
|
+
readonly kind: "connection";
|
|
65
|
+
} | {
|
|
66
|
+
readonly text: string;
|
|
67
|
+
readonly kind: "text";
|
|
68
|
+
};
|
|
69
|
+
readonly createdAt: Date;
|
|
70
|
+
readonly sourceId: string;
|
|
71
|
+
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
72
|
+
readonly updatedAt: Date;
|
|
73
|
+
readonly slot: string;
|
|
74
|
+
readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
75
|
+
}[], import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
6
76
|
export declare const previewOpenApiSpec: Atom.AtomResultFn<{
|
|
7
77
|
readonly params: {
|
|
8
78
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
@@ -26,7 +96,79 @@ export declare const previewOpenApiSpec: Atom.AtomResultFn<{
|
|
|
26
96
|
};
|
|
27
97
|
readonly responseMode?: "decoded-only" | undefined;
|
|
28
98
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
29
|
-
},
|
|
99
|
+
}, {
|
|
100
|
+
readonly title: import("effect/Option").Option<string>;
|
|
101
|
+
readonly servers: readonly {
|
|
102
|
+
readonly url: string;
|
|
103
|
+
readonly description: import("effect/Option").Option<string>;
|
|
104
|
+
readonly variables: import("effect/Option").Option<{
|
|
105
|
+
readonly [x: string]: {
|
|
106
|
+
readonly description: import("effect/Option").Option<string>;
|
|
107
|
+
readonly default: string;
|
|
108
|
+
readonly enum: import("effect/Option").Option<readonly string[]>;
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
111
|
+
}[];
|
|
112
|
+
readonly tags: readonly string[];
|
|
113
|
+
readonly version: import("effect/Option").Option<string>;
|
|
114
|
+
readonly securitySchemes: readonly {
|
|
115
|
+
readonly type: "oauth2" | "http" | "apiKey" | "openIdConnect";
|
|
116
|
+
readonly in: import("effect/Option").Option<"query" | "header" | "cookie">;
|
|
117
|
+
readonly name: string;
|
|
118
|
+
readonly description: import("effect/Option").Option<string>;
|
|
119
|
+
readonly scheme: import("effect/Option").Option<string>;
|
|
120
|
+
readonly bearerFormat: import("effect/Option").Option<string>;
|
|
121
|
+
readonly headerName: import("effect/Option").Option<string>;
|
|
122
|
+
readonly flows: import("effect/Option").Option<{
|
|
123
|
+
readonly authorizationCode: import("effect/Option").Option<{
|
|
124
|
+
readonly scopes: {
|
|
125
|
+
readonly [x: string]: string;
|
|
126
|
+
};
|
|
127
|
+
readonly authorizationUrl: string;
|
|
128
|
+
readonly tokenUrl: string;
|
|
129
|
+
readonly refreshUrl: import("effect/Option").Option<string>;
|
|
130
|
+
}>;
|
|
131
|
+
readonly clientCredentials: import("effect/Option").Option<{
|
|
132
|
+
readonly scopes: {
|
|
133
|
+
readonly [x: string]: string;
|
|
134
|
+
};
|
|
135
|
+
readonly tokenUrl: string;
|
|
136
|
+
readonly refreshUrl: import("effect/Option").Option<string>;
|
|
137
|
+
}>;
|
|
138
|
+
}>;
|
|
139
|
+
readonly openIdConnectUrl: import("effect/Option").Option<string>;
|
|
140
|
+
}[];
|
|
141
|
+
readonly operations: readonly {
|
|
142
|
+
readonly method: "delete" | "options" | "get" | "put" | "post" | "head" | "patch" | "trace";
|
|
143
|
+
readonly tags: readonly string[];
|
|
144
|
+
readonly summary: import("effect/Option").Option<string>;
|
|
145
|
+
readonly operationId: string;
|
|
146
|
+
readonly deprecated: boolean;
|
|
147
|
+
readonly path: string;
|
|
148
|
+
}[];
|
|
149
|
+
readonly authStrategies: readonly {
|
|
150
|
+
readonly schemes: readonly string[];
|
|
151
|
+
}[];
|
|
152
|
+
readonly headerPresets: readonly {
|
|
153
|
+
readonly headers: {
|
|
154
|
+
readonly [x: string]: string | null;
|
|
155
|
+
};
|
|
156
|
+
readonly secretHeaders: readonly string[];
|
|
157
|
+
readonly label: string;
|
|
158
|
+
}[];
|
|
159
|
+
readonly oauth2Presets: readonly {
|
|
160
|
+
readonly scopes: {
|
|
161
|
+
readonly [x: string]: string;
|
|
162
|
+
};
|
|
163
|
+
readonly authorizationUrl: import("effect/Option").Option<string>;
|
|
164
|
+
readonly securitySchemeName: string;
|
|
165
|
+
readonly flow: "authorizationCode" | "clientCredentials";
|
|
166
|
+
readonly tokenUrl: string;
|
|
167
|
+
readonly refreshUrl: import("effect/Option").Option<string>;
|
|
168
|
+
readonly label: string;
|
|
169
|
+
}[];
|
|
170
|
+
readonly operationCount: number;
|
|
171
|
+
}, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
30
172
|
export declare const addOpenApiSpec: Atom.AtomResultFn<{
|
|
31
173
|
readonly params: {
|
|
32
174
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
@@ -256,7 +398,25 @@ export declare const setOpenApiSourceBinding: Atom.AtomResultFn<{
|
|
|
256
398
|
};
|
|
257
399
|
readonly responseMode?: "decoded-only" | undefined;
|
|
258
400
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
259
|
-
},
|
|
401
|
+
}, {
|
|
402
|
+
readonly value: {
|
|
403
|
+
readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
|
|
404
|
+
readonly kind: "secret";
|
|
405
|
+
readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
|
|
406
|
+
} | {
|
|
407
|
+
readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
|
|
408
|
+
readonly kind: "connection";
|
|
409
|
+
} | {
|
|
410
|
+
readonly text: string;
|
|
411
|
+
readonly kind: "text";
|
|
412
|
+
};
|
|
413
|
+
readonly createdAt: Date;
|
|
414
|
+
readonly sourceId: string;
|
|
415
|
+
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
416
|
+
readonly updatedAt: Date;
|
|
417
|
+
readonly slot: string;
|
|
418
|
+
readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
419
|
+
}, import("@executor-js/api").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
260
420
|
export declare const removeOpenApiSourceBinding: Atom.AtomResultFn<{
|
|
261
421
|
readonly params: {
|
|
262
422
|
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
package/dist/react/client.d.ts
CHANGED
|
@@ -12,7 +12,69 @@ 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<
|
|
15
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
16
|
+
readonly title: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
17
|
+
readonly version: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
18
|
+
readonly servers: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
19
|
+
readonly url: import("effect/Schema").String;
|
|
20
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
21
|
+
readonly variables: import("effect/Schema").OptionFromOptional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
22
|
+
readonly default: import("effect/Schema").String;
|
|
23
|
+
readonly enum: import("effect/Schema").OptionFromOptional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
24
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
25
|
+
}>>>;
|
|
26
|
+
}>>;
|
|
27
|
+
readonly operationCount: import("effect/Schema").Number;
|
|
28
|
+
readonly operations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
29
|
+
readonly operationId: import("effect/Schema").String;
|
|
30
|
+
readonly method: import("effect/Schema").Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
31
|
+
readonly path: import("effect/Schema").String;
|
|
32
|
+
readonly summary: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
33
|
+
readonly tags: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
34
|
+
readonly deprecated: import("effect/Schema").Boolean;
|
|
35
|
+
}>>;
|
|
36
|
+
readonly tags: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
37
|
+
readonly securitySchemes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
38
|
+
readonly name: import("effect/Schema").String;
|
|
39
|
+
readonly type: import("effect/Schema").Literals<readonly ["http", "apiKey", "oauth2", "openIdConnect"]>;
|
|
40
|
+
readonly scheme: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
41
|
+
readonly bearerFormat: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
42
|
+
readonly in: import("effect/Schema").OptionFromOptional<import("effect/Schema").Literals<readonly ["header", "query", "cookie"]>>;
|
|
43
|
+
readonly headerName: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
44
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
45
|
+
readonly flows: import("effect/Schema").OptionFromOptional<import("effect/Schema").Struct<{
|
|
46
|
+
readonly authorizationCode: import("effect/Schema").OptionFromOptional<import("effect/Schema").Struct<{
|
|
47
|
+
readonly authorizationUrl: import("effect/Schema").String;
|
|
48
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
49
|
+
readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
50
|
+
readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
51
|
+
}>>;
|
|
52
|
+
readonly clientCredentials: import("effect/Schema").OptionFromOptional<import("effect/Schema").Struct<{
|
|
53
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
54
|
+
readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
55
|
+
readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
56
|
+
}>>;
|
|
57
|
+
}>>;
|
|
58
|
+
readonly openIdConnectUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
59
|
+
}>>;
|
|
60
|
+
readonly authStrategies: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
61
|
+
readonly schemes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
62
|
+
}>>;
|
|
63
|
+
readonly headerPresets: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
64
|
+
readonly label: import("effect/Schema").String;
|
|
65
|
+
readonly headers: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
66
|
+
readonly secretHeaders: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
67
|
+
}>>;
|
|
68
|
+
readonly oauth2Presets: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
69
|
+
readonly label: import("effect/Schema").String;
|
|
70
|
+
readonly securitySchemeName: import("effect/Schema").String;
|
|
71
|
+
readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
72
|
+
readonly authorizationUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
73
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
74
|
+
readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
75
|
+
readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
76
|
+
}>>;
|
|
77
|
+
}>>, 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
78
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
17
79
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
18
80
|
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
@@ -75,7 +137,51 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
75
137
|
}>>, 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<{
|
|
76
138
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
77
139
|
namespace: import("effect/Schema").String;
|
|
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<
|
|
140
|
+
}>>, 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<import("effect/Schema").Struct<{
|
|
141
|
+
readonly namespace: import("effect/Schema").String;
|
|
142
|
+
readonly scope: import("effect/Schema").String;
|
|
143
|
+
readonly name: import("effect/Schema").String;
|
|
144
|
+
readonly config: import("effect/Schema").Struct<{
|
|
145
|
+
readonly spec: import("effect/Schema").String;
|
|
146
|
+
readonly sourceUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
147
|
+
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
148
|
+
readonly namespace: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
149
|
+
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<{
|
|
150
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
151
|
+
readonly slot: import("effect/Schema").String;
|
|
152
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
153
|
+
}>]>>>;
|
|
154
|
+
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<{
|
|
155
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
156
|
+
readonly slot: import("effect/Schema").String;
|
|
157
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
158
|
+
}>]>>>;
|
|
159
|
+
readonly specFetchCredentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
160
|
+
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<{
|
|
161
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
162
|
+
readonly slot: import("effect/Schema").String;
|
|
163
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
164
|
+
}>]>>>;
|
|
165
|
+
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<{
|
|
166
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
167
|
+
readonly slot: import("effect/Schema").String;
|
|
168
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
169
|
+
}>]>>>;
|
|
170
|
+
}>>;
|
|
171
|
+
readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
172
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
173
|
+
readonly securitySchemeName: import("effect/Schema").String;
|
|
174
|
+
readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
175
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
176
|
+
readonly authorizationUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
177
|
+
readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
178
|
+
readonly clientIdSlot: import("effect/Schema").String;
|
|
179
|
+
readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
180
|
+
readonly connectionSlot: import("effect/Schema").String;
|
|
181
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
182
|
+
}>>;
|
|
183
|
+
}>;
|
|
184
|
+
}>>>, 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<{
|
|
79
185
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
80
186
|
namespace: import("effect/Schema").String;
|
|
81
187
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
@@ -127,7 +233,25 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
127
233
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
128
234
|
namespace: import("effect/Schema").String;
|
|
129
235
|
sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
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<
|
|
236
|
+
}>>, 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<import("effect/Schema").Struct<{
|
|
237
|
+
readonly sourceId: import("effect/Schema").String;
|
|
238
|
+
readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
239
|
+
readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
240
|
+
readonly slot: import("effect/Schema").String;
|
|
241
|
+
readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
242
|
+
readonly kind: import("effect/Schema").Literal<"secret">;
|
|
243
|
+
readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
|
|
244
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
245
|
+
}>, import("effect/Schema").Struct<{
|
|
246
|
+
readonly kind: import("effect/Schema").Literal<"connection">;
|
|
247
|
+
readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
|
|
248
|
+
}>, import("effect/Schema").Struct<{
|
|
249
|
+
readonly kind: import("effect/Schema").Literal<"text">;
|
|
250
|
+
readonly text: import("effect/Schema").String;
|
|
251
|
+
}>]>;
|
|
252
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
253
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
254
|
+
}>>>, 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<{
|
|
131
255
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
132
256
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
133
257
|
readonly sourceId: import("effect/Schema").String;
|
|
@@ -145,7 +269,25 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
145
269
|
readonly kind: import("effect/Schema").Literal<"text">;
|
|
146
270
|
readonly text: import("effect/Schema").String;
|
|
147
271
|
}>]>;
|
|
148
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<
|
|
272
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
273
|
+
readonly sourceId: import("effect/Schema").String;
|
|
274
|
+
readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
275
|
+
readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
276
|
+
readonly slot: import("effect/Schema").String;
|
|
277
|
+
readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
278
|
+
readonly kind: import("effect/Schema").Literal<"secret">;
|
|
279
|
+
readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
|
|
280
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
281
|
+
}>, import("effect/Schema").Struct<{
|
|
282
|
+
readonly kind: import("effect/Schema").Literal<"connection">;
|
|
283
|
+
readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
|
|
284
|
+
}>, import("effect/Schema").Struct<{
|
|
285
|
+
readonly kind: import("effect/Schema").Literal<"text">;
|
|
286
|
+
readonly text: import("effect/Schema").String;
|
|
287
|
+
}>]>;
|
|
288
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
289
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
290
|
+
}>>, 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<{
|
|
149
291
|
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
150
292
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
151
293
|
readonly sourceId: import("effect/Schema").String;
|
package/dist/sdk/extract.d.ts
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
1
|
+
import { Effect, Option } from "effect";
|
|
2
2
|
import { OpenApiExtractionError } from "./errors";
|
|
3
3
|
import type { ParsedDocument } from "./parse";
|
|
4
|
-
import { ExtractionResult } from "./types";
|
|
5
4
|
/** Extract all operations from a bundled OpenAPI 3.x document */
|
|
6
|
-
export declare const extract: (doc: ParsedDocument) => Effect.Effect<
|
|
5
|
+
export declare const extract: (doc: ParsedDocument) => Effect.Effect<{
|
|
6
|
+
readonly title: Option.Option<string>;
|
|
7
|
+
readonly servers: readonly {
|
|
8
|
+
readonly url: string;
|
|
9
|
+
readonly description: Option.Option<string>;
|
|
10
|
+
readonly variables: Option.Option<{
|
|
11
|
+
readonly [x: string]: {
|
|
12
|
+
readonly description: Option.Option<string>;
|
|
13
|
+
readonly default: string;
|
|
14
|
+
readonly enum: Option.Option<readonly string[]>;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
}[];
|
|
18
|
+
readonly version: Option.Option<string>;
|
|
19
|
+
readonly operations: readonly {
|
|
20
|
+
readonly description: Option.Option<string>;
|
|
21
|
+
readonly inputSchema: Option.Option<unknown>;
|
|
22
|
+
readonly outputSchema: Option.Option<unknown>;
|
|
23
|
+
readonly method: "delete" | "options" | "get" | "put" | "post" | "head" | "patch" | "trace";
|
|
24
|
+
readonly tags: readonly string[];
|
|
25
|
+
readonly summary: Option.Option<string>;
|
|
26
|
+
readonly parameters: readonly {
|
|
27
|
+
readonly required: boolean;
|
|
28
|
+
readonly schema: Option.Option<unknown>;
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly description: Option.Option<string>;
|
|
31
|
+
readonly location: "path" | "query" | "header" | "cookie";
|
|
32
|
+
readonly style: Option.Option<string>;
|
|
33
|
+
readonly explode: Option.Option<boolean>;
|
|
34
|
+
readonly allowReserved: Option.Option<boolean>;
|
|
35
|
+
}[];
|
|
36
|
+
readonly operationId: string & import("effect/Brand").Brand<"OperationId">;
|
|
37
|
+
readonly requestBody: Option.Option<{
|
|
38
|
+
readonly required: boolean;
|
|
39
|
+
readonly schema: Option.Option<unknown>;
|
|
40
|
+
readonly contentType: string;
|
|
41
|
+
readonly contents: Option.Option<readonly {
|
|
42
|
+
readonly schema: Option.Option<unknown>;
|
|
43
|
+
readonly contentType: string;
|
|
44
|
+
readonly encoding: Option.Option<{
|
|
45
|
+
readonly [x: string]: {
|
|
46
|
+
readonly style: Option.Option<string>;
|
|
47
|
+
readonly explode: Option.Option<boolean>;
|
|
48
|
+
readonly allowReserved: Option.Option<boolean>;
|
|
49
|
+
readonly contentType: Option.Option<string>;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
}[]>;
|
|
53
|
+
}>;
|
|
54
|
+
readonly deprecated: boolean;
|
|
55
|
+
readonly pathTemplate: string;
|
|
56
|
+
}[];
|
|
57
|
+
}, OpenApiExtractionError, never>;
|
package/dist/sdk/invoke.d.ts
CHANGED
|
@@ -1,13 +1,57 @@
|
|
|
1
|
-
import { Effect, Layer } from "effect";
|
|
1
|
+
import { Effect, Layer, Option } from "effect";
|
|
2
2
|
import { HttpClient } from "effect/unstable/http";
|
|
3
3
|
import type { SecretOwnedByConnectionError, StorageFailure } from "@executor-js/sdk/core";
|
|
4
4
|
import { OpenApiInvocationError } from "./errors";
|
|
5
|
-
import { type HeaderValue, type OperationBinding
|
|
5
|
+
import { type HeaderValue, type OperationBinding } from "./types";
|
|
6
6
|
export declare const resolveHeaders: (headers: Record<string, HeaderValue>, secrets: {
|
|
7
7
|
readonly get: (id: string) => Effect.Effect<string | null, SecretOwnedByConnectionError | StorageFailure>;
|
|
8
8
|
}) => Effect.Effect<Record<string, string>, OpenApiInvocationError | StorageFailure>;
|
|
9
|
-
export declare const invoke: (operation:
|
|
10
|
-
|
|
9
|
+
export declare const invoke: (operation: {
|
|
10
|
+
readonly method: "delete" | "options" | "get" | "put" | "post" | "head" | "patch" | "trace";
|
|
11
|
+
readonly parameters: readonly {
|
|
12
|
+
readonly required: boolean;
|
|
13
|
+
readonly schema: Option.Option<unknown>;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly description: Option.Option<string>;
|
|
16
|
+
readonly location: "path" | "query" | "header" | "cookie";
|
|
17
|
+
readonly style: Option.Option<string>;
|
|
18
|
+
readonly explode: Option.Option<boolean>;
|
|
19
|
+
readonly allowReserved: Option.Option<boolean>;
|
|
20
|
+
}[];
|
|
21
|
+
readonly requestBody: Option.Option<{
|
|
22
|
+
readonly required: boolean;
|
|
23
|
+
readonly schema: Option.Option<unknown>;
|
|
24
|
+
readonly contentType: string;
|
|
25
|
+
readonly contents: Option.Option<readonly {
|
|
26
|
+
readonly schema: Option.Option<unknown>;
|
|
27
|
+
readonly contentType: string;
|
|
28
|
+
readonly encoding: Option.Option<{
|
|
29
|
+
readonly [x: string]: {
|
|
30
|
+
readonly style: Option.Option<string>;
|
|
31
|
+
readonly explode: Option.Option<boolean>;
|
|
32
|
+
readonly allowReserved: Option.Option<boolean>;
|
|
33
|
+
readonly contentType: Option.Option<string>;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
}[]>;
|
|
37
|
+
}>;
|
|
38
|
+
readonly pathTemplate: string;
|
|
39
|
+
}, args: Record<string, unknown>, resolvedHeaders: Record<string, string>, sourceQueryParams?: Record<string, string> | undefined) => Effect.Effect<{
|
|
40
|
+
readonly status: number;
|
|
41
|
+
readonly error: unknown;
|
|
42
|
+
readonly headers: {
|
|
43
|
+
readonly [x: string]: string;
|
|
44
|
+
};
|
|
45
|
+
readonly data: unknown;
|
|
46
|
+
}, OpenApiInvocationError, HttpClient.HttpClient>;
|
|
47
|
+
export declare const invokeWithLayer: (operation: OperationBinding, args: Record<string, unknown>, baseUrl: string, resolvedHeaders: Record<string, string>, sourceQueryParams: Record<string, string>, httpClientLayer: Layer.Layer<HttpClient.HttpClient, never, never>) => Effect.Effect<{
|
|
48
|
+
readonly status: number;
|
|
49
|
+
readonly error: unknown;
|
|
50
|
+
readonly headers: {
|
|
51
|
+
readonly [x: string]: string;
|
|
52
|
+
};
|
|
53
|
+
readonly data: unknown;
|
|
54
|
+
}, OpenApiInvocationError, never>;
|
|
11
55
|
export declare const annotationsForOperation: (method: string, pathTemplate: string) => {
|
|
12
56
|
requiresApproval?: boolean;
|
|
13
57
|
approvalDescription?: string;
|