@sylphx/sdk 0.32.5 → 0.32.7
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/broker.d.ts +61 -1
- package/dist/broker.js +33 -1
- package/dist/broker.js.map +1 -1
- package/dist/events.d.ts +538 -1
- package/dist/events.js +424 -2
- package/dist/events.js.map +1 -1
- package/dist/ids.d.ts +15 -0
- package/dist/ids.js +3 -0
- package/dist/ids.js.map +1 -1
- package/dist/methods.js +218 -2
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +92 -0
- package/dist/money.js +77 -0
- package/dist/money.js.map +1 -1
- package/dist/observability.d.ts +15 -2
- package/dist/observability.js +2 -0
- package/dist/observability.js.map +1 -1
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -13,6 +13,193 @@ export interface AckQueueMessagesResponse {
|
|
|
13
13
|
/** Leases that were stale and not applied. */
|
|
14
14
|
staleLeases?: MessageLease[];
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Record an Auth-verified link grant before merging; only the trusted backend
|
|
18
|
+
* may record the exact source/target/receipt binding. This does not link Auth accounts.
|
|
19
|
+
*/
|
|
20
|
+
export interface BindChatIdentityRequest {
|
|
21
|
+
/** Target platform Chat profile. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Title-scoped guest identity whose Auth link has been verified. */
|
|
24
|
+
sourceClientId?: string;
|
|
25
|
+
/** Immutable receipt from the verified Auth link. */
|
|
26
|
+
linkReceiptId?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Policy on the existing Realtime channel. Set at creation; Chat cannot be
|
|
30
|
+
* converted to an expiring generic channel. Only a trusted tenant backend with
|
|
31
|
+
* events:write/events:publish acts for its authenticated end users. Player
|
|
32
|
+
* sessions act only for their bound identity on the permitted Chat methods.
|
|
33
|
+
* No publishable key, supplied official badge or player verdict is trusted.
|
|
34
|
+
*/
|
|
35
|
+
export interface ChatChannelPolicy {
|
|
36
|
+
/** Purpose of the conversation. */
|
|
37
|
+
kind?: ChatChannelKind;
|
|
38
|
+
/** Code of conduct version every sending member must have accepted. */
|
|
39
|
+
termsVersion?: string;
|
|
40
|
+
/** Per-member sliding-minute message ceiling; default 30, maximum 600. */
|
|
41
|
+
messagesPerMinute?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Exact two participants for a DM or support; invited roster for groups.
|
|
44
|
+
* A player's empty group roster defaults to its creator. Backend-created
|
|
45
|
+
* groups with an empty roster admit authenticated players through join.
|
|
46
|
+
*/
|
|
47
|
+
participantIds?: string[];
|
|
48
|
+
/** Optional originating title for world/room/guild/support. Empty is cross-title. */
|
|
49
|
+
titleId?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A content-hashed image; delivery requires an approved moderation receipt for
|
|
53
|
+
* this exact digest, URI and uploader. Uploading does not approve content.
|
|
54
|
+
*/
|
|
55
|
+
export interface ChatImage {
|
|
56
|
+
/** Existing storage or Artifacts URI; no image bytes are carried here. */
|
|
57
|
+
contentUri?: string;
|
|
58
|
+
/** Lowercase SHA-256, 64 hexadecimal characters. */
|
|
59
|
+
sha256?: string;
|
|
60
|
+
}
|
|
61
|
+
/** A single static, explicit location share to an existing mutual contact. */
|
|
62
|
+
export interface ChatLocation {
|
|
63
|
+
/** Degrees north, inclusive -90 to 90. */
|
|
64
|
+
latitude?: number;
|
|
65
|
+
/** Degrees east, inclusive -180 to 180. */
|
|
66
|
+
longitude?: number;
|
|
67
|
+
/** Optional venue label; never continuous or background location. */
|
|
68
|
+
label?: string;
|
|
69
|
+
}
|
|
70
|
+
/** Image moderation receipt; never image bytes. */
|
|
71
|
+
export interface ChatMediaReview {
|
|
72
|
+
/** SHA-256 digest. */
|
|
73
|
+
sha256?: string;
|
|
74
|
+
/** Exact URI. */
|
|
75
|
+
contentUri?: string;
|
|
76
|
+
/** Stable uploader identity. */
|
|
77
|
+
uploaderId?: string;
|
|
78
|
+
/** pending, approved or rejected. */
|
|
79
|
+
status?: string;
|
|
80
|
+
/** Visible pending/refusal reason, such as moderation_checking. */
|
|
81
|
+
reason?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Structured Chat payload; exactly one of text/image/location/poll/room_invite
|
|
85
|
+
* must be set. Replies and mentions refer to the same conversation.
|
|
86
|
+
*/
|
|
87
|
+
export interface ChatMessageContent {
|
|
88
|
+
/** UTF-8 text, at most 4000 characters. */
|
|
89
|
+
text?: string;
|
|
90
|
+
/** An image with a prior moderation approval. */
|
|
91
|
+
image?: ChatImage;
|
|
92
|
+
/** One explicit static location pin. */
|
|
93
|
+
location?: ChatLocation;
|
|
94
|
+
/** A member poll. */
|
|
95
|
+
poll?: ChatPoll;
|
|
96
|
+
/** Existing Realtime room resource name for a Join Game card. */
|
|
97
|
+
roomInvite?: string;
|
|
98
|
+
/** Optional cursor of the quoted message in this channel. */
|
|
99
|
+
replyToCursor?: string;
|
|
100
|
+
/** Member ids mentioned by this message. */
|
|
101
|
+
mentionedClientIds?: string[];
|
|
102
|
+
}
|
|
103
|
+
/** A poll in the conversation; votes are recorded once per member. */
|
|
104
|
+
export interface ChatPoll {
|
|
105
|
+
/** Question shown to members. */
|
|
106
|
+
question?: string;
|
|
107
|
+
/** Two to ten distinct choices. */
|
|
108
|
+
options?: string[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* One platform Chat identity in a canonical shared Chat environment. Titles
|
|
112
|
+
* bind this same environment and client_id for shared friends, blocks, DMs and
|
|
113
|
+
* groups. A title_id is metadata, never a second identity or data authority.
|
|
114
|
+
* Unlinked guests use title-scoped client ids until a verified Auth account link
|
|
115
|
+
* merges their identity into the shared platform principal.
|
|
116
|
+
* Principal IDs are path-safe [A-Za-z0-9_.-], 1..128 bytes. Example
|
|
117
|
+
* guest.title.123 before linking, platform.authority.456 after verified linking.
|
|
118
|
+
*/
|
|
119
|
+
export interface ChatProfile {
|
|
120
|
+
/** Resource name; the last segment is the stable authenticated client id. */
|
|
121
|
+
name?: string;
|
|
122
|
+
/** Stable service-derived identifier. */
|
|
123
|
+
readonly uid?: string;
|
|
124
|
+
/** Resource metadata. */
|
|
125
|
+
meta?: common.ResourceMeta;
|
|
126
|
+
/**
|
|
127
|
+
* Accepted code of conduct version, before first send; includes disclosure
|
|
128
|
+
* that images go to a third-party AI model provider through Sylphx AI Gateway.
|
|
129
|
+
*/
|
|
130
|
+
readonly termsVersion?: string;
|
|
131
|
+
/** User-visible name. */
|
|
132
|
+
readonly displayName?: string;
|
|
133
|
+
/** Trusted backend verification, never a message-supplied flag. */
|
|
134
|
+
readonly official?: boolean;
|
|
135
|
+
/** Explicit opt-in to images from non-mutual contacts; default false. */
|
|
136
|
+
readonly allowStrangerImages?: boolean;
|
|
137
|
+
/** Fresh presence on any joined conversation. */
|
|
138
|
+
readonly online?: boolean;
|
|
139
|
+
/** Latest presence activity, including title and game, if the member supplied it. */
|
|
140
|
+
readonly activity?: string;
|
|
141
|
+
/** UTC quiet-hours start in minutes, 0..1439. Omit both fields to disable. */
|
|
142
|
+
readonly quietHoursStartUtcMinute?: number;
|
|
143
|
+
/** UTC exclusive end, 0..1440; may wrap midnight. */
|
|
144
|
+
readonly quietHoursEndUtcMinute?: number;
|
|
145
|
+
}
|
|
146
|
+
/** One reaction aggregate on a message. */
|
|
147
|
+
export interface ChatReaction {
|
|
148
|
+
/** Reaction emoji. */
|
|
149
|
+
emoji?: string;
|
|
150
|
+
/** Number of members with this reaction. */
|
|
151
|
+
count?: number;
|
|
152
|
+
/** Stable reacting member identities. */
|
|
153
|
+
clientIds?: string[];
|
|
154
|
+
}
|
|
155
|
+
/** Relationship state after the change. */
|
|
156
|
+
export interface ChatRelationship {
|
|
157
|
+
/** Acting member. */
|
|
158
|
+
clientId?: string;
|
|
159
|
+
/** Other member. */
|
|
160
|
+
peerId?: string;
|
|
161
|
+
/** This user requested friendship. */
|
|
162
|
+
requested?: boolean;
|
|
163
|
+
/** Both users accepted friendship. */
|
|
164
|
+
mutual?: boolean;
|
|
165
|
+
/** Either user blocked the other; interaction is denied both ways. */
|
|
166
|
+
blocked?: boolean;
|
|
167
|
+
/** Other member's profile and fresh presence. */
|
|
168
|
+
peer?: ChatProfile;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* A report in the tenant's moderation queue. The response target is our own
|
|
172
|
+
* under-24-hour operating target; no claim that an external policy specifies it.
|
|
173
|
+
*/
|
|
174
|
+
export interface ChatReport {
|
|
175
|
+
/** Resource name. */
|
|
176
|
+
name?: string;
|
|
177
|
+
/** Stable identifier. */
|
|
178
|
+
readonly uid?: string;
|
|
179
|
+
/** Resource metadata. */
|
|
180
|
+
meta?: common.ResourceMeta;
|
|
181
|
+
/** Reporting member. */
|
|
182
|
+
readonly reporterId?: string;
|
|
183
|
+
/** message, image or user. */
|
|
184
|
+
readonly targetType?: string;
|
|
185
|
+
/** Full message name, image SHA-256 or user id respectively. */
|
|
186
|
+
readonly targetId?: string;
|
|
187
|
+
/** Report reason. */
|
|
188
|
+
readonly reason?: string;
|
|
189
|
+
/** pending, resolved or dismissed. */
|
|
190
|
+
readonly status?: string;
|
|
191
|
+
/** Latest response time for the moderation queue. */
|
|
192
|
+
readonly dueTime?: string;
|
|
193
|
+
}
|
|
194
|
+
/** Verified sender snapshot written by the service when the message is accepted. */
|
|
195
|
+
export interface ChatSender {
|
|
196
|
+
/** The authenticated user's stable platform identity as bound by its backend. */
|
|
197
|
+
clientId?: string;
|
|
198
|
+
/** Display name, from the sender's profile. */
|
|
199
|
+
displayName?: string;
|
|
200
|
+
/** Verified official status, assigned through a trusted backend operation. */
|
|
201
|
+
official?: boolean;
|
|
202
|
+
}
|
|
16
203
|
/** A CloudEvents 1.0 event as a producer submits it. */
|
|
17
204
|
export interface CloudEvent {
|
|
18
205
|
/** Unique per `source`; with `source` it is the dedupe key. */
|
|
@@ -34,6 +221,21 @@ export interface CloudEvent {
|
|
|
34
221
|
/** Extension attributes, at most 64. */
|
|
35
222
|
extensions?: Record<string, string>;
|
|
36
223
|
}
|
|
224
|
+
/** The trusted tenant backend configures one authenticated Chat identity. */
|
|
225
|
+
export interface ConfigureChatProfileRequest {
|
|
226
|
+
/** Profile resource name; creates a missing profile. */
|
|
227
|
+
name: string;
|
|
228
|
+
/** Accepted code of conduct version. */
|
|
229
|
+
termsVersion?: string;
|
|
230
|
+
/** User-visible name. */
|
|
231
|
+
displayName?: string;
|
|
232
|
+
/** Explicit opt-in; default false. */
|
|
233
|
+
allowStrangerImages?: boolean;
|
|
234
|
+
/** UTC quiet hours, optional as a pair; start equals end disables quiet hours. */
|
|
235
|
+
quietHoursStartUtcMinute?: number;
|
|
236
|
+
/** UTC exclusive end, including midnight as 1440. */
|
|
237
|
+
quietHoursEndUtcMinute?: number;
|
|
238
|
+
}
|
|
37
239
|
/**
|
|
38
240
|
* A Connector is one delivery channel of the environment, as stored: an
|
|
39
241
|
* email connector's allowed senders, a webhook's kind, and so on. It is
|
|
@@ -270,6 +472,11 @@ export interface Event {
|
|
|
270
472
|
/** When Events admitted it. */
|
|
271
473
|
readonly admitTime?: string;
|
|
272
474
|
}
|
|
475
|
+
/** The request for one Chat identity. */
|
|
476
|
+
export interface GetChatProfileRequest {
|
|
477
|
+
/** Profile resource name. */
|
|
478
|
+
name: string;
|
|
479
|
+
}
|
|
273
480
|
/** The request of GetConnector. */
|
|
274
481
|
export interface GetConnectorRequest {
|
|
275
482
|
/** The name of the connector to get. */
|
|
@@ -304,6 +511,8 @@ export interface GetRealtimeMemberRequest {
|
|
|
304
511
|
export interface GetRealtimeMessageRequest {
|
|
305
512
|
/** The name of the message. */
|
|
306
513
|
name: string;
|
|
514
|
+
/** Chat viewer; required on Chat channels. */
|
|
515
|
+
clientId?: string;
|
|
307
516
|
}
|
|
308
517
|
/** The request of GetSubscription. */
|
|
309
518
|
export interface GetSubscriptionRequest {
|
|
@@ -368,6 +577,24 @@ export interface InboundEndpointStatus {
|
|
|
368
577
|
/** Requests refused for a bad signature, all time. */
|
|
369
578
|
readonly rejectedCount?: string;
|
|
370
579
|
}
|
|
580
|
+
/** The verified Auth token-exchange backend issues a session to one player. */
|
|
581
|
+
export interface IssueChatTokenRequest {
|
|
582
|
+
/** Profile in the canonical shared Chat environment. */
|
|
583
|
+
name: string;
|
|
584
|
+
/** Lifetime, 60s to 3600s; default 3600s. */
|
|
585
|
+
ttl?: string;
|
|
586
|
+
}
|
|
587
|
+
/** Scoped player capability; contains no tenant key or administrator permission. */
|
|
588
|
+
export interface IssueChatTokenResponse {
|
|
589
|
+
/** Present as Bearer on player Chat methods only. */
|
|
590
|
+
token?: string;
|
|
591
|
+
/** Capability expiry. */
|
|
592
|
+
expireTime?: string;
|
|
593
|
+
/** Canonical verified player principal the token represents. */
|
|
594
|
+
clientId?: string;
|
|
595
|
+
/** Profile name in the shared Chat environment. */
|
|
596
|
+
profile?: string;
|
|
597
|
+
}
|
|
371
598
|
/** The request of IssueRealtimeChannelToken. */
|
|
372
599
|
export interface IssueRealtimeChannelTokenRequest {
|
|
373
600
|
/** The name of the realtime channel. */
|
|
@@ -391,6 +618,18 @@ export interface IssueRealtimeChannelTokenResponse {
|
|
|
391
618
|
/** The URI to connect to with it. */
|
|
392
619
|
connectUri?: string;
|
|
393
620
|
}
|
|
621
|
+
/**
|
|
622
|
+
* The request to join a Chat conversation. DM/support participants are fixed
|
|
623
|
+
* by policy; other conversations are admitted by the trusted tenant backend.
|
|
624
|
+
*/
|
|
625
|
+
export interface JoinRealtimeChannelRequest {
|
|
626
|
+
/** Existing channel name. */
|
|
627
|
+
name: string;
|
|
628
|
+
/** Authenticated member identity. */
|
|
629
|
+
clientId: string;
|
|
630
|
+
/** member or moderator; default member. */
|
|
631
|
+
role?: string;
|
|
632
|
+
}
|
|
394
633
|
/** The request of LeaseQueueMessages. */
|
|
395
634
|
export interface LeaseQueueMessagesRequest {
|
|
396
635
|
/** The name of the queue. */
|
|
@@ -420,6 +659,45 @@ export interface LeasedMessage {
|
|
|
420
659
|
/** When the lease expires and the message is ready again. */
|
|
421
660
|
readonly leaseExpireTime?: string;
|
|
422
661
|
}
|
|
662
|
+
/** The request to leave; durable read state is retained for a later join. */
|
|
663
|
+
export interface LeaveRealtimeChannelRequest {
|
|
664
|
+
/** Existing channel name. */
|
|
665
|
+
name: string;
|
|
666
|
+
/** Authenticated member identity. */
|
|
667
|
+
clientId: string;
|
|
668
|
+
}
|
|
669
|
+
/** The request to list friendships and pending requests. */
|
|
670
|
+
export interface ListChatRelationshipsRequest {
|
|
671
|
+
/** Acting user's profile. */
|
|
672
|
+
parent: string;
|
|
673
|
+
/** Maximum results; default 50, maximum 1000. */
|
|
674
|
+
pageSize?: number;
|
|
675
|
+
/** Previous response's next_page_token. */
|
|
676
|
+
pageToken?: string;
|
|
677
|
+
}
|
|
678
|
+
/** One page of relationships in peer-id order. */
|
|
679
|
+
export interface ListChatRelationshipsResponse {
|
|
680
|
+
/** Relationships and profiles. */
|
|
681
|
+
relationships?: ChatRelationship[];
|
|
682
|
+
/** Empty at the end. */
|
|
683
|
+
nextPageToken?: string;
|
|
684
|
+
}
|
|
685
|
+
/** The request to list the moderation queue. */
|
|
686
|
+
export interface ListChatReportsRequest {
|
|
687
|
+
/** Environment resource name. */
|
|
688
|
+
parent: string;
|
|
689
|
+
/** Maximum results; default 50, maximum 1000. */
|
|
690
|
+
pageSize?: number;
|
|
691
|
+
/** Previous response's next_page_token. */
|
|
692
|
+
pageToken?: string;
|
|
693
|
+
}
|
|
694
|
+
/** One page of reports, oldest first. */
|
|
695
|
+
export interface ListChatReportsResponse {
|
|
696
|
+
/** Queue records. */
|
|
697
|
+
chatReports?: ChatReport[];
|
|
698
|
+
/** Empty at the end. */
|
|
699
|
+
nextPageToken?: string;
|
|
700
|
+
}
|
|
423
701
|
/** The request of ListConnectors. */
|
|
424
702
|
export interface ListConnectorsRequest {
|
|
425
703
|
/** The parent to list in. */
|
|
@@ -546,6 +824,12 @@ export interface ListRealtimeMessagesRequest {
|
|
|
546
824
|
pageToken?: string;
|
|
547
825
|
/** Empty, or `sequence > N` to start after message N (resume). */
|
|
548
826
|
filter?: string;
|
|
827
|
+
/** Chat viewer; required on Chat channels. The trusted tenant backend binds identity. */
|
|
828
|
+
clientId?: string;
|
|
829
|
+
/** Exclusive cursor, for forward recovery. Cannot combine with before_cursor or filter. */
|
|
830
|
+
afterCursor?: string;
|
|
831
|
+
/** Exclusive cursor, for backwards history, newest first. Cannot combine with after_cursor or filter. */
|
|
832
|
+
beforeCursor?: string;
|
|
549
833
|
}
|
|
550
834
|
/** The response of ListRealtimeMessages. */
|
|
551
835
|
export interface ListRealtimeMessagesResponse {
|
|
@@ -634,6 +918,18 @@ export interface ListWebhookEndpointsResponse {
|
|
|
634
918
|
/** The token of the next page; empty on the last page. */
|
|
635
919
|
nextPageToken?: string;
|
|
636
920
|
}
|
|
921
|
+
/**
|
|
922
|
+
* Merge only after the exact verified link grant has been recorded. Repeating
|
|
923
|
+
* the same merge is a no-op; another target or an absent grant is refused.
|
|
924
|
+
*/
|
|
925
|
+
export interface MergeChatIdentityRequest {
|
|
926
|
+
/** Target platform Chat profile. */
|
|
927
|
+
name: string;
|
|
928
|
+
/** Previously bound title-scoped guest identity. */
|
|
929
|
+
sourceClientId?: string;
|
|
930
|
+
/** Exact prior Auth-verified source/target receipt binding. */
|
|
931
|
+
linkReceiptId?: string;
|
|
932
|
+
}
|
|
637
933
|
/** A fenced lease on one message. */
|
|
638
934
|
export interface MessageLease {
|
|
639
935
|
/** The message id. */
|
|
@@ -677,6 +973,8 @@ export interface PublishRealtimeMessagesRequest {
|
|
|
677
973
|
data?: unknown;
|
|
678
974
|
/** The publisher's client id, shown to subscribers. */
|
|
679
975
|
clientId?: string;
|
|
976
|
+
/** Required for Chat channels; generic channels continue to use data/message_type. */
|
|
977
|
+
content?: ChatMessageContent;
|
|
680
978
|
}
|
|
681
979
|
/** The response of PublishRealtimeMessages. */
|
|
682
980
|
export interface PublishRealtimeMessagesResponse {
|
|
@@ -747,6 +1045,26 @@ export interface QueueStatus {
|
|
|
747
1045
|
/** Messages in the dead-letter set. */
|
|
748
1046
|
readonly deadLetterCount?: string;
|
|
749
1047
|
}
|
|
1048
|
+
/** Adds or removes this member's reaction idempotently. */
|
|
1049
|
+
export interface ReactRealtimeMessageRequest {
|
|
1050
|
+
/** Existing message resource name. */
|
|
1051
|
+
name: string;
|
|
1052
|
+
/** Authenticated reacting member. */
|
|
1053
|
+
clientId?: string;
|
|
1054
|
+
/** Emoji, at most 32 UTF-8 bytes. */
|
|
1055
|
+
emoji?: string;
|
|
1056
|
+
/** Remove instead of add. */
|
|
1057
|
+
remove?: boolean;
|
|
1058
|
+
}
|
|
1059
|
+
/** The request to acknowledge a cursor and configure conversation notifications. */
|
|
1060
|
+
export interface ReadRealtimeMemberRequest {
|
|
1061
|
+
/** Existing member resource name. */
|
|
1062
|
+
name: string;
|
|
1063
|
+
/** Last visible message cursor; empty leaves the read cursor unchanged. */
|
|
1064
|
+
lastReadCursor?: string;
|
|
1065
|
+
/** Conversation notification preference; supplied on every call. */
|
|
1066
|
+
muted?: boolean;
|
|
1067
|
+
}
|
|
750
1068
|
/**
|
|
751
1069
|
* A Realtime Channel delivers matching events to authorized clients over
|
|
752
1070
|
* WebSocket or SSE, resumable from a cursor. Subscriptions route events into
|
|
@@ -773,6 +1091,8 @@ export interface RealtimeChannelSpec {
|
|
|
773
1091
|
publishableOk?: boolean;
|
|
774
1092
|
/** How far back a cursor may resume; default 24h, at most 7d. */
|
|
775
1093
|
historyRetention?: string;
|
|
1094
|
+
/** Chat policy; when present, history is durable and membership is persistent. */
|
|
1095
|
+
chat?: ChatChannelPolicy;
|
|
776
1096
|
}
|
|
777
1097
|
/** RealtimeChannelStatus is the observed state of a RealtimeChannel. */
|
|
778
1098
|
export interface RealtimeChannelStatus {
|
|
@@ -812,10 +1132,23 @@ export interface RealtimeMember {
|
|
|
812
1132
|
readonly enterTime?: string;
|
|
813
1133
|
/** Open connections of this client in the channel. */
|
|
814
1134
|
readonly connectionCount?: number;
|
|
1135
|
+
/** Persistent Chat membership, independent of online connections. */
|
|
1136
|
+
readonly joined?: boolean;
|
|
1137
|
+
/** Last acknowledged stream cursor; updates never move backwards. */
|
|
1138
|
+
readonly lastReadCursor?: string;
|
|
1139
|
+
/** Unread visible Chat messages from other members, excluding blocked senders. */
|
|
1140
|
+
readonly unreadCount?: string;
|
|
1141
|
+
/** Suppress this conversation's notification intents. */
|
|
1142
|
+
readonly muted?: boolean;
|
|
1143
|
+
/** Member or moderator, assigned by the tenant backend. */
|
|
1144
|
+
readonly role?: string;
|
|
1145
|
+
/** This channel is an official, verified support conversation. */
|
|
1146
|
+
readonly pinned?: boolean;
|
|
815
1147
|
}
|
|
816
1148
|
/**
|
|
817
1149
|
* A Realtime Message is one message in a channel's ordered history, kept
|
|
818
|
-
* for the channel's `history_retention`.
|
|
1150
|
+
* for the channel's `history_retention`. Chat history is durable; edit and unsend
|
|
1151
|
+
* are reserved for a later phase.
|
|
819
1152
|
*/
|
|
820
1153
|
export interface RealtimeMessage {
|
|
821
1154
|
/** `…/realtime_channels/{realtime_channel}/realtime_messages/{realtime_message}`. */
|
|
@@ -839,6 +1172,12 @@ export interface RealtimeMessage {
|
|
|
839
1172
|
clientId?: string;
|
|
840
1173
|
/** When the channel appended it. */
|
|
841
1174
|
readonly publishTime?: string;
|
|
1175
|
+
/** Structured Chat content, from the same stored event as data. */
|
|
1176
|
+
readonly content?: ChatMessageContent;
|
|
1177
|
+
/** Verified sender metadata; callers cannot set the official badge on a message. */
|
|
1178
|
+
readonly sender?: ChatSender;
|
|
1179
|
+
/** Member reactions, from the same conversation authority. */
|
|
1180
|
+
readonly reactions?: ChatReaction[];
|
|
842
1181
|
}
|
|
843
1182
|
/** The request of ReplayQueue. */
|
|
844
1183
|
export interface ReplayQueueRequest {
|
|
@@ -873,6 +1212,42 @@ export interface ReplayWebhookEndpointResponse {
|
|
|
873
1212
|
/** Deliveries queued again. */
|
|
874
1213
|
replayedCount?: string;
|
|
875
1214
|
}
|
|
1215
|
+
/** The request to report a message, image or user. */
|
|
1216
|
+
export interface ReportChatContentRequest {
|
|
1217
|
+
/** Reporting user's profile. */
|
|
1218
|
+
name: string;
|
|
1219
|
+
/** message, image or user. */
|
|
1220
|
+
targetType?: string;
|
|
1221
|
+
/** Full message name, image SHA-256 or user id. */
|
|
1222
|
+
targetId?: string;
|
|
1223
|
+
/** Report reason. */
|
|
1224
|
+
reason?: string;
|
|
1225
|
+
}
|
|
1226
|
+
/** The request to resolve a moderation report. */
|
|
1227
|
+
export interface ResolveChatReportRequest {
|
|
1228
|
+
/** Moderation report resource name. */
|
|
1229
|
+
name: string;
|
|
1230
|
+
/** resolved or dismissed. */
|
|
1231
|
+
status?: string;
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Register or review one content-hashed image. Only the trusted backend records
|
|
1235
|
+
* automated moderation outcomes; end users cannot approve their own uploads.
|
|
1236
|
+
* Accepted conduct terms disclose third-party AI model review through Sylphx AI
|
|
1237
|
+
* Gateway. Capacity exhaustion leaves status pending with reason moderation_checking.
|
|
1238
|
+
*/
|
|
1239
|
+
export interface ReviewChatMediaRequest {
|
|
1240
|
+
/** Uploader's profile resource name. */
|
|
1241
|
+
name: string;
|
|
1242
|
+
/** Lowercase SHA-256 digest. */
|
|
1243
|
+
sha256?: string;
|
|
1244
|
+
/** Exact existing storage URI. */
|
|
1245
|
+
contentUri?: string;
|
|
1246
|
+
/** pending registers an upload; approved or rejected is a backend moderation receipt. */
|
|
1247
|
+
status?: string;
|
|
1248
|
+
/** Administrator-only moderation reason; player status/reason are never trusted. */
|
|
1249
|
+
reason?: string;
|
|
1250
|
+
}
|
|
876
1251
|
/** The request of RotateWebhookEndpointSecret. */
|
|
877
1252
|
export interface RotateWebhookEndpointSecretRequest {
|
|
878
1253
|
/** The name of the webhook endpoint. */
|
|
@@ -894,6 +1269,22 @@ export interface SendQueueMessagesResponse {
|
|
|
894
1269
|
/** The message ids, in request order. */
|
|
895
1270
|
messageIds?: string[];
|
|
896
1271
|
}
|
|
1272
|
+
/** Trusted administrator verification of an official account. */
|
|
1273
|
+
export interface SetChatOfficialStatusRequest {
|
|
1274
|
+
/** Profile in the canonical shared Chat environment. */
|
|
1275
|
+
name: string;
|
|
1276
|
+
/** Verified status; regular profile configuration never changes this flag. */
|
|
1277
|
+
official?: boolean;
|
|
1278
|
+
}
|
|
1279
|
+
/** The request to change a directed social relationship. */
|
|
1280
|
+
export interface SetChatRelationshipRequest {
|
|
1281
|
+
/** Acting user's profile. */
|
|
1282
|
+
name: string;
|
|
1283
|
+
/** Other user's stable client id. */
|
|
1284
|
+
peerId: string;
|
|
1285
|
+
/** request, accept, remove, block or unblock. */
|
|
1286
|
+
action: string;
|
|
1287
|
+
}
|
|
897
1288
|
/**
|
|
898
1289
|
* A Subscription fans each matching event of a Topic out to one Queue, Webhook
|
|
899
1290
|
* Endpoint, or Realtime Channel: exactly one message per (subscription,
|
|
@@ -1148,6 +1539,8 @@ export interface WebhookEndpointStatus {
|
|
|
1148
1539
|
*/
|
|
1149
1540
|
readonly previousSecretExpireTime?: string;
|
|
1150
1541
|
}
|
|
1542
|
+
/** A Chat channel's purpose; no product-specific server is required. */
|
|
1543
|
+
export type ChatChannelKind = 'world' | 'room' | 'guild' | 'dm' | 'support' | 'group' | (string & {});
|
|
1151
1544
|
/** How one delivery attempt ended. */
|
|
1152
1545
|
export type DeliveryAttemptOutcome = 'delivered' | 'retryable_failure' | 'terminal_failure' | 'ambiguous' | (string & {});
|
|
1153
1546
|
/** The state of one webhook delivery. */
|
|
@@ -1186,6 +1579,10 @@ export declare class EventsApi {
|
|
|
1186
1579
|
readonly realtimeMessages: RealtimeMessagesCollection;
|
|
1187
1580
|
/** The `realtime_members` collection. */
|
|
1188
1581
|
readonly realtimeMembers: RealtimeMembersCollection;
|
|
1582
|
+
/** The `chat_profiles` collection. */
|
|
1583
|
+
readonly chatProfiles: ChatProfilesCollection;
|
|
1584
|
+
/** The `chat_reports` collection. */
|
|
1585
|
+
readonly chatReports: ChatReportsCollection;
|
|
1189
1586
|
constructor(client: runtime.Client);
|
|
1190
1587
|
}
|
|
1191
1588
|
/** `topics` of Sylphx Events: Resource type `events.sylphx.com/Topic`. */
|
|
@@ -1658,6 +2055,22 @@ export declare class RealtimeChannelsCollection {
|
|
|
1658
2055
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1659
2056
|
*/
|
|
1660
2057
|
delete(request: DeleteRealtimeChannelRequest): Promise<Record<string, never>>;
|
|
2058
|
+
/**
|
|
2059
|
+
* Joins a persistent Chat conversation.
|
|
2060
|
+
*
|
|
2061
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*}:join` · permission `events:write` · effect `write`
|
|
2062
|
+
*
|
|
2063
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2064
|
+
*/
|
|
2065
|
+
join(request: JoinRealtimeChannelRequest): Promise<RealtimeMember>;
|
|
2066
|
+
/**
|
|
2067
|
+
* Leaves Chat while retaining durable read state.
|
|
2068
|
+
*
|
|
2069
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*}:leave` · permission `events:write` · effect `write`
|
|
2070
|
+
*
|
|
2071
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2072
|
+
*/
|
|
2073
|
+
leave(request: LeaveRealtimeChannelRequest): Promise<Record<string, never>>;
|
|
1661
2074
|
}
|
|
1662
2075
|
/** `realtime_messages` of Sylphx Events: Resource type `events.sylphx.com/RealtimeMessage`. */
|
|
1663
2076
|
export declare class RealtimeMessagesCollection {
|
|
@@ -1681,6 +2094,14 @@ export declare class RealtimeMessagesCollection {
|
|
|
1681
2094
|
list(request: ListRealtimeMessagesRequest): Promise<ListRealtimeMessagesResponse>;
|
|
1682
2095
|
/** Every item of every page of `list`. */
|
|
1683
2096
|
listAll(request: ListRealtimeMessagesRequest): AsyncGenerator<RealtimeMessage>;
|
|
2097
|
+
/**
|
|
2098
|
+
* Adds or removes a member reaction on a visible Chat message.
|
|
2099
|
+
*
|
|
2100
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*\/realtime_messages/*}:react` · permission `events:write` · effect `write`
|
|
2101
|
+
*
|
|
2102
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_NOT_FOUND`.
|
|
2103
|
+
*/
|
|
2104
|
+
react(request: ReactRealtimeMessageRequest): Promise<RealtimeMessage>;
|
|
1684
2105
|
}
|
|
1685
2106
|
/** `realtime_members` of Sylphx Events: Resource type `events.sylphx.com/RealtimeMember`. */
|
|
1686
2107
|
export declare class RealtimeMembersCollection {
|
|
@@ -1704,4 +2125,120 @@ export declare class RealtimeMembersCollection {
|
|
|
1704
2125
|
list(request: ListRealtimeMembersRequest): Promise<ListRealtimeMembersResponse>;
|
|
1705
2126
|
/** Every item of every page of `list`. */
|
|
1706
2127
|
listAll(request: ListRealtimeMembersRequest): AsyncGenerator<RealtimeMember>;
|
|
2128
|
+
/**
|
|
2129
|
+
* Advances a member read cursor monotonically and sets mute.
|
|
2130
|
+
*
|
|
2131
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*\/realtime_members/*}:read` · permission `events:write` · effect `write`
|
|
2132
|
+
*
|
|
2133
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2134
|
+
*/
|
|
2135
|
+
read(request: ReadRealtimeMemberRequest): Promise<RealtimeMember>;
|
|
2136
|
+
}
|
|
2137
|
+
/** `chat_profiles` of Sylphx Events: Resource type `events.sylphx.com/ChatProfile`. */
|
|
2138
|
+
export declare class ChatProfilesCollection {
|
|
2139
|
+
private readonly client;
|
|
2140
|
+
constructor(client: runtime.Client);
|
|
2141
|
+
/**
|
|
2142
|
+
* Gets a Chat profile and fresh presence.
|
|
2143
|
+
*
|
|
2144
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}` · permission `events:read` · effect `read`
|
|
2145
|
+
*
|
|
2146
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2147
|
+
*/
|
|
2148
|
+
get(request: GetChatProfileRequest): Promise<ChatProfile>;
|
|
2149
|
+
/**
|
|
2150
|
+
* Configures an authenticated Chat identity through its trusted backend.
|
|
2151
|
+
*
|
|
2152
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:configure` · permission `events:write` · effect `write`
|
|
2153
|
+
*
|
|
2154
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2155
|
+
*/
|
|
2156
|
+
configure(request: ConfigureChatProfileRequest): Promise<ChatProfile>;
|
|
2157
|
+
/**
|
|
2158
|
+
* Changes friendship or a bilateral interaction block.
|
|
2159
|
+
*
|
|
2160
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:setRelationship` · permission `events:write` · effect `write`
|
|
2161
|
+
*
|
|
2162
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2163
|
+
*/
|
|
2164
|
+
setRelationship(request: SetChatRelationshipRequest): Promise<ChatRelationship>;
|
|
2165
|
+
/**
|
|
2166
|
+
* Lists friends and pending requests with presence.
|
|
2167
|
+
*
|
|
2168
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:listRelationships` · permission `events:read` · effect `read`
|
|
2169
|
+
*
|
|
2170
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2171
|
+
*/
|
|
2172
|
+
listRelationships(request: ListChatRelationshipsRequest): Promise<ListChatRelationshipsResponse>;
|
|
2173
|
+
/**
|
|
2174
|
+
* Reports a message, image or user to the moderation queue.
|
|
2175
|
+
*
|
|
2176
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:report` · permission `events:write` · effect `write`
|
|
2177
|
+
*
|
|
2178
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2179
|
+
*/
|
|
2180
|
+
report(request: ReportChatContentRequest): Promise<ChatReport>;
|
|
2181
|
+
/**
|
|
2182
|
+
* Registers an image and its automated moderation receipt.
|
|
2183
|
+
*
|
|
2184
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:reviewMedia` · permission `events:write` · effect `write`
|
|
2185
|
+
*
|
|
2186
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2187
|
+
*/
|
|
2188
|
+
reviewMedia(request: ReviewChatMediaRequest): Promise<ChatMediaReview>;
|
|
2189
|
+
/**
|
|
2190
|
+
* Verifies an official account through a distinct administrator permission.
|
|
2191
|
+
*
|
|
2192
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:setOfficialStatus` · permission `events:chat:admin` · effect `write`
|
|
2193
|
+
*
|
|
2194
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
2195
|
+
*/
|
|
2196
|
+
setOfficialStatus(request: SetChatOfficialStatusRequest): Promise<ChatProfile>;
|
|
2197
|
+
/**
|
|
2198
|
+
* Records an exact Auth-verified guest-to-platform identity link grant.
|
|
2199
|
+
*
|
|
2200
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:bindIdentity` · permission `events:chat:admin` · effect `write`
|
|
2201
|
+
*
|
|
2202
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2203
|
+
*/
|
|
2204
|
+
bindIdentity(request: BindChatIdentityRequest): Promise<ChatProfile>;
|
|
2205
|
+
/**
|
|
2206
|
+
* Rehomes linked guest state without discarding messages or relationships.
|
|
2207
|
+
*
|
|
2208
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:mergeIdentity` · permission `events:chat:admin` · effect `write`
|
|
2209
|
+
*
|
|
2210
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2211
|
+
*/
|
|
2212
|
+
mergeIdentity(request: MergeChatIdentityRequest): Promise<ChatProfile>;
|
|
2213
|
+
/**
|
|
2214
|
+
* Issues a bounded player capability after verified Auth token exchange.
|
|
2215
|
+
*
|
|
2216
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:issueToken` · permission `events:write` · effect `write`
|
|
2217
|
+
*
|
|
2218
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
|
|
2219
|
+
*/
|
|
2220
|
+
issueToken(request: IssueChatTokenRequest): Promise<IssueChatTokenResponse>;
|
|
2221
|
+
}
|
|
2222
|
+
/** `chat_reports` of Sylphx Events: Resource type `events.sylphx.com/ChatReport`. */
|
|
2223
|
+
export declare class ChatReportsCollection {
|
|
2224
|
+
private readonly client;
|
|
2225
|
+
constructor(client: runtime.Client);
|
|
2226
|
+
/**
|
|
2227
|
+
* Lists the moderation queue.
|
|
2228
|
+
*
|
|
2229
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/chat_reports` · permission `events:read` · effect `read`
|
|
2230
|
+
*
|
|
2231
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2232
|
+
*/
|
|
2233
|
+
list(request: ListChatReportsRequest): Promise<ListChatReportsResponse>;
|
|
2234
|
+
/** Every item of every page of `list`. */
|
|
2235
|
+
listAll(request: ListChatReportsRequest): AsyncGenerator<ChatReport>;
|
|
2236
|
+
/**
|
|
2237
|
+
* Records a moderation response.
|
|
2238
|
+
*
|
|
2239
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_reports/*}:resolve` · permission `events:write` · effect `write`
|
|
2240
|
+
*
|
|
2241
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2242
|
+
*/
|
|
2243
|
+
resolve(request: ResolveChatReportRequest): Promise<ChatReport>;
|
|
1707
2244
|
}
|