@composio/client 0.1.0-alpha.35 → 0.1.0-alpha.37

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 (223) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/client.d.mts +11 -14
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -14
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +5 -8
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/values.js +3 -3
  11. package/internal/utils/values.js.map +1 -1
  12. package/internal/utils/values.mjs +3 -3
  13. package/internal/utils/values.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/auth-configs.d.mts +3 -3
  16. package/resources/auth-configs.d.mts.map +1 -1
  17. package/resources/auth-configs.d.ts +3 -3
  18. package/resources/auth-configs.d.ts.map +1 -1
  19. package/resources/cli.d.mts +1 -76
  20. package/resources/cli.d.mts.map +1 -1
  21. package/resources/cli.d.ts +1 -76
  22. package/resources/cli.d.ts.map +1 -1
  23. package/resources/cli.js +0 -28
  24. package/resources/cli.js.map +1 -1
  25. package/resources/cli.mjs +0 -28
  26. package/resources/cli.mjs.map +1 -1
  27. package/resources/connected-accounts.d.mts +476 -12
  28. package/resources/connected-accounts.d.mts.map +1 -1
  29. package/resources/connected-accounts.d.ts +476 -12
  30. package/resources/connected-accounts.d.ts.map +1 -1
  31. package/resources/index.d.mts +5 -6
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +5 -6
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +3 -5
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +2 -3
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/link.d.mts +1 -86
  40. package/resources/link.d.mts.map +1 -1
  41. package/resources/link.d.ts +1 -86
  42. package/resources/link.d.ts.map +1 -1
  43. package/resources/link.js +0 -13
  44. package/resources/link.js.map +1 -1
  45. package/resources/link.mjs +0 -13
  46. package/resources/link.mjs.map +1 -1
  47. package/resources/mcp/index.d.mts +1 -1
  48. package/resources/mcp/index.d.mts.map +1 -1
  49. package/resources/mcp/index.d.ts +1 -1
  50. package/resources/mcp/index.d.ts.map +1 -1
  51. package/resources/mcp/index.js.map +1 -1
  52. package/resources/mcp/index.mjs.map +1 -1
  53. package/resources/mcp/mcp.d.mts +1 -95
  54. package/resources/mcp/mcp.d.mts.map +1 -1
  55. package/resources/mcp/mcp.d.ts +1 -95
  56. package/resources/mcp/mcp.d.ts.map +1 -1
  57. package/resources/mcp/mcp.js +0 -22
  58. package/resources/mcp/mcp.js.map +1 -1
  59. package/resources/mcp/mcp.mjs +0 -22
  60. package/resources/mcp/mcp.mjs.map +1 -1
  61. package/resources/tool-router.d.mts +77 -0
  62. package/resources/tool-router.d.mts.map +1 -0
  63. package/resources/tool-router.d.ts +77 -0
  64. package/resources/tool-router.d.ts.map +1 -0
  65. package/resources/tool-router.js +32 -0
  66. package/resources/tool-router.js.map +1 -0
  67. package/resources/tool-router.mjs +28 -0
  68. package/resources/tool-router.mjs.map +1 -0
  69. package/resources/toolkits.d.mts +16 -2
  70. package/resources/toolkits.d.mts.map +1 -1
  71. package/resources/toolkits.d.ts +16 -2
  72. package/resources/toolkits.d.ts.map +1 -1
  73. package/resources/toolkits.js +2 -2
  74. package/resources/toolkits.js.map +1 -1
  75. package/resources/toolkits.mjs +2 -2
  76. package/resources/toolkits.mjs.map +1 -1
  77. package/resources/tools.d.mts +80 -4
  78. package/resources/tools.d.mts.map +1 -1
  79. package/resources/tools.d.ts +80 -4
  80. package/resources/tools.d.ts.map +1 -1
  81. package/resources/trigger-instances/index.d.mts +0 -1
  82. package/resources/trigger-instances/index.d.mts.map +1 -1
  83. package/resources/trigger-instances/index.d.ts +0 -1
  84. package/resources/trigger-instances/index.d.ts.map +1 -1
  85. package/resources/trigger-instances/index.js +1 -3
  86. package/resources/trigger-instances/index.js.map +1 -1
  87. package/resources/trigger-instances/index.mjs +0 -1
  88. package/resources/trigger-instances/index.mjs.map +1 -1
  89. package/resources/trigger-instances/trigger-instances.d.mts +0 -4
  90. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  91. package/resources/trigger-instances/trigger-instances.d.ts +0 -4
  92. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  93. package/resources/trigger-instances/trigger-instances.js +0 -4
  94. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  95. package/resources/trigger-instances/trigger-instances.mjs +0 -4
  96. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  97. package/src/client.ts +16 -46
  98. package/src/internal/utils/values.ts +3 -3
  99. package/src/resources/auth-configs.ts +6 -3
  100. package/src/resources/cli.ts +0 -89
  101. package/src/resources/connected-accounts.ts +967 -67
  102. package/src/resources/index.ts +6 -19
  103. package/src/resources/link.ts +1 -131
  104. package/src/resources/mcp/index.ts +0 -2
  105. package/src/resources/mcp/mcp.ts +0 -123
  106. package/src/resources/tool-router.ts +96 -0
  107. package/src/resources/toolkits.ts +24 -2
  108. package/src/resources/tools.ts +141 -6
  109. package/src/resources/trigger-instances/index.ts +0 -7
  110. package/src/resources/trigger-instances/trigger-instances.ts +0 -18
  111. package/src/version.ts +1 -1
  112. package/version.d.mts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.js +1 -1
  115. package/version.mjs +1 -1
  116. package/resources/org/api-key.d.mts +0 -44
  117. package/resources/org/api-key.d.mts.map +0 -1
  118. package/resources/org/api-key.d.ts +0 -44
  119. package/resources/org/api-key.d.ts.map +0 -1
  120. package/resources/org/api-key.js +0 -34
  121. package/resources/org/api-key.js.map +0 -1
  122. package/resources/org/api-key.mjs +0 -30
  123. package/resources/org/api-key.mjs.map +0 -1
  124. package/resources/org/index.d.mts +0 -4
  125. package/resources/org/index.d.mts.map +0 -1
  126. package/resources/org/index.d.ts +0 -4
  127. package/resources/org/index.d.ts.map +0 -1
  128. package/resources/org/index.js +0 -11
  129. package/resources/org/index.js.map +0 -1
  130. package/resources/org/index.mjs +0 -5
  131. package/resources/org/index.mjs.map +0 -1
  132. package/resources/org/org.d.mts +0 -14
  133. package/resources/org/org.d.mts.map +0 -1
  134. package/resources/org/org.d.ts +0 -14
  135. package/resources/org/org.d.ts.map +0 -1
  136. package/resources/org/org.js +0 -21
  137. package/resources/org/org.js.map +0 -1
  138. package/resources/org/org.mjs +0 -16
  139. package/resources/org/org.mjs.map +0 -1
  140. package/resources/org/project/api-keys.d.mts +0 -142
  141. package/resources/org/project/api-keys.d.mts.map +0 -1
  142. package/resources/org/project/api-keys.d.ts +0 -142
  143. package/resources/org/project/api-keys.d.ts.map +0 -1
  144. package/resources/org/project/api-keys.js +0 -62
  145. package/resources/org/project/api-keys.js.map +0 -1
  146. package/resources/org/project/api-keys.mjs +0 -58
  147. package/resources/org/project/api-keys.mjs.map +0 -1
  148. package/resources/org/project/index.d.mts +0 -5
  149. package/resources/org/project/index.d.mts.map +0 -1
  150. package/resources/org/project/index.d.ts +0 -5
  151. package/resources/org/project/index.d.ts.map +0 -1
  152. package/resources/org/project/index.js +0 -13
  153. package/resources/org/project/index.js.map +0 -1
  154. package/resources/org/project/index.mjs +0 -6
  155. package/resources/org/project/index.mjs.map +0 -1
  156. package/resources/org/project/project.d.mts +0 -268
  157. package/resources/org/project/project.d.mts.map +0 -1
  158. package/resources/org/project/project.d.ts +0 -268
  159. package/resources/org/project/project.d.ts.map +0 -1
  160. package/resources/org/project/project.js +0 -90
  161. package/resources/org/project/project.js.map +0 -1
  162. package/resources/org/project/project.mjs +0 -85
  163. package/resources/org/project/project.mjs.map +0 -1
  164. package/resources/org/project/trigger.d.mts +0 -145
  165. package/resources/org/project/trigger.d.mts.map +0 -1
  166. package/resources/org/project/trigger.d.ts +0 -145
  167. package/resources/org/project/trigger.d.ts.map +0 -1
  168. package/resources/org/project/trigger.js +0 -35
  169. package/resources/org/project/trigger.js.map +0 -1
  170. package/resources/org/project/trigger.mjs +0 -31
  171. package/resources/org/project/trigger.mjs.map +0 -1
  172. package/resources/org/project/webhook.d.mts +0 -166
  173. package/resources/org/project/webhook.d.mts.map +0 -1
  174. package/resources/org/project/webhook.d.ts +0 -166
  175. package/resources/org/project/webhook.d.ts.map +0 -1
  176. package/resources/org/project/webhook.js +0 -74
  177. package/resources/org/project/webhook.js.map +0 -1
  178. package/resources/org/project/webhook.mjs +0 -70
  179. package/resources/org/project/webhook.mjs.map +0 -1
  180. package/resources/org/project.d.mts +0 -2
  181. package/resources/org/project.d.mts.map +0 -1
  182. package/resources/org/project.d.ts +0 -2
  183. package/resources/org/project.d.ts.map +0 -1
  184. package/resources/org/project.js +0 -6
  185. package/resources/org/project.js.map +0 -1
  186. package/resources/org/project.mjs +0 -3
  187. package/resources/org/project.mjs.map +0 -1
  188. package/resources/org.d.mts +0 -2
  189. package/resources/org.d.mts.map +0 -1
  190. package/resources/org.d.ts +0 -2
  191. package/resources/org.d.ts.map +0 -1
  192. package/resources/org.js +0 -6
  193. package/resources/org.js.map +0 -1
  194. package/resources/org.mjs +0 -3
  195. package/resources/org.mjs.map +0 -1
  196. package/resources/team-members.d.mts +0 -55
  197. package/resources/team-members.d.mts.map +0 -1
  198. package/resources/team-members.d.ts +0 -55
  199. package/resources/team-members.d.ts.map +0 -1
  200. package/resources/team-members.js +0 -38
  201. package/resources/team-members.js.map +0 -1
  202. package/resources/team-members.mjs +0 -34
  203. package/resources/team-members.mjs.map +0 -1
  204. package/resources/trigger-instances/handle.d.mts +0 -25
  205. package/resources/trigger-instances/handle.d.mts.map +0 -1
  206. package/resources/trigger-instances/handle.d.ts +0 -25
  207. package/resources/trigger-instances/handle.d.ts.map +0 -1
  208. package/resources/trigger-instances/handle.js +0 -18
  209. package/resources/trigger-instances/handle.js.map +0 -1
  210. package/resources/trigger-instances/handle.mjs +0 -14
  211. package/resources/trigger-instances/handle.mjs.map +0 -1
  212. package/src/resources/org/api-key.ts +0 -57
  213. package/src/resources/org/index.ts +0 -13
  214. package/src/resources/org/org.ts +0 -41
  215. package/src/resources/org/project/api-keys.ts +0 -180
  216. package/src/resources/org/project/index.ts +0 -35
  217. package/src/resources/org/project/project.ts +0 -381
  218. package/src/resources/org/project/trigger.ts +0 -188
  219. package/src/resources/org/project/webhook.ts +0 -205
  220. package/src/resources/org/project.ts +0 -3
  221. package/src/resources/org.ts +0 -3
  222. package/src/resources/team-members.ts +0 -101
  223. package/src/resources/trigger-instances/handle.ts +0 -53
