@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/client.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openApiPresets
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AQ7JDDRM.js";
|
|
4
|
+
import "./chunk-MZWZQ24W.js";
|
|
4
5
|
|
|
5
6
|
// src/react/plugin-client.tsx
|
|
6
7
|
import { defineClientPlugin } from "@executor-js/sdk/client";
|
|
7
8
|
|
|
8
9
|
// src/react/source-plugin.ts
|
|
9
10
|
import { lazy } from "react";
|
|
10
|
-
var importAdd = () => import("./AddOpenApiSource-
|
|
11
|
-
var importEdit = () => import("./EditOpenApiSource-
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var importAdd = () => import("./AddOpenApiSource-7M52SRUX.js");
|
|
12
|
+
var importEdit = () => import("./EditOpenApiSource-WTAMRJUK.js");
|
|
13
|
+
var importAccounts = () => import("./OpenApiAccountsPanel-3VJJXNQF.js");
|
|
14
|
+
var openApiIntegrationPlugin = {
|
|
14
15
|
key: "openapi",
|
|
15
16
|
label: "OpenAPI",
|
|
16
17
|
add: lazy(importAdd),
|
|
17
18
|
edit: lazy(importEdit),
|
|
18
|
-
|
|
19
|
+
accounts: lazy(importAccounts),
|
|
19
20
|
presets: openApiPresets,
|
|
20
21
|
preload: () => {
|
|
21
22
|
void importAdd();
|
|
22
23
|
void importEdit();
|
|
23
|
-
void
|
|
24
|
+
void importAccounts();
|
|
24
25
|
}
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
// src/react/plugin-client.tsx
|
|
28
29
|
var plugin_client_default = defineClientPlugin({
|
|
29
30
|
id: "openapi",
|
|
30
|
-
|
|
31
|
+
integrationPlugin: openApiIntegrationPlugin
|
|
31
32
|
});
|
|
32
33
|
export {
|
|
33
34
|
plugin_client_default as default
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/plugin-client.tsx","../src/react/source-plugin.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/plugin-openapi/client — `defineClientPlugin` entry.\n//\n// Aggregates the openapi plugin's frontend contributions into a single\n// declarative spec. The host's Vite plugin reads this via\n// `virtual:executor/plugins-client`, so the host's sources page derives\n// the openapi entry from here without a direct `*/react` import.\n//\n// The richer add/edit/summary components still live in `./react`; this\n// module just imports them and bundles them into the spec.\n// ---------------------------------------------------------------------------\n\nimport { defineClientPlugin } from \"@executor-js/sdk/client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/react/plugin-client.tsx","../src/react/source-plugin.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/plugin-openapi/client — `defineClientPlugin` entry.\n//\n// Aggregates the openapi plugin's frontend contributions into a single\n// declarative spec. The host's Vite plugin reads this via\n// `virtual:executor/plugins-client`, so the host's sources page derives\n// the openapi entry from here without a direct `*/react` import.\n//\n// The richer add/edit/summary components still live in `./react`; this\n// module just imports them and bundles them into the spec.\n// ---------------------------------------------------------------------------\n\nimport { defineClientPlugin } from \"@executor-js/sdk/client\";\n\nimport { openApiIntegrationPlugin } from \"./source-plugin\";\n\nexport default defineClientPlugin({\n id: \"openapi\" as const,\n integrationPlugin: openApiIntegrationPlugin,\n});\n","import { lazy } from \"react\";\nimport type { IntegrationPlugin } from \"@executor-js/sdk/client\";\nimport { openApiPresets } from \"../sdk/presets\";\n\nconst importAdd = () => import(\"./AddOpenApiSource\");\nconst importEdit = () => import(\"./EditOpenApiSource\");\nconst importAccounts = () => import(\"./OpenApiAccountsPanel\");\n\nexport const openApiIntegrationPlugin: IntegrationPlugin = {\n key: \"openapi\",\n label: \"OpenAPI\",\n add: lazy(importAdd),\n edit: lazy(importEdit),\n accounts: lazy(importAccounts),\n presets: openApiPresets,\n preload: () => {\n void importAdd();\n void importEdit();\n void importAccounts();\n },\n};\n"],"mappings":";;;;;;AAYA,SAAS,0BAA0B;;;ACZnC,SAAS,YAAY;AAIrB,IAAM,YAAY,MAAM,OAAO,gCAAoB;AACnD,IAAM,aAAa,MAAM,OAAO,iCAAqB;AACrD,IAAM,iBAAiB,MAAM,OAAO,oCAAwB;AAErD,IAAM,2BAA8C;AAAA,EACzD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,KAAK,KAAK,SAAS;AAAA,EACnB,MAAM,KAAK,UAAU;AAAA,EACrB,UAAU,KAAK,cAAc;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS,MAAM;AACb,SAAK,UAAU;AACf,SAAK,WAAW;AAChB,SAAK,eAAe;AAAA,EACtB;AACF;;;ADJA,IAAO,wBAAQ,mBAAmB;AAAA,EAChC,IAAI;AAAA,EACJ,mBAAmB;AACrB,CAAC;","names":[]}
|
package/dist/core.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AuthenticationSchema,
|
|
3
|
+
OpenApiIntegrationConfigSchema,
|
|
2
4
|
annotationsForOperation,
|
|
5
|
+
decodeOpenApiIntegrationConfig,
|
|
3
6
|
invoke,
|
|
4
7
|
invokeWithLayer,
|
|
5
8
|
makeDefaultOpenapiStore,
|
|
6
9
|
openApiPlugin,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
renderAuthTemplate
|
|
11
|
+
} from "./chunk-V7VCHYOY.js";
|
|
12
|
+
import {
|
|
13
|
+
convertGoogleDiscoveryBundleToOpenApi,
|
|
14
|
+
convertGoogleDiscoveryToOpenApi,
|
|
15
|
+
fetchGoogleDiscoveryDocument,
|
|
16
|
+
isGoogleDiscoveryUrl
|
|
17
|
+
} from "./chunk-OSIFYIQP.js";
|
|
18
|
+
import "./chunk-AQ7JDDRM.js";
|
|
19
|
+
import "./chunk-MZWZQ24W.js";
|
|
11
20
|
import {
|
|
12
21
|
AuthStrategy,
|
|
13
22
|
DocResolver,
|
|
@@ -22,7 +31,7 @@ import {
|
|
|
22
31
|
OAuth2ClientCredentialsFlow,
|
|
23
32
|
OAuth2Flows,
|
|
24
33
|
OAuth2Preset,
|
|
25
|
-
|
|
34
|
+
OpenApiAuthRequiredError,
|
|
26
35
|
OpenApiExtractionError,
|
|
27
36
|
OpenApiInvocationError,
|
|
28
37
|
OpenApiOAuthError,
|
|
@@ -44,10 +53,12 @@ import {
|
|
|
44
53
|
previewSpec,
|
|
45
54
|
resolveBaseUrl,
|
|
46
55
|
resolveSpecText,
|
|
47
|
-
substituteUrlVariables
|
|
48
|
-
|
|
56
|
+
substituteUrlVariables,
|
|
57
|
+
variable
|
|
58
|
+
} from "./chunk-YVRI7KRC.js";
|
|
49
59
|
export {
|
|
50
60
|
AuthStrategy,
|
|
61
|
+
AuthenticationSchema,
|
|
51
62
|
DocResolver,
|
|
52
63
|
EncodingObject,
|
|
53
64
|
ExtractedOperation,
|
|
@@ -60,8 +71,9 @@ export {
|
|
|
60
71
|
OAuth2ClientCredentialsFlow,
|
|
61
72
|
OAuth2Flows,
|
|
62
73
|
OAuth2Preset,
|
|
63
|
-
|
|
74
|
+
OpenApiAuthRequiredError,
|
|
64
75
|
OpenApiExtractionError,
|
|
76
|
+
OpenApiIntegrationConfigSchema,
|
|
65
77
|
OpenApiInvocationError,
|
|
66
78
|
OpenApiOAuthError,
|
|
67
79
|
OpenApiParseError,
|
|
@@ -76,19 +88,24 @@ export {
|
|
|
76
88
|
ServerVariable,
|
|
77
89
|
SpecPreview,
|
|
78
90
|
annotationsForOperation,
|
|
91
|
+
convertGoogleDiscoveryBundleToOpenApi,
|
|
92
|
+
convertGoogleDiscoveryToOpenApi,
|
|
93
|
+
decodeOpenApiIntegrationConfig,
|
|
79
94
|
extract,
|
|
95
|
+
fetchGoogleDiscoveryDocument,
|
|
80
96
|
fetchSpecText,
|
|
81
97
|
invoke,
|
|
82
98
|
invokeWithLayer,
|
|
99
|
+
isGoogleDiscoveryUrl,
|
|
83
100
|
makeDefaultOpenapiStore,
|
|
84
101
|
openApiPlugin,
|
|
85
|
-
openapiSchema,
|
|
86
102
|
parse,
|
|
87
103
|
preferredContent,
|
|
88
104
|
previewSpec,
|
|
105
|
+
renderAuthTemplate,
|
|
89
106
|
resolveBaseUrl,
|
|
90
|
-
resolveHeaders,
|
|
91
107
|
resolveSpecText,
|
|
92
|
-
substituteUrlVariables
|
|
108
|
+
substituteUrlVariables,
|
|
109
|
+
variable
|
|
93
110
|
};
|
|
94
111
|
//# sourceMappingURL=core.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openApiPlugin
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-V7VCHYOY.js";
|
|
4
|
+
import "./chunk-OSIFYIQP.js";
|
|
5
|
+
import "./chunk-AQ7JDDRM.js";
|
|
6
|
+
import "./chunk-MZWZQ24W.js";
|
|
7
|
+
import {
|
|
8
|
+
TOKEN_VARIABLE,
|
|
9
|
+
variable
|
|
10
|
+
} from "./chunk-YVRI7KRC.js";
|
|
6
11
|
export {
|
|
7
|
-
|
|
12
|
+
TOKEN_VARIABLE,
|
|
13
|
+
openApiPlugin,
|
|
14
|
+
variable
|
|
8
15
|
};
|
|
9
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import type { OAuth2Preset } from "../sdk/preview";
|
|
2
|
-
export declare const OPENAPI_OAUTH_POPUP_NAME = "openapi-oauth";
|
|
3
|
-
export declare const OPENAPI_OAUTH_CALLBACK_PATH = "/api/oauth/callback";
|
|
4
|
-
export declare const openApiOAuthConnectionId: (namespaceSlug: string, flow: OAuth2Preset["flow"]) => string;
|
|
5
|
-
/**
|
|
6
|
-
* OpenAPI 3.x requires OAuth2 tokenUrl/authorizationUrl to be absolute,
|
|
7
|
-
* but some specs ship relative paths like `/api/rest/v1/oauth/token`.
|
|
8
|
-
* Resolve them against the source's chosen baseUrl so the backend can
|
|
9
|
-
* fetch them directly and the absolute URL is what gets persisted on
|
|
10
|
-
* OAuth2SourceConfig.
|
|
11
|
-
*/
|
|
12
1
|
export declare function resolveOAuthUrl(url: string, baseUrl: string): string;
|
|
13
|
-
export declare function inferOAuthIssuerUrl(authorizationUrl: string): string | null;
|
|
14
2
|
export default function AddOpenApiSource(props: {
|
|
15
|
-
onComplete: () => void;
|
|
3
|
+
onComplete: (slug?: string) => void;
|
|
16
4
|
onCancel: () => void;
|
|
17
5
|
initialUrl?: string;
|
|
6
|
+
initialPreset?: string;
|
|
18
7
|
initialNamespace?: string;
|
|
19
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type GoogleProductPickerProps = {
|
|
2
|
+
readonly selectedPresetIds: ReadonlySet<string>;
|
|
3
|
+
readonly onToggle: (presetId: string, checked: boolean) => void;
|
|
4
|
+
readonly customUrls: readonly string[];
|
|
5
|
+
readonly onAddCustomUrl: (url: string) => void;
|
|
6
|
+
readonly onRemoveCustomUrl: (url: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function GoogleProductPicker({ selectedPresetIds, onToggle, customUrls, onAddCustomUrl, onRemoveCustomUrl, }: GoogleProductPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default GoogleProductPicker;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IntegrationAccountHandoff } from "@executor-js/sdk/client";
|
|
2
|
+
export default function OpenApiAccountsPanel(props: {
|
|
3
|
+
readonly sourceId: string;
|
|
4
|
+
readonly integrationName: string;
|
|
5
|
+
readonly accountHandoff?: IntegrationAccountHandoff | null;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { type FreeformComboboxOption } from "@executor-js/react/components/combobox";
|
|
2
|
-
import { type
|
|
2
|
+
import { type IntegrationIdentity } from "@executor-js/react/plugins/integration-identity";
|
|
3
3
|
export declare function OpenApiSourceDetailsFields(props: {
|
|
4
4
|
readonly title: string;
|
|
5
5
|
readonly description?: string;
|
|
6
|
-
readonly identity:
|
|
6
|
+
readonly identity: IntegrationIdentity;
|
|
7
7
|
readonly baseUrl: string;
|
|
8
8
|
readonly onBaseUrlChange: (value: string) => void;
|
|
9
9
|
readonly baseUrlOptions?: readonly FreeformComboboxOption[];
|
|
10
10
|
readonly specUrl?: string;
|
|
11
11
|
readonly onSpecUrlChange?: (value: string) => void;
|
|
12
|
+
readonly faviconIcon?: string | null;
|
|
12
13
|
readonly faviconUrl?: string;
|
|
13
14
|
readonly namespaceReadOnly?: boolean;
|
|
14
15
|
readonly specUrlDisabled?: boolean;
|