@helyx/module-reactionroles 1.0.15 → 1.0.18
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 +20 -0
- package/README.md +37 -53
- package/dist/builder-interactions.d.ts +11 -0
- package/dist/builder-interactions.js +293 -0
- package/dist/builder-presentation.d.ts +30 -0
- package/dist/builder-presentation.js +343 -0
- package/dist/builder.d.ts +3 -0
- package/dist/builder.js +22 -16
- package/dist/cleanup-repository.d.ts +24 -0
- package/dist/cleanup-repository.js +118 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +4 -1
- package/dist/health.d.ts +16 -0
- package/dist/health.js +85 -0
- package/dist/index.js +66 -1147
- package/dist/logging.d.ts +33 -0
- package/dist/logging.js +40 -0
- package/dist/managed-resource.d.ts +2 -0
- package/dist/managed-resource.js +72 -0
- package/dist/member-interactions.d.ts +27 -0
- package/dist/member-interactions.js +360 -0
- package/dist/module-lifecycle.d.ts +3 -0
- package/dist/module-lifecycle.js +48 -0
- package/dist/panel-cache.d.ts +30 -0
- package/dist/panel-cache.js +197 -0
- package/dist/panel-create.d.ts +10 -0
- package/dist/panel-create.js +80 -0
- package/dist/panel-lifecycle.d.ts +47 -0
- package/dist/panel-lifecycle.js +272 -0
- package/dist/panel-managed.d.ts +14 -0
- package/dist/panel-managed.js +27 -0
- package/dist/panel-service.d.ts +13 -36
- package/dist/panel-service.js +48 -722
- package/dist/panel-support.d.ts +35 -0
- package/dist/panel-support.js +291 -0
- package/dist/permissions.d.ts +2 -0
- package/dist/permissions.js +8 -0
- package/dist/privacy.d.ts +5 -0
- package/dist/privacy.js +12 -0
- package/dist/record-mapping.d.ts +28 -0
- package/dist/record-mapping.js +161 -0
- package/dist/record-schema.d.ts +203 -0
- package/dist/record-schema.js +137 -0
- package/dist/records.d.ts +9 -201
- package/dist/records.js +32 -383
- package/dist/runtime-state.d.ts +9 -0
- package/dist/runtime-state.js +30 -0
- package/manifest.json +1 -1
- package/package.json +3 -3
package/dist/panel-service.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ManagedResourceContext, ManagedResourceDetail, ManagedResourcePage, ManagedResourceValue, MessageResponse, ServiceAccess } from "@helyx/sdk";
|
|
2
2
|
import { type PanelDraft } from "./builder.js";
|
|
3
|
+
import type { PanelSnapshotCache } from "./panel-cache.js";
|
|
4
|
+
import { PanelLifecycleService } from "./panel-lifecycle.js";
|
|
3
5
|
import { ReactionRolePanelRepository, type StoredPanel } from "./records.js";
|
|
6
|
+
export { managedContext, parseManagedDraft, toDetail, } from "./panel-support.js";
|
|
7
|
+
export { PanelSnapshotCache } from "./panel-cache.js";
|
|
4
8
|
export interface PanelMutationContext {
|
|
5
9
|
guildId: string;
|
|
6
10
|
actorUserId: string;
|
|
@@ -14,21 +18,8 @@ export interface PanelMutationContext {
|
|
|
14
18
|
editChannelMessage(channelId: string, messageId: string, response: MessageResponse): Promise<void>;
|
|
15
19
|
addChannelMessageReaction(channelId: string, messageId: string, emojiIdentifier: string): Promise<void>;
|
|
16
20
|
}
|
|
17
|
-
export declare class PanelSnapshotCache {
|
|
18
|
-
#private;
|
|
19
|
-
get(guildId: string, messageId: string): StoredPanel | null;
|
|
20
|
-
getFresh(guildId: string, messageId: string): StoredPanel | null;
|
|
21
|
-
negativeHit(guildId: string, messageId: string): boolean;
|
|
22
|
-
markMissing(guildId: string, messageId: string): void;
|
|
23
|
-
load(guildId: string, messageId: string, operation: () => Promise<StoredPanel | null>): Promise<StoredPanel | null>;
|
|
24
|
-
put(panel: StoredPanel): void;
|
|
25
|
-
remove(panel: Pick<StoredPanel, "guildId" | "messageId">): void;
|
|
26
|
-
suspend(panel: Pick<StoredPanel, "guildId" | "messageId">): (replacement?: StoredPanel | null) => void;
|
|
27
|
-
clear(): void;
|
|
28
|
-
size(): number;
|
|
29
|
-
saturated(): boolean;
|
|
30
|
-
}
|
|
31
21
|
export declare class ReactionRolePanelService {
|
|
22
|
+
#private;
|
|
32
23
|
private readonly cache;
|
|
33
24
|
constructor(cache: PanelSnapshotCache);
|
|
34
25
|
repository(services: ServiceAccess): ReactionRolePanelRepository;
|
|
@@ -38,6 +29,11 @@ export declare class ReactionRolePanelService {
|
|
|
38
29
|
failed: number;
|
|
39
30
|
abandoned: number;
|
|
40
31
|
}>;
|
|
32
|
+
executeMessageCleanup(services: ServiceAccess, cleanupId: string): Promise<import("@helyx/sdk").ScheduledTaskExecutionResult>;
|
|
33
|
+
executeMessageCleanupWithRecovery(services: ServiceAccess, cleanupId: string): Promise<{
|
|
34
|
+
result: import("@helyx/sdk").ScheduledTaskExecutionResult;
|
|
35
|
+
recovered: boolean;
|
|
36
|
+
}>;
|
|
41
37
|
getCached(guildId: string, messageId: string): StoredPanel | null;
|
|
42
38
|
resolveActive(guildId: string, messageId: string, services: ServiceAccess): Promise<StoredPanel | null>;
|
|
43
39
|
list(context: ManagedResourceContext, input: {
|
|
@@ -61,26 +57,7 @@ export declare class ReactionRolePanelService {
|
|
|
61
57
|
services: ServiceAccess;
|
|
62
58
|
}): Promise<void>;
|
|
63
59
|
markNeedsAttention(panel: StoredPanel, services: ServiceAccess): Promise<boolean>;
|
|
64
|
-
handleChannelLifecycle(input:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
deleted: boolean;
|
|
68
|
-
services: ServiceAccess;
|
|
69
|
-
}): Promise<number>;
|
|
70
|
-
handleRoleLifecycle(input: {
|
|
71
|
-
guildId: string;
|
|
72
|
-
roleId: string;
|
|
73
|
-
deleted: boolean;
|
|
74
|
-
services: ServiceAccess;
|
|
75
|
-
}): Promise<number>;
|
|
76
|
-
handleEmojiLifecycle(input: {
|
|
77
|
-
guildId: string;
|
|
78
|
-
emojiId: string;
|
|
79
|
-
deleted: boolean;
|
|
80
|
-
services: ServiceAccess;
|
|
81
|
-
}): Promise<number>;
|
|
82
|
-
audit(context: PanelMutationContext, action: string, panel: StoredPanel, result?: "success" | "cleanup_pending"): Promise<void>;
|
|
60
|
+
handleChannelLifecycle(input: Parameters<PanelLifecycleService["handleChannelLifecycle"]>[0]): Promise<number>;
|
|
61
|
+
handleRoleLifecycle(input: Parameters<PanelLifecycleService["handleRoleLifecycle"]>[0]): Promise<number>;
|
|
62
|
+
handleEmojiLifecycle(input: Parameters<PanelLifecycleService["handleEmojiLifecycle"]>[0]): Promise<number>;
|
|
83
63
|
}
|
|
84
|
-
export declare function managedContext(context: ManagedResourceContext): PanelMutationContext;
|
|
85
|
-
export declare function parseManagedDraft(value: Readonly<Record<string, ManagedResourceValue>>): PanelDraft;
|
|
86
|
-
export declare function toDetail(panel: StoredPanel): ManagedResourceDetail;
|