@tangle-network/agent-integrations 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +6 -6
- package/dist/{chunk-6OOMR4SL.js → chunk-E6BBOBYT.js} +25 -3
- package/dist/chunk-E6BBOBYT.js.map +1 -0
- package/dist/{chunk-DQADH6DL.js → chunk-LA76XB7M.js} +2 -2
- package/dist/{chunk-RFBI7NUC.js → chunk-S2BUASSV.js} +2 -2
- package/dist/{chunk-EQB46PIG.js → chunk-UWF33ESC.js} +38 -2
- package/dist/chunk-UWF33ESC.js.map +1 -0
- package/dist/{chunk-GA7RAMMB.js → chunk-VLVSP7SP.js} +2 -2
- package/dist/{chunk-HRPCFEGL.js → chunk-WTMOFI3U.js} +398 -214
- package/dist/{chunk-HRPCFEGL.js.map → chunk-WTMOFI3U.js.map} +1 -1
- package/dist/connect/index.d.ts +2 -2
- package/dist/connect/index.js +2 -2
- package/dist/connectors/adapters/index.d.ts +73 -11
- package/dist/connectors/adapters/index.js +12 -2
- package/dist/connectors/index.d.ts +3 -3
- package/dist/connectors/index.js +16 -2
- package/dist/{consumer-DQiAGxQ2.d.ts → consumer-CTMB1xcc.d.ts} +1 -1
- package/dist/consumer.d.ts +3 -3
- package/dist/consumer.js +2 -2
- package/dist/{core-types-17jYpwtm.d.ts → core-types-BZLzY8Oa.d.ts} +1 -1
- package/dist/coverage-catalog.d.ts +2 -2
- package/dist/{importers-C_mQqIJP.d.ts → importers-6Beu0SQ9.d.ts} +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +20 -6
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +6 -6
- package/dist/middleware/index.d.ts +2 -2
- package/dist/middleware/index.js +2 -2
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +6 -6
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +6 -6
- package/dist/specs.d.ts +2 -2
- package/dist/{tangle-id-CpdEOacl.d.ts → tangle-id-_uZ3ywCF.d.ts} +1 -1
- package/dist/{types-BLOYLnKZ.d.ts → types-rBPdMcpb.d.ts} +72 -5
- package/package.json +1 -1
- package/dist/chunk-6OOMR4SL.js.map +0 -1
- package/dist/chunk-EQB46PIG.js.map +0 -1
- /package/dist/{chunk-DQADH6DL.js.map → chunk-LA76XB7M.js.map} +0 -0
- /package/dist/{chunk-RFBI7NUC.js.map → chunk-S2BUASSV.js.map} +0 -0
- /package/dist/{chunk-GA7RAMMB.js.map → chunk-VLVSP7SP.js.map} +0 -0
package/dist/catalog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntegrationSupportTier, IntegrationRegistry, IntegrationRegistrySummary } from './registry.js';
|
|
2
|
-
import { d as IntegrationConnectorCategory, e as IntegrationConnectorAction, f as IntegrationActionRisk, g as IntegrationDataClass, b as IntegrationConnector } from './core-types-
|
|
3
|
-
import './types-
|
|
2
|
+
import { d as IntegrationConnectorCategory, e as IntegrationConnectorAction, f as IntegrationActionRisk, g as IntegrationDataClass, b as IntegrationConnector } from './core-types-BZLzY8Oa.js';
|
|
3
|
+
import './types-rBPdMcpb.js';
|
|
4
4
|
|
|
5
5
|
interface IntegrationToolDefinition {
|
|
6
6
|
name: string;
|
package/dist/catalog.js
CHANGED
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
parseIntegrationToolName,
|
|
8
8
|
searchIntegrationTools,
|
|
9
9
|
toMcpTools
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-E6BBOBYT.js";
|
|
11
|
+
import "./chunk-S2BUASSV.js";
|
|
12
|
+
import "./chunk-LA76XB7M.js";
|
|
13
13
|
import "./chunk-H4XYLS7T.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-VLVSP7SP.js";
|
|
15
15
|
import "./chunk-IA5GCKM6.js";
|
|
16
16
|
import "./chunk-7P2LN4VT.js";
|
|
17
17
|
import "./chunk-376UBTNB.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-WTMOFI3U.js";
|
|
19
19
|
import "./chunk-2TW2QKGZ.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-UWF33ESC.js";
|
|
21
21
|
import "./chunk-PZ5AY32C.js";
|
|
22
22
|
export {
|
|
23
23
|
buildIntegrationCatalogView,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-IA5GCKM6.js";
|
|
9
9
|
import {
|
|
10
10
|
adapters_exports
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WTMOFI3U.js";
|
|
12
12
|
|
|
13
13
|
// src/activepieces-catalog.ts
|
|
14
14
|
import { readFileSync } from "fs";
|
|
@@ -373,6 +373,7 @@ function createConnectorAdapterProvider(options) {
|
|
|
373
373
|
const issued = now();
|
|
374
374
|
const issuedIso = issued.toISOString();
|
|
375
375
|
const expiresAt = typeof json.expires_in === "number" && json.expires_in > 0 ? new Date(issued.getTime() + json.expires_in * 1e3).toISOString() : void 0;
|
|
376
|
+
const capturedMetadata = captureTokenMetadata(auth.tokenMetadata, json, request.connectorId);
|
|
376
377
|
return {
|
|
377
378
|
id: randomConnectionId(),
|
|
378
379
|
owner: request.owner,
|
|
@@ -383,7 +384,7 @@ function createConnectorAdapterProvider(options) {
|
|
|
383
384
|
createdAt: issuedIso,
|
|
384
385
|
updatedAt: issuedIso,
|
|
385
386
|
expiresAt,
|
|
386
|
-
metadata: request.metadata
|
|
387
|
+
metadata: { ...request.metadata, ...capturedMetadata }
|
|
387
388
|
};
|
|
388
389
|
},
|
|
389
390
|
async invokeAction(connection, request) {
|
|
@@ -535,6 +536,27 @@ function oauthManifestAuth(auth) {
|
|
|
535
536
|
if (auth.kind !== "one_of") return void 0;
|
|
536
537
|
return auth.options.find((option) => option.kind === "oauth2");
|
|
537
538
|
}
|
|
539
|
+
function captureTokenMetadata(tokenMetadata, json, connectorId) {
|
|
540
|
+
if (!tokenMetadata) return {};
|
|
541
|
+
const captured = {};
|
|
542
|
+
for (const [metaKey, source] of Object.entries(tokenMetadata)) {
|
|
543
|
+
const field = typeof source === "string" ? source : source.field;
|
|
544
|
+
const required = typeof source === "string" ? false : source.required === true;
|
|
545
|
+
const raw = json[field];
|
|
546
|
+
const value = typeof raw === "string" ? raw.trim() : raw;
|
|
547
|
+
if (value === void 0 || value === null || value === "") {
|
|
548
|
+
if (required) {
|
|
549
|
+
throw new IntegrationError(
|
|
550
|
+
`OAuth token exchange for ${connectorId} did not return required field "${field}" for metadata.${metaKey}.`,
|
|
551
|
+
"provider_failure"
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
continue;
|
|
555
|
+
}
|
|
556
|
+
captured[metaKey] = String(value);
|
|
557
|
+
}
|
|
558
|
+
return captured;
|
|
559
|
+
}
|
|
538
560
|
function mapCategory(category) {
|
|
539
561
|
if (category === "comms") return "chat";
|
|
540
562
|
if (category === "spreadsheet") return "database";
|
|
@@ -4312,4 +4334,4 @@ export {
|
|
|
4312
4334
|
signCapability,
|
|
4313
4335
|
verifyCapabilityToken
|
|
4314
4336
|
};
|
|
4315
|
-
//# sourceMappingURL=chunk-
|
|
4337
|
+
//# sourceMappingURL=chunk-E6BBOBYT.js.map
|