@openvtc/trust-tasks 0.2.5 → 0.2.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
-
* Source: specs/chat/message/1
|
|
3
|
+
* Source: specs/chat/message/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -23,6 +23,10 @@ export interface ChatMessagePayload {
|
|
|
23
23
|
* OPTIONAL. Plain-text body. Absent for attachment-only messages.
|
|
24
24
|
*/
|
|
25
25
|
text?: string;
|
|
26
|
+
/**
|
|
27
|
+
* OPTIONAL. @-mentions carried by the message, ordered to match the U+FFFC sentinel placeholders in `text`: the Nth U+FFFC binds to the Nth entry. Absent/empty when the message mentions no one. The producer is responsible for emitting one U+FFFC sentinel per mention, in order — translating each platform's native mention encoding into this neutral form.
|
|
28
|
+
*/
|
|
29
|
+
mentions?: Mention[];
|
|
26
30
|
/**
|
|
27
31
|
* OPTIONAL. Attachments carried by reference, never inline.
|
|
28
32
|
*/
|
|
@@ -38,6 +42,24 @@ export interface ChatMessagePayload {
|
|
|
38
42
|
sentAt: string;
|
|
39
43
|
ext?: Ext;
|
|
40
44
|
}
|
|
45
|
+
export interface Mention {
|
|
46
|
+
/**
|
|
47
|
+
* Opaque, bridge-issued handle for the mentioned participant. MUST NOT be a raw platform address; like `conversationId` it carries no platform-native identifier (phone number, UUID, member id) upstream.
|
|
48
|
+
*/
|
|
49
|
+
participant: string;
|
|
50
|
+
/**
|
|
51
|
+
* OPTIONAL. Human-readable name the source platform supplied for the participant. A non-authoritative rendering hint — never used for identity. Absent when the platform exposes no name in the mention.
|
|
52
|
+
*/
|
|
53
|
+
displayName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Source-platform native start offset of the sentinel span in `text`. Advisory: offset units differ across platforms, so the authoritative binding is positional (Nth U+FFFC → Nth mention), not by offset.
|
|
56
|
+
*/
|
|
57
|
+
start: number;
|
|
58
|
+
/**
|
|
59
|
+
* Source-platform native length of the sentinel span in `text`. Advisory; see `start`.
|
|
60
|
+
*/
|
|
61
|
+
length: number;
|
|
62
|
+
}
|
|
41
63
|
export interface AttachmentRef {
|
|
42
64
|
/**
|
|
43
65
|
* Opaque attachment id, resolvable via the bridge's attachment fetch.
|
|
@@ -81,7 +103,7 @@ export interface Ext {
|
|
|
81
103
|
}
|
|
82
104
|
|
|
83
105
|
/** Trust Task type URI. */
|
|
84
|
-
export const TYPE_URI = "https://trusttasks.org/spec/chat/message/1
|
|
106
|
+
export const TYPE_URI = "https://trusttasks.org/spec/chat/message/0.1" as const;
|
|
85
107
|
|
|
86
108
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
87
|
-
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/chat/message/1
|
|
109
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/chat/message/0.1#response" as const;
|
package/src/index.ts
CHANGED
|
@@ -31,7 +31,7 @@ export * as AuthStepUpApproveResponse_v0_2 from "./auth/step-up/approve-response
|
|
|
31
31
|
export * as AuthStepUpPolicy_v0_1 from "./auth/step-up/policy/0.1/payload";
|
|
32
32
|
export * as AuthStepUpPolicy_v0_2 from "./auth/step-up/policy/0.2/payload";
|
|
33
33
|
export * as AuthWhoami_v0_1 from "./auth/whoami/0.1/payload";
|
|
34
|
-
export * as
|
|
34
|
+
export * as ChatMessage_v0_1 from "./chat/message/0.1/payload";
|
|
35
35
|
export * as ConfirmRequest_v0_1 from "./confirm/request/0.1/payload";
|
|
36
36
|
export * as ConfirmResponse_v0_1 from "./confirm/response/0.1/payload";
|
|
37
37
|
export * as ConsentShared_v0_1 from "./consent/_shared/0.1/consent";
|