@meith/plugin-kit 0.36.2 → 0.37.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/plugin-kit",
3
- "version": "0.36.2",
3
+ "version": "0.37.1",
4
4
  "description": "The SDK for writing a Meith plugin: typed manifests, hooks, routes, pages and migrations.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/core": "^0.36.2",
24
- "@meith/theme-kit": "^0.36.2",
25
- "@meith/ui": "^0.36.2"
23
+ "@meith/core": "^0.37.1",
24
+ "@meith/theme-kit": "^0.37.1",
25
+ "@meith/ui": "^0.37.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^19.2.0"
package/src/index.ts CHANGED
@@ -114,6 +114,7 @@ export {
114
114
  type PluginNotifyBackend,
115
115
  type PluginNotifyKindInput,
116
116
  type PluginUserRef,
117
+ type PluginUserStanding,
117
118
  type PluginUsers,
118
119
  pluginNotificationKindSpecs,
119
120
  pluginNotify,
package/src/runtime.ts CHANGED
@@ -62,16 +62,28 @@ export interface PluginUserRef {
62
62
  readonly username: string
63
63
  }
64
64
 
65
+ export interface PluginUserStanding extends PluginUserRef {
66
+ readonly postCount: number
67
+ readonly threadCount: number
68
+ readonly reputation: number
69
+ readonly registeredAt: Date
70
+ }
71
+
65
72
  export interface PluginUsers {
66
73
  byUsername(username: string): Promise<PluginUserRef | null>
67
74
  byId(userId: number): Promise<PluginUserRef | null>
75
+ standing(userIds: readonly number[]): Promise<readonly PluginUserStanding[]>
76
+ scan(input: {
77
+ readonly afterUserId: number
78
+ readonly limit: number
79
+ }): Promise<readonly PluginUserStanding[]>
68
80
  }
69
81
 
70
82
  export function unavailablePluginUsers(reason: string): PluginUsers {
71
83
  const refuse = async (): Promise<never> => {
72
84
  throw new Error(`Plugin user lookup is unavailable: ${reason}`)
73
85
  }
74
- return { byUsername: refuse, byId: refuse }
86
+ return { byUsername: refuse, byId: refuse, standing: refuse, scan: refuse }
75
87
  }
76
88
 
77
89
  export interface PluginNotify {