@glissandoo/lib 1.4.6 → 1.4.7
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,5 +1,4 @@
|
|
|
1
1
|
import { BasicAddressData } from '../models/Partner/types';
|
|
2
|
-
import { LegalContactData } from '../models/Partnership/types';
|
|
3
2
|
export declare namespace PartnershipFbFunctionsTypes {
|
|
4
3
|
interface CreateParams {
|
|
5
4
|
displayName: string;
|
|
@@ -7,8 +6,8 @@ export declare namespace PartnershipFbFunctionsTypes {
|
|
|
7
6
|
email: string;
|
|
8
7
|
phone: string | null;
|
|
9
8
|
address: BasicAddressData;
|
|
10
|
-
legalContact: LegalContactData | null;
|
|
11
9
|
partnershipId: string;
|
|
10
|
+
gocardlessCustomerId: string | null;
|
|
12
11
|
CIF: string | null;
|
|
13
12
|
}
|
|
14
13
|
type CreateResult = void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocumentSnapshot } from '@google-cloud/firestore';
|
|
2
2
|
import { AdminItemStatus } from '../../helpers/types';
|
|
3
3
|
import PartnershipBasic from './basic';
|
|
4
|
-
import { PartnershipData
|
|
4
|
+
import { PartnershipData } from './types';
|
|
5
5
|
export default class Partnership extends PartnershipBasic<PartnershipData> {
|
|
6
6
|
constructor(doc: DocumentSnapshot);
|
|
7
7
|
get description(): string;
|
|
@@ -9,11 +9,9 @@ export default class Partnership extends PartnershipBasic<PartnershipData> {
|
|
|
9
9
|
get adminList(): import("../../helpers/types").AdminItem[];
|
|
10
10
|
adminListByStatus(status: AdminItemStatus): import("../../helpers/types").AdminItem[];
|
|
11
11
|
isAdmin(userId: string): boolean;
|
|
12
|
-
|
|
12
|
+
/** @deprecated */
|
|
13
13
|
get legalContact(): import("./types").LegalContactData | null;
|
|
14
14
|
get createdAt(): FirebaseFirestore.Timestamp;
|
|
15
|
-
private get verifiedAt();
|
|
16
|
-
get isVerified(): boolean;
|
|
17
15
|
private get deletedAt();
|
|
18
16
|
get isDeleted(): boolean;
|
|
19
17
|
get isActive(): boolean;
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const basic_1 = __importDefault(require("./basic"));
|
|
7
|
-
const types_1 = require("./types");
|
|
8
7
|
class Partnership extends basic_1.default {
|
|
9
8
|
constructor(doc) {
|
|
10
9
|
super(doc);
|
|
@@ -24,27 +23,13 @@ class Partnership extends basic_1.default {
|
|
|
24
23
|
isAdmin(userId) {
|
|
25
24
|
return this.admins.includes(userId);
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
if (this.isDeleted) {
|
|
29
|
-
return types_1.PartnershipStatus.Deleted;
|
|
30
|
-
}
|
|
31
|
-
if (this.isVerified) {
|
|
32
|
-
return types_1.PartnershipStatus.Verified;
|
|
33
|
-
}
|
|
34
|
-
return types_1.PartnershipStatus.PendingVerification;
|
|
35
|
-
}
|
|
26
|
+
/** @deprecated */
|
|
36
27
|
get legalContact() {
|
|
37
28
|
return this.data.legalContact;
|
|
38
29
|
}
|
|
39
30
|
get createdAt() {
|
|
40
31
|
return this.data.createdAt;
|
|
41
32
|
}
|
|
42
|
-
get verifiedAt() {
|
|
43
|
-
return this.data.verifiedAt || null;
|
|
44
|
-
}
|
|
45
|
-
get isVerified() {
|
|
46
|
-
return this.verifiedAt !== null;
|
|
47
|
-
}
|
|
48
33
|
get deletedAt() {
|
|
49
34
|
return this.data.deletedAt || null;
|
|
50
35
|
}
|
|
@@ -29,9 +29,11 @@ export interface PartnershipBasicData {
|
|
|
29
29
|
}
|
|
30
30
|
export interface PartnershipData extends PartnershipBasicData {
|
|
31
31
|
description: string;
|
|
32
|
+
/** @deprecated */
|
|
32
33
|
legalContact: LegalContactData | null;
|
|
33
34
|
administrators: string[];
|
|
34
35
|
administratorsList: AdminItem[];
|
|
36
|
+
/** @deprecated */
|
|
35
37
|
verifiedAt: Timestamp | null;
|
|
36
38
|
deletedAt: Timestamp | null;
|
|
37
39
|
federationIds: string[];
|