@composio/client 0.1.0-alpha.36 → 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 +29 -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 +468 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +468 -4
- 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 -91
- package/resources/link.d.mts.map +1 -1
- package/resources/link.d.ts +1 -91
- 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 +72 -2
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +72 -2
- 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 -137
- 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 +132 -2
- 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,180 +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
|
-
import { path } from '../../../internal/utils/path';
|
|
7
|
-
|
|
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
|
-
*/
|
|
24
|
-
create(
|
|
25
|
-
projectID: string,
|
|
26
|
-
body: APIKeyCreateParams,
|
|
27
|
-
options?: RequestOptions,
|
|
28
|
-
): APIPromise<APIKeyCreateResponse> {
|
|
29
|
-
return this._client.post(path`/api/v3/org/project/${projectID}/api_keys/create`, { body, ...options });
|
|
30
|
-
}
|
|
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
|
-
*/
|
|
45
|
-
list(projectID: string, options?: RequestOptions): APIPromise<APIKeyListResponse> {
|
|
46
|
-
return this._client.get(path`/api/v3/org/project/${projectID}/api_keys/list`, options);
|
|
47
|
-
}
|
|
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
|
-
*/
|
|
63
|
-
delete(id: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<APIKeyDeleteResponse> {
|
|
64
|
-
const { projectId } = params;
|
|
65
|
-
return this._client.delete(path`/api/v3/org/project/${projectId}/api_keys/remove/${id}`, options);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* API key object containing the key details
|
|
71
|
-
*/
|
|
72
|
-
export interface APIKeyCreateResponse {
|
|
73
|
-
/**
|
|
74
|
-
* Database record identifier for the API key
|
|
75
|
-
*/
|
|
76
|
-
id: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* UTC timestamp indicating when the API key was created
|
|
80
|
-
*/
|
|
81
|
-
created_at: string;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* The API key string value that should be included in API requests. This value is
|
|
85
|
-
* only shown once at creation time.
|
|
86
|
-
*/
|
|
87
|
-
key: string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Descriptive name assigned to help identify the key's purpose
|
|
91
|
-
*/
|
|
92
|
-
name: string;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* UTC timestamp indicating when the API key was last used for authentication. Will
|
|
96
|
-
* be null for newly created keys.
|
|
97
|
-
*/
|
|
98
|
-
last_used_at?: string;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Response containing the list of API keys for a project
|
|
103
|
-
*/
|
|
104
|
-
export interface APIKeyListResponse {
|
|
105
|
-
/**
|
|
106
|
-
* List of all API keys for the specified project, including their properties and
|
|
107
|
-
* usage information
|
|
108
|
-
*/
|
|
109
|
-
items: Array<APIKeyListResponse.Item>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export namespace APIKeyListResponse {
|
|
113
|
-
export interface Item {
|
|
114
|
-
/**
|
|
115
|
-
* Unique identifier for the API key record
|
|
116
|
-
*/
|
|
117
|
-
id: string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* UTC timestamp indicating when the API key was created
|
|
121
|
-
*/
|
|
122
|
-
created_at: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* The API key string that should be included in API requests for authentication
|
|
126
|
-
*/
|
|
127
|
-
key: string;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Descriptive name assigned to the API key for identification purposes
|
|
131
|
-
*/
|
|
132
|
-
name: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* UTC timestamp indicating when the API key was last used for authentication. Will
|
|
136
|
-
* be null if the key has never been used.
|
|
137
|
-
*/
|
|
138
|
-
last_used?: string;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Response indicating the status of the API key deletion operation
|
|
144
|
-
*/
|
|
145
|
-
export interface APIKeyDeleteResponse {
|
|
146
|
-
/**
|
|
147
|
-
* Status message providing details about the deletion operation
|
|
148
|
-
*/
|
|
149
|
-
message: string;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Boolean flag indicating if the deletion operation was successful
|
|
153
|
-
*/
|
|
154
|
-
success: boolean;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface APIKeyCreateParams {
|
|
158
|
-
/**
|
|
159
|
-
* A user-friendly name to identify the API key's purpose (e.g., "Production
|
|
160
|
-
* Server", "Test Environment")
|
|
161
|
-
*/
|
|
162
|
-
name: string;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface APIKeyDeleteParams {
|
|
166
|
-
/**
|
|
167
|
-
* The project Nano ID that owns the API key to be deleted
|
|
168
|
-
*/
|
|
169
|
-
projectId: string;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export declare namespace APIKeys {
|
|
173
|
-
export {
|
|
174
|
-
type APIKeyCreateResponse as APIKeyCreateResponse,
|
|
175
|
-
type APIKeyListResponse as APIKeyListResponse,
|
|
176
|
-
type APIKeyDeleteResponse as APIKeyDeleteResponse,
|
|
177
|
-
type APIKeyCreateParams as APIKeyCreateParams,
|
|
178
|
-
type APIKeyDeleteParams as APIKeyDeleteParams,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
APIKeys,
|
|
5
|
-
type APIKeyCreateResponse,
|
|
6
|
-
type APIKeyListResponse,
|
|
7
|
-
type APIKeyDeleteResponse,
|
|
8
|
-
type APIKeyCreateParams,
|
|
9
|
-
type APIKeyDeleteParams,
|
|
10
|
-
} from './api-keys';
|
|
11
|
-
export {
|
|
12
|
-
Project,
|
|
13
|
-
type ProjectCreateResponse,
|
|
14
|
-
type ProjectRetrieveResponse,
|
|
15
|
-
type ProjectListResponse,
|
|
16
|
-
type ProjectDeleteResponse,
|
|
17
|
-
type ProjectCreateParams,
|
|
18
|
-
type ProjectListParams,
|
|
19
|
-
} from './project';
|
|
20
|
-
export {
|
|
21
|
-
Trigger,
|
|
22
|
-
type TriggerUpdateResponse,
|
|
23
|
-
type TriggerListResponse,
|
|
24
|
-
type TriggerUpdateParams,
|
|
25
|
-
} from './trigger';
|
|
26
|
-
export {
|
|
27
|
-
Webhook,
|
|
28
|
-
type WebhookRetrieveResponse,
|
|
29
|
-
type WebhookUpdateResponse,
|
|
30
|
-
type WebhookDeleteResponse,
|
|
31
|
-
type WebhookRefreshResponse,
|
|
32
|
-
type WebhookRetrieveParams,
|
|
33
|
-
type WebhookUpdateParams,
|
|
34
|
-
type WebhookDeleteParams,
|
|
35
|
-
} from './webhook';
|
|
@@ -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
|
-
}
|