@composio/client 0.1.0-alpha.25 → 0.1.0-alpha.27

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.
Files changed (225) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +7 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +4 -10
  7. package/client.js.map +1 -1
  8. package/client.mjs +4 -10
  9. package/client.mjs.map +1 -1
  10. package/internal/request-options.d.mts +42 -0
  11. package/internal/request-options.d.mts.map +1 -1
  12. package/internal/request-options.d.ts +42 -0
  13. package/internal/request-options.d.ts.map +1 -1
  14. package/internal/request-options.js.map +1 -1
  15. package/internal/request-options.mjs.map +1 -1
  16. package/internal/types.d.mts +8 -6
  17. package/internal/types.d.mts.map +1 -1
  18. package/internal/types.d.ts +8 -6
  19. package/internal/types.d.ts.map +1 -1
  20. package/internal/uploads.js +1 -1
  21. package/internal/uploads.js.map +1 -1
  22. package/internal/uploads.mjs +1 -1
  23. package/internal/uploads.mjs.map +1 -1
  24. package/internal/utils/log.js +1 -1
  25. package/internal/utils/log.js.map +1 -1
  26. package/internal/utils/log.mjs +1 -1
  27. package/internal/utils/log.mjs.map +1 -1
  28. package/internal/utils/path.d.mts.map +1 -1
  29. package/internal/utils/path.d.ts.map +1 -1
  30. package/internal/utils/path.js +26 -5
  31. package/internal/utils/path.js.map +1 -1
  32. package/internal/utils/path.mjs +26 -5
  33. package/internal/utils/path.mjs.map +1 -1
  34. package/package.json +1 -1
  35. package/resources/auth-configs.d.mts +22 -4
  36. package/resources/auth-configs.d.mts.map +1 -1
  37. package/resources/auth-configs.d.ts +22 -4
  38. package/resources/auth-configs.d.ts.map +1 -1
  39. package/resources/{v3/cli.d.mts → cli.d.mts} +36 -36
  40. package/resources/cli.d.mts.map +1 -0
  41. package/resources/{v3/cli.d.ts → cli.d.ts} +36 -36
  42. package/resources/cli.d.ts.map +1 -0
  43. package/resources/{v3/cli.js → cli.js} +16 -16
  44. package/resources/cli.js.map +1 -0
  45. package/resources/{v3/cli.mjs → cli.mjs} +16 -16
  46. package/resources/cli.mjs.map +1 -0
  47. package/resources/connected-accounts.d.mts +2153 -633
  48. package/resources/connected-accounts.d.mts.map +1 -1
  49. package/resources/connected-accounts.d.ts +2153 -633
  50. package/resources/connected-accounts.d.ts.map +1 -1
  51. package/resources/connected-accounts.js +7 -2
  52. package/resources/connected-accounts.js.map +1 -1
  53. package/resources/connected-accounts.mjs +7 -2
  54. package/resources/connected-accounts.mjs.map +1 -1
  55. package/resources/files.d.mts +14 -1
  56. package/resources/files.d.mts.map +1 -1
  57. package/resources/files.d.ts +14 -1
  58. package/resources/files.d.ts.map +1 -1
  59. package/resources/index.d.mts +2 -2
  60. package/resources/index.d.mts.map +1 -1
  61. package/resources/index.d.ts +2 -2
  62. package/resources/index.d.ts.map +1 -1
  63. package/resources/index.js +3 -3
  64. package/resources/index.js.map +1 -1
  65. package/resources/index.mjs +1 -1
  66. package/resources/index.mjs.map +1 -1
  67. package/resources/mcp/mcp.d.mts +5 -9
  68. package/resources/mcp/mcp.d.mts.map +1 -1
  69. package/resources/mcp/mcp.d.ts +5 -9
  70. package/resources/mcp/mcp.d.ts.map +1 -1
  71. package/resources/mcp/mcp.js +1 -1
  72. package/resources/mcp/mcp.js.map +1 -1
  73. package/resources/mcp/mcp.mjs +1 -1
  74. package/resources/mcp/mcp.mjs.map +1 -1
  75. package/resources/toolkits.d.mts +17 -2
  76. package/resources/toolkits.d.mts.map +1 -1
  77. package/resources/toolkits.d.ts +17 -2
  78. package/resources/toolkits.d.ts.map +1 -1
  79. package/resources/tools.d.mts +9 -4
  80. package/resources/tools.d.mts.map +1 -1
  81. package/resources/tools.d.ts +9 -4
  82. package/resources/tools.d.ts.map +1 -1
  83. package/resources/trigger-instances/trigger-instances.d.mts +12 -3
  84. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  85. package/resources/trigger-instances/trigger-instances.d.ts +12 -3
  86. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  87. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  88. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  89. package/resources/triggers-types.d.mts +8 -3
  90. package/resources/triggers-types.d.mts.map +1 -1
  91. package/resources/triggers-types.d.ts +8 -3
  92. package/resources/triggers-types.d.ts.map +1 -1
  93. package/src/client.ts +23 -14
  94. package/src/internal/request-options.ts +53 -0
  95. package/src/internal/types.ts +9 -6
  96. package/src/internal/uploads.ts +1 -1
  97. package/src/internal/utils/log.ts +1 -1
  98. package/src/internal/utils/path.ts +32 -7
  99. package/src/resources/auth-configs.ts +27 -4
  100. package/src/resources/{v3/cli.ts → cli.ts} +39 -42
  101. package/src/resources/connected-accounts.ts +4045 -1211
  102. package/src/resources/files.ts +18 -1
  103. package/src/resources/index.ts +9 -1
  104. package/src/resources/mcp/mcp.ts +6 -11
  105. package/src/resources/toolkits.ts +23 -2
  106. package/src/resources/tools.ts +11 -4
  107. package/src/resources/trigger-instances/trigger-instances.ts +15 -3
  108. package/src/resources/triggers-types.ts +10 -3
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
  114. package/resources/v3/auth/auth.d.mts +0 -10
  115. package/resources/v3/auth/auth.d.mts.map +0 -1
  116. package/resources/v3/auth/auth.d.ts +0 -10
  117. package/resources/v3/auth/auth.d.ts.map +0 -1
  118. package/resources/v3/auth/auth.js +0 -17
  119. package/resources/v3/auth/auth.js.map +0 -1
  120. package/resources/v3/auth/auth.mjs +0 -12
  121. package/resources/v3/auth/auth.mjs.map +0 -1
  122. package/resources/v3/auth/index.d.mts +0 -3
  123. package/resources/v3/auth/index.d.mts.map +0 -1
  124. package/resources/v3/auth/index.d.ts +0 -3
  125. package/resources/v3/auth/index.d.ts.map +0 -1
  126. package/resources/v3/auth/index.js +0 -9
  127. package/resources/v3/auth/index.js.map +0 -1
  128. package/resources/v3/auth/index.mjs +0 -4
  129. package/resources/v3/auth/index.mjs.map +0 -1
  130. package/resources/v3/auth/session.d.mts +0 -246
  131. package/resources/v3/auth/session.d.mts.map +0 -1
  132. package/resources/v3/auth/session.d.ts +0 -246
  133. package/resources/v3/auth/session.d.ts.map +0 -1
  134. package/resources/v3/auth/session.js +0 -25
  135. package/resources/v3/auth/session.js.map +0 -1
  136. package/resources/v3/auth/session.mjs +0 -21
  137. package/resources/v3/auth/session.mjs.map +0 -1
  138. package/resources/v3/auth.d.mts +0 -2
  139. package/resources/v3/auth.d.mts.map +0 -1
  140. package/resources/v3/auth.d.ts +0 -2
  141. package/resources/v3/auth.d.ts.map +0 -1
  142. package/resources/v3/auth.js +0 -6
  143. package/resources/v3/auth.js.map +0 -1
  144. package/resources/v3/auth.mjs +0 -3
  145. package/resources/v3/auth.mjs.map +0 -1
  146. package/resources/v3/cli.d.mts.map +0 -1
  147. package/resources/v3/cli.d.ts.map +0 -1
  148. package/resources/v3/cli.js.map +0 -1
  149. package/resources/v3/cli.mjs.map +0 -1
  150. package/resources/v3/index.d.mts +0 -5
  151. package/resources/v3/index.d.mts.map +0 -1
  152. package/resources/v3/index.d.ts +0 -5
  153. package/resources/v3/index.d.ts.map +0 -1
  154. package/resources/v3/index.js +0 -13
  155. package/resources/v3/index.js.map +0 -1
  156. package/resources/v3/index.mjs +0 -6
  157. package/resources/v3/index.mjs.map +0 -1
  158. package/resources/v3/internal/action-execution.d.mts +0 -169
  159. package/resources/v3/internal/action-execution.d.mts.map +0 -1
  160. package/resources/v3/internal/action-execution.d.ts +0 -169
  161. package/resources/v3/internal/action-execution.d.ts.map +0 -1
  162. package/resources/v3/internal/action-execution.js +0 -38
  163. package/resources/v3/internal/action-execution.js.map +0 -1
  164. package/resources/v3/internal/action-execution.mjs +0 -34
  165. package/resources/v3/internal/action-execution.mjs.map +0 -1
  166. package/resources/v3/internal/index.d.mts +0 -4
  167. package/resources/v3/internal/index.d.mts.map +0 -1
  168. package/resources/v3/internal/index.d.ts +0 -4
  169. package/resources/v3/internal/index.d.ts.map +0 -1
  170. package/resources/v3/internal/index.js +0 -11
  171. package/resources/v3/internal/index.js.map +0 -1
  172. package/resources/v3/internal/index.mjs +0 -5
  173. package/resources/v3/internal/index.mjs.map +0 -1
  174. package/resources/v3/internal/internal.d.mts +0 -14
  175. package/resources/v3/internal/internal.d.mts.map +0 -1
  176. package/resources/v3/internal/internal.d.ts +0 -14
  177. package/resources/v3/internal/internal.d.ts.map +0 -1
  178. package/resources/v3/internal/internal.js +0 -21
  179. package/resources/v3/internal/internal.js.map +0 -1
  180. package/resources/v3/internal/internal.mjs +0 -16
  181. package/resources/v3/internal/internal.mjs.map +0 -1
  182. package/resources/v3/internal/trigger.d.mts +0 -84
  183. package/resources/v3/internal/trigger.d.mts.map +0 -1
  184. package/resources/v3/internal/trigger.d.ts +0 -84
  185. package/resources/v3/internal/trigger.d.ts.map +0 -1
  186. package/resources/v3/internal/trigger.js +0 -23
  187. package/resources/v3/internal/trigger.js.map +0 -1
  188. package/resources/v3/internal/trigger.mjs +0 -19
  189. package/resources/v3/internal/trigger.mjs.map +0 -1
  190. package/resources/v3/internal.d.mts +0 -2
  191. package/resources/v3/internal.d.mts.map +0 -1
  192. package/resources/v3/internal.d.ts +0 -2
  193. package/resources/v3/internal.d.ts.map +0 -1
  194. package/resources/v3/internal.js +0 -6
  195. package/resources/v3/internal.js.map +0 -1
  196. package/resources/v3/internal.mjs +0 -3
  197. package/resources/v3/internal.mjs.map +0 -1
  198. package/resources/v3/v3.d.mts +0 -18
  199. package/resources/v3/v3.d.mts.map +0 -1
  200. package/resources/v3/v3.d.ts +0 -18
  201. package/resources/v3/v3.d.ts.map +0 -1
  202. package/resources/v3/v3.js +0 -25
  203. package/resources/v3/v3.js.map +0 -1
  204. package/resources/v3/v3.mjs +0 -20
  205. package/resources/v3/v3.mjs.map +0 -1
  206. package/resources/v3.d.mts +0 -2
  207. package/resources/v3.d.mts.map +0 -1
  208. package/resources/v3.d.ts +0 -2
  209. package/resources/v3.d.ts.map +0 -1
  210. package/resources/v3.js +0 -6
  211. package/resources/v3.js.map +0 -1
  212. package/resources/v3.mjs +0 -3
  213. package/resources/v3.mjs.map +0 -1
  214. package/src/resources/v3/auth/auth.ts +0 -15
  215. package/src/resources/v3/auth/index.ts +0 -4
  216. package/src/resources/v3/auth/session.ts +0 -298
  217. package/src/resources/v3/auth.ts +0 -3
  218. package/src/resources/v3/index.ts +0 -13
  219. package/src/resources/v3/internal/action-execution.ts +0 -236
  220. package/src/resources/v3/internal/index.ts +0 -10
  221. package/src/resources/v3/internal/internal.ts +0 -35
  222. package/src/resources/v3/internal/trigger.ts +0 -122
  223. package/src/resources/v3/internal.ts +0 -3
  224. package/src/resources/v3/v3.ts +0 -41
  225. package/src/resources/v3.ts +0 -3
