@helyx/bot 0.4.8 → 0.4.11

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.
@@ -0,0 +1,5 @@
1
+ import { PlatformNumericWriteBehindService, type NumericWriteBehindRegistration } from "@helyx/platform";
2
+ import { type ModuleDefinition } from "@helyx/sdk";
3
+ export declare function numericWriteBehindRegistrations(modules: readonly ModuleDefinition[]): readonly NumericWriteBehindRegistration[];
4
+ export declare function createLocalNumericWriteBehind(services: ReadonlyMap<string, unknown>, modules: readonly ModuleDefinition[]): PlatformNumericWriteBehindService;
5
+ //# sourceMappingURL=numeric-write-behind.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { PlatformNumericWriteBehindService, } from "@helyx/platform";
2
+ import { HELYX_SERVICE_NAMES, } from "@helyx/sdk";
3
+ export function numericWriteBehindRegistrations(modules) {
4
+ const registrations = [];
5
+ for (const module of modules) {
6
+ for (const [collection, definition] of Object.entries(module.records ?? {})) {
7
+ if ((definition.incrementableFields?.length ?? 0) === 0)
8
+ continue;
9
+ const uniqueBy = definition.uniqueKeys?.find((key) => key.length > 0 &&
10
+ key.every((field) => definition.fields[field] !== undefined &&
11
+ definition.fields[field].optional !== true));
12
+ const select = definition.readableFields?.filter((field) => {
13
+ const type = definition.fields[field]?.type;
14
+ return type === "number" || type === "date";
15
+ });
16
+ if (!uniqueBy?.length || !select?.length)
17
+ throw new Error(`Numeric write-behind collection requires a non-optional unique key and readable numeric result fields: ${module.manifest.id}/${collection}`);
18
+ registrations.push({
19
+ moduleId: module.manifest.id,
20
+ collection,
21
+ uniqueBy,
22
+ select,
23
+ });
24
+ }
25
+ }
26
+ return registrations;
27
+ }
28
+ export function createLocalNumericWriteBehind(services, modules) {
29
+ const writer = services.get(HELYX_SERVICE_NAMES.records);
30
+ if (!writer)
31
+ throw new Error("Numeric write-behind requires the module record service");
32
+ return new PlatformNumericWriteBehindService({
33
+ writer,
34
+ registrations: numericWriteBehindRegistrations(modules),
35
+ });
36
+ }
37
+ //# sourceMappingURL=numeric-write-behind.js.map
@@ -306,11 +306,17 @@ export function createLocalScheduledTaskRoute(input) {
306
306
  .execute(retentionTaskId);
307
307
  return result.completed
308
308
  ? { outcome: "completed" }
309
- : {
310
- outcome: "deferred",
311
- delayMs: 100,
312
- safeCode: "retention_batch_remaining",
313
- };
309
+ : result.deferredUntil
310
+ ? {
311
+ outcome: "deferred",
312
+ delayMs: Math.max(100, Math.min(86_400_000, result.deferredUntil.getTime() - Date.now())),
313
+ safeCode: "retention_rescheduled",
314
+ }
315
+ : {
316
+ outcome: "deferred",
317
+ delayMs: 100,
318
+ safeCode: "retention_batch_remaining",
319
+ };
314
320
  }
315
321
  const module = modules.get(task.moduleId);
316
322
  if (!module)
@@ -3,7 +3,7 @@ import type { ManagedResourceValue } from "@helyx/sdk";
3
3
  import type { BotControlHandler } from "./control-server.js";
4
4
  export declare const SHARD_CONTRACT_VERSION: 1;
5
5
  export declare const SHARD_CONTROL_MAX_BYTES: number;
6
- export declare const SHARD_CONTROL_TIMEOUT_MS = 10000;
6
+ export declare const SHARD_CONTROL_TIMEOUT_MS = 30000;
7
7
  export declare const SHARD_HEALTH_STALE_MS = 30000;
8
8
  export declare const SHARD_LEASE_HEARTBEAT_TIMEOUT_MS = 20000;
