@oxyfoo/whymeet-types 0.0.3 → 0.0.4
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/Badge.d.ts +8 -3
- package/dist/Models/Badge.js +1 -29
- package/dist/Models/Match.d.ts +1 -0
- package/dist/Models/index.d.ts +0 -1
- package/dist/Models/index.js +0 -1
- package/dist/WS/Request.d.ts +36 -2
- package/package.json +1 -1
package/dist/Models/Badge.d.ts
CHANGED
|
@@ -6,14 +6,19 @@ export interface BadgeDefinition {
|
|
|
6
6
|
category: BadgeCategory;
|
|
7
7
|
threshold: number | null;
|
|
8
8
|
displayOrder: number;
|
|
9
|
+
rewardType: string | null;
|
|
10
|
+
rewardOfferIdApple: string | null;
|
|
11
|
+
rewardOfferIdGoogle: string | null;
|
|
12
|
+
rewardDescription: string | null;
|
|
9
13
|
}
|
|
10
14
|
export interface UserBadge {
|
|
11
15
|
key: BadgeKey;
|
|
16
|
+
emoji: string;
|
|
12
17
|
earned: boolean;
|
|
13
18
|
earnedAt: string | null;
|
|
14
19
|
progress: number;
|
|
15
20
|
threshold: number | null;
|
|
21
|
+
rewardType: string | null;
|
|
22
|
+
rewardDescription: string | null;
|
|
23
|
+
rewardClaimedAt: string | null;
|
|
16
24
|
}
|
|
17
|
-
export declare const BADGE_KEYS: readonly BadgeKey[];
|
|
18
|
-
export declare const BADGE_DEFINITIONS: readonly BadgeDefinition[];
|
|
19
|
-
export declare function getBadgeDefinition(key: BadgeKey): BadgeDefinition;
|
package/dist/Models/Badge.js
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
'verified_profile',
|
|
3
|
-
'veteran',
|
|
4
|
-
'first_event_joined',
|
|
5
|
-
'first_event_hosted',
|
|
6
|
-
'host_5',
|
|
7
|
-
'participant_10',
|
|
8
|
-
'host_10',
|
|
9
|
-
'host_25',
|
|
10
|
-
'participant_50',
|
|
11
|
-
'host_50',
|
|
12
|
-
'host_100'
|
|
13
|
-
];
|
|
14
|
-
export const BADGE_DEFINITIONS = [
|
|
15
|
-
{ key: 'verified_profile', emoji: '✅', category: 'verification', threshold: null, displayOrder: 10 },
|
|
16
|
-
{ key: 'veteran', emoji: '🏛️', category: 'seniority', threshold: null, displayOrder: 20 },
|
|
17
|
-
{ key: 'first_event_joined', emoji: '🎉', category: 'participation', threshold: 1, displayOrder: 30 },
|
|
18
|
-
{ key: 'first_event_hosted', emoji: '🌱', category: 'hosting', threshold: 1, displayOrder: 35 },
|
|
19
|
-
{ key: 'host_5', emoji: '⭐', category: 'hosting', threshold: 5, displayOrder: 40 },
|
|
20
|
-
{ key: 'participant_10', emoji: '🤝', category: 'participation', threshold: 10, displayOrder: 45 },
|
|
21
|
-
{ key: 'host_10', emoji: '🔥', category: 'hosting', threshold: 10, displayOrder: 50 },
|
|
22
|
-
{ key: 'host_25', emoji: '💎', category: 'hosting', threshold: 25, displayOrder: 60 },
|
|
23
|
-
{ key: 'participant_50', emoji: '🏅', category: 'participation', threshold: 50, displayOrder: 65 },
|
|
24
|
-
{ key: 'host_50', emoji: '👑', category: 'hosting', threshold: 50, displayOrder: 70 },
|
|
25
|
-
{ key: 'host_100', emoji: '🏆', category: 'hosting', threshold: 100, displayOrder: 80 }
|
|
26
|
-
];
|
|
27
|
-
export function getBadgeDefinition(key) {
|
|
28
|
-
return BADGE_DEFINITIONS.find((b) => b.key === key);
|
|
29
|
-
}
|
|
1
|
+
export {};
|
package/dist/Models/Match.d.ts
CHANGED
package/dist/Models/index.d.ts
CHANGED
|
@@ -18,6 +18,5 @@ export { PREFERRED_PERIODS } from './Availability.js';
|
|
|
18
18
|
export type { SubscriptionPlan, SubscriptionStatus, SubscriptionPlatform, UserSubscription, BoostPack, BoostSource, UserBoost, TokenBalance, SwipeQuotaInfo } from './Subscription.js';
|
|
19
19
|
export { SUBSCRIPTION_PLANS, SUBSCRIPTION_STATUSES, BOOST_PACKS, BOOST_DURATION_DAYS, PRODUCT_IDS } from './Subscription.js';
|
|
20
20
|
export type { BadgeCategory, BadgeKey, BadgeDefinition, UserBadge } from './Badge.js';
|
|
21
|
-
export { BADGE_KEYS, BADGE_DEFINITIONS, getBadgeDefinition } from './Badge.js';
|
|
22
21
|
export type { HostLevelKey, HostLevel, HostLevelDefinition } from './TrustScore.js';
|
|
23
22
|
export { HOST_LEVEL_KEYS, HOST_LEVELS, getHostLevel } from './TrustScore.js';
|
package/dist/Models/index.js
CHANGED
|
@@ -3,5 +3,4 @@ export { INTENTION_KEYS, INTENTIONS, INTEREST_CATEGORY_KEYS, INTEREST_CATEGORIES
|
|
|
3
3
|
export { GENDERS, DEFAULT_DISCOVERY, 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
|
-
export { BADGE_KEYS, BADGE_DEFINITIONS, getBadgeDefinition } from './Badge.js';
|
|
7
6
|
export { HOST_LEVEL_KEYS, HOST_LEVELS, getHostLevel } from './TrustScore.js';
|
package/dist/WS/Request.d.ts
CHANGED
|
@@ -283,6 +283,12 @@ export interface WSRequest_ReportActivity {
|
|
|
283
283
|
message?: string;
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
+
export interface WSRequest_GetMyActivities {
|
|
287
|
+
command: 'get-my-activities';
|
|
288
|
+
payload: {
|
|
289
|
+
role: 'host' | 'participant';
|
|
290
|
+
};
|
|
291
|
+
}
|
|
286
292
|
export interface WSRequest_GetBlockedUsers {
|
|
287
293
|
command: 'get-blocked-users';
|
|
288
294
|
payload: Record<string, never>;
|
|
@@ -343,6 +349,13 @@ export interface WSRequest_GetUserBadges {
|
|
|
343
349
|
userId: string;
|
|
344
350
|
};
|
|
345
351
|
}
|
|
352
|
+
export interface WSRequest_ClaimBadgeReward {
|
|
353
|
+
command: 'claim-badge-reward';
|
|
354
|
+
payload: {
|
|
355
|
+
badgeKey: string;
|
|
356
|
+
platform: 'ios' | 'android';
|
|
357
|
+
};
|
|
358
|
+
}
|
|
346
359
|
export interface WSRequest_ConfirmHostAttendance {
|
|
347
360
|
command: 'confirm-host-attendance';
|
|
348
361
|
payload: {
|
|
@@ -358,7 +371,7 @@ export interface WSRequest_ConfirmParticipation {
|
|
|
358
371
|
attended: boolean;
|
|
359
372
|
};
|
|
360
373
|
}
|
|
361
|
-
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_GetBlockedUsers | WSRequest_UnblockUser | WSRequest_GetProfilePopularTags | WSRequest_GetBadges | WSRequest_GetUserBadges | WSRequest_ConfirmHostAttendance | WSRequest_ConfirmParticipation;
|
|
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;
|
|
362
375
|
export type WSClientCommand = WSClientRequest['command'];
|
|
363
376
|
export interface WSResponse_Handshake {
|
|
364
377
|
command: 'handshake';
|
|
@@ -778,6 +791,14 @@ export interface WSResponse_ReportActivity {
|
|
|
778
791
|
error: string;
|
|
779
792
|
};
|
|
780
793
|
}
|
|
794
|
+
export interface WSResponse_GetMyActivities {
|
|
795
|
+
command: 'get-my-activities';
|
|
796
|
+
payload: {
|
|
797
|
+
activities: ActivitySummary[];
|
|
798
|
+
} | {
|
|
799
|
+
error: string;
|
|
800
|
+
};
|
|
801
|
+
}
|
|
781
802
|
export interface WSResponse_GetBlockedUsers {
|
|
782
803
|
command: 'get-blocked-users';
|
|
783
804
|
payload: {
|
|
@@ -810,6 +831,19 @@ export interface WSResponse_GetUserBadges {
|
|
|
810
831
|
error: string;
|
|
811
832
|
};
|
|
812
833
|
}
|
|
834
|
+
export interface WSResponse_ClaimBadgeReward {
|
|
835
|
+
command: 'claim-badge-reward';
|
|
836
|
+
payload: {
|
|
837
|
+
offerId: string;
|
|
838
|
+
platform: 'ios' | 'android';
|
|
839
|
+
keyIdentifier?: string;
|
|
840
|
+
nonce?: string;
|
|
841
|
+
signature?: string;
|
|
842
|
+
timestamp?: number;
|
|
843
|
+
} | {
|
|
844
|
+
error: string;
|
|
845
|
+
};
|
|
846
|
+
}
|
|
813
847
|
export interface WSResponse_ConfirmHostAttendance {
|
|
814
848
|
command: 'confirm-host-attendance';
|
|
815
849
|
payload: {
|
|
@@ -826,7 +860,7 @@ export interface WSResponse_ConfirmParticipation {
|
|
|
826
860
|
error: string;
|
|
827
861
|
};
|
|
828
862
|
}
|
|
829
|
-
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_MarkRead | WSResponse_GetUserProfile | WSResponse_GetBlockedUsers | WSResponse_UnblockUser | WSResponse_GetProfilePopularTags | WSResponse_GetBadges | WSResponse_GetUserBadges | WSResponse_ConfirmHostAttendance | WSResponse_ConfirmParticipation;
|
|
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;
|
|
830
864
|
export interface WSEvent_NewMessage {
|
|
831
865
|
event: 'new-message';
|
|
832
866
|
payload: {
|