@@ -12,25 +12,43 @@ export function encodeURIPath(str: string) {
12
12
  return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
13
13
  }
14
14
 
15
+ const EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
16
+
15
17
  export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
16
18
  function path(statics: readonly string[], ...params: readonly unknown[]): string {
17
19
  // If there are no params, no processing is needed.
18
20
  if (statics.length === 1) return statics[0]!;
19
21
 
20
22
  let postPath = false;
23
+ const invalidSegments = [];
21
24
  const path = statics.reduce((previousValue, currentValue, index) => {
22
25
  if (/[?#]/.test(currentValue)) {
23
26
  postPath = true;
24
27
  }
25
- return (
26
- previousValue +
27
- currentValue +
28
- (index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index])))
29
- );
28
+ const value = params[index];
29
+ let encoded = (postPath ? encodeURIComponent : pathEncoder)('' + value);
30
+ if (
31
+ index !== params.length &&
32
+ (value == null ||
33
+ (typeof value === 'object' &&
34
+ // handle values from other realms
35
+ value.toString ===
36
+ Object.getPrototypeOf(Object.getPrototypeOf((value as any).hasOwnProperty ?? EMPTY) ?? EMPTY)
37
+ ?.toString))
38
+ ) {
39
+ encoded = value + '';
40
+ invalidSegments.push({
41
+ start: previousValue.length + currentValue.length,
42
+ length: encoded.length,
43
+ error: `Value of type ${Object.prototype.toString
44
+ .call(value)
45
+ .slice(8, -1)} is not a valid path parameter`,
46
+ });
47
+ }
48
+ return previousValue + currentValue + (index === params.length ? '' : encoded);
30
49
  }, '');
