heartraite 1.0.87 → 1.0.89

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.
@@ -19,10 +19,9 @@ export declare enum FirestoreCollection {
19
19
  export declare enum ConversationCollection {
20
20
  MESSAGES = "messages"
21
21
  }
22
- export declare enum UserCollection {
23
- CONVERSATIONS = "conversations",
24
- MATCHES = "matches",
25
- OUTGOING_LIKES = "outgoing_likes",
22
+ export declare enum FirestoreUserCollection {
26
23
  INCOMING_LIKES = "incoming_likes",
27
- MATCH_FETCHES = "match_fetches"
24
+ OUTGOING_LIKES = "outgoing_likes",
25
+ MATCHES = "user_matches",
26
+ CONVERSATIONS = "user_conversations"
28
27
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserCollection = exports.ConversationCollection = exports.FirestoreCollection = void 0;
3
+ exports.FirestoreUserCollection = exports.ConversationCollection = exports.FirestoreCollection = void 0;
4
4
  var FirestoreCollection;
5
5
  (function (FirestoreCollection) {
6
6
  FirestoreCollection["BANK_ID_ORDERS"] = "bankid_orders";
@@ -24,11 +24,10 @@ var ConversationCollection;
24
24
  (function (ConversationCollection) {
25
25
  ConversationCollection["MESSAGES"] = "messages";
26
26
  })(ConversationCollection || (exports.ConversationCollection = ConversationCollection = {}));
27
- var UserCollection;
28
- (function (UserCollection) {
29
- UserCollection["CONVERSATIONS"] = "conversations";
30
- UserCollection["MATCHES"] = "matches";
31
- UserCollection["OUTGOING_LIKES"] = "outgoing_likes";
32
- UserCollection["INCOMING_LIKES"] = "incoming_likes";
33
- UserCollection["MATCH_FETCHES"] = "match_fetches";
34
- })(UserCollection || (exports.UserCollection = UserCollection = {}));
27
+ var FirestoreUserCollection;
28
+ (function (FirestoreUserCollection) {
29
+ FirestoreUserCollection["INCOMING_LIKES"] = "incoming_likes";
30
+ FirestoreUserCollection["OUTGOING_LIKES"] = "outgoing_likes";
31
+ FirestoreUserCollection["MATCHES"] = "user_matches";
32
+ FirestoreUserCollection["CONVERSATIONS"] = "user_conversations";
33
+ })(FirestoreUserCollection || (exports.FirestoreUserCollection = FirestoreUserCollection = {}));
@@ -2,7 +2,7 @@ import { AdvancedMatch } from "./am.types";
2
2
  import { MatchCompatibility } from "./matchmaking.types";
3
3
  export type Match = {
4
4
  id: string;
5
- users: Record<string, boolean>;
5
+ users: string[];
6
6
  created: string;
7
7
  initiatedBy: string;
8
8
  conversationId: string;
@@ -16,5 +16,5 @@ export type UserMatch = {
16
16
  created: string;
17
17
  conversationId: string;
18
18
  initiatedBy: string;
19
- users: Record<string, boolean>;
19
+ users: string[];
20
20
  };
@@ -14,16 +14,14 @@ export type Conversation = {
14
14
  lastMessageSeen: string;
15
15
  latestMessageTimestamp?: string;
16
16
  messages: Record<string, Message>;
17
- members: Record<string, boolean>;
17
+ members: string[];
18
18
  };
19
19
  export type DBConversation = {
20
20
  id: string;
21
21
  created: string;
22
22
  latestMessage: string;
23
23
  latestMessageTimestamp?: string;
24
- members: {
25
- [id: string]: boolean;
26
- };
24
+ members: string[];
27
25
  };
28
26
  export type UserConversation = Omit<DBConversation, "latestMessage" | "latestMessageTimestamp"> & {
29
27
  lastMessageSeen: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,10 +21,9 @@ export enum ConversationCollection {
21
21
  MESSAGES = "messages",
22
22
  }
23
23
 
24
- export enum UserCollection {
25
- CONVERSATIONS = "conversations",
26
- MATCHES = "matches",
27
- OUTGOING_LIKES = "outgoing_likes",
24
+ export enum FirestoreUserCollection {
28
25
  INCOMING_LIKES = "incoming_likes",
29
- MATCH_FETCHES = "match_fetches",
26
+ OUTGOING_LIKES = "outgoing_likes",
27
+ MATCHES = "user_matches",
28
+ CONVERSATIONS = "user_conversations",
30
29
  }
@@ -3,7 +3,7 @@ import { MatchCompatibility } from "./matchmaking.types";
3
3
 
4
4
  export type Match = {
5
5
  id: string;
6
- users: Record<string, boolean>;
6
+ users: string[];
7
7
  created: string;
8
8
  initiatedBy: string;
9
9
  conversationId: string;
@@ -18,5 +18,5 @@ export type UserMatch = {
18
18
  created: string;
19
19
  conversationId: string;
20
20
  initiatedBy: string;
21
- users: Record<string, boolean>;
21
+ users: string[];
22
22
  };
@@ -15,7 +15,7 @@ export type Conversation = {
15
15
  lastMessageSeen: string;
16
16
  latestMessageTimestamp?: string;
17
17
  messages: Record<string, Message>;
18
- members: Record<string, boolean>;
18
+ members: string[];
19
19
  };
20
20
 
21
21
  export type DBConversation = {
@@ -23,7 +23,7 @@ export type DBConversation = {
23
23
  created: string;
24
24
  latestMessage: string;
25
25
  latestMessageTimestamp?: string;
26
- members: { [id: string]: boolean };
26
+ members: string[];
27
27
  };
28
28
 
29
29
  export type UserConversation = Omit<