@oxyfoo/whymeet-types 0.0.5 → 0.0.7
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,8 @@ export interface Activity {
|
|
|
30
31
|
hostReportedAttendees: number | null;
|
|
31
32
|
isParticipant: boolean;
|
|
32
33
|
isHost: boolean;
|
|
34
|
+
targetGenders: Gender[];
|
|
35
|
+
targetAgeRange: [number, number];
|
|
33
36
|
distance?: string;
|
|
34
37
|
distanceKm?: number;
|
|
35
38
|
createdAt: string;
|
|
@@ -45,6 +48,8 @@ export interface ActivitySummary {
|
|
|
45
48
|
maxParticipants: number | null;
|
|
46
49
|
photoKey: string | null;
|
|
47
50
|
hostName: string;
|
|
51
|
+
targetGenders: Gender[];
|
|
52
|
+
targetAgeRange: [number, number];
|
|
48
53
|
distance?: string;
|
|
49
54
|
distanceKm?: number;
|
|
50
55
|
}
|
|
@@ -54,4 +59,5 @@ export interface ActivitySearchFilters {
|
|
|
54
59
|
dateFrom?: string;
|
|
55
60
|
dateTo?: string;
|
|
56
61
|
query?: string;
|
|
62
|
+
tags?: string[];
|
|
57
63
|
}
|
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,8 @@ export interface WSRequest_CreateActivity {
|
|
|
217
218
|
latitude?: number;
|
|
218
219
|
longitude?: number;
|
|
219
220
|
maxParticipants?: number;
|
|
221
|
+
targetGenders?: Gender[];
|
|
222
|
+
targetAgeRange?: [number, number];
|
|
220
223
|
};
|
|
221
224
|
}
|
|
222
225
|
export interface WSRequest_UpdateActivity {
|
|
@@ -232,6 +235,8 @@ export interface WSRequest_UpdateActivity {
|
|
|
232
235
|
latitude?: number | null;
|
|
233
236
|
longitude?: number | null;
|
|
234
237
|
maxParticipants?: number | null;
|
|
238
|
+
targetGenders?: Gender[];
|
|
239
|
+
targetAgeRange?: [number, number];
|
|
235
240
|
};
|
|
236
241
|
};
|
|
237
242
|
}
|
|
@@ -275,6 +280,32 @@ export interface WSRequest_SearchActivities {
|
|
|
275
280
|
filters: ActivitySearchFilters;
|
|
276
281
|
};
|
|
277
282
|
}
|
|
283
|
+
export interface WSRequest_SearchActivitiesWithToken {
|
|
284
|
+
command: 'search-activities-with-token';
|
|
285
|
+
payload: {
|
|
286
|
+
filters: ActivitySearchFilters;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
export interface WSRequest_PreviewSearchActivities {
|
|
290
|
+
command: 'preview-search-activities';
|
|
291
|
+
payload: {
|
|
292
|
+
filters: ActivitySearchFilters;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
export interface WSRequest_GetCandidateActivities {
|
|
296
|
+
command: 'get-candidate-activities';
|
|
297
|
+
payload: {
|
|
298
|
+
category: InterestCategoryKey;
|
|
299
|
+
tags?: string[];
|
|
300
|
+
query?: string;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
export interface WSRequest_GetPopularActivityTags {
|
|
304
|
+
command: 'get-popular-activity-tags';
|
|
305
|
+
payload: {
|
|
306
|
+
category: InterestCategoryKey;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
278
309
|
export interface WSRequest_ReportActivity {
|
|
279
310
|
command: 'report-activity';
|
|
280
311
|
payload: {
|
|
@@ -371,7 +402,7 @@ export interface WSRequest_ConfirmParticipation {
|
|
|
371
402
|
attended: boolean;
|
|
372
403
|
};
|
|
373
404
|
}
|
|
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;
|
|
405
|
+
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
406
|
export type WSClientCommand = WSClientRequest['command'];
|
|
376
407
|
export interface WSResponse_Handshake {
|
|
377
408
|
command: 'handshake';
|
|
@@ -597,7 +628,8 @@ export interface WSResponse_TagSuggest {
|
|
|
597
628
|
export interface WSResponse_GetPreferences {
|
|
598
629
|
command: 'get-preferences';
|
|
599
630
|
payload: {
|
|
600
|
-
|
|
631
|
+
people: PeoplePreferences;
|
|
632
|
+
activity: ActivityPreferences;
|
|
601
633
|
visibility: VisibilityPreferences;
|
|
602
634
|
syncVisibility: boolean;
|
|
603
635
|
} | {
|
|
@@ -607,7 +639,8 @@ export interface WSResponse_GetPreferences {
|
|
|
607
639
|
export interface WSResponse_UpdatePreferences {
|
|
608
640
|
command: 'update-preferences';
|
|
609
641
|
payload: {
|
|
610
|
-
|
|
642
|
+
people: PeoplePreferences;
|
|
643
|
+
activity: ActivityPreferences;
|
|
611
644
|
visibility: VisibilityPreferences;
|
|
612
645
|
syncVisibility: boolean;
|
|
613
646
|
} | {
|
|
@@ -783,6 +816,44 @@ export interface WSResponse_SearchActivities {
|
|
|
783
816
|
error: string;
|
|
784
817
|
};
|
|
785
818
|
}
|
|
819
|
+
export interface WSResponse_SearchActivitiesWithToken {
|
|
820
|
+
command: 'search-activities-with-token';
|
|
821
|
+
payload: {
|
|
822
|
+
activities: ActivitySummary[];
|
|
823
|
+
tokensRemaining: number;
|
|
824
|
+
totalCount: number;
|
|
825
|
+
} | {
|
|
826
|
+
error: string;
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
export interface WSResponse_PreviewSearchActivities {
|
|
830
|
+
command: 'preview-search-activities';
|
|
831
|
+
payload: {
|
|
832
|
+
activities: ActivitySummary[];
|
|
833
|
+
totalCount: number;
|
|
834
|
+
} | {
|
|
835
|
+
error: string;
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
export interface WSResponse_GetCandidateActivities {
|
|
839
|
+
command: 'get-candidate-activities';
|
|
840
|
+
payload: {
|
|
841
|
+
activities: ActivitySummary[];
|
|
842
|
+
totalAvailable: number;
|
|
843
|
+
swipesRemaining: number;
|
|
844
|
+
dailySwipeLimit: number;
|
|
845
|
+
} | {
|
|
846
|
+
error: string;
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
export interface WSResponse_GetPopularActivityTags {
|
|
850
|
+
command: 'get-popular-activity-tags';
|
|
851
|
+
payload: {
|
|
852
|
+
tags: string[];
|
|
853
|
+
} | {
|
|
854
|
+
error: string;
|
|
855
|
+
};
|
|
856
|
+
}
|
|
786
857
|
export interface WSResponse_ReportActivity {
|
|
787
858
|
command: 'report-activity';
|
|
788
859
|
payload: {
|
|
@@ -860,7 +931,7 @@ export interface WSResponse_ConfirmParticipation {
|
|
|
860
931
|
error: string;
|
|
861
932
|
};
|
|
862
933
|
}
|
|
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;
|
|
934
|
+
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
935
|
export interface WSEvent_NewMessage {
|
|
865
936
|
event: 'new-message';
|
|
866
937
|
payload: {
|