@executor-js/plugin-openapi 1.5.5 → 1.5.7

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.
Files changed (58) hide show
  1. package/dist/{AddOpenApiSource-7M52SRUX.js → AddOpenApiSource-7O4LSD7C.js} +79 -241
  2. package/dist/AddOpenApiSource-7O4LSD7C.js.map +1 -0
  3. package/dist/{EditOpenApiSource-WTAMRJUK.js → EditOpenApiSource-GIN5RQPL.js} +3 -3
  4. package/dist/{OpenApiAccountsPanel-3VJJXNQF.js → OpenApiAccountsPanel-7XT6ZMD5.js} +30 -28
  5. package/dist/OpenApiAccountsPanel-7XT6ZMD5.js.map +1 -0
  6. package/dist/api/group.d.ts +38 -37
  7. package/dist/api/index.d.ts +39 -38
  8. package/dist/{chunk-YVRI7KRC.js → chunk-C3IJX4AN.js} +257 -219
  9. package/dist/chunk-C3IJX4AN.js.map +1 -0
  10. package/dist/{chunk-OSIFYIQP.js → chunk-C6PH4R7Q.js} +94 -5
  11. package/dist/chunk-C6PH4R7Q.js.map +1 -0
  12. package/dist/{chunk-BSLE6HCE.js → chunk-IB36ED7Y.js} +13 -27
  13. package/dist/chunk-IB36ED7Y.js.map +1 -0
  14. package/dist/chunk-RCBR3QMJ.js +73 -0
  15. package/dist/chunk-RCBR3QMJ.js.map +1 -0
  16. package/dist/{chunk-V7VCHYOY.js → chunk-WJQIWTZF.js} +97 -172
  17. package/dist/chunk-WJQIWTZF.js.map +1 -0
  18. package/dist/client.js +3 -3
  19. package/dist/core.js +133 -7
  20. package/dist/core.js.map +1 -1
  21. package/dist/index.js +7 -5
  22. package/dist/index.js.map +1 -1
  23. package/dist/react/AddOpenApiSource.d.ts +0 -1
  24. package/dist/react/OpenApiSourceDetailsFields.d.ts +3 -0
  25. package/dist/react/atoms.d.ts +40 -52
  26. package/dist/react/auth-method-config.d.ts +7 -4
  27. package/dist/react/client.d.ts +38 -37
  28. package/dist/sdk/config.d.ts +27 -27
  29. package/dist/sdk/derive-auth.d.ts +9 -0
  30. package/dist/sdk/extract.d.ts +11 -1
  31. package/dist/sdk/index.d.ts +6 -2
  32. package/dist/sdk/invoke.d.ts +11 -1
  33. package/dist/sdk/migrate-config.d.ts +4 -0
  34. package/dist/sdk/migrate-config.test.d.ts +1 -0
  35. package/dist/sdk/openapi-utils.d.ts +4 -8
  36. package/dist/sdk/output-schema-migration.d.ts +21 -0
  37. package/dist/sdk/output-schema-migration.test.d.ts +1 -0
  38. package/dist/sdk/plugin.d.ts +6 -4
  39. package/dist/sdk/preview.d.ts +77 -1
  40. package/dist/sdk/server-url-resolution.test.d.ts +1 -0
  41. package/dist/sdk/spec-blob-migration.d.ts +7 -0
  42. package/dist/sdk/spec-blob.test.d.ts +1 -0
  43. package/dist/sdk/store.d.ts +10 -1
  44. package/dist/sdk/tool-row-projection.test.d.ts +1 -0
  45. package/dist/sdk/types.d.ts +61 -36
  46. package/dist/testing/index.d.ts +1 -1
  47. package/dist/testing.js +4 -20
  48. package/dist/testing.js.map +1 -1
  49. package/package.json +3 -3
  50. package/dist/AddOpenApiSource-7M52SRUX.js.map +0 -1
  51. package/dist/OpenApiAccountsPanel-3VJJXNQF.js.map +0 -1
  52. package/dist/chunk-BSLE6HCE.js.map +0 -1
  53. package/dist/chunk-OSIFYIQP.js.map +0 -1
  54. package/dist/chunk-QSSRVK6M.js +0 -139
  55. package/dist/chunk-QSSRVK6M.js.map +0 -1
  56. package/dist/chunk-V7VCHYOY.js.map +0 -1
  57. package/dist/chunk-YVRI7KRC.js.map +0 -1
  58. /package/dist/{EditOpenApiSource-WTAMRJUK.js.map → EditOpenApiSource-GIN5RQPL.js.map} +0 -0
