@archastro/sdk 0.10.0 → 0.11.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/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +15 -1
- package/dist/client.js.map +1 -1
- package/dist/types/ai.d.ts +2 -2
- package/dist/types/chat.d.ts +30 -30
- package/dist/types/common.d.ts +625 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +136 -1
- package/dist/types/common.js.map +1 -1
- package/dist/types/extractions.d.ts +36 -0
- package/dist/types/extractions.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/status.d.ts +121 -0
- package/dist/types/status.d.ts.map +1 -0
- package/dist/types/status.js +18 -0
- package/dist/types/status.js.map +1 -0
- package/dist/types/tasks.d.ts +254 -0
- package/dist/types/tasks.d.ts.map +1 -1
- package/dist/types/tasks.js +52 -1
- package/dist/types/tasks.js.map +1 -1
- package/dist/types/threads.d.ts +2 -2
- package/dist/v1/resources/activity_feed.d.ts +1 -1
- package/dist/v1/resources/activity_feed.js +2 -2
- package/dist/v1/resources/custom_objects.d.ts +31 -16
- package/dist/v1/resources/custom_objects.d.ts.map +1 -1
- package/dist/v1/resources/custom_objects.js +35 -16
- package/dist/v1/resources/custom_objects.js.map +1 -1
- package/dist/v1/resources/files.d.ts +19 -0
- package/dist/v1/resources/files.d.ts.map +1 -1
- package/dist/v1/resources/files.js +3 -1
- package/dist/v1/resources/files.js.map +1 -1
- package/dist/v1/resources/index.d.ts +7 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +8 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/private_service_definitions.d.ts +12 -0
- package/dist/v1/resources/private_service_definitions.d.ts.map +1 -0
- package/dist/v1/resources/private_service_definitions.js +18 -0
- package/dist/v1/resources/private_service_definitions.js.map +1 -0
- package/dist/v1/resources/private_service_enrollments.d.ts +42 -0
- package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -0
- package/dist/v1/resources/private_service_enrollments.js +56 -0
- package/dist/v1/resources/private_service_enrollments.js.map +1 -0
- package/dist/v1/resources/private_services.d.ts +46 -0
- package/dist/v1/resources/private_services.d.ts.map +1 -0
- package/dist/v1/resources/private_services.js +55 -0
- package/dist/v1/resources/private_services.js.map +1 -0
- package/dist/v1/resources/sandboxes.d.ts +81 -0
- package/dist/v1/resources/sandboxes.d.ts.map +1 -0
- package/dist/v1/resources/sandboxes.js +84 -0
- package/dist/v1/resources/sandboxes.js.map +1 -0
- package/dist/v1/resources/status.d.ts +22 -0
- package/dist/v1/resources/status.d.ts.map +1 -0
- package/dist/v1/resources/status.js +27 -0
- package/dist/v1/resources/status.js.map +1 -0
- package/dist/v1/resources/tasks.d.ts +599 -0
- package/dist/v1/resources/tasks.d.ts.map +1 -0
- package/dist/v1/resources/tasks.js +436 -0
- package/dist/v1/resources/tasks.js.map +1 -0
- package/dist/v1/resources/teams.d.ts +390 -3
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +227 -4
- package/dist/v1/resources/teams.js.map +1 -1
- package/dist/v1/resources/thread_messages.d.ts +6 -3
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +5 -4
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +39 -0
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +36 -1
- package/dist/v1/resources/threads.js.map +1 -1
- package/dist/v1/resources/trajectories.d.ts +34 -0
- package/dist/v1/resources/trajectories.d.ts.map +1 -0
- package/dist/v1/resources/trajectories.js +41 -0
- package/dist/v1/resources/trajectories.js.map +1 -0
- package/dist/v1/resources/users.d.ts +352 -0
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +208 -1
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1.d.ts +14 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +22 -1
- package/dist/v1.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
+
import type { PrivateService, PrivateServicePage } from "../../types/common.js";
|
|
3
|
+
export declare class PrivateServiceResource {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* List private services
|
|
8
|
+
* @param params - Query parameters.
|
|
9
|
+
* @param params.org - Organization ID or slug. Required for developer and server callers.
|
|
10
|
+
* @param params.page - Page number. Defaults to 1.
|
|
11
|
+
* @param params.pageSize - Results per page. Defaults to 25; maximum is 100.
|
|
12
|
+
* @returns Successful response
|
|
13
|
+
*/
|
|
14
|
+
list(params?: {
|
|
15
|
+
org?: string;
|
|
16
|
+
page?: number;
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
}): Promise<PrivateServicePage>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a private service
|
|
21
|
+
* Creates one immutable private service in the selected organization.
|
|
22
|
+
* @param input - Request body.
|
|
23
|
+
* @param input.functions - Complete callable contracts. Input schemas are required; output schemas are optional.
|
|
24
|
+
* @param input.org - Organization ID or slug. Required for developer and server callers.
|
|
25
|
+
* @returns The newly created private service.
|
|
26
|
+
*/
|
|
27
|
+
create(input: {
|
|
28
|
+
functions: {
|
|
29
|
+
description: string;
|
|
30
|
+
input_schema: Record<string, unknown>;
|
|
31
|
+
name: string;
|
|
32
|
+
output_schema?: Record<string, unknown> | undefined;
|
|
33
|
+
}[];
|
|
34
|
+
org?: string | undefined;
|
|
35
|
+
}): Promise<PrivateService>;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieve a private service
|
|
38
|
+
* @param params - Query parameters.
|
|
39
|
+
* @param params.org - Organization ID or slug. Required for developer and server callers.
|
|
40
|
+
* @returns Successful response
|
|
41
|
+
*/
|
|
42
|
+
get(privateServiceId: string, params?: {
|
|
43
|
+
org?: string;
|
|
44
|
+
}): Promise<PrivateService>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=private_services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private_services.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/private_services.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,qBAAa,sBAAsB;IACrB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;OAOG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAepG;;;;;;;OAOG;IACG,MAAM,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE;YAAE,WAAW,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;SAAE,EAAE,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAI1N;;;;;OAKG;IACG,GAAG,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;CAQxF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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: 58d87af2e79d
|
|
4
|
+
export class PrivateServiceResource {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List private services
|
|
11
|
+
* @param params - Query parameters.
|
|
12
|
+
* @param params.org - Organization ID or slug. Required for developer and server callers.
|
|
13
|
+
* @param params.page - Page number. Defaults to 1.
|
|
14
|
+
* @param params.pageSize - Results per page. Defaults to 25; maximum is 100.
|
|
15
|
+
* @returns Successful response
|
|
16
|
+
*/
|
|
17
|
+
async list(params) {
|
|
18
|
+
const query = {};
|
|
19
|
+
if (params?.org !== undefined) {
|
|
20
|
+
query["org"] = params?.org;
|
|
21
|
+
}
|
|
22
|
+
if (params?.page !== undefined) {
|
|
23
|
+
query["page"] = params?.page;
|
|
24
|
+
}
|
|
25
|
+
if (params?.pageSize !== undefined) {
|
|
26
|
+
query["page_size"] = params?.pageSize;
|
|
27
|
+
}
|
|
28
|
+
return this.http.request(`/api/v1/private_services`, { query });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a private service
|
|
32
|
+
* Creates one immutable private service in the selected organization.
|
|
33
|
+
* @param input - Request body.
|
|
34
|
+
* @param input.functions - Complete callable contracts. Input schemas are required; output schemas are optional.
|
|
35
|
+
* @param input.org - Organization ID or slug. Required for developer and server callers.
|
|
36
|
+
* @returns The newly created private service.
|
|
37
|
+
*/
|
|
38
|
+
async create(input) {
|
|
39
|
+
return this.http.request(`/api/v1/private_services`, { method: "POST", body: input });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Retrieve a private service
|
|
43
|
+
* @param params - Query parameters.
|
|
44
|
+
* @param params.org - Organization ID or slug. Required for developer and server callers.
|
|
45
|
+
* @returns Successful response
|
|
46
|
+
*/
|
|
47
|
+
async get(privateServiceId, params) {
|
|
48
|
+
const query = {};
|
|
49
|
+
if (params?.org !== undefined) {
|
|
50
|
+
query["org"] = params?.org;
|
|
51
|
+
}
|
|
52
|
+
return this.http.request(`/api/v1/private_services/${privateServiceId}`, { query });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=private_services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private_services.js","sourceRoot":"","sources":["../../../src/v1/resources/private_services.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CAAC,MAA2D;QACpE,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;YAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC;QAC7B,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,QAAQ,KAAK,SAAS,EAAE,CAAC;YACnC,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,EAAE,QAAQ,CAAC;QACxC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CAAC,KAAmL;QAC9L,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,gBAAwB,EAAE,MAAyB;QAC3D,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;YAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC;QAC7B,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,4BAA4B,gBAAgB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
+
import type { Sandbox, SandboxKey } from "../../types/common.js";
|
|
3
|
+
export declare class SandboxResource {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Create a sandbox
|
|
8
|
+
* Creates a new sandbox for the caller's app. A sandbox is an isolated environment
|
|
9
|
+
* that can hold its own set of API keys, allowing you to test integrations without
|
|
10
|
+
* affecting production data.
|
|
11
|
+
* The caller must authenticate with app-scoped credentials. Org-scoped viewers
|
|
12
|
+
* may create sandboxes for their organization; developers and all-powerful
|
|
13
|
+
* callers may create app-level or org-scoped sandboxes. If `org` is supplied the
|
|
14
|
+
* sandbox is scoped to that organization; otherwise it defaults to the
|
|
15
|
+
* authenticated viewer's organization.
|
|
16
|
+
* Remote-eval sandboxes may set `purpose: "eval"` with `expires_at` at creation;
|
|
17
|
+
* TTL is the sole cleanup mechanism for those sandboxes. Returns the new sandbox
|
|
18
|
+
* with the auto-issued publishable key — use the create key endpoint to issue
|
|
19
|
+
* secret keys.
|
|
20
|
+
* @param input - Request body.
|
|
21
|
+
* @param input.expires_at - Optional eval sandbox expiry in ISO 8601 format. Must be paired with `purpose: "eval"`.
|
|
22
|
+
* @param input.name - Human-readable display name for the sandbox.
|
|
23
|
+
* @param input.org - Organization ID (`org_...`) to scope the sandbox to. Defaults to the authenticated viewer's organization when omitted.
|
|
24
|
+
* @param input.purpose - Optional sandbox purpose marker. Only `"eval"` is accepted, and it must be paired with `expires_at`.
|
|
25
|
+
* @param input.slug - URL-safe identifier for the sandbox. Must be unique within the app.
|
|
26
|
+
* @returns The newly created sandbox.
|
|
27
|
+
*/
|
|
28
|
+
create(input: {
|
|
29
|
+
expires_at?: string | undefined;
|
|
30
|
+
name: string;
|
|
31
|
+
org?: string | undefined;
|
|
32
|
+
purpose?: string | undefined;
|
|
33
|
+
slug: string;
|
|
34
|
+
}): Promise<Sandbox>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete a sandbox
|
|
37
|
+
* Soft-deletes the specified sandbox. The sandbox is marked deleted and
|
|
38
|
+
* immediately hidden from list/get queries; all of its active keys are revoked.
|
|
39
|
+
* Hard deletion (child data cascade) is scheduled immediately via the background
|
|
40
|
+
* sandbox deletion worker — the same path used for developer-app soft-delete.
|
|
41
|
+
* The caller must authenticate with app-scoped credentials and be allowed to
|
|
42
|
+
* modify the sandbox. Returns 204 on success. If the sandbox is missing or
|
|
43
|
+
* already deleted, a 404 is returned.
|
|
44
|
+
* @param sandbox - Sandbox ID (`dsb_...`) of the sandbox to delete.
|
|
45
|
+
* @returns Empty response with HTTP 204 status on successful deletion.
|
|
46
|
+
*/
|
|
47
|
+
delete(sandbox: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve a sandbox
|
|
50
|
+
* Returns the sandbox identified by `sandbox` that belongs to the caller's app.
|
|
51
|
+
* The response includes the sandbox's associated keys (without full secret key
|
|
52
|
+
* values — full keys are only available at creation time).
|
|
53
|
+
* The caller must authenticate with app-scoped credentials. Org members may view
|
|
54
|
+
* their org's sandboxes; developers and all-powerful callers may view app-level
|
|
55
|
+
* and org-scoped sandboxes in their app. Returns 404 if the sandbox does not
|
|
56
|
+
* exist or is not visible to the caller.
|
|
57
|
+
* @param sandbox - Sandbox ID (`dsb_...`) to retrieve.
|
|
58
|
+
* @returns The requested sandbox.
|
|
59
|
+
*/
|
|
60
|
+
get(sandbox: string): Promise<Sandbox>;
|
|
61
|
+
/**
|
|
62
|
+
* Create a sandbox key
|
|
63
|
+
* Issues a new API key for the specified sandbox. Keys can be either
|
|
64
|
+
* `"publishable"` (safe to embed in client-side code) or `"secret"` (server-side
|
|
65
|
+
* only). The full key value is returned once in the `full_key` field of this
|
|
66
|
+
* response and is never retrievable again — store it securely immediately.
|
|
67
|
+
* The caller must authenticate with app-scoped credentials and be able to
|
|
68
|
+
* modify the sandbox (org members for org sandboxes; developers / all-powerful
|
|
69
|
+
* for app-level). If the sandbox does not belong to the caller's app or is not
|
|
70
|
+
* visible, a 404 is returned. Multiple active keys per sandbox are supported;
|
|
71
|
+
* revoke individual keys with the revoke key endpoint.
|
|
72
|
+
* @param sandbox - Sandbox ID (`dsb_...`). The key is created for this sandbox.
|
|
73
|
+
* @param input - Request body.
|
|
74
|
+
* @param input.type - Key type. One of `"publishable"` or `"secret"`. Defaults to `"publishable"`.
|
|
75
|
+
* @returns The newly created sandbox key, including the one-time `full_key` value.
|
|
76
|
+
*/
|
|
77
|
+
keys(sandbox: string, input: {
|
|
78
|
+
type?: string | undefined;
|
|
79
|
+
}): Promise<SandboxKey>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=sandboxes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxes.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/sandboxes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEjE,qBAAa,eAAe;IACd,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,MAAM,CAAC,KAAK,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAI9J;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C;;;;;;;;;;;OAWG;IACG,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C;;;;;;;;;;;;;;;OAeG;IACG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;CAGvF"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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: bf24ff50b843
|
|
4
|
+
export class SandboxResource {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Create a sandbox
|
|
11
|
+
* Creates a new sandbox for the caller's app. A sandbox is an isolated environment
|
|
12
|
+
* that can hold its own set of API keys, allowing you to test integrations without
|
|
13
|
+
* affecting production data.
|
|
14
|
+
* The caller must authenticate with app-scoped credentials. Org-scoped viewers
|
|
15
|
+
* may create sandboxes for their organization; developers and all-powerful
|
|
16
|
+
* callers may create app-level or org-scoped sandboxes. If `org` is supplied the
|
|
17
|
+
* sandbox is scoped to that organization; otherwise it defaults to the
|
|
18
|
+
* authenticated viewer's organization.
|
|
19
|
+
* Remote-eval sandboxes may set `purpose: "eval"` with `expires_at` at creation;
|
|
20
|
+
* TTL is the sole cleanup mechanism for those sandboxes. Returns the new sandbox
|
|
21
|
+
* with the auto-issued publishable key — use the create key endpoint to issue
|
|
22
|
+
* secret keys.
|
|
23
|
+
* @param input - Request body.
|
|
24
|
+
* @param input.expires_at - Optional eval sandbox expiry in ISO 8601 format. Must be paired with `purpose: "eval"`.
|
|
25
|
+
* @param input.name - Human-readable display name for the sandbox.
|
|
26
|
+
* @param input.org - Organization ID (`org_...`) to scope the sandbox to. Defaults to the authenticated viewer's organization when omitted.
|
|
27
|
+
* @param input.purpose - Optional sandbox purpose marker. Only `"eval"` is accepted, and it must be paired with `expires_at`.
|
|
28
|
+
* @param input.slug - URL-safe identifier for the sandbox. Must be unique within the app.
|
|
29
|
+
* @returns The newly created sandbox.
|
|
30
|
+
*/
|
|
31
|
+
async create(input) {
|
|
32
|
+
return this.http.request(`/api/v1/sandboxes`, { method: "POST", body: input });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Delete a sandbox
|
|
36
|
+
* Soft-deletes the specified sandbox. The sandbox is marked deleted and
|
|
37
|
+
* immediately hidden from list/get queries; all of its active keys are revoked.
|
|
38
|
+
* Hard deletion (child data cascade) is scheduled immediately via the background
|
|
39
|
+
* sandbox deletion worker — the same path used for developer-app soft-delete.
|
|
40
|
+
* The caller must authenticate with app-scoped credentials and be allowed to
|
|
41
|
+
* modify the sandbox. Returns 204 on success. If the sandbox is missing or
|
|
42
|
+
* already deleted, a 404 is returned.
|
|
43
|
+
* @param sandbox - Sandbox ID (`dsb_...`) of the sandbox to delete.
|
|
44
|
+
* @returns Empty response with HTTP 204 status on successful deletion.
|
|
45
|
+
*/
|
|
46
|
+
async delete(sandbox) {
|
|
47
|
+
await this.http.request(`/api/v1/sandboxes/${sandbox}`, { method: "DELETE" });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Retrieve a sandbox
|
|
51
|
+
* Returns the sandbox identified by `sandbox` that belongs to the caller's app.
|
|
52
|
+
* The response includes the sandbox's associated keys (without full secret key
|
|
53
|
+
* values — full keys are only available at creation time).
|
|
54
|
+
* The caller must authenticate with app-scoped credentials. Org members may view
|
|
55
|
+
* their org's sandboxes; developers and all-powerful callers may view app-level
|
|
56
|
+
* and org-scoped sandboxes in their app. Returns 404 if the sandbox does not
|
|
57
|
+
* exist or is not visible to the caller.
|
|
58
|
+
* @param sandbox - Sandbox ID (`dsb_...`) to retrieve.
|
|
59
|
+
* @returns The requested sandbox.
|
|
60
|
+
*/
|
|
61
|
+
async get(sandbox) {
|
|
62
|
+
return this.http.request(`/api/v1/sandboxes/${sandbox}`);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Create a sandbox key
|
|
66
|
+
* Issues a new API key for the specified sandbox. Keys can be either
|
|
67
|
+
* `"publishable"` (safe to embed in client-side code) or `"secret"` (server-side
|
|
68
|
+
* only). The full key value is returned once in the `full_key` field of this
|
|
69
|
+
* response and is never retrievable again — store it securely immediately.
|
|
70
|
+
* The caller must authenticate with app-scoped credentials and be able to
|
|
71
|
+
* modify the sandbox (org members for org sandboxes; developers / all-powerful
|
|
72
|
+
* for app-level). If the sandbox does not belong to the caller's app or is not
|
|
73
|
+
* visible, a 404 is returned. Multiple active keys per sandbox are supported;
|
|
74
|
+
* revoke individual keys with the revoke key endpoint.
|
|
75
|
+
* @param sandbox - Sandbox ID (`dsb_...`). The key is created for this sandbox.
|
|
76
|
+
* @param input - Request body.
|
|
77
|
+
* @param input.type - Key type. One of `"publishable"` or `"secret"`. Defaults to `"publishable"`.
|
|
78
|
+
* @returns The newly created sandbox key, including the one-time `full_key` value.
|
|
79
|
+
*/
|
|
80
|
+
async keys(sandbox, input) {
|
|
81
|
+
return this.http.request(`/api/v1/sandboxes/${sandbox}/keys`, { method: "POST", body: input });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=sandboxes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxes.js","sourceRoot":"","sources":["../../../src/v1/resources/sandboxes.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,eAAe;IACN;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,CAAC,MAAM,CAAC,KAA8H;QACzI,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe;QAC1B,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,IAAI,CAAC,OAAe,EAAE,KAAoC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,OAAO,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACjG,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
+
import type { StatusPing } from "../../types/status.js";
|
|
3
|
+
export declare class StatuResource {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Check API token status
|
|
8
|
+
* Returns the validity and metadata of the bearer token supplied in the request.
|
|
9
|
+
* Use this endpoint to verify that an API key or session token is present, active,
|
|
10
|
+
* and unexpired before making authenticated calls.
|
|
11
|
+
* No authentication is required to call this endpoint — it accepts any request,
|
|
12
|
+
* including those with no token at all. When a token is absent the `token.status`
|
|
13
|
+
* field is `"missing"` and `token.active` is `false`. When a token is present but
|
|
14
|
+
* invalid (expired, malformed, or referencing an unknown user) `token.active` is
|
|
15
|
+
* `false` and `token.status` describes the failure reason. When the token is valid,
|
|
16
|
+
* `token.active` is `true`, `token.status` is `"active"`, and `user` is populated
|
|
17
|
+
* with the authenticated user's profile.
|
|
18
|
+
* @returns Token validity details and, when the token is active, the authenticated user's profile.
|
|
19
|
+
*/
|
|
20
|
+
ping(): Promise<StatusPing>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/status.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,qBAAa,aAAa;IACZ,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;OAaG;IACG,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;CAGlC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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: 2884bce2d74a
|
|
4
|
+
export class StatuResource {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Check API token status
|
|
11
|
+
* Returns the validity and metadata of the bearer token supplied in the request.
|
|
12
|
+
* Use this endpoint to verify that an API key or session token is present, active,
|
|
13
|
+
* and unexpired before making authenticated calls.
|
|
14
|
+
* No authentication is required to call this endpoint — it accepts any request,
|
|
15
|
+
* including those with no token at all. When a token is absent the `token.status`
|
|
16
|
+
* field is `"missing"` and `token.active` is `false`. When a token is present but
|
|
17
|
+
* invalid (expired, malformed, or referencing an unknown user) `token.active` is
|
|
18
|
+
* `false` and `token.status` describes the failure reason. When the token is valid,
|
|
19
|
+
* `token.active` is `true`, `token.status` is `"active"`, and `user` is populated
|
|
20
|
+
* with the authenticated user's profile.
|
|
21
|
+
* @returns Token validity details and, when the token is active, the authenticated user's profile.
|
|
22
|
+
*/
|
|
23
|
+
async ping() {
|
|
24
|
+
return this.http.request(`/api/v1/status/ping`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/v1/resources/status.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAClD,CAAC;CACF"}
|