@laplace.live/internal 1.2.37 → 1.2.39

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 +71 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -524,6 +524,18 @@ export declare namespace LaplaceInternal {
524
524
  updatedAt: number
525
525
  }[]
526
526
  } | null
527
+ /** MCN 机构详细信息 (mcnId is internal-only, not exposed in public API) */
528
+ mcnInfo: {
529
+ history: {
530
+ /** MCN agency name */
531
+ mcnName: string
532
+ /** Unix timestamp
533
+ *
534
+ * @example 1758039520166
535
+ */
536
+ updatedAt: number
537
+ }[]
538
+ } | null
527
539
  }
528
540
 
529
541
  /**
@@ -1010,6 +1022,23 @@ export declare namespace LaplaceInternal {
1010
1022
  updatedAt: number
1011
1023
  }
1012
1024
 
1025
+ // ============================================
1026
+ // MCN History Types
1027
+ // ============================================
1028
+
1029
+ /**
1030
+ * A single MCN agency history entry - tracks each MCN membership change
1031
+ * Stored in the `mcnInfo.history` JSONB column on bilibili_users table
1032
+ */
1033
+ export interface McnHistoryItem {
1034
+ /** MCN agency ID */
1035
+ mcnId: number
1036
+ /** MCN agency name */
1037
+ mcnName: string
1038
+ /** Unix timestamp (ms) - when this MCN membership was recorded */
1039
+ updatedAt: number
1040
+ }
1041
+
1013
1042
  /**
1014
1043
  * Response for GET /laplace/guild-entry/:uid
1015
1044
  * Returns guild history for a specific user
@@ -1068,6 +1097,48 @@ export declare namespace LaplaceInternal {
1068
1097
  uid: number
1069
1098
  historyCount: number
1070
1099
  }
1100
+
1101
+ // ============================================
1102
+ // MCN Batch Update Types
1103
+ // ============================================
1104
+
1105
+ /**
1106
+ * A single entry in the MCN batch update request
1107
+ * Maps to the raw export format from the MCN agency data (laplace-scripts)
1108
+ */
1109
+ export interface McnBatchUpdateEntry {
1110
+ /** User's Bilibili UID (maps to bilibili_users.id) */
1111
+ upper_mid: number
1112
+ /** MCN agency ID */
1113
+ mcn_id: number
1114
+ /** MCN agency company name */
1115
+ mcn_company_name: string
1116
+ }
1117
+
1118
+ /**
1119
+ * Request body for POST /laplace/mcn-update
1120
+ * Batch updates MCN info for multiple users (max 10,000 entries)
1121
+ */
1122
+ export interface McnBatchUpdateRequest {
1123
+ entries: McnBatchUpdateEntry[]
1124
+ }
1125
+
1126
+ /**
1127
+ * Response for POST /laplace/mcn-update
1128
+ */
1129
+ export interface McnBatchUpdateResponse {
1130
+ success: true
1131
+ /** Total entries received */
1132
+ total: number
1133
+ /** Users whose mcnInfo was changed (new MCN or MCN change) */
1134
+ updated: number
1135
+ /** Users whose MCN matched the latest history entry (no-op) */
1136
+ unchanged: number
1137
+ /** UIDs not found in bilibili_users */
1138
+ skipped: number
1139
+ /** List of missing UIDs */
1140
+ skippedUids: number[]
1141
+ }
1071
1142
  }
1072
1143
 
1073
1144
  /** 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.37",
3
+ "version": "1.2.39",
4
4
  "module": "index.d.ts",
5
5
  "devDependencies": {
6
6
  "@types/bun": "latest"