@@ -1,15 +1,16 @@
1
1
  import {
2
2
  authMethodsFromConfig,
3
+ openApiWireAuthInput,
3
4
  templateFromPlacements
4
- } from "./chunk-QSSRVK6M.js";
5
+ } from "./chunk-RCBR3QMJ.js";
5
6
  import {
6
7
  googleAudienceWarningsForUrls
7
8
  } from "./chunk-MZWZQ24W.js";
8
9
  import {
9
10
  openApiConfigAtom,
10
11
  openapiConfigure
11
- } from "./chunk-BSLE6HCE.js";
12
- import "./chunk-YVRI7KRC.js";
12
+ } from "./chunk-IB36ED7Y.js";
13
+ import "./chunk-C3IJX4AN.js";
13
14
 
14
15
  // src/react/OpenApiAccountsPanel.tsx
15
16
  import { useCallback, useMemo } from "react";
@@ -21,6 +22,9 @@ import { TriangleAlert } from "lucide-react";
21
22
  import { AccountsSection } from "@executor-js/react/components/accounts-section";
22
23
  import { Alert, AlertDescription, AlertTitle } from "@executor-js/react/components/alert";
23
24
  import { integrationWriteKeys } from "@executor-js/react/api/reactivity-keys";
25
+ import {
26
+ useCustomMethodActions
27
+ } from "@executor-js/react/lib/custom-auth-methods";
24
28
  import { jsx, jsxs } from "react/jsx-runtime";
25
29
  var GOOGLE_AUDIENCE_WARNING = {
26
30
  "workspace-admin": "This connection includes Google Workspace admin APIs (Chat, Admin Directory, Admin Reports). Connecting requires a Workspace admin account \u2014 personal Gmail accounts cannot grant these scopes.",
@@ -47,38 +51,36 @@ function OpenApiAccountsPanel(props) {
47
51
  const declared = authMethodsFromConfig(existingTemplate);
48
52
  return declared.length > 0 ? declared : [NO_AUTH_METHOD];
49
53
  }, [existingTemplate]);
