@ziggs-ai/api-client 0.34.0 → 0.34.1
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.
|
@@ -38,10 +38,14 @@ export function presentSendResult(result, env) {
|
|
|
38
38
|
// What counted it, in the server's words: a stranger's free messages with a
|
|
39
39
|
// listed agent run out, and the person writing needs to know before they do.
|
|
40
40
|
const counted = result.coverage?.message ? ` ${result.coverage.message}` : '';
|
|
41
|
+
const routing = delivery.reachable
|
|
42
|
+
? `Assigned to ${delivery.assignee ?? 'nobody'}; reachable: ${delivery.reachable}${delivery.reason ? ` (${delivery.reason})` : ''}.${delivery.lastRead ? ` Last inbox read: ${delivery.lastRead}.` : ''}`
|
|
43
|
+
: 'Mailbox routing is unconfirmed; a person may be covered by an assistant.';
|
|
41
44
|
return {
|
|
42
45
|
...base,
|
|
43
|
-
delivered: `Message ${result.messageId} was accepted into chat ${result.chatId}, addressed to ${destination}.
|
|
46
|
+
delivered: `Message ${result.messageId} was accepted into chat ${result.chatId}, addressed to ${destination}. ${routing} Accepted is not read and does not confirm a wake or reply.${counted}`,
|
|
44
47
|
to: delivery.to,
|
|
48
|
+
delivery,
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
51
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatReadDto } from '@ziggs-ai/contracts';
|
|
2
|
-
import type { MessageDelivery, SendChatMessageResult as WireSendChatMessageResult } from '@ziggs-ai/contracts';
|
|
2
|
+
import type { MessageDelivery as WireMessageDelivery, SendChatMessageResult as WireSendChatMessageResult } from '@ziggs-ai/contracts';
|
|
3
3
|
import { type Creds } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* One room from `GET /chats/mine`, as the server sends it.
|
|
@@ -85,7 +85,12 @@ export interface SendChatMessageInput {
|
|
|
85
85
|
* `wakesAgent` field that once rode along was removed for exactly that reason
|
|
86
86
|
* and is not coming back.
|
|
87
87
|
*/
|
|
88
|
-
export type
|
|
88
|
+
export type MessageDelivery = WireMessageDelivery & {
|
|
89
|
+
assignee?: string | null;
|
|
90
|
+
reachable?: 'yes' | 'no';
|
|
91
|
+
reason?: string;
|
|
92
|
+
lastRead?: string | null;
|
|
93
|
+
};
|
|
89
94
|
/**
|
|
90
95
|
* The send result as a caller here holds it.
|
|
91
96
|
*
|