@oxyfoo/whymeet-types 0.0.31 → 0.0.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/dist/HTTP/Admin/Suspicious.d.ts +41 -0
- package/dist/HTTP/Admin/Suspicious.js +1 -0
- package/dist/HTTP/Pagination.d.ts +10 -0
- package/dist/HTTP/Pagination.js +2 -0
- package/dist/WS/Request.d.ts +51 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type SuspiciousSignalKey = 'volume_actions' | 'multi_accounts_ip' | 'young_account_volume' | 'multiple_reports' | 'message_pattern';
|
|
2
|
+
export interface SuspiciousActivityRecord {
|
|
3
|
+
id: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
userEmail: string;
|
|
6
|
+
userName: string;
|
|
7
|
+
userCreatedAt: string;
|
|
8
|
+
userBanned: boolean;
|
|
9
|
+
userSuspended: boolean;
|
|
10
|
+
score: number;
|
|
11
|
+
signals: Partial<Record<SuspiciousSignalKey, number>>;
|
|
12
|
+
firstDetectedAt: string;
|
|
13
|
+
lastDetectedAt: string;
|
|
14
|
+
acknowledgedAt: string | null;
|
|
15
|
+
acknowledgedByAdminId: string | null;
|
|
16
|
+
resolvedAt: string | null;
|
|
17
|
+
resolvedByAdminId: string | null;
|
|
18
|
+
notes: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface HTTPRequest_ListSuspiciousActivities {
|
|
21
|
+
status?: 'open' | 'acknowledged' | 'resolved' | 'all';
|
|
22
|
+
limit?: number;
|
|
23
|
+
offset?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface HTTPResponse_ListSuspiciousActivities {
|
|
26
|
+
records: SuspiciousActivityRecord[];
|
|
27
|
+
total: number;
|
|
28
|
+
}
|
|
29
|
+
export interface HTTPResponse_CountSuspiciousActivities {
|
|
30
|
+
open: number;
|
|
31
|
+
acknowledged: number;
|
|
32
|
+
resolved: number;
|
|
33
|
+
}
|
|
34
|
+
export interface HTTPRequest_AcknowledgeSuspiciousActivity {
|
|
35
|
+
adminId: string;
|
|
36
|
+
notes?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface HTTPRequest_ResolveSuspiciousActivity {
|
|
39
|
+
adminId: string;
|
|
40
|
+
notes?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/WS/Request.d.ts
CHANGED
|
@@ -97,7 +97,10 @@ export interface WSRequest_Search {
|
|
|
97
97
|
}
|
|
98
98
|
export interface WSRequest_GetConversations {
|
|
99
99
|
command: 'get-conversations';
|
|
100
|
-
payload:
|
|
100
|
+
payload: {
|
|
101
|
+
cursor?: string;
|
|
102
|
+
limit?: number;
|
|
103
|
+
};
|
|
101
104
|
}
|
|
102
105
|
export interface WSRequest_GetMessages {
|
|
103
106
|
command: 'get-messages';
|
|
@@ -116,7 +119,10 @@ export interface WSRequest_SendMessage {
|
|
|
116
119
|
}
|
|
117
120
|
export interface WSRequest_GetRequests {
|
|
118
121
|
command: 'get-requests';
|
|
119
|
-
payload:
|
|
122
|
+
payload: {
|
|
123
|
+
cursor?: string;
|
|
124
|
+
limit?: number;
|
|
125
|
+
};
|
|
120
126
|
}
|
|
121
127
|
export interface WSRequest_AcceptRequest {
|
|
122
128
|
command: 'accept-request';
|
|
@@ -132,6 +138,13 @@ export interface WSRequest_DeclineRequest {
|
|
|
132
138
|
}
|
|
133
139
|
export interface WSRequest_GetNotifications {
|
|
134
140
|
command: 'get-notifications';
|
|
141
|
+
payload: {
|
|
142
|
+
cursor?: string;
|
|
143
|
+
limit?: number;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export interface WSRequest_GetCounters {
|
|
147
|
+
command: 'get-counters';
|
|
135
148
|
payload: Record<string, never>;
|
|
136
149
|
}
|
|
137
150
|
export interface WSRequest_MarkNotificationRead {
|
|
@@ -304,6 +317,8 @@ export interface WSRequest_GetActivities {
|
|
|
304
317
|
command: 'get-activities';
|
|
305
318
|
payload: {
|
|
306
319
|
filters?: ActivitySearchFilters;
|
|
320
|
+
cursor?: string;
|
|
321
|
+
limit?: number;
|
|
307
322
|
};
|
|
308
323
|
}
|
|
309
324
|
export interface WSRequest_GetActivityCounts {
|
|
@@ -354,11 +369,16 @@ export interface WSRequest_GetMyActivities {
|
|
|
354
369
|
command: 'get-my-activities';
|
|
355
370
|
payload: {
|
|
356
371
|
role: 'host' | 'participant';
|
|
372
|
+
cursor?: string;
|
|
373
|
+
limit?: number;
|
|
357
374
|
};
|
|
358
375
|
}
|
|
359
376
|
export interface WSRequest_GetBlockedUsers {
|
|
360
377
|
command: 'get-blocked-users';
|
|
361
|
-
payload:
|
|
378
|
+
payload: {
|
|
379
|
+
cursor?: string;
|
|
380
|
+
limit?: number;
|
|
381
|
+
};
|
|
362
382
|
}
|
|
363
383
|
export interface WSRequest_UnblockUser {
|
|
364
384
|
command: 'unblock-user';
|
|
@@ -450,7 +470,7 @@ export interface WSRequest_AnalyticsIngest {
|
|
|
450
470
|
events: AnalyticsClientEvent<AnalyticsEventName>[];
|
|
451
471
|
};
|
|
452
472
|
}
|
|
453
|
-
export type WSClientRequest = WSRequest_Handshake | WSRequest_GetProfile | WSRequest_UpdateProfile | WSRequest_GetCandidates | WSRequest_GetCandidateCounts | WSRequest_GetIntentionCatalog | WSRequest_GetIntentionCounts | WSRequest_GetIntentionPopularTags | WSRequest_Like | WSRequest_Skip | WSRequest_Search | WSRequest_GetConversations | WSRequest_GetMessages | WSRequest_SendMessage | WSRequest_GetRequests | WSRequest_AcceptRequest | WSRequest_DeclineRequest | WSRequest_GetNotifications | WSRequest_SubmitFeedback | WSRequest_MarkNotificationRead | WSRequest_BlockUser | WSRequest_ReportUser | WSRequest_Unmatch | WSRequest_GetSettings | WSRequest_UpdateSettings | WSRequest_TagSuggest | WSRequest_GetPreferences | WSRequest_UpdatePreferences | WSRequest_DeleteAccount | WSRequest_RegisterPushToken | WSRequest_GetSubscription | WSRequest_ValidateReceipt | WSRequest_GetSearchQuota | WSRequest_SearchWithToken | WSRequest_PreviewSearch | WSRequest_PurchaseBoost | WSRequest_GetBoostStatus | WSRequest_MarkRead | WSRequest_GetUserProfile | WSRequest_CreateActivity | WSRequest_UpdateActivity | WSRequest_CancelActivity | WSRequest_GetActivity | WSRequest_JoinActivity | WSRequest_LeaveActivity | WSRequest_GetActivities | WSRequest_GetActivityCounts | WSRequest_SearchActivities | WSRequest_SearchActivitiesWithToken | WSRequest_PreviewSearchActivities | WSRequest_GetCandidateActivities | WSRequest_GetPopularActivityTags | WSRequest_ReportActivity | WSRequest_GetMyActivities | WSRequest_GetBlockedUsers | WSRequest_UnblockUser | WSRequest_GetProfilePopularTags | WSRequest_GetRefinePopularTags | WSRequest_GetBadges | WSRequest_GetUserBadges | WSRequest_ClaimBadgeReward | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation | WSRequest_SetDiscoveryView | WSRequest_PlacesSuggest | WSRequest_PlacesRetrieve | WSRequest_AnalyticsIngest;
|
|
473
|
+
export type WSClientRequest = WSRequest_Handshake | WSRequest_GetProfile | WSRequest_UpdateProfile | WSRequest_GetCandidates | WSRequest_GetCandidateCounts | WSRequest_GetIntentionCatalog | WSRequest_GetIntentionCounts | WSRequest_GetIntentionPopularTags | WSRequest_Like | WSRequest_Skip | WSRequest_Search | WSRequest_GetConversations | WSRequest_GetMessages | WSRequest_SendMessage | WSRequest_GetRequests | WSRequest_AcceptRequest | WSRequest_DeclineRequest | WSRequest_GetNotifications | WSRequest_GetCounters | WSRequest_SubmitFeedback | WSRequest_MarkNotificationRead | WSRequest_BlockUser | WSRequest_ReportUser | WSRequest_Unmatch | WSRequest_GetSettings | WSRequest_UpdateSettings | WSRequest_TagSuggest | WSRequest_GetPreferences | WSRequest_UpdatePreferences | WSRequest_DeleteAccount | WSRequest_RegisterPushToken | WSRequest_GetSubscription | WSRequest_ValidateReceipt | WSRequest_GetSearchQuota | WSRequest_SearchWithToken | WSRequest_PreviewSearch | WSRequest_PurchaseBoost | WSRequest_GetBoostStatus | WSRequest_MarkRead | WSRequest_GetUserProfile | WSRequest_CreateActivity | WSRequest_UpdateActivity | WSRequest_CancelActivity | WSRequest_GetActivity | WSRequest_JoinActivity | WSRequest_LeaveActivity | WSRequest_GetActivities | WSRequest_GetActivityCounts | WSRequest_SearchActivities | WSRequest_SearchActivitiesWithToken | WSRequest_PreviewSearchActivities | WSRequest_GetCandidateActivities | WSRequest_GetPopularActivityTags | WSRequest_ReportActivity | WSRequest_GetMyActivities | WSRequest_GetBlockedUsers | WSRequest_UnblockUser | WSRequest_GetProfilePopularTags | WSRequest_GetRefinePopularTags | WSRequest_GetBadges | WSRequest_GetUserBadges | WSRequest_ClaimBadgeReward | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation | WSRequest_SetDiscoveryView | WSRequest_PlacesSuggest | WSRequest_PlacesRetrieve | WSRequest_AnalyticsIngest;
|
|
454
474
|
export type WSClientCommand = WSClientRequest['command'];
|
|
455
475
|
export interface WSResponse_Handshake {
|
|
456
476
|
command: 'handshake';
|
|
@@ -566,6 +586,7 @@ export interface WSResponse_GetConversations {
|
|
|
566
586
|
command: 'get-conversations';
|
|
567
587
|
payload: {
|
|
568
588
|
conversations: Conversation[];
|
|
589
|
+
nextCursor: string | null;
|
|
569
590
|
} | {
|
|
570
591
|
error: string;
|
|
571
592
|
};
|
|
@@ -591,6 +612,7 @@ export interface WSResponse_GetRequests {
|
|
|
591
612
|
command: 'get-requests';
|
|
592
613
|
payload: {
|
|
593
614
|
requests: MatchRequest[];
|
|
615
|
+
nextCursor: string | null;
|
|
594
616
|
} | {
|
|
595
617
|
error: string;
|
|
596
618
|
};
|
|
@@ -615,10 +637,30 @@ export interface WSResponse_GetNotifications {
|
|
|
615
637
|
command: 'get-notifications';
|
|
616
638
|
payload: {
|
|
617
639
|
notifications: Notification[];
|
|
640
|
+
nextCursor: string | null;
|
|
641
|
+
} | {
|
|
642
|
+
error: string;
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
export interface UserCounters {
|
|
646
|
+
unreadConversations: number;
|
|
647
|
+
pendingMatchRequests: number;
|
|
648
|
+
unreadNotifications: number;
|
|
649
|
+
}
|
|
650
|
+
export interface WSResponse_GetCounters {
|
|
651
|
+
command: 'get-counters';
|
|
652
|
+
payload: {
|
|
653
|
+
counters: UserCounters;
|
|
618
654
|
} | {
|
|
619
655
|
error: string;
|
|
620
656
|
};
|
|
621
657
|
}
|
|
658
|
+
export interface WSEvent_Counters {
|
|
659
|
+
event: 'counters';
|
|
660
|
+
payload: {
|
|
661
|
+
counters: UserCounters;
|
|
662
|
+
};
|
|
663
|
+
}
|
|
622
664
|
export interface WSResponse_MarkNotificationRead {
|
|
623
665
|
command: 'mark-notification-read';
|
|
624
666
|
payload: {
|
|
@@ -853,6 +895,7 @@ export interface WSResponse_GetActivities {
|
|
|
853
895
|
payload: {
|
|
854
896
|
activities: ActivitySummary[];
|
|
855
897
|
totalCount: number;
|
|
898
|
+
nextCursor: string | null;
|
|
856
899
|
} | {
|
|
857
900
|
error: string;
|
|
858
901
|
};
|
|
@@ -924,6 +967,7 @@ export interface WSResponse_GetMyActivities {
|
|
|
924
967
|
command: 'get-my-activities';
|
|
925
968
|
payload: {
|
|
926
969
|
activities: ActivitySummary[];
|
|
970
|
+
nextCursor: string | null;
|
|
927
971
|
} | {
|
|
928
972
|
error: string;
|
|
929
973
|
};
|
|
@@ -932,6 +976,7 @@ export interface WSResponse_GetBlockedUsers {
|
|
|
932
976
|
command: 'get-blocked-users';
|
|
933
977
|
payload: {
|
|
934
978
|
blockedUsers: BlockedUser[];
|
|
979
|
+
nextCursor: string | null;
|
|
935
980
|
} | {
|
|
936
981
|
error: string;
|
|
937
982
|
};
|
|
@@ -1022,7 +1067,7 @@ export interface WSResponse_AnalyticsIngest {
|
|
|
1022
1067
|
error: string;
|
|
1023
1068
|
};
|
|
1024
1069
|
}
|
|
1025
|
-
export type WSServerResponse = WSResponse_Handshake | WSResponse_GetProfile | WSResponse_UpdateProfile | WSResponse_GetCandidates | WSResponse_GetCandidateCounts | WSResponse_GetIntentionCatalog | WSResponse_GetIntentionCounts | WSResponse_GetIntentionPopularTags | WSResponse_Like | WSResponse_Skip | WSResponse_Search | WSResponse_GetConversations | WSResponse_GetMessages | WSResponse_SendMessage | WSResponse_GetRequests | WSResponse_AcceptRequest | WSResponse_DeclineRequest | WSResponse_SubmitFeedback | WSResponse_GetNotifications | WSResponse_MarkNotificationRead | WSResponse_BlockUser | WSResponse_ReportUser | WSResponse_Unmatch | WSResponse_GetSettings | WSResponse_UpdateSettings | WSResponse_TagSuggest | WSResponse_GetPreferences | WSResponse_UpdatePreferences | WSResponse_DeleteAccount | WSResponse_RegisterPushToken | WSResponse_GetSubscription | WSResponse_ValidateReceipt | WSResponse_GetSearchQuota | WSResponse_SearchWithToken | WSResponse_PreviewSearch | WSResponse_PurchaseBoost | WSResponse_GetBoostStatus | WSResponse_CreateActivity | WSResponse_UpdateActivity | WSResponse_CancelActivity | WSResponse_GetActivity | WSResponse_JoinActivity | WSResponse_LeaveActivity | WSResponse_GetActivities | WSResponse_GetActivityCounts | WSResponse_SearchActivities | WSResponse_SearchActivitiesWithToken | WSResponse_PreviewSearchActivities | WSResponse_GetCandidateActivities | WSResponse_GetPopularActivityTags | WSResponse_ReportActivity | WSResponse_GetMyActivities | WSResponse_MarkRead | WSResponse_GetUserProfile | WSResponse_GetBlockedUsers | WSResponse_UnblockUser | WSResponse_GetProfilePopularTags | WSResponse_GetRefinePopularTags | WSResponse_GetBadges | WSResponse_GetUserBadges | WSResponse_ClaimBadgeReward | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation | WSResponse_SetDiscoveryView | WSResponse_PlacesSuggest | WSResponse_PlacesRetrieve | WSResponse_AnalyticsIngest;
|
|
1070
|
+
export type WSServerResponse = WSResponse_Handshake | WSResponse_GetProfile | WSResponse_UpdateProfile | WSResponse_GetCandidates | WSResponse_GetCandidateCounts | WSResponse_GetIntentionCatalog | WSResponse_GetIntentionCounts | WSResponse_GetIntentionPopularTags | WSResponse_Like | WSResponse_Skip | WSResponse_Search | WSResponse_GetConversations | WSResponse_GetMessages | WSResponse_SendMessage | WSResponse_GetRequests | WSResponse_AcceptRequest | WSResponse_DeclineRequest | WSResponse_SubmitFeedback | WSResponse_GetNotifications | WSResponse_GetCounters | WSResponse_MarkNotificationRead | WSResponse_BlockUser | WSResponse_ReportUser | WSResponse_Unmatch | WSResponse_GetSettings | WSResponse_UpdateSettings | WSResponse_TagSuggest | WSResponse_GetPreferences | WSResponse_UpdatePreferences | WSResponse_DeleteAccount | WSResponse_RegisterPushToken | WSResponse_GetSubscription | WSResponse_ValidateReceipt | WSResponse_GetSearchQuota | WSResponse_SearchWithToken | WSResponse_PreviewSearch | WSResponse_PurchaseBoost | WSResponse_GetBoostStatus | WSResponse_CreateActivity | WSResponse_UpdateActivity | WSResponse_CancelActivity | WSResponse_GetActivity | WSResponse_JoinActivity | WSResponse_LeaveActivity | WSResponse_GetActivities | WSResponse_GetActivityCounts | WSResponse_SearchActivities | WSResponse_SearchActivitiesWithToken | WSResponse_PreviewSearchActivities | WSResponse_GetCandidateActivities | WSResponse_GetPopularActivityTags | WSResponse_ReportActivity | WSResponse_GetMyActivities | WSResponse_MarkRead | WSResponse_GetUserProfile | WSResponse_GetBlockedUsers | WSResponse_UnblockUser | WSResponse_GetProfilePopularTags | WSResponse_GetRefinePopularTags | WSResponse_GetBadges | WSResponse_GetUserBadges | WSResponse_ClaimBadgeReward | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation | WSResponse_SetDiscoveryView | WSResponse_PlacesSuggest | WSResponse_PlacesRetrieve | WSResponse_AnalyticsIngest;
|
|
1026
1071
|
export interface WSEvent_NewMessage {
|
|
1027
1072
|
event: 'new-message';
|
|
1028
1073
|
payload: {
|
|
@@ -1063,7 +1108,7 @@ export interface WSEvent_RateLimited {
|
|
|
1063
1108
|
message: string;
|
|
1064
1109
|
};
|
|
1065
1110
|
}
|
|
1066
|
-
export type WSServerEvent = WSEvent_NewMessage | WSEvent_NewMatch | WSEvent_Notification | WSEvent_MarkRead | WSEvent_Suspended | WSEvent_Banned | WSEvent_RateLimited;
|
|
1111
|
+
export type WSServerEvent = WSEvent_NewMessage | WSEvent_NewMatch | WSEvent_Notification | WSEvent_Counters | WSEvent_MarkRead | WSEvent_Suspended | WSEvent_Banned | WSEvent_RateLimited;
|
|
1067
1112
|
export interface WSEnvelope<T = WSClientRequest | WSServerResponse | WSServerEvent> {
|
|
1068
1113
|
id: string;
|
|
1069
1114
|
timestamp: number;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED