@oxyfoo/whymeet-types 0.0.19 → 0.0.21

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,19 +1,3 @@
1
- export declare const INTENTION_KEYS: readonly ["dating", "friendship", "networking", "activities", "discussion"];
2
- export type IntentionKey = (typeof INTENTION_KEYS)[number];
3
- export interface Intention {
4
- key: IntentionKey;
5
- label: string;
6
- emoji: string;
7
- description: string;
8
- }
9
- export declare const INTENTIONS: readonly Intention[];
10
- export interface SubIntention {
11
- key: string;
12
- label: string;
13
- emoji: string;
14
- tags: string[];
15
- }
16
- export declare const SUB_INTENTIONS: Record<IntentionKey, SubIntention[]>;
17
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"];
18
2
  export type InterestCategoryKey = (typeof INTEREST_CATEGORY_KEYS)[number];
19
3
  export interface InterestCategory {
@@ -1,217 +1,3 @@
1
- export const INTENTION_KEYS = ['dating', 'friendship', 'networking', 'activities', 'discussion'];
2
- export const INTENTIONS = [
3
- { key: 'dating', label: 'Dating', emoji: '💕', description: 'Rencontrer quelqu\u2019un de spécial' },
4
- { key: 'friendship', label: 'Amitié', emoji: '🤝', description: 'Se faire de nouveaux amis' },
5
- { key: 'networking', label: 'Networking', emoji: '💼', description: 'Élargir son réseau professionnel' },
6
- {
7
- key: 'activities',
8
- label: 'Activités',
9
- emoji: '🎯',
10
- description: 'Trouver quelqu\u2019un pour des activités ensemble'
11
- },
12
- { key: 'discussion', label: 'Discussion', emoji: '💬', description: 'Discuter sans prise de tête' }
13
- ];
14
- export const SUB_INTENTIONS = {
15
- dating: [
16
- {
17
- key: 'cafe_verre',
18
- label: 'Café & verre',
19
- emoji: '☕',
20
- tags: ['Café', 'Bar', 'Afterwork', 'Terrace', 'Cocktails', 'Tchin']
21
- },
22
- {
23
- key: 'promenade',
24
- label: 'Promenade',
25
- emoji: '🚶',
26
- tags: ['Balade', 'Parc', 'Nature', 'Plage', 'Pique-nique', 'Sunset']
27
- },
28
- {
29
- key: 'dinner',
30
- label: 'Dîner',
31
- emoji: '🍽️',
32
- tags: ['Restaurant', 'Cuisine', 'Gastronomie', 'Street food', 'Sushi', 'Brunch']
33
- },
34
- {
35
- key: 'cine_culture',
36
- label: 'Ciné & culture',
37
- emoji: '🎬',
38
- tags: ['Cinéma', 'Musée', 'Théâtre', 'Expo', 'Concert', 'Opéra']
39
- },
40
- { key: 'sortie', label: 'Soirée', emoji: '🌃', tags: ['Club', 'Bar', 'Live', 'DJ', 'Afterparty', 'Rooftop'] },
41
- {
42
- key: 'escapade',
43
- label: 'Escapade',
44
- emoji: '🌍',
45
- tags: ['Week-end', 'Road trip', 'Voyage', 'Aventure', 'Hôtel', 'Camping']
46
- },
47
- {
48
- key: 'online',
49
- label: 'En ligne',
50
- emoji: '💻',
51
- tags: ['Vidéo', 'Chat', 'Jeux', 'Netflix', 'Long distance', 'Appel']
52
- }
53
- ],
54
- friendship: [
55
- {
56
- key: 'cafe_detente',
57
- label: 'Café & détente',
58
- emoji: '☕',
59
- tags: ['Café', 'Terrasse', 'Brunch', 'Discussion', 'Board games', 'Lecture']
60
- },
61
- {
62
- key: 'gaming',
63
- label: 'Gaming',
64
- emoji: '🎮',
65
- tags: ['PC', 'Console', 'Multijoueur', 'Tournoi', 'Retrogaming', 'VR']
66
- },
67
- {
68
- key: 'sport',
69
- label: 'Sport',
70
- emoji: '🏃',
71
- tags: ['Course', 'Salle', 'Foot', 'Basket', 'Tennis', 'Escalade']
72
- },
73
- {
74
- key: 'sorties',
75
- label: 'Sorties',
76
- emoji: '🎉',
77
- tags: ['Bar', 'Concert', 'Festival', 'Karaoké', 'Bowling', 'Karting']
78
- },
79
- {
80
- key: 'creative',
81
- label: 'Créatif',
82
- emoji: '🎨',
83
- tags: ['Art', 'Photo', 'Musique', 'Écriture', 'DIY', 'Craft']
84
- },
85
- {
86
- key: 'online',
87
- label: 'En ligne',
88
- emoji: '💻',
89
- tags: ['Discord', 'Gaming online', 'Podcasts', 'Séries', 'Watch party', 'Co-working']
90
- }
91
- ],
92
- networking: [
93
- {
94
- key: 'startup',
95
- label: 'Startup & Entreprise',
96
- emoji: '💡',
97
- tags: ['Entrepreneuriat', 'MVP', 'Levée de fonds', 'B2B', 'SaaS', 'Scale-up']
98
- },
99
- {
100
- key: 'tech',
101
- label: 'Tech & Digital',
102
- emoji: '💻',
103
- tags: ['Dev', 'IA', 'Produit', 'UX', 'Data', 'Cybersécurité']
104
- },
105
- {
106
- key: 'creative_pro',
107
- label: 'Créatif & Médias',
108
- emoji: '🎨',
109
- tags: ['Design', 'Brand', 'Contenu', 'Photo', 'Vidéo', 'Marketing']
110
- },
111
- {
112
- key: 'freelance',
113
- label: 'Freelance',
114
- emoji: '🔧',
115
- tags: ['Consulting', 'Missions', 'Indépendant', 'Portage', 'Auto-entrepreneur', 'Remote']
116
- },
117
- {
118
- key: 'finance',
119
- label: 'Finance & Invest',
120
- emoji: '📈',
121
- tags: ['VC', 'Angel', 'Trading', 'Crypto', 'Immobilier', 'Fintech']
122
- },
123
- {
124
- key: 'mentoring',
125
- label: 'Mentorat',
126
- emoji: '🎓',
127
- tags: ['Mentor', 'Mentoré', 'Reconversion', 'Carrière', 'Coaching', 'Académique']
128
- }
129
- ],
130
- activities: [
131
- {
132
- key: 'sport',
133
- label: 'Sport',
134
- emoji: '🏃',
135
- tags: ['Running', 'Salle', 'Foot', 'Basket', 'Tennis', 'Natation', 'Escalade', 'Yoga']
136
- },
137
- {
138
- key: 'gaming',
139
- label: 'Gaming',
140
- emoji: '🎮',
141
- tags: ['PC', 'Console', 'Multijoueur', 'RPG', 'FPS', 'Tournoi', 'Board games']
142
- },
143
- {
144
- key: 'food_cuisine',
145
- label: 'Food & Cuisine',
146
- emoji: '🍳',
147
- tags: ['Cuisine', 'Restaurant', 'Brunch', 'Street food', 'Pâtisserie', 'Vin']
148
- },
149
- {
150
- key: 'outdoors',
151
- label: 'Plein air',
152
- emoji: '🏕️',
153
- tags: ['Randonnée', 'Camping', 'Nature', 'Vélo', 'Kayak', 'Escalade']
154
- },
155
- {
156
- key: 'music',
157
- label: 'Musique',
158
- emoji: '🎵',
159
- tags: ['Concert', 'Festival', 'Instrument', 'DJ', 'Chant', 'Composition']
160
- },
161
- { key: 'creative', label: 'Créatif', emoji: '🎨', tags: ['Art', 'Photo', 'Vidéo', 'DIY', 'Craft', 'Peinture'] },
162
- {
163
- key: 'cinema_series',
164
- label: 'Ciné & Séries',
165
- emoji: '🎬',
166
- tags: ['Cinéma', 'Série', 'Watch party', 'Ciné-club', 'Documentaire', 'Anime']
167
- },
168
- {
169
- key: 'travel',
170
- label: 'Voyage',
171
- emoji: '✈️',
172
- tags: ['Road trip', 'Backpacking', 'Week-end', 'City trip', 'Aventure', 'Photos de voyage']
173
- }
174
- ],
175
- discussion: [
176
- {
177
- key: 'culture_actu',
178
- label: 'Culture & Actu',
179
- emoji: '🌍',
180
- tags: ['Politique', 'Économie', 'Société', 'Histoire', 'Géopolitique', 'Environnement']
181
- },
182
- {
183
- key: 'cinema_series',
184
- label: 'Films & Séries',
185
- emoji: '🎬',
186
- tags: ['Cinéma', 'Série', 'Netflix', 'Animation', 'Critiques', 'Recommandations']
187
- },
188
- { key: 'gaming', label: 'Gaming', emoji: '🎮', tags: ['JV', 'Retrogaming', 'Esport', 'Tests', 'RPG', 'Indé'] },
189
- {
190
- key: 'tech_sciences',
191
- label: 'Tech & Sciences',
192
- emoji: '💻',
193
- tags: ['IA', 'Espace', 'Physique', 'Biotech', 'Futurisme', 'Open Source']
194
- },
195
- {
196
- key: 'travel_stories',
197
- label: 'Voyages',
198
- emoji: '✈️',
199
- tags: ['Récits', 'Tips', 'Destinations', 'Cultures', 'Gastronomie', 'Aventures']
200
- },
201
- {
202
- key: 'philosophy',
203
- label: 'Société & Philo',
204
- emoji: '🤔',
205
- tags: ['Philo', 'Éthique', 'Débat', 'Spiritualité', 'Psychologie', 'Stoïcisme']
206
- },
207
- {
208
- key: 'humor',
209
- label: 'Humour',
210
- emoji: '😂',
211
- tags: ['Mèmes', 'Stand-up', 'Impro', 'Culture internet', 'Absurde', 'Sketches']
212
- }
213
- ]
214
- };
215
1
  export const INTEREST_CATEGORY_KEYS = [
216
2
  'sports',
217
3
  'music',
@@ -1,11 +1,12 @@
1
1
  import { User } from './User.js';
2
- import { IntentionKey } from './Intention.js';
2
+ import type { ContextMatchSummary, SocialContextKey, SocialMomentKey } from './SocialContext.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
+ socialContextKeys: SocialContextKey[];
9
+ contextMatch?: ContextMatchSummary;
9
10
  bio: string;
10
11
  interests: string[];
11
12
  skills: string[];
@@ -23,7 +24,9 @@ export interface Match {
23
24
  id: string;
24
25
  user: User;
25
26
  matchContext: string;
26
- intentionKey: IntentionKey;
27
+ socialMomentKey: SocialMomentKey;
28
+ socialContextKey: SocialContextKey;
29
+ socialContextLabel: string;
27
30
  matchedAt: string;
28
31
  lastMessage?: string;
29
32
  lastMessageTime?: string;
@@ -33,7 +36,10 @@ export interface Match {
33
36
  export interface MatchRequest {
34
37
  id: string;
35
38
  sender: User;
36
- intentions: IntentionKey[];
39
+ socialContextKeys: SocialContextKey[];
40
+ contextMatch?: ContextMatchSummary;
41
+ socialMomentKey?: SocialMomentKey;
42
+ socialContextKey?: SocialContextKey;
37
43
  matchContext: string;
38
44
  sentAt: string;
39
45
  }
@@ -1,5 +1,5 @@
1
1
  import { User } from './User.js';
2
- import { IntentionKey } from './Intention.js';
2
+ import type { SocialContextKey } from './SocialContext.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
+ socialContextKeys: SocialContextKey[];
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 './Intention.js';
2
+ import type { SocialContextKey, SocialMomentKey } from './SocialContext.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
+ socialMomentKey?: SocialMomentKey;
7
+ socialContextKey?: SocialContextKey;
8
+ socialContextKeys?: SocialContextKey[];
6
9
  interestCategory?: InterestCategoryKey;
7
10
  interestCategories?: InterestCategoryKey[];
8
11
  tags?: string[];
@@ -0,0 +1,97 @@
1
+ import type { InterestCategoryKey } from './Intention.js';
2
+ export declare const SOCIAL_MOMENT_KEYS: readonly ["do_something_together", "go_out_or_move", "talk_and_share", "build_connection", "see_if_it_clicks", "grow_or_build"];
3
+ export type SocialMomentKey = (typeof SOCIAL_MOMENT_KEYS)[number];
4
+ export declare const SOCIAL_CONTEXT_KEYS: readonly ["go_out_coffee", "go_out_drink", "go_out_meal", "go_out_walk", "go_out_tonight", "go_out_discover", "activity_sports", "activity_play", "activity_play_video_games", "activity_play_board_games", "activity_culture", "activity_creative", "activity_food", "activity_outdoor", "talk_light", "talk_deep", "talk_topic", "talk_media", "talk_language_exchange", "talk_online", "meet_make_acquaintance", "meet_feeling", "meet_simple_first_date", "meet_relaxed_date", "meet_spontaneous", "meet_online_first", "regular_sports_partner", "regular_game_partner", "regular_talk_buddy", "regular_social_habit", "regular_small_group", "regular_go_out_often", "build_coworking", "build_project", "build_entrepreneurship", "build_create_together", "build_learn_together", "build_mentoring", "build_collaboration"];
5
+ export type SocialContextKey = (typeof SOCIAL_CONTEXT_KEYS)[number];
6
+ export type SocialParentKey = SocialMomentKey | SocialContextKey;
7
+ export type SupportedLocale = 'fr' | 'en';
8
+ export interface SocialMomentI18n {
9
+ label: string;
10
+ description: string;
11
+ }
12
+ export interface SocialContextI18n {
13
+ label: string;
14
+ shortLabel: string;
15
+ description: string;
16
+ }
17
+ export interface SocialMoment {
18
+ key: SocialMomentKey;
19
+ emoji: string;
20
+ order: number;
21
+ i18n: {
22
+ fr: SocialMomentI18n;
23
+ en: SocialMomentI18n;
24
+ };
25
+ }
26
+ export interface SocialContext {
27
+ key: SocialContextKey;
28
+ parentKey: SocialParentKey;
29
+ momentKey: SocialMomentKey;
30
+ level: 2 | 3;
31
+ emoji: string;
32
+ tags: readonly string[];
33
+ domainKeys: readonly InterestCategoryKey[];
34
+ broad?: boolean;
35
+ order: number;
36
+ i18n: {
37
+ fr: SocialContextI18n;
38
+ en: SocialContextI18n;
39
+ };
40
+ }
41
+ export interface SocialContextSelection {
42
+ momentKey: SocialMomentKey;
43
+ contextKey: SocialContextKey;
44
+ tags?: string[];
45
+ query?: string;
46
+ }
47
+ export interface SocialContextTagMapping {
48
+ contextKey: SocialContextKey;
49
+ tag: string;
50
+ }
51
+ export interface SocialContextDomainMapping {
52
+ contextKey: SocialContextKey;
53
+ domainKey: InterestCategoryKey;
54
+ weight: number;
55
+ }
56
+ export type ContextFallbackLevel = 'none' | 'same_moment' | 'related_domains' | 'broad_context';
57
+ export interface ContextMatchSummary {
58
+ momentKey: SocialMomentKey;
59
+ contextKey: SocialContextKey;
60
+ label: string;
61
+ reasons: string[];
62
+ fallbackLevel: ContextFallbackLevel;
63
+ scoreParts?: {
64
+ context: number;
65
+ tags: number;
66
+ distance: number;
67
+ trust: number;
68
+ vibe: number;
69
+ };
70
+ }
71
+ export declare const SOCIAL_MOMENTS: readonly SocialMoment[];
72
+ export declare const SOCIAL_CONTEXTS: readonly SocialContext[];
73
+ export declare const SOCIAL_CONTEXTS_BY_KEY: Readonly<Record<SocialContextKey, SocialContext>>;
74
+ export declare const SOCIAL_MOMENTS_BY_KEY: Readonly<Record<SocialMomentKey, SocialMoment>>;
75
+ export declare const SOCIAL_CONTEXTS_BY_PARENT: Readonly<Record<SocialParentKey, readonly SocialContext[]>>;
76
+ export declare const SOCIAL_CONTEXTS_BY_MOMENT: Readonly<Record<SocialMomentKey, readonly SocialContext[]>>;
77
+ export declare const SOCIAL_NESTED_CONTEXTS_BY_MOMENT: Readonly<Record<SocialMomentKey, readonly SocialContext[]>>;
78
+ export declare const SOCIAL_CONTEXT_TAG_MAPPINGS: readonly SocialContextTagMapping[];
79
+ export declare const SOCIAL_CONTEXT_DOMAIN_MAPPINGS: readonly SocialContextDomainMapping[];
80
+ export declare const LEGACY_INTENTION_TO_SOCIAL_CONTEXTS: Readonly<Record<string, readonly SocialContextKey[]>>;
81
+ export declare const DEPRECATED_SOCIAL_CONTEXT_TO_ACTIVE_CONTEXTS: Readonly<Record<string, readonly SocialContextKey[]>>;
82
+ export declare const DEPRECATED_SOCIAL_CONTEXT_TO_ACTIVE_CONTEXT: Readonly<Record<string, SocialContextKey>>;
83
+ export declare function isSocialMomentKey(value: string): value is SocialMomentKey;
84
+ export declare function isSocialContextKey(value: string): value is SocialContextKey;
85
+ export declare function normalizeSocialContextKey(value: string): SocialContextKey | null;
86
+ export declare function normalizeSocialContextKeys(values: readonly string[] | undefined | null): SocialContextKey[];
87
+ export declare function getSocialMoment(key: SocialMomentKey): SocialMoment;
88
+ export declare function getSocialContext(key: SocialContextKey): SocialContext;
89
+ export declare function getSocialContextsForMoment(momentKey: SocialMomentKey): readonly SocialContext[];
90
+ export declare function getAllSocialContextsForMoment(momentKey: SocialMomentKey): readonly SocialContext[];
91
+ export declare function getChildSocialContexts(parentKey: SocialParentKey): readonly SocialContext[];
92
+ export declare function hasChildSocialContexts(parentKey: SocialParentKey): boolean;
93
+ export declare function getParentKeyForContext(contextKey: SocialContextKey): SocialParentKey;
94
+ export declare function getMomentKeyForContext(contextKey: SocialContextKey): SocialMomentKey;
95
+ export declare function getAncestorContextKeys(contextKey: SocialContextKey): SocialContextKey[];
96
+ export declare function getDescendantContextKeys(parentKey: SocialParentKey): SocialContextKey[];
97
+ export declare function normalizeSocialContextSelection(selection: SocialContextSelection): SocialContextSelection | null;