@agentuity/server 1.0.1 → 1.0.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/AGENTS.md +38 -34
- package/dist/api/api.d.ts +32 -2
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/api.js +14 -2
- package/dist/api/api.js.map +1 -1
- package/dist/api/apikey/create.d.ts +12 -2
- package/dist/api/apikey/create.d.ts.map +1 -1
- package/dist/api/apikey/create.js +2 -2
- package/dist/api/apikey/create.js.map +1 -1
- package/dist/api/apikey/delete.d.ts +9 -0
- package/dist/api/apikey/delete.d.ts.map +1 -1
- package/dist/api/apikey/delete.js +1 -1
- package/dist/api/apikey/delete.js.map +1 -1
- package/dist/api/apikey/get.d.ts +21 -2
- package/dist/api/apikey/get.d.ts.map +1 -1
- package/dist/api/apikey/get.js +2 -2
- package/dist/api/apikey/get.js.map +1 -1
- package/dist/api/apikey/index.d.ts +1 -0
- package/dist/api/apikey/index.d.ts.map +1 -1
- package/dist/api/apikey/index.js +1 -0
- package/dist/api/apikey/index.js.map +1 -1
- package/dist/api/apikey/list.d.ts +1 -2
- package/dist/api/apikey/list.d.ts.map +1 -1
- package/dist/api/apikey/list.js +1 -1
- package/dist/api/apikey/list.js.map +1 -1
- package/dist/api/db/index.d.ts +4 -4
- package/dist/api/db/index.d.ts.map +1 -1
- package/dist/api/db/index.js +4 -4
- package/dist/api/db/index.js.map +1 -1
- package/dist/api/db/logs.d.ts +34 -3
- package/dist/api/db/logs.d.ts.map +1 -1
- package/dist/api/db/logs.js +4 -4
- package/dist/api/db/logs.js.map +1 -1
- package/dist/api/db/query.d.ts +14 -1
- package/dist/api/db/query.d.ts.map +1 -1
- package/dist/api/db/query.js +2 -2
- package/dist/api/db/query.js.map +1 -1
- package/dist/api/db/tables.d.ts +21 -2
- package/dist/api/db/tables.d.ts.map +1 -1
- package/dist/api/db/tables.js +2 -2
- package/dist/api/db/tables.js.map +1 -1
- package/dist/api/eval/get.d.ts +21 -3
- package/dist/api/eval/get.d.ts.map +1 -1
- package/dist/api/eval/get.js +2 -2
- package/dist/api/eval/get.js.map +1 -1
- package/dist/api/eval/index.d.ts +4 -4
- package/dist/api/eval/index.d.ts.map +1 -1
- package/dist/api/eval/index.js +4 -4
- package/dist/api/eval/index.js.map +1 -1
- package/dist/api/eval/list.d.ts +31 -3
- package/dist/api/eval/list.d.ts.map +1 -1
- package/dist/api/eval/list.js +3 -3
- package/dist/api/eval/list.js.map +1 -1
- package/dist/api/eval/run-get.d.ts +27 -3
- package/dist/api/eval/run-get.d.ts.map +1 -1
- package/dist/api/eval/run-get.js +2 -2
- package/dist/api/eval/run-get.js.map +1 -1
- package/dist/api/eval/run-list.d.ts +43 -3
- package/dist/api/eval/run-list.d.ts.map +1 -1
- package/dist/api/eval/run-list.js +3 -3
- package/dist/api/eval/run-list.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/machine/machine.d.ts +134 -3
- package/dist/api/machine/machine.d.ts.map +1 -1
- package/dist/api/machine/machine.js +11 -11
- package/dist/api/machine/machine.js.map +1 -1
- package/dist/api/org/env-delete.d.ts +10 -3
- package/dist/api/org/env-delete.d.ts.map +1 -1
- package/dist/api/org/env-delete.js +2 -2
- package/dist/api/org/env-delete.js.map +1 -1
- package/dist/api/org/env-get.d.ts +14 -1
- package/dist/api/org/env-get.d.ts.map +1 -1
- package/dist/api/org/env-get.js +2 -2
- package/dist/api/org/env-get.js.map +1 -1
- package/dist/api/org/env-update.d.ts +10 -3
- package/dist/api/org/env-update.d.ts.map +1 -1
- package/dist/api/org/env-update.js +2 -2
- package/dist/api/org/env-update.js.map +1 -1
- package/dist/api/org/list.d.ts +2 -3
- package/dist/api/org/list.d.ts.map +1 -1
- package/dist/api/org/list.js +2 -2
- package/dist/api/org/list.js.map +1 -1
- package/dist/api/org/resources.d.ts +4 -5
- package/dist/api/org/resources.d.ts.map +1 -1
- package/dist/api/org/resources.js +4 -4
- package/dist/api/org/resources.js.map +1 -1
- package/dist/api/project/agent.d.ts +55 -2
- package/dist/api/project/agent.d.ts.map +1 -1
- package/dist/api/project/agent.js +3 -3
- package/dist/api/project/agent.js.map +1 -1
- package/dist/api/project/create.d.ts +5 -6
- package/dist/api/project/create.d.ts.map +1 -1
- package/dist/api/project/create.js +3 -3
- package/dist/api/project/create.js.map +1 -1
- package/dist/api/project/delete.d.ts +13 -1
- package/dist/api/project/delete.d.ts.map +1 -1
- package/dist/api/project/delete.js +2 -2
- package/dist/api/project/delete.js.map +1 -1
- package/dist/api/project/deploy.d.ts +233 -9
- package/dist/api/project/deploy.d.ts.map +1 -1
- package/dist/api/project/deploy.js +23 -23
- package/dist/api/project/deploy.js.map +1 -1
- package/dist/api/project/deployment.d.ts +163 -3
- package/dist/api/project/deployment.d.ts.map +1 -1
- package/dist/api/project/deployment.js +8 -8
- package/dist/api/project/deployment.js.map +1 -1
- package/dist/api/project/env-delete.d.ts +10 -3
- package/dist/api/project/env-delete.d.ts.map +1 -1
- package/dist/api/project/env-delete.js +6 -2
- package/dist/api/project/env-delete.js.map +1 -1
- package/dist/api/project/env-update.d.ts +17 -3
- package/dist/api/project/env-update.d.ts.map +1 -1
- package/dist/api/project/env-update.js +2 -2
- package/dist/api/project/env-update.js.map +1 -1
- package/dist/api/project/exists.d.ts +4 -5
- package/dist/api/project/exists.d.ts.map +1 -1
- package/dist/api/project/exists.js +3 -3
- package/dist/api/project/exists.js.map +1 -1
- package/dist/api/project/get.d.ts +22 -4
- package/dist/api/project/get.d.ts.map +1 -1
- package/dist/api/project/get.js +3 -3
- package/dist/api/project/get.js.map +1 -1
- package/dist/api/project/list.d.ts +13 -5
- package/dist/api/project/list.d.ts.map +1 -1
- package/dist/api/project/list.js +4 -3
- package/dist/api/project/list.js.map +1 -1
- package/dist/api/project/malware.d.ts +41 -7
- package/dist/api/project/malware.d.ts.map +1 -1
- package/dist/api/project/malware.js +9 -9
- package/dist/api/project/malware.js.map +1 -1
- package/dist/api/project/update-region.d.ts +15 -1
- package/dist/api/project/update-region.d.ts.map +1 -1
- package/dist/api/project/update-region.js +2 -2
- package/dist/api/project/update-region.js.map +1 -1
- package/dist/api/queue/analytics.d.ts +144 -2
- package/dist/api/queue/analytics.d.ts.map +1 -1
- package/dist/api/queue/analytics.js +5 -5
- package/dist/api/queue/analytics.js.map +1 -1
- package/dist/api/queue/destinations.d.ts +96 -2
- package/dist/api/queue/destinations.d.ts.map +1 -1
- package/dist/api/queue/destinations.js +7 -7
- package/dist/api/queue/destinations.js.map +1 -1
- package/dist/api/queue/dlq.d.ts +70 -2
- package/dist/api/queue/dlq.d.ts.map +1 -1
- package/dist/api/queue/dlq.js +5 -5
- package/dist/api/queue/dlq.js.map +1 -1
- package/dist/api/queue/index.d.ts +9 -9
- package/dist/api/queue/index.d.ts.map +1 -1
- package/dist/api/queue/index.js +11 -11
- package/dist/api/queue/index.js.map +1 -1
- package/dist/api/queue/messages.d.ts +173 -2
- package/dist/api/queue/messages.d.ts.map +1 -1
- package/dist/api/queue/messages.js +10 -10
- package/dist/api/queue/messages.js.map +1 -1
- package/dist/api/queue/queues.d.ts +75 -2
- package/dist/api/queue/queues.d.ts.map +1 -1
- package/dist/api/queue/queues.js +6 -6
- package/dist/api/queue/queues.js.map +1 -1
- package/dist/api/queue/sources.d.ts +72 -2
- package/dist/api/queue/sources.d.ts.map +1 -1
- package/dist/api/queue/sources.js +6 -6
- package/dist/api/queue/sources.js.map +1 -1
- package/dist/api/region/create.d.ts +18 -4
- package/dist/api/region/create.d.ts.map +1 -1
- package/dist/api/region/create.js +5 -5
- package/dist/api/region/create.js.map +1 -1
- package/dist/api/region/delete.d.ts +17 -4
- package/dist/api/region/delete.d.ts.map +1 -1
- package/dist/api/region/delete.js +5 -5
- package/dist/api/region/delete.js.map +1 -1
- package/dist/api/region/list.d.ts +2 -3
- package/dist/api/region/list.d.ts.map +1 -1
- package/dist/api/region/list.js +2 -2
- package/dist/api/region/list.js.map +1 -1
- package/dist/api/region/resources.d.ts +2 -3
- package/dist/api/region/resources.d.ts.map +1 -1
- package/dist/api/region/resources.js +2 -2
- package/dist/api/region/resources.js.map +1 -1
- package/dist/api/sandbox/cli-list.d.ts +98 -0
- package/dist/api/sandbox/cli-list.d.ts.map +1 -0
- package/dist/api/sandbox/cli-list.js +63 -0
- package/dist/api/sandbox/cli-list.js.map +1 -0
- package/dist/api/sandbox/create.d.ts +82 -1
- package/dist/api/sandbox/create.d.ts.map +1 -1
- package/dist/api/sandbox/create.js +14 -10
- package/dist/api/sandbox/create.js.map +1 -1
- package/dist/api/sandbox/destroy.d.ts +9 -1
- package/dist/api/sandbox/destroy.d.ts.map +1 -1
- package/dist/api/sandbox/destroy.js +2 -2
- package/dist/api/sandbox/destroy.js.map +1 -1
- package/dist/api/sandbox/execute.d.ts +49 -1
- package/dist/api/sandbox/execute.d.ts.map +1 -1
- package/dist/api/sandbox/execute.js +4 -4
- package/dist/api/sandbox/execute.js.map +1 -1
- package/dist/api/sandbox/execution.d.ts +104 -1
- package/dist/api/sandbox/execution.d.ts.map +1 -1
- package/dist/api/sandbox/execution.js +5 -5
- package/dist/api/sandbox/execution.js.map +1 -1
- package/dist/api/sandbox/files.d.ts +100 -0
- package/dist/api/sandbox/files.d.ts.map +1 -1
- package/dist/api/sandbox/files.js +16 -16
- package/dist/api/sandbox/files.js.map +1 -1
- package/dist/api/sandbox/get.d.ts +233 -1
- package/dist/api/sandbox/get.d.ts.map +1 -1
- package/dist/api/sandbox/get.js +12 -12
- package/dist/api/sandbox/get.js.map +1 -1
- package/dist/api/sandbox/index.d.ts +25 -21
- package/dist/api/sandbox/index.d.ts.map +1 -1
- package/dist/api/sandbox/index.js +13 -11
- package/dist/api/sandbox/index.js.map +1 -1
- package/dist/api/sandbox/list.d.ts +230 -1
- package/dist/api/sandbox/list.d.ts.map +1 -1
- package/dist/api/sandbox/list.js +9 -9
- package/dist/api/sandbox/list.js.map +1 -1
- package/dist/api/sandbox/resolve.d.ts +82 -0
- package/dist/api/sandbox/resolve.d.ts.map +1 -0
- package/dist/api/sandbox/resolve.js +71 -0
- package/dist/api/sandbox/resolve.js.map +1 -0
- package/dist/api/sandbox/run.d.ts.map +1 -1
- package/dist/api/sandbox/run.js +6 -0
- package/dist/api/sandbox/run.js.map +1 -1
- package/dist/api/sandbox/runtime.d.ts +69 -1
- package/dist/api/sandbox/runtime.d.ts.map +1 -1
- package/dist/api/sandbox/runtime.js +5 -5
- package/dist/api/sandbox/runtime.js.map +1 -1
- package/dist/api/sandbox/snapshot.d.ts +202 -9
- package/dist/api/sandbox/snapshot.d.ts.map +1 -1
- package/dist/api/sandbox/snapshot.js +17 -17
- package/dist/api/sandbox/snapshot.js.map +1 -1
- package/dist/api/session/get.d.ts +123 -8
- package/dist/api/session/get.d.ts.map +1 -1
- package/dist/api/session/get.js +8 -8
- package/dist/api/session/get.js.map +1 -1
- package/dist/api/session/index.d.ts +3 -6
- package/dist/api/session/index.d.ts.map +1 -1
- package/dist/api/session/index.js +3 -3
- package/dist/api/session/index.js.map +1 -1
- package/dist/api/session/list.d.ts +2 -2
- package/dist/api/session/list.d.ts.map +1 -1
- package/dist/api/session/list.js +2 -2
- package/dist/api/session/list.js.map +1 -1
- package/dist/api/session/logs.d.ts +19 -2
- package/dist/api/session/logs.d.ts.map +1 -1
- package/dist/api/session/logs.js +4 -4
- package/dist/api/session/logs.js.map +1 -1
- package/dist/api/stream/get.d.ts +58 -0
- package/dist/api/stream/get.d.ts.map +1 -0
- package/dist/api/stream/get.js +40 -0
- package/dist/api/stream/get.js.map +1 -0
- package/dist/api/stream/index.d.ts +4 -0
- package/dist/api/stream/index.d.ts.map +1 -0
- package/dist/api/stream/index.js +4 -0
- package/dist/api/stream/index.js.map +1 -0
- package/dist/api/stream/list.d.ts +107 -0
- package/dist/api/stream/list.d.ts.map +1 -0
- package/dist/api/stream/list.js +71 -0
- package/dist/api/stream/list.js.map +1 -0
- package/dist/api/stream/util.d.ts +23 -0
- package/dist/api/stream/util.d.ts.map +1 -0
- package/dist/api/stream/util.js +3 -0
- package/dist/api/stream/util.js.map +1 -0
- package/dist/api/thread/delete.d.ts +10 -3
- package/dist/api/thread/delete.d.ts.map +1 -1
- package/dist/api/thread/delete.js +2 -2
- package/dist/api/thread/delete.js.map +1 -1
- package/dist/api/thread/get.d.ts +23 -5
- package/dist/api/thread/get.d.ts.map +1 -1
- package/dist/api/thread/get.js +2 -2
- package/dist/api/thread/get.js.map +1 -1
- package/dist/api/thread/index.d.ts +4 -4
- package/dist/api/thread/index.d.ts.map +1 -1
- package/dist/api/thread/index.js +4 -4
- package/dist/api/thread/index.js.map +1 -1
- package/dist/api/thread/list.d.ts +4 -5
- package/dist/api/thread/list.d.ts.map +1 -1
- package/dist/api/thread/list.js +3 -4
- package/dist/api/thread/list.js.map +1 -1
- package/dist/api/user/whoami.d.ts +6 -3
- package/dist/api/user/whoami.d.ts.map +1 -1
- package/dist/api/user/whoami.js +3 -3
- package/dist/api/user/whoami.js.map +1 -1
- package/package.json +4 -4
- package/src/api/api.ts +23 -2
- package/src/api/apikey/create.ts +2 -2
- package/src/api/apikey/delete.ts +1 -1
- package/src/api/apikey/get.ts +2 -2
- package/src/api/apikey/index.ts +1 -0
- package/src/api/apikey/list.ts +1 -1
- package/src/api/db/index.ts +21 -4
- package/src/api/db/logs.ts +7 -7
- package/src/api/db/query.ts +2 -2
- package/src/api/db/tables.ts +3 -3
- package/src/api/eval/get.ts +3 -3
- package/src/api/eval/index.ts +28 -4
- package/src/api/eval/list.ts +4 -4
- package/src/api/eval/run-get.ts +3 -3
- package/src/api/eval/run-list.ts +4 -4
- package/src/api/index.ts +1 -0
- package/src/api/machine/machine.ts +15 -11
- package/src/api/org/env-delete.ts +4 -4
- package/src/api/org/env-get.ts +3 -3
- package/src/api/org/env-update.ts +4 -4
- package/src/api/org/list.ts +2 -2
- package/src/api/org/resources.ts +4 -4
- package/src/api/project/agent.ts +3 -3
- package/src/api/project/create.ts +5 -5
- package/src/api/project/delete.ts +3 -3
- package/src/api/project/deploy.ts +34 -32
- package/src/api/project/deployment.ts +8 -8
- package/src/api/project/env-delete.ts +12 -8
- package/src/api/project/env-update.ts +4 -4
- package/src/api/project/exists.ts +4 -4
- package/src/api/project/get.ts +5 -5
- package/src/api/project/list.ts +14 -14
- package/src/api/project/malware.ts +12 -12
- package/src/api/project/update-region.ts +3 -3
- package/src/api/queue/analytics.ts +15 -11
- package/src/api/queue/destinations.ts +14 -12
- package/src/api/queue/dlq.ts +10 -10
- package/src/api/queue/index.ts +136 -108
- package/src/api/queue/messages.ts +22 -22
- package/src/api/queue/queues.ts +14 -14
- package/src/api/queue/sources.ts +11 -11
- package/src/api/region/create.ts +5 -5
- package/src/api/region/delete.ts +5 -5
- package/src/api/region/list.ts +2 -2
- package/src/api/region/resources.ts +2 -2
- package/src/api/sandbox/cli-list.ts +99 -0
- package/src/api/sandbox/create.ts +18 -14
- package/src/api/sandbox/destroy.ts +4 -4
- package/src/api/sandbox/execute.ts +6 -6
- package/src/api/sandbox/execution.ts +7 -7
- package/src/api/sandbox/files.ts +16 -16
- package/src/api/sandbox/get.ts +15 -15
- package/src/api/sandbox/index.ts +160 -77
- package/src/api/sandbox/list.ts +12 -12
- package/src/api/sandbox/resolve.ts +98 -0
- package/src/api/sandbox/run.ts +6 -1
- package/src/api/sandbox/runtime.ts +7 -7
- package/src/api/sandbox/snapshot.ts +20 -18
- package/src/api/session/get.ts +13 -13
- package/src/api/session/index.ts +3 -6
- package/src/api/session/list.ts +2 -2
- package/src/api/session/logs.ts +4 -4
- package/src/api/stream/get.ts +51 -0
- package/src/api/stream/index.ts +3 -0
- package/src/api/stream/list.ts +111 -0
- package/src/api/stream/util.ts +3 -0
- package/src/api/thread/delete.ts +4 -4
- package/src/api/thread/get.ts +5 -7
- package/src/api/thread/index.ts +4 -4
- package/src/api/thread/list.ts +4 -6
- package/src/api/user/whoami.ts +3 -3
package/src/api/apikey/get.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
import { APIKeyResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const APIKeyDetailSchema = z.object({
|
|
5
|
+
export const APIKeyDetailSchema = z.object({
|
|
6
6
|
id: z.string().describe('the API key id'),
|
|
7
7
|
name: z.string().describe('the API key name'),
|
|
8
8
|
orgId: z.string().describe('the organization id'),
|
|
@@ -20,7 +20,7 @@ const APIKeyDetailSchema = z.object({
|
|
|
20
20
|
.describe('the associated project'),
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
const APIKeyGetResponseSchema = APIResponseSchema(APIKeyDetailSchema);
|
|
23
|
+
export const APIKeyGetResponseSchema = APIResponseSchema(APIKeyDetailSchema);
|
|
24
24
|
|
|
25
25
|
type APIKeyGetResponse = z.infer<typeof APIKeyGetResponseSchema>;
|
|
26
26
|
|
package/src/api/apikey/index.ts
CHANGED
package/src/api/apikey/list.ts
CHANGED
|
@@ -22,7 +22,7 @@ export const APIKeySchema = z.object({
|
|
|
22
22
|
|
|
23
23
|
export const APIKeyListResponseArray = z.array(APIKeySchema);
|
|
24
24
|
|
|
25
|
-
const APIKeyListResponseSchema = APIResponseSchema(APIKeyListResponseArray);
|
|
25
|
+
export const APIKeyListResponseSchema = APIResponseSchema(APIKeyListResponseArray);
|
|
26
26
|
|
|
27
27
|
export type APIKeyListResponse = z.infer<typeof APIKeyListResponseSchema>;
|
|
28
28
|
export type APIKeyList = z.infer<typeof APIKeyListResponseArray>;
|
package/src/api/db/index.ts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {
|
|
2
|
+
DbLogsAPIResponseSchema,
|
|
3
|
+
DbLogsRequestSchema,
|
|
4
|
+
DbLogsResponseSchema,
|
|
5
|
+
type DbQueryLog,
|
|
6
|
+
DbQueryLogSchema,
|
|
7
|
+
type DbQueryLogs,
|
|
8
|
+
dbLogs,
|
|
9
|
+
} from './logs';
|
|
10
|
+
export {
|
|
11
|
+
dbQuery,
|
|
12
|
+
type QueryColumn,
|
|
13
|
+
QueryColumnSchema,
|
|
14
|
+
QueryResponseSchema,
|
|
15
|
+
type QueryResult,
|
|
16
|
+
QueryResultSchema,
|
|
17
|
+
} from './query';
|
|
2
18
|
export {
|
|
3
19
|
dbTables,
|
|
4
20
|
generateCreateTableSQL,
|
|
5
|
-
TableSchemaSchema,
|
|
6
21
|
type TableColumn,
|
|
22
|
+
TableColumnSchema,
|
|
7
23
|
type TableSchema,
|
|
24
|
+
TableSchemaSchema,
|
|
25
|
+
TablesResponseSchema,
|
|
8
26
|
} from './tables';
|
|
9
|
-
export {
|
|
10
|
-
export { DbResponseError, DbInvalidArgumentError } from './util';
|
|
27
|
+
export { DbInvalidArgumentError, DbResponseError } from './util';
|
package/src/api/db/logs.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
import { DbInvalidArgumentError, DbResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
export const DbLogsRequestSchema = z.object({
|
|
6
6
|
database: z.string().describe('the database name'),
|
|
7
7
|
orgId: z.string().describe('the organization ID'),
|
|
8
8
|
region: z.string().describe('the region'),
|
|
@@ -28,12 +28,12 @@ export const DbQueryLogSchema = z.object({
|
|
|
28
28
|
sessionId: z.string().optional().describe('session ID with sess_ prefix'),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
const
|
|
31
|
+
export const DbLogsResponseSchema = z.array(DbQueryLogSchema);
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
export const DbLogsAPIResponseSchema = APIResponseSchema(DbLogsResponseSchema);
|
|
34
34
|
|
|
35
|
-
type DbLogsRequest = z.infer<typeof
|
|
36
|
-
type
|
|
35
|
+
type DbLogsRequest = z.infer<typeof DbLogsRequestSchema>;
|
|
36
|
+
type DbLogsAPIResponse = z.infer<typeof DbLogsAPIResponseSchema>;
|
|
37
37
|
|
|
38
38
|
export type DbQueryLog = z.infer<typeof DbQueryLogSchema>;
|
|
39
39
|
export type DbQueryLogs = DbQueryLog[];
|
|
@@ -62,7 +62,7 @@ export async function dbLogs(client: APIClient, request: DbLogsRequest): Promise
|
|
|
62
62
|
const queryString = params.toString();
|
|
63
63
|
const url = `/resource/2025-03-17/${orgId}/${region}/${database}/logs${queryString ? `?${queryString}` : ''}`;
|
|
64
64
|
|
|
65
|
-
const resp = await client.get<
|
|
65
|
+
const resp = await client.get<DbLogsAPIResponse>(url, DbLogsAPIResponseSchema);
|
|
66
66
|
|
|
67
67
|
if (resp.success) {
|
|
68
68
|
return resp.data;
|
package/src/api/db/query.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIClient, APIError } from '../api';
|
|
3
3
|
import { DbInvalidArgumentError, DbResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const QueryColumnSchema = z.object({
|
|
5
|
+
export const QueryColumnSchema = z.object({
|
|
6
6
|
name: z.string().describe('column name'),
|
|
7
7
|
type: z.string().describe('PostgreSQL data type OID'),
|
|
8
8
|
});
|
|
@@ -14,7 +14,7 @@ export const QueryResultSchema = z.object({
|
|
|
14
14
|
truncated: z.boolean().describe('whether results were truncated (max 1000 rows)'),
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const QueryResponseSchema = z.object({
|
|
17
|
+
export const QueryResponseSchema = z.object({
|
|
18
18
|
success: z.boolean(),
|
|
19
19
|
message: z.string().optional(),
|
|
20
20
|
data: QueryResultSchema.optional(),
|
package/src/api/db/tables.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
import { DbInvalidArgumentError, DbResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const TableColumnSchema = z.object({
|
|
5
|
+
export const TableColumnSchema = z.object({
|
|
6
6
|
name: z.string().describe('column name'),
|
|
7
7
|
data_type: z.string().describe('PostgreSQL data type'),
|
|
8
8
|
is_nullable: z.boolean().describe('whether the column is nullable'),
|
|
@@ -15,7 +15,7 @@ export const TableSchemaSchema = z.object({
|
|
|
15
15
|
columns: z.array(TableColumnSchema).describe('table columns'),
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
const TablesResponseSchema = APIResponseSchema(
|
|
18
|
+
export const TablesResponseSchema = APIResponseSchema(
|
|
19
19
|
z.object({
|
|
20
20
|
tables: z.array(TableSchemaSchema),
|
|
21
21
|
})
|
package/src/api/eval/get.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
|
|
4
|
-
const EvaluationDetailSchema = z.object({
|
|
4
|
+
export const EvaluationDetailSchema = z.object({
|
|
5
5
|
id: z.string().describe('Evaluation ID'),
|
|
6
6
|
name: z.string().describe('Evaluation name'),
|
|
7
7
|
description: z.string().nullable().describe('Evaluation description'),
|
|
@@ -14,7 +14,7 @@ const EvaluationDetailSchema = z.object({
|
|
|
14
14
|
updatedAt: z.string().describe('Last updated timestamp'),
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const EvalGetResponseSchema = APIResponseSchema(EvaluationDetailSchema);
|
|
17
|
+
export const EvalGetResponseSchema = APIResponseSchema(EvaluationDetailSchema);
|
|
18
18
|
|
|
19
19
|
export type EvaluationDetail = z.infer<typeof EvaluationDetailSchema>;
|
|
20
20
|
|
package/src/api/eval/index.ts
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export {
|
|
2
|
+
EvalGetResponseSchema,
|
|
3
|
+
type EvaluationDetail,
|
|
4
|
+
EvaluationDetailSchema,
|
|
5
|
+
evalGet,
|
|
6
|
+
} from './get';
|
|
7
|
+
export {
|
|
8
|
+
EvalListResponseData,
|
|
9
|
+
EvalListResponseSchema,
|
|
10
|
+
type Evaluation,
|
|
11
|
+
type EvaluationListRequest,
|
|
12
|
+
EvaluationSchema,
|
|
13
|
+
evalList,
|
|
14
|
+
} from './list';
|
|
15
|
+
export {
|
|
16
|
+
type EvalRunDetail,
|
|
17
|
+
EvalRunDetailSchema,
|
|
18
|
+
EvalRunGetResponseSchema,
|
|
19
|
+
evalRunGet,
|
|
20
|
+
} from './run-get';
|
|
21
|
+
export {
|
|
22
|
+
type EvalRunListItem,
|
|
23
|
+
type EvalRunListRequest,
|
|
24
|
+
EvalRunListResponseData,
|
|
25
|
+
EvalRunListResponseSchema,
|
|
26
|
+
EvalRunSchema,
|
|
27
|
+
evalRunList,
|
|
28
|
+
} from './run-list';
|
package/src/api/eval/list.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
|
|
4
|
-
const EvaluationSchema = z.object({
|
|
4
|
+
export const EvaluationSchema = z.object({
|
|
5
5
|
id: z.string().describe('Evaluation ID'),
|
|
6
6
|
name: z.string().describe('Evaluation name'),
|
|
7
7
|
description: z.string().nullable().describe('Evaluation description'),
|
|
@@ -13,8 +13,8 @@ const EvaluationSchema = z.object({
|
|
|
13
13
|
updatedAt: z.string().describe('Last updated timestamp'),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
const EvalListResponseData = z.array(EvaluationSchema);
|
|
17
|
-
const EvalListResponseSchema = APIResponseSchema(EvalListResponseData);
|
|
16
|
+
export const EvalListResponseData = z.array(EvaluationSchema);
|
|
17
|
+
export const EvalListResponseSchema = APIResponseSchema(EvalListResponseData);
|
|
18
18
|
|
|
19
19
|
export type Evaluation = z.infer<typeof EvaluationSchema>;
|
|
20
20
|
export type EvaluationListRequest = {
|
package/src/api/eval/run-get.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
|
|
4
|
-
const EvalRunDetailSchema = z.object({
|
|
4
|
+
export const EvalRunDetailSchema = z.object({
|
|
5
5
|
id: z.string().describe('Eval run ID'),
|
|
6
6
|
sessionId: z.string().describe('Session ID'),
|
|
7
7
|
evalId: z.string().describe('Evaluation record ID'),
|
|
@@ -20,7 +20,7 @@ const EvalRunDetailSchema = z.object({
|
|
|
20
20
|
updatedAt: z.string().describe('Last updated timestamp'),
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
const EvalRunGetResponseSchema = APIResponseSchema(EvalRunDetailSchema);
|
|
23
|
+
export const EvalRunGetResponseSchema = APIResponseSchema(EvalRunDetailSchema);
|
|
24
24
|
|
|
25
25
|
export type EvalRunDetail = z.infer<typeof EvalRunDetailSchema>;
|
|
26
26
|
|
package/src/api/eval/run-list.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
|
|
4
|
-
const EvalRunSchema = z.object({
|
|
4
|
+
export const EvalRunSchema = z.object({
|
|
5
5
|
id: z.string().describe('Eval run ID'),
|
|
6
6
|
sessionId: z.string().describe('Session ID'),
|
|
7
7
|
evalId: z.string().describe('Evaluation record ID'),
|
|
@@ -19,8 +19,8 @@ const EvalRunSchema = z.object({
|
|
|
19
19
|
updatedAt: z.string().describe('Last updated timestamp'),
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
const EvalRunListResponseData = z.array(EvalRunSchema);
|
|
23
|
-
const EvalRunListResponseSchema = APIResponseSchema(EvalRunListResponseData);
|
|
22
|
+
export const EvalRunListResponseData = z.array(EvalRunSchema);
|
|
23
|
+
export const EvalRunListResponseSchema = APIResponseSchema(EvalRunListResponseData);
|
|
24
24
|
|
|
25
25
|
export type EvalRunListItem = z.infer<typeof EvalRunSchema>;
|
|
26
26
|
export type EvalRunListRequest = {
|
package/src/api/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { MachineResponseError } from './util';
|
|
|
5
5
|
// TODO: The old /cli/auth/machine/* endpoints should be aliased to redirect
|
|
6
6
|
// to /cli/auth/org/* in the backend (app repo). Remove aliases in follow-up PR.
|
|
7
7
|
|
|
8
|
-
const MachineSchema = z.object({
|
|
8
|
+
export const MachineSchema = z.object({
|
|
9
9
|
id: z.string(),
|
|
10
10
|
instanceId: z.string().nullable().optional(),
|
|
11
11
|
privateIPv4: z.string().nullable().optional(),
|
|
@@ -28,9 +28,9 @@ const MachineSchema = z.object({
|
|
|
28
28
|
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
const MachineListResponseSchema = APIResponseSchema(z.array(MachineSchema));
|
|
32
|
-
const MachineGetResponseSchema = APIResponseSchema(MachineSchema);
|
|
33
|
-
const MachineDeleteResponseSchema = APIResponseSchemaNoData();
|
|
31
|
+
export const MachineListResponseSchema = APIResponseSchema(z.array(MachineSchema));
|
|
32
|
+
export const MachineGetResponseSchema = APIResponseSchema(MachineSchema);
|
|
33
|
+
export const MachineDeleteResponseSchema = APIResponseSchemaNoData();
|
|
34
34
|
|
|
35
35
|
export type Machine = z.infer<typeof MachineSchema>;
|
|
36
36
|
|
|
@@ -57,20 +57,24 @@ export async function machineDelete(client: APIClient, machineId: string): Promi
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const MachineDeploymentProjectSchema = z.object({
|
|
60
|
+
export const MachineDeploymentProjectSchema = z.object({
|
|
61
61
|
id: z.string(),
|
|
62
62
|
name: z.string(),
|
|
63
63
|
identifier: z.string(),
|
|
64
64
|
domains: z.array(z.string()),
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
export type MachineDeploymentProject = z.infer<typeof MachineDeploymentProjectSchema>;
|
|
68
|
+
|
|
69
|
+
export const MachineDeploymentResourcesSchema = z.object({
|
|
68
70
|
cpuUnits: z.number(),
|
|
69
71
|
memoryUnits: z.number(),
|
|
70
72
|
diskUnits: z.number(),
|
|
71
73
|
});
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
export type MachineDeploymentResources = z.infer<typeof MachineDeploymentResourcesSchema>;
|
|
76
|
+
|
|
77
|
+
export const MachineDeploymentSchema = z.object({
|
|
74
78
|
id: z.string(),
|
|
75
79
|
identifier: z.string().optional(),
|
|
76
80
|
state: z.string().optional(),
|
|
@@ -82,7 +86,7 @@ const MachineDeploymentSchema = z.object({
|
|
|
82
86
|
domainSuffix: z.string(),
|
|
83
87
|
});
|
|
84
88
|
|
|
85
|
-
const MachineDeploymentsResponseSchema = APIResponseSchema(z.array(MachineDeploymentSchema));
|
|
89
|
+
export const MachineDeploymentsResponseSchema = APIResponseSchema(z.array(MachineDeploymentSchema));
|
|
86
90
|
|
|
87
91
|
export type MachineDeployment = z.infer<typeof MachineDeploymentSchema>;
|
|
88
92
|
|
|
@@ -100,7 +104,7 @@ export async function machineDeployments(
|
|
|
100
104
|
throw new MachineResponseError({ message: resp.message });
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
const OrgAuthEnrollResponseSchema = APIResponseSchema(
|
|
107
|
+
export const OrgAuthEnrollResponseSchema = APIResponseSchema(
|
|
104
108
|
z.object({
|
|
105
109
|
orgId: z.string(),
|
|
106
110
|
})
|
|
@@ -122,7 +126,7 @@ export async function orgAuthEnroll(
|
|
|
122
126
|
throw new MachineResponseError({ message: resp.message });
|
|
123
127
|
}
|
|
124
128
|
|
|
125
|
-
const OrgAuthStatusResponseSchema = APIResponseSchema(
|
|
129
|
+
export const OrgAuthStatusResponseSchema = APIResponseSchema(
|
|
126
130
|
z.object({
|
|
127
131
|
publicKey: z.string().nullable(),
|
|
128
132
|
})
|
|
@@ -139,7 +143,7 @@ export async function orgAuthStatus(
|
|
|
139
143
|
throw new MachineResponseError({ message: resp.message });
|
|
140
144
|
}
|
|
141
145
|
|
|
142
|
-
const OrgAuthUnenrollResponseSchema = APIResponseSchemaNoData();
|
|
146
|
+
export const OrgAuthUnenrollResponseSchema = APIResponseSchemaNoData();
|
|
143
147
|
|
|
144
148
|
export async function orgAuthUnenroll(client: APIClient, orgId: string): Promise<void> {
|
|
145
149
|
const resp = await client.delete(
|
|
@@ -2,16 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIClient, APIResponseSchemaNoData } from '../api';
|
|
3
3
|
import { OrgResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
export const OrgEnvDeleteRequestSchema = z.object({
|
|
6
6
|
id: z.string().describe('the organization id'),
|
|
7
7
|
env: z.array(z.string()).optional().describe('environment variable keys to delete'),
|
|
8
8
|
secrets: z.array(z.string()).optional().describe('secret keys to delete'),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
const OrgEnvDeleteResponseSchema = APIResponseSchemaNoData();
|
|
11
|
+
export const OrgEnvDeleteResponseSchema = APIResponseSchemaNoData();
|
|
12
12
|
|
|
13
|
-
type OrgEnvDeleteRequest = z.infer<typeof
|
|
14
|
-
type OrgEnvDeleteResponse = z.infer<typeof OrgEnvDeleteResponseSchema>;
|
|
13
|
+
export type OrgEnvDeleteRequest = z.infer<typeof OrgEnvDeleteRequestSchema>;
|
|
14
|
+
export type OrgEnvDeleteResponse = z.infer<typeof OrgEnvDeleteResponseSchema>;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Delete environment variables and/or secrets from an organization.
|
package/src/api/org/env-get.ts
CHANGED
|
@@ -2,19 +2,19 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
import { OrgResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const OrgEnvDataSchema = z.object({
|
|
5
|
+
export const OrgEnvDataSchema = z.object({
|
|
6
6
|
id: z.string().describe('the organization id'),
|
|
7
7
|
env: z.record(z.string(), z.string()).optional().describe('environment variables'),
|
|
8
8
|
secrets: z.record(z.string(), z.string()).optional().describe('secrets (may be masked)'),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
const OrgEnvGetResponseSchema = APIResponseSchema(OrgEnvDataSchema);
|
|
11
|
+
export const OrgEnvGetResponseSchema = APIResponseSchema(OrgEnvDataSchema);
|
|
12
12
|
|
|
13
13
|
interface OrgEnvGetRequest {
|
|
14
14
|
id: string;
|
|
15
15
|
mask?: boolean;
|
|
16
16
|
}
|
|
17
|
-
type OrgEnvGetResponse = z.infer<typeof OrgEnvGetResponseSchema>;
|
|
17
|
+
export type OrgEnvGetResponse = z.infer<typeof OrgEnvGetResponseSchema>;
|
|
18
18
|
|
|
19
19
|
export type OrgEnv = z.infer<typeof OrgEnvDataSchema>;
|
|
20
20
|
|
|
@@ -2,16 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIClient, APIResponseSchemaNoData } from '../api';
|
|
3
3
|
import { OrgResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
export const OrgEnvUpdateRequestSchema = z.object({
|
|
6
6
|
id: z.string().describe('the organization id'),
|
|
7
7
|
env: z.record(z.string(), z.string()).optional().describe('environment variables to set/update'),
|
|
8
8
|
secrets: z.record(z.string(), z.string()).optional().describe('secrets to set/update'),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
const OrgEnvUpdateResponseSchema = APIResponseSchemaNoData();
|
|
11
|
+
export const OrgEnvUpdateResponseSchema = APIResponseSchemaNoData();
|
|
12
12
|
|
|
13
|
-
type OrgEnvUpdateRequest = z.infer<typeof
|
|
14
|
-
type OrgEnvUpdateResponse = z.infer<typeof OrgEnvUpdateResponseSchema>;
|
|
13
|
+
export type OrgEnvUpdateRequest = z.infer<typeof OrgEnvUpdateRequestSchema>;
|
|
14
|
+
export type OrgEnvUpdateResponse = z.infer<typeof OrgEnvUpdateResponseSchema>;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Update environment variables and/or secrets for an organization.
|
package/src/api/org/list.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIResponseSchema, APIClient } from '../api';
|
|
3
3
|
import { OrgResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const ListOrganizationsResponse = z.array(
|
|
5
|
+
export const ListOrganizationsResponse = z.array(
|
|
6
6
|
z.object({
|
|
7
7
|
id: z.string().describe('the unique id for the organization'),
|
|
8
8
|
name: z.string().describe('the name of the organization'),
|
|
9
9
|
})
|
|
10
10
|
);
|
|
11
|
-
const ListOrganizationsResponseSchema = APIResponseSchema(ListOrganizationsResponse);
|
|
11
|
+
export const ListOrganizationsResponseSchema = APIResponseSchema(ListOrganizationsResponse);
|
|
12
12
|
|
|
13
13
|
export type ListOrganizationsResponse = z.infer<typeof ListOrganizationsResponseSchema>;
|
|
14
14
|
export type OrganizationList = z.infer<typeof ListOrganizationsResponse>;
|
package/src/api/org/resources.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { APIResponseSchema, APIClient } from '../api';
|
|
3
3
|
import { OrgResourceResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const OrgS3Resource = z.object({
|
|
5
|
+
export const OrgS3Resource = z.object({
|
|
6
6
|
bucket_name: z.string().describe('the S3 bucket name'),
|
|
7
7
|
access_key: z.string().nullable().optional().describe('the S3 access key'),
|
|
8
8
|
secret_key: z.string().nullable().optional().describe('the S3 secret key'),
|
|
@@ -16,7 +16,7 @@ const OrgS3Resource = z.object({
|
|
|
16
16
|
description: z.string().nullable().optional().describe('optional description of the bucket'),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
const OrgDBResource = z.object({
|
|
19
|
+
export const OrgDBResource = z.object({
|
|
20
20
|
name: z.string().describe('the database name'),
|
|
21
21
|
description: z.string().nullable().optional().describe('optional description of the database'),
|
|
22
22
|
username: z.string().nullable().optional().describe('the database username'),
|
|
@@ -28,12 +28,12 @@ const OrgDBResource = z.object({
|
|
|
28
28
|
internal: z.boolean().describe('whether this is a system-managed database (KV/Vector/Queue)'),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
const OrgResourceListResponse = z.object({
|
|
31
|
+
export const OrgResourceListResponse = z.object({
|
|
32
32
|
s3: z.array(OrgS3Resource),
|
|
33
33
|
db: z.array(OrgDBResource),
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
const OrgResourceListResponseSchema = APIResponseSchema(OrgResourceListResponse);
|
|
36
|
+
export const OrgResourceListResponseSchema = APIResponseSchema(OrgResourceListResponse);
|
|
37
37
|
|
|
38
38
|
export type OrgResourceListResponse = z.infer<typeof OrgResourceListResponseSchema>;
|
|
39
39
|
export type OrgResourceList = z.infer<typeof OrgResourceListResponse>;
|
package/src/api/project/agent.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { APIClient } from '../api';
|
|
|
3
3
|
import { APIResponseSchema } from '../api';
|
|
4
4
|
import { AgentNotFoundError, ProjectResponseError } from './util';
|
|
5
5
|
|
|
6
|
-
const AgentSchema = z.object({
|
|
6
|
+
export const AgentSchema = z.object({
|
|
7
7
|
id: z.string().describe('Agent ID (same as identifier)'),
|
|
8
8
|
name: z.string().describe('Agent name'),
|
|
9
9
|
description: z.string().nullable().describe('Agent description'),
|
|
@@ -28,8 +28,8 @@ const AgentSchema = z.object({
|
|
|
28
28
|
.describe('Associated evaluations'),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
const AgentListResponseSchema = APIResponseSchema(z.array(AgentSchema));
|
|
32
|
-
const AgentGetResponseSchema = APIResponseSchema(z.array(AgentSchema));
|
|
31
|
+
export const AgentListResponseSchema = APIResponseSchema(z.array(AgentSchema));
|
|
32
|
+
export const AgentGetResponseSchema = APIResponseSchema(z.array(AgentSchema));
|
|
33
33
|
|
|
34
34
|
export type Agent = z.infer<typeof AgentSchema>;
|
|
35
35
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
import { ProjectResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const CreateProjectRequestSchema = z.object({
|
|
5
|
+
export const CreateProjectRequestSchema = z.object({
|
|
6
6
|
name: z.string().max(255).min(1).describe('the name of the new project'),
|
|
7
7
|
description: z.string().max(255).min(0).optional().describe('the description of the project'),
|
|
8
8
|
tags: z.array(z.string()).optional().describe('tags for the project'),
|
|
@@ -11,16 +11,16 @@ const CreateProjectRequestSchema = z.object({
|
|
|
11
11
|
domains: z.array(z.string()).optional().describe('the custom domains for this project'),
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
export const NewProjectSchema = z.object({
|
|
15
15
|
id: z.string().describe('the unique id for the project'),
|
|
16
16
|
sdkKey: z.string().describe('the SDK key for the project'),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
const CreateProjectResponseSchema = APIResponseSchema(
|
|
19
|
+
export const CreateProjectResponseSchema = APIResponseSchema(NewProjectSchema);
|
|
20
20
|
|
|
21
21
|
export type CreateProjectRequest = z.infer<typeof CreateProjectRequestSchema>;
|
|
22
22
|
export type CreateProjectResponse = z.infer<typeof CreateProjectResponseSchema>;
|
|
23
|
-
export type NewProject = z.infer<typeof
|
|
23
|
+
export type NewProject = z.infer<typeof NewProjectSchema>;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Create a new Project
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
3
|
import { ProjectResponseError } from './util';
|
|
4
4
|
|
|
5
|
-
const ProjectDeleteRequestSchema = z.object({ ids: z.array(z.string()) });
|
|
6
|
-
const ProjectDeleteResponseSchema = APIResponseSchema(z.array(z.string()));
|
|
5
|
+
export const ProjectDeleteRequestSchema = z.object({ ids: z.array(z.string()) });
|
|
6
|
+
export const ProjectDeleteResponseSchema = APIResponseSchema(z.array(z.string()));
|
|
7
7
|
|
|
8
8
|
type ProjectDeleteRequest = z.infer<typeof ProjectDeleteRequestSchema>;
|
|
9
9
|
type ProjectDeleteResponse = z.infer<typeof ProjectDeleteResponseSchema>;
|