@archastro/sdk 0.5.2 → 0.5.3
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/README.md +86 -0
- package/dist/auth.d.ts +143 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +187 -1
- package/dist/auth.js.map +1 -1
- package/dist/client.d.ts +26 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/ai.d.ts +150 -12
- package/dist/types/ai.d.ts.map +1 -1
- package/dist/types/ai.js +71 -41
- package/dist/types/ai.js.map +1 -1
- package/dist/types/artifacts.d.ts +81 -24
- package/dist/types/artifacts.d.ts.map +1 -1
- package/dist/types/artifacts.js +39 -21
- package/dist/types/artifacts.js.map +1 -1
- package/dist/types/automations.d.ts +41 -9
- package/dist/types/automations.d.ts.map +1 -1
- package/dist/types/automations.js +25 -17
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +21418 -0
- package/dist/types/chat.d.ts.map +1 -0
- package/dist/types/chat.js +70 -0
- package/dist/types/chat.js.map +1 -0
- package/dist/types/common.d.ts +16970 -2136
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +1695 -332
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +239 -31
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +86 -34
- package/dist/types/config.js.map +1 -1
- package/dist/types/image.d.ts +27 -4
- package/dist/types/image.d.ts.map +1 -1
- package/dist/types/image.js +17 -10
- package/dist/types/image.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/invites.d.ts +20 -11
- package/dist/types/invites.d.ts.map +1 -1
- package/dist/types/invites.js +9 -12
- package/dist/types/invites.js.map +1 -1
- package/dist/types/notifications.d.ts +163 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/notifications.js +44 -0
- package/dist/types/notifications.js.map +1 -0
- package/dist/types/teams.d.ts +1628 -231
- package/dist/types/teams.d.ts.map +1 -1
- package/dist/types/teams.js +76 -45
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +997 -243
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +84 -51
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +98 -18
- package/dist/types/users.d.ts.map +1 -1
- package/dist/types/users.js +43 -18
- package/dist/types/users.js.map +1 -1
- package/dist/v1/resources/activity_feed.d.ts +89 -0
- package/dist/v1/resources/activity_feed.d.ts.map +1 -1
- package/dist/v1/resources/activity_feed.js +56 -2
- package/dist/v1/resources/activity_feed.js.map +1 -1
- package/dist/v1/resources/agent_computers.d.ts +48 -2
- package/dist/v1/resources/agent_computers.d.ts.map +1 -1
- package/dist/v1/resources/agent_computers.js +48 -1
- package/dist/v1/resources/agent_computers.js.map +1 -1
- package/dist/v1/resources/agent_env_vars.d.ts +50 -0
- package/dist/v1/resources/agent_env_vars.d.ts.map +1 -0
- package/dist/v1/resources/agent_env_vars.js +56 -0
- package/dist/v1/resources/agent_env_vars.js.map +1 -0
- package/dist/v1/resources/agent_health_actions.d.ts +43 -0
- package/dist/v1/resources/agent_health_actions.d.ts.map +1 -0
- package/dist/v1/resources/agent_health_actions.js +50 -0
- package/dist/v1/resources/agent_health_actions.js.map +1 -0
- package/dist/v1/resources/agent_installations.d.ts +100 -0
- package/dist/v1/resources/agent_installations.d.ts.map +1 -1
- package/dist/v1/resources/agent_installations.js +106 -2
- package/dist/v1/resources/agent_installations.js.map +1 -1
- package/dist/v1/resources/agent_routine_runs.d.ts +33 -0
- package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -0
- package/dist/v1/resources/agent_routine_runs.js +48 -0
- package/dist/v1/resources/agent_routine_runs.js.map +1 -0
- package/dist/v1/resources/agent_routines.d.ts +148 -2
- package/dist/v1/resources/agent_routines.d.ts.map +1 -1
- package/dist/v1/resources/agent_routines.js +168 -3
- package/dist/v1/resources/agent_routines.js.map +1 -1
- package/dist/v1/resources/agent_sessions.d.ts +118 -1
- package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
- package/dist/v1/resources/agent_sessions.js +134 -2
- package/dist/v1/resources/agent_sessions.js.map +1 -1
- package/dist/v1/resources/agent_skills.d.ts +83 -1
- package/dist/v1/resources/agent_skills.d.ts.map +1 -1
- package/dist/v1/resources/agent_skills.js +87 -2
- package/dist/v1/resources/agent_skills.js.map +1 -1
- package/dist/v1/resources/agent_tools.d.ts +109 -2
- package/dist/v1/resources/agent_tools.d.ts.map +1 -1
- package/dist/v1/resources/agent_tools.js +114 -2
- package/dist/v1/resources/agent_tools.js.map +1 -1
- package/dist/v1/resources/agents.d.ts +517 -9
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +515 -12
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/ai.d.ts +93 -0
- package/dist/v1/resources/ai.d.ts.map +1 -1
- package/dist/v1/resources/ai.js +89 -1
- package/dist/v1/resources/ai.js.map +1 -1
- package/dist/v1/resources/artifacts.d.ts +73 -0
- package/dist/v1/resources/artifacts.d.ts.map +1 -1
- package/dist/v1/resources/artifacts.js +74 -2
- package/dist/v1/resources/artifacts.js.map +1 -1
- package/dist/v1/resources/automation_runs.d.ts +8 -4
- package/dist/v1/resources/automation_runs.d.ts.map +1 -1
- package/dist/v1/resources/automation_runs.js +9 -5
- package/dist/v1/resources/automation_runs.js.map +1 -1
- package/dist/v1/resources/automations.d.ts +20 -0
- package/dist/v1/resources/automations.d.ts.map +1 -1
- package/dist/v1/resources/automations.js +21 -1
- package/dist/v1/resources/automations.js.map +1 -1
- package/dist/v1/resources/bug_reports.d.ts +29 -0
- package/dist/v1/resources/bug_reports.d.ts.map +1 -0
- package/dist/v1/resources/bug_reports.js +29 -0
- package/dist/v1/resources/bug_reports.js.map +1 -0
- package/dist/v1/resources/config.d.ts +429 -4
- package/dist/v1/resources/config.d.ts.map +1 -1
- package/dist/v1/resources/config.js +493 -9
- package/dist/v1/resources/config.js.map +1 -1
- package/dist/v1/resources/custom_objects.d.ts +117 -2
- package/dist/v1/resources/custom_objects.d.ts.map +1 -1
- package/dist/v1/resources/custom_objects.js +132 -3
- package/dist/v1/resources/custom_objects.js.map +1 -1
- package/dist/v1/resources/files.d.ts +62 -0
- package/dist/v1/resources/files.d.ts.map +1 -0
- package/dist/v1/resources/files.js +58 -0
- package/dist/v1/resources/files.js.map +1 -0
- package/dist/v1/resources/index.d.ts +13 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +14 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/installation_sources.d.ts +12 -0
- package/dist/v1/resources/installation_sources.d.ts.map +1 -1
- package/dist/v1/resources/installation_sources.js +13 -1
- package/dist/v1/resources/installation_sources.js.map +1 -1
- package/dist/v1/resources/invites.d.ts +15 -0
- package/dist/v1/resources/invites.d.ts.map +1 -1
- package/dist/v1/resources/invites.js +16 -1
- package/dist/v1/resources/invites.js.map +1 -1
- package/dist/v1/resources/knowledge_documents.d.ts +104 -0
- package/dist/v1/resources/knowledge_documents.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_documents.js +112 -0
- package/dist/v1/resources/knowledge_documents.js.map +1 -0
- package/dist/v1/resources/knowledge_sources.d.ts +190 -0
- package/dist/v1/resources/knowledge_sources.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_sources.js +176 -0
- package/dist/v1/resources/knowledge_sources.js.map +1 -0
- package/dist/v1/resources/kv.d.ts +73 -0
- package/dist/v1/resources/kv.d.ts.map +1 -1
- package/dist/v1/resources/kv.js +96 -3
- package/dist/v1/resources/kv.js.map +1 -1
- package/dist/v1/resources/notification_preferences.d.ts +61 -0
- package/dist/v1/resources/notification_preferences.d.ts.map +1 -0
- package/dist/v1/resources/notification_preferences.js +65 -0
- package/dist/v1/resources/notification_preferences.js.map +1 -0
- package/dist/v1/resources/notifications.d.ts +133 -0
- package/dist/v1/resources/notifications.d.ts.map +1 -0
- package/dist/v1/resources/notifications.js +136 -0
- package/dist/v1/resources/notifications.js.map +1 -0
- package/dist/v1/resources/orgs.d.ts +18 -0
- package/dist/v1/resources/orgs.d.ts.map +1 -1
- package/dist/v1/resources/orgs.js +30 -2
- package/dist/v1/resources/orgs.js.map +1 -1
- package/dist/v1/resources/slack_channel_bindings.d.ts +101 -0
- package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -0
- package/dist/v1/resources/slack_channel_bindings.js +114 -0
- package/dist/v1/resources/slack_channel_bindings.js.map +1 -0
- package/dist/v1/resources/solution_categories.d.ts +36 -0
- package/dist/v1/resources/solution_categories.d.ts.map +1 -0
- package/dist/v1/resources/solution_categories.js +55 -0
- package/dist/v1/resources/solution_categories.js.map +1 -0
- package/dist/v1/resources/solution_tags.d.ts +37 -0
- package/dist/v1/resources/solution_tags.d.ts.map +1 -0
- package/dist/v1/resources/solution_tags.js +54 -0
- package/dist/v1/resources/solution_tags.js.map +1 -0
- package/dist/v1/resources/solutions.d.ts +309 -0
- package/dist/v1/resources/solutions.d.ts.map +1 -0
- package/dist/v1/resources/solutions.js +214 -0
- package/dist/v1/resources/solutions.js.map +1 -0
- package/dist/v1/resources/team_memberships.d.ts +31 -0
- package/dist/v1/resources/team_memberships.d.ts.map +1 -1
- package/dist/v1/resources/team_memberships.js +49 -2
- package/dist/v1/resources/team_memberships.js.map +1 -1
- package/dist/v1/resources/teams.d.ts +458 -49
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +319 -27
- package/dist/v1/resources/teams.js.map +1 -1
- package/dist/v1/resources/thread_messages.d.ts +70 -0
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +85 -2
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +201 -0
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +220 -4
- package/dist/v1/resources/threads.js.map +1 -1
- package/dist/v1/resources/users.d.ts +213 -39
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +121 -16
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1.d.ts +26 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +40 -1
- package/dist/v1.js.map +1 -1
- package/package.json +3 -1
- package/dist/types/agents.d.ts +0 -2084
- package/dist/types/agents.d.ts.map +0 -1
- package/dist/types/agents.js +0 -203
- package/dist/types/agents.js.map +0 -1
|
@@ -1,54 +1,40 @@
|
|
|
1
1
|
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
-
import type { Artifact } from "../../types/artifacts.js";
|
|
3
2
|
import type { CustomObject } from "../../types/common.js";
|
|
4
3
|
import type { Team, TeamInvite, TeamMembership } from "../../types/teams.js";
|
|
5
4
|
import type { Thread } from "../../types/threads.js";
|
|
6
|
-
export declare class TeamArtifactResource {
|
|
7
|
-
private http;
|
|
8
|
-
constructor(http: HttpClient);
|
|
9
|
-
list(team: string): Promise<{
|
|
10
|
-
data: {
|
|
11
|
-
agent?: string | undefined;
|
|
12
|
-
content_type?: string | undefined;
|
|
13
|
-
created_at?: string | undefined;
|
|
14
|
-
current_version?: string | undefined;
|
|
15
|
-
description?: string | undefined;
|
|
16
|
-
file?: string | undefined;
|
|
17
|
-
file_name?: string | undefined;
|
|
18
|
-
file_url?: string | undefined;
|
|
19
|
-
id: string;
|
|
20
|
-
image_source?: {
|
|
21
|
-
file?: string | undefined;
|
|
22
|
-
height?: number | undefined;
|
|
23
|
-
media?: string | undefined;
|
|
24
|
-
mime_type?: string | undefined;
|
|
25
|
-
refresh_url?: string | undefined;
|
|
26
|
-
url?: string | undefined;
|
|
27
|
-
width?: number | undefined;
|
|
28
|
-
} | undefined;
|
|
29
|
-
name?: string | undefined;
|
|
30
|
-
org?: string | undefined;
|
|
31
|
-
sandbox?: string | undefined;
|
|
32
|
-
team?: string | undefined;
|
|
33
|
-
thread?: string | undefined;
|
|
34
|
-
updated_at?: string | undefined;
|
|
35
|
-
user?: string | undefined;
|
|
36
|
-
version?: number | undefined;
|
|
37
|
-
}[];
|
|
38
|
-
}>;
|
|
39
|
-
create(team: string, input: {
|
|
40
|
-
artifact: Record<string, unknown>;
|
|
41
|
-
}): Promise<Artifact>;
|
|
42
|
-
}
|
|
43
5
|
export declare class TeamCustomObjectResource {
|
|
44
6
|
private http;
|
|
45
7
|
constructor(http: HttpClient);
|
|
8
|
+
/**
|
|
9
|
+
* List a team's custom objects
|
|
10
|
+
* Returns a paginated list of custom objects owned by the specified team,
|
|
11
|
+
* filtered to a single schema type. Results are ordered by creation time
|
|
12
|
+
* descending unless `query` is provided, in which case they are ordered by
|
|
13
|
+
* full-text relevance score descending.
|
|
14
|
+
* Use `limit` and `offset` for page-based pagination. Use `row_key` or
|
|
15
|
+
* `sort_key` to narrow results to objects matching those index values.
|
|
16
|
+
* Full-text search via `query` operates only against the fields configured
|
|
17
|
+
* as `search_fields` on the schema.
|
|
18
|
+
* The authenticated user must be a member of the team with sufficient
|
|
19
|
+
* access. Returns 404 if the team is not found, the caller lacks access,
|
|
20
|
+
* or `type` does not match a registered schema for the team's organization.
|
|
21
|
+
* @param team - Team ID (`team_...`). Scopes results to objects owned by this team.
|
|
22
|
+
* @param params - Query parameters.
|
|
23
|
+
* @param params.type - Schema type identifier (`lookup_key`) that filters results to objects of this schema.
|
|
24
|
+
* @param params.limit - Maximum number of objects to return per page.
|
|
25
|
+
* @param params.offset - Number of objects to skip before returning results. Use with `limit` for page-based pagination.
|
|
26
|
+
* @param params.rowKey - Filter results to objects whose `row_key` exactly matches this value.
|
|
27
|
+
* @param params.sortKey - Filter results to objects whose `sort_key` exactly matches this value.
|
|
28
|
+
* @param params.query - Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
|
|
29
|
+
* @returns Successful response
|
|
30
|
+
*/
|
|
46
31
|
list(team: string, params?: {
|
|
47
32
|
type?: string;
|
|
48
33
|
limit?: number;
|
|
49
34
|
offset?: number;
|
|
50
35
|
rowKey?: string;
|
|
51
36
|
sortKey?: string;
|
|
37
|
+
query?: string;
|
|
52
38
|
}): Promise<{
|
|
53
39
|
data: {
|
|
54
40
|
created_at?: string | undefined;
|
|
@@ -65,6 +51,22 @@ export declare class TeamCustomObjectResource {
|
|
|
65
51
|
}[];
|
|
66
52
|
meta?: Record<string, unknown> | undefined;
|
|
67
53
|
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Create a team custom object
|
|
56
|
+
* Creates a new custom object owned by the specified team. The object is
|
|
57
|
+
* instantiated against the schema identified by `type` (the schema's
|
|
58
|
+
* `lookup_key`). All field values are validated against that schema's
|
|
59
|
+
* field definitions before the object is persisted.
|
|
60
|
+
* The authenticated user must be a member of the team with sufficient
|
|
61
|
+
* access. If the team is not found or the caller lacks access, the endpoint
|
|
62
|
+
* returns 404. If `type` does not match a registered schema for the team's
|
|
63
|
+
* organization, the endpoint also returns 404.
|
|
64
|
+
* @param team - Team ID (`team_...`). Scopes results to objects owned by this team.
|
|
65
|
+
* @param input - Request body.
|
|
66
|
+
* @param input.fields - Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
|
|
67
|
+
* @param input.type - Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
|
|
68
|
+
* @returns The newly created custom object.
|
|
69
|
+
*/
|
|
68
70
|
create(team: string, input: {
|
|
69
71
|
fields: Record<string, unknown>;
|
|
70
72
|
type: string;
|
|
@@ -73,6 +75,32 @@ export declare class TeamCustomObjectResource {
|
|
|
73
75
|
export declare class MemberResource {
|
|
74
76
|
private http;
|
|
75
77
|
constructor(http: HttpClient);
|
|
78
|
+
/**
|
|
79
|
+
* Remove a member or org from a team
|
|
80
|
+
* Removes a user, agent, or all members of an organization from the specified
|
|
81
|
+
* team. Provide exactly one of `user`, `agent`, or `org` — supplying more than
|
|
82
|
+
* one or none returns a 400 error. On success, returns 204 No Content.
|
|
83
|
+
* When `org` is provided, every user and agent membership belonging to that org
|
|
84
|
+
* is removed in a single call. The caller must be a member of the team's owning
|
|
85
|
+
* org to perform an org-scoped removal. You cannot target the team's owning org
|
|
86
|
+
* itself with this parameter.
|
|
87
|
+
* The caller must have permission to manage the team. When `app` is present, the
|
|
88
|
+
* request is scoped to that app and requires a valid app-scoped token.
|
|
89
|
+
* @param team - Team ID (`team_...`). The team to remove the member from.
|
|
90
|
+
* @returns Empty response. Returns 204 No Content on success.
|
|
91
|
+
*/
|
|
92
|
+
remove(team: string): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* List members of a team
|
|
95
|
+
* Returns all members of the specified team, including both users and agents.
|
|
96
|
+
* Members are returned in a single non-paginated array ordered by join time.
|
|
97
|
+
* Bearer-authenticated users must be a member of the team to retrieve its
|
|
98
|
+
* member list. Developer and server-to-server callers can retrieve members for
|
|
99
|
+
* any team visible to their app scope. When `app` is provided, the request is
|
|
100
|
+
* scoped to that app and requires a valid app-scoped token.
|
|
101
|
+
* @param team - Team ID (`team_...`). The team to remove the member from.
|
|
102
|
+
* @returns Successful response
|
|
103
|
+
*/
|
|
76
104
|
list(team: string): Promise<{
|
|
77
105
|
data: {
|
|
78
106
|
agent?: {
|
|
@@ -98,12 +126,71 @@ export declare class MemberResource {
|
|
|
98
126
|
email?: string | undefined;
|
|
99
127
|
id: string;
|
|
100
128
|
identity?: string | undefined;
|
|
129
|
+
last_applied_template_config?: string | undefined;
|
|
101
130
|
lookup_key?: string | undefined;
|
|
102
131
|
metadata?: Record<string, unknown> | undefined;
|
|
103
132
|
name?: string | undefined;
|
|
104
133
|
org?: string | undefined;
|
|
134
|
+
org_name?: string | undefined;
|
|
135
|
+
originator?: string | undefined;
|
|
105
136
|
phone_number?: string | undefined;
|
|
106
137
|
sandbox?: string | undefined;
|
|
138
|
+
source_solution?: {
|
|
139
|
+
solution: {
|
|
140
|
+
category_keys?: string[] | undefined;
|
|
141
|
+
created_at?: string | undefined;
|
|
142
|
+
description?: string | undefined;
|
|
143
|
+
id: string;
|
|
144
|
+
kind: string;
|
|
145
|
+
latest_solution?: string | undefined;
|
|
146
|
+
latest_version?: string | undefined;
|
|
147
|
+
lookup_key?: string | undefined;
|
|
148
|
+
metadata?: Record<string, unknown> | undefined;
|
|
149
|
+
name?: string | undefined;
|
|
150
|
+
org?: string | undefined;
|
|
151
|
+
org_logo?: {
|
|
152
|
+
file?: string | undefined;
|
|
153
|
+
height?: number | undefined;
|
|
154
|
+
media?: string | undefined;
|
|
155
|
+
mime_type?: string | undefined;
|
|
156
|
+
refresh_url?: string | undefined;
|
|
157
|
+
url?: string | undefined;
|
|
158
|
+
width?: number | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
org_name?: string | undefined;
|
|
161
|
+
org_slug?: string | undefined;
|
|
162
|
+
owners: string[];
|
|
163
|
+
readme_url?: string | undefined;
|
|
164
|
+
solution_id?: string | undefined;
|
|
165
|
+
solution_version?: string | undefined;
|
|
166
|
+
tag_keys?: string[] | undefined;
|
|
167
|
+
template_kind?: string | undefined;
|
|
168
|
+
templates: {
|
|
169
|
+
description?: string | undefined;
|
|
170
|
+
display_name?: string | undefined;
|
|
171
|
+
id?: string | undefined;
|
|
172
|
+
kind: string;
|
|
173
|
+
lookup_key?: string | undefined;
|
|
174
|
+
name?: string | undefined;
|
|
175
|
+
readme_url?: string | undefined;
|
|
176
|
+
virtual_path?: string | undefined;
|
|
177
|
+
}[];
|
|
178
|
+
updated_at?: string | undefined;
|
|
179
|
+
upgrade_available: boolean;
|
|
180
|
+
virtual_path?: string | undefined;
|
|
181
|
+
};
|
|
182
|
+
template: {
|
|
183
|
+
created_at?: string | undefined;
|
|
184
|
+
description?: string | undefined;
|
|
185
|
+
display_name?: string | undefined;
|
|
186
|
+
id: string;
|
|
187
|
+
kind: string;
|
|
188
|
+
lookup_key?: string | undefined;
|
|
189
|
+
name?: string | undefined;
|
|
190
|
+
updated_at?: string | undefined;
|
|
191
|
+
virtual_path?: string | undefined;
|
|
192
|
+
};
|
|
193
|
+
} | undefined;
|
|
107
194
|
team?: string | undefined;
|
|
108
195
|
updated_at?: string | undefined;
|
|
109
196
|
user?: string | undefined;
|
|
@@ -128,36 +215,93 @@ export declare class MemberResource {
|
|
|
128
215
|
updated_at?: string | undefined;
|
|
129
216
|
user?: {
|
|
130
217
|
alias?: string | undefined;
|
|
218
|
+
app?: string | undefined;
|
|
219
|
+
app_name?: string | undefined;
|
|
131
220
|
email?: string | undefined;
|
|
132
221
|
id: string;
|
|
222
|
+
is_system_user?: boolean | undefined;
|
|
133
223
|
metadata?: Record<string, unknown> | undefined;
|
|
134
224
|
name?: string | undefined;
|
|
135
225
|
org?: string | undefined;
|
|
226
|
+
org_name?: string | undefined;
|
|
227
|
+
org_role?: string | undefined;
|
|
136
228
|
sandbox?: string | undefined;
|
|
229
|
+
sandbox_name?: string | undefined;
|
|
137
230
|
} | undefined;
|
|
138
231
|
}[];
|
|
139
232
|
}>;
|
|
233
|
+
/**
|
|
234
|
+
* Add a member to a team
|
|
235
|
+
* Adds a user or agent as a member of the specified team and returns the new
|
|
236
|
+
* membership with HTTP 201. Provide exactly one of `user` or `agent` — supplying
|
|
237
|
+
* both or neither returns a 400 error.
|
|
238
|
+
* The caller must have permission to manage the team. When an `app` is provided,
|
|
239
|
+
* the request is scoped to that app and the caller must hold a valid app-scoped
|
|
240
|
+
* token. The default role is `"member"` when `role` is omitted.
|
|
241
|
+
* @param team - Team ID (`team_...`). The team to remove the member from.
|
|
242
|
+
* @param input - Request body.
|
|
243
|
+
* @param input.agent - Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
|
|
244
|
+
* @param input.role - Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
|
|
245
|
+
* @param input.user - User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
|
|
246
|
+
* @returns The newly created team membership.
|
|
247
|
+
*/
|
|
140
248
|
create(team: string, input: {
|
|
141
249
|
agent?: string | undefined;
|
|
142
250
|
role?: string | undefined;
|
|
143
251
|
user?: string | undefined;
|
|
144
252
|
}): Promise<TeamMembership>;
|
|
253
|
+
/**
|
|
254
|
+
* Update a team member's role
|
|
255
|
+
* Changes the role of an existing user member on the specified team. Returns the
|
|
256
|
+
* updated membership on success.
|
|
257
|
+
* Only user memberships are supported by this endpoint. Attempting to update an
|
|
258
|
+
* agent membership returns 404. To change an agent's role, remove the existing
|
|
259
|
+
* membership and re-add the agent with the desired role.
|
|
260
|
+
* The caller must have permission to modify the team. You cannot change a member's
|
|
261
|
+
* role across organization boundaries. Demoting the last owner of a team returns
|
|
262
|
+
* 409. An invalid `role` value returns 422. When `app` is provided, the request
|
|
263
|
+
* is scoped to that app and requires a valid app-scoped token.
|
|
264
|
+
* @param team - Team ID (`team_...`). The team to remove the member from.
|
|
265
|
+
* @param user - User ID (`usr_...`) of the existing member whose role should be changed.
|
|
266
|
+
* @param input - Request body.
|
|
267
|
+
* @param input.role - New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
|
|
268
|
+
* @returns The updated team membership reflecting the new role.
|
|
269
|
+
*/
|
|
270
|
+
update(team: string, user: string, input: {
|
|
271
|
+
role: string;
|
|
272
|
+
}): Promise<TeamMembership>;
|
|
145
273
|
}
|
|
146
274
|
export declare class TeamThreadResource {
|
|
147
275
|
private http;
|
|
148
276
|
constructor(http: HttpClient);
|
|
277
|
+
/**
|
|
278
|
+
* List threads for a team
|
|
279
|
+
* Returns all threads owned by the specified team that the authenticated caller
|
|
280
|
+
* has permission to view. The caller must have access to the team; requests
|
|
281
|
+
* without team access are rejected with 404.
|
|
282
|
+
* Threads are returned in a single `data` array. Use the team-scoped thread
|
|
283
|
+
* endpoints to create, update, or delete individual threads.
|
|
284
|
+
* @param team - Team ID (`tem_...`) whose threads should be listed.
|
|
285
|
+
* @returns Successful response
|
|
286
|
+
*/
|
|
149
287
|
list(team: string): Promise<{
|
|
150
288
|
data: {
|
|
151
289
|
agent_user?: string | undefined;
|
|
152
290
|
created_at?: string | undefined;
|
|
153
291
|
creator?: {
|
|
154
292
|
alias?: string | undefined;
|
|
293
|
+
app?: string | undefined;
|
|
294
|
+
app_name?: string | undefined;
|
|
155
295
|
email?: string | undefined;
|
|
156
296
|
id: string;
|
|
297
|
+
is_system_user?: boolean | undefined;
|
|
157
298
|
metadata?: Record<string, unknown> | undefined;
|
|
158
299
|
name?: string | undefined;
|
|
159
300
|
org?: string | undefined;
|
|
301
|
+
org_name?: string | undefined;
|
|
302
|
+
org_role?: string | undefined;
|
|
160
303
|
sandbox?: string | undefined;
|
|
304
|
+
sandbox_name?: string | undefined;
|
|
161
305
|
} | undefined;
|
|
162
306
|
description?: string | undefined;
|
|
163
307
|
id: string;
|
|
@@ -168,6 +312,7 @@ export declare class TeamThreadResource {
|
|
|
168
312
|
key?: string | undefined;
|
|
169
313
|
last_activity?: string | undefined;
|
|
170
314
|
metadata?: Record<string, unknown> | undefined;
|
|
315
|
+
muted?: boolean | undefined;
|
|
171
316
|
org?: string | undefined;
|
|
172
317
|
parent_message?: {
|
|
173
318
|
actors?: {
|
|
@@ -261,12 +406,18 @@ export declare class TeamThreadResource {
|
|
|
261
406
|
participant?: string[] | undefined;
|
|
262
407
|
participants?: {
|
|
263
408
|
alias?: string | undefined;
|
|
409
|
+
app?: string | undefined;
|
|
410
|
+
app_name?: string | undefined;
|
|
264
411
|
email?: string | undefined;
|
|
265
412
|
id: string;
|
|
413
|
+
is_system_user?: boolean | undefined;
|
|
266
414
|
metadata?: Record<string, unknown> | undefined;
|
|
267
415
|
name?: string | undefined;
|
|
268
416
|
org?: string | undefined;
|
|
417
|
+
org_name?: string | undefined;
|
|
418
|
+
org_role?: string | undefined;
|
|
269
419
|
sandbox?: string | undefined;
|
|
420
|
+
sandbox_name?: string | undefined;
|
|
270
421
|
}[] | undefined;
|
|
271
422
|
participating_actor?: string[] | undefined;
|
|
272
423
|
participating_agents?: {
|
|
@@ -292,12 +443,71 @@ export declare class TeamThreadResource {
|
|
|
292
443
|
email?: string | undefined;
|
|
293
444
|
id: string;
|
|
294
445
|
identity?: string | undefined;
|
|
446
|
+
last_applied_template_config?: string | undefined;
|
|
295
447
|
lookup_key?: string | undefined;
|
|
296
448
|
metadata?: Record<string, unknown> | undefined;
|
|
297
449
|
name?: string | undefined;
|
|
298
450
|
org?: string | undefined;
|
|
451
|
+
org_name?: string | undefined;
|
|
452
|
+
originator?: string | undefined;
|
|
299
453
|
phone_number?: string | undefined;
|
|
300
454
|
sandbox?: string | undefined;
|
|
455
|
+
source_solution?: {
|
|
456
|
+
solution: {
|
|
457
|
+
category_keys?: string[] | undefined;
|
|
458
|
+
created_at?: string | undefined;
|
|
459
|
+
description?: string | undefined;
|
|
460
|
+
id: string;
|
|
461
|
+
kind: string;
|
|
462
|
+
latest_solution?: string | undefined;
|
|
463
|
+
latest_version?: string | undefined;
|
|
464
|
+
lookup_key?: string | undefined;
|
|
465
|
+
metadata?: Record<string, unknown> | undefined;
|
|
466
|
+
name?: string | undefined;
|
|
467
|
+
org?: string | undefined;
|
|
468
|
+
org_logo?: {
|
|
469
|
+
file?: string | undefined;
|
|
470
|
+
height?: number | undefined;
|
|
471
|
+
media?: string | undefined;
|
|
472
|
+
mime_type?: string | undefined;
|
|
473
|
+
refresh_url?: string | undefined;
|
|
474
|
+
url?: string | undefined;
|
|
475
|
+
width?: number | undefined;
|
|
476
|
+
} | undefined;
|
|
477
|
+
org_name?: string | undefined;
|
|
478
|
+
org_slug?: string | undefined;
|
|
479
|
+
owners: string[];
|
|
480
|
+
readme_url?: string | undefined;
|
|
481
|
+
solution_id?: string | undefined;
|
|
482
|
+
solution_version?: string | undefined;
|
|
483
|
+
tag_keys?: string[] | undefined;
|
|
484
|
+
template_kind?: string | undefined;
|
|
485
|
+
templates: {
|
|
486
|
+
description?: string | undefined;
|
|
487
|
+
display_name?: string | undefined;
|
|
488
|
+
id?: string | undefined;
|
|
489
|
+
kind: string;
|
|
490
|
+
lookup_key?: string | undefined;
|
|
491
|
+
name?: string | undefined;
|
|
492
|
+
readme_url?: string | undefined;
|
|
493
|
+
virtual_path?: string | undefined;
|
|
494
|
+
}[];
|
|
495
|
+
updated_at?: string | undefined;
|
|
496
|
+
upgrade_available: boolean;
|
|
497
|
+
virtual_path?: string | undefined;
|
|
498
|
+
};
|
|
499
|
+
template: {
|
|
500
|
+
created_at?: string | undefined;
|
|
501
|
+
description?: string | undefined;
|
|
502
|
+
display_name?: string | undefined;
|
|
503
|
+
id: string;
|
|
504
|
+
kind: string;
|
|
505
|
+
lookup_key?: string | undefined;
|
|
506
|
+
name?: string | undefined;
|
|
507
|
+
updated_at?: string | undefined;
|
|
508
|
+
virtual_path?: string | undefined;
|
|
509
|
+
};
|
|
510
|
+
} | undefined;
|
|
301
511
|
team?: string | undefined;
|
|
302
512
|
updated_at?: string | undefined;
|
|
303
513
|
user?: string | undefined;
|
|
@@ -317,6 +527,23 @@ export declare class TeamThreadResource {
|
|
|
317
527
|
user?: string | undefined;
|
|
318
528
|
}[];
|
|
319
529
|
}>;
|
|
530
|
+
/**
|
|
531
|
+
* Create a thread for a team
|
|
532
|
+
* Creates a new thread owned by the specified team. The authenticated caller must
|
|
533
|
+
* have access to the team; requests from callers without team access are rejected
|
|
534
|
+
* with 404.
|
|
535
|
+
* If a `profile_picture` is provided in the thread params, it must be
|
|
536
|
+
* base64-encoded image data. The image is uploaded and associated with the thread
|
|
537
|
+
* before creation completes. Omit `profile_picture` to skip this step.
|
|
538
|
+
* By default the platform sends an automatic welcome message into the new thread.
|
|
539
|
+
* Pass `skip_welcome_message: true` to suppress this behavior, for example when
|
|
540
|
+
* creating threads programmatically in bulk or seeding test data.
|
|
541
|
+
* @param team - Team ID (`tem_...`) whose threads should be listed.
|
|
542
|
+
* @param input - Request body.
|
|
543
|
+
* @param input.skip_welcome_message - When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
|
|
544
|
+
* @param input.thread - Attributes for the new thread. See ThreadCreateParams for available fields.
|
|
545
|
+
* @returns The newly created thread.
|
|
546
|
+
*/
|
|
320
547
|
create(team: string, input: {
|
|
321
548
|
skip_welcome_message?: boolean | undefined;
|
|
322
549
|
thread: {
|
|
@@ -325,6 +552,7 @@ export declare class TeamThreadResource {
|
|
|
325
552
|
is_unlisted?: boolean | undefined;
|
|
326
553
|
key?: string | undefined;
|
|
327
554
|
metadata?: Record<string, unknown> | undefined;
|
|
555
|
+
muted?: boolean | undefined;
|
|
328
556
|
org_id?: string | undefined;
|
|
329
557
|
profile_picture?: {
|
|
330
558
|
data?: string | undefined;
|
|
@@ -340,15 +568,40 @@ export declare class TeamThreadResource {
|
|
|
340
568
|
}
|
|
341
569
|
export declare class TeamResource {
|
|
342
570
|
private http;
|
|
343
|
-
readonly artifacts: TeamArtifactResource;
|
|
344
571
|
readonly custom_objects: TeamCustomObjectResource;
|
|
345
572
|
readonly members: MemberResource;
|
|
346
573
|
readonly threads: TeamThreadResource;
|
|
347
574
|
constructor(http: HttpClient);
|
|
575
|
+
/**
|
|
576
|
+
* List teams
|
|
577
|
+
* Returns a paginated list of teams visible to the authenticated user, ordered
|
|
578
|
+
* by creation time descending. Use `membership` to narrow results to teams the
|
|
579
|
+
* caller has joined or teams they are eligible to join based on their ACL
|
|
580
|
+
* visibility.
|
|
581
|
+
* Supports full-text search across team name and description via `search`, and
|
|
582
|
+
* structured metadata filtering via `metadata`. When `app` is present, results
|
|
583
|
+
* are scoped to that app and the caller must hold the corresponding app scope.
|
|
584
|
+
* @param params - Query parameters.
|
|
585
|
+
* @param params.page - Page number to retrieve, starting at 1. Defaults to 1.
|
|
586
|
+
* @param params.pageSize - Number of teams to return per page. Defaults to 25.
|
|
587
|
+
* @param params.search - Full-text search string matched against team name and description.
|
|
588
|
+
* @param params.metadata - Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
|
|
589
|
+
* @param params.membership - Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
|
|
590
|
+
* @returns Successful response
|
|
591
|
+
*/
|
|
348
592
|
list(params?: {
|
|
349
593
|
page?: number;
|
|
350
594
|
pageSize?: number;
|
|
351
595
|
search?: string;
|
|
596
|
+
metadata?: {
|
|
597
|
+
clause?: Record<string, unknown> | undefined;
|
|
598
|
+
clauses?: Record<string, unknown>[] | undefined;
|
|
599
|
+
key?: string | undefined;
|
|
600
|
+
operator?: "and" | "or" | "eq" | "contains" | "exists" | "not" | undefined;
|
|
601
|
+
path?: string[] | undefined;
|
|
602
|
+
type?: string | undefined;
|
|
603
|
+
value?: unknown | undefined;
|
|
604
|
+
};
|
|
352
605
|
membership?: string;
|
|
353
606
|
}): Promise<{
|
|
354
607
|
data: {
|
|
@@ -388,6 +641,22 @@ export declare class TeamResource {
|
|
|
388
641
|
total_entries: number;
|
|
389
642
|
total_pages: number;
|
|
390
643
|
}>;
|
|
644
|
+
/**
|
|
645
|
+
* Create a team
|
|
646
|
+
* Creates a new team and returns the created team object. The authenticated
|
|
647
|
+
* user becomes the team's owner.
|
|
648
|
+
* When `app` is supplied, the request is scoped to that app and the caller
|
|
649
|
+
* must hold the corresponding app scope. Omit `org` unless you want the team
|
|
650
|
+
* pinned to a specific organization. A default chat thread is provisioned for
|
|
651
|
+
* the team automatically after creation.
|
|
652
|
+
* @param input - Request body.
|
|
653
|
+
* @param input.acl - Access control configuration for the team. Controls who can discover and join the team.
|
|
654
|
+
* @param input.description - Optional human-readable description of the team's purpose.
|
|
655
|
+
* @param input.metadata - Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
|
|
656
|
+
* @param input.name - Display name for the team.
|
|
657
|
+
* @param input.org - Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
|
|
658
|
+
* @returns The newly created team.
|
|
659
|
+
*/
|
|
391
660
|
create(input: {
|
|
392
661
|
acl?: {
|
|
393
662
|
add?: {
|
|
@@ -411,11 +680,23 @@ export declare class TeamResource {
|
|
|
411
680
|
org?: string | undefined;
|
|
412
681
|
}): Promise<Team>;
|
|
413
682
|
/**
|
|
414
|
-
* Join a team
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
683
|
+
* Join a team with an invite code
|
|
684
|
+
* Adds a principal to a team using a 12-character invite code. The invite
|
|
685
|
+
* code can be supplied as either `join_code` or `invite_code`; both are
|
|
686
|
+
* accepted for backwards compatibility.
|
|
687
|
+
* For user-authenticated requests, the currently authenticated user is added
|
|
688
|
+
* to the team. For server-to-server requests, you must supply either `agent`
|
|
689
|
+
* (to add an agent) or `user` (to add a specific user by ID). If the user
|
|
690
|
+
* is already a member of the team, the request succeeds without creating a
|
|
691
|
+
* duplicate membership.
|
|
692
|
+
* This endpoint is rate-limited to 10 requests per minute per IP address to
|
|
693
|
+
* prevent invite-code enumeration.
|
|
694
|
+
* @param input - Request body.
|
|
695
|
+
* @param input.agent - Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
|
|
696
|
+
* @param input.invite_code - 12-character invite code — alias for `join_code` accepted for backwards compatibility.
|
|
697
|
+
* @param input.join_code - 12-character invite code that identifies the team. Mutually usable with `invite_code`.
|
|
698
|
+
* @param input.user - User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
|
|
699
|
+
* @returns The team the principal has joined.
|
|
419
700
|
*/
|
|
420
701
|
joinByCode(input: {
|
|
421
702
|
agent?: string | undefined;
|
|
@@ -423,8 +704,45 @@ export declare class TeamResource {
|
|
|
423
704
|
join_code?: string | undefined;
|
|
424
705
|
user?: string | undefined;
|
|
425
706
|
}): Promise<Team>;
|
|
707
|
+
/**
|
|
708
|
+
* Delete a team
|
|
709
|
+
* Permanently deletes the team identified by `team`. This action is
|
|
710
|
+
* irreversible — all team memberships, settings, and associated data are
|
|
711
|
+
* removed.
|
|
712
|
+
* The caller must be the team owner or an org admin. When `app` is present,
|
|
713
|
+
* the caller must also hold the corresponding app scope.
|
|
714
|
+
* @param team - Team ID (`team_...`) of the team to delete.
|
|
715
|
+
* @returns Empty response — the team has been deleted.
|
|
716
|
+
*/
|
|
426
717
|
delete(team: string): Promise<void>;
|
|
718
|
+
/**
|
|
719
|
+
* Retrieve a team
|
|
720
|
+
* Returns the full team object for the given `team` ID, including its current
|
|
721
|
+
* member list and all associated threads.
|
|
722
|
+
* The authenticated user must be a member of the team or hold a role that
|
|
723
|
+
* grants visibility (org admin, app scope). When `app` is supplied, the
|
|
724
|
+
* caller must hold the corresponding app scope.
|
|
725
|
+
* @param team - Team ID (`team_...`) of the team to retrieve.
|
|
726
|
+
* @returns The requested team, including its members and threads.
|
|
727
|
+
*/
|
|
427
728
|
get(team: string): Promise<Team>;
|
|
729
|
+
/**
|
|
730
|
+
* Update a team
|
|
731
|
+
* Updates one or more attributes of the team identified by `team`. Only the
|
|
732
|
+
* fields you provide are changed; omitted fields are left as-is.
|
|
733
|
+
* To replace the team's profile picture, supply the `profile_picture` object
|
|
734
|
+
* with base64-encoded image data. The previous picture is deleted after the
|
|
735
|
+
* new one is successfully uploaded. When `app` is present, the caller must hold
|
|
736
|
+
* the corresponding app scope. The caller must be a team owner or org admin.
|
|
737
|
+
* @param team - Team ID (`team_...`) of the team to update.
|
|
738
|
+
* @param input - Request body.
|
|
739
|
+
* @param input.acl - New access control configuration for the team. Replaces the existing ACL.
|
|
740
|
+
* @param input.description - New human-readable description of the team's purpose.
|
|
741
|
+
* @param input.metadata - Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
|
|
742
|
+
* @param input.name - New display name for the team.
|
|
743
|
+
* @param input.profile_picture - New profile picture for the team. Provide this object to upload and replace the current picture.
|
|
744
|
+
* @returns The updated team with all changes applied.
|
|
745
|
+
*/
|
|
428
746
|
update(team: string, input: {
|
|
429
747
|
acl?: {
|
|
430
748
|
add?: {
|
|
@@ -451,20 +769,111 @@ export declare class TeamResource {
|
|
|
451
769
|
mime_type?: string | undefined;
|
|
452
770
|
} | undefined;
|
|
453
771
|
}): Promise<Team>;
|
|
772
|
+
/**
|
|
773
|
+
* List a team's artifacts
|
|
774
|
+
* Returns all artifacts owned by the specified team. Artifacts represent
|
|
775
|
+
* AI-generated or user-uploaded files associated with agent sessions,
|
|
776
|
+
* threads, or sandboxes — such as images, documents, and code outputs.
|
|
777
|
+
* The authenticated user must be a member of the team. Attempting to list
|
|
778
|
+
* artifacts for a team the caller does not have access to returns 404
|
|
779
|
+
* rather than 403 to avoid leaking team existence.
|
|
780
|
+
* Results are returned in a single page without cursor pagination. Each
|
|
781
|
+
* artifact in the response reflects the state of its current version,
|
|
782
|
+
* including a short-lived signed `file_url` for direct download.
|
|
783
|
+
* @param team - Team ID (`tea_...`). The authenticated user must be a member of this team.
|
|
784
|
+
* @returns Successful response
|
|
785
|
+
*/
|
|
786
|
+
artifacts(team: string): Promise<{
|
|
787
|
+
data: {
|
|
788
|
+
agent?: string | undefined;
|
|
789
|
+
content_type?: string | undefined;
|
|
790
|
+
created_at?: string | undefined;
|
|
791
|
+
current_version?: string | undefined;
|
|
792
|
+
description?: string | undefined;
|
|
793
|
+
file?: string | undefined;
|
|
794
|
+
file_name?: string | undefined;
|
|
795
|
+
file_url?: string | undefined;
|
|
796
|
+
id: string;
|
|
797
|
+
image_source?: {
|
|
798
|
+
file?: string | undefined;
|
|
799
|
+
height?: number | undefined;
|
|
800
|
+
media?: string | undefined;
|
|
801
|
+
mime_type?: string | undefined;
|
|
802
|
+
refresh_url?: string | undefined;
|
|
803
|
+
url?: string | undefined;
|
|
804
|
+
width?: number | undefined;
|
|
805
|
+
} | undefined;
|
|
806
|
+
name?: string | undefined;
|
|
807
|
+
org?: string | undefined;
|
|
808
|
+
sandbox?: string | undefined;
|
|
809
|
+
team?: string | undefined;
|
|
810
|
+
thread?: string | undefined;
|
|
811
|
+
updated_at?: string | undefined;
|
|
812
|
+
user?: string | undefined;
|
|
813
|
+
version?: number | undefined;
|
|
814
|
+
}[];
|
|
815
|
+
}>;
|
|
816
|
+
/**
|
|
817
|
+
* Create a team invite
|
|
818
|
+
* Generates a new invite code for the specified team. The authenticated user
|
|
819
|
+
* must be a member of the team with the `owner` or `admin` role.
|
|
820
|
+
* The returned code is a short alphanumeric string that other users can
|
|
821
|
+
* present to join the team. Each call produces a new code; previously issued
|
|
822
|
+
* codes are not invalidated by this request.
|
|
823
|
+
* @param team - Team ID (`tm_...`) identifying the team for which to generate the invite code.
|
|
824
|
+
* @returns The newly created team invite containing the join code.
|
|
825
|
+
*/
|
|
454
826
|
invite(team: string): Promise<TeamInvite>;
|
|
827
|
+
/**
|
|
828
|
+
* Create a team invite (server-to-server)
|
|
829
|
+
* Generates a new invite code for the specified team using server-to-server
|
|
830
|
+
* authentication. Unlike the user-facing create endpoint, this variant does not
|
|
831
|
+
* require the caller to be a team member — it is intended for privileged
|
|
832
|
+
* back-end services acting on behalf of your platform.
|
|
833
|
+
* The returned code is a short alphanumeric string that users can present to
|
|
834
|
+
* join the team. Each call produces a new code; previously issued codes are
|
|
835
|
+
* not invalidated by this request.
|
|
836
|
+
* @param team - Team ID (`tm_...`) identifying the team for which to generate the invite code.
|
|
837
|
+
* @returns Successful response
|
|
838
|
+
*/
|
|
455
839
|
invites(team: string): Promise<{
|
|
456
840
|
code: string;
|
|
457
841
|
}>;
|
|
458
842
|
/**
|
|
459
|
-
* Join a team
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
843
|
+
* Join a team
|
|
844
|
+
* Adds a principal to a team that is visible to the authenticated user.
|
|
845
|
+
* By default, the currently authenticated user joins the team. Provide `agent`
|
|
846
|
+
* to add an agent to the team instead — the caller must already be a member of
|
|
847
|
+
* the team to do so. Provide `user` (by ID) or `email` to add another user from
|
|
848
|
+
* your organization — the caller must be a team owner, team admin, or org admin.
|
|
849
|
+
* Only one of `agent`, `user`, or `email` may be supplied per request.
|
|
850
|
+
* If the target principal is already a member of the team, the request succeeds
|
|
851
|
+
* without creating a duplicate membership. Server-to-server callers are not
|
|
852
|
+
* permitted to use this endpoint; use the invite-code endpoint instead.
|
|
853
|
+
* @param team - Team ID (`team_...`) to join.
|
|
854
|
+
* @param input - Request body.
|
|
855
|
+
* @param input.agent - Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
|
|
856
|
+
* @param input.email - Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
|
|
857
|
+
* @param input.user - User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
|
|
858
|
+
* @returns Empty response — the principal is now a member of the team.
|
|
464
859
|
*/
|
|
465
860
|
join(team: string, input: {
|
|
466
861
|
agent?: string | undefined;
|
|
862
|
+
email?: string | undefined;
|
|
863
|
+
user?: string | undefined;
|
|
467
864
|
}): Promise<void>;
|
|
865
|
+
/**
|
|
866
|
+
* Leave a team
|
|
867
|
+
* Removes a principal from a team. By default, the authenticated user removes
|
|
868
|
+
* themselves from the team. Provide `agent` to remove an agent instead — the
|
|
869
|
+
* caller must be a member of the team to do so.
|
|
870
|
+
* Team owners cannot leave their own team. To transfer ownership first, use
|
|
871
|
+
* the update-membership endpoint, then call this endpoint.
|
|
872
|
+
* For server-to-server requests, `user` is required to identify which user
|
|
873
|
+
* should be removed.
|
|
874
|
+
* @param team - Team ID (`team_...`) to leave.
|
|
875
|
+
* @returns Empty response — the principal has been removed from the team.
|
|
876
|
+
*/
|
|
468
877
|
leave(team: string): Promise<void>;
|
|
469
878
|
}
|
|
470
879
|
//# sourceMappingURL=teams.d.ts.map
|