@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.
- package/CHANGELOG.md +38 -0
- package/client.d.mts +11 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -14
- package/client.d.ts.map +1 -1
- package/client.js +3 -6
- package/client.js.map +1 -1
- package/client.mjs +5 -8
- package/client.mjs.map +1 -1
- package/internal/utils/values.js +3 -3
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +3 -3
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +3 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +3 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/cli.d.mts +1 -76
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -76
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +0 -28
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +0 -28
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +476 -12
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +476 -12
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +5 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/link.d.mts +1 -86
- package/resources/link.d.mts.map +1 -1
- package/resources/link.d.ts +1 -86
- package/resources/link.d.ts.map +1 -1
- package/resources/link.js +0 -13
- package/resources/link.js.map +1 -1
- package/resources/link.mjs +0 -13
- package/resources/link.mjs.map +1 -1
- package/resources/mcp/index.d.mts +1 -1
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +1 -1
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +1 -95
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +1 -95
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +0 -22
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +0 -22
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/tool-router.d.mts +77 -0
- package/resources/tool-router.d.mts.map +1 -0
- package/resources/tool-router.d.ts +77 -0
- package/resources/tool-router.d.ts.map +1 -0
- package/resources/tool-router.js +32 -0
- package/resources/tool-router.js.map +1 -0
- package/resources/tool-router.mjs +28 -0
- package/resources/tool-router.mjs.map +1 -0
- package/resources/toolkits.d.mts +16 -2
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +16 -2
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +2 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +2 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +80 -4
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +80 -4
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/index.d.mts +0 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +0 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js +1 -3
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs +0 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +0 -4
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +0 -4
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +0 -4
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +0 -4
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/src/client.ts +16 -46
- package/src/internal/utils/values.ts +3 -3
- package/src/resources/auth-configs.ts +6 -3
- package/src/resources/cli.ts +0 -89
- package/src/resources/connected-accounts.ts +967 -67
- package/src/resources/index.ts +6 -19
- package/src/resources/link.ts +1 -131
- package/src/resources/mcp/index.ts +0 -2
- package/src/resources/mcp/mcp.ts +0 -123
- package/src/resources/tool-router.ts +96 -0
- package/src/resources/toolkits.ts +24 -2
- package/src/resources/tools.ts +141 -6
- package/src/resources/trigger-instances/index.ts +0 -7
- package/src/resources/trigger-instances/trigger-instances.ts +0 -18
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/org/api-key.d.mts +0 -44
- package/resources/org/api-key.d.mts.map +0 -1
- package/resources/org/api-key.d.ts +0 -44
- package/resources/org/api-key.d.ts.map +0 -1
- package/resources/org/api-key.js +0 -34
- package/resources/org/api-key.js.map +0 -1
- package/resources/org/api-key.mjs +0 -30
- package/resources/org/api-key.mjs.map +0 -1
- package/resources/org/index.d.mts +0 -4
- package/resources/org/index.d.mts.map +0 -1
- package/resources/org/index.d.ts +0 -4
- package/resources/org/index.d.ts.map +0 -1
- package/resources/org/index.js +0 -11
- package/resources/org/index.js.map +0 -1
- package/resources/org/index.mjs +0 -5
- package/resources/org/index.mjs.map +0 -1
- package/resources/org/org.d.mts +0 -14
- package/resources/org/org.d.mts.map +0 -1
- package/resources/org/org.d.ts +0 -14
- package/resources/org/org.d.ts.map +0 -1
- package/resources/org/org.js +0 -21
- package/resources/org/org.js.map +0 -1
- package/resources/org/org.mjs +0 -16
- package/resources/org/org.mjs.map +0 -1
- package/resources/org/project/api-keys.d.mts +0 -142
- package/resources/org/project/api-keys.d.mts.map +0 -1
- package/resources/org/project/api-keys.d.ts +0 -142
- package/resources/org/project/api-keys.d.ts.map +0 -1
- package/resources/org/project/api-keys.js +0 -62
- package/resources/org/project/api-keys.js.map +0 -1
- package/resources/org/project/api-keys.mjs +0 -58
- package/resources/org/project/api-keys.mjs.map +0 -1
- package/resources/org/project/index.d.mts +0 -5
- package/resources/org/project/index.d.mts.map +0 -1
- package/resources/org/project/index.d.ts +0 -5
- package/resources/org/project/index.d.ts.map +0 -1
- package/resources/org/project/index.js +0 -13
- package/resources/org/project/index.js.map +0 -1
- package/resources/org/project/index.mjs +0 -6
- package/resources/org/project/index.mjs.map +0 -1
- package/resources/org/project/project.d.mts +0 -268
- package/resources/org/project/project.d.mts.map +0 -1
- package/resources/org/project/project.d.ts +0 -268
- package/resources/org/project/project.d.ts.map +0 -1
- package/resources/org/project/project.js +0 -90
- package/resources/org/project/project.js.map +0 -1
- package/resources/org/project/project.mjs +0 -85
- package/resources/org/project/project.mjs.map +0 -1
- package/resources/org/project/trigger.d.mts +0 -145
- package/resources/org/project/trigger.d.mts.map +0 -1
- package/resources/org/project/trigger.d.ts +0 -145
- package/resources/org/project/trigger.d.ts.map +0 -1
- package/resources/org/project/trigger.js +0 -35
- package/resources/org/project/trigger.js.map +0 -1
- package/resources/org/project/trigger.mjs +0 -31
- package/resources/org/project/trigger.mjs.map +0 -1
- package/resources/org/project/webhook.d.mts +0 -166
- package/resources/org/project/webhook.d.mts.map +0 -1
- package/resources/org/project/webhook.d.ts +0 -166
- package/resources/org/project/webhook.d.ts.map +0 -1
- package/resources/org/project/webhook.js +0 -74
- package/resources/org/project/webhook.js.map +0 -1
- package/resources/org/project/webhook.mjs +0 -70
- package/resources/org/project/webhook.mjs.map +0 -1
- package/resources/org/project.d.mts +0 -2
- package/resources/org/project.d.mts.map +0 -1
- package/resources/org/project.d.ts +0 -2
- package/resources/org/project.d.ts.map +0 -1
- package/resources/org/project.js +0 -6
- package/resources/org/project.js.map +0 -1
- package/resources/org/project.mjs +0 -3
- package/resources/org/project.mjs.map +0 -1
- package/resources/org.d.mts +0 -2
- package/resources/org.d.mts.map +0 -1
- package/resources/org.d.ts +0 -2
- package/resources/org.d.ts.map +0 -1
- package/resources/org.js +0 -6
- package/resources/org.js.map +0 -1
- package/resources/org.mjs +0 -3
- package/resources/org.mjs.map +0 -1
- package/resources/team-members.d.mts +0 -55
- package/resources/team-members.d.mts.map +0 -1
- package/resources/team-members.d.ts +0 -55
- package/resources/team-members.d.ts.map +0 -1
- package/resources/team-members.js +0 -38
- package/resources/team-members.js.map +0 -1
- package/resources/team-members.mjs +0 -34
- package/resources/team-members.mjs.map +0 -1
- package/resources/trigger-instances/handle.d.mts +0 -25
- package/resources/trigger-instances/handle.d.mts.map +0 -1
- package/resources/trigger-instances/handle.d.ts +0 -25
- package/resources/trigger-instances/handle.d.ts.map +0 -1
- package/resources/trigger-instances/handle.js +0 -18
- package/resources/trigger-instances/handle.js.map +0 -1
- package/resources/trigger-instances/handle.mjs +0 -14
- package/resources/trigger-instances/handle.mjs.map +0 -1
- package/src/resources/org/api-key.ts +0 -57
- package/src/resources/org/index.ts +0 -13
- package/src/resources/org/org.ts +0 -41
- package/src/resources/org/project/api-keys.ts +0 -180
- package/src/resources/org/project/index.ts +0 -35
- package/src/resources/org/project/project.ts +0 -381
- package/src/resources/org/project/trigger.ts +0 -188
- package/src/resources/org/project/webhook.ts +0 -205
- package/src/resources/org/project.ts +0 -3
- package/src/resources/org.ts +0 -3
- package/src/resources/team-members.ts +0 -101
- 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
|
-
}
|