@glissandoo/lib 1.3.1 → 1.3.3

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.
@@ -34,4 +34,9 @@ export declare namespace GroupFbFunctionsTypes {
34
34
  interface GetByIdResult extends GroupBasicData {
35
35
  id: string;
36
36
  }
37
+ interface SendInvitationEmailParams {
38
+ emails: string[];
39
+ groupId: string;
40
+ }
41
+ type SendInvitationEmailResult = void;
37
42
  }
@@ -10,6 +10,7 @@ export declare enum FbFunctionName {
10
10
  GroupOnCreate = "group-onCreate",
11
11
  GroupOnUpdate = "group-onUpdate",
12
12
  GroupGetById = "group-getById",
13
+ GroupSendInvitationEmail = "group-sendInvitationEmail",
13
14
  GroupPlayerUpdateInstruments = "groupPlayer-updateInstruments",
14
15
  GroupPlayerAdd = "groupPlayer-add",
15
16
  GroupPlayerJoin = "groupPlayer-joinGroup",
@@ -14,6 +14,7 @@ var FbFunctionName;
14
14
  FbFunctionName["GroupOnCreate"] = "group-onCreate";
15
15
  FbFunctionName["GroupOnUpdate"] = "group-onUpdate";
16
16
  FbFunctionName["GroupGetById"] = "group-getById";
17
+ FbFunctionName["GroupSendInvitationEmail"] = "group-sendInvitationEmail";
17
18
  FbFunctionName["GroupPlayerUpdateInstruments"] = "groupPlayer-updateInstruments";
18
19
  FbFunctionName["GroupPlayerAdd"] = "groupPlayer-add";
19
20
  FbFunctionName["GroupPlayerJoin"] = "groupPlayer-joinGroup";
@@ -20,6 +20,7 @@ const regionByFunctions = {
20
20
  [index_1.FbFunctionName.GroupOnCreate]: GCloudRegions.UsCentral1,
21
21
  [index_1.FbFunctionName.GroupOnUpdate]: GCloudRegions.UsCentral1,
22
22
  [index_1.FbFunctionName.GroupGetById]: GCloudRegions.EuropeWest6,
23
+ [index_1.FbFunctionName.GroupSendInvitationEmail]: GCloudRegions.EuropeWest6,
23
24
  [index_1.FbFunctionName.GroupPlayerUpdateInstruments]: GCloudRegions.UsCentral1,
24
25
  [index_1.FbFunctionName.GroupPlayerAdd]: GCloudRegions.UsCentral1,
25
26
  [index_1.FbFunctionName.GroupPlayerJoin]: GCloudRegions.UsCentral1,
@@ -13,6 +13,7 @@ export default class Group extends GroupBasic<GroupData> {
13
13
  get addressDefault(): import("./types").GroupAddressData | undefined;
14
14
  get activeInvitationLink(): boolean;
15
15
  get invitationLink(): string | null;
16
+ get invitationEmails(): string[];
16
17
  get shortDynamicLink(): string | null;
17
18
  get admins(): string[];
18
19
  get createdAt(): FirebaseFirestore.Timestamp;
@@ -48,6 +48,9 @@ class Group extends basic_1.default {
48
48
  get invitationLink() {
49
49
  return this.data.invitationLink;
50
50
  }
51
+ get invitationEmails() {
52
+ return this.data.invitationEmails || [];
53
+ }
51
54
  get shortDynamicLink() {
52
55
  return this.data.shortDynamicLink;
53
56
  }
@@ -51,6 +51,7 @@ export interface GroupData extends GroupBasicData {
51
51
  administrators: string[];
52
52
  addresses: GroupAddressData[];
53
53
  activeInvitationLink: boolean;
54
+ invitationEmails: string[];
54
55
  invitationLink: string | null;
55
56
  shortDynamicLink: string | null;
56
57
  intercom_id: string | null;
@@ -21,5 +21,6 @@ export default class Notification extends Model<UserNotificationData> {
21
21
  get createdAt(): firestore.Timestamp;
22
22
  get timestamp(): number;
23
23
  get sendedAt(): firestore.Timestamp | null;
24
- get readedAt(): firestore.Timestamp | null;
24
+ private get readedAt();
25
+ get isReaded(): boolean;
25
26
  }
@@ -71,5 +71,8 @@ class Notification extends Model_1.default {
71
71
  get readedAt() {
72
72
  return this.data.readedAt || null;
73
73
  }
74
+ get isReaded() {
75
+ return this.readedAt !== null;
76
+ }
74
77
  }
75
78
  exports.default = Notification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",