9
9
  export declare const shardIdentitySchema: z.ZodObject<{
@@ -182,7 +182,7 @@ export declare const shardControlOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
182
182
  kind: z.ZodLiteral<"guild.module.configuration.update">;
183
183
  guildId: z.ZodString;
184
184
  moduleId: z.ZodString;
185
- value: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
185
+ value: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNull, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
186
186
  expectedVersion: z.ZodNullable<z.ZodNumber>;
187
187
  }, z.core.$strict>, z.ZodObject<{
188
188
  actorUserId: z.ZodString;
@@ -314,6 +314,7 @@ export declare const shardControlOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
314
314
  actionId: z.ZodString;
315
315
  expectedRevision: z.ZodNumber;
316
316
  value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
317
+ actorAuthenticatedAt: z.ZodOptional<z.ZodISODateTime>;
317
318
  }, z.core.$strict>, z.ZodObject<{
318
319
  kind: z.ZodLiteral<"support.notification.send">;
319
320
  guildId: z.ZodString;
@@ -380,7 +381,7 @@ export declare const shardControlRequestSchema: z.ZodObject<{
380
381
  kind: z.ZodLiteral<"guild.module.configuration.update">;
381
382
  guildId: z.ZodString;
382
383
  moduleId: z.ZodString;
383
- value: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
384
+ value: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNull, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
384
385
  expectedVersion: z.ZodNullable<z.ZodNumber>;
385
386
  }, z.core.$strict>, z.ZodObject<{
386
387
  actorUserId: z.ZodString;
@@ -512,6 +513,7 @@ export declare const shardControlRequestSchema: z.ZodObject<{
512
513
  actionId: z.ZodString;
513
514
  expectedRevision: z.ZodNumber;
514
515
  value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
516
+ actorAuthenticatedAt: z.ZodOptional<z.ZodISODateTime>;
515
517
  }, z.core.$strict>, z.ZodObject<{
516
518
  kind: z.ZodLiteral<"support.notification.send">;
517
519
  guildId: z.ZodString;
@@ -815,6 +817,251 @@ export declare const shardScheduledTaskResponseSchema: z.ZodObject<{
815
817
  }, z.core.$strict>;
816
818
  export type ShardScheduledTaskRequest = z.infer<typeof shardScheduledTaskRequestSchema>;
817
819
  export type ShardScheduledTaskResponse = z.infer<typeof shardScheduledTaskResponseSchema>;
820
+ export declare const shardNumericRequestSchema: z.ZodObject<{
821
+ version: z.ZodLiteral<1>;
822
+ type: z.ZodLiteral<"helyx.numeric.request">;
823
+ requestId: z.ZodUUID;
824
+ deadlineAt: z.ZodISODateTime;
825
+ identity: z.ZodObject<{
826
+ version: z.ZodLiteral<1>;
827
+ mode: z.ZodEnum<{
828
+ readonly auto: "auto";
829
+ readonly fixed: "fixed";
830
+ }>;
831
+ scope: z.ZodEnum<{
832
+ readonly local: "local";
833
+ readonly coordinated: "coordinated";
834
+ }>;
835
+ generation: z.ZodString;
836
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
837
+ supervisorId: z.ZodUUID;
838
+ shardId: z.ZodNumber;
839
+ shardCount: z.ZodNumber;
840
+ fencingToken: z.ZodNumber;
841
+ }, z.core.$strict>;
842
+ operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
843
+ occurredAt: z.ZodISODateTime;
844
+ cooldownSeconds: z.ZodNumber;
845
+ identity: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
846
+ type: z.ZodLiteral<"string">;
847
+ value: z.ZodString;
848
+ }, z.core.$strict>, z.ZodObject<{
849
+ type: z.ZodLiteral<"boolean">;
850
+ value: z.ZodBoolean;
851
+ }, z.core.$strict>, z.ZodObject<{
852
+ type: z.ZodLiteral<"number">;
853
+ value: z.ZodNumber;
854
+ }, z.core.$strict>, z.ZodObject<{
855
+ type: z.ZodLiteral<"date">;
856
+ value: z.ZodISODateTime;
857
+ }, z.core.$strict>], "type">>;
858
+ insert: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
859
+ type: z.ZodLiteral<"string">;
860
+ value: z.ZodString;
861
+ }, z.core.$strict>, z.ZodObject<{
862
+ type: z.ZodLiteral<"boolean">;
863
+ value: z.ZodBoolean;
864
+ }, z.core.$strict>, z.ZodObject<{
865
+ type: z.ZodLiteral<"number">;
866
+ value: z.ZodNumber;
867
+ }, z.core.$strict>, z.ZodObject<{
868
+ type: z.ZodLiteral<"date">;
869
+ value: z.ZodISODateTime;
870
+ }, z.core.$strict>], "type">>;
871
+ increments: z.ZodRecord<z.ZodString, z.ZodNumber>;
872
+ maxima: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodISODateTime>>;
873
+ guildId: z.ZodString;
874
+ subjectId: z.ZodString;
875
+ moduleId: z.ZodString;
876
+ collection: z.ZodString;
877
+ kind: z.ZodLiteral<"enqueue">;
878
+ }, z.core.$strict>, z.ZodObject<{
879
+ guildId: z.ZodString;
880
+ subjectId: z.ZodString;
881
+ moduleId: z.ZodString;
882
+ collection: z.ZodString;
883
+ kind: z.ZodLiteral<"pending.member">;
884
+ }, z.core.$strict>, z.ZodObject<{
885
+ guildId: z.ZodString;
886
+ subjectId: z.ZodString;
887
+ moduleId: z.ZodString;
888
+ collection: z.ZodString;
889
+ kind: z.ZodLiteral<"flush.member">;
890
+ }, z.core.$strict>, z.ZodObject<{
891
+ guildId: z.ZodString;
892
+ moduleId: z.ZodString;
893
+ collection: z.ZodString;
894
+ kind: z.ZodLiteral<"flush.guild">;
895
+ }, z.core.$strict>, z.ZodObject<{
896
+ subjectId: z.ZodString;
897
+ moduleId: z.ZodString;
898
+ collection: z.ZodString;
899
+ kind: z.ZodLiteral<"flush.subject">;
900
+ }, z.core.$strict>, z.ZodObject<{
901
+ moduleId: z.ZodString;
902
+ collection: z.ZodString;
903
+ kind: z.ZodLiteral<"flush.module">;
904
+ }, z.core.$strict>, z.ZodObject<{
905
+ barrierType: z.ZodEnum<{
906
+ readonly member: "member";
907
+ readonly guild: "guild";
908
+ readonly subject: "subject";
909
+ }>;
910
+ guildId: z.ZodOptional<z.ZodString>;
911
+ subjectId: z.ZodOptional<z.ZodString>;
912
+ moduleId: z.ZodString;
913
+ collection: z.ZodString;
914
+ kind: z.ZodLiteral<"barrier.acquire">;
915
+ }, z.core.$strict>, z.ZodObject<{
916
+ barrierType: z.ZodEnum<{
917
+ readonly member: "member";
918
+ readonly guild: "guild";
919
+ readonly subject: "subject";
920
+ }>;
921
+ guildId: z.ZodOptional<z.ZodString>;
922
+ subjectId: z.ZodOptional<z.ZodString>;
923
+ barrierId: z.ZodUUID;
924
+ moduleId: z.ZodString;
925
+ collection: z.ZodString;
926
+ kind: z.ZodLiteral<"barrier.release">;
927
+ }, z.core.$strict>, z.ZodObject<{
928
+ barrierType: z.ZodEnum<{
929
+ readonly member: "member";
930
+ readonly guild: "guild";
931
+ readonly subject: "subject";
932
+ }>;
933
+ guildId: z.ZodOptional<z.ZodString>;
934
+ subjectId: z.ZodOptional<z.ZodString>;
935
+ barrierId: z.ZodUUID;
936
+ moduleId: z.ZodString;
937
+ collection: z.ZodString;
938
+ kind: z.ZodLiteral<"barrier.renew">;
939
+ }, z.core.$strict>, z.ZodObject<{
940
+ subjectId: z.ZodString;
941
+ cutoff: z.ZodISODateTime;
942
+ moduleId: z.ZodString;
943
+ collection: z.ZodString;
944
+ kind: z.ZodLiteral<"suppress.subject">;
945
+ }, z.core.$strict>, z.ZodObject<{
946
+ guildId: z.ZodString;
947
+ moduleId: z.ZodString;
948
+ collection: z.ZodString;
949
+ kind: z.ZodLiteral<"suppress.guild">;
950
+ }, z.core.$strict>, z.ZodObject<{
951
+ guildId: z.ZodString;
952
+ suppressionId: z.ZodUUID;
953
+ moduleId: z.ZodString;
954
+ collection: z.ZodString;
955
+ kind: z.ZodLiteral<"release.guild">;
956
+ }, z.core.$strict>, z.ZodObject<{
957
+ subjectId: z.ZodString;
958
+ suppressionId: z.ZodUUID;
959
+ moduleId: z.ZodString;
960
+ collection: z.ZodString;
961
+ kind: z.ZodLiteral<"release.subject">;
962
+ }, z.core.$strict>, z.ZodObject<{
963
+ guildId: z.ZodString;
964
+ subjectId: z.ZodString;
965
+ moduleId: z.ZodString;
966
+ collection: z.ZodString;
967
+ kind: z.ZodLiteral<"cooldown.member.clear">;
968
+ }, z.core.$strict>, z.ZodObject<{
969
+ subjectId: z.ZodString;
970
+ moduleId: z.ZodString;
971
+ collection: z.ZodString;
972
+ kind: z.ZodLiteral<"cooldown.subject.clear">;
973
+ }, z.core.$strict>], "kind">;
974
+ }, z.core.$strict>;
975
+ export declare const shardNumericResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
976
+ version: z.ZodLiteral<1>;
977
+ type: z.ZodLiteral<"helyx.numeric.response">;
978
+ requestId: z.ZodUUID;
979
+ ok: z.ZodLiteral<true>;
980
+ result: z.ZodUnknown;
981
+ }, z.core.$strict>, z.ZodObject<{
982
+ version: z.ZodLiteral<1>;
983
+ type: z.ZodLiteral<"helyx.numeric.response">;
984
+ requestId: z.ZodUUID;
985
+ ok: z.ZodLiteral<false>;
986
+ safeCode: z.ZodString;
987
+ }, z.core.$strict>], "ok">;
988
+ export type ShardNumericRequest = z.infer<typeof shardNumericRequestSchema>;
989
+ export type ShardNumericResponse = z.infer<typeof shardNumericResponseSchema>;
990
+ export declare const shardNumericCommittedSchema: z.ZodObject<{
991
+ version: z.ZodLiteral<1>;
992
+ type: z.ZodLiteral<"helyx.numeric.committed">;
993
+ requestId: z.ZodUUID;
994
+ deadlineAt: z.ZodISODateTime;
995
+ identity: z.ZodObject<{
996
+ version: z.ZodLiteral<1>;
997
+ mode: z.ZodEnum<{
998
+ readonly auto: "auto";
999
+ readonly fixed: "fixed";
1000
+ }>;
1001
+ scope: z.ZodEnum<{
1002
+ readonly local: "local";
1003
+ readonly coordinated: "coordinated";
1004
+ }>;
1005
+ generation: z.ZodString;
1006
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1007
+ supervisorId: z.ZodUUID;
1008
+ shardId: z.ZodNumber;
1009
+ shardCount: z.ZodNumber;
1010
+ fencingToken: z.ZodNumber;
1011
+ }, z.core.$strict>;
1012
+ scope: z.ZodObject<{
1013
+ moduleId: z.ZodString;
1014
+ collection: z.ZodString;
1015
+ }, z.core.$strict>;
1016
+ payload: z.ZodUnknown;
1017
+ }, z.core.$strict>;
1018
+ export declare const shardNumericCommittedResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1019
+ version: z.ZodLiteral<1>;
1020
+ type: z.ZodLiteral<"helyx.numeric.committed.response">;
1021
+ requestId: z.ZodUUID;
1022
+ identity: z.ZodObject<{
1023
+ version: z.ZodLiteral<1>;
1024
+ mode: z.ZodEnum<{
1025
+ readonly auto: "auto";
1026
+ readonly fixed: "fixed";
1027
+ }>;
1028
+ scope: z.ZodEnum<{
1029
+ readonly local: "local";
1030
+ readonly coordinated: "coordinated";
1031
+ }>;
1032
+ generation: z.ZodString;
1033
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1034
+ supervisorId: z.ZodUUID;
1035
+ shardId: z.ZodNumber;
1036
+ shardCount: z.ZodNumber;
1037
+ fencingToken: z.ZodNumber;
1038
+ }, z.core.$strict>;
1039
+ ok: z.ZodLiteral<true>;
1040
+ }, z.core.$strict>, z.ZodObject<{
1041
+ version: z.ZodLiteral<1>;
1042
+ type: z.ZodLiteral<"helyx.numeric.committed.response">;
1043
+ requestId: z.ZodUUID;
1044
+ identity: z.ZodObject<{
1045
+ version: z.ZodLiteral<1>;
1046
+ mode: z.ZodEnum<{
1047
+ readonly auto: "auto";
1048
+ readonly fixed: "fixed";
1049
+ }>;
1050
+ scope: z.ZodEnum<{
1051
+ readonly local: "local";
1052
+ readonly coordinated: "coordinated";
1053
+ }>;
1054
+ generation: z.ZodString;
1055
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1056
+ supervisorId: z.ZodUUID;
1057
+ shardId: z.ZodNumber;
1058
+ shardCount: z.ZodNumber;
1059
+ fencingToken: z.ZodNumber;
1060
+ }, z.core.$strict>;
1061
+ ok: z.ZodLiteral<false>;
1062
+ safeCode: z.ZodString;
1063
+ }, z.core.$strict>], "ok">;
1064
+ export type ShardNumericCommittedResponse = z.infer<typeof shardNumericCommittedResponseSchema>;
818
1065
  export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
