@composio/client 0.1.0-alpha.10 → 0.1.0-alpha.12

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 (185) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +7 -7
  3. package/client.d.mts +6 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/auth-configs.d.mts +168 -29
  11. package/resources/auth-configs.d.mts.map +1 -1
  12. package/resources/auth-configs.d.ts +168 -29
  13. package/resources/auth-configs.d.ts.map +1 -1
  14. package/resources/auth-configs.js +50 -4
  15. package/resources/auth-configs.js.map +1 -1
  16. package/resources/auth-configs.mjs +50 -4
  17. package/resources/auth-configs.mjs.map +1 -1
  18. package/resources/connected-accounts.d.mts +80 -17
  19. package/resources/connected-accounts.d.mts.map +1 -1
  20. package/resources/connected-accounts.d.ts +80 -17
  21. package/resources/connected-accounts.d.ts.map +1 -1
  22. package/resources/connected-accounts.js +56 -4
  23. package/resources/connected-accounts.js.map +1 -1
  24. package/resources/connected-accounts.mjs +56 -4
  25. package/resources/connected-accounts.mjs.map +1 -1
  26. package/resources/files.d.mts +72 -23
  27. package/resources/files.d.mts.map +1 -1
  28. package/resources/files.d.ts +72 -23
  29. package/resources/files.d.ts.map +1 -1
  30. package/resources/files.js +20 -2
  31. package/resources/files.js.map +1 -1
  32. package/resources/files.mjs +20 -2
  33. package/resources/files.mjs.map +1 -1
  34. package/resources/index.d.mts +3 -3
  35. package/resources/index.d.mts.map +1 -1
  36. package/resources/index.d.ts +3 -3
  37. package/resources/index.d.ts.map +1 -1
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs.map +1 -1
  40. package/resources/mcp/custom.d.mts +87 -0
  41. package/resources/mcp/custom.d.mts.map +1 -0
  42. package/resources/mcp/custom.d.ts +87 -0
  43. package/resources/mcp/custom.d.ts.map +1 -0
  44. package/resources/mcp/custom.js +26 -0
  45. package/resources/mcp/custom.js.map +1 -0
  46. package/resources/mcp/custom.mjs +22 -0
  47. package/resources/mcp/custom.mjs.map +1 -0
  48. package/resources/mcp/index.d.mts +2 -2
  49. package/resources/mcp/index.d.mts.map +1 -1
  50. package/resources/mcp/index.d.ts +2 -2
  51. package/resources/mcp/index.d.ts.map +1 -1
  52. package/resources/mcp/index.js +3 -3
  53. package/resources/mcp/index.js.map +1 -1
  54. package/resources/mcp/index.mjs +1 -1
  55. package/resources/mcp/index.mjs.map +1 -1
  56. package/resources/mcp/mcp.d.mts +322 -217
  57. package/resources/mcp/mcp.d.mts.map +1 -1
  58. package/resources/mcp/mcp.d.ts +322 -217
  59. package/resources/mcp/mcp.d.ts.map +1 -1
  60. package/resources/mcp/mcp.js +72 -25
  61. package/resources/mcp/mcp.js.map +1 -1
  62. package/resources/mcp/mcp.mjs +72 -25
  63. package/resources/mcp/mcp.mjs.map +1 -1
  64. package/resources/migration.d.mts +11 -2
  65. package/resources/migration.d.mts.map +1 -1
  66. package/resources/migration.d.ts +11 -2
  67. package/resources/migration.d.ts.map +1 -1
  68. package/resources/migration.js +3 -1
  69. package/resources/migration.js.map +1 -1
  70. package/resources/migration.mjs +3 -1
  71. package/resources/migration.mjs.map +1 -1
  72. package/resources/org/api-key.d.mts +23 -2
  73. package/resources/org/api-key.d.mts.map +1 -1
  74. package/resources/org/api-key.d.ts +23 -2
  75. package/resources/org/api-key.d.ts.map +1 -1
  76. package/resources/org/api-key.js +15 -2
  77. package/resources/org/api-key.js.map +1 -1
  78. package/resources/org/api-key.mjs +15 -2
  79. package/resources/org/api-key.mjs.map +1 -1
  80. package/resources/org/project/api-keys.d.mts +114 -22
  81. package/resources/org/project/api-keys.d.mts.map +1 -1
  82. package/resources/org/project/api-keys.d.ts +114 -22
  83. package/resources/org/project/api-keys.d.ts.map +1 -1
  84. package/resources/org/project/api-keys.js +57 -0
  85. package/resources/org/project/api-keys.js.map +1 -1
  86. package/resources/org/project/api-keys.mjs +57 -0
  87. package/resources/org/project/api-keys.mjs.map +1 -1
  88. package/resources/org/project/project.d.mts +176 -4
  89. package/resources/org/project/project.d.mts.map +1 -1
  90. package/resources/org/project/project.d.ts +176 -4
  91. package/resources/org/project/project.d.ts.map +1 -1
  92. package/resources/org/project/project.js +46 -3
  93. package/resources/org/project/project.js.map +1 -1
  94. package/resources/org/project/project.mjs +46 -3
  95. package/resources/org/project/project.mjs.map +1 -1
  96. package/resources/org/project/trigger.d.mts +101 -1
  97. package/resources/org/project/trigger.d.mts.map +1 -1
  98. package/resources/org/project/trigger.d.ts +101 -1
  99. package/resources/org/project/trigger.d.ts.map +1 -1
  100. package/resources/org/project/trigger.js +21 -0
  101. package/resources/org/project/trigger.js.map +1 -1
  102. package/resources/org/project/trigger.mjs +21 -0
  103. package/resources/org/project/trigger.mjs.map +1 -1
  104. package/resources/org/project/webhook.d.mts +86 -15
  105. package/resources/org/project/webhook.d.mts.map +1 -1
  106. package/resources/org/project/webhook.d.ts +86 -15
  107. package/resources/org/project/webhook.d.ts.map +1 -1
  108. package/resources/org/project/webhook.js +49 -2
  109. package/resources/org/project/webhook.js.map +1 -1
  110. package/resources/org/project/webhook.mjs +49 -2
  111. package/resources/org/project/webhook.mjs.map +1 -1
  112. package/resources/team-members.d.mts +7 -7
  113. package/resources/team-members.d.mts.map +1 -1
  114. package/resources/team-members.d.ts +7 -7
  115. package/resources/team-members.d.ts.map +1 -1
  116. package/resources/toolkits.d.mts +195 -7
  117. package/resources/toolkits.d.mts.map +1 -1
  118. package/resources/toolkits.d.ts +195 -7
  119. package/resources/toolkits.d.ts.map +1 -1
  120. package/resources/toolkits.js +14 -6
  121. package/resources/toolkits.js.map +1 -1
  122. package/resources/toolkits.mjs +14 -6
  123. package/resources/toolkits.mjs.map +1 -1
  124. package/resources/tools.d.mts +211 -44
  125. package/resources/tools.d.mts.map +1 -1
  126. package/resources/tools.d.ts +211 -44
  127. package/resources/tools.d.ts.map +1 -1
  128. package/resources/tools.js +62 -9
  129. package/resources/tools.js.map +1 -1
  130. package/resources/tools.mjs +62 -9
  131. package/resources/tools.mjs.map +1 -1
  132. package/resources/trigger-instances/index.d.mts +1 -1
  133. package/resources/trigger-instances/index.d.mts.map +1 -1
  134. package/resources/trigger-instances/index.d.ts +1 -1
  135. package/resources/trigger-instances/index.d.ts.map +1 -1
  136. package/resources/trigger-instances/trigger-instances.d.mts +86 -19
  137. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  138. package/resources/trigger-instances/trigger-instances.d.ts +86 -19
  139. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  140. package/resources/trigger-instances/trigger-instances.js +6 -6
  141. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  142. package/resources/trigger-instances/trigger-instances.mjs +6 -6
  143. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  144. package/resources/triggers-types.d.mts +96 -2
  145. package/resources/triggers-types.d.mts.map +1 -1
  146. package/resources/triggers-types.d.ts +96 -2
  147. package/resources/triggers-types.d.ts.map +1 -1
  148. package/resources/triggers-types.js +23 -1
  149. package/resources/triggers-types.js.map +1 -1
  150. package/resources/triggers-types.mjs +23 -1
  151. package/resources/triggers-types.mjs.map +1 -1
  152. package/src/client.ts +6 -6
  153. package/src/resources/auth-configs.ts +169 -29
  154. package/src/resources/connected-accounts.ts +80 -17
  155. package/src/resources/files.ts +75 -23
  156. package/src/resources/index.ts +3 -3
  157. package/src/resources/mcp/custom.ts +103 -0
  158. package/src/resources/mcp/index.ts +2 -3
  159. package/src/resources/mcp/mcp.ts +342 -256
  160. package/src/resources/migration.ts +11 -2
  161. package/src/resources/org/api-key.ts +23 -2
  162. package/src/resources/org/project/api-keys.ts +117 -22
  163. package/src/resources/org/project/project.ts +176 -4
  164. package/src/resources/org/project/trigger.ts +101 -1
  165. package/src/resources/org/project/webhook.ts +86 -15
  166. package/src/resources/team-members.ts +7 -7
  167. package/src/resources/toolkits.ts +200 -7
  168. package/src/resources/tools.ts +213 -46
  169. package/src/resources/trigger-instances/index.ts +1 -1
  170. package/src/resources/trigger-instances/trigger-instances.ts +106 -25
  171. package/src/resources/triggers-types.ts +96 -2
  172. package/src/version.ts +1 -1
  173. package/version.d.mts +1 -1
  174. package/version.d.ts +1 -1
  175. package/version.js +1 -1
  176. package/version.mjs +1 -1
  177. package/resources/mcp/command.d.mts +0 -37
  178. package/resources/mcp/command.d.mts.map +0 -1
  179. package/resources/mcp/command.d.ts +0 -37
  180. package/resources/mcp/command.d.ts.map +0 -1
  181. package/resources/mcp/command.js +0 -15
  182. package/resources/mcp/command.js.map +0 -1
  183. package/resources/mcp/command.mjs +0 -11
  184. package/resources/mcp/command.mjs.map +0 -1
  185. package/src/resources/mcp/command.ts +0 -50
