@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.cjs
CHANGED
|
@@ -1383,7 +1383,11 @@ var BaseSchemeRaw = import_zod5.z.object({
|
|
|
1383
1383
|
// for ragic
|
|
1384
1384
|
server_location: import_zod5.z.string().optional(),
|
|
1385
1385
|
// base_url only
|
|
1386
|
-
base_url: import_zod5.z.string().optional()
|
|
1386
|
+
base_url: import_zod5.z.string().optional(),
|
|
1387
|
+
// for api key
|
|
1388
|
+
api_key: import_zod5.z.string().optional(),
|
|
1389
|
+
// for generic api key
|
|
1390
|
+
generic_api_key: import_zod5.z.string().optional()
|
|
1387
1391
|
}).catchall(import_zod5.z.unknown());
|
|
1388
1392
|
var Oauth2InitiatingConnectionDataSchema = BaseSchemeRaw.extend({
|
|
1389
1393
|
status: import_zod5.z.literal(ConnectionStatuses.INITIALIZING)
|
|
@@ -1516,7 +1520,8 @@ var BasicInitiatingSchema = BaseSchemeRaw.extend({
|
|
|
1516
1520
|
var BasicConnectionDataSchema = BasicInitiatingSchema;
|
|
1517
1521
|
var ApiKeyInitiatingSchema = BaseSchemeRaw.extend({
|
|
1518
1522
|
status: import_zod5.z.literal(ConnectionStatuses.ACTIVE),
|
|
1519
|
-
api_key: import_zod5.z.string()
|
|
1523
|
+
api_key: import_zod5.z.string().optional(),
|
|
1524
|
+
generic_api_key: import_zod5.z.string().optional()
|
|
1520
1525
|
}).catchall(import_zod5.z.unknown());
|
|
1521
1526
|
var ApiKeyConnectionDataSchema = ApiKeyInitiatingSchema;
|
|
1522
1527
|
var BearerTokenInitiatingSchema = BaseSchemeRaw.extend({
|
|
@@ -1716,7 +1721,7 @@ var ConnectedAccountListResponseSchema = import_zod6.z.object({
|
|
|
1716
1721
|
|
|
1717
1722
|
// src/utils/transformers/connectedAccounts.ts
|
|
1718
1723
|
function transformConnectedAccountResponse(response) {
|
|
1719
|
-
const
|
|
1724
|
+
const responseToParse = {
|
|
1720
1725
|
...response,
|
|
1721
1726
|
authConfig: {
|
|
1722
1727
|
...response.auth_config,
|
|
@@ -1731,11 +1736,13 @@ function transformConnectedAccountResponse(response) {
|
|
|
1731
1736
|
createdAt: response.created_at,
|
|
1732
1737
|
updatedAt: response.updated_at,
|
|
1733
1738
|
testRequestEndpoint: response.test_request_endpoint
|
|
1734
|
-
}
|
|
1739
|
+
};
|
|
1740
|
+
const result = ConnectedAccountRetrieveResponseSchema.safeParse(responseToParse);
|
|
1735
1741
|
if (!result.success) {
|
|
1736
|
-
|
|
1742
|
+
logger_default.error("Failed to parse connected account retrieve response", {
|
|
1737
1743
|
cause: result.error
|
|
1738
1744
|
});
|
|
1745
|
+
return responseToParse;
|
|
1739
1746
|
}
|
|
1740
1747
|
return result.data;
|
|
1741
1748
|
}
|
|
@@ -3609,16 +3616,7 @@ var ConnectedAccounts = class {
|
|
|
3609
3616
|
`[Warn:AllowMultiple] Multiple connected accounts found for user ${userId} in auth config ${authConfigId}`
|
|
3610
3617
|
);
|
|
3611
3618
|
}
|
|
3612
|
-
|
|
3613
|
-
if (options?.config) {
|
|
3614
|
-
const connectionDataParsed = ConnectionDataSchema.safeParse(options.config);
|
|
3615
|
-
if (!connectionDataParsed.success) {
|
|
3616
|
-
throw new ValidationError("Failed to parse connection data", {
|
|
3617
|
-
cause: connectionDataParsed.error
|
|
3618
|
-
});
|
|
3619
|
-
}
|
|
3620
|
-
state = connectionDataParsed.data;
|
|
3621
|
-
}
|
|
3619
|
+
const state = options?.config ?? void 0;
|
|
3622
3620
|
const response = await this.client.connectedAccounts.create({
|
|
3623
3621
|
auth_config: {
|
|
3624
3622
|
id: authConfigId
|
|
@@ -3628,6 +3626,7 @@ var ConnectedAccounts = class {
|
|
|
3628
3626
|
user_id: userId,
|
|
3629
3627
|
state
|
|
3630
3628
|
}
|
|
3629
|
+
// @TODO: This is a temporary fix to allow api_key to be optional, in future ideally we should fix this from API side
|
|
3631
3630
|
});
|
|
3632
3631
|
const redirectUrl = typeof response.connectionData?.val?.redirectUrl === "string" ? response.connectionData.val.redirectUrl : null;
|
|
3633
3632
|
return createConnectionRequest(
|
|
@@ -6141,7 +6140,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
6141
6140
|
};
|
|
6142
6141
|
|
|
6143
6142
|
// package.json
|
|
6144
|
-
var version = "0.1.36-next.
|
|
6143
|
+
var version = "0.1.36-next.6";
|
|
6145
6144
|
|
|
6146
6145
|
// src/models/Files.ts
|
|
6147
6146
|
var Files = class {
|