@glissandoo/lib 1.97.1 → 1.99.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.
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { PlanScheduleType } from '../models/Partnership/Plan/types';
|
|
1
|
+
import { PaymentMethod, PlanScheduleType } from '../models/Partnership/Plan/types';
|
|
2
2
|
export declare namespace PartnershipPlanFbFunctionsTypes {
|
|
3
|
-
interface
|
|
4
|
-
partnershipId: string;
|
|
3
|
+
interface CreateData {
|
|
5
4
|
name: string;
|
|
6
|
-
price: number;
|
|
7
5
|
description: string;
|
|
6
|
+
price: number;
|
|
8
7
|
schedule: PlanScheduleType;
|
|
8
|
+
paymentMethod: PaymentMethod;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
interface CreateParams extends CreateData {
|
|
11
|
+
partnershipId: string;
|
|
12
|
+
planId: string;
|
|
13
|
+
}
|
|
14
|
+
type CreateResult = void;
|
|
15
|
+
interface EditParams extends Partial<CreateData> {
|
|
12
16
|
partnershipId: string;
|
|
13
17
|
planId: string;
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
18
|
}
|
|
17
19
|
type EditResult = void;
|
|
18
20
|
type RemoveParams = {
|
package/helpers/errors.d.ts
CHANGED
|
@@ -22,12 +22,14 @@ export declare enum HttpsErrorMessages {
|
|
|
22
22
|
InvalidData = "error.data.noValid",
|
|
23
23
|
InvalidCommunication = "error.communication.noValid",
|
|
24
24
|
InvalidOffer = "error.offer.noValid",
|
|
25
|
-
InvalidPartner = "error.partner.noValid",
|
|
26
25
|
InvalidPartnership = "error.partnership.noValid",
|
|
26
|
+
InvalidPartnershipPartner = "error.partner.noValid",
|
|
27
27
|
InvalidPartnershipPlan = "error.partnershipPlan.noValid",
|
|
28
|
+
PartnershipPlanWithSubscriptions = "error.partnershipPlan.withSubscriptions",
|
|
29
|
+
InvalidPartnershipSubscription = "error.partnershipSubscription.noValid",
|
|
30
|
+
InvalidPartnershipPayment = "error.partnershipPayment.noValid",
|
|
31
|
+
InvalidPartnershipSepaPaymentGroup = "error.partnershipSepaPaymentGroup.noValid",
|
|
28
32
|
InvalidAdminPartnership = "error.partnership.noAdmin",
|
|
29
|
-
InvalidParterSubscription = "error.partnerSubscription.noValid",
|
|
30
|
-
InvalidStatusParterSubscription = "error.partnerSubscription.noActive",
|
|
31
33
|
InvalidAdminFederation = "error.federation.noAdmin",
|
|
32
34
|
InvalidFederation = "error.federation.noActive",
|
|
33
35
|
InvalidInstrument = "error.instrument.noValid",
|
|
@@ -39,16 +41,8 @@ export declare enum HttpsErrorMessages {
|
|
|
39
41
|
FederationErrorMailerSend = "error.federation.mailNotSent",
|
|
40
42
|
PlanInUse = "error.plans.inUse",
|
|
41
43
|
NoEventsToRollcall = "error.event.noEventsToRollcall",
|
|
42
|
-
PartnerNotFound = "error.partner.notFound",
|
|
43
|
-
PartnerNotVerified = "error.partner.notVerified",
|
|
44
|
-
PartnerMandateInvalid = "error.partner.noMandate",
|
|
45
|
-
PartnerAlreadyExists = "error.partner.alreadyExists",
|
|
46
|
-
PartnerBICInvalid = "error.partner.noValidBIC",
|
|
47
|
-
PartnershipPlanAlreadyActive = "error.partnershipPlan.alreadyActive",
|
|
48
44
|
UserPartnershipInUse = "error.user.partnershipInUse",
|
|
49
45
|
UserFederationInUse = "error.user.federationInUse",
|
|
50
|
-
LemonwayError = "error.lemonway.default",
|
|
51
|
-
LemonwayInvalidMandate = "error.lemonway.mandate",
|
|
52
46
|
Unauthorized = "error.auth.noValid",
|
|
53
47
|
InvalidMethod = "error.method.noValid",
|
|
54
48
|
NoFile = "error.file.noExists",
|
package/helpers/errors.js
CHANGED
|
@@ -23,12 +23,14 @@ var HttpsErrorMessages;
|
|
|
23
23
|
HttpsErrorMessages["InvalidData"] = "error.data.noValid";
|
|
24
24
|
HttpsErrorMessages["InvalidCommunication"] = "error.communication.noValid";
|
|
25
25
|
HttpsErrorMessages["InvalidOffer"] = "error.offer.noValid";
|
|
26
|
-
HttpsErrorMessages["InvalidPartner"] = "error.partner.noValid";
|
|
27
26
|
HttpsErrorMessages["InvalidPartnership"] = "error.partnership.noValid";
|
|
27
|
+
HttpsErrorMessages["InvalidPartnershipPartner"] = "error.partner.noValid";
|
|
28
28
|
HttpsErrorMessages["InvalidPartnershipPlan"] = "error.partnershipPlan.noValid";
|
|
29
|
+
HttpsErrorMessages["PartnershipPlanWithSubscriptions"] = "error.partnershipPlan.withSubscriptions";
|
|
30
|
+
HttpsErrorMessages["InvalidPartnershipSubscription"] = "error.partnershipSubscription.noValid";
|
|
31
|
+
HttpsErrorMessages["InvalidPartnershipPayment"] = "error.partnershipPayment.noValid";
|
|
32
|
+
HttpsErrorMessages["InvalidPartnershipSepaPaymentGroup"] = "error.partnershipSepaPaymentGroup.noValid";
|
|
29
33
|
HttpsErrorMessages["InvalidAdminPartnership"] = "error.partnership.noAdmin";
|
|
30
|
-
HttpsErrorMessages["InvalidParterSubscription"] = "error.partnerSubscription.noValid";
|
|
31
|
-
HttpsErrorMessages["InvalidStatusParterSubscription"] = "error.partnerSubscription.noActive";
|
|
32
34
|
HttpsErrorMessages["InvalidAdminFederation"] = "error.federation.noAdmin";
|
|
33
35
|
HttpsErrorMessages["InvalidFederation"] = "error.federation.noActive";
|
|
34
36
|
HttpsErrorMessages["InvalidInstrument"] = "error.instrument.noValid";
|
|
@@ -40,16 +42,8 @@ var HttpsErrorMessages;
|
|
|
40
42
|
HttpsErrorMessages["FederationErrorMailerSend"] = "error.federation.mailNotSent";
|
|
41
43
|
HttpsErrorMessages["PlanInUse"] = "error.plans.inUse";
|
|
42
44
|
HttpsErrorMessages["NoEventsToRollcall"] = "error.event.noEventsToRollcall";
|
|
43
|
-
HttpsErrorMessages["PartnerNotFound"] = "error.partner.notFound";
|
|
44
|
-
HttpsErrorMessages["PartnerNotVerified"] = "error.partner.notVerified";
|
|
45
|
-
HttpsErrorMessages["PartnerMandateInvalid"] = "error.partner.noMandate";
|
|
46
|
-
HttpsErrorMessages["PartnerAlreadyExists"] = "error.partner.alreadyExists";
|
|
47
|
-
HttpsErrorMessages["PartnerBICInvalid"] = "error.partner.noValidBIC";
|
|
48
|
-
HttpsErrorMessages["PartnershipPlanAlreadyActive"] = "error.partnershipPlan.alreadyActive";
|
|
49
45
|
HttpsErrorMessages["UserPartnershipInUse"] = "error.user.partnershipInUse";
|
|
50
46
|
HttpsErrorMessages["UserFederationInUse"] = "error.user.federationInUse";
|
|
51
|
-
HttpsErrorMessages["LemonwayError"] = "error.lemonway.default";
|
|
52
|
-
HttpsErrorMessages["LemonwayInvalidMandate"] = "error.lemonway.mandate";
|
|
53
47
|
HttpsErrorMessages["Unauthorized"] = "error.auth.noValid";
|
|
54
48
|
HttpsErrorMessages["InvalidMethod"] = "error.method.noValid";
|
|
55
49
|
HttpsErrorMessages["NoFile"] = "error.file.noExists";
|
|
@@ -12,9 +12,11 @@ export default class PartnershipPlan extends ModelWithLang<PartnershipPlanData>
|
|
|
12
12
|
get price(): number;
|
|
13
13
|
get displayPrice(): string;
|
|
14
14
|
get schedule(): import("./types").PlanScheduleType;
|
|
15
|
-
get paymentMethod(): import("./types").PaymentMethod;
|
|
16
15
|
get isAnnuallySchedule(): boolean;
|
|
17
16
|
get isPaymentDayEndOfMonth(): boolean;
|
|
17
|
+
get paymentMethod(): import("./types").PaymentMethod;
|
|
18
|
+
get subscriptionsCount(): number;
|
|
19
|
+
get hasSubscriptions(): boolean;
|
|
18
20
|
get createdAt(): FirebaseFirestore.Timestamp;
|
|
19
21
|
get createdBy(): string;
|
|
20
22
|
get editedAt(): FirebaseFirestore.Timestamp | null;
|
|
@@ -47,15 +47,21 @@ class PartnershipPlan extends lang_1.default {
|
|
|
47
47
|
get schedule() {
|
|
48
48
|
return this.data.schedule;
|
|
49
49
|
}
|
|
50
|
-
get paymentMethod() {
|
|
51
|
-
return this.data.paymentMethod;
|
|
52
|
-
}
|
|
53
50
|
get isAnnuallySchedule() {
|
|
54
51
|
return this.schedule.periodInMonths === 12;
|
|
55
52
|
}
|
|
56
53
|
get isPaymentDayEndOfMonth() {
|
|
57
54
|
return this.schedule.paymentDay === -1;
|
|
58
55
|
}
|
|
56
|
+
get paymentMethod() {
|
|
57
|
+
return this.data.paymentMethod;
|
|
58
|
+
}
|
|
59
|
+
get subscriptionsCount() {
|
|
60
|
+
return this.data.subscriptionsCount || 0;
|
|
61
|
+
}
|
|
62
|
+
get hasSubscriptions() {
|
|
63
|
+
return this.subscriptionsCount > 0;
|
|
64
|
+
}
|
|
59
65
|
get createdAt() {
|
|
60
66
|
return this.data.createdAt;
|
|
61
67
|
}
|