@laplace.live/internal 1.2.32 → 1.2.33

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