@composio/core 0.1.11-alpha.0 → 0.1.12-alpha.2
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 +10 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -12
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1397,13 +1397,13 @@ var ConnectionRequestFailedError = class extends ComposioError {
|
|
|
1397
1397
|
// src/models/ConnectionRequest.ts
|
|
1398
1398
|
var ConnectionRequest = class {
|
|
1399
1399
|
client;
|
|
1400
|
-
|
|
1401
|
-
|
|
1400
|
+
id;
|
|
1401
|
+
status;
|
|
1402
1402
|
redirectUrl;
|
|
1403
1403
|
constructor(client, connectedAccountId, connectedAccountStatus, redirectUrl) {
|
|
1404
1404
|
this.client = client;
|
|
1405
|
-
this.
|
|
1406
|
-
this.
|
|
1405
|
+
this.id = connectedAccountId;
|
|
1406
|
+
this.status = connectedAccountStatus;
|
|
1407
1407
|
this.redirectUrl = redirectUrl;
|
|
1408
1408
|
}
|
|
1409
1409
|
/**
|
|
@@ -1445,8 +1445,8 @@ var ConnectionRequest = class {
|
|
|
1445
1445
|
* @returns
|
|
1446
1446
|
*/
|
|
1447
1447
|
async waitForConnection(timeout = 6e4) {
|
|
1448
|
-
if (this.
|
|
1449
|
-
const response = await this.client.connectedAccounts.retrieve(this.
|
|
1448
|
+
if (this.status === ConnectedAccountStatuses.ACTIVE) {
|
|
1449
|
+
const response = await this.client.connectedAccounts.retrieve(this.id);
|
|
1450
1450
|
return this.transformResponse(response);
|
|
1451
1451
|
}
|
|
1452
1452
|
const terminalErrorStates = [
|
|
@@ -1458,7 +1458,7 @@ var ConnectionRequest = class {
|
|
|
1458
1458
|
const pollInterval = 1e3;
|
|
1459
1459
|
while (Date.now() - start < timeout) {
|
|
1460
1460
|
try {
|
|
1461
|
-
const response = await this.client.connectedAccounts.retrieve(this.
|
|
1461
|
+
const response = await this.client.connectedAccounts.retrieve(this.id);
|
|
1462
1462
|
if (response.status === ConnectedAccountStatuses.ACTIVE) {
|
|
1463
1463
|
return this.transformResponse(response);
|
|
1464
1464
|
}
|
|
@@ -1467,7 +1467,7 @@ var ConnectionRequest = class {
|
|
|
1467
1467
|
`Connection request failed with status: ${response.status}${response.status_reason ? `, reason: ${response.status_reason}` : ""}`,
|
|
1468
1468
|
{
|
|
1469
1469
|
userId: response.user_id,
|
|
1470
|
-
connectedAccountId: this.
|
|
1470
|
+
connectedAccountId: this.id,
|
|
1471
1471
|
status: response.status,
|
|
1472
1472
|
statusReason: response.status_reason
|
|
1473
1473
|
}
|
|
@@ -1478,9 +1478,7 @@ var ConnectionRequest = class {
|
|
|
1478
1478
|
throw error;
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
|
-
throw new ConnectionRequestTimeoutError(
|
|
1482
|
-
`Connection request timed out for ${this.connectedAccountId}`
|
|
1483
|
-
);
|
|
1481
|
+
throw new ConnectionRequestTimeoutError(`Connection request timed out for ${this.id}`);
|
|
1484
1482
|
}
|
|
1485
1483
|
};
|
|
1486
1484
|
|
|
@@ -2465,7 +2463,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
2465
2463
|
};
|
|
2466
2464
|
|
|
2467
2465
|
// package.json
|
|
2468
|
-
var version = "0.1.
|
|
2466
|
+
var version = "0.1.12-alpha.0";
|
|
2469
2467
|
|
|
2470
2468
|
// src/utils/uuid.ts
|
|
2471
2469
|
var import_uuid = require("uuid");
|
package/dist/index.d.cts
CHANGED
|
@@ -1276,8 +1276,8 @@ type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveR
|
|
|
1276
1276
|
|
|
1277
1277
|
declare class ConnectionRequest {
|
|
1278
1278
|
private client;
|
|
1279
|
-
|
|
1280
|
-
|
|
1279
|
+
id: string;
|
|
1280
|
+
status: ConnectedAccountStatus;
|
|
1281
1281
|
redirectUrl?: string | null;
|
|
1282
1282
|
constructor(client: ComposioClient, connectedAccountId: string, connectedAccountStatus: ConnectedAccountStatus, redirectUrl?: string | null);
|
|
1283
1283
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1276,8 +1276,8 @@ type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveR
|
|
|
1276
1276
|
|
|
1277
1277
|
declare class ConnectionRequest {
|
|
1278
1278
|
private client;
|
|
1279
|
-
|
|
1280
|
-
|
|
1279
|
+
id: string;
|
|
1280
|
+
status: ConnectedAccountStatus;
|
|
1281
1281
|
redirectUrl?: string | null;
|
|
1282
1282
|
constructor(client: ComposioClient, connectedAccountId: string, connectedAccountStatus: ConnectedAccountStatus, redirectUrl?: string | null);
|
|
1283
1283
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1359,13 +1359,13 @@ var ConnectionRequestFailedError = class extends ComposioError {
|
|
|
1359
1359
|
// src/models/ConnectionRequest.ts
|
|
1360
1360
|
var ConnectionRequest = class {
|
|
1361
1361
|
client;
|
|
1362
|
-
|
|
1363
|
-
|
|
1362
|
+
id;
|
|
1363
|
+
status;
|
|
1364
1364
|
redirectUrl;
|
|
1365
1365
|
constructor(client, connectedAccountId, connectedAccountStatus, redirectUrl) {
|
|
1366
1366
|
this.client = client;
|
|
1367
|
-
this.
|
|
1368
|
-
this.
|
|
1367
|
+
this.id = connectedAccountId;
|
|
1368
|
+
this.status = connectedAccountStatus;
|
|
1369
1369
|
this.redirectUrl = redirectUrl;
|
|
1370
1370
|
}
|
|
1371
1371
|
/**
|
|
@@ -1407,8 +1407,8 @@ var ConnectionRequest = class {
|
|
|
1407
1407
|
* @returns
|
|
1408
1408
|
*/
|
|
1409
1409
|
async waitForConnection(timeout = 6e4) {
|
|
1410
|
-
if (this.
|
|
1411
|
-
const response = await this.client.connectedAccounts.retrieve(this.
|
|
1410
|
+
if (this.status === ConnectedAccountStatuses.ACTIVE) {
|
|
1411
|
+
const response = await this.client.connectedAccounts.retrieve(this.id);
|
|
1412
1412
|
return this.transformResponse(response);
|
|
1413
1413
|
}
|
|
1414
1414
|
const terminalErrorStates = [
|
|
@@ -1420,7 +1420,7 @@ var ConnectionRequest = class {
|
|
|
1420
1420
|
const pollInterval = 1e3;
|
|
1421
1421
|
while (Date.now() - start < timeout) {
|
|
1422
1422
|
try {
|
|
1423
|
-
const response = await this.client.connectedAccounts.retrieve(this.
|
|
1423
|
+
const response = await this.client.connectedAccounts.retrieve(this.id);
|
|
1424
1424
|
if (response.status === ConnectedAccountStatuses.ACTIVE) {
|
|
1425
1425
|
return this.transformResponse(response);
|
|
1426
1426
|
}
|
|
@@ -1429,7 +1429,7 @@ var ConnectionRequest = class {
|
|
|
1429
1429
|
`Connection request failed with status: ${response.status}${response.status_reason ? `, reason: ${response.status_reason}` : ""}`,
|
|
1430
1430
|
{
|
|
1431
1431
|
userId: response.user_id,
|
|
1432
|
-
connectedAccountId: this.
|
|
1432
|
+
connectedAccountId: this.id,
|
|
1433
1433
|
status: response.status,
|
|
1434
1434
|
statusReason: response.status_reason
|
|
1435
1435
|
}
|
|
@@ -1440,9 +1440,7 @@ var ConnectionRequest = class {
|
|
|
1440
1440
|
throw error;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
throw new ConnectionRequestTimeoutError(
|
|
1444
|
-
`Connection request timed out for ${this.connectedAccountId}`
|
|
1445
|
-
);
|
|
1443
|
+
throw new ConnectionRequestTimeoutError(`Connection request timed out for ${this.id}`);
|
|
1446
1444
|
}
|
|
1447
1445
|
};
|
|
1448
1446
|
|
|
@@ -2427,7 +2425,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
2427
2425
|
};
|
|
2428
2426
|
|
|
2429
2427
|
// package.json
|
|
2430
|
-
var version = "0.1.
|
|
2428
|
+
var version = "0.1.12-alpha.0";
|
|
2431
2429
|
|
|
2432
2430
|
// src/utils/uuid.ts
|
|
2433
2431
|
import { v4 as uuidv4 } from "uuid";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"zod": "^3.24.2",
|
|
43
43
|
"zod-to-json-schema": "^3.24.5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "b2d06cfc901435c847a61f929c6685b0f1babfea"
|
|
46
46
|
}
|