@archastro/sdk 0.5.0 → 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 +21185 -39
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/chat.js +64 -8
- package/dist/types/chat.js.map +1 -1
- 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 +4 -2
- 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
- package/dist/types/members.d.ts +0 -99
- package/dist/types/members.d.ts.map +0 -1
- package/dist/types/members.js +0 -36
- package/dist/types/members.js.map +0 -1
- package/dist/types/orgs.d.ts +0 -193
- package/dist/types/orgs.d.ts.map +0 -1
- package/dist/types/orgs.js +0 -69
- package/dist/types/orgs.js.map +0 -1
- package/dist/types/reactions.d.ts +0 -29
- package/dist/types/reactions.d.ts.map +0 -1
- package/dist/types/reactions.js +0 -15
- package/dist/types/reactions.js.map +0 -1
- package/dist/types/schedules.d.ts +0 -32
- package/dist/types/schedules.d.ts.map +0 -1
- package/dist/types/schedules.js +0 -16
- package/dist/types/schedules.js.map +0 -1
- package/dist/types/system.d.ts +0 -23
- package/dist/types/system.d.ts.map +0 -1
- package/dist/types/system.js +0 -13
- package/dist/types/system.js.map +0 -1
|
@@ -1,12 +1,127 @@
|
|
|
1
1
|
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
-
import type { CustomObject } from "../../types/common.js";
|
|
2
|
+
import type { CustomObject, CustomObjectListResponse } from "../../types/common.js";
|
|
3
3
|
export declare class CustomObjectResource {
|
|
4
4
|
private http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* List custom objects
|
|
8
|
+
* Returns a paginated list of custom objects of the given schema type that are
|
|
9
|
+
* visible to the authenticated viewer, ordered by creation time descending.
|
|
10
|
+
* Results span all ownership types (team-owned, user-owned, agent-owned, and
|
|
11
|
+
* system-owned) that the viewer has access to.
|
|
12
|
+
* Use the `row_key` param to perform an exact-match partition lookup. You may
|
|
13
|
+
* additionally supply `sort_key` to narrow within that partition — `sort_key`
|
|
14
|
+
* requires `row_key` and the request returns 400 if `sort_key` is provided
|
|
15
|
+
* alone. Owner filters (`team`, `user`, `agent`, `org`) are additive: each
|
|
16
|
+
* accepts an array of IDs and returns objects matching any of the supplied
|
|
17
|
+
* values.
|
|
18
|
+
* When `query` is supplied, results are ranked by full-text relevance
|
|
19
|
+
* (descending `ts_rank`) rather than creation time.
|
|
20
|
+
* @param params - Query parameters.
|
|
21
|
+
* @param params.type - Schema type identifier (`lookup_key`) to filter by. Only objects of this type are returned.
|
|
22
|
+
* @param params.rowKey - Exact `row_key` value to match. When supplied, only objects with this partition key are returned.
|
|
23
|
+
* @param params.sortKey - One or more `sort_key` values to match within the `row_key` partition. Requires `row_key` to be set.
|
|
24
|
+
* @param params.team - One or more team IDs (`team_...`) to filter by owning team. Returns objects owned by any of the supplied teams.
|
|
25
|
+
* @param params.user - One or more user IDs (`user_...`) to filter by owning user. Returns objects owned by any of the supplied users.
|
|
26
|
+
* @param params.agent - One or more agent IDs to filter by owning agent. Returns objects owned by any of the supplied agents.
|
|
27
|
+
* @param params.org - One or more organization IDs (`org_...`) to filter by. Typically used by admins to query system-owned objects in a specific org.
|
|
28
|
+
* @param params.query - Full-text search string matched against the schema's configured search fields. When supplied, results are ordered by relevance score descending instead of creation time descending.
|
|
29
|
+
* @param params.page - Page number to retrieve (1-indexed). Defaults to `1`.
|
|
30
|
+
* @param params.pageSize - Number of objects per page. Defaults to `25`; maximum is `100`.
|
|
31
|
+
* @returns Paginated list of custom objects matching the supplied filters.
|
|
32
|
+
*/
|
|
33
|
+
list(params?: {
|
|
34
|
+
type?: string;
|
|
35
|
+
rowKey?: string;
|
|
36
|
+
sortKey?: string[];
|
|
37
|
+
team?: string[];
|
|
38
|
+
user?: string[];
|
|
39
|
+
agent?: string[];
|
|
40
|
+
org?: string[];
|
|
41
|
+
query?: string;
|
|
42
|
+
page?: number;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
}): Promise<CustomObjectListResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Create a custom object
|
|
47
|
+
* Creates a new custom object of the given schema type and returns the
|
|
48
|
+
* persisted object. The caller must be authenticated and authorized to create
|
|
49
|
+
* objects of the specified type.
|
|
50
|
+
* Owner resolution follows a priority order: if `team` is supplied the object
|
|
51
|
+
* is team-owned; if `user` is supplied it is owned by that user; if `agent` is
|
|
52
|
+
* supplied it is agent-owned; otherwise the object is owned by the authenticated
|
|
53
|
+
* user. Pass `system: true` explicitly to force system ownership — this requires
|
|
54
|
+
* elevated API credentials and returns 403 if the caller lacks permission.
|
|
55
|
+
* If the schema declares a `row_key` (and optionally a `sort_key`), you may
|
|
56
|
+
* pass `upsert: true` to update an existing object at that key instead of
|
|
57
|
+
* receiving a 409 Conflict. The response status is `200` on an update and
|
|
58
|
+
* `201` on a new create.
|
|
59
|
+
* @param input - Request body.
|
|
60
|
+
* @param input.agent - Agent user ID to set as the object owner. Used when neither `team` nor `user` is supplied.
|
|
61
|
+
* @param input.fields - Key-value map of field values for the new object. Must conform to the schema's field definitions.
|
|
62
|
+
* @param input.org - Organization ID (`org_...`) to associate with the object. Typically required for system-owned objects.
|
|
63
|
+
* @param input.system - When `true`, creates a system-owned object with no team, user, or agent owner. Requires elevated API credentials; returns 403 if the caller lacks permission.
|
|
64
|
+
* @param input.team - Team ID (`team_...`) to set as the object owner. When supplied, takes priority over `user` and `agent`.
|
|
65
|
+
* @param input.type - Schema type identifier (`lookup_key`) that defines the object's shape and validation rules.
|
|
66
|
+
* @param input.upsert - When `true` and the schema declares a `row_key`, updates the existing object at that key for the same owner instead of returning 409 Conflict. Returns HTTP 200 on update and 201 on create.
|
|
67
|
+
* @param input.user - User ID (`user_...`) to set as the object owner. Used when neither `team` nor a higher-priority owner is set.
|
|
68
|
+
* @returns The created (or upserted) custom object.
|
|
69
|
+
*/
|
|
70
|
+
create(input: {
|
|
71
|
+
agent?: string | undefined;
|
|
72
|
+
fields: Record<string, unknown>;
|
|
73
|
+
org?: string | undefined;
|
|
74
|
+
system?: boolean | undefined;
|
|
75
|
+
team?: string | undefined;
|
|
76
|
+
type: string;
|
|
77
|
+
upsert?: boolean | undefined;
|
|
78
|
+
user?: string | undefined;
|
|
79
|
+
}): Promise<CustomObject>;
|
|
80
|
+
/**
|
|
81
|
+
* Delete a custom object
|
|
82
|
+
* Permanently deletes the custom object identified by `object`. The caller
|
|
83
|
+
* must be authenticated and have permission to delete the object.
|
|
84
|
+
* On success, returns a confirmation payload containing the deleted object's
|
|
85
|
+
* ID so callers can confirm the deletion without a follow-up fetch.
|
|
86
|
+
* Attempting to delete an object that does not exist or has already been
|
|
87
|
+
* deleted returns 404.
|
|
88
|
+
* @param object - Custom object ID (`cobj_...`) of the object to delete.
|
|
89
|
+
* @returns Successful response
|
|
90
|
+
*/
|
|
91
|
+
delete(object: string): Promise<{
|
|
92
|
+
deleted: boolean;
|
|
93
|
+
id: string;
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Retrieve a custom object
|
|
97
|
+
* Returns a single custom object identified by its ID. The authenticated viewer
|
|
98
|
+
* must have visibility access to the object.
|
|
99
|
+
* Returns 404 if the object does not exist, has been deleted, or is not
|
|
100
|
+
* visible to the viewer.
|
|
101
|
+
* @param object - Custom object ID (`cobj_...`) to retrieve.
|
|
102
|
+
* @param params - Query parameters.
|
|
103
|
+
* @param params.type - Schema type identifier (`lookup_key`) of the object. Optional; used for routing context only.
|
|
104
|
+
* @returns The requested custom object.
|
|
105
|
+
*/
|
|
7
106
|
get(object: string, params?: {
|
|
8
107
|
type?: string;
|
|
9
108
|
}): Promise<CustomObject>;
|
|
109
|
+
/**
|
|
110
|
+
* Update a custom object
|
|
111
|
+
* Updates the fields of an existing custom object and returns the updated
|
|
112
|
+
* object along with its new version number. The authenticated viewer must have
|
|
113
|
+
* permission to modify the object.
|
|
114
|
+
* You may supply `fields` (a full or partial key-value map to merge into the
|
|
115
|
+
* object), `field_ops` (granular array operations per field), or both — but
|
|
116
|
+
* the same field name must not appear in both, which returns 422. Returns 404
|
|
117
|
+
* if the object does not exist or has been deleted.
|
|
118
|
+
* @param object - Custom object ID (`cobj_...`) to update.
|
|
119
|
+
* @param input - Request body.
|
|
120
|
+
* @param input.field_ops - Granular array operations to apply per field (e.g. append, prepend, remove). A field must not appear in both `fields` and `field_ops`.
|
|
121
|
+
* @param input.fields - Key-value map of field values to merge into the object. Only the supplied keys are affected.
|
|
122
|
+
* @param input.type - Schema type identifier (`lookup_key`) of the object. Optional; used for routing context only.
|
|
123
|
+
* @returns Successful response
|
|
124
|
+
*/
|
|
10
125
|
replace(object: string, input: {
|
|
11
126
|
field_ops?: Record<string, unknown> | undefined;
|
|
12
127
|
fields: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom_objects.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/custom_objects.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"custom_objects.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/custom_objects.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,qBAAa,oBAAoB;IACnB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0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GAAG,OAAO,CAAC,YAAY,CAAC;IAS5E;;;;;;;;;;;;;;;OAeG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE;YAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;KAAE,CAAC;CAGjiB"}
|
|
@@ -1,17 +1,146 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: a79cb5be408a
|
|
4
4
|
export class CustomObjectResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
7
7
|
this.http = http;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* List custom objects
|
|
11
|
+
* Returns a paginated list of custom objects of the given schema type that are
|
|
12
|
+
* visible to the authenticated viewer, ordered by creation time descending.
|
|
13
|
+
* Results span all ownership types (team-owned, user-owned, agent-owned, and
|
|
14
|
+
* system-owned) that the viewer has access to.
|
|
15
|
+
* Use the `row_key` param to perform an exact-match partition lookup. You may
|
|
16
|
+
* additionally supply `sort_key` to narrow within that partition — `sort_key`
|
|
17
|
+
* requires `row_key` and the request returns 400 if `sort_key` is provided
|
|
18
|
+
* alone. Owner filters (`team`, `user`, `agent`, `org`) are additive: each
|
|
19
|
+
* accepts an array of IDs and returns objects matching any of the supplied
|
|
20
|
+
* values.
|
|
21
|
+
* When `query` is supplied, results are ranked by full-text relevance
|
|
22
|
+
* (descending `ts_rank`) rather than creation time.
|
|
23
|
+
* @param params - Query parameters.
|
|
24
|
+
* @param params.type - Schema type identifier (`lookup_key`) to filter by. Only objects of this type are returned.
|
|
25
|
+
* @param params.rowKey - Exact `row_key` value to match. When supplied, only objects with this partition key are returned.
|
|
26
|
+
* @param params.sortKey - One or more `sort_key` values to match within the `row_key` partition. Requires `row_key` to be set.
|
|
27
|
+
* @param params.team - One or more team IDs (`team_...`) to filter by owning team. Returns objects owned by any of the supplied teams.
|
|
28
|
+
* @param params.user - One or more user IDs (`user_...`) to filter by owning user. Returns objects owned by any of the supplied users.
|
|
29
|
+
* @param params.agent - One or more agent IDs to filter by owning agent. Returns objects owned by any of the supplied agents.
|
|
30
|
+
* @param params.org - One or more organization IDs (`org_...`) to filter by. Typically used by admins to query system-owned objects in a specific org.
|
|
31
|
+
* @param params.query - Full-text search string matched against the schema's configured search fields. When supplied, results are ordered by relevance score descending instead of creation time descending.
|
|
32
|
+
* @param params.page - Page number to retrieve (1-indexed). Defaults to `1`.
|
|
33
|
+
* @param params.pageSize - Number of objects per page. Defaults to `25`; maximum is `100`.
|
|
34
|
+
* @returns Paginated list of custom objects matching the supplied filters.
|
|
35
|
+
*/
|
|
36
|
+
async list(params) {
|
|
37
|
+
const query = {};
|
|
38
|
+
query["type"] = params?.type;
|
|
39
|
+
if (params?.rowKey !== undefined) {
|
|
40
|
+
query["row_key"] = params?.rowKey;
|
|
41
|
+
}
|
|
42
|
+
if (params?.sortKey !== undefined) {
|
|
43
|
+
query["sort_key"] = params?.sortKey;
|
|
44
|
+
}
|
|
45
|
+
if (params?.team !== undefined) {
|
|
46
|
+
query["team"] = params?.team;
|
|
47
|
+
}
|
|
48
|
+
if (params?.user !== undefined) {
|
|
49
|
+
query["user"] = params?.user;
|
|
50
|
+
}
|
|
51
|
+
if (params?.agent !== undefined) {
|
|
52
|
+
query["agent"] = params?.agent;
|
|
53
|
+
}
|
|
54
|
+
if (params?.org !== undefined) {
|
|
55
|
+
query["org"] = params?.org;
|
|
56
|
+
}
|
|
57
|
+
if (params?.query !== undefined) {
|
|
58
|
+
query["query"] = params?.query;
|
|
59
|
+
}
|
|
60
|
+
if (params?.page !== undefined) {
|
|
61
|
+
query["page"] = params?.page;
|
|
62
|
+
}
|
|
63
|
+
if (params?.pageSize !== undefined) {
|
|
64
|
+
query["page_size"] = params?.pageSize;
|
|
65
|
+
}
|
|
66
|
+
return this.http.request(`/api/v1/custom_objects`, { query });
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a custom object
|
|
70
|
+
* Creates a new custom object of the given schema type and returns the
|
|
71
|
+
* persisted object. The caller must be authenticated and authorized to create
|
|
72
|
+
* objects of the specified type.
|
|
73
|
+
* Owner resolution follows a priority order: if `team` is supplied the object
|
|
74
|
+
* is team-owned; if `user` is supplied it is owned by that user; if `agent` is
|
|
75
|
+
* supplied it is agent-owned; otherwise the object is owned by the authenticated
|
|
76
|
+
* user. Pass `system: true` explicitly to force system ownership — this requires
|
|
77
|
+
* elevated API credentials and returns 403 if the caller lacks permission.
|
|
78
|
+
* If the schema declares a `row_key` (and optionally a `sort_key`), you may
|
|
79
|
+
* pass `upsert: true` to update an existing object at that key instead of
|
|
80
|
+
* receiving a 409 Conflict. The response status is `200` on an update and
|
|
81
|
+
* `201` on a new create.
|
|
82
|
+
* @param input - Request body.
|
|
83
|
+
* @param input.agent - Agent user ID to set as the object owner. Used when neither `team` nor `user` is supplied.
|
|
84
|
+
* @param input.fields - Key-value map of field values for the new object. Must conform to the schema's field definitions.
|
|
85
|
+
* @param input.org - Organization ID (`org_...`) to associate with the object. Typically required for system-owned objects.
|
|
86
|
+
* @param input.system - When `true`, creates a system-owned object with no team, user, or agent owner. Requires elevated API credentials; returns 403 if the caller lacks permission.
|
|
87
|
+
* @param input.team - Team ID (`team_...`) to set as the object owner. When supplied, takes priority over `user` and `agent`.
|
|
88
|
+
* @param input.type - Schema type identifier (`lookup_key`) that defines the object's shape and validation rules.
|
|
89
|
+
* @param input.upsert - When `true` and the schema declares a `row_key`, updates the existing object at that key for the same owner instead of returning 409 Conflict. Returns HTTP 200 on update and 201 on create.
|
|
90
|
+
* @param input.user - User ID (`user_...`) to set as the object owner. Used when neither `team` nor a higher-priority owner is set.
|
|
91
|
+
* @returns The created (or upserted) custom object.
|
|
92
|
+
*/
|
|
93
|
+
async create(input) {
|
|
94
|
+
return this.http.request(`/api/v1/custom_objects`, { method: "POST", body: input });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Delete a custom object
|
|
98
|
+
* Permanently deletes the custom object identified by `object`. The caller
|
|
99
|
+
* must be authenticated and have permission to delete the object.
|
|
100
|
+
* On success, returns a confirmation payload containing the deleted object's
|
|
101
|
+
* ID so callers can confirm the deletion without a follow-up fetch.
|
|
102
|
+
* Attempting to delete an object that does not exist or has already been
|
|
103
|
+
* deleted returns 404.
|
|
104
|
+
* @param object - Custom object ID (`cobj_...`) of the object to delete.
|
|
105
|
+
* @returns Successful response
|
|
106
|
+
*/
|
|
9
107
|
async delete(object) {
|
|
10
|
-
|
|
108
|
+
return this.http.request(`/api/v1/custom_objects/${object}`, { method: "DELETE" });
|
|
11
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Retrieve a custom object
|
|
112
|
+
* Returns a single custom object identified by its ID. The authenticated viewer
|
|
113
|
+
* must have visibility access to the object.
|
|
114
|
+
* Returns 404 if the object does not exist, has been deleted, or is not
|
|
115
|
+
* visible to the viewer.
|
|
116
|
+
* @param object - Custom object ID (`cobj_...`) to retrieve.
|
|
117
|
+
* @param params - Query parameters.
|
|
118
|
+
* @param params.type - Schema type identifier (`lookup_key`) of the object. Optional; used for routing context only.
|
|
119
|
+
* @returns The requested custom object.
|
|
120
|
+
*/
|
|
12
121
|
async get(object, params) {
|
|
13
|
-
|
|
122
|
+
const query = {};
|
|
123
|
+
if (params?.type !== undefined) {
|
|
124
|
+
query["type"] = params?.type;
|
|
125
|
+
}
|
|
126
|
+
return this.http.request(`/api/v1/custom_objects/${object}`, { query });
|
|
14
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Update a custom object
|
|
130
|
+
* Updates the fields of an existing custom object and returns the updated
|
|
131
|
+
* object along with its new version number. The authenticated viewer must have
|
|
132
|
+
* permission to modify the object.
|
|
133
|
+
* You may supply `fields` (a full or partial key-value map to merge into the
|
|
134
|
+
* object), `field_ops` (granular array operations per field), or both — but
|
|
135
|
+
* the same field name must not appear in both, which returns 422. Returns 404
|
|
136
|
+
* if the object does not exist or has been deleted.
|
|
137
|
+
* @param object - Custom object ID (`cobj_...`) to update.
|
|
138
|
+
* @param input - Request body.
|
|
139
|
+
* @param input.field_ops - Granular array operations to apply per field (e.g. append, prepend, remove). A field must not appear in both `fields` and `field_ops`.
|
|
140
|
+
* @param input.fields - Key-value map of field values to merge into the object. Only the supplied keys are affected.
|
|
141
|
+
* @param input.type - Schema type identifier (`lookup_key`) of the object. Optional; used for routing context only.
|
|
142
|
+
* @returns Successful response
|
|
143
|
+
*/
|
|
15
144
|
async replace(object, input) {
|
|
16
145
|
return this.http.request(`/api/v1/custom_objects/${object}`, { method: "PUT", body: input });
|
|
17
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom_objects.js","sourceRoot":"","sources":["../../../src/v1/resources/custom_objects.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,oBAAoB;IACX;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,
|
|
1
|
+
{"version":3,"file":"custom_objects.js","sourceRoot":"","sources":["../../../src/v1/resources/custom_objects.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,oBAAoB;IACX;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,KAAK,CAAC,IAAI,CAAC,MAAqL;QAC9L,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC7B,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;YACjC,KAAK,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC;QACpC,CAAC;QACD,IAAI,MAAM,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,CAAC,UAAU,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC;QACtC,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,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AC3G,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,KAAsH;QAClJ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
+
import type { StorageFile } from "../../types/common.js";
|
|
3
|
+
export declare class FileResource {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Upload a file
|
|
8
|
+
* Creates a new file from base64-encoded content and returns the resulting file object,
|
|
9
|
+
* including a signed download URL. Use this endpoint to store images, documents, or
|
|
10
|
+
* other binary assets that can then be referenced by agents, teams, or users.
|
|
11
|
+
* App scope is derived from the authenticated viewer's bearer token or publishable key.
|
|
12
|
+
* You may optionally associate the file with an organization, team, user, or agent by
|
|
13
|
+
* passing the corresponding ID. If no owner is specified and the viewer is a user, the
|
|
14
|
+
* file is automatically attributed to that user.
|
|
15
|
+
* Returns `422` when the `data` field is not valid base64 or the changeset is invalid.
|
|
16
|
+
* Returns `403` when the request lacks the required app scope.
|
|
17
|
+
* @param input - Request body.
|
|
18
|
+
* @param input.agent - Agent ID (`agi_...`) to associate with this file. When provided, the file's organization is derived from the agent.
|
|
19
|
+
* @param input.content_type - MIME type of the file, e.g. `"image/png"` or `"application/pdf"`.
|
|
20
|
+
* @param input.data - Base64-encoded binary content of the file to upload.
|
|
21
|
+
* @param input.filename - Original filename including extension, e.g. `"avatar.png"`.
|
|
22
|
+
* @param input.org - Organization ID (`org_...`) to associate with this file. Optional; defaults to the viewer's organization when omitted.
|
|
23
|
+
* @param input.team - Team ID (`tem_...`) that owns this file. Takes precedence over `user` when both are provided.
|
|
24
|
+
* @param input.user - User ID (`usr_...`) that owns this file. Defaults to the authenticated user when neither `user` nor `team` is specified.
|
|
25
|
+
* @returns The newly created file, including a signed download URL.
|
|
26
|
+
*/
|
|
27
|
+
create(input: {
|
|
28
|
+
agent?: string | undefined;
|
|
29
|
+
content_type: string;
|
|
30
|
+
data: string;
|
|
31
|
+
filename: string;
|
|
32
|
+
org?: string | undefined;
|
|
33
|
+
team?: string | undefined;
|
|
34
|
+
user?: string | undefined;
|
|
35
|
+
}): Promise<StorageFile>;
|
|
36
|
+
/**
|
|
37
|
+
* Fetch an agent avatar image
|
|
38
|
+
* Returns the raw image bytes for an agent's profile picture identified by `file`.
|
|
39
|
+
* This endpoint is designed for integration partners (such as Slack) that fetch
|
|
40
|
+
* avatar URLs via plain GET requests without bearer token support. Authorization
|
|
41
|
+
* is performed via a short, stable capability `token` rather than an HTTP header.
|
|
42
|
+
* The `token` is an HMAC-based capability tied to the file ID. It does not expire,
|
|
43
|
+
* but it is invalidated when the agent's profile picture is replaced or the agent is
|
|
44
|
+
* deleted — shared caches may continue serving the old image until the
|
|
45
|
+
* `Cache-Control` max-age of one hour elapses. The endpoint never redirects to
|
|
46
|
+
* a signed storage URL; bytes are served inline so behavior is consistent across
|
|
47
|
+
* storage backends.
|
|
48
|
+
* All failure modes — invalid file ID, invalid token, file not currently referenced
|
|
49
|
+
* as an agent avatar — return a uniform `404` to avoid acting as an existence oracle.
|
|
50
|
+
* @param file - File ID of the agent's profile picture (`fil_...`). Must be currently set as an agent's profile picture within the same app.
|
|
51
|
+
* @param params - Query parameters.
|
|
52
|
+
* @param params.token - HMAC capability token authorizing access to this specific file. Obtained from the avatar URL minted when the profile picture was set.
|
|
53
|
+
* @returns Raw image bytes of the agent avatar, served with the file's original content type.
|
|
54
|
+
*/
|
|
55
|
+
avatar(file: string, params?: {
|
|
56
|
+
token?: string;
|
|
57
|
+
}): Promise<{
|
|
58
|
+
content: ArrayBuffer;
|
|
59
|
+
mimeType: string;
|
|
60
|
+
}>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/files.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBAAa,YAAY;IACX,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,MAAM,CAAC,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAI/M;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAM7G"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
|
+
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
+
// Content hash: babf9d3fbf27
|
|
4
|
+
export class FileResource {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Upload a file
|
|
11
|
+
* Creates a new file from base64-encoded content and returns the resulting file object,
|
|
12
|
+
* including a signed download URL. Use this endpoint to store images, documents, or
|
|
13
|
+
* other binary assets that can then be referenced by agents, teams, or users.
|
|
14
|
+
* App scope is derived from the authenticated viewer's bearer token or publishable key.
|
|
15
|
+
* You may optionally associate the file with an organization, team, user, or agent by
|
|
16
|
+
* passing the corresponding ID. If no owner is specified and the viewer is a user, the
|
|
17
|
+
* file is automatically attributed to that user.
|
|
18
|
+
* Returns `422` when the `data` field is not valid base64 or the changeset is invalid.
|
|
19
|
+
* Returns `403` when the request lacks the required app scope.
|
|
20
|
+
* @param input - Request body.
|
|
21
|
+
* @param input.agent - Agent ID (`agi_...`) to associate with this file. When provided, the file's organization is derived from the agent.
|
|
22
|
+
* @param input.content_type - MIME type of the file, e.g. `"image/png"` or `"application/pdf"`.
|
|
23
|
+
* @param input.data - Base64-encoded binary content of the file to upload.
|
|
24
|
+
* @param input.filename - Original filename including extension, e.g. `"avatar.png"`.
|
|
25
|
+
* @param input.org - Organization ID (`org_...`) to associate with this file. Optional; defaults to the viewer's organization when omitted.
|
|
26
|
+
* @param input.team - Team ID (`tem_...`) that owns this file. Takes precedence over `user` when both are provided.
|
|
27
|
+
* @param input.user - User ID (`usr_...`) that owns this file. Defaults to the authenticated user when neither `user` nor `team` is specified.
|
|
28
|
+
* @returns The newly created file, including a signed download URL.
|
|
29
|
+
*/
|
|
30
|
+
async create(input) {
|
|
31
|
+
return this.http.request(`/api/v1/files`, { method: "POST", body: input });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Fetch an agent avatar image
|
|
35
|
+
* Returns the raw image bytes for an agent's profile picture identified by `file`.
|
|
36
|
+
* This endpoint is designed for integration partners (such as Slack) that fetch
|
|
37
|
+
* avatar URLs via plain GET requests without bearer token support. Authorization
|
|
38
|
+
* is performed via a short, stable capability `token` rather than an HTTP header.
|
|
39
|
+
* The `token` is an HMAC-based capability tied to the file ID. It does not expire,
|
|
40
|
+
* but it is invalidated when the agent's profile picture is replaced or the agent is
|
|
41
|
+
* deleted — shared caches may continue serving the old image until the
|
|
42
|
+
* `Cache-Control` max-age of one hour elapses. The endpoint never redirects to
|
|
43
|
+
* a signed storage URL; bytes are served inline so behavior is consistent across
|
|
44
|
+
* storage backends.
|
|
45
|
+
* All failure modes — invalid file ID, invalid token, file not currently referenced
|
|
46
|
+
* as an agent avatar — return a uniform `404` to avoid acting as an existence oracle.
|
|
47
|
+
* @param file - File ID of the agent's profile picture (`fil_...`). Must be currently set as an agent's profile picture within the same app.
|
|
48
|
+
* @param params - Query parameters.
|
|
49
|
+
* @param params.token - HMAC capability token authorizing access to this specific file. Obtained from the avatar URL minted when the profile picture was set.
|
|
50
|
+
* @returns Raw image bytes of the agent avatar, served with the file's original content type.
|
|
51
|
+
*/
|
|
52
|
+
async avatar(file, params) {
|
|
53
|
+
const query = {};
|
|
54
|
+
query["token"] = params?.token;
|
|
55
|
+
return this.http.requestRaw(`/api/v1/files/${file}/avatar`, { query });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/v1/resources/files.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,YAAY;IACH;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,MAAM,CAAC,KAA2K;QACtL,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,MAA2B;QACpD,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QAE/B,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAiB,IAAI,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { ActivityFeedResource } from "./activity_feed.js";
|
|
2
2
|
export { AgentComputerResource } from "./agent_computers.js";
|
|
3
|
+
export { AgentEnvVarResource } from "./agent_env_vars.js";
|
|
4
|
+
export { AgentHealthActionResource } from "./agent_health_actions.js";
|
|
3
5
|
export { AgentInstallationResource } from "./agent_installations.js";
|
|
6
|
+
export { AgentRoutineRunResource } from "./agent_routine_runs.js";
|
|
4
7
|
export { AgentRoutineResource } from "./agent_routines.js";
|
|
5
8
|
export { AgentSessionResource } from "./agent_sessions.js";
|
|
6
9
|
export { AgentSkillResource } from "./agent_skills.js";
|
|
@@ -9,12 +12,22 @@ export { AgentResource } from "./agents.js";
|
|
|
9
12
|
export { ArtifactResource } from "./artifacts.js";
|
|
10
13
|
export { AutomationRunResource } from "./automation_runs.js";
|
|
11
14
|
export { AutomationResource } from "./automations.js";
|
|
15
|
+
export { BugReportResource } from "./bug_reports.js";
|
|
12
16
|
export { ConfigResource } from "./config.js";
|
|
13
17
|
export { CustomObjectResource } from "./custom_objects.js";
|
|
18
|
+
export { FileResource } from "./files.js";
|
|
14
19
|
export { InstallationSourceResource } from "./installation_sources.js";
|
|
15
20
|
export { InviteResource } from "./invites.js";
|
|
21
|
+
export { KnowledgeDocumentResource } from "./knowledge_documents.js";
|
|
22
|
+
export { KnowledgeSourceResource } from "./knowledge_sources.js";
|
|
16
23
|
export { KvResource } from "./kv.js";
|
|
24
|
+
export { NotificationPreferenceResource } from "./notification_preferences.js";
|
|
25
|
+
export { NotificationResource } from "./notifications.js";
|
|
17
26
|
export { OrgResource } from "./orgs.js";
|
|
27
|
+
export { SlackChannelBindingResource } from "./slack_channel_bindings.js";
|
|
28
|
+
export { SolutionCategoryResource } from "./solution_categories.js";
|
|
29
|
+
export { SolutionTagResource } from "./solution_tags.js";
|
|
30
|
+
export { SolutionResource } from "./solutions.js";
|
|
18
31
|
export { TeamMembershipResource } from "./team_memberships.js";
|
|
19
32
|
export { TeamResource } from "./teams.js";
|
|
20
33
|
export { ThreadMessageResource } from "./thread_messages.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,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AM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: bd79d0d0f4ed
|
|
4
4
|
export { ActivityFeedResource } from "./activity_feed.js";
|
|
5
5
|
export { AgentComputerResource } from "./agent_computers.js";
|
|
6
|
+
export { AgentEnvVarResource } from "./agent_env_vars.js";
|
|
7
|
+
export { AgentHealthActionResource } from "./agent_health_actions.js";
|
|
6
8
|
export { AgentInstallationResource } from "./agent_installations.js";
|
|
9
|
+
export { AgentRoutineRunResource } from "./agent_routine_runs.js";
|
|
7
10
|
export { AgentRoutineResource } from "./agent_routines.js";
|
|
8
11
|
export { AgentSessionResource } from "./agent_sessions.js";
|
|
9
12
|
export { AgentSkillResource } from "./agent_skills.js";
|
|
@@ -12,12 +15,22 @@ export { AgentResource } from "./agents.js";
|
|
|
12
15
|
export { ArtifactResource } from "./artifacts.js";
|
|
13
16
|
export { AutomationRunResource } from "./automation_runs.js";
|
|
14
17
|
export { AutomationResource } from "./automations.js";
|
|
18
|
+
export { BugReportResource } from "./bug_reports.js";
|
|
15
19
|
export { ConfigResource } from "./config.js";
|
|
16
20
|
export { CustomObjectResource } from "./custom_objects.js";
|
|
21
|
+
export { FileResource } from "./files.js";
|
|
17
22
|
export { InstallationSourceResource } from "./installation_sources.js";
|
|
18
23
|
export { InviteResource } from "./invites.js";
|
|
24
|
+
export { KnowledgeDocumentResource } from "./knowledge_documents.js";
|
|
25
|
+
export { KnowledgeSourceResource } from "./knowledge_sources.js";
|
|
19
26
|
export { KvResource } from "./kv.js";
|
|
27
|
+
export { NotificationPreferenceResource } from "./notification_preferences.js";
|
|
28
|
+
export { NotificationResource } from "./notifications.js";
|
|
20
29
|
export { OrgResource } from "./orgs.js";
|
|
30
|
+
export { SlackChannelBindingResource } from "./slack_channel_bindings.js";
|
|
31
|
+
export { SolutionCategoryResource } from "./solution_categories.js";
|
|
32
|
+
export { SolutionTagResource } from "./solution_tags.js";
|
|
33
|
+
export { SolutionResource } from "./solutions.js";
|
|
21
34
|
export { TeamMembershipResource } from "./team_memberships.js";
|
|
22
35
|
export { TeamResource } from "./teams.js";
|
|
23
36
|
export { ThreadMessageResource } from "./thread_messages.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/resources/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,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allationSourceResource {
|
|
3
3
|
private http;
|
|
4
4
|
constructor(http: HttpClient);
|
|
5
|
+
/**
|
|
6
|
+
* Remove a source from an installation
|
|
7
|
+
* Detaches and permanently deletes a source from an installation. This action
|
|
8
|
+
* cannot be undone; the source and its associated content will no longer be
|
|
9
|
+
* available to the installation's agent.
|
|
10
|
+
* This endpoint requires an app-scoped token. You may identify the target
|
|
11
|
+
* indirectly by providing only the `source` ID — the installation is resolved
|
|
12
|
+
* automatically from the source record. Providing `installation` explicitly
|
|
13
|
+
* is also accepted and may be more efficient.
|
|
14
|
+
* @param source - Source ID (`cso_...`) of the source to remove.
|
|
15
|
+
* @returns No content
|
|
16
|
+
*/
|
|
5
17
|
delete(source: string): Promise<void>;
|
|
6
18
|
}
|
|
7
19
|
//# sourceMappingURL=installation_sources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation_sources.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/installation_sources.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,qBAAa,0BAA0B;IACzB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"installation_sources.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/installation_sources.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,qBAAa,0BAA0B;IACzB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5C"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 8a40750614e9
|
|
4
4
|
export class InstallationSourceResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
7
7
|
this.http = http;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Remove a source from an installation
|
|
11
|
+
* Detaches and permanently deletes a source from an installation. This action
|
|
12
|
+
* cannot be undone; the source and its associated content will no longer be
|
|
13
|
+
* available to the installation's agent.
|
|
14
|
+
* This endpoint requires an app-scoped token. You may identify the target
|
|
15
|
+
* indirectly by providing only the `source` ID — the installation is resolved
|
|
16
|
+
* automatically from the source record. Providing `installation` explicitly
|
|
17
|
+
* is also accepted and may be more efficient.
|
|
18
|
+
* @param source - Source ID (`cso_...`) of the source to remove.
|
|
19
|
+
* @returns No content
|
|
20
|
+
*/
|
|
9
21
|
async delete(source) {
|
|
10
22
|
await this.http.request(`/api/v1/installation_sources/${source}`, { method: "DELETE" });
|
|
11
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation_sources.js","sourceRoot":"","sources":["../../../src/v1/resources/installation_sources.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAI7B,MAAM,OAAO,0BAA0B;IACjB;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"installation_sources.js","sourceRoot":"","sources":["../../../src/v1/resources/installation_sources.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAI7B,MAAM,OAAO,0BAA0B;IACjB;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF"}
|
|
@@ -3,6 +3,21 @@ import type { UserInvite } from "../../types/users.js";
|
|
|
3
3
|
export declare class InviteResource {
|
|
4
4
|
private http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Accept an invite
|
|
8
|
+
* Accepts an invite on behalf of the authenticated user and adds them to the
|
|
9
|
+
* associated team or thread. The invite `key` is passed in the request body
|
|
10
|
+
* rather than the URL so it never appears in access logs, `Referer` headers,
|
|
11
|
+
* or error-reporter URL captures.
|
|
12
|
+
* This endpoint requires an authenticated end-user session. S2S secret-key
|
|
13
|
+
* tokens and unauthenticated requests are rejected with `401`. If the
|
|
14
|
+
* authenticated user is already a member of the invite's target, the request
|
|
15
|
+
* returns `409`. Both per-IP and per-user rate limits apply; exceeding either
|
|
16
|
+
* returns `429`.
|
|
17
|
+
* @param input - Request body.
|
|
18
|
+
* @param input.key - Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
|
|
19
|
+
* @returns The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
|
|
20
|
+
*/
|
|
6
21
|
accept(input: {
|
|
7
22
|
key: string;
|
|
8
23
|
}): Promise<UserInvite>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invites.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/invites.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAc;IACb,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"invites.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/invites.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAc;IACb,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;CAG1D"}
|