@qrush/types 2.1.60 → 2.1.61

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,59 @@
1
+ import type { Timestamp } from '@firebase/firestore';
2
+ export interface IConversation {
3
+ type: 'direct' | 'group';
4
+ participantIds: string[];
5
+ participantDetails: {
6
+ [uid: string]: {
7
+ name: string;
8
+ avatarURL: string;
9
+ };
10
+ };
11
+ unreadCount: {
12
+ [uid: string]: number;
13
+ };
14
+ muted: {
15
+ [uid: string]: boolean;
16
+ };
17
+ archived: {
18
+ [uid: string]: boolean;
19
+ };
20
+ lastMessage: {
21
+ text: string;
22
+ senderId: string;
23
+ senderName: string;
24
+ timestamp: Timestamp;
25
+ type: string;
26
+ } | null;
27
+ createdAt: Timestamp;
28
+ updatedAt: Timestamp;
29
+ chatOrigin: {
30
+ type: 'event' | 'personal';
31
+ eventUID?: string;
32
+ };
33
+ request?: {
34
+ status: 'pending' | 'accepted';
35
+ fromUID: string;
36
+ toUID: string;
37
+ message: string;
38
+ createdAt: Timestamp;
39
+ acceptedAt?: Timestamp;
40
+ };
41
+ }
42
+ export interface IMessage {
43
+ senderId: string;
44
+ senderName: string;
45
+ content: string;
46
+ type: 'text' | 'image' | 'request';
47
+ createdAt: Timestamp;
48
+ readBy?: {
49
+ [uid: string]: Timestamp;
50
+ };
51
+ reactions?: {
52
+ [emoji: string]: string[];
53
+ };
54
+ replyTo?: {
55
+ messageId: string;
56
+ content: string;
57
+ senderId: string;
58
+ };
59
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/Events.d.ts CHANGED
@@ -6,7 +6,11 @@ import { LocationTypeArray, LocationTypeSlugArray } from "./Location.js";
6
6
  import { Features, Location, EventCategory, EventCategorySlug, TranslationMap, SupportedLanguage } from "./Common.js";
7
7
  import { PromotionTeaser } from "./Promotion.js";
8
8
  import { EventArtist } from "./Artist.js";
9
- export { EventCategory, EventCategorySlug, eventCategories, Features, Location, } from "./Common.js";
9
+ export {
10
+ /** @deprecated Use EventCategorySlug instead */
11
+ EventCategory, EventCategorySlug,
12
+ /** @deprecated Use EVENT_CATEGORY_SLUGS instead */
13
+ eventCategories, Features, Location, } from "./Common.js";
10
14
  export interface IFireEvent {
11
15
  id: string;
12
16
  name: string;
@@ -26,15 +30,19 @@ export interface IFireEvent {
26
30
  location: EventLocation;
27
31
  hostUID: string;
28
32
  hostName: string;
33
+ /** @deprecated kept for backwards compat — use interestedUsers subcollection */
29
34
  bookmarkUserIds?: string[] | undefined;
35
+ /** @deprecated kept for backwards compat — use goingUsers subcollection */
30
36
  goingUserIds?: string[] | undefined;
37
+ goingCount?: number;
38
+ interestedCount?: number;
31
39
  guestCount: number;
32
40
  demoEvent: boolean;
33
41
  /**
34
42
  * @deprecated Use `status` field instead. Will be removed in future version.
35
43
  */
36
44
  draftMode: boolean;
37
- status: "auto_draft" | "draft" | "published";
45
+ status: "draft" | "published";
38
46
  /**
39
47
  * @deprecated Use placement document in /placements collection instead.
40
48
  * Will be removed in future version.
@@ -79,6 +87,7 @@ export interface TicketType {
79
87
  price: number;
80
88
  }
81
89
  export type EventProperties = {
90
+ /** @deprecated Display code should read from `IFireEvent.categorySlug` instead */
82
91
  category: EventCategory[];
83
92
  price?: number | undefined;
84
93
  tickets?: TicketType[];
package/dist/Events.js CHANGED
@@ -1,3 +1,5 @@
1
1
  // Re-export commonly used types and constants
2
- export { eventCategories, } from "./Common.js";
2
+ export {
3
+ /** @deprecated Use EVENT_CATEGORY_SLUGS instead */
4
+ eventCategories, } from "./Common.js";
3
5
  export const eventTagsIsNotString = (tags) => typeof tags[0] !== "string";
@@ -135,6 +135,11 @@ export type IFireLocation = {
135
135
  activeOwnerCount?: number;
136
136
  hasPromotions: boolean;
137
137
  promotionTeasers?: PromotionTeaser[];
138
+ /** @deprecated kept for backwards compat — use interestedUsers subcollection */
138
139
  bookmarkUserIds?: string[];
140
+ interestedCount?: number;
141
+ weeklyGoingCount?: {
142
+ [day: string]: number;
143
+ };
139
144
  };
140
145
  export type FireLocationSnapshotRef = FireQueryDocSnapshotRef<IFireLocation>;
@@ -0,0 +1,11 @@
1
+ import type { Timestamp } from '@firebase/firestore';
2
+ export interface IReport {
3
+ type: 'user' | 'chat';
4
+ targetId: string;
5
+ conversationId?: string;
6
+ messageContent?: string;
7
+ reportedBy: string;
8
+ reason: 'spam' | 'harassment' | 'inappropriate' | 'other';
9
+ status: 'pending' | 'reviewed' | 'resolved';
10
+ createdAt: Timestamp;
11
+ }
package/dist/Report.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,52 @@
1
+ import type { Timestamp } from '@firebase/firestore';
2
+ export type FieldVisibility = 'all' | 'contacts' | 'hidden';
3
+ export interface ISocialProfileVisibility {
4
+ bio: FieldVisibility;
5
+ images: FieldVisibility;
6
+ sexuality: FieldVisibility;
7
+ openFor: FieldVisibility;
8
+ musicTaste: FieldVisibility;
9
+ languages: FieldVisibility;
10
+ hobbies: FieldVisibility;
11
+ preferredVenueType: FieldVisibility;
12
+ mainVenue: FieldVisibility;
13
+ alcoholConsumption: FieldVisibility;
14
+ tobaccoConsumption: FieldVisibility;
15
+ cannabisConsumption: FieldVisibility;
16
+ partyDrugsConsumption: FieldVisibility;
17
+ hardDrugsConsumption: FieldVisibility;
18
+ }
19
+ export interface ISocialProfile {
20
+ bio?: string;
21
+ images?: string[];
22
+ sexuality?: string;
23
+ openFor?: string[];
24
+ musicTaste?: string[];
25
+ languages?: string[];
26
+ hobbies?: string[];
27
+ preferredVenueType?: string[];
28
+ mainVenue?: string | {
29
+ title: string;
30
+ }[];
31
+ consumption?: {
32
+ alcohol?: string;
33
+ tobacco?: string;
34
+ cannabis?: string;
35
+ partyDrugs?: string;
36
+ hardDrugs?: string;
37
+ };
38
+ socialSetupDone: boolean;
39
+ visibility: ISocialProfileVisibility;
40
+ }
41
+ export interface ISocialUserEntry {
42
+ name: string;
43
+ avatarURL: string;
44
+ listVisibility: FieldVisibility;
45
+ createdAt: Timestamp;
46
+ /** Present on weeklyGoingUsers entries */
47
+ userUID?: string;
48
+ /** Day of week for weekly entries */
49
+ day?: string;
50
+ /** Resolved occurrence date (YYYY-MM-DD) for weekly entries */
51
+ occurrenceDate?: string;
52
+ }
package/dist/Social.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/Users.d.ts CHANGED
@@ -8,11 +8,19 @@ export type IFireUser = {
8
8
  role: UserRole;
9
9
  name: string;
10
10
  gender: Gender;
11
+ /** @deprecated matching removed from scope */
11
12
  interestedIn: Maybe<Gender>;
12
13
  avatar: UserAvatar | null;
13
14
  birthday: Timestamp;
15
+ /** @deprecated replace with group collection query on goingUsers */
14
16
  attendedEvents: DocumentReference[];
17
+ /** @deprecated replace with group collection query on goingUsers */
15
18
  attendingEvent: string | null;
19
+ listVisibility?: 'all' | 'contacts' | 'hidden';
20
+ /** @deprecated moved to socialProfile subcollection */
21
+ socialProfile?: Record<string, unknown>;
22
+ /** @deprecated moved to socialProfile/default.socialSetupDone */
23
+ socialProfileSetupCompleted?: boolean;
16
24
  sharingToken: SharingToken | null;
17
25
  notificationTokens: string[];
18
26
  markedForDeletion: boolean;
package/dist/index.d.ts CHANGED
@@ -14,3 +14,7 @@ export * from './ApiKeys.js';
14
14
  export * from './TrackingStats.js';
15
15
  export * from './Placements.js';
16
16
  export * from './RemoteConfig.js';
17
+ export * from './Chat.js';
18
+ export * from './Conversation.js';
19
+ export * from './Social.js';
20
+ export * from './Report.js';
package/dist/index.js CHANGED
@@ -14,3 +14,7 @@ export * from './ApiKeys.js';
14
14
  export * from './TrackingStats.js';
15
15
  export * from './Placements.js';
16
16
  export * from './RemoteConfig.js';
17
+ export * from './Chat.js';
18
+ export * from './Conversation.js';
19
+ export * from './Social.js';
20
+ export * from './Report.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrush/types",
3
- "version": "2.1.60",
3
+ "version": "2.1.61",
4
4
  "description": "Shared TypeScript types for the QRush ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",