@glissandoo/lib 1.108.15 → 1.108.16
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/models/Customer/index.d.ts +2 -0
- package/models/Customer/index.js +11 -0
- package/models/Federation/index.d.ts +2 -0
- package/models/Federation/index.js +10 -0
- package/models/Partnership/Payment/types.d.ts +1 -0
- package/models/Partnership/Payment/types.js +1 -0
- package/models/Partnership/index.d.ts +2 -0
- package/models/Partnership/index.js +11 -0
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ export default class Customer extends CustomerBasic<CustomerData> {
|
|
|
6
6
|
constructor(doc: DocumentModel);
|
|
7
7
|
get admins(): string[];
|
|
8
8
|
get adminList(): import("../../helpers/types").AdminItem[];
|
|
9
|
+
get pendingAdmins(): import("../../helpers/types").AdminItem[];
|
|
10
|
+
get confirmedAdmins(): import("../../helpers/types").AdminItem[];
|
|
9
11
|
adminListByStatus(status: AdminItemStatus): import("../../helpers/types").AdminItem[];
|
|
10
12
|
isAdmin(userId: string): boolean;
|
|
11
13
|
get createdAt(): FirebaseFirestore.Timestamp;
|
package/models/Customer/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const collections_1 = require("../../helpers/collections");
|
|
7
7
|
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
8
|
+
const types_1 = require("../../helpers/types");
|
|
8
9
|
const basic_1 = __importDefault(require("./basic"));
|
|
9
10
|
class Customer extends basic_1.default {
|
|
10
11
|
constructor(doc) {
|
|
@@ -16,7 +17,17 @@ class Customer extends basic_1.default {
|
|
|
16
17
|
get adminList() {
|
|
17
18
|
return this.data.administratorsList || [];
|
|
18
19
|
}
|
|
20
|
+
get pendingAdmins() {
|
|
21
|
+
return this.adminList.filter((item) => item.status === types_1.AdminItemStatus.Pending);
|
|
22
|
+
}
|
|
23
|
+
get confirmedAdmins() {
|
|
24
|
+
return this.adminList.filter((item) => item.status === types_1.AdminItemStatus.Accepted);
|
|
25
|
+
}
|
|
19
26
|
adminListByStatus(status) {
|
|
27
|
+
if (status === types_1.AdminItemStatus.Pending)
|
|
28
|
+
return this.pendingAdmins;
|
|
29
|
+
if (status === types_1.AdminItemStatus.Accepted)
|
|
30
|
+
return this.confirmedAdmins;
|
|
20
31
|
return this.adminList.filter((item) => item.status === status);
|
|
21
32
|
}
|
|
22
33
|
isAdmin(userId) {
|
|
@@ -8,6 +8,8 @@ export default class Federation extends Model<FederationData> {
|
|
|
8
8
|
get partnershipIds(): string[];
|
|
9
9
|
get adminIds(): string[];
|
|
10
10
|
get adminList(): import("../../helpers/types").AdminItem[];
|
|
11
|
+
get pendingAdmins(): import("../../helpers/types").AdminItem[];
|
|
12
|
+
get confirmedAdmins(): import("../../helpers/types").AdminItem[];
|
|
11
13
|
adminListByStatus(status: AdminItemStatus): import("../../helpers/types").AdminItem[];
|
|
12
14
|
isAdmin(userId: string): boolean;
|
|
13
15
|
get photoURL(): string;
|
|
@@ -26,7 +26,17 @@ class Federation extends Model_1.default {
|
|
|
26
26
|
get adminList() {
|
|
27
27
|
return this.data.adminList || [];
|
|
28
28
|
}
|
|
29
|
+
get pendingAdmins() {
|
|
30
|
+
return this.adminList.filter((item) => item.status === types_1.AdminItemStatus.Pending);
|
|
31
|
+
}
|
|
32
|
+
get confirmedAdmins() {
|
|
33
|
+
return this.adminList.filter((item) => item.status === types_1.AdminItemStatus.Accepted);
|
|
34
|
+
}
|
|
29
35
|
adminListByStatus(status) {
|
|
36
|
+
if (status === types_1.AdminItemStatus.Pending)
|
|
37
|
+
return this.pendingAdmins;
|
|
38
|
+
if (status === types_1.AdminItemStatus.Accepted)
|
|
39
|
+
return this.confirmedAdmins;
|
|
30
40
|
return this.adminList.filter((item) => item.status === status);
|
|
31
41
|
}
|
|
32
42
|
isAdmin(userId) {
|
|
@@ -11,5 +11,6 @@ var PaymentStatus;
|
|
|
11
11
|
(function (PaymentStatus) {
|
|
12
12
|
PaymentStatus["Pending"] = "pending";
|
|
13
13
|
PaymentStatus["Charged"] = "charged";
|
|
14
|
+
PaymentStatus["Returned"] = "returned";
|
|
14
15
|
PaymentStatus["Canceled"] = "canceled";
|
|
15
16
|
})(PaymentStatus = exports.PaymentStatus || (exports.PaymentStatus = {}));
|
|
@@ -5,6 +5,8 @@ export default class Partnership extends PartnershipBasic<PartnershipData> {
|
|
|
5
5
|
get description(): string | null;
|
|
6
6
|
get admins(): string[];
|
|
7
7
|
get adminList(): import("../../helpers/types").AdminItem[];
|
|
8
|
+
get pendingAdmins(): import("../../helpers/types").AdminItem[];
|
|
9
|
+
get confirmedAdmins(): import("../../helpers/types").AdminItem[];
|
|
8
10
|
adminListByStatus(status: AdminItemStatus): import("../../helpers/types").AdminItem[];
|
|
9
11
|
isAdmin(userId: string): boolean;
|
|
10
12
|
get federationIds(): string[];
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const collections_1 = require("../../helpers/collections");
|
|
7
7
|
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
8
|
+
const types_1 = require("../../helpers/types");
|
|
8
9
|
const lang_1 = require("../../lang");
|
|
9
10
|
const basic_1 = __importDefault(require("./basic"));
|
|
10
11
|
class Partnership extends basic_1.default {
|
|
@@ -17,7 +18,17 @@ class Partnership extends basic_1.default {
|
|
|
17
18
|
get adminList() {
|
|
18
19
|
return this.data.administratorsList || [];
|
|
19
20
|
}
|
|
21
|
+
get pendingAdmins() {
|
|
22
|
+
return this.adminList.filter((item) => item.status === types_1.AdminItemStatus.Pending);
|
|
23
|
+
}
|
|
24
|
+
get confirmedAdmins() {
|
|
25
|
+
return this.adminList.filter((item) => item.status === types_1.AdminItemStatus.Accepted);
|
|
26
|
+
}
|
|
20
27
|
adminListByStatus(status) {
|
|
28
|
+
if (status === types_1.AdminItemStatus.Pending)
|
|
29
|
+
return this.pendingAdmins;
|
|
30
|
+
if (status === types_1.AdminItemStatus.Accepted)
|
|
31
|
+
return this.confirmedAdmins;
|
|
21
32
|
return this.adminList.filter((item) => item.status === status);
|
|
22
33
|
}
|
|
23
34
|
isAdmin(userId) {
|