@glissandoo/lib 1.37.2 → 1.37.4
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/index.d.ts +2 -1
- package/functions/index.js +1 -0
- package/functions/regions.js +1 -0
- package/helpers/glissandooAdmin.d.ts +3 -0
- package/helpers/glissandooAdmin.js +6 -0
- package/models/Federation/index.d.ts +1 -0
- package/models/Federation/index.js +5 -0
- package/models/Group/index.d.ts +1 -0
- package/models/Group/index.js +5 -0
- package/models/Partnership/index.d.ts +1 -0
- package/models/Partnership/index.js +5 -0
- package/models/User/index.d.ts +1 -0
- package/models/User/index.js +5 -0
- package/package.json +1 -1
package/functions/index.d.ts
CHANGED
|
@@ -99,5 +99,6 @@ export declare enum FbFunctionName {
|
|
|
99
99
|
UserRegister = "user-register",
|
|
100
100
|
UserRemove = "user-remove",
|
|
101
101
|
WebhookStripe = "webhook-stripe",
|
|
102
|
-
WebhookGocardless = "webhook-gocardless"
|
|
102
|
+
WebhookGocardless = "webhook-gocardless",
|
|
103
|
+
WebhookMessagebird = "webhook-messagebird"
|
|
103
104
|
}
|
package/functions/index.js
CHANGED
|
@@ -104,4 +104,5 @@ var FbFunctionName;
|
|
|
104
104
|
FbFunctionName["UserRemove"] = "user-remove";
|
|
105
105
|
FbFunctionName["WebhookStripe"] = "webhook-stripe";
|
|
106
106
|
FbFunctionName["WebhookGocardless"] = "webhook-gocardless";
|
|
107
|
+
FbFunctionName["WebhookMessagebird"] = "webhook-messagebird";
|
|
107
108
|
})(FbFunctionName = exports.FbFunctionName || (exports.FbFunctionName = {}));
|
package/functions/regions.js
CHANGED
|
@@ -111,6 +111,7 @@ const regionByFunctions = {
|
|
|
111
111
|
[index_1.FbFunctionName.ReminderBiweeklyEventsEmail]: GCloudRegions.EuropeWest6,
|
|
112
112
|
[index_1.FbFunctionName.WebhookStripe]: GCloudRegions.EuropeWest6,
|
|
113
113
|
[index_1.FbFunctionName.WebhookGocardless]: GCloudRegions.EuropeWest6,
|
|
114
|
+
[index_1.FbFunctionName.WebhookMessagebird]: GCloudRegions.EuropeWest6,
|
|
114
115
|
};
|
|
115
116
|
const getFunctionRegion = (fn) => regionByFunctions[fn] || defaultRegion;
|
|
116
117
|
exports.getFunctionRegion = getFunctionRegion;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGlissandooAdminEntityURL = exports.GLISSANDOO_ADMIN_URL = void 0;
|
|
4
|
+
exports.GLISSANDOO_ADMIN_URL = 'https://admin.glissandoo.com/';
|
|
5
|
+
const getGlissandooAdminEntityURL = (entity, id) => new URL(`/${entity}s/${id}`, exports.GLISSANDOO_ADMIN_URL).href;
|
|
6
|
+
exports.getGlissandooAdminEntityURL = getGlissandooAdminEntityURL;
|
|
@@ -21,4 +21,5 @@ export default class Federation extends Model<FederationData> {
|
|
|
21
21
|
get createdBy(): import("../../types/firestore").DocumentReference<import("../../types/firestore").DocumentData>;
|
|
22
22
|
get deletedAt(): import("../../types/firestore").Timestamp | null;
|
|
23
23
|
get isActive(): boolean;
|
|
24
|
+
get glissandooAdminUrl(): string;
|
|
24
25
|
}
|
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = require("lodash");
|
|
7
|
+
const collections_1 = require("../../helpers/collections");
|
|
8
|
+
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
7
9
|
const Model_1 = __importDefault(require("../Model"));
|
|
8
10
|
class Federation extends Model_1.default {
|
|
9
11
|
constructor(doc) {
|
|
@@ -62,5 +64,8 @@ class Federation extends Model_1.default {
|
|
|
62
64
|
get isActive() {
|
|
63
65
|
return !this.deletedAt && this.exists;
|
|
64
66
|
}
|
|
67
|
+
get glissandooAdminUrl() {
|
|
68
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Federation, this.id);
|
|
69
|
+
}
|
|
65
70
|
}
|
|
66
71
|
exports.default = Federation;
|
package/models/Group/index.d.ts
CHANGED
package/models/Group/index.js
CHANGED
|
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const date_fns_1 = require("date-fns");
|
|
7
7
|
const lodash_1 = require("lodash");
|
|
8
|
+
const collections_1 = require("../../helpers/collections");
|
|
9
|
+
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
8
10
|
const orders_1 = require("../../helpers/musicStyles/orders");
|
|
9
11
|
const objects_1 = require("../../helpers/objects");
|
|
10
12
|
const plans_1 = require("../../helpers/plans");
|
|
@@ -180,5 +182,8 @@ class Group extends basic_1.default {
|
|
|
180
182
|
}
|
|
181
183
|
return (0, date_fns_1.addMonths)(this.createdAt.toDate(), 1);
|
|
182
184
|
}
|
|
185
|
+
get glissandooAdminUrl() {
|
|
186
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Group, this.id);
|
|
187
|
+
}
|
|
183
188
|
}
|
|
184
189
|
exports.default = Group;
|
|
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const collections_1 = require("../../helpers/collections");
|
|
7
|
+
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
6
8
|
const basic_1 = __importDefault(require("./basic"));
|
|
7
9
|
class Partnership extends basic_1.default {
|
|
8
10
|
constructor(doc) {
|
|
@@ -53,5 +55,8 @@ class Partnership extends basic_1.default {
|
|
|
53
55
|
get groupIds() {
|
|
54
56
|
return this.data.groupIds || [];
|
|
55
57
|
}
|
|
58
|
+
get glissandooAdminUrl() {
|
|
59
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Partnership, this.id);
|
|
60
|
+
}
|
|
56
61
|
}
|
|
57
62
|
exports.default = Partnership;
|
package/models/User/index.d.ts
CHANGED
|
@@ -40,4 +40,5 @@ export default class User extends UserBasic<UserData> {
|
|
|
40
40
|
getNotificationSetting(key: UserNotificationSettings): boolean;
|
|
41
41
|
get registerVia(): import("./types").UserRegisterVia;
|
|
42
42
|
get lastAppLoginAt(): import("../../types/firestore").Timestamp | null;
|
|
43
|
+
get glissandooAdminUrl(): string;
|
|
43
44
|
}
|
package/models/User/index.js
CHANGED
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = require("lodash");
|
|
7
|
+
const collections_1 = require("../../helpers/collections");
|
|
8
|
+
const glissandooAdmin_1 = require("../../helpers/glissandooAdmin");
|
|
7
9
|
const utils_1 = require("../../helpers/utils");
|
|
8
10
|
const lang_1 = require("../../lang");
|
|
9
11
|
const basic_1 = __importDefault(require("./basic"));
|
|
@@ -111,5 +113,8 @@ class User extends basic_1.default {
|
|
|
111
113
|
get lastAppLoginAt() {
|
|
112
114
|
return this.data.lastAppLoginAt || null;
|
|
113
115
|
}
|
|
116
|
+
get glissandooAdminUrl() {
|
|
117
|
+
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.User, this.id);
|
|
118
|
+
}
|
|
114
119
|
}
|
|
115
120
|
exports.default = User;
|