819
1066
  version: z.ZodLiteral<1>;
820
1067
  type: z.ZodLiteral<"helyx.control.request">;
@@ -838,7 +1085,7 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
838
1085
  kind: z.ZodLiteral<"guild.module.configuration.update">;
839
1086
  guildId: z.ZodString;
840
1087
  moduleId: z.ZodString;
841
- value: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
1088
+ value: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNull, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
842
1089
  expectedVersion: z.ZodNullable<z.ZodNumber>;
843
1090
  }, z.core.$strict>, z.ZodObject<{
844
1091
  actorUserId: z.ZodString;
@@ -970,6 +1217,7 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
970
1217
  actionId: z.ZodString;
971
1218
  expectedRevision: z.ZodNumber;
972
1219
  value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
1220
+ actorAuthenticatedAt: z.ZodOptional<z.ZodISODateTime>;
973
1221
  }, z.core.$strict>, z.ZodObject<{
974
1222
  kind: z.ZodLiteral<"support.notification.send">;
975
1223
  guildId: z.ZodString;
@@ -1154,6 +1402,45 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
1154
1402
  payload: z.ZodRecord<z.ZodString, z.ZodString>;
1155
1403
  claimedGeneration: z.ZodNumber;
1156
1404
  }, z.core.$strict>], "delivery">;
