@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.
Files changed (254) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +12 -24
  3. package/client.d.mts +7 -7
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +7 -7
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -3
  10. package/client.mjs.map +1 -1
  11. package/internal/detect-platform.js +3 -3
  12. package/internal/detect-platform.js.map +1 -1
  13. package/internal/detect-platform.mjs +3 -3
  14. package/internal/detect-platform.mjs.map +1 -1
  15. package/internal/shim-types.d.mts +11 -22
  16. package/internal/shim-types.d.mts.map +1 -0
  17. package/internal/shim-types.d.ts +11 -22
  18. package/internal/shim-types.d.ts.map +1 -0
  19. package/internal/shim-types.js +4 -0
  20. package/internal/shim-types.js.map +1 -0
  21. package/internal/shim-types.mjs +3 -0
  22. package/internal/shim-types.mjs.map +1 -0
  23. package/internal/shims.d.mts +2 -2
  24. package/internal/shims.d.mts.map +1 -1
  25. package/internal/shims.d.ts +2 -2
  26. package/internal/shims.d.ts.map +1 -1
  27. package/package.json +1 -4
  28. package/resources/auth-configs.d.mts +3 -3
  29. package/resources/auth-configs.d.mts.map +1 -1
  30. package/resources/auth-configs.d.ts +3 -3
  31. package/resources/auth-configs.d.ts.map +1 -1
  32. package/resources/connected-accounts.d.mts +5262 -52
  33. package/resources/connected-accounts.d.mts.map +1 -1
  34. package/resources/connected-accounts.d.ts +5262 -52
  35. package/resources/connected-accounts.d.ts.map +1 -1
  36. package/resources/index.d.mts +3 -3
  37. package/resources/index.d.mts.map +1 -1
  38. package/resources/index.d.ts +3 -3
  39. package/resources/index.d.ts.map +1 -1
  40. package/resources/index.js +3 -3
  41. package/resources/index.js.map +1 -1
  42. package/resources/index.mjs +1 -1
  43. package/resources/index.mjs.map +1 -1
  44. package/resources/mcp/index.d.mts +1 -1
  45. package/resources/mcp/index.d.mts.map +1 -1
  46. package/resources/mcp/index.d.ts +1 -1
  47. package/resources/mcp/index.d.ts.map +1 -1
  48. package/resources/mcp/index.js.map +1 -1
  49. package/resources/mcp/index.mjs.map +1 -1
  50. package/resources/mcp/mcp.d.mts +99 -1
  51. package/resources/mcp/mcp.d.mts.map +1 -1
  52. package/resources/mcp/mcp.d.ts +99 -1
  53. package/resources/mcp/mcp.d.ts.map +1 -1
  54. package/resources/mcp/mcp.js +22 -0
  55. package/resources/mcp/mcp.js.map +1 -1
  56. package/resources/mcp/mcp.mjs +22 -0
  57. package/resources/mcp/mcp.mjs.map +1 -1
  58. package/resources/org/project/api-keys.d.mts +0 -15
  59. package/resources/org/project/api-keys.d.mts.map +1 -1
  60. package/resources/org/project/api-keys.d.ts +0 -15
  61. package/resources/org/project/api-keys.d.ts.map +1 -1
  62. package/resources/tools.d.mts +4 -5
  63. package/resources/tools.d.mts.map +1 -1
  64. package/resources/tools.d.ts +4 -5
  65. package/resources/tools.d.ts.map +1 -1
  66. package/resources/trigger-instances/index.d.mts +2 -1
  67. package/resources/trigger-instances/index.d.mts.map +1 -1
  68. package/resources/trigger-instances/index.d.ts +2 -1
  69. package/resources/trigger-instances/index.d.ts.map +1 -1
  70. package/resources/trigger-instances/index.js +3 -1
  71. package/resources/trigger-instances/index.js.map +1 -1
  72. package/resources/trigger-instances/index.mjs +1 -0
  73. package/resources/trigger-instances/index.mjs.map +1 -1
  74. package/resources/trigger-instances/manage.d.mts +26 -0
  75. package/resources/trigger-instances/manage.d.mts.map +1 -0
  76. package/resources/trigger-instances/manage.d.ts +26 -0
  77. package/resources/trigger-instances/manage.d.ts.map +1 -0
  78. package/resources/trigger-instances/manage.js +16 -0
  79. package/resources/trigger-instances/manage.js.map +1 -0
  80. package/resources/trigger-instances/manage.mjs +12 -0
  81. package/resources/trigger-instances/manage.mjs.map +1 -0
  82. package/resources/trigger-instances/trigger-instances.d.mts +15 -68
  83. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  84. package/resources/trigger-instances/trigger-instances.d.ts +15 -68
  85. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  86. package/resources/trigger-instances/trigger-instances.js +4 -7
  87. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  88. package/resources/trigger-instances/trigger-instances.mjs +4 -7
  89. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  90. package/resources/v3/admin.d.mts +100 -0
  91. package/resources/v3/admin.d.mts.map +1 -0
  92. package/resources/v3/admin.d.ts +100 -0
  93. package/resources/v3/admin.d.ts.map +1 -0
  94. package/resources/v3/admin.js +54 -0
  95. package/resources/v3/admin.js.map +1 -0
  96. package/resources/v3/admin.mjs +50 -0
  97. package/resources/v3/admin.mjs.map +1 -0
  98. package/resources/v3/auth/auth.d.mts +10 -0
  99. package/resources/v3/auth/auth.d.mts.map +1 -0
  100. package/resources/v3/auth/auth.d.ts +10 -0
  101. package/resources/v3/auth/auth.d.ts.map +1 -0
  102. package/resources/{auth → v3/auth}/auth.js +2 -2
  103. package/resources/v3/auth/auth.js.map +1 -0
  104. package/resources/{auth → v3/auth}/auth.mjs +1 -1
  105. package/resources/v3/auth/auth.mjs.map +1 -0
  106. package/resources/v3/auth/index.d.mts +3 -0
  107. package/resources/v3/auth/index.d.mts.map +1 -0
  108. package/resources/v3/auth/index.d.ts +3 -0
  109. package/resources/v3/auth/index.d.ts.map +1 -0
  110. package/resources/v3/auth/index.js.map +1 -0
  111. package/resources/v3/auth/index.mjs.map +1 -0
  112. package/resources/{auth → v3/auth}/session.d.mts +16 -10
  113. package/resources/v3/auth/session.d.mts.map +1 -0
  114. package/resources/{auth → v3/auth}/session.d.ts +16 -10
  115. package/resources/v3/auth/session.d.ts.map +1 -0
  116. package/resources/{auth → v3/auth}/session.js +8 -2
  117. package/resources/v3/auth/session.js.map +1 -0
  118. package/resources/{auth → v3/auth}/session.mjs +8 -2
  119. package/resources/v3/auth/session.mjs.map +1 -0
  120. package/resources/{auth.d.mts.map → v3/auth.d.mts.map} +1 -1
  121. package/resources/v3/auth.d.ts.map +1 -0
  122. package/resources/{auth.js → v3/auth.js} +1 -1
  123. package/resources/v3/auth.js.map +1 -0
  124. package/resources/v3/auth.mjs.map +1 -0
  125. package/resources/v3/cli.d.mts +167 -0
  126. package/resources/v3/cli.d.mts.map +1 -0
  127. package/resources/v3/cli.d.ts +167 -0
  128. package/resources/v3/cli.d.ts.map +1 -0
  129. package/resources/v3/cli.js +55 -0
  130. package/resources/v3/cli.js.map +1 -0
  131. package/resources/v3/cli.mjs +51 -0
  132. package/resources/v3/cli.mjs.map +1 -0
  133. package/resources/v3/index.d.mts +6 -0
  134. package/resources/v3/index.d.mts.map +1 -0
  135. package/resources/v3/index.d.ts +6 -0
  136. package/resources/v3/index.d.ts.map +1 -0
  137. package/resources/v3/index.js +15 -0
  138. package/resources/v3/index.js.map +1 -0
  139. package/resources/v3/index.mjs +7 -0
  140. package/resources/v3/index.mjs.map +1 -0
  141. package/resources/v3/internal/action-execution.d.mts +153 -0
  142. package/resources/v3/internal/action-execution.d.mts.map +1 -0
  143. package/resources/v3/internal/action-execution.d.ts +153 -0
  144. package/resources/v3/internal/action-execution.d.ts.map +1 -0
  145. package/resources/v3/internal/action-execution.js +38 -0
  146. package/resources/v3/internal/action-execution.js.map +1 -0
  147. package/resources/v3/internal/action-execution.mjs +34 -0
  148. package/resources/v3/internal/action-execution.mjs.map +1 -0
  149. package/resources/v3/internal/index.d.mts +4 -0
  150. package/resources/v3/internal/index.d.mts.map +1 -0
  151. package/resources/v3/internal/index.d.ts +4 -0
  152. package/resources/v3/internal/index.d.ts.map +1 -0
  153. package/resources/v3/internal/index.js +11 -0
  154. package/resources/v3/internal/index.js.map +1 -0
  155. package/resources/v3/internal/index.mjs +5 -0
  156. package/resources/v3/internal/index.mjs.map +1 -0
  157. package/resources/v3/internal/internal.d.mts +14 -0
  158. package/resources/v3/internal/internal.d.mts.map +1 -0
  159. package/resources/v3/internal/internal.d.ts +14 -0
  160. package/resources/v3/internal/internal.d.ts.map +1 -0
  161. package/resources/v3/internal/internal.js +21 -0
  162. package/resources/v3/internal/internal.js.map +1 -0
  163. package/resources/v3/internal/internal.mjs +16 -0
  164. package/resources/v3/internal/internal.mjs.map +1 -0
  165. package/resources/v3/internal/trigger.d.mts +84 -0
  166. package/resources/v3/internal/trigger.d.mts.map +1 -0
  167. package/resources/v3/internal/trigger.d.ts +84 -0
  168. package/resources/v3/internal/trigger.d.ts.map +1 -0
  169. package/resources/v3/internal/trigger.js +23 -0
  170. package/resources/v3/internal/trigger.js.map +1 -0
  171. package/resources/v3/internal/trigger.mjs +19 -0
  172. package/resources/v3/internal/trigger.mjs.map +1 -0
  173. package/resources/v3/internal.d.mts +2 -0
  174. package/resources/v3/internal.d.mts.map +1 -0
  175. package/resources/v3/internal.d.ts +2 -0
  176. package/resources/v3/internal.d.ts.map +1 -0
  177. package/resources/v3/internal.js +6 -0
  178. package/resources/v3/internal.js.map +1 -0
  179. package/resources/v3/internal.mjs +3 -0
  180. package/resources/v3/internal.mjs.map +1 -0
  181. package/resources/v3/v3.d.mts +22 -0
  182. package/resources/v3/v3.d.mts.map +1 -0
  183. package/resources/v3/v3.d.ts +22 -0
  184. package/resources/v3/v3.d.ts.map +1 -0
  185. package/resources/v3/v3.js +29 -0
  186. package/resources/v3/v3.js.map +1 -0
  187. package/resources/v3/v3.mjs +24 -0
  188. package/resources/v3/v3.mjs.map +1 -0
  189. package/resources/v3.d.mts +2 -0
  190. package/resources/v3.d.mts.map +1 -0
  191. package/resources/v3.d.ts +2 -0
  192. package/resources/v3.d.ts.map +1 -0
  193. package/resources/v3.js +6 -0
  194. package/resources/v3.js.map +1 -0
  195. package/resources/v3.mjs +3 -0
  196. package/resources/v3.mjs.map +1 -0
  197. package/src/client.ts +9 -11
  198. package/src/internal/detect-platform.ts +3 -3
  199. package/src/internal/shim-types.ts +26 -0
  200. package/src/internal/shims.ts +2 -2
  201. package/src/resources/auth-configs.ts +0 -3
  202. package/src/resources/connected-accounts.ts +10261 -298
  203. package/src/resources/index.ts +3 -4
  204. package/src/resources/mcp/index.ts +2 -0
  205. package/src/resources/mcp/mcp.ts +128 -0
  206. package/src/resources/org/project/api-keys.ts +0 -18
  207. package/src/resources/tools.ts +5 -6
  208. package/src/resources/trigger-instances/index.ts +6 -3
  209. package/src/resources/trigger-instances/manage.ts +46 -0
  210. package/src/resources/trigger-instances/trigger-instances.ts +21 -87
  211. package/src/resources/v3/admin.ts +141 -0
  212. package/src/resources/{auth → v3/auth}/auth.ts +3 -3
  213. package/src/resources/{auth → v3/auth}/index.ts +1 -1
  214. package/src/resources/{auth → v3/auth}/session.ts +16 -10
  215. package/src/resources/v3/cli.ts +209 -0
  216. package/src/resources/v3/index.ts +20 -0
  217. package/src/resources/v3/internal/action-execution.ts +236 -0
  218. package/src/resources/v3/internal/index.ts +10 -0
  219. package/src/resources/v3/internal/internal.ts +35 -0
  220. package/src/resources/v3/internal/trigger.ts +122 -0
  221. package/src/resources/v3/internal.ts +3 -0
  222. package/src/resources/v3/v3.ts +59 -0
  223. package/src/resources/v3.ts +3 -0
  224. package/src/version.ts +1 -1
  225. package/version.d.mts +1 -1
  226. package/version.d.ts +1 -1
  227. package/version.js +1 -1
  228. package/version.mjs +1 -1
  229. package/resources/auth/auth.d.mts +0 -10
  230. package/resources/auth/auth.d.mts.map +0 -1
  231. package/resources/auth/auth.d.ts +0 -10
  232. package/resources/auth/auth.d.ts.map +0 -1
  233. package/resources/auth/auth.js.map +0 -1
  234. package/resources/auth/auth.mjs.map +0 -1
  235. package/resources/auth/index.d.mts +0 -3
  236. package/resources/auth/index.d.mts.map +0 -1
  237. package/resources/auth/index.d.ts +0 -3
  238. package/resources/auth/index.d.ts.map +0 -1
  239. package/resources/auth/index.js.map +0 -1
  240. package/resources/auth/index.mjs.map +0 -1
  241. package/resources/auth/session.d.mts.map +0 -1
  242. package/resources/auth/session.d.ts.map +0 -1
  243. package/resources/auth/session.js.map +0 -1
  244. package/resources/auth/session.mjs.map +0 -1
  245. package/resources/auth.d.ts.map +0 -1
  246. package/resources/auth.js.map +0 -1
  247. package/resources/auth.mjs.map +0 -1
  248. package/src/internal/shim-types.d.ts +0 -28
  249. /package/resources/{auth → v3/auth}/index.js +0 -0
  250. /package/resources/{auth → v3/auth}/index.mjs +0 -0
  251. /package/resources/{auth.d.mts → v3/auth.d.mts} +0 -0
  252. /package/resources/{auth.d.ts → v3/auth.d.ts} +0 -0
  253. /package/resources/{auth.mjs → v3/auth.mjs} +0 -0
  254. /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":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C,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,S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K,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("../../internal/tslib.js");
