@canonmsg/backend-contracts 1.9.0 → 2.0.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/agentBehaviorPolicy.d.ts +45 -86
- package/dist/agentBehaviorPolicy.js +0 -53
- package/dist/cjs/agentBehaviorPolicy.js +1 -54
- package/dist/cjs/contactRequest.js +0 -30
- package/dist/cjs/index.js +0 -8
- package/dist/cjs/media.js +0 -13
- package/dist/cjs/message.js +0 -64
- package/dist/cjs/runtimeCardFields.js +1 -58
- package/dist/cjs/turnProtocol.js +1 -41
- package/dist/contactRequest.d.ts +23 -42
- package/dist/contactRequest.js +0 -29
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/media.d.ts +11 -24
- package/dist/media.js +0 -12
- package/dist/message.d.ts +50 -133
- package/dist/message.js +1 -64
- package/dist/runtimeCardFields.d.ts +39 -112
- package/dist/runtimeCardFields.js +0 -57
- package/dist/turnProtocol.d.ts +24 -91
- package/dist/turnProtocol.js +0 -40
- package/package.json +5 -8
- package/dist/bridgeLocal.d.ts +0 -1871
- package/dist/bridgeLocal.js +0 -744
- package/dist/cjs/bridgeLocal.js +0 -747
- package/dist/cjs/controlSignals.js +0 -44
- package/dist/cjs/endpointRegistry.js +0 -264
- package/dist/cjs/hitl.js +0 -171
- package/dist/cjs/inboundFrame.js +0 -92
- package/dist/cjs/restEndpoints.js +0 -237
- package/dist/cjs/sendContextual.js +0 -92
- package/dist/cjs/sseEvents.js +0 -281
- package/dist/controlSignals.d.ts +0 -55
- package/dist/controlSignals.js +0 -41
- package/dist/endpointRegistry.d.ts +0 -13
- package/dist/endpointRegistry.js +0 -261
- package/dist/hitl.d.ts +0 -303
- package/dist/hitl.js +0 -168
- package/dist/inboundFrame.d.ts +0 -229
- package/dist/inboundFrame.js +0 -89
- package/dist/restEndpoints.d.ts +0 -531
- package/dist/restEndpoints.js +0 -234
- package/dist/schemas/agent-behavior-settings-record.schema.json +0 -48
- package/dist/schemas/bridge-connection-state-notification.schema.json +0 -19
- package/dist/schemas/bridge-get-attachment-params.schema.json +0 -24
- package/dist/schemas/bridge-get-attachment-result.schema.json +0 -20
- package/dist/schemas/bridge-hello-params.schema.json +0 -42
- package/dist/schemas/bridge-hello-result.schema.json +0 -105
- package/dist/schemas/bridge-hitl-state.schema.json +0 -38
- package/dist/schemas/bridge-ok-result.schema.json +0 -15
- package/dist/schemas/bridge-publish-streaming-event-params.schema.json +0 -138
- package/dist/schemas/bridge-ready-notification.schema.json +0 -79
- package/dist/schemas/bridge-resync-reason.schema.json +0 -9
- package/dist/schemas/bridge-resync.schema.json +0 -18
- package/dist/schemas/bridge-rpc-error.schema.json +0 -19
- package/dist/schemas/bridge-rpc-id.schema.json +0 -12
- package/dist/schemas/bridge-rpc-notification.schema.json +0 -20
- package/dist/schemas/bridge-rpc-request.schema.json +0 -31
- package/dist/schemas/bridge-rpc-response.schema.json +0 -81
- package/dist/schemas/bridge-status-result.schema.json +0 -76
- package/dist/schemas/bridge-stream-clear-event.schema.json +0 -15
- package/dist/schemas/bridge-stream-event.schema.json +0 -112
- package/dist/schemas/bridge-stream-final-event.schema.json +0 -19
- package/dist/schemas/bridge-stream-text-event.schema.json +0 -31
- package/dist/schemas/bridge-stream-thinking-event.schema.json +0 -15
- package/dist/schemas/bridge-stream-tool-event.schema.json +0 -36
- package/dist/schemas/bridge-upload-media-params.schema.json +0 -28
- package/dist/schemas/bridge-upstream-state.schema.json +0 -10
- package/dist/schemas/contacts-response.schema.json +0 -52
- package/dist/schemas/control-channel-key.schema.json +0 -10
- package/dist/schemas/control-primitive-event.schema.json +0 -30
- package/dist/schemas/control-primitive-map.schema.json +0 -15
- package/dist/schemas/control-session-event.schema.json +0 -26
- package/dist/schemas/control-session-node.schema.json +0 -11
- package/dist/schemas/control-signal-event.schema.json +0 -35
- package/dist/schemas/control-signal-node.schema.json +0 -22
- package/dist/schemas/control-signal-type.schema.json +0 -10
- package/dist/schemas/conversations-response.schema.json +0 -167
- package/dist/schemas/create-contact-request-request.schema.json +0 -17
- package/dist/schemas/create-contact-request-response.schema.json +0 -51
- package/dist/schemas/create-conversation-request.schema.json +0 -82
- package/dist/schemas/create-conversation-response.schema.json +0 -29
- package/dist/schemas/delete-message-response.schema.json +0 -11
- package/dist/schemas/delivery-intent.schema.json +0 -11
- package/dist/schemas/forward-message-request.schema.json +0 -25
- package/dist/schemas/forward-message-response.schema.json +0 -35
- package/dist/schemas/forwarded-from.schema.json +0 -18
- package/dist/schemas/get-messages-query.schema.json +0 -17
- package/dist/schemas/hitl-approval-category.schema.json +0 -15
- package/dist/schemas/hitl-approval-detail.schema.json +0 -21
- package/dist/schemas/hitl-approval-outcome-record.schema.json +0 -33
- package/dist/schemas/hitl-approval-reply-record.schema.json +0 -57
- package/dist/schemas/hitl-approval-request-record.schema.json +0 -105
- package/dist/schemas/hitl-approval-risk.schema.json +0 -11
- package/dist/schemas/hitl-card-outcome-record.schema.json +0 -48
- package/dist/schemas/hitl-card-reply-record.schema.json +0 -46
- package/dist/schemas/hitl-card-request-record.schema.json +0 -73
- package/dist/schemas/hitl-input-answers.schema.json +0 -23
- package/dist/schemas/hitl-input-kind.schema.json +0 -10
- package/dist/schemas/hitl-input-outcome-record.schema.json +0 -46
- package/dist/schemas/hitl-input-question.schema.json +0 -54
- package/dist/schemas/hitl-input-reply-record.schema.json +0 -44
- package/dist/schemas/hitl-input-request-record.schema.json +0 -134
- package/dist/schemas/hitl-pending.schema.json +0 -31
- package/dist/schemas/hitl-request-accepted.schema.json +0 -18
- package/dist/schemas/hitl-request-kind.schema.json +0 -10
- package/dist/schemas/hitl-resolution-status.schema.json +0 -10
- package/dist/schemas/hitl-resolution.schema.json +0 -38
- package/dist/schemas/hitl-session-rule.schema.json +0 -32
- package/dist/schemas/inbound-disposition.schema.json +0 -13
- package/dist/schemas/inbound-frame-attachment-v1.schema.json +0 -94
- package/dist/schemas/inbound-frame-contact-card-v1.schema.json +0 -59
- package/dist/schemas/inbound-frame-group-context-v1.schema.json +0 -96
- package/dist/schemas/inbound-frame-reply-context-v1.schema.json +0 -261
- package/dist/schemas/inbound-frame-shape-v1.schema.json +0 -12
- package/dist/schemas/inbound-frame-v1.schema.json +0 -506
- package/dist/schemas/mark-read-response.schema.json +0 -11
- package/dist/schemas/media-attachment-kind.schema.json +0 -11
- package/dist/schemas/media-attachment.schema.json +0 -42
- package/dist/schemas/messages-page-response.schema.json +0 -290
- package/dist/schemas/participation-decision-input.schema.json +0 -44
- package/dist/schemas/participation-history-message.schema.json +0 -23
- package/dist/schemas/participation-history-snapshot.schema.json +0 -37
- package/dist/schemas/participation-style.schema.json +0 -13
- package/dist/schemas/react-request.schema.json +0 -22
- package/dist/schemas/react-response.schema.json +0 -35
- package/dist/schemas/resolve-admission-request.schema.json +0 -30
- package/dist/schemas/resolve-admission-response.schema.json +0 -129
- package/dist/schemas/resolved-agent-behavior-policy-record.schema.json +0 -81
- package/dist/schemas/rest-contact.schema.json +0 -40
- package/dist/schemas/rest-conversation-last-message.schema.json +0 -77
- package/dist/schemas/rest-conversation.schema.json +0 -155
- package/dist/schemas/rest-message.schema.json +0 -252
- package/dist/schemas/rest-ok-response.schema.json +0 -11
- package/dist/schemas/rest-session-selection.schema.json +0 -40
- package/dist/schemas/runtime-card-field-choice.schema.json +0 -23
- package/dist/schemas/runtime-card-field-type.schema.json +0 -17
- package/dist/schemas/runtime-card-field.schema.json +0 -180
- package/dist/schemas/runtime-card-line-item-column-type.schema.json +0 -12
- package/dist/schemas/runtime-card-line-item-column.schema.json +0 -74
- package/dist/schemas/send-contextual-deferred-response.schema.json +0 -39
- package/dist/schemas/send-contextual-messaged-response.schema.json +0 -42
- package/dist/schemas/send-contextual-request.schema.json +0 -103
- package/dist/schemas/send-contextual-response.schema.json +0 -105
- package/dist/schemas/send-contextual-self-context.schema.json +0 -19
- package/dist/schemas/send-contextual-state-response.schema.json +0 -24
- package/dist/schemas/send-message-request.schema.json +0 -106
- package/dist/schemas/send-message-response.schema.json +0 -14
- package/dist/schemas/sender-type.schema.json +0 -9
- package/dist/schemas/serialize-message-input.schema.json +0 -29
- package/dist/schemas/serialized-agent-client-type.schema.json +0 -12
- package/dist/schemas/serialized-contact-card.schema.json +0 -65
- package/dist/schemas/serialized-contact-request-status.schema.json +0 -11
- package/dist/schemas/serialized-contact-request.schema.json +0 -157
- package/dist/schemas/serialized-content-type.schema.json +0 -13
- package/dist/schemas/serialized-message.schema.json +0 -249
- package/dist/schemas/serialized-reactions.schema.json +0 -14
- package/dist/schemas/serialized-sender-type.schema.json +0 -9
- package/dist/schemas/set-streaming-request.schema.json +0 -67
- package/dist/schemas/set-typing-request.schema.json +0 -25
- package/dist/schemas/sse-access-policy.schema.json +0 -10
- package/dist/schemas/sse-agent-context-payload.schema.json +0 -57
- package/dist/schemas/sse-connected-payload.schema.json +0 -18
- package/dist/schemas/sse-contact-payload.schema.json +0 -40
- package/dist/schemas/sse-contact-removed-payload.schema.json +0 -14
- package/dist/schemas/sse-contact-request-payload.schema.json +0 -157
- package/dist/schemas/sse-conversation-updated-payload.schema.json +0 -48
- package/dist/schemas/sse-error-payload.schema.json +0 -23
- package/dist/schemas/sse-event-envelope.schema.json +0 -40
- package/dist/schemas/sse-event-family.schema.json +0 -12
- package/dist/schemas/sse-event-type.schema.json +0 -26
- package/dist/schemas/sse-heartbeat-payload.schema.json +0 -14
- package/dist/schemas/sse-membership-change.schema.json +0 -28
- package/dist/schemas/sse-message-created-payload.schema.json +0 -414
- package/dist/schemas/sse-message-deleted-payload.schema.json +0 -18
- package/dist/schemas/sse-message-updated-payload.schema.json +0 -46
- package/dist/schemas/sse-presence-payload.schema.json +0 -21
- package/dist/schemas/sse-provenance.schema.json +0 -64
- package/dist/schemas/sse-replay-expired-payload.schema.json +0 -21
- package/dist/schemas/sse-runtime-control-kind.schema.json +0 -13
- package/dist/schemas/sse-runtime-control-payload.schema.json +0 -44
- package/dist/schemas/sse-self-context.schema.json +0 -45
- package/dist/schemas/sse-turn-dispatch.schema.json +0 -29
- package/dist/schemas/sse-typing-payload.schema.json +0 -32
- package/dist/schemas/sse-voice-session-event-payload.schema.json +0 -170
- package/dist/schemas/sse-voice-session.schema.json +0 -157
- package/dist/schemas/trigger-decision.schema.json +0 -27
- package/dist/schemas/turn-lifecycle-state.schema.json +0 -14
- package/dist/schemas/turn-message-semantics.schema.json +0 -10
- package/dist/schemas/turn-metadata.schema.json +0 -56
- package/dist/schemas/turn-state-like.schema.json +0 -39
- package/dist/schemas/update-disposition-request.schema.json +0 -22
- package/dist/schemas/upload-media-request.schema.json +0 -25
- package/dist/schemas/upload-media-response.schema.json +0 -55
- package/dist/sendContextual.d.ts +0 -114
- package/dist/sendContextual.js +0 -89
- package/dist/sseEvents.d.ts +0 -474
- package/dist/sseEvents.js +0 -278
package/dist/restEndpoints.d.ts
DELETED
|
@@ -1,531 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const RestOkResponseSchema: z.ZodObject<{
|
|
3
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
-
}, z.core.$loose>;
|
|
5
|
-
export type RestOkResponse = z.infer<typeof RestOkResponseSchema>;
|
|
6
|
-
/** GET …/messages items — the serialized message plus the soft-delete flag. */
|
|
7
|
-
export declare const RestMessageSchema: z.ZodObject<{
|
|
8
|
-
id: z.ZodString;
|
|
9
|
-
senderId: z.ZodString;
|
|
10
|
-
senderName: z.ZodOptional<z.ZodString>;
|
|
11
|
-
senderType: z.ZodEnum<{
|
|
12
|
-
human: "human";
|
|
13
|
-
ai_agent: "ai_agent";
|
|
14
|
-
}>;
|
|
15
|
-
isOwner: z.ZodBoolean;
|
|
16
|
-
contentType: z.ZodEnum<{
|
|
17
|
-
file: "file";
|
|
18
|
-
image: "image";
|
|
19
|
-
audio: "audio";
|
|
20
|
-
video: "video";
|
|
21
|
-
text: "text";
|
|
22
|
-
contact_card: "contact_card";
|
|
23
|
-
}>;
|
|
24
|
-
text: z.ZodNullable<z.ZodString>;
|
|
25
|
-
attachments: z.ZodArray<z.ZodObject<{
|
|
26
|
-
kind: z.ZodEnum<{
|
|
27
|
-
file: "file";
|
|
28
|
-
image: "image";
|
|
29
|
-
audio: "audio";
|
|
30
|
-
video: "video";
|
|
31
|
-
}>;
|
|
32
|
-
url: z.ZodString;
|
|
33
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
34
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
35
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
38
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
}, z.core.$strip>>;
|
|
40
|
-
mentions: z.ZodArray<z.ZodString>;
|
|
41
|
-
replyTo: z.ZodNullable<z.ZodString>;
|
|
42
|
-
replyToPosition: z.ZodNullable<z.ZodNumber>;
|
|
43
|
-
forwarded: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
-
forwardedFrom: z.ZodOptional<z.ZodObject<{
|
|
45
|
-
sourceConversationId: z.ZodString;
|
|
46
|
-
messageId: z.ZodString;
|
|
47
|
-
}, z.core.$strip>>;
|
|
48
|
-
status: z.ZodEnum<{
|
|
49
|
-
sent: "sent";
|
|
50
|
-
read: "read";
|
|
51
|
-
}>;
|
|
52
|
-
createdAt: z.ZodString;
|
|
53
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
54
|
-
contactCard: z.ZodOptional<z.ZodObject<{
|
|
55
|
-
userId: z.ZodString;
|
|
56
|
-
canonContactId: z.ZodOptional<z.ZodString>;
|
|
57
|
-
displayName: z.ZodString;
|
|
58
|
-
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
59
|
-
userType: z.ZodEnum<{
|
|
60
|
-
human: "human";
|
|
61
|
-
ai_agent: "ai_agent";
|
|
62
|
-
}>;
|
|
63
|
-
clientType: z.ZodOptional<z.ZodEnum<{
|
|
64
|
-
"claude-code": "claude-code";
|
|
65
|
-
openclaw: "openclaw";
|
|
66
|
-
codex: "codex";
|
|
67
|
-
hermes: "hermes";
|
|
68
|
-
generic: "generic";
|
|
69
|
-
}>>;
|
|
70
|
-
about: z.ZodOptional<z.ZodString>;
|
|
71
|
-
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
-
ownerId: z.ZodOptional<z.ZodString>;
|
|
73
|
-
ownerName: z.ZodOptional<z.ZodString>;
|
|
74
|
-
lifecycleState: z.ZodOptional<z.ZodString>;
|
|
75
|
-
}, z.core.$strip>>;
|
|
76
|
-
runtimeCard: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
77
|
-
reactions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
78
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
export type RestMessage = z.infer<typeof RestMessageSchema>;
|
|
81
|
-
/**
|
|
82
|
-
* STRICT WRITES, TOLERANT READS: this is a READ schema over live production
|
|
83
|
-
* data, so it must describe what Firestore actually holds — not what today's
|
|
84
|
-
* writers produce. The GET /conversations serializer
|
|
85
|
-
* (functions/src/api/getConversations.ts) passes `lastMessage` fields through
|
|
86
|
-
* from the conversation doc, and legacy rows (pre-refactor writes,
|
|
87
|
-
* deleted-message repair) hold explicit nulls:
|
|
88
|
-
* - `text` is serialized `?? null` and `timestamp` as
|
|
89
|
-
* `?.toDate?.()?.toISOString() ?? null` — both emit null by construction.
|
|
90
|
-
* - `senderId` / `senderType` / `contentType` are raw pass-throughs; live
|
|
91
|
-
* rows exist with all three null (the getConversations "ghost fix" comment
|
|
92
|
-
* acknowledges null senderId).
|
|
93
|
-
* - conversation `createdAt` is also serialized `?? null`.
|
|
94
|
-
* Writers (onMessageCreated / deletedMessageRepair) stay strict — they always
|
|
95
|
-
* produce the full shape; only the read contract admits the legacy nulls.
|
|
96
|
-
*/
|
|
97
|
-
export declare const RestConversationLastMessageSchema: z.ZodObject<{
|
|
98
|
-
text: z.ZodNullable<z.ZodString>;
|
|
99
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
100
|
-
senderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
-
senderType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
102
|
-
human: "human";
|
|
103
|
-
ai_agent: "ai_agent";
|
|
104
|
-
}>>>;
|
|
105
|
-
contentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
106
|
-
file: "file";
|
|
107
|
-
image: "image";
|
|
108
|
-
audio: "audio";
|
|
109
|
-
video: "video";
|
|
110
|
-
text: "text";
|
|
111
|
-
contact_card: "contact_card";
|
|
112
|
-
}>>>;
|
|
113
|
-
timestamp: z.ZodNullable<z.ZodString>;
|
|
114
|
-
}, z.core.$loose>;
|
|
115
|
-
export type RestConversationLastMessage = z.infer<typeof RestConversationLastMessageSchema>;
|
|
116
|
-
export declare const RestConversationSchema: z.ZodObject<{
|
|
117
|
-
id: z.ZodString;
|
|
118
|
-
type: z.ZodEnum<{
|
|
119
|
-
direct: "direct";
|
|
120
|
-
group: "group";
|
|
121
|
-
}>;
|
|
122
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
|
-
memberIds: z.ZodArray<z.ZodString>;
|
|
125
|
-
isAgentChat: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
-
behavior: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
127
|
-
hasUnread: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
-
lastMessage: z.ZodNullable<z.ZodObject<{
|
|
129
|
-
text: z.ZodNullable<z.ZodString>;
|
|
130
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
131
|
-
senderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
-
senderType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
133
|
-
human: "human";
|
|
134
|
-
ai_agent: "ai_agent";
|
|
135
|
-
}>>>;
|
|
136
|
-
contentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
137
|
-
file: "file";
|
|
138
|
-
image: "image";
|
|
139
|
-
audio: "audio";
|
|
140
|
-
video: "video";
|
|
141
|
-
text: "text";
|
|
142
|
-
contact_card: "contact_card";
|
|
143
|
-
}>>>;
|
|
144
|
-
timestamp: z.ZodNullable<z.ZodString>;
|
|
145
|
-
}, z.core.$loose>>;
|
|
146
|
-
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
|
-
}, z.core.$loose>;
|
|
148
|
-
export type RestConversation = z.infer<typeof RestConversationSchema>;
|
|
149
|
-
export declare const RestContactSchema: z.ZodObject<{
|
|
150
|
-
id: z.ZodString;
|
|
151
|
-
source: z.ZodString;
|
|
152
|
-
addedAt: z.ZodNullable<z.ZodString>;
|
|
153
|
-
displayNameOverride: z.ZodNullable<z.ZodString>;
|
|
154
|
-
}, z.core.$strip>;
|
|
155
|
-
export type RestContact = z.infer<typeof RestContactSchema>;
|
|
156
|
-
export declare const RestSessionSelectionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
157
|
-
mode: z.ZodEnum<{
|
|
158
|
-
new: "new";
|
|
159
|
-
continue_latest: "continue_latest";
|
|
160
|
-
continue_or_create: "continue_or_create";
|
|
161
|
-
}>;
|
|
162
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
-
mode: z.ZodLiteral<"specific">;
|
|
164
|
-
conversationId: z.ZodString;
|
|
165
|
-
}, z.core.$strip>]>;
|
|
166
|
-
export type RestSessionSelection = z.infer<typeof RestSessionSelectionSchema>;
|
|
167
|
-
export declare const SendMessageRequestSchema: z.ZodObject<{
|
|
168
|
-
conversationId: z.ZodString;
|
|
169
|
-
text: z.ZodOptional<z.ZodString>;
|
|
170
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
171
|
-
contentType: z.ZodOptional<z.ZodEnum<{
|
|
172
|
-
file: "file";
|
|
173
|
-
image: "image";
|
|
174
|
-
audio: "audio";
|
|
175
|
-
video: "video";
|
|
176
|
-
text: "text";
|
|
177
|
-
contact_card: "contact_card";
|
|
178
|
-
}>>;
|
|
179
|
-
replyTo: z.ZodOptional<z.ZodString>;
|
|
180
|
-
replyToPosition: z.ZodOptional<z.ZodNumber>;
|
|
181
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
182
|
-
kind: z.ZodEnum<{
|
|
183
|
-
file: "file";
|
|
184
|
-
image: "image";
|
|
185
|
-
audio: "audio";
|
|
186
|
-
video: "video";
|
|
187
|
-
}>;
|
|
188
|
-
url: z.ZodString;
|
|
189
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
190
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
191
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
192
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
193
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
194
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
195
|
-
}, z.core.$strip>>>;
|
|
196
|
-
contactCardUserId: z.ZodOptional<z.ZodString>;
|
|
197
|
-
mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
198
|
-
selfContextId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
199
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
200
|
-
}, z.core.$strip>;
|
|
201
|
-
export type SendMessageRequest = z.infer<typeof SendMessageRequestSchema>;
|
|
202
|
-
export declare const SendMessageResponseSchema: z.ZodObject<{
|
|
203
|
-
messageId: z.ZodString;
|
|
204
|
-
}, z.core.$strip>;
|
|
205
|
-
export type SendMessageResponse = z.infer<typeof SendMessageResponseSchema>;
|
|
206
|
-
export declare const ReactRequestSchema: z.ZodObject<{
|
|
207
|
-
conversationId: z.ZodString;
|
|
208
|
-
messageId: z.ZodString;
|
|
209
|
-
emoji: z.ZodString;
|
|
210
|
-
}, z.core.$strip>;
|
|
211
|
-
export type ReactRequest = z.infer<typeof ReactRequestSchema>;
|
|
212
|
-
export declare const ReactResponseSchema: z.ZodObject<{
|
|
213
|
-
success: z.ZodBoolean;
|
|
214
|
-
action: z.ZodEnum<{
|
|
215
|
-
added: "added";
|
|
216
|
-
removed: "removed";
|
|
217
|
-
}>;
|
|
218
|
-
reactions: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
219
|
-
}, z.core.$strip>;
|
|
220
|
-
export type ReactResponse = z.infer<typeof ReactResponseSchema>;
|
|
221
|
-
export declare const ForwardMessageRequestSchema: z.ZodObject<{
|
|
222
|
-
sourceConversationId: z.ZodString;
|
|
223
|
-
targetConversationId: z.ZodString;
|
|
224
|
-
messageId: z.ZodString;
|
|
225
|
-
text: z.ZodOptional<z.ZodString>;
|
|
226
|
-
}, z.core.$strip>;
|
|
227
|
-
export type ForwardMessageRequest = z.infer<typeof ForwardMessageRequestSchema>;
|
|
228
|
-
export declare const ForwardMessageResponseSchema: z.ZodObject<{
|
|
229
|
-
messageId: z.ZodString;
|
|
230
|
-
targetConversationId: z.ZodString;
|
|
231
|
-
forwardedFrom: z.ZodObject<{
|
|
232
|
-
sourceConversationId: z.ZodString;
|
|
233
|
-
messageId: z.ZodString;
|
|
234
|
-
}, z.core.$strip>;
|
|
235
|
-
}, z.core.$strip>;
|
|
236
|
-
export type ForwardMessageResponse = z.infer<typeof ForwardMessageResponseSchema>;
|
|
237
|
-
export declare const DeleteMessageResponseSchema: z.ZodObject<{
|
|
238
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
-
}, z.core.$loose>;
|
|
240
|
-
export declare const MarkReadResponseSchema: z.ZodObject<{
|
|
241
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
-
}, z.core.$loose>;
|
|
243
|
-
export declare const UpdateDispositionRequestSchema: z.ZodObject<{
|
|
244
|
-
inboundDisposition: z.ZodEnum<{
|
|
245
|
-
queued: "queued";
|
|
246
|
-
accepted_now: "accepted_now";
|
|
247
|
-
interleaved: "interleaved";
|
|
248
|
-
trigger_suppressed: "trigger_suppressed";
|
|
249
|
-
rejected: "rejected";
|
|
250
|
-
cancelled: "cancelled";
|
|
251
|
-
}>;
|
|
252
|
-
}, z.core.$strip>;
|
|
253
|
-
export type UpdateDispositionRequest = z.infer<typeof UpdateDispositionRequestSchema>;
|
|
254
|
-
export declare const ConversationsResponseSchema: z.ZodObject<{
|
|
255
|
-
conversations: z.ZodArray<z.ZodObject<{
|
|
256
|
-
id: z.ZodString;
|
|
257
|
-
type: z.ZodEnum<{
|
|
258
|
-
direct: "direct";
|
|
259
|
-
group: "group";
|
|
260
|
-
}>;
|
|
261
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
262
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
|
-
memberIds: z.ZodArray<z.ZodString>;
|
|
264
|
-
isAgentChat: z.ZodOptional<z.ZodBoolean>;
|
|
265
|
-
behavior: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
266
|
-
hasUnread: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
-
lastMessage: z.ZodNullable<z.ZodObject<{
|
|
268
|
-
text: z.ZodNullable<z.ZodString>;
|
|
269
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
270
|
-
senderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
|
-
senderType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
272
|
-
human: "human";
|
|
273
|
-
ai_agent: "ai_agent";
|
|
274
|
-
}>>>;
|
|
275
|
-
contentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
276
|
-
file: "file";
|
|
277
|
-
image: "image";
|
|
278
|
-
audio: "audio";
|
|
279
|
-
video: "video";
|
|
280
|
-
text: "text";
|
|
281
|
-
contact_card: "contact_card";
|
|
282
|
-
}>>>;
|
|
283
|
-
timestamp: z.ZodNullable<z.ZodString>;
|
|
284
|
-
}, z.core.$loose>>;
|
|
285
|
-
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
286
|
-
}, z.core.$loose>>;
|
|
287
|
-
}, z.core.$strip>;
|
|
288
|
-
export type ConversationsResponse = z.infer<typeof ConversationsResponseSchema>;
|
|
289
|
-
/** Query params: limit, before, includeBehavior. */
|
|
290
|
-
export declare const GetMessagesQuerySchema: z.ZodObject<{
|
|
291
|
-
limit: z.ZodOptional<z.ZodString>;
|
|
292
|
-
before: z.ZodOptional<z.ZodString>;
|
|
293
|
-
includeBehavior: z.ZodOptional<z.ZodString>;
|
|
294
|
-
}, z.core.$strip>;
|
|
295
|
-
export type GetMessagesQuery = z.infer<typeof GetMessagesQuerySchema>;
|
|
296
|
-
export declare const MessagesPageResponseSchema: z.ZodObject<{
|
|
297
|
-
messages: z.ZodArray<z.ZodObject<{
|
|
298
|
-
id: z.ZodString;
|
|
299
|
-
senderId: z.ZodString;
|
|
300
|
-
senderName: z.ZodOptional<z.ZodString>;
|
|
301
|
-
senderType: z.ZodEnum<{
|
|
302
|
-
human: "human";
|
|
303
|
-
ai_agent: "ai_agent";
|
|
304
|
-
}>;
|
|
305
|
-
isOwner: z.ZodBoolean;
|
|
306
|
-
contentType: z.ZodEnum<{
|
|
307
|
-
file: "file";
|
|
308
|
-
image: "image";
|
|
309
|
-
audio: "audio";
|
|
310
|
-
video: "video";
|
|
311
|
-
text: "text";
|
|
312
|
-
contact_card: "contact_card";
|
|
313
|
-
}>;
|
|
314
|
-
text: z.ZodNullable<z.ZodString>;
|
|
315
|
-
attachments: z.ZodArray<z.ZodObject<{
|
|
316
|
-
kind: z.ZodEnum<{
|
|
317
|
-
file: "file";
|
|
318
|
-
image: "image";
|
|
319
|
-
audio: "audio";
|
|
320
|
-
video: "video";
|
|
321
|
-
}>;
|
|
322
|
-
url: z.ZodString;
|
|
323
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
324
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
325
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
326
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
327
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
328
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
329
|
-
}, z.core.$strip>>;
|
|
330
|
-
mentions: z.ZodArray<z.ZodString>;
|
|
331
|
-
replyTo: z.ZodNullable<z.ZodString>;
|
|
332
|
-
replyToPosition: z.ZodNullable<z.ZodNumber>;
|
|
333
|
-
forwarded: z.ZodOptional<z.ZodBoolean>;
|
|
334
|
-
forwardedFrom: z.ZodOptional<z.ZodObject<{
|
|
335
|
-
sourceConversationId: z.ZodString;
|
|
336
|
-
messageId: z.ZodString;
|
|
337
|
-
}, z.core.$strip>>;
|
|
338
|
-
status: z.ZodEnum<{
|
|
339
|
-
sent: "sent";
|
|
340
|
-
read: "read";
|
|
341
|
-
}>;
|
|
342
|
-
createdAt: z.ZodString;
|
|
343
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
344
|
-
contactCard: z.ZodOptional<z.ZodObject<{
|
|
345
|
-
userId: z.ZodString;
|
|
346
|
-
canonContactId: z.ZodOptional<z.ZodString>;
|
|
347
|
-
displayName: z.ZodString;
|
|
348
|
-
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
349
|
-
userType: z.ZodEnum<{
|
|
350
|
-
human: "human";
|
|
351
|
-
ai_agent: "ai_agent";
|
|
352
|
-
}>;
|
|
353
|
-
clientType: z.ZodOptional<z.ZodEnum<{
|
|
354
|
-
"claude-code": "claude-code";
|
|
355
|
-
openclaw: "openclaw";
|
|
356
|
-
codex: "codex";
|
|
357
|
-
hermes: "hermes";
|
|
358
|
-
generic: "generic";
|
|
359
|
-
}>>;
|
|
360
|
-
about: z.ZodOptional<z.ZodString>;
|
|
361
|
-
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
362
|
-
ownerId: z.ZodOptional<z.ZodString>;
|
|
363
|
-
ownerName: z.ZodOptional<z.ZodString>;
|
|
364
|
-
lifecycleState: z.ZodOptional<z.ZodString>;
|
|
365
|
-
}, z.core.$strip>>;
|
|
366
|
-
runtimeCard: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
367
|
-
reactions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
368
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
369
|
-
}, z.core.$strip>>;
|
|
370
|
-
behavior: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
371
|
-
activeSelfContextIdByMessageId: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
372
|
-
selfContexts: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
373
|
-
}, z.core.$loose>;
|
|
374
|
-
export type MessagesPageResponse = z.infer<typeof MessagesPageResponseSchema>;
|
|
375
|
-
export declare const CreateConversationRequestSchema: z.ZodObject<{
|
|
376
|
-
type: z.ZodEnum<{
|
|
377
|
-
direct: "direct";
|
|
378
|
-
group: "group";
|
|
379
|
-
}>;
|
|
380
|
-
targetUserId: z.ZodOptional<z.ZodString>;
|
|
381
|
-
memberIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
382
|
-
name: z.ZodOptional<z.ZodString>;
|
|
383
|
-
sessionConfig: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
384
|
-
sessionSelection: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
385
|
-
mode: z.ZodEnum<{
|
|
386
|
-
new: "new";
|
|
387
|
-
continue_latest: "continue_latest";
|
|
388
|
-
continue_or_create: "continue_or_create";
|
|
389
|
-
}>;
|
|
390
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
391
|
-
mode: z.ZodLiteral<"specific">;
|
|
392
|
-
conversationId: z.ZodString;
|
|
393
|
-
}, z.core.$strip>]>>;
|
|
394
|
-
}, z.core.$strip>;
|
|
395
|
-
export type CreateConversationRequest = z.infer<typeof CreateConversationRequestSchema>;
|
|
396
|
-
export declare const CreateConversationResponseSchema: z.ZodObject<{
|
|
397
|
-
conversationId: z.ZodString;
|
|
398
|
-
created: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
-
reused: z.ZodOptional<z.ZodBoolean>;
|
|
400
|
-
sessionSelection: z.ZodOptional<z.ZodEnum<{
|
|
401
|
-
new: "new";
|
|
402
|
-
continue_latest: "continue_latest";
|
|
403
|
-
continue_or_create: "continue_or_create";
|
|
404
|
-
specific: "specific";
|
|
405
|
-
}>>;
|
|
406
|
-
}, z.core.$strip>;
|
|
407
|
-
export type CreateConversationResponse = z.infer<typeof CreateConversationResponseSchema>;
|
|
408
|
-
export declare const CreateContactRequestRequestSchema: z.ZodObject<{
|
|
409
|
-
targetId: z.ZodString;
|
|
410
|
-
message: z.ZodOptional<z.ZodString>;
|
|
411
|
-
}, z.core.$strip>;
|
|
412
|
-
export type CreateContactRequestRequest = z.infer<typeof CreateContactRequestRequestSchema>;
|
|
413
|
-
export declare const CreateContactRequestResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
414
|
-
status: z.ZodLiteral<"open">;
|
|
415
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
416
|
-
status: z.ZodEnum<{
|
|
417
|
-
created: "created";
|
|
418
|
-
duplicate: "duplicate";
|
|
419
|
-
}>;
|
|
420
|
-
requestId: z.ZodString;
|
|
421
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
422
|
-
message: z.ZodString;
|
|
423
|
-
}, z.core.$loose>]>;
|
|
424
|
-
export type CreateContactRequestResponse = z.infer<typeof CreateContactRequestResponseSchema>;
|
|
425
|
-
export declare const ContactsResponseSchema: z.ZodObject<{
|
|
426
|
-
contacts: z.ZodArray<z.ZodObject<{
|
|
427
|
-
id: z.ZodString;
|
|
428
|
-
source: z.ZodString;
|
|
429
|
-
addedAt: z.ZodNullable<z.ZodString>;
|
|
430
|
-
displayNameOverride: z.ZodNullable<z.ZodString>;
|
|
431
|
-
}, z.core.$strip>>;
|
|
432
|
-
}, z.core.$strip>;
|
|
433
|
-
export type ContactsResponse = z.infer<typeof ContactsResponseSchema>;
|
|
434
|
-
export declare const ResolveAdmissionRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
435
|
-
targetUserId: z.ZodString;
|
|
436
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
437
|
-
canonContactId: z.ZodString;
|
|
438
|
-
}, z.core.$strip>]>;
|
|
439
|
-
export type ResolveAdmissionRequest = z.infer<typeof ResolveAdmissionRequestSchema>;
|
|
440
|
-
export declare const ResolveAdmissionResponseSchema: z.ZodObject<{
|
|
441
|
-
resolvedTargetUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
-
target: z.ZodNullable<z.ZodObject<{
|
|
443
|
-
id: z.ZodString;
|
|
444
|
-
canonContactId: z.ZodOptional<z.ZodString>;
|
|
445
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
446
|
-
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
447
|
-
about: z.ZodOptional<z.ZodString>;
|
|
448
|
-
userType: z.ZodOptional<z.ZodEnum<{
|
|
449
|
-
human: "human";
|
|
450
|
-
ai_agent: "ai_agent";
|
|
451
|
-
}>>;
|
|
452
|
-
discoverable: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
-
inboundPolicy: z.ZodOptional<z.ZodEnum<{
|
|
454
|
-
open: "open";
|
|
455
|
-
"approval-required": "approval-required";
|
|
456
|
-
"owner-only": "owner-only";
|
|
457
|
-
}>>;
|
|
458
|
-
groupJoinPolicy: z.ZodOptional<z.ZodEnum<{
|
|
459
|
-
open: "open";
|
|
460
|
-
"approval-required": "approval-required";
|
|
461
|
-
"owner-only": "owner-only";
|
|
462
|
-
}>>;
|
|
463
|
-
}, z.core.$loose>>;
|
|
464
|
-
admission: z.ZodObject<{
|
|
465
|
-
state: z.ZodEnum<{
|
|
466
|
-
"owner-only": "owner-only";
|
|
467
|
-
self: "self";
|
|
468
|
-
"not-found": "not-found";
|
|
469
|
-
allowed: "allowed";
|
|
470
|
-
"request-required": "request-required";
|
|
471
|
-
"pending-outbound": "pending-outbound";
|
|
472
|
-
blocked: "blocked";
|
|
473
|
-
inactive: "inactive";
|
|
474
|
-
}>;
|
|
475
|
-
canMessage: z.ZodBoolean;
|
|
476
|
-
canRequestContact: z.ZodBoolean;
|
|
477
|
-
isContact: z.ZodBoolean;
|
|
478
|
-
pendingRequestId: z.ZodOptional<z.ZodString>;
|
|
479
|
-
blockedByViewer: z.ZodOptional<z.ZodBoolean>;
|
|
480
|
-
blockedByTarget: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
-
}, z.core.$loose>;
|
|
482
|
-
}, z.core.$loose>;
|
|
483
|
-
export type ResolveAdmissionResponse = z.infer<typeof ResolveAdmissionResponseSchema>;
|
|
484
|
-
export declare const SetTypingRequestSchema: z.ZodObject<{
|
|
485
|
-
conversationId: z.ZodString;
|
|
486
|
-
typing: z.ZodBoolean;
|
|
487
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
488
|
-
thinking: "thinking";
|
|
489
|
-
typing: "typing";
|
|
490
|
-
}>>;
|
|
491
|
-
}, z.core.$strip>;
|
|
492
|
-
export type SetTypingRequest = z.infer<typeof SetTypingRequestSchema>;
|
|
493
|
-
/** POST /streaming — the legacy REST facade over the RTDB streaming bubble. */
|
|
494
|
-
export declare const SetStreamingRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
495
|
-
conversationId: z.ZodString;
|
|
496
|
-
text: z.ZodString;
|
|
497
|
-
status: z.ZodString;
|
|
498
|
-
messageId: z.ZodString;
|
|
499
|
-
turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
500
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
501
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
502
|
-
conversationId: z.ZodString;
|
|
503
|
-
streaming: z.ZodLiteral<false>;
|
|
504
|
-
}, z.core.$strip>]>;
|
|
505
|
-
export type SetStreamingRequest = z.infer<typeof SetStreamingRequestSchema>;
|
|
506
|
-
export declare const UploadMediaRequestSchema: z.ZodObject<{
|
|
507
|
-
conversationId: z.ZodString;
|
|
508
|
-
mimeType: z.ZodString;
|
|
509
|
-
data: z.ZodString;
|
|
510
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
511
|
-
}, z.core.$strip>;
|
|
512
|
-
export type UploadMediaRequest = z.infer<typeof UploadMediaRequestSchema>;
|
|
513
|
-
export declare const UploadMediaResponseSchema: z.ZodObject<{
|
|
514
|
-
url: z.ZodString;
|
|
515
|
-
attachment: z.ZodObject<{
|
|
516
|
-
kind: z.ZodEnum<{
|
|
517
|
-
file: "file";
|
|
518
|
-
image: "image";
|
|
519
|
-
audio: "audio";
|
|
520
|
-
video: "video";
|
|
521
|
-
}>;
|
|
522
|
-
url: z.ZodString;
|
|
523
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
524
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
525
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
526
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
527
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
528
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
529
|
-
}, z.core.$strip>;
|
|
530
|
-
}, z.core.$strip>;
|
|
531
|
-
export type UploadMediaResponse = z.infer<typeof UploadMediaResponseSchema>;
|