1405
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1406
+ version: z.ZodLiteral<1>;
1407
+ type: z.ZodLiteral<"helyx.numeric.response">;
1408
+ requestId: z.ZodUUID;
1409
+ ok: z.ZodLiteral<true>;
1410
+ result: z.ZodUnknown;
1411
+ }, z.core.$strict>, z.ZodObject<{
1412
+ version: z.ZodLiteral<1>;
1413
+ type: z.ZodLiteral<"helyx.numeric.response">;
1414
+ requestId: z.ZodUUID;
1415
+ ok: z.ZodLiteral<false>;
1416
+ safeCode: z.ZodString;
1417
+ }, z.core.$strict>], "ok">, z.ZodObject<{
1418
+ version: z.ZodLiteral<1>;
1419
+ type: z.ZodLiteral<"helyx.numeric.committed">;
1420
+ requestId: z.ZodUUID;
1421
+ deadlineAt: z.ZodISODateTime;
1422
+ identity: z.ZodObject<{
1423
+ version: z.ZodLiteral<1>;
1424
+ mode: z.ZodEnum<{
1425
+ readonly auto: "auto";
1426
+ readonly fixed: "fixed";
1427
+ }>;
1428
+ scope: z.ZodEnum<{
1429
+ readonly local: "local";
1430
+ readonly coordinated: "coordinated";
1431
+ }>;
1432
+ generation: z.ZodString;
1433
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1434
+ supervisorId: z.ZodUUID;
1435
+ shardId: z.ZodNumber;
1436
+ shardCount: z.ZodNumber;
1437
+ fencingToken: z.ZodNumber;
1438
+ }, z.core.$strict>;
1439
+ scope: z.ZodObject<{
1440
+ moduleId: z.ZodString;
1441
+ collection: z.ZodString;
1442
+ }, z.core.$strict>;
1443
+ payload: z.ZodUnknown;
1157
1444
  }, z.core.$strict>, z.ZodObject<{
1158
1445
  version: z.ZodLiteral<1>;
1159
1446
  type: z.ZodLiteral<"helyx.lease.heartbeat">;
@@ -1255,6 +1542,205 @@ export declare const workerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodDiscrimi
1255
1542
  safeCode: z.ZodString;
1256
1543
  }, z.core.$strict>], "outcome">;
