@composio/core 0.1.15 → 0.1.16
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/index.cjs +586 -478
- package/dist/index.d.cts +9989 -245
- package/dist/index.d.ts +9989 -245
- package/dist/index.js +252 -207
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -878,11 +878,171 @@ var TelemetryService = class {
|
|
|
878
878
|
};
|
|
879
879
|
var telemetry = new TelemetryService();
|
|
880
880
|
|
|
881
|
+
// src/errors/AuthConfigErrors.ts
|
|
882
|
+
var AuthConfigErrorCodes = {
|
|
883
|
+
AUTH_CONFIG_NOT_FOUND: "AUTH_CONFIG_NOT_FOUND"
|
|
884
|
+
};
|
|
885
|
+
var ComposioAuthConfigNotFoundError = class extends ComposioError {
|
|
886
|
+
constructor(message = "Auth config not found", options = {}) {
|
|
887
|
+
super(message, {
|
|
888
|
+
...options,
|
|
889
|
+
code: AuthConfigErrorCodes.AUTH_CONFIG_NOT_FOUND,
|
|
890
|
+
possibleFixes: options.possibleFixes || [
|
|
891
|
+
"Check if the auth config exists",
|
|
892
|
+
"Check if the auth config id is correct",
|
|
893
|
+
"Check if the auth config is enabled"
|
|
894
|
+
]
|
|
895
|
+
});
|
|
896
|
+
this.name = "ComposioAuthConfigNotFoundError";
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
// src/errors/ConnectionRequestErrors.ts
|
|
901
|
+
var ConnectionRequestErrorCodes = {
|
|
902
|
+
CONNECTION_REQUEST_TIMEOUT: "CONNECTION_REQUEST_TIMEOUT",
|
|
903
|
+
CONNECTION_REQUEST_FAILED: "CONNECTION_REQUEST_FAILED"
|
|
904
|
+
};
|
|
905
|
+
var ConnectionRequestTimeoutError = class extends ComposioError {
|
|
906
|
+
constructor(message = "Connection request timed out", options = {}) {
|
|
907
|
+
super(message, {
|
|
908
|
+
...options,
|
|
909
|
+
code: ConnectionRequestErrorCodes.CONNECTION_REQUEST_TIMEOUT
|
|
910
|
+
});
|
|
911
|
+
this.name = "ConnectionRequestTimeoutError";
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
var ConnectionRequestFailedError = class extends ComposioError {
|
|
915
|
+
constructor(message = "Connection request failed", options = {}) {
|
|
916
|
+
super(message, {
|
|
917
|
+
...options,
|
|
918
|
+
code: ConnectionRequestErrorCodes.CONNECTION_REQUEST_FAILED
|
|
919
|
+
});
|
|
920
|
+
this.name = "ConnectionRequestFailedError";
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
// src/errors/ToolkitErrors.ts
|
|
925
|
+
var ToolkitErrorCodes = {
|
|
926
|
+
TOOLKIT_NOT_FOUND: "TOOLKIT_NOT_FOUND"
|
|
927
|
+
};
|
|
928
|
+
var ComposioToolkitNotFoundError = class extends ComposioError {
|
|
929
|
+
constructor(message = "Toolkit not found", options = {}) {
|
|
930
|
+
super(message, {
|
|
931
|
+
...options,
|
|
932
|
+
code: "TOOLKIT_NOT_FOUND",
|
|
933
|
+
possibleFixes: options.possibleFixes || [
|
|
934
|
+
"Ensure the toolkit is correctly configured and the slug is valid"
|
|
935
|
+
]
|
|
936
|
+
});
|
|
937
|
+
this.name = "ComposioToolkitNotFoundError";
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
var ComposioToolkitFetchError = class extends ComposioError {
|
|
941
|
+
constructor(message = "Failed to fetch toolkit", options = {}) {
|
|
942
|
+
super(message, {
|
|
943
|
+
...options,
|
|
944
|
+
code: "TOOLKIT_FETCH_ERROR",
|
|
945
|
+
possibleFixes: options.possibleFixes || [
|
|
946
|
+
"Ensure the toolkit slug is valid",
|
|
947
|
+
"Ensure you are using the correct API key",
|
|
948
|
+
"Ensure you are using the correct API endpoint / Base URL and it is working"
|
|
949
|
+
]
|
|
950
|
+
});
|
|
951
|
+
this.name = "ComposioToolkitFetchError";
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
// src/errors/ValidationErrors.ts
|
|
956
|
+
import { ZodError as ZodError2 } from "zod";
|
|
957
|
+
var ValidationErrorCodes = {
|
|
958
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
959
|
+
JSON_SCHEMA_TO_ZOD_ERROR: "JSON_SCHEMA_TO_ZOD_ERROR"
|
|
960
|
+
};
|
|
961
|
+
var ValidationError = class extends ComposioError {
|
|
962
|
+
constructor(message = "Input validation failed", options = {}) {
|
|
963
|
+
const { cause: providedZodError, ...restOptions } = options;
|
|
964
|
+
let zodErrorInstance;
|
|
965
|
+
if (providedZodError instanceof ZodError2) {
|
|
966
|
+
zodErrorInstance = providedZodError;
|
|
967
|
+
} else {
|
|
968
|
+
zodErrorInstance = new ZodError2([
|
|
969
|
+
{
|
|
970
|
+
path: [],
|
|
971
|
+
message: "Invalid input",
|
|
972
|
+
code: "custom"
|
|
973
|
+
}
|
|
974
|
+
]);
|
|
975
|
+
}
|
|
976
|
+
const issues = zodErrorInstance.issues.map(
|
|
977
|
+
(issue) => `[${issue.code}] ${issue.path.join(".")} - ${issue.message}`
|
|
978
|
+
);
|
|
979
|
+
super(message, {
|
|
980
|
+
...restOptions,
|
|
981
|
+
code: options.code || ValidationErrorCodes.VALIDATION_ERROR,
|
|
982
|
+
possibleFixes: issues,
|
|
983
|
+
cause: zodErrorInstance
|
|
984
|
+
});
|
|
985
|
+
this.name = "ValidationError";
|
|
986
|
+
const userFriendlyMessage = this.generateUserFriendlyMessage();
|
|
987
|
+
this.message = `${message}: ${userFriendlyMessage}`;
|
|
988
|
+
}
|
|
989
|
+
generateUserFriendlyMessage() {
|
|
990
|
+
if (this.cause instanceof ZodError2 && this.cause.issues.length > 0) {
|
|
991
|
+
const issue = this.cause.issues[0];
|
|
992
|
+
const path = issue.path.join(".");
|
|
993
|
+
const param = path || "parameter";
|
|
994
|
+
if (issue.code === "invalid_type") {
|
|
995
|
+
return `The ${param} should be a ${issue.expected}, but you provided a ${issue.received}`;
|
|
996
|
+
}
|
|
997
|
+
return issue.message;
|
|
998
|
+
}
|
|
999
|
+
return "Please check your input parameters";
|
|
1000
|
+
}
|
|
1001
|
+
};
|
|
1002
|
+
var JsonSchemaToZodError = class extends ComposioError {
|
|
1003
|
+
constructor(message = "Failed to convert JSON schema to Zod schema", options = {}) {
|
|
1004
|
+
super(message, {
|
|
1005
|
+
...options,
|
|
1006
|
+
code: options.code || ValidationErrorCodes.JSON_SCHEMA_TO_ZOD_ERROR
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
// src/errors/SDKErrors.ts
|
|
1012
|
+
var SDKErrorCodes = {
|
|
1013
|
+
NO_API_KEY_PROVIDED: "NO_API_KEY_PROVIDED"
|
|
1014
|
+
};
|
|
1015
|
+
var ComposioNoAPIKeyError = class extends ComposioError {
|
|
1016
|
+
constructor(message = "No Composio API key provided", options = {}) {
|
|
1017
|
+
const defaultCause = "Couldn't find an API key in the params, environment variables or in the user config file";
|
|
1018
|
+
super(message, {
|
|
1019
|
+
...options,
|
|
1020
|
+
code: "NO_API_KEY",
|
|
1021
|
+
cause: options.cause || defaultCause,
|
|
1022
|
+
possibleFixes: options.possibleFixes || [
|
|
1023
|
+
"Ensure you have an API key passed in the params, or in environment variable (COMPOSIO_API_KEY) or in the user config file",
|
|
1024
|
+
"To get an API key, please sign up at https://composio.dev/signup",
|
|
1025
|
+
"You can also use the Composio CLI to create a project and get an API key"
|
|
1026
|
+
],
|
|
1027
|
+
statusCode: 401
|
|
1028
|
+
});
|
|
1029
|
+
this.name = "ComposioNoAPIKeyError";
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
|
|
881
1033
|
// src/types/connectedAccounts.types.ts
|
|
882
1034
|
import { z as z3 } from "zod";
|
|
883
1035
|
|
|
884
1036
|
// src/types/connectedAccountAuthStates.types.ts
|
|
885
1037
|
import { z as z2 } from "zod";
|
|
1038
|
+
var ConnectionStatusEnum = /* @__PURE__ */ ((ConnectionStatusEnum2) => {
|
|
1039
|
+
ConnectionStatusEnum2["INITIALIZING"] = "INITIALIZING";
|
|
1040
|
+
ConnectionStatusEnum2["INITIATED"] = "INITIATED";
|
|
1041
|
+
ConnectionStatusEnum2["ACTIVE"] = "ACTIVE";
|
|
1042
|
+
ConnectionStatusEnum2["FAILED"] = "FAILED";
|
|
1043
|
+
ConnectionStatusEnum2["EXPIRED"] = "EXPIRED";
|
|
1044
|
+
return ConnectionStatusEnum2;
|
|
1045
|
+
})(ConnectionStatusEnum || {});
|
|
886
1046
|
var AUTH_MODES_ENUM = {
|
|
887
1047
|
OAUTH2: "OAUTH2",
|
|
888
1048
|
OAUTH1: "OAUTH1",
|
|
@@ -1395,157 +1555,31 @@ var ConnectedAccountListResponseSchema = z3.object({
|
|
|
1395
1555
|
totalPages: z3.number().describe("The total number of pages of connected accounts")
|
|
1396
1556
|
});
|
|
1397
1557
|
|
|
1398
|
-
// src/
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
};
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
CONNECTION_REQUEST_TIMEOUT: "CONNECTION_REQUEST_TIMEOUT",
|
|
1420
|
-
CONNECTION_REQUEST_FAILED: "CONNECTION_REQUEST_FAILED"
|
|
1421
|
-
};
|
|
1422
|
-
var ConnectionRequestTimeoutError = class extends ComposioError {
|
|
1423
|
-
constructor(message = "Connection request timed out", options = {}) {
|
|
1424
|
-
super(message, {
|
|
1425
|
-
...options,
|
|
1426
|
-
code: ConnectionRequestErrorCodes.CONNECTION_REQUEST_TIMEOUT
|
|
1427
|
-
});
|
|
1428
|
-
this.name = "ConnectionRequestTimeoutError";
|
|
1429
|
-
}
|
|
1430
|
-
};
|
|
1431
|
-
var ConnectionRequestFailedError = class extends ComposioError {
|
|
1432
|
-
constructor(message = "Connection request failed", options = {}) {
|
|
1433
|
-
super(message, {
|
|
1434
|
-
...options,
|
|
1435
|
-
code: ConnectionRequestErrorCodes.CONNECTION_REQUEST_FAILED
|
|
1436
|
-
});
|
|
1437
|
-
this.name = "ConnectionRequestFailedError";
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
|
-
|
|
1441
|
-
// src/errors/ToolkitErrors.ts
|
|
1442
|
-
var ToolkitErrorCodes = {
|
|
1443
|
-
TOOLKIT_NOT_FOUND: "TOOLKIT_NOT_FOUND"
|
|
1444
|
-
};
|
|
1445
|
-
var ComposioToolkitNotFoundError = class extends ComposioError {
|
|
1446
|
-
constructor(message = "Toolkit not found", options = {}) {
|
|
1447
|
-
super(message, {
|
|
1448
|
-
...options,
|
|
1449
|
-
code: "TOOLKIT_NOT_FOUND",
|
|
1450
|
-
possibleFixes: options.possibleFixes || [
|
|
1451
|
-
"Ensure the toolkit is correctly configured and the slug is valid"
|
|
1452
|
-
]
|
|
1453
|
-
});
|
|
1454
|
-
this.name = "ComposioToolkitNotFoundError";
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
var ComposioToolkitFetchError = class extends ComposioError {
|
|
1458
|
-
constructor(message = "Failed to fetch toolkit", options = {}) {
|
|
1459
|
-
super(message, {
|
|
1460
|
-
...options,
|
|
1461
|
-
code: "TOOLKIT_FETCH_ERROR",
|
|
1462
|
-
possibleFixes: options.possibleFixes || [
|
|
1463
|
-
"Ensure the toolkit slug is valid",
|
|
1464
|
-
"Ensure you are using the correct API key",
|
|
1465
|
-
"Ensure you are using the correct API endpoint / Base URL and it is working"
|
|
1466
|
-
]
|
|
1467
|
-
});
|
|
1468
|
-
this.name = "ComposioToolkitFetchError";
|
|
1469
|
-
}
|
|
1470
|
-
};
|
|
1471
|
-
|
|
1472
|
-
// src/errors/ValidationErrors.ts
|
|
1473
|
-
import { ZodError as ZodError2 } from "zod";
|
|
1474
|
-
var ValidationErrorCodes = {
|
|
1475
|
-
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
1476
|
-
JSON_SCHEMA_TO_ZOD_ERROR: "JSON_SCHEMA_TO_ZOD_ERROR"
|
|
1477
|
-
};
|
|
1478
|
-
var ValidationError = class extends ComposioError {
|
|
1479
|
-
constructor(message = "Input validation failed", options = {}) {
|
|
1480
|
-
const { cause: providedZodError, ...restOptions } = options;
|
|
1481
|
-
let zodErrorInstance;
|
|
1482
|
-
if (providedZodError instanceof ZodError2) {
|
|
1483
|
-
zodErrorInstance = providedZodError;
|
|
1484
|
-
} else {
|
|
1485
|
-
zodErrorInstance = new ZodError2([
|
|
1486
|
-
{
|
|
1487
|
-
path: [],
|
|
1488
|
-
message: "Invalid input",
|
|
1489
|
-
code: "custom"
|
|
1490
|
-
}
|
|
1491
|
-
]);
|
|
1492
|
-
}
|
|
1493
|
-
const issues = zodErrorInstance.issues.map(
|
|
1494
|
-
(issue) => `[${issue.code}] ${issue.path.join(".")} - ${issue.message}`
|
|
1495
|
-
);
|
|
1496
|
-
super(message, {
|
|
1497
|
-
...restOptions,
|
|
1498
|
-
code: options.code || ValidationErrorCodes.VALIDATION_ERROR,
|
|
1499
|
-
possibleFixes: issues,
|
|
1500
|
-
cause: zodErrorInstance
|
|
1501
|
-
});
|
|
1502
|
-
this.name = "ValidationError";
|
|
1503
|
-
const userFriendlyMessage = this.generateUserFriendlyMessage();
|
|
1504
|
-
this.message = `${message}: ${userFriendlyMessage}`;
|
|
1505
|
-
}
|
|
1506
|
-
generateUserFriendlyMessage() {
|
|
1507
|
-
if (this.cause instanceof ZodError2 && this.cause.issues.length > 0) {
|
|
1508
|
-
const issue = this.cause.issues[0];
|
|
1509
|
-
const path = issue.path.join(".");
|
|
1510
|
-
const param = path || "parameter";
|
|
1511
|
-
if (issue.code === "invalid_type") {
|
|
1512
|
-
return `The ${param} should be a ${issue.expected}, but you provided a ${issue.received}`;
|
|
1513
|
-
}
|
|
1514
|
-
return issue.message;
|
|
1515
|
-
}
|
|
1516
|
-
return "Please check your input parameters";
|
|
1517
|
-
}
|
|
1518
|
-
};
|
|
1519
|
-
var JsonSchemaToZodError = class extends ComposioError {
|
|
1520
|
-
constructor(message = "Failed to convert JSON schema to Zod schema", options = {}) {
|
|
1521
|
-
super(message, {
|
|
1522
|
-
...options,
|
|
1523
|
-
code: options.code || ValidationErrorCodes.JSON_SCHEMA_TO_ZOD_ERROR
|
|
1524
|
-
});
|
|
1525
|
-
}
|
|
1526
|
-
};
|
|
1527
|
-
|
|
1528
|
-
// src/errors/SDKErrors.ts
|
|
1529
|
-
var SDKErrorCodes = {
|
|
1530
|
-
NO_API_KEY_PROVIDED: "NO_API_KEY_PROVIDED"
|
|
1531
|
-
};
|
|
1532
|
-
var ComposioNoAPIKeyError = class extends ComposioError {
|
|
1533
|
-
constructor(message = "No Composio API key provided", options = {}) {
|
|
1534
|
-
const defaultCause = "Couldn't find an API key in the params, environment variables or in the user config file";
|
|
1535
|
-
super(message, {
|
|
1536
|
-
...options,
|
|
1537
|
-
code: "NO_API_KEY",
|
|
1538
|
-
cause: options.cause || defaultCause,
|
|
1539
|
-
possibleFixes: options.possibleFixes || [
|
|
1540
|
-
"Ensure you have an API key passed in the params, or in environment variable (COMPOSIO_API_KEY) or in the user config file",
|
|
1541
|
-
"To get an API key, please sign up at https://composio.dev/signup",
|
|
1542
|
-
"You can also use the Composio CLI to create a project and get an API key"
|
|
1543
|
-
],
|
|
1544
|
-
statusCode: 401
|
|
1558
|
+
// src/utils/transformers/connectedAccounts.ts
|
|
1559
|
+
function transformConnectedAccountResponse(response) {
|
|
1560
|
+
const result = ConnectedAccountRetrieveResponseSchema.safeParse({
|
|
1561
|
+
...response,
|
|
1562
|
+
authConfig: {
|
|
1563
|
+
...response.auth_config,
|
|
1564
|
+
id: response.auth_config.id,
|
|
1565
|
+
isComposioManaged: response.auth_config.is_composio_managed,
|
|
1566
|
+
isDisabled: response.auth_config.is_disabled
|
|
1567
|
+
},
|
|
1568
|
+
state: response.state,
|
|
1569
|
+
status: response.status,
|
|
1570
|
+
statusReason: response.status_reason,
|
|
1571
|
+
isDisabled: response.is_disabled,
|
|
1572
|
+
createdAt: response.created_at,
|
|
1573
|
+
updatedAt: response.updated_at,
|
|
1574
|
+
testRequestEndpoint: response.test_request_endpoint
|
|
1575
|
+
});
|
|
1576
|
+
if (!result.success) {
|
|
1577
|
+
throw new ValidationError("Failed to parse connected account retrieve response", {
|
|
1578
|
+
cause: result.error
|
|
1545
1579
|
});
|
|
1546
|
-
this.name = "ComposioNoAPIKeyError";
|
|
1547
1580
|
}
|
|
1548
|
-
|
|
1581
|
+
return result.data;
|
|
1582
|
+
}
|
|
1549
1583
|
|
|
1550
1584
|
// src/models/CustomTools.ts
|
|
1551
1585
|
var CustomTools = class {
|
|
@@ -1709,35 +1743,7 @@ var CustomTools = class {
|
|
|
1709
1743
|
`Connected account not found for toolkit ${toolkitSlug} for user ${userId}`
|
|
1710
1744
|
);
|
|
1711
1745
|
}
|
|
1712
|
-
|
|
1713
|
-
id: connectedAccount.id,
|
|
1714
|
-
authConfig: {
|
|
1715
|
-
id: connectedAccount.auth_config.id,
|
|
1716
|
-
authScheme: connectedAccount.auth_config.auth_scheme,
|
|
1717
|
-
isComposioManaged: connectedAccount.auth_config.is_composio_managed,
|
|
1718
|
-
isDisabled: connectedAccount.auth_config.is_disabled
|
|
1719
|
-
},
|
|
1720
|
-
userId: connectedAccount.user_id,
|
|
1721
|
-
data: connectedAccount.data || {},
|
|
1722
|
-
status: connectedAccount.status,
|
|
1723
|
-
statusReason: connectedAccount.status_reason,
|
|
1724
|
-
toolkit: {
|
|
1725
|
-
slug: connectedAccount.toolkit.slug
|
|
1726
|
-
},
|
|
1727
|
-
testRequestEndpoint: connectedAccount.test_request_endpoint,
|
|
1728
|
-
isDisabled: connectedAccount.is_disabled,
|
|
1729
|
-
createdAt: connectedAccount.created_at,
|
|
1730
|
-
updatedAt: connectedAccount.updated_at
|
|
1731
|
-
});
|
|
1732
|
-
if (!connectedAccountResponse.success) {
|
|
1733
|
-
throw new ValidationError(
|
|
1734
|
-
`Validation error for connected account of ${toolkitSlug} for user ${userId}`,
|
|
1735
|
-
{
|
|
1736
|
-
cause: connectedAccountResponse.error
|
|
1737
|
-
}
|
|
1738
|
-
);
|
|
1739
|
-
}
|
|
1740
|
-
return connectedAccountResponse.data;
|
|
1746
|
+
return transformConnectedAccountResponse(connectedAccount);
|
|
1741
1747
|
}
|
|
1742
1748
|
/**
|
|
1743
1749
|
* Execute a custom tool
|
|
@@ -2925,34 +2931,6 @@ var AuthConfigs = class {
|
|
|
2925
2931
|
|
|
2926
2932
|
// src/models/ConnectionRequest.ts
|
|
2927
2933
|
import ComposioClient from "@composio/client";
|
|
2928
|
-
|
|
2929
|
-
// src/utils/transformers/connectedAccounts.ts
|
|
2930
|
-
function transformConnectedAccountResponse(response) {
|
|
2931
|
-
const result = ConnectedAccountRetrieveResponseSchema.safeParse({
|
|
2932
|
-
...response,
|
|
2933
|
-
authConfig: {
|
|
2934
|
-
...response.auth_config,
|
|
2935
|
-
id: response.auth_config.id,
|
|
2936
|
-
isComposioManaged: response.auth_config.is_composio_managed,
|
|
2937
|
-
isDisabled: response.auth_config.is_disabled
|
|
2938
|
-
},
|
|
2939
|
-
state: response.state,
|
|
2940
|
-
status: response.status,
|
|
2941
|
-
statusReason: response.status_reason,
|
|
2942
|
-
isDisabled: response.is_disabled,
|
|
2943
|
-
createdAt: response.created_at,
|
|
2944
|
-
updatedAt: response.updated_at,
|
|
2945
|
-
testRequestEndpoint: response.test_request_endpoint
|
|
2946
|
-
});
|
|
2947
|
-
if (!result.success) {
|
|
2948
|
-
throw new ValidationError("Failed to parse connected account retrieve response", {
|
|
2949
|
-
cause: result.error
|
|
2950
|
-
});
|
|
2951
|
-
}
|
|
2952
|
-
return result.data;
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
// src/models/ConnectionRequest.ts
|
|
2956
2934
|
var ConnectionRequest = class {
|
|
2957
2935
|
client;
|
|
2958
2936
|
id;
|
|
@@ -3520,6 +3498,10 @@ var Toolkits = class {
|
|
|
3520
3498
|
|
|
3521
3499
|
// src/types/triggers.types.ts
|
|
3522
3500
|
import { z as z6 } from "zod";
|
|
3501
|
+
var TriggerStatuses = {
|
|
3502
|
+
ENABLE: "enable",
|
|
3503
|
+
DISABLE: "disable"
|
|
3504
|
+
};
|
|
3523
3505
|
var TriggerStatusEnum = z6.enum(["enable", "disable"]);
|
|
3524
3506
|
var TriggerSubscribeParamSchema = z6.object({
|
|
3525
3507
|
toolkits: z6.array(z6.string()).optional(),
|
|
@@ -4693,7 +4675,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
4693
4675
|
};
|
|
4694
4676
|
|
|
4695
4677
|
// package.json
|
|
4696
|
-
var version = "0.1.
|
|
4678
|
+
var version = "0.1.16";
|
|
4697
4679
|
|
|
4698
4680
|
// src/composio.ts
|
|
4699
4681
|
var Composio = class _Composio {
|
|
@@ -4872,12 +4854,22 @@ var ConsoleTelemetryTransport = class {
|
|
|
4872
4854
|
}
|
|
4873
4855
|
};
|
|
4874
4856
|
export {
|
|
4857
|
+
AUTH_MODES_ENUM,
|
|
4875
4858
|
AuthConfigErrorCodes,
|
|
4859
|
+
AuthConfigListParamsSchema,
|
|
4860
|
+
AuthConfigListResponseSchema,
|
|
4861
|
+
AuthConfigRetrieveResponseSchema,
|
|
4876
4862
|
AuthConfigTypes,
|
|
4863
|
+
AuthConfigUpdateParamsSchema,
|
|
4864
|
+
AuthCustomConfigUpdateParamsSchema,
|
|
4865
|
+
AuthDefaultConfigUpdateParamsSchema,
|
|
4866
|
+
AuthSchemeEnum,
|
|
4877
4867
|
AuthSchemeTypes,
|
|
4878
4868
|
BaseAgenticProvider,
|
|
4879
4869
|
BaseNonAgenticProvider,
|
|
4880
4870
|
BaseTelemetryTransport,
|
|
4871
|
+
BasicWithJwtConnectionDataSchema,
|
|
4872
|
+
BillcomAuthConnectionDataSchema,
|
|
4881
4873
|
Composio,
|
|
4882
4874
|
ComposioAuthConfigNotFoundError,
|
|
4883
4875
|
ComposioConnectedAccountNotFoundError,
|
|
@@ -4886,6 +4878,7 @@ export {
|
|
|
4886
4878
|
ComposioGlobalExecuteToolFnNotSetError,
|
|
4887
4879
|
ComposioInvalidExecuteFunctionError,
|
|
4888
4880
|
ComposioInvalidModifierError,
|
|
4881
|
+
ComposioLinkConnectionDataSchema,
|
|
4889
4882
|
ComposioNoAPIKeyError,
|
|
4890
4883
|
ComposioProvider,
|
|
4891
4884
|
ComposioProviderNotDefinedError,
|
|
@@ -4894,16 +4887,68 @@ export {
|
|
|
4894
4887
|
ComposioToolkitFetchError,
|
|
4895
4888
|
ComposioToolkitNotFoundError,
|
|
4896
4889
|
ConnectedAccountErrorCodes,
|
|
4890
|
+
ConnectionDataSchema,
|
|
4897
4891
|
ConnectionRequestErrorCodes,
|
|
4898
4892
|
ConnectionRequestFailedError,
|
|
4899
4893
|
ConnectionRequestTimeoutError,
|
|
4894
|
+
ConnectionStatusEnum,
|
|
4900
4895
|
ConsoleTelemetryTransport,
|
|
4896
|
+
CreateAuthConfigParamsSchema,
|
|
4897
|
+
CreateAuthConfigResponseSchema,
|
|
4898
|
+
CreateComposioManagedAuthConfigParamsSchema,
|
|
4899
|
+
CreateCustomAuthConfigParamsSchema,
|
|
4900
|
+
CustomAuthParamsSchema,
|
|
4901
|
+
IncomingTriggerPayloadSchema,
|
|
4901
4902
|
JsonSchemaToZodError,
|
|
4903
|
+
Oauth1ActiveConnectionDataSchema,
|
|
4904
|
+
Oauth1ConnectionDataSchema,
|
|
4905
|
+
Oauth1ExpiredConnectionDataSchema,
|
|
4906
|
+
Oauth1FailedConnectionDataSchema,
|
|
4907
|
+
Oauth1InitiatedConnectionDataSchema,
|
|
4908
|
+
Oauth1InitiatingConnectionDataSchema,
|
|
4909
|
+
Oauth2ActiveConnectionDataSchema,
|
|
4910
|
+
Oauth2ConnectionDataSchema,
|
|
4911
|
+
Oauth2ExpiredConnectionDataSchema,
|
|
4912
|
+
Oauth2FailedConnectionDataSchema,
|
|
4913
|
+
Oauth2InitiatedConnectionDataSchema,
|
|
4914
|
+
Oauth2InitiatingConnectionDataSchema,
|
|
4902
4915
|
OpenAIProvider,
|
|
4916
|
+
RedirectableAuthSchemeSchema,
|
|
4903
4917
|
SDKErrorCodes,
|
|
4904
4918
|
ToolErrorCodes,
|
|
4919
|
+
ToolExecuteParamsSchema,
|
|
4920
|
+
ToolExecuteResponseSchema,
|
|
4921
|
+
ToolKitItemSchema,
|
|
4922
|
+
ToolKitListResponseSchema,
|
|
4923
|
+
ToolKitMetaSchema,
|
|
4924
|
+
ToolListFilterBySearchSchema,
|
|
4925
|
+
ToolListFilterByToolkitsSchema,
|
|
4926
|
+
ToolListFilterByToolsSchema,
|
|
4905
4927
|
ToolListParamsSchema,
|
|
4928
|
+
ToolListResponseSchema,
|
|
4929
|
+
ToolProxyParamsSchema,
|
|
4930
|
+
ToolSchema,
|
|
4931
|
+
ToolkitAuthConfigDetailsSchema,
|
|
4932
|
+
ToolkitAuthFieldSchema,
|
|
4933
|
+
ToolkitCategorySchema,
|
|
4906
4934
|
ToolkitErrorCodes,
|
|
4935
|
+
ToolkitMangedByEnumSchema,
|
|
4936
|
+
ToolkitRetrieveCategoriesResponseSchema,
|
|
4937
|
+
ToolkitRetrieveResponseSchema,
|
|
4938
|
+
ToolkitSchema,
|
|
4939
|
+
ToolkitSortByEnumSchema,
|
|
4940
|
+
ToolkitsListParamsSchema,
|
|
4941
|
+
TriggerInstanceListActiveParamsSchema,
|
|
4942
|
+
TriggerInstanceListActiveResponseItemSchema,
|
|
4943
|
+
TriggerInstanceListActiveResponseSchema,
|
|
4944
|
+
TriggerInstanceManageDeleteResponseSchema,
|
|
4945
|
+
TriggerInstanceManageUpdateParamsSchema,
|
|
4946
|
+
TriggerInstanceManageUpdateResponseSchema,
|
|
4947
|
+
TriggerInstanceUpsertParamsSchema,
|
|
4948
|
+
TriggerInstanceUpsertResponseSchema,
|
|
4949
|
+
TriggerStatusEnum,
|
|
4950
|
+
TriggerStatuses,
|
|
4951
|
+
TriggerSubscribeParamSchema,
|
|
4907
4952
|
ValidationError,
|
|
4908
4953
|
ValidationErrorCodes,
|
|
4909
4954
|
jsonSchemaToZodSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@composio/json-schema-to-zod": "0.1.1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@composio/client": "0.1.0-alpha.
|
|
34
|
-
"@composio/json-schema-to-zod": "0.1.
|
|
33
|
+
"@composio/client": "0.1.0-alpha.17",
|
|
34
|
+
"@composio/json-schema-to-zod": "0.1.2",
|
|
35
35
|
"chalk": "^5.4.1",
|
|
36
36
|
"openai": "^4.94.0",
|
|
37
37
|
"pusher-js": "^8.4.0",
|