50
- const createCustomMethod = useCallback(
54
+ const configure = useCallback(
51
55
  async (input) => {
52
- const method = templateFromPlacements(input.placements);
53
56
  const exit = await doConfigure({
54
57
  params: { slug },
55
- payload: { authenticationTemplate: [...existingTemplate, method] },
58
+ payload: {
59
+ authenticationTemplate: input.authenticationTemplate.map(openApiWireAuthInput),
60
+ ...input.mode ? { mode: input.mode } : {}
61
+ },
56
62
  reactivityKeys: integrationWriteKeys
57
63
  });
58
- if (Exit.isFailure(exit)) return null;
59
- const before = new Set(existingTemplate.map((template) => String(template.slug)));
60
- const created = authMethodsFromConfig(
61
- exit.value.authenticationTemplate
62
- ).find((candidate) => !before.has(String(candidate.template)));
63
- return created ?? null;
64
+ return Exit.map(exit, (result) => result.authenticationTemplate);
64
65
  },
65
- [doConfigure, slug, existingTemplate]
66
+ [doConfigure, slug]
66
67
  );
67
- const removeCustomMethod = useCallback(
68
- async (method) => {
69
- if (method.source !== "custom") return false;
70
- const next = existingTemplate.filter(
71
- (template) => String(template.slug) !== String(method.template)
72
- );
73
- const exit = await doConfigure({
74
- params: { slug },
75
- payload: { authenticationTemplate: next, mode: "replace" },
76
- reactivityKeys: integrationWriteKeys
77
- });
78
- return Exit.isSuccess(exit);
79
- },
80
- [doConfigure, existingTemplate, slug]
68
+ const codec = useMemo(
69
+ () => ({
70
+ toAuthMethods: authMethodsFromConfig,
71
+ // Slug omitted → backend backfills `custom_<id>`.
72
+ templatesFromPlacements: (placements) => [
73
+ templateFromPlacements(placements)
74
+ ],
75
+ slugOf: (template) => String(template.slug)
76
+ }),
77
+ []
81
78
  );
79
+ const { createCustomMethod, removeCustomMethod } = useCustomMethodActions({
80
+ existing: existingTemplate,
81
+ codec,
82
+ configure
83
+ });
82
84
  const audienceWarnings = useMemo(() => {
83
85
  if (!AsyncResult.isSuccess(configResult) || configResult.value == null) return [];
84
86
  const urls = configResult.value.googleDiscoveryUrls ?? [];
@@ -109,4 +111,4 @@ function OpenApiAccountsPanel(props) {
109
111
  export {
110
112
  OpenApiAccountsPanel as default
111
113
  };
112
- //# sourceMappingURL=OpenApiAccountsPanel-3VJJXNQF.js.map
114
+ //# sourceMappingURL=OpenApiAccountsPanel-7XT6ZMD5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/OpenApiAccountsPanel.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\nimport { useAtomValue, useAtomSet } from \"@effect/atom-react\";\nimport * as Exit from \"effect/Exit\";\nimport * as AsyncResult from \"effect/unstable/reactivity/AsyncResult\";\nimport { AuthTemplateSlug, IntegrationSlug } from \"@executor-js/sdk/shared\";\nimport type { IntegrationAccountHandoff } from \"@executor-js/sdk/client\";\n\nimport { TriangleAlert } from \"lucide-react\";\n\nimport { AccountsSection } from \"@executor-js/react/components/accounts-section\";\nimport { Alert, AlertDescription, AlertTitle } from \"@executor-js/react/components/alert\";\nimport { integrationWriteKeys } from \"@executor-js/react/api/reactivity-keys\";\nimport type { AuthMethod, Placement } from \"@executor-js/react/lib/auth-placements\";\nimport {\n useCustomMethodActions,\n type AuthMethodsCodec,\n type ConfigureAuthMethods,\n} from \"@executor-js/react/lib/custom-auth-methods\";\n\nimport { openApiConfigAtom, openapiConfigure } from \"./atoms\";\nimport {\n authMethodsFromConfig,\n templateFromPlacements,\n openApiWireAuthInput,\n} from \"./auth-method-config\";\nimport { googleAudienceWarningsForUrls } from \"../sdk/google-presets\";\nimport type { Authentication } from \"../sdk/types\";\n\nconst GOOGLE_AUDIENCE_WARNING: Readonly<Record<string, string>> = {\n \"workspace-admin\":\n \"This connection includes Google Workspace admin APIs (Chat, Admin Directory, Admin Reports). Connecting requires a Workspace admin account — personal Gmail accounts cannot grant these scopes.\",\n \"unsupported-user\":\n \"This connection includes APIs (e.g. Google Keep) that Google does not grant through standard user OAuth consent. Those tools may fail to authorize.\",\n};\n\nconst NO_AUTH_METHOD: AuthMethod = {\n id: \"none\",\n label: \"No authentication\",\n kind: \"none\",\n source: \"spec\",\n template: AuthTemplateSlug.make(\"none\"),\n placements: [],\n};\n\n// ---------------------------------------------------------------------------\n// OpenAPI Accounts hub — fills the generic detail page's `accounts` slot.\n//\n// Reads the integration's real `authenticationTemplate` (via `getConfig`),\n// converts it to generic `AuthMethod[]`, and composes the generic\n// `AccountsSection` — whose Add-account offers those methods plus a \"+ Custom\n// method\" row (apiKey-only). The custom-method create is INJECTED here\n// (`createCustomMethod`): generic placements → an `APIKeyAuthentication`\n// (`templateFromPlacements`, slug omitted → backend `custom_<id>`) merge-\n// appended onto the existing template and persisted via `configure`. Stays\n// plugin-side because it touches the OpenAPI sdk `Authentication` types.\n// ---------------------------------------------------------------------------\n\nexport default function OpenApiAccountsPanel(props: {\n readonly sourceId: string;\n readonly integrationName: string;\n readonly accountHandoff?: IntegrationAccountHandoff | null;\n}) {\n const { sourceId, integrationName, accountHandoff } = props;\n const slug = IntegrationSlug.make(sourceId);\n const configResult = useAtomValue(openApiConfigAtom(slug));\n const doConfigure = useAtomSet(openapiConfigure, { mode: \"promiseExit\" });\n\n // The wire `getConfig` template is structurally an `Authentication[]` (the\n // `slug` is an unbranded string on the wire); treat it as such for the\n // plugin-side converters that brand the slug back.\n const existingTemplate = useMemo<readonly Authentication[]>(() => {\n if (!AsyncResult.isSuccess(configResult) || configResult.value == null) return [];\n return (configResult.value.authenticationTemplate ?? []) as readonly Authentication[];\n }, [configResult]);\n\n const methods = useMemo<readonly AuthMethod[]>(() => {\n const declared = authMethodsFromConfig(existingTemplate);\n return declared.length > 0 ? declared : [NO_AUTH_METHOD];\n }, [existingTemplate]);\n\n // Custom-method create/remove: the shared skeleton (merge-append → diff out\n // the created method; filter → replace) parameterized by the OpenAPI codec.\n // Stays plugin-side only where it touches the OpenAPI `Authentication` types.\n const configure = useCallback<ConfigureAuthMethods<Authentication>>(\n async (input) => {\n const exit = await doConfigure({\n params: { slug },\n payload: {\n authenticationTemplate: input.authenticationTemplate.map(openApiWireAuthInput),\n ...(input.mode ? { mode: input.mode } : {}),\n },\n reactivityKeys: integrationWriteKeys,\n });\n return Exit.map(exit, (result) => result.authenticationTemplate as readonly Authentication[]);\n },\n [doConfigure, slug],\n );\n\n const codec = useMemo<AuthMethodsCodec<Authentication>>(\n () => ({\n toAuthMethods: authMethodsFromConfig,\n // Slug omitted → backend backfills `custom_<id>`.\n templatesFromPlacements: (placements: readonly Placement[]) => [\n templateFromPlacements(placements),\n ],\n slugOf: (template: Authentication) => String(template.slug),\n }),\n [],\n );\n\n const { createCustomMethod, removeCustomMethod } = useCustomMethodActions({\n existing: existingTemplate,\n codec,\n configure,\n });\n\n // For a bundled `google` integration, surface a caution when any selected API\n // needs a privileged or unsupported OAuth consent the user should know about\n // BEFORE connecting an account. Derived from the stored Discovery URLs.\n const audienceWarnings = useMemo<readonly string[]>(() => {\n if (!AsyncResult.isSuccess(configResult) || configResult.value == null) return [];\n const urls = configResult.value.googleDiscoveryUrls ?? [];\n return googleAudienceWarningsForUrls(urls).flatMap((audience: string) => {\n const message = GOOGLE_AUDIENCE_WARNING[audience];\n return message ? [message] : [];\n });\n }, [configResult]);\n\n return (\n <div className=\"mx-auto max-w-3xl space-y-8 px-6 py-8\">\n {audienceWarnings.length > 0 && (\n <Alert variant=\"destructive\">\n <TriangleAlert />\n <AlertTitle>Some Google APIs need special consent</AlertTitle>\n <AlertDescription>\n {audienceWarnings.map((message: string) => (\n <p key={message}>{message}</p>\n ))}\n </AlertDescription>\n </Alert>\n )}\n <AccountsSection\n integration={slug}\n integrationName={integrationName}\n methods={methods}\n accountHandoff={accountHandoff}\n createCustomMethod={createCustomMethod}\n removeCustomMethod={removeCustomMethod}\n />\n </div>\n );\n}\n"],"mappings":"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","names":[]}
@@ -88,7 +88,14 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
88
88
  readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
89
89
  readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
90
90
  readonly slug: Schema.String;
91
+ readonly kind: Schema.Literal<"oauth2">;
92
+ readonly authorizationUrl: Schema.String;
93
+ readonly tokenUrl: Schema.String;
94
+ readonly scopes: Schema.$Array<Schema.String>;
95
+ }>, Schema.Struct<{
96
+ readonly slug: Schema.optional<Schema.String>;
91
97
  readonly type: Schema.Literal<"apiKey">;
98
+ readonly label: Schema.optional<Schema.String>;
92
99
  readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
93
100
  readonly type: Schema.Literal<"variable">;
94
101
  readonly name: Schema.String;
@@ -97,12 +104,6 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
97
104
  readonly type: Schema.Literal<"variable">;
98
105
  readonly name: Schema.String;
99
106
  }>]>>]>>>;
100
- }>, Schema.Struct<{
101
- readonly slug: Schema.String;
102
- readonly type: Schema.Literal<"oauth">;
103
- readonly authorizationUrl: Schema.String;
104
- readonly tokenUrl: Schema.String;
105
- readonly scopes: Schema.$Array<Schema.String>;
106
107
  }>]>>>;