1257
1544
  }, z.core.$strict>, z.ZodObject<{
1545
+ version: z.ZodLiteral<1>;
1546
+ type: z.ZodLiteral<"helyx.numeric.request">;
1547
+ requestId: z.ZodUUID;
1548
+ deadlineAt: z.ZodISODateTime;
1549
+ identity: z.ZodObject<{
1550
+ version: z.ZodLiteral<1>;
1551
+ mode: z.ZodEnum<{
1552
+ readonly auto: "auto";
1553
+ readonly fixed: "fixed";
1554
+ }>;
1555
+ scope: z.ZodEnum<{
1556
+ readonly local: "local";
1557
+ readonly coordinated: "coordinated";
1558
+ }>;
1559
+ generation: z.ZodString;
1560
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1561
+ supervisorId: z.ZodUUID;
1562
+ shardId: z.ZodNumber;
1563
+ shardCount: z.ZodNumber;
1564
+ fencingToken: z.ZodNumber;
1565
+ }, z.core.$strict>;
1566
+ operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
1567
+ occurredAt: z.ZodISODateTime;
1568
+ cooldownSeconds: z.ZodNumber;
1569
+ identity: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1570
+ type: z.ZodLiteral<"string">;
1571
+ value: z.ZodString;
1572
+ }, z.core.$strict>, z.ZodObject<{
1573
+ type: z.ZodLiteral<"boolean">;
1574
+ value: z.ZodBoolean;
1575
+ }, z.core.$strict>, z.ZodObject<{
1576
+ type: z.ZodLiteral<"number">;
1577
+ value: z.ZodNumber;
1578
+ }, z.core.$strict>, z.ZodObject<{
1579
+ type: z.ZodLiteral<"date">;
1580
+ value: z.ZodISODateTime;
1581
+ }, z.core.$strict>], "type">>;
1582
+ insert: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1583
+ type: z.ZodLiteral<"string">;
1584
+ value: z.ZodString;
1585
+ }, z.core.$strict>, z.ZodObject<{
1586
+ type: z.ZodLiteral<"boolean">;
1587
+ value: z.ZodBoolean;
1588
+ }, z.core.$strict>, z.ZodObject<{
1589
+ type: z.ZodLiteral<"number">;
1590
+ value: z.ZodNumber;
1591
+ }, z.core.$strict>, z.ZodObject<{
1592
+ type: z.ZodLiteral<"date">;
1593
+ value: z.ZodISODateTime;
1594
+ }, z.core.$strict>], "type">>;
1595
+ increments: z.ZodRecord<z.ZodString, z.ZodNumber>;
1596
+ maxima: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodISODateTime>>;
1597
+ guildId: z.ZodString;
1598
+ subjectId: z.ZodString;
1599
+ moduleId: z.ZodString;
1600
+ collection: z.ZodString;
1601
+ kind: z.ZodLiteral<"enqueue">;
1602
+ }, z.core.$strict>, z.ZodObject<{
1603
+ guildId: z.ZodString;
1604
+ subjectId: z.ZodString;
1605
+ moduleId: z.ZodString;
1606
+ collection: z.ZodString;
1607
+ kind: z.ZodLiteral<"pending.member">;
1608
+ }, z.core.$strict>, z.ZodObject<{
1609
+ guildId: z.ZodString;
1610
+ subjectId: z.ZodString;
1611
+ moduleId: z.ZodString;
1612
+ collection: z.ZodString;
1613
+ kind: z.ZodLiteral<"flush.member">;
1614
+ }, z.core.$strict>, z.ZodObject<{
1615
+ guildId: z.ZodString;
1616
+ moduleId: z.ZodString;
1617
+ collection: z.ZodString;
1618
+ kind: z.ZodLiteral<"flush.guild">;
1619
+ }, z.core.$strict>, z.ZodObject<{
1620
+ subjectId: z.ZodString;
1621
+ moduleId: z.ZodString;
1622
+ collection: z.ZodString;
1623
+ kind: z.ZodLiteral<"flush.subject">;
1624
+ }, z.core.$strict>, z.ZodObject<{
1625
+ moduleId: z.ZodString;
1626
+ collection: z.ZodString;
1627
+ kind: z.ZodLiteral<"flush.module">;
1628
+ }, z.core.$strict>, z.ZodObject<{
1629
+ barrierType: z.ZodEnum<{
1630
+ readonly member: "member";
1631
+ readonly guild: "guild";
1632
+ readonly subject: "subject";
1633
+ }>;
1634
+ guildId: z.ZodOptional<z.ZodString>;
1635
+ subjectId: z.ZodOptional<z.ZodString>;
1636
+ moduleId: z.ZodString;
1637
+ collection: z.ZodString;
1638
+ kind: z.ZodLiteral<"barrier.acquire">;
1639
+ }, z.core.$strict>, z.ZodObject<{
1640
+ barrierType: z.ZodEnum<{
1641
+ readonly member: "member";
1642
+ readonly guild: "guild";
1643
+ readonly subject: "subject";
1644
+ }>;
1645
+ guildId: z.ZodOptional<z.ZodString>;
1646
+ subjectId: z.ZodOptional<z.ZodString>;
1647
+ barrierId: z.ZodUUID;
1648
+ moduleId: z.ZodString;
1649
+ collection: z.ZodString;
1650
+ kind: z.ZodLiteral<"barrier.release">;
1651
+ }, z.core.$strict>, z.ZodObject<{
1652
+ barrierType: z.ZodEnum<{
1653
+ readonly member: "member";
1654
+ readonly guild: "guild";
1655
+ readonly subject: "subject";
1656
+ }>;
1657
+ guildId: z.ZodOptional<z.ZodString>;
1658
+ subjectId: z.ZodOptional<z.ZodString>;
1659
+ barrierId: z.ZodUUID;
1660
+ moduleId: z.ZodString;
1661
+ collection: z.ZodString;
1662
+ kind: z.ZodLiteral<"barrier.renew">;
1663
+ }, z.core.$strict>, z.ZodObject<{
1664
+ subjectId: z.ZodString;
1665
+ cutoff: z.ZodISODateTime;
1666
+ moduleId: z.ZodString;
1667
+ collection: z.ZodString;
1668
+ kind: z.ZodLiteral<"suppress.subject">;
1669
+ }, z.core.$strict>, z.ZodObject<{
1670
+ guildId: z.ZodString;
1671
+ moduleId: z.ZodString;
1672
+ collection: z.ZodString;
1673
+ kind: z.ZodLiteral<"suppress.guild">;
1674
+ }, z.core.$strict>, z.ZodObject<{
1675
+ guildId: z.ZodString;
1676
+ suppressionId: z.ZodUUID;
1677
+ moduleId: z.ZodString;
1678
+ collection: z.ZodString;
1679
+ kind: z.ZodLiteral<"release.guild">;
1680
+ }, z.core.$strict>, z.ZodObject<{
1681
+ subjectId: z.ZodString;
1682
+ suppressionId: z.ZodUUID;
1683
+ moduleId: z.ZodString;
1684
+ collection: z.ZodString;
1685
+ kind: z.ZodLiteral<"release.subject">;
1686
+ }, z.core.$strict>, z.ZodObject<{
1687
+ guildId: z.ZodString;
1688
+ subjectId: z.ZodString;
1689
+ moduleId: z.ZodString;
1690
+ collection: z.ZodString;
1691
+ kind: z.ZodLiteral<"cooldown.member.clear">;
1692
+ }, z.core.$strict>, z.ZodObject<{
1693
+ subjectId: z.ZodString;
1694
+ moduleId: z.ZodString;
1695
+ collection: z.ZodString;
1696
+ kind: z.ZodLiteral<"cooldown.subject.clear">;
1697
+ }, z.core.$strict>], "kind">;
1698
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1699
+ version: z.ZodLiteral<1>;
1700
+ type: z.ZodLiteral<"helyx.numeric.committed.response">;
1701
+ requestId: z.ZodUUID;
1702
+ identity: z.ZodObject<{
1703
+ version: z.ZodLiteral<1>;
1704
+ mode: z.ZodEnum<{
1705
+ readonly auto: "auto";
1706
+ readonly fixed: "fixed";
1707
+ }>;
1708
+ scope: z.ZodEnum<{
1709
+ readonly local: "local";
1710
+ readonly coordinated: "coordinated";
1711
+ }>;
1712
+ generation: z.ZodString;
1713
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1714
+ supervisorId: z.ZodUUID;
1715
+ shardId: z.ZodNumber;
1716
+ shardCount: z.ZodNumber;
1717
+ fencingToken: z.ZodNumber;
1718
+ }, z.core.$strict>;
1719
+ ok: z.ZodLiteral<true>;
1720
+ }, z.core.$strict>, z.ZodObject<{
1721
+ version: z.ZodLiteral<1>;
1722
+ type: z.ZodLiteral<"helyx.numeric.committed.response">;
1723
+ requestId: z.ZodUUID;
1724
+ identity: z.ZodObject<{
1725
+ version: z.ZodLiteral<1>;
1726
+ mode: z.ZodEnum<{
1727
+ readonly auto: "auto";
1728
+ readonly fixed: "fixed";
1729
+ }>;
1730
+ scope: z.ZodEnum<{
1731
+ readonly local: "local";
1732
+ readonly coordinated: "coordinated";
1733
+ }>;
1734
+ generation: z.ZodString;
1735
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1736
+ supervisorId: z.ZodUUID;
1737
+ shardId: z.ZodNumber;
1738
+ shardCount: z.ZodNumber;
1739
+ fencingToken: z.ZodNumber;
1740
+ }, z.core.$strict>;
1741
+ ok: z.ZodLiteral<false>;
1742
+ safeCode: z.ZodString;
1743
+ }, z.core.$strict>], "ok">, z.ZodObject<{
1258
1744
  version: z.ZodLiteral<1>;
1259
1745
  type: z.ZodLiteral<"helyx.health.update">;
1260
1746
  identity: z.ZodObject<{