@archastro/sdk 0.7.0 → 0.8.0
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/dist/auth.d.ts +5 -3
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +7 -5
- package/dist/auth.js.map +1 -1
- package/dist/channels/api_activity_feed_channel.js +2 -2
- package/dist/channels/api_activity_feed_channel.js.map +1 -1
- package/dist/channels/api_chat_channel.js +2 -2
- package/dist/channels/api_chat_channel.js.map +1 -1
- package/dist/channels/api_object_channel.d.ts +13 -2
- package/dist/channels/api_object_channel.d.ts.map +1 -1
- package/dist/channels/api_object_channel.js +21 -6
- package/dist/channels/api_object_channel.js.map +1 -1
- package/dist/channels/api_tasks_channel.d.ts +30 -0
- package/dist/channels/api_tasks_channel.d.ts.map +1 -0
- package/dist/channels/api_tasks_channel.js +45 -0
- package/dist/channels/api_tasks_channel.js.map +1 -0
- package/dist/client.d.ts +10 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +12 -2
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/types/ai.d.ts +66 -52
- package/dist/types/ai.d.ts.map +1 -1
- package/dist/types/ai.js +7 -2
- package/dist/types/ai.js.map +1 -1
- package/dist/types/artifacts.d.ts +8 -8
- package/dist/types/artifacts.js +2 -2
- package/dist/types/artifacts.js.map +1 -1
- package/dist/types/automations.d.ts +68 -10
- package/dist/types/automations.d.ts.map +1 -1
- package/dist/types/automations.js +22 -2
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +18446 -3559
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/chat.js +2 -2
- package/dist/types/chat.js.map +1 -1
- package/dist/types/common.d.ts +12646 -2316
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +372 -80
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +22 -10
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +4 -2
- package/dist/types/config.js.map +1 -1
- package/dist/types/device.d.ts +60 -0
- package/dist/types/device.d.ts.map +1 -0
- package/dist/types/device.js +25 -0
- package/dist/types/device.js.map +1 -0
- package/dist/types/extractions.d.ts +452 -0
- package/dist/types/extractions.d.ts.map +1 -0
- package/dist/types/extractions.js +52 -0
- package/dist/types/extractions.js.map +1 -0
- package/dist/types/image.js +2 -2
- package/dist/types/image.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +5 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/invites.js +2 -2
- package/dist/types/invites.js.map +1 -1
- package/dist/types/notifications.d.ts +2 -2
- package/dist/types/notifications.js +2 -2
- package/dist/types/notifications.js.map +1 -1
- package/dist/types/oauth.d.ts +117 -0
- package/dist/types/oauth.d.ts.map +1 -0
- package/dist/types/oauth.js +21 -0
- package/dist/types/oauth.js.map +1 -0
- package/dist/types/teams.d.ts +2402 -242
- package/dist/types/teams.d.ts.map +1 -1
- package/dist/types/teams.js +2 -2
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +1419 -328
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +18 -17
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +2 -2
- package/dist/types/users.js +2 -2
- package/dist/types/users.js.map +1 -1
- package/dist/v1/resources/activity_feed.d.ts +84 -0
- package/dist/v1/resources/activity_feed.d.ts.map +1 -1
- package/dist/v1/resources/activity_feed.js +2 -2
- package/dist/v1/resources/activity_feed.js.map +1 -1
- package/dist/v1/resources/agent_computers.js +2 -2
- package/dist/v1/resources/agent_computers.js.map +1 -1
- package/dist/v1/resources/agent_env_vars.js +2 -2
- package/dist/v1/resources/agent_env_vars.js.map +1 -1
- package/dist/v1/resources/agent_health_actions.js +2 -2
- package/dist/v1/resources/agent_health_actions.js.map +1 -1
- package/dist/v1/resources/agent_installations.d.ts +2 -2
- package/dist/v1/resources/agent_installations.d.ts.map +1 -1
- package/dist/v1/resources/agent_installations.js +3 -3
- package/dist/v1/resources/agent_installations.js.map +1 -1
- package/dist/v1/resources/agent_routine_runs.d.ts +16 -1
- package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -1
- package/dist/v1/resources/agent_routine_runs.js +16 -2
- package/dist/v1/resources/agent_routine_runs.js.map +1 -1
- package/dist/v1/resources/agent_routines.d.ts +47 -3
- package/dist/v1/resources/agent_routines.d.ts.map +1 -1
- package/dist/v1/resources/agent_routines.js +42 -3
- package/dist/v1/resources/agent_routines.js.map +1 -1
- package/dist/v1/resources/agent_sessions.d.ts +14 -2
- package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
- package/dist/v1/resources/agent_sessions.js +14 -3
- package/dist/v1/resources/agent_sessions.js.map +1 -1
- package/dist/v1/resources/agent_skills.js +2 -2
- package/dist/v1/resources/agent_skills.js.map +1 -1
- package/dist/v1/resources/agent_tools.d.ts +2 -2
- package/dist/v1/resources/agent_tools.d.ts.map +1 -1
- package/dist/v1/resources/agent_tools.js +3 -3
- package/dist/v1/resources/agent_tools.js.map +1 -1
- package/dist/v1/resources/agents.d.ts +152 -35
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +148 -42
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/ai.d.ts +81 -40
- package/dist/v1/resources/ai.d.ts.map +1 -1
- package/dist/v1/resources/ai.js +52 -17
- package/dist/v1/resources/ai.js.map +1 -1
- package/dist/v1/resources/artifacts.js +2 -2
- package/dist/v1/resources/artifacts.js.map +1 -1
- package/dist/v1/resources/automation_runs.d.ts +41 -6
- package/dist/v1/resources/automation_runs.d.ts.map +1 -1
- package/dist/v1/resources/automation_runs.js +47 -8
- package/dist/v1/resources/automation_runs.js.map +1 -1
- package/dist/v1/resources/automations.d.ts +14 -1
- package/dist/v1/resources/automations.d.ts.map +1 -1
- package/dist/v1/resources/automations.js +15 -3
- package/dist/v1/resources/automations.js.map +1 -1
- package/dist/v1/resources/bug_reports.js +2 -2
- package/dist/v1/resources/bug_reports.js.map +1 -1
- package/dist/v1/resources/config.d.ts +3 -0
- package/dist/v1/resources/config.d.ts.map +1 -1
- package/dist/v1/resources/config.js +2 -2
- package/dist/v1/resources/config.js.map +1 -1
- package/dist/v1/resources/custom_objects.js +2 -2
- package/dist/v1/resources/custom_objects.js.map +1 -1
- package/dist/v1/resources/extractions.d.ts +50 -0
- package/dist/v1/resources/extractions.d.ts.map +1 -0
- package/dist/v1/resources/extractions.js +48 -0
- package/dist/v1/resources/extractions.js.map +1 -0
- package/dist/v1/resources/files.d.ts +88 -1
- package/dist/v1/resources/files.d.ts.map +1 -1
- package/dist/v1/resources/files.js +86 -3
- package/dist/v1/resources/files.js.map +1 -1
- package/dist/v1/resources/index.d.ts +5 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +7 -2
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/installation_sources.js +2 -2
- package/dist/v1/resources/installation_sources.js.map +1 -1
- package/dist/v1/resources/invites.js +2 -2
- package/dist/v1/resources/invites.js.map +1 -1
- package/dist/v1/resources/knowledge_documents.d.ts +33 -1
- package/dist/v1/resources/knowledge_documents.d.ts.map +1 -1
- package/dist/v1/resources/knowledge_documents.js +25 -2
- package/dist/v1/resources/knowledge_documents.js.map +1 -1
- package/dist/v1/resources/knowledge_ingestions.d.ts +16 -0
- package/dist/v1/resources/knowledge_ingestions.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_ingestions.js +21 -0
- package/dist/v1/resources/knowledge_ingestions.js.map +1 -0
- package/dist/v1/resources/knowledge_sources.d.ts +2 -0
- package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
- package/dist/v1/resources/knowledge_sources.js +3 -2
- package/dist/v1/resources/knowledge_sources.js.map +1 -1
- package/dist/v1/resources/kv.js +2 -2
- package/dist/v1/resources/kv.js.map +1 -1
- package/dist/v1/resources/notification_preferences.js +2 -2
- package/dist/v1/resources/notification_preferences.js.map +1 -1
- package/dist/v1/resources/notifications.js +2 -2
- package/dist/v1/resources/notifications.js.map +1 -1
- package/dist/v1/resources/oauth.d.ts +115 -0
- package/dist/v1/resources/oauth.d.ts.map +1 -0
- package/dist/v1/resources/oauth.js +112 -0
- package/dist/v1/resources/oauth.js.map +1 -0
- package/dist/v1/resources/orgs.js +2 -2
- package/dist/v1/resources/orgs.js.map +1 -1
- package/dist/v1/resources/slack_channel_bindings.d.ts +25 -0
- package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -1
- package/dist/v1/resources/slack_channel_bindings.js +24 -2
- package/dist/v1/resources/slack_channel_bindings.js.map +1 -1
- package/dist/v1/resources/solution_categories.js +2 -2
- package/dist/v1/resources/solution_categories.js.map +1 -1
- package/dist/v1/resources/solution_instances.d.ts +26 -0
- package/dist/v1/resources/solution_instances.d.ts.map +1 -0
- package/dist/v1/resources/solution_instances.js +35 -0
- package/dist/v1/resources/solution_instances.js.map +1 -0
- package/dist/v1/resources/solution_tags.js +2 -2
- package/dist/v1/resources/solution_tags.js.map +1 -1
- package/dist/v1/resources/solutions.d.ts +85 -1
- package/dist/v1/resources/solutions.d.ts.map +1 -1
- package/dist/v1/resources/solutions.js +67 -3
- package/dist/v1/resources/solutions.js.map +1 -1
- package/dist/v1/resources/team_memberships.js +2 -2
- package/dist/v1/resources/team_memberships.js.map +1 -1
- package/dist/v1/resources/teams.d.ts +210 -4
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +16 -6
- package/dist/v1/resources/teams.js.map +1 -1
- package/dist/v1/resources/thread_messages.d.ts +24 -4
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +9 -6
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +158 -42
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +121 -32
- package/dist/v1/resources/threads.js.map +1 -1
- package/dist/v1/resources/users.d.ts +132 -1
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +4 -2
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1/resources/work_items.d.ts +78 -0
- package/dist/v1/resources/work_items.d.ts.map +1 -0
- package/dist/v1/resources/work_items.js +86 -0
- package/dist/v1/resources/work_items.js.map +1 -0
- package/dist/v1.d.ts +10 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +17 -2
- package/dist/v1.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
|
+
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
+
// Content hash: 4005d465a007
|
|
4
|
+
export class ExtractionResource {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Start an extraction
|
|
11
|
+
* Records a text-extraction job for a document (`file`) or a URL (`url` + `mode`).
|
|
12
|
+
* The job is owner-scoped and tagged with the caller-supplied `destination`
|
|
13
|
+
* namespace, **without** committing knowledge to an agent (no embeddings, no
|
|
14
|
+
* agent attach).
|
|
15
|
+
* Exactly one of `file` or (`url` + `mode`) is required.
|
|
16
|
+
* Document extraction (`file`) runs synchronously: the response already
|
|
17
|
+
* reflects the final state (`done` with its output, or an error if extraction
|
|
18
|
+
* couldn't complete), status `201`. URL extraction (`url` + `mode`) submits an
|
|
19
|
+
* async crawl and returns immediately with state `running`, status `202` —
|
|
20
|
+
* poll `GET /extractions/:extraction` for its terminal state.
|
|
21
|
+
* @param input - Request body.
|
|
22
|
+
* @param input.agent - Owning agent (`agt_...`) — scopes the extraction and its outputs.
|
|
23
|
+
* @param input.destination_kind - Where outputs are written.
|
|
24
|
+
* @param input.destination_path - Destination virtual_path prefix. Required for `destination_kind=config`, where it must name at least one path segment (`.` and `..` segments are dropped).
|
|
25
|
+
* @param input.file - Source file id (`fil_...`) for document extraction. Runs synchronously, so the source must be at most 10MB; larger files are rejected.
|
|
26
|
+
* @param input.max_pages - Crawl cap for `mode=site` — must be at least 1 (defaults to 100; `link` is always 1).
|
|
27
|
+
* @param input.mode - Required with `url`. Document extraction is selected by `file` instead and takes no `mode` (its `kind` is `document`).
|
|
28
|
+
* @param input.org - Owning organization (`org_...`). Defaults to the viewer's org.
|
|
29
|
+
* @param input.url - Source URL for link/site extraction.
|
|
30
|
+
* @returns The extraction job. Document extraction returns `201` with `state: "done"`; link/site extraction returns `202` with `state: "running"`.
|
|
31
|
+
*/
|
|
32
|
+
async create(input) {
|
|
33
|
+
return this.http.request(`/api/v1/extractions`, { method: "POST", body: input });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Retrieve an extraction
|
|
37
|
+
* Returns a single extraction job and its current state. Poll this endpoint after
|
|
38
|
+
* starting an async (link/site) extraction until `state` is `done` or `failed`.
|
|
39
|
+
* An extraction that exists but is not visible to the current viewer returns `404`
|
|
40
|
+
* rather than `403`, so the resource's existence is not revealed.
|
|
41
|
+
* @param extraction - Extraction ID (`ext_...`).
|
|
42
|
+
* @returns The extraction job.
|
|
43
|
+
*/
|
|
44
|
+
async get(extraction) {
|
|
45
|
+
return this.http.request(`/api/v1/extractions/${extraction}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=extractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractions.js","sourceRoot":"","sources":["../../../src/v1/resources/extractions.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,kBAAkB;IACT;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,MAAM,CAAC,KAAuQ;QAClR,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CAAC,UAAkB;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -12,7 +12,16 @@ export declare class FileResource {
|
|
|
12
12
|
* You may optionally associate the file with an organization, team, user, or agent by
|
|
13
13
|
* passing the corresponding ID. If no owner is specified and the viewer is a user, the
|
|
14
14
|
* file is automatically attributed to that user.
|
|
15
|
-
*
|
|
15
|
+
* Pass `share: true` to additionally mint a stable public URL for the file
|
|
16
|
+
* (returned as `share_url`), fetchable by anyone without authentication — for
|
|
17
|
+
* example to embed an uploaded image in a GitHub PR body or other external
|
|
18
|
+
* markdown. The URL does not expire. Sharing is revoked by setting
|
|
19
|
+
* `share: false` on `PATCH /api/v1/files/:file` with the same credential
|
|
20
|
+
* (or `archastro update file <id> --unshare`); re-enabling sharing
|
|
21
|
+
* reactivates previously issued URLs. Only image content types can be
|
|
22
|
+
* shared.
|
|
23
|
+
* Returns `422` when the `data` field is not valid base64, the changeset is
|
|
24
|
+
* invalid, or `share` is requested for a non-image content type.
|
|
16
25
|
* Returns `403` when the request lacks the required app scope.
|
|
17
26
|
* @param input - Request body.
|
|
18
27
|
* @param input.agent - Agent ID (`agi_...`) to associate with this file. When provided, the file's organization is derived from the agent.
|
|
@@ -20,6 +29,7 @@ export declare class FileResource {
|
|
|
20
29
|
* @param input.data - Base64-encoded binary content of the file to upload.
|
|
21
30
|
* @param input.filename - Original filename including extension, e.g. `"avatar.png"`.
|
|
22
31
|
* @param input.org - Organization ID (`org_...`) to associate with this file. Optional; defaults to the viewer's organization when omitted.
|
|
32
|
+
* @param input.share - When `true`, marks the file publicly shareable and returns a stable, non-expiring `share_url` fetchable without authentication. Only image content types can be shared.
|
|
23
33
|
* @param input.team - Team ID (`tem_...`) that owns this file. Takes precedence over `user` when both are provided.
|
|
24
34
|
* @param input.user - User ID (`usr_...`) that owns this file. Defaults to the authenticated user when neither `user` nor `team` is specified.
|
|
25
35
|
* @returns The newly created file, including a signed download URL.
|
|
@@ -30,9 +40,32 @@ export declare class FileResource {
|
|
|
30
40
|
data: string;
|
|
31
41
|
filename: string;
|
|
32
42
|
org?: string | undefined;
|
|
43
|
+
share?: boolean | undefined;
|
|
33
44
|
team?: string | undefined;
|
|
34
45
|
user?: string | undefined;
|
|
35
46
|
}): Promise<StorageFile>;
|
|
47
|
+
/**
|
|
48
|
+
* Update a file
|
|
49
|
+
* Updates mutable fields of an existing file. Only the fields you supply are
|
|
50
|
+
* changed; omitted fields retain their current values. The file's stored content
|
|
51
|
+
* and `content_type` cannot be changed after creation.
|
|
52
|
+
* This endpoint is the companion to `share: true` on file upload: the same
|
|
53
|
+
* credential that granted public sharing can revoke it here with `share: false`
|
|
54
|
+
* (or grant it later with `share: true`; only image content types can be
|
|
55
|
+
* shared, and re-enabling sharing reactivates any previously issued share
|
|
56
|
+
* URLs). App scope is derived from the authenticated viewer, matching upload.
|
|
57
|
+
* A file that exists but is not visible to the current viewer returns `404`
|
|
58
|
+
* rather than `403` to avoid revealing the file's existence.
|
|
59
|
+
* @param file - File ID (`fil_...`) of the file to update.
|
|
60
|
+
* @param input - Request body.
|
|
61
|
+
* @param input.filename - New name for the file, including extension, e.g. `"report_v2.pdf"`. Omit to leave the current filename unchanged.
|
|
62
|
+
* @param input.share - Set `true` to mark the file publicly shareable via its stable `share_url` (image content types only), or `false` to revoke public sharing. Re-enabling sharing reactivates any previously issued share URLs for the file. Omit to leave sharing unchanged.
|
|
63
|
+
* @returns The updated file, including a signed download URL.
|
|
64
|
+
*/
|
|
65
|
+
update(file: string, input: {
|
|
66
|
+
filename?: string | undefined;
|
|
67
|
+
share?: boolean | undefined;
|
|
68
|
+
}): Promise<StorageFile>;
|
|
36
69
|
/**
|
|
37
70
|
* Fetch an agent avatar image
|
|
38
71
|
* Returns the raw image bytes for an agent's profile picture identified by `file`.
|
|
@@ -58,5 +91,59 @@ export declare class FileResource {
|
|
|
58
91
|
content: ArrayBuffer;
|
|
59
92
|
mimeType: string;
|
|
60
93
|
}>;
|
|
94
|
+
/**
|
|
95
|
+
* Fetch an org logo image
|
|
96
|
+
* Returns the raw image bytes for an organization's logo identified by `file`.
|
|
97
|
+
* This endpoint backs the `org_logo.url` field of catalog payloads (such as
|
|
98
|
+
* `GET /api/v1/solutions`), which anonymous consumers — the public marketplace's
|
|
99
|
+
* page cache, OpenGraph scrapers — may hold far longer than a signed storage URL
|
|
100
|
+
* lives. Authorization is performed via a short, stable capability `token` rather
|
|
101
|
+
* than an HTTP header, so the URL never expires.
|
|
102
|
+
* The `token` is an HMAC-based capability tied to the file ID. It does not expire,
|
|
103
|
+
* but it is invalidated when the org's logo is replaced or removed — shared caches
|
|
104
|
+
* may continue serving the old image until the `Cache-Control` max-age of one hour
|
|
105
|
+
* elapses. The endpoint never redirects to a signed storage URL; bytes are served
|
|
106
|
+
* inline so behavior is consistent across storage backends.
|
|
107
|
+
* All failure modes — invalid file ID, invalid token, file not currently referenced
|
|
108
|
+
* as an org logo — return a uniform `404` to avoid acting as an existence oracle.
|
|
109
|
+
* @param file - File ID of the org's logo (`fil_...`). Must be currently set as an organization's logo within the same app.
|
|
110
|
+
* @param params - Query parameters.
|
|
111
|
+
* @param params.token - HMAC capability token authorizing access to this specific file. Obtained from the `org_logo.url` minted when the logo was serialized.
|
|
112
|
+
* @returns Raw image bytes of the org logo, served with the file's original content type.
|
|
113
|
+
*/
|
|
114
|
+
orgLogo(file: string, params?: {
|
|
115
|
+
token?: string;
|
|
116
|
+
}): Promise<{
|
|
117
|
+
content: ArrayBuffer;
|
|
118
|
+
mimeType: string;
|
|
119
|
+
}>;
|
|
120
|
+
/**
|
|
121
|
+
* Fetch a publicly shared file
|
|
122
|
+
* Returns the raw image bytes for a file that was explicitly shared for public
|
|
123
|
+
* access, identified by `file`. This endpoint is designed for consumers that hold
|
|
124
|
+
* a URL far longer than a signed storage URL lives — GitHub PR bodies (whose camo
|
|
125
|
+
* image proxy re-fetches from the origin URL), wikis, and issue trackers — and
|
|
126
|
+
* fetch it via plain GET requests without bearer token support. Authorization is
|
|
127
|
+
* performed via a short, stable capability `token` rather than an HTTP header.
|
|
128
|
+
* The `token` is an HMAC-based capability tied to the file ID. It does not expire,
|
|
129
|
+
* but it is invalidated when sharing is turned off for the file (`share: false` on
|
|
130
|
+
* the file update endpoint) or the file is deleted — shared caches may continue
|
|
131
|
+
* serving the bytes until the `Cache-Control` max-age of one hour elapses. The
|
|
132
|
+
* endpoint never redirects to a signed storage URL; bytes are served inline so
|
|
133
|
+
* behavior is consistent across storage backends. Only image content types are
|
|
134
|
+
* served.
|
|
135
|
+
* All failure modes — invalid file ID, invalid token, file not currently shared —
|
|
136
|
+
* return a uniform `404` to avoid acting as an existence oracle.
|
|
137
|
+
* @param file - File ID of the shared file (`fil_...`). The file must currently be marked as publicly shared.
|
|
138
|
+
* @param params - Query parameters.
|
|
139
|
+
* @param params.token - HMAC capability token authorizing access to this specific file. Obtained from the `share_url` returned when the file was uploaded with `share: true`.
|
|
140
|
+
* @returns Raw image bytes of the shared file, served with the file's original content type.
|
|
141
|
+
*/
|
|
142
|
+
share(file: string, params?: {
|
|
143
|
+
token?: string;
|
|
144
|
+
}): Promise<{
|
|
145
|
+
content: ArrayBuffer;
|
|
146
|
+
mimeType: string;
|
|
147
|
+
}>;
|
|
61
148
|
}
|
|
62
149
|
//# sourceMappingURL=files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/files.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAA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CAAC;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAO5G;;;;;;;;;;;;;;;;;;;OAmBG;IACG,OAAO,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;IAO7G;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,KAAK,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;CAM5G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Copyright (c) 2026 ArchAstro Inc.
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 527e024036d6
|
|
4
4
|
export class FileResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
@@ -15,7 +15,16 @@ export class FileResource {
|
|
|
15
15
|
* You may optionally associate the file with an organization, team, user, or agent by
|
|
16
16
|
* passing the corresponding ID. If no owner is specified and the viewer is a user, the
|
|
17
17
|
* file is automatically attributed to that user.
|
|
18
|
-
*
|
|
18
|
+
* Pass `share: true` to additionally mint a stable public URL for the file
|
|
19
|
+
* (returned as `share_url`), fetchable by anyone without authentication — for
|
|
20
|
+
* example to embed an uploaded image in a GitHub PR body or other external
|
|
21
|
+
* markdown. The URL does not expire. Sharing is revoked by setting
|
|
22
|
+
* `share: false` on `PATCH /api/v1/files/:file` with the same credential
|
|
23
|
+
* (or `archastro update file <id> --unshare`); re-enabling sharing
|
|
24
|
+
* reactivates previously issued URLs. Only image content types can be
|
|
25
|
+
* shared.
|
|
26
|
+
* Returns `422` when the `data` field is not valid base64, the changeset is
|
|
27
|
+
* invalid, or `share` is requested for a non-image content type.
|
|
19
28
|
* Returns `403` when the request lacks the required app scope.
|
|
20
29
|
* @param input - Request body.
|
|
21
30
|
* @param input.agent - Agent ID (`agi_...`) to associate with this file. When provided, the file's organization is derived from the agent.
|
|
@@ -23,6 +32,7 @@ export class FileResource {
|
|
|
23
32
|
* @param input.data - Base64-encoded binary content of the file to upload.
|
|
24
33
|
* @param input.filename - Original filename including extension, e.g. `"avatar.png"`.
|
|
25
34
|
* @param input.org - Organization ID (`org_...`) to associate with this file. Optional; defaults to the viewer's organization when omitted.
|
|
35
|
+
* @param input.share - When `true`, marks the file publicly shareable and returns a stable, non-expiring `share_url` fetchable without authentication. Only image content types can be shared.
|
|
26
36
|
* @param input.team - Team ID (`tem_...`) that owns this file. Takes precedence over `user` when both are provided.
|
|
27
37
|
* @param input.user - User ID (`usr_...`) that owns this file. Defaults to the authenticated user when neither `user` nor `team` is specified.
|
|
28
38
|
* @returns The newly created file, including a signed download URL.
|
|
@@ -30,6 +40,27 @@ export class FileResource {
|
|
|
30
40
|
async create(input) {
|
|
31
41
|
return this.http.request(`/api/v1/files`, { method: "POST", body: input });
|
|
32
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Update a file
|
|
45
|
+
* Updates mutable fields of an existing file. Only the fields you supply are
|
|
46
|
+
* changed; omitted fields retain their current values. The file's stored content
|
|
47
|
+
* and `content_type` cannot be changed after creation.
|
|
48
|
+
* This endpoint is the companion to `share: true` on file upload: the same
|
|
49
|
+
* credential that granted public sharing can revoke it here with `share: false`
|
|
50
|
+
* (or grant it later with `share: true`; only image content types can be
|
|
51
|
+
* shared, and re-enabling sharing reactivates any previously issued share
|
|
52
|
+
* URLs). App scope is derived from the authenticated viewer, matching upload.
|
|
53
|
+
* A file that exists but is not visible to the current viewer returns `404`
|
|
54
|
+
* rather than `403` to avoid revealing the file's existence.
|
|
55
|
+
* @param file - File ID (`fil_...`) of the file to update.
|
|
56
|
+
* @param input - Request body.
|
|
57
|
+
* @param input.filename - New name for the file, including extension, e.g. `"report_v2.pdf"`. Omit to leave the current filename unchanged.
|
|
58
|
+
* @param input.share - Set `true` to mark the file publicly shareable via its stable `share_url` (image content types only), or `false` to revoke public sharing. Re-enabling sharing reactivates any previously issued share URLs for the file. Omit to leave sharing unchanged.
|
|
59
|
+
* @returns The updated file, including a signed download URL.
|
|
60
|
+
*/
|
|
61
|
+
async update(file, input) {
|
|
62
|
+
return this.http.request(`/api/v1/files/${file}`, { method: "PATCH", body: input });
|
|
63
|
+
}
|
|
33
64
|
/**
|
|
34
65
|
* Fetch an agent avatar image
|
|
35
66
|
* Returns the raw image bytes for an agent's profile picture identified by `file`.
|
|
@@ -54,5 +85,57 @@ export class FileResource {
|
|
|
54
85
|
query["token"] = params?.token;
|
|
55
86
|
return this.http.requestRaw(`/api/v1/files/${file}/avatar`, { query });
|
|
56
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Fetch an org logo image
|
|
90
|
+
* Returns the raw image bytes for an organization's logo identified by `file`.
|
|
91
|
+
* This endpoint backs the `org_logo.url` field of catalog payloads (such as
|
|
92
|
+
* `GET /api/v1/solutions`), which anonymous consumers — the public marketplace's
|
|
93
|
+
* page cache, OpenGraph scrapers — may hold far longer than a signed storage URL
|
|
94
|
+
* lives. Authorization is performed via a short, stable capability `token` rather
|
|
95
|
+
* than an HTTP header, so the URL never expires.
|
|
96
|
+
* The `token` is an HMAC-based capability tied to the file ID. It does not expire,
|
|
97
|
+
* but it is invalidated when the org's logo is replaced or removed — shared caches
|
|
98
|
+
* may continue serving the old image until the `Cache-Control` max-age of one hour
|
|
99
|
+
* elapses. The endpoint never redirects to a signed storage URL; bytes are served
|
|
100
|
+
* inline so behavior is consistent across storage backends.
|
|
101
|
+
* All failure modes — invalid file ID, invalid token, file not currently referenced
|
|
102
|
+
* as an org logo — return a uniform `404` to avoid acting as an existence oracle.
|
|
103
|
+
* @param file - File ID of the org's logo (`fil_...`). Must be currently set as an organization's logo within the same app.
|
|
104
|
+
* @param params - Query parameters.
|
|
105
|
+
* @param params.token - HMAC capability token authorizing access to this specific file. Obtained from the `org_logo.url` minted when the logo was serialized.
|
|
106
|
+
* @returns Raw image bytes of the org logo, served with the file's original content type.
|
|
107
|
+
*/
|
|
108
|
+
async orgLogo(file, params) {
|
|
109
|
+
const query = {};
|
|
110
|
+
query["token"] = params?.token;
|
|
111
|
+
return this.http.requestRaw(`/api/v1/files/${file}/org_logo`, { query });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Fetch a publicly shared file
|
|
115
|
+
* Returns the raw image bytes for a file that was explicitly shared for public
|
|
116
|
+
* access, identified by `file`. This endpoint is designed for consumers that hold
|
|
117
|
+
* a URL far longer than a signed storage URL lives — GitHub PR bodies (whose camo
|
|
118
|
+
* image proxy re-fetches from the origin URL), wikis, and issue trackers — and
|
|
119
|
+
* fetch it via plain GET requests without bearer token support. Authorization is
|
|
120
|
+
* performed via a short, stable capability `token` rather than an HTTP header.
|
|
121
|
+
* The `token` is an HMAC-based capability tied to the file ID. It does not expire,
|
|
122
|
+
* but it is invalidated when sharing is turned off for the file (`share: false` on
|
|
123
|
+
* the file update endpoint) or the file is deleted — shared caches may continue
|
|
124
|
+
* serving the bytes until the `Cache-Control` max-age of one hour elapses. The
|
|
125
|
+
* endpoint never redirects to a signed storage URL; bytes are served inline so
|
|
126
|
+
* behavior is consistent across storage backends. Only image content types are
|
|
127
|
+
* served.
|
|
128
|
+
* All failure modes — invalid file ID, invalid token, file not currently shared —
|
|
129
|
+
* return a uniform `404` to avoid acting as an existence oracle.
|
|
130
|
+
* @param file - File ID of the shared file (`fil_...`). The file must currently be marked as publicly shared.
|
|
131
|
+
* @param params - Query parameters.
|
|
132
|
+
* @param params.token - HMAC capability token authorizing access to this specific file. Obtained from the `share_url` returned when the file was uploaded with `share: true`.
|
|
133
|
+
* @returns Raw image bytes of the shared file, served with the file's original content type.
|
|
134
|
+
*/
|
|
135
|
+
async share(file, params) {
|
|
136
|
+
const query = {};
|
|
137
|
+
query["token"] = params?.token;
|
|
138
|
+
return this.http.requestRaw(`/api/v1/files/${file}/share`, { query });
|
|
139
|
+
}
|
|
57
140
|
}
|
|
58
141
|
//# sourceMappingURL=files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/v1/resources/files.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/v1/resources/files.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,YAAY;IACH;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,KAAK,CAAC,MAAM,CAAC,KAAwM;QACnN,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,KAAqE;QAC9F,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAiB,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,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;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,MAA2B;QACrD,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,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,MAA2B;QACnD,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,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -15,10 +15,12 @@ export { AutomationResource } from "./automations.js";
|
|
|
15
15
|
export { BugReportResource } from "./bug_reports.js";
|
|
16
16
|
export { ConfigResource } from "./config.js";
|
|
17
17
|
export { CustomObjectResource } from "./custom_objects.js";
|
|
18
|
+
export { ExtractionResource } from "./extractions.js";
|
|
18
19
|
export { FileResource } from "./files.js";
|
|
19
20
|
export { InstallationSourceResource } from "./installation_sources.js";
|
|
20
21
|
export { InviteResource } from "./invites.js";
|
|
21
22
|
export { KnowledgeDocumentResource } from "./knowledge_documents.js";
|
|
23
|
+
export { KnowledgeIngestionResource } from "./knowledge_ingestions.js";
|
|
22
24
|
export { KnowledgeSourceResource } from "./knowledge_sources.js";
|
|
23
25
|
export { KvResource } from "./kv.js";
|
|
24
26
|
export { NotificationPreferenceResource } from "./notification_preferences.js";
|
|
@@ -26,6 +28,7 @@ export { NotificationResource } from "./notifications.js";
|
|
|
26
28
|
export { OrgResource } from "./orgs.js";
|
|
27
29
|
export { SlackChannelBindingResource } from "./slack_channel_bindings.js";
|
|
28
30
|
export { SolutionCategoryResource } from "./solution_categories.js";
|
|
31
|
+
export { SolutionInstanceResource } from "./solution_instances.js";
|
|
29
32
|
export { SolutionTagResource } from "./solution_tags.js";
|
|
30
33
|
export { SolutionResource } from "./solutions.js";
|
|
31
34
|
export { TeamMembershipResource } from "./team_memberships.js";
|
|
@@ -33,5 +36,7 @@ export { TeamResource } from "./teams.js";
|
|
|
33
36
|
export { ThreadMessageResource } from "./thread_messages.js";
|
|
34
37
|
export { ThreadResource } from "./threads.js";
|
|
35
38
|
export { UserResource } from "./users.js";
|
|
39
|
+
export { WorkItemResource } from "./work_items.js";
|
|
36
40
|
export { AiResource } from "./ai.js";
|
|
41
|
+
export { OauthResource } from "./oauth.js";
|
|
37
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,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,EA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Inc. Licensed under the MIT License.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 653eaf428b5c
|
|
4
4
|
export { ActivityFeedResource } from "./activity_feed.js";
|
|
5
5
|
export { AgentComputerResource } from "./agent_computers.js";
|
|
6
6
|
export { AgentEnvVarResource } from "./agent_env_vars.js";
|
|
@@ -18,10 +18,12 @@ export { AutomationResource } from "./automations.js";
|
|
|
18
18
|
export { BugReportResource } from "./bug_reports.js";
|
|
19
19
|
export { ConfigResource } from "./config.js";
|
|
20
20
|
export { CustomObjectResource } from "./custom_objects.js";
|
|
21
|
+
export { ExtractionResource } from "./extractions.js";
|
|
21
22
|
export { FileResource } from "./files.js";
|
|
22
23
|
export { InstallationSourceResource } from "./installation_sources.js";
|
|
23
24
|
export { InviteResource } from "./invites.js";
|
|
24
25
|
export { KnowledgeDocumentResource } from "./knowledge_documents.js";
|
|
26
|
+
export { KnowledgeIngestionResource } from "./knowledge_ingestions.js";
|
|
25
27
|
export { KnowledgeSourceResource } from "./knowledge_sources.js";
|
|
26
28
|
export { KvResource } from "./kv.js";
|
|
27
29
|
export { NotificationPreferenceResource } from "./notification_preferences.js";
|
|
@@ -29,6 +31,7 @@ export { NotificationResource } from "./notifications.js";
|
|
|
29
31
|
export { OrgResource } from "./orgs.js";
|
|
30
32
|
export { SlackChannelBindingResource } from "./slack_channel_bindings.js";
|
|
31
33
|
export { SolutionCategoryResource } from "./solution_categories.js";
|
|
34
|
+
export { SolutionInstanceResource } from "./solution_instances.js";
|
|
32
35
|
export { SolutionTagResource } from "./solution_tags.js";
|
|
33
36
|
export { SolutionResource } from "./solutions.js";
|
|
34
37
|
export { TeamMembershipResource } from "./team_memberships.js";
|
|
@@ -36,5 +39,7 @@ export { TeamResource } from "./teams.js";
|
|
|
36
39
|
export { ThreadMessageResource } from "./thread_messages.js";
|
|
37
40
|
export { ThreadResource } from "./threads.js";
|
|
38
41
|
export { UserResource } from "./users.js";
|
|
42
|
+
export { WorkItemResource } from "./work_items.js";
|
|
39
43
|
export { AiResource } from "./ai.js";
|
|
44
|
+
export { OauthResource } from "./oauth.js";
|
|
40
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/resources/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/resources/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,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,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,E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AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Copyright (c) 2026 ArchAstro Inc.
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 493058fd4bb5
|
|
4
4
|
export class InstallationSourceResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation_sources.js","sourceRoot":"","sources":["../../../src/v1/resources/installation_sources.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"installation_sources.js","sourceRoot":"","sources":["../../../src/v1/resources/installation_sources.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Copyright (c) 2026 ArchAstro Inc.
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: c9486e7d9a75
|
|
4
4
|
export class InviteResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invites.js","sourceRoot":"","sources":["../../../src/v1/resources/invites.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"invites.js","sourceRoot":"","sources":["../../../src/v1/resources/invites.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,cAAc;IACL;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,MAAM,CAAC,KAAsB;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
-
import type { ContextDocument, ContextDocumentContent } from "../../types/common.js";
|
|
2
|
+
import type { ContextDocument, ContextDocumentContent, ContextIngestion } from "../../types/common.js";
|
|
3
3
|
export declare class KnowledgeDocumentResource {
|
|
4
4
|
private http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
@@ -33,6 +33,7 @@ export declare class KnowledgeDocumentResource {
|
|
|
33
33
|
}): Promise<{
|
|
34
34
|
data: {
|
|
35
35
|
agent?: string | undefined;
|
|
36
|
+
content_hash?: string | undefined;
|
|
36
37
|
created_at?: string | undefined;
|
|
37
38
|
file?: string | undefined;
|
|
38
39
|
id: string;
|
|
@@ -76,6 +77,37 @@ export declare class KnowledgeDocumentResource {
|
|
|
76
77
|
* @returns The requested context document's metadata.
|
|
77
78
|
*/
|
|
78
79
|
get(document: string): Promise<ContextDocument>;
|
|
80
|
+
/**
|
|
81
|
+
* Update a context document
|
|
82
|
+
* Replaces one document's content while preserving its document ID. The update
|
|
83
|
+
* runs asynchronously through the document's source pipeline: bytes are
|
|
84
|
+
* extracted and chunked, the prior chunks are replaced atomically, and fresh
|
|
85
|
+
* document and chunk embeddings are queued.
|
|
86
|
+
* Supply exactly one of `file` or `content`. Omitted `title` and `metadata`
|
|
87
|
+
* retain their current values. The response is an ingestion that can be polled
|
|
88
|
+
* at `GET /api/v1/knowledge_ingestions/:id` until it reaches `succeeded` or
|
|
89
|
+
* `failed`. `succeeded` means the replacement content and full-text indexes are
|
|
90
|
+
* committed and the embedding refresh is durably queued; vector computation
|
|
91
|
+
* continues in the retryable embedding worker.
|
|
92
|
+
* @param document - Document ID (`cdo_...`) to update.
|
|
93
|
+
* @param input - Request body.
|
|
94
|
+
* @param input.content - Inline replacement bytes. Mutually exclusive with `file`.
|
|
95
|
+
* @param input.file - ID of an already-uploaded file (`fil_...`). Mutually exclusive with `content`.
|
|
96
|
+
* @param input.metadata - Replacement metadata map. Omit to retain the current metadata.
|
|
97
|
+
* @param input.title - Replacement display title. Omit to retain the current title.
|
|
98
|
+
* @returns The ingestion performing the document update.
|
|
99
|
+
*/
|
|
100
|
+
update(document: string, input: {
|
|
101
|
+
content?: {
|
|
102
|
+
content_type?: string | undefined;
|
|
103
|
+
data: string;
|
|
104
|
+
data_encoding?: string | undefined;
|
|
105
|
+
filename?: string | undefined;
|
|
106
|
+
} | undefined;
|
|
107
|
+
file?: string | undefined;
|
|
108
|
+
metadata?: Record<string, unknown> | undefined;
|
|
109
|
+
title?: string | undefined;
|
|
110
|
+
}): Promise<ContextIngestion>;
|
|
79
111
|
/**
|
|
80
112
|
* Retrieve a context document's content
|
|
81
113
|
* Returns the full text of a context document, or a slice of it when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge_documents.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/knowledge_documents.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"knowledge_documents.d.ts","sourceRoot":"","sources":["../../../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ArchAstro Inc.
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 2dcf35d19c8d
|
|
4
4
|
export class KnowledgeDocumentResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
@@ -76,6 +76,29 @@ export class KnowledgeDocumentResource {
|
|
|
76
76
|
async get(document) {
|
|
77
77
|
return this.http.request(`/api/v1/knowledge_documents/${document}`);
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Update a context document
|
|
81
|
+
* Replaces one document's content while preserving its document ID. The update
|
|
82
|
+
* runs asynchronously through the document's source pipeline: bytes are
|
|
83
|
+
* extracted and chunked, the prior chunks are replaced atomically, and fresh
|
|
84
|
+
* document and chunk embeddings are queued.
|
|
85
|
+
* Supply exactly one of `file` or `content`. Omitted `title` and `metadata`
|
|
86
|
+
* retain their current values. The response is an ingestion that can be polled
|
|
87
|
+
* at `GET /api/v1/knowledge_ingestions/:id` until it reaches `succeeded` or
|
|
88
|
+
* `failed`. `succeeded` means the replacement content and full-text indexes are
|
|
89
|
+
* committed and the embedding refresh is durably queued; vector computation
|
|
90
|
+
* continues in the retryable embedding worker.
|
|
91
|
+
* @param document - Document ID (`cdo_...`) to update.
|
|
92
|
+
* @param input - Request body.
|
|
93
|
+
* @param input.content - Inline replacement bytes. Mutually exclusive with `file`.
|
|
94
|
+
* @param input.file - ID of an already-uploaded file (`fil_...`). Mutually exclusive with `content`.
|
|
95
|
+
* @param input.metadata - Replacement metadata map. Omit to retain the current metadata.
|
|
96
|
+
* @param input.title - Replacement display title. Omit to retain the current title.
|
|
97
|
+
* @returns The ingestion performing the document update.
|
|
98
|
+
*/
|
|
99
|
+
async update(document, input) {
|
|
100
|
+
return this.http.request(`/api/v1/knowledge_documents/${document}`, { method: "PATCH", body: input });
|
|
101
|
+
}
|
|
79
102
|
/**
|
|
80
103
|
* Retrieve a context document's content
|
|
81
104
|
* Returns the full text of a context document, or a slice of it when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge_documents.js","sourceRoot":"","sources":["../../../src/v1/resources/knowledge_documents.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"knowledge_documents.js","sourceRoot":"","sources":["../../../src/v1/resources/knowledge_documents.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,yBAAyB;IAChB;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,IAAI,CAAC,MAAuH;QAChI,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,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,QAAQ,KAAK,SAAS,EAAE,CAAC;YACnC,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,EAAE,QAAQ,CAAC;QACxC,CAAC;QACD,IAAI,MAAM,EAAE,CAAC,KAAK,SAAS,EAAE,CAAC;YAC5B,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC;QACzB,CAAC;QACD,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;YACjC,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC;QACnC,CAAC;QACD,IAAI,MAAM,EAAE,YAAY,KAAK,SAAS,EAAE,CAAC;YACvC,KAAK,CAAC,cAAc,CAAC,GAAG,MAAM,EAAE,YAAY,CAAC;QAC/C,CAAC;QACD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAA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/B,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,+BAA+B,QAAQ,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACzF,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
+
import type { ContextIngestion } from "../../types/common.js";
|
|
3
|
+
export declare class KnowledgeIngestionResource {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve a knowledge ingestion
|
|
8
|
+
* Returns the status, error details, and metadata for a knowledge ingestion.
|
|
9
|
+
* Use the ingestion ID returned by an asynchronous knowledge source or document
|
|
10
|
+
* operation. Inaccessible and unknown ingestions both return 404.
|
|
11
|
+
* @param ingestion - Knowledge ingestion ID (`cig_...`) to retrieve.
|
|
12
|
+
* @returns The requested knowledge ingestion.
|
|
13
|
+
*/
|
|
14
|
+
get(ingestion: string): Promise<ContextIngestion>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=knowledge_ingestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge_ingestions.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/knowledge_ingestions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,qBAAa,0BAA0B;IACzB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;OAOG;IACG,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAGxD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
|
|
2
|
+
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
+
// Content hash: 0eb5057bc678
|
|
4
|
+
export class KnowledgeIngestionResource {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a knowledge ingestion
|
|
11
|
+
* Returns the status, error details, and metadata for a knowledge ingestion.
|
|
12
|
+
* Use the ingestion ID returned by an asynchronous knowledge source or document
|
|
13
|
+
* operation. Inaccessible and unknown ingestions both return 404.
|
|
14
|
+
* @param ingestion - Knowledge ingestion ID (`cig_...`) to retrieve.
|
|
15
|
+
* @returns The requested knowledge ingestion.
|
|
16
|
+
*/
|
|
17
|
+
async get(ingestion) {
|
|
18
|
+
return this.http.request(`/api/v1/knowledge_ingestions/${ingestion}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=knowledge_ingestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge_ingestions.js","sourceRoot":"","sources":["../../../src/v1/resources/knowledge_ingestions.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,0BAA0B;IACjB;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG,CAAC,SAAiB;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC,SAAS,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -168,6 +168,7 @@ export declare class KnowledgeSourceResource {
|
|
|
168
168
|
* @param source - Knowledge source ID (`ksrc_...`) to ingest.
|
|
169
169
|
* @param input - Request body.
|
|
170
170
|
* @param input.content - Inline document bytes to push to the source. Mutually exclusive with `file` and `pull`.
|
|
171
|
+
* @param input.dedupe - When `true`, reuse the source's existing document if the pushed content is byte-identical to it, instead of creating a duplicate. The reused document keeps its chunks and embeddings, and `title`/`metadata` from this request are still applied to it. Content that differs in any way always creates a new document. Defaults to `false`, which creates a new document on every push. Push mode only — not valid with `pull: true`. Check `metadata.document_reused` on the returned ingestion to see whether a document was actually reused.
|
|
171
172
|
* @param input.file - ID of an already-uploaded file (`fil_...`). The runner reads filename and content type from the stored file. Upload the file via `POST /v1/files` first. Mutually exclusive with `content` and `pull`.
|
|
172
173
|
* @param input.metadata - Arbitrary key-value metadata to attach to the ingested document. Applied in push mode only; ignored when `pull: true`.
|
|
173
174
|
* @param input.pull - When `true`, re-triggers ingestion using the source's own configured data. Re-scrapes a `scrape/site`, re-fetches a `web/link`, or re-processes a `file/document`. Mutually exclusive with `file` and `content`. Not valid for `knowledge/documents` sources.
|
|
@@ -181,6 +182,7 @@ export declare class KnowledgeSourceResource {
|
|
|
181
182
|
data_encoding?: string | undefined;
|
|
182
183
|
filename?: string | undefined;
|
|
183
184
|
} | undefined;
|
|
185
|
+
dedupe?: boolean | undefined;
|
|
184
186
|
file?: string | undefined;
|
|
185
187
|
metadata?: Record<string, unknown> | undefined;
|
|
186
188
|
pull?: boolean | undefined;
|