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