@executor-js/plugin-openapi 1.4.33 → 1.5.0
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-7M52SRUX.js +893 -0
- package/dist/AddOpenApiSource-7M52SRUX.js.map +1 -0
- package/dist/EditOpenApiSource-WTAMRJUK.js +68 -0
- package/dist/EditOpenApiSource-WTAMRJUK.js.map +1 -0
- package/dist/OpenApiAccountsPanel-3VJJXNQF.js +112 -0
- package/dist/OpenApiAccountsPanel-3VJJXNQF.js.map +1 -0
- package/dist/api/group.d.ts +104 -225
- package/dist/api/index.d.ts +127 -271
- package/dist/{chunk-BB5IAKRG.js → chunk-AQ7JDDRM.js} +12 -2
- package/dist/chunk-AQ7JDDRM.js.map +1 -0
- package/dist/chunk-BSLE6HCE.js +181 -0
- package/dist/chunk-BSLE6HCE.js.map +1 -0
- package/dist/chunk-MZWZQ24W.js +226 -0
- package/dist/chunk-MZWZQ24W.js.map +1 -0
- package/dist/chunk-OSIFYIQP.js +623 -0
- package/dist/chunk-OSIFYIQP.js.map +1 -0
- package/dist/chunk-QSSRVK6M.js +139 -0
- package/dist/chunk-QSSRVK6M.js.map +1 -0
- package/dist/chunk-V7VCHYOY.js +1544 -0
- package/dist/chunk-V7VCHYOY.js.map +1 -0
- package/dist/{chunk-AN4HJFNP.js → chunk-YVRI7KRC.js} +162 -186
- package/dist/chunk-YVRI7KRC.js.map +1 -0
- package/dist/client.js +9 -8
- package/dist/client.js.map +1 -1
- package/dist/core.js +28 -11
- package/dist/index.js +11 -4
- package/dist/react/AddOpenApiSource.d.ts +2 -13
- package/dist/react/GoogleProductPicker.d.ts +9 -0
- package/dist/react/OpenApiAccountsPanel.d.ts +6 -0
- package/dist/react/OpenApiSourceDetailsFields.d.ts +3 -2
- package/dist/react/atoms.d.ts +177 -192
- package/dist/react/auth-method-config.d.ts +15 -0
- package/dist/react/client.d.ts +103 -224
- package/dist/react/index.d.ts +2 -2
- package/dist/react/source-plugin.d.ts +2 -2
- package/dist/sdk/config.d.ts +75 -0
- package/dist/sdk/configure.test.d.ts +1 -0
- package/dist/sdk/describe-auth-methods.test.d.ts +1 -0
- package/dist/sdk/errors.d.ts +4 -6
- package/dist/sdk/extract.d.ts +7 -5
- package/dist/sdk/google-bundle.test.d.ts +1 -0
- package/dist/sdk/google-discovery.d.ts +43 -0
- package/dist/sdk/google-discovery.test.d.ts +1 -0
- package/dist/sdk/google-oauth-batches.d.ts +13 -0
- package/dist/sdk/google-oauth-batches.test.d.ts +1 -0
- package/dist/sdk/google-oauth-scopes.d.ts +3 -0
- package/dist/sdk/google-oauth-scopes.test.d.ts +1 -0
- package/dist/sdk/google-presets.d.ts +16 -0
- package/dist/sdk/google-presets.test.d.ts +1 -0
- package/dist/sdk/google-product-picker-scopes.test.d.ts +1 -0
- package/dist/sdk/index.d.ts +7 -5
- package/dist/sdk/invoke.d.ts +6 -9
- package/dist/sdk/openapi-utils.d.ts +1 -0
- package/dist/sdk/plugin.d.ts +74 -231
- package/dist/sdk/presets.d.ts +2 -1
- package/dist/sdk/preview.d.ts +20 -15
- package/dist/sdk/query-serialization.test.d.ts +1 -0
- package/dist/sdk/store.d.ts +14 -41
- package/dist/sdk/types.d.ts +23 -51
- package/dist/testing/index.d.ts +49 -38
- package/dist/testing.js +46 -18
- package/dist/testing.js.map +1 -1
- package/package.json +6 -4
- package/dist/AddOpenApiSource-NSCULGTM.js +0 -19
- package/dist/AddOpenApiSource-NSCULGTM.js.map +0 -1
- package/dist/EditOpenApiSource-MV7NYTRP.js +0 -774
- package/dist/EditOpenApiSource-MV7NYTRP.js.map +0 -1
- package/dist/OpenApiSourceSummary-7JBS7PUV.js +0 -122
- package/dist/OpenApiSourceSummary-7JBS7PUV.js.map +0 -1
- package/dist/chunk-2ZKKZYZH.js +0 -1181
- package/dist/chunk-2ZKKZYZH.js.map +0 -1
- package/dist/chunk-AN4HJFNP.js.map +0 -1
- package/dist/chunk-BB5IAKRG.js.map +0 -1
- package/dist/chunk-PRVJDE43.js +0 -2101
- package/dist/chunk-PRVJDE43.js.map +0 -1
- package/dist/chunk-X5JX3KTA.js +0 -201
- package/dist/chunk-X5JX3KTA.js.map +0 -1
- package/dist/react/OpenApiSourceSummary.d.ts +0 -5
- package/dist/sdk/credential-status.d.ts +0 -23
- package/dist/sdk/source-contracts.d.ts +0 -55
- /package/dist/{sdk/credential-status.test.d.ts → react/auth-method-config.test.d.ts} +0 -0
package/dist/react/atoms.d.ts
CHANGED
|
@@ -1,118 +1,67 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IntegrationSlug } from "@executor-js/sdk/shared";
|
|
2
2
|
import * as Atom from "effect/unstable/reactivity/Atom";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
3
|
+
export declare const openApiIntegrationAtom: (slug: IntegrationSlug) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
4
|
+
readonly slug: string & import("effect/Brand").Brand<"IntegrationSlug">;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
readonly kind: string;
|
|
7
|
+
readonly canRemove: boolean;
|
|
8
|
+
readonly canRefresh: boolean;
|
|
9
|
+
} | null, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
10
|
+
export declare const openApiConfigAtom: (slug: IntegrationSlug) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
11
|
+
readonly spec: string;
|
|
12
|
+
readonly headers?: {
|
|
13
|
+
readonly [x: string]: string;
|
|
14
|
+
} | undefined;
|
|
15
|
+
readonly baseUrl?: string | undefined;
|
|
16
|
+
readonly queryParams?: {
|
|
17
|
+
readonly [x: string]: string;
|
|
18
|
+
} | undefined;
|
|
19
|
+
readonly sourceUrl?: string | undefined;
|
|
20
|
+
readonly googleDiscoveryUrls?: readonly string[] | undefined;
|
|
21
|
+
readonly authenticationTemplate?: readonly ({
|
|
22
|
+
readonly type: "apiKey";
|
|
23
|
+
readonly slug: string;
|
|
9
24
|
readonly headers?: {
|
|
10
|
-
readonly [x: string]: string | {
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
} | undefined;
|
|
16
|
-
readonly namespace?: string | undefined;
|
|
17
|
-
readonly oauth2?: {
|
|
18
|
-
readonly kind: "oauth2";
|
|
19
|
-
readonly scopes: readonly string[];
|
|
20
|
-
readonly clientSecretSlot: string | null;
|
|
21
|
-
readonly securitySchemeName: string;
|
|
22
|
-
readonly flow: "authorizationCode" | "clientCredentials";
|
|
23
|
-
readonly tokenUrl: string;
|
|
24
|
-
readonly clientIdSlot: string;
|
|
25
|
-
readonly connectionSlot: string;
|
|
26
|
-
readonly issuerUrl?: string | null | undefined;
|
|
27
|
-
readonly authorizationUrl?: string | null | undefined;
|
|
25
|
+
readonly [x: string]: string | readonly (string | {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly type: "variable";
|
|
28
|
+
})[];
|
|
28
29
|
} | undefined;
|
|
29
30
|
readonly queryParams?: {
|
|
30
|
-
readonly [x: string]: string | {
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
} | undefined;
|
|
36
|
-
readonly baseUrl?: string | undefined;
|
|
37
|
-
readonly spec?: string | undefined;
|
|
38
|
-
readonly sourceUrl?: string | 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;
|
|
31
|
+
readonly [x: string]: string | readonly (string | {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly type: "variable";
|
|
34
|
+
})[];
|
|
54
35
|
} | undefined;
|
|
55
|
-
};
|
|
56
|
-
} | null, import("@executor-js/sdk").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<{
|
|
58
|
-
slot: string;
|
|
59
|
-
value: {
|
|
60
|
-
readonly text: string;
|
|
61
|
-
readonly kind: "text";
|
|
62
36
|
} | {
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
|
|
67
|
-
readonly
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
id: string & import("effect/Brand").Brand<"CredentialBindingId">;
|
|
71
|
-
scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
72
|
-
createdAt: Date;
|
|
73
|
-
updatedAt: Date;
|
|
74
|
-
pluginId: string;
|
|
75
|
-
sourceId: string;
|
|
76
|
-
sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
77
|
-
slotKey: string;
|
|
78
|
-
}[], import("@executor-js/sdk").InternalError>>;
|
|
37
|
+
readonly type: "oauth";
|
|
38
|
+
readonly slug: string;
|
|
39
|
+
readonly authorizationUrl: string;
|
|
40
|
+
readonly tokenUrl: string;
|
|
41
|
+
readonly scopes: readonly string[];
|
|
42
|
+
})[] | undefined;
|
|
43
|
+
} | null, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
79
44
|
export declare const previewOpenApiSpec: Atom.AtomResultFn<{
|
|
80
|
-
readonly params: {
|
|
81
|
-
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
82
|
-
};
|
|
83
45
|
readonly payload: {
|
|
84
46
|
readonly spec: string;
|
|
85
|
-
readonly specFetchCredentials?: {
|
|
86
|
-
readonly headers?: {
|
|
87
|
-
readonly [x: string]: string | {
|
|
88
|
-
readonly secretId: string;
|
|
89
|
-
readonly prefix?: string | undefined;
|
|
90
|
-
};
|
|
91
|
-
} | undefined;
|
|
92
|
-
readonly queryParams?: {
|
|
93
|
-
readonly [x: string]: string | {
|
|
94
|
-
readonly secretId: string;
|
|
95
|
-
readonly prefix?: string | undefined;
|
|
96
|
-
};
|
|
97
|
-
} | undefined;
|
|
98
|
-
} | undefined;
|
|
99
47
|
};
|
|
100
48
|
readonly responseMode?: "decoded-only" | undefined;
|
|
101
49
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
102
50
|
}, {
|
|
103
51
|
readonly version: import("effect/Option").Option<string>;
|
|
104
52
|
readonly operations: readonly {
|
|
105
|
-
readonly
|
|
106
|
-
readonly method: "post" | "options" | "delete" | "get" | "put" | "head" | "patch" | "trace";
|
|
53
|
+
readonly method: "post" | "options" | "delete" | "get" | "put" | "patch" | "head" | "trace";
|
|
107
54
|
readonly deprecated: boolean;
|
|
108
55
|
readonly path: string;
|
|
56
|
+
readonly summary: import("effect/Option").Option<string>;
|
|
109
57
|
readonly tags: readonly string[];
|
|
110
58
|
readonly operationId: string;
|
|
111
59
|
}[];
|
|
112
60
|
readonly title: import("effect/Option").Option<string>;
|
|
61
|
+
readonly tags: readonly string[];
|
|
113
62
|
readonly servers: readonly {
|
|
114
|
-
readonly url: string;
|
|
115
63
|
readonly description: import("effect/Option").Option<string>;
|
|
64
|
+
readonly url: string;
|
|
116
65
|
readonly variables: import("effect/Option").Option<{
|
|
117
66
|
readonly [x: string]: {
|
|
118
67
|
readonly default: string;
|
|
@@ -121,29 +70,28 @@ export declare const previewOpenApiSpec: Atom.AtomResultFn<{
|
|
|
121
70
|
};
|
|
122
71
|
}>;
|
|
123
72
|
}[];
|
|
124
|
-
readonly tags: readonly string[];
|
|
125
73
|
readonly securitySchemes: readonly {
|
|
126
74
|
readonly name: string;
|
|
127
75
|
readonly type: "oauth2" | "http" | "apiKey" | "openIdConnect";
|
|
128
|
-
readonly in: import("effect/Option").Option<"
|
|
76
|
+
readonly in: import("effect/Option").Option<"header" | "query" | "cookie">;
|
|
129
77
|
readonly description: import("effect/Option").Option<string>;
|
|
130
|
-
readonly headerName: import("effect/Option").Option<string>;
|
|
131
78
|
readonly scheme: import("effect/Option").Option<string>;
|
|
132
79
|
readonly bearerFormat: import("effect/Option").Option<string>;
|
|
80
|
+
readonly headerName: import("effect/Option").Option<string>;
|
|
133
81
|
readonly flows: import("effect/Option").Option<{
|
|
134
82
|
readonly authorizationCode: import("effect/Option").Option<{
|
|
83
|
+
readonly authorizationUrl: string;
|
|
84
|
+
readonly tokenUrl: string;
|
|
135
85
|
readonly scopes: {
|
|
136
86
|
readonly [x: string]: string;
|
|
137
87
|
};
|
|
138
|
-
readonly authorizationUrl: string;
|
|
139
|
-
readonly tokenUrl: string;
|
|
140
88
|
readonly refreshUrl: import("effect/Option").Option<string>;
|
|
141
89
|
}>;
|
|
142
90
|
readonly clientCredentials: import("effect/Option").Option<{
|
|
91
|
+
readonly tokenUrl: string;
|
|
143
92
|
readonly scopes: {
|
|
144
93
|
readonly [x: string]: string;
|
|
145
94
|
};
|
|
146
|
-
readonly tokenUrl: string;
|
|
147
95
|
readonly refreshUrl: import("effect/Option").Option<string>;
|
|
148
96
|
}>;
|
|
149
97
|
}>;
|
|
@@ -153,142 +101,179 @@ export declare const previewOpenApiSpec: Atom.AtomResultFn<{
|
|
|
153
101
|
readonly schemes: readonly string[];
|
|
154
102
|
}[];
|
|
155
103
|
readonly headerPresets: readonly {
|
|
104
|
+
readonly label: string;
|
|
156
105
|
readonly headers: {
|
|
157
106
|
readonly [x: string]: string | null;
|
|
158
107
|
};
|
|
159
108
|
readonly secretHeaders: readonly string[];
|
|
160
|
-
readonly label: string;
|
|
161
109
|
}[];
|
|
162
110
|
readonly oauth2Presets: readonly {
|
|
111
|
+
readonly label: string;
|
|
112
|
+
readonly authorizationUrl: import("effect/Option").Option<string>;
|
|
113
|
+
readonly tokenUrl: string;
|
|
163
114
|
readonly scopes: {
|
|
164
115
|
readonly [x: string]: string;
|
|
165
116
|
};
|
|
166
|
-
readonly authorizationUrl: import("effect/Option").Option<string>;
|
|
167
|
-
readonly securitySchemeName: string;
|
|
168
|
-
readonly flow: "authorizationCode" | "clientCredentials";
|
|
169
|
-
readonly tokenUrl: string;
|
|
170
117
|
readonly refreshUrl: import("effect/Option").Option<string>;
|
|
171
|
-
readonly
|
|
118
|
+
readonly flow: "authorizationCode" | "clientCredentials";
|
|
119
|
+
readonly identityScopes: false | "auto" | readonly string[];
|
|
120
|
+
readonly securitySchemeName: string;
|
|
172
121
|
}[];
|
|
173
122
|
readonly operationCount: number;
|
|
174
|
-
}, import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
123
|
+
}, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
175
124
|
export declare const addOpenApiSpec: Atom.AtomResultFn<{
|
|
176
|
-
readonly params: {
|
|
177
|
-
readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
|
|
178
|
-
};
|
|
179
125
|
readonly payload: {
|
|
180
|
-
readonly
|
|
181
|
-
readonly namespace: string;
|
|
182
|
-
readonly baseUrl: string;
|
|
126
|
+
readonly slug: string;
|
|
183
127
|
readonly spec: {
|
|
184
128
|
readonly kind: "url";
|
|
185
129
|
readonly url: string;
|
|
186
130
|
} | {
|
|
187
131
|
readonly value: string;
|
|
188
132
|
readonly kind: "blob";
|
|
133
|
+
} | {
|
|
134
|
+
readonly kind: "googleDiscovery";
|
|
135
|
+
readonly url: string;
|
|
136
|
+
} | {
|
|
137
|
+
readonly kind: "googleDiscoveryBundle";
|
|
138
|
+
readonly urls: readonly string[];
|
|
189
139
|
};
|
|
140
|
+
readonly description?: string | undefined;
|
|
190
141
|
readonly headers?: {
|
|
191
|
-
readonly [x: string]: string
|
|
192
|
-
readonly kind: "secret";
|
|
193
|
-
readonly prefix?: string | undefined;
|
|
194
|
-
};
|
|
195
|
-
} | undefined;
|
|
196
|
-
readonly oauth2?: {
|
|
197
|
-
readonly kind: "oauth2";
|
|
198
|
-
readonly scopes: readonly string[];
|
|
199
|
-
readonly clientSecretSlot: string | null;
|
|
200
|
-
readonly securitySchemeName: string;
|
|
201
|
-
readonly flow: "authorizationCode" | "clientCredentials";
|
|
202
|
-
readonly tokenUrl: string;
|
|
203
|
-
readonly clientIdSlot: string;
|
|
204
|
-
readonly connectionSlot: string;
|
|
205
|
-
readonly issuerUrl?: string | null | undefined;
|
|
206
|
-
readonly authorizationUrl?: string | null | undefined;
|
|
142
|
+
readonly [x: string]: string;
|
|
207
143
|
} | undefined;
|
|
144
|
+
readonly baseUrl?: string | undefined;
|
|
208
145
|
readonly queryParams?: {
|
|
209
|
-
readonly [x: string]: string
|
|
210
|
-
readonly kind: "secret";
|
|
211
|
-
readonly prefix?: string | undefined;
|
|
212
|
-
};
|
|
146
|
+
readonly [x: string]: string;
|
|
213
147
|
} | undefined;
|
|
214
|
-
readonly
|
|
148
|
+
readonly authenticationTemplate?: readonly ({
|
|
149
|
+
readonly type: "apiKey";
|
|
150
|
+
readonly slug: string;
|
|
215
151
|
readonly headers?: {
|
|
216
|
-
readonly [x: string]: string | {
|
|
217
|
-
readonly
|
|
218
|
-
readonly
|
|
219
|
-
};
|
|
152
|
+
readonly [x: string]: string | readonly (string | {
|
|
153
|
+
readonly name: string;
|
|
154
|
+
readonly type: "variable";
|
|
155
|
+
})[];
|
|
220
156
|
} | undefined;
|
|
221
157
|
readonly queryParams?: {
|
|
222
|
-
readonly [x: string]: string | {
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
225
|
-
};
|
|
158
|
+
readonly [x: string]: string | readonly (string | {
|
|
159
|
+
readonly name: string;
|
|
160
|
+
readonly type: "variable";
|
|
161
|
+
})[];
|
|
226
162
|
} | undefined;
|
|
227
|
-
} |
|
|
163
|
+
} | {
|
|
164
|
+
readonly type: "oauth";
|
|
165
|
+
readonly slug: string;
|
|
166
|
+
readonly authorizationUrl: string;
|
|
167
|
+
readonly tokenUrl: string;
|
|
168
|
+
readonly scopes: readonly string[];
|
|
169
|
+
})[] | undefined;
|
|
228
170
|
};
|
|
229
171
|
readonly responseMode?: "decoded-only" | undefined;
|
|
230
172
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
231
173
|
}, {
|
|
232
|
-
readonly
|
|
174
|
+
readonly slug: string & import("effect/Brand").Brand<"IntegrationSlug">;
|
|
233
175
|
readonly toolCount: number;
|
|
234
|
-
}, import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
235
|
-
export declare const
|
|
176
|
+
}, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
177
|
+
export declare const removeOpenApiSpec: Atom.AtomResultFn<{
|
|
236
178
|
readonly params: {
|
|
237
|
-
readonly
|
|
179
|
+
readonly slug: string;
|
|
180
|
+
};
|
|
181
|
+
readonly responseMode?: "decoded-only" | undefined;
|
|
182
|
+
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
183
|
+
}, void, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
184
|
+
export declare const openapiConfigure: Atom.AtomResultFn<{
|
|
185
|
+
readonly params: {
|
|
186
|
+
readonly slug: string;
|
|
238
187
|
};
|
|
239
188
|
readonly payload: {
|
|
240
|
-
readonly
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
readonly spec: {
|
|
244
|
-
readonly kind: "url";
|
|
245
|
-
readonly url: string;
|
|
246
|
-
} | {
|
|
247
|
-
readonly value: string;
|
|
248
|
-
readonly kind: "blob";
|
|
249
|
-
};
|
|
250
|
-
readonly headers?: {
|
|
251
|
-
readonly [x: string]: string | {
|
|
252
|
-
readonly kind: "secret";
|
|
253
|
-
readonly prefix?: string | undefined;
|
|
254
|
-
};
|
|
255
|
-
} | undefined;
|
|
256
|
-
readonly oauth2?: {
|
|
257
|
-
readonly kind: "oauth2";
|
|
258
|
-
readonly scopes: readonly string[];
|
|
259
|
-
readonly clientSecretSlot: string | null;
|
|
260
|
-
readonly securitySchemeName: string;
|
|
261
|
-
readonly flow: "authorizationCode" | "clientCredentials";
|
|
262
|
-
readonly tokenUrl: string;
|
|
263
|
-
readonly clientIdSlot: string;
|
|
264
|
-
readonly connectionSlot: string;
|
|
265
|
-
readonly issuerUrl?: string | null | undefined;
|
|
266
|
-
readonly authorizationUrl?: string | null | undefined;
|
|
267
|
-
} | undefined;
|
|
268
|
-
readonly queryParams?: {
|
|
269
|
-
readonly [x: string]: string | {
|
|
270
|
-
readonly kind: "secret";
|
|
271
|
-
readonly prefix?: string | undefined;
|
|
272
|
-
};
|
|
273
|
-
} | undefined;
|
|
274
|
-
readonly specFetchCredentials?: {
|
|
189
|
+
readonly authenticationTemplate: readonly ({
|
|
190
|
+
readonly type: "apiKey";
|
|
191
|
+
readonly slug: string;
|
|
275
192
|
readonly headers?: {
|
|
276
|
-
readonly [x: string]: string | {
|
|
277
|
-
readonly
|
|
278
|
-
readonly
|
|
279
|
-
};
|
|
193
|
+
readonly [x: string]: string | readonly (string | {
|
|
194
|
+
readonly name: string;
|
|
195
|
+
readonly type: "variable";
|
|
196
|
+
})[];
|
|
280
197
|
} | undefined;
|
|
281
198
|
readonly queryParams?: {
|
|
282
|
-
readonly [x: string]: string | {
|
|
283
|
-
readonly
|
|
284
|
-
readonly
|
|
285
|
-
};
|
|
199
|
+
readonly [x: string]: string | readonly (string | {
|
|
200
|
+
readonly name: string;
|
|
201
|
+
readonly type: "variable";
|
|
202
|
+
})[];
|
|
286
203
|
} | undefined;
|
|
287
|
-
} |
|
|
204
|
+
} | {
|
|
205
|
+
readonly type: "oauth";
|
|
206
|
+
readonly slug: string;
|
|
207
|
+
readonly authorizationUrl: string;
|
|
208
|
+
readonly tokenUrl: string;
|
|
209
|
+
readonly scopes: readonly string[];
|
|
210
|
+
})[];
|
|
211
|
+
readonly mode?: "replace" | "merge" | undefined;
|
|
288
212
|
};
|
|
289
213
|
readonly responseMode?: "decoded-only" | undefined;
|
|
290
214
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
291
215
|
}, {
|
|
292
|
-
readonly
|
|
293
|
-
|
|
294
|
-
|
|
216
|
+
readonly authenticationTemplate: readonly ({
|
|
217
|
+
readonly type: "apiKey";
|
|
218
|
+
readonly slug: string;
|
|
219
|
+
readonly headers?: {
|
|
220
|
+
readonly [x: string]: string | readonly (string | {
|
|
221
|
+
readonly name: string;
|
|
222
|
+
readonly type: "variable";
|
|
223
|
+
})[];
|
|
224
|
+
} | undefined;
|
|
225
|
+
readonly queryParams?: {
|
|
226
|
+
readonly [x: string]: string | readonly (string | {
|
|
227
|
+
readonly name: string;
|
|
228
|
+
readonly type: "variable";
|
|
229
|
+
})[];
|
|
230
|
+
} | undefined;
|
|
231
|
+
} | {
|
|
232
|
+
readonly type: "oauth";
|
|
233
|
+
readonly slug: string;
|
|
234
|
+
readonly authorizationUrl: string;
|
|
235
|
+
readonly tokenUrl: string;
|
|
236
|
+
readonly scopes: readonly string[];
|
|
237
|
+
})[];
|
|
238
|
+
}, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>;
|
|
239
|
+
export declare const openApiIntegrationFamily: (arg: string & import("effect/Brand").Brand<"IntegrationSlug">) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
240
|
+
readonly slug: string & import("effect/Brand").Brand<"IntegrationSlug">;
|
|
241
|
+
readonly description: string;
|
|
242
|
+
readonly kind: string;
|
|
243
|
+
readonly canRemove: boolean;
|
|
244
|
+
readonly canRefresh: boolean;
|
|
245
|
+
} | null, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
246
|
+
export declare const openApiConfigFamily: (arg: string & import("effect/Brand").Brand<"IntegrationSlug">) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
247
|
+
readonly spec: string;
|
|
248
|
+
readonly headers?: {
|
|
249
|
+
readonly [x: string]: string;
|
|
250
|
+
} | undefined;
|
|
251
|
+
readonly baseUrl?: string | undefined;
|
|
252
|
+
readonly queryParams?: {
|
|
253
|
+
readonly [x: string]: string;
|
|
254
|
+
} | undefined;
|
|
255
|
+
readonly sourceUrl?: string | undefined;
|
|
256
|
+
readonly googleDiscoveryUrls?: readonly string[] | undefined;
|
|
257
|
+
readonly authenticationTemplate?: readonly ({
|
|
258
|
+
readonly type: "apiKey";
|
|
259
|
+
readonly slug: string;
|
|
260
|
+
readonly headers?: {
|
|
261
|
+
readonly [x: string]: string | readonly (string | {
|
|
262
|
+
readonly name: string;
|
|
263
|
+
readonly type: "variable";
|
|
264
|
+
})[];
|
|
265
|
+
} | undefined;
|
|
266
|
+
readonly queryParams?: {
|
|
267
|
+
readonly [x: string]: string | readonly (string | {
|
|
268
|
+
readonly name: string;
|
|
269
|
+
readonly type: "variable";
|
|
270
|
+
})[];
|
|
271
|
+
} | undefined;
|
|
272
|
+
} | {
|
|
273
|
+
readonly type: "oauth";
|
|
274
|
+
readonly slug: string;
|
|
275
|
+
readonly authorizationUrl: string;
|
|
276
|
+
readonly tokenUrl: string;
|
|
277
|
+
readonly scopes: readonly string[];
|
|
278
|
+
})[] | undefined;
|
|
279
|
+
} | null, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").OpenApiParseError | import("../sdk").OpenApiExtractionError | import("../sdk").OpenApiOAuthError>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AuthMethod, Placement } from "@executor-js/react/lib/auth-placements";
|
|
2
|
+
import type { AuthTemplateEditorValue } from "@executor-js/react/components/auth-template-editor";
|
|
3
|
+
import { type APIKeyAuthentication, type Authentication } from "../sdk/types";
|
|
4
|
+
export declare const placementsFromApiKey: (template: APIKeyAuthentication) => Placement[];
|
|
5
|
+
/** Map each stored auth template to a generic `AuthMethod`. */
|
|
6
|
+
export declare function authMethodsFromConfig(templates: readonly Authentication[]): AuthMethod[];
|
|
7
|
+
/** Build an `APIKeyAuthentication` template from generic placements. When
|
|
8
|
+
* `slug` is omitted the backend assigns a `custom_<id>` slug. */
|
|
9
|
+
export declare function templateFromPlacements(placements: readonly Placement[], slug?: string): APIKeyAuthentication;
|
|
10
|
+
/** Convert one stored `Authentication` template into a generic editor value. */
|
|
11
|
+
export declare function editorValueFromAuthentication(template: Authentication): AuthTemplateEditorValue;
|
|
12
|
+
/** Convert one generic editor value back into a stored `Authentication`, or
|
|
13
|
+
* `null` for `none` (no method to register). The optional `slug` names the
|
|
14
|
+
* template; when omitted the backend backfills `custom_<id>`. */
|
|
15
|
+
export declare function authenticationFromEditorValue(value: AuthTemplateEditorValue, slug?: string): Authentication | null;
|