@composio/client 0.1.0-alpha.26 → 0.1.0-alpha.28
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/CHANGELOG.md +26 -0
- package/client.d.mts +6 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -3
- package/client.d.ts.map +1 -1
- package/client.js +16 -16
- package/client.js.map +1 -1
- package/client.mjs +16 -16
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +76 -20
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +76 -20
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/cli.d.mts +167 -0
- package/resources/cli.d.mts.map +1 -0
- package/resources/cli.d.ts +167 -0
- package/resources/cli.d.ts.map +1 -0
- package/resources/cli.js +55 -0
- package/resources/cli.js.map +1 -0
- package/resources/cli.mjs +51 -0
- package/resources/cli.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +4 -4
- package/resources/mcp/mcp.d.ts +4 -4
- package/resources/toolkits.d.mts +5 -0
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +5 -0
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/tools.d.mts +5 -1
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +5 -1
- package/resources/tools.d.ts.map +1 -1
- package/src/client.ts +34 -21
- package/src/resources/auth-configs.ts +89 -23
- package/src/resources/cli.ts +206 -0
- package/src/resources/index.ts +8 -0
- package/src/resources/mcp/mcp.ts +4 -4
- package/src/resources/toolkits.ts +6 -0
- package/src/resources/tools.ts +6 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/client.ts
CHANGED
|
@@ -33,6 +33,14 @@ import {
|
|
|
33
33
|
AuthConfigUpdateStatusResponse,
|
|
34
34
|
AuthConfigs,
|
|
35
35
|
} from './resources/auth-configs';
|
|
36
|
+
import {
|
|
37
|
+
Cli,
|
|
38
|
+
CliCreateSessionResponse,
|
|
39
|
+
CliGetSessionParams,
|
|
40
|
+
CliGetSessionResponse,
|
|
41
|
+
CliLinkSessionParams,
|
|
42
|
+
CliLinkSessionResponse,
|
|
43
|
+
} from './resources/cli';
|
|
36
44
|
import {
|
|
37
45
|
ConnectedAccountCreateParams,
|
|
38
46
|
ConnectedAccountCreateResponse,
|
|
@@ -293,7 +301,7 @@ export class Composio {
|
|
|
293
301
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
294
302
|
*/
|
|
295
303
|
withOptions(options: Partial<ClientOptions>): this {
|
|
296
|
-
|
|
304
|
+
const client = new (this.constructor as any as new (props: ClientOptions) => typeof this)({
|
|
297
305
|
...this._options,
|
|
298
306
|
environment: options.environment ? options.environment : undefined,
|
|
299
307
|
baseURL: options.environment ? undefined : this.baseURL,
|
|
@@ -306,6 +314,7 @@ export class Composio {
|
|
|
306
314
|
apiKey: this.apiKey,
|
|
307
315
|
...options,
|
|
308
316
|
});
|
|
317
|
+
return client;
|
|
309
318
|
}
|
|
310
319
|
|
|
311
320
|
/**
|
|
@@ -320,19 +329,10 @@ export class Composio {
|
|
|
320
329
|
}
|
|
321
330
|
|
|
322
331
|
protected validateHeaders({ values, nulls }: NullableHeaders) {
|
|
323
|
-
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
if (nulls.has('x-api-key')) {
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
throw new Error(
|
|
331
|
-
'Could not resolve authentication method. Expected the apiKey to be set. Or for the "x-api-key" headers to be explicitly omitted',
|
|
332
|
-
);
|
|
332
|
+
return;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined {
|
|
335
|
+
protected async authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
336
336
|
if (this.apiKey == null) {
|
|
337
337
|
return undefined;
|
|
338
338
|
}
|
|
@@ -451,7 +451,9 @@ export class Composio {
|
|
|
451
451
|
|
|
452
452
|
await this.prepareOptions(options);
|
|
453
453
|
|
|
454
|
-
const { req, url, timeout } = this.buildRequest(options, {
|
|
454
|
+
const { req, url, timeout } = await this.buildRequest(options, {
|
|
455
|
+
retryCount: maxRetries - retriesRemaining,
|
|
456
|
+
});
|
|
455
457
|
|
|
456
458
|
await this.prepareRequest(req, { url, options });
|
|
457
459
|
|
|
@@ -529,7 +531,7 @@ export class Composio {
|
|
|
529
531
|
} with status ${response.status} in ${headersTime - startTime}ms`;
|
|
530
532
|
|
|
531
533
|
if (!response.ok) {
|
|
532
|
-
const shouldRetry = this.shouldRetry(response);
|
|
534
|
+
const shouldRetry = await this.shouldRetry(response);
|
|
533
535
|
if (retriesRemaining && shouldRetry) {
|
|
534
536
|
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
535
537
|
|
|
@@ -628,7 +630,7 @@ export class Composio {
|
|
|
628
630
|
}
|
|
629
631
|
}
|
|
630
632
|
|
|
631
|
-
private shouldRetry(response: Response): boolean {
|
|
633
|
+
private async shouldRetry(response: Response): Promise<boolean> {
|
|
632
634
|
// Note this is not a standard header.
|
|
633
635
|
const shouldRetryHeader = response.headers.get('x-should-retry');
|
|
634
636
|
|
|
@@ -705,10 +707,10 @@ export class Composio {
|
|
|
705
707
|
return sleepSeconds * jitter * 1000;
|
|
706
708
|
}
|
|
707
709
|
|
|
708
|
-
buildRequest(
|
|
710
|
+
async buildRequest(
|
|
709
711
|
inputOptions: FinalRequestOptions,
|
|
710
712
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
711
|
-
): { req: FinalizedRequestInit; url: string; timeout: number } {
|
|
713
|
+
): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> {
|
|
712
714
|
const options = { ...inputOptions };
|
|
713
715
|
const { method, path, query, defaultBaseURL } = options;
|
|
714
716
|
|
|
@@ -716,7 +718,7 @@ export class Composio {
|
|
|
716
718
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
717
719
|
options.timeout = options.timeout ?? this.timeout;
|
|
718
720
|
const { bodyHeaders, body } = this.buildBody({ options });
|
|
719
|
-
const reqHeaders = this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
721
|
+
const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
720
722
|
|
|
721
723
|
const req: FinalizedRequestInit = {
|
|
722
724
|
method,
|
|
@@ -732,7 +734,7 @@ export class Composio {
|
|
|
732
734
|
return { req, url, timeout: options.timeout };
|
|
733
735
|
}
|
|
734
736
|
|
|
735
|
-
private buildHeaders({
|
|
737
|
+
private async buildHeaders({
|
|
736
738
|
options,
|
|
737
739
|
method,
|
|
738
740
|
bodyHeaders,
|
|
@@ -742,7 +744,7 @@ export class Composio {
|
|
|
742
744
|
method: HTTPMethod;
|
|
743
745
|
bodyHeaders: HeadersLike;
|
|
744
746
|
retryCount: number;
|
|
745
|
-
}): Headers {
|
|
747
|
+
}): Promise<Headers> {
|
|
746
748
|
let idempotencyHeaders: HeadersLike = {};
|
|
747
749
|
if (this.idempotencyHeader && method !== 'get') {
|
|
748
750
|
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
|
|
@@ -758,7 +760,7 @@ export class Composio {
|
|
|
758
760
|
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
759
761
|
...getPlatformHeaders(),
|
|
760
762
|
},
|
|
761
|
-
this.authHeaders(options),
|
|
763
|
+
await this.authHeaders(options),
|
|
762
764
|
this._options.defaultHeaders,
|
|
763
765
|
bodyHeaders,
|
|
764
766
|
options.headers,
|
|
@@ -836,6 +838,7 @@ export class Composio {
|
|
|
836
838
|
mcp: API.Mcp = new API.Mcp(this);
|
|
837
839
|
files: API.Files = new API.Files(this);
|
|
838
840
|
migration: API.Migration = new API.Migration(this);
|
|
841
|
+
cli: API.Cli = new API.Cli(this);
|
|
839
842
|
}
|
|
840
843
|
Composio.AuthConfigs = AuthConfigs;
|
|
841
844
|
Composio.ConnectedAccounts = ConnectedAccounts;
|
|
@@ -848,6 +851,7 @@ Composio.TriggersTypes = TriggersTypes;
|
|
|
848
851
|
Composio.Mcp = Mcp;
|
|
849
852
|
Composio.Files = Files;
|
|
850
853
|
Composio.Migration = Migration;
|
|
854
|
+
Composio.Cli = Cli;
|
|
851
855
|
export declare namespace Composio {
|
|
852
856
|
export type RequestOptions = Opts.RequestOptions;
|
|
853
857
|
|
|
@@ -959,4 +963,13 @@ export declare namespace Composio {
|
|
|
959
963
|
type MigrationRetrieveNanoidResponse as MigrationRetrieveNanoidResponse,
|
|
960
964
|
type MigrationRetrieveNanoidParams as MigrationRetrieveNanoidParams,
|
|
961
965
|
};
|
|
966
|
+
|
|
967
|
+
export {
|
|
968
|
+
Cli as Cli,
|
|
969
|
+
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
970
|
+
type CliGetSessionResponse as CliGetSessionResponse,
|
|
971
|
+
type CliLinkSessionResponse as CliLinkSessionResponse,
|
|
972
|
+
type CliGetSessionParams as CliGetSessionParams,
|
|
973
|
+
type CliLinkSessionParams as CliLinkSessionParams,
|
|
974
|
+
};
|
|
962
975
|
}
|
|
@@ -166,6 +166,8 @@ export interface AuthConfigRetrieveResponse {
|
|
|
166
166
|
*/
|
|
167
167
|
status: 'ENABLED' | 'DISABLED';
|
|
168
168
|
|
|
169
|
+
tool_access_config: AuthConfigRetrieveResponse.ToolAccessConfig;
|
|
170
|
+
|
|
169
171
|
/**
|
|
170
172
|
* Information about the associated integration
|
|
171
173
|
*/
|
|
@@ -227,11 +229,6 @@ export interface AuthConfigRetrieveResponse {
|
|
|
227
229
|
* ISO 8601 date-time when the auth config was last updated
|
|
228
230
|
*/
|
|
229
231
|
last_updated_at?: string;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* List of tool IDs this auth config is restricted to use with
|
|
233
|
-
*/
|
|
234
|
-
restrict_to_following_tools?: Array<string>;
|
|
235
232
|
}
|
|
236
233
|
|
|
237
234
|
export namespace AuthConfigRetrieveResponse {
|
|
@@ -260,6 +257,20 @@ export namespace AuthConfigRetrieveResponse {
|
|
|
260
257
|
toolkit_id?: string;
|
|
261
258
|
}
|
|
262
259
|
|
|
260
|
+
export interface ToolAccessConfig {
|
|
261
|
+
/**
|
|
262
|
+
* The actions that the user can perform on the auth config. If passed, this will
|
|
263
|
+
* update the actions that the user can perform on the auth config.
|
|
264
|
+
*/
|
|
265
|
+
tools_available_for_execution?: Array<string>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Tools used to generate the minimum required scopes for the auth config (only
|
|
269
|
+
* valid for OAuth). If passed, this will update the scopes.
|
|
270
|
+
*/
|
|
271
|
+
tools_for_connected_account_creation?: Array<string>;
|
|
272
|
+
}
|
|
273
|
+
|
|
263
274
|
/**
|
|
264
275
|
* Information about the associated integration
|
|
265
276
|
*/
|
|
@@ -317,6 +328,8 @@ export namespace AuthConfigListResponse {
|
|
|
317
328
|
*/
|
|
318
329
|
status: 'ENABLED' | 'DISABLED';
|
|
319
330
|
|
|
331
|
+
tool_access_config: Item.ToolAccessConfig;
|
|
332
|
+
|
|
320
333
|
/**
|
|
321
334
|
* Information about the associated integration
|
|
322
335
|
*/
|
|
@@ -378,11 +391,6 @@ export namespace AuthConfigListResponse {
|
|
|
378
391
|
* ISO 8601 date-time when the auth config was last updated
|
|
379
392
|
*/
|
|
380
393
|
last_updated_at?: string;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* List of tool IDs this auth config is restricted to use with
|
|
384
|
-
*/
|
|
385
|
-
restrict_to_following_tools?: Array<string>;
|
|
386
394
|
}
|
|
387
395
|
|
|
388
396
|
export namespace Item {
|
|
@@ -411,6 +419,20 @@ export namespace AuthConfigListResponse {
|
|
|
411
419
|
toolkit_id?: string;
|
|
412
420
|
}
|
|
413
421
|
|
|
422
|
+
export interface ToolAccessConfig {
|
|
423
|
+
/**
|
|
424
|
+
* The actions that the user can perform on the auth config. If passed, this will
|
|
425
|
+
* update the actions that the user can perform on the auth config.
|
|
426
|
+
*/
|
|
427
|
+
tools_available_for_execution?: Array<string>;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Tools used to generate the minimum required scopes for the auth config (only
|
|
431
|
+
* valid for OAuth). If passed, this will update the scopes.
|
|
432
|
+
*/
|
|
433
|
+
tools_for_connected_account_creation?: Array<string>;
|
|
434
|
+
}
|
|
435
|
+
|
|
414
436
|
/**
|
|
415
437
|
* Information about the associated integration
|
|
416
438
|
*/
|
|
@@ -456,10 +478,17 @@ export namespace AuthConfigCreateParams {
|
|
|
456
478
|
*/
|
|
457
479
|
name?: string;
|
|
458
480
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
481
|
+
tool_access_config?: UnionMember0.ToolAccessConfig;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export namespace UnionMember0 {
|
|
485
|
+
export interface ToolAccessConfig {
|
|
486
|
+
/**
|
|
487
|
+
* Tools used to generate the minimum required scopes for the auth config (only
|
|
488
|
+
* valid for OAuth). If passed, this will update the scopes.
|
|
489
|
+
*/
|
|
490
|
+
tools_for_connected_account_creation?: Array<string>;
|
|
491
|
+
}
|
|
463
492
|
}
|
|
464
493
|
|
|
465
494
|
export interface UnionMember1 {
|
|
@@ -487,10 +516,7 @@ export namespace AuthConfigCreateParams {
|
|
|
487
516
|
|
|
488
517
|
proxy_config?: UnionMember1.ProxyConfig;
|
|
489
518
|
|
|
490
|
-
|
|
491
|
-
* The actions that the user can perform on the auth config
|
|
492
|
-
*/
|
|
493
|
-
restrict_to_following_tools?: Array<string>;
|
|
519
|
+
tool_access_config?: UnionMember1.ToolAccessConfig;
|
|
494
520
|
}
|
|
495
521
|
|
|
496
522
|
export namespace UnionMember1 {
|
|
@@ -505,6 +531,14 @@ export namespace AuthConfigCreateParams {
|
|
|
505
531
|
*/
|
|
506
532
|
proxy_auth_key?: string;
|
|
507
533
|
}
|
|
534
|
+
|
|
535
|
+
export interface ToolAccessConfig {
|
|
536
|
+
/**
|
|
537
|
+
* Tools used to generate the minimum required scopes for the auth config (only
|
|
538
|
+
* valid for OAuth). If passed, this will update the scopes.
|
|
539
|
+
*/
|
|
540
|
+
tools_for_connected_account_creation?: Array<string>;
|
|
541
|
+
}
|
|
508
542
|
}
|
|
509
543
|
}
|
|
510
544
|
|
|
@@ -516,15 +550,47 @@ export declare namespace AuthConfigUpdateParams {
|
|
|
516
550
|
|
|
517
551
|
type: 'custom';
|
|
518
552
|
|
|
519
|
-
|
|
553
|
+
tool_access_config?: Variant0.ToolAccessConfig;
|
|
520
554
|
}
|
|
521
555
|
|
|
522
|
-
export
|
|
523
|
-
|
|
556
|
+
export namespace Variant0 {
|
|
557
|
+
export interface ToolAccessConfig {
|
|
558
|
+
/**
|
|
559
|
+
* The actions that the user can perform on the auth config. If passed, this will
|
|
560
|
+
* update the actions that the user can perform on the auth config.
|
|
561
|
+
*/
|
|
562
|
+
tools_available_for_execution?: Array<string>;
|
|
524
563
|
|
|
564
|
+
/**
|
|
565
|
+
* Tools used to generate the minimum required scopes for the auth config (only
|
|
566
|
+
* valid for OAuth). If passed, this will update the scopes.
|
|
567
|
+
*/
|
|
568
|
+
tools_for_connected_account_creation?: Array<string>;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface Variant1 {
|
|
525
573
|
type: 'default';
|
|
526
574
|
|
|
527
|
-
|
|
575
|
+
scopes?: string;
|
|
576
|
+
|
|
577
|
+
tool_access_config?: Variant1.ToolAccessConfig;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export namespace Variant1 {
|
|
581
|
+
export interface ToolAccessConfig {
|
|
582
|
+
/**
|
|
583
|
+
* The actions that the user can perform on the auth config. If passed, this will
|
|
584
|
+
* update the actions that the user can perform on the auth config.
|
|
585
|
+
*/
|
|
586
|
+
tools_available_for_execution?: Array<string>;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Tools used to generate the minimum required scopes for the auth config (only
|
|
590
|
+
* valid for OAuth). If passed, this will update the scopes.
|
|
591
|
+
*/
|
|
592
|
+
tools_for_connected_account_creation?: Array<string>;
|
|
593
|
+
}
|
|
528
594
|
}
|
|
529
595
|
}
|
|
530
596
|
|
|
@@ -557,7 +623,7 @@ export interface AuthConfigListParams {
|
|
|
557
623
|
/**
|
|
558
624
|
* Show disabled auth configs
|
|
559
625
|
*/
|
|
560
|
-
show_disabled?: boolean;
|
|
626
|
+
show_disabled?: boolean | null;
|
|
561
627
|
|
|
562
628
|
/**
|
|
563
629
|
* The slug of the toolkit to filter by
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Cli extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
10
|
+
* first step in the CLI authentication flow, creating a session that can later be
|
|
11
|
+
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
12
|
+
* and should be entered in the web interface to complete authentication.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.cli.createSession();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse> {
|
|
20
|
+
return this._client.post('/api/v3/cli/create-session', options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
25
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
26
|
+
* if the session has been linked, and by the web interface to display session
|
|
27
|
+
* details before linking.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.cli.getSession({
|
|
32
|
+
* id: 'ABC123',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
getSession(query: CliGetSessionParams, options?: RequestOptions): APIPromise<CliGetSessionResponse> {
|
|
37
|
+
return this._client.get('/api/v3/cli/get-session', { query, ...options });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Links a pending CLI session to the currently authenticated user. This is the
|
|
42
|
+
* final step in the CLI authentication flow, where the user enters the code in the
|
|
43
|
+
* web interface and their account is associated with the CLI session, allowing the
|
|
44
|
+
* CLI to act on their behalf.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response = await client.cli.linkSession({
|
|
49
|
+
* id: 'ABC123',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
linkSession(body: CliLinkSessionParams, options?: RequestOptions): APIPromise<CliLinkSessionResponse> {
|
|
54
|
+
return this._client.put('/api/v3/cli/link-session', { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface CliCreateSessionResponse {
|
|
59
|
+
/**
|
|
60
|
+
* Unique identifier for the CLI session. UUID v4 format used for tracking and
|
|
61
|
+
* retrieval.
|
|
62
|
+
*/
|
|
63
|
+
id: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The 6-character hexadecimal code used for CLI login
|
|
67
|
+
*/
|
|
68
|
+
code: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The ISO timestamp when the session expires
|
|
72
|
+
*/
|
|
73
|
+
expiresAt: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The current status of the session
|
|
77
|
+
*/
|
|
78
|
+
status: 'pending' | 'linked';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface CliGetSessionResponse {
|
|
82
|
+
/**
|
|
83
|
+
* The unique identifier for the CLI session
|
|
84
|
+
*/
|
|
85
|
+
id: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Information about the linked account, if any. Null if the session status is
|
|
89
|
+
* "pending".
|
|
90
|
+
*/
|
|
91
|
+
account: CliGetSessionResponse.Account | null;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The 6-character hexadecimal code used for CLI login
|
|
95
|
+
*/
|
|
96
|
+
code: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The ISO timestamp when the session expires
|
|
100
|
+
*/
|
|
101
|
+
expiresAt: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The current status of the session
|
|
105
|
+
*/
|
|
106
|
+
status: 'pending' | 'linked';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export namespace CliGetSessionResponse {
|
|
110
|
+
/**
|
|
111
|
+
* Information about the linked account, if any. Null if the session status is
|
|
112
|
+
* "pending".
|
|
113
|
+
*/
|
|
114
|
+
export interface Account {
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the linked account
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The email address of the linked account
|
|
122
|
+
*/
|
|
123
|
+
email: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The display name of the linked account
|
|
127
|
+
*/
|
|
128
|
+
name: string;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface CliLinkSessionResponse {
|
|
133
|
+
/**
|
|
134
|
+
* The unique identifier for the CLI session
|
|
135
|
+
*/
|
|
136
|
+
id: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Information about the linked account. Always present for successful responses
|
|
140
|
+
* from this endpoint.
|
|
141
|
+
*/
|
|
142
|
+
account: CliLinkSessionResponse.Account;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The 6-character hexadecimal code used for CLI login
|
|
146
|
+
*/
|
|
147
|
+
code: string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The ISO timestamp when the session expires
|
|
151
|
+
*/
|
|
152
|
+
expiresAt: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The current status of the session
|
|
156
|
+
*/
|
|
157
|
+
status: 'pending' | 'linked';
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export namespace CliLinkSessionResponse {
|
|
161
|
+
/**
|
|
162
|
+
* Information about the linked account. Always present for successful responses
|
|
163
|
+
* from this endpoint.
|
|
164
|
+
*/
|
|
165
|
+
export interface Account {
|
|
166
|
+
/**
|
|
167
|
+
* The ID of the linked account
|
|
168
|
+
*/
|
|
169
|
+
id: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The email address of the linked account
|
|
173
|
+
*/
|
|
174
|
+
email: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The display name of the linked account
|
|
178
|
+
*/
|
|
179
|
+
name: string;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface CliGetSessionParams {
|
|
184
|
+
/**
|
|
185
|
+
* CLI session ID (UUID format) or 6-character code to check. Both formats are
|
|
186
|
+
* supported for flexibility in client implementations.
|
|
187
|
+
*/
|
|
188
|
+
id: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface CliLinkSessionParams {
|
|
192
|
+
/**
|
|
193
|
+
* The CLI session ID or code to link to the current user
|
|
194
|
+
*/
|
|
195
|
+
id: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare namespace Cli {
|
|
199
|
+
export {
|
|
200
|
+
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
201
|
+
type CliGetSessionResponse as CliGetSessionResponse,
|
|
202
|
+
type CliLinkSessionResponse as CliLinkSessionResponse,
|
|
203
|
+
type CliGetSessionParams as CliGetSessionParams,
|
|
204
|
+
type CliLinkSessionParams as CliLinkSessionParams,
|
|
205
|
+
};
|
|
206
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -13,6 +13,14 @@ export {
|
|
|
13
13
|
type AuthConfigListParams,
|
|
14
14
|
type AuthConfigUpdateStatusParams,
|
|
15
15
|
} from './auth-configs';
|
|
16
|
+
export {
|
|
17
|
+
Cli,
|
|
18
|
+
type CliCreateSessionResponse,
|
|
19
|
+
type CliGetSessionResponse,
|
|
20
|
+
type CliLinkSessionResponse,
|
|
21
|
+
type CliGetSessionParams,
|
|
22
|
+
type CliLinkSessionParams,
|
|
23
|
+
} from './cli';
|
|
16
24
|
export {
|
|
17
25
|
ConnectedAccounts,
|
|
18
26
|
type ConnectedAccountCreateResponse,
|
package/src/resources/mcp/mcp.ts
CHANGED
|
@@ -403,7 +403,7 @@ export interface McpListResponse {
|
|
|
403
403
|
/**
|
|
404
404
|
* Current page number being returned
|
|
405
405
|
*/
|
|
406
|
-
current_page:
|
|
406
|
+
current_page: number;
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
409
|
* Array of MCP server configurations
|
|
@@ -413,7 +413,7 @@ export interface McpListResponse {
|
|
|
413
413
|
/**
|
|
414
414
|
* Total number of pages in the paginated response
|
|
415
415
|
*/
|
|
416
|
-
total_pages:
|
|
416
|
+
total_pages: number;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
export namespace McpListResponse {
|
|
@@ -514,7 +514,7 @@ export interface McpRetrieveAppResponse {
|
|
|
514
514
|
/**
|
|
515
515
|
* Current page number being returned
|
|
516
516
|
*/
|
|
517
|
-
current_page:
|
|
517
|
+
current_page: number;
|
|
518
518
|
|
|
519
519
|
/**
|
|
520
520
|
* Array of MCP server configurations
|
|
@@ -524,7 +524,7 @@ export interface McpRetrieveAppResponse {
|
|
|
524
524
|
/**
|
|
525
525
|
* Total number of pages in the paginated response
|
|
526
526
|
*/
|
|
527
|
-
total_pages:
|
|
527
|
+
total_pages: number;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
export namespace McpRetrieveAppResponse {
|
|
@@ -81,6 +81,12 @@ export interface ToolkitRetrieveResponse {
|
|
|
81
81
|
*/
|
|
82
82
|
auth_config_details?: Array<ToolkitRetrieveResponse.AuthConfigDetail>;
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* If evaluation of base URL needs some connection info (like shopify), please
|
|
86
|
+
* create the connection and get the base URL from there
|
|
87
|
+
*/
|
|
88
|
+
base_url?: string;
|
|
89
|
+
|
|
84
90
|
/**
|
|
85
91
|
* List of authentication methods that Composio manages for this toolkit
|
|
86
92
|
*/
|
package/src/resources/tools.ts
CHANGED
|
@@ -402,6 +402,11 @@ export interface ToolProxyResponse {
|
|
|
402
402
|
export type ToolRetrieveEnumResponse = string;
|
|
403
403
|
|
|
404
404
|
export interface ToolListParams {
|
|
405
|
+
/**
|
|
406
|
+
* Filter tools by auth config id
|
|
407
|
+
*/
|
|
408
|
+
auth_config_ids?: Array<string> | null;
|
|
409
|
+
|
|
405
410
|
/**
|
|
406
411
|
* Cursor for pagination. The cursor is a base64 encoded string of the page and
|
|
407
412
|
* limit. The page is the page number and the limit is the number of items per
|
|
@@ -563,7 +568,7 @@ export interface ToolProxyParams {
|
|
|
563
568
|
/**
|
|
564
569
|
* The HTTP method to use for the request
|
|
565
570
|
*/
|
|
566
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
571
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
|
|
567
572
|
|
|
568
573
|
/**
|
|
569
574
|
* The request body (for POST, PUT, and PATCH requests)
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.28'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.28";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.28";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.28'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.28'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|