@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.
- package/dist/Models/Activity.d.ts +1 -1
- package/dist/Models/Intention.d.ts +86 -16
- package/dist/Models/Intention.js +1181 -245
- package/dist/Models/InterestCategory.d.ts +9 -0
- package/dist/Models/InterestCategory.js +40 -0
- package/dist/Models/Match.d.ts +8 -3
- package/dist/Models/Profile.d.ts +2 -2
- package/dist/Models/Search.d.ts +5 -2
- package/dist/Models/index.d.ts +4 -2
- package/dist/Models/index.js +2 -1
- package/dist/WS/Request.d.ts +31 -14
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { User } from './User.js';
|
|
2
|
-
import type { InterestCategoryKey } from './
|
|
2
|
+
import type { InterestCategoryKey } from './InterestCategory.js';
|
|
3
3
|
import type { Gender } from './Settings.js';
|
|
4
4
|
export interface ActivityParticipantInfo extends User {
|
|
5
5
|
confirmedAttendance: boolean | null;
|
|
@@ -1,25 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
import type { InterestCategoryKey } from './InterestCategory.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 INTENTION_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"];
|
|
2
5
|
export type IntentionKey = (typeof INTENTION_KEYS)[number];
|
|
3
|
-
export
|
|
4
|
-
|
|
6
|
+
export type IntentionParentKey = SocialMomentKey | IntentionKey;
|
|
7
|
+
export type SupportedLocale = 'fr' | 'en';
|
|
8
|
+
export interface SocialMomentI18n {
|
|
5
9
|
label: string;
|
|
6
|
-
emoji: string;
|
|
7
10
|
description: string;
|
|
8
11
|
}
|
|
9
|
-
export
|
|
10
|
-
export interface SubIntention {
|
|
11
|
-
key: string;
|
|
12
|
+
export interface IntentionI18n {
|
|
12
13
|
label: string;
|
|
14
|
+
shortLabel: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SocialMoment {
|
|
18
|
+
key: SocialMomentKey;
|
|
13
19
|
emoji: string;
|
|
14
|
-
|
|
20
|
+
order: number;
|
|
21
|
+
i18n: {
|
|
22
|
+
fr: SocialMomentI18n;
|
|
23
|
+
en: SocialMomentI18n;
|
|
24
|
+
};
|
|
15
25
|
}
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
label: string;
|
|
26
|
+
export interface Intention {
|
|
27
|
+
key: IntentionKey;
|
|
28
|
+
parentKey: IntentionParentKey;
|
|
29
|
+
momentKey: SocialMomentKey;
|
|
30
|
+
level: 2 | 3;
|
|
22
31
|
emoji: string;
|
|
23
|
-
|
|
32
|
+
tags: readonly string[];
|
|
33
|
+
domainKeys: readonly InterestCategoryKey[];
|
|
34
|
+
broad?: boolean;
|
|
35
|
+
order: number;
|
|
36
|
+
i18n: {
|
|
37
|
+
fr: IntentionI18n;
|
|
38
|
+
en: IntentionI18n;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface IntentionSelection {
|
|
42
|
+
momentKey: SocialMomentKey;
|
|
43
|
+
intentionKey: IntentionKey;
|
|
44
|
+
tags?: string[];
|
|
45
|
+
query?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IntentionTagMapping {
|
|
48
|
+
intentionKey: IntentionKey;
|
|
49
|
+
tag: string;
|
|
24
50
|
}
|
|
25
|
-
export
|
|
51
|
+
export interface IntentionDomainMapping {
|
|
52
|
+
intentionKey: IntentionKey;
|
|
53
|
+
domainKey: InterestCategoryKey;
|
|
54
|
+
weight: number;
|
|
55
|
+
}
|
|
56
|
+
export type IntentionFallbackLevel = 'none' | 'same_moment' | 'related_domains' | 'broad_intention';
|
|
57
|
+
export interface IntentionMatchSummary {
|
|
58
|
+
momentKey: SocialMomentKey;
|
|
59
|
+
intentionKey: IntentionKey;
|
|
60
|
+
fallbackLevel: IntentionFallbackLevel;
|
|
61
|
+
scoreParts?: {
|
|
62
|
+
intention: number;
|
|
63
|
+
tags: number;
|
|
64
|
+
distance: number;
|
|
65
|
+
trust: number;
|
|
66
|
+
vibe: number;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export declare const SOCIAL_MOMENTS: readonly SocialMoment[];
|
|
70
|
+
export declare const INTENTIONS: readonly Intention[];
|
|
71
|
+
export declare const INTENTIONS_BY_KEY: Readonly<Record<IntentionKey, Intention>>;
|
|
72
|
+
export declare const SOCIAL_MOMENTS_BY_KEY: Readonly<Record<SocialMomentKey, SocialMoment>>;
|
|
73
|
+
export declare const INTENTIONS_BY_PARENT: Readonly<Record<IntentionParentKey, readonly Intention[]>>;
|
|
74
|
+
export declare const INTENTIONS_BY_MOMENT: Readonly<Record<SocialMomentKey, readonly Intention[]>>;
|
|
75
|
+
export declare const NESTED_INTENTIONS_BY_MOMENT: Readonly<Record<SocialMomentKey, readonly Intention[]>>;
|
|
76
|
+
export declare const INTENTION_TAG_MAPPINGS: readonly IntentionTagMapping[];
|
|
77
|
+
export declare const INTENTION_DOMAIN_MAPPINGS: readonly IntentionDomainMapping[];
|
|
78
|
+
export declare const LEGACY_INTENTION_TO_INTENTIONS: Readonly<Record<string, readonly IntentionKey[]>>;
|
|
79
|
+
export declare const DEPRECATED_INTENTION_TO_ACTIVE_INTENTIONS: Readonly<Record<string, readonly IntentionKey[]>>;
|
|
80
|
+
export declare const DEPRECATED_INTENTION_TO_ACTIVE_INTENTION: Readonly<Record<string, IntentionKey>>;
|
|
81
|
+
export declare function isSocialMomentKey(value: string): value is SocialMomentKey;
|
|
82
|
+
export declare function isIntentionKey(value: string): value is IntentionKey;
|
|
83
|
+
export declare function normalizeIntentionKey(value: string): IntentionKey | null;
|
|
84
|
+
export declare function normalizeIntentionKeys(values: readonly string[] | undefined | null): IntentionKey[];
|
|
85
|
+
export declare function getSocialMoment(key: SocialMomentKey): SocialMoment;
|
|
86
|
+
export declare function getIntention(key: IntentionKey): Intention;
|
|
87
|
+
export declare function getIntentionsForMoment(momentKey: SocialMomentKey): readonly Intention[];
|
|
88
|
+
export declare function getAllIntentionsForMoment(momentKey: SocialMomentKey): readonly Intention[];
|
|
89
|
+
export declare function getChildIntentions(parentKey: IntentionParentKey): readonly Intention[];
|
|
90
|
+
export declare function hasChildIntentions(parentKey: IntentionParentKey): boolean;
|
|
91
|
+
export declare function getParentKeyForIntention(intentionKey: IntentionKey): IntentionParentKey;
|
|
92
|
+
export declare function getMomentKeyForIntention(intentionKey: IntentionKey): SocialMomentKey;
|
|
93
|
+
export declare function getAncestorIntentionKeys(intentionKey: IntentionKey): IntentionKey[];
|
|
94
|
+
export declare function getDescendantIntentionKeys(parentKey: IntentionParentKey): IntentionKey[];
|
|
95
|
+
export declare function normalizeIntentionSelection(selection: IntentionSelection): IntentionSelection | null;
|