107
108
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
108
109
  readonly slug: Schema.brand<Schema.String, "IntegrationSlug">;
@@ -118,7 +119,6 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
118
119
  }>>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getConfig", "GET", "/openapi/integrations/:slug/config", HttpApiEndpoint.StringTree<Schema.Struct<{
119
120
  slug: Schema.String;
120
121
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
121
- readonly spec: Schema.String;
122
122
  readonly sourceUrl: Schema.optional<Schema.String>;
123
123
  readonly googleDiscoveryUrls: Schema.optional<Schema.$Array<Schema.String>>;
124
124
  readonly baseUrl: Schema.optional<Schema.String>;
@@ -126,28 +126,35 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
126
126
  readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
127
127
  readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
128
128
  readonly slug: Schema.String;
129
- readonly type: Schema.Literal<"apiKey">;
130
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
131
- readonly type: Schema.Literal<"variable">;
132
- readonly name: Schema.String;
133
- }>]>>]>>>;
134
- readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
135
- readonly type: Schema.Literal<"variable">;
136
- readonly name: Schema.String;
137
- }>]>>]>>>;
138
- }>, Schema.Struct<{
139
- readonly slug: Schema.String;
140
- readonly type: Schema.Literal<"oauth">;
129
+ readonly kind: Schema.Literal<"oauth2">;
141
130
  readonly authorizationUrl: Schema.String;
142
131
  readonly tokenUrl: Schema.String;
143
132
  readonly scopes: Schema.$Array<Schema.String>;
133
+ }>, Schema.Struct<{
134
+ readonly slug: Schema.String;
135
+ readonly kind: Schema.Literal<"apikey">;
136
+ readonly label: Schema.optional<Schema.String>;
137
+ readonly placements: Schema.$Array<Schema.Struct<{
138
+ readonly carrier: Schema.Literals<readonly ["header", "query"]>;
139
+ readonly name: Schema.String;
140
+ readonly prefix: Schema.optional<Schema.String>;
141
+ readonly variable: Schema.optional<Schema.String>;
142
+ readonly literal: Schema.optional<Schema.String>;
143
+ }>>;
144
144
  }>]>>>;
