@executor-js/plugin-openapi 0.2.1 → 1.4.20
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
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
inferOAuthIssuerUrl,
|
|
6
6
|
openApiOAuthConnectionId,
|
|
7
7
|
resolveOAuthUrl
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-TGDT6QCH.js";
|
|
9
|
+
import "./chunk-GFQUEZUW.js";
|
|
10
|
+
import "./chunk-E7PZ2QGD.js";
|
|
11
11
|
export {
|
|
12
12
|
OPENAPI_OAUTH_CALLBACK_PATH,
|
|
13
13
|
OPENAPI_OAUTH_POPUP_NAME,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
openApiOAuthConnectionId,
|
|
17
17
|
resolveOAuthUrl
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=AddOpenApiSource-
|
|
19
|
+
//# sourceMappingURL=AddOpenApiSource-FLMNI742.js.map
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
OpenApiSourceDetailsFields,
|
|
5
5
|
inferOAuthIssuerUrl,
|
|
6
6
|
resolveOAuthUrl
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TGDT6QCH.js";
|
|
8
8
|
import {
|
|
9
9
|
openApiSourceAtom,
|
|
10
10
|
openApiSourceBindingsAtom,
|
|
11
11
|
removeOpenApiSourceBinding,
|
|
12
12
|
setOpenApiSourceBinding,
|
|
13
13
|
updateOpenApiSource
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GFQUEZUW.js";
|
|
15
15
|
import {
|
|
16
16
|
OAuth2SourceConfig,
|
|
17
17
|
OpenApiSourceBindingInput,
|
|
18
18
|
oauth2ClientSecretSlot
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E7PZ2QGD.js";
|
|
20
20
|
|
|
21
21
|
// src/react/EditOpenApiSource.tsx
|
|
22
22
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -276,7 +276,7 @@ function EditOpenApiSource(props) {
|
|
|
276
276
|
setError(null);
|
|
277
277
|
const exit = await doSetBinding({
|
|
278
278
|
params: { scopeId: displayScope },
|
|
279
|
-
payload:
|
|
279
|
+
payload: OpenApiSourceBindingInput.make({
|
|
280
280
|
sourceId: props.sourceId,
|
|
281
281
|
sourceScope,
|
|
282
282
|
scope: targetScope,
|
|
@@ -388,7 +388,7 @@ function EditOpenApiSource(props) {
|
|
|
388
388
|
}
|
|
389
389
|
const setBindingExit = await doSetBinding({
|
|
390
390
|
params: { scopeId: displayScope },
|
|
391
|
-
payload:
|
|
391
|
+
payload: OpenApiSourceBindingInput.make({
|
|
392
392
|
sourceId: props.sourceId,
|
|
393
393
|
sourceScope,
|
|
394
394
|
scope: targetScope,
|
|
@@ -451,7 +451,7 @@ function EditOpenApiSource(props) {
|
|
|
451
451
|
onSuccess: async (result) => {
|
|
452
452
|
const setBindingExit = await doSetBinding({
|
|
453
453
|
params: { scopeId: displayScope },
|
|
454
|
-
payload:
|
|
454
|
+
payload: OpenApiSourceBindingInput.make({
|
|
455
455
|
sourceId: props.sourceId,
|
|
456
456
|
sourceScope,
|
|
457
457
|
scope: targetScope,
|
|
@@ -533,7 +533,7 @@ function EditOpenApiSource(props) {
|
|
|
533
533
|
params: { scopeId: displayScope, namespace: props.sourceId },
|
|
534
534
|
payload: {
|
|
535
535
|
sourceScope,
|
|
536
|
-
oauth2:
|
|
536
|
+
oauth2: OAuth2SourceConfig.make({
|
|
537
537
|
kind: "oauth2",
|
|
538
538
|
securitySchemeName: oauth2.securitySchemeName,
|
|
539
539
|
flow: oauth2.flow,
|
|
@@ -662,4 +662,4 @@ function EditOpenApiSource(props) {
|
|
|
662
662
|
export {
|
|
663
663
|
EditOpenApiSource as default
|
|
664
664
|
};
|
|
665
|
-
//# sourceMappingURL=EditOpenApiSource-
|
|
665
|
+
//# sourceMappingURL=EditOpenApiSource-I4NIGIIJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/EditOpenApiSource.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport { useAtomSet, useAtomValue } from \"@effect/atom-react\";\nimport * as Exit from \"effect/Exit\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\n\nimport { connectionsAtom, sourceAtom, startOAuth } from \"@executor-js/react/api/atoms\";\nimport { useScope, useScopeStack, useUserScope } from \"@executor-js/react/api/scope-context\";\nimport { connectionWriteKeys, sourceWriteKeys } from \"@executor-js/react/api/reactivity-keys\";\nimport { Button } from \"@executor-js/react/components/button\";\nimport { CopyButton } from \"@executor-js/react/components/copy-button\";\nimport {\n CardStack,\n CardStackContent,\n CardStackEntry,\n CardStackEntryContent,\n CardStackEntryDescription,\n CardStackEntryField,\n CardStackEntryTitle,\n} from \"@executor-js/react/components/card-stack\";\nimport { FilterTabs } from \"@executor-js/react/components/filter-tabs\";\nimport { Input } from \"@executor-js/react/components/input\";\nimport { sourceWriteKeys as openApiWriteKeys } from \"@executor-js/react/api/reactivity-keys\";\nimport { ConnectionId, ScopeId, SecretId } from \"@executor-js/sdk/core\";\nimport { useSecretPickerSecrets } from \"@executor-js/react/plugins/use-secret-picker-secrets\";\nimport {\n oauthCallbackUrl,\n useOAuthPopupFlow,\n type OAuthCompletionPayload,\n} from \"@executor-js/react/plugins/oauth-sign-in\";\nimport {\n effectiveCredentialBindingForScope,\n exactCredentialBindingForScope,\n isConnectionCredentialBindingValue,\n isSecretCredentialBindingValue,\n} from \"@executor-js/react/plugins/credential-bindings\";\nimport { SecretCredentialSlotBindings } from \"@executor-js/react/plugins/credential-slot-bindings\";\n\nimport {\n openApiSourceAtom,\n openApiSourceBindingsAtom,\n removeOpenApiSourceBinding,\n setOpenApiSourceBinding,\n updateOpenApiSource,\n} from \"./atoms\";\nimport { OpenApiSourceDetailsFields } from \"./OpenApiSourceDetailsFields\";\nimport {\n OPENAPI_OAUTH_CALLBACK_PATH,\n OPENAPI_OAUTH_POPUP_NAME,\n inferOAuthIssuerUrl,\n resolveOAuthUrl,\n} from \"./AddOpenApiSource\";\nimport { oauth2ClientSecretSlot } from \"../sdk/store\";\nimport {\n OAuth2SourceConfig,\n OpenApiSourceBindingInput,\n type OpenApiSourceBindingRef,\n} from \"../sdk/types\";\n\nconst ErrorMessage = Schema.Struct({ message: Schema.String });\nconst decodeErrorMessage = Schema.decodeUnknownOption(ErrorMessage);\n\nconst errorMessageFromExit = (exit: Exit.Exit<unknown, unknown>, fallback: string): string =>\n Option.match(Option.flatMap(Exit.findErrorOption(exit), decodeErrorMessage), {\n onNone: () => fallback,\n onSome: ({ message }) => message,\n });\n\ntype SlotDef =\n | {\n readonly kind: \"secret\";\n readonly slot: string;\n readonly label: string;\n readonly hint?: string;\n }\n | {\n readonly kind: \"oauth2\";\n readonly slot: string;\n readonly label: string;\n };\n\nconst slugify = (value: string): string =>\n value\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\") || \"default\";\n\nconst shortHash = (value: string): string => {\n let hash = 0x811c9dc5;\n for (let i = 0; i < value.length; i++) {\n hash ^= value.charCodeAt(i);\n hash = Math.imul(hash, 0x01000193);\n }\n return (hash >>> 0).toString(36).slice(0, 6);\n};\n\nconst openApiOAuthConnectionId = (\n sourceId: string,\n securitySchemeName: string,\n targetScope: ScopeId,\n): ConnectionId =>\n ConnectionId.make(\n `openapi-oauth-${slugify(sourceId)}-${slugify(securitySchemeName)}-${shortHash(targetScope)}`,\n );\n\nconst effectiveClientSecretSlot = (oauth2: {\n readonly securitySchemeName: string;\n readonly clientSecretSlot: string | null;\n}): string => oauth2.clientSecretSlot ?? oauth2ClientSecretSlot(oauth2.securitySchemeName);\n\nexport default function EditOpenApiSource(props: {\n readonly sourceId: string;\n readonly onSave: () => void;\n}) {\n const displayScope = useScope();\n const scopeStack = useScopeStack();\n const userScope = useUserScope();\n const sourceSummaryResult = useAtomValue(sourceAtom(props.sourceId, displayScope));\n const sourceSummary =\n AsyncResult.isSuccess(sourceSummaryResult) && sourceSummaryResult.value\n ? sourceSummaryResult.value\n : null;\n const sourceScopeId = sourceSummary?.scopeId ?? displayScope;\n const sourceScope = ScopeId.make(sourceScopeId);\n const scopeRanks = useMemo(\n () => new Map(scopeStack.map((scope, index) => [scope.id, index] as const)),\n [scopeStack],\n );\n\n const sourceResult = useAtomValue(openApiSourceAtom(sourceScope, props.sourceId));\n const bindingsResult = useAtomValue(\n openApiSourceBindingsAtom(displayScope, props.sourceId, sourceScope),\n );\n const connectionsResult = useAtomValue(connectionsAtom(displayScope));\n const secretList = useSecretPickerSecrets();\n\n const doUpdate = useAtomSet(updateOpenApiSource, { mode: \"promiseExit\" });\n const doSetBinding = useAtomSet(setOpenApiSourceBinding, {\n mode: \"promiseExit\",\n });\n const doRemoveBinding = useAtomSet(removeOpenApiSourceBinding, {\n mode: \"promiseExit\",\n });\n const doStartOAuth = useAtomSet(startOAuth, { mode: \"promiseExit\" });\n const oauth = useOAuthPopupFlow<OAuthCompletionPayload>({\n popupName: OPENAPI_OAUTH_POPUP_NAME,\n popupBlockedMessage: \"OAuth popup was blocked by the browser\",\n startErrorMessage: \"Failed to connect OAuth\",\n });\n\n const source =\n AsyncResult.isSuccess(sourceResult) && sourceResult.value ? sourceResult.value : null;\n const bindingRows: readonly OpenApiSourceBindingRef[] = AsyncResult.isSuccess(bindingsResult)\n ? bindingsResult.value\n : [];\n const connections = AsyncResult.isSuccess(connectionsResult) ? connectionsResult.value : [];\n const oauth2RedirectUrl = oauthCallbackUrl(OPENAPI_OAUTH_CALLBACK_PATH);\n\n const [name, setName] = useState(source?.name ?? \"\");\n const [baseUrl, setBaseUrl] = useState(source?.config.baseUrl ?? \"\");\n const [sourceSaveState, setSourceSaveState] = useState<\"idle\" | \"saving\" | \"saved\">(\"idle\");\n const [error, setError] = useState<string | null>(null);\n const [busyKey, setBusyKey] = useState<string | null>(null);\n const [pendingOAuthConnection, setPendingOAuthConnection] = useState<{\n readonly scopeId: ScopeId;\n readonly slot: string;\n readonly connectionId: string;\n } | null>(null);\n const [loadedSourceKey, setLoadedSourceKey] = useState<string | null>(null);\n const [selectedOAuthTokenScope, setSelectedOAuthTokenScope] = useState<string>(\n userScope !== sourceScopeId ? userScope : sourceScopeId,\n );\n const [oauth2AuthorizationUrl, setOAuth2AuthorizationUrl] = useState(\n source?.config.oauth2?.authorizationUrl ?? \"\",\n );\n const [oauth2TokenUrl, setOAuth2TokenUrl] = useState(source?.config.oauth2?.tokenUrl ?? \"\");\n const [oauth2EndpointsSaveState, setOAuth2EndpointsSaveState] = useState<\n \"idle\" | \"saving\" | \"saved\"\n >(\"idle\");\n const editIdentity = useMemo(\n () => ({\n name,\n namespace: props.sourceId,\n setName,\n setNamespace: () => {},\n reset: () => {},\n }),\n [name, props.sourceId],\n );\n const sourceSaveSeq = useRef(0);\n const oauth2EndpointsSaveSeq = useRef(0);\n\n useEffect(() => {\n setSelectedOAuthTokenScope(userScope !== sourceScopeId ? userScope : sourceScopeId);\n }, [sourceScopeId, userScope]);\n\n useEffect(() => {\n if (!source) return;\n const sourceKey = `${sourceScopeId}:${source.namespace}`;\n if (loadedSourceKey === sourceKey) return;\n setName(source.name);\n setBaseUrl(source.config.baseUrl ?? \"\");\n setOAuth2AuthorizationUrl(source.config.oauth2?.authorizationUrl ?? \"\");\n setOAuth2TokenUrl(source.config.oauth2?.tokenUrl ?? \"\");\n setOAuth2EndpointsSaveState(\"idle\");\n setSourceSaveState(\"idle\");\n setLoadedSourceKey(sourceKey);\n }, [loadedSourceKey, source, sourceScopeId]);\n\n useEffect(() => {\n if (!source) return;\n const sourceKey = `${sourceScopeId}:${source.namespace}`;\n if (loadedSourceKey !== sourceKey) return;\n\n const nextName = name.trim();\n const nextBaseUrl = baseUrl.trim();\n const currentName = source.name;\n const currentBaseUrl = source.config.baseUrl ?? \"\";\n if ((nextName || currentName) === currentName && nextBaseUrl === currentBaseUrl) {\n return;\n }\n\n const timeout = window.setTimeout(() => {\n const seq = ++sourceSaveSeq.current;\n setSourceSaveState(\"saving\");\n setError(null);\n void (async () => {\n const exit = await doUpdate({\n params: { scopeId: displayScope, namespace: props.sourceId },\n payload: {\n sourceScope,\n name: nextName || undefined,\n baseUrl: nextBaseUrl || undefined,\n },\n reactivityKeys: openApiWriteKeys,\n });\n if (sourceSaveSeq.current !== seq) return;\n if (Exit.isFailure(exit)) {\n setSourceSaveState(\"idle\");\n setError(errorMessageFromExit(exit, \"Failed to save source details\"));\n return;\n }\n setSourceSaveState(\"saved\");\n window.setTimeout(() => {\n if (sourceSaveSeq.current === seq) setSourceSaveState(\"idle\");\n }, 1600);\n })();\n }, 600);\n\n return () => window.clearTimeout(timeout);\n }, [\n baseUrl,\n displayScope,\n doUpdate,\n loadedSourceKey,\n name,\n props.sourceId,\n source,\n sourceScope,\n sourceScopeId,\n ]);\n\n const secretSlots = useMemo(() => {\n if (!source) return [] as SlotDef[];\n const slots: SlotDef[] = [];\n for (const [headerName, value] of Object.entries(source.config.headers ?? {})) {\n if (typeof value === \"string\") continue;\n slots.push({\n kind: \"secret\",\n slot: value.slot,\n label: headerName,\n hint: value.prefix ? `Prefix: ${value.prefix}` : undefined,\n });\n }\n if (source.config.oauth2) {\n const clientSecretSlot = effectiveClientSecretSlot(source.config.oauth2);\n slots.push({\n kind: \"secret\",\n slot: source.config.oauth2.clientIdSlot,\n label: \"Client ID\",\n });\n slots.push({\n kind: \"secret\",\n slot: clientSecretSlot,\n label: \"Client Secret\",\n hint:\n source.config.oauth2.flow === \"authorizationCode\"\n ? \"Optional for public PKCE clients\"\n : undefined,\n });\n slots.push({\n kind: \"oauth2\",\n slot: source.config.oauth2.connectionSlot,\n label:\n source.config.oauth2.flow === \"clientCredentials\"\n ? \"OAuth Client Credentials\"\n : \"OAuth Authorization Code\",\n });\n }\n return slots;\n }, [source]);\n\n const credentialScopes = useMemo(() => {\n const entries = [{ scopeId: ScopeId.make(sourceScopeId), label: \"Organization\" }];\n if (userScope !== sourceScopeId) {\n entries.unshift({ scopeId: ScopeId.make(userScope), label: \"Personal\" });\n } else {\n entries[0] = {\n scopeId: ScopeId.make(sourceScopeId),\n label: \"Credentials\",\n };\n }\n return entries;\n }, [sourceScopeId, userScope]);\n const credentialScopeOptions = useMemo(\n () =>\n credentialScopes.map((entry) => ({\n scopeId: entry.scopeId,\n label: entry.label,\n description:\n entry.label === \"Personal\"\n ? \"Saved only for your account.\"\n : \"Shared with everyone who can use this source.\",\n })),\n [credentialScopes],\n );\n const organizationCredentialScope =\n credentialScopes.find((entry) => entry.label === \"Organization\") ?? credentialScopes[0]!;\n const personalCredentialScope =\n credentialScopes.find((entry) => entry.label === \"Personal\") ?? null;\n const secretBindingScopes =\n personalCredentialScope &&\n personalCredentialScope.scopeId !== organizationCredentialScope.scopeId\n ? [organizationCredentialScope, personalCredentialScope]\n : [organizationCredentialScope];\n const activeOAuthTokenScope =\n credentialScopes.find((entry) => entry.scopeId === selectedOAuthTokenScope) ??\n credentialScopes[0]!;\n const activeOAuthTokenScopeId = activeOAuthTokenScope.scopeId;\n const activeOAuthTokenScopeLabel = activeOAuthTokenScope.label;\n\n if (!source) {\n return (\n <div className=\"space-y-3\">\n <h1 className=\"text-xl font-semibold text-foreground\">Edit OpenAPI Source</h1>\n <p className=\"text-sm text-muted-foreground\">Loading configuration…</p>\n </div>\n );\n }\n\n const setSecretBinding = async (\n targetScope: ScopeId,\n slot: string,\n secretId: string,\n secretScope: ScopeId,\n ) => {\n const inputKey = `${targetScope}:${slot}`;\n const trimmed = secretId.trim();\n if (!trimmed) return;\n setBusyKey(inputKey);\n setError(null);\n const exit = await doSetBinding({\n params: { scopeId: displayScope },\n payload: OpenApiSourceBindingInput.make({\n sourceId: props.sourceId,\n sourceScope,\n scope: targetScope,\n slot,\n value: {\n kind: \"secret\",\n secretId: SecretId.make(trimmed),\n secretScopeId: secretScope,\n },\n }),\n reactivityKeys: sourceWriteKeys,\n });\n if (Exit.isFailure(exit)) {\n setError(errorMessageFromExit(exit, \"Failed to save credential binding\"));\n }\n setBusyKey(null);\n };\n\n const clearBinding = async (targetScope: ScopeId, slot: string) => {\n setBusyKey(`${targetScope}:${slot}:clear`);\n setError(null);\n const exit = await doRemoveBinding({\n params: { scopeId: displayScope },\n payload: {\n sourceId: props.sourceId,\n sourceScope,\n slot,\n scope: targetScope,\n },\n reactivityKeys: sourceWriteKeys,\n });\n if (Exit.isFailure(exit)) {\n setError(errorMessageFromExit(exit, \"Failed to clear credential binding\"));\n }\n setBusyKey(null);\n };\n\n const connectOAuth = async (targetScope: ScopeId) => {\n const oauth2 = source.config.oauth2;\n if (!oauth2) return;\n const clientIdBinding = effectiveCredentialBindingForScope(\n bindingRows,\n oauth2.clientIdSlot,\n targetScope,\n scopeRanks,\n );\n const clientSecretSlot = effectiveClientSecretSlot(oauth2);\n const clientSecretBinding = effectiveCredentialBindingForScope(\n bindingRows,\n clientSecretSlot,\n targetScope,\n scopeRanks,\n );\n if (!clientIdBinding || !isSecretCredentialBindingValue(clientIdBinding.value)) {\n setError(\"Client ID must be bound before connecting\");\n return;\n }\n const clientIdSecretId = clientIdBinding.value.secretId;\n if (\n oauth2.flow === \"clientCredentials\" &&\n (!clientSecretBinding || !isSecretCredentialBindingValue(clientSecretBinding.value))\n ) {\n setError(\"Client secret must be bound before connecting\");\n return;\n }\n const clientSecretValue =\n oauth2.flow === \"clientCredentials\" &&\n clientSecretBinding &&\n isSecretCredentialBindingValue(clientSecretBinding.value)\n ? clientSecretBinding.value\n : null;\n\n const existingConnection = exactCredentialBindingForScope(\n bindingRows,\n oauth2.connectionSlot,\n targetScope,\n );\n const connectionId =\n existingConnection && isConnectionCredentialBindingValue(existingConnection.value)\n ? existingConnection.value.connectionId\n : openApiOAuthConnectionId(props.sourceId, oauth2.securitySchemeName, targetScope);\n\n setBusyKey(`${targetScope}:${oauth2.connectionSlot}:connect`);\n setPendingOAuthConnection({\n scopeId: targetScope,\n slot: oauth2.connectionSlot,\n connectionId: connectionId,\n });\n setError(null);\n const failConnect = (message: string) => {\n setError(message);\n setPendingOAuthConnection(null);\n setBusyKey(null);\n };\n const displayName = source.name;\n const tokenUrl = resolveOAuthUrl(oauth2.tokenUrl, source.config.baseUrl ?? \"\");\n if (oauth2.flow === \"clientCredentials\") {\n const startOAuthExit = await doStartOAuth({\n params: { scopeId: targetScope },\n payload: {\n endpoint: tokenUrl,\n redirectUrl: tokenUrl,\n connectionId: connectionId,\n tokenScope: targetScope,\n strategy: {\n kind: \"client-credentials\",\n tokenEndpoint: tokenUrl,\n clientIdSecretId,\n clientSecretSecretId: clientSecretValue!.secretId,\n scopes: [...oauth2.scopes],\n },\n pluginId: \"openapi\",\n identityLabel: `${displayName} OAuth`,\n },\n });\n if (Exit.isFailure(startOAuthExit)) {\n failConnect(errorMessageFromExit(startOAuthExit, \"Failed to connect OAuth\"));\n return;\n }\n const response = startOAuthExit.value;\n if (!response.completedConnection) {\n failConnect(\"Unexpected OAuth response\");\n return;\n }\n const setBindingExit = await doSetBinding({\n params: { scopeId: displayScope },\n payload: OpenApiSourceBindingInput.make({\n sourceId: props.sourceId,\n sourceScope,\n scope: targetScope,\n slot: oauth2.connectionSlot,\n value: {\n kind: \"connection\",\n connectionId: ConnectionId.make(response.completedConnection.connectionId),\n },\n }),\n reactivityKeys: [...sourceWriteKeys, ...connectionWriteKeys],\n });\n if (Exit.isFailure(setBindingExit)) {\n failConnect(errorMessageFromExit(setBindingExit, \"Failed to connect OAuth\"));\n return;\n }\n setPendingOAuthConnection(null);\n setBusyKey(null);\n return;\n }\n\n const authorizationUrl = resolveOAuthUrl(\n oauth2.authorizationUrl ?? \"\",\n source.config.baseUrl ?? \"\",\n );\n const issuerUrl = oauth2.issuerUrl ?? inferOAuthIssuerUrl(authorizationUrl);\n const startOAuthExit = await doStartOAuth({\n params: { scopeId: targetScope },\n payload: {\n endpoint: authorizationUrl,\n connectionId,\n tokenScope: targetScope,\n redirectUrl: oauth2RedirectUrl,\n strategy: {\n kind: \"authorization-code\",\n authorizationEndpoint: authorizationUrl,\n tokenEndpoint: tokenUrl,\n issuerUrl,\n clientIdSecretId,\n clientSecretSecretId:\n clientSecretBinding && isSecretCredentialBindingValue(clientSecretBinding.value)\n ? clientSecretBinding.value.secretId\n : null,\n scopes: [...oauth2.scopes],\n },\n pluginId: \"openapi\",\n identityLabel: `${displayName} OAuth`,\n },\n });\n if (Exit.isFailure(startOAuthExit)) {\n failConnect(errorMessageFromExit(startOAuthExit, \"Failed to connect OAuth\"));\n return;\n }\n const response = startOAuthExit.value;\n if (response.authorizationUrl === null) {\n failConnect(\"Unexpected OAuth response\");\n return;\n }\n\n await oauth.openAuthorization({\n tokenScope: targetScope,\n run: async () => ({\n sessionId: response.sessionId,\n authorizationUrl: response.authorizationUrl,\n }),\n onSuccess: async (result) => {\n const setBindingExit = await doSetBinding({\n params: { scopeId: displayScope },\n payload: OpenApiSourceBindingInput.make({\n sourceId: props.sourceId,\n sourceScope,\n scope: targetScope,\n slot: oauth2.connectionSlot,\n value: {\n kind: \"connection\",\n connectionId: ConnectionId.make(result.connectionId),\n },\n }),\n reactivityKeys: [...sourceWriteKeys, ...connectionWriteKeys],\n });\n if (Exit.isFailure(setBindingExit)) {\n failConnect(errorMessageFromExit(setBindingExit, \"Failed to connect OAuth\"));\n return;\n }\n setPendingOAuthConnection(null);\n setBusyKey(null);\n },\n onError: (message) => {\n setError(message);\n setPendingOAuthConnection(null);\n setBusyKey(null);\n },\n });\n };\n\n return (\n <div className=\"space-y-6\">\n <div>\n <h1 className=\"text-xl font-semibold text-foreground\">OpenAPI Source</h1>\n </div>\n\n <OpenApiSourceDetailsFields\n title=\"Source Details\"\n description=\"Name and base URL save automatically.\"\n identity={editIdentity}\n baseUrl={baseUrl}\n onBaseUrlChange={setBaseUrl}\n specUrl={source.config.sourceUrl ?? \"\"}\n onSpecUrlChange={() => {}}\n specUrlDisabled\n namespaceReadOnly\n saveState={sourceSaveState}\n footer={\n source.config.oauth2\n ? `Authentication Template: OAuth2 ${source.config.oauth2.flow}`\n : Object.keys(source.config.headers ?? {}).length > 0\n ? `Authentication Template: ${Object.keys(source.config.headers ?? {}).length} header binding${\n Object.keys(source.config.headers ?? {}).length === 1 ? \"\" : \"s\"\n }`\n : \"Authentication Template: None\"\n }\n />\n\n <CardStack>\n <CardStackContent className=\"border-t-0\">\n <CardStackEntry>\n <CardStackEntryContent>\n <CardStackEntryTitle>Secrets</CardStackEntryTitle>\n </CardStackEntryContent>\n </CardStackEntry>\n\n <SecretCredentialSlotBindings\n slots={secretSlots.filter((slot) => slot.kind === \"secret\")}\n bindingScopes={secretBindingScopes}\n bindingRows={bindingRows}\n scopeRanks={scopeRanks}\n secrets={secretList}\n sourceId={props.sourceId}\n sourceName={source.name}\n credentialScopeOptions={credentialScopeOptions}\n busyKey={busyKey}\n onSetSecretBinding={setSecretBinding}\n onClearBinding={clearBinding}\n />\n\n {source.config.oauth2 &&\n (() => {\n const oauth2 = source.config.oauth2;\n const trimmedAuthUrl = oauth2AuthorizationUrl.trim();\n const trimmedTokenUrl = oauth2TokenUrl.trim();\n const savedAuthUrl = oauth2.authorizationUrl ?? \"\";\n const isAuthCode = oauth2.flow === \"authorizationCode\";\n const endpointsDirty =\n (isAuthCode && trimmedAuthUrl !== savedAuthUrl) ||\n trimmedTokenUrl !== oauth2.tokenUrl;\n const saving = oauth2EndpointsSaveState === \"saving\";\n const tokenUrlMissing = trimmedTokenUrl.length === 0;\n const authUrlMissing = isAuthCode && trimmedAuthUrl.length === 0;\n const canSave = endpointsDirty && !saving && !tokenUrlMissing && !authUrlMissing;\n\n const saveOAuth2Endpoints = async () => {\n const seq = ++oauth2EndpointsSaveSeq.current;\n setOAuth2EndpointsSaveState(\"saving\");\n setError(null);\n const exit = await doUpdate({\n params: { scopeId: displayScope, namespace: props.sourceId },\n payload: {\n sourceScope,\n oauth2: OAuth2SourceConfig.make({\n kind: \"oauth2\",\n securitySchemeName: oauth2.securitySchemeName,\n flow: oauth2.flow,\n tokenUrl: trimmedTokenUrl,\n authorizationUrl: isAuthCode ? trimmedAuthUrl || null : null,\n issuerUrl: oauth2.issuerUrl ?? null,\n clientIdSlot: oauth2.clientIdSlot,\n clientSecretSlot: oauth2.clientSecretSlot,\n connectionSlot: oauth2.connectionSlot,\n scopes: [...oauth2.scopes],\n }),\n },\n reactivityKeys: openApiWriteKeys,\n });\n if (oauth2EndpointsSaveSeq.current !== seq) return;\n if (Exit.isFailure(exit)) {\n setOAuth2EndpointsSaveState(\"idle\");\n setError(errorMessageFromExit(exit, \"Failed to save OAuth endpoints\"));\n return;\n }\n setOAuth2EndpointsSaveState(\"saved\");\n window.setTimeout(() => {\n if (oauth2EndpointsSaveSeq.current === seq) {\n setOAuth2EndpointsSaveState(\"idle\");\n }\n }, 1600);\n };\n\n const exact = exactCredentialBindingForScope(\n bindingRows,\n oauth2.connectionSlot,\n activeOAuthTokenScopeId,\n );\n const binding =\n exact ??\n effectiveCredentialBindingForScope(\n bindingRows,\n oauth2.connectionSlot,\n activeOAuthTokenScopeId,\n scopeRanks,\n );\n const connectionBinding =\n binding && isConnectionCredentialBindingValue(binding.value) ? binding.value : null;\n const connection = connectionBinding\n ? connections.find((entry) => entry.id === connectionBinding.connectionId)\n : null;\n const bindingScopeId = connectionBinding && binding ? binding.scopeId : null;\n const isConnecting =\n busyKey === `${activeOAuthTokenScopeId}:${oauth2.connectionSlot}:connect`;\n const isPendingOAuthConnection =\n pendingOAuthConnection?.scopeId === activeOAuthTokenScopeId &&\n pendingOAuthConnection !== null &&\n pendingOAuthConnection.slot === oauth2.connectionSlot;\n const isConnected = connection !== null && connection !== undefined;\n const statusText =\n isConnecting || isPendingOAuthConnection\n ? \"Saving OAuth connection...\"\n : connectionBinding && bindingScopeId\n ? connection\n ? bindingScopeId === activeOAuthTokenScopeId\n ? `Connected in ${activeOAuthTokenScopeLabel.toLowerCase()} as ${\n connection.identityLabel ?? connection.id\n }`\n : `Using organization connection ${\n connection.identityLabel ?? connection.id\n }`\n : bindingScopeId === activeOAuthTokenScopeId\n ? `Saved connection is missing in ${activeOAuthTokenScopeLabel.toLowerCase()}`\n : \"Organization connection is missing\"\n : `No ${activeOAuthTokenScopeLabel.toLowerCase()} connection`;\n const connectDisabled = isConnecting || endpointsDirty || saving;\n\n return (\n <>\n <CardStackEntry>\n <CardStackEntryContent>\n <CardStackEntryTitle>OAuth Endpoints</CardStackEntryTitle>\n <CardStackEntryDescription>\n Override the URLs from the OpenAPI spec when a provider publishes the wrong\n values.\n </CardStackEntryDescription>\n </CardStackEntryContent>\n <div className=\"flex items-center gap-2\">\n {oauth2EndpointsSaveState !== \"idle\" && (\n <span className=\"text-xs text-muted-foreground\">\n {saving ? \"Saving…\" : \"Saved\"}\n </span>\n )}\n <Button\n size=\"sm\"\n onClick={() => void saveOAuth2Endpoints()}\n disabled={!canSave}\n >\n Save\n </Button>\n </div>\n </CardStackEntry>\n {isAuthCode && (\n <CardStackEntryField label=\"Authorization URL\">\n <Input\n value={oauth2AuthorizationUrl}\n onChange={(e) =>\n setOAuth2AuthorizationUrl((e.target as HTMLInputElement).value)\n }\n className=\"font-mono text-sm\"\n />\n </CardStackEntryField>\n )}\n <CardStackEntryField label=\"Token URL\">\n <Input\n value={oauth2TokenUrl}\n onChange={(e) => setOAuth2TokenUrl((e.target as HTMLInputElement).value)}\n className=\"font-mono text-sm\"\n />\n </CardStackEntryField>\n <CardStackEntryField label=\"Redirect URL\">\n <div className=\"space-y-1.5\">\n <div className=\"flex items-center gap-1 rounded-md border border-border bg-background/50 px-2.5 py-1.5 font-mono text-[11px]\">\n <span className=\"truncate flex-1 text-foreground\">{oauth2RedirectUrl}</span>\n <CopyButton value={oauth2RedirectUrl} />\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Add this to your OAuth app's allowed redirects.\n </p>\n </div>\n </CardStackEntryField>\n {credentialScopes.length > 1 && (\n <CardStackEntry>\n <CardStackEntryContent>\n <CardStackEntryTitle>OAuth token</CardStackEntryTitle>\n <CardStackEntryDescription>\n Choose where the signed-in OAuth token is saved.\n </CardStackEntryDescription>\n </CardStackEntryContent>\n <FilterTabs\n tabs={credentialScopes.map((entry) => ({\n value: entry.scopeId,\n label: entry.label,\n }))}\n value={activeOAuthTokenScopeId}\n onChange={setSelectedOAuthTokenScope}\n />\n </CardStackEntry>\n )}\n <CardStackEntryField label=\"OAuth Connection\">\n <div className=\"space-y-2\">\n <div className=\"text-sm text-muted-foreground\">{statusText}</div>\n <Button\n size=\"sm\"\n onClick={() => void connectOAuth(activeOAuthTokenScopeId)}\n disabled={connectDisabled}\n >\n {isConnecting ? \"Connecting…\" : isConnected ? \"Reconnect\" : \"Connect\"}\n </Button>\n {endpointsDirty && (\n <p className=\"text-xs text-muted-foreground\">\n Save endpoint changes before reconnecting.\n </p>\n )}\n </div>\n </CardStackEntryField>\n </>\n );\n })()}\n </CardStackContent>\n </CardStack>\n\n {error && (\n <div className=\"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2\">\n <p className=\"text-sm text-destructive\">{error}</p>\n </div>\n )}\n\n <div className=\"flex items-center justify-start border-t border-border pt-4\">\n <Button variant=\"ghost\" onClick={props.onSave}>\n Back\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,WAAW,SAAS,QAAQ,gBAAgB;AACrD,SAAS,YAAY,oBAAoB;AACzC,YAAY,UAAU;AACtB,YAAY,YAAY;AACxB,YAAY,YAAY;AACxB,YAAY,iBAAiB;AAE7B,SAAS,iBAAiB,YAAY,kBAAkB;AACxD,SAAS,UAAU,eAAe,oBAAoB;AACtD,SAAS,qBAAqB,uBAAuB;AACrD,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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UACC,iBAAiB,SAAS,KACzB,qBAAC,kBACC;AAAA,iCAAC,yBACC;AAAA,kCAAC,uBAAoB,yBAAW;AAAA,cAChC,oBAAC,6BAA0B,8DAE3B;AAAA,eACF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM,iBAAiB,IAAI,CAAC,WAAW;AAAA,kBACrC,OAAO,MAAM;AAAA,kBACb,OAAO,MAAM;AAAA,gBACf,EAAE;AAAA,gBACF,OAAO;AAAA,gBACP,UAAU;AAAA;AAAA,YACZ;AAAA,aACF;AAAA,UAEF,oBAAC,uBAAoB,OAAM,oBACzB,+BAAC,SAAI,WAAU,aACb;AAAA,gCAAC,SAAI,WAAU,iCAAiC,sBAAW;AAAA,YAC3D;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS,MAAM,KAAK,aAAa,uBAAuB;AAAA,gBACxD,UAAU;AAAA,gBAET,yBAAe,qBAAgB,cAAc,cAAc;AAAA;AAAA,YAC9D;AAAA,YACC,kBACC,oBAAC,OAAE,WAAU,iCAAgC,wDAE7C;AAAA,aAEJ,GACF;AAAA,WACF;AAAA,MAEJ,GAAG;AAAA,OACP,GACF;AAAA,IAEC,SACC,oBAAC,SAAI,WAAU,sEACb,8BAAC,OAAE,WAAU,4BAA4B,iBAAM,GACjD;AAAA,IAGF,oBAAC,SAAI,WAAU,+DACb,8BAAC,UAAO,SAAQ,SAAQ,SAAS,MAAM,QAAQ,kBAE/C,GACF;AAAA,KACF;AAEJ;","names":["startOAuthExit","response"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openApiSourceAtom,
|
|
3
3
|
openApiSourceBindingsAtom
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GFQUEZUW.js";
|
|
5
5
|
import {
|
|
6
6
|
oauth2ClientSecretSlot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E7PZ2QGD.js";
|
|
8
8
|
|
|
9
9
|
// src/react/OpenApiSourceSummary.tsx
|
|
10
10
|
import { useAtomValue } from "@effect/atom-react";
|
|
@@ -119,4 +119,4 @@ function OpenApiSourceSummary(props) {
|
|
|
119
119
|
export {
|
|
120
120
|
OpenApiSourceSummary as default
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=OpenApiSourceSummary-
|
|
122
|
+
//# sourceMappingURL=OpenApiSourceSummary-CM46DB4L.js.map
|
package/dist/api/group.d.ts
CHANGED
|
@@ -2,9 +2,6 @@ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { InternalError } from "@executor-js/sdk/core";
|
|
4
4
|
import { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from "../sdk/errors";
|
|
5
|
-
import { SpecPreview } from "../sdk/preview";
|
|
6
|
-
import { StoredSourceSchema } from "../sdk/store";
|
|
7
|
-
import { OpenApiSourceBindingRef } from "../sdk/types";
|
|
8
5
|
export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiEndpoint.HttpApiEndpoint<"previewSpec", "POST", "/scopes/:scopeId/openapi/preview", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
9
6
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
10
7
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
@@ -19,7 +16,69 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
|
|
|
19
16
|
readonly prefix: Schema.optional<Schema.String>;
|
|
20
17
|
}>]>>>;
|
|
21
18
|
}>>;
|
|
22
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<
|
|
19
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
20
|
+
readonly title: Schema.OptionFromOptional<Schema.String>;
|
|
21
|
+
readonly version: Schema.OptionFromOptional<Schema.String>;
|
|
22
|
+
readonly servers: Schema.$Array<Schema.Struct<{
|
|
23
|
+
readonly url: Schema.String;
|
|
24
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
25
|
+
readonly variables: Schema.OptionFromOptional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
26
|
+
readonly default: Schema.String;
|
|
27
|
+
readonly enum: Schema.OptionFromOptional<Schema.$Array<Schema.String>>;
|
|
28
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
29
|
+
}>>>;
|
|
30
|
+
}>>;
|
|
31
|
+
readonly operationCount: Schema.Number;
|
|
32
|
+
readonly operations: Schema.$Array<Schema.Struct<{
|
|
33
|
+
readonly operationId: Schema.String;
|
|
34
|
+
readonly method: Schema.Literals<readonly ["get", "put", "post", "delete", "patch", "head", "options", "trace"]>;
|
|
35
|
+
readonly path: Schema.String;
|
|
36
|
+
readonly summary: Schema.OptionFromOptional<Schema.String>;
|
|
37
|
+
readonly tags: Schema.$Array<Schema.String>;
|
|
38
|
+
readonly deprecated: Schema.Boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
readonly tags: Schema.$Array<Schema.String>;
|
|
41
|
+
readonly securitySchemes: Schema.$Array<Schema.Struct<{
|
|
42
|
+
readonly name: Schema.String;
|
|
43
|
+
readonly type: Schema.Literals<readonly ["http", "apiKey", "oauth2", "openIdConnect"]>;
|
|
44
|
+
readonly scheme: Schema.OptionFromOptional<Schema.String>;
|
|
45
|
+
readonly bearerFormat: Schema.OptionFromOptional<Schema.String>;
|
|
46
|
+
readonly in: Schema.OptionFromOptional<Schema.Literals<readonly ["header", "query", "cookie"]>>;
|
|
47
|
+
readonly headerName: Schema.OptionFromOptional<Schema.String>;
|
|
48
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
49
|
+
readonly flows: Schema.OptionFromOptional<Schema.Struct<{
|
|
50
|
+
readonly authorizationCode: Schema.OptionFromOptional<Schema.Struct<{
|
|
51
|
+
readonly authorizationUrl: Schema.String;
|
|
52
|
+
readonly tokenUrl: Schema.String;
|
|
53
|
+
readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
|
|
54
|
+
readonly scopes: Schema.$Record<Schema.String, Schema.String>;
|
|
55
|
+
}>>;
|
|
56
|
+
readonly clientCredentials: Schema.OptionFromOptional<Schema.Struct<{
|
|
57
|
+
readonly tokenUrl: Schema.String;
|
|
58
|
+
readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
|
|
59
|
+
readonly scopes: Schema.$Record<Schema.String, Schema.String>;
|
|
60
|
+
}>>;
|
|
61
|
+
}>>;
|
|
62
|
+
readonly openIdConnectUrl: Schema.OptionFromOptional<Schema.String>;
|
|
63
|
+
}>>;
|
|
64
|
+
readonly authStrategies: Schema.$Array<Schema.Struct<{
|
|
65
|
+
readonly schemes: Schema.$Array<Schema.String>;
|
|
66
|
+
}>>;
|
|
67
|
+
readonly headerPresets: Schema.$Array<Schema.Struct<{
|
|
68
|
+
readonly label: Schema.String;
|
|
69
|
+
readonly headers: Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>;
|
|
70
|
+
readonly secretHeaders: Schema.$Array<Schema.String>;
|
|
71
|
+
}>>;
|
|
72
|
+
readonly oauth2Presets: Schema.$Array<Schema.Struct<{
|
|
73
|
+
readonly label: Schema.String;
|
|
74
|
+
readonly securitySchemeName: Schema.String;
|
|
75
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
76
|
+
readonly authorizationUrl: Schema.OptionFromOptional<Schema.String>;
|
|
77
|
+
readonly tokenUrl: Schema.String;
|
|
78
|
+
readonly refreshUrl: Schema.OptionFromOptional<Schema.String>;
|
|
79
|
+
readonly scopes: Schema.$Record<Schema.String, Schema.String>;
|
|
80
|
+
}>>;
|
|
81
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"addSpec", "POST", "/scopes/:scopeId/openapi/specs", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
23
82
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
24
83
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
25
84
|
readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
|
|
@@ -82,7 +141,51 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
|
|
|
82
141
|
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/openapi/sources/:namespace", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
83
142
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
84
143
|
namespace: Schema.String;
|
|
85
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<
|
|
144
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
|
|
145
|
+
readonly namespace: Schema.String;
|
|
146
|
+
readonly scope: Schema.String;
|
|
147
|
+
readonly name: Schema.String;
|
|
148
|
+
readonly config: Schema.Struct<{
|
|
149
|
+
readonly spec: Schema.String;
|
|
150
|
+
readonly sourceUrl: Schema.optional<Schema.String>;
|
|
151
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
152
|
+
readonly namespace: Schema.optional<Schema.String>;
|
|
153
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
154
|
+
readonly kind: Schema.Literal<"binding">;
|
|
155
|
+
readonly slot: Schema.String;
|
|
156
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
157
|
+
}>]>>>;
|
|
158
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
159
|
+
readonly kind: Schema.Literal<"binding">;
|
|
160
|
+
readonly slot: Schema.String;
|
|
161
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
162
|
+
}>]>>>;
|
|
163
|
+
readonly specFetchCredentials: Schema.optional<Schema.Struct<{
|
|
164
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
165
|
+
readonly kind: Schema.Literal<"binding">;
|
|
166
|
+
readonly slot: Schema.String;
|
|
167
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
168
|
+
}>]>>>;
|
|
169
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
170
|
+
readonly kind: Schema.Literal<"binding">;
|
|
171
|
+
readonly slot: Schema.String;
|
|
172
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
173
|
+
}>]>>>;
|
|
174
|
+
}>>;
|
|
175
|
+
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
176
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
177
|
+
readonly securitySchemeName: Schema.String;
|
|
178
|
+
readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
179
|
+
readonly tokenUrl: Schema.String;
|
|
180
|
+
readonly authorizationUrl: Schema.NullOr<Schema.String>;
|
|
181
|
+
readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
182
|
+
readonly clientIdSlot: Schema.String;
|
|
183
|
+
readonly clientSecretSlot: Schema.NullOr<Schema.String>;
|
|
184
|
+
readonly connectionSlot: Schema.String;
|
|
185
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
186
|
+
}>>;
|
|
187
|
+
}>;
|
|
188
|
+
}>>>, HttpApiEndpoint.Json<typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/openapi/sources/:namespace", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
86
189
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
87
190
|
namespace: Schema.String;
|
|
88
191
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
@@ -134,7 +237,25 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
|
|
|
134
237
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
135
238
|
namespace: Schema.String;
|
|
136
239
|
sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
137
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<
|
|
240
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
|
|
241
|
+
readonly sourceId: Schema.String;
|
|
242
|
+
readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
243
|
+
readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
244
|
+
readonly slot: Schema.String;
|
|
245
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
246
|
+
readonly kind: Schema.Literal<"secret">;
|
|
247
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
248
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
249
|
+
}>, Schema.Struct<{
|
|
250
|
+
readonly kind: Schema.Literal<"connection">;
|
|
251
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
252
|
+
}>, Schema.Struct<{
|
|
253
|
+
readonly kind: Schema.Literal<"text">;
|
|
254
|
+
readonly text: Schema.String;
|
|
255
|
+
}>]>;
|
|
256
|
+
readonly createdAt: Schema.Date;
|
|
257
|
+
readonly updatedAt: Schema.Date;
|
|
258
|
+
}>>>, HttpApiEndpoint.Json<typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/openapi/source-bindings", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
138
259
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
139
260
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
140
261
|
readonly sourceId: Schema.String;
|
|
@@ -152,7 +273,25 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
|
|
|
152
273
|
readonly kind: Schema.Literal<"text">;
|
|
153
274
|
readonly text: Schema.String;
|
|
154
275
|
}>]>;
|
|
155
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<
|
|
276
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
277
|
+
readonly sourceId: Schema.String;
|
|
278
|
+
readonly sourceScopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
279
|
+
readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
280
|
+
readonly slot: Schema.String;
|
|
281
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
282
|
+
readonly kind: Schema.Literal<"secret">;
|
|
283
|
+
readonly secretId: Schema.brand<Schema.String, "SecretId">;
|
|
284
|
+
readonly secretScopeId: Schema.optional<Schema.brand<Schema.String, "ScopeId">>;
|
|
285
|
+
}>, Schema.Struct<{
|
|
286
|
+
readonly kind: Schema.Literal<"connection">;
|
|
287
|
+
readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
|
|
288
|
+
}>, Schema.Struct<{
|
|
289
|
+
readonly kind: Schema.Literal<"text">;
|
|
290
|
+
readonly text: Schema.String;
|
|
291
|
+
}>]>;
|
|
292
|
+
readonly createdAt: Schema.Date;
|
|
293
|
+
readonly updatedAt: Schema.Date;
|
|
294
|
+
}>>, HttpApiEndpoint.Json<typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/openapi/source-bindings/remove", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
156
295
|
scopeId: Schema.brand<Schema.String, "ScopeId">;
|
|
157
296
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
158
297
|
readonly sourceId: Schema.String;
|