@voltro/plugin-chat 0.89.2 → 0.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1822 -0
- package/README.md +16 -507
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/components.js +160 -149
- package/dist/index.d.ts +66 -1
- package/dist/index.js +93 -66
- package/dist/inspect.js +25 -24
- package/dist/messageLinks.js +29 -0
- package/dist/rpc.d.ts +14 -0
- package/dist/rpc.js +22 -2
- package/dist/server.d.ts +3 -0
- package/dist/server.js +6 -5
- package/dist/service.js +596 -509
- package/dist/strategies.d.ts +34 -0
- package/dist/voice.js +76 -0
- package/dist/web.d.ts +49 -4
- package/dist/web.js +11 -10
- package/package.json +17 -17
package/dist/index.js
CHANGED
|
@@ -9,18 +9,19 @@ import { chatChannelsTable as p } from "./channels.entity.js";
|
|
|
9
9
|
import { chatMembersTable as m } from "./members.entity.js";
|
|
10
10
|
import { chatMessagesTable as h } from "./messages.entity.js";
|
|
11
11
|
import { dataStoreChat as g } from "./service.js";
|
|
12
|
-
import { BASE_NAME as _, chatRpcClientImports as v } from "./rpc.js";
|
|
13
|
-
import { chatRpcRoutes as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
12
|
+
import { BASE_NAME as _, chatRpcClientImports as v, chatVoiceRpcClientImports as y, voiceJoinDescriptor as b } from "./rpc.js";
|
|
13
|
+
import { chatRpcRoutes as x } from "./rpcRoutes.js";
|
|
14
|
+
import { devVoiceProvider as S, liveKitVoiceProvider as C, resolveChatVoice as w } from "./voice.js";
|
|
15
|
+
import { defaultChatStrategies as T, resolveChatOptions as E } from "./strategies.js";
|
|
16
|
+
import { chatStatus as D } from "./inspect.js";
|
|
17
|
+
import { ChatAdministration as O } from "./server.js";
|
|
18
|
+
import { defineLicensedGamePlugin as k } from "@voltro/plugin-licensing/gate";
|
|
19
|
+
import { Effect as A, Layer as j } from "effect";
|
|
20
|
+
import { fileURLToPath as M } from "node:url";
|
|
21
|
+
import { replicaEvidence as N } from "@voltro/protocol/identity";
|
|
22
|
+
import { redisStore as P } from "@voltro/plugin-ratelimit";
|
|
22
23
|
// src/index.ts
|
|
23
|
-
var
|
|
24
|
+
var F = {
|
|
24
25
|
slots: {
|
|
25
26
|
moderate: {
|
|
26
27
|
defaultExport: "keywordChatModeration",
|
|
@@ -49,60 +50,73 @@ var A = {
|
|
|
49
50
|
u.name,
|
|
50
51
|
f.name
|
|
51
52
|
]
|
|
52
|
-
},
|
|
53
|
-
let
|
|
53
|
+
}, I = (i = {}) => {
|
|
54
|
+
let { voice: a, ...o } = i, s = E(o), u = P(s.rateLimit), d = a === void 0 ? void 0 : w(a), S, C, T = !1, F = (e) => {
|
|
55
|
+
let n = C;
|
|
56
|
+
return A.suspend(() => n === void 0 || n !== C ? A.fail(t("unavailable")) : e(n).pipe(A.flatMap((e) => n === C ? A.succeed(e) : A.fail(t("unavailable")))));
|
|
57
|
+
}, I = (e, n, r) => {
|
|
54
58
|
try {
|
|
55
59
|
let t = structuredClone(e), i = structuredClone(n);
|
|
56
|
-
return
|
|
60
|
+
return F((e) => r(e, t, i));
|
|
57
61
|
} catch {
|
|
58
|
-
return
|
|
62
|
+
return A.fail(t("invalid_input"));
|
|
59
63
|
}
|
|
64
|
+
}, L = {
|
|
65
|
+
mentionCandidates: (e, t) => I(e, t, (e, t, n) => e.service.mentionCandidates(t, n)),
|
|
66
|
+
authors: (e, t) => I(e, t, (e, t, n) => e.service.authors(t, n)),
|
|
67
|
+
prepareTyping: (e, t) => F((n) => n.service.prepareTyping(e, t)),
|
|
68
|
+
dm: (e, t) => F((n) => n.service.dm(e, t)),
|
|
69
|
+
send: (e, t) => F((n) => n.service.send(e, t)),
|
|
70
|
+
edit: (e, t) => F((n) => n.service.edit(e, t)),
|
|
71
|
+
remove: (e, t) => F((n) => n.service.remove(e, t)),
|
|
72
|
+
messages: (e, t) => F((n) => n.service.messages(e, t)),
|
|
73
|
+
channel: (e, t) => F((n) => n.service.channel(e, t)),
|
|
74
|
+
membership: (e, t) => F((n) => n.service.membership(e, t)),
|
|
75
|
+
unread: (e) => F((t) => t.service.unread(e)),
|
|
76
|
+
original: (e, t) => F((n) => n.service.original(e, t)),
|
|
77
|
+
mediaUrl: (e, t) => F((n) => n.service.mediaUrl(e, t)),
|
|
78
|
+
channels: (e) => F((t) => t.service.channels(e)),
|
|
79
|
+
markRead: (e, t, n) => F((r) => r.service.markRead(e, t, n)),
|
|
80
|
+
moderateMember: (e, t) => F((n) => n.service.moderateMember(e, t)),
|
|
81
|
+
configure: (e, t) => F((n) => n.service.configure(e, t)),
|
|
82
|
+
join: (e, t) => F((n) => n.service.join(e, t)),
|
|
83
|
+
leave: (e, t) => F((n) => n.service.leave(e, t)),
|
|
84
|
+
transferOwnership: (e, t, n) => F((r) => r.service.transferOwnership(e, t, n))
|
|
60
85
|
};
|
|
61
|
-
return
|
|
86
|
+
return k({
|
|
62
87
|
name: _,
|
|
63
88
|
description: "Membership-filtered durable chat with replaceable rule slots.",
|
|
64
89
|
eventClientPolicies: [{
|
|
65
90
|
id: f.clientPolicy,
|
|
66
|
-
admit: (e) =>
|
|
67
|
-
deliver: (e) =>
|
|
68
|
-
monitor: (e) =>
|
|
91
|
+
admit: (e) => F((t) => t.typingPolicy.admit(e)),
|
|
92
|
+
deliver: (e) => F((t) => t.typingPolicy.deliver(e)),
|
|
93
|
+
monitor: (e) => F((t) => t.typingPolicy.monitor(e))
|
|
69
94
|
}],
|
|
70
|
-
services:
|
|
71
|
-
readReportEvidence: (e, t) =>
|
|
72
|
-
collectReportContext: (e, t) =>
|
|
73
|
-
prune: (e) =>
|
|
74
|
-
sweepMedia: (e) =>
|
|
75
|
-
canNotifyMention: (e, t) =>
|
|
76
|
-
createChannel: (e, t) =>
|
|
77
|
-
addMember: (e, t) =>
|
|
78
|
-
removeMember: (e, t) =>
|
|
79
|
-
archiveMatch: (e, t) =>
|
|
95
|
+
services: j.succeed(O, {
|
|
96
|
+
readReportEvidence: (e, t) => I(e, t, (e, t, n) => e.readReportEvidence(t, n)),
|
|
97
|
+
collectReportContext: (e, t) => I(e, t, (e, t, n) => e.collectReportContext(t, n)),
|
|
98
|
+
prune: (e) => I(e, null, (e, t) => e.prune(t)),
|
|
99
|
+
sweepMedia: (e) => I(e, null, (e, t) => e.sweepMedia(t)),
|
|
100
|
+
canNotifyMention: (e, t) => I(e, t, (e, t, n) => e.canNotifyMention(t, n)),
|
|
101
|
+
createChannel: (e, t) => I(e, t, (e, t, n) => e.createChannel(t, n)),
|
|
102
|
+
addMember: (e, t) => I(e, t, (e, t, n) => e.addMember(t, n)),
|
|
103
|
+
removeMember: (e, t) => I(e, t, (e, t, n) => e.removeMember(t, n)),
|
|
104
|
+
archiveMatch: (e, t) => I(e, t, (e, t, n) => e.archiveMatch(t, n))
|
|
80
105
|
}),
|
|
81
106
|
permissions: ["store:write", "inspect:read"],
|
|
82
|
-
routes:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
mediaUrl: (e, t) => b((n) => n.service.mediaUrl(e, t)),
|
|
96
|
-
channels: (e) => b((t) => t.service.channels(e)),
|
|
97
|
-
markRead: (e, t, n) => b((r) => r.service.markRead(e, t, n)),
|
|
98
|
-
moderateMember: (e, t) => b((n) => n.service.moderateMember(e, t)),
|
|
99
|
-
configure: (e, t) => b((n) => n.service.configure(e, t)),
|
|
100
|
-
join: (e, t) => b((n) => n.service.join(e, t)),
|
|
101
|
-
leave: (e, t) => b((n) => n.service.leave(e, t)),
|
|
102
|
-
transferOwnership: (e, t, n) => b((r) => r.service.transferOwnership(e, t, n))
|
|
103
|
-
}),
|
|
104
|
-
rpcClientDescriptors: v,
|
|
105
|
-
sources: D(new URL("./chat-app", "" + import.meta.url)),
|
|
107
|
+
routes: [...x(L), ...d === void 0 ? [] : [{
|
|
108
|
+
...b,
|
|
109
|
+
execute: (e, n) => {
|
|
110
|
+
let r = n.request.subject;
|
|
111
|
+
return r.type !== "user" || typeof r.tenantId != "string" ? A.fail(t("forbidden")) : A.flatMap(L.membership(r, e.channelId), (t) => d.join({
|
|
112
|
+
tenantId: r.tenantId,
|
|
113
|
+
subjectId: String(r.id),
|
|
114
|
+
channelId: e.channelId
|
|
115
|
+
}, t));
|
|
116
|
+
}
|
|
117
|
+
}]],
|
|
118
|
+
rpcClientDescriptors: d === void 0 ? v : [...v, ...y],
|
|
119
|
+
sources: M(new URL("./chat-app", "" + import.meta.url)),
|
|
106
120
|
errorSchemas: [{
|
|
107
121
|
schema: e,
|
|
108
122
|
import: {
|
|
@@ -136,45 +150,58 @@ var A = {
|
|
|
136
150
|
path: "/status",
|
|
137
151
|
scope: "process",
|
|
138
152
|
description: "Declared chat budgets and process binding; no channel/message/body enumeration.",
|
|
139
|
-
handler: () =>
|
|
153
|
+
handler: () => A.try({
|
|
140
154
|
try: () => ({
|
|
141
155
|
kind: "json",
|
|
142
|
-
data:
|
|
156
|
+
data: D(s, C !== void 0, T)
|
|
143
157
|
}),
|
|
144
158
|
catch: () => t("unavailable")
|
|
145
159
|
})
|
|
146
160
|
}],
|
|
147
161
|
bindDataStore: (e) => {
|
|
148
|
-
if (
|
|
149
|
-
|
|
162
|
+
if (S !== void 0 && S !== e) throw Error("Chat plugin instance cannot cross app stores");
|
|
163
|
+
S = e, C ??= g(e, s, u);
|
|
150
164
|
},
|
|
151
|
-
onActivate: (e) =>
|
|
165
|
+
onActivate: (e) => A.tryPromise({
|
|
152
166
|
try: async () => {
|
|
153
|
-
if (
|
|
154
|
-
await
|
|
167
|
+
if (s.rateLimit?.hotStore !== void 0 && N(e.env) !== null) throw t("unavailable");
|
|
168
|
+
await u.activate(e.env, e.connectionRegistry), T = !0;
|
|
155
169
|
},
|
|
156
170
|
catch: () => t("unavailable")
|
|
157
171
|
}),
|
|
158
|
-
onExport: (e, t) =>
|
|
172
|
+
onExport: (e, t) => F((n) => n.exportSubject({
|
|
159
173
|
subjectId: e,
|
|
160
174
|
tenantId: t.tenantId,
|
|
161
175
|
kind: t.kind
|
|
162
176
|
})),
|
|
163
|
-
onErase: (e, t) =>
|
|
177
|
+
onErase: (e, t) => F((n) => n.eraseSubject({
|
|
164
178
|
subjectId: e,
|
|
165
179
|
tenantId: t.tenantId,
|
|
166
180
|
kind: t.kind
|
|
167
181
|
})),
|
|
168
|
-
|
|
182
|
+
subjectMerge: {
|
|
183
|
+
tables: [
|
|
184
|
+
p,
|
|
185
|
+
m,
|
|
186
|
+
h,
|
|
187
|
+
l,
|
|
188
|
+
r,
|
|
189
|
+
n,
|
|
190
|
+
c
|
|
191
|
+
].map((e) => e.tableName),
|
|
192
|
+
kinds: ["guest"]
|
|
193
|
+
},
|
|
194
|
+
onMergeAccounts: (e) => F((t) => t.mergeSubject(e)),
|
|
195
|
+
onDeactivate: () => A.tryPromise({
|
|
169
196
|
try: async () => {
|
|
170
197
|
try {
|
|
171
|
-
|
|
198
|
+
C?.disposeTyping();
|
|
172
199
|
} finally {
|
|
173
|
-
|
|
200
|
+
C = void 0, S = void 0, T = !1, await u.deactivate();
|
|
174
201
|
}
|
|
175
202
|
},
|
|
176
203
|
catch: () => t("unavailable")
|
|
177
204
|
})
|
|
178
205
|
});
|
|
179
206
|
};
|
|
180
|
-
export { i as CHAT_MAX_MESSAGE_VERSION, a as CHAT_MEDIA_SWEEP_BATCH_SIZE, o as CHAT_RETENTION_BATCH_SIZE, s as CHAT_RETENTION_RUN_BATCHES, e as ChatError, n as chatAdmissionsTable, p as chatChannelsTable, r as chatEvidenceTable, c as chatMediaTable, m as chatMembersTable, h as chatMessagesTable,
|
|
207
|
+
export { i as CHAT_MAX_MESSAGE_VERSION, a as CHAT_MEDIA_SWEEP_BATCH_SIZE, o as CHAT_RETENTION_BATCH_SIZE, s as CHAT_RETENTION_RUN_BATCHES, e as ChatError, n as chatAdmissionsTable, p as chatChannelsTable, r as chatEvidenceTable, c as chatMediaTable, m as chatMembersTable, h as chatMessagesTable, I as chatPlugin, l as chatRetentionTable, F as chatSystemContract, g as dataStoreChat, T as defaultChatStrategies, S as devVoiceProvider, C as liveKitVoiceProvider, E as resolveChatOptions };
|
package/dist/inspect.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { chatError as e } from "./errors.js";
|
|
2
2
|
import { defaultChatStrategies as t } from "./strategies.js";
|
|
3
|
+
import { decodeChatStatus as n } from "@voltro/protocol/inspect";
|
|
3
4
|
// src/inspect.ts
|
|
4
|
-
var
|
|
5
|
-
let
|
|
6
|
-
if (!Number.isSafeInteger(
|
|
7
|
-
return {
|
|
8
|
-
observedAt:
|
|
9
|
-
bound:
|
|
10
|
-
rateActive:
|
|
11
|
-
maxBodyLength:
|
|
12
|
-
pageSize:
|
|
13
|
-
maxMembers:
|
|
14
|
-
maxChannelsPerSubject:
|
|
15
|
-
retentionMs:
|
|
16
|
-
evidenceRetentionMs:
|
|
17
|
-
perChannelRate:
|
|
18
|
-
globalRate:
|
|
19
|
-
maxMentions:
|
|
20
|
-
moderationAction:
|
|
21
|
-
denyWordCount:
|
|
22
|
-
mediaContentTypes:
|
|
23
|
-
maxMediaBytes:
|
|
24
|
-
mediaUrlTtlSec:
|
|
25
|
-
slots: Object.fromEntries(Object.entries(t).map(([e, t]) => [e,
|
|
5
|
+
var r = (r, i, a) => {
|
|
6
|
+
let o = r.now();
|
|
7
|
+
if (!Number.isSafeInteger(o) || o < 0 || o > 864e13) throw e("unavailable");
|
|
8
|
+
return n({
|
|
9
|
+
observedAt: o,
|
|
10
|
+
bound: i,
|
|
11
|
+
rateActive: a,
|
|
12
|
+
maxBodyLength: r.maxBodyLength,
|
|
13
|
+
pageSize: r.pageSize,
|
|
14
|
+
maxMembers: r.maxMembers,
|
|
15
|
+
maxChannelsPerSubject: r.maxChannelsPerSubject,
|
|
16
|
+
retentionMs: r.retentionMs,
|
|
17
|
+
evidenceRetentionMs: r.evidenceRetentionMs,
|
|
18
|
+
perChannelRate: r.perChannelRate,
|
|
19
|
+
globalRate: r.globalRate,
|
|
20
|
+
maxMentions: r.maxMentions,
|
|
21
|
+
moderationAction: r.moderationAction,
|
|
22
|
+
denyWordCount: r.denyWords.length,
|
|
23
|
+
mediaContentTypes: r.mediaContentTypes,
|
|
24
|
+
maxMediaBytes: r.maxMediaBytes,
|
|
25
|
+
mediaUrlTtlSec: r.mediaUrlTtlSec,
|
|
26
|
+
slots: Object.fromEntries(Object.entries(t).map(([e, t]) => [e, r.strategies[e] === t ? "default" : "custom"])),
|
|
26
27
|
tables: [
|
|
27
28
|
"_voltro_chat_channels",
|
|
28
29
|
"_voltro_chat_members",
|
|
@@ -32,6 +33,6 @@ var n = (n, r, i) => {
|
|
|
32
33
|
"_voltro_chat_admissions",
|
|
33
34
|
"_voltro_chat_media"
|
|
34
35
|
]
|
|
35
|
-
};
|
|
36
|
+
});
|
|
36
37
|
};
|
|
37
|
-
export {
|
|
38
|
+
export { r as chatStatus };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/messageLinks.ts
|
|
2
|
+
var e = /\bhttps?:\/\/[^\s<>"'`]+/gi, t = /[.,;:!?)\]}'"»”’]+$/, n = (n, r = 20) => {
|
|
3
|
+
if (typeof n != "string" || n === "") return [];
|
|
4
|
+
let i = [], a = 0, o = 0;
|
|
5
|
+
for (let s of n.matchAll(e)) {
|
|
6
|
+
if (o >= r) break;
|
|
7
|
+
let e = s.index ?? 0, c = s[0].replace(t, ""), l;
|
|
8
|
+
try {
|
|
9
|
+
let e = new URL(c);
|
|
10
|
+
if (e.protocol !== "http:" && e.protocol !== "https:" || e.username || e.password || !e.hostname) continue;
|
|
11
|
+
l = e.href;
|
|
12
|
+
} catch {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
e > a && i.push({
|
|
16
|
+
kind: "text",
|
|
17
|
+
text: n.slice(a, e)
|
|
18
|
+
}), i.push({
|
|
19
|
+
kind: "link",
|
|
20
|
+
text: c,
|
|
21
|
+
href: l
|
|
22
|
+
}), a = e + c.length, o++;
|
|
23
|
+
}
|
|
24
|
+
return a < n.length && i.push({
|
|
25
|
+
kind: "text",
|
|
26
|
+
text: n.slice(a)
|
|
27
|
+
}), i;
|
|
28
|
+
};
|
|
29
|
+
export { n as chatMessageSegments };
|
package/dist/rpc.d.ts
CHANGED
|
@@ -52,6 +52,8 @@ declare const ChatError_base: Schema.Class<ChatError, Schema.TaggedStruct<"ChatE
|
|
|
52
52
|
|
|
53
53
|
export declare const chatRpcClientImports: ReadonlyArray<PluginRpcClientDescriptor>;
|
|
54
54
|
|
|
55
|
+
export declare const chatVoiceRpcClientImports: ReadonlyArray<PluginRpcClientDescriptor>;
|
|
56
|
+
|
|
55
57
|
export declare const configureDescriptor: ActionProcedureDescriptor<"chat.configure", Schema.Struct<{
|
|
56
58
|
readonly channelId: Schema.NonEmptyString;
|
|
57
59
|
readonly slowModeMs: Schema.optional<Schema.Number>;
|
|
@@ -292,4 +294,16 @@ export declare const unreadDescriptor: QueryProcedureDescriptor<"chat.unread", S
|
|
|
292
294
|
readonly truncated: Schema.Boolean;
|
|
293
295
|
}>>, typeof ChatError>;
|
|
294
296
|
|
|
297
|
+
/** Voice chat (`chatPlugin({ voice })`): a join ticket for the channel's voice room at the configured SFU. */
|
|
298
|
+
export declare const voiceJoinDescriptor: ActionProcedureDescriptor<"chat.voice.join", Schema.Struct<{
|
|
299
|
+
readonly channelId: Schema.NonEmptyString;
|
|
300
|
+
}>, Schema.Struct<{
|
|
301
|
+
readonly provider: Schema.String;
|
|
302
|
+
readonly room: Schema.String;
|
|
303
|
+
readonly canPublish: Schema.Boolean;
|
|
304
|
+
readonly url: Schema.String;
|
|
305
|
+
readonly token: Schema.String;
|
|
306
|
+
readonly expiresAt: Schema.Number;
|
|
307
|
+
}>, typeof ChatError>;
|
|
308
|
+
|
|
295
309
|
export { }
|
package/dist/rpc.js
CHANGED
|
@@ -226,7 +226,27 @@ var g = "@voltro/plugin-chat", _ = "The handler verifies human identity, same-te
|
|
|
226
226
|
output: p.Void,
|
|
227
227
|
error: e,
|
|
228
228
|
openAccess: _
|
|
229
|
-
}), B =
|
|
229
|
+
}), B = m({
|
|
230
|
+
name: "chat.voice.join",
|
|
231
|
+
input: y,
|
|
232
|
+
output: p.Struct({
|
|
233
|
+
provider: p.String,
|
|
234
|
+
room: p.String,
|
|
235
|
+
canPublish: p.Boolean,
|
|
236
|
+
url: p.String,
|
|
237
|
+
token: p.String,
|
|
238
|
+
expiresAt: p.Number
|
|
239
|
+
}),
|
|
240
|
+
error: e,
|
|
241
|
+
openAccess: "Channel member; a muted member may listen only. The token is short-lived and for this channel only."
|
|
242
|
+
}), V = [{
|
|
243
|
+
tag: "chat.voice.join",
|
|
244
|
+
kind: "action",
|
|
245
|
+
import: {
|
|
246
|
+
module: "@voltro/plugin-chat/rpc",
|
|
247
|
+
name: "voiceJoinDescriptor"
|
|
248
|
+
}
|
|
249
|
+
}], H = [...[
|
|
230
250
|
"setTyping",
|
|
231
251
|
"dm",
|
|
232
252
|
"send",
|
|
@@ -263,4 +283,4 @@ var g = "@voltro/plugin-chat", _ = "The handler verifies human identity, same-te
|
|
|
263
283
|
name: e + "Descriptor"
|
|
264
284
|
}
|
|
265
285
|
}))];
|
|
266
|
-
export { g as BASE_NAME, D as authorsDescriptor, O as channelDescriptor, A as channelsDescriptor,
|
|
286
|
+
export { g as BASE_NAME, D as authorsDescriptor, O as channelDescriptor, A as channelsDescriptor, H as chatRpcClientImports, V as chatVoiceRpcClientImports, I as configureDescriptor, x as dmDescriptor, C as editDescriptor, L as joinDescriptor, R as leaveDescriptor, P as markReadDescriptor, N as mediaUrlDescriptor, k as membershipDescriptor, E as mentionCandidatesDescriptor, T as messagesDescriptor, F as muteDescriptor, M as originalDescriptor, w as removeDescriptor, S as sendDescriptor, b as setTypingDescriptor, z as transferOwnershipDescriptor, j as unreadDescriptor, B as voiceJoinDescriptor };
|
package/dist/server.d.ts
CHANGED
|
@@ -68,6 +68,9 @@ export declare interface ChatAdministrationService {
|
|
|
68
68
|
|
|
69
69
|
declare type ChatChannel = typeof ChatChannelSchema.Type;
|
|
70
70
|
|
|
71
|
+
/** The id of the channel `createChannel` makes for one tenant, kind and reference. */
|
|
72
|
+
export declare const chatChannelId: (tenantId: string, kind: string, refId: string) => string;
|
|
73
|
+
|
|
71
74
|
declare const ChatChannelSchema: Schema.Struct<{
|
|
72
75
|
readonly id: Schema.String;
|
|
73
76
|
readonly kind: Schema.Literals<readonly ["global", "lobby", "party", "guild", "match", "dm", "custom"]>;
|
package/dist/server.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { chatChannelId as e } from "./service.js";
|
|
2
|
+
import { CHAT_MENTION_NOTIFICATION_EFFECT as t, CHAT_MENTION_NOTIFICATION_GUARD as n, createChatMentionNotifications as r } from "./mentionNotifications.js";
|
|
3
|
+
import { chatSanctionEvidenceCollector as i } from "./reportEvidence.js";
|
|
4
|
+
import { Context as a } from "effect";
|
|
4
5
|
// src/server.ts
|
|
5
|
-
var
|
|
6
|
-
export {
|
|
6
|
+
var o = class extends a.Service()("@voltro/ChatAdministration") {};
|
|
7
|
+
export { t as CHAT_MENTION_NOTIFICATION_EFFECT, n as CHAT_MENTION_NOTIFICATION_GUARD, o as ChatAdministration, e as chatChannelId, i as chatSanctionEvidenceCollector, r as createChatMentionNotifications };
|