@joe-broadhead/messaging 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +259 -2
- package/dist/bin/messaging-mcp.js +5484 -3858
- package/dist/bin/messaging-relay.js +4728 -1136
- package/dist/bin/messaging.js +4616 -2807
- package/dist/bin/messagingd.js +16451 -9444
- package/dist/lib/modules/core/agent/operations.js +19 -327
- package/dist/lib/modules/core/agent/present.js +15 -55
- package/dist/lib/modules/core/agent-tools.js +46 -143
- package/dist/lib/modules/core/consent.js +1 -1
- package/dist/lib/modules/core/conversation/context.js +80 -0
- package/dist/lib/modules/core/conversation/event.js +125 -0
- package/dist/lib/modules/core/conversation/guest-invitation.js +42 -0
- package/dist/lib/modules/core/conversation/ids.js +38 -0
- package/dist/lib/modules/core/conversation/link.js +35 -0
- package/dist/lib/modules/core/conversation/log.js +988 -0
- package/dist/lib/modules/core/conversation/ratchet.js +243 -0
- package/dist/lib/modules/core/conversation/request-log.js +158 -0
- package/dist/lib/modules/core/conversation/request-seal.js +41 -0
- package/dist/lib/modules/core/conversation/requests.js +87 -0
- package/dist/lib/modules/core/conversation/seal.js +251 -0
- package/dist/lib/modules/core/conversation-agent-tools.js +69 -0
- package/dist/lib/modules/core/federation/directory-proof.js +83 -0
- package/dist/lib/modules/core/federation/proof-state.js +167 -0
- package/dist/lib/modules/core/federation/roster-proof.js +74 -0
- package/dist/lib/modules/core/index.js +16 -2
- package/dist/lib/modules/core/jelly-host.js +5 -5
- package/dist/lib/modules/core/schema/common.js +85 -3
- package/dist/lib/modules/core/schema/consent.js +5 -4
- package/dist/lib/modules/core/schema/contact-request.js +22 -0
- package/dist/lib/modules/core/schema/conv-frames.js +94 -0
- package/dist/lib/modules/core/schema/conversation.js +326 -0
- package/dist/lib/modules/core/schema/envelope.js +8 -24
- package/dist/lib/modules/core/schema/errors.js +42 -2
- package/dist/lib/modules/core/schema/guest-invitation.js +13 -0
- package/dist/lib/modules/core/schema/index.js +6 -0
- package/dist/lib/modules/core/schema/ipc/consent.js +13 -9
- package/dist/lib/modules/core/schema/ipc/conversation-views.js +80 -0
- package/dist/lib/modules/core/schema/ipc/conversations.js +128 -0
- package/dist/lib/modules/core/schema/ipc/device.js +2 -0
- package/dist/lib/modules/core/schema/ipc/jelly.js +3 -38
- package/dist/lib/modules/core/schema/ipc/shapes.js +14 -72
- package/dist/lib/modules/core/schema/ipc/surfaces.js +12 -195
- package/dist/lib/modules/core/schema/ipc/tasks.js +31 -0
- package/dist/lib/modules/core/schema/ipc.js +18 -44
- package/dist/lib/modules/core/testing.js +1 -0
- package/dist/lib/modules/core/version.js +1 -1
- package/dist/lib/modules/ipc/client.js +10 -2
- package/dist/lib/modules/ipc/server.js +14 -5
- package/dist/lib/modules/ipc/testing.js +13 -23
- package/dist/spec/messaging-v1.md +835 -380
- package/dist/third-party-notices.md +1 -1
- package/dist/third-party.json +1 -1
- package/dist/types/core/agent/operations.d.ts +5 -52
- package/dist/types/core/agent/present.d.ts +6 -21
- package/dist/types/core/agent-tools.d.ts +277 -438
- package/dist/types/core/conversation/context.d.ts +56 -0
- package/dist/types/core/conversation/event.d.ts +36 -0
- package/dist/types/core/conversation/guest-invitation.d.ts +8 -0
- package/dist/types/core/conversation/ids.d.ts +18 -0
- package/dist/types/core/conversation/link.d.ts +16 -0
- package/dist/types/core/conversation/log.d.ts +157 -0
- package/dist/types/core/conversation/ratchet.d.ts +95 -0
- package/dist/types/core/conversation/request-log.d.ts +24 -0
- package/dist/types/core/conversation/request-seal.d.ts +6 -0
- package/dist/types/core/conversation/requests.d.ts +14 -0
- package/dist/types/core/conversation/seal.d.ts +70 -0
- package/dist/types/core/conversation-agent-tools.d.ts +918 -0
- package/dist/types/core/federation/directory-proof.d.ts +8 -0
- package/dist/types/core/federation/proof-state.d.ts +114 -0
- package/dist/types/core/federation/roster-proof.d.ts +7 -0
- package/dist/types/core/index.d.ts +15 -3
- package/dist/types/core/jelly-host.d.ts +1 -1
- package/dist/types/core/schema/common.d.ts +85 -4
- package/dist/types/core/schema/consent.d.ts +7 -7
- package/dist/types/core/schema/contact-request.d.ts +264 -0
- package/dist/types/core/schema/conv-frames.d.ts +1200 -0
- package/dist/types/core/schema/conversation.d.ts +2803 -0
- package/dist/types/core/schema/envelope.d.ts +89 -130
- package/dist/types/core/schema/errors.d.ts +40 -0
- package/dist/types/core/schema/guest-invitation.d.ts +51 -0
- package/dist/types/core/schema/index.d.ts +6 -0
- package/dist/types/core/schema/ipc/consent.d.ts +89 -49
- package/dist/types/core/schema/ipc/conversation-views.d.ts +1023 -0
- package/dist/types/core/schema/ipc/conversations.d.ts +3987 -0
- package/dist/types/core/schema/ipc/device.d.ts +10 -0
- package/dist/types/core/schema/ipc/jelly.d.ts +2 -105
- package/dist/types/core/schema/ipc/shapes.d.ts +16 -95
- package/dist/types/core/schema/ipc/surfaces.d.ts +28 -424
- package/dist/types/core/schema/ipc/tasks.d.ts +208 -0
- package/dist/types/core/schema/ipc.d.ts +2684 -523
- package/dist/types/core/schema/relay.d.ts +20 -4
- package/dist/types/core/testing.d.ts +1 -0
- package/dist/types/core/version.d.ts +1 -1
- package/dist/types/ipc/client.d.ts +4 -1
- package/dist/types/ipc/server.d.ts +10 -1
- package/dist/types/ipc/testing.d.ts +21 -8
- package/package.json +1 -1
|
@@ -0,0 +1,1200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation frames (spec §7, "Conversation frames"; spec §16): the frames a relay speaks after `hello` to carry
|
|
3
|
+
* conversation logs, in a roster realm and in a directory realm alike. They follow the frame rules of §7: one JSON
|
|
4
|
+
* object per text frame, discriminated by `t`; requests carry `req`, replies echo it, and a refusal is the relay
|
|
5
|
+
* binding's `nack {id: req, code, message}` (with `retryAfterMs` for `rate_limited`). Every frame is strict.
|
|
6
|
+
*
|
|
7
|
+
* conv.append {req, event} → conv.ok {req, cid, seq, hash} an op or a msg, sequenced
|
|
8
|
+
* conv.share {req, events} → conv.shared {req, cid, count} key shares, one recipient each
|
|
9
|
+
* conv.fetch {req, cid, after, limit?, sharesAfter?} → conv.entries {req, cid, head, entries, shares, more}
|
|
10
|
+
* conv.head {req, cids? | after?} → conv.heads {req, heads, more}
|
|
11
|
+
* conv.caps {req, persons} → conv.capabilities {req, outdated} who cannot read conversations yet
|
|
12
|
+
* relay → conv.push {cid, entry} | {cid, share} a new entry to the members' online devices; a share to its recipient
|
|
13
|
+
*
|
|
14
|
+
* The relay sequences and filters; members verify everything (spec §16.4, §16.7). It never signs an entry.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
/** Appends an op or a msg to its conversation (`event.cid`). The relay answers `conv.ok` once the entry is stored. */
|
|
18
|
+
export declare const ConvAppendFrame: z.ZodObject<{
|
|
19
|
+
t: z.ZodLiteral<"conv.append">;
|
|
20
|
+
req: z.ZodString;
|
|
21
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
+
class: z.ZodLiteral<"op">;
|
|
23
|
+
body: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
op: z.ZodLiteral<"create">;
|
|
25
|
+
kind: z.ZodEnum<{
|
|
26
|
+
self: "self";
|
|
27
|
+
channel: "channel";
|
|
28
|
+
group: "group";
|
|
29
|
+
dm: "dm";
|
|
30
|
+
}>;
|
|
31
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
public: "public";
|
|
33
|
+
private: "private";
|
|
34
|
+
}>>;
|
|
35
|
+
history: z.ZodEnum<{
|
|
36
|
+
none: "none";
|
|
37
|
+
shared: "shared";
|
|
38
|
+
}>;
|
|
39
|
+
retainDays: z.ZodNumber;
|
|
40
|
+
org: z.ZodOptional<z.ZodString>;
|
|
41
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
42
|
+
p: z.ZodString;
|
|
43
|
+
role: z.ZodEnum<{
|
|
44
|
+
admin: "admin";
|
|
45
|
+
member: "member";
|
|
46
|
+
owner: "owner";
|
|
47
|
+
guest: "guest";
|
|
48
|
+
}>;
|
|
49
|
+
device: z.ZodOptional<z.ZodString>;
|
|
50
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
self: "self";
|
|
52
|
+
none: "none";
|
|
53
|
+
members: "members";
|
|
54
|
+
}>>;
|
|
55
|
+
}, z.core.$strict>>;
|
|
56
|
+
post: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
admins: "admins";
|
|
58
|
+
all: "all";
|
|
59
|
+
}>>;
|
|
60
|
+
invite: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
admins: "admins";
|
|
62
|
+
all: "all";
|
|
63
|
+
}>>;
|
|
64
|
+
pins: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
admins: "admins";
|
|
66
|
+
all: "all";
|
|
67
|
+
}>>;
|
|
68
|
+
sealedMeta: z.ZodOptional<z.ZodString>;
|
|
69
|
+
admission: z.ZodOptional<z.ZodLiteral<"request">>;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
op: z.ZodLiteral<"add">;
|
|
72
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
73
|
+
p: z.ZodString;
|
|
74
|
+
role: z.ZodEnum<{
|
|
75
|
+
admin: "admin";
|
|
76
|
+
member: "member";
|
|
77
|
+
owner: "owner";
|
|
78
|
+
guest: "guest";
|
|
79
|
+
}>;
|
|
80
|
+
device: z.ZodOptional<z.ZodString>;
|
|
81
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
self: "self";
|
|
83
|
+
none: "none";
|
|
84
|
+
members: "members";
|
|
85
|
+
}>>;
|
|
86
|
+
}, z.core.$strict>>;
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
|
+
op: z.ZodLiteral<"accept">;
|
|
89
|
+
invitation: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
91
|
+
realm: z.ZodString;
|
|
92
|
+
cid: z.ZodString;
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
95
|
+
inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
96
|
+
by: z.ZodString;
|
|
97
|
+
head: z.ZodObject<{
|
|
98
|
+
seq: z.ZodNumber;
|
|
99
|
+
hash: z.ZodString;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
issuedAt: z.ZodNumber;
|
|
102
|
+
expiresAt: z.ZodNumber;
|
|
103
|
+
kind: z.ZodEnum<{
|
|
104
|
+
channel: "channel";
|
|
105
|
+
group: "group";
|
|
106
|
+
}>;
|
|
107
|
+
history: z.ZodEnum<{
|
|
108
|
+
none: "none";
|
|
109
|
+
shared: "shared";
|
|
110
|
+
}>;
|
|
111
|
+
agentContext: z.ZodEnum<{
|
|
112
|
+
none: "none";
|
|
113
|
+
members: "members";
|
|
114
|
+
seats: "seats";
|
|
115
|
+
}>;
|
|
116
|
+
bridges: z.ZodEnum<{
|
|
117
|
+
none: "none";
|
|
118
|
+
members: "members";
|
|
119
|
+
admins: "admins";
|
|
120
|
+
}>;
|
|
121
|
+
audience: z.ZodArray<z.ZodObject<{
|
|
122
|
+
p: z.ZodString;
|
|
123
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
124
|
+
role: z.ZodEnum<{
|
|
125
|
+
admin: "admin";
|
|
126
|
+
member: "member";
|
|
127
|
+
owner: "owner";
|
|
128
|
+
guest: "guest";
|
|
129
|
+
}>;
|
|
130
|
+
state: z.ZodEnum<{
|
|
131
|
+
member: "member";
|
|
132
|
+
invited: "invited";
|
|
133
|
+
}>;
|
|
134
|
+
}, z.core.$strict>>;
|
|
135
|
+
sig: z.ZodString;
|
|
136
|
+
}, z.core.$strict>>;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
op: z.ZodLiteral<"activate">;
|
|
139
|
+
proof: z.ZodUnion<readonly [z.ZodObject<{
|
|
140
|
+
descriptor: z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
issuedAt: z.ZodNumber;
|
|
143
|
+
expiresAt: z.ZodNumber;
|
|
144
|
+
commitment: z.ZodString;
|
|
145
|
+
by: z.ZodString;
|
|
146
|
+
sig: z.ZodString;
|
|
147
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
148
|
+
realm: z.ZodString;
|
|
149
|
+
cid: z.ZodString;
|
|
150
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
151
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
152
|
+
}, z.core.$strict>;
|
|
153
|
+
decision: z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
descriptor: z.ZodString;
|
|
156
|
+
answer: z.ZodEnum<{
|
|
157
|
+
accept: "accept";
|
|
158
|
+
decline: "decline";
|
|
159
|
+
}>;
|
|
160
|
+
at: z.ZodNumber;
|
|
161
|
+
by: z.ZodString;
|
|
162
|
+
sig: z.ZodString;
|
|
163
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
164
|
+
realm: z.ZodString;
|
|
165
|
+
cid: z.ZodString;
|
|
166
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
167
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
170
|
+
contacts: z.ZodTuple<[z.ZodObject<{
|
|
171
|
+
at: z.ZodNumber;
|
|
172
|
+
by: z.ZodString;
|
|
173
|
+
sig: z.ZodString;
|
|
174
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
175
|
+
realm: z.ZodString;
|
|
176
|
+
cid: z.ZodString;
|
|
177
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
178
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
179
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
180
|
+
at: z.ZodNumber;
|
|
181
|
+
by: z.ZodString;
|
|
182
|
+
sig: z.ZodString;
|
|
183
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
184
|
+
realm: z.ZodString;
|
|
185
|
+
cid: z.ZodString;
|
|
186
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
187
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
188
|
+
}, z.core.$strict>], null>;
|
|
189
|
+
}, z.core.$strict>]>;
|
|
190
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
191
|
+
op: z.ZodLiteral<"request.complete">;
|
|
192
|
+
request: z.ZodString;
|
|
193
|
+
seq: z.ZodNumber;
|
|
194
|
+
digest: z.ZodString;
|
|
195
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
196
|
+
op: z.ZodLiteral<"join">;
|
|
197
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
198
|
+
op: z.ZodLiteral<"leave">;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
op: z.ZodLiteral<"remove">;
|
|
201
|
+
participants: z.ZodArray<z.ZodString>;
|
|
202
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
203
|
+
op: z.ZodLiteral<"role">;
|
|
204
|
+
p: z.ZodString;
|
|
205
|
+
role: z.ZodEnum<{
|
|
206
|
+
admin: "admin";
|
|
207
|
+
member: "member";
|
|
208
|
+
owner: "owner";
|
|
209
|
+
guest: "guest";
|
|
210
|
+
}>;
|
|
211
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
212
|
+
op: z.ZodLiteral<"seat">;
|
|
213
|
+
p: z.ZodString;
|
|
214
|
+
device: z.ZodOptional<z.ZodString>;
|
|
215
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
216
|
+
self: "self";
|
|
217
|
+
none: "none";
|
|
218
|
+
members: "members";
|
|
219
|
+
}>>;
|
|
220
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
221
|
+
op: z.ZodLiteral<"settings">;
|
|
222
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
223
|
+
public: "public";
|
|
224
|
+
private: "private";
|
|
225
|
+
}>>;
|
|
226
|
+
history: z.ZodOptional<z.ZodEnum<{
|
|
227
|
+
none: "none";
|
|
228
|
+
shared: "shared";
|
|
229
|
+
}>>;
|
|
230
|
+
retainDays: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
post: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
admins: "admins";
|
|
233
|
+
all: "all";
|
|
234
|
+
}>>;
|
|
235
|
+
invite: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
admins: "admins";
|
|
237
|
+
all: "all";
|
|
238
|
+
}>>;
|
|
239
|
+
pins: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
admins: "admins";
|
|
241
|
+
all: "all";
|
|
242
|
+
}>>;
|
|
243
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
244
|
+
op: z.ZodLiteral<"archive">;
|
|
245
|
+
on: z.ZodBoolean;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
op: z.ZodLiteral<"rekey">;
|
|
248
|
+
epoch: z.ZodNumber;
|
|
249
|
+
cause: z.ZodEnum<{
|
|
250
|
+
device: "device";
|
|
251
|
+
removed: "removed";
|
|
252
|
+
added: "added";
|
|
253
|
+
settings: "settings";
|
|
254
|
+
schedule: "schedule";
|
|
255
|
+
}>;
|
|
256
|
+
device: z.ZodOptional<z.ZodString>;
|
|
257
|
+
until: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
259
|
+
op: z.ZodLiteral<"policy">;
|
|
260
|
+
agentContext: z.ZodOptional<z.ZodEnum<{
|
|
261
|
+
none: "none";
|
|
262
|
+
members: "members";
|
|
263
|
+
seats: "seats";
|
|
264
|
+
}>>;
|
|
265
|
+
bridges: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
none: "none";
|
|
267
|
+
members: "members";
|
|
268
|
+
admins: "admins";
|
|
269
|
+
}>>;
|
|
270
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
271
|
+
op: z.ZodLiteral<"meta">;
|
|
272
|
+
epoch: z.ZodNumber;
|
|
273
|
+
idx: z.ZodNumber;
|
|
274
|
+
sealed: z.ZodString;
|
|
275
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
276
|
+
op: z.ZodLiteral<"setting">;
|
|
277
|
+
kind: z.ZodEnum<{
|
|
278
|
+
link: "link";
|
|
279
|
+
prefs: "prefs";
|
|
280
|
+
grant: "grant";
|
|
281
|
+
context: "context";
|
|
282
|
+
localRetention: "localRetention";
|
|
283
|
+
}>;
|
|
284
|
+
epoch: z.ZodNumber;
|
|
285
|
+
idx: z.ZodNumber;
|
|
286
|
+
sealed: z.ZodString;
|
|
287
|
+
}, z.core.$strict>], "op">;
|
|
288
|
+
sig: z.ZodString;
|
|
289
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
290
|
+
realm: z.ZodString;
|
|
291
|
+
cid: z.ZodString;
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
by: z.ZodObject<{
|
|
294
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
295
|
+
device: z.ZodString;
|
|
296
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, z.core.$strict>;
|
|
298
|
+
ts: z.ZodNumber;
|
|
299
|
+
opHead: z.ZodObject<{
|
|
300
|
+
seq: z.ZodNumber;
|
|
301
|
+
hash: z.ZodString;
|
|
302
|
+
}, z.core.$strict>;
|
|
303
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
304
|
+
seq: z.ZodNumber;
|
|
305
|
+
hash: z.ZodString;
|
|
306
|
+
}, z.core.$strict>>;
|
|
307
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
308
|
+
class: z.ZodLiteral<"msg">;
|
|
309
|
+
epoch: z.ZodNumber;
|
|
310
|
+
idx: z.ZodNumber;
|
|
311
|
+
wake: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
312
|
+
request: z.ZodOptional<z.ZodString>;
|
|
313
|
+
body: z.ZodString;
|
|
314
|
+
sig: z.ZodString;
|
|
315
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
316
|
+
realm: z.ZodString;
|
|
317
|
+
cid: z.ZodString;
|
|
318
|
+
id: z.ZodString;
|
|
319
|
+
by: z.ZodObject<{
|
|
320
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
321
|
+
device: z.ZodString;
|
|
322
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
323
|
+
}, z.core.$strict>;
|
|
324
|
+
ts: z.ZodNumber;
|
|
325
|
+
opHead: z.ZodObject<{
|
|
326
|
+
seq: z.ZodNumber;
|
|
327
|
+
hash: z.ZodString;
|
|
328
|
+
}, z.core.$strict>;
|
|
329
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
330
|
+
seq: z.ZodNumber;
|
|
331
|
+
hash: z.ZodString;
|
|
332
|
+
}, z.core.$strict>>;
|
|
333
|
+
}, z.core.$strict>], "class">;
|
|
334
|
+
}, z.core.$strict>;
|
|
335
|
+
export type ConvAppendFrame = z.infer<typeof ConvAppendFrame>;
|
|
336
|
+
/**
|
|
337
|
+
* Stores key shares (spec §16.6): each event to one recipient device, all of one conversation and by the sending
|
|
338
|
+
* device. All or none are stored; the relay answers `conv.shared` once they are.
|
|
339
|
+
*/
|
|
340
|
+
export declare const ConvShareFrame: z.ZodObject<{
|
|
341
|
+
t: z.ZodLiteral<"conv.share">;
|
|
342
|
+
req: z.ZodString;
|
|
343
|
+
events: z.ZodArray<z.ZodObject<{
|
|
344
|
+
class: z.ZodLiteral<"keys">;
|
|
345
|
+
body: z.ZodObject<{
|
|
346
|
+
to: z.ZodObject<{
|
|
347
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
348
|
+
device: z.ZodString;
|
|
349
|
+
}, z.core.$strict>;
|
|
350
|
+
epk: z.ZodString;
|
|
351
|
+
nonce: z.ZodString;
|
|
352
|
+
ct: z.ZodString;
|
|
353
|
+
}, z.core.$strict>;
|
|
354
|
+
sig: z.ZodString;
|
|
355
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
356
|
+
realm: z.ZodString;
|
|
357
|
+
cid: z.ZodString;
|
|
358
|
+
id: z.ZodString;
|
|
359
|
+
by: z.ZodObject<{
|
|
360
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
361
|
+
device: z.ZodString;
|
|
362
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
363
|
+
}, z.core.$strict>;
|
|
364
|
+
ts: z.ZodNumber;
|
|
365
|
+
opHead: z.ZodObject<{
|
|
366
|
+
seq: z.ZodNumber;
|
|
367
|
+
hash: z.ZodString;
|
|
368
|
+
}, z.core.$strict>;
|
|
369
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
370
|
+
seq: z.ZodNumber;
|
|
371
|
+
hash: z.ZodString;
|
|
372
|
+
}, z.core.$strict>>;
|
|
373
|
+
}, z.core.$strict>>;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
export type ConvShareFrame = z.infer<typeof ConvShareFrame>;
|
|
376
|
+
/**
|
|
377
|
+
* The entries of `cid` after `after`, in seq order, at most `limit` (and `LIMITS.convFetchEntries`) and as many as
|
|
378
|
+
* fit in a frame. `sharesAfter`: also the shares to this device after that `n`; absent, no shares.
|
|
379
|
+
*/
|
|
380
|
+
export declare const ConvFetchFrame: z.ZodObject<{
|
|
381
|
+
t: z.ZodLiteral<"conv.fetch">;
|
|
382
|
+
req: z.ZodString;
|
|
383
|
+
cid: z.ZodString;
|
|
384
|
+
after: z.ZodNumber;
|
|
385
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
386
|
+
sharesAfter: z.ZodOptional<z.ZodNumber>;
|
|
387
|
+
}, z.core.$strict>;
|
|
388
|
+
export type ConvFetchFrame = z.infer<typeof ConvFetchFrame>;
|
|
389
|
+
/**
|
|
390
|
+
* The heads of the named conversations, or, without `cids`, of every conversation this device's person takes part in,
|
|
391
|
+
* by cid after `after`, at most `LIMITS.convHeads`.
|
|
392
|
+
*/
|
|
393
|
+
export declare const ConvHeadFrame: z.ZodObject<{
|
|
394
|
+
t: z.ZodLiteral<"conv.head">;
|
|
395
|
+
req: z.ZodString;
|
|
396
|
+
cids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
397
|
+
after: z.ZodOptional<z.ZodString>;
|
|
398
|
+
}, z.core.$strict>;
|
|
399
|
+
export type ConvHeadFrame = z.infer<typeof ConvHeadFrame>;
|
|
400
|
+
/**
|
|
401
|
+
* Which of these persons cannot read conversations yet: every current device of theirs whose latest presence the
|
|
402
|
+
* relay holds names no `conversations` feature (a daemon before the cut-over). A person with no such presence is not
|
|
403
|
+
* named. A hint from the relay: it can only make a sender refuse, never admit anything.
|
|
404
|
+
*/
|
|
405
|
+
export declare const ConvCapsFrame: z.ZodObject<{
|
|
406
|
+
t: z.ZodLiteral<"conv.caps">;
|
|
407
|
+
req: z.ZodString;
|
|
408
|
+
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
409
|
+
}, z.core.$strict>;
|
|
410
|
+
export type ConvCapsFrame = z.infer<typeof ConvCapsFrame>;
|
|
411
|
+
/** `conv.append` stored: the entry's seq and h(seq), which the author recomputes. */
|
|
412
|
+
export declare const ConvOkFrame: z.ZodObject<{
|
|
413
|
+
t: z.ZodLiteral<"conv.ok">;
|
|
414
|
+
req: z.ZodString;
|
|
415
|
+
cid: z.ZodString;
|
|
416
|
+
seq: z.ZodNumber;
|
|
417
|
+
hash: z.ZodString;
|
|
418
|
+
}, z.core.$strict>;
|
|
419
|
+
export type ConvOkFrame = z.infer<typeof ConvOkFrame>;
|
|
420
|
+
/** `conv.share` stored: how many shares. */
|
|
421
|
+
export declare const ConvSharedFrame: z.ZodObject<{
|
|
422
|
+
t: z.ZodLiteral<"conv.shared">;
|
|
423
|
+
req: z.ZodString;
|
|
424
|
+
cid: z.ZodString;
|
|
425
|
+
count: z.ZodNumber;
|
|
426
|
+
}, z.core.$strict>;
|
|
427
|
+
export type ConvSharedFrame = z.infer<typeof ConvSharedFrame>;
|
|
428
|
+
/**
|
|
429
|
+
* `conv.fetch`'s answer: the relay's head, the entries (an expired `msg` as its digest, `ConvExpiredEntry`) and this
|
|
430
|
+
* device's shares. `more`: ask again after the last entry (and the last share).
|
|
431
|
+
*/
|
|
432
|
+
export declare const ConvEntriesFrame: z.ZodObject<{
|
|
433
|
+
t: z.ZodLiteral<"conv.entries">;
|
|
434
|
+
req: z.ZodString;
|
|
435
|
+
cid: z.ZodString;
|
|
436
|
+
head: z.ZodObject<{
|
|
437
|
+
seq: z.ZodNumber;
|
|
438
|
+
hash: z.ZodString;
|
|
439
|
+
}, z.core.$strict>;
|
|
440
|
+
entries: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
441
|
+
seq: z.ZodNumber;
|
|
442
|
+
prev: z.ZodString;
|
|
443
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
444
|
+
class: z.ZodLiteral<"op">;
|
|
445
|
+
body: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
446
|
+
op: z.ZodLiteral<"create">;
|
|
447
|
+
kind: z.ZodEnum<{
|
|
448
|
+
self: "self";
|
|
449
|
+
channel: "channel";
|
|
450
|
+
group: "group";
|
|
451
|
+
dm: "dm";
|
|
452
|
+
}>;
|
|
453
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
454
|
+
public: "public";
|
|
455
|
+
private: "private";
|
|
456
|
+
}>>;
|
|
457
|
+
history: z.ZodEnum<{
|
|
458
|
+
none: "none";
|
|
459
|
+
shared: "shared";
|
|
460
|
+
}>;
|
|
461
|
+
retainDays: z.ZodNumber;
|
|
462
|
+
org: z.ZodOptional<z.ZodString>;
|
|
463
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
464
|
+
p: z.ZodString;
|
|
465
|
+
role: z.ZodEnum<{
|
|
466
|
+
admin: "admin";
|
|
467
|
+
member: "member";
|
|
468
|
+
owner: "owner";
|
|
469
|
+
guest: "guest";
|
|
470
|
+
}>;
|
|
471
|
+
device: z.ZodOptional<z.ZodString>;
|
|
472
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
473
|
+
self: "self";
|
|
474
|
+
none: "none";
|
|
475
|
+
members: "members";
|
|
476
|
+
}>>;
|
|
477
|
+
}, z.core.$strict>>;
|
|
478
|
+
post: z.ZodOptional<z.ZodEnum<{
|
|
479
|
+
admins: "admins";
|
|
480
|
+
all: "all";
|
|
481
|
+
}>>;
|
|
482
|
+
invite: z.ZodOptional<z.ZodEnum<{
|
|
483
|
+
admins: "admins";
|
|
484
|
+
all: "all";
|
|
485
|
+
}>>;
|
|
486
|
+
pins: z.ZodOptional<z.ZodEnum<{
|
|
487
|
+
admins: "admins";
|
|
488
|
+
all: "all";
|
|
489
|
+
}>>;
|
|
490
|
+
sealedMeta: z.ZodOptional<z.ZodString>;
|
|
491
|
+
admission: z.ZodOptional<z.ZodLiteral<"request">>;
|
|
492
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
493
|
+
op: z.ZodLiteral<"add">;
|
|
494
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
495
|
+
p: z.ZodString;
|
|
496
|
+
role: z.ZodEnum<{
|
|
497
|
+
admin: "admin";
|
|
498
|
+
member: "member";
|
|
499
|
+
owner: "owner";
|
|
500
|
+
guest: "guest";
|
|
501
|
+
}>;
|
|
502
|
+
device: z.ZodOptional<z.ZodString>;
|
|
503
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
504
|
+
self: "self";
|
|
505
|
+
none: "none";
|
|
506
|
+
members: "members";
|
|
507
|
+
}>>;
|
|
508
|
+
}, z.core.$strict>>;
|
|
509
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
510
|
+
op: z.ZodLiteral<"accept">;
|
|
511
|
+
invitation: z.ZodOptional<z.ZodObject<{
|
|
512
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
513
|
+
realm: z.ZodString;
|
|
514
|
+
cid: z.ZodString;
|
|
515
|
+
id: z.ZodString;
|
|
516
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
517
|
+
inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
518
|
+
by: z.ZodString;
|
|
519
|
+
head: z.ZodObject<{
|
|
520
|
+
seq: z.ZodNumber;
|
|
521
|
+
hash: z.ZodString;
|
|
522
|
+
}, z.core.$strict>;
|
|
523
|
+
issuedAt: z.ZodNumber;
|
|
524
|
+
expiresAt: z.ZodNumber;
|
|
525
|
+
kind: z.ZodEnum<{
|
|
526
|
+
channel: "channel";
|
|
527
|
+
group: "group";
|
|
528
|
+
}>;
|
|
529
|
+
history: z.ZodEnum<{
|
|
530
|
+
none: "none";
|
|
531
|
+
shared: "shared";
|
|
532
|
+
}>;
|
|
533
|
+
agentContext: z.ZodEnum<{
|
|
534
|
+
none: "none";
|
|
535
|
+
members: "members";
|
|
536
|
+
seats: "seats";
|
|
537
|
+
}>;
|
|
538
|
+
bridges: z.ZodEnum<{
|
|
539
|
+
none: "none";
|
|
540
|
+
members: "members";
|
|
541
|
+
admins: "admins";
|
|
542
|
+
}>;
|
|
543
|
+
audience: z.ZodArray<z.ZodObject<{
|
|
544
|
+
p: z.ZodString;
|
|
545
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
546
|
+
role: z.ZodEnum<{
|
|
547
|
+
admin: "admin";
|
|
548
|
+
member: "member";
|
|
549
|
+
owner: "owner";
|
|
550
|
+
guest: "guest";
|
|
551
|
+
}>;
|
|
552
|
+
state: z.ZodEnum<{
|
|
553
|
+
member: "member";
|
|
554
|
+
invited: "invited";
|
|
555
|
+
}>;
|
|
556
|
+
}, z.core.$strict>>;
|
|
557
|
+
sig: z.ZodString;
|
|
558
|
+
}, z.core.$strict>>;
|
|
559
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
560
|
+
op: z.ZodLiteral<"activate">;
|
|
561
|
+
proof: z.ZodUnion<readonly [z.ZodObject<{
|
|
562
|
+
descriptor: z.ZodObject<{
|
|
563
|
+
id: z.ZodString;
|
|
564
|
+
issuedAt: z.ZodNumber;
|
|
565
|
+
expiresAt: z.ZodNumber;
|
|
566
|
+
commitment: z.ZodString;
|
|
567
|
+
by: z.ZodString;
|
|
568
|
+
sig: z.ZodString;
|
|
569
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
570
|
+
realm: z.ZodString;
|
|
571
|
+
cid: z.ZodString;
|
|
572
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
573
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
574
|
+
}, z.core.$strict>;
|
|
575
|
+
decision: z.ZodObject<{
|
|
576
|
+
id: z.ZodString;
|
|
577
|
+
descriptor: z.ZodString;
|
|
578
|
+
answer: z.ZodEnum<{
|
|
579
|
+
accept: "accept";
|
|
580
|
+
decline: "decline";
|
|
581
|
+
}>;
|
|
582
|
+
at: z.ZodNumber;
|
|
583
|
+
by: z.ZodString;
|
|
584
|
+
sig: z.ZodString;
|
|
585
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
586
|
+
realm: z.ZodString;
|
|
587
|
+
cid: z.ZodString;
|
|
588
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
589
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
590
|
+
}, z.core.$strict>;
|
|
591
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
592
|
+
contacts: z.ZodTuple<[z.ZodObject<{
|
|
593
|
+
at: z.ZodNumber;
|
|
594
|
+
by: z.ZodString;
|
|
595
|
+
sig: z.ZodString;
|
|
596
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
597
|
+
realm: z.ZodString;
|
|
598
|
+
cid: z.ZodString;
|
|
599
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
600
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
601
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
602
|
+
at: z.ZodNumber;
|
|
603
|
+
by: z.ZodString;
|
|
604
|
+
sig: z.ZodString;
|
|
605
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
606
|
+
realm: z.ZodString;
|
|
607
|
+
cid: z.ZodString;
|
|
608
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
609
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
610
|
+
}, z.core.$strict>], null>;
|
|
611
|
+
}, z.core.$strict>]>;
|
|
612
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
613
|
+
op: z.ZodLiteral<"request.complete">;
|
|
614
|
+
request: z.ZodString;
|
|
615
|
+
seq: z.ZodNumber;
|
|
616
|
+
digest: z.ZodString;
|
|
617
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
618
|
+
op: z.ZodLiteral<"join">;
|
|
619
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
620
|
+
op: z.ZodLiteral<"leave">;
|
|
621
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
622
|
+
op: z.ZodLiteral<"remove">;
|
|
623
|
+
participants: z.ZodArray<z.ZodString>;
|
|
624
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
625
|
+
op: z.ZodLiteral<"role">;
|
|
626
|
+
p: z.ZodString;
|
|
627
|
+
role: z.ZodEnum<{
|
|
628
|
+
admin: "admin";
|
|
629
|
+
member: "member";
|
|
630
|
+
owner: "owner";
|
|
631
|
+
guest: "guest";
|
|
632
|
+
}>;
|
|
633
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
634
|
+
op: z.ZodLiteral<"seat">;
|
|
635
|
+
p: z.ZodString;
|
|
636
|
+
device: z.ZodOptional<z.ZodString>;
|
|
637
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
638
|
+
self: "self";
|
|
639
|
+
none: "none";
|
|
640
|
+
members: "members";
|
|
641
|
+
}>>;
|
|
642
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
643
|
+
op: z.ZodLiteral<"settings">;
|
|
644
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
645
|
+
public: "public";
|
|
646
|
+
private: "private";
|
|
647
|
+
}>>;
|
|
648
|
+
history: z.ZodOptional<z.ZodEnum<{
|
|
649
|
+
none: "none";
|
|
650
|
+
shared: "shared";
|
|
651
|
+
}>>;
|
|
652
|
+
retainDays: z.ZodOptional<z.ZodNumber>;
|
|
653
|
+
post: z.ZodOptional<z.ZodEnum<{
|
|
654
|
+
admins: "admins";
|
|
655
|
+
all: "all";
|
|
656
|
+
}>>;
|
|
657
|
+
invite: z.ZodOptional<z.ZodEnum<{
|
|
658
|
+
admins: "admins";
|
|
659
|
+
all: "all";
|
|
660
|
+
}>>;
|
|
661
|
+
pins: z.ZodOptional<z.ZodEnum<{
|
|
662
|
+
admins: "admins";
|
|
663
|
+
all: "all";
|
|
664
|
+
}>>;
|
|
665
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
666
|
+
op: z.ZodLiteral<"archive">;
|
|
667
|
+
on: z.ZodBoolean;
|
|
668
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
669
|
+
op: z.ZodLiteral<"rekey">;
|
|
670
|
+
epoch: z.ZodNumber;
|
|
671
|
+
cause: z.ZodEnum<{
|
|
672
|
+
device: "device";
|
|
673
|
+
removed: "removed";
|
|
674
|
+
added: "added";
|
|
675
|
+
settings: "settings";
|
|
676
|
+
schedule: "schedule";
|
|
677
|
+
}>;
|
|
678
|
+
device: z.ZodOptional<z.ZodString>;
|
|
679
|
+
until: z.ZodOptional<z.ZodNumber>;
|
|
680
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
681
|
+
op: z.ZodLiteral<"policy">;
|
|
682
|
+
agentContext: z.ZodOptional<z.ZodEnum<{
|
|
683
|
+
none: "none";
|
|
684
|
+
members: "members";
|
|
685
|
+
seats: "seats";
|
|
686
|
+
}>>;
|
|
687
|
+
bridges: z.ZodOptional<z.ZodEnum<{
|
|
688
|
+
none: "none";
|
|
689
|
+
members: "members";
|
|
690
|
+
admins: "admins";
|
|
691
|
+
}>>;
|
|
692
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
693
|
+
op: z.ZodLiteral<"meta">;
|
|
694
|
+
epoch: z.ZodNumber;
|
|
695
|
+
idx: z.ZodNumber;
|
|
696
|
+
sealed: z.ZodString;
|
|
697
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
698
|
+
op: z.ZodLiteral<"setting">;
|
|
699
|
+
kind: z.ZodEnum<{
|
|
700
|
+
link: "link";
|
|
701
|
+
prefs: "prefs";
|
|
702
|
+
grant: "grant";
|
|
703
|
+
context: "context";
|
|
704
|
+
localRetention: "localRetention";
|
|
705
|
+
}>;
|
|
706
|
+
epoch: z.ZodNumber;
|
|
707
|
+
idx: z.ZodNumber;
|
|
708
|
+
sealed: z.ZodString;
|
|
709
|
+
}, z.core.$strict>], "op">;
|
|
710
|
+
sig: z.ZodString;
|
|
711
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
712
|
+
realm: z.ZodString;
|
|
713
|
+
cid: z.ZodString;
|
|
714
|
+
id: z.ZodString;
|
|
715
|
+
by: z.ZodObject<{
|
|
716
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
717
|
+
device: z.ZodString;
|
|
718
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
719
|
+
}, z.core.$strict>;
|
|
720
|
+
ts: z.ZodNumber;
|
|
721
|
+
opHead: z.ZodObject<{
|
|
722
|
+
seq: z.ZodNumber;
|
|
723
|
+
hash: z.ZodString;
|
|
724
|
+
}, z.core.$strict>;
|
|
725
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
726
|
+
seq: z.ZodNumber;
|
|
727
|
+
hash: z.ZodString;
|
|
728
|
+
}, z.core.$strict>>;
|
|
729
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
730
|
+
class: z.ZodLiteral<"msg">;
|
|
731
|
+
epoch: z.ZodNumber;
|
|
732
|
+
idx: z.ZodNumber;
|
|
733
|
+
wake: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
734
|
+
request: z.ZodOptional<z.ZodString>;
|
|
735
|
+
body: z.ZodString;
|
|
736
|
+
sig: z.ZodString;
|
|
737
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
738
|
+
realm: z.ZodString;
|
|
739
|
+
cid: z.ZodString;
|
|
740
|
+
id: z.ZodString;
|
|
741
|
+
by: z.ZodObject<{
|
|
742
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
743
|
+
device: z.ZodString;
|
|
744
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
745
|
+
}, z.core.$strict>;
|
|
746
|
+
ts: z.ZodNumber;
|
|
747
|
+
opHead: z.ZodObject<{
|
|
748
|
+
seq: z.ZodNumber;
|
|
749
|
+
hash: z.ZodString;
|
|
750
|
+
}, z.core.$strict>;
|
|
751
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
752
|
+
seq: z.ZodNumber;
|
|
753
|
+
hash: z.ZodString;
|
|
754
|
+
}, z.core.$strict>>;
|
|
755
|
+
}, z.core.$strict>], "class">;
|
|
756
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
757
|
+
seq: z.ZodNumber;
|
|
758
|
+
prev: z.ZodString;
|
|
759
|
+
digest: z.ZodString;
|
|
760
|
+
}, z.core.$strict>]>>;
|
|
761
|
+
shares: z.ZodArray<z.ZodObject<{
|
|
762
|
+
n: z.ZodNumber;
|
|
763
|
+
event: z.ZodObject<{
|
|
764
|
+
class: z.ZodLiteral<"keys">;
|
|
765
|
+
body: z.ZodObject<{
|
|
766
|
+
to: z.ZodObject<{
|
|
767
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
768
|
+
device: z.ZodString;
|
|
769
|
+
}, z.core.$strict>;
|
|
770
|
+
epk: z.ZodString;
|
|
771
|
+
nonce: z.ZodString;
|
|
772
|
+
ct: z.ZodString;
|
|
773
|
+
}, z.core.$strict>;
|
|
774
|
+
sig: z.ZodString;
|
|
775
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
776
|
+
realm: z.ZodString;
|
|
777
|
+
cid: z.ZodString;
|
|
778
|
+
id: z.ZodString;
|
|
779
|
+
by: z.ZodObject<{
|
|
780
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
781
|
+
device: z.ZodString;
|
|
782
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
783
|
+
}, z.core.$strict>;
|
|
784
|
+
ts: z.ZodNumber;
|
|
785
|
+
opHead: z.ZodObject<{
|
|
786
|
+
seq: z.ZodNumber;
|
|
787
|
+
hash: z.ZodString;
|
|
788
|
+
}, z.core.$strict>;
|
|
789
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
790
|
+
seq: z.ZodNumber;
|
|
791
|
+
hash: z.ZodString;
|
|
792
|
+
}, z.core.$strict>>;
|
|
793
|
+
}, z.core.$strict>;
|
|
794
|
+
}, z.core.$strict>>;
|
|
795
|
+
more: z.ZodBoolean;
|
|
796
|
+
}, z.core.$strict>;
|
|
797
|
+
export type ConvEntriesFrame = z.infer<typeof ConvEntriesFrame>;
|
|
798
|
+
/** One conversation's position at the relay: its head, its op head, and the last share `n` for this device (0: none). */
|
|
799
|
+
export declare const ConvHeadView: z.ZodObject<{
|
|
800
|
+
cid: z.ZodString;
|
|
801
|
+
head: z.ZodObject<{
|
|
802
|
+
seq: z.ZodNumber;
|
|
803
|
+
hash: z.ZodString;
|
|
804
|
+
}, z.core.$strict>;
|
|
805
|
+
opHead: z.ZodObject<{
|
|
806
|
+
seq: z.ZodNumber;
|
|
807
|
+
hash: z.ZodString;
|
|
808
|
+
}, z.core.$strict>;
|
|
809
|
+
shares: z.ZodNumber;
|
|
810
|
+
}, z.core.$strict>;
|
|
811
|
+
export type ConvHeadView = z.infer<typeof ConvHeadView>;
|
|
812
|
+
/** `conv.head`'s answer. A named conversation this device's person is not in is left out, as one that does not exist. */
|
|
813
|
+
export declare const ConvHeadsFrame: z.ZodObject<{
|
|
814
|
+
t: z.ZodLiteral<"conv.heads">;
|
|
815
|
+
req: z.ZodString;
|
|
816
|
+
heads: z.ZodArray<z.ZodObject<{
|
|
817
|
+
cid: z.ZodString;
|
|
818
|
+
head: z.ZodObject<{
|
|
819
|
+
seq: z.ZodNumber;
|
|
820
|
+
hash: z.ZodString;
|
|
821
|
+
}, z.core.$strict>;
|
|
822
|
+
opHead: z.ZodObject<{
|
|
823
|
+
seq: z.ZodNumber;
|
|
824
|
+
hash: z.ZodString;
|
|
825
|
+
}, z.core.$strict>;
|
|
826
|
+
shares: z.ZodNumber;
|
|
827
|
+
}, z.core.$strict>>;
|
|
828
|
+
more: z.ZodBoolean;
|
|
829
|
+
}, z.core.$strict>;
|
|
830
|
+
export type ConvHeadsFrame = z.infer<typeof ConvHeadsFrame>;
|
|
831
|
+
/** `conv.caps`'s answer: the named persons that cannot read conversations yet. */
|
|
832
|
+
export declare const ConvCapabilitiesFrame: z.ZodObject<{
|
|
833
|
+
t: z.ZodLiteral<"conv.capabilities">;
|
|
834
|
+
req: z.ZodString;
|
|
835
|
+
outdated: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
836
|
+
}, z.core.$strict>;
|
|
837
|
+
export type ConvCapabilitiesFrame = z.infer<typeof ConvCapabilitiesFrame>;
|
|
838
|
+
/** A new entry, to the online devices of the conversation's participant persons; or a new share, to its recipient. */
|
|
839
|
+
export declare const ConvPushFrame: z.ZodUnion<readonly [z.ZodObject<{
|
|
840
|
+
t: z.ZodLiteral<"conv.push">;
|
|
841
|
+
cid: z.ZodString;
|
|
842
|
+
entry: z.ZodObject<{
|
|
843
|
+
seq: z.ZodNumber;
|
|
844
|
+
prev: z.ZodString;
|
|
845
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
846
|
+
class: z.ZodLiteral<"op">;
|
|
847
|
+
body: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
848
|
+
op: z.ZodLiteral<"create">;
|
|
849
|
+
kind: z.ZodEnum<{
|
|
850
|
+
self: "self";
|
|
851
|
+
channel: "channel";
|
|
852
|
+
group: "group";
|
|
853
|
+
dm: "dm";
|
|
854
|
+
}>;
|
|
855
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
856
|
+
public: "public";
|
|
857
|
+
private: "private";
|
|
858
|
+
}>>;
|
|
859
|
+
history: z.ZodEnum<{
|
|
860
|
+
none: "none";
|
|
861
|
+
shared: "shared";
|
|
862
|
+
}>;
|
|
863
|
+
retainDays: z.ZodNumber;
|
|
864
|
+
org: z.ZodOptional<z.ZodString>;
|
|
865
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
866
|
+
p: z.ZodString;
|
|
867
|
+
role: z.ZodEnum<{
|
|
868
|
+
admin: "admin";
|
|
869
|
+
member: "member";
|
|
870
|
+
owner: "owner";
|
|
871
|
+
guest: "guest";
|
|
872
|
+
}>;
|
|
873
|
+
device: z.ZodOptional<z.ZodString>;
|
|
874
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
875
|
+
self: "self";
|
|
876
|
+
none: "none";
|
|
877
|
+
members: "members";
|
|
878
|
+
}>>;
|
|
879
|
+
}, z.core.$strict>>;
|
|
880
|
+
post: z.ZodOptional<z.ZodEnum<{
|
|
881
|
+
admins: "admins";
|
|
882
|
+
all: "all";
|
|
883
|
+
}>>;
|
|
884
|
+
invite: z.ZodOptional<z.ZodEnum<{
|
|
885
|
+
admins: "admins";
|
|
886
|
+
all: "all";
|
|
887
|
+
}>>;
|
|
888
|
+
pins: z.ZodOptional<z.ZodEnum<{
|
|
889
|
+
admins: "admins";
|
|
890
|
+
all: "all";
|
|
891
|
+
}>>;
|
|
892
|
+
sealedMeta: z.ZodOptional<z.ZodString>;
|
|
893
|
+
admission: z.ZodOptional<z.ZodLiteral<"request">>;
|
|
894
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
895
|
+
op: z.ZodLiteral<"add">;
|
|
896
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
897
|
+
p: z.ZodString;
|
|
898
|
+
role: z.ZodEnum<{
|
|
899
|
+
admin: "admin";
|
|
900
|
+
member: "member";
|
|
901
|
+
owner: "owner";
|
|
902
|
+
guest: "guest";
|
|
903
|
+
}>;
|
|
904
|
+
device: z.ZodOptional<z.ZodString>;
|
|
905
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
906
|
+
self: "self";
|
|
907
|
+
none: "none";
|
|
908
|
+
members: "members";
|
|
909
|
+
}>>;
|
|
910
|
+
}, z.core.$strict>>;
|
|
911
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
912
|
+
op: z.ZodLiteral<"accept">;
|
|
913
|
+
invitation: z.ZodOptional<z.ZodObject<{
|
|
914
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
915
|
+
realm: z.ZodString;
|
|
916
|
+
cid: z.ZodString;
|
|
917
|
+
id: z.ZodString;
|
|
918
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
919
|
+
inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
920
|
+
by: z.ZodString;
|
|
921
|
+
head: z.ZodObject<{
|
|
922
|
+
seq: z.ZodNumber;
|
|
923
|
+
hash: z.ZodString;
|
|
924
|
+
}, z.core.$strict>;
|
|
925
|
+
issuedAt: z.ZodNumber;
|
|
926
|
+
expiresAt: z.ZodNumber;
|
|
927
|
+
kind: z.ZodEnum<{
|
|
928
|
+
channel: "channel";
|
|
929
|
+
group: "group";
|
|
930
|
+
}>;
|
|
931
|
+
history: z.ZodEnum<{
|
|
932
|
+
none: "none";
|
|
933
|
+
shared: "shared";
|
|
934
|
+
}>;
|
|
935
|
+
agentContext: z.ZodEnum<{
|
|
936
|
+
none: "none";
|
|
937
|
+
members: "members";
|
|
938
|
+
seats: "seats";
|
|
939
|
+
}>;
|
|
940
|
+
bridges: z.ZodEnum<{
|
|
941
|
+
none: "none";
|
|
942
|
+
members: "members";
|
|
943
|
+
admins: "admins";
|
|
944
|
+
}>;
|
|
945
|
+
audience: z.ZodArray<z.ZodObject<{
|
|
946
|
+
p: z.ZodString;
|
|
947
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
948
|
+
role: z.ZodEnum<{
|
|
949
|
+
admin: "admin";
|
|
950
|
+
member: "member";
|
|
951
|
+
owner: "owner";
|
|
952
|
+
guest: "guest";
|
|
953
|
+
}>;
|
|
954
|
+
state: z.ZodEnum<{
|
|
955
|
+
member: "member";
|
|
956
|
+
invited: "invited";
|
|
957
|
+
}>;
|
|
958
|
+
}, z.core.$strict>>;
|
|
959
|
+
sig: z.ZodString;
|
|
960
|
+
}, z.core.$strict>>;
|
|
961
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
962
|
+
op: z.ZodLiteral<"activate">;
|
|
963
|
+
proof: z.ZodUnion<readonly [z.ZodObject<{
|
|
964
|
+
descriptor: z.ZodObject<{
|
|
965
|
+
id: z.ZodString;
|
|
966
|
+
issuedAt: z.ZodNumber;
|
|
967
|
+
expiresAt: z.ZodNumber;
|
|
968
|
+
commitment: z.ZodString;
|
|
969
|
+
by: z.ZodString;
|
|
970
|
+
sig: z.ZodString;
|
|
971
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
972
|
+
realm: z.ZodString;
|
|
973
|
+
cid: z.ZodString;
|
|
974
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
975
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
976
|
+
}, z.core.$strict>;
|
|
977
|
+
decision: z.ZodObject<{
|
|
978
|
+
id: z.ZodString;
|
|
979
|
+
descriptor: z.ZodString;
|
|
980
|
+
answer: z.ZodEnum<{
|
|
981
|
+
accept: "accept";
|
|
982
|
+
decline: "decline";
|
|
983
|
+
}>;
|
|
984
|
+
at: z.ZodNumber;
|
|
985
|
+
by: z.ZodString;
|
|
986
|
+
sig: z.ZodString;
|
|
987
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
988
|
+
realm: z.ZodString;
|
|
989
|
+
cid: z.ZodString;
|
|
990
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
991
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
992
|
+
}, z.core.$strict>;
|
|
993
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
994
|
+
contacts: z.ZodTuple<[z.ZodObject<{
|
|
995
|
+
at: z.ZodNumber;
|
|
996
|
+
by: z.ZodString;
|
|
997
|
+
sig: z.ZodString;
|
|
998
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
999
|
+
realm: z.ZodString;
|
|
1000
|
+
cid: z.ZodString;
|
|
1001
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1002
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1003
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1004
|
+
at: z.ZodNumber;
|
|
1005
|
+
by: z.ZodString;
|
|
1006
|
+
sig: z.ZodString;
|
|
1007
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
1008
|
+
realm: z.ZodString;
|
|
1009
|
+
cid: z.ZodString;
|
|
1010
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1011
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1012
|
+
}, z.core.$strict>], null>;
|
|
1013
|
+
}, z.core.$strict>]>;
|
|
1014
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1015
|
+
op: z.ZodLiteral<"request.complete">;
|
|
1016
|
+
request: z.ZodString;
|
|
1017
|
+
seq: z.ZodNumber;
|
|
1018
|
+
digest: z.ZodString;
|
|
1019
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1020
|
+
op: z.ZodLiteral<"join">;
|
|
1021
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1022
|
+
op: z.ZodLiteral<"leave">;
|
|
1023
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1024
|
+
op: z.ZodLiteral<"remove">;
|
|
1025
|
+
participants: z.ZodArray<z.ZodString>;
|
|
1026
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1027
|
+
op: z.ZodLiteral<"role">;
|
|
1028
|
+
p: z.ZodString;
|
|
1029
|
+
role: z.ZodEnum<{
|
|
1030
|
+
admin: "admin";
|
|
1031
|
+
member: "member";
|
|
1032
|
+
owner: "owner";
|
|
1033
|
+
guest: "guest";
|
|
1034
|
+
}>;
|
|
1035
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1036
|
+
op: z.ZodLiteral<"seat">;
|
|
1037
|
+
p: z.ZodString;
|
|
1038
|
+
device: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
respondTo: z.ZodOptional<z.ZodEnum<{
|
|
1040
|
+
self: "self";
|
|
1041
|
+
none: "none";
|
|
1042
|
+
members: "members";
|
|
1043
|
+
}>>;
|
|
1044
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1045
|
+
op: z.ZodLiteral<"settings">;
|
|
1046
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
1047
|
+
public: "public";
|
|
1048
|
+
private: "private";
|
|
1049
|
+
}>>;
|
|
1050
|
+
history: z.ZodOptional<z.ZodEnum<{
|
|
1051
|
+
none: "none";
|
|
1052
|
+
shared: "shared";
|
|
1053
|
+
}>>;
|
|
1054
|
+
retainDays: z.ZodOptional<z.ZodNumber>;
|
|
1055
|
+
post: z.ZodOptional<z.ZodEnum<{
|
|
1056
|
+
admins: "admins";
|
|
1057
|
+
all: "all";
|
|
1058
|
+
}>>;
|
|
1059
|
+
invite: z.ZodOptional<z.ZodEnum<{
|
|
1060
|
+
admins: "admins";
|
|
1061
|
+
all: "all";
|
|
1062
|
+
}>>;
|
|
1063
|
+
pins: z.ZodOptional<z.ZodEnum<{
|
|
1064
|
+
admins: "admins";
|
|
1065
|
+
all: "all";
|
|
1066
|
+
}>>;
|
|
1067
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1068
|
+
op: z.ZodLiteral<"archive">;
|
|
1069
|
+
on: z.ZodBoolean;
|
|
1070
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1071
|
+
op: z.ZodLiteral<"rekey">;
|
|
1072
|
+
epoch: z.ZodNumber;
|
|
1073
|
+
cause: z.ZodEnum<{
|
|
1074
|
+
device: "device";
|
|
1075
|
+
removed: "removed";
|
|
1076
|
+
added: "added";
|
|
1077
|
+
settings: "settings";
|
|
1078
|
+
schedule: "schedule";
|
|
1079
|
+
}>;
|
|
1080
|
+
device: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
until: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1083
|
+
op: z.ZodLiteral<"policy">;
|
|
1084
|
+
agentContext: z.ZodOptional<z.ZodEnum<{
|
|
1085
|
+
none: "none";
|
|
1086
|
+
members: "members";
|
|
1087
|
+
seats: "seats";
|
|
1088
|
+
}>>;
|
|
1089
|
+
bridges: z.ZodOptional<z.ZodEnum<{
|
|
1090
|
+
none: "none";
|
|
1091
|
+
members: "members";
|
|
1092
|
+
admins: "admins";
|
|
1093
|
+
}>>;
|
|
1094
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1095
|
+
op: z.ZodLiteral<"meta">;
|
|
1096
|
+
epoch: z.ZodNumber;
|
|
1097
|
+
idx: z.ZodNumber;
|
|
1098
|
+
sealed: z.ZodString;
|
|
1099
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1100
|
+
op: z.ZodLiteral<"setting">;
|
|
1101
|
+
kind: z.ZodEnum<{
|
|
1102
|
+
link: "link";
|
|
1103
|
+
prefs: "prefs";
|
|
1104
|
+
grant: "grant";
|
|
1105
|
+
context: "context";
|
|
1106
|
+
localRetention: "localRetention";
|
|
1107
|
+
}>;
|
|
1108
|
+
epoch: z.ZodNumber;
|
|
1109
|
+
idx: z.ZodNumber;
|
|
1110
|
+
sealed: z.ZodString;
|
|
1111
|
+
}, z.core.$strict>], "op">;
|
|
1112
|
+
sig: z.ZodString;
|
|
1113
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
1114
|
+
realm: z.ZodString;
|
|
1115
|
+
cid: z.ZodString;
|
|
1116
|
+
id: z.ZodString;
|
|
1117
|
+
by: z.ZodObject<{
|
|
1118
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1119
|
+
device: z.ZodString;
|
|
1120
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
1121
|
+
}, z.core.$strict>;
|
|
1122
|
+
ts: z.ZodNumber;
|
|
1123
|
+
opHead: z.ZodObject<{
|
|
1124
|
+
seq: z.ZodNumber;
|
|
1125
|
+
hash: z.ZodString;
|
|
1126
|
+
}, z.core.$strict>;
|
|
1127
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
1128
|
+
seq: z.ZodNumber;
|
|
1129
|
+
hash: z.ZodString;
|
|
1130
|
+
}, z.core.$strict>>;
|
|
1131
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1132
|
+
class: z.ZodLiteral<"msg">;
|
|
1133
|
+
epoch: z.ZodNumber;
|
|
1134
|
+
idx: z.ZodNumber;
|
|
1135
|
+
wake: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1136
|
+
request: z.ZodOptional<z.ZodString>;
|
|
1137
|
+
body: z.ZodString;
|
|
1138
|
+
sig: z.ZodString;
|
|
1139
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
1140
|
+
realm: z.ZodString;
|
|
1141
|
+
cid: z.ZodString;
|
|
1142
|
+
id: z.ZodString;
|
|
1143
|
+
by: z.ZodObject<{
|
|
1144
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1145
|
+
device: z.ZodString;
|
|
1146
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
}, z.core.$strict>;
|
|
1148
|
+
ts: z.ZodNumber;
|
|
1149
|
+
opHead: z.ZodObject<{
|
|
1150
|
+
seq: z.ZodNumber;
|
|
1151
|
+
hash: z.ZodString;
|
|
1152
|
+
}, z.core.$strict>;
|
|
1153
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
1154
|
+
seq: z.ZodNumber;
|
|
1155
|
+
hash: z.ZodString;
|
|
1156
|
+
}, z.core.$strict>>;
|
|
1157
|
+
}, z.core.$strict>], "class">;
|
|
1158
|
+
}, z.core.$strict>;
|
|
1159
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1160
|
+
t: z.ZodLiteral<"conv.push">;
|
|
1161
|
+
cid: z.ZodString;
|
|
1162
|
+
share: z.ZodObject<{
|
|
1163
|
+
n: z.ZodNumber;
|
|
1164
|
+
event: z.ZodObject<{
|
|
1165
|
+
class: z.ZodLiteral<"keys">;
|
|
1166
|
+
body: z.ZodObject<{
|
|
1167
|
+
to: z.ZodObject<{
|
|
1168
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1169
|
+
device: z.ZodString;
|
|
1170
|
+
}, z.core.$strict>;
|
|
1171
|
+
epk: z.ZodString;
|
|
1172
|
+
nonce: z.ZodString;
|
|
1173
|
+
ct: z.ZodString;
|
|
1174
|
+
}, z.core.$strict>;
|
|
1175
|
+
sig: z.ZodString;
|
|
1176
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
1177
|
+
realm: z.ZodString;
|
|
1178
|
+
cid: z.ZodString;
|
|
1179
|
+
id: z.ZodString;
|
|
1180
|
+
by: z.ZodObject<{
|
|
1181
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1182
|
+
device: z.ZodString;
|
|
1183
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
1184
|
+
}, z.core.$strict>;
|
|
1185
|
+
ts: z.ZodNumber;
|
|
1186
|
+
opHead: z.ZodObject<{
|
|
1187
|
+
seq: z.ZodNumber;
|
|
1188
|
+
hash: z.ZodString;
|
|
1189
|
+
}, z.core.$strict>;
|
|
1190
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
1191
|
+
seq: z.ZodNumber;
|
|
1192
|
+
hash: z.ZodString;
|
|
1193
|
+
}, z.core.$strict>>;
|
|
1194
|
+
}, z.core.$strict>;
|
|
1195
|
+
}, z.core.$strict>;
|
|
1196
|
+
}, z.core.$strict>]>;
|
|
1197
|
+
export type ConvPushFrame = z.infer<typeof ConvPushFrame>;
|
|
1198
|
+
/** The conversation frames' types, for the relay's dispatch and `/metrics`. */
|
|
1199
|
+
export declare const CONV_FRAMES: readonly ["conv.append", "conv.share", "conv.fetch", "conv.head", "conv.caps"];
|
|
1200
|
+
export declare const CONV_REPLIES: readonly ["conv.ok", "conv.shared", "conv.entries", "conv.heads", "conv.capabilities", "conv.push"];
|