@@ -6,7 +6,9 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Migration extends APIResource {
8
8
  /**
9
- * Convert a legacy UUID to its corresponding NanoId for migration purposes
9
+ * Convert a legacy UUID to its corresponding NanoId for migration purposes. This
10
+ * endpoint facilitates the transition from UUID-based identifiers to the more
11
+ * compact NanoId format used in the v3 API.
10
12
  */
11
13
  retrieveNanoid(
12
14
  query: MigrationRetrieveNanoidParams,
@@ -18,14 +20,21 @@ export class Migration extends APIResource {
18
20
 
19
21
  export interface MigrationRetrieveNanoidResponse {
20
22
  /**
21
- * The NanoId corresponding to the provided UUID.
23
+ * The NanoId corresponding to the provided UUID. This is the new identifier that
24
+ * should be used in place of the legacy UUID.
22
25
  */
23
26
  nanoid: string;
24
27
  }
25
28
 
26
29
  export interface MigrationRetrieveNanoidParams {
30
+ /**
31
+ * The type of resource that the UUID belongs to
32
+ */
27
33
  type: 'CONNECTED_ACCOUNT' | 'AUTH_CONFIG' | 'TRIGGER_INSTANCE';
28
34
 
35
+ /**
36
+ * The legacy UUID that needs to be converted to a NanoId
37
+ */
29
38
  uuid: string;
30
39
  }
31
40
 
@@ -6,7 +6,14 @@ import { RequestOptions } from '../../internal/request-options';
6
6
 
7
7
  export class APIKey extends APIResource {
8
8
  /**
9
- * Retrieve the API key for the current organization (admin only)
9
+ * Retrieve the API key for the current organization. This endpoint is restricted
10
+ * to organization administrators only. The returned API key can be used for
11
+ * authenticating organization-level API requests.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const apiKey = await client.org.apiKey.retrieve();
16
+ * ```
10
17
  */
11
18
  retrieve(options?: RequestOptions): APIPromise<APIKeyRetrieveResponse> {
12
19
  return this._client.get('/api/v3/org/api_key', options);
@@ -14,7 +21,13 @@ export class APIKey extends APIResource {
14
21
 
15
22
  /**
16
23
  * Generate a new API key for the organization, invalidating the previous one
17
- * (admin only)
24
+ * (admin only). This operation cannot be undone and will immediately invalidate
25
+ * the previous API key.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const response = await client.org.apiKey.regenerate();
30
+ * ```
18
31
  */
19
32
  regenerate(options?: RequestOptions): APIPromise<APIKeyRegenerateResponse> {
20
33
  return this._client.post('/api/v3/org/api_key/regenerate', options);
@@ -22,10 +35,18 @@ export class APIKey extends APIResource {
22
35
  }
23
36
 
24
37
  export interface APIKeyRetrieveResponse {
38
+ /**
39
+ * The API key for the organization that can be used for authentication. Format:
40
+ * org_xxx
41
+ */
25
42
  org_api_key: string;
26
43
  }
27
44
 
28
45
  export interface APIKeyRegenerateResponse {
46
+ /**
47
+ * The newly generated API key for the organization that can be used for
48
+ * authentication. Format: org_xxx
49
+ */
29
50
  org_api_key: string;
30
51
  }
31
52
 
@@ -6,6 +6,21 @@ import { RequestOptions } from '../../../internal/request-options';
6
6
  import { path } from '../../../internal/utils/path';
7
7
 
8
8
  export class APIKeys extends APIResource {
9
+ /**
10
+ * Creates a new API key for the specified project. API keys are used for
11
+ * authenticating requests to the API. This endpoint generates a new key with the
12
+ * provided name and returns the complete key details including the actual key
13
+ * value. Note that the full API key value is only returned once at creation time
14
+ * and cannot be retrieved later, so it should be securely stored immediately.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const apiKey = await client.org.project.apiKeys.create(
19
+ * 'proj_abc123xyz456',
20
+ * { name: 'Production API Key' },
21
+ * );
22
+ * ```
23
+ */
9
24
  create(
10
25
  projectID: string,
11
26
  body: APIKeyCreateParams,
@@ -14,50 +29,107 @@ export class APIKeys extends APIResource {
14
29
  return this._client.post(path`/api/v3/org/project/${projectID}/api_keys/create`, { body, ...options });
15
30
  }
16
31
 
32
+ /**
33
+ * Retrieves all API keys associated with the specified project. This endpoint
34
+ * returns details about each API key including its name, creation date, and last
35
+ * used information. Use this endpoint to audit which keys exist for a project or
36
+ * to manage key rotation policies.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const apiKeys = await client.org.project.apiKeys.list(
41
+ * 'proj_abc123xyz456',
42
+ * );
43
+ * ```
44
+ */
17
45
  list(projectID: string, options?: RequestOptions): APIPromise<APIKeyListResponse> {
18
46
  return this._client.get(path`/api/v3/org/project/${projectID}/api_keys/list`, options);
19
47
  }
20
48
 
49
+ /**
50
+ * Permanently deletes an API key from the specified project. Once deleted, the API
51
+ * key can no longer be used for authentication and any services using it will need
52
+ * to be updated with a new key. This operation cannot be undone, so it should be
53
+ * used with caution.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const apiKey = await client.org.project.apiKeys.delete(
58
+ * '01H4DKRF5SMP7NQCA3BWT0JYB6',
59
+ * { projectId: 'proj_abc123xyz456' },
60
+ * );
61
+ * ```
62
+ */
21
63
  delete(id: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<APIKeyDeleteResponse> {
22
64
  const { projectId } = params;
23
65
  return this._client.delete(path`/api/v3/org/project/${projectId}/api_keys/remove/${id}`, options);
24
66
  }
25
67
 
68
+ /**
69
+ * Retrieves an existing API key for the project or creates a new one if none
70
+ * exists. This endpoint is useful for ensuring a project always has at least one
71
+ * API key without the risk of creating duplicates. If an API key already exists,
72
+ * it returns the existing key. If no API keys exist for the project, it creates a
73
+ * new one with an automatically generated name.
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * const response =
78
+ * await client.org.project.apiKeys.createAPIKey(
79
+ * 'proj_abc123xyz456',
80
+ * );
81
+ * ```
82
+ */
26
83
  createAPIKey(projectID: string, options?: RequestOptions): APIPromise<APIKeyCreateAPIKeyResponse> {
27
84
  return this._client.post(path`/api/v3/org/project/${projectID}/api_keys/create-api-key`, options);
28
85
  }
29
86
  }
30
87
 
88
+ /**
89
+ * API key object containing the key details
90
+ */
31
91
  export interface APIKeyCreateResponse {
32
92
  /**
33
- * API key ID
93
+ * Database record identifier for the API key
34
94
  */
35
95
  id: string;
36
96
 
37
97
  /**
38
- * Creation timestamp
98
+ * UTC timestamp indicating when the API key was created
99
+ */
100
+ created_at: string;
101
+
102
+ /**
103
+ * @deprecated UTC timestamp indicating when the API key was created. DEPRECATED:
104
+ * Use created_at instead.
39
105
  */
40
106
  createdAt: string;
41
107
 
42
108
  /**
43
- * API key value
109
+ * The API key string value that should be included in API requests. This value is
110
+ * only shown once at creation time.
44
111
  */
45
112
  key: string;
46
113
 
47
114
  /**
48
- * API key name
115
+ * Descriptive name assigned to help identify the key's purpose
49
116
  */
50
117
  name: string;
51
118
 
52
119
  /**
53
- * Last used timestamp
120
+ * UTC timestamp indicating when the API key was last used for authentication. Will
121
+ * be null for newly created keys.
54
122
  */
55
- lastUsed?: string;
123
+ last_used_at?: string;
56
124
  }
57
125
 
126
+ /**
127
+ * Response containing the list of API keys for a project
128
+ */
58
129
  export interface APIKeyListResponse {
59
130
  /**
60
- * List of API keys
131
+ * List of all API keys for the specified project, including their properties and
132
+ * usage information
61
133
  */
62
134
  items: Array<APIKeyListResponse.Item>;
63
135
  }
@@ -65,81 +137,104 @@ export interface APIKeyListResponse {
65
137
  export namespace APIKeyListResponse {
66
138
  export interface Item {
67
139
  /**
68
- * API key ID
140
+ * Unique identifier for the API key record
69
141
  */
70
142
  id: string;
71
143
 
72
144
  /**
73
- * Creation timestamp
145
+ * UTC timestamp indicating when the API key was created
74
146
  */
75
147
  created_at: string;
76
148
 
77
149
  /**
78
- * API key value
150
+ * The API key string that should be included in API requests for authentication
79
151
  */
80
152
  key: string;
81
153
 
82
154
  /**
83
- * API key name
155
+ * Descriptive name assigned to the API key for identification purposes
84
156
  */
85
157
  name: string;
86
158
 
87
159
  /**
88
- * Last used timestamp
160
+ * UTC timestamp indicating when the API key was last used for authentication. Will
161
+ * be null if the key has never been used.
89
162
  */
90
163
  last_used?: string;
91
164
  }
92
165
  }
93
166
 
167
+ /**
168
+ * Response indicating the status of the API key deletion operation
169
+ */
94
170
  export interface APIKeyDeleteResponse {
95
171
  /**
96
- * Status message
172
+ * Status message providing details about the deletion operation
97
173
  */
98
174
  message: string;
99
175
 
100
176
  /**
101
- * Whether the operation was successful
177
+ * Boolean flag indicating if the deletion operation was successful
102
178
  */
103
179
  success: boolean;
104
180
  }
105
181
 
182
+ /**
183
+ * API key object containing the key details
184
+ */
106
185
  export interface APIKeyCreateAPIKeyResponse {
107
186
  /**
108
- * API key ID
187
+ * Database record identifier for the API key
109
188
  */
110
189
  id: string;
111
190
 
112
191
  /**
113
- * Creation timestamp
192
+ * UTC timestamp indicating when the API key was created
193
+ */
194
+ created_at: string;
195
+
196
+ /**
197
+ * @deprecated UTC timestamp indicating when the API key was created. Use
198
+ * created_at instead.
114
199
  */
115
200
  createdAt: string;
116
201
 
117
202
  /**
118
- * API key value
203
+ * The API key string value that should be included in API requests. This value is
204
+ * only shown once.
119
205
  */
120
206
  key: string;
121
207
 
122
208
  /**
123
- * API key name
209
+ * @deprecated UTC timestamp indicating when the API key was created. Use
210
+ * last_used_at instead.
211
+ */
212
+ lastUsedAt: string;
213
+
214
+ /**
215
+ * Name assigned to help identify the key's purpose. For auto-generated keys, this
216
+ * will be a random name.
124
217
  */
125
218
  name: string;
126
219
 
127
220
  /**
128
- * Last used timestamp
221
+ * UTC timestamp indicating when the API key was last used for authentication. Will
222
+ * be null for newly created keys.
129
223
  */
130
- lastUsed?: string;
224
+ last_used_at?: string;
131
225
  }
132
226
 
133
227
  export interface APIKeyCreateParams {
134
228
  /**
135
- * API key name
229
+ * A user-friendly name to identify the API key's purpose (e.g., "Production
230
+ * Server", "Test Environment")
136
231
  */
137
232
  name: string;
138
233
  }
139
234
 
140
235
  export interface APIKeyDeleteParams {
141
236
  /**
142
- * Project ID
237
+ * The project Nano ID that owns the API key to be deleted
143
238
  */
144
239
  projectId: string;
145
240
  }
@@ -34,128 +34,300 @@ export class Project extends APIResource {
34
34
  trigger: TriggerAPI.Trigger = new TriggerAPI.Trigger(this._client);
35
35
 
36
36
  /**
37
- * Create a new project within the organization with the specified name
37
+ * Creates a new project within the authenticated user's organization using the
38
+ * specified name. Projects are isolated environments within your organization,
39
+ * each with their own API keys, webhook configurations, and resources. Use this
40
+ * endpoint to create additional projects for different environments (e.g.,
41
+ * development, staging, production) or for separate applications.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const project = await client.org.project.create({
46
+ * name: 'my-production-api',
47
+ * });
48
+ * ```
38
49
  */
39
50
  create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<ProjectCreateResponse> {
40
51
  return this._client.post('/api/v3/org/project/new', { body, ...options });
41
52
  }
42
53
 
43
54
  /**
44
- * Retrieve detailed information about a specific project using its ID
55
+ * Retrieves detailed information about a specific project using its unique
56
+ * identifier. This endpoint provides complete project configuration including
57
+ * webhook URLs, creation and update timestamps, and webhook secrets. Use this
58
+ * endpoint to inspect project settings or verify project configuration.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const project = await client.org.project.retrieve(
63
+ * 'proj_abc123xyz456',
64
+ * );
65
+ * ```
45
66
  */
46
67
  retrieve(projectID: string, options?: RequestOptions): APIPromise<ProjectRetrieveResponse> {
47
68
  return this._client.get(path`/api/v3/org/project/${projectID}`, options);
48
69
  }
49
70
 
50
71
  /**
51
- * Retrieve a list of all projects within the current organization
72
+ * Retrieves all projects belonging to the authenticated user's organization.
73
+ * Projects are returned in descending order of creation date (newest first). This
74
+ * endpoint is useful for displaying project selection in dashboards or for
75
+ * integrations that need to list all available projects.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const projects = await client.org.project.list();
80
+ * ```
52
81
  */
53
82
  list(options?: RequestOptions): APIPromise<ProjectListResponse> {
54
83
  return this._client.get('/api/v3/org/project/list', options);
55
84
  }
56
85
 
86
+ /**
87
+ * Soft-deletes a project within the organization by its unique identifier. When a
88
+ * project is deleted, it is marked as deleted but not immediately removed from the
89
+ * database. This operation affects all resources associated with the project
90
+ * including API keys, webhook configurations, and connected services. This action
91
+ * cannot be undone through the API.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * const project = await client.org.project.delete(
96
+ * 'proj_abc123xyz456',
97
+ * );
98
+ * ```
99
+ */
57
100
  delete(projectID: string, options?: RequestOptions): APIPromise<ProjectDeleteResponse> {
58
101
  return this._client.delete(path`/api/v3/org/project/delete/${projectID}`, options);
59
102
  }
60
103
  }
61
104
 
62
105
  export interface ProjectCreateResponse {
106
+ /**
107
+ * Unique identifier for the project
108
+ */
63
109
  id: string;
64
110
 
111
+ /**
112
+ * ISO timestamp when the project was created
113
+ */
65
114
  created_at: string;
66
115
 
116
+ /**
117
+ * Whether this project has been soft-deleted
118
+ */
67
119
  deleted: boolean;
68
120
 
121
+ /**
122
+ * Email address associated with the project
123
+ */
69
124
  email: string;
70
125
 
126
+ /**
127
+ * URL where event webhook notifications will be sent (can be null)
128
+ */
71
129
  event_webhook_url: string | null;
72
130
 
131
+ /**
132
+ * Name of the project
133
+ */
73
134
  name: string;
74
135
 
136
+ /**
137
+ * Identifier of the organization that owns this project
138
+ */
75
139
  org_id: string;
76
140
 
141
+ /**
142
+ * ISO timestamp when the project was last updated
143
+ */
77
144
  updated_at: string;
78
145
 
146
+ /**
147
+ * Secret key used to sign webhook payloads for verification
148
+ */
79
149
  webhook_secret: string | null;
80
150
 
151
+ /**
152
+ * URL where webhook events will be sent (can be null)
153
+ */
81
154
  webhook_url: string | null;
82
155
 
156
+ /**
157
+ * Indicates if the webhook configuration is using the new format
158
+ */
83
159
  is_new_webhook?: boolean;
84
160
 
161
+ /**
162
+ * ISO timestamp when the project last subscribed to updates
163
+ */
85
164
  last_subscribed_at?: string | null;
86
165
 
166
+ /**
167
+ * Whether triggers are enabled for this project
168
+ */
87
169
  triggers_enabled?: boolean;
88
170
  }
89
171
 
90
172
  export interface ProjectRetrieveResponse {
173
+ /**
174
+ * Unique identifier for the project
175
+ */
91
176
  id: string;
92
177
 
178
+ /**
179
+ * ISO timestamp when the project was created
180
+ */
93
181
  created_at: string;
94
182
 
183
+ /**
184
+ * Whether this project has been soft-deleted
185
+ */
95
186
  deleted: boolean;
96
187
 
188
+ /**
189
+ * Email address associated with the project
190
+ */
97
191
  email: string;
98
192
 
193
+ /**
194
+ * URL where event webhook notifications will be sent (can be null)
195
+ */
99
196
  event_webhook_url: string | null;
100
197
 
198
+ /**
199
+ * Name of the project
200
+ */
101
201
  name: string;
102
202
 
203
+ /**
204
+ * Identifier of the organization that owns this project
205
+ */
103
206
  org_id: string;
104
207
 
208
+ /**
209
+ * ISO timestamp when the project was last updated
210
+ */
105
211
  updated_at: string;
106
212
 
213
+ /**
214
+ * Secret key used to sign webhook payloads for verification
215
+ */
107
216
  webhook_secret: string | null;
108
217
 
218
+ /**
219
+ * URL where webhook events will be sent (can be null)
220
+ */
109
221
  webhook_url: string | null;
110
222
 
223
+ /**
224
+ * Indicates if the webhook configuration is using the new format
225
+ */
111
226
  is_new_webhook?: boolean;
112
227
 
228
+ /**
229
+ * ISO timestamp when the project last subscribed to updates
230
+ */
113
231
  last_subscribed_at?: string | null;
114
232
 
233
+ /**
234
+ * Whether triggers are enabled for this project
235
+ */
115
236
  triggers_enabled?: boolean;
116
237
  }
117
238
 
239
+ /**
240
+ * Response containing a list of projects
241
+ */
118
242
  export interface ProjectListResponse {
243
+ /**
244
+ * Array of projects belonging to the organization
245
+ */
119
246
  data: Array<ProjectListResponse.Data>;
120
247
  }
121
248
 
122
249
  export namespace ProjectListResponse {
123
250
  export interface Data {
251
+ /**
252
+ * Unique identifier for the project
253
+ */
124
254
  id: string;
125
255
 
256
+ /**
257
+ * ISO timestamp when the project was created
258
+ */
126
259
  created_at: string;
127
260
 
261
+ /**
262
+ * Whether this project has been soft-deleted
263
+ */
128
264
  deleted: boolean;
129
265
 
266
+ /**
267
+ * Email address associated with the project
268
+ */
130
269
  email: string;
131
270
 
271
+ /**
272
+ * URL where event webhook notifications will be sent (can be null)
273
+ */
132
274
  event_webhook_url: string | null;
133
275
 
276
+ /**
277
+ * Name of the project
278
+ */
134
279
  name: string;
135
280
 
281
+ /**
282
+ * Identifier of the organization that owns this project
283
+ */
136
284
  org_id: string;
137
285
 
286
+ /**
287
+ * ISO timestamp when the project was last updated
288
+ */
138
289
  updated_at: string;
139
290
 
291
+ /**
292
+ * Secret key used to sign webhook payloads for verification
293
+ */
140
294
  webhook_secret: string | null;
141
295
 
296
+ /**
297
+ * URL where webhook events will be sent (can be null)
298
+ */
142
299
  webhook_url: string | null;
143
300
 
301
+ /**
302
+ * Indicates if the webhook configuration is using the new format
303
+ */
144
304
  is_new_webhook?: boolean;
145
305
 
306
+ /**
307
+ * ISO timestamp when the project last subscribed to updates
308
+ */
146
309
  last_subscribed_at?: string | null;
147
310
 
311
+ /**
312
+ * Whether triggers are enabled for this project
313
+ */
148
314
  triggers_enabled?: boolean;
149
315
  }
150
316
  }
151
317
 
318
+ /**
319
+ * Response indicating the result of a project deletion operation
320
+ */
152
321
  export interface ProjectDeleteResponse {
322
+ /**
323
+ * Status of the delete operation
324
+ */
153
325
  status: string;
154
326
  }
155
327
 
156
328
  export interface ProjectCreateParams {
157
329
  /**
158
- * Name of the project
330
+ * A unique name for your project that follows the required format rules
159
331
  */
160
332
  name: string;
161
333
  }