@composio/core 0.1.4-alpha.0 → 0.1.8-alpha.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/index.cjs +285 -121
- package/dist/index.d.cts +309 -36
- package/dist/index.d.ts +309 -36
- package/dist/index.js +283 -121
- package/package.json +3 -5
package/dist/index.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ import { z, ZodObject, ZodString, ZodNumber, ZodBoolean, ZodOptional } from 'zod
|
|
|
3
3
|
import { ToolProxyParams, ToolProxyResponse, ToolRetrieveEnumResponse, ToolGetInputParams, ToolGetInputResponse } from '@composio/client/resources/tools';
|
|
4
4
|
import { RequestOptions } from '@composio/client/internal/request-options';
|
|
5
5
|
import { TriggerInstanceListActiveParams, TriggerInstanceUpsertParams, TriggerInstanceUpsertResponse, TriggerInstanceRemoveUpsertResponse, TriggerInstanceUpdateStatusParams, TriggersTypeListParams, TriggersTypeListResponse, TriggersTypeRetrieveResponse, TriggersTypeRetrieveEnumResponse } from '@composio/client/resources/index';
|
|
6
|
-
import {
|
|
7
|
-
import { ConnectedAccountListParams, ConnectedAccountListResponse,
|
|
6
|
+
import { AuthConfigUpdateResponse, AuthConfigDeleteResponse, AuthConfigUpdateStatusResponse } from '@composio/client/resources/auth-configs';
|
|
7
|
+
import { ConnectedAccountListParams, ConnectedAccountListResponse, ConnectedAccountRetrieveResponse as ConnectedAccountRetrieveResponse$1, ConnectedAccountDeleteResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from '@composio/client/resources/connected-accounts';
|
|
8
8
|
import { OpenAI } from 'openai';
|
|
9
9
|
import { Stream } from 'openai/streaming';
|
|
10
10
|
|
|
@@ -75,21 +75,21 @@ declare const ToolListParamsSchema: z.ZodObject<{
|
|
|
75
75
|
important: z.ZodOptional<z.ZodString>;
|
|
76
76
|
limit: z.ZodOptional<z.ZodString>;
|
|
77
77
|
search: z.ZodOptional<z.ZodString>;
|
|
78
|
-
toolkits: z.ZodOptional<z.ZodString
|
|
78
|
+
toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
79
79
|
tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
81
|
cursor?: string | undefined;
|
|
82
82
|
important?: string | undefined;
|
|
83
83
|
limit?: string | undefined;
|
|
84
84
|
search?: string | undefined;
|
|
85
|
-
toolkits?: string | undefined;
|
|
85
|
+
toolkits?: string[] | undefined;
|
|
86
86
|
tools?: string[] | undefined;
|
|
87
87
|
}, {
|
|
88
88
|
cursor?: string | undefined;
|
|
89
89
|
important?: string | undefined;
|
|
90
90
|
limit?: string | undefined;
|
|
91
91
|
search?: string | undefined;
|
|
92
|
-
toolkits?: string | undefined;
|
|
92
|
+
toolkits?: string[] | undefined;
|
|
93
93
|
tools?: string[] | undefined;
|
|
94
94
|
}>;
|
|
95
95
|
type ToolListParams = z.infer<typeof ToolListParamsSchema>;
|
|
@@ -1338,6 +1338,266 @@ declare class Triggers {
|
|
|
1338
1338
|
unsubscribe(): Promise<void>;
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
+
declare const AuthConfigTypes: {
|
|
1342
|
+
readonly CUSTOM: "use_custom_auth";
|
|
1343
|
+
readonly COMPOSIO_MANAGED: "use_composio_managed_auth";
|
|
1344
|
+
};
|
|
1345
|
+
type AuthConfigType = (typeof AuthConfigTypes)[keyof typeof AuthConfigTypes];
|
|
1346
|
+
declare const AuthSchemeTypes: {
|
|
1347
|
+
readonly OAUTH2: "OAUTH2";
|
|
1348
|
+
readonly OAUTH1: "OAUTH1";
|
|
1349
|
+
readonly OAUTH1A: "OAUTH1A";
|
|
1350
|
+
readonly API_KEY: "API_KEY";
|
|
1351
|
+
readonly BASIC: "BASIC";
|
|
1352
|
+
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
|
|
1353
|
+
readonly BEARER_TOKEN: "BEARER_TOKEN";
|
|
1354
|
+
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
|
|
1355
|
+
readonly NO_AUTH: "NO_AUTH";
|
|
1356
|
+
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
|
|
1357
|
+
readonly COMPOSIO_LINK: "COMPOSIO_LINK";
|
|
1358
|
+
readonly CALCOM_AUTH: "CALCOM_AUTH";
|
|
1359
|
+
readonly SNOWFLAKE: "SNOWFLAKE";
|
|
1360
|
+
};
|
|
1361
|
+
type AuthSchemeType = (typeof AuthSchemeTypes)[keyof typeof AuthSchemeTypes];
|
|
1362
|
+
/**
|
|
1363
|
+
* Discriminated union of all possible auth config types.
|
|
1364
|
+
*/
|
|
1365
|
+
declare const CreateAuthConfigParamsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1366
|
+
type: z.ZodLiteral<"use_custom_auth">;
|
|
1367
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1368
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1369
|
+
authScheme: z.ZodEnum<["OAUTH2", "OAUTH1", "OAUTH1A", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "COMPOSIO_LINK", "CALCOM_AUTH", "SNOWFLAKE"]>;
|
|
1370
|
+
}, "strip", z.ZodTypeAny, {
|
|
1371
|
+
type: "use_custom_auth";
|
|
1372
|
+
credentials: Record<string, string | number | boolean>;
|
|
1373
|
+
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1374
|
+
name?: string | undefined;
|
|
1375
|
+
}, {
|
|
1376
|
+
type: "use_custom_auth";
|
|
1377
|
+
credentials: Record<string, string | number | boolean>;
|
|
1378
|
+
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1379
|
+
name?: string | undefined;
|
|
1380
|
+
}>, z.ZodObject<{
|
|
1381
|
+
type: z.ZodLiteral<"use_composio_managed_auth">;
|
|
1382
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1383
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1384
|
+
}, "strip", z.ZodTypeAny, {
|
|
1385
|
+
type: "use_composio_managed_auth";
|
|
1386
|
+
name?: string | undefined;
|
|
1387
|
+
credentials?: Record<string, string | number | boolean> | undefined;
|
|
1388
|
+
}, {
|
|
1389
|
+
type: "use_composio_managed_auth";
|
|
1390
|
+
name?: string | undefined;
|
|
1391
|
+
credentials?: Record<string, string | number | boolean> | undefined;
|
|
1392
|
+
}>]>;
|
|
1393
|
+
type CreateAuthConfigParams = z.infer<typeof CreateAuthConfigParamsSchema>;
|
|
1394
|
+
declare const CreateAuthConfigResponseSchema: z.ZodObject<{
|
|
1395
|
+
id: z.ZodString;
|
|
1396
|
+
authScheme: z.ZodString;
|
|
1397
|
+
isComposioManaged: z.ZodBoolean;
|
|
1398
|
+
toolkit: z.ZodString;
|
|
1399
|
+
}, "strip", z.ZodTypeAny, {
|
|
1400
|
+
toolkit: string;
|
|
1401
|
+
id: string;
|
|
1402
|
+
authScheme: string;
|
|
1403
|
+
isComposioManaged: boolean;
|
|
1404
|
+
}, {
|
|
1405
|
+
toolkit: string;
|
|
1406
|
+
id: string;
|
|
1407
|
+
authScheme: string;
|
|
1408
|
+
isComposioManaged: boolean;
|
|
1409
|
+
}>;
|
|
1410
|
+
type CreateAuthConfigResponse = z.infer<typeof CreateAuthConfigResponseSchema>;
|
|
1411
|
+
declare const AuthConfigRetrieveResponseSchema: z.ZodObject<{
|
|
1412
|
+
id: z.ZodString;
|
|
1413
|
+
name: z.ZodString;
|
|
1414
|
+
toolkit: z.ZodObject<{
|
|
1415
|
+
logo: z.ZodString;
|
|
1416
|
+
slug: z.ZodString;
|
|
1417
|
+
}, "strip", z.ZodTypeAny, {
|
|
1418
|
+
slug: string;
|
|
1419
|
+
logo: string;
|
|
1420
|
+
}, {
|
|
1421
|
+
slug: string;
|
|
1422
|
+
logo: string;
|
|
1423
|
+
}>;
|
|
1424
|
+
noOfConnections: z.ZodNumber;
|
|
1425
|
+
status: z.ZodEnum<["ENABLED", "DISABLED"]>;
|
|
1426
|
+
uuid: z.ZodString;
|
|
1427
|
+
authScheme: z.ZodOptional<z.ZodEnum<["OAUTH2", "OAUTH1", "OAUTH1A", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "COMPOSIO_LINK", "CALCOM_AUTH", "SNOWFLAKE"]>>;
|
|
1428
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1429
|
+
expectedInputFields: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
1430
|
+
isComposioManaged: z.ZodOptional<z.ZodBoolean>;
|
|
1431
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
1432
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
lastUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
1434
|
+
}, "strip", z.ZodTypeAny, {
|
|
1435
|
+
name: string;
|
|
1436
|
+
status: "ENABLED" | "DISABLED";
|
|
1437
|
+
toolkit: {
|
|
1438
|
+
slug: string;
|
|
1439
|
+
logo: string;
|
|
1440
|
+
};
|
|
1441
|
+
id: string;
|
|
1442
|
+
credentials: Record<string, string | number | boolean>;
|
|
1443
|
+
noOfConnections: number;
|
|
1444
|
+
uuid: string;
|
|
1445
|
+
createdAt?: string | undefined;
|
|
1446
|
+
authScheme?: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE" | undefined;
|
|
1447
|
+
isComposioManaged?: boolean | undefined;
|
|
1448
|
+
expectedInputFields?: unknown[] | undefined;
|
|
1449
|
+
createdBy?: string | undefined;
|
|
1450
|
+
lastUpdatedAt?: string | undefined;
|
|
1451
|
+
}, {
|
|
1452
|
+
name: string;
|
|
1453
|
+
status: "ENABLED" | "DISABLED";
|
|
1454
|
+
toolkit: {
|
|
1455
|
+
slug: string;
|
|
1456
|
+
logo: string;
|
|
1457
|
+
};
|
|
1458
|
+
id: string;
|
|
1459
|
+
credentials: Record<string, string | number | boolean>;
|
|
1460
|
+
noOfConnections: number;
|
|
1461
|
+
uuid: string;
|
|
1462
|
+
createdAt?: string | undefined;
|
|
1463
|
+
authScheme?: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE" | undefined;
|
|
1464
|
+
isComposioManaged?: boolean | undefined;
|
|
1465
|
+
expectedInputFields?: unknown[] | undefined;
|
|
1466
|
+
createdBy?: string | undefined;
|
|
1467
|
+
lastUpdatedAt?: string | undefined;
|
|
1468
|
+
}>;
|
|
1469
|
+
type AuthConfigRetrieveResponse = z.infer<typeof AuthConfigRetrieveResponseSchema>;
|
|
1470
|
+
declare const AuthConfigListParamsSchema: z.ZodObject<{
|
|
1471
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1472
|
+
isComposioManaged: z.ZodOptional<z.ZodBoolean>;
|
|
1473
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1474
|
+
toolkitSlug: z.ZodOptional<z.ZodString>;
|
|
1475
|
+
}, "strip", z.ZodTypeAny, {
|
|
1476
|
+
cursor?: string | undefined;
|
|
1477
|
+
limit?: number | undefined;
|
|
1478
|
+
toolkitSlug?: string | undefined;
|
|
1479
|
+
isComposioManaged?: boolean | undefined;
|
|
1480
|
+
}, {
|
|
1481
|
+
cursor?: string | undefined;
|
|
1482
|
+
limit?: number | undefined;
|
|
1483
|
+
toolkitSlug?: string | undefined;
|
|
1484
|
+
isComposioManaged?: boolean | undefined;
|
|
1485
|
+
}>;
|
|
1486
|
+
type AuthConfigListParams = z.infer<typeof AuthConfigListParamsSchema>;
|
|
1487
|
+
declare const AuthConfigListResponseSchema: z.ZodObject<{
|
|
1488
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1489
|
+
id: z.ZodString;
|
|
1490
|
+
name: z.ZodString;
|
|
1491
|
+
toolkit: z.ZodObject<{
|
|
1492
|
+
logo: z.ZodString;
|
|
1493
|
+
slug: z.ZodString;
|
|
1494
|
+
}, "strip", z.ZodTypeAny, {
|
|
1495
|
+
slug: string;
|
|
1496
|
+
logo: string;
|
|
1497
|
+
}, {
|
|
1498
|
+
slug: string;
|
|
1499
|
+
logo: string;
|
|
1500
|
+
}>;
|
|
1501
|
+
noOfConnections: z.ZodNumber;
|
|
1502
|
+
status: z.ZodEnum<["ENABLED", "DISABLED"]>;
|
|
1503
|
+
uuid: z.ZodString;
|
|
1504
|
+
authScheme: z.ZodOptional<z.ZodEnum<["OAUTH2", "OAUTH1", "OAUTH1A", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "COMPOSIO_LINK", "CALCOM_AUTH", "SNOWFLAKE"]>>;
|
|
1505
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1506
|
+
expectedInputFields: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
1507
|
+
isComposioManaged: z.ZodOptional<z.ZodBoolean>;
|
|
1508
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
1509
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1510
|
+
lastUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
}, "strip", z.ZodTypeAny, {
|
|
1512
|
+
name: string;
|
|
1513
|
+
status: "ENABLED" | "DISABLED";
|
|
1514
|
+
toolkit: {
|
|
1515
|
+
slug: string;
|
|
1516
|
+
logo: string;
|
|
1517
|
+
};
|
|
1518
|
+
id: string;
|
|
1519
|
+
credentials: Record<string, string | number | boolean>;
|
|
1520
|
+
noOfConnections: number;
|
|
1521
|
+
uuid: string;
|
|
1522
|
+
createdAt?: string | undefined;
|
|
1523
|
+
authScheme?: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE" | undefined;
|
|
1524
|
+
isComposioManaged?: boolean | undefined;
|
|
1525
|
+
expectedInputFields?: unknown[] | undefined;
|
|
1526
|
+
createdBy?: string | undefined;
|
|
1527
|
+
lastUpdatedAt?: string | undefined;
|
|
1528
|
+
}, {
|
|
1529
|
+
name: string;
|
|
1530
|
+
status: "ENABLED" | "DISABLED";
|
|
1531
|
+
toolkit: {
|
|
1532
|
+
slug: string;
|
|
1533
|
+
logo: string;
|
|
1534
|
+
};
|
|
1535
|
+
id: string;
|
|
1536
|
+
credentials: Record<string, string | number | boolean>;
|
|
1537
|
+
noOfConnections: number;
|
|
1538
|
+
uuid: string;
|
|
1539
|
+
createdAt?: string | undefined;
|
|
1540
|
+
authScheme?: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE" | undefined;
|
|
1541
|
+
isComposioManaged?: boolean | undefined;
|
|
1542
|
+
expectedInputFields?: unknown[] | undefined;
|
|
1543
|
+
createdBy?: string | undefined;
|
|
1544
|
+
lastUpdatedAt?: string | undefined;
|
|
1545
|
+
}>, "many">;
|
|
1546
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
totalPages: z.ZodNumber;
|
|
1548
|
+
}, "strip", z.ZodTypeAny, {
|
|
1549
|
+
items: {
|
|
1550
|
+
name: string;
|
|
1551
|
+
status: "ENABLED" | "DISABLED";
|
|
1552
|
+
toolkit: {
|
|
1553
|
+
slug: string;
|
|
1554
|
+
logo: string;
|
|
1555
|
+
};
|
|
1556
|
+
id: string;
|
|
1557
|
+
credentials: Record<string, string | number | boolean>;
|
|
1558
|
+
noOfConnections: number;
|
|
1559
|
+
uuid: string;
|
|
1560
|
+
createdAt?: string | undefined;
|
|
1561
|
+
authScheme?: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE" | undefined;
|
|
1562
|
+
isComposioManaged?: boolean | undefined;
|
|
1563
|
+
expectedInputFields?: unknown[] | undefined;
|
|
1564
|
+
createdBy?: string | undefined;
|
|
1565
|
+
lastUpdatedAt?: string | undefined;
|
|
1566
|
+
}[];
|
|
1567
|
+
totalPages: number;
|
|
1568
|
+
nextCursor?: string | undefined;
|
|
1569
|
+
}, {
|
|
1570
|
+
items: {
|
|
1571
|
+
name: string;
|
|
1572
|
+
status: "ENABLED" | "DISABLED";
|
|
1573
|
+
toolkit: {
|
|
1574
|
+
slug: string;
|
|
1575
|
+
logo: string;
|
|
1576
|
+
};
|
|
1577
|
+
id: string;
|
|
1578
|
+
credentials: Record<string, string | number | boolean>;
|
|
1579
|
+
noOfConnections: number;
|
|
1580
|
+
uuid: string;
|
|
1581
|
+
createdAt?: string | undefined;
|
|
1582
|
+
authScheme?: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE" | undefined;
|
|
1583
|
+
isComposioManaged?: boolean | undefined;
|
|
1584
|
+
expectedInputFields?: unknown[] | undefined;
|
|
1585
|
+
createdBy?: string | undefined;
|
|
1586
|
+
lastUpdatedAt?: string | undefined;
|
|
1587
|
+
}[];
|
|
1588
|
+
totalPages: number;
|
|
1589
|
+
nextCursor?: string | undefined;
|
|
1590
|
+
}>;
|
|
1591
|
+
type AuthConfigListResponse = z.infer<typeof AuthConfigListResponseSchema>;
|
|
1592
|
+
declare const AuthConfigUpdateParamsSchema: z.ZodObject<{
|
|
1593
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1594
|
+
}, "strip", z.ZodTypeAny, {
|
|
1595
|
+
credentials: Record<string, string | number | boolean>;
|
|
1596
|
+
}, {
|
|
1597
|
+
credentials: Record<string, string | number | boolean>;
|
|
1598
|
+
}>;
|
|
1599
|
+
type AuthConfigUpdateParams = z.infer<typeof AuthConfigUpdateParamsSchema>;
|
|
1600
|
+
|
|
1341
1601
|
/**
|
|
1342
1602
|
* @fileoverview Auth configs class for Composio SDK, used to manage authentication configurations.
|
|
1343
1603
|
*
|
|
@@ -1353,30 +1613,42 @@ declare class Triggers {
|
|
|
1353
1613
|
* Auth configs are used to configure authentication providers and settings.
|
|
1354
1614
|
*/
|
|
1355
1615
|
declare class AuthConfigs {
|
|
1356
|
-
readonly FILE_NAME: string;
|
|
1357
1616
|
private client;
|
|
1358
1617
|
constructor(client: ComposioClient);
|
|
1618
|
+
private parseAuthConfigRetrieveResponse;
|
|
1359
1619
|
/**
|
|
1360
1620
|
* List all auth configs
|
|
1361
1621
|
* @param {AuthConfigListParams} query - Query parameters for filtering auth configs
|
|
1362
1622
|
* @param {RequestOptions} options - Request options
|
|
1363
1623
|
* @returns {Promise<AuthConfigListResponse>} List of auth configs
|
|
1364
1624
|
*/
|
|
1365
|
-
list(query?: AuthConfigListParams
|
|
1625
|
+
list(query?: AuthConfigListParams): Promise<AuthConfigListResponse>;
|
|
1366
1626
|
/**
|
|
1367
1627
|
* Create a new auth config
|
|
1368
|
-
* @param {
|
|
1369
|
-
* @param {
|
|
1370
|
-
* @returns {Promise<
|
|
1628
|
+
* @param {string} toolkit - Unique identifier of the toolkit
|
|
1629
|
+
* @param {CreateAuthConfigParams} options - Options for creating a new auth config
|
|
1630
|
+
* @returns {Promise<CreateAuthConfigResponse>} Created auth config
|
|
1631
|
+
*
|
|
1632
|
+
* @example
|
|
1633
|
+
* const authConfig = await authConfigs.create('my-toolkit', {
|
|
1634
|
+
* type: AuthConfigTypes.CUSTOM,
|
|
1635
|
+
* name: 'My Custom Auth Config',
|
|
1636
|
+
* authScheme: AuthSchemeTypes.API_KEY,
|
|
1637
|
+
* credentials: {
|
|
1638
|
+
* apiKey: '1234567890',
|
|
1639
|
+
* },
|
|
1640
|
+
* });
|
|
1641
|
+
*
|
|
1642
|
+
* @link https://docs.composio.dev/reference/auth-configs/create-auth-config
|
|
1371
1643
|
*/
|
|
1372
|
-
create(
|
|
1644
|
+
create(toolkit: string, options: CreateAuthConfigParams): Promise<CreateAuthConfigResponse>;
|
|
1373
1645
|
/**
|
|
1374
1646
|
* Get an auth config by nanoid
|
|
1375
1647
|
* @param {string} nanoid - Unique identifier of the auth config
|
|
1376
1648
|
* @param {RequestOptions} options - Request options
|
|
1377
1649
|
* @returns {Promise<AuthConfigRetrieveResponse>} Auth config details
|
|
1378
1650
|
*/
|
|
1379
|
-
get(nanoid: string
|
|
1651
|
+
get(nanoid: string): Promise<AuthConfigRetrieveResponse>;
|
|
1380
1652
|
/**
|
|
1381
1653
|
* Update an auth config
|
|
1382
1654
|
* @param {string} nanoid - Unique identifier of the auth config to update
|
|
@@ -1384,14 +1656,14 @@ declare class AuthConfigs {
|
|
|
1384
1656
|
* @param {RequestOptions} options - Request options
|
|
1385
1657
|
* @returns {Promise<AuthConfigUpdateResponse>} Updated auth config
|
|
1386
1658
|
*/
|
|
1387
|
-
update(nanoid: string, data: AuthConfigUpdateParams
|
|
1659
|
+
update(nanoid: string, data: AuthConfigUpdateParams): Promise<AuthConfigUpdateResponse>;
|
|
1388
1660
|
/**
|
|
1389
1661
|
* Delete an auth config
|
|
1390
1662
|
* @param {string} nanoid - Unique identifier of the auth config to delete
|
|
1391
1663
|
* @param {RequestOptions} options - Request options
|
|
1392
1664
|
* @returns {Promise<AuthConfigDeleteResponse>} Response from deletion
|
|
1393
1665
|
*/
|
|
1394
|
-
delete(nanoid: string
|
|
1666
|
+
delete(nanoid: string): Promise<AuthConfigDeleteResponse>;
|
|
1395
1667
|
/**
|
|
1396
1668
|
* Update the status of an auth config
|
|
1397
1669
|
* @param {string} status - The status to update the auth config to
|
|
@@ -1399,21 +1671,21 @@ declare class AuthConfigs {
|
|
|
1399
1671
|
* @param {RequestOptions} options - Request options
|
|
1400
1672
|
* @returns {Promise<AuthConfigUpdateStatusResponse>} Updated auth config details
|
|
1401
1673
|
*/
|
|
1402
|
-
updateStatus(status: 'ENABLED' | 'DISABLED', nanoid: string
|
|
1674
|
+
updateStatus(status: 'ENABLED' | 'DISABLED', nanoid: string): Promise<AuthConfigUpdateStatusResponse>;
|
|
1403
1675
|
/**
|
|
1404
1676
|
* Enable an auth config
|
|
1405
1677
|
* @param {string} nanoid - Unique identifier of the auth config
|
|
1406
1678
|
* @param {RequestOptions} options - Request options
|
|
1407
1679
|
* @returns {Promise<AuthConfigUpdateStatusResponse>} Updated auth config details
|
|
1408
1680
|
*/
|
|
1409
|
-
enable(nanoid: string
|
|
1681
|
+
enable(nanoid: string): Promise<AuthConfigUpdateStatusResponse>;
|
|
1410
1682
|
/**
|
|
1411
1683
|
* Disable an auth config
|
|
1412
1684
|
* @param {string} nanoid - Unique identifier of the auth config
|
|
1413
1685
|
* @param {RequestOptions} options - Request options
|
|
1414
1686
|
* @returns {Promise<AuthConfigUpdateStatusResponse>} Updated auth config details
|
|
1415
1687
|
*/
|
|
1416
|
-
disable(nanoid: string
|
|
1688
|
+
disable(nanoid: string): Promise<AuthConfigUpdateStatusResponse>;
|
|
1417
1689
|
}
|
|
1418
1690
|
|
|
1419
1691
|
/**
|
|
@@ -1442,7 +1714,6 @@ declare const CreateConnectedAccountOptionsSchema: z.ZodObject<{
|
|
|
1442
1714
|
type CreateConnectedAccountOptionsSchema = z.infer<typeof CreateConnectedAccountOptionsSchema>;
|
|
1443
1715
|
declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
|
|
1444
1716
|
id: z.ZodString;
|
|
1445
|
-
uuid: z.ZodString;
|
|
1446
1717
|
authConfig: z.ZodObject<{
|
|
1447
1718
|
id: z.ZodString;
|
|
1448
1719
|
authScheme: z.ZodEnum<["OAUTH2", "OAUTH1", "OAUTH1A", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "COMPOSIO_LINK", "CALCOM_AUTH", "SNOWFLAKE"]>;
|
|
@@ -1493,7 +1764,6 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
|
|
|
1493
1764
|
isDisabled: boolean;
|
|
1494
1765
|
};
|
|
1495
1766
|
isDisabled: boolean;
|
|
1496
|
-
uuid: string;
|
|
1497
1767
|
statusReason: string | null;
|
|
1498
1768
|
testRequestEndpoint?: string | undefined;
|
|
1499
1769
|
}, {
|
|
@@ -1514,7 +1784,6 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
|
|
|
1514
1784
|
isDisabled: boolean;
|
|
1515
1785
|
};
|
|
1516
1786
|
isDisabled: boolean;
|
|
1517
|
-
uuid: string;
|
|
1518
1787
|
statusReason: string | null;
|
|
1519
1788
|
testRequestEndpoint?: string | undefined;
|
|
1520
1789
|
}>;
|
|
@@ -1529,7 +1798,6 @@ type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveR
|
|
|
1529
1798
|
*/
|
|
1530
1799
|
|
|
1531
1800
|
declare class ConnectionRequest {
|
|
1532
|
-
readonly FILE_NAME: string;
|
|
1533
1801
|
private client;
|
|
1534
1802
|
private connectedAccountId;
|
|
1535
1803
|
private connectedAccountStatus;
|
|
@@ -1574,12 +1842,24 @@ declare class ConnectedAccounts {
|
|
|
1574
1842
|
*/
|
|
1575
1843
|
list(query?: ConnectedAccountListParams): Promise<ConnectedAccountListResponse>;
|
|
1576
1844
|
/**
|
|
1577
|
-
*
|
|
1578
|
-
*
|
|
1579
|
-
*
|
|
1580
|
-
* @
|
|
1845
|
+
* Compound function to create a new connected account.
|
|
1846
|
+
* This function creates a new connected account and returns a connection request.
|
|
1847
|
+
* Users can then wait for the connection to be established using the `waitForConnection` method.
|
|
1848
|
+
* @param {string} userId - User ID of the connected account
|
|
1849
|
+
* @param {string} authConfigId - Auth config ID of the connected account
|
|
1850
|
+
* @param {CreateConnectedAccountOptions} data - Data for creating a new connected account
|
|
1851
|
+
* @returns {Promise<ConnectionRequest>} Connection request object
|
|
1852
|
+
*
|
|
1853
|
+
* @example
|
|
1854
|
+
* const connectionRequest = await composio.createConnectedAccount('user_123', 'auth_config_123', {
|
|
1855
|
+
* data: {
|
|
1856
|
+
* name: 'My Connected Account',
|
|
1857
|
+
* },
|
|
1858
|
+
* });
|
|
1859
|
+
*
|
|
1860
|
+
* @link https://docs.composio.dev/reference/connected-accounts/create-connected-account
|
|
1581
1861
|
*/
|
|
1582
|
-
create(
|
|
1862
|
+
create(userId: string, authConfigId: string, options?: CreateConnectedAccountOptions): Promise<ConnectionRequest>;
|
|
1583
1863
|
/**
|
|
1584
1864
|
* Get a connected account by nanoid
|
|
1585
1865
|
* @param {string} nanoid - Unique identifier of the connected account
|
|
@@ -1623,14 +1903,6 @@ declare class ConnectedAccounts {
|
|
|
1623
1903
|
* @returns {Promise<ConnectedAccountUpdateStatusResponse>} Updated connected account details
|
|
1624
1904
|
*/
|
|
1625
1905
|
disable(nanoid: string): Promise<ConnectedAccountUpdateStatusResponse>;
|
|
1626
|
-
/**
|
|
1627
|
-
* Compound function to create a new connected account.
|
|
1628
|
-
* This function creates a new connected account and returns a connection request.
|
|
1629
|
-
* Users can then wait for the connection to be established using the `waitForConnection` method.
|
|
1630
|
-
* @param {CreateConnectedAccountParams} data - Data for creating a new connected account
|
|
1631
|
-
* @returns {Promise<ConnectionRequest>} Connection request object
|
|
1632
|
-
*/
|
|
1633
|
-
createConnectedAccount(userId: string, authConfigId: string, options: CreateConnectedAccountOptions): Promise<ConnectionRequest>;
|
|
1634
1906
|
}
|
|
1635
1907
|
|
|
1636
1908
|
type AcceptableJSONValue = Record<string, unknown> | Array<Record<string, unknown>> | string | number | boolean | null | undefined;
|
|
@@ -1748,8 +2020,9 @@ declare class Composio<TToolset extends BaseComposioToolset<unknown, unknown> =
|
|
|
1748
2020
|
triggers: Triggers;
|
|
1749
2021
|
toolset: TToolset;
|
|
1750
2022
|
authConfigs: AuthConfigs;
|
|
2023
|
+
createAuthConfig: AuthConfigs['create'];
|
|
1751
2024
|
connectedAccounts: ConnectedAccounts;
|
|
1752
|
-
createConnectedAccount: ConnectedAccounts['
|
|
2025
|
+
createConnectedAccount: ConnectedAccounts['create'];
|
|
1753
2026
|
/**
|
|
1754
2027
|
* @param {Object} config Configuration for the Composio SDK.
|
|
1755
2028
|
* @param {string} config.apiKey The API key for the Composio SDK.
|
|
@@ -1804,4 +2077,4 @@ declare class ComposioToolset extends BaseNonAgenticToolset<Array<CustomTool>, C
|
|
|
1804
2077
|
|
|
1805
2078
|
declare function jsonSchemaToModel(jsonSchema: Record<string, unknown>): z.ZodObject<Record<string, z.ZodTypeAny>>;
|
|
1806
2079
|
|
|
1807
|
-
export { type AfterToolExecuteModifier, type AgenticToolOptions, BaseAgenticToolset, type BaseComposioToolset, BaseNonAgenticToolset, BaseTelemetryTransport, type BeforeToolExecuteModifier, Composio, ComposioToolset, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, OpenAIToolset, type Tool, type ToolExecuteParams, type ToolListParams, ToolListParamsSchema, type ToolOptions, type Toolset, type TransformToolSchemaModifier, jsonSchemaToModel };
|
|
2080
|
+
export { type AfterToolExecuteModifier, type AgenticToolOptions, type AuthConfigType, AuthConfigTypes, type AuthSchemeType, AuthSchemeTypes, BaseAgenticToolset, type BaseComposioToolset, BaseNonAgenticToolset, BaseTelemetryTransport, type BeforeToolExecuteModifier, Composio, ComposioToolset, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, OpenAIToolset, type Tool, type ToolExecuteParams, type ToolListParams, ToolListParamsSchema, type ToolOptions, type Toolset, type TransformToolSchemaModifier, jsonSchemaToModel };
|