@laplace.live/internal 1.2.32 → 1.2.34

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.
Files changed (2) hide show
  1. package/index.d.ts +78 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -969,6 +969,84 @@ export declare namespace LaplaceInternal {
969
969
  approved: number
970
970
  rejected: number
971
971
  total: number
972
+ /** Average time from submission to approval/rejection in milliseconds */
973
+ avgProcessingTimeMs: number | null
974
+ /** Average time from submission to approval/rejection in hours (1 decimal) */
975
+ avgProcessingTimeHours: number | null
976
+ }
977
+
978
+ // ============================================
979
+ // Guild History Types
980
+ // ============================================
981
+
982
+ /**
983
+ * A single guild history entry - tracks each guild membership change
984
+ * Stored in the `guildInfo.history` JSONB column on bilibili_users table
985
+ */
986
+ export interface GuildHistoryItem {
987
+ /** Guild name */
988
+ name: string
989
+ /** Unix timestamp (ms) - when this guild membership was recorded */
990
+ updatedAt: number
991
+ }
992
+
993
+ /**
994
+ * Response for GET /laplace/guild-entry/:uid
995
+ * Returns guild history for a specific user
996
+ */
997
+ export interface GuildHistoryResponse {
998
+ success: true
999
+ uid: number
1000
+ user: {
1001
+ id: number
1002
+ username: string
1003
+ avatar: string | null
1004
+ room: number | null
1005
+ }
1006
+ history: GuildHistoryItem[]
1007
+ historyCount: number
1008
+ }
1009
+
1010
+ /**
1011
+ * Request body for POST /laplace/guild-entry/:uid
1012
+ * Adds a new guild history entry
1013
+ */
1014
+ export interface GuildEntryAddRequest {
1015
+ /** Guild name (max 100 chars, no special characters) */
1016
+ name: string
1017
+ /** Optional: Unix timestamp (ms) - defaults to current time */
1018
+ updatedAt?: number
1019
+ }
1020
+
1021
+ /**
1022
+ * Request body for PATCH /laplace/guild-entry/:uid
1023
+ * Updates a specific guild history entry identified by originalUpdatedAt
1024
+ */
1025
+ export interface GuildEntryUpdateRequest {
1026
+ /** Required: updatedAt of the entry to update (identifier) */
1027
+ originalUpdatedAt: number
1028
+ /** Optional: New guild name */
1029
+ name?: string
1030
+ /** Optional: New timestamp (Unix timestamp ms) */
1031
+ updatedAt?: number
1032
+ }
1033
+
1034
+ /**
1035
+ * Request body for DELETE /laplace/guild-entry/:uid
1036
+ * Deletes a specific guild history entry identified by updatedAt
1037
+ */
1038
+ export interface GuildEntryDeleteRequest {
1039
+ /** Required: updatedAt of the entry to delete */
1040
+ updatedAt: number
1041
+ }
1042
+
1043
+ /**
1044
+ * Response for POST/PATCH/DELETE /laplace/guild-entry/:uid
1045
+ */
1046
+ export interface GuildEntryActionResponse {
1047
+ success: true
1048
+ uid: number
1049
+ historyCount: number
972
1050
  }
973
1051
  }
974
1052
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laplace.live/internal",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
4
4
  "module": "index.d.ts",
5
5
  "devDependencies": {
6
6
  "@types/bun": "latest"