@webda/core 2.0.0-beta.2 → 2.0.1
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/lib/application.d.ts +5 -21
- package/lib/application.js +71 -84
- package/lib/application.js.map +1 -1
- package/lib/application.spec.js +121 -140
- package/lib/application.spec.js.map +1 -1
- package/lib/core.d.ts +44 -45
- package/lib/core.js +239 -320
- package/lib/core.js.map +1 -1
- package/lib/core.spec.js +326 -391
- package/lib/core.spec.js.map +1 -1
- package/lib/index.d.ts +49 -45
- package/lib/index.js +54 -67
- package/lib/index.js.map +1 -1
- package/lib/models/aclmodel.d.ts +2 -2
- package/lib/models/aclmodel.js +63 -90
- package/lib/models/aclmodel.js.map +1 -1
- package/lib/models/aclmodel.spec.js +128 -151
- package/lib/models/aclmodel.spec.js.map +1 -1
- package/lib/models/coremodel.d.ts +39 -17
- package/lib/models/coremodel.js +160 -117
- package/lib/models/coremodel.js.map +1 -1
- package/lib/models/coremodel.spec.js +143 -107
- package/lib/models/coremodel.spec.js.map +1 -1
- package/lib/models/deployment.js +1 -2
- package/lib/models/ident.d.ts +3 -3
- package/lib/models/ident.js +4 -9
- package/lib/models/ident.js.map +1 -1
- package/lib/models/ident.spec.js +9 -11
- package/lib/models/ident.spec.js.map +1 -1
- package/lib/models/ownermodel.d.ts +2 -2
- package/lib/models/ownermodel.js +39 -62
- package/lib/models/ownermodel.js.map +1 -1
- package/lib/models/ownermodel.spec.js +126 -166
- package/lib/models/ownermodel.spec.js.map +1 -1
- package/lib/models/rolemodel.d.ts +2 -2
- package/lib/models/rolemodel.js +24 -40
- package/lib/models/rolemodel.js.map +1 -1
- package/lib/models/rolemodel.spec.js +44 -61
- package/lib/models/rolemodel.spec.js.map +1 -1
- package/lib/models/user.d.ts +9 -9
- package/lib/models/user.js +3 -8
- package/lib/models/user.js.map +1 -1
- package/lib/models/user.spec.js +14 -16
- package/lib/models/user.spec.js.map +1 -1
- package/lib/queues/filequeue.d.ts +2 -2
- package/lib/queues/filequeue.js +72 -93
- package/lib/queues/filequeue.js.map +1 -1
- package/lib/queues/filequeue.spec.js +53 -70
- package/lib/queues/filequeue.spec.js.map +1 -1
- package/lib/queues/memoryqueue.d.ts +2 -2
- package/lib/queues/memoryqueue.js +37 -61
- package/lib/queues/memoryqueue.js.map +1 -1
- package/lib/queues/memoryqueue.spec.js +142 -165
- package/lib/queues/memoryqueue.spec.js.map +1 -1
- package/lib/queues/pubsubservice.d.ts +2 -2
- package/lib/queues/pubsubservice.js +3 -7
- package/lib/queues/pubsubservice.js.map +1 -1
- package/lib/queues/queue.spec.d.ts +1 -1
- package/lib/queues/queue.spec.js +42 -56
- package/lib/queues/queue.spec.js.map +1 -1
- package/lib/queues/queueservice.d.ts +4 -4
- package/lib/queues/queueservice.js +52 -67
- package/lib/queues/queueservice.js.map +1 -1
- package/lib/router.d.ts +3 -3
- package/lib/router.js +46 -47
- package/lib/router.js.map +1 -1
- package/lib/router.spec.js +64 -61
- package/lib/router.spec.js.map +1 -1
- package/lib/services/asyncevents.d.ts +2 -2
- package/lib/services/asyncevents.js +44 -64
- package/lib/services/asyncevents.js.map +1 -1
- package/lib/services/asyncevents.spec.js +81 -98
- package/lib/services/asyncevents.spec.js.map +1 -1
- package/lib/services/authentication.d.ts +28 -19
- package/lib/services/authentication.js +542 -574
- package/lib/services/authentication.js.map +1 -1
- package/lib/services/authentication.spec.js +411 -447
- package/lib/services/authentication.spec.js.map +1 -1
- package/lib/services/binary.d.ts +9 -7
- package/lib/services/binary.js +213 -245
- package/lib/services/binary.js.map +1 -1
- package/lib/services/binary.spec.d.ts +3 -3
- package/lib/services/binary.spec.js +390 -443
- package/lib/services/binary.spec.js.map +1 -1
- package/lib/services/cloudbinary.d.ts +3 -3
- package/lib/services/cloudbinary.js +45 -70
- package/lib/services/cloudbinary.js.map +1 -1
- package/lib/services/cloudbinary.spec.d.ts +3 -3
- package/lib/services/cloudbinary.spec.js +133 -162
- package/lib/services/cloudbinary.spec.js.map +1 -1
- package/lib/services/configuration.d.ts +6 -3
- package/lib/services/configuration.js +78 -103
- package/lib/services/configuration.js.map +1 -1
- package/lib/services/configuration.spec.js +63 -83
- package/lib/services/configuration.spec.js.map +1 -1
- package/lib/services/cron.d.ts +3 -2
- package/lib/services/cron.js +9 -13
- package/lib/services/cron.js.map +1 -1
- package/lib/services/cron.spec.js +18 -21
- package/lib/services/cron.spec.js.map +1 -1
- package/lib/services/cryptoservice.d.ts +258 -0
- package/lib/services/cryptoservice.js +312 -0
- package/lib/services/cryptoservice.js.map +1 -0
- package/lib/services/cryptoservice.spec.d.ts +1 -0
- package/lib/services/cryptoservice.spec.js +137 -0
- package/lib/services/cryptoservice.spec.js.map +1 -0
- package/lib/services/debugmailer.d.ts +1 -1
- package/lib/services/debugmailer.js +13 -34
- package/lib/services/debugmailer.js.map +1 -1
- package/lib/services/debugmailer.spec.js +16 -29
- package/lib/services/debugmailer.spec.js.map +1 -1
- package/lib/services/echo.d.ts +2 -2
- package/lib/services/echo.js +15 -31
- package/lib/services/echo.js.map +1 -1
- package/lib/services/echo.spec.js +27 -40
- package/lib/services/echo.spec.js.map +1 -1
- package/lib/services/filebinary.d.ts +10 -5
- package/lib/services/filebinary.js +171 -205
- package/lib/services/filebinary.js.map +1 -1
- package/lib/services/filebinary.spec.d.ts +2 -1
- package/lib/services/filebinary.spec.js +106 -117
- package/lib/services/filebinary.spec.js.map +1 -1
- package/lib/services/fileconfiguration.d.ts +2 -2
- package/lib/services/fileconfiguration.js +25 -43
- package/lib/services/fileconfiguration.js.map +1 -1
- package/lib/services/fileconfiguration.spec.js +79 -109
- package/lib/services/fileconfiguration.spec.js.map +1 -1
- package/lib/services/invitationservice.d.ts +10 -10
- package/lib/services/invitationservice.js +275 -313
- package/lib/services/invitationservice.js.map +1 -1
- package/lib/services/invitationservice.spec.js +443 -449
- package/lib/services/invitationservice.spec.js.map +1 -1
- package/lib/services/kubernetesconfiguration.d.ts +2 -2
- package/lib/services/kubernetesconfiguration.js +41 -59
- package/lib/services/kubernetesconfiguration.js.map +1 -1
- package/lib/services/kubernetesconfiguration.spec.js +80 -98
- package/lib/services/kubernetesconfiguration.spec.js.map +1 -1
- package/lib/services/mailer.d.ts +4 -4
- package/lib/services/mailer.js +62 -86
- package/lib/services/mailer.js.map +1 -1
- package/lib/services/mailer.spec.js +86 -127
- package/lib/services/mailer.spec.js.map +1 -1
- package/lib/services/notificationservice.d.ts +4 -4
- package/lib/services/notificationservice.js +23 -42
- package/lib/services/notificationservice.js.map +1 -1
- package/lib/services/notificationservice.spec.js +47 -73
- package/lib/services/notificationservice.spec.js.map +1 -1
- package/lib/services/oauth.d.ts +32 -6
- package/lib/services/oauth.js +73 -78
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/oauth.spec.js +128 -148
- package/lib/services/oauth.spec.js.map +1 -1
- package/lib/services/proxy.d.ts +74 -0
- package/lib/services/proxy.js +126 -0
- package/lib/services/proxy.js.map +1 -0
- package/lib/services/proxy.spec.d.ts +1 -0
- package/lib/services/proxy.spec.js +59 -0
- package/lib/services/proxy.spec.js.map +1 -0
- package/lib/services/resource.d.ts +2 -2
- package/lib/services/resource.js +12 -18
- package/lib/services/resource.js.map +1 -1
- package/lib/services/resource.spec.js +67 -99
- package/lib/services/resource.spec.js.map +1 -1
- package/lib/services/service.d.ts +29 -6
- package/lib/services/service.js +69 -39
- package/lib/services/service.js.map +1 -1
- package/lib/services/service.spec.js +62 -67
- package/lib/services/service.spec.js.map +1 -1
- package/lib/services/version.d.ts +1 -1
- package/lib/services/version.js +3 -8
- package/lib/services/version.js.map +1 -1
- package/lib/services/version.spec.js +11 -24
- package/lib/services/version.spec.js.map +1 -1
- package/lib/stores/aggregator.d.ts +3 -3
- package/lib/stores/aggregator.js +37 -57
- package/lib/stores/aggregator.js.map +1 -1
- package/lib/stores/file.d.ts +3 -3
- package/lib/stores/file.js +93 -131
- package/lib/stores/file.js.map +1 -1
- package/lib/stores/file.spec.d.ts +2 -2
- package/lib/stores/file.spec.js +262 -289
- package/lib/stores/file.spec.js.map +1 -1
- package/lib/stores/mapper.d.ts +4 -4
- package/lib/stores/mapper.js +111 -137
- package/lib/stores/mapper.js.map +1 -1
- package/lib/stores/mapper.spec.js +133 -150
- package/lib/stores/mapper.spec.js.map +1 -1
- package/lib/stores/memory.d.ts +67 -6
- package/lib/stores/memory.js +155 -117
- package/lib/stores/memory.js.map +1 -1
- package/lib/stores/memory.spec.d.ts +3 -2
- package/lib/stores/memory.spec.js +127 -105
- package/lib/stores/memory.spec.js.map +1 -1
- package/lib/stores/store.d.ts +40 -16
- package/lib/stores/store.js +847 -830
- package/lib/stores/store.js.map +1 -1
- package/lib/stores/store.spec.d.ts +6 -4
- package/lib/stores/store.spec.js +628 -647
- package/lib/stores/store.spec.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLLexer.d.ts +4 -4
- package/lib/stores/webdaql/WebdaQLLexer.js +9 -13
- package/lib/stores/webdaql/WebdaQLLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserLexer.d.ts +4 -4
- package/lib/stores/webdaql/WebdaQLParserLexer.js +9 -13
- package/lib/stores/webdaql/WebdaQLParserLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserListener.d.ts +2 -2
- package/lib/stores/webdaql/WebdaQLParserListener.js +1 -2
- package/lib/stores/webdaql/WebdaQLParserListener.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserParser.d.ts +10 -10
- package/lib/stores/webdaql/WebdaQLParserParser.js +62 -91
- package/lib/stores/webdaql/WebdaQLParserParser.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserVisitor.d.ts +2 -2
- package/lib/stores/webdaql/WebdaQLParserVisitor.js +1 -2
- package/lib/stores/webdaql/WebdaQLParserVisitor.js.map +1 -1
- package/lib/stores/webdaql/query.d.ts +4 -5
- package/lib/stores/webdaql/query.js +16 -19
- package/lib/stores/webdaql/query.js.map +1 -1
- package/lib/stores/webdaql/query.spec.js +30 -32
- package/lib/stores/webdaql/query.spec.js.map +1 -1
- package/lib/test.d.ts +3 -3
- package/lib/test.js +74 -94
- package/lib/test.js.map +1 -1
- package/lib/unpackedapplication.d.ts +1 -1
- package/lib/unpackedapplication.js +44 -38
- package/lib/unpackedapplication.js.map +1 -1
- package/lib/utils/abstractdeployer.js +1 -5
- package/lib/utils/abstractdeployer.js.map +1 -1
- package/lib/utils/abstractdeployer.spec.js +6 -8
- package/lib/utils/abstractdeployer.spec.js.map +1 -1
- package/lib/utils/context.d.ts +61 -29
- package/lib/utils/context.js +133 -127
- package/lib/utils/context.js.map +1 -1
- package/lib/utils/context.spec.js +144 -153
- package/lib/utils/context.spec.js.map +1 -1
- package/lib/utils/cookie.d.ts +66 -45
- package/lib/utils/cookie.js +69 -158
- package/lib/utils/cookie.js.map +1 -1
- package/lib/utils/cookie.spec.js +220 -238
- package/lib/utils/cookie.spec.js.map +1 -1
- package/lib/utils/esm.d.ts +4 -0
- package/lib/utils/esm.js +10 -0
- package/lib/utils/esm.js.map +1 -0
- package/lib/utils/httpcontext.d.ts +3 -0
- package/lib/utils/httpcontext.js +48 -65
- package/lib/utils/httpcontext.js.map +1 -1
- package/lib/utils/httpcontext.spec.js +37 -56
- package/lib/utils/httpcontext.spec.js.map +1 -1
- package/lib/utils/logger.d.ts +2 -2
- package/lib/utils/logger.js +15 -28
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/logger.spec.js +9 -11
- package/lib/utils/logger.spec.js.map +1 -1
- package/lib/utils/serializers.js +17 -20
- package/lib/utils/serializers.js.map +1 -1
- package/lib/utils/serializers.spec.js +43 -44
- package/lib/utils/serializers.spec.js.map +1 -1
- package/lib/utils/session.d.ts +120 -0
- package/lib/utils/session.js +155 -0
- package/lib/utils/session.js.map +1 -0
- package/lib/utils/session.spec.d.ts +1 -0
- package/lib/utils/session.spec.js +66 -0
- package/lib/utils/session.spec.js.map +1 -0
- package/lib/utils/waiter.d.ts +1 -1
- package/lib/utils/waiter.js +32 -52
- package/lib/utils/waiter.js.map +1 -1
- package/lib/utils/waiter.spec.js +75 -92
- package/lib/utils/waiter.spec.js.map +1 -1
- package/package.json +22 -14
- package/test/config-invitation.json +1 -3
- package/test/config.json +3 -3
- package/test/config.old.json +1 -2
- package/test/moddas/annotatedservice.js +5 -5
- package/test/moddas/debugmailer.js +2 -3
- package/test/moddas/fakeservice.js +2 -3
- package/test/moddas/voidstore.js +6 -4
- package/test/models/ident.js +2 -6
- package/test/models/task.js +3 -7
- package/test/package.json +2 -1
- package/webda.module.json +895 -189
|
@@ -1,40 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.InvitationParameters = void 0;
|
|
19
|
-
const index_1 = require("../index");
|
|
20
|
-
const service_1 = require("./service");
|
|
7
|
+
import { Ident } from "../index.js";
|
|
8
|
+
import { Inject, Service, ServiceParameters } from "./service.js";
|
|
21
9
|
/**
|
|
22
10
|
*
|
|
23
11
|
*/
|
|
24
|
-
class InvitationParameters extends
|
|
12
|
+
export class InvitationParameters extends ServiceParameters {
|
|
25
13
|
constructor(params) {
|
|
26
|
-
var _a, _b, _c, _d;
|
|
27
14
|
super(params);
|
|
28
|
-
|
|
15
|
+
this.authenticationService ?? (this.authenticationService = "Authentication");
|
|
29
16
|
if (typeof this.mapFields === "string") {
|
|
30
17
|
this.mapFields = this.mapFields.split(",");
|
|
31
18
|
}
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
this.mapFields ?? (this.mapFields = []);
|
|
20
|
+
this.multiple ?? (this.multiple = true);
|
|
34
21
|
if (!this.attribute.startsWith("_")) {
|
|
35
22
|
throw new Error(`Attribute '${this.attribute}' needs to start with a _ to be only modified by server`);
|
|
36
23
|
}
|
|
37
|
-
|
|
24
|
+
this.pendingAttribute ?? (this.pendingAttribute = `${this.attribute}Pending`);
|
|
38
25
|
if (!this.pendingAttribute.startsWith("_")) {
|
|
39
26
|
throw new Error(`Attribute '${this.pendingAttribute}' needs to start with a _ to be only modified by server`);
|
|
40
27
|
}
|
|
@@ -43,7 +30,6 @@ class InvitationParameters extends service_1.ServiceParameters {
|
|
|
43
30
|
}
|
|
44
31
|
}
|
|
45
32
|
}
|
|
46
|
-
exports.InvitationParameters = InvitationParameters;
|
|
47
33
|
/**
|
|
48
34
|
* Allow to use invitation on AclModel
|
|
49
35
|
*
|
|
@@ -52,7 +38,7 @@ exports.InvitationParameters = InvitationParameters;
|
|
|
52
38
|
*
|
|
53
39
|
* @WebdaModda
|
|
54
40
|
*/
|
|
55
|
-
class InvitationService extends
|
|
41
|
+
export default class InvitationService extends Service {
|
|
56
42
|
/**
|
|
57
43
|
* @inheritdoc
|
|
58
44
|
*/
|
|
@@ -68,61 +54,56 @@ class InvitationService extends service_1.Service {
|
|
|
68
54
|
this.authenticationService.on("Authentication.Register", (evt) => this.registrationListener(evt));
|
|
69
55
|
const url = this.modelStore.getParameters().expose.url;
|
|
70
56
|
this.addRoute(`${url}/{uuid}/invitations`, ["GET", "POST", "PUT", "DELETE"], this.invite);
|
|
57
|
+
return this;
|
|
71
58
|
}
|
|
72
59
|
/**
|
|
73
60
|
* @inheritdoc
|
|
74
61
|
*/
|
|
75
|
-
init() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
!(yield this.notificationService.hasNotification(this.parameters.notification))) {
|
|
83
|
-
throw new Error(`Email template should exist`);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
62
|
+
async init() {
|
|
63
|
+
await super.init();
|
|
64
|
+
if (this.parameters.notification &&
|
|
65
|
+
!(await this.notificationService.hasNotification(this.parameters.notification))) {
|
|
66
|
+
throw new Error(`Email template should exist`);
|
|
67
|
+
}
|
|
68
|
+
return this;
|
|
86
69
|
}
|
|
87
70
|
/**
|
|
88
71
|
* Accept or refuse for an invitation
|
|
89
72
|
* @param ctx
|
|
90
73
|
* @param model
|
|
91
74
|
*/
|
|
92
|
-
answerInvitation(ctx, model) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
delete model[this.parameters.pendingAttribute][`ident_${i.getUuid()}`];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
if (model[this.parameters.pendingAttribute][`user_${user.getUuid()}`]) {
|
|
113
|
-
metadata = model[this.parameters.pendingAttribute][`user_${user.getUuid()}`];
|
|
114
|
-
delete model[this.parameters.pendingAttribute][`user_${user.getUuid()}`];
|
|
115
|
-
}
|
|
116
|
-
if (metadata && body.accept) {
|
|
117
|
-
model[this.parameters.attribute][user.getUuid()] = metadata;
|
|
75
|
+
async answerInvitation(ctx, model) {
|
|
76
|
+
let body = await ctx.getRequestBody();
|
|
77
|
+
// Need to specify if you accept or not
|
|
78
|
+
if (typeof body.accept !== "boolean") {
|
|
79
|
+
throw 400;
|
|
80
|
+
}
|
|
81
|
+
// Invitation on the model is gone
|
|
82
|
+
if (model === undefined) {
|
|
83
|
+
await this.removeInvitationFromUser(ctx.getCurrentUserId(), ctx.getParameters().uuid);
|
|
84
|
+
throw 410;
|
|
85
|
+
}
|
|
86
|
+
const user = await ctx.getCurrentUser();
|
|
87
|
+
let metadata = undefined;
|
|
88
|
+
user.getIdents().forEach(i => {
|
|
89
|
+
if (model[this.parameters.pendingAttribute][`ident_${i.getUuid()}`]) {
|
|
90
|
+
metadata = model[this.parameters.pendingAttribute][`ident_${i.getUuid()}`];
|
|
91
|
+
delete model[this.parameters.pendingAttribute][`ident_${i.getUuid()}`];
|
|
118
92
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
93
|
+
});
|
|
94
|
+
if (model[this.parameters.pendingAttribute][`user_${user.getUuid()}`]) {
|
|
95
|
+
metadata = model[this.parameters.pendingAttribute][`user_${user.getUuid()}`];
|
|
96
|
+
delete model[this.parameters.pendingAttribute][`user_${user.getUuid()}`];
|
|
97
|
+
}
|
|
98
|
+
if (metadata && body.accept) {
|
|
99
|
+
model[this.parameters.attribute][user.getUuid()] = metadata;
|
|
100
|
+
}
|
|
101
|
+
await this.updateModel(model);
|
|
102
|
+
this.emit("Invitation.Accepted", {
|
|
103
|
+
metadata,
|
|
104
|
+
model,
|
|
105
|
+
context: ctx,
|
|
106
|
+
accept: body.accept
|
|
126
107
|
});
|
|
127
108
|
}
|
|
128
109
|
/**
|
|
@@ -130,12 +111,10 @@ class InvitationService extends service_1.Service {
|
|
|
130
111
|
*
|
|
131
112
|
* @param model
|
|
132
113
|
*/
|
|
133
|
-
updateModel(model) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
[this.parameters.pendingAttribute]: model[this.parameters.pendingAttribute]
|
|
138
|
-
});
|
|
114
|
+
async updateModel(model) {
|
|
115
|
+
await model.patch({
|
|
116
|
+
[this.parameters.attribute]: model[this.parameters.attribute],
|
|
117
|
+
[this.parameters.pendingAttribute]: model[this.parameters.pendingAttribute]
|
|
139
118
|
});
|
|
140
119
|
}
|
|
141
120
|
/**
|
|
@@ -143,75 +122,70 @@ class InvitationService extends service_1.Service {
|
|
|
143
122
|
* @param ctx
|
|
144
123
|
* @param model
|
|
145
124
|
*/
|
|
146
|
-
uninvite(ctx, model) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
promises.push(this.invitationStore.removeAttribute(`${ident}_${this.getName()}`, this.getInvitationAttribute(model.getUuid())));
|
|
161
|
-
invitedIdents.push(ident);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
// Remove user
|
|
165
|
-
promises.push((() => __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
const id = yield this.authenticationService.getIdentStore().get(ident);
|
|
167
|
-
if (id && id.getUser()) {
|
|
168
|
-
delete model[this.parameters.attribute][id.getUser()];
|
|
169
|
-
yield this.removeInvitationFromUser(id.getUser(), model.getUuid());
|
|
170
|
-
invitedUsers.push(id.getUser());
|
|
171
|
-
}
|
|
172
|
-
}))());
|
|
173
|
-
}
|
|
125
|
+
async uninvite(ctx, model) {
|
|
126
|
+
const body = await ctx.getRequestBody();
|
|
127
|
+
body.users ?? (body.users = []);
|
|
128
|
+
body.idents ?? (body.idents = []);
|
|
129
|
+
const promises = [];
|
|
130
|
+
let invitedIdents = [];
|
|
131
|
+
let invitedUsers = [];
|
|
132
|
+
for (const ident of body.idents) {
|
|
133
|
+
if (model[this.parameters.pendingAttribute][`ident_${ident}`]) {
|
|
134
|
+
// Remove from pending on the object
|
|
135
|
+
delete model[this.parameters.pendingAttribute][`ident_${ident}`];
|
|
136
|
+
// Remove from pending from the invitation store
|
|
137
|
+
promises.push(this.invitationStore.removeAttribute(`${ident}_${this.getName()}`, this.getInvitationAttribute(model.getUuid())));
|
|
138
|
+
invitedIdents.push(ident);
|
|
174
139
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
140
|
+
else {
|
|
141
|
+
// Remove user
|
|
142
|
+
promises.push((async () => {
|
|
143
|
+
const id = await this.authenticationService.getIdentStore().get(ident);
|
|
144
|
+
if (id && id.getUser()) {
|
|
145
|
+
delete model[this.parameters.attribute][id.getUser()];
|
|
146
|
+
await this.removeInvitationFromUser(id.getUser(), model.getUuid());
|
|
147
|
+
invitedUsers.push(id.getUser());
|
|
148
|
+
}
|
|
149
|
+
})());
|
|
184
150
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
151
|
+
}
|
|
152
|
+
for (const user of body.users) {
|
|
153
|
+
if (model[this.parameters.pendingAttribute][`user_${user}`]) {
|
|
154
|
+
delete model[this.parameters.pendingAttribute][`user_${user}`];
|
|
155
|
+
}
|
|
156
|
+
else if (model[this.parameters.attribute][user]) {
|
|
157
|
+
delete model[this.parameters.attribute][user];
|
|
158
|
+
}
|
|
159
|
+
promises.push(this.removeInvitationFromUser(user, model.getUuid()));
|
|
160
|
+
invitedUsers.push(user);
|
|
161
|
+
}
|
|
162
|
+
await Promise.all(promises);
|
|
163
|
+
//
|
|
164
|
+
await this.updateModel(model);
|
|
165
|
+
this.emit("Invitation.Removed", {
|
|
166
|
+
metadata: body.metadata,
|
|
167
|
+
users: invitedUsers,
|
|
168
|
+
idents: invitedIdents,
|
|
169
|
+
model,
|
|
170
|
+
context: ctx
|
|
195
171
|
});
|
|
196
172
|
}
|
|
197
173
|
/**
|
|
198
174
|
* Remove a model invitation from user
|
|
199
175
|
* @param user
|
|
200
176
|
*/
|
|
201
|
-
removeInvitationFromUser(user, model) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
index++;
|
|
177
|
+
async removeInvitationFromUser(user, model) {
|
|
178
|
+
let userModel = await this.authenticationService.getUserStore().get(user);
|
|
179
|
+
let index = 0;
|
|
180
|
+
for (let invit of userModel[this.parameters.mapAttribute] || []) {
|
|
181
|
+
if (invit.model === model) {
|
|
182
|
+
await this.authenticationService
|
|
183
|
+
.getUserStore()
|
|
184
|
+
.deleteItemFromCollection(user, this.parameters.mapAttribute, index, model, "model");
|
|
185
|
+
return;
|
|
213
186
|
}
|
|
214
|
-
|
|
187
|
+
index++;
|
|
188
|
+
}
|
|
215
189
|
}
|
|
216
190
|
/**
|
|
217
191
|
* Handle invitations all methods
|
|
@@ -219,152 +193,143 @@ class InvitationService extends service_1.Service {
|
|
|
219
193
|
* @param ctx
|
|
220
194
|
* @returns
|
|
221
195
|
*/
|
|
222
|
-
invite(ctx) {
|
|
223
|
-
var _a, _b, _c
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
this.parameters.mapFields.forEach(f => (metadata[f] = model[f]));
|
|
261
|
-
for (const invitation of invitations) {
|
|
262
|
-
// User is known
|
|
263
|
-
if (invitation.ident) {
|
|
264
|
-
if (this.parameters.autoAccept) {
|
|
265
|
-
model[this.parameters.attribute][invitation.ident.getUser()] = body.metadata;
|
|
266
|
-
}
|
|
267
|
-
else if (!model[this.parameters.attribute][invitation.ident.getUser()]) {
|
|
268
|
-
// Add to the user
|
|
269
|
-
model[this.parameters.pendingAttribute][`user_${invitation.ident.getUser()}`] = body.metadata;
|
|
270
|
-
}
|
|
271
|
-
promises.push((() => __awaiter(this, void 0, void 0, function* () {
|
|
272
|
-
const user = yield this.authenticationService.getUserStore().get(invitation.ident.getUser());
|
|
273
|
-
invitedUsers.push(user);
|
|
274
|
-
yield this.addInvitationToUser(model, user, inviter, metadata, body.notification);
|
|
275
|
-
}))());
|
|
276
|
-
continue;
|
|
277
|
-
}
|
|
278
|
-
// User is unknown to the platform
|
|
279
|
-
invitedIdents.push(invitation.invitation);
|
|
280
|
-
let invitUuid = `${invitation.invitation}_${this.getName()}`;
|
|
281
|
-
(_c = model[_g = this.parameters.pendingAttribute]) !== null && _c !== void 0 ? _c : (model[_g] = {});
|
|
282
|
-
model[this.parameters.pendingAttribute][`ident_${invitation.invitation}`] = body.metadata;
|
|
283
|
-
const invitInfo = {
|
|
284
|
-
inviter: inviter.toPublicEntry(),
|
|
285
|
-
metadata: body.metadata
|
|
286
|
-
};
|
|
287
|
-
if (yield this.invitationStore.exists(invitUuid)) {
|
|
288
|
-
promises.push(this.invitationStore.setAttribute(invitUuid, this.getInvitationAttribute(model.getUuid()), invitInfo));
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
promises.push(this.invitationStore.save({
|
|
292
|
-
uuid: invitUuid,
|
|
293
|
-
[this.getInvitationAttribute(model.getUuid())]: invitInfo
|
|
294
|
-
}));
|
|
295
|
-
}
|
|
296
|
-
// Notify ident
|
|
297
|
-
let ident = invitation.invitation.split("_");
|
|
298
|
-
yield this.sendNotification(index_1.Ident.init(ident.pop(), ident.join("_")), {
|
|
299
|
-
model,
|
|
300
|
-
metadata,
|
|
301
|
-
notification: body.notification,
|
|
302
|
-
inviter: inviter.toPublicEntry(),
|
|
303
|
-
pending: !this.parameters.autoAccept,
|
|
304
|
-
registered: true
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
// Check user direct invite
|
|
308
|
-
(_d = body.users) !== null && _d !== void 0 ? _d : (body.users = []);
|
|
309
|
-
promises.push(...body.users.map((u) => __awaiter(this, void 0, void 0, function* () {
|
|
310
|
-
let user = yield this.authenticationService.getUserStore().get(u);
|
|
311
|
-
if (!user) {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
196
|
+
async invite(ctx) {
|
|
197
|
+
var _a, _b, _c;
|
|
198
|
+
let model = await this.modelStore.get(ctx.getParameters().uuid);
|
|
199
|
+
if (ctx.getHttpContext().getMethod() === "PUT") {
|
|
200
|
+
return this.answerInvitation(ctx, model);
|
|
201
|
+
}
|
|
202
|
+
let inviter = await ctx.getCurrentUser();
|
|
203
|
+
if (!model) {
|
|
204
|
+
throw 404;
|
|
205
|
+
}
|
|
206
|
+
model[_a = this.parameters.attribute] ?? (model[_a] = {});
|
|
207
|
+
model[_b = this.parameters.pendingAttribute] ?? (model[_b] = {});
|
|
208
|
+
if (ctx.getHttpContext().getMethod() === "DELETE") {
|
|
209
|
+
await model.canAct(ctx, "uninvite");
|
|
210
|
+
return this.uninvite(ctx, model);
|
|
211
|
+
}
|
|
212
|
+
await model.canAct(ctx, "invite");
|
|
213
|
+
// Retrieve invitation useful when invitation are hidden with a __
|
|
214
|
+
if (ctx.getHttpContext().getMethod() === "GET") {
|
|
215
|
+
ctx.write(model[this.parameters.pendingAttribute] || {});
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const body = await ctx.getRequestBody();
|
|
219
|
+
// For each ident
|
|
220
|
+
const identsStore = this.authenticationService.getIdentStore();
|
|
221
|
+
// Load all idents with orignal
|
|
222
|
+
const invitations = await Promise.all((body.idents || []).map(async (i) => ({
|
|
223
|
+
ident: await identsStore.get(i),
|
|
224
|
+
invitation: i
|
|
225
|
+
})));
|
|
226
|
+
let invitedIdents = [];
|
|
227
|
+
let invitedUsers = [];
|
|
228
|
+
let promises = [];
|
|
229
|
+
const metadata = {};
|
|
230
|
+
this.parameters.mapFields.forEach(f => (metadata[f] = model[f]));
|
|
231
|
+
for (const invitation of invitations) {
|
|
232
|
+
// User is known
|
|
233
|
+
if (invitation.ident) {
|
|
314
234
|
if (this.parameters.autoAccept) {
|
|
315
|
-
model[this.parameters.attribute][
|
|
235
|
+
model[this.parameters.attribute][invitation.ident.getUser()] = body.metadata;
|
|
316
236
|
}
|
|
317
|
-
else if (!model[this.parameters.attribute][
|
|
318
|
-
|
|
237
|
+
else if (!model[this.parameters.attribute][invitation.ident.getUser()]) {
|
|
238
|
+
// Add to the user
|
|
239
|
+
model[this.parameters.pendingAttribute][`user_${invitation.ident.getUser()}`] = body.metadata;
|
|
319
240
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this.emit("Invitation.Sent", {
|
|
327
|
-
metadata: body.metadata,
|
|
328
|
-
notification: body.notification,
|
|
329
|
-
users: invitedUsers,
|
|
330
|
-
idents: invitedIdents,
|
|
331
|
-
model,
|
|
332
|
-
context: ctx
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
addInvitationToUser(model, user, inviter, metadata, notification = {}) {
|
|
337
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
-
if ((user[this.parameters.mapAttribute] || []).filter(p => p.model === model.getUuid()).length) {
|
|
339
|
-
return;
|
|
241
|
+
promises.push((async () => {
|
|
242
|
+
const user = await this.authenticationService.getUserStore().get(invitation.ident.getUser());
|
|
243
|
+
invitedUsers.push(user);
|
|
244
|
+
await this.addInvitationToUser(model, user, inviter, metadata, body.notification);
|
|
245
|
+
})());
|
|
246
|
+
continue;
|
|
340
247
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
248
|
+
// User is unknown to the platform
|
|
249
|
+
invitedIdents.push(invitation.invitation);
|
|
250
|
+
let invitUuid = `${invitation.invitation}_${this.getName()}`;
|
|
251
|
+
model[_c = this.parameters.pendingAttribute] ?? (model[_c] = {});
|
|
252
|
+
model[this.parameters.pendingAttribute][`ident_${invitation.invitation}`] = body.metadata;
|
|
253
|
+
const invitInfo = {
|
|
346
254
|
inviter: inviter.toPublicEntry(),
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
255
|
+
metadata: body.metadata
|
|
256
|
+
};
|
|
257
|
+
if (await this.invitationStore.exists(invitUuid)) {
|
|
258
|
+
promises.push(this.invitationStore.setAttribute(invitUuid, this.getInvitationAttribute(model.getUuid()), invitInfo));
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
promises.push(this.invitationStore.save({
|
|
262
|
+
uuid: invitUuid,
|
|
263
|
+
[this.getInvitationAttribute(model.getUuid())]: invitInfo
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
// Notify ident
|
|
267
|
+
let ident = invitation.invitation.split("_");
|
|
268
|
+
await this.sendNotification(Ident.init(ident.pop(), ident.join("_")), {
|
|
351
269
|
model,
|
|
352
270
|
metadata,
|
|
353
|
-
notification,
|
|
271
|
+
notification: body.notification,
|
|
354
272
|
inviter: inviter.toPublicEntry(),
|
|
355
273
|
pending: !this.parameters.autoAccept,
|
|
356
274
|
registered: true
|
|
357
275
|
});
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
276
|
+
}
|
|
277
|
+
// Check user direct invite
|
|
278
|
+
body.users ?? (body.users = []);
|
|
279
|
+
promises.push(...body.users.map(async (u) => {
|
|
280
|
+
let user = await this.authenticationService.getUserStore().get(u);
|
|
281
|
+
if (!user) {
|
|
363
282
|
return;
|
|
364
283
|
}
|
|
365
|
-
|
|
284
|
+
if (this.parameters.autoAccept) {
|
|
285
|
+
model[this.parameters.attribute][u] = body.metadata;
|
|
286
|
+
}
|
|
287
|
+
else if (!model[this.parameters.attribute][u]) {
|
|
288
|
+
model[this.parameters.pendingAttribute][`user_${u}`] = body.metadata;
|
|
289
|
+
}
|
|
290
|
+
invitedUsers.push(user);
|
|
291
|
+
await this.addInvitationToUser(model, user, inviter, metadata, body.notification);
|
|
292
|
+
}));
|
|
293
|
+
await Promise.all(promises);
|
|
294
|
+
// Update model now
|
|
295
|
+
await this.updateModel(model);
|
|
296
|
+
this.emit("Invitation.Sent", {
|
|
297
|
+
metadata: body.metadata,
|
|
298
|
+
notification: body.notification,
|
|
299
|
+
users: invitedUsers,
|
|
300
|
+
idents: invitedIdents,
|
|
301
|
+
model,
|
|
302
|
+
context: ctx
|
|
366
303
|
});
|
|
367
304
|
}
|
|
305
|
+
async addInvitationToUser(model, user, inviter, metadata, notification = {}) {
|
|
306
|
+
if ((user[this.parameters.mapAttribute] || []).filter(p => p.model === model.getUuid()).length) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
await this.authenticationService
|
|
310
|
+
.getUserStore()
|
|
311
|
+
.upsertItemToCollection(user.getUuid(), this.parameters.mapAttribute, {
|
|
312
|
+
model: model.getUuid(),
|
|
313
|
+
metadata,
|
|
314
|
+
inviter: inviter.toPublicEntry(),
|
|
315
|
+
pending: !this.parameters.autoAccept
|
|
316
|
+
});
|
|
317
|
+
// Notify user
|
|
318
|
+
await this.sendNotification(user, {
|
|
319
|
+
model,
|
|
320
|
+
metadata,
|
|
321
|
+
notification,
|
|
322
|
+
inviter: inviter.toPublicEntry(),
|
|
323
|
+
pending: !this.parameters.autoAccept,
|
|
324
|
+
registered: true
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
async sendNotification(user, replacements) {
|
|
328
|
+
if (!this.parameters.notification) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
await this.notificationService.sendNotification(user, this.parameters.notification, replacements);
|
|
332
|
+
}
|
|
368
333
|
/**
|
|
369
334
|
* Return which attribute would be used to store the invitation on ident invitation object
|
|
370
335
|
* @param uuid
|
|
@@ -379,66 +344,63 @@ class InvitationService extends service_1.Service {
|
|
|
379
344
|
* @param evt
|
|
380
345
|
* @returns
|
|
381
346
|
*/
|
|
382
|
-
registrationListener(evt) {
|
|
383
|
-
var _a;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
continue;
|
|
418
|
-
}
|
|
419
|
-
// Set the metadata
|
|
420
|
-
info.model[this.parameters.attribute][evt.user.getUuid()] = info.metadata;
|
|
421
|
-
// Remove pending
|
|
422
|
-
delete info.model[this.parameters.pendingAttribute][`ident_${evt.identId}`];
|
|
423
|
-
promises.push(this.updateModel(info.model));
|
|
347
|
+
async registrationListener(evt) {
|
|
348
|
+
var _a, _b;
|
|
349
|
+
let uuid = `${evt.identId}_${this.getName()}`;
|
|
350
|
+
const invitations = await this.invitationStore.get(uuid);
|
|
351
|
+
if (!invitations) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
this.log("DEBUG", `Resolving invitation for ident ${evt.identId}`);
|
|
355
|
+
// Load all models invited too
|
|
356
|
+
const infos = await Promise.all(Object.keys(invitations)
|
|
357
|
+
.filter(k => k.startsWith("invit_"))
|
|
358
|
+
.map(async (k) => ({
|
|
359
|
+
...invitations[k],
|
|
360
|
+
model: await this.modelStore.get(k.substring(6))
|
|
361
|
+
})));
|
|
362
|
+
// autoAccept is on so move to __acls
|
|
363
|
+
const promises = [];
|
|
364
|
+
// If autoAccept is false, just copy the pending invitation in the user
|
|
365
|
+
(_a = evt.user)[_b = this.parameters.mapAttribute] ?? (_a[_b] = []);
|
|
366
|
+
evt.user[this.parameters.mapAttribute].push(...infos
|
|
367
|
+
.filter(m => m.model !== undefined)
|
|
368
|
+
.map(m => {
|
|
369
|
+
const metadata = {};
|
|
370
|
+
this.parameters.mapFields.forEach(f => (metadata[f] = m.model[f]));
|
|
371
|
+
return {
|
|
372
|
+
model: m.model.getUuid(),
|
|
373
|
+
metadata,
|
|
374
|
+
inviter: m.inviter,
|
|
375
|
+
pending: !this.parameters.autoAccept
|
|
376
|
+
};
|
|
377
|
+
}));
|
|
378
|
+
if (this.parameters.autoAccept) {
|
|
379
|
+
for (const info of infos) {
|
|
380
|
+
if (!info.model) {
|
|
381
|
+
continue;
|
|
424
382
|
}
|
|
383
|
+
// Set the metadata
|
|
384
|
+
info.model[this.parameters.attribute][evt.user.getUuid()] = info.metadata;
|
|
385
|
+
// Remove pending
|
|
386
|
+
delete info.model[this.parameters.pendingAttribute][`ident_${evt.identId}`];
|
|
387
|
+
promises.push(this.updateModel(info.model));
|
|
425
388
|
}
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
389
|
+
}
|
|
390
|
+
promises.push(invitations.delete());
|
|
391
|
+
await Promise.all(promises);
|
|
429
392
|
}
|
|
430
393
|
}
|
|
431
394
|
__decorate([
|
|
432
|
-
|
|
395
|
+
Inject("params:authenticationService")
|
|
433
396
|
], InvitationService.prototype, "authenticationService", void 0);
|
|
434
397
|
__decorate([
|
|
435
|
-
|
|
398
|
+
Inject("params:notificationService", true)
|
|
436
399
|
], InvitationService.prototype, "notificationService", void 0);
|
|
437
400
|
__decorate([
|
|
438
|
-
|
|
401
|
+
Inject("params:invitationStore")
|
|
439
402
|
], InvitationService.prototype, "invitationStore", void 0);
|
|
440
403
|
__decorate([
|
|
441
|
-
|
|
404
|
+
Inject("params:modelStore")
|
|
442
405
|
], InvitationService.prototype, "modelStore", void 0);
|
|
443
|
-
exports.default = InvitationService;
|
|
444
406
|
//# sourceMappingURL=invitationservice.js.map
|