@oxyfoo/whymeet-types 0.0.20 → 0.0.22

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,9 @@
1
+ export declare const INTEREST_CATEGORY_KEYS: readonly ["sports", "music", "nightlife", "gaming", "food", "culture", "cinema", "reading", "outdoors", "wellness", "travel", "creative", "learning", "tech", "cooking", "craft", "pro", "coaching"];
2
+ export type InterestCategoryKey = (typeof INTEREST_CATEGORY_KEYS)[number];
3
+ export interface InterestCategory {
4
+ key: InterestCategoryKey;
5
+ label: string;
6
+ emoji: string;
7
+ description: string;
8
+ }
9
+ export declare const INTEREST_CATEGORIES: readonly InterestCategory[];
@@ -0,0 +1,40 @@
1
+ export const INTEREST_CATEGORY_KEYS = [
2
+ 'sports',
3
+ 'music',
4
+ 'nightlife',
5
+ 'gaming',
6
+ 'food',
7
+ 'culture',
8
+ 'cinema',
9
+ 'reading',
10
+ 'outdoors',
11
+ 'wellness',
12
+ 'travel',
13
+ 'creative',
14
+ 'learning',
15
+ 'tech',
16
+ 'cooking',
17
+ 'craft',
18
+ 'pro',
19
+ 'coaching'
20
+ ];
21
+ export const INTEREST_CATEGORIES = [
22
+ { key: 'sports', label: 'Sports', emoji: '⚽', description: 'Football, running, fitness…' },
23
+ { key: 'music', label: 'Musique', emoji: '🎵', description: 'Concerts, instruments, genres…' },
24
+ { key: 'nightlife', label: 'Sorties', emoji: '🌙', description: 'Bars, clubs, soirées…' },
25
+ { key: 'gaming', label: 'Gaming', emoji: '🎮', description: 'Jeux vidéo, board games…' },
26
+ { key: 'food', label: 'Food', emoji: '🍕', description: 'Restaurants, cuisine, food trips…' },
27
+ { key: 'culture', label: 'Culture', emoji: '🎭', description: 'Musées, expos, théâtre…' },
28
+ { key: 'cinema', label: 'Ciné & séries', emoji: '🎬', description: 'Films, séries, documentaires…' },
29
+ { key: 'reading', label: 'Lecture', emoji: '📚', description: 'Romans, BD, manga, essais…' },
30
+ { key: 'outdoors', label: 'Plein air', emoji: '🏔️', description: 'Rando, escalade, nature…' },
31
+ { key: 'wellness', label: 'Bien-être', emoji: '🧘', description: 'Yoga, méditation, spa…' },
32
+ { key: 'travel', label: 'Voyages', emoji: '✈️', description: 'Découvrir de nouveaux endroits' },
33
+ { key: 'creative', label: 'Créatif', emoji: '🎨', description: 'Art, photo, écriture, DIY…' },
34
+ { key: 'learning', label: 'Apprentissage', emoji: '📖', description: 'Langues, sciences, histoire…' },
35
+ { key: 'tech', label: 'Tech', emoji: '💻', description: 'Code, IA, design, data…' },
36
+ { key: 'cooking', label: 'Cuisine', emoji: '👨‍🍳', description: 'Pâtisserie, gastronomie, cocktails…' },
37
+ { key: 'craft', label: 'Artisanat', emoji: '🔨', description: 'Bricolage, couture, menuiserie…' },
38
+ { key: 'pro', label: 'Pro', emoji: '💼', description: 'Domaines professionnels et études…' },
39
+ { key: 'coaching', label: 'Coaching', emoji: '🎓', description: 'Transmettre, coacher, enseigner…' }
40
+ ];
@@ -1,11 +1,12 @@
1
1
  import { User } from './User.js';
2
- import { IntentionKey } from './Intention.js';
2
+ import type { IntentionMatchSummary, IntentionKey, SocialMomentKey } from './Intention.js';
3
3
  import type { HostLevel } from './TrustScore.js';
4
4
  import type { SocialVibe } from './Profile.js';
