@composio/core 0.1.36-next.4 → 0.1.36-next.6
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 +15 -16
- package/dist/index.d.cts +2186 -38
- package/dist/index.d.ts +2186 -38
- package/dist/index.js +15 -16
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1222,7 +1222,11 @@ var BaseSchemeRaw = z3.object({
|
|
|
1222
1222
|
// for ragic
|
|
1223
1223
|
server_location: z3.string().optional(),
|
|
1224
1224
|
// base_url only
|
|
1225
|
-
base_url: z3.string().optional()
|
|
1225
|
+
base_url: z3.string().optional(),
|
|
1226
|
+
// for api key
|
|
1227
|
+
api_key: z3.string().optional(),
|
|
1228
|
+
// for generic api key
|
|
1229
|
+
generic_api_key: z3.string().optional()
|
|
1226
1230
|
}).catchall(z3.unknown());
|
|
1227
1231
|
var Oauth2InitiatingConnectionDataSchema = BaseSchemeRaw.extend({
|
|
1228
1232
|
status: z3.literal(ConnectionStatuses.INITIALIZING)
|
|
@@ -1355,7 +1359,8 @@ var BasicInitiatingSchema = BaseSchemeRaw.extend({
|
|
|
1355
1359
|
var BasicConnectionDataSchema = BasicInitiatingSchema;
|
|
1356
1360
|
var ApiKeyInitiatingSchema = BaseSchemeRaw.extend({
|
|
1357
1361
|
status: z3.literal(ConnectionStatuses.ACTIVE),
|
|
1358
|
-
api_key: z3.string()
|
|
1362
|
+
api_key: z3.string().optional(),
|
|
1363
|
+
generic_api_key: z3.string().optional()
|
|
1359
1364
|
}).catchall(z3.unknown());
|
|
1360
1365
|
var ApiKeyConnectionDataSchema = ApiKeyInitiatingSchema;
|
|
1361
1366
|
var BearerTokenInitiatingSchema = BaseSchemeRaw.extend({
|
|
@@ -1555,7 +1560,7 @@ var ConnectedAccountListResponseSchema = z4.object({
|
|
|
1555
1560
|
|
|
1556
1561
|
// src/utils/transformers/connectedAccounts.ts
|
|
1557
1562
|
function transformConnectedAccountResponse(response) {
|
|
1558
|
-
const
|
|
1563
|
+
const responseToParse = {
|
|
1559
1564
|
...response,
|
|
1560
1565
|
authConfig: {
|
|
1561
1566
|
...response.auth_config,
|
|
@@ -1570,11 +1575,13 @@ function transformConnectedAccountResponse(response) {
|
|
|
1570
1575
|
createdAt: response.created_at,
|
|
1571
1576
|
updatedAt: response.updated_at,
|
|
1572
1577
|
testRequestEndpoint: response.test_request_endpoint
|
|
1573
|
-
}
|
|
1578
|
+
};
|
|
1579
|
+
const result = ConnectedAccountRetrieveResponseSchema.safeParse(responseToParse);
|
|
1574
1580
|
if (!result.success) {
|
|
1575
|
-
|
|
1581
|
+
logger_default.error("Failed to parse connected account retrieve response", {
|
|
1576
1582
|
cause: result.error
|
|
1577
1583
|
});
|
|
1584
|
+
return responseToParse;
|
|
1578
1585
|
}
|
|
1579
1586
|
return result.data;
|
|
1580
1587
|
}
|
|
@@ -3448,16 +3455,7 @@ var ConnectedAccounts = class {
|
|
|
3448
3455
|
`[Warn:AllowMultiple] Multiple connected accounts found for user ${userId} in auth config ${authConfigId}`
|
|
3449
3456
|
);
|
|
3450
3457
|
}
|
|
3451
|
-
|
|
3452
|
-
if (options?.config) {
|
|
3453
|
-
const connectionDataParsed = ConnectionDataSchema.safeParse(options.config);
|
|
3454
|
-
if (!connectionDataParsed.success) {
|
|
3455
|
-
throw new ValidationError("Failed to parse connection data", {
|
|
3456
|
-
cause: connectionDataParsed.error
|
|
3457
|
-
});
|
|
3458
|
-
}
|
|
3459
|
-
state = connectionDataParsed.data;
|
|
3460
|
-
}
|
|
3458
|
+
const state = options?.config ?? void 0;
|
|
3461
3459
|
const response = await this.client.connectedAccounts.create({
|
|
3462
3460
|
auth_config: {
|
|
3463
3461
|
id: authConfigId
|
|
@@ -3467,6 +3465,7 @@ var ConnectedAccounts = class {
|
|
|
3467
3465
|
user_id: userId,
|
|
3468
3466
|
state
|
|
3469
3467
|
}
|
|
3468
|
+
// @TODO: This is a temporary fix to allow api_key to be optional, in future ideally we should fix this from API side
|
|
3470
3469
|
});
|
|
3471
3470
|
const redirectUrl = typeof response.connectionData?.val?.redirectUrl === "string" ? response.connectionData.val.redirectUrl : null;
|
|
3472
3471
|
return createConnectionRequest(
|
|
@@ -5980,7 +5979,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5980
5979
|
};
|
|
5981
5980
|
|
|
5982
5981
|
// package.json
|
|
5983
|
-
var version = "0.1.36-next.
|
|
5982
|
+
var version = "0.1.36-next.6";
|
|
5984
5983
|
|
|
5985
5984
|
// src/models/Files.ts
|
|
5986
5985
|
var Files = class {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/core",
|
|
3
|
-
"version": "0.1.36-next.
|
|
3
|
+
"version": "0.1.36-next.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@composio/client": "0.1.0-alpha.25",
|
|
39
39
|
"@composio/json-schema-to-zod": "0.1.10-next.3",
|
|
40
40
|
"@types/json-schema": "^7.0.15",
|
|
41
|
-
"chalk": "^
|
|
41
|
+
"chalk": "^4.1.2",
|
|
42
42
|
"openai": "^4.94.0",
|
|
43
43
|
"pusher-js": "^8.4.0",
|
|
44
44
|
"semver": "^7.7.2",
|