@helyx/bot 1.4.0 → 1.5.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 +23 -0
- package/dist/channel-audit-configuration.d.ts +7 -0
- package/dist/channel-audit-configuration.js +40 -0
- package/dist/channel-audit-control.d.ts +14 -0
- package/dist/channel-audit-control.js +61 -0
- package/dist/channel-audit-permissions.d.ts +56 -0
- package/dist/channel-audit-permissions.js +417 -0
- package/dist/channel-audit-routes.d.ts +4 -0
- package/dist/channel-audit-routes.js +42 -0
- package/dist/cloud-connector.js +2 -0
- package/dist/cloud-control-dispatcher.js +22 -0
- package/dist/control-errors.d.ts +8 -0
- package/dist/control-errors.js +24 -0
- package/dist/control-server-schemas.d.ts +2 -2
- package/dist/control-server.d.ts +4 -1
- package/dist/control-server.js +18 -25
- package/dist/discord-channel-audit.d.ts +9 -0
- package/dist/discord-channel-audit.js +195 -0
- package/dist/discord-guild-health.d.ts +2 -2
- package/dist/discord-role-safety.d.ts +4 -0
- package/dist/discord-role-safety.js +30 -0
- package/dist/events.d.ts +2 -0
- package/dist/events.js +5 -20
- package/dist/hosted-server-moderation.d.ts +2 -2
- package/dist/shard-contracts.d.ts +87 -0
- package/dist/shard-contracts.js +39 -0
- package/dist/shard-router.d.ts +2 -0
- package/dist/shard-router.js +12 -0
- package/package.json +5 -5
|
@@ -286,6 +286,35 @@ export declare const shardControlOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
286
286
|
moduleIds: z.ZodArray<z.ZodString>;
|
|
287
287
|
expectedRevision: z.ZodString;
|
|
288
288
|
idempotencyKey: z.ZodString;
|
|
289
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
290
|
+
actorUserId: z.ZodString;
|
|
291
|
+
correlationId: z.ZodString;
|
|
292
|
+
kind: z.ZodLiteral<"guild.module.channel-audit.config.read">;
|
|
293
|
+
guildId: z.ZodString;
|
|
294
|
+
moduleId: z.ZodEnum<{
|
|
295
|
+
"helyx.account-gate": "helyx.account-gate";
|
|
296
|
+
"helyx.verification": "helyx.verification";
|
|
297
|
+
}>;
|
|
298
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
299
|
+
actorUserId: z.ZodString;
|
|
300
|
+
correlationId: z.ZodString;
|
|
301
|
+
kind: z.ZodLiteral<"guild.module.channel-audit.check">;
|
|
302
|
+
guildId: z.ZodString;
|
|
303
|
+
moduleId: z.ZodEnum<{
|
|
304
|
+
"helyx.account-gate": "helyx.account-gate";
|
|
305
|
+
"helyx.verification": "helyx.verification";
|
|
306
|
+
}>;
|
|
307
|
+
assumptions: z.ZodObject<{
|
|
308
|
+
entryChannelId: z.ZodString;
|
|
309
|
+
beforeRoleIds: z.ZodArray<z.ZodString>;
|
|
310
|
+
afterRoleId: z.ZodString;
|
|
311
|
+
entrance: z.ZodEnum<{
|
|
312
|
+
public: "public";
|
|
313
|
+
restricted: "restricted";
|
|
314
|
+
}>;
|
|
315
|
+
allowedChannelIds: z.ZodArray<z.ZodString>;
|
|
316
|
+
reviewChannelId: z.ZodOptional<z.ZodString>;
|
|
317
|
+
}, z.core.$strict>;
|
|
289
318
|
}, z.core.$strict>, z.ZodObject<{
|
|
290
319
|
actorUserId: z.ZodString;
|
|
291
320
|
correlationId: z.ZodString;
|
|
@@ -742,6 +771,35 @@ export declare const shardControlRequestSchema: z.ZodObject<{
|
|
|
742
771
|
moduleIds: z.ZodArray<z.ZodString>;
|
|
743
772
|
expectedRevision: z.ZodString;
|
|
744
773
|
idempotencyKey: z.ZodString;
|
|
774
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
775
|
+
actorUserId: z.ZodString;
|
|
776
|
+
correlationId: z.ZodString;
|
|
777
|
+
kind: z.ZodLiteral<"guild.module.channel-audit.config.read">;
|
|
778
|
+
guildId: z.ZodString;
|
|
779
|
+
moduleId: z.ZodEnum<{
|
|
780
|
+
"helyx.account-gate": "helyx.account-gate";
|
|
781
|
+
"helyx.verification": "helyx.verification";
|
|
782
|
+
}>;
|
|
783
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
784
|
+
actorUserId: z.ZodString;
|
|
785
|
+
correlationId: z.ZodString;
|
|
786
|
+
kind: z.ZodLiteral<"guild.module.channel-audit.check">;
|
|
787
|
+
guildId: z.ZodString;
|
|
788
|
+
moduleId: z.ZodEnum<{
|
|
789
|
+
"helyx.account-gate": "helyx.account-gate";
|
|
790
|
+
"helyx.verification": "helyx.verification";
|
|
791
|
+
}>;
|
|
792
|
+
assumptions: z.ZodObject<{
|
|
793
|
+
entryChannelId: z.ZodString;
|
|
794
|
+
beforeRoleIds: z.ZodArray<z.ZodString>;
|
|
795
|
+
afterRoleId: z.ZodString;
|
|
796
|
+
entrance: z.ZodEnum<{
|
|
797
|
+
public: "public";
|
|
798
|
+
restricted: "restricted";
|
|
799
|
+
}>;
|
|
800
|
+
allowedChannelIds: z.ZodArray<z.ZodString>;
|
|
801
|
+
reviewChannelId: z.ZodOptional<z.ZodString>;
|
|
802
|
+
}, z.core.$strict>;
|
|
745
803
|
}, z.core.$strict>, z.ZodObject<{
|
|
746
804
|
actorUserId: z.ZodString;
|
|
747
805
|
correlationId: z.ZodString;
|
|
@@ -1703,6 +1761,35 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1703
1761
|
moduleIds: z.ZodArray<z.ZodString>;
|
|
1704
1762
|
expectedRevision: z.ZodString;
|
|
1705
1763
|
idempotencyKey: z.ZodString;
|
|
1764
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1765
|
+
actorUserId: z.ZodString;
|
|
1766
|
+
correlationId: z.ZodString;
|
|
1767
|
+
kind: z.ZodLiteral<"guild.module.channel-audit.config.read">;
|
|
1768
|
+
guildId: z.ZodString;
|
|
1769
|
+
moduleId: z.ZodEnum<{
|
|
1770
|
+
"helyx.account-gate": "helyx.account-gate";
|
|
1771
|
+
"helyx.verification": "helyx.verification";
|
|
1772
|
+
}>;
|
|
1773
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1774
|
+
actorUserId: z.ZodString;
|
|
1775
|
+
correlationId: z.ZodString;
|
|
1776
|
+
kind: z.ZodLiteral<"guild.module.channel-audit.check">;
|
|
1777
|
+
guildId: z.ZodString;
|
|
1778
|
+
moduleId: z.ZodEnum<{
|
|
1779
|
+
"helyx.account-gate": "helyx.account-gate";
|
|
1780
|
+
"helyx.verification": "helyx.verification";
|
|
1781
|
+
}>;
|
|
1782
|
+
assumptions: z.ZodObject<{
|
|
1783
|
+
entryChannelId: z.ZodString;
|
|
1784
|
+
beforeRoleIds: z.ZodArray<z.ZodString>;
|
|
1785
|
+
afterRoleId: z.ZodString;
|
|
1786
|
+
entrance: z.ZodEnum<{
|
|
1787
|
+
public: "public";
|
|
1788
|
+
restricted: "restricted";
|
|
1789
|
+
}>;
|
|
1790
|
+
allowedChannelIds: z.ZodArray<z.ZodString>;
|
|
1791
|
+
reviewChannelId: z.ZodOptional<z.ZodString>;
|
|
1792
|
+
}, z.core.$strict>;
|
|
1706
1793
|
}, z.core.$strict>, z.ZodObject<{
|
|
1707
1794
|
actorUserId: z.ZodString;
|
|
1708
1795
|
correlationId: z.ZodString;
|
package/dist/shard-contracts.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { channelAuditModuleIdSchema, channelAuditInputSchema, channelAuditConfigurationSchema, channelAuditReportSchema, } from "@helyx/control-protocol/channel-audit";
|
|
2
3
|
import { CLOUD_MAX_RESOURCE_IMPORT_BYTES, creatorOnboardingRequestSchema, } from "@helyx/control-protocol";
|
|
3
4
|
import { AUTOMOD_SCANNER_LIMITS } from "@helyx/sdk";
|
|
4
5
|
import { signedAssessmentEnvelopeSchema } from "@helyx/verification-contracts";
|
|
@@ -355,6 +356,23 @@ export const shardControlOperationSchema = z.discriminatedUnion("kind", [
|
|
|
355
356
|
...mutationContext.shape,
|
|
356
357
|
})
|
|
357
358
|
.strict(),
|
|
359
|
+
z
|
|
360
|
+
.object({
|
|
361
|
+
kind: z.literal("guild.module.channel-audit.config.read"),
|
|
362
|
+
guildId: snowflake,
|
|
363
|
+
moduleId: channelAuditModuleIdSchema,
|
|
364
|
+
...mutationContext.shape,
|
|
365
|
+
})
|
|
366
|
+
.strict(),
|
|
367
|
+
z
|
|
368
|
+
.object({
|
|
369
|
+
kind: z.literal("guild.module.channel-audit.check"),
|
|
370
|
+
guildId: snowflake,
|
|
371
|
+
moduleId: channelAuditModuleIdSchema,
|
|
372
|
+
assumptions: channelAuditInputSchema,
|
|
373
|
+
...mutationContext.shape,
|
|
374
|
+
})
|
|
375
|
+
.strict(),
|
|
358
376
|
z
|
|
359
377
|
.object({
|
|
360
378
|
kind: z.literal("guild.module.configuration.update"),
|
|
@@ -1117,6 +1135,27 @@ export async function executeShardControlOperation(handler, operation) {
|
|
|
1117
1135
|
correlationId: operation.correlationId,
|
|
1118
1136
|
});
|
|
1119
1137
|
}
|
|
1138
|
+
case "guild.module.channel-audit.config.read": {
|
|
1139
|
+
if (!handler.readChannelAuditConfiguration)
|
|
1140
|
+
throw new Error("Channel audit is not supported by this shard version");
|
|
1141
|
+
return channelAuditConfigurationSchema.parse(await handler.readChannelAuditConfiguration({
|
|
1142
|
+
guildId: operation.guildId,
|
|
1143
|
+
moduleId: operation.moduleId,
|
|
1144
|
+
actorUserId: operation.actorUserId,
|
|
1145
|
+
correlationId: operation.correlationId,
|
|
1146
|
+
}));
|
|
1147
|
+
}
|
|
1148
|
+
case "guild.module.channel-audit.check": {
|
|
1149
|
+
if (!handler.checkChannelAudit)
|
|
1150
|
+
throw new Error("Channel audit is not supported by this shard version");
|
|
1151
|
+
return channelAuditReportSchema.parse(await handler.checkChannelAudit({
|
|
1152
|
+
guildId: operation.guildId,
|
|
1153
|
+
moduleId: operation.moduleId,
|
|
1154
|
+
actorUserId: operation.actorUserId,
|
|
1155
|
+
correlationId: operation.correlationId,
|
|
1156
|
+
assumptions: operation.assumptions,
|
|
1157
|
+
}));
|
|
1158
|
+
}
|
|
1120
1159
|
case "guild.module.configuration.update": {
|
|
1121
1160
|
return handler.updateConfiguration({
|
|
1122
1161
|
guildId: operation.guildId,
|
package/dist/shard-router.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export declare class ShardControlRouter implements BotControlHandler {
|
|
|
48
48
|
listGuildPresence(input: Parameters<BotControlHandler["listGuildPresence"]>[0]): ReturnType<BotControlHandler["listGuildPresence"]>;
|
|
49
49
|
setModuleStatus(input: Parameters<BotControlHandler["setModuleStatus"]>[0]): ReturnType<BotControlHandler["setModuleStatus"]>;
|
|
50
50
|
completeFirstTimeCommandSetup(input: Parameters<BotControlHandler["completeFirstTimeCommandSetup"]>[0]): ReturnType<BotControlHandler["completeFirstTimeCommandSetup"]>;
|
|
51
|
+
readChannelAuditConfiguration(input: Parameters<NonNullable<BotControlHandler["readChannelAuditConfiguration"]>>[0]): ReturnType<NonNullable<BotControlHandler["readChannelAuditConfiguration"]>>;
|
|
52
|
+
checkChannelAudit(input: Parameters<NonNullable<BotControlHandler["checkChannelAudit"]>>[0]): ReturnType<NonNullable<BotControlHandler["checkChannelAudit"]>>;
|
|
51
53
|
updateConfiguration(input: Parameters<BotControlHandler["updateConfiguration"]>[0]): ReturnType<BotControlHandler["updateConfiguration"]>;
|
|
52
54
|
previewConfiguration(input: Parameters<BotControlHandler["previewConfiguration"]>[0]): ReturnType<BotControlHandler["previewConfiguration"]>;
|
|
53
55
|
updatePermissions(input: Parameters<BotControlHandler["updatePermissions"]>[0]): ReturnType<BotControlHandler["updatePermissions"]>;
|
package/dist/shard-router.js
CHANGED
|
@@ -117,6 +117,18 @@ export class ShardControlRouter {
|
|
|
117
117
|
expectedRevision: input.expectedRevision.toString(),
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
+
readChannelAuditConfiguration(input) {
|
|
121
|
+
return this.#route(shardControlOperationSchema.parse({
|
|
122
|
+
kind: "guild.module.channel-audit.config.read",
|
|
123
|
+
...input,
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
checkChannelAudit(input) {
|
|
127
|
+
return this.#route(shardControlOperationSchema.parse({
|
|
128
|
+
kind: "guild.module.channel-audit.check",
|
|
129
|
+
...input,
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
120
132
|
updateConfiguration(input) {
|
|
121
133
|
return this.#route(shardControlOperationSchema.parse({
|
|
122
134
|
kind: "guild.module.configuration.update",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helyx/bot",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Production Discord runtime for the modular Helyx platform.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"helyx",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@helyx/config": ">=1.4.0 <2.0.0",
|
|
54
|
-
"@helyx/control-protocol": ">=0.
|
|
54
|
+
"@helyx/control-protocol": ">=0.8.0 <0.9.0",
|
|
55
55
|
"@helyx/core": ">=0.2.0 <0.3.0",
|
|
56
56
|
"@helyx/database": ">=2.4.0 <3.0.0",
|
|
57
57
|
"@helyx/database-contracts": ">=0.2.0 <0.3.0",
|
|
58
58
|
"@helyx/framework": ">=0.2.0 <0.3.0",
|
|
59
59
|
"@helyx/module-manifest": ">=0.13.0 <0.14.0",
|
|
60
60
|
"@helyx/platform": ">=1.3.0 <2.0.0",
|
|
61
|
-
"@helyx/sdk": ">=0.
|
|
61
|
+
"@helyx/sdk": ">=0.16.0 <0.17.0",
|
|
62
62
|
"@helyx/status-client": ">=0.3.0 <0.4.0",
|
|
63
63
|
"@helyx/verification-contracts": ">=0.4.0 <0.5.0",
|
|
64
64
|
"discord.js": "14.27.0",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@helyx/database-mysql": ">=0.2.0 <0.3.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@helyx/module-automod": ">=1.1.
|
|
77
|
-
"@helyx/module-moderation": ">=1.1.
|
|
76
|
+
"@helyx/module-automod": ">=1.1.1 <2.0.0",
|
|
77
|
+
"@helyx/module-moderation": ">=1.1.1 <2.0.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"@helyx/module-automod": {
|