145
145
  }>>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"configure", "POST", "/openapi/integrations/:slug/config", HttpApiEndpoint.StringTree<Schema.Struct<{
146
146
  slug: Schema.String;
147
147
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
148
148
  readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
149
149
  readonly slug: Schema.String;
150
+ readonly kind: Schema.Literal<"oauth2">;
151
+ readonly authorizationUrl: Schema.String;
152
+ readonly tokenUrl: Schema.String;
153
+ readonly scopes: Schema.$Array<Schema.String>;
154
+ }>, Schema.Struct<{
155
+ readonly slug: Schema.optional<Schema.String>;
150
156
  readonly type: Schema.Literal<"apiKey">;
157
+ readonly label: Schema.optional<Schema.String>;
151
158
  readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
152
159
  readonly type: Schema.Literal<"variable">;
153
160
  readonly name: Schema.String;
@@ -156,32 +163,26 @@ export declare const OpenApiGroup: HttpApiGroup.HttpApiGroup<"openapi", HttpApiE
156
163
  readonly type: Schema.Literal<"variable">;
157
164
  readonly name: Schema.String;
158
165
  }>]>>]>>>;
159
- }>, Schema.Struct<{
160
- readonly slug: Schema.String;
161
- readonly type: Schema.Literal<"oauth">;
162
- readonly authorizationUrl: Schema.String;
163
- readonly tokenUrl: Schema.String;
164
- readonly scopes: Schema.$Array<Schema.String>;
165
166
  }>]>>;