5
5
  export interface MatchCandidate {
6
6
  id: string;
7
7
  user: User;
8
- intentions: IntentionKey[];
8
+ intentionKeys: IntentionKey[];
9
+ intentionMatch?: IntentionMatchSummary;
9
10
  bio: string;
10
11
  interests: string[];
11
12
  skills: string[];
@@ -23,6 +24,7 @@ export interface Match {
23
24
  id: string;
24
25
  user: User;
25
26
  matchContext: string;
27
+ momentKey: SocialMomentKey;
26
28
  intentionKey: IntentionKey;
27
29
  matchedAt: string;
28
30
  lastMessage?: string;
@@ -33,7 +35,10 @@ export interface Match {
33
35
  export interface MatchRequest {
34
36
  id: string;
35
37
  sender: User;
36
- intentions: IntentionKey[];
38
+ intentionKeys: IntentionKey[];
39
+ intentionMatch?: IntentionMatchSummary;
40
+ momentKey?: SocialMomentKey;
41
+ intentionKey?: IntentionKey;
37
42
  matchContext: string;
38
43
  sentAt: string;
39
44
  }
@@ -1,5 +1,5 @@
1
1
  import { User } from './User.js';
2
- import { IntentionKey } from './Intention.js';
2
+ import type { IntentionKey } from './Intention.js';
3
3
  import { Tag } from './Tag.js';
4
4
  import type { HostLevel } from './TrustScore.js';
5
5
  export type SocialVibe = 'reserved' | 'calm' | 'balanced' | 'outgoing' | 'very_social';
@@ -11,7 +11,7 @@ export interface Profile extends User {
11
11
  interests: Tag[];
12
12
  skills: Tag[];
13
13
  socialVibe: SocialVibe;
14
- intentions: IntentionKey[];
14
+ intentionKeys: IntentionKey[];
15
15
  spokenLanguages: string[];
16
16
  preferredDiscoveryView: DiscoveryView;
17
17
  location: {
@@ -1,8 +1,11 @@
1
- import { IntentionKey, InterestCategoryKey } from './Intention.js';
1
+ import type { InterestCategoryKey } from './InterestCategory.js';
2
+ import type { IntentionKey, SocialMomentKey } from './Intention.js';
2
3
  import type { SocialVibe } from './Profile.js';
3
4
  import type { PreferredPeriod } from './Availability.js';
4
5
  export interface SearchFilters {
5
- intentions?: IntentionKey[];
6
+ momentKey?: SocialMomentKey;
7
+ intentionKey?: IntentionKey;
8
+ intentionKeys?: IntentionKey[];
6
9
  interestCategory?: InterestCategoryKey;
7
10
  interestCategories?: InterestCategoryKey[];
8
11
  tags?: string[];
@@ -3,8 +3,10 @@ export type { ReportReason, ReportSourceType } from './Report.js';
3
3
  export type { FeedbackType } from './Feedback.js';
4
4
  export type { Profile, SocialVibe, DiscoveryView } from './Profile.js';
5
5
  export { SOCIAL_VIBES } from './Profile.js';
6
- export type { Intention, IntentionKey, InterestCategory, InterestCategoryKey, SubIntention } from './Intention.js';
7
- export { INTENTION_KEYS, INTENTIONS, INTEREST_CATEGORY_KEYS, INTEREST_CATEGORIES, SUB_INTENTIONS } from './Intention.js';
6
+ export type { InterestCategory, InterestCategoryKey } from './InterestCategory.js';
7
+ export { INTEREST_CATEGORY_KEYS, INTEREST_CATEGORIES } from './InterestCategory.js';
8
+ export type { IntentionFallbackLevel, IntentionMatchSummary, Intention, IntentionDomainMapping, IntentionKey, IntentionParentKey, IntentionSelection, IntentionTagMapping, SocialMoment, SocialMomentKey } from './Intention.js';
9
+ export { DEPRECATED_INTENTION_TO_ACTIVE_INTENTION, DEPRECATED_INTENTION_TO_ACTIVE_INTENTIONS, getAllIntentionsForMoment, getAncestorIntentionKeys, getChildIntentions, getDescendantIntentionKeys, getMomentKeyForIntention, getParentKeyForIntention, getIntention, getIntentionsForMoment, hasChildIntentions, getSocialMoment, isIntentionKey, isSocialMomentKey, LEGACY_INTENTION_TO_INTENTIONS, normalizeIntentionKey, normalizeIntentionKeys, normalizeIntentionSelection, INTENTION_DOMAIN_MAPPINGS, INTENTION_KEYS, INTENTIONS_BY_PARENT, INTENTION_TAG_MAPPINGS, INTENTIONS, INTENTIONS_BY_KEY, INTENTIONS_BY_MOMENT, NESTED_INTENTIONS_BY_MOMENT, SOCIAL_MOMENT_KEYS, SOCIAL_MOMENTS, SOCIAL_MOMENTS_BY_KEY } from './Intention.js';
8
10
  export type { Tag, TagMatchType, TagSuggestion } from './Tag.js';
9
11
  export type { SearchFilters } from './Search.js';
10
12
  export type { MatchCandidate, Match, MatchRequest } from './Match.js';
@@ -1,5 +1,6 @@
1
1
  export { SOCIAL_VIBES } from './Profile.js';
2
- export { INTENTION_KEYS, INTENTIONS, INTEREST_CATEGORY_KEYS, INTEREST_CATEGORIES, SUB_INTENTIONS } from './Intention.js';
2
+ export { INTEREST_CATEGORY_KEYS, INTEREST_CATEGORIES } from './InterestCategory.js';
3
+ export { DEPRECATED_INTENTION_TO_ACTIVE_INTENTION, DEPRECATED_INTENTION_TO_ACTIVE_INTENTIONS, getAllIntentionsForMoment, getAncestorIntentionKeys, getChildIntentions, getDescendantIntentionKeys, getMomentKeyForIntention, getParentKeyForIntention, getIntention, getIntentionsForMoment, hasChildIntentions, getSocialMoment, isIntentionKey, isSocialMomentKey, LEGACY_INTENTION_TO_INTENTIONS, normalizeIntentionKey, normalizeIntentionKeys, normalizeIntentionSelection, INTENTION_DOMAIN_MAPPINGS, INTENTION_KEYS, INTENTIONS_BY_PARENT, INTENTION_TAG_MAPPINGS, INTENTIONS, INTENTIONS_BY_KEY, INTENTIONS_BY_MOMENT, NESTED_INTENTIONS_BY_MOMENT, SOCIAL_MOMENT_KEYS, SOCIAL_MOMENTS, SOCIAL_MOMENTS_BY_KEY } from './Intention.js';
3
4
  export { GENDERS, DEFAULT_PEOPLE, DEFAULT_ACTIVITY, DEFAULT_VISIBILITY } from './Settings.js';
4
5
  export { PREFERRED_PERIODS } from './Availability.js';
5
6
  export { SUBSCRIPTION_PLANS, SUBSCRIPTION_STATUSES, BOOST_PACKS, BOOST_DURATION_DAYS, PRODUCT_IDS, APP_CONFIG_KEYS } from './Subscription.js';
@@ -10,7 +10,8 @@ import type { ReportReason, ReportSourceType } from '../Models/Report.js';
10
10
  import type { FeedbackType } from '../Models/Feedback.js';
11
11
  import type { BlockedUser } from '../Models/Block.js';
12
12
  import type { Activity, ActivitySummary, ActivitySearchFilters } from '../Models/Activity.js';
13
- import type { IntentionKey, InterestCategoryKey } from '../Models/Intention.js';
13
+ import type { InterestCategoryKey } from '../Models/InterestCategory.js';
14
+ import type { Intention, IntentionSelection, SocialMoment, SocialMomentKey } from '../Models/Intention.js';
14
15
  import type { UserBadge } from '../Models/Badge.js';
15
16
  import type { PlaceSuggestion, PlaceSuggestionLite } from '../Models/Place.js';
16
17
  export interface WSRequest_Handshake {
@@ -39,17 +40,21 @@ export interface WSRequest_GetCandidateCounts {
39
40
  command: 'get-candidate-counts';
40
41
  payload: Record<string, never>;
41
42
  }
42
- export interface WSRequest_GetSubIntentionCounts {
43
- command: 'get-subintention-counts';
43
+ export interface WSRequest_GetIntentionCatalog {
44
+ command: 'get-intention-catalog';
45
+ payload: Record<string, never>;
46
+ }
47
+ export interface WSRequest_GetIntentionCounts {
48
+ command: 'get-intention-counts';
44
49
  payload: {
45
- intention: IntentionKey;
50
+ momentKey: SocialMomentKey;
46
51
  };
47
52
  }
48
- export interface WSRequest_GetPopularTags {
49
- command: 'get-popular-tags';
53
+ export interface WSRequest_GetIntentionPopularTags {
54
+ command: 'get-intention-popular-tags';
50
55
  payload: {
51
- intention: IntentionKey;
52
- subCategories: string[];
56
+ selection: IntentionSelection;
57
+ selectedTags?: string[];
53
58
  };
54
59
  }
55
60
  export interface WSRequest_GetProfilePopularTags {
@@ -60,18 +65,21 @@ export interface WSRequest_Like {
60
65
  command: 'like';
61
66
  payload: {
62
67
  candidateId: string;
68
+ selection?: IntentionSelection;
63
69
  };
64
70
  }
65
71
  export interface WSRequest_Skip {
66
72
  command: 'skip';
67
73
  payload: {
68
74
  candidateId: string;
75
+ selection?: IntentionSelection;
69
76
  };
70
77
  }
71
78
  export interface WSRequest_Star {
72
79
  command: 'star';
73
80
  payload: {
74
81
  candidateId: string;
82
+ selection?: IntentionSelection;
75
83
  };
76
84
  }
77
85
  export interface WSRequest_Search {
@@ -427,7 +435,7 @@ export interface WSRequest_SetDiscoveryView {
427
435
  view: DiscoveryView;
428
436
  };
429
437
  }
430
- 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_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_GetBadges | WSRequest_GetUserBadges | WSRequest_ClaimBadgeReward | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation | WSRequest_SetDiscoveryView | WSRequest_PlacesSuggest | WSRequest_PlacesRetrieve;
438
+ export type WSClientRequest = WSRequest_Handshake | WSRequest_GetProfile | WSRequest_UpdateProfile | WSRequest_GetCandidates | WSRequest_GetCandidateCounts | WSRequest_GetIntentionCatalog | WSRequest_GetIntentionCounts | WSRequest_GetIntentionPopularTags | WSRequest_Like | WSRequest_Skip | WSRequest_Star | 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_GetBadges | WSRequest_GetUserBadges | WSRequest_ClaimBadgeReward | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation | WSRequest_SetDiscoveryView | WSRequest_PlacesSuggest | WSRequest_PlacesRetrieve;
431
439
  export type WSClientCommand = WSClientRequest['command'];
432
440
  export interface WSResponse_Handshake {
433
441
  command: 'handshake';
@@ -471,16 +479,25 @@ export interface WSResponse_GetCandidateCounts {
471
479
  error: string;
472
480
  };
473
481
  }
474
- export interface WSResponse_GetSubIntentionCounts {
475
- command: 'get-subintention-counts';
482
+ export interface WSResponse_GetIntentionCatalog {
483
+ command: 'get-intention-catalog';
484
+ payload: {
485
+ moments: SocialMoment[];
486
+ intentions: Intention[];
487
+ } | {
488
+ error: string;
489
+ };
490
+ }
491
+ export interface WSResponse_GetIntentionCounts {
492
+ command: 'get-intention-counts';
476
493
  payload: {
477
494
  counts: Record<string, number>;
478
495
  } | {
479
496
  error: string;
480
497
  };
481
498
  }
482
- export interface WSResponse_GetPopularTags {
483
- command: 'get-popular-tags';
499
+ export interface WSResponse_GetIntentionPopularTags {
500
+ command: 'get-intention-popular-tags';
484
501
  payload: {
485
502
  tags: string[];
486
503
  } | {
@@ -980,7 +997,7 @@ export interface WSResponse_PlacesRetrieve {
980
997
  error: string;
981
998
  };
982
999
  }
983
- 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_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_GetBadges | WSResponse_GetUserBadges | WSResponse_ClaimBadgeReward | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation | WSResponse_SetDiscoveryView | WSResponse_PlacesSuggest | WSResponse_PlacesRetrieve;
1000
+ export type WSServerResponse = WSResponse_Handshake | WSResponse_GetProfile | WSResponse_UpdateProfile | WSResponse_GetCandidates | WSResponse_GetCandidateCounts | WSResponse_GetIntentionCatalog | WSResponse_GetIntentionCounts | WSResponse_GetIntentionPopularTags | WSResponse_Like | WSResponse_Skip | WSResponse_Star | 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_GetBadges | WSResponse_GetUserBadges | WSResponse_ClaimBadgeReward | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation | WSResponse_SetDiscoveryView | WSResponse_PlacesSuggest | WSResponse_PlacesRetrieve;
984
1001
  export interface WSEvent_NewMessage {
985
1002
  event: 'new-message';
986
1003
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyfoo/whymeet-types",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "WhyMeet Types - Shared TypeScript types for the WhyMeet project.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",