@composio/core 0.1.8-alpha.0 → 0.1.9-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/README.md +3 -3
- package/dist/index.cjs +1255 -897
- package/dist/index.d.cts +294 -320
- package/dist/index.d.ts +294 -320
- package/dist/index.js +1165 -807
- package/package.json +3 -3
- package/src/index.ts +23 -0
package/dist/index.d.ts
CHANGED
|
@@ -71,26 +71,26 @@ type ToolList = Array<Tool>;
|
|
|
71
71
|
* ToolListParams is the parameters for the list of tools.
|
|
72
72
|
*/
|
|
73
73
|
declare const ToolListParamsSchema: z.ZodObject<{
|
|
74
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
75
|
cursor: z.ZodOptional<z.ZodString>;
|
|
75
76
|
important: z.ZodOptional<z.ZodString>;
|
|
76
77
|
limit: z.ZodOptional<z.ZodString>;
|
|
77
78
|
search: z.ZodOptional<z.ZodString>;
|
|
78
79
|
toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
79
|
-
tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
tools?: string[] | undefined;
|
|
81
82
|
cursor?: string | undefined;
|
|
82
83
|
important?: string | undefined;
|
|
83
84
|
limit?: string | undefined;
|
|
84
85
|
search?: string | undefined;
|
|
85
86
|
toolkits?: string[] | undefined;
|
|
86
|
-
tools?: string[] | undefined;
|
|
87
87
|
}, {
|
|
88
|
+
tools?: string[] | undefined;
|
|
88
89
|
cursor?: string | undefined;
|
|
89
90
|
important?: string | undefined;
|
|
90
91
|
limit?: string | undefined;
|
|
91
92
|
search?: string | undefined;
|
|
92
93
|
toolkits?: string[] | undefined;
|
|
93
|
-
tools?: string[] | undefined;
|
|
94
94
|
}>;
|
|
95
95
|
type ToolListParams = z.infer<typeof ToolListParamsSchema>;
|
|
96
96
|
/**
|
|
@@ -250,56 +250,6 @@ interface ExecuteMetadata {
|
|
|
250
250
|
connectedAccountId?: string;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
/**
|
|
254
|
-
* @fileoverview Custom tools class for Composio SDK, used to manage custom tools created by users.
|
|
255
|
-
*
|
|
256
|
-
* @author Musthaq Ahamad <musthaq@composio.dev>
|
|
257
|
-
* @date 2025-05-05
|
|
258
|
-
* @module CustomTools
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
declare class CustomTools {
|
|
262
|
-
private client;
|
|
263
|
-
private customToolsRegistry;
|
|
264
|
-
constructor(client: ComposioClient);
|
|
265
|
-
/**
|
|
266
|
-
* Create a custom tool and registers it in the registry.
|
|
267
|
-
* This is just an in memory registry and is not persisted.
|
|
268
|
-
* @param {CustomToolOptions} toolOptions CustomToolOptions
|
|
269
|
-
* @returns {Tool} The tool created
|
|
270
|
-
*/
|
|
271
|
-
createTool(toolOptions: CustomToolOptions): Promise<Tool>;
|
|
272
|
-
/**
|
|
273
|
-
* Get all the custom tools from the registry.
|
|
274
|
-
* @param {string[]} param0.toolSlugs The slugs of the tools to get
|
|
275
|
-
* @returns {ToolList} The list of tools
|
|
276
|
-
*/
|
|
277
|
-
getCustomTools({ toolSlugs }: {
|
|
278
|
-
toolSlugs?: string[];
|
|
279
|
-
}): Promise<ToolList>;
|
|
280
|
-
/**
|
|
281
|
-
* Get a custom tool by slug from the registry.
|
|
282
|
-
* @param {string} slug The slug of the tool to get
|
|
283
|
-
* @returns {Tool} The tool
|
|
284
|
-
*/
|
|
285
|
-
getCustomToolBySlug(slug: string): Promise<Tool | null>;
|
|
286
|
-
/**
|
|
287
|
-
* Get the connected account for the user and toolkit.
|
|
288
|
-
* @param {string} toolkitSlug The slug of the toolkit
|
|
289
|
-
* @param {ExecuteMetadata} metadata The metadata of the execution
|
|
290
|
-
* @returns {ConnectedAccount} The connected account
|
|
291
|
-
*/
|
|
292
|
-
private getConnectedAccount;
|
|
293
|
-
/**
|
|
294
|
-
* Execute a custom tool
|
|
295
|
-
* @param {slug} slug The slug of the tool to execute
|
|
296
|
-
* @param {Record<string, unknown>} inputParams The input parameters for the tool
|
|
297
|
-
* @param {ExecuteMetadata} metadata The metadata of the execution
|
|
298
|
-
* @returns {Promise<ToolExecuteResponse>} The response from the tool
|
|
299
|
-
*/
|
|
300
|
-
executeCustomTool(slug: string, inputParams: Record<string, unknown>, metadata: ExecuteMetadata): Promise<ToolExecuteResponse>;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
253
|
/**
|
|
304
254
|
* Base toolset implementation, which needs to be implemented by the extended class.
|
|
305
255
|
* This class is used to create a base toolset by implementing this class.
|
|
@@ -412,17 +362,17 @@ type BaseComposioToolset<TToolCollection, TTool> = BaseNonAgenticToolset<TToolCo
|
|
|
412
362
|
* Modifier for altering the tool execute params
|
|
413
363
|
* Called before the tool execute call
|
|
414
364
|
*/
|
|
415
|
-
type BeforeToolExecuteModifier = (toolSlug: string, toolExecuteParams: ToolExecuteParams) => ToolExecuteParams;
|
|
365
|
+
type BeforeToolExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteParams: ToolExecuteParams) => ToolExecuteParams;
|
|
416
366
|
/**
|
|
417
367
|
* Modifier for altering the tool execute response
|
|
418
368
|
* Called after the tool execute call
|
|
419
369
|
*/
|
|
420
|
-
type AfterToolExecuteModifier = (toolSlug: string, toolExecuteResponse: ToolExecuteResponse) => ToolExecuteResponse;
|
|
370
|
+
type AfterToolExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteResponse: ToolExecuteResponse) => ToolExecuteResponse;
|
|
421
371
|
/**
|
|
422
372
|
* Modifier for altering the tool schema
|
|
423
373
|
* Called after the tool schema is retrieved
|
|
424
374
|
*/
|
|
425
|
-
type TransformToolSchemaModifier = (toolSlug: string, toolSchema: Tool) => Tool;
|
|
375
|
+
type TransformToolSchemaModifier = (toolSlug: string, toolkitSlug: string, toolSchema: Tool) => Tool;
|
|
426
376
|
/**
|
|
427
377
|
* Non Agentic tool options. These are used by Non-Agentic toolsets
|
|
428
378
|
*/
|
|
@@ -458,7 +408,7 @@ type ToolsetOptions<T extends BaseComposioToolset<unknown, unknown>> = T extends
|
|
|
458
408
|
*/
|
|
459
409
|
declare class Tools<TToolCollection, TTool, TToolset extends BaseComposioToolset<TToolCollection, TTool>> {
|
|
460
410
|
private client;
|
|
461
|
-
customTools
|
|
411
|
+
private readonly customTools;
|
|
462
412
|
private toolset;
|
|
463
413
|
constructor(client: ComposioClient, toolset: TToolset);
|
|
464
414
|
/**
|
|
@@ -499,8 +449,8 @@ declare class Tools<TToolCollection, TTool, TToolset extends BaseComposioToolset
|
|
|
499
449
|
* @returns {Promise<Tool>} The tool
|
|
500
450
|
*/
|
|
501
451
|
getComposioToolBySlug(userId: string, slug: string, modifier?: TransformToolSchemaModifier): Promise<Tool>;
|
|
502
|
-
get(userId: string, slug: string, options?: ToolsetOptions<TToolset>): Promise<
|
|
503
|
-
get(userId: string, filters: ToolListParams, options?: ToolsetOptions<TToolset>): Promise<
|
|
452
|
+
get<T extends TToolset>(userId: string, slug: string, options?: ToolsetOptions<TToolset>): Promise<ReturnType<T['wrapTool']>>;
|
|
453
|
+
get<T extends TToolset>(userId: string, filters: ToolListParams, options?: ToolsetOptions<TToolset>): Promise<ReturnType<T['wrapTools']>>;
|
|
504
454
|
/**
|
|
505
455
|
* Creates a function that executes a tool.
|
|
506
456
|
* This function is used by agentic the toolsets to execute the tool
|
|
@@ -509,6 +459,8 @@ declare class Tools<TToolCollection, TTool, TToolset extends BaseComposioToolset
|
|
|
509
459
|
* @returns {ExecuteToolFn} The execute tool function
|
|
510
460
|
*/
|
|
511
461
|
private createExecuteToolFn;
|
|
462
|
+
private handleCustomToolExecution;
|
|
463
|
+
private handleComposioToolExecution;
|
|
512
464
|
/**
|
|
513
465
|
* Exectes a given tool with the provided parameters.
|
|
514
466
|
*
|
|
@@ -573,44 +525,47 @@ declare const ToolKitListResponseSchema: z.ZodObject<{
|
|
|
573
525
|
name: z.ZodString;
|
|
574
526
|
slug: z.ZodString;
|
|
575
527
|
meta: z.ZodObject<{
|
|
576
|
-
categories: z.ZodArray<z.ZodObject<{
|
|
577
|
-
|
|
528
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
529
|
+
slug: z.ZodString;
|
|
578
530
|
name: z.ZodString;
|
|
579
531
|
}, "strip", z.ZodTypeAny, {
|
|
532
|
+
slug: string;
|
|
580
533
|
name: string;
|
|
581
|
-
id: string;
|
|
582
534
|
}, {
|
|
535
|
+
slug: string;
|
|
583
536
|
name: string;
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
createdAt: z.ZodString
|
|
587
|
-
description: z.ZodString
|
|
588
|
-
logo: z.ZodString
|
|
589
|
-
toolsCount: z.ZodNumber
|
|
590
|
-
triggersCount: z.ZodNumber
|
|
591
|
-
updatedAt: z.ZodString
|
|
537
|
+
}>, "many">>;
|
|
538
|
+
appUrl: z.ZodOptional<z.ZodString>;
|
|
539
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
540
|
+
description: z.ZodOptional<z.ZodString>;
|
|
541
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
542
|
+
toolsCount: z.ZodOptional<z.ZodNumber>;
|
|
543
|
+
triggersCount: z.ZodOptional<z.ZodNumber>;
|
|
544
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
592
545
|
}, "strip", z.ZodTypeAny, {
|
|
593
|
-
logo
|
|
594
|
-
description
|
|
595
|
-
categories
|
|
546
|
+
logo?: string | undefined;
|
|
547
|
+
description?: string | undefined;
|
|
548
|
+
categories?: {
|
|
549
|
+
slug: string;
|
|
596
550
|
name: string;
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
createdAt
|
|
600
|
-
toolsCount
|
|
601
|
-
triggersCount
|
|
602
|
-
updatedAt
|
|
551
|
+
}[] | undefined;
|
|
552
|
+
appUrl?: string | undefined;
|
|
553
|
+
createdAt?: string | undefined;
|
|
554
|
+
toolsCount?: number | undefined;
|
|
555
|
+
triggersCount?: number | undefined;
|
|
556
|
+
updatedAt?: string | undefined;
|
|
603
557
|
}, {
|
|
604
|
-
logo
|
|
605
|
-
description
|
|
606
|
-
categories
|
|
558
|
+
logo?: string | undefined;
|
|
559
|
+
description?: string | undefined;
|
|
560
|
+
categories?: {
|
|
561
|
+
slug: string;
|
|
607
562
|
name: string;
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
createdAt
|
|
611
|
-
toolsCount
|
|
612
|
-
triggersCount
|
|
613
|
-
updatedAt
|
|
563
|
+
}[] | undefined;
|
|
564
|
+
appUrl?: string | undefined;
|
|
565
|
+
createdAt?: string | undefined;
|
|
566
|
+
toolsCount?: number | undefined;
|
|
567
|
+
triggersCount?: number | undefined;
|
|
568
|
+
updatedAt?: string | undefined;
|
|
614
569
|
}>;
|
|
615
570
|
isLocalToolkit: z.ZodBoolean;
|
|
616
571
|
authSchemes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -620,16 +575,17 @@ declare const ToolKitListResponseSchema: z.ZodObject<{
|
|
|
620
575
|
slug: string;
|
|
621
576
|
name: string;
|
|
622
577
|
meta: {
|
|
623
|
-
logo
|
|
624
|
-
description
|
|
625
|
-
categories
|
|
578
|
+
logo?: string | undefined;
|
|
579
|
+
description?: string | undefined;
|
|
580
|
+
categories?: {
|
|
581
|
+
slug: string;
|
|
626
582
|
name: string;
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
createdAt
|
|
630
|
-
toolsCount
|
|
631
|
-
triggersCount
|
|
632
|
-
updatedAt
|
|
583
|
+
}[] | undefined;
|
|
584
|
+
appUrl?: string | undefined;
|
|
585
|
+
createdAt?: string | undefined;
|
|
586
|
+
toolsCount?: number | undefined;
|
|
587
|
+
triggersCount?: number | undefined;
|
|
588
|
+
updatedAt?: string | undefined;
|
|
633
589
|
};
|
|
634
590
|
isLocalToolkit: boolean;
|
|
635
591
|
authSchemes?: string[] | undefined;
|
|
@@ -639,16 +595,17 @@ declare const ToolKitListResponseSchema: z.ZodObject<{
|
|
|
639
595
|
slug: string;
|
|
640
596
|
name: string;
|
|
641
597
|
meta: {
|
|
642
|
-
logo
|
|
643
|
-
description
|
|
644
|
-
categories
|
|
598
|
+
logo?: string | undefined;
|
|
599
|
+
description?: string | undefined;
|
|
600
|
+
categories?: {
|
|
601
|
+
slug: string;
|
|
645
602
|
name: string;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
createdAt
|
|
649
|
-
toolsCount
|
|
650
|
-
triggersCount
|
|
651
|
-
updatedAt
|
|
603
|
+
}[] | undefined;
|
|
604
|
+
appUrl?: string | undefined;
|
|
605
|
+
createdAt?: string | undefined;
|
|
606
|
+
toolsCount?: number | undefined;
|
|
607
|
+
triggersCount?: number | undefined;
|
|
608
|
+
updatedAt?: string | undefined;
|
|
652
609
|
};
|
|
653
610
|
isLocalToolkit: boolean;
|
|
654
611
|
authSchemes?: string[] | undefined;
|
|
@@ -662,16 +619,17 @@ declare const ToolKitListResponseSchema: z.ZodObject<{
|
|
|
662
619
|
slug: string;
|
|
663
620
|
name: string;
|
|
664
621
|
meta: {
|
|
665
|
-
logo
|
|
666
|
-
description
|
|
667
|
-
categories
|
|
622
|
+
logo?: string | undefined;
|
|
623
|
+
description?: string | undefined;
|
|
624
|
+
categories?: {
|
|
625
|
+
slug: string;
|
|
668
626
|
name: string;
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
createdAt
|
|
672
|
-
toolsCount
|
|
673
|
-
triggersCount
|
|
674
|
-
updatedAt
|
|
627
|
+
}[] | undefined;
|
|
628
|
+
appUrl?: string | undefined;
|
|
629
|
+
createdAt?: string | undefined;
|
|
630
|
+
toolsCount?: number | undefined;
|
|
631
|
+
triggersCount?: number | undefined;
|
|
632
|
+
updatedAt?: string | undefined;
|
|
675
633
|
};
|
|
676
634
|
isLocalToolkit: boolean;
|
|
677
635
|
authSchemes?: string[] | undefined;
|
|
@@ -685,16 +643,17 @@ declare const ToolKitListResponseSchema: z.ZodObject<{
|
|
|
685
643
|
slug: string;
|
|
686
644
|
name: string;
|
|
687
645
|
meta: {
|
|
688
|
-
logo
|
|
689
|
-
description
|
|
690
|
-
categories
|
|
646
|
+
logo?: string | undefined;
|
|
647
|
+
description?: string | undefined;
|
|
648
|
+
categories?: {
|
|
649
|
+
slug: string;
|
|
691
650
|
name: string;
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
createdAt
|
|
695
|
-
toolsCount
|
|
696
|
-
triggersCount
|
|
697
|
-
updatedAt
|
|
651
|
+
}[] | undefined;
|
|
652
|
+
appUrl?: string | undefined;
|
|
653
|
+
createdAt?: string | undefined;
|
|
654
|
+
toolsCount?: number | undefined;
|
|
655
|
+
triggersCount?: number | undefined;
|
|
656
|
+
updatedAt?: string | undefined;
|
|
698
657
|
};
|
|
699
658
|
isLocalToolkit: boolean;
|
|
700
659
|
authSchemes?: string[] | undefined;
|
|
@@ -709,51 +668,54 @@ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
|
|
|
709
668
|
name: z.ZodString;
|
|
710
669
|
slug: z.ZodString;
|
|
711
670
|
meta: z.ZodObject<{
|
|
712
|
-
categories: z.ZodArray<z.ZodObject<{
|
|
713
|
-
|
|
671
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
672
|
+
slug: z.ZodString;
|
|
714
673
|
name: z.ZodString;
|
|
715
674
|
}, "strip", z.ZodTypeAny, {
|
|
675
|
+
slug: string;
|
|
716
676
|
name: string;
|
|
717
|
-
id: string;
|
|
718
677
|
}, {
|
|
678
|
+
slug: string;
|
|
719
679
|
name: string;
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
createdAt: z.ZodString
|
|
723
|
-
description: z.ZodString
|
|
724
|
-
logo: z.ZodString
|
|
725
|
-
toolsCount: z.ZodNumber
|
|
726
|
-
triggersCount: z.ZodNumber
|
|
727
|
-
updatedAt: z.ZodString
|
|
680
|
+
}>, "many">>;
|
|
681
|
+
appUrl: z.ZodOptional<z.ZodString>;
|
|
682
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
683
|
+
description: z.ZodOptional<z.ZodString>;
|
|
684
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
685
|
+
toolsCount: z.ZodOptional<z.ZodNumber>;
|
|
686
|
+
triggersCount: z.ZodOptional<z.ZodNumber>;
|
|
687
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
728
688
|
}, "strip", z.ZodTypeAny, {
|
|
729
|
-
logo
|
|
730
|
-
description
|
|
731
|
-
categories
|
|
689
|
+
logo?: string | undefined;
|
|
690
|
+
description?: string | undefined;
|
|
691
|
+
categories?: {
|
|
692
|
+
slug: string;
|
|
732
693
|
name: string;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
createdAt
|
|
736
|
-
toolsCount
|
|
737
|
-
triggersCount
|
|
738
|
-
updatedAt
|
|
694
|
+
}[] | undefined;
|
|
695
|
+
appUrl?: string | undefined;
|
|
696
|
+
createdAt?: string | undefined;
|
|
697
|
+
toolsCount?: number | undefined;
|
|
698
|
+
triggersCount?: number | undefined;
|
|
699
|
+
updatedAt?: string | undefined;
|
|
739
700
|
}, {
|
|
740
|
-
logo
|
|
741
|
-
description
|
|
742
|
-
categories
|
|
701
|
+
logo?: string | undefined;
|
|
702
|
+
description?: string | undefined;
|
|
703
|
+
categories?: {
|
|
704
|
+
slug: string;
|
|
743
705
|
name: string;
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
createdAt
|
|
747
|
-
toolsCount
|
|
748
|
-
triggersCount
|
|
749
|
-
updatedAt
|
|
706
|
+
}[] | undefined;
|
|
707
|
+
appUrl?: string | undefined;
|
|
708
|
+
createdAt?: string | undefined;
|
|
709
|
+
toolsCount?: number | undefined;
|
|
710
|
+
triggersCount?: number | undefined;
|
|
711
|
+
updatedAt?: string | undefined;
|
|
750
712
|
}>;
|
|
751
713
|
isLocalToolkit: z.ZodBoolean;
|
|
752
714
|
composioManagedAuthSchemes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
753
715
|
authConfigDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
754
716
|
name: z.ZodString;
|
|
755
717
|
mode: z.ZodString;
|
|
756
|
-
fields: z.
|
|
718
|
+
fields: z.ZodObject<{
|
|
757
719
|
authConfigCreation: z.ZodObject<{
|
|
758
720
|
optional: z.ZodArray<z.ZodObject<{
|
|
759
721
|
name: z.ZodString;
|
|
@@ -932,13 +894,13 @@ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
|
|
|
932
894
|
default?: string | null | undefined;
|
|
933
895
|
}[];
|
|
934
896
|
};
|
|
935
|
-
}
|
|
897
|
+
}>;
|
|
936
898
|
proxy: z.ZodObject<{
|
|
937
|
-
|
|
899
|
+
baseUrl: z.ZodString;
|
|
938
900
|
}, "strip", z.ZodTypeAny, {
|
|
939
|
-
|
|
901
|
+
baseUrl: string;
|
|
940
902
|
}, {
|
|
941
|
-
|
|
903
|
+
baseUrl: string;
|
|
942
904
|
}>;
|
|
943
905
|
}, "strip", z.ZodTypeAny, {
|
|
944
906
|
name: string;
|
|
@@ -972,9 +934,9 @@ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
|
|
|
972
934
|
default?: string | null | undefined;
|
|
973
935
|
}[];
|
|
974
936
|
};
|
|
975
|
-
}
|
|
937
|
+
};
|
|
976
938
|
proxy: {
|
|
977
|
-
|
|
939
|
+
baseUrl: string;
|
|
978
940
|
};
|
|
979
941
|
}, {
|
|
980
942
|
name: string;
|
|
@@ -1008,25 +970,26 @@ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
|
|
|
1008
970
|
default?: string | null | undefined;
|
|
1009
971
|
}[];
|
|
1010
972
|
};
|
|
1011
|
-
}
|
|
973
|
+
};
|
|
1012
974
|
proxy: {
|
|
1013
|
-
|
|
975
|
+
baseUrl: string;
|
|
1014
976
|
};
|
|
1015
977
|
}>, "many">>;
|
|
1016
978
|
}, "strip", z.ZodTypeAny, {
|
|
1017
979
|
slug: string;
|
|
1018
980
|
name: string;
|
|
1019
981
|
meta: {
|
|
1020
|
-
logo
|
|
1021
|
-
description
|
|
1022
|
-
categories
|
|
982
|
+
logo?: string | undefined;
|
|
983
|
+
description?: string | undefined;
|
|
984
|
+
categories?: {
|
|
985
|
+
slug: string;
|
|
1023
986
|
name: string;
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
createdAt
|
|
1027
|
-
toolsCount
|
|
1028
|
-
triggersCount
|
|
1029
|
-
updatedAt
|
|
987
|
+
}[] | undefined;
|
|
988
|
+
appUrl?: string | undefined;
|
|
989
|
+
createdAt?: string | undefined;
|
|
990
|
+
toolsCount?: number | undefined;
|
|
991
|
+
triggersCount?: number | undefined;
|
|
992
|
+
updatedAt?: string | undefined;
|
|
1030
993
|
};
|
|
1031
994
|
isLocalToolkit: boolean;
|
|
1032
995
|
composioManagedAuthSchemes?: string[] | undefined;
|
|
@@ -1062,25 +1025,26 @@ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
|
|
|
1062
1025
|
default?: string | null | undefined;
|
|
1063
1026
|
}[];
|
|
1064
1027
|
};
|
|
1065
|
-
}
|
|
1028
|
+
};
|
|
1066
1029
|
proxy: {
|
|
1067
|
-
|
|
1030
|
+
baseUrl: string;
|
|
1068
1031
|
};
|
|
1069
1032
|
}[] | undefined;
|
|
1070
1033
|
}, {
|
|
1071
1034
|
slug: string;
|
|
1072
1035
|
name: string;
|
|
1073
1036
|
meta: {
|
|
1074
|
-
logo
|
|
1075
|
-
description
|
|
1076
|
-
categories
|
|
1037
|
+
logo?: string | undefined;
|
|
1038
|
+
description?: string | undefined;
|
|
1039
|
+
categories?: {
|
|
1040
|
+
slug: string;
|
|
1077
1041
|
name: string;
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
createdAt
|
|
1081
|
-
toolsCount
|
|
1082
|
-
triggersCount
|
|
1083
|
-
updatedAt
|
|
1042
|
+
}[] | undefined;
|
|
1043
|
+
appUrl?: string | undefined;
|
|
1044
|
+
createdAt?: string | undefined;
|
|
1045
|
+
toolsCount?: number | undefined;
|
|
1046
|
+
triggersCount?: number | undefined;
|
|
1047
|
+
updatedAt?: string | undefined;
|
|
1084
1048
|
};
|
|
1085
1049
|
isLocalToolkit: boolean;
|
|
1086
1050
|
composioManagedAuthSchemes?: string[] | undefined;
|
|
@@ -1116,9 +1080,9 @@ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
|
|
|
1116
1080
|
default?: string | null | undefined;
|
|
1117
1081
|
}[];
|
|
1118
1082
|
};
|
|
1119
|
-
}
|
|
1083
|
+
};
|
|
1120
1084
|
proxy: {
|
|
1121
|
-
|
|
1085
|
+
baseUrl: string;
|
|
1122
1086
|
};
|
|
1123
1087
|
}[] | undefined;
|
|
1124
1088
|
}>;
|
|
@@ -1153,6 +1117,136 @@ declare const ToolkitRetrieveCategoriesResponseSchema: z.ZodObject<{
|
|
|
1153
1117
|
}>;
|
|
1154
1118
|
type ToolkitRetrieveCategoriesResponse = z.infer<typeof ToolkitRetrieveCategoriesResponseSchema>;
|
|
1155
1119
|
|
|
1120
|
+
/**
|
|
1121
|
+
* Connected Account create parameters
|
|
1122
|
+
*/
|
|
1123
|
+
declare const ConnectedAccountStatuses: {
|
|
1124
|
+
readonly ACTIVE: "ACTIVE";
|
|
1125
|
+
readonly INACTIVE: "INACTIVE";
|
|
1126
|
+
readonly PENDING: "DELETED";
|
|
1127
|
+
readonly INITIATED: "INITIATED";
|
|
1128
|
+
readonly EXPIRED: "EXPIRED";
|
|
1129
|
+
readonly FAILED: "FAILED";
|
|
1130
|
+
};
|
|
1131
|
+
type ConnectedAccountStatus = (typeof ConnectedAccountStatuses)[keyof typeof ConnectedAccountStatuses];
|
|
1132
|
+
type CreateConnectedAccountOptions = z.infer<typeof CreateConnectedAccountOptionsSchema>;
|
|
1133
|
+
declare const CreateConnectedAccountOptionsSchema: z.ZodObject<{
|
|
1134
|
+
redirectUrl: z.ZodOptional<z.ZodString>;
|
|
1135
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1136
|
+
}, "strip", z.ZodTypeAny, {
|
|
1137
|
+
data?: Record<string, unknown> | undefined;
|
|
1138
|
+
redirectUrl?: string | undefined;
|
|
1139
|
+
}, {
|
|
1140
|
+
data?: Record<string, unknown> | undefined;
|
|
1141
|
+
redirectUrl?: string | undefined;
|
|
1142
|
+
}>;
|
|
1143
|
+
type CreateConnectedAccountOptionsSchema = z.infer<typeof CreateConnectedAccountOptionsSchema>;
|
|
1144
|
+
declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
|
|
1145
|
+
id: z.ZodString;
|
|
1146
|
+
authConfig: z.ZodObject<{
|
|
1147
|
+
id: z.ZodString;
|
|
1148
|
+
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"]>;
|
|
1149
|
+
isComposioManaged: z.ZodBoolean;
|
|
1150
|
+
isDisabled: z.ZodBoolean;
|
|
1151
|
+
}, "strip", z.ZodTypeAny, {
|
|
1152
|
+
id: string;
|
|
1153
|
+
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1154
|
+
isComposioManaged: boolean;
|
|
1155
|
+
isDisabled: boolean;
|
|
1156
|
+
}, {
|
|
1157
|
+
id: string;
|
|
1158
|
+
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1159
|
+
isComposioManaged: boolean;
|
|
1160
|
+
isDisabled: boolean;
|
|
1161
|
+
}>;
|
|
1162
|
+
userId: z.ZodString;
|
|
1163
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1164
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1165
|
+
status: z.ZodEnum<["ACTIVE", "INACTIVE", "DELETED", "INITIATED", "EXPIRED", "FAILED"]>;
|
|
1166
|
+
statusReason: z.ZodNullable<z.ZodString>;
|
|
1167
|
+
toolkit: z.ZodObject<{
|
|
1168
|
+
slug: z.ZodString;
|
|
1169
|
+
}, "strip", z.ZodTypeAny, {
|
|
1170
|
+
slug: string;
|
|
1171
|
+
}, {
|
|
1172
|
+
slug: string;
|
|
1173
|
+
}>;
|
|
1174
|
+
testRequestEndpoint: z.ZodOptional<z.ZodString>;
|
|
1175
|
+
isDisabled: z.ZodBoolean;
|
|
1176
|
+
createdAt: z.ZodString;
|
|
1177
|
+
updatedAt: z.ZodString;
|
|
1178
|
+
}, "strip", z.ZodTypeAny, {
|
|
1179
|
+
params: Record<string, unknown>;
|
|
1180
|
+
status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
|
|
1181
|
+
toolkit: {
|
|
1182
|
+
slug: string;
|
|
1183
|
+
};
|
|
1184
|
+
userId: string;
|
|
1185
|
+
data: Record<string, unknown>;
|
|
1186
|
+
createdAt: string;
|
|
1187
|
+
updatedAt: string;
|
|
1188
|
+
id: string;
|
|
1189
|
+
authConfig: {
|
|
1190
|
+
id: string;
|
|
1191
|
+
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1192
|
+
isComposioManaged: boolean;
|
|
1193
|
+
isDisabled: boolean;
|
|
1194
|
+
};
|
|
1195
|
+
isDisabled: boolean;
|
|
1196
|
+
statusReason: string | null;
|
|
1197
|
+
testRequestEndpoint?: string | undefined;
|
|
1198
|
+
}, {
|
|
1199
|
+
params: Record<string, unknown>;
|
|
1200
|
+
status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
|
|
1201
|
+
toolkit: {
|
|
1202
|
+
slug: string;
|
|
1203
|
+
};
|
|
1204
|
+
userId: string;
|
|
1205
|
+
data: Record<string, unknown>;
|
|
1206
|
+
createdAt: string;
|
|
1207
|
+
updatedAt: string;
|
|
1208
|
+
id: string;
|
|
1209
|
+
authConfig: {
|
|
1210
|
+
id: string;
|
|
1211
|
+
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1212
|
+
isComposioManaged: boolean;
|
|
1213
|
+
isDisabled: boolean;
|
|
1214
|
+
};
|
|
1215
|
+
isDisabled: boolean;
|
|
1216
|
+
statusReason: string | null;
|
|
1217
|
+
testRequestEndpoint?: string | undefined;
|
|
1218
|
+
}>;
|
|
1219
|
+
type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveResponseSchema>;
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* @fileoverview Connection request class for Composio SDK, used to manage an initiated connection request.
|
|
1223
|
+
*
|
|
1224
|
+
* @author Musthaq Ahamad <musthaq@composio.dev>
|
|
1225
|
+
* @date 2025-05-05
|
|
1226
|
+
* @module ConnectionRequest
|
|
1227
|
+
*/
|
|
1228
|
+
|
|
1229
|
+
declare class ConnectionRequest {
|
|
1230
|
+
private client;
|
|
1231
|
+
private connectedAccountId;
|
|
1232
|
+
private connectedAccountStatus;
|
|
1233
|
+
redirectUrl?: string | null;
|
|
1234
|
+
constructor(client: ComposioClient, connectedAccountId: string, connectedAccountStatus: ConnectedAccountStatus, redirectUrl?: string | null);
|
|
1235
|
+
/**
|
|
1236
|
+
* Transform the response from the Composio API to the SDK format
|
|
1237
|
+
* @param response
|
|
1238
|
+
* @returns
|
|
1239
|
+
*/
|
|
1240
|
+
private transformResponse;
|
|
1241
|
+
/**
|
|
1242
|
+
* Wait for the connection to be established.
|
|
1243
|
+
* The function will poll the Composio API every second until the connection is established or the timeout is reached.
|
|
1244
|
+
* @param {number} timeout - The time in milliseconds to wait for the connection to be established. Default is 30 seconds.
|
|
1245
|
+
* @returns
|
|
1246
|
+
*/
|
|
1247
|
+
waitForConnection(timeout?: number): Promise<ConnectedAccountRetrieveResponse>;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1156
1250
|
/**
|
|
1157
1251
|
* Toolkits class
|
|
1158
1252
|
*
|
|
@@ -1196,6 +1290,15 @@ declare class Toolkits {
|
|
|
1196
1290
|
* @returns {Promise<ToolkitRetrieveCategoriesResponse>} List of categories
|
|
1197
1291
|
*/
|
|
1198
1292
|
listCategories(): Promise<ToolkitRetrieveCategoriesResponse>;
|
|
1293
|
+
/**
|
|
1294
|
+
* Authorizes a user to use a toolkit.
|
|
1295
|
+
* This method will create an auth config if one doesn't exist and initiate a connection request.
|
|
1296
|
+
* @param {string} userId - The user id of the user to authorize
|
|
1297
|
+
* @param {string} toolkitSlug - The slug of the toolkit to authorize
|
|
1298
|
+
* @param {string} authConfigId - The id of the auth config to use
|
|
1299
|
+
* @returns {Promise<ConnectionRequest>} The connection request object
|
|
1300
|
+
*/
|
|
1301
|
+
authorize(userId: string, toolkitSlug: string, authConfigId?: string): Promise<ConnectionRequest>;
|
|
1199
1302
|
}
|
|
1200
1303
|
|
|
1201
1304
|
type TriggerStatusEnum = "enable" | "disable";
|
|
@@ -1688,135 +1791,6 @@ declare class AuthConfigs {
|
|
|
1688
1791
|
disable(nanoid: string): Promise<AuthConfigUpdateStatusResponse>;
|
|
1689
1792
|
}
|
|
1690
1793
|
|
|
1691
|
-
/**
|
|
1692
|
-
* Connected Account create parameters
|
|
1693
|
-
*/
|
|
1694
|
-
declare const ConnectedAccountStatuses: {
|
|
1695
|
-
readonly ACTIVE: "ACTIVE";
|
|
1696
|
-
readonly INACTIVE: "INACTIVE";
|
|
1697
|
-
readonly PENDING: "DELETED";
|
|
1698
|
-
readonly INITIATED: "INITIATED";
|
|
1699
|
-
readonly EXPIRED: "EXPIRED";
|
|
1700
|
-
readonly FAILED: "FAILED";
|
|
1701
|
-
};
|
|
1702
|
-
type ConnectedAccountStatus = (typeof ConnectedAccountStatuses)[keyof typeof ConnectedAccountStatuses];
|
|
1703
|
-
type CreateConnectedAccountOptions = z.infer<typeof CreateConnectedAccountOptionsSchema>;
|
|
1704
|
-
declare const CreateConnectedAccountOptionsSchema: z.ZodObject<{
|
|
1705
|
-
redirectUrl: z.ZodOptional<z.ZodString>;
|
|
1706
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1707
|
-
}, "strip", z.ZodTypeAny, {
|
|
1708
|
-
data?: Record<string, unknown> | undefined;
|
|
1709
|
-
redirectUrl?: string | undefined;
|
|
1710
|
-
}, {
|
|
1711
|
-
data?: Record<string, unknown> | undefined;
|
|
1712
|
-
redirectUrl?: string | undefined;
|
|
1713
|
-
}>;
|
|
1714
|
-
type CreateConnectedAccountOptionsSchema = z.infer<typeof CreateConnectedAccountOptionsSchema>;
|
|
1715
|
-
declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
|
|
1716
|
-
id: z.ZodString;
|
|
1717
|
-
authConfig: z.ZodObject<{
|
|
1718
|
-
id: z.ZodString;
|
|
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"]>;
|
|
1720
|
-
isComposioManaged: z.ZodBoolean;
|
|
1721
|
-
isDisabled: z.ZodBoolean;
|
|
1722
|
-
}, "strip", z.ZodTypeAny, {
|
|
1723
|
-
id: string;
|
|
1724
|
-
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1725
|
-
isComposioManaged: boolean;
|
|
1726
|
-
isDisabled: boolean;
|
|
1727
|
-
}, {
|
|
1728
|
-
id: string;
|
|
1729
|
-
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1730
|
-
isComposioManaged: boolean;
|
|
1731
|
-
isDisabled: boolean;
|
|
1732
|
-
}>;
|
|
1733
|
-
userId: z.ZodString;
|
|
1734
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1735
|
-
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1736
|
-
status: z.ZodEnum<["ACTIVE", "INACTIVE", "DELETED", "INITIATED", "EXPIRED", "FAILED"]>;
|
|
1737
|
-
statusReason: z.ZodNullable<z.ZodString>;
|
|
1738
|
-
toolkit: z.ZodObject<{
|
|
1739
|
-
slug: z.ZodString;
|
|
1740
|
-
}, "strip", z.ZodTypeAny, {
|
|
1741
|
-
slug: string;
|
|
1742
|
-
}, {
|
|
1743
|
-
slug: string;
|
|
1744
|
-
}>;
|
|
1745
|
-
testRequestEndpoint: z.ZodOptional<z.ZodString>;
|
|
1746
|
-
isDisabled: z.ZodBoolean;
|
|
1747
|
-
createdAt: z.ZodString;
|
|
1748
|
-
updatedAt: z.ZodString;
|
|
1749
|
-
}, "strip", z.ZodTypeAny, {
|
|
1750
|
-
params: Record<string, unknown>;
|
|
1751
|
-
status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
|
|
1752
|
-
toolkit: {
|
|
1753
|
-
slug: string;
|
|
1754
|
-
};
|
|
1755
|
-
userId: string;
|
|
1756
|
-
data: Record<string, unknown>;
|
|
1757
|
-
id: string;
|
|
1758
|
-
createdAt: string;
|
|
1759
|
-
updatedAt: string;
|
|
1760
|
-
authConfig: {
|
|
1761
|
-
id: string;
|
|
1762
|
-
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1763
|
-
isComposioManaged: boolean;
|
|
1764
|
-
isDisabled: boolean;
|
|
1765
|
-
};
|
|
1766
|
-
isDisabled: boolean;
|
|
1767
|
-
statusReason: string | null;
|
|
1768
|
-
testRequestEndpoint?: string | undefined;
|
|
1769
|
-
}, {
|
|
1770
|
-
params: Record<string, unknown>;
|
|
1771
|
-
status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
|
|
1772
|
-
toolkit: {
|
|
1773
|
-
slug: string;
|
|
1774
|
-
};
|
|
1775
|
-
userId: string;
|
|
1776
|
-
data: Record<string, unknown>;
|
|
1777
|
-
id: string;
|
|
1778
|
-
createdAt: string;
|
|
1779
|
-
updatedAt: string;
|
|
1780
|
-
authConfig: {
|
|
1781
|
-
id: string;
|
|
1782
|
-
authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
|
|
1783
|
-
isComposioManaged: boolean;
|
|
1784
|
-
isDisabled: boolean;
|
|
1785
|
-
};
|
|
1786
|
-
isDisabled: boolean;
|
|
1787
|
-
statusReason: string | null;
|
|
1788
|
-
testRequestEndpoint?: string | undefined;
|
|
1789
|
-
}>;
|
|
1790
|
-
type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveResponseSchema>;
|
|
1791
|
-
|
|
1792
|
-
/**
|
|
1793
|
-
* @fileoverview Connection request class for Composio SDK, used to manage an initiated connection request.
|
|
1794
|
-
*
|
|
1795
|
-
* @author Musthaq Ahamad <musthaq@composio.dev>
|
|
1796
|
-
* @date 2025-05-05
|
|
1797
|
-
* @module ConnectionRequest
|
|
1798
|
-
*/
|
|
1799
|
-
|
|
1800
|
-
declare class ConnectionRequest {
|
|
1801
|
-
private client;
|
|
1802
|
-
private connectedAccountId;
|
|
1803
|
-
private connectedAccountStatus;
|
|
1804
|
-
constructor(client: ComposioClient, connectedAccountId: string, connectedAccountStatus: ConnectedAccountStatus);
|
|
1805
|
-
/**
|
|
1806
|
-
* Transform the response from the Composio API to the SDK format
|
|
1807
|
-
* @param response
|
|
1808
|
-
* @returns
|
|
1809
|
-
*/
|
|
1810
|
-
private transformResponse;
|
|
1811
|
-
/**
|
|
1812
|
-
* Wait for the connection to be established.
|
|
1813
|
-
* The function will poll the Composio API every second until the connection is established or the timeout is reached.
|
|
1814
|
-
* @param {number} timeout - The time in milliseconds to wait for the connection to be established. Default is 30 seconds.
|
|
1815
|
-
* @returns
|
|
1816
|
-
*/
|
|
1817
|
-
waitForConnection(timeout?: number): Promise<ConnectedAccountRetrieveResponse>;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
1794
|
/**
|
|
1821
1795
|
* @fileoverview Connected accounts class for Composio SDK, used to manage connected accounts of a user.
|
|
1822
1796
|
*
|
|
@@ -1859,7 +1833,7 @@ declare class ConnectedAccounts {
|
|
|
1859
1833
|
*
|
|
1860
1834
|
* @link https://docs.composio.dev/reference/connected-accounts/create-connected-account
|
|
1861
1835
|
*/
|
|
1862
|
-
|
|
1836
|
+
initiate(userId: string, authConfigId: string, options?: CreateConnectedAccountOptions): Promise<ConnectionRequest>;
|
|
1863
1837
|
/**
|
|
1864
1838
|
* Get a connected account by nanoid
|
|
1865
1839
|
* @param {string} nanoid - Unique identifier of the connected account
|
|
@@ -1949,7 +1923,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
|
|
|
1949
1923
|
* @param {string} userId - The user id.
|
|
1950
1924
|
* @returns {Promise<string>} The result of the tool call.
|
|
1951
1925
|
*/
|
|
1952
|
-
executeToolCall(userId: string, tool: OpenAI.ChatCompletionMessageToolCall, options
|
|
1926
|
+
executeToolCall(userId: string, tool: OpenAI.ChatCompletionMessageToolCall, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string>;
|
|
1953
1927
|
/**
|
|
1954
1928
|
* Handle the tool call from the assistant.
|
|
1955
1929
|
*
|
|
@@ -1957,7 +1931,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
|
|
|
1957
1931
|
* @param {string} userId - The user id.
|
|
1958
1932
|
* @returns {Promise<string[]>} The results of the tool call.
|
|
1959
1933
|
*/
|
|
1960
|
-
handleToolCall(userId: string, chatCompletion: OpenAI.ChatCompletion, options
|
|
1934
|
+
handleToolCall(userId: string, chatCompletion: OpenAI.ChatCompletion, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string[]>;
|
|
1961
1935
|
/**
|
|
1962
1936
|
* Handles all the tool calls from the assistant.
|
|
1963
1937
|
*
|
|
@@ -1965,7 +1939,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
|
|
|
1965
1939
|
* @param {string} userId - The user id.
|
|
1966
1940
|
* @returns {Promise<OpenAI.Beta.Threads.Runs.RunSubmitToolOutputsParams.ToolOutput[]>} The tool outputs.
|
|
1967
1941
|
*/
|
|
1968
|
-
handleAssistantMessage(userId: string, run: OpenAI.Beta.Threads.Run, options
|
|
1942
|
+
handleAssistantMessage(userId: string, run: OpenAI.Beta.Threads.Run, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<OpenAI.Beta.Threads.Runs.RunSubmitToolOutputsParams.ToolOutput[]>;
|
|
1969
1943
|
/**
|
|
1970
1944
|
* Waits for the assistant stream and handles the tool calls.
|
|
1971
1945
|
*
|
|
@@ -1975,7 +1949,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
|
|
|
1975
1949
|
* @param {string} userId - The user id.
|
|
1976
1950
|
* @returns {AsyncGenerator<OpenAI.Beta.Assistants.AssistantStreamEvent, void, unknown>} The run stream.
|
|
1977
1951
|
*/
|
|
1978
|
-
waitAndHandleAssistantStreamToolCalls(userId: string, client: OpenAI, runStream: Stream<OpenAI.Beta.Assistants.AssistantStreamEvent>, thread: OpenAI.Beta.Threads.Thread, options
|
|
1952
|
+
waitAndHandleAssistantStreamToolCalls(userId: string, client: OpenAI, runStream: Stream<OpenAI.Beta.Assistants.AssistantStreamEvent>, thread: OpenAI.Beta.Threads.Thread, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): AsyncGenerator<OpenAI.Beta.Assistants.AssistantStreamEvent, void, unknown>;
|
|
1979
1953
|
/**
|
|
1980
1954
|
* Waits for the assistant tool calls and handles them.
|
|
1981
1955
|
*
|
|
@@ -1985,7 +1959,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
|
|
|
1985
1959
|
* @param {string} userId - The user id.
|
|
1986
1960
|
* @returns {Promise<OpenAI.Beta.Threads.Run>} The run object.
|
|
1987
1961
|
*/
|
|
1988
|
-
waitAndHandleAssistantToolCalls(userId: string, client: OpenAI, run: OpenAI.Beta.Threads.Run, thread: OpenAI.Beta.Threads.Thread, options
|
|
1962
|
+
waitAndHandleAssistantToolCalls(userId: string, client: OpenAI, run: OpenAI.Beta.Threads.Run, thread: OpenAI.Beta.Threads.Thread, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<OpenAI.Beta.Threads.Runs.Run>;
|
|
1989
1963
|
}
|
|
1990
1964
|
|
|
1991
1965
|
type ComposioConfig<TToolset extends BaseComposioToolset<unknown, unknown> = OpenAIToolset> = {
|
|
@@ -2022,7 +1996,7 @@ declare class Composio<TToolset extends BaseComposioToolset<unknown, unknown> =
|
|
|
2022
1996
|
authConfigs: AuthConfigs;
|
|
2023
1997
|
createAuthConfig: AuthConfigs['create'];
|
|
2024
1998
|
connectedAccounts: ConnectedAccounts;
|
|
2025
|
-
|
|
1999
|
+
initiateConnection: ConnectedAccounts['initiate'];
|
|
2026
2000
|
/**
|
|
2027
2001
|
* @param {Object} config Configuration for the Composio SDK.
|
|
2028
2002
|
* @param {string} config.apiKey The API key for the Composio SDK.
|