@composio/client 0.1.0-alpha.14 → 0.1.0-alpha.16
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 +43 -0
- package/README.md +12 -24
- package/client.d.mts +7 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -7
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/package.json +1 -4
- package/resources/auth-configs.d.mts +3 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +3 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +5262 -52
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +5262 -52
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/index.d.mts +1 -1
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +1 -1
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +99 -1
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +99 -1
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +22 -0
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +22 -0
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/org/project/api-keys.d.mts +0 -15
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +0 -15
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/tools.d.mts +4 -5
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +4 -5
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/index.d.mts +2 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +2 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js +3 -1
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs +1 -0
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/manage.d.mts +26 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -0
- package/resources/trigger-instances/manage.d.ts +26 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -0
- package/resources/trigger-instances/manage.js +16 -0
- package/resources/trigger-instances/manage.js.map +1 -0
- package/resources/trigger-instances/manage.mjs +12 -0
- package/resources/trigger-instances/manage.mjs.map +1 -0
- package/resources/trigger-instances/trigger-instances.d.mts +15 -68
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +15 -68
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +4 -7
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +4 -7
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/v3/admin.d.mts +100 -0
- package/resources/v3/admin.d.mts.map +1 -0
- package/resources/v3/admin.d.ts +100 -0
- package/resources/v3/admin.d.ts.map +1 -0
- package/resources/v3/admin.js +54 -0
- package/resources/v3/admin.js.map +1 -0
- package/resources/v3/admin.mjs +50 -0
- package/resources/v3/admin.mjs.map +1 -0
- package/resources/v3/auth/auth.d.mts +10 -0
- package/resources/v3/auth/auth.d.mts.map +1 -0
- package/resources/v3/auth/auth.d.ts +10 -0
- package/resources/v3/auth/auth.d.ts.map +1 -0
- package/resources/{auth → v3/auth}/auth.js +2 -2
- package/resources/v3/auth/auth.js.map +1 -0
- package/resources/{auth → v3/auth}/auth.mjs +1 -1
- package/resources/v3/auth/auth.mjs.map +1 -0
- package/resources/v3/auth/index.d.mts +3 -0
- package/resources/v3/auth/index.d.mts.map +1 -0
- package/resources/v3/auth/index.d.ts +3 -0
- package/resources/v3/auth/index.d.ts.map +1 -0
- package/resources/v3/auth/index.js.map +1 -0
- package/resources/v3/auth/index.mjs.map +1 -0
- package/resources/{auth → v3/auth}/session.d.mts +16 -10
- package/resources/v3/auth/session.d.mts.map +1 -0
- package/resources/{auth → v3/auth}/session.d.ts +16 -10
- package/resources/v3/auth/session.d.ts.map +1 -0
- package/resources/{auth → v3/auth}/session.js +8 -2
- package/resources/v3/auth/session.js.map +1 -0
- package/resources/{auth → v3/auth}/session.mjs +8 -2
- package/resources/v3/auth/session.mjs.map +1 -0
- package/resources/{auth.d.mts.map → v3/auth.d.mts.map} +1 -1
- package/resources/v3/auth.d.ts.map +1 -0
- package/resources/{auth.js → v3/auth.js} +1 -1
- package/resources/v3/auth.js.map +1 -0
- package/resources/v3/auth.mjs.map +1 -0
- package/resources/v3/cli.d.mts +167 -0
- package/resources/v3/cli.d.mts.map +1 -0
- package/resources/v3/cli.d.ts +167 -0
- package/resources/v3/cli.d.ts.map +1 -0
- package/resources/v3/cli.js +55 -0
- package/resources/v3/cli.js.map +1 -0
- package/resources/v3/cli.mjs +51 -0
- package/resources/v3/cli.mjs.map +1 -0
- package/resources/v3/index.d.mts +6 -0
- package/resources/v3/index.d.mts.map +1 -0
- package/resources/v3/index.d.ts +6 -0
- package/resources/v3/index.d.ts.map +1 -0
- package/resources/v3/index.js +15 -0
- package/resources/v3/index.js.map +1 -0
- package/resources/v3/index.mjs +7 -0
- package/resources/v3/index.mjs.map +1 -0
- package/resources/v3/internal/action-execution.d.mts +153 -0
- package/resources/v3/internal/action-execution.d.mts.map +1 -0
- package/resources/v3/internal/action-execution.d.ts +153 -0
- package/resources/v3/internal/action-execution.d.ts.map +1 -0
- package/resources/v3/internal/action-execution.js +38 -0
- package/resources/v3/internal/action-execution.js.map +1 -0
- package/resources/v3/internal/action-execution.mjs +34 -0
- package/resources/v3/internal/action-execution.mjs.map +1 -0
- package/resources/v3/internal/index.d.mts +4 -0
- package/resources/v3/internal/index.d.mts.map +1 -0
- package/resources/v3/internal/index.d.ts +4 -0
- package/resources/v3/internal/index.d.ts.map +1 -0
- package/resources/v3/internal/index.js +11 -0
- package/resources/v3/internal/index.js.map +1 -0
- package/resources/v3/internal/index.mjs +5 -0
- package/resources/v3/internal/index.mjs.map +1 -0
- package/resources/v3/internal/internal.d.mts +14 -0
- package/resources/v3/internal/internal.d.mts.map +1 -0
- package/resources/v3/internal/internal.d.ts +14 -0
- package/resources/v3/internal/internal.d.ts.map +1 -0
- package/resources/v3/internal/internal.js +21 -0
- package/resources/v3/internal/internal.js.map +1 -0
- package/resources/v3/internal/internal.mjs +16 -0
- package/resources/v3/internal/internal.mjs.map +1 -0
- package/resources/v3/internal/trigger.d.mts +84 -0
- package/resources/v3/internal/trigger.d.mts.map +1 -0
- package/resources/v3/internal/trigger.d.ts +84 -0
- package/resources/v3/internal/trigger.d.ts.map +1 -0
- package/resources/v3/internal/trigger.js +23 -0
- package/resources/v3/internal/trigger.js.map +1 -0
- package/resources/v3/internal/trigger.mjs +19 -0
- package/resources/v3/internal/trigger.mjs.map +1 -0
- package/resources/v3/internal.d.mts +2 -0
- package/resources/v3/internal.d.mts.map +1 -0
- package/resources/v3/internal.d.ts +2 -0
- package/resources/v3/internal.d.ts.map +1 -0
- package/resources/v3/internal.js +6 -0
- package/resources/v3/internal.js.map +1 -0
- package/resources/v3/internal.mjs +3 -0
- package/resources/v3/internal.mjs.map +1 -0
- package/resources/v3/v3.d.mts +22 -0
- package/resources/v3/v3.d.mts.map +1 -0
- package/resources/v3/v3.d.ts +22 -0
- package/resources/v3/v3.d.ts.map +1 -0
- package/resources/v3/v3.js +29 -0
- package/resources/v3/v3.js.map +1 -0
- package/resources/v3/v3.mjs +24 -0
- package/resources/v3/v3.mjs.map +1 -0
- package/resources/v3.d.mts +2 -0
- package/resources/v3.d.mts.map +1 -0
- package/resources/v3.d.ts +2 -0
- package/resources/v3.d.ts.map +1 -0
- package/resources/v3.js +6 -0
- package/resources/v3.js.map +1 -0
- package/resources/v3.mjs +3 -0
- package/resources/v3.mjs.map +1 -0
- package/src/client.ts +9 -11
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/resources/auth-configs.ts +0 -3
- package/src/resources/connected-accounts.ts +10261 -298
- package/src/resources/index.ts +3 -4
- package/src/resources/mcp/index.ts +2 -0
- package/src/resources/mcp/mcp.ts +128 -0
- package/src/resources/org/project/api-keys.ts +0 -18
- package/src/resources/tools.ts +5 -6
- package/src/resources/trigger-instances/index.ts +6 -3
- package/src/resources/trigger-instances/manage.ts +46 -0
- package/src/resources/trigger-instances/trigger-instances.ts +21 -87
- package/src/resources/v3/admin.ts +141 -0
- package/src/resources/{auth → v3/auth}/auth.ts +3 -3
- package/src/resources/{auth → v3/auth}/index.ts +1 -1
- package/src/resources/{auth → v3/auth}/session.ts +16 -10
- package/src/resources/v3/cli.ts +209 -0
- package/src/resources/v3/index.ts +20 -0
- package/src/resources/v3/internal/action-execution.ts +236 -0
- package/src/resources/v3/internal/index.ts +10 -0
- package/src/resources/v3/internal/internal.ts +35 -0
- package/src/resources/v3/internal/trigger.ts +122 -0
- package/src/resources/v3/internal.ts +3 -0
- package/src/resources/v3/v3.ts +59 -0
- package/src/resources/v3.ts +3 -0
- 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/resources/auth/auth.d.mts +0 -10
- package/resources/auth/auth.d.mts.map +0 -1
- package/resources/auth/auth.d.ts +0 -10
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/index.d.mts +0 -3
- package/resources/auth/index.d.mts.map +0 -1
- package/resources/auth/index.d.ts +0 -3
- package/resources/auth/index.d.ts.map +0 -1
- package/resources/auth/index.js.map +0 -1
- package/resources/auth/index.mjs.map +0 -1
- package/resources/auth/session.d.mts.map +0 -1
- package/resources/auth/session.d.ts.map +0 -1
- package/resources/auth/session.js.map +0 -1
- package/resources/auth/session.mjs.map +0 -1
- package/resources/auth.d.ts.map +0 -1
- package/resources/auth.js.map +0 -1
- package/resources/auth.mjs.map +0 -1
- package/src/internal/shim-types.d.ts +0 -28
- /package/resources/{auth → v3/auth}/index.js +0 -0
- /package/resources/{auth → v3/auth}/index.mjs +0 -0
- /package/resources/{auth.d.mts → v3/auth.d.mts} +0 -0
- /package/resources/{auth.d.ts → v3/auth.d.ts} +0 -0
- /package/resources/{auth.mjs → v3/auth.mjs} +0 -0
- /package/src/resources/{auth.ts → v3/auth.ts} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Admin extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Administrative endpoint that retrieves all active connections for a given
|
|
7
|
+
* toolkit slug. This is primarily used for token refresh operations and system
|
|
8
|
+
* maintenance. Only includes non-deleted connections with OAuth2 or JWT
|
|
9
|
+
* authentication types.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.v3.admin.listConnections({
|
|
14
|
+
* toolkit_slug: 'google-drive',
|
|
15
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
listConnections(params: AdminListConnectionsParams, options?: RequestOptions): APIPromise<AdminListConnectionsResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Administrative endpoint that refreshes authentication tokens for multiple
|
|
22
|
+
* connected accounts in parallel. This is useful for proactive token refresh to
|
|
23
|
+
* prevent authentication failures or for recovering from authentication issues
|
|
24
|
+
* across multiple connections.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const response = await client.v3.admin.refreshAuthTokens({
|
|
29
|
+
* connectionIds: ['conn_123abc', 'conn_456def'],
|
|
30
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
refreshAuthTokens(params: AdminRefreshAuthTokensParams, options?: RequestOptions): APIPromise<AdminRefreshAuthTokensResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface AdminListConnectionsResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Collection of account connection objects, may be empty if no connections exist
|
|
39
|
+
*/
|
|
40
|
+
items: Array<AdminListConnectionsResponse.Item>;
|
|
41
|
+
}
|
|
42
|
+
export declare namespace AdminListConnectionsResponse {
|
|
43
|
+
interface Item {
|
|
44
|
+
/**
|
|
45
|
+
* Identifier that can be used with other API endpoints that operate on connections
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export interface AdminRefreshAuthTokensResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Array of connections that failed to refresh with detailed error information
|
|
53
|
+
*/
|
|
54
|
+
failures: Array<AdminRefreshAuthTokensResponse.Failure>;
|
|
55
|
+
/**
|
|
56
|
+
* List of connections where token refresh was successful or not needed
|
|
57
|
+
*/
|
|
58
|
+
success: Array<string>;
|
|
59
|
+
}
|
|
60
|
+
export declare namespace AdminRefreshAuthTokensResponse {
|
|
61
|
+
interface Failure {
|
|
62
|
+
/**
|
|
63
|
+
* Connection ID that failed during refresh
|
|
64
|
+
*/
|
|
65
|
+
connectionId: string;
|
|
66
|
+
/**
|
|
67
|
+
* Specific error code identifying why the refresh operation failed
|
|
68
|
+
*/
|
|
69
|
+
error: string;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export interface AdminListConnectionsParams {
|
|
73
|
+
/**
|
|
74
|
+
* Query param: The unique identifier slug of the toolkit to filter connections by
|
|
75
|
+
*/
|
|
76
|
+
toolkit_slug: string;
|
|
77
|
+
/**
|
|
78
|
+
* Header param: Admin authentication token required for administrative operations
|
|
79
|
+
*/
|
|
80
|
+
'x-composio-admin-token': string;
|
|
81
|
+
}
|
|
82
|
+
export interface AdminRefreshAuthTokensParams {
|
|
83
|
+
/**
|
|
84
|
+
* Body param: List of connection identifiers that need token refresh
|
|
85
|
+
*/
|
|
86
|
+
connectionIds: Array<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Header param: Admin authentication token required for administrative operations
|
|
89
|
+
*/
|
|
90
|
+
'x-composio-admin-token': string;
|
|
91
|
+
/**
|
|
92
|
+
* Body param: Controls processing speed and system load. Higher values process
|
|
93
|
+
* faster but increase load.
|
|
94
|
+
*/
|
|
95
|
+
parallelism?: number;
|
|
96
|
+
}
|
|
97
|
+
export declare namespace Admin {
|
|
98
|
+
export { type AdminListConnectionsResponse as AdminListConnectionsResponse, type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse, type AdminListConnectionsParams as AdminListConnectionsParams, type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams, };
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=admin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.mts","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,eAAe,CACb,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAS3C;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAQ9C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;CACjD;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED,yBAAiB,8BAA8B,CAAC;IAC9C,UAAiB,OAAO;QACtB;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Admin extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Administrative endpoint that retrieves all active connections for a given
|
|
7
|
+
* toolkit slug. This is primarily used for token refresh operations and system
|
|
8
|
+
* maintenance. Only includes non-deleted connections with OAuth2 or JWT
|
|
9
|
+
* authentication types.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.v3.admin.listConnections({
|
|
14
|
+
* toolkit_slug: 'google-drive',
|
|
15
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
listConnections(params: AdminListConnectionsParams, options?: RequestOptions): APIPromise<AdminListConnectionsResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Administrative endpoint that refreshes authentication tokens for multiple
|
|
22
|
+
* connected accounts in parallel. This is useful for proactive token refresh to
|
|
23
|
+
* prevent authentication failures or for recovering from authentication issues
|
|
24
|
+
* across multiple connections.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const response = await client.v3.admin.refreshAuthTokens({
|
|
29
|
+
* connectionIds: ['conn_123abc', 'conn_456def'],
|
|
30
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
refreshAuthTokens(params: AdminRefreshAuthTokensParams, options?: RequestOptions): APIPromise<AdminRefreshAuthTokensResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface AdminListConnectionsResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Collection of account connection objects, may be empty if no connections exist
|
|
39
|
+
*/
|
|
40
|
+
items: Array<AdminListConnectionsResponse.Item>;
|
|
41
|
+
}
|
|
42
|
+
export declare namespace AdminListConnectionsResponse {
|
|
43
|
+
interface Item {
|
|
44
|
+
/**
|
|
45
|
+
* Identifier that can be used with other API endpoints that operate on connections
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export interface AdminRefreshAuthTokensResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Array of connections that failed to refresh with detailed error information
|
|
53
|
+
*/
|
|
54
|
+
failures: Array<AdminRefreshAuthTokensResponse.Failure>;
|
|
55
|
+
/**
|
|
56
|
+
* List of connections where token refresh was successful or not needed
|
|
57
|
+
*/
|
|
58
|
+
success: Array<string>;
|
|
59
|
+
}
|
|
60
|
+
export declare namespace AdminRefreshAuthTokensResponse {
|
|
61
|
+
interface Failure {
|
|
62
|
+
/**
|
|
63
|
+
* Connection ID that failed during refresh
|
|
64
|
+
*/
|
|
65
|
+
connectionId: string;
|
|
66
|
+
/**
|
|
67
|
+
* Specific error code identifying why the refresh operation failed
|
|
68
|
+
*/
|
|
69
|
+
error: string;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export interface AdminListConnectionsParams {
|
|
73
|
+
/**
|
|
74
|
+
* Query param: The unique identifier slug of the toolkit to filter connections by
|
|
75
|
+
*/
|
|
76
|
+
toolkit_slug: string;
|
|
77
|
+
/**
|
|
78
|
+
* Header param: Admin authentication token required for administrative operations
|
|
79
|
+
*/
|
|
80
|
+
'x-composio-admin-token': string;
|
|
81
|
+
}
|
|
82
|
+
export interface AdminRefreshAuthTokensParams {
|
|
83
|
+
/**
|
|
84
|
+
* Body param: List of connection identifiers that need token refresh
|
|
85
|
+
*/
|
|
86
|
+
connectionIds: Array<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Header param: Admin authentication token required for administrative operations
|
|
89
|
+
*/
|
|
90
|
+
'x-composio-admin-token': string;
|
|
91
|
+
/**
|
|
92
|
+
* Body param: Controls processing speed and system load. Higher values process
|
|
93
|
+
* faster but increase load.
|
|
94
|
+
*/
|
|
95
|
+
parallelism?: number;
|
|
96
|
+
}
|
|
97
|
+
export declare namespace Admin {
|
|
98
|
+
export { type AdminListConnectionsResponse as AdminListConnectionsResponse, type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse, type AdminListConnectionsParams as AdminListConnectionsParams, type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams, };
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,eAAe,CACb,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAS3C;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAQ9C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;CACjD;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED,yBAAiB,8BAA8B,CAAC;IAC9C,UAAiB,OAAO;QACtB;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Admin = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
class Admin extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Administrative endpoint that retrieves all active connections for a given
|
|
10
|
+
* toolkit slug. This is primarily used for token refresh operations and system
|
|
11
|
+
* maintenance. Only includes non-deleted connections with OAuth2 or JWT
|
|
12
|
+
* authentication types.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.v3.admin.listConnections({
|
|
17
|
+
* toolkit_slug: 'google-drive',
|
|
18
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
listConnections(params, options) {
|
|
23
|
+
const { 'x-composio-admin-token': xComposioAdminToken, ...query } = params;
|
|
24
|
+
return this._client.get('/api/v3/admin/connections', {
|
|
25
|
+
query,
|
|
26
|
+
...options,
|
|
27
|
+
headers: (0, headers_1.buildHeaders)([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Administrative endpoint that refreshes authentication tokens for multiple
|
|
32
|
+
* connected accounts in parallel. This is useful for proactive token refresh to
|
|
33
|
+
* prevent authentication failures or for recovering from authentication issues
|
|
34
|
+
* across multiple connections.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response = await client.v3.admin.refreshAuthTokens({
|
|
39
|
+
* connectionIds: ['conn_123abc', 'conn_456def'],
|
|
40
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
refreshAuthTokens(params, options) {
|
|
45
|
+
const { 'x-composio-admin-token': xComposioAdminToken, ...body } = params;
|
|
46
|
+
return this._client.post('/api/v3/admin/auth-refresh', {
|
|
47
|
+
body,
|
|
48
|
+
...options,
|
|
49
|
+
headers: (0, headers_1.buildHeaders)([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.Admin = Admin;
|
|
54
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAGtD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,eAAe,CACb,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE;YACnD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7F,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAoC,EACpC,OAAwB;QAExB,MAAM,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7F,CAAC,CAAC;IACL,CAAC;CACF;AApDD,sBAoDC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
export class Admin extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Administrative endpoint that retrieves all active connections for a given
|
|
7
|
+
* toolkit slug. This is primarily used for token refresh operations and system
|
|
8
|
+
* maintenance. Only includes non-deleted connections with OAuth2 or JWT
|
|
9
|
+
* authentication types.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.v3.admin.listConnections({
|
|
14
|
+
* toolkit_slug: 'google-drive',
|
|
15
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
listConnections(params, options) {
|
|
20
|
+
const { 'x-composio-admin-token': xComposioAdminToken, ...query } = params;
|
|
21
|
+
return this._client.get('/api/v3/admin/connections', {
|
|
22
|
+
query,
|
|
23
|
+
...options,
|
|
24
|
+
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Administrative endpoint that refreshes authentication tokens for multiple
|
|
29
|
+
* connected accounts in parallel. This is useful for proactive token refresh to
|
|
30
|
+
* prevent authentication failures or for recovering from authentication issues
|
|
31
|
+
* across multiple connections.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.v3.admin.refreshAuthTokens({
|
|
36
|
+
* connectionIds: ['conn_123abc', 'conn_456def'],
|
|
37
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
refreshAuthTokens(params, options) {
|
|
42
|
+
const { 'x-composio-admin-token': xComposioAdminToken, ...body } = params;
|
|
43
|
+
return this._client.post('/api/v3/admin/auth-refresh', {
|
|
44
|
+
body,
|
|
45
|
+
...options,
|
|
46
|
+
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=admin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.mjs","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,eAAe,CACb,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE;YACnD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7F,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAoC,EACpC,OAAwB;QAExB,MAAM,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7F,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as SessionAPI from "./session.mjs";
|
|
3
|
+
import { Session, SessionRetrieveInfoResponse } from "./session.mjs";
|
|
4
|
+
export declare class Auth extends APIResource {
|
|
5
|
+
session: SessionAPI.Session;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Auth {
|
|
8
|
+
export { Session as Session, type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=auth.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../../src/resources/v3/auth/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,OAAO,EAAE,2BAA2B,EAAE;AAE/C,qBAAa,IAAK,SAAQ,WAAW;IACnC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAChG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as SessionAPI from "./session.js";
|
|
3
|
+
import { Session, SessionRetrieveInfoResponse } from "./session.js";
|
|
4
|
+
export declare class Auth extends APIResource {
|
|
5
|
+
session: SessionAPI.Session;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Auth {
|
|
8
|
+
export { Session as Session, type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/resources/v3/auth/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,OAAO,EAAE,2BAA2B,EAAE;AAE/C,qBAAa,IAAK,SAAQ,WAAW;IACnC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAChG"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Auth = void 0;
|
|
5
|
-
const tslib_1 = require("
|
|
6
|
-
const resource_1 = require("
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
7
|
const SessionAPI = tslib_1.__importStar(require("./session.js"));
|
|
8
8
|
const session_1 = require("./session.js");
|
|
9
9
|
class Auth extends resource_1.APIResource {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/resources/v3/auth/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,iEAAwC;AACxC,0CAAiE;AAEjE,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAFD,oBAEC;AAED,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
3
|
import * as SessionAPI from "./session.mjs";
|
|
4
4
|
import { Session } from "./session.mjs";
|
|
5
5
|
export class Auth extends APIResource {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../../src/resources/v3/auth/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,OAAO,EAA+B;AAE/C,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v3/auth/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE;OACR,EAAE,OAAO,EAAE,KAAK,2BAA2B,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v3/auth/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE;OACR,EAAE,OAAO,EAAE,KAAK,2BAA2B,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v3/auth/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,wCAAsE;AAA7D,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v3/auth/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,IAAI,EAAE;OACR,EAAE,OAAO,EAAoC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import { APIPromise } from "
|
|
3
|
-
import { RequestOptions } from "
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
4
|
export declare class Session extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves detailed information about the current authenticated user session,
|
|
@@ -8,28 +8,34 @@ export declare class Session extends APIResource {
|
|
|
8
8
|
* applicable. This endpoint is useful for verifying authentication status and
|
|
9
9
|
* retrieving contextual information about the authenticated user and their access
|
|
10
10
|
* privileges.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v3.auth.session.retrieveInfo();
|
|
16
|
+
* ```
|
|
11
17
|
*/
|
|
12
|
-
|
|
18
|
+
retrieveInfo(options?: RequestOptions): APIPromise<SessionRetrieveInfoResponse>;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* Response containing user session information
|
|
16
22
|
*/
|
|
17
|
-
export interface
|
|
23
|
+
export interface SessionRetrieveInfoResponse {
|
|
18
24
|
/**
|
|
19
25
|
* Details of the API key used for authentication (null if using session auth)
|
|
20
26
|
*/
|
|
21
|
-
api_key:
|
|
27
|
+
api_key: SessionRetrieveInfoResponse.APIKey | null;
|
|
22
28
|
/**
|
|
23
29
|
* Information about the authenticated user
|
|
24
30
|
*/
|
|
25
|
-
org_member:
|
|
31
|
+
org_member: SessionRetrieveInfoResponse.OrgMember;
|
|
26
32
|
/**
|
|
27
33
|
* Details of the current active project (null if accessing with org-level
|
|
28
34
|
* credentials)
|
|
29
35
|
*/
|
|
30
|
-
project:
|
|
36
|
+
project: SessionRetrieveInfoResponse.Project | null;
|
|
31
37
|
}
|
|
32
|
-
export declare namespace
|
|
38
|
+
export declare namespace SessionRetrieveInfoResponse {
|
|
33
39
|
/**
|
|
34
40
|
* Details of the API key used for authentication (null if using session auth)
|
|
35
41
|
*/
|
|
@@ -235,6 +241,6 @@ export declare namespace SessionRetrieveResponse {
|
|
|
235
241
|
}
|
|
236
242
|
}
|
|
237
243
|
export declare namespace Session {
|
|
238
|
-
export { type
|
|
244
|
+
export { type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
239
245
|
}
|
|
240
246
|
//# sourceMappingURL=session.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.mts","sourceRoot":"","sources":["../../../src/resources/v3/auth/session.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGhF;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,OAAO,EAAE,2BAA2B,CAAC,MAAM,GAAG,IAAI,CAAC;IAEnD;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC,SAAS,CAAC;IAElD;;;OAGG;IACH,OAAO,EAAE,2BAA2B,CAAC,OAAO,GAAG,IAAI,CAAC;CACrD;AAED,yBAAiB,2BAA2B,CAAC;IAC3C;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;QAEjB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;KACpB;IAED;;OAEG;IACH,UAAiB,SAAS;QACxB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,KA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AAE,MAAM,CAAC;gBAEX;;mBAEG;gBACH,OAAO,EAAE,MAAM,CAAC;gBAEhB;;mBAEG;gBACH,UAAU,EAAE,MAAM,CAAC;gBAEnB;;mBAEG;gBACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAE1B;;mBAEG;gBACH,KAAK,EAAE,MAAM,CAAC;gBAEd;;mBAEG;gBACH,IAAI,EAAE,MAAM,CAAC;gBAEb;;mBAEG;gBACH,MAAM,EAAE,MAAM,CAAC;gBAEf;;mBAEG;gBACH,IAAI,EAAE,MAAM,CAAC;gBAEb;;mBAEG;gBACH,UAAU,EAAE,MAAM,CAAC;gBAEnB;;mBAEG;gBACH,QAAQ,CAAC,EAAE,OAAO,CAAC;aACpB;SACF;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import { APIPromise } from "
|
|
3
|
-
import { RequestOptions } from "
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
4
|
export declare class Session extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves detailed information about the current authenticated user session,
|
|
@@ -8,28 +8,34 @@ export declare class Session extends APIResource {
|
|
|
8
8
|
* applicable. This endpoint is useful for verifying authentication status and
|
|
9
9
|
* retrieving contextual information about the authenticated user and their access
|
|
10
10
|
* privileges.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v3.auth.session.retrieveInfo();
|
|
16
|
+
* ```
|
|
11
17
|
*/
|
|
12
|
-
|
|
18
|
+
retrieveInfo(options?: RequestOptions): APIPromise<SessionRetrieveInfoResponse>;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* Response containing user session information
|
|
16
22
|
*/
|
|
17
|
-
export interface
|
|
23
|
+
export interface SessionRetrieveInfoResponse {
|
|
18
24
|
/**
|
|
19
25
|
* Details of the API key used for authentication (null if using session auth)
|
|
20
26
|
*/
|
|
21
|
-
api_key:
|
|
27
|
+
api_key: SessionRetrieveInfoResponse.APIKey | null;
|
|
22
28
|
/**
|
|
23
29
|
* Information about the authenticated user
|
|
24
30
|
*/
|
|
25
|
-
org_member:
|
|
31
|
+
org_member: SessionRetrieveInfoResponse.OrgMember;
|
|
26
32
|
/**
|
|
27
33
|
* Details of the current active project (null if accessing with org-level
|
|
28
34
|
* credentials)
|
|
29
35
|
*/
|
|
30
|
-
project:
|
|
36
|
+
project: SessionRetrieveInfoResponse.Project | null;
|
|
31
37
|
}
|
|
32
|
-
export declare namespace
|
|
38
|
+
export declare namespace SessionRetrieveInfoResponse {
|
|
33
39
|
/**
|
|
34
40
|
* Details of the API key used for authentication (null if using session auth)
|
|
35
41
|
*/
|
|
@@ -235,6 +241,6 @@ export declare namespace SessionRetrieveResponse {
|
|
|
235
241
|
}
|
|
236
242
|
}
|
|
237
243
|
export declare namespace Session {
|
|
238
|
-
export { type
|
|
244
|
+
export { type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
239
245
|
}
|
|
240
246
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/resources/v3/auth/session.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGhF;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2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,CAAC,EAAE,OAAO,CAAC;aACpB;SACF;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Session = void 0;
|
|
5
|
-
const resource_1 = require("
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
6
|
class Session extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves detailed information about the current authenticated user session,
|
|
@@ -10,8 +10,14 @@ class Session extends resource_1.APIResource {
|
|
|
10
10
|
* applicable. This endpoint is useful for verifying authentication status and
|
|
11
11
|
* retrieving contextual information about the authenticated user and their access
|
|
12
12
|
* privileges.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v3.auth.session.retrieveInfo();
|
|
18
|
+
* ```
|
|
13
19
|
*/
|
|
14
|
-
|
|
20
|
+
retrieveInfo(options) {
|
|
15
21
|
return this._client.get('/api/v3/auth/session/info', options);
|
|
16
22
|
}
|
|
17
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/resources/v3/auth/session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AAjBD,0BAiBC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
3
|
export class Session extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves detailed information about the current authenticated user session,
|
|
@@ -7,8 +7,14 @@ export class Session extends APIResource {
|
|
|
7
7
|
* applicable. This endpoint is useful for verifying authentication status and
|
|
8
8
|
* retrieving contextual information about the authenticated user and their access
|
|
9
9
|
* privileges.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.v3.auth.session.retrieveInfo();
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
|
-
|
|
17
|
+
retrieveInfo(options) {
|
|
12
18
|
return this._client.get('/api/v3/auth/session/info', options);
|
|
13
19
|
}
|
|
14
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.mjs","sourceRoot":"","sources":["../../../src/resources/v3/auth/session.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../src/resources/v3/auth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/resources/v3/auth.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
5
|
tslib_1.__exportStar(require("./auth/index.js"), exports);
|
|
6
6
|
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/resources/v3/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../src/resources/v3/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|