6
- const resource_1 = require("../../core/resource.js");
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 "../../core/resource.mjs";
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,3 @@
1
+ export { Auth } from "./auth.mjs";
2
+ export { Session, type SessionRetrieveInfoResponse } from "./session.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -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,3 @@
1
+ export { Auth } from "./auth.js";
2
+ export { Session, type SessionRetrieveInfoResponse } from "./session.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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 "../../core/resource.mjs";
2
- import { APIPromise } from "../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../internal/request-options.mjs";
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
- retrieve(options?: RequestOptions): APIPromise<SessionRetrieveResponse>;
18
+ retrieveInfo(options?: RequestOptions): APIPromise<SessionRetrieveInfoResponse>;
13
19
  }
14
20
  /**
15
21
  * Response containing user session information
16
22
  */
17
- export interface SessionRetrieveResponse {
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: SessionRetrieveResponse.APIKey | null;
27
+ api_key: SessionRetrieveInfoResponse.APIKey | null;
22
28
  /**
23
29
  * Information about the authenticated user
24
30
  */
25
- org_member: SessionRetrieveResponse.OrgMember;
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: SessionRetrieveResponse.Project | null;
36
+ project: SessionRetrieveInfoResponse.Project | null;
31
37
  }
32
- export declare namespace SessionRetrieveResponse {
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 SessionRetrieveResponse as SessionRetrieveResponse };
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,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G;QACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAE9B;;WAEG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B;IAED,UAAiB,OAAO,CAAC;QACvB;;WAEG;QACH,UAAiB,GAAG;YAClB;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAElC;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;QAED,UAAiB,GAAG,CAAC;YACnB,UAAiB,SAAS;gBACxB;;mBAEG;gBACH,EAAE,EAAE,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 "../../core/resource.js";
2
- import { APIPromise } from "../../core/api-promise.js";
3
- import { RequestOptions } from "../../internal/request-options.js";
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
- retrieve(options?: RequestOptions): APIPromise<SessionRetrieveResponse>;
18
+ retrieveInfo(options?: RequestOptions): APIPromise<SessionRetrieveInfoResponse>;
13
19
  }
14
20
  /**
15
21
  * Response containing user session information
16
22
  */
17
- export interface SessionRetrieveResponse {
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: SessionRetrieveResponse.APIKey | null;
27
+ api_key: SessionRetrieveInfoResponse.APIKey | null;
22
28
  /**
23
29
  * Information about the authenticated user
24
30
  */
25
- org_member: SessionRetrieveResponse.OrgMember;
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: SessionRetrieveResponse.Project | null;
36
+ project: SessionRetrieveInfoResponse.Project | null;
31
37
  }
32
- export declare namespace SessionRetrieveResponse {
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 SessionRetrieveResponse as SessionRetrieveResponse };
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,E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AAC;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"}
@@ -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("../../core/resource.js");
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
- retrieve(options) {
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 "../../core/resource.mjs";
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
- retrieve(options) {
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":["../src/resources/auth.ts"],"names":[],"mappings":""}
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("../internal/tslib.js");
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"}