@qrush/types 2.1.104 → 2.1.105

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.
@@ -0,0 +1,72 @@
1
+ import type { Timestamp } from '@firebase/firestore';
2
+ export type ModerationNoticeCode = 'content_removed' | 'inappropriate_language' | 'spam' | 'harassment' | 'restriction_applied' | 'ban_applied' | 'restriction_lifted' | 'custom';
3
+ export interface IUserModeration {
4
+ socialRestricted?: boolean;
5
+ socialRestrictedUntil?: Timestamp;
6
+ socialBanned?: boolean;
7
+ banned?: boolean;
8
+ moderationHidden?: boolean;
9
+ updatedAt: Timestamp;
10
+ }
11
+ export interface IModerationNotice {
12
+ id: string;
13
+ code: ModerationNoticeCode;
14
+ customText?: string;
15
+ createdAt: Timestamp;
16
+ }
17
+ export type StrikeAction = 'warning' | 'content_removal' | 'social_restriction' | 'social_ban' | 'ban' | 'device_ban' | 'lift';
18
+ export interface IStrikeContentSnapshot {
19
+ text?: string;
20
+ entityId?: string;
21
+ entityType?: string;
22
+ entityTitle?: string;
23
+ capturedAt: Timestamp;
24
+ }
25
+ export interface IStrike {
26
+ action: StrikeAction;
27
+ reason: string;
28
+ reportId?: string;
29
+ contentSnapshot?: IStrikeContentSnapshot;
30
+ restrictions?: string[];
31
+ duration?: number;
32
+ noticeCode?: ModerationNoticeCode;
33
+ noticeCustomText?: string;
34
+ performedBy: string;
35
+ createdAt: Timestamp;
36
+ expiresAt?: Timestamp;
37
+ sideEffectsCompleted?: Record<string, boolean>;
38
+ }
39
+ export interface IModerationLogEntry {
40
+ targetUserId: string;
41
+ targetUserName: string;
42
+ action: string;
43
+ reason: string;
44
+ reportId?: string;
45
+ performedBy: string;
46
+ performedByName: string;
47
+ createdAt: Timestamp;
48
+ }
49
+ export interface IBannedDevice {
50
+ bannedForUserId: string;
51
+ bannedAt: Timestamp;
52
+ bannedBy: string;
53
+ reason?: string;
54
+ }
55
+ export type LiftTarget = 'socialRestricted' | 'socialBanned' | 'banned';
56
+ export interface IApplyModerationActionRequest {
57
+ targetUserId: string;
58
+ action: StrikeAction;
59
+ reason: string;
60
+ duration?: number;
61
+ reportId?: string;
62
+ noticeCode?: ModerationNoticeCode;
63
+ noticeCustomText?: string;
64
+ includeDeviceBan?: boolean;
65
+ contentRef?: string;
66
+ liftTargets?: LiftTarget[];
67
+ }
68
+ export interface IResolveReportRequest {
69
+ reportId: string;
70
+ resolution: 'dismissed';
71
+ adminNotes?: string;
72
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/Report.d.ts CHANGED
@@ -1,11 +1,48 @@
1
1
  import type { Timestamp } from '@firebase/firestore';
2
+ export type ReportSubjectKind = 'chat_message' | 'chat_user' | 'lfg_entry' | 'user_profile';
3
+ export type ReportReason = 'spam' | 'harassment' | 'inappropriate' | 'other';
4
+ export type ReportStatus = 'pending' | 'resolved' | 'dismissed';
5
+ export type ReportResolution = 'dismissed' | 'warning' | 'content_removed' | 'restricted' | 'banned';
6
+ export interface IReportEvidence {
7
+ lookingForText?: string;
8
+ messageText?: string;
9
+ entityContext?: {
10
+ entityId: string;
11
+ entityType: string;
12
+ entityTitle: string;
13
+ };
14
+ capturedAt: Timestamp;
15
+ }
2
16
  export interface IReport {
3
- type: 'user' | 'chat' | 'looking_for';
17
+ subjectKind: ReportSubjectKind;
18
+ subjectKey: string;
4
19
  targetId: string;
5
20
  conversationId?: string;
6
- messageContent?: string;
21
+ messageId?: string;
22
+ entryRef?: string;
7
23
  reportedBy: string;
8
- reason: 'spam' | 'harassment' | 'inappropriate' | 'other';
9
- status: 'pending' | 'reviewed' | 'resolved';
24
+ reason: ReportReason;
25
+ reasonDetail?: string;
26
+ evidence?: IReportEvidence;
27
+ targetUserName?: string;
28
+ reportedByName?: string;
29
+ status: ReportStatus;
30
+ resolvedBy?: string;
31
+ resolvedAt?: Timestamp;
32
+ resolution?: ReportResolution;
33
+ adminNotes?: string;
10
34
  createdAt: Timestamp;
11
35
  }
36
+ export interface ISubmitReportRequest {
37
+ subjectKind: ReportSubjectKind;
38
+ targetId?: string;
39
+ conversationId?: string;
40
+ messageId?: string;
41
+ entryRef?: string;
42
+ reason: ReportReason;
43
+ reasonDetail?: string;
44
+ entityContext?: {
45
+ entityId: string;
46
+ entityType: string;
47
+ };
48
+ }
package/dist/Social.d.ts CHANGED
@@ -92,6 +92,8 @@ export interface ISocialEntry {
92
92
  accountCreatedAt?: Timestamp;
93
93
  customRules?: ICustomPrivacyRules;
94
94
  contactability?: ContactabilitySetting;
95
+ /** Set by moderation system — entries with this flag are filtered from public views */
96
+ moderationHidden?: boolean;
95
97
  }
96
98
  export interface IFilteredEntry {
97
99
  id: string;
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './Chat.js';
19
19
  export * from './Conversation.js';
20
20
  export * from './Social.js';
21
21
  export * from './Report.js';
22
+ export * from './Moderation.js';
22
23
  export * from './Connection.js';
23
24
  export * from './requests/CompleteRegistration.js';
24
25
  export * from './requests/UpdateUserAccount.js';
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ export * from './Chat.js';
19
19
  export * from './Conversation.js';
20
20
  export * from './Social.js';
21
21
  export * from './Report.js';
22
+ export * from './Moderation.js';
22
23
  export * from './Connection.js';
23
24
  export * from './requests/CompleteRegistration.js';
24
25
  export * from './requests/UpdateUserAccount.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrush/types",
3
- "version": "2.1.104",
3
+ "version": "2.1.105",
4
4
  "description": "Shared TypeScript types for the QRush ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",