wowok_agent 2.1.33 → 2.1.35
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/index.js +13 -3
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/messenger/index.d.ts +814 -21
- package/dist/schema/messenger/index.js +47 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.me
|
|
|
9
9
|
// Import schema
|
|
10
10
|
import { CallService_DataSchema, CallMachine_DataSchema, MachineNode2File_InputSchema, MachineNode2File_OutputWrappedSchema, CallProgress_DataSchema, CallPermission_DataSchema, CallGuard_DataSchema, Guard2File_InputSchema, Guard2File_OutputWrappedSchema, CallArbitration_DataSchema, CallRepository_DataSchema, CallContact_DataSchema, CallTreasury_DataSchema, CallReward_DataSchema, CallAllocation_DataSchema, CallPersonal_DataSchema, CallPayment_DataSchema, CallDemand_DataSchema, CallOrder_DataSchema, CallEnvSchema, SubmissionCallSchema, strictParse, CallOutputSchema, handleCallResult, createServerConfig, createCapabilitiesConfig, createToolMeta, transformSubmission, getEnvConfig, WipGenerationOptionsSchema, WipToHtmlOptionsSchema, TokenDataFilterSchema, LocalInfoFilterSchema, LocalMarkFilterSchema, AccountFilterSchema, TokenTypeSchema, OnchainEventsInputSchema, OnchainEventsResultSchema, ProtocolInfoQuerySchema, ProtocolInfoResultSchema, WatchQueryOperationsResultSchema, NameOrAddressSchema, AccountOrMark_AddressSchema, ObjectTypeSchema, AccountOperationOutputWrappedSchema, LocalMarkOperationOutputWrappedSchema, LocalInfoOperationOutputWrappedSchema, WipOperationOutputSchema, MessengerOperationOutputSchema, AccountOperationSchema, LocalMarkOperationSchema, LocalInfoOperationSchema, parseMachineNodesFromText, formatNodeErrors as formatMachineNodeErrors, MessengerOperationInputSchema, } from "./schema/index.js";
|
|
11
11
|
// Import wowok SDK
|
|
12
|
-
import { CallService, CallMachine, CallProgress, CallPermission, CallGuard, CallArbitration, CallRepository, CallContact, CallTreasury, CallReward, CallAllocation, CallPersonal, CallPayment, CallDemand, CallOrder, gen_passport, guard2file, parseGuardFile, formatGuardParseErrors, machineNode2file, generateNodeComments, generate_wip, verify_wip, sign_wip, wip2html, account_operation, local_mark_operation, local_info_operation, watch_conversations, send_message, send_file, watch_messages, extract_zip_messages, generate_wts, verify_wts, sign_wts, wts2html, proof_message, query_local_mark_list, query_account_list, query_local_info_list, query_local_token_list, query_account, query_personal, query_objects, query_table, queryProtocolInfo, query_received, queryTableItem_RepositoryData, queryTableItem_PermissionPerm, queryTableItem_RewardRecord, queryTableItem_DemandPresenter, queryTableItem_TreasuryHistory, queryTableItem_MachineNode, queryTableItem_ProgressHistory, queryTableItem_AddressMark, queryTableItem_EntityRegistrar, queryTableItem_EntityLinker, query_events, blacklist, friendslist, guardlist, settings, AmountType, } from "wowok";
|
|
12
|
+
import { CallService, CallMachine, CallProgress, CallPermission, CallGuard, CallArbitration, CallRepository, CallContact, CallTreasury, CallReward, CallAllocation, CallPersonal, CallPayment, CallDemand, CallOrder, gen_passport, guard2file, parseGuardFile, formatGuardParseErrors, machineNode2file, generateNodeComments, generate_wip, verify_wip, sign_wip, wip2html, account_operation, local_mark_operation, local_info_operation, watch_conversations, send_message, send_file, watch_messages, extract_zip_messages, generate_wts, verify_wts, sign_wts, wts2html, proof_message, mark_messages_as_viewed, mark_conversation_as_viewed, query_local_mark_list, query_account_list, query_local_info_list, query_local_token_list, query_account, query_personal, query_objects, query_table, queryProtocolInfo, query_received, queryTableItem_RepositoryData, queryTableItem_PermissionPerm, queryTableItem_RewardRecord, queryTableItem_DemandPresenter, queryTableItem_TreasuryHistory, queryTableItem_MachineNode, queryTableItem_ProgressHistory, queryTableItem_AddressMark, queryTableItem_EntityRegistrar, queryTableItem_EntityLinker, query_events, blacklist, friendslist, guardlist, settings, AmountType, } from "wowok";
|
|
13
13
|
const SERVER_DESCRIPTION = `WoWok MCP Server - Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.
|
|
14
14
|
|
|
15
15
|
## Token System Overview
|
|
@@ -924,7 +924,7 @@ async function handleMessengerOperation(args) {
|
|
|
924
924
|
let result;
|
|
925
925
|
switch (validated.operation) {
|
|
926
926
|
case "watch_conversations": {
|
|
927
|
-
const conversations = await watch_conversations(validated.
|
|
927
|
+
const conversations = await watch_conversations(validated.filter);
|
|
928
928
|
result = { operation: "watch_conversations", result: conversations };
|
|
929
929
|
break;
|
|
930
930
|
}
|
|
@@ -1049,6 +1049,16 @@ async function handleMessengerOperation(args) {
|
|
|
1049
1049
|
result = { operation: "settings", op: validated.settings.op, result: settingsResult.result };
|
|
1050
1050
|
break;
|
|
1051
1051
|
}
|
|
1052
|
+
case "mark_messages_as_viewed": {
|
|
1053
|
+
const markedCount = await mark_messages_as_viewed(validated.messageIds, validated.account);
|
|
1054
|
+
result = { operation: "mark_messages_as_viewed", result: markedCount };
|
|
1055
|
+
break;
|
|
1056
|
+
}
|
|
1057
|
+
case "mark_conversation_as_viewed": {
|
|
1058
|
+
const markedCount = await mark_conversation_as_viewed(normalizeAccountOrMark(validated.peerAddress), validated.account);
|
|
1059
|
+
result = { operation: "mark_conversation_as_viewed", result: markedCount };
|
|
1060
|
+
break;
|
|
1061
|
+
}
|
|
1052
1062
|
default:
|
|
1053
1063
|
throw new Error(`Unknown messenger operation: ${validated.operation}`);
|
|
1054
1064
|
}
|
|
@@ -1196,7 +1206,7 @@ async function main() {
|
|
|
1196
1206
|
// Messenger Operations Tool
|
|
1197
1207
|
server.registerTool("messenger_operation", {
|
|
1198
1208
|
title: "💬 Messenger Operations",
|
|
1199
|
-
description: "WoWok encrypted messenger operations: watch conversations, send message, send file, watch messages, extract zip messages, generate WTS, verify WTS, sign WTS, WTS to HTML, proof message on-chain, manage blacklist, friendslist, guardlist, and
|
|
1209
|
+
description: "WoWok encrypted messenger operations: watch conversations (with unread filtering, preview messages), send message, send file, watch messages (with viewed status filtering), extract zip messages, generate WTS, verify WTS, sign WTS, WTS to HTML, proof message on-chain, manage blacklist, friendslist, guardlist, settings, mark messages as viewed, and mark conversation as viewed.",
|
|
1200
1210
|
inputSchema: MessengerOperationInputSchema,
|
|
1201
1211
|
outputSchema: MessengerOperationOutputSchema,
|
|
1202
1212
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
@@ -21,7 +21,7 @@ export const NodeAddForwardDataSchema = z.object({
|
|
|
21
21
|
node_name: NameSchema.describe('Name of the next node.'),
|
|
22
22
|
forward: z.array(z.object({
|
|
23
23
|
name: NameSchema.describe('Name of the operation'),
|
|
24
|
-
namedOperator: z.union([NotEmptyNameSchema, z.null()]).optional().describe('One of the operation permissions: use operators within the permission space name in the Machine object. Each Progress object can manage operators independently.'),
|
|
24
|
+
namedOperator: z.union([NotEmptyNameSchema, z.null()]).optional().describe('One of the operation permissions: use operators within the permission space name in the Machine object. Each Progress object can manage operators independently. Use empty string "" to indicate the order permission (order owner and agents can operate). When using Order object to operate progress, empty string namedOperator allows order owner/agents to execute the forward without needing other permissions.'),
|
|
25
25
|
permissionIndex: z.union([PermissionIndexTypeSchema, z.null()]).optional().describe('Second operation permission: use operators specified by the permission index of the Permission object in the Machine object. All Progress objects share the same operators.'),
|
|
26
26
|
weight: z.number().min(0).max(65535).int().describe('Weight of the operation'),
|
|
27
27
|
}).strict()).describe('List of operations between the previous and next nodes.'),
|
|
@@ -89,6 +89,7 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
89
89
|
decryptError: z.ZodOptional<z.ZodString>;
|
|
90
90
|
decryptAttempts: z.ZodOptional<z.ZodNumber>;
|
|
91
91
|
lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
viewedAt: z.ZodOptional<z.ZodNumber>;
|
|
92
93
|
}, "strip", z.ZodTypeAny, {
|
|
93
94
|
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
94
95
|
createdAt: number;
|
|
@@ -127,6 +128,7 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
127
128
|
decryptError?: string | undefined;
|
|
128
129
|
decryptAttempts?: number | undefined;
|
|
129
130
|
lastDecryptAttemptAt?: number | undefined;
|
|
131
|
+
viewedAt?: number | undefined;
|
|
130
132
|
}, {
|
|
131
133
|
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
132
134
|
createdAt: number;
|
|
@@ -165,6 +167,7 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
165
167
|
decryptError?: string | undefined;
|
|
166
168
|
decryptAttempts?: number | undefined;
|
|
167
169
|
lastDecryptAttemptAt?: number | undefined;
|
|
170
|
+
viewedAt?: number | undefined;
|
|
168
171
|
}>;
|
|
169
172
|
export declare const ConversationInfoSchema: z.ZodObject<{
|
|
170
173
|
peerAddress: z.ZodString;
|
|
@@ -172,18 +175,268 @@ export declare const ConversationInfoSchema: z.ZodObject<{
|
|
|
172
175
|
messageCount: z.ZodNumber;
|
|
173
176
|
unreadCount: z.ZodNumber;
|
|
174
177
|
lastMessagePreview: z.ZodOptional<z.ZodString>;
|
|
178
|
+
previewMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
179
|
+
messageId: z.ZodString;
|
|
180
|
+
fromAddress: z.ZodString;
|
|
181
|
+
toAddress: z.ZodString;
|
|
182
|
+
plaintextHash: z.ZodString;
|
|
183
|
+
plaintext: z.ZodOptional<z.ZodString>;
|
|
184
|
+
guardAddress: z.ZodOptional<z.ZodString>;
|
|
185
|
+
passportAddress: z.ZodOptional<z.ZodString>;
|
|
186
|
+
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
direction: z.ZodEnum<["sent", "received"]>;
|
|
188
|
+
status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
|
|
189
|
+
msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
|
|
190
|
+
leafIndex: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
prevRoot: z.ZodOptional<z.ZodString>;
|
|
192
|
+
newRoot: z.ZodOptional<z.ZodString>;
|
|
193
|
+
serverSignature: z.ZodOptional<z.ZodString>;
|
|
194
|
+
serverTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
serverPublicKey: z.ZodOptional<z.ZodString>;
|
|
196
|
+
arkConfirmed: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
recipient: z.ZodString;
|
|
198
|
+
recipientPublicKey: z.ZodString;
|
|
199
|
+
signature: z.ZodString;
|
|
200
|
+
timestamp: z.ZodNumber;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
signature: string;
|
|
203
|
+
recipient: string;
|
|
204
|
+
recipientPublicKey: string;
|
|
205
|
+
timestamp: number;
|
|
206
|
+
}, {
|
|
207
|
+
signature: string;
|
|
208
|
+
recipient: string;
|
|
209
|
+
recipientPublicKey: string;
|
|
210
|
+
timestamp: number;
|
|
211
|
+
}>>;
|
|
212
|
+
createdAt: z.ZodNumber;
|
|
213
|
+
receivedAt: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
zipMetadata: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
fileName: z.ZodString;
|
|
216
|
+
fileSize: z.ZodNumber;
|
|
217
|
+
fileHash: z.ZodString;
|
|
218
|
+
contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
|
|
219
|
+
localCachePath: z.ZodOptional<z.ZodString>;
|
|
220
|
+
downloadedAt: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
fileName: string;
|
|
223
|
+
fileSize: number;
|
|
224
|
+
fileHash: string;
|
|
225
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
226
|
+
localCachePath?: string | undefined;
|
|
227
|
+
downloadedAt?: number | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
fileName: string;
|
|
230
|
+
fileSize: number;
|
|
231
|
+
fileHash: string;
|
|
232
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
233
|
+
localCachePath?: string | undefined;
|
|
234
|
+
downloadedAt?: number | undefined;
|
|
235
|
+
}>>;
|
|
236
|
+
proof: z.ZodOptional<z.ZodString>;
|
|
237
|
+
decryptError: z.ZodOptional<z.ZodString>;
|
|
238
|
+
decryptAttempts: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
viewedAt: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
243
|
+
createdAt: number;
|
|
244
|
+
messageId: string;
|
|
245
|
+
fromAddress: string;
|
|
246
|
+
toAddress: string;
|
|
247
|
+
plaintextHash: string;
|
|
248
|
+
direction: "received" | "sent";
|
|
249
|
+
msgType: 1 | 3;
|
|
250
|
+
proof?: string | undefined;
|
|
251
|
+
receivedAt?: number | undefined;
|
|
252
|
+
serverTimestamp?: number | undefined;
|
|
253
|
+
plaintext?: string | undefined;
|
|
254
|
+
guardAddress?: string | undefined;
|
|
255
|
+
passportAddress?: string | undefined;
|
|
256
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
257
|
+
leafIndex?: number | undefined;
|
|
258
|
+
prevRoot?: string | undefined;
|
|
259
|
+
newRoot?: string | undefined;
|
|
260
|
+
serverSignature?: string | undefined;
|
|
261
|
+
serverPublicKey?: string | undefined;
|
|
262
|
+
arkConfirmed?: {
|
|
263
|
+
signature: string;
|
|
264
|
+
recipient: string;
|
|
265
|
+
recipientPublicKey: string;
|
|
266
|
+
timestamp: number;
|
|
267
|
+
} | undefined;
|
|
268
|
+
zipMetadata?: {
|
|
269
|
+
fileName: string;
|
|
270
|
+
fileSize: number;
|
|
271
|
+
fileHash: string;
|
|
272
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
273
|
+
localCachePath?: string | undefined;
|
|
274
|
+
downloadedAt?: number | undefined;
|
|
275
|
+
} | undefined;
|
|
276
|
+
decryptError?: string | undefined;
|
|
277
|
+
decryptAttempts?: number | undefined;
|
|
278
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
279
|
+
viewedAt?: number | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
282
|
+
createdAt: number;
|
|
283
|
+
messageId: string;
|
|
284
|
+
fromAddress: string;
|
|
285
|
+
toAddress: string;
|
|
286
|
+
plaintextHash: string;
|
|
287
|
+
direction: "received" | "sent";
|
|
288
|
+
msgType: 1 | 3;
|
|
289
|
+
proof?: string | undefined;
|
|
290
|
+
receivedAt?: number | undefined;
|
|
291
|
+
serverTimestamp?: number | undefined;
|
|
292
|
+
plaintext?: string | undefined;
|
|
293
|
+
guardAddress?: string | undefined;
|
|
294
|
+
passportAddress?: string | undefined;
|
|
295
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
296
|
+
leafIndex?: number | undefined;
|
|
297
|
+
prevRoot?: string | undefined;
|
|
298
|
+
newRoot?: string | undefined;
|
|
299
|
+
serverSignature?: string | undefined;
|
|
300
|
+
serverPublicKey?: string | undefined;
|
|
301
|
+
arkConfirmed?: {
|
|
302
|
+
signature: string;
|
|
303
|
+
recipient: string;
|
|
304
|
+
recipientPublicKey: string;
|
|
305
|
+
timestamp: number;
|
|
306
|
+
} | undefined;
|
|
307
|
+
zipMetadata?: {
|
|
308
|
+
fileName: string;
|
|
309
|
+
fileSize: number;
|
|
310
|
+
fileHash: string;
|
|
311
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
312
|
+
localCachePath?: string | undefined;
|
|
313
|
+
downloadedAt?: number | undefined;
|
|
314
|
+
} | undefined;
|
|
315
|
+
decryptError?: string | undefined;
|
|
316
|
+
decryptAttempts?: number | undefined;
|
|
317
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
318
|
+
viewedAt?: number | undefined;
|
|
319
|
+
}>, "many">>;
|
|
175
320
|
}, "strip", z.ZodTypeAny, {
|
|
176
321
|
peerAddress: string;
|
|
177
322
|
lastMessageAt: number;
|
|
178
323
|
messageCount: number;
|
|
179
324
|
unreadCount: number;
|
|
180
325
|
lastMessagePreview?: string | undefined;
|
|
326
|
+
previewMessages?: {
|
|
327
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
328
|
+
createdAt: number;
|
|
329
|
+
messageId: string;
|
|
330
|
+
fromAddress: string;
|
|
331
|
+
toAddress: string;
|
|
332
|
+
plaintextHash: string;
|
|
333
|
+
direction: "received" | "sent";
|
|
334
|
+
msgType: 1 | 3;
|
|
335
|
+
proof?: string | undefined;
|
|
336
|
+
receivedAt?: number | undefined;
|
|
337
|
+
serverTimestamp?: number | undefined;
|
|
338
|
+
plaintext?: string | undefined;
|
|
339
|
+
guardAddress?: string | undefined;
|
|
340
|
+
passportAddress?: string | undefined;
|
|
341
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
342
|
+
leafIndex?: number | undefined;
|
|
343
|
+
prevRoot?: string | undefined;
|
|
344
|
+
newRoot?: string | undefined;
|
|
345
|
+
serverSignature?: string | undefined;
|
|
346
|
+
serverPublicKey?: string | undefined;
|
|
347
|
+
arkConfirmed?: {
|
|
348
|
+
signature: string;
|
|
349
|
+
recipient: string;
|
|
350
|
+
recipientPublicKey: string;
|
|
351
|
+
timestamp: number;
|
|
352
|
+
} | undefined;
|
|
353
|
+
zipMetadata?: {
|
|
354
|
+
fileName: string;
|
|
355
|
+
fileSize: number;
|
|
356
|
+
fileHash: string;
|
|
357
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
358
|
+
localCachePath?: string | undefined;
|
|
359
|
+
downloadedAt?: number | undefined;
|
|
360
|
+
} | undefined;
|
|
361
|
+
decryptError?: string | undefined;
|
|
362
|
+
decryptAttempts?: number | undefined;
|
|
363
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
364
|
+
viewedAt?: number | undefined;
|
|
365
|
+
}[] | undefined;
|
|
181
366
|
}, {
|
|
182
367
|
peerAddress: string;
|
|
183
368
|
lastMessageAt: number;
|
|
184
369
|
messageCount: number;
|
|
185
370
|
unreadCount: number;
|
|
186
371
|
lastMessagePreview?: string | undefined;
|
|
372
|
+
previewMessages?: {
|
|
373
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
374
|
+
createdAt: number;
|
|
375
|
+
messageId: string;
|
|
376
|
+
fromAddress: string;
|
|
377
|
+
toAddress: string;
|
|
378
|
+
plaintextHash: string;
|
|
379
|
+
direction: "received" | "sent";
|
|
380
|
+
msgType: 1 | 3;
|
|
381
|
+
proof?: string | undefined;
|
|
382
|
+
receivedAt?: number | undefined;
|
|
383
|
+
serverTimestamp?: number | undefined;
|
|
384
|
+
plaintext?: string | undefined;
|
|
385
|
+
guardAddress?: string | undefined;
|
|
386
|
+
passportAddress?: string | undefined;
|
|
387
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
388
|
+
leafIndex?: number | undefined;
|
|
389
|
+
prevRoot?: string | undefined;
|
|
390
|
+
newRoot?: string | undefined;
|
|
391
|
+
serverSignature?: string | undefined;
|
|
392
|
+
serverPublicKey?: string | undefined;
|
|
393
|
+
arkConfirmed?: {
|
|
394
|
+
signature: string;
|
|
395
|
+
recipient: string;
|
|
396
|
+
recipientPublicKey: string;
|
|
397
|
+
timestamp: number;
|
|
398
|
+
} | undefined;
|
|
399
|
+
zipMetadata?: {
|
|
400
|
+
fileName: string;
|
|
401
|
+
fileSize: number;
|
|
402
|
+
fileHash: string;
|
|
403
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
404
|
+
localCachePath?: string | undefined;
|
|
405
|
+
downloadedAt?: number | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
decryptError?: string | undefined;
|
|
408
|
+
decryptAttempts?: number | undefined;
|
|
409
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
410
|
+
viewedAt?: number | undefined;
|
|
411
|
+
}[] | undefined;
|
|
412
|
+
}>;
|
|
413
|
+
export declare const ConversationsFilterSchema: z.ZodObject<{
|
|
414
|
+
account: z.ZodOptional<z.ZodString>;
|
|
415
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
416
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
previewMessageCount: z.ZodOptional<z.ZodNumber>;
|
|
419
|
+
sortBy: z.ZodOptional<z.ZodEnum<["lastMessageAt", "unreadCount", "messageCount"]>>;
|
|
420
|
+
sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
421
|
+
skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
|
|
422
|
+
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
account?: string | undefined;
|
|
424
|
+
unreadOnly?: boolean | undefined;
|
|
425
|
+
startTime?: number | undefined;
|
|
426
|
+
endTime?: number | undefined;
|
|
427
|
+
previewMessageCount?: number | undefined;
|
|
428
|
+
sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
|
|
429
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
430
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
431
|
+
}, {
|
|
432
|
+
account?: string | undefined;
|
|
433
|
+
unreadOnly?: boolean | undefined;
|
|
434
|
+
startTime?: number | undefined;
|
|
435
|
+
endTime?: number | undefined;
|
|
436
|
+
previewMessageCount?: number | undefined;
|
|
437
|
+
sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
|
|
438
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
439
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
187
440
|
}>;
|
|
188
441
|
export declare const MessageFilterSchema: z.ZodObject<{
|
|
189
442
|
/** Filter by account (specify which account to query) */
|
|
@@ -238,6 +491,10 @@ export declare const MessageFilterSchema: z.ZodObject<{
|
|
|
238
491
|
excludeAddresses?: string[] | undefined;
|
|
239
492
|
relation?: "union" | "intersection" | undefined;
|
|
240
493
|
}>>;
|
|
494
|
+
viewed: z.ZodOptional<z.ZodBoolean>;
|
|
495
|
+
viewedAtStart: z.ZodOptional<z.ZodNumber>;
|
|
496
|
+
viewedAtEnd: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
|
|
241
498
|
}, "strip", z.ZodTypeAny, {
|
|
242
499
|
status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
|
|
243
500
|
limit?: number | undefined;
|
|
@@ -249,14 +506,15 @@ export declare const MessageFilterSchema: z.ZodObject<{
|
|
|
249
506
|
name_or_address?: string | undefined;
|
|
250
507
|
local_mark_first?: boolean | undefined;
|
|
251
508
|
} | undefined;
|
|
509
|
+
startTime?: number | undefined;
|
|
510
|
+
endTime?: number | undefined;
|
|
511
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
512
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
252
513
|
decryptedOnly?: boolean | undefined;
|
|
253
514
|
confirmedOnly?: boolean | undefined;
|
|
254
515
|
keyword?: string | undefined;
|
|
255
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
256
516
|
offset?: number | undefined;
|
|
257
517
|
timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
|
|
258
|
-
startTime?: number | undefined;
|
|
259
|
-
endTime?: number | undefined;
|
|
260
518
|
createdAtStart?: number | undefined;
|
|
261
519
|
createdAtEnd?: number | undefined;
|
|
262
520
|
receivedAtStart?: number | undefined;
|
|
@@ -276,6 +534,9 @@ export declare const MessageFilterSchema: z.ZodObject<{
|
|
|
276
534
|
excludeAddresses?: string[] | undefined;
|
|
277
535
|
relation?: "union" | "intersection" | undefined;
|
|
278
536
|
} | undefined;
|
|
537
|
+
viewed?: boolean | undefined;
|
|
538
|
+
viewedAtStart?: number | undefined;
|
|
539
|
+
viewedAtEnd?: number | undefined;
|
|
279
540
|
}, {
|
|
280
541
|
status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
|
|
281
542
|
limit?: number | undefined;
|
|
@@ -287,14 +548,15 @@ export declare const MessageFilterSchema: z.ZodObject<{
|
|
|
287
548
|
name_or_address?: string | undefined;
|
|
288
549
|
local_mark_first?: boolean | undefined;
|
|
289
550
|
} | undefined;
|
|
551
|
+
startTime?: number | undefined;
|
|
552
|
+
endTime?: number | undefined;
|
|
553
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
554
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
290
555
|
decryptedOnly?: boolean | undefined;
|
|
291
556
|
confirmedOnly?: boolean | undefined;
|
|
292
557
|
keyword?: string | undefined;
|
|
293
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
294
558
|
offset?: number | undefined;
|
|
295
559
|
timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
|
|
296
|
-
startTime?: number | undefined;
|
|
297
|
-
endTime?: number | undefined;
|
|
298
560
|
createdAtStart?: number | undefined;
|
|
299
561
|
createdAtEnd?: number | undefined;
|
|
300
562
|
receivedAtStart?: number | undefined;
|
|
@@ -314,6 +576,9 @@ export declare const MessageFilterSchema: z.ZodObject<{
|
|
|
314
576
|
excludeAddresses?: string[] | undefined;
|
|
315
577
|
relation?: "union" | "intersection" | undefined;
|
|
316
578
|
} | undefined;
|
|
579
|
+
viewed?: boolean | undefined;
|
|
580
|
+
viewedAtStart?: number | undefined;
|
|
581
|
+
viewedAtEnd?: number | undefined;
|
|
317
582
|
}>;
|
|
318
583
|
export declare const SendMessageOptionsSchema: z.ZodObject<{
|
|
319
584
|
guardAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -1143,13 +1408,58 @@ export declare const GetSettingsResponseSchema: z.ZodObject<{
|
|
|
1143
1408
|
}>;
|
|
1144
1409
|
export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
1145
1410
|
operation: z.ZodLiteral<"watch_conversations">;
|
|
1146
|
-
|
|
1411
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
1412
|
+
account: z.ZodOptional<z.ZodString>;
|
|
1413
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1414
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
1415
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
1416
|
+
previewMessageCount: z.ZodOptional<z.ZodNumber>;
|
|
1417
|
+
sortBy: z.ZodOptional<z.ZodEnum<["lastMessageAt", "unreadCount", "messageCount"]>>;
|
|
1418
|
+
sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
1419
|
+
skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
|
|
1420
|
+
}, "strip", z.ZodTypeAny, {
|
|
1421
|
+
account?: string | undefined;
|
|
1422
|
+
unreadOnly?: boolean | undefined;
|
|
1423
|
+
startTime?: number | undefined;
|
|
1424
|
+
endTime?: number | undefined;
|
|
1425
|
+
previewMessageCount?: number | undefined;
|
|
1426
|
+
sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
|
|
1427
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1428
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1429
|
+
}, {
|
|
1430
|
+
account?: string | undefined;
|
|
1431
|
+
unreadOnly?: boolean | undefined;
|
|
1432
|
+
startTime?: number | undefined;
|
|
1433
|
+
endTime?: number | undefined;
|
|
1434
|
+
previewMessageCount?: number | undefined;
|
|
1435
|
+
sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
|
|
1436
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1437
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1438
|
+
}>>;
|
|
1147
1439
|
}, "strip", z.ZodTypeAny, {
|
|
1148
1440
|
operation: "watch_conversations";
|
|
1149
|
-
|
|
1441
|
+
filter?: {
|
|
1442
|
+
account?: string | undefined;
|
|
1443
|
+
unreadOnly?: boolean | undefined;
|
|
1444
|
+
startTime?: number | undefined;
|
|
1445
|
+
endTime?: number | undefined;
|
|
1446
|
+
previewMessageCount?: number | undefined;
|
|
1447
|
+
sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
|
|
1448
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1449
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1450
|
+
} | undefined;
|
|
1150
1451
|
}, {
|
|
1151
1452
|
operation: "watch_conversations";
|
|
1152
|
-
|
|
1453
|
+
filter?: {
|
|
1454
|
+
account?: string | undefined;
|
|
1455
|
+
unreadOnly?: boolean | undefined;
|
|
1456
|
+
startTime?: number | undefined;
|
|
1457
|
+
endTime?: number | undefined;
|
|
1458
|
+
previewMessageCount?: number | undefined;
|
|
1459
|
+
sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
|
|
1460
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1461
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1462
|
+
} | undefined;
|
|
1153
1463
|
}>, z.ZodObject<{
|
|
1154
1464
|
operation: z.ZodLiteral<"send_message">;
|
|
1155
1465
|
from: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -1331,6 +1641,10 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1331
1641
|
excludeAddresses?: string[] | undefined;
|
|
1332
1642
|
relation?: "union" | "intersection" | undefined;
|
|
1333
1643
|
}>>;
|
|
1644
|
+
viewed: z.ZodOptional<z.ZodBoolean>;
|
|
1645
|
+
viewedAtStart: z.ZodOptional<z.ZodNumber>;
|
|
1646
|
+
viewedAtEnd: z.ZodOptional<z.ZodNumber>;
|
|
1647
|
+
skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
|
|
1334
1648
|
}, "strip", z.ZodTypeAny, {
|
|
1335
1649
|
status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
|
|
1336
1650
|
limit?: number | undefined;
|
|
@@ -1342,14 +1656,15 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1342
1656
|
name_or_address?: string | undefined;
|
|
1343
1657
|
local_mark_first?: boolean | undefined;
|
|
1344
1658
|
} | undefined;
|
|
1659
|
+
startTime?: number | undefined;
|
|
1660
|
+
endTime?: number | undefined;
|
|
1661
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1662
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1345
1663
|
decryptedOnly?: boolean | undefined;
|
|
1346
1664
|
confirmedOnly?: boolean | undefined;
|
|
1347
1665
|
keyword?: string | undefined;
|
|
1348
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
1349
1666
|
offset?: number | undefined;
|
|
1350
1667
|
timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
|
|
1351
|
-
startTime?: number | undefined;
|
|
1352
|
-
endTime?: number | undefined;
|
|
1353
1668
|
createdAtStart?: number | undefined;
|
|
1354
1669
|
createdAtEnd?: number | undefined;
|
|
1355
1670
|
receivedAtStart?: number | undefined;
|
|
@@ -1369,6 +1684,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1369
1684
|
excludeAddresses?: string[] | undefined;
|
|
1370
1685
|
relation?: "union" | "intersection" | undefined;
|
|
1371
1686
|
} | undefined;
|
|
1687
|
+
viewed?: boolean | undefined;
|
|
1688
|
+
viewedAtStart?: number | undefined;
|
|
1689
|
+
viewedAtEnd?: number | undefined;
|
|
1372
1690
|
}, {
|
|
1373
1691
|
status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
|
|
1374
1692
|
limit?: number | undefined;
|
|
@@ -1380,14 +1698,15 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1380
1698
|
name_or_address?: string | undefined;
|
|
1381
1699
|
local_mark_first?: boolean | undefined;
|
|
1382
1700
|
} | undefined;
|
|
1701
|
+
startTime?: number | undefined;
|
|
1702
|
+
endTime?: number | undefined;
|
|
1703
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1704
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1383
1705
|
decryptedOnly?: boolean | undefined;
|
|
1384
1706
|
confirmedOnly?: boolean | undefined;
|
|
1385
1707
|
keyword?: string | undefined;
|
|
1386
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
1387
1708
|
offset?: number | undefined;
|
|
1388
1709
|
timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
|
|
1389
|
-
startTime?: number | undefined;
|
|
1390
|
-
endTime?: number | undefined;
|
|
1391
1710
|
createdAtStart?: number | undefined;
|
|
1392
1711
|
createdAtEnd?: number | undefined;
|
|
1393
1712
|
receivedAtStart?: number | undefined;
|
|
@@ -1407,6 +1726,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1407
1726
|
excludeAddresses?: string[] | undefined;
|
|
1408
1727
|
relation?: "union" | "intersection" | undefined;
|
|
1409
1728
|
} | undefined;
|
|
1729
|
+
viewed?: boolean | undefined;
|
|
1730
|
+
viewedAtStart?: number | undefined;
|
|
1731
|
+
viewedAtEnd?: number | undefined;
|
|
1410
1732
|
}>>;
|
|
1411
1733
|
}, "strip", z.ZodTypeAny, {
|
|
1412
1734
|
operation: "watch_messages";
|
|
@@ -1421,14 +1743,15 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1421
1743
|
name_or_address?: string | undefined;
|
|
1422
1744
|
local_mark_first?: boolean | undefined;
|
|
1423
1745
|
} | undefined;
|
|
1746
|
+
startTime?: number | undefined;
|
|
1747
|
+
endTime?: number | undefined;
|
|
1748
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1749
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1424
1750
|
decryptedOnly?: boolean | undefined;
|
|
1425
1751
|
confirmedOnly?: boolean | undefined;
|
|
1426
1752
|
keyword?: string | undefined;
|
|
1427
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
1428
1753
|
offset?: number | undefined;
|
|
1429
1754
|
timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
|
|
1430
|
-
startTime?: number | undefined;
|
|
1431
|
-
endTime?: number | undefined;
|
|
1432
1755
|
createdAtStart?: number | undefined;
|
|
1433
1756
|
createdAtEnd?: number | undefined;
|
|
1434
1757
|
receivedAtStart?: number | undefined;
|
|
@@ -1448,6 +1771,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1448
1771
|
excludeAddresses?: string[] | undefined;
|
|
1449
1772
|
relation?: "union" | "intersection" | undefined;
|
|
1450
1773
|
} | undefined;
|
|
1774
|
+
viewed?: boolean | undefined;
|
|
1775
|
+
viewedAtStart?: number | undefined;
|
|
1776
|
+
viewedAtEnd?: number | undefined;
|
|
1451
1777
|
} | undefined;
|
|
1452
1778
|
}, {
|
|
1453
1779
|
operation: "watch_messages";
|
|
@@ -1462,14 +1788,15 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1462
1788
|
name_or_address?: string | undefined;
|
|
1463
1789
|
local_mark_first?: boolean | undefined;
|
|
1464
1790
|
} | undefined;
|
|
1791
|
+
startTime?: number | undefined;
|
|
1792
|
+
endTime?: number | undefined;
|
|
1793
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
1794
|
+
skipAutoMarkViewed?: boolean | undefined;
|
|
1465
1795
|
decryptedOnly?: boolean | undefined;
|
|
1466
1796
|
confirmedOnly?: boolean | undefined;
|
|
1467
1797
|
keyword?: string | undefined;
|
|
1468
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
1469
1798
|
offset?: number | undefined;
|
|
1470
1799
|
timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
|
|
1471
|
-
startTime?: number | undefined;
|
|
1472
|
-
endTime?: number | undefined;
|
|
1473
1800
|
createdAtStart?: number | undefined;
|
|
1474
1801
|
createdAtEnd?: number | undefined;
|
|
1475
1802
|
receivedAtStart?: number | undefined;
|
|
@@ -1489,6 +1816,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1489
1816
|
excludeAddresses?: string[] | undefined;
|
|
1490
1817
|
relation?: "union" | "intersection" | undefined;
|
|
1491
1818
|
} | undefined;
|
|
1819
|
+
viewed?: boolean | undefined;
|
|
1820
|
+
viewedAtStart?: number | undefined;
|
|
1821
|
+
viewedAtEnd?: number | undefined;
|
|
1492
1822
|
} | undefined;
|
|
1493
1823
|
}>, z.ZodObject<{
|
|
1494
1824
|
operation: z.ZodLiteral<"extract_zip_messages">;
|
|
@@ -1555,6 +1885,7 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1555
1885
|
decryptError: z.ZodOptional<z.ZodString>;
|
|
1556
1886
|
decryptAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1557
1887
|
lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
|
|
1888
|
+
viewedAt: z.ZodOptional<z.ZodNumber>;
|
|
1558
1889
|
}, "strip", z.ZodTypeAny, {
|
|
1559
1890
|
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
1560
1891
|
createdAt: number;
|
|
@@ -1593,6 +1924,7 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1593
1924
|
decryptError?: string | undefined;
|
|
1594
1925
|
decryptAttempts?: number | undefined;
|
|
1595
1926
|
lastDecryptAttemptAt?: number | undefined;
|
|
1927
|
+
viewedAt?: number | undefined;
|
|
1596
1928
|
}, {
|
|
1597
1929
|
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
1598
1930
|
createdAt: number;
|
|
@@ -1631,6 +1963,7 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1631
1963
|
decryptError?: string | undefined;
|
|
1632
1964
|
decryptAttempts?: number | undefined;
|
|
1633
1965
|
lastDecryptAttemptAt?: number | undefined;
|
|
1966
|
+
viewedAt?: number | undefined;
|
|
1634
1967
|
}>]>, "many">;
|
|
1635
1968
|
outputDir: z.ZodString;
|
|
1636
1969
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1674,6 +2007,7 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1674
2007
|
decryptError?: string | undefined;
|
|
1675
2008
|
decryptAttempts?: number | undefined;
|
|
1676
2009
|
lastDecryptAttemptAt?: number | undefined;
|
|
2010
|
+
viewedAt?: number | undefined;
|
|
1677
2011
|
})[];
|
|
1678
2012
|
account?: string | undefined;
|
|
1679
2013
|
}, {
|
|
@@ -1717,6 +2051,7 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1717
2051
|
decryptError?: string | undefined;
|
|
1718
2052
|
decryptAttempts?: number | undefined;
|
|
1719
2053
|
lastDecryptAttemptAt?: number | undefined;
|
|
2054
|
+
viewedAt?: number | undefined;
|
|
1720
2055
|
})[];
|
|
1721
2056
|
account?: string | undefined;
|
|
1722
2057
|
}>, z.ZodObject<{
|
|
@@ -2491,6 +2826,45 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
2491
2826
|
maxInboxSize?: number | undefined;
|
|
2492
2827
|
};
|
|
2493
2828
|
account?: string | undefined;
|
|
2829
|
+
}>, z.ZodObject<{
|
|
2830
|
+
operation: z.ZodLiteral<"mark_messages_as_viewed">;
|
|
2831
|
+
account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
2832
|
+
messageIds: z.ZodArray<z.ZodString, "many">;
|
|
2833
|
+
}, "strip", z.ZodTypeAny, {
|
|
2834
|
+
operation: "mark_messages_as_viewed";
|
|
2835
|
+
messageIds: string[];
|
|
2836
|
+
account?: string | undefined;
|
|
2837
|
+
}, {
|
|
2838
|
+
operation: "mark_messages_as_viewed";
|
|
2839
|
+
messageIds: string[];
|
|
2840
|
+
account?: string | undefined;
|
|
2841
|
+
}>, z.ZodObject<{
|
|
2842
|
+
operation: z.ZodLiteral<"mark_conversation_as_viewed">;
|
|
2843
|
+
account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
2844
|
+
peerAddress: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2845
|
+
name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
2846
|
+
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
2847
|
+
}, "strict", z.ZodTypeAny, {
|
|
2848
|
+
name_or_address?: string | undefined;
|
|
2849
|
+
local_mark_first?: boolean | undefined;
|
|
2850
|
+
}, {
|
|
2851
|
+
name_or_address?: string | undefined;
|
|
2852
|
+
local_mark_first?: boolean | undefined;
|
|
2853
|
+
}>]>;
|
|
2854
|
+
}, "strip", z.ZodTypeAny, {
|
|
2855
|
+
operation: "mark_conversation_as_viewed";
|
|
2856
|
+
peerAddress: string | {
|
|
2857
|
+
name_or_address?: string | undefined;
|
|
2858
|
+
local_mark_first?: boolean | undefined;
|
|
2859
|
+
};
|
|
2860
|
+
account?: string | undefined;
|
|
2861
|
+
}, {
|
|
2862
|
+
operation: "mark_conversation_as_viewed";
|
|
2863
|
+
peerAddress: string | {
|
|
2864
|
+
name_or_address?: string | undefined;
|
|
2865
|
+
local_mark_first?: boolean | undefined;
|
|
2866
|
+
};
|
|
2867
|
+
account?: string | undefined;
|
|
2494
2868
|
}>]>;
|
|
2495
2869
|
export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
2496
2870
|
result: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
@@ -2501,18 +2875,240 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2501
2875
|
messageCount: z.ZodNumber;
|
|
2502
2876
|
unreadCount: z.ZodNumber;
|
|
2503
2877
|
lastMessagePreview: z.ZodOptional<z.ZodString>;
|
|
2878
|
+
previewMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2879
|
+
messageId: z.ZodString;
|
|
2880
|
+
fromAddress: z.ZodString;
|
|
2881
|
+
toAddress: z.ZodString;
|
|
2882
|
+
plaintextHash: z.ZodString;
|
|
2883
|
+
plaintext: z.ZodOptional<z.ZodString>;
|
|
2884
|
+
guardAddress: z.ZodOptional<z.ZodString>;
|
|
2885
|
+
passportAddress: z.ZodOptional<z.ZodString>;
|
|
2886
|
+
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
2887
|
+
direction: z.ZodEnum<["sent", "received"]>;
|
|
2888
|
+
status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
|
|
2889
|
+
msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
|
|
2890
|
+
leafIndex: z.ZodOptional<z.ZodNumber>;
|
|
2891
|
+
prevRoot: z.ZodOptional<z.ZodString>;
|
|
2892
|
+
newRoot: z.ZodOptional<z.ZodString>;
|
|
2893
|
+
serverSignature: z.ZodOptional<z.ZodString>;
|
|
2894
|
+
serverTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
2895
|
+
serverPublicKey: z.ZodOptional<z.ZodString>;
|
|
2896
|
+
arkConfirmed: z.ZodOptional<z.ZodObject<{
|
|
2897
|
+
recipient: z.ZodString;
|
|
2898
|
+
recipientPublicKey: z.ZodString;
|
|
2899
|
+
signature: z.ZodString;
|
|
2900
|
+
timestamp: z.ZodNumber;
|
|
2901
|
+
}, "strip", z.ZodTypeAny, {
|
|
2902
|
+
signature: string;
|
|
2903
|
+
recipient: string;
|
|
2904
|
+
recipientPublicKey: string;
|
|
2905
|
+
timestamp: number;
|
|
2906
|
+
}, {
|
|
2907
|
+
signature: string;
|
|
2908
|
+
recipient: string;
|
|
2909
|
+
recipientPublicKey: string;
|
|
2910
|
+
timestamp: number;
|
|
2911
|
+
}>>;
|
|
2912
|
+
createdAt: z.ZodNumber;
|
|
2913
|
+
receivedAt: z.ZodOptional<z.ZodNumber>;
|
|
2914
|
+
zipMetadata: z.ZodOptional<z.ZodObject<{
|
|
2915
|
+
fileName: z.ZodString;
|
|
2916
|
+
fileSize: z.ZodNumber;
|
|
2917
|
+
fileHash: z.ZodString;
|
|
2918
|
+
contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
|
|
2919
|
+
localCachePath: z.ZodOptional<z.ZodString>;
|
|
2920
|
+
downloadedAt: z.ZodOptional<z.ZodNumber>;
|
|
2921
|
+
}, "strip", z.ZodTypeAny, {
|
|
2922
|
+
fileName: string;
|
|
2923
|
+
fileSize: number;
|
|
2924
|
+
fileHash: string;
|
|
2925
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
2926
|
+
localCachePath?: string | undefined;
|
|
2927
|
+
downloadedAt?: number | undefined;
|
|
2928
|
+
}, {
|
|
2929
|
+
fileName: string;
|
|
2930
|
+
fileSize: number;
|
|
2931
|
+
fileHash: string;
|
|
2932
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
2933
|
+
localCachePath?: string | undefined;
|
|
2934
|
+
downloadedAt?: number | undefined;
|
|
2935
|
+
}>>;
|
|
2936
|
+
proof: z.ZodOptional<z.ZodString>;
|
|
2937
|
+
decryptError: z.ZodOptional<z.ZodString>;
|
|
2938
|
+
decryptAttempts: z.ZodOptional<z.ZodNumber>;
|
|
2939
|
+
lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
|
|
2940
|
+
viewedAt: z.ZodOptional<z.ZodNumber>;
|
|
2941
|
+
}, "strip", z.ZodTypeAny, {
|
|
2942
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
2943
|
+
createdAt: number;
|
|
2944
|
+
messageId: string;
|
|
2945
|
+
fromAddress: string;
|
|
2946
|
+
toAddress: string;
|
|
2947
|
+
plaintextHash: string;
|
|
2948
|
+
direction: "received" | "sent";
|
|
2949
|
+
msgType: 1 | 3;
|
|
2950
|
+
proof?: string | undefined;
|
|
2951
|
+
receivedAt?: number | undefined;
|
|
2952
|
+
serverTimestamp?: number | undefined;
|
|
2953
|
+
plaintext?: string | undefined;
|
|
2954
|
+
guardAddress?: string | undefined;
|
|
2955
|
+
passportAddress?: string | undefined;
|
|
2956
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
2957
|
+
leafIndex?: number | undefined;
|
|
2958
|
+
prevRoot?: string | undefined;
|
|
2959
|
+
newRoot?: string | undefined;
|
|
2960
|
+
serverSignature?: string | undefined;
|
|
2961
|
+
serverPublicKey?: string | undefined;
|
|
2962
|
+
arkConfirmed?: {
|
|
2963
|
+
signature: string;
|
|
2964
|
+
recipient: string;
|
|
2965
|
+
recipientPublicKey: string;
|
|
2966
|
+
timestamp: number;
|
|
2967
|
+
} | undefined;
|
|
2968
|
+
zipMetadata?: {
|
|
2969
|
+
fileName: string;
|
|
2970
|
+
fileSize: number;
|
|
2971
|
+
fileHash: string;
|
|
2972
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
2973
|
+
localCachePath?: string | undefined;
|
|
2974
|
+
downloadedAt?: number | undefined;
|
|
2975
|
+
} | undefined;
|
|
2976
|
+
decryptError?: string | undefined;
|
|
2977
|
+
decryptAttempts?: number | undefined;
|
|
2978
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
2979
|
+
viewedAt?: number | undefined;
|
|
2980
|
+
}, {
|
|
2981
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
2982
|
+
createdAt: number;
|
|
2983
|
+
messageId: string;
|
|
2984
|
+
fromAddress: string;
|
|
2985
|
+
toAddress: string;
|
|
2986
|
+
plaintextHash: string;
|
|
2987
|
+
direction: "received" | "sent";
|
|
2988
|
+
msgType: 1 | 3;
|
|
2989
|
+
proof?: string | undefined;
|
|
2990
|
+
receivedAt?: number | undefined;
|
|
2991
|
+
serverTimestamp?: number | undefined;
|
|
2992
|
+
plaintext?: string | undefined;
|
|
2993
|
+
guardAddress?: string | undefined;
|
|
2994
|
+
passportAddress?: string | undefined;
|
|
2995
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
2996
|
+
leafIndex?: number | undefined;
|
|
2997
|
+
prevRoot?: string | undefined;
|
|
2998
|
+
newRoot?: string | undefined;
|
|
2999
|
+
serverSignature?: string | undefined;
|
|
3000
|
+
serverPublicKey?: string | undefined;
|
|
3001
|
+
arkConfirmed?: {
|
|
3002
|
+
signature: string;
|
|
3003
|
+
recipient: string;
|
|
3004
|
+
recipientPublicKey: string;
|
|
3005
|
+
timestamp: number;
|
|
3006
|
+
} | undefined;
|
|
3007
|
+
zipMetadata?: {
|
|
3008
|
+
fileName: string;
|
|
3009
|
+
fileSize: number;
|
|
3010
|
+
fileHash: string;
|
|
3011
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
3012
|
+
localCachePath?: string | undefined;
|
|
3013
|
+
downloadedAt?: number | undefined;
|
|
3014
|
+
} | undefined;
|
|
3015
|
+
decryptError?: string | undefined;
|
|
3016
|
+
decryptAttempts?: number | undefined;
|
|
3017
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
3018
|
+
viewedAt?: number | undefined;
|
|
3019
|
+
}>, "many">>;
|
|
2504
3020
|
}, "strip", z.ZodTypeAny, {
|
|
2505
3021
|
peerAddress: string;
|
|
2506
3022
|
lastMessageAt: number;
|
|
2507
3023
|
messageCount: number;
|
|
2508
3024
|
unreadCount: number;
|
|
2509
3025
|
lastMessagePreview?: string | undefined;
|
|
3026
|
+
previewMessages?: {
|
|
3027
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
3028
|
+
createdAt: number;
|
|
3029
|
+
messageId: string;
|
|
3030
|
+
fromAddress: string;
|
|
3031
|
+
toAddress: string;
|
|
3032
|
+
plaintextHash: string;
|
|
3033
|
+
direction: "received" | "sent";
|
|
3034
|
+
msgType: 1 | 3;
|
|
3035
|
+
proof?: string | undefined;
|
|
3036
|
+
receivedAt?: number | undefined;
|
|
3037
|
+
serverTimestamp?: number | undefined;
|
|
3038
|
+
plaintext?: string | undefined;
|
|
3039
|
+
guardAddress?: string | undefined;
|
|
3040
|
+
passportAddress?: string | undefined;
|
|
3041
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
3042
|
+
leafIndex?: number | undefined;
|
|
3043
|
+
prevRoot?: string | undefined;
|
|
3044
|
+
newRoot?: string | undefined;
|
|
3045
|
+
serverSignature?: string | undefined;
|
|
3046
|
+
serverPublicKey?: string | undefined;
|
|
3047
|
+
arkConfirmed?: {
|
|
3048
|
+
signature: string;
|
|
3049
|
+
recipient: string;
|
|
3050
|
+
recipientPublicKey: string;
|
|
3051
|
+
timestamp: number;
|
|
3052
|
+
} | undefined;
|
|
3053
|
+
zipMetadata?: {
|
|
3054
|
+
fileName: string;
|
|
3055
|
+
fileSize: number;
|
|
3056
|
+
fileHash: string;
|
|
3057
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
3058
|
+
localCachePath?: string | undefined;
|
|
3059
|
+
downloadedAt?: number | undefined;
|
|
3060
|
+
} | undefined;
|
|
3061
|
+
decryptError?: string | undefined;
|
|
3062
|
+
decryptAttempts?: number | undefined;
|
|
3063
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
3064
|
+
viewedAt?: number | undefined;
|
|
3065
|
+
}[] | undefined;
|
|
2510
3066
|
}, {
|
|
2511
3067
|
peerAddress: string;
|
|
2512
3068
|
lastMessageAt: number;
|
|
2513
3069
|
messageCount: number;
|
|
2514
3070
|
unreadCount: number;
|
|
2515
3071
|
lastMessagePreview?: string | undefined;
|
|
3072
|
+
previewMessages?: {
|
|
3073
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
3074
|
+
createdAt: number;
|
|
3075
|
+
messageId: string;
|
|
3076
|
+
fromAddress: string;
|
|
3077
|
+
toAddress: string;
|
|
3078
|
+
plaintextHash: string;
|
|
3079
|
+
direction: "received" | "sent";
|
|
3080
|
+
msgType: 1 | 3;
|
|
3081
|
+
proof?: string | undefined;
|
|
3082
|
+
receivedAt?: number | undefined;
|
|
3083
|
+
serverTimestamp?: number | undefined;
|
|
3084
|
+
plaintext?: string | undefined;
|
|
3085
|
+
guardAddress?: string | undefined;
|
|
3086
|
+
passportAddress?: string | undefined;
|
|
3087
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
3088
|
+
leafIndex?: number | undefined;
|
|
3089
|
+
prevRoot?: string | undefined;
|
|
3090
|
+
newRoot?: string | undefined;
|
|
3091
|
+
serverSignature?: string | undefined;
|
|
3092
|
+
serverPublicKey?: string | undefined;
|
|
3093
|
+
arkConfirmed?: {
|
|
3094
|
+
signature: string;
|
|
3095
|
+
recipient: string;
|
|
3096
|
+
recipientPublicKey: string;
|
|
3097
|
+
timestamp: number;
|
|
3098
|
+
} | undefined;
|
|
3099
|
+
zipMetadata?: {
|
|
3100
|
+
fileName: string;
|
|
3101
|
+
fileSize: number;
|
|
3102
|
+
fileHash: string;
|
|
3103
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
3104
|
+
localCachePath?: string | undefined;
|
|
3105
|
+
downloadedAt?: number | undefined;
|
|
3106
|
+
} | undefined;
|
|
3107
|
+
decryptError?: string | undefined;
|
|
3108
|
+
decryptAttempts?: number | undefined;
|
|
3109
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
3110
|
+
viewedAt?: number | undefined;
|
|
3111
|
+
}[] | undefined;
|
|
2516
3112
|
}>, "many">;
|
|
2517
3113
|
}, "strip", z.ZodTypeAny, {
|
|
2518
3114
|
result: {
|
|
@@ -2521,6 +3117,46 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2521
3117
|
messageCount: number;
|
|
2522
3118
|
unreadCount: number;
|
|
2523
3119
|
lastMessagePreview?: string | undefined;
|
|
3120
|
+
previewMessages?: {
|
|
3121
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
3122
|
+
createdAt: number;
|
|
3123
|
+
messageId: string;
|
|
3124
|
+
fromAddress: string;
|
|
3125
|
+
toAddress: string;
|
|
3126
|
+
plaintextHash: string;
|
|
3127
|
+
direction: "received" | "sent";
|
|
3128
|
+
msgType: 1 | 3;
|
|
3129
|
+
proof?: string | undefined;
|
|
3130
|
+
receivedAt?: number | undefined;
|
|
3131
|
+
serverTimestamp?: number | undefined;
|
|
3132
|
+
plaintext?: string | undefined;
|
|
3133
|
+
guardAddress?: string | undefined;
|
|
3134
|
+
passportAddress?: string | undefined;
|
|
3135
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
3136
|
+
leafIndex?: number | undefined;
|
|
3137
|
+
prevRoot?: string | undefined;
|
|
3138
|
+
newRoot?: string | undefined;
|
|
3139
|
+
serverSignature?: string | undefined;
|
|
3140
|
+
serverPublicKey?: string | undefined;
|
|
3141
|
+
arkConfirmed?: {
|
|
3142
|
+
signature: string;
|
|
3143
|
+
recipient: string;
|
|
3144
|
+
recipientPublicKey: string;
|
|
3145
|
+
timestamp: number;
|
|
3146
|
+
} | undefined;
|
|
3147
|
+
zipMetadata?: {
|
|
3148
|
+
fileName: string;
|
|
3149
|
+
fileSize: number;
|
|
3150
|
+
fileHash: string;
|
|
3151
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
3152
|
+
localCachePath?: string | undefined;
|
|
3153
|
+
downloadedAt?: number | undefined;
|
|
3154
|
+
} | undefined;
|
|
3155
|
+
decryptError?: string | undefined;
|
|
3156
|
+
decryptAttempts?: number | undefined;
|
|
3157
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
3158
|
+
viewedAt?: number | undefined;
|
|
3159
|
+
}[] | undefined;
|
|
2524
3160
|
}[];
|
|
2525
3161
|
operation: "watch_conversations";
|
|
2526
3162
|
}, {
|
|
@@ -2530,6 +3166,46 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2530
3166
|
messageCount: number;
|
|
2531
3167
|
unreadCount: number;
|
|
2532
3168
|
lastMessagePreview?: string | undefined;
|
|
3169
|
+
previewMessages?: {
|
|
3170
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
3171
|
+
createdAt: number;
|
|
3172
|
+
messageId: string;
|
|
3173
|
+
fromAddress: string;
|
|
3174
|
+
toAddress: string;
|
|
3175
|
+
plaintextHash: string;
|
|
3176
|
+
direction: "received" | "sent";
|
|
3177
|
+
msgType: 1 | 3;
|
|
3178
|
+
proof?: string | undefined;
|
|
3179
|
+
receivedAt?: number | undefined;
|
|
3180
|
+
serverTimestamp?: number | undefined;
|
|
3181
|
+
plaintext?: string | undefined;
|
|
3182
|
+
guardAddress?: string | undefined;
|
|
3183
|
+
passportAddress?: string | undefined;
|
|
3184
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
3185
|
+
leafIndex?: number | undefined;
|
|
3186
|
+
prevRoot?: string | undefined;
|
|
3187
|
+
newRoot?: string | undefined;
|
|
3188
|
+
serverSignature?: string | undefined;
|
|
3189
|
+
serverPublicKey?: string | undefined;
|
|
3190
|
+
arkConfirmed?: {
|
|
3191
|
+
signature: string;
|
|
3192
|
+
recipient: string;
|
|
3193
|
+
recipientPublicKey: string;
|
|
3194
|
+
timestamp: number;
|
|
3195
|
+
} | undefined;
|
|
3196
|
+
zipMetadata?: {
|
|
3197
|
+
fileName: string;
|
|
3198
|
+
fileSize: number;
|
|
3199
|
+
fileHash: string;
|
|
3200
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
3201
|
+
localCachePath?: string | undefined;
|
|
3202
|
+
downloadedAt?: number | undefined;
|
|
3203
|
+
} | undefined;
|
|
3204
|
+
decryptError?: string | undefined;
|
|
3205
|
+
decryptAttempts?: number | undefined;
|
|
3206
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
3207
|
+
viewedAt?: number | undefined;
|
|
3208
|
+
}[] | undefined;
|
|
2533
3209
|
}[];
|
|
2534
3210
|
operation: "watch_conversations";
|
|
2535
3211
|
}>, z.ZodObject<{
|
|
@@ -2772,6 +3448,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2772
3448
|
decryptError: z.ZodOptional<z.ZodString>;
|
|
2773
3449
|
decryptAttempts: z.ZodOptional<z.ZodNumber>;
|
|
2774
3450
|
lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
|
|
3451
|
+
viewedAt: z.ZodOptional<z.ZodNumber>;
|
|
2775
3452
|
}, "strip", z.ZodTypeAny, {
|
|
2776
3453
|
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
2777
3454
|
createdAt: number;
|
|
@@ -2810,6 +3487,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2810
3487
|
decryptError?: string | undefined;
|
|
2811
3488
|
decryptAttempts?: number | undefined;
|
|
2812
3489
|
lastDecryptAttemptAt?: number | undefined;
|
|
3490
|
+
viewedAt?: number | undefined;
|
|
2813
3491
|
}, {
|
|
2814
3492
|
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
2815
3493
|
createdAt: number;
|
|
@@ -2848,6 +3526,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2848
3526
|
decryptError?: string | undefined;
|
|
2849
3527
|
decryptAttempts?: number | undefined;
|
|
2850
3528
|
lastDecryptAttemptAt?: number | undefined;
|
|
3529
|
+
viewedAt?: number | undefined;
|
|
2851
3530
|
}>, "many">;
|
|
2852
3531
|
}, "strip", z.ZodTypeAny, {
|
|
2853
3532
|
result: {
|
|
@@ -2888,6 +3567,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2888
3567
|
decryptError?: string | undefined;
|
|
2889
3568
|
decryptAttempts?: number | undefined;
|
|
2890
3569
|
lastDecryptAttemptAt?: number | undefined;
|
|
3570
|
+
viewedAt?: number | undefined;
|
|
2891
3571
|
}[];
|
|
2892
3572
|
operation: "watch_messages";
|
|
2893
3573
|
}, {
|
|
@@ -2929,6 +3609,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
2929
3609
|
decryptError?: string | undefined;
|
|
2930
3610
|
decryptAttempts?: number | undefined;
|
|
2931
3611
|
lastDecryptAttemptAt?: number | undefined;
|
|
3612
|
+
viewedAt?: number | undefined;
|
|
2932
3613
|
}[];
|
|
2933
3614
|
operation: "watch_messages";
|
|
2934
3615
|
}>, z.ZodObject<{
|
|
@@ -3468,6 +4149,24 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3468
4149
|
};
|
|
3469
4150
|
op: "set" | "get";
|
|
3470
4151
|
operation: "settings";
|
|
4152
|
+
}>, z.ZodObject<{
|
|
4153
|
+
operation: z.ZodLiteral<"mark_messages_as_viewed">;
|
|
4154
|
+
result: z.ZodNumber;
|
|
4155
|
+
}, "strip", z.ZodTypeAny, {
|
|
4156
|
+
result: number;
|
|
4157
|
+
operation: "mark_messages_as_viewed";
|
|
4158
|
+
}, {
|
|
4159
|
+
result: number;
|
|
4160
|
+
operation: "mark_messages_as_viewed";
|
|
4161
|
+
}>, z.ZodObject<{
|
|
4162
|
+
operation: z.ZodLiteral<"mark_conversation_as_viewed">;
|
|
4163
|
+
result: z.ZodNumber;
|
|
4164
|
+
}, "strip", z.ZodTypeAny, {
|
|
4165
|
+
result: number;
|
|
4166
|
+
operation: "mark_conversation_as_viewed";
|
|
4167
|
+
}, {
|
|
4168
|
+
result: number;
|
|
4169
|
+
operation: "mark_conversation_as_viewed";
|
|
3471
4170
|
}>]>;
|
|
3472
4171
|
}, "strip", z.ZodTypeAny, {
|
|
3473
4172
|
result: {
|
|
@@ -3477,6 +4176,46 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3477
4176
|
messageCount: number;
|
|
3478
4177
|
unreadCount: number;
|
|
3479
4178
|
lastMessagePreview?: string | undefined;
|
|
4179
|
+
previewMessages?: {
|
|
4180
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
4181
|
+
createdAt: number;
|
|
4182
|
+
messageId: string;
|
|
4183
|
+
fromAddress: string;
|
|
4184
|
+
toAddress: string;
|
|
4185
|
+
plaintextHash: string;
|
|
4186
|
+
direction: "received" | "sent";
|
|
4187
|
+
msgType: 1 | 3;
|
|
4188
|
+
proof?: string | undefined;
|
|
4189
|
+
receivedAt?: number | undefined;
|
|
4190
|
+
serverTimestamp?: number | undefined;
|
|
4191
|
+
plaintext?: string | undefined;
|
|
4192
|
+
guardAddress?: string | undefined;
|
|
4193
|
+
passportAddress?: string | undefined;
|
|
4194
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
4195
|
+
leafIndex?: number | undefined;
|
|
4196
|
+
prevRoot?: string | undefined;
|
|
4197
|
+
newRoot?: string | undefined;
|
|
4198
|
+
serverSignature?: string | undefined;
|
|
4199
|
+
serverPublicKey?: string | undefined;
|
|
4200
|
+
arkConfirmed?: {
|
|
4201
|
+
signature: string;
|
|
4202
|
+
recipient: string;
|
|
4203
|
+
recipientPublicKey: string;
|
|
4204
|
+
timestamp: number;
|
|
4205
|
+
} | undefined;
|
|
4206
|
+
zipMetadata?: {
|
|
4207
|
+
fileName: string;
|
|
4208
|
+
fileSize: number;
|
|
4209
|
+
fileHash: string;
|
|
4210
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
4211
|
+
localCachePath?: string | undefined;
|
|
4212
|
+
downloadedAt?: number | undefined;
|
|
4213
|
+
} | undefined;
|
|
4214
|
+
decryptError?: string | undefined;
|
|
4215
|
+
decryptAttempts?: number | undefined;
|
|
4216
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
4217
|
+
viewedAt?: number | undefined;
|
|
4218
|
+
}[] | undefined;
|
|
3480
4219
|
}[];
|
|
3481
4220
|
operation: "watch_conversations";
|
|
3482
4221
|
} | {
|
|
@@ -3550,6 +4289,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3550
4289
|
decryptError?: string | undefined;
|
|
3551
4290
|
decryptAttempts?: number | undefined;
|
|
3552
4291
|
lastDecryptAttemptAt?: number | undefined;
|
|
4292
|
+
viewedAt?: number | undefined;
|
|
3553
4293
|
}[];
|
|
3554
4294
|
operation: "watch_messages";
|
|
3555
4295
|
} | {
|
|
@@ -3663,6 +4403,12 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3663
4403
|
};
|
|
3664
4404
|
op: "set" | "get";
|
|
3665
4405
|
operation: "settings";
|
|
4406
|
+
} | {
|
|
4407
|
+
result: number;
|
|
4408
|
+
operation: "mark_messages_as_viewed";
|
|
4409
|
+
} | {
|
|
4410
|
+
result: number;
|
|
4411
|
+
operation: "mark_conversation_as_viewed";
|
|
3666
4412
|
};
|
|
3667
4413
|
}, {
|
|
3668
4414
|
result: {
|
|
@@ -3672,6 +4418,46 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3672
4418
|
messageCount: number;
|
|
3673
4419
|
unreadCount: number;
|
|
3674
4420
|
lastMessagePreview?: string | undefined;
|
|
4421
|
+
previewMessages?: {
|
|
4422
|
+
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
4423
|
+
createdAt: number;
|
|
4424
|
+
messageId: string;
|
|
4425
|
+
fromAddress: string;
|
|
4426
|
+
toAddress: string;
|
|
4427
|
+
plaintextHash: string;
|
|
4428
|
+
direction: "received" | "sent";
|
|
4429
|
+
msgType: 1 | 3;
|
|
4430
|
+
proof?: string | undefined;
|
|
4431
|
+
receivedAt?: number | undefined;
|
|
4432
|
+
serverTimestamp?: number | undefined;
|
|
4433
|
+
plaintext?: string | undefined;
|
|
4434
|
+
guardAddress?: string | undefined;
|
|
4435
|
+
passportAddress?: string | undefined;
|
|
4436
|
+
lastReceivedLeafIndex?: number | undefined;
|
|
4437
|
+
leafIndex?: number | undefined;
|
|
4438
|
+
prevRoot?: string | undefined;
|
|
4439
|
+
newRoot?: string | undefined;
|
|
4440
|
+
serverSignature?: string | undefined;
|
|
4441
|
+
serverPublicKey?: string | undefined;
|
|
4442
|
+
arkConfirmed?: {
|
|
4443
|
+
signature: string;
|
|
4444
|
+
recipient: string;
|
|
4445
|
+
recipientPublicKey: string;
|
|
4446
|
+
timestamp: number;
|
|
4447
|
+
} | undefined;
|
|
4448
|
+
zipMetadata?: {
|
|
4449
|
+
fileName: string;
|
|
4450
|
+
fileSize: number;
|
|
4451
|
+
fileHash: string;
|
|
4452
|
+
contentType: "text" | "wip" | "zip" | "wts";
|
|
4453
|
+
localCachePath?: string | undefined;
|
|
4454
|
+
downloadedAt?: number | undefined;
|
|
4455
|
+
} | undefined;
|
|
4456
|
+
decryptError?: string | undefined;
|
|
4457
|
+
decryptAttempts?: number | undefined;
|
|
4458
|
+
lastDecryptAttemptAt?: number | undefined;
|
|
4459
|
+
viewedAt?: number | undefined;
|
|
4460
|
+
}[] | undefined;
|
|
3675
4461
|
}[];
|
|
3676
4462
|
operation: "watch_conversations";
|
|
3677
4463
|
} | {
|
|
@@ -3745,6 +4531,7 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3745
4531
|
decryptError?: string | undefined;
|
|
3746
4532
|
decryptAttempts?: number | undefined;
|
|
3747
4533
|
lastDecryptAttemptAt?: number | undefined;
|
|
4534
|
+
viewedAt?: number | undefined;
|
|
3748
4535
|
}[];
|
|
3749
4536
|
operation: "watch_messages";
|
|
3750
4537
|
} | {
|
|
@@ -3858,6 +4645,12 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3858
4645
|
};
|
|
3859
4646
|
op: "set" | "get";
|
|
3860
4647
|
operation: "settings";
|
|
4648
|
+
} | {
|
|
4649
|
+
result: number;
|
|
4650
|
+
operation: "mark_messages_as_viewed";
|
|
4651
|
+
} | {
|
|
4652
|
+
result: number;
|
|
4653
|
+
operation: "mark_conversation_as_viewed";
|
|
3861
4654
|
};
|
|
3862
4655
|
}>;
|
|
3863
4656
|
export type MessengerOperationInput = z.infer<typeof MessengerOperationInputSchema>;
|
|
@@ -52,15 +52,29 @@ export const MessageSchema = z.object({
|
|
|
52
52
|
decryptError: z.string().optional().describe("Decryption failure reason"),
|
|
53
53
|
decryptAttempts: z.number().optional().describe("Number of decryption attempts"),
|
|
54
54
|
lastDecryptAttemptAt: z.number().optional().describe("Last decryption attempt timestamp"),
|
|
55
|
+
// Viewed status field
|
|
56
|
+
viewedAt: z.number().optional().describe("Timestamp when the current user viewed this message (local storage). If present, indicates the message has been viewed by the user. Only applicable to received messages (direction === 'received')"),
|
|
55
57
|
}).describe("Message object");
|
|
56
58
|
// ConversationInfo
|
|
57
59
|
export const ConversationInfoSchema = z.object({
|
|
58
60
|
peerAddress: z.string().describe("Peer address"),
|
|
59
61
|
lastMessageAt: z.number().describe("Last message time"),
|
|
60
62
|
messageCount: z.number().describe("Total message count"),
|
|
61
|
-
unreadCount: z.number().describe("Unread message count"),
|
|
62
|
-
lastMessagePreview: z.string().optional().describe("Last message preview"),
|
|
63
|
-
|
|
63
|
+
unreadCount: z.number().describe("Unread message count - count of received messages that have not been viewed (viewedAt is undefined)"),
|
|
64
|
+
lastMessagePreview: z.string().optional().describe("Last message preview text"),
|
|
65
|
+
previewMessages: z.array(MessageSchema).optional().describe("Preview messages for this conversation (default 2 messages, sorted by time descending)"),
|
|
66
|
+
}).describe("Conversation info with unread count and preview messages");
|
|
67
|
+
// ConversationsFilter
|
|
68
|
+
export const ConversationsFilterSchema = z.object({
|
|
69
|
+
account: z.string().optional().describe("Account name or address to query conversations for. If not specified, uses default account"),
|
|
70
|
+
unreadOnly: z.boolean().optional().describe("If true, only return conversations with unread messages (unreadCount > 0). Useful for quickly finding conversations needing attention"),
|
|
71
|
+
startTime: z.number().optional().describe("Start timestamp (ms) for filtering conversations by lastMessageAt. Only returns conversations where lastMessageAt >= this value"),
|
|
72
|
+
endTime: z.number().optional().describe("End timestamp (ms) for filtering conversations by lastMessageAt. Only returns conversations where lastMessageAt <= this value"),
|
|
73
|
+
previewMessageCount: z.number().optional().describe("Number of preview messages to include for each conversation (default: 2). Set to 0 to disable preview messages. If > 0, preview messages are automatically included"),
|
|
74
|
+
sortBy: z.enum(["lastMessageAt", "unreadCount", "messageCount"]).optional().describe("Sort conversations by: 'lastMessageAt' = most recent activity first, 'unreadCount' = most unread messages first, 'messageCount' = most total messages first"),
|
|
75
|
+
sortOrder: z.enum(["asc", "desc"]).optional().describe("Sort order: 'asc' = ascending (oldest/smallest first), 'desc' = descending (newest/largest first). Default is 'desc' for time-based sorting"),
|
|
76
|
+
skipAutoMarkViewed: z.boolean().optional().describe("If true, preview messages will NOT be automatically marked as viewed when retrieved. Default is false, meaning preview messages are auto-marked as viewed"),
|
|
77
|
+
}).describe("Conversations filter options - use unreadOnly to quickly find active conversations, and previewMessageCount to control how many recent messages are included");
|
|
64
78
|
// MessageFilter
|
|
65
79
|
export const MessageFilterSchema = z.object({
|
|
66
80
|
/** Filter by account (specify which account to query) */
|
|
@@ -92,13 +106,18 @@ export const MessageFilterSchema = z.object({
|
|
|
92
106
|
hasLastReceivedIndexOnly: z.boolean().optional().describe("Only return messages with lastReceivedLeafIndex"),
|
|
93
107
|
lastReceivedIndexMin: z.number().optional().describe("Min lastReceivedLeafIndex"),
|
|
94
108
|
lastReceivedIndexMax: z.number().optional().describe("Max lastReceivedLeafIndex"),
|
|
95
|
-
listFilterMode: z.enum(["friends", "guard", "stranger", "any"]).optional().describe("List filter mode"),
|
|
109
|
+
listFilterMode: z.enum(["friends", "guard", "stranger", "any"]).optional().describe("List filter mode: 'friends' = only messages from friends list, 'guard' = only messages from Guard list, 'stranger' = only messages from strangers (not in friends/guard lists), 'any' = no filtering (default)"),
|
|
96
110
|
customListFilter: z.object({
|
|
97
|
-
includeAddresses: z.array(z.string()).optional().describe("Include addresses"),
|
|
98
|
-
excludeAddresses: z.array(z.string()).optional().describe("Exclude addresses"),
|
|
99
|
-
relation: z.enum(["union", "intersection"]).optional().describe("Address list relation"),
|
|
100
|
-
}).optional().describe("Custom list filter"),
|
|
101
|
-
|
|
111
|
+
includeAddresses: z.array(z.string()).optional().describe("Include addresses - only return messages from these addresses (highest priority)"),
|
|
112
|
+
excludeAddresses: z.array(z.string()).optional().describe("Exclude addresses - exclude messages from these addresses"),
|
|
113
|
+
relation: z.enum(["union", "intersection"]).optional().describe("Address list relation: 'union' = combine lists as union, 'intersection' = combine lists as intersection"),
|
|
114
|
+
}).optional().describe("Custom list filter for advanced address-based filtering, works in combination with listFilterMode"),
|
|
115
|
+
// ========== Viewed status filtering ==========
|
|
116
|
+
viewed: z.boolean().optional().describe("Filter by viewed status: true = only viewed messages, false = only unviewed messages. A message is considered 'viewed' if viewedAt field exists. Only applicable to received messages"),
|
|
117
|
+
viewedAtStart: z.number().optional().describe("Filter by viewed timestamp start (inclusive). Only returns messages where viewedAt >= this value. Useful for finding recently viewed messages"),
|
|
118
|
+
viewedAtEnd: z.number().optional().describe("Filter by viewed timestamp end (inclusive). Only returns messages where viewedAt <= this value. Useful for finding messages viewed before a certain time"),
|
|
119
|
+
skipAutoMarkViewed: z.boolean().optional().describe("If true, messages returned by this query will NOT be automatically marked as viewed. Default is false, meaning messages are auto-marked as viewed when retrieved through watch_messages"),
|
|
120
|
+
}).describe("Message filter options - all conditions are optional and combined with AND logic. Use viewed field to filter by read/unread status, and viewedAtStart/viewedAtEnd to filter by when messages were viewed");
|
|
102
121
|
// SendMessageOptions
|
|
103
122
|
export const SendMessageOptionsSchema = z.object({
|
|
104
123
|
guardAddress: NameOrAddressSchema.optional().describe("Guard address"),
|
|
@@ -299,7 +318,7 @@ export const GetSettingsResponseSchema = z.object({
|
|
|
299
318
|
export const MessengerOperationInputSchema = z.discriminatedUnion("operation", [
|
|
300
319
|
z.object({
|
|
301
320
|
operation: z.literal("watch_conversations"),
|
|
302
|
-
|
|
321
|
+
filter: ConversationsFilterSchema.optional().describe("Conversations filter options - use unreadOnly to find conversations with unread messages, previewMessageCount to control message previews (default 2), and sortBy/sortOrder to customize sorting"),
|
|
303
322
|
}),
|
|
304
323
|
z.object({
|
|
305
324
|
operation: z.literal("send_message"),
|
|
@@ -370,6 +389,16 @@ export const MessengerOperationInputSchema = z.discriminatedUnion("operation", [
|
|
|
370
389
|
account: NameOrAddressSchema.optional().describe("Account name or address. If not specified, uses default account"),
|
|
371
390
|
settings: SettingsOperationSchema.describe("Settings management operation"),
|
|
372
391
|
}),
|
|
392
|
+
z.object({
|
|
393
|
+
operation: z.literal("mark_messages_as_viewed"),
|
|
394
|
+
account: NameOrAddressSchema.optional().describe("Account name or address. If not specified, uses default account"),
|
|
395
|
+
messageIds: z.array(z.string()).min(1).max(1000).describe("Array of message IDs to mark as viewed (1-1000 messages). Only messages belonging to this account will be marked"),
|
|
396
|
+
}),
|
|
397
|
+
z.object({
|
|
398
|
+
operation: z.literal("mark_conversation_as_viewed"),
|
|
399
|
+
account: NameOrAddressSchema.optional().describe("Account name or address. If not specified, uses default account"),
|
|
400
|
+
peerAddress: AccountOrMark_AddressAISchema.describe("Peer address or account name - can be a string (name/address) or full object. All unviewed received messages from this peer will be marked as viewed"),
|
|
401
|
+
}),
|
|
373
402
|
]).describe("Messenger operation input schema");
|
|
374
403
|
// ============================================================
|
|
375
404
|
// Output Schema (Discriminated Union by "operation")
|
|
@@ -438,5 +467,13 @@ export const MessengerOperationOutputSchema = z.object({
|
|
|
438
467
|
op: z.enum(["get", "set"]).describe("Operation type"),
|
|
439
468
|
result: z.union([GetSettingsResponseSchema, z.boolean()]).describe("Settings operation result - GetSettingsResponse for 'get' operation, boolean for 'set' operation"),
|
|
440
469
|
}),
|
|
470
|
+
z.object({
|
|
471
|
+
operation: z.literal("mark_messages_as_viewed"),
|
|
472
|
+
result: z.number().describe("Number of messages successfully marked as viewed. Only messages that were previously unviewed are counted"),
|
|
473
|
+
}),
|
|
474
|
+
z.object({
|
|
475
|
+
operation: z.literal("mark_conversation_as_viewed"),
|
|
476
|
+
result: z.number().describe("Number of messages successfully marked as viewed in the conversation. Only received messages that were previously unviewed are counted"),
|
|
477
|
+
}),
|
|
441
478
|
]).describe("Messenger operation result discriminated union"),
|
|
442
479
|
}).describe("Messenger operation output schema");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wowok_agent",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.35",
|
|
4
4
|
"description": "Making It Easy for Agents to Communicate, Collaborate, Trade, and Trust.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
32
32
|
"lodash": "^4.18.1",
|
|
33
|
-
"wowok": "2.1.
|
|
33
|
+
"wowok": "2.1.34",
|
|
34
34
|
"zod": "^3.25.76"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|