@oxyfoo/whymeet-types 0.0.28 → 0.0.29
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/Analytics.d.ts +45 -0
- package/dist/Models/Analytics.js +5 -0
- package/dist/Models/index.d.ts +2 -0
- package/dist/Models/index.js +1 -0
- package/dist/WS/Request.d.ts +18 -2
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type AnalyticsSystemEventName = 'session.start' | 'session.end' | 'screen_view';
|
|
2
|
+
export type AnalyticsFeatureEventName = 'feature.profile.edit_started' | 'feature.profile.complete' | 'feature.match.like' | 'feature.match.pass' | 'feature.match.create' | 'feature.message.send' | 'feature.discovery.search' | 'feature.activity.create' | 'feature.activity.join' | 'onboarding.step_completed';
|
|
3
|
+
export type AnalyticsEventName = AnalyticsSystemEventName | AnalyticsFeatureEventName;
|
|
4
|
+
export interface AnalyticsScreenViewProps {
|
|
5
|
+
screen: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AnalyticsOnboardingStepProps {
|
|
8
|
+
step: number;
|
|
9
|
+
totalSteps: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AnalyticsEventPropsMap {
|
|
12
|
+
'session.start': Record<string, never>;
|
|
13
|
+
'session.end': Record<string, never>;
|
|
14
|
+
screen_view: AnalyticsScreenViewProps;
|
|
15
|
+
'feature.profile.edit_started': Record<string, never>;
|
|
16
|
+
'feature.profile.complete': Record<string, never>;
|
|
17
|
+
'feature.match.like': Record<string, never>;
|
|
18
|
+
'feature.match.pass': Record<string, never>;
|
|
19
|
+
'feature.match.create': Record<string, never>;
|
|
20
|
+
'feature.message.send': Record<string, never>;
|
|
21
|
+
'feature.discovery.search': Record<string, never>;
|
|
22
|
+
'feature.activity.create': Record<string, never>;
|
|
23
|
+
'feature.activity.join': Record<string, never>;
|
|
24
|
+
'onboarding.step_completed': AnalyticsOnboardingStepProps;
|
|
25
|
+
}
|
|
26
|
+
export type AnalyticsPlatform = 'ios' | 'android';
|
|
27
|
+
export interface AnalyticsClientEvent<N extends AnalyticsEventName = AnalyticsEventName> {
|
|
28
|
+
name: N;
|
|
29
|
+
ts: number;
|
|
30
|
+
platform: AnalyticsPlatform;
|
|
31
|
+
appVersion: string;
|
|
32
|
+
props?: AnalyticsEventPropsMap[N];
|
|
33
|
+
}
|
|
34
|
+
export declare const ANALYTICS_MAX_EVENTS_PER_BATCH = 100;
|
|
35
|
+
export declare const ANALYTICS_MAX_PROPS_BYTES = 2048;
|
|
36
|
+
export declare const ANALYTICS_CLIENT_FLUSH_THRESHOLD = 50;
|
|
37
|
+
export declare const ANALYTICS_CLIENT_FLUSH_INTERVAL_MS = 30000;
|
|
38
|
+
export declare const ANALYTICS_RAW_RETENTION_DAYS = 60;
|
|
39
|
+
export interface AnalyticsDailyMetricRow {
|
|
40
|
+
date: string;
|
|
41
|
+
name: AnalyticsEventName;
|
|
42
|
+
dimension: string;
|
|
43
|
+
count: number;
|
|
44
|
+
uniqueDevices: number;
|
|
45
|
+
}
|
package/dist/Models/index.d.ts
CHANGED
|
@@ -26,3 +26,5 @@ export type { HostLevelKey, HostLevel, HostLevelDefinition } from './TrustScore.
|
|
|
26
26
|
export { HOST_LEVEL_KEYS, HOST_LEVELS, getHostLevel } from './TrustScore.js';
|
|
27
27
|
export type { EmailTypeKey, EmailTypeDescriptor, EmailScope, EmailDelivery, EmailLogStatus } from './EmailType.js';
|
|
28
28
|
export { EMAIL_TYPES, EMAIL_TYPE_KEYS, EMAIL_LOG_STATUSES, getEmailTypeDescriptor } from './EmailType.js';
|
|
29
|
+
export type { AnalyticsSystemEventName, AnalyticsFeatureEventName, AnalyticsEventName, AnalyticsScreenViewProps, AnalyticsOnboardingStepProps, AnalyticsEventPropsMap, AnalyticsPlatform, AnalyticsClientEvent, AnalyticsDailyMetricRow } from './Analytics.js';
|
|
30
|
+
export { ANALYTICS_MAX_EVENTS_PER_BATCH, ANALYTICS_MAX_PROPS_BYTES, ANALYTICS_CLIENT_FLUSH_THRESHOLD, ANALYTICS_CLIENT_FLUSH_INTERVAL_MS, ANALYTICS_RAW_RETENTION_DAYS } from './Analytics.js';
|
package/dist/Models/index.js
CHANGED
|
@@ -6,3 +6,4 @@ export { PREFERRED_PERIODS } from './Availability.js';
|
|
|
6
6
|
export { SUBSCRIPTION_PLANS, SUBSCRIPTION_STATUSES, BOOST_PACKS, BOOST_DURATION_DAYS, PRODUCT_IDS, APP_CONFIG_KEYS } from './Subscription.js';
|
|
7
7
|
export { HOST_LEVEL_KEYS, HOST_LEVELS, getHostLevel } from './TrustScore.js';
|
|
8
8
|
export { EMAIL_TYPES, EMAIL_TYPE_KEYS, EMAIL_LOG_STATUSES, getEmailTypeDescriptor } from './EmailType.js';
|
|
9
|
+
export { ANALYTICS_MAX_EVENTS_PER_BATCH, ANALYTICS_MAX_PROPS_BYTES, ANALYTICS_CLIENT_FLUSH_THRESHOLD, ANALYTICS_CLIENT_FLUSH_INTERVAL_MS, ANALYTICS_RAW_RETENTION_DAYS } from './Analytics.js';
|
package/dist/WS/Request.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type { InterestCategoryKey } from '../Models/InterestCategory.js';
|
|
|
14
14
|
import type { Intention, IntentionSelection, IntentionCategory, IntentionCategoryKey } from '../Models/Intention.js';
|
|
15
15
|
import type { UserBadge } from '../Models/Badge.js';
|
|
16
16
|
import type { PlaceSuggestion, PlaceSuggestionLite } from '../Models/Place.js';
|
|
17
|
+
import type { AnalyticsClientEvent, AnalyticsEventName } from '../Models/Analytics.js';
|
|
17
18
|
export interface WSRequest_Handshake {
|
|
18
19
|
command: 'handshake';
|
|
19
20
|
payload: {
|
|
@@ -430,7 +431,13 @@ export interface WSRequest_SetDiscoveryView {
|
|
|
430
431
|
view: DiscoveryView;
|
|
431
432
|
};
|
|
432
433
|
}
|
|
433
|
-
export
|
|
434
|
+
export interface WSRequest_AnalyticsIngest {
|
|
435
|
+
command: 'analytics-ingest';
|
|
436
|
+
payload: {
|
|
437
|
+
events: AnalyticsClientEvent<AnalyticsEventName>[];
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
export type WSClientRequest = WSRequest_Handshake | WSRequest_GetProfile | WSRequest_UpdateProfile | WSRequest_GetCandidates | WSRequest_GetCandidateCounts | WSRequest_GetIntentionCatalog | WSRequest_GetIntentionCounts | WSRequest_GetIntentionPopularTags | WSRequest_Like | WSRequest_Skip | 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 | WSRequest_AnalyticsIngest;
|
|
434
441
|
export type WSClientCommand = WSClientRequest['command'];
|
|
435
442
|
export interface WSResponse_Handshake {
|
|
436
443
|
command: 'handshake';
|
|
@@ -984,7 +991,16 @@ export interface WSResponse_PlacesRetrieve {
|
|
|
984
991
|
error: string;
|
|
985
992
|
};
|
|
986
993
|
}
|
|
987
|
-
export
|
|
994
|
+
export interface WSResponse_AnalyticsIngest {
|
|
995
|
+
command: 'analytics-ingest';
|
|
996
|
+
payload: {
|
|
997
|
+
accepted: number;
|
|
998
|
+
rejected: number;
|
|
999
|
+
} | {
|
|
1000
|
+
error: string;
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
export type WSServerResponse = WSResponse_Handshake | WSResponse_GetProfile | WSResponse_UpdateProfile | WSResponse_GetCandidates | WSResponse_GetCandidateCounts | WSResponse_GetIntentionCatalog | WSResponse_GetIntentionCounts | WSResponse_GetIntentionPopularTags | WSResponse_Like | WSResponse_Skip | 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 | WSResponse_AnalyticsIngest;
|
|
988
1004
|
export interface WSEvent_NewMessage {
|
|
989
1005
|
event: 'new-message';
|
|
990
1006
|
payload: {
|