@glissandoo/lib 1.119.0 → 1.120.0
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/functions/partnership.d.ts +5 -0
- package/functions/partnershipCommunication.d.ts +4 -0
- package/helpers/errors.d.ts +1 -0
- package/helpers/errors.js +1 -0
- package/helpers/notifications/index.js +2 -0
- package/models/Partnership/Communication/index.d.ts +1 -0
- package/models/Partnership/Communication/index.js +3 -0
- package/models/Partnership/Communication/supabase.js +1 -0
- package/models/Partnership/Communication/types.d.ts +7 -0
- package/models/Partnership/index.d.ts +2 -1
- package/models/Partnership/index.js +3 -0
- package/models/Partnership/types.d.ts +5 -0
- package/package.json +1 -1
- package/types/supabase/generated.d.ts +3 -0
- package/types/supabase/generated.ts +3 -0
|
@@ -140,6 +140,11 @@ export declare namespace PartnershipFbFunctionsTypes {
|
|
|
140
140
|
title: string;
|
|
141
141
|
messageHtml: string;
|
|
142
142
|
imageURL: string | null;
|
|
143
|
+
attachments: {
|
|
144
|
+
name: string;
|
|
145
|
+
url: string;
|
|
146
|
+
size: number;
|
|
147
|
+
}[];
|
|
143
148
|
createdAt: number;
|
|
144
149
|
}
|
|
145
150
|
interface PortalEvent {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Descendant } from '../helpers/slate';
|
|
2
|
+
import { PartnershipCommunicationAttachment } from '../models/Partnership/Communication/types';
|
|
2
3
|
export declare namespace PartnershipCommunicationFbFunctionsTypes {
|
|
3
4
|
interface PublishParams {
|
|
4
5
|
partnershipId: string;
|
|
@@ -8,6 +9,7 @@ export declare namespace PartnershipCommunicationFbFunctionsTypes {
|
|
|
8
9
|
imageURL: string | null;
|
|
9
10
|
recipients: string[];
|
|
10
11
|
imagesPath: string[];
|
|
12
|
+
attachments: PartnershipCommunicationAttachment[];
|
|
11
13
|
scheduledAt?: string | null;
|
|
12
14
|
}
|
|
13
15
|
type PublishResult = {
|
|
@@ -23,6 +25,7 @@ export declare namespace PartnershipCommunicationFbFunctionsTypes {
|
|
|
23
25
|
title: string;
|
|
24
26
|
messageHtml: string;
|
|
25
27
|
imageURL: string | null;
|
|
28
|
+
attachments: PartnershipCommunicationAttachment[];
|
|
26
29
|
email: string;
|
|
27
30
|
}
|
|
28
31
|
type SendTestResult = void;
|
|
@@ -35,6 +38,7 @@ export declare namespace PartnershipCommunicationFbFunctionsTypes {
|
|
|
35
38
|
imageURL: string | null;
|
|
36
39
|
recipients: string[];
|
|
37
40
|
imagesPath: string[];
|
|
41
|
+
attachments: PartnershipCommunicationAttachment[];
|
|
38
42
|
scheduledAt?: string | null;
|
|
39
43
|
}
|
|
40
44
|
type UpdateResult = void;
|
package/helpers/errors.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare enum HttpsErrorMessages {
|
|
|
34
34
|
PartnershipPartnerNotSelf = "error.partnershipPartner.notSelf",
|
|
35
35
|
PartnershipPartnerSepaMandateMissing = "error.partnershipPartner.sepaMandateMissing",
|
|
36
36
|
PartnershipPartnerNumberAlreadyExists = "error.partnershipPartner.numberAlreadyExists",
|
|
37
|
+
PartnershipPartnerRequestAlreadyExists = "error.partnershipPartner.requestAlreadyExists",
|
|
37
38
|
PartnershipPayerInvalid = "error.partnershipPartner.payerInvalid",
|
|
38
39
|
PartnershipPartnerIsPayer = "error.partnershipPartner.isPayer",
|
|
39
40
|
PartnershipPartnerNotInactive = "error.partnershipPartner.notInactive",
|
package/helpers/errors.js
CHANGED
|
@@ -35,6 +35,7 @@ var HttpsErrorMessages;
|
|
|
35
35
|
HttpsErrorMessages["PartnershipPartnerNotSelf"] = "error.partnershipPartner.notSelf";
|
|
36
36
|
HttpsErrorMessages["PartnershipPartnerSepaMandateMissing"] = "error.partnershipPartner.sepaMandateMissing";
|
|
37
37
|
HttpsErrorMessages["PartnershipPartnerNumberAlreadyExists"] = "error.partnershipPartner.numberAlreadyExists";
|
|
38
|
+
HttpsErrorMessages["PartnershipPartnerRequestAlreadyExists"] = "error.partnershipPartner.requestAlreadyExists";
|
|
38
39
|
HttpsErrorMessages["PartnershipPayerInvalid"] = "error.partnershipPartner.payerInvalid";
|
|
39
40
|
HttpsErrorMessages["PartnershipPartnerIsPayer"] = "error.partnershipPartner.isPayer";
|
|
40
41
|
HttpsErrorMessages["PartnershipPartnerNotInactive"] = "error.partnershipPartner.notInactive";
|
|
@@ -209,10 +209,12 @@ exports.userNotificationSettings = {
|
|
|
209
209
|
[types_2.UserNotificationSettings.AttendanceConfirmed]: [
|
|
210
210
|
types_1.NotificationActions.PerformanceAssistanceConfirm,
|
|
211
211
|
types_1.NotificationActions.PracticeAssistanceConfirm,
|
|
212
|
+
types_1.NotificationActions.OtherAssistanceConfirm,
|
|
212
213
|
],
|
|
213
214
|
[types_2.UserNotificationSettings.AttendanceDeclined]: [
|
|
214
215
|
types_1.NotificationActions.PerformanceAssistanceDecline,
|
|
215
216
|
types_1.NotificationActions.PracticeAssistanceDecline,
|
|
217
|
+
types_1.NotificationActions.OtherAssistanceDecline,
|
|
216
218
|
],
|
|
217
219
|
[types_2.UserNotificationSettings.NewMembers]: [
|
|
218
220
|
types_1.NotificationActions.GroupPlayersJoin,
|
|
@@ -20,6 +20,7 @@ export default class PartnershipCommunication {
|
|
|
20
20
|
get recipients(): string[];
|
|
21
21
|
get recipientsCount(): number;
|
|
22
22
|
get imagesPath(): string[];
|
|
23
|
+
get attachments(): import("./types").PartnershipCommunicationAttachment[];
|
|
23
24
|
get createdAt(): string;
|
|
24
25
|
get status(): "sent" | "scheduled";
|
|
25
26
|
get scheduledAt(): string | null;
|
|
@@ -12,6 +12,7 @@ function rowToPartnershipCommunicationData(row) {
|
|
|
12
12
|
imageURL: row.imageURL,
|
|
13
13
|
ownerName: row.ownerName,
|
|
14
14
|
ownerId: row.ownerId,
|
|
15
|
+
attachments: row.attachments ?? [],
|
|
15
16
|
recipients: row.recipients ?? [],
|
|
16
17
|
recipientsCount: row.recipientsCount,
|
|
17
18
|
imagesPath: row.imagesPath ?? [],
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Descendant } from '../../../helpers/slate';
|
|
2
|
+
export interface PartnershipCommunicationAttachment {
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
path: string;
|
|
6
|
+
size: number;
|
|
7
|
+
}
|
|
2
8
|
export interface PartnershipCommunicationData {
|
|
3
9
|
id: string;
|
|
4
10
|
partnershipId: string;
|
|
@@ -11,6 +17,7 @@ export interface PartnershipCommunicationData {
|
|
|
11
17
|
recipients: string[];
|
|
12
18
|
recipientsCount: number;
|
|
13
19
|
imagesPath: string[];
|
|
20
|
+
attachments: PartnershipCommunicationAttachment[];
|
|
14
21
|
status: 'sent' | 'scheduled';
|
|
15
22
|
scheduledAt: string | null;
|
|
16
23
|
createdAt: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdminItemStatus } from '../../helpers/types';
|
|
2
2
|
import PartnershipBasic from './basic';
|
|
3
|
-
import { APartnershipCustomField, APartnershipTag, PartnershipData, PartnershipPaymentMethodsConfig } from './types';
|
|
3
|
+
import { APartnershipCustomField, APartnershipTag, PartnershipCommunicationsConfig, PartnershipData, PartnershipPaymentMethodsConfig } from './types';
|
|
4
4
|
export default class Partnership extends PartnershipBasic<PartnershipData> {
|
|
5
5
|
get description(): string | null;
|
|
6
6
|
get admins(): string[];
|
|
@@ -13,6 +13,7 @@ export default class Partnership extends PartnershipBasic<PartnershipData> {
|
|
|
13
13
|
get groupIds(): string[];
|
|
14
14
|
get sepaCreditorInfo(): import("./types").PartnershipSepaCreditorInfo | null;
|
|
15
15
|
get paymentMethodsConfig(): PartnershipPaymentMethodsConfig | null;
|
|
16
|
+
get communicationsConfig(): PartnershipCommunicationsConfig | null;
|
|
16
17
|
get glissandooAdminUrl(): string;
|
|
17
18
|
get createdAt(): FirebaseFirestore.Timestamp;
|
|
18
19
|
get createdBy(): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData, FirebaseFirestore.DocumentData>;
|
|
@@ -46,6 +46,9 @@ class Partnership extends basic_1.default {
|
|
|
46
46
|
get paymentMethodsConfig() {
|
|
47
47
|
return this.data.paymentMethodsConfig || null;
|
|
48
48
|
}
|
|
49
|
+
get communicationsConfig() {
|
|
50
|
+
return this.data.communicationsConfig || null;
|
|
51
|
+
}
|
|
49
52
|
get glissandooAdminUrl() {
|
|
50
53
|
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Partnership, this.id);
|
|
51
54
|
}
|
|
@@ -41,6 +41,10 @@ export interface PartnershipPaymentMethodsConfig {
|
|
|
41
41
|
cash: string | null;
|
|
42
42
|
bizum: PartnershipBizumInfo | null;
|
|
43
43
|
}
|
|
44
|
+
export interface PartnershipCommunicationsConfig {
|
|
45
|
+
footer: string | null;
|
|
46
|
+
replyToEmail: string | null;
|
|
47
|
+
}
|
|
44
48
|
export interface PartnershipBasicData {
|
|
45
49
|
displayName: string;
|
|
46
50
|
photoURL: string;
|
|
@@ -58,6 +62,7 @@ export interface PartnershipBasicData {
|
|
|
58
62
|
export interface PartnershipData extends PartnershipBasicData {
|
|
59
63
|
sepaCreditorInfo: PartnershipSepaCreditorInfo | null;
|
|
60
64
|
paymentMethodsConfig: PartnershipPaymentMethodsConfig | null;
|
|
65
|
+
communicationsConfig: PartnershipCommunicationsConfig | null;
|
|
61
66
|
description: string | null;
|
|
62
67
|
administrators: string[];
|
|
63
68
|
administratorsList: AdminItem[];
|
package/package.json
CHANGED
|
@@ -688,6 +688,7 @@ export type Database = {
|
|
|
688
688
|
};
|
|
689
689
|
partnership_communication: {
|
|
690
690
|
Row: {
|
|
691
|
+
attachments: Json;
|
|
691
692
|
createdAt: string;
|
|
692
693
|
deletedAt: string | null;
|
|
693
694
|
id: string;
|
|
@@ -705,6 +706,7 @@ export type Database = {
|
|
|
705
706
|
title: string;
|
|
706
707
|
};
|
|
707
708
|
Insert: {
|
|
709
|
+
attachments?: Json;
|
|
708
710
|
createdAt?: string;
|
|
709
711
|
deletedAt?: string | null;
|
|
710
712
|
id?: string;
|
|
@@ -722,6 +724,7 @@ export type Database = {
|
|
|
722
724
|
title: string;
|
|
723
725
|
};
|
|
724
726
|
Update: {
|
|
727
|
+
attachments?: Json;
|
|
725
728
|
createdAt?: string;
|
|
726
729
|
deletedAt?: string | null;
|
|
727
730
|
id?: string;
|
|
@@ -689,6 +689,7 @@ export type Database = {
|
|
|
689
689
|
};
|
|
690
690
|
partnership_communication: {
|
|
691
691
|
Row: {
|
|
692
|
+
attachments: Json;
|
|
692
693
|
createdAt: string;
|
|
693
694
|
deletedAt: string | null;
|
|
694
695
|
id: string;
|
|
@@ -706,6 +707,7 @@ export type Database = {
|
|
|
706
707
|
title: string;
|
|
707
708
|
};
|
|
708
709
|
Insert: {
|
|
710
|
+
attachments?: Json;
|
|
709
711
|
createdAt?: string;
|
|
710
712
|
deletedAt?: string | null;
|
|
711
713
|
id?: string;
|
|
@@ -723,6 +725,7 @@ export type Database = {
|
|
|
723
725
|
title: string;
|
|
724
726
|
};
|
|
725
727
|
Update: {
|
|
728
|
+
attachments?: Json;
|
|
726
729
|
createdAt?: string;
|
|
727
730
|
deletedAt?: string | null;
|
|
728
731
|
id?: string;
|