31
50
 
32
51
  const pathOnly = path.split(/[?#]/, 1)[0]!;
33
- const invalidSegments = [];
34
52
  const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
35
53
  let match;
36
54
 
@@ -39,9 +57,12 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
39
57
  invalidSegments.push({
40
58
  start: match.index,
41
59
  length: match[0].length,
60
+ error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
42
61
  });
43
62
  }
44
63
 
64
+ invalidSegments.sort((a, b) => a.start - b.start);
65
+
45
66
  if (invalidSegments.length > 0) {
46
67
  let lastEnd = 0;
47
68
  const underline = invalidSegments.reduce((acc, segment) => {
@@ -51,7 +72,11 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
51
72
  return acc + spaces + arrows;
52
73
  }, '');
53
74
 
54
- throw new ComposioError(`Path parameters result in path with invalid segments:\n${path}\n${underline}`);
75
+ throw new ComposioError(
76
+ `Path parameters result in path with invalid segments:\n${invalidSegments
77
+ .map((e) => e.error)
78
+ .join('\n')}\n${path}\n${underline}`,
79
+ );
55
80
  }
56
81
 
57
82
  return path;
@@ -279,11 +279,15 @@ export namespace AuthConfigRetrieveResponse {
279
279
  export type AuthConfigUpdateResponse = unknown;
280
280
 
281
281
  export interface AuthConfigListResponse {
282
+ current_page: number;
283
+
282
284
  items: Array<AuthConfigListResponse.Item>;
283
285
 
284
- next_cursor: string | null;
286
+ total_items: number;
285
287
 
286
288
  total_pages: number;
289
+
290
+ next_cursor?: string | null;
287
291
  }
288
292
 
289
293
  export namespace AuthConfigListResponse {
@@ -437,7 +441,7 @@ export interface AuthConfigCreateParams {
437
441
  export namespace AuthConfigCreateParams {
438
442
  export interface Toolkit {
439
443
  /**
440
- * List of toolkits unique keys to filter by
444
+ * Toolkit slug to create auth config for
441
445
  */
442
446
  slug: string;
443
447
  }
@@ -481,11 +485,27 @@ export namespace AuthConfigCreateParams {
481
485
  */
482
486
  name?: string;
483
487
 
488
+ proxy_config?: UnionMember1.ProxyConfig;
489
+
484
490
  /**
485
491
  * The actions that the user can perform on the auth config
486
492
  */
487
493
  restrict_to_following_tools?: Array<string>;
488
494
  }
495
+
496
+ export namespace UnionMember1 {
497
+ export interface ProxyConfig {
498
+ /**
499
+ * The url of the auth proxy
500
+ */
501
+ proxy_url: string;
502
+
503
+ /**
504
+ * The auth key for the auth proxy
505
+ */
506
+ proxy_auth_key?: string;
507
+ }
508
+ }
489
509
  }
490
510
 
491
511
  export type AuthConfigUpdateParams = AuthConfigUpdateParams.Variant0 | AuthConfigUpdateParams.Variant1;
@@ -510,7 +530,10 @@ export declare namespace AuthConfigUpdateParams {
510
530
 
511
531
  export interface AuthConfigListParams {
512
532
  /**
513
- * The cursor to paginate through the auth configs
533
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
534
+ * limit. The page is the page number and the limit is the number of items per
535
+ * page. The cursor is used to paginate through the items. The cursor is not
536
+ * required for the first page.
514
537
  */
515
538
  cursor?: string;
516
539
 
@@ -527,7 +550,7 @@ export interface AuthConfigListParams {
527
550
  is_composio_managed?: string | boolean;
528
551
 
529
552
  /**
530
- * The number of auth configs to return
553
+ * Number of items per page
531
554
  */
532
555
  limit?: number | null;
533
556
 
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { RequestOptions } from '../../internal/request-options';
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Cli extends APIResource {
8
8
  /**
@@ -13,7 +13,7 @@ export class Cli extends APIResource {
13
13
  *
14
14
  * @example
15
15
  * ```ts
16
- * const response = await client.v3.cli.createSession();
16
+ * const response = await client.cli.createSession();
17
17
  * ```
18
18
  */
19
19
  createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse> {
@@ -21,40 +21,37 @@ export class Cli extends APIResource {
21
21
  }
22
22
 
23
23
  /**
24
- * Links a pending CLI session to the currently authenticated user. This is the
25
- * final step in the CLI authentication flow, where the user enters the code in the
26
- * web interface and their account is associated with the CLI session, allowing the
27
- * CLI to act on their behalf.
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
28
  *
29
29
  * @example
30
30
  * ```ts
31
- * const response = await client.v3.cli.linkSession({
31
+ * const response = await client.cli.getSession({
32
32
  * id: 'ABC123',
33
33
  * });
34
34
  * ```
35
35
  */
36
- linkSession(body: CliLinkSessionParams, options?: RequestOptions): APIPromise<CliLinkSessionResponse> {
37
- return this._client.put('/api/v3/cli/link-session', { body, ...options });
36
+ getSession(query: CliGetSessionParams, options?: RequestOptions): APIPromise<CliGetSessionResponse> {
37
+ return this._client.get('/api/v3/cli/get-session', { query, ...options });
38
38
  }
39
39
 
40
40
  /**
41
- * Retrieves the current state of a CLI session using either the session ID (UUID)
42
- * or the 6-character code. This endpoint is used by both the CLI client to check
43
- * if the session has been linked, and by the web interface to display session
44
- * details before linking.
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
45
  *
46
46
  * @example
47
47
  * ```ts
48
- * const response = await client.v3.cli.retrieveSession({
48
+ * const response = await client.cli.linkSession({
49
49
  * id: 'ABC123',
50
50
  * });
51
51
  * ```
52
52
  */
53
- retrieveSession(
54
- query: CliRetrieveSessionParams,
55
- options?: RequestOptions,
56
- ): APIPromise<CliRetrieveSessionResponse> {
57
- return this._client.get('/api/v3/cli/get-session', { query, ...options });
53
+ linkSession(body: CliLinkSessionParams, options?: RequestOptions): APIPromise<CliLinkSessionResponse> {
54
+ return this._client.put('/api/v3/cli/link-session', { body, ...options });
58
55
  }
59
56
  }
60
57
 
@@ -81,17 +78,17 @@ export interface CliCreateSessionResponse {
81
78
  status: 'pending' | 'linked';
82
79
  }
83
80
 
84
- export interface CliLinkSessionResponse {
81
+ export interface CliGetSessionResponse {
85
82
  /**
86
83
  * The unique identifier for the CLI session
87
84
  */
88
85
  id: string;
89
86
 
90
87
  /**
91
- * Information about the linked account. Always present for successful responses
92
- * from this endpoint.
88
+ * Information about the linked account, if any. Null if the session status is
89
+ * "pending".
93
90
  */
94
- account: CliLinkSessionResponse.Account;
91
+ account: CliGetSessionResponse.Account | null;
95
92
 
96
93
  /**
97
94
  * The 6-character hexadecimal code used for CLI login
@@ -109,10 +106,10 @@ export interface CliLinkSessionResponse {
109
106
  status: 'pending' | 'linked';
110
107
  }
111
108
 
112
- export namespace CliLinkSessionResponse {
109
+ export namespace CliGetSessionResponse {
113
110
  /**
114
- * Information about the linked account. Always present for successful responses
115
- * from this endpoint.
111
+ * Information about the linked account, if any. Null if the session status is
112
+ * "pending".
116
113
  */
117
114
  export interface Account {
118
115
  /**
@@ -132,17 +129,17 @@ export namespace CliLinkSessionResponse {
132
129
  }
133
130
  }
134
131
 
135
- export interface CliRetrieveSessionResponse {
132
+ export interface CliLinkSessionResponse {
136
133
  /**
137
134
  * The unique identifier for the CLI session
138
135
  */
139
136
  id: string;
140
137
 
141
138
  /**
142
- * Information about the linked account, if any. Null if the session status is
143
- * "pending".
139
+ * Information about the linked account. Always present for successful responses
140
+ * from this endpoint.
144
141
  */
145
- account: CliRetrieveSessionResponse.Account | null;
142
+ account: CliLinkSessionResponse.Account;
146
143
 
147
144
  /**
148
145
  * The 6-character hexadecimal code used for CLI login
@@ -160,10 +157,10 @@ export interface CliRetrieveSessionResponse {
160
157
  status: 'pending' | 'linked';
161
158
  }
162
159
 
163
- export namespace CliRetrieveSessionResponse {
160
+ export namespace CliLinkSessionResponse {
164
161
  /**
165
- * Information about the linked account, if any. Null if the session status is
166
- * "pending".
162
+ * Information about the linked account. Always present for successful responses
163
+ * from this endpoint.
167
164
  */
168
165
  export interface Account {
169
166
  /**
@@ -183,17 +180,17 @@ export namespace CliRetrieveSessionResponse {
183
180
  }
184
181
  }
185
182
 
186
- export interface CliLinkSessionParams {
183
+ export interface CliGetSessionParams {
187
184
  /**
188
- * The CLI session ID or code to link to the current user
185
+ * CLI session ID (UUID format) or 6-character code to check. Both formats are
186
+ * supported for flexibility in client implementations.
189
187
  */
190
188
  id: string;
191
189
  }
192
190
 
193
- export interface CliRetrieveSessionParams {
191
+ export interface CliLinkSessionParams {
194
192
  /**
195
- * CLI session ID (UUID format) or 6-character code to check. Both formats are
196
- * supported for flexibility in client implementations.
193
+ * The CLI session ID or code to link to the current user
197
194
  */
198
195
  id: string;
199
196
  }
@@ -201,9 +198,9 @@ export interface CliRetrieveSessionParams {
201
198
  export declare namespace Cli {
202
199
  export {
203
200
  type CliCreateSessionResponse as CliCreateSessionResponse,
201
+ type CliGetSessionResponse as CliGetSessionResponse,
204
202
  type CliLinkSessionResponse as CliLinkSessionResponse,
205
- type CliRetrieveSessionResponse as CliRetrieveSessionResponse,
203
+ type CliGetSessionParams as CliGetSessionParams,
206
204
  type CliLinkSessionParams as CliLinkSessionParams,
207
- type CliRetrieveSessionParams as CliRetrieveSessionParams,
208
205
  };
209
206
  }