@@ -1,381 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import * as APIKeysAPI from './api-keys';
5
- import {
6
- APIKeyCreateParams,
7
- APIKeyCreateResponse,
8
- APIKeyDeleteParams,
9
- APIKeyDeleteResponse,
10
- APIKeyListResponse,
11
- APIKeys,
12
- } from './api-keys';
13
- import * as TriggerAPI from './trigger';
14
- import { Trigger, TriggerListResponse, TriggerUpdateParams, TriggerUpdateResponse } from './trigger';
15
- import * as WebhookAPI from './webhook';
16
- import {
17
- Webhook,
18
- WebhookDeleteParams,
19
- WebhookDeleteResponse,
20
- WebhookRefreshResponse,
21
- WebhookRetrieveParams,
22
- WebhookRetrieveResponse,
23
- WebhookUpdateParams,
24
- WebhookUpdateResponse,
25
- } from './webhook';
26
- import { APIPromise } from '../../../core/api-promise';
27
- import { RequestOptions } from '../../../internal/request-options';
28
- import { path } from '../../../internal/utils/path';
29
-
30
- export class Project extends APIResource {
31
- apiKeys: APIKeysAPI.APIKeys = new APIKeysAPI.APIKeys(this._client);
32
- webhook: WebhookAPI.Webhook = new WebhookAPI.Webhook(this._client);
33
- trigger: TriggerAPI.Trigger = new TriggerAPI.Trigger(this._client);
34
-
35
- /**
36
- * Creates a new project within the authenticated user's organization using the
37
- * specified name. Projects are isolated environments within your organization,
38
- * each with their own API keys, webhook configurations, and resources. Use this
39
- * endpoint to create additional projects for different environments (e.g.,
40
- * development, staging, production) or for separate applications.
41
- *
42
- * @example
43
- * ```ts
44
- * const project = await client.org.project.create({
45
- * name: 'my-production-api',
46
- * });
47
- * ```
48
- */
49
- create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<ProjectCreateResponse> {
50
- return this._client.post('/api/v3/org/project/new', { body, ...options });
51
- }
52
-
53
- /**
54
- * Retrieves detailed information about a specific project using its unique
55
- * identifier. This endpoint provides complete project configuration including
56
- * webhook URLs, creation and update timestamps, and webhook secrets. Use this
57
- * endpoint to inspect project settings or verify project configuration.
58
- *
59
- * @example
60
- * ```ts
61
- * const project = await client.org.project.retrieve(
62
- * 'proj_abc123xyz456',
63
- * );
64
- * ```
65
- */
66
- retrieve(projectID: string, options?: RequestOptions): APIPromise<ProjectRetrieveResponse> {
67
- return this._client.get(path`/api/v3/org/project/${projectID}`, options);
68
- }
69
-
70
- /**
71
- * Retrieves all projects belonging to the authenticated user's organization.
72
- * Projects are returned in descending order of creation date (newest first). This
73
- * endpoint is useful for displaying project selection in dashboards or for
74
- * integrations that need to list all available projects.
75
- *
76
- * @example
77
- * ```ts
78
- * const projects = await client.org.project.list();
79
- * ```
80
- */
81
- list(
82
- query: ProjectListParams | null | undefined = {},
83
- options?: RequestOptions,
84
- ): APIPromise<ProjectListResponse> {
85
- return this._client.get('/api/v3/org/project/list', { query, ...options });
86
- }
87
-
88
- /**
89
- * Soft-deletes a project within the organization by its unique identifier. When a
90
- * project is deleted, it is marked as deleted but not immediately removed from the
91
- * database. This operation affects all resources associated with the project
92
- * including API keys, webhook configurations, and connected services. This action
93
- * cannot be undone through the API.
94
- *
95
- * @example
96
- * ```ts
97
- * const project = await client.org.project.delete(
98
- * 'proj_abc123xyz456',
99
- * );
100
- * ```
101
- */
102
- delete(projectID: string, options?: RequestOptions): APIPromise<ProjectDeleteResponse> {
103
- return this._client.delete(path`/api/v3/org/project/delete/${projectID}`, options);
104
- }
105
- }
106
-
107
- export interface ProjectCreateResponse {
108
- /**
109
- * Unique identifier for the project
110
- */
111
- id: string;
112
-
113
- /**
114
- * ISO timestamp when the project was created
115
- */
116
- created_at: string;
117
-
118
- /**
119
- * Whether this project has been soft-deleted
120
- */
121
- deleted: boolean;
122
-
123
- /**
124
- * Email address associated with the project
125
- */
126
- email: string;
127
-
128
- /**
129
- * URL where event webhook notifications will be sent (can be null)
130
- */
131
- event_webhook_url: string | null;
132
-
133
- /**
134
- * Name of the project
135
- */
136
- name: string;
137
-
138
- /**
139
- * Identifier of the organization that owns this project
140
- */
141
- org_id: string;
142
-
143
- /**
144
- * ISO timestamp when the project was last updated
145
- */
146
- updated_at: string;
147
-
148
- /**
149
- * Secret key used to sign webhook payloads for verification
150
- */
151
- webhook_secret: string | null;
152
-
153
- /**
154
- * URL where webhook events will be sent (can be null)
155
- */
156
- webhook_url: string | null;
157
-
158
- /**
159
- * Indicates if the webhook configuration is using the new format
160
- */
161
- is_new_webhook?: boolean;
162
-
163
- /**
164
- * ISO timestamp when the project last subscribed to updates
165
- */
166
- last_subscribed_at?: string | null;
167
-
168
- /**
169
- * Whether triggers are enabled for this project
170
- */
171
- triggers_enabled?: boolean;
172
- }
173
-
174
- export interface ProjectRetrieveResponse {
175
- /**
176
- * Unique identifier for the project
177
- */
178
- id: string;
179
-
180
- /**
181
- * ISO timestamp when the project was created
182
- */
183
- created_at: string;
184
-
185
- /**
186
- * Whether this project has been soft-deleted
187
- */
188
- deleted: boolean;
189
-
190
- /**
191
- * Email address associated with the project
192
- */
193
- email: string;
194
-
195
- /**
196
- * URL where event webhook notifications will be sent (can be null)
197
- */
198
- event_webhook_url: string | null;
199
-
200
- /**
201
- * Name of the project
202
- */
203
- name: string;
204
-
205
- /**
206
- * Identifier of the organization that owns this project
207
- */
208
- org_id: string;
209
-
210
- /**
211
- * ISO timestamp when the project was last updated
212
- */
213
- updated_at: string;
214
-
215
- /**
216
- * Secret key used to sign webhook payloads for verification
217
- */
218
- webhook_secret: string | null;
219
-
220
- /**
221
- * URL where webhook events will be sent (can be null)
222
- */
223
- webhook_url: string | null;
224
-
225
- /**
226
- * Indicates if the webhook configuration is using the new format
227
- */
228
- is_new_webhook?: boolean;
229
-
230
- /**
231
- * ISO timestamp when the project last subscribed to updates
232
- */
233
- last_subscribed_at?: string | null;
234
-
235
- /**
236
- * Whether triggers are enabled for this project
237
- */
238
- triggers_enabled?: boolean;
239
- }
240
-
241
- /**
242
- * Response containing a list of projects
243
- */
244
- export interface ProjectListResponse {
245
- /**
246
- * Array of projects belonging to the organization
247
- */
248
- data: Array<ProjectListResponse.Data>;
249
- }
250
-
251
- export namespace ProjectListResponse {
252
- export interface Data {
253
- /**
254
- * Unique identifier for the project
255
- */
256
- id: string;
257
-
258
- /**
259
- * ISO timestamp when the project was created
260
- */
261
- created_at: string;
262
-
263
- /**
264
- * Whether this project has been soft-deleted
265
- */
266
- deleted: boolean;
267
-
268
- /**
269
- * Email address associated with the project
270
- */
271
- email: string;
272
-
273
- /**
274
- * URL where event webhook notifications will be sent (can be null)
275
- */
276
- event_webhook_url: string | null;
277
-
278
- /**
279
- * Name of the project
280
- */
281
- name: string;
282
-
283
- /**
284
- * Identifier of the organization that owns this project
285
- */
286
- org_id: string;
287
-
288
- /**
289
- * ISO timestamp when the project was last updated
290
- */
291
- updated_at: string;
292
-
293
- /**
294
- * Secret key used to sign webhook payloads for verification
295
- */
296
- webhook_secret: string | null;
297
-
298
- /**
299
- * URL where webhook events will be sent (can be null)
300
- */
301
- webhook_url: string | null;
302
-
303
- /**
304
- * Indicates if the webhook configuration is using the new format
305
- */
306
- is_new_webhook?: boolean;
307
-
308
- /**
309
- * ISO timestamp when the project last subscribed to updates
310
- */
311
- last_subscribed_at?: string | null;
312
-
313
- /**
314
- * Whether triggers are enabled for this project
315
- */
316
- triggers_enabled?: boolean;
317
- }
318
- }
319
-
320
- /**
321
- * Response indicating the result of a project deletion operation
322
- */
323
- export interface ProjectDeleteResponse {
324
- /**
325
- * Status of the delete operation
326
- */
327
- status: string;
328
- }
329
-
330
- export interface ProjectCreateParams {
331
- /**
332
- * A unique name for your project that follows the required format rules
333
- */
334
- name: string;
335
- }
336
-
337
- export interface ProjectListParams {
338
- list_all_org_projects?: boolean | null;
339
- }
340
-
341
- Project.APIKeys = APIKeys;
342
- Project.Webhook = Webhook;
343
- Project.Trigger = Trigger;
344
-
345
- export declare namespace Project {
346
- export {
347
- type ProjectCreateResponse as ProjectCreateResponse,
348
- type ProjectRetrieveResponse as ProjectRetrieveResponse,
349
- type ProjectListResponse as ProjectListResponse,
350
- type ProjectDeleteResponse as ProjectDeleteResponse,
351
- type ProjectCreateParams as ProjectCreateParams,
352
- type ProjectListParams as ProjectListParams,
353
- };
354
-
355
- export {
356
- APIKeys as APIKeys,
357
- type APIKeyCreateResponse as APIKeyCreateResponse,
358
- type APIKeyListResponse as APIKeyListResponse,
359
- type APIKeyDeleteResponse as APIKeyDeleteResponse,
360
- type APIKeyCreateParams as APIKeyCreateParams,
361
- type APIKeyDeleteParams as APIKeyDeleteParams,
362
- };
363
-
364
- export {
365
- Webhook as Webhook,
366
- type WebhookRetrieveResponse as WebhookRetrieveResponse,
367
- type WebhookUpdateResponse as WebhookUpdateResponse,
368
- type WebhookDeleteResponse as WebhookDeleteResponse,
369
- type WebhookRefreshResponse as WebhookRefreshResponse,
370
- type WebhookRetrieveParams as WebhookRetrieveParams,
371
- type WebhookUpdateParams as WebhookUpdateParams,
372
- type WebhookDeleteParams as WebhookDeleteParams,
373
- };
374
-
375
- export {
376
- Trigger as Trigger,
377
- type TriggerUpdateResponse as TriggerUpdateResponse,
378
- type TriggerListResponse as TriggerListResponse,
379
- type TriggerUpdateParams as TriggerUpdateParams,
380
- };
381
- }
@@ -1,188 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import { APIPromise } from '../../../core/api-promise';
5
- import { RequestOptions } from '../../../internal/request-options';
6
-
7
- export class Trigger extends APIResource {
8
- /**
9
- * Updates the trigger enablement status for the current project. Use this endpoint
10
- * to enable or disable triggers for automated workflows within a project.
11
- *
12
- * @example
13
- * ```ts
14
- * const trigger = await client.org.project.trigger.update();
15
- * ```
16
- */
17
- update(
18
- params: TriggerUpdateParams | null | undefined = {},
19
- options?: RequestOptions,
20
- ): APIPromise<TriggerUpdateResponse> {
21
- const { enabled } = params ?? {};
22
- return this._client.patch('/api/v3/org/project/trigger', { query: { enabled }, ...options });
23
- }
24
-
25
- /**
26
- * Retrieves the current project details including its trigger enablement status.
27
- * Use this endpoint to check whether triggers are currently enabled or disabled
28
- * for a project.
29
- *
30
- * @example
31
- * ```ts
32
- * const triggers = await client.org.project.trigger.list();
33
- * ```
34
- */
35
- list(options?: RequestOptions): APIPromise<TriggerListResponse> {
36
- return this._client.get('/api/v3/org/project/trigger', options);
37
- }
38
- }
39
-
40
- export interface TriggerUpdateResponse {
41
- /**
42
- * Unique identifier for the project
43
- */
44
- id: string;
45
-
46
- /**
47
- * ISO timestamp when the project was created
48
- */
49
- created_at: string;
50
-
51
- /**
52
- * Whether this project has been soft-deleted
53
- */
54
- deleted: boolean;
55
-
56
- /**
57
- * Email address associated with the project
58
- */
59
- email: string;
60
-
61
- /**
62
- * URL where event webhook notifications will be sent (can be null)
63
- */
64
- event_webhook_url: string | null;
65
-
66
- /**
67
- * Name of the project
68
- */
69
- name: string;
70
-
71
- /**
72
- * Identifier of the organization that owns this project
73
- */
74
- org_id: string;
75
-
76
- /**
77
- * ISO timestamp when the project was last updated
78
- */
79
- updated_at: string;
80
-
81
- /**
82
- * Secret key used to sign webhook payloads for verification
83
- */
84
- webhook_secret: string | null;
85
-
86
- /**
87
- * URL where webhook events will be sent (can be null)
88
- */
89
- webhook_url: string | null;
90
-
91
- /**
92
- * Indicates if the webhook configuration is using the new format
93
- */
94
- is_new_webhook?: boolean;
95
-
96
- /**
97
- * ISO timestamp when the project last subscribed to updates
98
- */
99
- last_subscribed_at?: string | null;
100
-
101
- /**
102
- * Whether triggers are enabled for this project
103
- */
104
- triggers_enabled?: boolean;
105
- }
106
-
107
- export interface TriggerListResponse {
108
- /**
109
- * Unique identifier for the project
110
- */
111
- id: string;
112
-
113
- /**
114
- * ISO timestamp when the project was created
115
- */
116
- created_at: string;
117
-
118
- /**
119
- * Whether this project has been soft-deleted
120
- */
121
- deleted: boolean;
122
-
123
- /**
124
- * Email address associated with the project
125
- */
126
- email: string;
127
-
128
- /**
129
- * URL where event webhook notifications will be sent (can be null)
130
- */
131
- event_webhook_url: string | null;
132
-
133
- /**
134
- * Name of the project
135
- */
136
- name: string;
137
-
138
- /**
139
- * Identifier of the organization that owns this project
140
- */
141
- org_id: string;
142
-
143
- /**
144
- * ISO timestamp when the project was last updated
145
- */
146
- updated_at: string;
147
-
148
- /**
149
- * Secret key used to sign webhook payloads for verification
150
- */
151
- webhook_secret: string | null;
152
-
153
- /**
154
- * URL where webhook events will be sent (can be null)
155
- */
156
- webhook_url: string | null;
157
-
158
- /**
159
- * Indicates if the webhook configuration is using the new format
160
- */
161
- is_new_webhook?: boolean;
162
-
163
- /**
164
- * ISO timestamp when the project last subscribed to updates
165
- */
166
- last_subscribed_at?: string | null;
167
-
168
- /**
169
- * Whether triggers are enabled for this project
170
- */
171
- triggers_enabled?: boolean;
172
- }
173
-
174
- export interface TriggerUpdateParams {
175
- /**
176
- * Boolean flag indicating whether triggers should be enabled (true) or disabled
177
- * (false) for the project
178
- */
179
- enabled?: boolean | null;
180
- }
181
-
182
- export declare namespace Trigger {
183
- export {
184
- type TriggerUpdateResponse as TriggerUpdateResponse,
185
- type TriggerListResponse as TriggerListResponse,
186
- type TriggerUpdateParams as TriggerUpdateParams,
187
- };
188
- }