@archastro/sdk 0.1.0 → 0.2.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/types/agents.d.ts +590 -443
- package/dist/types/agents.d.ts.map +1 -1
- package/dist/types/agents.js +48 -38
- package/dist/types/agents.js.map +1 -1
- package/dist/types/ai.d.ts +49 -49
- package/dist/types/ai.js +6 -6
- package/dist/types/ai.js.map +1 -1
- package/dist/types/api.d.ts +169 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +49 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/artifacts.d.ts +104 -24
- package/dist/types/artifacts.d.ts.map +1 -1
- package/dist/types/artifacts.js +4 -3
- package/dist/types/artifacts.js.map +1 -1
- package/dist/types/automations.d.ts +15 -15
- package/dist/types/automations.js +4 -4
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +258 -6
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/chat.js +5 -3
- package/dist/types/chat.js.map +1 -1
- package/dist/types/common.d.ts +3137 -950
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +210 -166
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +24 -24
- package/dist/types/config.js +6 -6
- package/dist/types/config.js.map +1 -1
- package/dist/types/device.d.ts +26 -0
- package/dist/types/device.d.ts.map +1 -0
- package/dist/types/device.js +14 -0
- package/dist/types/device.js.map +1 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/me.d.ts +176 -20
- package/dist/types/me.d.ts.map +1 -1
- package/dist/types/me.js +4 -3
- package/dist/types/me.js.map +1 -1
- package/dist/types/members.d.ts +3 -3
- package/dist/types/members.js +2 -2
- package/dist/types/members.js.map +1 -1
- package/dist/types/messages.d.ts +457 -49
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +19 -18
- package/dist/types/messages.js.map +1 -1
- package/dist/types/oauth.d.ts +206 -0
- package/dist/types/oauth.d.ts.map +1 -0
- package/dist/types/oauth.js +51 -0
- package/dist/types/oauth.js.map +1 -0
- package/dist/types/orgs.d.ts +6 -6
- package/dist/types/picture.d.ts +2 -2
- package/dist/types/profile.d.ts +2 -2
- package/dist/types/reactions.d.ts +5 -5
- package/dist/types/reactions.js +2 -2
- package/dist/types/reactions.js.map +1 -1
- package/dist/types/schedules.d.ts +5 -5
- package/dist/types/schedules.js +2 -2
- package/dist/types/schedules.js.map +1 -1
- package/dist/types/teams.d.ts +750 -70
- package/dist/types/teams.d.ts.map +1 -1
- package/dist/types/teams.js +13 -10
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +1165 -201
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +26 -26
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +53 -13
- package/dist/types/users.d.ts.map +1 -1
- package/dist/types/users.js +4 -4
- package/dist/types/users.js.map +1 -1
- package/dist/v1/resources/agent_installations.d.ts +1 -1
- package/dist/v1/resources/agent_installations.d.ts.map +1 -1
- package/dist/v1/resources/agent_installations.js +1 -1
- package/dist/v1/resources/agents.d.ts +18 -5
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +19 -1
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/api.d.ts +1026 -0
- package/dist/v1/resources/api.d.ts.map +1 -0
- package/dist/v1/resources/api.js +944 -0
- package/dist/v1/resources/api.js.map +1 -0
- package/dist/v1/resources/artifacts.d.ts +2 -2
- package/dist/v1/resources/artifacts.d.ts.map +1 -1
- package/dist/v1/resources/artifacts.js +1 -1
- package/dist/v1/resources/config.d.ts +4 -4
- package/dist/v1/resources/config.d.ts.map +1 -1
- package/dist/v1/resources/config.js +1 -1
- package/dist/v1/resources/custom_objects.d.ts +2 -2
- package/dist/v1/resources/custom_objects.d.ts.map +1 -1
- package/dist/v1/resources/custom_objects.js +1 -1
- package/dist/v1/resources/oauth.d.ts +25 -0
- package/dist/v1/resources/oauth.d.ts.map +1 -0
- package/dist/v1/resources/oauth.js +41 -0
- package/dist/v1/resources/oauth.js.map +1 -0
- package/dist/v1/resources/teams.d.ts +185 -23
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +1 -1
- package/dist/v1/resources/thread_messages.d.ts +2 -3
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +1 -1
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +102 -6
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +1 -1
- package/dist/v1/resources/users.d.ts +127 -13
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +1 -1
- package/package.json +1 -1
package/dist/types/common.js
CHANGED
|
@@ -1,10 +1,79 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 77f68e7b23d3
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { imageSourceSchema } from "./image.js";
|
|
6
|
-
import {
|
|
6
|
+
import { mediaVariantSchema } from "./me.js";
|
|
7
7
|
import { userSchema } from "./users.js";
|
|
8
|
+
/** Schema for a message actor (user or agent).
|
|
9
|
+
|
|
10
|
+
Actors represent the entity that sent a message.
|
|
11
|
+
Maps to the actor format from MessageActorHelper.build_actor/1.
|
|
12
|
+
*/
|
|
13
|
+
export const actorSchema = z.object({
|
|
14
|
+
alias: z.string().optional(), // Actor alias/handle
|
|
15
|
+
id: z.string().optional(), // Actor ID (format: user-xxx or agent-xxx)
|
|
16
|
+
name: z.string().optional(), // Actor display name
|
|
17
|
+
profile_picture: imageSourceSchema.optional(), // Profile picture
|
|
18
|
+
});
|
|
19
|
+
/** Schema for a message attachment.
|
|
20
|
+
|
|
21
|
+
Attachments can be of various types (file, scraped_link, artifact, task, media, action).
|
|
22
|
+
Fields present depend on the attachment type.
|
|
23
|
+
Maps to format_attachments_for_client/1 output.
|
|
24
|
+
*/
|
|
25
|
+
export const attachmentSchema = z.object({
|
|
26
|
+
content_type: z.string().optional(), // MIME content type (file, artifact, media types)
|
|
27
|
+
description: z.string().optional(), // Description (scraped_link, artifact, task types)
|
|
28
|
+
filename: z.string().optional(), // File name (file, artifact, media types)
|
|
29
|
+
height: z.number().int().optional(), // Media height (media type)
|
|
30
|
+
id: z.string(), // Attachment ID
|
|
31
|
+
image_height: z.number().int().optional(), // Preview image height (scraped_link type)
|
|
32
|
+
image_source: imageSourceSchema.optional(), // Image metadata (file, scraped_link, artifact, media types)
|
|
33
|
+
image_url: z.string().optional(), // Preview image URL (scraped_link type)
|
|
34
|
+
image_width: z.number().int().optional(), // Preview image width (scraped_link type)
|
|
35
|
+
media_type: z.string().optional(), // Media type (media type)
|
|
36
|
+
name: z.string().optional(), // Media name (media type)
|
|
37
|
+
object: z.record(z.unknown()).optional(), // Embedded object (task, action types)
|
|
38
|
+
title: z.string().optional(), // Title (scraped_link, artifact, task types)
|
|
39
|
+
type: z.string(), // Attachment type: file, scraped_link, artifact, task, media, action
|
|
40
|
+
url: z.string().optional(), // URL to the resource (file, scraped_link, artifact, media types)
|
|
41
|
+
variants: z.array(mediaVariantSchema).optional(), // Media variants (media type)
|
|
42
|
+
version: z.number().int().optional(), // Artifact version number (artifact type)
|
|
43
|
+
width: z.number().int().optional(), // Media width (media type)
|
|
44
|
+
});
|
|
45
|
+
/** API schema for a single ACL grant entry. */
|
|
46
|
+
export const aclGrantSchema = z.object({
|
|
47
|
+
actions: z.array(z.string()), // List of allowed actions (e.g. read, write)
|
|
48
|
+
principal: z.string().optional(), // Principal identifier (UUID for user/team/org/agent_user, role name for org_role, omit for everyone)
|
|
49
|
+
principal_type: z.string(), // Principal type: user, team, org, org_role, agent, or everyone
|
|
50
|
+
});
|
|
51
|
+
/** API schema for identifying a principal to remove from an ACL. */
|
|
52
|
+
export const aclRemoveTargetSchema = z.object({
|
|
53
|
+
principal: z.string().optional(), // Principal identifier to remove (omit for everyone)
|
|
54
|
+
principal_type: z.string(), // Principal type to remove
|
|
55
|
+
});
|
|
56
|
+
/** Reusable API schema for access control lists.
|
|
57
|
+
|
|
58
|
+
Supports two modes (mutually exclusive):
|
|
59
|
+
|
|
60
|
+
**Replace mode** — send `grants` to replace all entries:
|
|
61
|
+
|
|
62
|
+
{"grants": [{"principal_type": "user", "principal": "...", "actions": ["read"]}]}
|
|
63
|
+
|
|
64
|
+
Use `{"grants": []}` to clear all entries.
|
|
65
|
+
|
|
66
|
+
**Patch mode** — send `add` and/or `remove`:
|
|
67
|
+
|
|
68
|
+
{"add": [...grants...], "remove": [{"principal_type": "user", "principal": "..."}]}
|
|
69
|
+
|
|
70
|
+
Cannot mix `grants` with `add`/`remove`.
|
|
71
|
+
*/
|
|
72
|
+
export const aclSchema = z.object({
|
|
73
|
+
add: z.array(aclGrantSchema).optional(), // Patch mode: grants to add or merge into existing
|
|
74
|
+
grants: z.array(aclGrantSchema).optional(), // Replace mode: full list of grants (replaces all existing). Use [] to clear.
|
|
75
|
+
remove: z.array(aclRemoveTargetSchema).optional(), // Patch mode: principals to remove from existing
|
|
76
|
+
});
|
|
8
77
|
/** Schema for a thread in the developer portal.
|
|
9
78
|
|
|
10
79
|
Maps to serialized thread output from developer portal API.
|
|
@@ -34,9 +103,9 @@ export const contextIngestionSchema = z.object({
|
|
|
34
103
|
agent: z.string().optional(), // Agent
|
|
35
104
|
completed_at: z.string().optional(), // Completed timestamp
|
|
36
105
|
created_at: z.string().optional(), // Created timestamp
|
|
37
|
-
error: z.unknown().optional(), // Error details (if failed)
|
|
106
|
+
error: z.record(z.unknown()).optional(), // Error details (if failed)
|
|
38
107
|
id: z.string(), // Public ID (cig_...)
|
|
39
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
108
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
40
109
|
source: z.string().optional(), // Source ID
|
|
41
110
|
started_at: z.string().optional(), // Started timestamp
|
|
42
111
|
status: z.string(), // Status (pending, running, awaiting_callback, succeeded, failed)
|
|
@@ -57,18 +126,18 @@ export const workingMemoryEntrySchema = z.object({
|
|
|
57
126
|
/** Schema for a sandbox-captured email.
|
|
58
127
|
*/
|
|
59
128
|
export const sandboxEmailSchema = z.object({
|
|
60
|
-
bcc: z.array(z.unknown()).optional(), // BCC recipients
|
|
61
|
-
cc: z.array(z.unknown()).optional(), // CC recipients
|
|
129
|
+
bcc: z.array(z.record(z.unknown())).optional(), // BCC recipients
|
|
130
|
+
cc: z.array(z.record(z.unknown())).optional(), // CC recipients
|
|
62
131
|
created_at: z.string().optional(), // When the email was captured
|
|
63
132
|
from_address: z.string(), // Sender email address
|
|
64
133
|
from_name: z.string().optional(), // Sender display name
|
|
65
|
-
headers: z.unknown().optional(), // Custom email headers
|
|
134
|
+
headers: z.record(z.unknown()).optional(), // Custom email headers
|
|
66
135
|
html_body: z.string().optional(), // HTML body
|
|
67
136
|
id: z.string(), // Public ID (sem_...)
|
|
68
|
-
reply_to: z.unknown().optional(), // Reply-to address
|
|
137
|
+
reply_to: z.record(z.unknown()).optional(), // Reply-to address
|
|
69
138
|
subject: z.string().optional(), // Email subject
|
|
70
139
|
text_body: z.string().optional(), // Plain text body
|
|
71
|
-
to: z.array(z.unknown()), // Recipients [{name, address}]
|
|
140
|
+
to: z.array(z.record(z.unknown())), // Recipients [{name, address}]
|
|
72
141
|
});
|
|
73
142
|
/** Schema for an LLM session call.
|
|
74
143
|
|
|
@@ -82,7 +151,7 @@ export const llmCallSchema = z.object({
|
|
|
82
151
|
id: z.string(), // Public ID (alc_...)
|
|
83
152
|
latency_ms: z.number().int(), // Latency in milliseconds
|
|
84
153
|
message_count: z.number().int().optional(), // Number of messages included in the call metadata
|
|
85
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
154
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
86
155
|
model: z.string().optional(), // LLM model name
|
|
87
156
|
prompt_tokens: z.number().int(), // Number of prompt tokens
|
|
88
157
|
session_id: z.string(), // Session UUID grouping related calls
|
|
@@ -112,22 +181,26 @@ export const webhookEventSchema = z.object({
|
|
|
112
181
|
created_at: z.string().optional(), // Created timestamp
|
|
113
182
|
error: z.string().optional(), // Error message if failed
|
|
114
183
|
event_type: z.string().optional(), // Event type from the provider
|
|
115
|
-
headers: z.unknown().optional(), // Request headers
|
|
184
|
+
headers: z.record(z.unknown()).optional(), // Request headers
|
|
116
185
|
id: z.string(), // Public ID (whe_...)
|
|
117
|
-
payload: z.unknown().optional(), // Event payload
|
|
186
|
+
payload: z.record(z.unknown()).optional(), // Event payload
|
|
118
187
|
processed_at: z.string().optional(), // When the event was processed
|
|
119
188
|
status: z.string(), // Processing status (pending, processed, failed)
|
|
120
189
|
});
|
|
121
|
-
/** Schema for
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
190
|
+
/** Schema for an eval result. */
|
|
191
|
+
export const evalResultSchema = z.object({
|
|
192
|
+
agent_response: z.string().optional(), // Agent response
|
|
193
|
+
created_at: z.string().optional(), // Created timestamp
|
|
194
|
+
duration_ms: z.number().int().optional(), // Execution duration
|
|
195
|
+
grader_details: z.record(z.unknown()).optional(), // Grader details
|
|
196
|
+
id: z.string(), // Eval result ID
|
|
197
|
+
run: z.string(), // Parent eval run identifier
|
|
198
|
+
score: z.number().optional(), // Result score
|
|
199
|
+
status: z.string(), // Result status
|
|
200
|
+
task: z.string().optional(), // Eval task identifier
|
|
201
|
+
task_input: z.string().optional(), // Task input summary
|
|
202
|
+
transcript: z.record(z.unknown()).optional(), // Execution transcript
|
|
203
|
+
updated_at: z.string().optional(), // Updated timestamp
|
|
131
204
|
});
|
|
132
205
|
/** Schema for an eval run. */
|
|
133
206
|
export const evalRunSchema = z.object({
|
|
@@ -136,11 +209,11 @@ export const evalRunSchema = z.object({
|
|
|
136
209
|
completed_at: z.string().optional(), // Completion timestamp
|
|
137
210
|
created_at: z.string().optional(), // Created timestamp
|
|
138
211
|
id: z.string(), // Eval run ID
|
|
139
|
-
results: z.array(
|
|
212
|
+
results: z.array(evalResultSchema).optional(), // Eval results for this run
|
|
140
213
|
started_at: z.string().optional(), // Start timestamp
|
|
141
214
|
status: z.string(), // Run status
|
|
142
215
|
suite: z.string(), // Eval suite identifier
|
|
143
|
-
summary: z.unknown().optional(), // Aggregate run summary
|
|
216
|
+
summary: z.record(z.unknown()).optional(), // Aggregate run summary
|
|
144
217
|
updated_at: z.string().optional(), // Updated timestamp
|
|
145
218
|
});
|
|
146
219
|
/** API schema for a context entry. */
|
|
@@ -149,11 +222,11 @@ export const contextEntrySchema = z.object({
|
|
|
149
222
|
agent_user: z.string().optional(), // Agent user
|
|
150
223
|
before_cursor: z.string().optional(), // Pagination cursor (before)
|
|
151
224
|
created_at: z.string().optional(), // Creation timestamp
|
|
152
|
-
files: z.array(z.unknown()).optional(), // Loaded file objects
|
|
225
|
+
files: z.array(z.record(z.unknown())).optional(), // Loaded file objects
|
|
153
226
|
id: z.string(), // Context entry ID
|
|
154
|
-
links: z.array(z.unknown()).optional(), // Loaded link objects
|
|
155
|
-
media: z.array(z.unknown()).optional(), // Loaded media objects
|
|
156
|
-
metadata: z.unknown().optional(), // Entry metadata
|
|
227
|
+
links: z.array(z.record(z.unknown())).optional(), // Loaded link objects
|
|
228
|
+
media: z.array(z.record(z.unknown())).optional(), // Loaded media objects
|
|
229
|
+
metadata: z.record(z.unknown()).optional(), // Entry metadata
|
|
157
230
|
org: z.string().optional(), // Organization
|
|
158
231
|
sandbox: z.string().optional(), // Sandbox identifier
|
|
159
232
|
team: z.string().optional(), // Team
|
|
@@ -172,7 +245,7 @@ export const webhookSchema = z.object({
|
|
|
172
245
|
enabled: z.boolean(), // Whether the webhook is enabled
|
|
173
246
|
id: z.string(), // Public ID (whk_...)
|
|
174
247
|
lookup_key: z.string().optional(), // Lookup key for generic webhooks
|
|
175
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
248
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
176
249
|
provider: z.string().optional(), // Provider type for known providers (github, slack), nil for generic webhooks
|
|
177
250
|
updated_at: z.string().optional(), // Updated timestamp
|
|
178
251
|
webhook_url: z.string(), // URL to send webhooks to
|
|
@@ -199,12 +272,6 @@ export const deviceAuthorizationResponseSchema = z.object({
|
|
|
199
272
|
verification_uri: z.string(), // Base verification URI
|
|
200
273
|
verification_uri_complete: z.string(), // Full verification URI with code
|
|
201
274
|
});
|
|
202
|
-
/** API schema for a single ACL grant entry. */
|
|
203
|
-
export const aclGrantSchema = z.object({
|
|
204
|
-
actions: z.array(z.string()), // List of allowed actions (e.g. read, write)
|
|
205
|
-
principal: z.string().optional(), // Principal identifier (UUID for user/team/org/agent_user, role name for org_role, omit for everyone)
|
|
206
|
-
principal_type: z.string(), // Principal type: user, team, org, org_role, agent, or everyone
|
|
207
|
-
});
|
|
208
275
|
/** API schema for OAuth token endpoint responses. */
|
|
209
276
|
export const oAuthTokenResponseSchema = z.object({
|
|
210
277
|
access_token: z.string(), // OAuth access token
|
|
@@ -225,32 +292,6 @@ export const llmCallSourceOptionSchema = z.object({
|
|
|
225
292
|
label: z.string(), // Human-friendly source label
|
|
226
293
|
source: z.string(), // Machine-readable LLM source key
|
|
227
294
|
});
|
|
228
|
-
/** API schema for identifying a principal to remove from an ACL. */
|
|
229
|
-
export const aclRemoveTargetSchema = z.object({
|
|
230
|
-
principal: z.string().optional(), // Principal identifier to remove (omit for everyone)
|
|
231
|
-
principal_type: z.string(), // Principal type to remove
|
|
232
|
-
});
|
|
233
|
-
/** Reusable API schema for access control lists.
|
|
234
|
-
|
|
235
|
-
Supports two modes (mutually exclusive):
|
|
236
|
-
|
|
237
|
-
**Replace mode** — send `grants` to replace all entries:
|
|
238
|
-
|
|
239
|
-
{"grants": [{"principal_type": "user", "principal": "...", "actions": ["read"]}]}
|
|
240
|
-
|
|
241
|
-
Use `{"grants": []}` to clear all entries.
|
|
242
|
-
|
|
243
|
-
**Patch mode** — send `add` and/or `remove`:
|
|
244
|
-
|
|
245
|
-
{"add": [...grants...], "remove": [{"principal_type": "user", "principal": "..."}]}
|
|
246
|
-
|
|
247
|
-
Cannot mix `grants` with `add`/`remove`.
|
|
248
|
-
*/
|
|
249
|
-
export const aclSchema = z.object({
|
|
250
|
-
add: z.array(aclGrantSchema).optional(), // Patch mode: grants to add or merge into existing
|
|
251
|
-
grants: z.array(aclGrantSchema).optional(), // Replace mode: full list of grants (replaces all existing). Use [] to clear.
|
|
252
|
-
remove: z.array(aclRemoveTargetSchema).optional(), // Patch mode: principals to remove from existing
|
|
253
|
-
});
|
|
254
295
|
/** Schema for an app environment variable response that includes the plaintext value. */
|
|
255
296
|
export const appEnvVarPlaintextSchema = z.object({
|
|
256
297
|
created_at: z.string().optional(), // Created timestamp
|
|
@@ -267,7 +308,7 @@ export const integrationSchema = z.object({
|
|
|
267
308
|
provider: z.string(), // Provider identifier
|
|
268
309
|
sandbox: z.string().optional(), // Sandbox identifier (nullable)
|
|
269
310
|
secret_group: z.string().optional(), // Secret group
|
|
270
|
-
state: z.unknown(), // Connector state information
|
|
311
|
+
state: z.record(z.unknown()), // Connector state information
|
|
271
312
|
team: z.string().optional(), // Team (if team-scoped)
|
|
272
313
|
user: z.string().optional(), // User (if user-scoped)
|
|
273
314
|
workspace_key: z.string().optional(), // Provider workspace identifier
|
|
@@ -295,7 +336,7 @@ export const keyValueStorageEntrySchema = z.object({
|
|
|
295
336
|
export const installationKindSchema = z.object({
|
|
296
337
|
accepts_sources: z.boolean().optional(), // Whether this kind accepts sources
|
|
297
338
|
category: z.string().optional(), // Category
|
|
298
|
-
config_schema: z.unknown().optional(), // JSON schema for configuration
|
|
339
|
+
config_schema: z.record(z.unknown()).optional(), // JSON schema for configuration
|
|
299
340
|
description: z.string().optional(), // Description
|
|
300
341
|
kind: z.string(), // Installation kind identifier
|
|
301
342
|
label: z.string().optional(), // Display label
|
|
@@ -310,14 +351,14 @@ export const installationKindListResponseSchema = z.object({
|
|
|
310
351
|
export const evalTaskSchema = z.object({
|
|
311
352
|
created_at: z.string().optional(), // Created timestamp
|
|
312
353
|
expected_outcome: z.string(), // Expected outcome
|
|
313
|
-
grading_criteria: z.array(z.unknown()).optional(), // Grading criteria
|
|
354
|
+
grading_criteria: z.array(z.record(z.unknown())).optional(), // Grading criteria
|
|
314
355
|
id: z.string(), // Eval task ID
|
|
315
356
|
input_message: z.string(), // Task input message
|
|
316
|
-
mock_agent_memory: z.unknown().optional(), // Mock agent memory
|
|
317
|
-
mock_context_items: z.array(z.unknown()).optional(), // Mock context items
|
|
357
|
+
mock_agent_memory: z.record(z.unknown()).optional(), // Mock agent memory
|
|
358
|
+
mock_context_items: z.array(z.record(z.unknown())).optional(), // Mock context items
|
|
318
359
|
mock_datetime: z.string().optional(), // Mock datetime
|
|
319
|
-
mock_participants: z.array(z.unknown()).optional(), // Mock participants
|
|
320
|
-
mock_tools: z.array(z.unknown()).optional(), // Mock tool definitions
|
|
360
|
+
mock_participants: z.array(z.record(z.unknown())).optional(), // Mock participants
|
|
361
|
+
mock_tools: z.array(z.record(z.unknown())).optional(), // Mock tool definitions
|
|
321
362
|
status: z.string(), // Task status
|
|
322
363
|
suite: z.string(), // Parent eval suite identifier
|
|
323
364
|
updated_at: z.string().optional(), // Updated timestamp
|
|
@@ -325,7 +366,7 @@ export const evalTaskSchema = z.object({
|
|
|
325
366
|
/** API schema for a task comment. */
|
|
326
367
|
export const taskCommentSchema = z.object({
|
|
327
368
|
author: z.string().optional(), // Legacy author
|
|
328
|
-
author_actor: z.unknown().optional(), // Author actor details
|
|
369
|
+
author_actor: z.record(z.unknown()).optional(), // Author actor details
|
|
329
370
|
author_persona: z.string().optional(), // Author persona
|
|
330
371
|
author_user: z.string().optional(), // Author user
|
|
331
372
|
body: z.string(), // Comment body text
|
|
@@ -337,21 +378,6 @@ export const taskCommentSchema = z.object({
|
|
|
337
378
|
team: z.string().optional(), // Team
|
|
338
379
|
updated_at: z.string().optional(), // Last update timestamp
|
|
339
380
|
});
|
|
340
|
-
/** Schema for an eval result. */
|
|
341
|
-
export const evalResultSchema = z.object({
|
|
342
|
-
agent_response: z.string().optional(), // Agent response
|
|
343
|
-
created_at: z.string().optional(), // Created timestamp
|
|
344
|
-
duration_ms: z.number().int().optional(), // Execution duration
|
|
345
|
-
grader_details: z.unknown().optional(), // Grader details
|
|
346
|
-
id: z.string(), // Eval result ID
|
|
347
|
-
run: z.string(), // Parent eval run identifier
|
|
348
|
-
score: z.number().optional(), // Result score
|
|
349
|
-
status: z.string(), // Result status
|
|
350
|
-
task: z.string().optional(), // Eval task identifier
|
|
351
|
-
task_input: z.string().optional(), // Task input summary
|
|
352
|
-
transcript: z.unknown().optional(), // Execution transcript
|
|
353
|
-
updated_at: z.string().optional(), // Updated timestamp
|
|
354
|
-
});
|
|
355
381
|
/** Schema for eval result list responses. */
|
|
356
382
|
export const evalResultListSchema = z.object({
|
|
357
383
|
data: z.array(evalResultSchema), // Eval results
|
|
@@ -373,7 +399,7 @@ export const evalSuiteSchema = z.object({
|
|
|
373
399
|
name: z.string(), // Suite name
|
|
374
400
|
org: z.string().optional(), // Owner organization identifier
|
|
375
401
|
status: z.string(), // Suite status
|
|
376
|
-
tasks: z.array(
|
|
402
|
+
tasks: z.array(evalTaskSchema).optional(), // Eval tasks included in the suite
|
|
377
403
|
updated_at: z.string().optional(), // Updated timestamp
|
|
378
404
|
user: z.string().optional(), // Owner user identifier
|
|
379
405
|
});
|
|
@@ -409,7 +435,7 @@ export const trajectorySchema = z.object({
|
|
|
409
435
|
created_at: z.string().optional(), // Creation timestamp
|
|
410
436
|
file: z.string().optional(), // Storage file
|
|
411
437
|
id: z.string(), // Trajectory ID (trj_...)
|
|
412
|
-
messages: z.unknown().optional(), // Trajectory messages
|
|
438
|
+
messages: z.record(z.unknown()).optional(), // Trajectory messages
|
|
413
439
|
org: z.string().optional(), // Organization
|
|
414
440
|
sandbox: z.string().optional(), // Sandbox
|
|
415
441
|
team: z.string().optional(), // Team
|
|
@@ -423,6 +449,43 @@ export const eventTypeSchema = z.object({
|
|
|
423
449
|
description: z.string(), // Human-readable description
|
|
424
450
|
name: z.string(), // Event name (e.g., thread.created)
|
|
425
451
|
});
|
|
452
|
+
/** Schema for inline message reactions.
|
|
453
|
+
|
|
454
|
+
This is the compact format used in Message.reactions[], which differs from
|
|
455
|
+
the full Reaction schema used in standalone reaction endpoints.
|
|
456
|
+
Maps to format_reactions_for_client/1 output.
|
|
457
|
+
*/
|
|
458
|
+
export const messageReactionSchema = z.object({
|
|
459
|
+
payload: z.record(z.unknown()).optional(), // Reaction payload (e.g., {emoji: '👍'})
|
|
460
|
+
type: z.string(), // Reaction type (e.g., emoji_reaction)
|
|
461
|
+
user: z.string().optional(), // User who added the reaction
|
|
462
|
+
});
|
|
463
|
+
/** API schema for a chat message. */
|
|
464
|
+
export const messageSchema = z.object({
|
|
465
|
+
actors: z.array(actorSchema).optional(), // Message actors
|
|
466
|
+
agent: z.string().optional(), // Agent if sent by an agent user
|
|
467
|
+
attachments: z.array(attachmentSchema).optional(), // Message attachments
|
|
468
|
+
branched_thread: z.string().optional(), // Branched thread (if message spawned a thread)
|
|
469
|
+
content: z.string().optional(), // Message content
|
|
470
|
+
created_at: z.string().optional(), // Creation timestamp
|
|
471
|
+
has_replies: z.boolean().optional(), // Whether message has replies
|
|
472
|
+
id: z.string(), // Message ID (msg_...)
|
|
473
|
+
idempotency_key: z.string().optional(), // Client-provided idempotency key
|
|
474
|
+
legacy_agent: z.string().optional(), // Legacy agent if sent by legacy chat agent
|
|
475
|
+
metadata: z.record(z.unknown()).optional(), // Message metadata
|
|
476
|
+
org: z.string().optional(), // Organization
|
|
477
|
+
reactions: z.array(messageReactionSchema).optional(), // Message reactions
|
|
478
|
+
rendering_mode: z.string().optional(), // Rendering mode hint
|
|
479
|
+
replies: z.array(z.record(z.unknown())).optional(), // Inline replies (if loaded)
|
|
480
|
+
replies_after_cursor: z.string().optional(), // Cursor for replies pagination
|
|
481
|
+
replies_before_cursor: z.string().optional(), // Cursor for replies pagination
|
|
482
|
+
reply_count: z.number().int().optional(), // Number of replies
|
|
483
|
+
reply_to: z.record(z.unknown()).optional(), // Parent message object (if loaded)
|
|
484
|
+
sandbox: z.string().optional(), // Sandbox identifier
|
|
485
|
+
team: z.string().optional(), // Team
|
|
486
|
+
thread: z.string().optional(), // Parent thread
|
|
487
|
+
user: z.string().optional(), // Author user (public ID or expanded object when loaded)
|
|
488
|
+
});
|
|
426
489
|
/** Schema for paginated message replies response.
|
|
427
490
|
|
|
428
491
|
Used by message replies list endpoints.
|
|
@@ -437,7 +500,7 @@ export const paginatedRepliesSchema = z.object({
|
|
|
437
500
|
});
|
|
438
501
|
/** A routine preset with its metadata. */
|
|
439
502
|
export const routinePresetSchema = z.object({
|
|
440
|
-
config: z.unknown().optional(), // Default configuration
|
|
503
|
+
config: z.record(z.unknown()).optional(), // Default configuration
|
|
441
504
|
description: z.string().optional(), // Preset description
|
|
442
505
|
event_type: z.string().optional(), // Event type
|
|
443
506
|
label: z.string().optional(), // Display label
|
|
@@ -451,7 +514,7 @@ export const personaSchema = z.object({
|
|
|
451
514
|
id: z.string(), // Persona ID
|
|
452
515
|
is_active: z.boolean().optional(), // Whether persona is active
|
|
453
516
|
is_enabled_for_thread: z.boolean().optional(), // Whether persona is enabled for thread
|
|
454
|
-
metadata: z.unknown().optional(), // Persona metadata
|
|
517
|
+
metadata: z.record(z.unknown()).optional(), // Persona metadata
|
|
455
518
|
name: z.string().optional(), // Persona display name
|
|
456
519
|
org: z.string().optional(), // Organization
|
|
457
520
|
personality: z.string().optional(), // Persona personality description
|
|
@@ -460,48 +523,22 @@ export const personaSchema = z.object({
|
|
|
460
523
|
updated_at: z.string().optional(), // Last update timestamp
|
|
461
524
|
user: z.string().optional(), // Owning user
|
|
462
525
|
});
|
|
463
|
-
/** Schema for a message attachment.
|
|
464
|
-
|
|
465
|
-
Attachments can be of various types (file, scraped_link, artifact, task, media, action).
|
|
466
|
-
Fields present depend on the attachment type.
|
|
467
|
-
Maps to format_attachments_for_client/1 output.
|
|
468
|
-
*/
|
|
469
|
-
export const attachmentSchema = z.object({
|
|
470
|
-
content_type: z.string().optional(), // MIME content type (file, artifact, media types)
|
|
471
|
-
description: z.string().optional(), // Description (scraped_link, artifact, task types)
|
|
472
|
-
filename: z.string().optional(), // File name (file, artifact, media types)
|
|
473
|
-
height: z.number().int().optional(), // Media height (media type)
|
|
474
|
-
id: z.string(), // Attachment ID
|
|
475
|
-
image_height: z.number().int().optional(), // Preview image height (scraped_link type)
|
|
476
|
-
image_source: imageSourceSchema.optional(), // Image metadata (file, scraped_link, artifact, media types)
|
|
477
|
-
image_url: z.string().optional(), // Preview image URL (scraped_link type)
|
|
478
|
-
image_width: z.number().int().optional(), // Preview image width (scraped_link type)
|
|
479
|
-
media_type: z.string().optional(), // Media type (media type)
|
|
480
|
-
name: z.string().optional(), // Media name (media type)
|
|
481
|
-
object: z.unknown().optional(), // Embedded object (task, action types)
|
|
482
|
-
title: z.string().optional(), // Title (scraped_link, artifact, task types)
|
|
483
|
-
type: z.string(), // Attachment type: file, scraped_link, artifact, task, media, action
|
|
484
|
-
url: z.string().optional(), // URL to the resource (file, scraped_link, artifact, media types)
|
|
485
|
-
variants: z.array(z.unknown()).optional(), // Media variants (media type)
|
|
486
|
-
version: z.number().int().optional(), // Artifact version number (artifact type)
|
|
487
|
-
width: z.number().int().optional(), // Media width (media type)
|
|
488
|
-
});
|
|
489
526
|
/** API schema for an installation. */
|
|
490
527
|
export const installationSchema = z.object({
|
|
491
528
|
agent: z.string().optional(), // Owning agent
|
|
492
|
-
config: z.unknown().optional(), // Configuration
|
|
529
|
+
config: z.record(z.unknown()).optional(), // Configuration
|
|
493
530
|
created_at: z.string().optional(), // Creation timestamp
|
|
494
531
|
id: z.string(), // Installation ID (cin_...)
|
|
495
532
|
kind: z.string().optional(), // Installation kind
|
|
496
533
|
shared_integration: z.string().optional(), // Bound shared integration
|
|
497
534
|
state: z.string().optional(), // Installation state
|
|
498
|
-
status_payload: z.unknown().optional(), // Status payload
|
|
535
|
+
status_payload: z.record(z.unknown()).optional(), // Status payload
|
|
499
536
|
updated_at: z.string().optional(), // Last update timestamp
|
|
500
537
|
});
|
|
501
538
|
/** Schema for persona update parameters.
|
|
502
539
|
*/
|
|
503
540
|
export const personaUpdateParamsSchema = z.object({
|
|
504
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
541
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
505
542
|
name: z.string().optional(), // Persona display name
|
|
506
543
|
personality: z.string().optional(), // Persona personality description
|
|
507
544
|
});
|
|
@@ -532,11 +569,11 @@ export const evalRunListSchema = z.object({
|
|
|
532
569
|
/** Schema for LLM call trajectory contents. */
|
|
533
570
|
export const llmCallTrajectorySchema = z.object({
|
|
534
571
|
download_url: z.string().optional(), // Signed transcript download URL
|
|
535
|
-
messages: z.array(z.unknown()), // Trajectory messages
|
|
572
|
+
messages: z.array(z.record(z.unknown())), // Trajectory messages
|
|
536
573
|
});
|
|
537
574
|
/** API schema for a user credential. */
|
|
538
575
|
export const credentialSchema = z.object({
|
|
539
|
-
alt_domains: z.unknown().optional(), // Alternative domains
|
|
576
|
+
alt_domains: z.record(z.unknown()).optional(), // Alternative domains
|
|
540
577
|
created_at: z.string().optional(), // Creation timestamp
|
|
541
578
|
description: z.string().optional(), // Description
|
|
542
579
|
domain: z.string().optional(), // Primary domain
|
|
@@ -549,9 +586,9 @@ export const credentialSchema = z.object({
|
|
|
549
586
|
});
|
|
550
587
|
/** API schema for an activity feed entry. */
|
|
551
588
|
export const activityFeedEntrySchema = z.object({
|
|
552
|
-
agent: z.union([z.string(), z.object({ acl: z.object({ add: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), grants: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), remove: z.array(z.object({ principal: z.string().optional(), principal_type: z.string() })).optional() }).optional(), app: z.string().optional(), created_at: z.string().optional(), default_model: z.string().optional(), email: z.string().optional(), id: z.string(), identity: z.string().optional(), lookup_key: z.string().optional(), metadata: z.unknown().optional(), name: z.string().optional(), org: z.string().optional(), phone_number: z.string().optional(), sandbox: z.string().optional(), team: z.string().optional(), updated_at: z.string().optional(), user: z.string().optional() })]).optional(), // Agent (public ID or expanded object when loaded)
|
|
589
|
+
agent: z.union([z.string(), z.object({ acl: z.object({ add: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), grants: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), remove: z.array(z.object({ principal: z.string().optional(), principal_type: z.string() })).optional() }).optional(), app: z.string().optional(), created_at: z.string().optional(), default_model: z.string().optional(), email: z.string().optional(), id: z.string(), identity: z.string().optional(), lookup_key: z.string().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), phone_number: z.string().optional(), sandbox: z.string().optional(), team: z.string().optional(), updated_at: z.string().optional(), user: z.string().optional() })]).optional(), // Agent (public ID or expanded object when loaded)
|
|
553
590
|
app: z.string().optional(), // Application
|
|
554
|
-
attachments: z.array(z.unknown()).optional(), // Entry attachments
|
|
591
|
+
attachments: z.array(z.record(z.unknown())).optional(), // Entry attachments
|
|
555
592
|
automation_run: z.string().optional(), // Automation run
|
|
556
593
|
content: z.string().optional(), // Longer explanation (markdown)
|
|
557
594
|
correlation_id: z.string().optional(), // Correlation ID for grouped entries
|
|
@@ -559,7 +596,7 @@ export const activityFeedEntrySchema = z.object({
|
|
|
559
596
|
id: z.string(), // Entry ID (afe_...)
|
|
560
597
|
kind: z.string().optional(), // Entry kind
|
|
561
598
|
level: z.string().optional(), // Severity level
|
|
562
|
-
metadata: z.unknown().optional(), // Entry metadata
|
|
599
|
+
metadata: z.record(z.unknown()).optional(), // Entry metadata
|
|
563
600
|
org: z.string().optional(), // Organization
|
|
564
601
|
routine_run: z.string().optional(), // Routine run
|
|
565
602
|
sandbox: z.string().optional(), // Sandbox identifier
|
|
@@ -568,7 +605,7 @@ export const activityFeedEntrySchema = z.object({
|
|
|
568
605
|
thread: z.string().optional(), // Thread
|
|
569
606
|
title: z.string().optional(), // One-line summary
|
|
570
607
|
updated_at: z.string().optional(), // Last update timestamp
|
|
571
|
-
user: z.union([z.string(), z.object({ alias: z.string().optional(), email: z.string().optional(), id: z.string(), metadata: z.unknown().optional(), name: z.string().optional(), org: z.string().optional(), sandbox: z.string().optional() })]).optional(), // User (public ID or expanded object when loaded)
|
|
608
|
+
user: z.union([z.string(), z.object({ alias: z.string().optional(), email: z.string().optional(), id: z.string(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), sandbox: z.string().optional() })]).optional(), // User (public ID or expanded object when loaded)
|
|
572
609
|
});
|
|
573
610
|
/** Schema for a dataset metric field.
|
|
574
611
|
*/
|
|
@@ -593,7 +630,7 @@ Used by thread messages list endpoints.
|
|
|
593
630
|
export const paginatedMessagesSchema = z.object({
|
|
594
631
|
after_cursor: z.string().optional(), // Cursor for fetching items after this point
|
|
595
632
|
before_cursor: z.string().optional(), // Cursor for fetching items before this point
|
|
596
|
-
messages: z.array(
|
|
633
|
+
messages: z.array(messageSchema), // List of message objects
|
|
597
634
|
});
|
|
598
635
|
/** Schema for an event catalog entry with full payload schema and sample.
|
|
599
636
|
*/
|
|
@@ -601,8 +638,8 @@ export const eventCatalogEntrySchema = z.object({
|
|
|
601
638
|
description: z.string(), // Human-readable description
|
|
602
639
|
name: z.string(), // Event name (e.g., thread.created)
|
|
603
640
|
parent: z.string().optional(), // Parent envelope name (only present for sub_event entries)
|
|
604
|
-
sample: z.unknown(), // Sample payload for this event
|
|
605
|
-
schema: z.unknown(), // JSON Schema describing the event payload
|
|
641
|
+
sample: z.record(z.unknown()), // Sample payload for this event
|
|
642
|
+
schema: z.record(z.unknown()), // JSON Schema describing the event payload
|
|
606
643
|
sub_events: z.array(z.string()).optional(), // Known sub-event types (only present for envelope entries)
|
|
607
644
|
type: z.string().optional(), // Entry type: "event" for exact events, "envelope" for wildcard families
|
|
608
645
|
});
|
|
@@ -613,7 +650,7 @@ export const domainEventSchema = z.object({
|
|
|
613
650
|
event_name: z.string(), // Event name
|
|
614
651
|
id: z.string(), // Domain event ID
|
|
615
652
|
idempotency_key: z.string().optional(), // Idempotency key for the event
|
|
616
|
-
payload: z.unknown(), // Event payload
|
|
653
|
+
payload: z.record(z.unknown()), // Event payload
|
|
617
654
|
team: z.string().optional(), // Team identifier
|
|
618
655
|
user: z.string().optional(), // User identifier
|
|
619
656
|
});
|
|
@@ -641,7 +678,7 @@ export const workerStatusSchema = z.object({
|
|
|
641
678
|
/** API schema for authentication token responses. */
|
|
642
679
|
export const authTokensSchema = z.object({
|
|
643
680
|
expires_in: z.number().int(), // Token TTL in seconds
|
|
644
|
-
metadata: z.unknown().optional(), // Additional metadata (e.g., onboarding_job_id)
|
|
681
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata (e.g., onboarding_job_id)
|
|
645
682
|
refresh_token: z.string(), // Refresh token
|
|
646
683
|
token: z.string(), // Access token (JWT)
|
|
647
684
|
token_type: z.string(), // Token type (Bearer)
|
|
@@ -659,7 +696,7 @@ export const secretValueSchema = z.object({
|
|
|
659
696
|
});
|
|
660
697
|
/** A builtin tool catalog entry describing an available tool category. */
|
|
661
698
|
export const builtinToolCatalogEntrySchema = z.object({
|
|
662
|
-
config_schema: z.unknown().optional(), // JSON schema for tool configuration
|
|
699
|
+
config_schema: z.record(z.unknown()).optional(), // JSON schema for tool configuration
|
|
663
700
|
description: z.string().optional(), // Tool description
|
|
664
701
|
instruction: z.string().optional(), // Tool instruction
|
|
665
702
|
key: z.string(), // Unique tool key
|
|
@@ -692,9 +729,9 @@ export const fileRefreshResultSchema = z.object({
|
|
|
692
729
|
/** Schema for a dataset query result.
|
|
693
730
|
*/
|
|
694
731
|
export const datasetQueryResultSchema = z.object({
|
|
695
|
-
columns: z.array(z.unknown()), // Column definitions with name, type, and label
|
|
696
|
-
meta: z.unknown(), // Query metadata (total_rows, query_time_ms)
|
|
697
|
-
rows: z.array(z.unknown()), // Result rows as maps of column_name → value
|
|
732
|
+
columns: z.array(z.record(z.unknown())), // Column definitions with name, type, and label
|
|
733
|
+
meta: z.record(z.unknown()), // Query metadata (total_rows, query_time_ms)
|
|
734
|
+
rows: z.array(z.record(z.unknown())), // Result rows as maps of column_name → value
|
|
698
735
|
});
|
|
699
736
|
/** Schema for an API call record.
|
|
700
737
|
|
|
@@ -710,13 +747,13 @@ export const apiCallSchema = z.object({
|
|
|
710
747
|
id: z.string(), // Public ID (aac_...)
|
|
711
748
|
ip_address: z.string().optional(), // Client IP address
|
|
712
749
|
latency_ms: z.number().int(), // Latency in milliseconds
|
|
713
|
-
metadata: z.unknown().optional(), // Additional metadata (e.g. integration_ids for webhooks)
|
|
750
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata (e.g. integration_ids for webhooks)
|
|
714
751
|
method: z.string(), // HTTP method
|
|
715
752
|
org: z.string().optional(), // Org if org-scoped
|
|
716
753
|
path: z.string(), // Sanitized path with param placeholders
|
|
717
754
|
query_string: z.string().optional(), // Query string
|
|
718
|
-
request_body: z.unknown().optional(), // Request body payload (webhooks only)
|
|
719
|
-
request_headers: z.unknown().optional(), // Request headers (webhooks only)
|
|
755
|
+
request_body: z.record(z.unknown()).optional(), // Request body payload (webhooks only)
|
|
756
|
+
request_headers: z.record(z.unknown()).optional(), // Request headers (webhooks only)
|
|
720
757
|
request_id: z.string().optional(), // Request ID from Plug.RequestId
|
|
721
758
|
status_code: z.number().int(), // HTTP status code
|
|
722
759
|
team: z.string().optional(), // Team if team-scoped
|
|
@@ -737,18 +774,18 @@ export const domainEventPageSchema = z.object({
|
|
|
737
774
|
export const apiExplorerEndpointSchema = z.object({
|
|
738
775
|
deprecated: z.boolean(), // Whether the route is deprecated
|
|
739
776
|
description: z.string().optional(), // Endpoint description
|
|
740
|
-
errors: z.array(z.unknown()), // Documented error responses
|
|
777
|
+
errors: z.array(z.record(z.unknown())), // Documented error responses
|
|
741
778
|
method: z.string(), // HTTP method
|
|
742
|
-
params: z.array(z.unknown()), // Documented params
|
|
779
|
+
params: z.array(z.record(z.unknown())), // Documented params
|
|
743
780
|
path: z.string(), // Route path
|
|
744
|
-
returns: z.unknown().optional(), // Return schema description
|
|
781
|
+
returns: z.record(z.unknown()).optional(), // Return schema description
|
|
745
782
|
scope: z.string(), // Endpoint scope
|
|
746
783
|
tags: z.array(z.string()), // Route tags
|
|
747
784
|
});
|
|
748
785
|
export const resolvedToolSchema = z.object({
|
|
749
786
|
description: z.string().optional(), // What this tool does
|
|
750
787
|
name: z.string(), // Callable tool function name
|
|
751
|
-
parameters: z.unknown().optional(), // JSON Schema describing the expected input
|
|
788
|
+
parameters: z.record(z.unknown()).optional(), // JSON Schema describing the expected input
|
|
752
789
|
});
|
|
753
790
|
/** Schema for an encrypted secret payload. */
|
|
754
791
|
export const encryptedSecretSchema = z.object({
|
|
@@ -757,7 +794,7 @@ export const encryptedSecretSchema = z.object({
|
|
|
757
794
|
/** API schema for a custom object. */
|
|
758
795
|
export const customObjectSchema = z.object({
|
|
759
796
|
created_at: z.string().optional(), // Created timestamp
|
|
760
|
-
fields: z.unknown().optional(), // Object field values
|
|
797
|
+
fields: z.record(z.unknown()).optional(), // Object field values
|
|
761
798
|
id: z.string(), // Public ID (cobj_...)
|
|
762
799
|
org: z.string().optional(), // Organization
|
|
763
800
|
row_key: z.string().optional(), // Row key
|
|
@@ -775,8 +812,8 @@ Used by both Users.Tasks.Create and Teams.Tasks.Create actions.
|
|
|
775
812
|
export const taskCreateParamsSchema = z.object({
|
|
776
813
|
description: z.string().optional(), // Task description
|
|
777
814
|
due_date: z.string().optional(), // Due date
|
|
778
|
-
links: z.unknown().optional(), // Related links
|
|
779
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
815
|
+
links: z.record(z.unknown()).optional(), // Related links
|
|
816
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
780
817
|
name: z.string(), // Task name
|
|
781
818
|
owner_persona: z.string().optional(), // Owner persona if assigned to agent
|
|
782
819
|
owner_user: z.string().optional(), // Owner user if assigned to user
|
|
@@ -790,9 +827,9 @@ export const installationSourceSchema = z.object({
|
|
|
790
827
|
context_installation: z.string().optional(), // Installation ID
|
|
791
828
|
created_at: z.string().optional(), // Creation timestamp
|
|
792
829
|
id: z.string(), // Source ID (cso_...)
|
|
793
|
-
metadata: z.unknown().optional(), // Arbitrary metadata
|
|
830
|
+
metadata: z.record(z.unknown()).optional(), // Arbitrary metadata
|
|
794
831
|
parent_source: z.string().optional(), // Parent source ID
|
|
795
|
-
payload: z.unknown().optional(), // Source payload
|
|
832
|
+
payload: z.record(z.unknown()).optional(), // Source payload
|
|
796
833
|
state: z.string().optional(), // Source state
|
|
797
834
|
team: z.string().optional(), // Team ID
|
|
798
835
|
thread: z.string().optional(), // Thread ID
|
|
@@ -813,19 +850,19 @@ export const taskSchema = z.object({
|
|
|
813
850
|
comments_count: z.number().int().optional(), // Number of comments
|
|
814
851
|
created_at: z.string().optional(), // Creation timestamp
|
|
815
852
|
created_by: z.string().optional(), // Legacy creator
|
|
816
|
-
created_by_actor: z.unknown().optional(), // Creator actor details
|
|
853
|
+
created_by_actor: z.record(z.unknown()).optional(), // Creator actor details
|
|
817
854
|
created_by_persona: z.string().optional(), // Creator persona
|
|
818
855
|
created_by_type: z.string().optional(), // Creator type (user, agent)
|
|
819
856
|
created_by_user: z.string().optional(), // Creator user
|
|
820
857
|
description: z.string().optional(), // Task description
|
|
821
858
|
due_date: z.string().optional(), // Due date
|
|
822
859
|
id: z.string(), // Task ID (tsk_...)
|
|
823
|
-
links: z.unknown().optional(), // Related links
|
|
824
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
860
|
+
links: z.record(z.unknown()).optional(), // Related links
|
|
861
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
825
862
|
name: z.string(), // Task name
|
|
826
863
|
org: z.string().optional(), // Organization
|
|
827
864
|
owner: z.string().optional(), // Legacy owner
|
|
828
|
-
owner_actor: z.unknown().optional(), // Owner actor details
|
|
865
|
+
owner_actor: z.record(z.unknown()).optional(), // Owner actor details
|
|
829
866
|
owner_persona: z.string().optional(), // Owner persona
|
|
830
867
|
owner_user: z.string().optional(), // Owner user
|
|
831
868
|
priority: z.number().int().optional(), // Priority level (0-4)
|
|
@@ -877,10 +914,10 @@ export const contextSourceSchema = z.object({
|
|
|
877
914
|
context_installation: z.string().optional(), // Associated installation
|
|
878
915
|
created_at: z.string().optional(), // Created timestamp
|
|
879
916
|
id: z.string(), // Public ID (cso_...)
|
|
880
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
917
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
881
918
|
org: z.string().optional(), // Owning organization
|
|
882
919
|
parent_source: z.string().optional(), // Parent source
|
|
883
|
-
payload: z.unknown().optional(), // Type-specific configuration
|
|
920
|
+
payload: z.record(z.unknown()).optional(), // Type-specific configuration
|
|
884
921
|
sandbox: z.string().optional(), // Owning sandbox
|
|
885
922
|
state: z.string(), // State: active or paused
|
|
886
923
|
team: z.string().optional(), // Owning team
|
|
@@ -911,7 +948,7 @@ Required fields depend on the kind's auth type:
|
|
|
911
948
|
export const integrationCreateParamsSchema = z.object({
|
|
912
949
|
access_token: z.string().optional(), // OAuth access token or API key
|
|
913
950
|
installation_id: z.string().optional(), // External installation ID (e.g. GitHub App installation ID, Slack team_id)
|
|
914
|
-
metadata: z.unknown().optional(), // Provider-specific metadata (e.g. bot_user_id)
|
|
951
|
+
metadata: z.record(z.unknown()).optional(), // Provider-specific metadata (e.g. bot_user_id)
|
|
915
952
|
refresh_token: z.string().optional(), // OAuth refresh token
|
|
916
953
|
workspace_key: z.string().optional(), // Workspace name or identifier
|
|
917
954
|
});
|
|
@@ -932,7 +969,7 @@ export const contextCredentialSchema = z.object({
|
|
|
932
969
|
/** API schema for the status/ping health check response. */
|
|
933
970
|
export const statusPingSchema = z.object({
|
|
934
971
|
success: z.boolean(), // Whether the ping succeeded
|
|
935
|
-
token: z.unknown(), // Token status details
|
|
972
|
+
token: z.record(z.unknown()), // Token status details
|
|
936
973
|
user: userSchema.optional(), // Authenticated user (if token is valid)
|
|
937
974
|
});
|
|
938
975
|
/** Schema for an OAuth provider configuration.
|
|
@@ -983,8 +1020,8 @@ export const knowledgeSearchResultSchema = z.object({
|
|
|
983
1020
|
content_type: z.string().optional(), // Content MIME type
|
|
984
1021
|
created_at: z.string().optional(), // Creation timestamp
|
|
985
1022
|
id: z.string(), // Item ID (cim_...)
|
|
986
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
987
|
-
raw_content: z.unknown().optional(), // Raw content data
|
|
1023
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
1024
|
+
raw_content: z.record(z.unknown()).optional(), // Raw content data
|
|
988
1025
|
type: z.string().optional(), // Source type (requires preloaded :source association)
|
|
989
1026
|
});
|
|
990
1027
|
/** Schema for org billing settings. */
|
|
@@ -1024,7 +1061,7 @@ export const developerOrgSchema = z.object({
|
|
|
1024
1061
|
});
|
|
1025
1062
|
/** API schema for a credential with decrypted secret values. */
|
|
1026
1063
|
export const credentialWithSecretsSchema = z.object({
|
|
1027
|
-
credential: z.unknown(), // The credential with decrypted values
|
|
1064
|
+
credential: z.record(z.unknown()), // The credential with decrypted values
|
|
1028
1065
|
});
|
|
1029
1066
|
/** API schema for a storage file. */
|
|
1030
1067
|
export const storageFileSchema = z.object({
|
|
@@ -1032,7 +1069,7 @@ export const storageFileSchema = z.object({
|
|
|
1032
1069
|
created_at: z.string().optional(), // Creation timestamp
|
|
1033
1070
|
filename: z.string().optional(), // Original filename
|
|
1034
1071
|
id: z.string(), // File ID
|
|
1035
|
-
image_source:
|
|
1072
|
+
image_source: imageSourceSchema.optional(), // Image source metadata
|
|
1036
1073
|
org: z.string().optional(), // Organization
|
|
1037
1074
|
sandbox: z.string().optional(), // Sandbox
|
|
1038
1075
|
size: z.number().int().optional(), // File size in bytes
|
|
@@ -1042,7 +1079,7 @@ export const storageFileSchema = z.object({
|
|
|
1042
1079
|
/** Schema for the API explorer response. */
|
|
1043
1080
|
export const apiExplorerIndexSchema = z.object({
|
|
1044
1081
|
data: z.array(apiExplorerEndpointSchema), // Documented API endpoints
|
|
1045
|
-
schemas: z.unknown().optional(), // Collected schema definitions
|
|
1082
|
+
schemas: z.record(z.unknown()).optional(), // Collected schema definitions
|
|
1046
1083
|
});
|
|
1047
1084
|
/** Schema for an app slug mapping. */
|
|
1048
1085
|
export const appSlugSchema = z.object({
|
|
@@ -1063,9 +1100,9 @@ export const contextItemSchema = z.object({
|
|
|
1063
1100
|
created_at: z.string().optional(), // Created timestamp
|
|
1064
1101
|
id: z.string(), // Public ID (cim_...)
|
|
1065
1102
|
item_group: z.string().optional(), // Item group if part of a group
|
|
1066
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
1103
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
1067
1104
|
normalized_content: z.string().optional(), // Normalized content text
|
|
1068
|
-
raw_content: z.unknown().optional(), // Raw content data
|
|
1105
|
+
raw_content: z.record(z.unknown()).optional(), // Raw content data
|
|
1069
1106
|
source: z.string().optional(), // Source
|
|
1070
1107
|
team: z.string().optional(), // Owning team
|
|
1071
1108
|
updated_at: z.string().optional(), // Updated timestamp
|
|
@@ -1073,7 +1110,7 @@ export const contextItemSchema = z.object({
|
|
|
1073
1110
|
});
|
|
1074
1111
|
/** API schema for push notification test results. */
|
|
1075
1112
|
export const pushNotificationResultSchema = z.object({
|
|
1076
|
-
results: z.array(z.unknown()).optional(), // Per-device results
|
|
1113
|
+
results: z.array(z.record(z.unknown())).optional(), // Per-device results
|
|
1077
1114
|
success: z.boolean(), // Whether the notification was sent
|
|
1078
1115
|
total_sent: z.number().int().optional(), // Number of notifications sent
|
|
1079
1116
|
});
|
|
@@ -1092,9 +1129,9 @@ export const oAuthClientSchema = z.object({
|
|
|
1092
1129
|
/** Schema for integration action metadata. */
|
|
1093
1130
|
export const integrationActionSchema = z.object({
|
|
1094
1131
|
description: z.string().optional(), // Action description
|
|
1095
|
-
json_schema: z.unknown(), // JSON Schema for action parameters
|
|
1132
|
+
json_schema: z.record(z.unknown()), // JSON Schema for action parameters
|
|
1096
1133
|
key: z.string(), // Action key (e.g., gmail.list_messages)
|
|
1097
|
-
scopes_any_of: z.unknown().optional(), // Required scope sets for this action
|
|
1134
|
+
scopes_any_of: z.record(z.unknown()).optional(), // Required scope sets for this action
|
|
1098
1135
|
});
|
|
1099
1136
|
/** Schema for app billing settings. */
|
|
1100
1137
|
export const billingSettingsAppSchema = z.object({
|
|
@@ -1123,8 +1160,8 @@ All fields are optional since updates only modify provided fields.
|
|
|
1123
1160
|
export const taskUpdateParamsSchema = z.object({
|
|
1124
1161
|
description: z.string().optional(), // Task description
|
|
1125
1162
|
due_date: z.string().optional(), // Due date
|
|
1126
|
-
links: z.unknown().optional(), // Related links
|
|
1127
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
1163
|
+
links: z.record(z.unknown()).optional(), // Related links
|
|
1164
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
1128
1165
|
name: z.string().optional(), // Task name
|
|
1129
1166
|
owner_persona: z.string().optional(), // Owner persona if assigned to agent
|
|
1130
1167
|
owner_user: z.string().optional(), // Owner user if assigned to user
|
|
@@ -1144,7 +1181,7 @@ export const contextIntegrationSchema = z.object({
|
|
|
1144
1181
|
id: z.string(), // Public ID (int_...)
|
|
1145
1182
|
installation: z.string().optional(), // External installation (e.g. GitHub App installation)
|
|
1146
1183
|
last_refreshed_at: z.string().optional(), // Last token refresh timestamp
|
|
1147
|
-
metadata: z.unknown().optional(), // Additional metadata
|
|
1184
|
+
metadata: z.record(z.unknown()).optional(), // Additional metadata
|
|
1148
1185
|
org: z.string().optional(), // Owning org
|
|
1149
1186
|
provider: z.string(), // Provider name (e.g., google, github)
|
|
1150
1187
|
scopes: z.array(z.string()).optional(), // OAuth scopes
|
|
@@ -1163,7 +1200,7 @@ export const scrapeSchema = z.object({
|
|
|
1163
1200
|
image_url: z.string().optional(), // Image URL
|
|
1164
1201
|
image_width: z.number().int().optional(), // Image width in pixels
|
|
1165
1202
|
last_scraped_at: z.string().optional(), // Last scraped timestamp
|
|
1166
|
-
metadata: z.unknown().optional(), // Scrape metadata
|
|
1203
|
+
metadata: z.record(z.unknown()).optional(), // Scrape metadata
|
|
1167
1204
|
status: z.string().optional(), // Scrape status
|
|
1168
1205
|
title: z.string().optional(), // Page title
|
|
1169
1206
|
updated_at: z.string().optional(), // Last update timestamp
|
|
@@ -1206,4 +1243,11 @@ export const passwordUpdateParamsSchema = z.object({
|
|
|
1206
1243
|
export const oAuthClientListSchema = z.object({
|
|
1207
1244
|
data: z.array(oAuthClientSchema), // OAuth clients
|
|
1208
1245
|
});
|
|
1246
|
+
/** Schema for message update request parameters.
|
|
1247
|
+
|
|
1248
|
+
Used as the body wrapper when updating a message.
|
|
1249
|
+
*/
|
|
1250
|
+
export const messageUpdateParamsSchema = z.object({
|
|
1251
|
+
content: z.string().optional(), // New message content
|
|
1252
|
+
});
|
|
1209
1253
|
//# sourceMappingURL=common.js.map
|