166
167
  readonly mode: Schema.optional<Schema.Literals<readonly ["merge", "replace"]>>;
167
168
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
168
169
  readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
169
170
  readonly slug: Schema.String;
170
- readonly type: Schema.Literal<"apiKey">;
171
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
172
- readonly type: Schema.Literal<"variable">;
173
- readonly name: Schema.String;
174
- }>]>>]>>>;
175
- readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
176
- readonly type: Schema.Literal<"variable">;
177
- readonly name: Schema.String;
178
- }>]>>]>>>;
179
- }>, Schema.Struct<{
180
- readonly slug: Schema.String;
181
- readonly type: Schema.Literal<"oauth">;
171
+ readonly kind: Schema.Literal<"oauth2">;
182
172
  readonly authorizationUrl: Schema.String;
183
173
  readonly tokenUrl: Schema.String;
184
174
  readonly scopes: Schema.$Array<Schema.String>;
175
+ }>, Schema.Struct<{
176
+ readonly slug: Schema.String;
177
+ readonly kind: Schema.Literal<"apikey">;
178
+ readonly label: Schema.optional<Schema.String>;
179
+ readonly placements: Schema.$Array<Schema.Struct<{
180
+ readonly carrier: Schema.Literals<readonly ["header", "query"]>;
181
+ readonly name: Schema.String;
182
+ readonly prefix: Schema.optional<Schema.String>;
183
+ readonly variable: Schema.optional<Schema.String>;
184
+ readonly literal: Schema.optional<Schema.String>;
185
+ }>>;
185
186
  }>]>>;
186
187
  }>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | typeof OpenApiParseError | typeof OpenApiExtractionError | typeof OpenApiOAuthError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeSpec", "DELETE", "/openapi/integrations/:slug", HttpApiEndpoint.StringTree<Schema.Struct<{
187
188
  slug: Schema.String;
@@ -14,7 +14,6 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
14
14
  readonly operationId: string;
15
15
  }[];
16
16
  readonly title: import("effect/Option").Option<string>;
17
- readonly tags: readonly string[];
18
17
  readonly servers: readonly {
19
18
  readonly description: import("effect/Option").Option<string>;
20
19
  readonly url: string;
@@ -26,6 +25,7 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
26
25
  };
27
26
  }>;
28
27
  }[];
28
+ readonly tags: readonly string[];
29
29
  readonly securitySchemes: readonly {
30
30
  readonly name: string;
31
31
  readonly type: "oauth2" | "http" | "apiKey" | "openIdConnect";
@@ -171,7 +171,14 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
171
171
  readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
172
172
  readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
173
173
  readonly slug: import("effect/Schema").String;
174
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
175
+ readonly authorizationUrl: import("effect/Schema").String;
176
+ readonly tokenUrl: import("effect/Schema").String;
177
+ readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
178
+ }>, import("effect/Schema").Struct<{
179
+ readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
174
180
  readonly type: import("effect/Schema").Literal<"apiKey">;
181
+ readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
175
182
  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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
176
183
  readonly type: import("effect/Schema").Literal<"variable">;
177
184
  readonly name: import("effect/Schema").String;
@@ -180,12 +187,6 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
180
187
  readonly type: import("effect/Schema").Literal<"variable">;
181
188
  readonly name: import("effect/Schema").String;
182
189
  }>]>>]>>>;
183
- }>, import("effect/Schema").Struct<{
184
- readonly slug: import("effect/Schema").String;
185
- readonly type: import("effect/Schema").Literal<"oauth">;
186
- readonly authorizationUrl: import("effect/Schema").String;
187
- readonly tokenUrl: import("effect/Schema").String;
188
- readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
189
190
  }>]>>>;
190
191
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
191
192
  readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
@@ -201,7 +202,6 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
201
202
  }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/core").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getConfig", "GET", "/openapi/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
202
203
  slug: import("effect/Schema").String;
203
204
  }>>, 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<{
204
- readonly spec: import("effect/Schema").String;
205
205
  readonly sourceUrl: import("effect/Schema").optional<import("effect/Schema").String>;
206
206
  readonly googleDiscoveryUrls: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
207
207
  readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -209,28 +209,35 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
209
209
  readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
210
210
  readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
211
211
  readonly slug: import("effect/Schema").String;
212
- readonly type: import("effect/Schema").Literal<"apiKey">;
213
- 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
214
- readonly type: import("effect/Schema").Literal<"variable">;
215
- readonly name: import("effect/Schema").String;
216
- }>]>>]>>>;
217
- 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
218
- readonly type: import("effect/Schema").Literal<"variable">;
219
- readonly name: import("effect/Schema").String;
220
- }>]>>]>>>;
221
- }>, import("effect/Schema").Struct<{
222
- readonly slug: import("effect/Schema").String;
223
- readonly type: import("effect/Schema").Literal<"oauth">;
212
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
224
213
  readonly authorizationUrl: import("effect/Schema").String;
225
214
  readonly tokenUrl: import("effect/Schema").String;
226
215
  readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
216
+ }>, import("effect/Schema").Struct<{
217
+ readonly slug: import("effect/Schema").String;
218
+ readonly kind: import("effect/Schema").Literal<"apikey">;
219
+ readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
220
+ readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
221
+ readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
222
+ readonly name: import("effect/Schema").String;
223
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
224
+ readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
225
+ readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
226
+ }>>;
227
227
  }>]>>>;
228
228
  }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/core").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configure", "POST", "/openapi/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
229
229
  slug: import("effect/Schema").String;
230
230
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
231
231
  readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
232
232
  readonly slug: import("effect/Schema").String;
233
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
234
+ readonly authorizationUrl: import("effect/Schema").String;
235
+ readonly tokenUrl: import("effect/Schema").String;
236
+ readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
237
+ }>, import("effect/Schema").Struct<{
238
+ readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
233
239
  readonly type: import("effect/Schema").Literal<"apiKey">;
240
+ readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
234
241
  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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
235
242
  readonly type: import("effect/Schema").Literal<"variable">;
236
243
  readonly name: import("effect/Schema").String;
@@ -239,32 +246,26 @@ export declare const openApiHttpPlugin: import("@executor-js/sdk/core").Configur
239
246
  readonly type: import("effect/Schema").Literal<"variable">;
240
247
  readonly name: import("effect/Schema").String;
241
248
  }>]>>]>>>;
242
- }>, import("effect/Schema").Struct<{
243
- readonly slug: import("effect/Schema").String;
244
- readonly type: import("effect/Schema").Literal<"oauth">;
245
- readonly authorizationUrl: import("effect/Schema").String;
246
- readonly tokenUrl: import("effect/Schema").String;
247
- readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
248
249
  }>]>>;
249
250
  readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
250
251
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
251
252
  readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
252
253
  readonly slug: import("effect/Schema").String;
253
- readonly type: import("effect/Schema").Literal<"apiKey">;
254
- 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
255
- readonly type: import("effect/Schema").Literal<"variable">;
256
- readonly name: import("effect/Schema").String;
257
- }>]>>]>>>;
258
- 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
259
- readonly type: import("effect/Schema").Literal<"variable">;
260
- readonly name: import("effect/Schema").String;
261
- }>]>>]>>>;
262
- }>, import("effect/Schema").Struct<{
263
- readonly slug: import("effect/Schema").String;
264
- readonly type: import("effect/Schema").Literal<"oauth">;
254
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
265
255
  readonly authorizationUrl: import("effect/Schema").String;
266
256
  readonly tokenUrl: import("effect/Schema").String;
267
257
  readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
258
+ }>, import("effect/Schema").Struct<{
259
+ readonly slug: import("effect/Schema").String;
260
+ readonly kind: import("effect/Schema").Literal<"apikey">;
261
+ readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
262
+ readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
263
+ readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
264
+ readonly name: import("effect/Schema").String;
265
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
266
+ readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
267
+ readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
268
+ }>>;
268
269
  }>]>>;
269
270
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/core").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSpec", "DELETE", "/openapi/integrations/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
270
271
  slug: import("effect/Schema").String;