@executor-js/plugin-openapi 1.5.12 → 1.5.14

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.
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-I2XDCVVM.js";
6
6
  import {
7
7
  openApiPresets
8
- } from "./chunk-AQ7JDDRM.js";
8
+ } from "./chunk-PAHWRRS3.js";
9
9
  import {
10
10
  authenticationFromEditorValue,
11
11
  editorValueFromAuthentication,
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  addOpenApiSpec,
21
21
  previewOpenApiSpec
22
- } from "./chunk-UJTNRH4Q.js";
22
+ } from "./chunk-GS5YN6J4.js";
23
23
  import {
24
24
  resolveServerUrl
25
25
  } from "./chunk-RFSMGUBJ.js";
@@ -762,4 +762,4 @@ function AddOpenApiSource(props) {
762
762
  export {
763
763
  AddOpenApiSource as default
764
764
  };
765
- //# sourceMappingURL=AddOpenApiSource-JFSFWLBZ.js.map
765
+ //# sourceMappingURL=AddOpenApiSource-7TI5XUUY.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  openApiConfigAtom,
11
11
  openapiConfigure
12
- } from "./chunk-UJTNRH4Q.js";
12
+ } from "./chunk-GS5YN6J4.js";
13
13
  import "./chunk-RFSMGUBJ.js";
14
14
 
15
15
  // src/react/OpenApiAccountsPanel.tsx
@@ -111,4 +111,4 @@ function OpenApiAccountsPanel(props) {
111
111
  export {
112
112
  OpenApiAccountsPanel as default
113
113
  };
114
- //# sourceMappingURL=OpenApiAccountsPanel-2LHWUKIE.js.map
114
+ //# sourceMappingURL=OpenApiAccountsPanel-Y2RGBSSL.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  openApiConfigAtom,
3
3
  updateOpenApiSpec
4
- } from "./chunk-UJTNRH4Q.js";
4
+ } from "./chunk-GS5YN6J4.js";
5
5
  import "./chunk-RFSMGUBJ.js";
6
6
 
7
7
  // src/react/UpdateSpecSection.tsx
