@helyx/module-reactionroles 1.1.2 → 1.1.3

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @helyx/module-reactionroles
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Apply managed panel status filters in Reaction Roles list reads so Server Overview counts and exact source lists agree.
8
+
3
9
  ## 1.1.2
4
10
 
5
11
  ### Patch Changes
@@ -7,6 +7,7 @@ export declare class ManagedPanelReader {
7
7
  list(context: ManagedResourceContext, input: {
8
8
  cursor?: string;
9
9
  limit: number;
10
+ filters?: Readonly<Record<string, string>>;
10
11
  }): Promise<ManagedResourcePage>;
11
12
  read(context: ManagedResourceContext, resourceId: string): Promise<ManagedResourceDetail | null>;
12
13
  preview(context: ManagedResourceContext, value: Readonly<Record<string, ManagedResourceValue>>): Promise<MessageResponse>;
@@ -7,6 +7,7 @@ export class ManagedPanelReader {
7
7
  async list(context, input) {
8
8
  const page = await this.repositoryFor(context.services).list({
9
9
  guildId: context.guildId,
10
+ ...(input.filters?.status ? { status: input.filters.status } : {}),
10
11
  ...(input.cursor ? { cursor: decodeCursor(input.cursor) } : {}),
11
12
  limit: Math.min(100, Math.max(1, input.limit)),
12
13
  });
@@ -39,6 +39,7 @@ export declare class ReactionRolePanelService {
39
39
  list(context: ManagedResourceContext, input: {
40
40
  cursor?: string;
41
41
  limit: number;
42
+ filters?: Readonly<Record<string, string>>;
42
43
  }): Promise<ManagedResourcePage>;
43
44
  read(context: ManagedResourceContext, resourceId: string): Promise<ManagedResourceDetail | null>;
44
45
  preview(context: ManagedResourceContext, value: Readonly<Record<string, ManagedResourceValue>>): Promise<MessageResponse>;
package/dist/records.d.ts CHANGED
@@ -41,6 +41,7 @@ export declare class ReactionRolePanelRepository {
41
41
  findByMessage(guildId: string, messageId: string): Promise<StoredPanel | null>;
42
42
  list(input: {
43
43
  guildId: string;
44
+ status?: string;
44
45
  cursor?: readonly ModuleRecordWriteValue[];
45
46
  limit: number;
46
47
  }): Promise<{
package/dist/records.js CHANGED
@@ -99,7 +99,10 @@ export class ReactionRolePanelRepository {
99
99
  moduleId: REACTION_ROLES_MODULE_ID,
100
100
  collection: "panels",
101
101
  select: panelSelect,
102
- where: { guild_id: input.guildId },
102
+ where: {
103
+ guild_id: input.guildId,
104
+ ...(input.status ? { status: input.status } : {}),
105
+ },
103
106
  orderBy: [
104
107
  { field: "updated_at", direction: "desc" },
105
108
  { field: "panel_id", direction: "asc" },
package/manifest.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "healthExposure": "direct",
12
12
  "id": "helyx.reactionroles",
13
13
  "name": "Reaction Roles",
14
- "version": "1.1.2",
14
+ "version": "1.1.3",
15
15
  "description": "Let members select approved roles themselves.",
16
16
  "entry": "./dist/index.js",
17
17
  "framework": "^0.2.0",
@@ -229,7 +229,7 @@
229
229
  "required": false,
230
230
  "minLength": 1,
231
231
  "maxLength": 100,
232
- "placeholder": "✅ or <:updates:123456789012345678>",
232
+ "placeholder": "✅ or <:updates:123456789012345678>",
233
233
  "display": "emoji"
234
234
  },
235
235
  {
@@ -289,7 +289,46 @@
289
289
  "style": "danger",
290
290
  "confirmation": "Delete this role panel? Existing member roles will not be changed."
291
291
  }
292
- ]
292
+ ],
293
+ "query": {
294
+ "filters": [
295
+ {
296
+ "key": "status",
297
+ "label": "State",
298
+ "type": "select",
299
+ "options": [
300
+ {
301
+ "value": "pending",
302
+ "label": "Pending"
303
+ },
304
+ {
305
+ "value": "active",
306
+ "label": "Active"
307
+ },
308
+ {
309
+ "value": "disabled",
310
+ "label": "Disabled"
311
+ },
312
+ {
313
+ "value": "message_missing",
314
+ "label": "Message missing"
315
+ },
316
+ {
317
+ "value": "needs_attention",
318
+ "label": "Needs attention"
319
+ },
320
+ {
321
+ "value": "cleanup_pending",
322
+ "label": "Cleanup pending"
323
+ },
324
+ {
325
+ "value": "deleting",
326
+ "label": "Deleting"
327
+ }
328
+ ]
329
+ }
330
+ ]
331
+ }
293
332
  }
294
333
  ],
295
334
  "workspace": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helyx/module-reactionroles",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Configurable self-service Discord role panels for Helyx.",
5
5
  "keywords": [
6
6
  "helyx",