@oxyfoo/whymeet-types 0.0.5 → 0.0.6
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { User } from './User.js';
|
|
2
2
|
import type { InterestCategoryKey } from './Intention.js';
|
|
3
|
+
import type { Gender } from './Settings.js';
|
|
3
4
|
export interface ActivityParticipantInfo extends User {
|
|
4
5
|
confirmedAttendance: boolean | null;
|
|
5
6
|
}
|
|
@@ -30,6 +31,7 @@ export interface Activity {
|
|
|
30
31
|
hostReportedAttendees: number | null;
|
|
31
32
|
isParticipant: boolean;
|
|
32
33
|
isHost: boolean;
|
|
34
|
+
targetGenders: Gender[];
|
|
33
35
|
distance?: string;
|
|
34
36
|
distanceKm?: number;
|
|
35
37
|
createdAt: string;
|
|
@@ -45,6 +47,7 @@ export interface ActivitySummary {
|
|
|
45
47
|
maxParticipants: number | null;
|
|
46
48
|
photoKey: string | null;
|
|
47
49
|
hostName: string;
|
|
50
|
+
targetGenders: Gender[];
|
|
48
51
|
distance?: string;
|
|
49
52
|
distanceKm?: number;
|
|
50
53
|
}
|
|
@@ -54,4 +57,5 @@ export interface ActivitySearchFilters {
|
|
|
54
57
|
dateFrom?: string;
|
|
55
58
|
dateTo?: string;
|
|
56
59
|
query?: string;
|
|
60
|
+
tags?: string[];
|
|
57
61
|
}
|
package/dist/Models/Match.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { User } from './User.js';
|
|
2
2
|
import { IntentionKey } from './Intention.js';
|
|
3
|
+
import type { HostLevel } from './TrustScore.js';
|
|
4
|
+
import type { SocialVibe } from './Profile.js';
|
|
3
5
|
export interface MatchCandidate {
|
|
4
6
|
id: string;
|
|
5
7
|
user: User;
|
|
@@ -14,6 +16,8 @@ export interface MatchCandidate {
|
|
|
14
16
|
blurred?: boolean;
|
|
15
17
|
alreadyInteracted?: boolean;
|
|
16
18
|
alreadyMatched?: boolean;
|
|
19
|
+
hostLevel?: HostLevel | null;
|
|
20
|
+
socialVibe?: SocialVibe | null;
|
|
17
21
|
}
|
|
18
22
|
export interface Match {
|
|
19
23
|
id: string;
|
|
@@ -2,13 +2,21 @@ export type Language = 'fr' | 'en';
|
|
|
2
2
|
export type Theme = 'light' | 'dark';
|
|
3
3
|
export type Gender = 'male' | 'female' | 'non_binary' | 'other' | 'prefer_not_to_say';
|
|
4
4
|
export declare const GENDERS: readonly Gender[];
|
|
5
|
-
export interface
|
|
5
|
+
export interface PeoplePreferences {
|
|
6
6
|
ageRange: [number, number];
|
|
7
7
|
genders: Gender[];
|
|
8
8
|
maxDistance: number;
|
|
9
9
|
remoteMode: boolean;
|
|
10
10
|
verifiedOnly: boolean;
|
|
11
11
|
photosOnly: boolean;
|
|
12
|
+
languages: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface ActivityPreferences {
|
|
15
|
+
genders: Gender[];
|
|
16
|
+
maxDistance: number;
|
|
17
|
+
remoteMode: boolean;
|
|
18
|
+
verifiedOnly: boolean;
|
|
19
|
+
languages: string[];
|
|
12
20
|
}
|
|
13
21
|
export interface VisibilityPreferences {
|
|
14
22
|
ageRange: [number, number];
|
|
@@ -26,5 +34,6 @@ export interface UserSettings {
|
|
|
26
34
|
notifActivityReminder24h: boolean;
|
|
27
35
|
notifActivityReminder1h: boolean;
|
|
28
36
|
}
|
|
29
|
-
export declare const
|
|
37
|
+
export declare const DEFAULT_PEOPLE: PeoplePreferences;
|
|
38
|
+
export declare const DEFAULT_ACTIVITY: ActivityPreferences;
|
|
30
39
|
export declare const DEFAULT_VISIBILITY: VisibilityPreferences;
|
package/dist/Models/Settings.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
export const GENDERS = ['male', 'female', 'non_binary', 'other', 'prefer_not_to_say'];
|
|
2
|
-
export const
|
|
2
|
+
export const DEFAULT_PEOPLE = {
|
|
3
3
|
ageRange: [18, 99],
|
|
4
4
|
genders: ['male', 'female', 'non_binary', 'other', 'prefer_not_to_say'],
|
|
5
5
|
maxDistance: 50,
|
|
6
6
|
remoteMode: false,
|
|
7
7
|
verifiedOnly: false,
|
|
8
|
-
photosOnly: false
|
|
8
|
+
photosOnly: false,
|
|
9
|
+
languages: []
|
|
10
|
+
};
|
|
11
|
+
export const DEFAULT_ACTIVITY = {
|
|
12
|
+
genders: ['male', 'female', 'non_binary', 'other', 'prefer_not_to_say'],
|
|
13
|
+
maxDistance: 50,
|
|
14
|
+
remoteMode: false,
|
|
15
|
+
verifiedOnly: false,
|
|
16
|
+
languages: []
|
|
9
17
|
};
|
|
10
18
|
export const DEFAULT_VISIBILITY = {
|
|
11
19
|
ageRange: [18, 99],
|
package/dist/Models/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export type { SearchFilters } from './Search.js';
|
|
|
9
9
|
export type { MatchCandidate, Match, MatchRequest } from './Match.js';
|
|
10
10
|
export type { Conversation, Message } from './Conversation.js';
|
|
11
11
|
export type { Notification } from './Notification.js';
|
|
12
|
-
export type { Language, Theme, UserSettings, Gender,
|
|
13
|
-
export { GENDERS,
|
|
12
|
+
export type { Language, Theme, UserSettings, Gender, PeoplePreferences, ActivityPreferences, VisibilityPreferences } from './Settings.js';
|
|
13
|
+
export { GENDERS, DEFAULT_PEOPLE, DEFAULT_ACTIVITY, DEFAULT_VISIBILITY } from './Settings.js';
|
|
14
14
|
export type { Activity, ActivitySummary, ActivitySearchFilters, ActivityPhoto, ActivityParticipantInfo } from './Activity.js';
|
|
15
15
|
export type { BlockedUser } from './Block.js';
|
|
16
16
|
export type { PreferredPeriod } from './Availability.js';
|
package/dist/Models/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { SOCIAL_VIBES } from './Profile.js';
|
|
2
2
|
export { INTENTION_KEYS, INTENTIONS, INTEREST_CATEGORY_KEYS, INTEREST_CATEGORIES, SUB_INTENTIONS } from './Intention.js';
|
|
3
|
-
export { GENDERS,
|
|
3
|
+
export { GENDERS, DEFAULT_PEOPLE, DEFAULT_ACTIVITY, DEFAULT_VISIBILITY } from './Settings.js';
|
|
4
4
|
export { PREFERRED_PERIODS } from './Availability.js';
|
|
5
5
|
export { SUBSCRIPTION_PLANS, SUBSCRIPTION_STATUSES, BOOST_PACKS, BOOST_DURATION_DAYS, PRODUCT_IDS } from './Subscription.js';
|
|
6
6
|
export { HOST_LEVEL_KEYS, HOST_LEVELS, getHostLevel } from './TrustScore.js';
|
package/dist/WS/Request.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { MatchCandidate, MatchRequest } from '../Models/Match.js';
|
|
|
3
3
|
import type { Conversation, Message } from '../Models/Conversation.js';
|
|
4
4
|
import type { SearchFilters } from '../Models/Search.js';
|
|
5
5
|
import type { Notification } from '../Models/Notification.js';
|
|
6
|
-
import type { UserSettings,
|
|
6
|
+
import type { UserSettings, PeoplePreferences, ActivityPreferences, VisibilityPreferences, Gender } from '../Models/Settings.js';
|
|
7
7
|
import type { TagSuggestion } from '../Models/Tag.js';
|
|
8
8
|
import type { UserSubscription, UserBoost, TokenBalance, BoostPack, SubscriptionPlatform } from '../Models/Subscription.js';
|
|
9
9
|
import type { ReportReason, ReportSourceType } from '../Models/Report.js';
|
|
@@ -176,7 +176,8 @@ export interface WSRequest_GetPreferences {
|
|
|
176
176
|
export interface WSRequest_UpdatePreferences {
|
|
177
177
|
command: 'update-preferences';
|
|
178
178
|
payload: {
|
|
179
|
-
|
|
179
|
+
people?: Partial<PeoplePreferences>;
|
|
180
|
+
activity?: Partial<ActivityPreferences>;
|
|
180
181
|
visibility?: Partial<VisibilityPreferences>;
|
|
181
182
|
syncVisibility?: boolean;
|
|
182
183
|
};
|
|
@@ -217,6 +218,7 @@ export interface WSRequest_CreateActivity {
|
|
|
217
218
|
latitude?: number;
|
|
218
219
|
longitude?: number;
|
|
219
220
|
maxParticipants?: number;
|
|
221
|
+
targetGenders?: Gender[];
|
|
220
222
|
};
|
|
221
223
|
}
|
|
222
224
|
export interface WSRequest_UpdateActivity {
|
|
@@ -232,6 +234,7 @@ export interface WSRequest_UpdateActivity {
|
|
|
232
234
|
latitude?: number | null;
|
|
233
235
|
longitude?: number | null;
|
|
234
236
|
maxParticipants?: number | null;
|
|
237
|
+
targetGenders?: Gender[];
|
|
235
238
|
};
|
|
236
239
|
};
|
|
237
240
|
}
|
|
@@ -275,6 +278,32 @@ export interface WSRequest_SearchActivities {
|
|
|
275
278
|
filters: ActivitySearchFilters;
|
|
276
279
|
};
|
|
277
280
|
}
|
|
281
|
+
export interface WSRequest_SearchActivitiesWithToken {
|
|
282
|
+
command: 'search-activities-with-token';
|
|
283
|
+
payload: {
|
|
284
|
+
filters: ActivitySearchFilters;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
export interface WSRequest_PreviewSearchActivities {
|
|
288
|
+
command: 'preview-search-activities';
|
|
289
|
+
payload: {
|
|
290
|
+
filters: ActivitySearchFilters;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
export interface WSRequest_GetCandidateActivities {
|
|
294
|
+
command: 'get-candidate-activities';
|
|
295
|
+
payload: {
|
|
296
|
+
category: InterestCategoryKey;
|
|
297
|
+
tags?: string[];
|
|
298
|
+
query?: string;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
export interface WSRequest_GetPopularActivityTags {
|
|
302
|
+
command: 'get-popular-activity-tags';
|
|
303
|
+
payload: {
|
|
304
|
+
category: InterestCategoryKey;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
278
307
|
export interface WSRequest_ReportActivity {
|
|
279
308
|
command: 'report-activity';
|
|
280
309
|
payload: {
|
|
@@ -371,7 +400,7 @@ export interface WSRequest_ConfirmParticipation {
|
|
|
371
400
|
attended: boolean;
|
|
372
401
|
};
|
|
373
402
|
}
|
|
374
|
-
export type WSClientRequest = WSRequest_Handshake | WSRequest_GetProfile | WSRequest_UpdateProfile | WSRequest_GetCandidates | WSRequest_GetCandidateCounts | WSRequest_GetSubIntentionCounts | WSRequest_GetPopularTags | WSRequest_Like | WSRequest_Skip | WSRequest_Star | WSRequest_Search | WSRequest_GetConversations | WSRequest_GetMessages | WSRequest_SendMessage | WSRequest_GetRequests | WSRequest_AcceptRequest | WSRequest_DeclineRequest | WSRequest_GetNotifications | WSRequest_MarkNotificationRead | WSRequest_BlockUser | WSRequest_ReportUser | WSRequest_Unmatch | WSRequest_AppealSuspension | WSRequest_GetSettings | WSRequest_UpdateSettings | WSRequest_TagSuggest | WSRequest_GetPreferences | WSRequest_UpdatePreferences | WSRequest_DeleteAccount | WSRequest_RegisterPushToken | WSRequest_GetSubscription | WSRequest_ValidateReceipt | WSRequest_GetTokenBalance | 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_ReportActivity | WSRequest_GetMyActivities | WSRequest_GetBlockedUsers | WSRequest_UnblockUser | WSRequest_GetProfilePopularTags | WSRequest_GetBadges | WSRequest_GetUserBadges | WSRequest_ClaimBadgeReward | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation;
|
|
403
|
+
export type WSClientRequest = WSRequest_Handshake | WSRequest_GetProfile | WSRequest_UpdateProfile | WSRequest_GetCandidates | WSRequest_GetCandidateCounts | WSRequest_GetSubIntentionCounts | WSRequest_GetPopularTags | WSRequest_Like | WSRequest_Skip | WSRequest_Star | WSRequest_Search | WSRequest_GetConversations | WSRequest_GetMessages | WSRequest_SendMessage | WSRequest_GetRequests | WSRequest_AcceptRequest | WSRequest_DeclineRequest | WSRequest_GetNotifications | WSRequest_MarkNotificationRead | WSRequest_BlockUser | WSRequest_ReportUser | WSRequest_Unmatch | WSRequest_AppealSuspension | WSRequest_GetSettings | WSRequest_UpdateSettings | WSRequest_TagSuggest | WSRequest_GetPreferences | WSRequest_UpdatePreferences | WSRequest_DeleteAccount | WSRequest_RegisterPushToken | WSRequest_GetSubscription | WSRequest_ValidateReceipt | WSRequest_GetTokenBalance | 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_GetBadges | WSRequest_GetUserBadges | WSRequest_ClaimBadgeReward | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation;
|
|
375
404
|
export type WSClientCommand = WSClientRequest['command'];
|
|
376
405
|
export interface WSResponse_Handshake {
|
|
377
406
|
command: 'handshake';
|
|
@@ -597,7 +626,8 @@ export interface WSResponse_TagSuggest {
|
|
|
597
626
|
export interface WSResponse_GetPreferences {
|
|
598
627
|
command: 'get-preferences';
|
|
599
628
|
payload: {
|
|
600
|
-
|
|
629
|
+
people: PeoplePreferences;
|
|
630
|
+
activity: ActivityPreferences;
|
|
601
631
|
visibility: VisibilityPreferences;
|
|
602
632
|
syncVisibility: boolean;
|
|
603
633
|
} | {
|
|
@@ -607,7 +637,8 @@ export interface WSResponse_GetPreferences {
|
|
|
607
637
|
export interface WSResponse_UpdatePreferences {
|
|
608
638
|
command: 'update-preferences';
|
|
609
639
|
payload: {
|
|
610
|
-
|
|
640
|
+
people: PeoplePreferences;
|
|
641
|
+
activity: ActivityPreferences;
|
|
611
642
|
visibility: VisibilityPreferences;
|
|
612
643
|
syncVisibility: boolean;
|
|
613
644
|
} | {
|
|
@@ -783,6 +814,44 @@ export interface WSResponse_SearchActivities {
|
|
|
783
814
|
error: string;
|
|
784
815
|
};
|
|
785
816
|
}
|
|
817
|
+
export interface WSResponse_SearchActivitiesWithToken {
|
|
818
|
+
command: 'search-activities-with-token';
|
|
819
|
+
payload: {
|
|
820
|
+
activities: ActivitySummary[];
|
|
821
|
+
tokensRemaining: number;
|
|
822
|
+
totalCount: number;
|
|
823
|
+
} | {
|
|
824
|
+
error: string;
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
export interface WSResponse_PreviewSearchActivities {
|
|
828
|
+
command: 'preview-search-activities';
|
|
829
|
+
payload: {
|
|
830
|
+
activities: ActivitySummary[];
|
|
831
|
+
totalCount: number;
|
|
832
|
+
} | {
|
|
833
|
+
error: string;
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
export interface WSResponse_GetCandidateActivities {
|
|
837
|
+
command: 'get-candidate-activities';
|
|
838
|
+
payload: {
|
|
839
|
+
activities: ActivitySummary[];
|
|
840
|
+
totalAvailable: number;
|
|
841
|
+
swipesRemaining: number;
|
|
842
|
+
dailySwipeLimit: number;
|
|
843
|
+
} | {
|
|
844
|
+
error: string;
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
export interface WSResponse_GetPopularActivityTags {
|
|
848
|
+
command: 'get-popular-activity-tags';
|
|
849
|
+
payload: {
|
|
850
|
+
tags: string[];
|
|
851
|
+
} | {
|
|
852
|
+
error: string;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
786
855
|
export interface WSResponse_ReportActivity {
|
|
787
856
|
command: 'report-activity';
|
|
788
857
|
payload: {
|
|
@@ -860,7 +929,7 @@ export interface WSResponse_ConfirmParticipation {
|
|
|
860
929
|
error: string;
|
|
861
930
|
};
|
|
862
931
|
}
|
|
863
|
-
export type WSServerResponse = WSResponse_Handshake | WSResponse_GetProfile | WSResponse_UpdateProfile | WSResponse_GetCandidates | WSResponse_GetCandidateCounts | WSResponse_GetSubIntentionCounts | WSResponse_GetPopularTags | WSResponse_Like | WSResponse_Skip | WSResponse_Star | WSResponse_Search | WSResponse_GetConversations | WSResponse_GetMessages | WSResponse_SendMessage | WSResponse_GetRequests | WSResponse_AcceptRequest | WSResponse_DeclineRequest | WSResponse_GetNotifications | WSResponse_MarkNotificationRead | WSResponse_BlockUser | WSResponse_ReportUser | WSResponse_Unmatch | WSResponse_AppealSuspension | WSResponse_GetSettings | WSResponse_UpdateSettings | WSResponse_TagSuggest | WSResponse_GetPreferences | WSResponse_UpdatePreferences | WSResponse_DeleteAccount | WSResponse_RegisterPushToken | WSResponse_GetSubscription | WSResponse_ValidateReceipt | WSResponse_GetTokenBalance | 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_ReportActivity | WSResponse_GetMyActivities | WSResponse_MarkRead | WSResponse_GetUserProfile | WSResponse_GetBlockedUsers | WSResponse_UnblockUser | WSResponse_GetProfilePopularTags | WSResponse_GetBadges | WSResponse_GetUserBadges | WSResponse_ClaimBadgeReward | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation;
|
|
932
|
+
export type WSServerResponse = WSResponse_Handshake | WSResponse_GetProfile | WSResponse_UpdateProfile | WSResponse_GetCandidates | WSResponse_GetCandidateCounts | WSResponse_GetSubIntentionCounts | WSResponse_GetPopularTags | WSResponse_Like | WSResponse_Skip | WSResponse_Star | WSResponse_Search | WSResponse_GetConversations | WSResponse_GetMessages | WSResponse_SendMessage | WSResponse_GetRequests | WSResponse_AcceptRequest | WSResponse_DeclineRequest | WSResponse_GetNotifications | WSResponse_MarkNotificationRead | WSResponse_BlockUser | WSResponse_ReportUser | WSResponse_Unmatch | WSResponse_AppealSuspension | WSResponse_GetSettings | WSResponse_UpdateSettings | WSResponse_TagSuggest | WSResponse_GetPreferences | WSResponse_UpdatePreferences | WSResponse_DeleteAccount | WSResponse_RegisterPushToken | WSResponse_GetSubscription | WSResponse_ValidateReceipt | WSResponse_GetTokenBalance | 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_GetBadges | WSResponse_GetUserBadges | WSResponse_ClaimBadgeReward | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation;
|
|
864
933
|
export interface WSEvent_NewMessage {
|
|
865
934
|
event: 'new-message';
|
|
866
935
|
payload: {
|