@@ -101,4 +101,4 @@ function UpdateSpecSection(props) {
101
101
  export {
102
102
  UpdateSpecSection as default
103
103
  };
104
- //# sourceMappingURL=UpdateSpecSection-D32QZT3Q.js.map
104
+ //# sourceMappingURL=UpdateSpecSection-MIZ5GLBM.js.map
@@ -12,6 +12,7 @@ import { ReactivityKey } from "@executor-js/react/api/reactivity-keys";
12
12
  // src/react/client.ts
13
13
  import { createPluginAtomClient } from "@executor-js/sdk/client";
14
14
  import {
15
+ getExecutorOrganizationHeaders,
15
16
  getExecutorApiBaseUrl,
16
17
  getExecutorServerAuthorizationHeader
17
18
  } from "@executor-js/react/api/server-connection";
@@ -164,7 +165,8 @@ var OpenApiGroup = HttpApiGroup.make("openapi").add(
164
165
  // src/react/client.ts
165
166
  var OpenApiClient = createPluginAtomClient(OpenApiGroup, {
166
167
  baseUrl: getExecutorApiBaseUrl,
167
- authorizationHeader: getExecutorServerAuthorizationHeader
168
+ authorizationHeader: getExecutorServerAuthorizationHeader,
169
+ headers: getExecutorOrganizationHeaders
168
170
  });
169
171
 
170
172
  // src/react/atoms.ts
@@ -193,4 +195,4 @@ export {
193
195
  updateOpenApiSpec,
194
196
  openapiConfigure
195
197
  };
196
- //# sourceMappingURL=chunk-UJTNRH4Q.js.map
198
+ //# sourceMappingURL=chunk-GS5YN6J4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts"],"sourcesContent":["import type { IntegrationSlug } from \"@executor-js/sdk/shared\";\nimport * as Atom from \"effect/unstable/reactivity/Atom\";\nimport { ReactivityKey } from \"@executor-js/react/api/reactivity-keys\";\nimport { OpenApiClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms — v2: the integration catalog is the unit of identity (the v1\n// per-scope `source` row is gone). `getIntegration` returns the catalog entry\n// (slug/description/kind/canRemove/canRefresh); credentials are owner-scoped\n// connections read from the shared `connections` API, not bound per source.\n// ---------------------------------------------------------------------------\n\nexport const openApiIntegrationAtom = (slug: IntegrationSlug) =>\n OpenApiClient.query(\"openapi\", \"getIntegration\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// The full opaque config (including `authenticationTemplate`), used by the\n// configure UX to render existing auth methods and add custom ones.\nexport const openApiConfigAtom = (slug: IntegrationSlug) =>\n OpenApiClient.query(\"openapi\", \"getConfig\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const previewOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"previewSpec\");\n\nexport const addOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"addSpec\");\n\nexport const removeOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"removeSpec\");\n\n/** Re-fetch (or replace) the integration's spec and rebuild its tools in\n * place — connections, policies, and the description survive. Pass\n * `reactivityKeys: integrationWriteKeys` at the call site. */\nexport const updateOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"updateSpec\");\n\n// Add / merge custom auth methods onto an integration's `authenticationTemplate`.\nexport const openapiConfigure = OpenApiClient.mutation(\"openapi\", \"configure\");\n\n// `getIntegration` is read-only; the atom family lets a caller pass a slug.\nexport const openApiIntegrationFamily = Atom.family(openApiIntegrationAtom);\n\n// `getConfig` is read-only; the atom family lets a caller pass a slug.\nexport const openApiConfigFamily = Atom.family(openApiConfigAtom);\n","import { createPluginAtomClient } from \"@executor-js/sdk/client\";\nimport {\n getExecutorOrganizationHeaders,\n getExecutorApiBaseUrl,\n getExecutorServerAuthorizationHeader,\n} from \"@executor-js/react/api/server-connection\";\nimport { OpenApiGroup } from \"../api/group\";\n\nexport const OpenApiClient = createPluginAtomClient(OpenApiGroup, {\n baseUrl: getExecutorApiBaseUrl,\n authorizationHeader: getExecutorServerAuthorizationHeader,\n headers: getExecutorOrganizationHeaders,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport { ApiKeyAuthMethod, ApiKeyAuthTemplate } from \"@executor-js/sdk/http-auth\";\nimport {\n InternalError,\n IntegrationAlreadyExistsError,\n IntegrationNotFoundError,\n IntegrationSlug,\n} from \"@executor-js/sdk/shared\";\n\nimport { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from \"../sdk/errors\";\nimport { SpecPreview } from \"../sdk/preview\";\n\n// ---------------------------------------------------------------------------\n// Errors — the plugin-domain tagged errors flow directly to clients\n// (4xx, each carrying its own `httpApiStatus`). `InternalError` is the shared\n// opaque 500 surface; `StorageError` → `InternalError` translation happens at\n// service wiring time. `IntegrationAlreadyExistsError` (409) blocks re-adding\n// an existing slug — see addSpec.\n// ---------------------------------------------------------------------------\n\nconst DomainErrors = [\n InternalError,\n OpenApiParseError,\n OpenApiExtractionError,\n OpenApiOAuthError,\n IntegrationAlreadyExistsError,\n] as const;\n\nconst IntegrationNotFound = IntegrationNotFoundError.annotate({ httpApiStatus: 404 });\n\nconst UpdateSpecErrors = [\n InternalError,\n OpenApiParseError,\n OpenApiExtractionError,\n OpenApiOAuthError,\n IntegrationNotFound,\n] as const;\n\nconst SlugParams = {\n slug: Schema.String,\n};\n\n// ---------------------------------------------------------------------------\n// Payloads\n// ---------------------------------------------------------------------------\n\nconst OpenApiSpecInputPayload = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"url\"), url: Schema.String }),\n Schema.Struct({ kind: Schema.Literal(\"blob\"), value: Schema.String }),\n Schema.Struct({\n kind: Schema.Literal(\"googleDiscovery\"),\n url: Schema.String,\n }),\n Schema.Struct({\n kind: Schema.Literal(\"googleDiscoveryBundle\"),\n urls: Schema.Array(Schema.String),\n }),\n]);\n\nconst OAuthTemplatePayload = Schema.Struct({\n slug: Schema.String,\n kind: Schema.Literal(\"oauth2\"),\n authorizationUrl: Schema.String,\n tokenUrl: Schema.String,\n scopes: Schema.Array(Schema.String),\n});\n\n/** Auth INPUTS: oauth templates + the request-shaped apikey dialect. */\nconst AuthenticationPayload = Schema.Union([OAuthTemplatePayload, ApiKeyAuthTemplate]);\n\n/** Auth in RESPONSES: the canonical stored shapes (placements). */\nconst AuthenticationResponse = Schema.Union([OAuthTemplatePayload, ApiKeyAuthMethod]);\n\nconst AddSpecPayload = Schema.Struct({\n spec: OpenApiSpecInputPayload,\n slug: Schema.String,\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n baseUrl: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationPayload)),\n});\n\nconst PreviewSpecPayload = Schema.Struct({\n spec: Schema.String,\n});\n\n// The `configure` payload — the new/updated auth methods to merge onto the\n// integration's `authenticationTemplate`. Reuses the same `AuthenticationPayload`\n// schema as `addSpec` so a custom apiKey method round-trips identically.\nconst ConfigurePayload = Schema.Struct({\n authenticationTemplate: Schema.Array(AuthenticationPayload),\n mode: Schema.optional(Schema.Literals([\"merge\", \"replace\"])),\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddSpecResponse = Schema.Struct({\n slug: IntegrationSlug,\n toolCount: Schema.Number,\n});\n\n// Update the spec in place. Body optional fields only: an empty payload means\n// \"re-fetch from the stored source URL\".\nconst UpdateSpecPayload = Schema.Struct({\n spec: Schema.optional(OpenApiSpecInputPayload),\n});\n\nconst UpdateSpecResponse = Schema.Struct({\n slug: IntegrationSlug,\n toolCount: Schema.Number,\n /** Tool names new in this spec version (same diff for every connection). */\n addedTools: Schema.Array(Schema.String),\n /** Tool names the new spec no longer defines. */\n removedTools: Schema.Array(Schema.String),\n});\n\nconst IntegrationView = Schema.Struct({\n slug: IntegrationSlug,\n description: Schema.String,\n kind: Schema.String,\n canRemove: Schema.Boolean,\n canRefresh: Schema.Boolean,\n});\n\n// The integration config surfaced for the configure UX. Unlike\n// `IntegrationView` (catalog identity only), this carries the\n// `authenticationTemplate` the configure flow reads/writes. The spec text is\n// deliberately NOT served: it's a multi-MB build artifact in the plugin blob\n// store, and no client reads it (the configure UI only touches the template).\nconst OpenApiConfigView = Schema.Struct({\n sourceUrl: Schema.optional(Schema.String),\n googleDiscoveryUrls: Schema.optional(Schema.Array(Schema.String)),\n baseUrl: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationResponse)),\n});\n\n// The configure result — the merged `authenticationTemplate` after the new\n// custom methods were appended/replaced.\nconst ConfigureResponse = Schema.Struct({\n authenticationTemplate: Schema.Array(AuthenticationResponse),\n});\n\n// ---------------------------------------------------------------------------\n// Group — addSpec/preview/get/remove over the integration catalog.\n// ---------------------------------------------------------------------------\n\nexport const OpenApiGroup = HttpApiGroup.make(\"openapi\")\n .add(\n HttpApiEndpoint.post(\"previewSpec\", \"/openapi/preview\", {\n payload: PreviewSpecPayload,\n success: SpecPreview,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addSpec\", \"/openapi/specs\", {\n payload: AddSpecPayload,\n success: AddSpecResponse,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getIntegration\", \"/openapi/integrations/:slug\", {\n params: SlugParams,\n success: Schema.NullOr(IntegrationView),\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getConfig\", \"/openapi/integrations/:slug/config\", {\n params: SlugParams,\n success: Schema.NullOr(OpenApiConfigView),\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configure\", \"/openapi/integrations/:slug/config\", {\n params: SlugParams,\n payload: ConfigurePayload,\n success: ConfigureResponse,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"updateSpec\", \"/openapi/integrations/:slug/spec\", {\n params: SlugParams,\n payload: UpdateSpecPayload,\n success: UpdateSpecResponse,\n error: UpdateSpecErrors,\n }),\n )\n .add(\n HttpApiEndpoint.delete(\"removeSpec\", \"/openapi/integrations/:slug\", {\n params: SlugParams,\n success: Schema.Void,\n error: DomainErrors,\n }),\n );\n"],"mappings":";;;;;;;;AACA,YAAY,UAAU;AACtB,SAAS,qBAAqB;;;ACF9B,SAAS,8BAA8B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,cAAc;AACvB,SAAS,kBAAkB,0BAA0B;AACrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,IAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,sBAAsB,yBAAyB,SAAS,EAAE,eAAe,IAAI,CAAC;AAEpF,IAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,aAAa;AAAA,EACjB,MAAM,OAAO;AACf;AAMA,IAAM,0BAA0B,OAAO,MAAM;AAAA,EAC3C,OAAO,OAAO,EAAE,MAAM,OAAO,QAAQ,KAAK,GAAG,KAAK,OAAO,OAAO,CAAC;AAAA,EACjE,OAAO,OAAO,EAAE,MAAM,OAAO,QAAQ,MAAM,GAAG,OAAO,OAAO,OAAO,CAAC;AAAA,EACpE,OAAO,OAAO;AAAA,IACZ,MAAM,OAAO,QAAQ,iBAAiB;AAAA,IACtC,KAAK,OAAO;AAAA,EACd,CAAC;AAAA,EACD,OAAO,OAAO;AAAA,IACZ,MAAM,OAAO,QAAQ,uBAAuB;AAAA,IAC5C,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA,EAClC,CAAC;AACH,CAAC;AAED,IAAM,uBAAuB,OAAO,OAAO;AAAA,EACzC,MAAM,OAAO;AA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AA,EACC,gBAAgB,KAAK,aAAa,sCAAsC;AAAA,IACtE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT,CAAC;AACH,EACC;AAAA,EACC,gBAAgB,KAAK,cAAc,oCAAoC;AAAA,IACrE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT,CAAC;AACH,EACC;AAAA,EACC,gBAAgB,OAAO,cAAc,+BAA+B;AAAA,IAClE,QAAQ;AAAA,IACR,SAAS,OAAO;AAAA,IAChB,OAAO;AAAA,EACT,CAAC;AACH;;;ADpMK,IAAM,gBAAgB,uBAAuB,cAAc;AAAA,EAChE,SAAS;AAAA,EACT,qBAAqB;AAAA,EACrB,SAAS;AACX,CAAC;;;ADAM,IAAM,yBAAyB,CAAC,SACrC,cAAc,MAAM,WAAW,kBAAkB;AAAA,EAC/C,QAAQ,EAAE,KAAK;AAAA,EACf,YAAY;AAAA,EACZ,gBAAgB,CAAC,cAAc,cAAc,cAAc,KAAK;AAClE,CAAC;AAII,IAAM,oBAAoB,CAAC,SAChC,cAAc,MAAM,WAAW,aAAa;AAAA,EAC1C,QAAQ,EAAE,KAAK;AAAA,EACf,YAAY;AAAA,EACZ,gBAAgB,CAAC,cAAc,cAAc,cAAc,KAAK;AAClE,CAAC;AAMI,IAAM,qBAAqB,cAAc,SAAS,WAAW,aAAa;AAE1E,IAAM,iBAAiB,cAAc,SAAS,WAAW,SAAS;AAElE,IAAM,oBAAoB,cAAc,SAAS,WAAW,YAAY;AAKxE,IAAM,oBAAoB,cAAc,SAAS,WAAW,YAAY;AAGxE,IAAM,mBAAmB,cAAc,SAAS,WAAW,WAAW;AAGtE,IAAM,2BAAgC,YAAO,sBAAsB;AAGnE,IAAM,sBAA2B,YAAO,iBAAiB;","names":[]}
@@ -18,7 +18,7 @@ var openApiOnlyPresets = [
18
18
  name: "GitHub REST",
19
19
  summary: "Repos, issues, pull requests, actions, and users.",
20
20
  url: "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json",
21
- icon: "https://github.com/favicon.ico",
21
+ icon: "https://svgl.app/library/github_dark.svg",
22
22
  featured: true
23
23
  },
24
24
  {
@@ -50,7 +50,7 @@ var openApiOnlyPresets = [
50
50
  name: "OpenAI",
51
51
  summary: "Models, files, responses, and fine-tuning.",
52
52
  url: "https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml",
53
- icon: "https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/openai.svg",
53
+ icon: "https://svgl.app/library/openai_dark.svg",
54
54
  featured: true
55
55
  },
56
56
  {
@@ -58,7 +58,7 @@ var openApiOnlyPresets = [
58
58
  name: "Sentry",
59
59
  summary: "Error tracking, performance monitoring, and releases.",
60
60
  url: "https://raw.githubusercontent.com/getsentry/sentry-api-schema/main/openapi-derefed.json",
61
- icon: "https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png",
61
+ icon: "https://svgl.app/library/sentry.svg",
62
62
  featured: true
63
63
  },
64
64
  {
@@ -131,7 +131,7 @@ var openApiOnlyPresets = [
131
131
  name: "Spotify",
132
132
  summary: "Tracks, albums, playlists, library, and playback.",
133
133
  url: "https://raw.githubusercontent.com/sonallux/spotify-web-api/refs/heads/main/official-spotify-open-api.yml",
134
- icon: "https://spotify.com/favicon.ico"
134
+ icon: "https://svgl.app/library/spotify.svg"
135
135
  }
136
136
  ];
137
137
  var openApiPresets = [
@@ -143,4 +143,4 @@ var openApiPresets = [
143
143
  export {
144
144
  openApiPresets
145
145
  };
146
- //# sourceMappingURL=chunk-AQ7JDDRM.js.map
146
+ //# sourceMappingURL=chunk-PAHWRRS3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sdk/presets.ts"],"sourcesContent":["import { googleOpenApiBundlePreset, googleOpenApiPresets } from \"./google-presets\";\n\nexport interface OpenApiPreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly url?: string;\n readonly icon?: string;\n readonly featured?: boolean;\n}\n\nconst openApiOnlyPresets: readonly OpenApiPreset[] = [\n {\n id: \"stripe\",\n name: \"Stripe\",\n summary: \"Payments, subscriptions, customers, and invoices.\",\n url: \"https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json\",\n icon: \"https://stripe.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"github-rest\",\n name: \"GitHub REST\",\n summary: \"Repos, issues, pull requests, actions, and users.\",\n url: \"https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json\",\n icon: \"https://svgl.app/library/github_dark.svg\",\n featured: true,\n },\n {\n id: \"vercel\",\n name: \"Vercel\",\n summary: \"Deployments, domains, projects, and edge config.\",\n url: \"https://openapi.vercel.sh\",\n icon: \"https://vercel.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n summary: \"DNS, workers, pages, R2, and security rules.\",\n url: \"https://raw.githubusercontent.com/cloudflare/api-schemas/main/openapi.json\",\n icon: \"https://cloudflare.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"neon\",\n name: \"Neon\",\n summary: \"Serverless Postgres — projects, branches, and endpoints.\",\n url: \"https://neon.tech/api_spec/release/v2.json\",\n icon: \"https://neon.tech/favicon/favicon.ico\",\n featured: true,\n },\n {\n id: \"openai\",\n name: \"OpenAI\",\n summary: \"Models, files, responses, and fine-tuning.\",\n url: \"https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml\",\n icon: \"https://svgl.app/library/openai_dark.svg\",\n featured: true,\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n summary: \"Error tracking, performance monitoring, and releases.\",\n url: \"https://raw.githubusercontent.com/getsentry/sentry-api-schema/main/openapi-derefed.json\",\n icon: \"https://svgl.app/library/sentry.svg\",\n featured: true,\n },\n {\n id: \"exa\",\n name: \"Exa\",\n summary: \"Web search, similar links, content retrieval, and answers.\",\n url: \"https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-openapi-spec.yaml\",\n icon: \"https://exa.ai/images/favicon-32x32.png\",\n featured: true,\n },\n {\n id: \"exa-websets\",\n name: \"Exa Websets\",\n summary: \"Websets, enrichments, webhooks, and monitors.\",\n url: \"https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-websets-spec.yaml\",\n icon: \"https://exa.ai/images/favicon-32x32.png\",\n featured: true,\n },\n {\n id: \"axiom\",\n name: \"Axiom\",\n summary: \"Log ingestion, querying, datasets, and monitors.\",\n url: \"https://axiom.co/docs/restapi/versions/v2.json\",\n icon: \"https://axiom.co/favicon.ico\",\n },\n {\n id: \"asana\",\n name: \"Asana\",\n summary: \"Tasks, projects, teams, and workspace management.\",\n url: \"https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/asana.com/1.0/openapi.yaml\",\n icon: \"https://asana.com/favicon.ico\",\n },\n {\n id: \"twilio\",\n name: \"Twilio\",\n summary: \"SMS, voice, video, and messaging APIs.\",\n url: \"https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json\",\n icon: \"https://twilio.com/favicon.ico\",\n },\n {\n id: \"digitalocean\",\n name: \"DigitalOcean\",\n summary: \"Droplets, Kubernetes, databases, and networking.\",\n url: \"https://raw.githubusercontent.com/digitalocean/openapi/main/specification/DigitalOcean-public.v2.yaml\",\n icon: \"https://assets.digitalocean.com/favicon.ico\",\n },\n {\n id: \"petstore\",\n name: \"Petstore\",\n summary: \"Classic OpenAPI demo — no auth required.\",\n url: \"https://petstore3.swagger.io/api/v3/openapi.json\",\n icon: \"https://petstore3.swagger.io/favicon-32x32.png\",\n },\n {\n id: \"val-town\",\n name: \"Val Town\",\n summary: \"Vals, runs, blobs, and email/web endpoints.\",\n url: \"https://api.val.town/openapi.json\",\n icon: \"https://www.val.town/favicon.svg\",\n },\n {\n id: \"resend\",\n name: \"Resend\",\n summary: \"Transactional email sending and domain management.\",\n url: \"https://raw.githubusercontent.com/resend/resend-openapi/main/resend.yaml\",\n icon: \"https://resend.com/static/favicons/favicon.ico\",\n },\n {\n id: \"spotify\",\n name: \"Spotify\",\n summary: \"Tracks, albums, playlists, library, and playback.\",\n url: \"https://raw.githubusercontent.com/sonallux/spotify-web-api/refs/heads/main/official-spotify-open-api.yml\",\n icon: \"https://svgl.app/library/spotify.svg\",\n },\n];\n\nexport { googleOpenApiPresets, googleStandardUserOAuthPresets } from \"./google-presets\";\n\nexport const openApiPresets: readonly OpenApiPreset[] = [\n googleOpenApiBundlePreset,\n ...openApiOnlyPresets,\n ...googleOpenApiPresets,\n];\n"],"mappings":";;;;;;AAWA,IAAM,qBAA+C;AAAA,EACnD;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,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,7 +8,7 @@ import {
8
8
  } from "./chunk-I2XDCVVM.js";
9
9
  import {
10
10
  openApiPresets
11
- } from "./chunk-AQ7JDDRM.js";
11
+ } from "./chunk-PAHWRRS3.js";
12
12
  import {
13
13
  InvocationResult,
14
14
  OpenApiExtractionError,
@@ -1539,4 +1539,4 @@ export {
1539
1539
  makeDefaultOpenapiStore,
1540
1540
  openApiPlugin
1541
1541
  };
1542
- //# sourceMappingURL=chunk-3XJSXSED.js.map
1542
+ //# sourceMappingURL=chunk-PNOEE3ET.js.map
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  openApiPresets
3
- } from "./chunk-AQ7JDDRM.js";
3
+ } from "./chunk-PAHWRRS3.js";
4
4
  import "./chunk-MZWZQ24W.js";
5
5
 
6
6
  // src/react/plugin-client.tsx
@@ -8,9 +8,9 @@ import { defineClientPlugin } from "@executor-js/sdk/client";
8
8
 
9
9
  // src/react/source-plugin.ts
10
10
  import { lazy } from "react";
11
- var importAdd = () => import("./AddOpenApiSource-JFSFWLBZ.js");
12
- var importEditSheet = () => import("./UpdateSpecSection-D32QZT3Q.js");
13
- var importAccounts = () => import("./OpenApiAccountsPanel-2LHWUKIE.js");
11
+ var importAdd = () => import("./AddOpenApiSource-7TI5XUUY.js");
12
+ var importEditSheet = () => import("./UpdateSpecSection-MIZ5GLBM.js");
13
+ var importAccounts = () => import("./OpenApiAccountsPanel-Y2RGBSSL.js");
14
14
  var openApiIntegrationPlugin = {
15
15
  key: "openapi",
16
16
  label: "OpenAPI",
package/dist/core.js CHANGED
@@ -8,14 +8,14 @@ import {
8
8
  makeDefaultOpenapiStore,
9
9
  openApiPlugin,
10
10
  renderAuthTemplate
11
- } from "./chunk-3XJSXSED.js";
11
+ } from "./chunk-PNOEE3ET.js";
12
12
  import {
13
13
  convertGoogleDiscoveryBundleToOpenApi,
14
14
  convertGoogleDiscoveryToOpenApi,
15
15
  fetchGoogleDiscoveryDocument,
16
16
  isGoogleDiscoveryUrl
17
17
  } from "./chunk-I2XDCVVM.js";
18
- import "./chunk-AQ7JDDRM.js";
18
+ import "./chunk-PAHWRRS3.js";
19
19
  import "./chunk-MZWZQ24W.js";
20
20
  import {
21
21
  AuthStrategy,
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  openApiPlugin
3
- } from "./chunk-3XJSXSED.js";
3
+ } from "./chunk-PNOEE3ET.js";
4
4
  import "./chunk-I2XDCVVM.js";
5
- import "./chunk-AQ7JDDRM.js";
5
+ import "./chunk-PAHWRRS3.js";
6
6
  import "./chunk-MZWZQ24W.js";
7
7
  import {
8
8
  TOKEN_VARIABLE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-openapi",
3
- "version": "1.5.12",
3
+ "version": "1.5.14",
4
4
  "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/openapi",
5
5
  "bugs": {
6
6
  "url": "https://github.com/RhysSullivan/executor/issues"
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@effect/platform-node": "4.0.0-beta.59",
56
- "@executor-js/config": "1.5.12",
57
- "@executor-js/sdk": "1.5.12",
56
+ "@executor-js/config": "1.5.14",
57
+ "@executor-js/sdk": "1.5.14",
58
58
  "lucide-react": "^1.7.0",
59
59
  "openapi-types": "^12.1.3",
60
60
  "yaml": "^2.7.1"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/sdk/presets.ts"],"sourcesContent":["import { googleOpenApiBundlePreset, googleOpenApiPresets } from \"./google-presets\";\n\nexport interface OpenApiPreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly url?: string;\n readonly icon?: string;\n readonly featured?: boolean;\n}\n\nconst openApiOnlyPresets: readonly OpenApiPreset[] = [\n {\n id: \"stripe\",\n name: \"Stripe\",\n summary: \"Payments, subscriptions, customers, and invoices.\",\n url: \"https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json\",\n icon: \"https://stripe.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"github-rest\",\n name: \"GitHub REST\",\n summary: \"Repos, issues, pull requests, actions, and users.\",\n url: \"https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json\",\n icon: \"https://github.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"vercel\",\n name: \"Vercel\",\n summary: \"Deployments, domains, projects, and edge config.\",\n url: \"https://openapi.vercel.sh\",\n icon: \"https://vercel.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n summary: \"DNS, workers, pages, R2, and security rules.\",\n url: \"https://raw.githubusercontent.com/cloudflare/api-schemas/main/openapi.json\",\n icon: \"https://cloudflare.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"neon\",\n name: \"Neon\",\n summary: \"Serverless Postgres — projects, branches, and endpoints.\",\n url: \"https://neon.tech/api_spec/release/v2.json\",\n icon: \"https://neon.tech/favicon/favicon.ico\",\n featured: true,\n },\n {\n id: \"openai\",\n name: \"OpenAI\",\n summary: \"Models, files, responses, and fine-tuning.\",\n url: \"https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml\",\n icon: \"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/openai.svg\",\n featured: true,\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n summary: \"Error tracking, performance monitoring, and releases.\",\n url: \"https://raw.githubusercontent.com/getsentry/sentry-api-schema/main/openapi-derefed.json\",\n icon: \"https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png\",\n featured: true,\n },\n {\n id: \"exa\",\n name: \"Exa\",\n summary: \"Web search, similar links, content retrieval, and answers.\",\n url: \"https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-openapi-spec.yaml\",\n icon: \"https://exa.ai/images/favicon-32x32.png\",\n featured: true,\n },\n {\n id: \"exa-websets\",\n name: \"Exa Websets\",\n summary: \"Websets, enrichments, webhooks, and monitors.\",\n url: \"https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-websets-spec.yaml\",\n icon: \"https://exa.ai/images/favicon-32x32.png\",\n featured: true,\n },\n {\n id: \"axiom\",\n name: \"Axiom\",\n summary: \"Log ingestion, querying, datasets, and monitors.\",\n url: \"https://axiom.co/docs/restapi/versions/v2.json\",\n icon: \"https://axiom.co/favicon.ico\",\n },\n {\n id: \"asana\",\n name: \"Asana\",\n summary: \"Tasks, projects, teams, and workspace management.\",\n url: \"https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/asana.com/1.0/openapi.yaml\",\n icon: \"https://asana.com/favicon.ico\",\n },\n {\n id: \"twilio\",\n name: \"Twilio\",\n summary: \"SMS, voice, video, and messaging APIs.\",\n url: \"https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json\",\n icon: \"https://twilio.com/favicon.ico\",\n },\n {\n id: \"digitalocean\",\n name: \"DigitalOcean\",\n summary: \"Droplets, Kubernetes, databases, and networking.\",\n url: \"https://raw.githubusercontent.com/digitalocean/openapi/main/specification/DigitalOcean-public.v2.yaml\",\n icon: \"https://assets.digitalocean.com/favicon.ico\",\n },\n {\n id: \"petstore\",\n name: \"Petstore\",\n summary: \"Classic OpenAPI demo — no auth required.\",\n url: \"https://petstore3.swagger.io/api/v3/openapi.json\",\n icon: \"https://petstore3.swagger.io/favicon-32x32.png\",\n },\n {\n id: \"val-town\",\n name: \"Val Town\",\n summary: \"Vals, runs, blobs, and email/web endpoints.\",\n url: \"https://api.val.town/openapi.json\",\n icon: \"https://www.val.town/favicon.svg\",\n },\n {\n id: \"resend\",\n name: \"Resend\",\n summary: \"Transactional email sending and domain management.\",\n url: \"https://raw.githubusercontent.com/resend/resend-openapi/main/resend.yaml\",\n icon: \"https://resend.com/static/favicons/favicon.ico\",\n },\n {\n id: \"spotify\",\n name: \"Spotify\",\n summary: \"Tracks, albums, playlists, library, and playback.\",\n url: \"https://raw.githubusercontent.com/sonallux/spotify-web-api/refs/heads/main/official-spotify-open-api.yml\",\n icon: \"https://spotify.com/favicon.ico\",\n },\n];\n\nexport { googleOpenApiPresets, googleStandardUserOAuthPresets } from \"./google-presets\";\n\nexport const openApiPresets: readonly OpenApiPreset[] = [\n googleOpenApiBundlePreset,\n ...openApiOnlyPresets,\n ...googleOpenApiPresets,\n];\n"],"mappings":";;;;;;AAWA,IAAM,qBAA+C;AAAA,EACnD;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AACF;AAIO,IAAM,iBAA2C;AAAA,EACtD;AAAA,EACA,GAAG;AAAA,EACH,GAAG;AACL;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts"],"sourcesContent":["import type { IntegrationSlug } from \"@executor-js/sdk/shared\";\nimport * as Atom from \"effect/unstable/reactivity/Atom\";\nimport { ReactivityKey } from \"@executor-js/react/api/reactivity-keys\";\nimport { OpenApiClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms — v2: the integration catalog is the unit of identity (the v1\n// per-scope `source` row is gone). `getIntegration` returns the catalog entry\n// (slug/description/kind/canRemove/canRefresh); credentials are owner-scoped\n// connections read from the shared `connections` API, not bound per source.\n// ---------------------------------------------------------------------------\n\nexport const openApiIntegrationAtom = (slug: IntegrationSlug) =>\n OpenApiClient.query(\"openapi\", \"getIntegration\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// The full opaque config (including `authenticationTemplate`), used by the\n// configure UX to render existing auth methods and add custom ones.\nexport const openApiConfigAtom = (slug: IntegrationSlug) =>\n OpenApiClient.query(\"openapi\", \"getConfig\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const previewOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"previewSpec\");\n\nexport const addOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"addSpec\");\n\nexport const removeOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"removeSpec\");\n\n/** Re-fetch (or replace) the integration's spec and rebuild its tools in\n * place — connections, policies, and the description survive. Pass\n * `reactivityKeys: integrationWriteKeys` at the call site. */\nexport const updateOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"updateSpec\");\n\n// Add / merge custom auth methods onto an integration's `authenticationTemplate`.\nexport const openapiConfigure = OpenApiClient.mutation(\"openapi\", \"configure\");\n\n// `getIntegration` is read-only; the atom family lets a caller pass a slug.\nexport const openApiIntegrationFamily = Atom.family(openApiIntegrationAtom);\n\n// `getConfig` is read-only; the atom family lets a caller pass a slug.\nexport const openApiConfigFamily = Atom.family(openApiConfigAtom);\n","import { createPluginAtomClient } from \"@executor-js/sdk/client\";\nimport {\n getExecutorApiBaseUrl,\n getExecutorServerAuthorizationHeader,\n} from \"@executor-js/react/api/server-connection\";\nimport { OpenApiGroup } from \"../api/group\";\n\nexport const OpenApiClient = createPluginAtomClient(OpenApiGroup, {\n baseUrl: getExecutorApiBaseUrl,\n authorizationHeader: getExecutorServerAuthorizationHeader,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport { ApiKeyAuthMethod, ApiKeyAuthTemplate } from \"@executor-js/sdk/http-auth\";\nimport {\n InternalError,\n IntegrationAlreadyExistsError,\n IntegrationNotFoundError,\n IntegrationSlug,\n} from \"@executor-js/sdk/shared\";\n\nimport { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from \"../sdk/errors\";\nimport { SpecPreview } from \"../sdk/preview\";\n\n// ---------------------------------------------------------------------------\n// Errors — the plugin-domain tagged errors flow directly to clients\n// (4xx, each carrying its own `httpApiStatus`). `InternalError` is the shared\n// opaque 500 surface; `StorageError` → `InternalError` translation happens at\n// service wiring time. `IntegrationAlreadyExistsError` (409) blocks re-adding\n// an existing slug — see addSpec.\n// ---------------------------------------------------------------------------\n\nconst DomainErrors = [\n InternalError,\n OpenApiParseError,\n OpenApiExtractionError,\n OpenApiOAuthError,\n IntegrationAlreadyExistsError,\n] as const;\n\nconst IntegrationNotFound = IntegrationNotFoundError.annotate({ httpApiStatus: 404 });\n\nconst UpdateSpecErrors = [\n InternalError,\n OpenApiParseError,\n OpenApiExtractionError,\n OpenApiOAuthError,\n IntegrationNotFound,\n] as const;\n\nconst SlugParams = {\n slug: Schema.String,\n};\n\n// ---------------------------------------------------------------------------\n// Payloads\n// ---------------------------------------------------------------------------\n\nconst OpenApiSpecInputPayload = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"url\"), url: Schema.String }),\n Schema.Struct({ kind: Schema.Literal(\"blob\"), value: Schema.String }),\n Schema.Struct({\n kind: Schema.Literal(\"googleDiscovery\"),\n url: Schema.String,\n }),\n Schema.Struct({\n kind: Schema.Literal(\"googleDiscoveryBundle\"),\n urls: Schema.Array(Schema.String),\n }),\n]);\n\nconst OAuthTemplatePayload = Schema.Struct({\n slug: Schema.String,\n kind: Schema.Literal(\"oauth2\"),\n authorizationUrl: Schema.String,\n tokenUrl: Schema.String,\n scopes: Schema.Array(Schema.String),\n});\n\n/** Auth INPUTS: oauth templates + the request-shaped apikey dialect. */\nconst AuthenticationPayload = Schema.Union([OAuthTemplatePayload, ApiKeyAuthTemplate]);\n\n/** Auth in RESPONSES: the canonical stored shapes (placements). */\nconst AuthenticationResponse = Schema.Union([OAuthTemplatePayload, ApiKeyAuthMethod]);\n\nconst AddSpecPayload = Schema.Struct({\n spec: OpenApiSpecInputPayload,\n slug: Schema.String,\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n baseUrl: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationPayload)),\n});\n\nconst PreviewSpecPayload = Schema.Struct({\n spec: Schema.String,\n});\n\n// The `configure` payload — the new/updated auth methods to merge onto the\n// integration's `authenticationTemplate`. Reuses the same `AuthenticationPayload`\n// schema as `addSpec` so a custom apiKey method round-trips identically.\nconst ConfigurePayload = Schema.Struct({\n authenticationTemplate: Schema.Array(AuthenticationPayload),\n mode: Schema.optional(Schema.Literals([\"merge\", \"replace\"])),\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddSpecResponse = Schema.Struct({\n slug: IntegrationSlug,\n toolCount: Schema.Number,\n});\n\n// Update the spec in place. Body optional fields only: an empty payload means\n// \"re-fetch from the stored source URL\".\nconst UpdateSpecPayload = Schema.Struct({\n spec: Schema.optional(OpenApiSpecInputPayload),\n});\n\nconst UpdateSpecResponse = Schema.Struct({\n slug: IntegrationSlug,\n toolCount: Schema.Number,\n /** Tool names new in this spec version (same diff for every connection). */\n addedTools: Schema.Array(Schema.String),\n /** Tool names the new spec no longer defines. */\n removedTools: Schema.Array(Schema.String),\n});\n\nconst IntegrationView = Schema.Struct({\n slug: IntegrationSlug,\n description: Schema.String,\n kind: Schema.String,\n canRemove: Schema.Boolean,\n canRefresh: Schema.Boolean,\n});\n\n// The integration config surfaced for the configure UX. Unlike\n// `IntegrationView` (catalog identity only), this carries the\n// `authenticationTemplate` the configure flow reads/writes. The spec text is\n// deliberately NOT served: it's a multi-MB build artifact in the plugin blob\n// store, and no client reads it (the configure UI only touches the template).\nconst OpenApiConfigView = Schema.Struct({\n sourceUrl: Schema.optional(Schema.String),\n googleDiscoveryUrls: Schema.optional(Schema.Array(Schema.String)),\n baseUrl: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationResponse)),\n});\n\n// The configure result — the merged `authenticationTemplate` after the new\n// custom methods were appended/replaced.\nconst ConfigureResponse = Schema.Struct({\n authenticationTemplate: Schema.Array(AuthenticationResponse),\n});\n\n// ---------------------------------------------------------------------------\n// Group — addSpec/preview/get/remove over the integration catalog.\n// ---------------------------------------------------------------------------\n\nexport const OpenApiGroup = HttpApiGroup.make(\"openapi\")\n .add(\n HttpApiEndpoint.post(\"previewSpec\", \"/openapi/preview\", {\n payload: PreviewSpecPayload,\n success: SpecPreview,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addSpec\", \"/openapi/specs\", {\n payload: AddSpecPayload,\n success: AddSpecResponse,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getIntegration\", \"/openapi/integrations/:slug\", {\n params: SlugParams,\n success: Schema.NullOr(IntegrationView),\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getConfig\", \"/openapi/integrations/:slug/config\", {\n params: SlugParams,\n success: Schema.NullOr(OpenApiConfigView),\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configure\", \"/openapi/integrations/:slug/config\", {\n params: SlugParams,\n payload: ConfigurePayload,\n success: ConfigureResponse,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"updateSpec\", \"/openapi/integrations/:slug/spec\", {\n params: SlugParams,\n payload: UpdateSpecPayload,\n success: UpdateSpecResponse,\n error: UpdateSpecErrors,\n }),\n )\n .add(\n HttpApiEndpoint.delete(\"removeSpec\", \"/openapi/integrations/:slug\", {\n params: SlugParams,\n success: Schema.Void,\n error: DomainErrors,\n }),\n );\n"],"mappings":";;;;;;;;AACA,YAAY,UAAU;AACtB,SAAS,qBAAqB;;;ACF9B,SAAS,8BAA8B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,cAAc;AACvB,SAAS,kBAAkB,0BAA0B;AACrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,IAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,sBAAsB,yBAAyB,SAAS,EAAE,eAAe,IAAI,CAAC;AAEpF,IAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,aAAa;AAAA,EACjB,MAAM,OAAO;AACf;AAMA,IAAM,0BAA0B,OAAO,MAAM;AAAA,EAC3C,OAAO,OAAO,EAAE,MAAM,OAAO,QAAQ,KAAK,GAAG,KAAK,OAAO,OAAO,CAAC;AAAA,EACjE,OAAO,OAAO,EAAE,MAAM,OAAO,QAAQ,MAAM,GAAG,OAAO,OAAO,OAAO,CAAC;AAAA,EACpE,OAAO,OAAO;AAAA,IACZ,MAAM,OAAO,QAAQ,iBAAiB;AAAA,IACtC,KAAK,OAAO;AAA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