@laplace.live/internal 1.2.31 → 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.
- package/index.d.ts +113 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -814,6 +814,45 @@ export declare namespace LaplaceInternal {
|
|
|
814
814
|
lastPeriodStart: string
|
|
815
815
|
}
|
|
816
816
|
|
|
817
|
+
// ============================================
|
|
818
|
+
// Fertility Cycle Entry Management (Admin)
|
|
819
|
+
// ============================================
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Request body for PATCH /laplace/fertility-entry/:uid
|
|
823
|
+
* Updates a specific history entry identified by originalPeriodStart
|
|
824
|
+
*/
|
|
825
|
+
export interface FertilityEntryUpdateRequest {
|
|
826
|
+
/** Required: periodStart of the entry to update (identifier) */
|
|
827
|
+
originalPeriodStart: number
|
|
828
|
+
/** Optional: New periodStart value (Unix timestamp ms) */
|
|
829
|
+
periodStart?: number
|
|
830
|
+
/** Optional: Period length (1-15 days), or null to clear */
|
|
831
|
+
periodLength?: number | null
|
|
832
|
+
/** Optional: Evidence URL, or null to clear */
|
|
833
|
+
source?: string | null
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Request body for DELETE /laplace/fertility-entry/:uid
|
|
838
|
+
* Deletes a specific history entry identified by periodStart
|
|
839
|
+
*/
|
|
840
|
+
export interface FertilityEntryDeleteRequest {
|
|
841
|
+
/** Required: periodStart of the entry to delete */
|
|
842
|
+
periodStart: number
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Response for PATCH/DELETE /laplace/fertility-entry/:uid
|
|
847
|
+
*/
|
|
848
|
+
export interface FertilityEntryActionResponse {
|
|
849
|
+
success: true
|
|
850
|
+
uid: number
|
|
851
|
+
historyCount: number
|
|
852
|
+
/** ISO timestamp string */
|
|
853
|
+
lastPeriodStart: string
|
|
854
|
+
}
|
|
855
|
+
|
|
817
856
|
// ============================================
|
|
818
857
|
// Fertility Contribution Types (Anonymous Submissions)
|
|
819
858
|
// ============================================
|
|
@@ -931,6 +970,80 @@ export declare namespace LaplaceInternal {
|
|
|
931
970
|
rejected: number
|
|
932
971
|
total: number
|
|
933
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
|
+
}
|
|
934
1047
|
}
|
|
935
1048
|
|
|
936
1049
|
/** Migrated from experiments.sparanoid.net */
|