@tangle-network/agent-integrations 0.75.3 → 0.76.1
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/README.md +10 -14
- package/data/bundled-adapter-manifests.json +1 -1
- package/dist/{adapters-CrN3lR4d.js → adapters-Bx-UTWRg.js} +55 -8
- package/dist/{adapters-CrN3lR4d.js.map → adapters-Bx-UTWRg.js.map} +1 -1
- package/dist/{bundled-manifest-data-C7dav10o.js → bundled-manifest-data-BgTJ7dmp.js} +33 -1
- package/dist/{bundled-manifest-data-C7dav10o.js.map → bundled-manifest-data-BgTJ7dmp.js.map} +1 -1
- package/dist/{bundled-manifest-runtime-G6p2i9W-.d.ts → bundled-manifest-runtime-EpjLQKA9.d.ts} +7 -3
- package/dist/bundled-manifest-runtime-EpjLQKA9.d.ts.map +1 -0
- package/dist/{catalog-DmAjfp4i.d.ts → catalog-z4zNeXVL.d.ts} +3 -3
- package/dist/{catalog-DmAjfp4i.d.ts.map → catalog-z4zNeXVL.d.ts.map} +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/{cloudbeds-BL5EF3xl.js → cloudbeds-CGSoT275.js} +17 -2
- package/dist/cloudbeds-CGSoT275.js.map +1 -0
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +1 -1
- package/dist/connectors/adapters/index.d.ts +2 -2
- package/dist/connectors/adapters/index.js +3 -3
- package/dist/connectors/index.d.ts +7 -7
- package/dist/connectors/index.js +8 -7
- package/dist/connectors/oauth.d.ts +2 -2
- package/dist/connectors/oauth.js +7 -205
- package/dist/connectors/oauth.js.map +1 -1
- package/dist/{consumer-BafUQUla.d.ts → consumer-YE5ibTlI.d.ts} +18 -9
- package/dist/consumer-YE5ibTlI.d.ts.map +1 -0
- package/dist/consumer.d.ts +1 -1
- package/dist/consumer.js +1 -1
- package/dist/{core-types-DfCMwTYt.d.ts → core-types-0BenSoZJ.d.ts} +17 -3
- package/dist/core-types-0BenSoZJ.d.ts.map +1 -0
- package/dist/{coverage-catalog-oQiZ8yot.d.ts → coverage-catalog-5LheuThC.d.ts} +2 -2
- package/dist/{coverage-catalog-oQiZ8yot.d.ts.map → coverage-catalog-5LheuThC.d.ts.map} +1 -1
- package/dist/coverage-catalog.d.ts +1 -1
- package/dist/{hub-D13zPQGr.js → hub-Cl8phyJ9.js} +316 -149
- package/dist/hub-Cl8phyJ9.js.map +1 -0
- package/dist/{hub-fmmnwC2s.d.ts → hub-DkiKVWJX.d.ts} +5 -3
- package/dist/hub-DkiKVWJX.d.ts.map +1 -0
- package/dist/hub.d.ts +1 -1
- package/dist/hub.js +1 -1
- package/dist/{index-DbwNiedC.d.ts → index-BFK-G6g1.d.ts} +2 -2
- package/dist/{index-DbwNiedC.d.ts.map → index-BFK-G6g1.d.ts.map} +1 -1
- package/dist/{index-CHD_8Gn2.d.ts → index-BNzWrQM0.d.ts} +3 -3
- package/dist/{index-CHD_8Gn2.d.ts.map → index-BNzWrQM0.d.ts.map} +1 -1
- package/dist/{index-B-VH5b3E.d.ts → index-CkCYzn8f.d.ts} +2 -2
- package/dist/{index-B-VH5b3E.d.ts.map → index-CkCYzn8f.d.ts.map} +1 -1
- package/dist/{index-BKTHRkGz.d.ts → index-WwSnaq5E.d.ts} +11 -2
- package/dist/{index-BKTHRkGz.d.ts.map → index-WwSnaq5E.d.ts.map} +1 -1
- package/dist/{index-CW1fmxQi.d.ts → index-poLalSQ6.d.ts} +3 -3
- package/dist/{index-CW1fmxQi.d.ts.map → index-poLalSQ6.d.ts.map} +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +11 -10
- package/dist/internal/bundled-manifest-runtime.d.ts +1 -1
- package/dist/internal/bundled-manifest-runtime.js +30 -2
- package/dist/internal/bundled-manifest-runtime.js.map +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/middleware/index.d.ts +1 -1
- package/dist/middleware/index.js +1 -1
- package/dist/{oauth-tzsnaJIb.d.ts → oauth-DoUCpYU_.d.ts} +85 -64
- package/dist/oauth-DoUCpYU_.d.ts.map +1 -0
- package/dist/oauth-protocol-CFrGJlSz.js +195 -0
- package/dist/oauth-protocol-CFrGJlSz.js.map +1 -0
- package/dist/{policy-C9frNJFH.d.ts → policy-C8jynxf9.d.ts} +2 -2
- package/dist/{policy-C9frNJFH.d.ts.map → policy-C8jynxf9.d.ts.map} +1 -1
- package/dist/{registry-CE1iu5zX.d.ts → registry-0xWMSBUu.d.ts} +3 -3
- package/dist/{registry-CE1iu5zX.d.ts.map → registry-0xWMSBUu.d.ts.map} +1 -1
- package/dist/{registry-core-DtFI-9kF.d.ts → registry-core-B1ApiG47.d.ts} +2 -2
- package/dist/{registry-core-DtFI-9kF.d.ts.map → registry-core-B1ApiG47.d.ts.map} +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/sandbox.d.ts +1 -1
- package/dist/{specs-Dp7I8aL5.js → specs-02Un982U.js} +2 -2
- package/dist/{specs-Dp7I8aL5.js.map → specs-02Un982U.js.map} +1 -1
- package/dist/specs.d.ts +1 -1
- package/dist/specs.js +1 -1
- package/dist/{src-6gBH8WOq.js → src-VFvRn2yV.js} +13 -6
- package/dist/src-VFvRn2yV.js.map +1 -0
- package/dist/{tangle-id-Bq7jkKmE.d.ts → tangle-id-BW5dTiGi.d.ts} +2 -2
- package/dist/{tangle-id-Bq7jkKmE.d.ts.map → tangle-id-BW5dTiGi.d.ts.map} +1 -1
- package/dist/{tangle-id-81ShqJ7k.js → tangle-id-DUsy7I9_.js} +2 -2
- package/dist/{tangle-id-81ShqJ7k.js.map → tangle-id-DUsy7I9_.js.map} +1 -1
- package/dist/{types-W418mSuf.d.ts → types-Bq85dJDW.d.ts} +13 -1
- package/dist/types-Bq85dJDW.d.ts.map +1 -0
- package/dist/{types-BSDXGSi5.js → types-CjrugGcd.js} +13 -7
- package/dist/types-CjrugGcd.js.map +1 -0
- package/dist/webhooks/index.js +1 -1
- package/dist/worker.d.ts +3 -3
- package/package.json +1 -1
- package/dist/bundled-manifest-runtime-G6p2i9W-.d.ts.map +0 -1
- package/dist/cloudbeds-BL5EF3xl.js.map +0 -1
- package/dist/consumer-BafUQUla.d.ts.map +0 -1
- package/dist/core-types-DfCMwTYt.d.ts.map +0 -1
- package/dist/hub-D13zPQGr.js.map +0 -1
- package/dist/hub-fmmnwC2s.d.ts.map +0 -1
- package/dist/oauth-tzsnaJIb.d.ts.map +0 -1
- package/dist/src-6gBH8WOq.js.map +0 -1
- package/dist/types-BSDXGSi5.js.map +0 -1
- package/dist/types-W418mSuf.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","names":[],"sources":["../../src/connectors/oauth.ts"],"sourcesContent":["/**\n * Generic OAuth2 helper used by every oauth-shaped connector (Google\n * Calendar, Sheets, Drive, HubSpot, Salesforce, Zoom, ...).\n *\n * Everything PKCE-aware. Opaque-state CSRF guard. Refresh-token aware.\n * No connector-specific logic lives here — adapters hand a `clientId`,\n * `clientSecret`, `tokenUrl`, optional `extraAuthParams` and the rest is\n * mechanical.\n *\n * State and code_verifier are kept in a short-TTL flow store keyed by the\n * opaque `state` we round-trip through the provider. The default store is\n * in-memory for local/dev and tests. Production deployments should inject a\n * durable store backed by KV/Redis/D1/etc. so callbacks can land on any worker.\n */\n\nimport { createHash, randomBytes } from 'crypto'\nimport type { OAuth2TokenClientAuthMethod } from './types.js'\n\nexport type OAuthPkceMode = 'required' | 'supported' | 'unsupported'\n\nexport interface PendingOAuthFlow {\n /** code_verifier for PKCE. Absent when the provider rejects PKCE. */\n codeVerifier?: string\n /** Opaque-state value also returned in the OAuth redirect. */\n state: string\n /** Project the user is connecting under. */\n projectId: string\n /** Connector kind (e.g. 'google-calendar'). */\n kind: string\n /** Operator-supplied label that becomes DataSource.label. */\n label: string\n /** When we drop the entry. */\n expiresAt: number\n /** The redirectUri we used in the start step — must match exactly on\n * the callback exchange. */\n redirectUri: string\n}\n\nconst PENDING_TTL_MS = 10 * 60 * 1000\n\nexport interface OAuthFlowStore {\n put(state: string, flow: PendingOAuthFlow): Promise<void> | void\n consume(state: string): Promise<PendingOAuthFlow | undefined> | PendingOAuthFlow | undefined\n sweep?(now: number): Promise<void> | void\n clear?(): Promise<void> | void\n}\n\nexport class InMemoryOAuthFlowStore implements OAuthFlowStore {\n private readonly pendingFlows = new Map<string, PendingOAuthFlow>()\n\n put(state: string, flow: PendingOAuthFlow): void {\n this.pendingFlows.set(state, flow)\n }\n\n consume(state: string): PendingOAuthFlow | undefined {\n const flow = this.pendingFlows.get(state)\n this.pendingFlows.delete(state)\n if (!flow || flow.expiresAt <= Date.now()) return undefined\n return flow\n }\n\n sweep(now: number): void {\n for (const [k, v] of this.pendingFlows) {\n if (v.expiresAt <= now) this.pendingFlows.delete(k)\n }\n }\n\n clear(): void {\n this.pendingFlows.clear()\n }\n}\n\nconst defaultFlowStore = new InMemoryOAuthFlowStore()\n\nexport interface StartOAuthInput {\n projectId: string\n kind: string\n label: string\n authorizationUrl: string\n scopes: string[]\n /** OAuth defaults to spaces; set `,` for providers such as Zoho. */\n scopeSeparator?: ' ' | ','\n clientId: string\n /** Authorization query parameter for the client id. Defaults to\n * `client_id`; TikTok uses `client_key`. */\n authorizationClientIdParam?: string\n /** PKCE posture. Defaults to required to preserve the existing safe flow. */\n pkce?: OAuthPkceMode\n redirectUri: string\n /** Optional extra query params; Google needs `access_type=offline` and\n * `prompt=consent` to issue refresh tokens reliably. */\n extraAuthParams?: Record<string, string>\n /** Optional flow store. Use a durable store in distributed production\n * runtimes; omitted means local in-memory storage. */\n store?: OAuthFlowStore\n /** Override clock for tests. */\n now?: number\n}\n\nexport interface StartOAuthOutput {\n /** URL the SPA should redirect the user to. */\n authorizationUrl: string\n /** State token — caller stashes this in localStorage to verify on\n * callback. */\n state: string\n}\n\n/** Build the authorization URL + state. SPA navigates the user there;\n * user consents; provider redirects back to redirectUri with `code` +\n * `state`. The caller's callback then invokes `consumePendingFlow`. */\nexport function startOAuthFlow(input: StartOAuthInput): StartOAuthOutput {\n const store = input.store ?? defaultFlowStore\n const now = input.now ?? Date.now()\n store.sweep?.(now)\n const usePkce = (input.pkce ?? 'required') !== 'unsupported'\n const codeVerifier = usePkce ? base64Url(randomBytes(48)) : undefined\n const codeChallenge = codeVerifier\n ? base64Url(createHash('sha256').update(codeVerifier).digest())\n : undefined\n const state = base64Url(randomBytes(24))\n\n store.put(state, {\n codeVerifier,\n state,\n projectId: input.projectId,\n kind: input.kind,\n label: input.label,\n redirectUri: input.redirectUri,\n expiresAt: now + PENDING_TTL_MS,\n })\n\n const url = new URL(input.authorizationUrl)\n url.searchParams.set('response_type', 'code')\n url.searchParams.set(\n oauthParameterName(input.authorizationClientIdParam, 'client_id'),\n input.clientId,\n )\n url.searchParams.set('redirect_uri', input.redirectUri)\n url.searchParams.set('scope', input.scopes.join(input.scopeSeparator ?? ' '))\n url.searchParams.set('state', state)\n if (input.extraAuthParams) {\n for (const [k, v] of Object.entries(input.extraAuthParams)) {\n url.searchParams.set(k, v)\n }\n }\n if (codeChallenge) {\n url.searchParams.set('code_challenge', codeChallenge)\n url.searchParams.set('code_challenge_method', 'S256')\n } else {\n url.searchParams.delete('code_challenge')\n url.searchParams.delete('code_challenge_method')\n }\n return { authorizationUrl: url.toString(), state }\n}\n\n/** Look up + remove the pending flow record. Throws if state is unknown\n * or expired (CSRF guard / replay protection). */\nexport async function consumePendingFlow(state: string, store: OAuthFlowStore = defaultFlowStore): Promise<PendingOAuthFlow> {\n await store.sweep?.(Date.now())\n const flow = await store.consume(state)\n if (!flow) {\n throw new Error('Unknown or expired OAuth state: possible CSRF, replay, or stale flow')\n }\n return flow\n}\n\nexport interface ExchangeCodeInput {\n tokenUrl: string\n clientId: string\n /** Required unless tokenClientAuthMethod is `none`. */\n clientSecret?: string\n /** Defaults to client_secret_post for backward compatibility. */\n tokenClientAuthMethod?: OAuth2TokenClientAuthMethod\n tokenClientIdParam?: string\n tokenClientSecretParam?: string\n code: string\n /** Required unless pkce is explicitly unsupported. */\n codeVerifier?: string\n /** PKCE posture. Defaults to required. */\n pkce?: OAuthPkceMode\n redirectUri: string\n /** Non-secret provider identification headers for the token request. */\n tokenRequestHeaders?: Readonly<Record<string, string>>\n fetchImpl?: typeof fetch\n signal?: AbortSignal\n}\n\nexport interface OAuthTokens {\n accessToken: string\n refreshToken?: string\n expiresIn?: number\n scope?: string\n tokenType?: string\n /** OpenID Connect identity token returned when the connector requests\n * `openid`. Kept separate from the access credential so adapters can\n * capture stable account metadata without persisting the ID token. */\n idToken?: string\n}\n\n/** POST authorization code → token endpoint. Provider-agnostic; if a\n * provider returns a non-standard JSON shape, the adapter wraps this\n * call rather than reaching into the helper. */\nexport async function exchangeAuthorizationCode(input: ExchangeCodeInput): Promise<OAuthTokens> {\n const usePkce = (input.pkce ?? 'required') !== 'unsupported'\n if (usePkce && !input.codeVerifier) {\n throw new Error('OAuth token exchange requires a PKCE code_verifier')\n }\n const body = new URLSearchParams({\n grant_type: 'authorization_code',\n code: input.code,\n redirect_uri: input.redirectUri,\n })\n if (usePkce) body.set('code_verifier', input.codeVerifier!)\n const headers = createOAuthTokenRequestHeaders(input.tokenRequestHeaders)\n applyTokenClientAuthentication(input, body, headers)\n const redactionValues = [\n input.code,\n ...(input.codeVerifier ? [input.codeVerifier] : []),\n ...oauthClientCredentialRedactionValues(\n input.clientId,\n input.clientSecret,\n headers.authorization,\n ),\n ]\n let res: Response\n try {\n res = await (input.fetchImpl ?? fetch)(input.tokenUrl, {\n method: 'POST',\n headers,\n body,\n signal: input.signal,\n })\n } catch (cause) {\n const detail = redactOAuthSensitiveText(\n (cause as Error)?.message ?? 'unknown',\n redactionValues,\n )\n throw new Error(`OAuth token exchange transport error: ${detail}`)\n }\n if (!res.ok) {\n const text = await res.text().catch(() => '')\n const statusText = redactOAuthSensitiveText(res.statusText, redactionValues)\n const detail = redactOAuthSensitiveText(text, redactionValues).slice(0, 200)\n throw new Error(\n `OAuth token exchange failed: ${res.status} ${statusText} — ${detail}`,\n )\n }\n let json: {\n access_token: string\n refresh_token?: string\n expires_in?: number\n scope?: string\n token_type?: string\n id_token?: string\n }\n try {\n json = await res.json() as typeof json\n } catch {\n throw new Error('OAuth token exchange returned invalid JSON')\n }\n return {\n accessToken: json.access_token,\n refreshToken: json.refresh_token,\n expiresIn: json.expires_in,\n scope: json.scope,\n tokenType: json.token_type,\n idToken: json.id_token,\n }\n}\n\nexport interface RefreshInput {\n tokenUrl: string\n clientId: string\n /** Required unless tokenClientAuthMethod is `none`. */\n clientSecret?: string\n /** Defaults to client_secret_post for backward compatibility. */\n tokenClientAuthMethod?: OAuth2TokenClientAuthMethod\n tokenClientIdParam?: string\n tokenClientSecretParam?: string\n refreshToken: string\n /** Non-secret provider identification headers for the token request. */\n tokenRequestHeaders?: Readonly<Record<string, string>>\n fetchImpl?: typeof fetch\n signal?: AbortSignal\n}\n\n/** Refresh an access token. Returns the new tokens — the connector layer\n * is responsible for re-encrypting + persisting the envelope. */\nexport async function refreshAccessToken(input: RefreshInput): Promise<OAuthTokens> {\n const body = new URLSearchParams({\n grant_type: 'refresh_token',\n refresh_token: input.refreshToken,\n })\n const headers = createOAuthTokenRequestHeaders(input.tokenRequestHeaders)\n applyTokenClientAuthentication(input, body, headers)\n const redactionValues = [\n input.refreshToken,\n ...oauthClientCredentialRedactionValues(\n input.clientId,\n input.clientSecret,\n headers.authorization,\n ),\n ]\n let res: Response\n try {\n res = await (input.fetchImpl ?? fetch)(input.tokenUrl, {\n method: 'POST',\n headers,\n body,\n signal: input.signal,\n })\n } catch (cause) {\n const detail = redactOAuthSensitiveText(\n (cause as Error)?.message ?? 'unknown',\n redactionValues,\n )\n throw new Error(`OAuth refresh transport error: ${detail}`)\n }\n if (!res.ok) {\n const text = await res.text().catch(() => '')\n const statusText = redactOAuthSensitiveText(res.statusText, redactionValues)\n const detail = redactOAuthSensitiveText(text, redactionValues).slice(0, 200)\n throw new Error(`OAuth refresh failed: ${res.status} ${statusText} — ${detail}`)\n }\n let json: {\n access_token: string\n refresh_token?: string\n expires_in?: number\n scope?: string\n token_type?: string\n id_token?: string\n }\n try {\n json = await res.json() as typeof json\n } catch {\n throw new Error('OAuth refresh returned invalid JSON')\n }\n return {\n accessToken: json.access_token,\n // Some providers omit refresh_token on refresh — keep the previous one\n // in that case (caller passes through if undefined).\n refreshToken: json.refresh_token,\n expiresIn: json.expires_in,\n scope: json.scope,\n tokenType: json.token_type,\n idToken: json.id_token,\n }\n}\n\n/** Build token-endpoint headers without permitting an adapter-supplied value\n * to replace the authentication or form-media-type headers owned here. */\nexport function createOAuthTokenRequestHeaders(\n additional?: Readonly<Record<string, string>>,\n): Record<string, string> {\n const headers = new Headers(additional)\n headers.set('content-type', 'application/x-www-form-urlencoded')\n headers.set('accept', 'application/json')\n headers.delete('authorization')\n return Object.fromEntries(headers.entries())\n}\n\nexport function formEncodeOAuthClientCredential(value: string): string {\n return new URLSearchParams({ value }).toString().slice('value='.length)\n}\n\nexport function createOAuthBasicAuthorizationHeader(\n clientId: string,\n clientSecret: string,\n encodeBase64: (value: string) => string = defaultOAuthBase64Encode,\n): string {\n const encodedClientId = formEncodeOAuthClientCredential(clientId)\n const encodedClientSecret = formEncodeOAuthClientCredential(clientSecret)\n return `Basic ${encodeBase64(`${encodedClientId}:${encodedClientSecret}`)}`\n}\n\nfunction defaultOAuthBase64Encode(value: string): string {\n const encode = globalThis.btoa\n if (typeof encode !== 'function') {\n throw new Error(\n 'OAuth client_secret_basic requires a base64 encoder in this runtime.',\n )\n }\n return encode(value)\n}\n\nexport function oauthClientCredentialRedactionValues(\n clientId: string,\n clientSecret?: string,\n authorization?: string,\n): string[] {\n return [\n clientId,\n ...(clientSecret ? [clientSecret] : []),\n ...(authorization\n ? [\n authorization,\n ...(authorization.startsWith('Basic ')\n ? [authorization.slice('Basic '.length)]\n : []),\n ]\n : []),\n ]\n}\n\nexport function redactOAuthSensitiveText(\n text: string,\n secrets: readonly string[],\n): string {\n const matchers = new Map<string, { pattern: RegExp; representedLength: number }>()\n for (const secret of new Set(secrets)) {\n if (secret.length === 0) continue\n addOAuthRedactionMatcher(matchers, escapeRegExp(secret), secret.length)\n\n const jsonEscaped = JSON.stringify(secret).slice(1, -1)\n addOAuthRedactionMatcher(\n matchers,\n escapeRegExp(jsonEscaped),\n jsonEscaped.length,\n )\n\n const formEncoded = formEncodeOAuthClientCredential(secret)\n addOAuthRedactionMatcher(\n matchers,\n formEncodedRedactionPattern(formEncoded),\n Math.max(formEncoded.length, formEncoded.replaceAll('+', '%20').length),\n )\n }\n\n return [...matchers.values()]\n .sort((left, right) => right.representedLength - left.representedLength)\n .reduce(\n (redacted, matcher) => redacted.replace(matcher.pattern, '[REDACTED]'),\n text,\n )\n}\n\nfunction addOAuthRedactionMatcher(\n matchers: Map<string, { pattern: RegExp; representedLength: number }>,\n source: string,\n representedLength: number,\n): void {\n const existing = matchers.get(source)\n if (existing && existing.representedLength >= representedLength) return\n matchers.set(source, {\n pattern: new RegExp(source, 'g'),\n representedLength,\n })\n}\n\nfunction formEncodedRedactionPattern(formEncoded: string): string {\n let pattern = ''\n for (let index = 0; index < formEncoded.length; index += 1) {\n const character = formEncoded[index]!\n const encodedByte = formEncoded.slice(index + 1, index + 3)\n if (character === '%' && /^[0-9A-F]{2}$/.test(encodedByte)) {\n pattern += `%${percentEncodedBytePattern(encodedByte)}`\n index += 2\n continue\n }\n if (character === '+') {\n pattern += '(?:\\\\+|%20)'\n continue\n }\n pattern += escapeRegExp(character)\n }\n return pattern\n}\n\nfunction percentEncodedBytePattern(encodedByte: string): string {\n return [...encodedByte]\n .map((character) =>\n /[A-F]/.test(character)\n ? `[${character}${character.toLowerCase()}]`\n : character,\n )\n .join('')\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\nfunction applyTokenClientAuthentication(\n input: {\n clientId: string\n clientSecret?: string\n tokenClientIdParam?: string\n tokenClientSecretParam?: string\n tokenClientAuthMethod?: OAuth2TokenClientAuthMethod\n },\n body: URLSearchParams,\n headers: Record<string, string>,\n): void {\n const method = input.tokenClientAuthMethod ?? 'client_secret_post'\n if (method === 'none') {\n body.set(oauthParameterName(input.tokenClientIdParam, 'client_id'), input.clientId)\n return\n }\n if (!input.clientSecret) {\n throw new Error(`OAuth ${method} client authentication requires a client secret`)\n }\n if (method === 'client_secret_post') {\n body.set(oauthParameterName(input.tokenClientIdParam, 'client_id'), input.clientId)\n body.set(\n oauthParameterName(input.tokenClientSecretParam, 'client_secret'),\n input.clientSecret,\n )\n return\n }\n if (method === 'client_secret_basic') {\n headers.authorization = createOAuthBasicAuthorizationHeader(\n input.clientId,\n input.clientSecret,\n )\n return\n }\n throw new Error('Unsupported OAuth token client authentication method')\n}\n\nfunction base64Url(buf: Buffer): string {\n return buf.toString('base64').replace(/=+$/, '').replace(/\\+/g, '-').replace(/\\//g, '_')\n}\n\nfunction oauthParameterName(value: string | undefined, fallback: string): string {\n const name = value ?? fallback\n if (!/^[A-Za-z][A-Za-z0-9_.-]{0,63}$/.test(name)) {\n throw new Error('Invalid OAuth parameter name')\n }\n return name\n}\n\n/** Test-only — drop pending flows between unit-test runs. */\nexport function _resetPendingFlowsForTests(): void {\n defaultFlowStore.clear?.()\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsCA,MAAM,iBAAiB;AASvB,IAAa,yBAAb,MAA8D;CAC5D,+BAAgC,IAAI,IAA8B;CAElE,IAAI,OAAe,MAA8B;EAC/C,KAAK,aAAa,IAAI,OAAO,IAAI;CACnC;CAEA,QAAQ,OAA6C;EACnD,MAAM,OAAO,KAAK,aAAa,IAAI,KAAK;EACxC,KAAK,aAAa,OAAO,KAAK;EAC9B,IAAI,CAAC,QAAQ,KAAK,aAAa,KAAK,IAAI,GAAG,OAAO,KAAA;EAClD,OAAO;CACT;CAEA,MAAM,KAAmB;EACvB,KAAK,MAAM,CAAC,GAAG,MAAM,KAAK,cACxB,IAAI,EAA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AAM,oBAAoB,WAAW,GAAG,MAAM,QAAQ;EAClF;CACF;CACA,IAAI,CAAC,MAAM,cACT,MAAM,IAAI,MAAM,SAAS,OAAO,gDAAgD;CAElF,IAAI,WAAW,sBAAsB;EACnC,KAAK,IAAI,mBAAmB,MAAM,oBAAoB,WAAW,GAAG,MAAM,QAAQ;EAClF,KAAK,IACH,mBAAmB,MAAM,wBAAwB,eAAe,GAChE,MAAM,YACR;EACA;CACF;CACA,IAAI,WAAW,uBAAuB;EACpC,QAAQ,gBAAgB,oCACtB,MAAM,UACN,MAAM,YACR;EACA;CACF;CACA,MAAM,IAAI,MAAM,sDAAsD;AACxE;AAEA,SAAS,UAAU,KAAqB;CACtC,OAAO,IAAI,SAAS,QAAQ,CAAC,CAAC,QAAQ,OAAO,EAAE,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG;AACzF;AAEA,SAAS,mBAAmB,OAA2B,UAA0B;CAC/E,MAAM,OAAO,SAAS;CACtB,IAAI,CAAC,iCAAiC,KAAK,IAAI,GAC7C,MAAM,IAAI,MAAM,8BAA8B;CAEhD,OAAO;AACT;;AAGA,SAAgB,6BAAmC;CACjD,iBAAiB,QAAQ;AAC3B"}
|
|
1
|
+
{"version":3,"file":"oauth.js","names":[],"sources":["../../src/connectors/oauth.ts"],"sourcesContent":["/**\n * Generic OAuth2 helper used by every oauth-shaped connector (Google\n * Calendar, Sheets, Drive, HubSpot, Salesforce, Zoom, ...).\n *\n * Everything PKCE-aware. Opaque-state CSRF guard. Refresh-token aware.\n * No connector-specific logic lives here — adapters hand a `clientId`,\n * `clientSecret`, `tokenUrl`, optional `extraAuthParams` and the rest is\n * mechanical.\n *\n * State and code_verifier are kept in a short-TTL flow store keyed by the\n * opaque `state` we round-trip through the provider. The default store is\n * in-memory for local/dev and tests. Production deployments should inject a\n * durable store backed by KV/Redis/D1/etc. so callbacks can land on any worker.\n */\n\nimport { createHash, randomBytes } from 'crypto'\nimport { buildOAuthAuthorizationUrl } from './oauth-protocol.js'\nexport * from './oauth-protocol.js'\n\nimport type { OAuthPkceMode } from './oauth-protocol.js'\n\nexport interface PendingOAuthFlow {\n /** code_verifier for PKCE. Absent when the provider rejects PKCE. */\n codeVerifier?: string\n /** Opaque-state value also returned in the OAuth redirect. */\n state: string\n /** Project the user is connecting under. */\n projectId: string\n /** Connector kind (e.g. 'google-calendar'). */\n kind: string\n /** Operator-supplied label that becomes DataSource.label. */\n label: string\n /** When we drop the entry. */\n expiresAt: number\n /** The redirectUri we used in the start step — must match exactly on\n * the callback exchange. */\n redirectUri: string\n}\n\nconst PENDING_TTL_MS = 10 * 60 * 1000\n\nexport interface OAuthFlowStore {\n put(state: string, flow: PendingOAuthFlow): Promise<void> | void\n consume(state: string): Promise<PendingOAuthFlow | undefined> | PendingOAuthFlow | undefined\n sweep?(now: number): Promise<void> | void\n clear?(): Promise<void> | void\n}\n\nexport class InMemoryOAuthFlowStore implements OAuthFlowStore {\n private readonly pendingFlows = new Map<string, PendingOAuthFlow>()\n\n put(state: string, flow: PendingOAuthFlow): void {\n this.pendingFlows.set(state, flow)\n }\n\n consume(state: string): PendingOAuthFlow | undefined {\n const flow = this.pendingFlows.get(state)\n this.pendingFlows.delete(state)\n if (!flow || flow.expiresAt <= Date.now()) return undefined\n return flow\n }\n\n sweep(now: number): void {\n for (const [k, v] of this.pendingFlows) {\n if (v.expiresAt <= now) this.pendingFlows.delete(k)\n }\n }\n\n clear(): void {\n this.pendingFlows.clear()\n }\n}\n\nconst defaultFlowStore = new InMemoryOAuthFlowStore()\n\nexport interface StartOAuthInput {\n projectId: string\n kind: string\n label: string\n authorizationUrl: string\n scopes: string[]\n /** OAuth defaults to spaces; set `,` for providers such as Zoho. */\n scopeSeparator?: ' ' | ','\n clientId: string\n /** Authorization query parameter for the client id. Defaults to\n * `client_id`; TikTok uses `client_key`. */\n authorizationClientIdParam?: string\n /** PKCE posture. Defaults to required to preserve the existing safe flow. */\n pkce?: OAuthPkceMode\n redirectUri: string\n /** Optional extra query params; Google needs `access_type=offline` and\n * `prompt=consent` to issue refresh tokens reliably. */\n extraAuthParams?: Record<string, string>\n /** Optional flow store. Use a durable store in distributed production\n * runtimes; omitted means local in-memory storage. */\n store?: OAuthFlowStore\n /** Override clock for tests. */\n now?: number\n}\n\nexport interface StartOAuthOutput {\n /** URL the SPA should redirect the user to. */\n authorizationUrl: string\n /** State token — caller stashes this in localStorage to verify on\n * callback. */\n state: string\n}\n\n/** Build the authorization URL + state. SPA navigates the user there;\n * user consents; provider redirects back to redirectUri with `code` +\n * `state`. The caller's callback then invokes `consumePendingFlow`. */\nexport function startOAuthFlow(input: StartOAuthInput): StartOAuthOutput {\n const store = input.store ?? defaultFlowStore\n const now = input.now ?? Date.now()\n store.sweep?.(now)\n const usePkce = (input.pkce ?? 'required') !== 'unsupported'\n const codeVerifier = usePkce ? base64Url(randomBytes(48)) : undefined\n const codeChallenge = codeVerifier\n ? base64Url(createHash('sha256').update(codeVerifier).digest())\n : undefined\n const state = base64Url(randomBytes(24))\n\n store.put(state, {\n codeVerifier,\n state,\n projectId: input.projectId,\n kind: input.kind,\n label: input.label,\n redirectUri: input.redirectUri,\n expiresAt: now + PENDING_TTL_MS,\n })\n\n return {\n authorizationUrl: buildOAuthAuthorizationUrl({ ...input, state, codeChallenge }),\n state,\n }\n}\n\n/** Look up + remove the pending flow record. Throws if state is unknown\n * or expired (CSRF guard / replay protection). */\nexport async function consumePendingFlow(state: string, store: OAuthFlowStore = defaultFlowStore): Promise<PendingOAuthFlow> {\n await store.sweep?.(Date.now())\n const flow = await store.consume(state)\n if (!flow) {\n throw new Error('Unknown or expired OAuth state: possible CSRF, replay, or stale flow')\n }\n return flow\n}\n\nfunction base64Url(buf: Buffer): string {\n return buf.toString('base64').replace(/=+$/, '').replace(/\\+/g, '-').replace(/\\//g, '_')\n}\n\n/** Test-only — drop pending flows between unit-test runs. */\nexport function _resetPendingFlowsForTests(): void {\n defaultFlowStore.clear?.()\n}\n"],"mappings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C9B,MAAM,OAAO,MAAM,MAAM,QAAQ,KAAK;CACtC,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,sEAAsE;CAExF,OAAO;AACT;AAEA,SAAS,UAAU,KAAqB;CACtC,OAAO,IAAI,SAAS,QAAQ,CAAC,CAAC,QAAQ,OAAO,EAAE,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG;AACzF;;AAGA,SAAgB,6BAAmC;CACjD,iBAAiB,QAAQ;AAC3B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as ResolvedDataSource, d as ConnectorCredentials, u as ConnectorAdapter } from "./types-
|
|
2
|
-
import { A as
|
|
3
|
-
import { i as IntegrationRegistryEntry, n as IntegrationRegistry, o as IntegrationRegistrySummary, r as IntegrationRegistryConflict } from "./registry-core-
|
|
4
|
-
import { n as IntegrationToolDefinition } from "./catalog-
|
|
1
|
+
import { A as ResolvedDataSource, d as ConnectorCredentials, u as ConnectorAdapter } from "./types-Bq85dJDW.js";
|
|
2
|
+
import { A as IntegrationSecretStore, C as IntegrationOAuthState, D as IntegrationPolicyEngine, E as IntegrationPolicyDecision, F as IssuedIntegrationCapability, I as SecretRef, L as StartAuthRequest, M as IntegrationTriggerSubscription, N as InvokeWithCapabilityRequest, O as IntegrationProvider, R as StartAuthResult, T as IntegrationOAuthStateStore, _ as IntegrationConnectorCategory, a as IntegrationActionRequest, b as IntegrationDataClass, c as IntegrationActor, d as IntegrationCatalogSource, f as IntegrationConnection, g as IntegrationConnectorAction, h as IntegrationConnector, j as IntegrationTriggerEvent, k as IntegrationProviderKind, l as IntegrationApprovalRequest, o as IntegrationActionResult, p as IntegrationConnectionStore, r as HttpIntegrationProviderOptions, s as IntegrationActionRisk, t as CompleteAuthRequest, u as IntegrationCapability, w as IntegrationOAuthStateOutcome, x as IntegrationGuardContext, y as IntegrationCredentialsRotatedEvent } from "./core-types-0BenSoZJ.js";
|
|
3
|
+
import { i as IntegrationRegistryEntry, n as IntegrationRegistry, o as IntegrationRegistrySummary, r as IntegrationRegistryConflict } from "./registry-core-B1ApiG47.js";
|
|
4
|
+
import { n as IntegrationToolDefinition } from "./catalog-z4zNeXVL.js";
|
|
5
5
|
import "./billing-access-policy-CtvuHvM8.js";
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import { a as StaticIntegrationPolicyOptions, b as IntegrationAuditSink, i as StaticIntegrationPolicyEngine } from "./policy-
|
|
6
|
+
import "./index-CkCYzn8f.js";
|
|
7
|
+
import "./index-BNzWrQM0.js";
|
|
8
|
+
import { a as StaticIntegrationPolicyOptions, b as IntegrationAuditSink, i as StaticIntegrationPolicyEngine } from "./policy-C8jynxf9.js";
|
|
9
9
|
//#region src/core-error.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* IntegrationError — the runtime error class thrown by the hub, providers,
|
|
@@ -18,7 +18,7 @@ import { a as StaticIntegrationPolicyOptions, b as IntegrationAuditSink, i as St
|
|
|
18
18
|
* error → HTTP-status mappings. `IntegrationError` is the legacy/canonical
|
|
19
19
|
* throw shape kept for back-compat with everything that already catches it.
|
|
20
20
|
*/
|
|
21
|
-
type IntegrationErrorRuntimeCode = 'provider_not_found' | 'connector_not_found' | 'connection_not_found' | 'connection_not_active' | 'auth_not_supported' | 'capability_invalid' | 'capability_expired' | 'scope_denied' | 'action_denied' | 'action_not_found' | 'trigger_not_found' | 'approval_required' | 'policy_denied' | 'config_missing' | 'provider_failure';
|
|
21
|
+
type IntegrationErrorRuntimeCode = 'provider_not_found' | 'connector_not_found' | 'connection_not_found' | 'connection_not_active' | 'auth_not_supported' | 'capability_invalid' | 'capability_expired' | 'scope_denied' | 'action_denied' | 'action_not_found' | 'trigger_not_found' | 'approval_required' | 'policy_denied' | 'config_missing' | 'provider_failure' | 'credential_invalid' | 'credential_scope_invalid' | 'credential_rate_limited' | 'credential_probe_unsupported' | 'credential_persistence_failure' | 'connection_metadata_invalid' | 'connection_parameters_missing' | 'connection_parameters_invalid';
|
|
22
22
|
declare class IntegrationError extends Error {
|
|
23
23
|
readonly code: IntegrationErrorRuntimeCode;
|
|
24
24
|
constructor(message: string, code: IntegrationErrorRuntimeCode);
|
|
@@ -469,6 +469,8 @@ interface OAuthClientCredentials {
|
|
|
469
469
|
clientId: string;
|
|
470
470
|
/** Omit for public clients whose manifest uses tokenClientAuthMethod=none. */
|
|
471
471
|
clientSecret?: string;
|
|
472
|
+
/** Business-login configuration; replaces per-request scopes. */
|
|
473
|
+
configId?: string;
|
|
472
474
|
}
|
|
473
475
|
interface ConnectorAdapterProviderOptions {
|
|
474
476
|
id?: string;
|
|
@@ -496,6 +498,13 @@ interface ConnectorAdapterProviderOptions {
|
|
|
496
498
|
* is `globalThis.fetch`. Tests inject a mock. */
|
|
497
499
|
fetchImpl?: typeof fetch;
|
|
498
500
|
now?: () => Date;
|
|
501
|
+
/** Initial encrypted credential commit. Return the canonical reconnect id and secretRef. */
|
|
502
|
+
persistConnection?: (input: {
|
|
503
|
+
connection: IntegrationConnection;
|
|
504
|
+
credentials: ConnectorCredentials;
|
|
505
|
+
}) => Promise<IntegrationConnection>;
|
|
506
|
+
/** Bounds provider work, including adapters that ignore cancellation. */
|
|
507
|
+
operationTimeoutMs?: number;
|
|
499
508
|
}
|
|
500
509
|
declare function createConnectorAdapterProvider(options: ConnectorAdapterProviderOptions): IntegrationProvider;
|
|
501
510
|
declare function adapterManifestsToConnectors(adapters: ConnectorAdapter[], providerId?: string): IntegrationConnector[];
|
|
@@ -1547,4 +1556,4 @@ declare class IntegrationHubClient {
|
|
|
1547
1556
|
declare function createIntegrationHubClient(options: IntegrationHubClientOptions): IntegrationHubClient;
|
|
1548
1557
|
//#endregion
|
|
1549
1558
|
export { getActivepiecesOverride as $, TangleAppsClient as $n, IntegrationHealthcheckStatus as $t, TangleIntegrationContract as A, createCredentialBackedAdapterProvider as An, buildCanonicalLaunchConnectors as Ar, redactInvocationEnvelope as At, listTangleIntegrationContracts as B, RenderConsentOptions as Bn, resolveIntegrationApproval as Br, validateProviderPassthroughRequest as Bt, TangleCatalogExecutorProviderOptions as C, discoverWorkspaceCapabilities as Cn, IntegrationRuntimeHub as Cr, IntegrationSandboxHostOptions as Ct, TangleIntegrationCatalogEntry as D, InMemoryIntegrationOAuthStateStore as Dn, CANONICAL_INTEGRATION_ACTIONS as Dr, invocationRequestFromEnvelope as Dt, TangleCatalogTriggerInvocation as E, CredentialBackedAdapterProviderOptions as En, createIntegrationRuntime as Er, dispatchIntegrationInvocation as Et, buildTangleIntegrationCatalogConnectors as F, adapterManifestsToConnectors as Fn, IntegrationApprovalFilter as Fr, PlatformIntegrationPolicyPresetOptions as Ft, IntegrationCatalogFreshnessResult as G, TangleIntegrationsClient as Gn, assertValidIntegrationManifest as Gt, renderTangleCatalogRuntimePnpmAddCommand as H, renderConsentSummary as Hn, IntegrationErrorRuntimeCode as Hr, ManifestValidationIssue as Ht, createTangleCatalogExecutorProvider as I, createConnectorAdapterCatalogSource as In, IntegrationApprovalRecord as Ir, createPlatformIntegrationPolicyPreset as It, ActivepiecesExecutorInvocation as J, AppSummary as Jn, inferIntegrationManifestFromTools as Jt, auditIntegrationCatalogFreshness as K, TangleIntegrationsClientOptions as Kn, calendarExercisePlannerManifest as Kt, extractExternalCatalogPublicCount as L, createConnectorAdapterProvider as Ln, IntegrationApprovalStatus as Lr, PROVIDER_PASSTHROUGH_ACTION as Lt, TangleIntegrationImplementationKind as M, revokeConnection as Mn, ApprovalBackedPolicyEngine as Mr, CatalogExecutorInvocation as Mt, auditTangleIntegrationCatalogFreshness as N, ConnectorAdapterProviderOptions as Nn, ApprovalBackedPolicyOptions as Nr, CatalogExecutorProviderOptions as Nt, TangleIntegrationCatalogFreshnessOptions as O, InMemoryIntegrationSecretStore as On, CanonicalIntegrationActionId as Or, normalizeIntegrationResult as Ot, buildTangleCatalogRuntimePackageManifest as P, OAuthClientCredentials as Pn, InMemoryIntegrationApprovalStore as Pr, createCatalogExecutorProvider as Pt, ActivepiecesPieceOverride as Q, RegisteredApp as Qn, IntegrationHealthcheckResult as Qt, listTangleIntegrationCatalogEntries as R, manifestToConnector as Rn, IntegrationApprovalStore as Rr, ProviderHttpRequestInput as Rt, TangleCatalogExecutorInvocation as S, WorkspaceTrigger as Sn, IntegrationRuntime as Sr, IntegrationSandboxHostHub as St, TangleCatalogRuntimePackageManifestOptions as T, ConnectionCredentialResolverOptions as Tn, IntegrationSandboxBundle as Tr, buildIntegrationInvocationEnvelope as Tt, ACTIVEPIECES_PUBLIC_CATALOG_URL as U, TangleIntegrationInvokeInput as Un, ManifestValidationResult as Ut, listTangleNativeAdapterIds as V, renderApprovalCopy as Vn, IntegrationError as Vr, InferIntegrationRequirementsOptions as Vt, IntegrationCatalogFreshnessOptions as W, TangleIntegrationInvokeResult as Wn, MissingRequirementExplanation as Wt, createActivepiecesExecutorProvider as X, BrokerToken as Xn, InMemoryIntegrationHealthcheckStore as Xt, ActivepiecesExecutorProviderOptions as Y, AppsOwnerPolicy as Yn, validateIntegrationManifest as Yt, ACTIVEPIECES_OVERRIDES as Z, RegisterAppInput as Zn, IntegrationHealthcheckCheck as Zt, sanitizeConnection as _, createIntegrationWorkflowRuntime as _n, IntegrationManifestResolution as _r, importMcpConnector as _t, IntegrationHubAuth as a, IntegrationEventStore as an, IntegrationBridgeToolBinding as ar, GatewayCatalogEntry as at, TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID as b, WorkspaceCapabilityDiscovery as bn, IntegrationRequirementResolution as br, IntegrationInvocationEnvelopeValidationOptions as bt, IntegrationHubRequestError as c, receiveIntegrationWebhook as cn, decodeIntegrationBridgePayload as cr, createGatewayCatalogProvider as ct, MintCapabilityBundleInput as d, InstalledIntegrationWorkflow as dn, redactIntegrationBridgePayload as dr, ImportCatalogOptions as dt, IntegrationHealthcheckStore as en, TangleAppsClientOptions as er, ActivepiecesCatalogAuthField as et, ResolveManifestInput as f, IntegrationWorkflowDefinition as fn, InMemoryIntegrationGrantStore as fr, McpCatalog as ft, createMockIntegrationProvider as g, IntegrationWorkflowStore as gn, IntegrationManifest as gr, importGraphqlConnector as gt, createHttpIntegrationProvider as h, IntegrationWorkflowRuntimeOptions as hn, IntegrationGrantStore as hr, OpenApiOperation as ht, CreateGrantsInput as i, InMemoryIntegrationEventStore as in, IntegrationBridgePayload as ir, GatewayCatalogAction as it, TangleIntegrationContractStatus as j, resolveConnectionCredentials as jn, canonicalActionConnectorId as jr, validateIntegrationInvocationEnvelope as jt, TangleIntegrationCatalogFreshnessResult as k, createConnectionCredentialResolver as kn, CanonicalLaunchConnectorOptions as kr, redactCapability as kt, IntegrationOwnerPolicy as l, storedEventToTriggerEvent as ln, encodeIntegrationBridgePayload as lr, normalizeGatewayCatalog as lt, InMemoryConnectionStore as m, IntegrationWorkflowRuntimeHub as mn, IntegrationGrant as mr, OpenApiDocument as mt, CheckConnectorInput as n, runIntegrationHealthcheck as nn, requireBrokerGrantReceipt as nr, buildActivepiecesConnectors as nt, IntegrationHubClient as o, IntegrationWebhookReceiverResult as on, buildIntegrationBridgeEnvironment as or, GatewayCatalogProviderOptions as ot, createIntegrationHubClient as p, IntegrationWorkflowRuntime as pn, IntegrationCapabilityBinding as pr, McpCatalogTool as pt, extractActivepiecesPublicPieceCount as q, createTangleIntegrationsClient as qn, explainMissingRequirements as qt, CheckConnectorResult as r, runIntegrationHealthchecks as rn, DEFAULT_INTEGRATION_BRIDGE_ENV as rr, listActivepiecesCatalogEntries as rt, IntegrationHubClientOptions as s, StoredIntegrationEvent as sn, buildIntegrationBridgePayload as sr, GatewayCatalogTrigger as st, CapabilityBundleResult as t, healthcheckRequest as tn, createTangleAppsClient as tr, ActivepiecesCatalogEntry as tt, ListGrantsInput as u, InMemoryIntegrationWorkflowStore as un, parseIntegrationBridgeEnvironment as ur, GraphqlOperationSpec as ut, INTEGRATION_KIND_ALIASES as v, DiscoverWorkspaceCapabilitiesInput as vn, IntegrationRequirement as vr, importOpenApiConnector as vt, TangleCatalogRuntimePackageManifest as w, filterDiscoveryByWorkspaceScopes as wn, IntegrationRuntimeOptions as wr, NormalizedIntegrationResult as wt, TANGLE_INTEGRATIONS_CATALOG_SOURCE as x, WorkspaceToolSchema as xn, IntegrationRequirementStatus as xr, IntegrationSandboxHost as xt, canonicalIntegrationKind as y, WorkspaceCapability as yn, IntegrationRequirementMode as yr, IntegrationInvocationEnvelope as yt, listTangleIntegrationCatalogRuntimePackages as z, ConsentSummary as zn, createApprovalBackedPolicyEngine as zr, ProviderPassthroughPolicy as zt };
|
|
1550
|
-
//# sourceMappingURL=consumer-
|
|
1559
|
+
//# sourceMappingURL=consumer-YE5ibTlI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-YE5ibTlI.d.ts","names":["_$__core_types_js0.IntegrationProvider"],"sources":["../src/core-error.ts","../src/approval.ts","../src/actions.ts","../src/runtime.ts","../src/bridge.ts","../src/apps.ts","../src/client.ts","../src/consent.ts","../src/adapter-provider.ts","../src/credentials.ts","../src/discovery.ts","../src/workflow.ts","../src/events.ts","../src/healthcheck.ts","../src/manifest.ts","../src/passthrough.ts","../src/presets.ts","../src/catalog-executor.ts","../src/sandbox.ts","../src/importers.ts","../src/gateway-catalog.ts","../src/activepieces-catalog.ts","../src/activepieces-overrides.ts","../src/activepieces-provider.ts","../src/catalog-freshness.ts","../src/tangle-catalog.ts","../src/integration-kind-aliases.ts","../src/index.ts","../src/consumer.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAYY;cAyBC,yBAAyB;WAGzB,MAAM;EAFjB,YACE,iBACS,MAAM;;;;KC7BP;UAEK;EACf;EACA,SAAS;EACT,QAAQ;EACR;EACA;EACA,aAAa;EACb;EACA;EACA,WAAW;;UAGI;EACf,IAAI,qBAAqB,QAAQ,yCAAyC;EAC1E,IAAI,QAAQ,4BAA4B;EACxC,KAAK,SAAS,4BAA4B,QAAQ,+BAA+B;;UAGlE;EACf,SAAS;EACT;EACA;EACA;EACA,QAAQ;;UAGO;EACf,MAAM;EACN,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f;;EAEA;;EAEA,OAAO;EACP;EACA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb,YAAY;;;;;;cAOD;mBACM;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;EAEjB,YAAY,SAAS;;;;;;;EA0Cf,gBAAgB,OAAO,uBAAuB,QAAQ;;;;;;EAetD,eAAe,OAAO,sBAAsB,QAAQ;;;;EAyCpD,aAAa,OAAO,oBAAoB,QAAQ;;EAgBhD,WAAW,OAAO,kBAAkB,QAAQ;;;;EAgB5C,qBAAqB,OAAO,4BAA4B,QAAQ;;EAgBhE,gBAAgB;IAAS;MAAmB,QAAQ;UAUlD;UAaM;;iBAkGA,2BACd,SAAS,8BACR"}
|
package/dist/consumer.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as IntegrationHubAuth, c as IntegrationHubRequestError, d as MintCapabilityBundleInput, f as ResolveManifestInput, i as CreateGrantsInput, l as IntegrationOwnerPolicy, n as CheckConnectorInput, o as IntegrationHubClient, p as createIntegrationHubClient, r as CheckConnectorResult, s as IntegrationHubClientOptions, t as CapabilityBundleResult, u as ListGrantsInput } from "./consumer-
|
|
1
|
+
import { a as IntegrationHubAuth, c as IntegrationHubRequestError, d as MintCapabilityBundleInput, f as ResolveManifestInput, i as CreateGrantsInput, l as IntegrationOwnerPolicy, n as CheckConnectorInput, o as IntegrationHubClient, p as createIntegrationHubClient, r as CheckConnectorResult, s as IntegrationHubClientOptions, t as CapabilityBundleResult, u as ListGrantsInput } from "./consumer-YE5ibTlI.js";
|
|
2
2
|
export { CapabilityBundleResult, CheckConnectorInput, CheckConnectorResult, CreateGrantsInput, IntegrationHubAuth, IntegrationHubClient, IntegrationHubClientOptions, IntegrationHubRequestError, IntegrationOwnerPolicy, ListGrantsInput, MintCapabilityBundleInput, ResolveManifestInput, createIntegrationHubClient };
|
package/dist/consumer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as ConnectorCredentials } from "./types-
|
|
1
|
+
import { d as ConnectorCredentials } from "./types-Bq85dJDW.js";
|
|
2
2
|
//#region src/core-types.d.ts
|
|
3
3
|
type IntegrationProviderKind = 'first_party' | 'nango' | 'pipedream' | 'zapier' | 'activepieces' | 'tangle_catalog' | 'executor' | 'custom' | 'mcp';
|
|
4
4
|
type IntegrationConnectorCategory = 'email' | 'calendar' | 'chat' | 'crm' | 'storage' | 'docs' | 'database' | 'webhook' | 'workflow' | 'internal' | 'other';
|
|
@@ -76,6 +76,8 @@ interface StartAuthRequest {
|
|
|
76
76
|
metadata?: Record<string, unknown>;
|
|
77
77
|
}
|
|
78
78
|
interface StartAuthResult {
|
|
79
|
+
/** Effective scope request, including provider defaults. */
|
|
80
|
+
requestedScopes?: string[];
|
|
79
81
|
providerId: string;
|
|
80
82
|
connectorId: string;
|
|
81
83
|
authUrl: string;
|
|
@@ -92,6 +94,9 @@ interface CompleteAuthRequest {
|
|
|
92
94
|
/** PKCE verifier injected by the host. IntegrationHub replaces any caller
|
|
93
95
|
* value with the verifier stored against the single-use OAuth state. */
|
|
94
96
|
codeVerifier?: string;
|
|
97
|
+
signal?: AbortSignal;
|
|
98
|
+
/** Host-pinned start scopes; used only when the provider omits its grant scopes. */
|
|
99
|
+
requestedScopes?: string[];
|
|
95
100
|
metadata?: Record<string, unknown>;
|
|
96
101
|
}
|
|
97
102
|
interface IntegrationActionRequest {
|
|
@@ -129,10 +134,19 @@ interface IntegrationTriggerEvent<T = unknown> {
|
|
|
129
134
|
payload: T;
|
|
130
135
|
metadata?: Record<string, unknown>;
|
|
131
136
|
}
|
|
137
|
+
type IntegrationConnectionTestStatus = 'healthy' | 'reconnect_required' | 'rate_limited' | 'network' | 'provider_failure' | 'credential_persistence_failure' | 'unsupported';
|
|
138
|
+
interface ConnectApiKeyRequest {
|
|
139
|
+
connectorId: string;
|
|
140
|
+
owner: IntegrationActor;
|
|
141
|
+
apiKey: string;
|
|
142
|
+
metadata?: Record<string, unknown>;
|
|
143
|
+
}
|
|
132
144
|
interface IntegrationProvider {
|
|
133
145
|
id: string;
|
|
134
146
|
kind: IntegrationProviderKind;
|
|
135
147
|
listConnectors(): Promise<IntegrationConnector[]> | IntegrationConnector[];
|
|
148
|
+
testConnection?(connection: IntegrationConnection): Promise<IntegrationConnectionTestStatus>;
|
|
149
|
+
connectApiKey?(request: ConnectApiKeyRequest): Promise<IntegrationConnection>;
|
|
136
150
|
startAuth?(request: StartAuthRequest): Promise<StartAuthResult> | StartAuthResult;
|
|
137
151
|
completeAuth?(request: CompleteAuthRequest): Promise<IntegrationConnection> | IntegrationConnection;
|
|
138
152
|
invokeAction(connection: IntegrationConnection, request: IntegrationActionRequest): Promise<IntegrationActionResult> | IntegrationActionResult;
|
|
@@ -347,5 +361,5 @@ interface IntegrationOAuthStateStore {
|
|
|
347
361
|
sweep?(now: number): Promise<void> | void;
|
|
348
362
|
}
|
|
349
363
|
//#endregion
|
|
350
|
-
export {
|
|
351
|
-
//# sourceMappingURL=core-types-
|
|
364
|
+
export { IntegrationSecretStore as A, IntegrationOAuthState as C, IntegrationPolicyEngine as D, IntegrationPolicyDecision as E, IssuedIntegrationCapability as F, SecretRef as I, StartAuthRequest as L, IntegrationTriggerSubscription as M, InvokeWithCapabilityRequest as N, IntegrationProvider as O, IssueCapabilityRequest as P, StartAuthResult as R, IntegrationHubOptions as S, IntegrationOAuthStateStore as T, IntegrationConnectorCategory as _, IntegrationActionRequest as a, IntegrationDataClass as b, IntegrationActor as c, IntegrationCatalogSource as d, IntegrationConnection as f, IntegrationConnectorAction as g, IntegrationConnector as h, IntegrationActionGuard as i, IntegrationTriggerEvent as j, IntegrationProviderKind as k, IntegrationApprovalRequest as l, IntegrationConnectionTestStatus as m, ConnectApiKeyRequest as n, IntegrationActionResult as o, IntegrationConnectionStore as p, HttpIntegrationProviderOptions as r, IntegrationActionRisk as s, CompleteAuthRequest as t, IntegrationCapability as u, IntegrationConnectorTrigger as v, IntegrationOAuthStateOutcome as w, IntegrationGuardContext as x, IntegrationCredentialsRotatedEvent as y };
|
|
365
|
+
//# sourceMappingURL=core-types-0BenSoZJ.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-types-0BenSoZJ.d.ts","names":[],"sources":["../src/core-types.ts"],"mappings":";;KAeY;KAWA;KAaA;KACA;UAEK;EACf;EACA;;UAGe;EACf;EACA;EACA,MAAM;EACN;EACA,WAAW;;EAEX;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,WAAW;EACX;EACA;;UAGe;EACf;EACA;EACA;EACA,UAAU;EACV;EACA;EACA,SAAS;EACT,WAAW;EACX,WAAW;;UAGI;EACf;EACA;EACA;;UAGe;EACf;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;IACE;IACA;IACA;;EAEF,YAAY;EACZ;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA,OAAO;EACP;EACA;EACA;;;EAGA;EACA,WAAW;;UAGI;;EAEf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA,OAAO;EACP;EACA;EACA;;;EAGA;EACA,SAAS;;EAET;EACA,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI,wBAAwB;EACvC;EACA;EACA,SAAS;EACT;EACA;EACA,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI,wBAAwB;EACvC;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT,WAAW;;KAGD;UAEK;EACf;EACA,OAAO;EACP;EACA,WAAW;;UAGI;EACf;EACA,MAAM;EACN,kBAAkB,QAAQ,0BAA0B;EACpD,gBAAgB,YAAY,wBAAwB,QAAQ;EAC5D,eAAe,SAAS,uBAAuB,QAAQ;EACvD,WAAW,SAAS,mBAAmB,QAAQ,mBAAmB;EAClE,cAAc,SAAS,sBAAsB,QAAQ,yBAAyB;EAC9E,aAAa,YAAY,uBAAuB,SAAS,2BAA2B,QAAQ,2BAA2B;EACvH,kBAAk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EA,OAAO;;EAEP;;EAEA;;EAEA;;;EAGA;;EAEA,WAAW;;;;;KAMD;EACN;EAAU,OAAO;;EACjB;EAAW;;;;;;UAMA;EACf,IAAI,OAAO,wBAAwB;EACnC,QAAQ,gBAAgB,QAAQ,gCAAgC;EAChE,OAAO,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as IntegrationConnectorCategory, h as IntegrationConnector, k as IntegrationProviderKind } from "./core-types-0BenSoZJ.js";
|
|
2
2
|
//#region src/coverage-catalog.d.ts
|
|
3
3
|
type IntegrationCoveragePriority = 'tier_0' | 'tier_1' | 'tier_2' | 'long_tail';
|
|
4
4
|
interface IntegrationCoverageSpec {
|
|
@@ -23,4 +23,4 @@ declare function buildIntegrationCoverageConnectors(options?: {
|
|
|
23
23
|
declare function integrationCoverageChecklistMarkdown(): string;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { integrationCoverageChecklistMarkdown as a, buildIntegrationCoverageConnectors as i, IntegrationCoveragePriority as n, listIntegrationCoverageSpecs as o, IntegrationCoverageSpec as r, IntegrationActionPack as t };
|
|
26
|
-
//# sourceMappingURL=coverage-catalog-
|
|
26
|
+
//# sourceMappingURL=coverage-catalog-5LheuThC.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage-catalog-
|
|
1
|
+
{"version":3,"file":"coverage-catalog-5LheuThC.d.ts","names":[],"sources":["../src/coverage-catalog.ts"],"mappings":";;KAQY;UAEK;EACf;EACA;EACA,UAAU;EACV,MAAM;EACN,UAAU;EACV,eAAe;EACf;EACA,YAAY;EACZ;;KAGU;iBA6SI,gCAAgC;iBAchC,mCAAmC;EACjD;EACA,aAAa;EACb,aAAa;EACb,cAAc;IACP;iBASO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as integrationCoverageChecklistMarkdown, i as buildIntegrationCoverageConnectors, n as IntegrationCoveragePriority, o as listIntegrationCoverageSpecs, r as IntegrationCoverageSpec, t as IntegrationActionPack } from "./coverage-catalog-
|
|
1
|
+
import { a as integrationCoverageChecklistMarkdown, i as buildIntegrationCoverageConnectors, n as IntegrationCoveragePriority, o as listIntegrationCoverageSpecs, r as IntegrationCoverageSpec, t as IntegrationActionPack } from "./coverage-catalog-5LheuThC.js";
|
|
2
2
|
export { IntegrationActionPack, IntegrationCoveragePriority, IntegrationCoverageSpec, buildIntegrationCoverageConnectors, integrationCoverageChecklistMarkdown, listIntegrationCoverageSpecs };
|