@messenger-box/property-ext-server 10.0.3-alpha.17 → 10.0.3-alpha.170
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/config/env-config.js.map +1 -1
- package/lib/containers/container.js.map +1 -1
- package/lib/migrations/bot-user-migration.d.ts +3 -3
- package/lib/migrations/bot-user-migration.js +15 -24
- package/lib/migrations/bot-user-migration.js.map +1 -1
- package/lib/migrations/property-ext-messages-migration.d.ts +6 -4
- package/lib/migrations/property-ext-messages-migration.js +131 -165
- package/lib/migrations/property-ext-messages-migration.js.map +1 -1
- package/lib/mock/migration/add-channel-migration.d.ts +3 -4
- package/lib/module.d.ts +1 -1
- package/lib/module.js.map +1 -1
- package/package.json +7 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":"mCACA;AAEA,MAAM,GAAG,GAAI,OAAe,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":"mCACA;AAEA,MAAM,GAAG,GAAI,OAAe,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG;AAE5C,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE;UAChC,EAAQ;IACR,OAAA,EAAA,CAAA,cAAwB,MAAC,EAAA,SAAA,EAAA,aAAA,CAAA;AACrB,IAAA,OAAA,EAAA;;qBAEJ,EAAA,GAAsB,CAAA;AAClB,IAAA,OAAA,EAAA;;8BAEsB;AAC7B,IAAE,OAAA,EAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sources":["../../src/containers/container.ts"],"sourcesContent":[null],"names":[],"mappings":"uMAAA;AAIO,MAAM,uBAAuB,GAA6C,MAC7E,IAAI,eAAe,CAAC,IAAC,
|
|
1
|
+
{"version":3,"file":"container.js","sources":["../../src/containers/container.ts"],"sourcesContent":[null],"names":[],"mappings":"uMAAA;AAIO,MAAM,uBAAuB,GAA6C,MAC7E,IAAI,eAAe,CAAC,IAAC,IAAuB;AACxC,EAAA,IAAA,CAAA,kBAAK,CAAA,CAAkB,EAAE,iBAAG,CAAA,CAAgB,gCAAkB,CAAA,IAAiB,CAAA;AAC/E,EAAA,IAAA,CAAA,kBAAK,CAAA,CAAkB,EAAE,6BAAG,CAAA,CAA4B,4CAAkB,CAAA,IAA6B,CAAA;AAC3G,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ServiceBroker } from 'moleculer';
|
|
2
1
|
import { IDatabaseMigration } from '@adminide-stack/core';
|
|
3
2
|
import { CdmLogger } from '@cdm-logger/core';
|
|
3
|
+
import { IAccountService } from 'common/server';
|
|
4
4
|
export declare class BotUserMigration implements IDatabaseMigration {
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly accountService;
|
|
6
6
|
private logger;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(accountService: IAccountService, logger: CdmLogger.ILogger);
|
|
8
8
|
protected name: string;
|
|
9
9
|
id: string;
|
|
10
10
|
up(): Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import
|
|
1
|
+
import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import'@cdm-logger/core';import {SERVER_TYPES}from'common/server';var BotUserMigration_1;
|
|
2
2
|
let BotUserMigration = BotUserMigration_1 = class BotUserMigration {
|
|
3
|
-
|
|
3
|
+
accountService;
|
|
4
4
|
logger;
|
|
5
|
-
constructor(
|
|
6
|
-
this.
|
|
5
|
+
constructor(accountService, logger) {
|
|
6
|
+
this.accountService = accountService;
|
|
7
7
|
this.logger = logger;
|
|
8
8
|
this.logger = logger.child({
|
|
9
9
|
className: BotUserMigration_1.name
|
|
@@ -14,35 +14,26 @@ let BotUserMigration = BotUserMigration_1 = class BotUserMigration {
|
|
|
14
14
|
async up() {
|
|
15
15
|
await this.down();
|
|
16
16
|
this.logger.debug(`(up) Starting up migration...`);
|
|
17
|
-
const user = await this.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
notificationEmail: ''
|
|
24
|
-
}
|
|
17
|
+
const user = await this.accountService.createAccount({
|
|
18
|
+
username: 'resortifi',
|
|
19
|
+
email: 'resortifi-bot@resortifi.com',
|
|
20
|
+
alias: ['resortifi'],
|
|
21
|
+
emailVerified: true,
|
|
22
|
+
notificationEmail: ''
|
|
25
23
|
});
|
|
26
24
|
this.logger.debug(`(up) done`, user);
|
|
27
25
|
}
|
|
28
26
|
async down() {
|
|
29
|
-
if (config.isDev) {
|
|
30
|
-
await this.broker.waitForServices('AccountUser');
|
|
31
|
-
}
|
|
32
27
|
this.logger.debug(`(down) Starting down migration...`);
|
|
33
|
-
const user = await this.
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
if (!user) {
|
|
28
|
+
const user = await this.accountService.findAccountByEmail('resortifi-bot@resortifi.com');
|
|
29
|
+
if (!user || user instanceof Error) {
|
|
37
30
|
return;
|
|
38
31
|
}
|
|
39
32
|
this.logger.debug(`(down) User Found, dropping...`, user);
|
|
40
|
-
await this.
|
|
41
|
-
|
|
42
|
-
id: user.id
|
|
43
|
-
}
|
|
33
|
+
await this.accountService.deleteAccount({
|
|
34
|
+
id: user.id
|
|
44
35
|
});
|
|
45
36
|
this.logger.debug(`(down) User drop done!`);
|
|
46
37
|
}
|
|
47
38
|
};
|
|
48
|
-
BotUserMigration = BotUserMigration_1 = __decorate([injectable(), __param(0, inject(
|
|
39
|
+
BotUserMigration = BotUserMigration_1 = __decorate([injectable(), __param(0, inject(SERVER_TYPES.IAccountService)), __param(1, inject('Logger')), __metadata("design:paramtypes", [Object, Object])], BotUserMigration);export{BotUserMigration};//# sourceMappingURL=bot-user-migration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot-user-migration.js","sources":["../../src/migrations/bot-user-migration.ts"],"sourcesContent":[null],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"bot-user-migration.js","sources":["../../src/migrations/bot-user-migration.ts"],"sourcesContent":[null],"names":[],"mappings":";AAMO,IAAM,gBAAgB,GAAA,kBAAA,GAAtB,MAAM,gBAAgB,CAAA;AAGJ,EAAA,cAAA;AAET,EAAA,MAAA;aAJZ,CAAA,cAEqB,EAA+B,MAExC,EAAyB;QAFhB,CAAA,cAAA,GAAA;QAET,CAAA,MAAA,GAAA;AAER,IAAA,IAAA,CAAA,MAAK,GAAA,MAAS,CAAA,KAAO,CAAA;MACxB,SAAA,EAAA,kBAAA,CAAA;KAES,CAAA;;AAIV,EAAA,IAAA,GAAK,kBAAG;AACJ,EAAA,EAAA,GAAA,CAAA,EAAA,IAAM,CAAA,WAAY,CAAA,IAAA,CAAA,SAAA,CAAA;AAClB,EAAA,MAAA,EAAA,GAAK;UACL,IAAM,CAAA,MAAO;AACT,IAAA,IAAA,CAAA,MAAA,CAAA,MAAU,CAAA,6BAAW,CAAA,CAAA;AACrB,IAAA,MAAA,IAAA,GAAK,MAAE,IAAA,CAAA,cAAA,CAAA,aAA6B,CAAA;cACpC,EAAA,WAAQ;AACR,MAAA,KAAA,EAAA,6BAAmB;AACnB,MAAA,KAAA,EAAA,CAAA,WAAA,CAAA;AACI,MAAA,aAAE,EAAA,IAAA;uBACE,EAAK;KACpB,CAAA;AAED,IAAA,IAAA,CAAK,MAAK,CAAA,KAAA,CAAA,CAAA,SAAA,CAAA,EAAA,IAAA,CAAA;AACN,EAAA;QACA,IAAA,GAAM;AACN,IAAA,IAAA,CAAA,MAAK,CAAA,KAAQ,mCAAwB,CAAA,CAAA;cACjC,GAAA,MAAO,IAAA,CAAA,cAAA,CAAA,kBAAA,CAAA,6BAAA,CAAA;QACX,CAAC,IAAA,IAAA,IAAA,YAAA,KAAA,EAAA;;AAED,IAAA;eACM,CAAE,KAAK,CAAA,CAAE,8BAAA,CAAA,EAAA,IAAA,CAAA;AACP,IAAA,MAAC,IAAC,CAAA,cAAA,CAAA,aAAA,CAAA;AACV,MAAA,EAAA,EAAA,IAAK,CAAA;KACR,CAAA;IACJ,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA,sBAAA,CAAA,CAAA;AAvCY,EAAA;AADZ;AAGQ,qCAAoB,GAAA,UAAe,CAAC,CAAA,UAAA,EAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,eAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,gBAAA,CAAA"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { IDatabaseMigration } from '@adminide-stack/core';
|
|
2
|
-
import {
|
|
2
|
+
import { IAccountService, IChannelService, IPostService, IPostThreadService } from 'common/server';
|
|
3
3
|
import { CdmLogger } from '@cdm-logger/core';
|
|
4
4
|
export declare class PropertyExtMessagesMigration implements IDatabaseMigration {
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly accountService;
|
|
6
|
+
private readonly channelService;
|
|
7
|
+
private readonly postService;
|
|
8
|
+
private readonly postThreadService;
|
|
6
9
|
private logger;
|
|
7
|
-
constructor(
|
|
10
|
+
constructor(accountService: IAccountService, channelService: IChannelService, postService: IPostService, postThreadService: IPostThreadService, logger: CdmLogger.ILogger);
|
|
8
11
|
protected name: string;
|
|
9
12
|
id: string;
|
|
10
13
|
private createUsers;
|
|
@@ -13,7 +16,6 @@ export declare class PropertyExtMessagesMigration implements IDatabaseMigration
|
|
|
13
16
|
private createSimpleMessage;
|
|
14
17
|
private createAlertMessage;
|
|
15
18
|
private createCardMessage;
|
|
16
|
-
private waitForServices;
|
|
17
19
|
up(): Promise<void>;
|
|
18
20
|
down(): Promise<void>;
|
|
19
21
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {
|
|
1
|
+
import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {SERVER_TYPES,RoomType,PostTypeEnum}from'common/server';import'@cdm-logger/core';import {config}from'../config/env-config.js';var PropertyExtMessagesMigration_1;
|
|
2
2
|
let PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = class PropertyExtMessagesMigration {
|
|
3
|
-
|
|
3
|
+
accountService;
|
|
4
|
+
channelService;
|
|
5
|
+
postService;
|
|
6
|
+
postThreadService;
|
|
4
7
|
logger;
|
|
5
|
-
constructor(
|
|
6
|
-
this.
|
|
8
|
+
constructor(accountService, channelService, postService, postThreadService, logger) {
|
|
9
|
+
this.accountService = accountService;
|
|
10
|
+
this.channelService = channelService;
|
|
11
|
+
this.postService = postService;
|
|
12
|
+
this.postThreadService = postThreadService;
|
|
7
13
|
this.logger = logger;
|
|
8
14
|
this.logger = logger.child({
|
|
9
15
|
className: PropertyExtMessagesMigration_1.name
|
|
@@ -12,105 +18,93 @@ let PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = class Proper
|
|
|
12
18
|
name = this.constructor.name;
|
|
13
19
|
id = `${this.name}_20231006`;
|
|
14
20
|
async createUsers() {
|
|
15
|
-
const userOne = this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
notificationEmail: ''
|
|
26
|
-
}
|
|
21
|
+
const userOne = this.accountService.createAccount({
|
|
22
|
+
username: 'propertyAutomatedUser',
|
|
23
|
+
email: 'property-automated-user@resortifi.com',
|
|
24
|
+
alias: ['auth0|62df21f9e8116e9fce8207cf'],
|
|
25
|
+
// This need to match with auth0 id. Otherwise manually updatein the DB
|
|
26
|
+
familyName: 'property-fixure',
|
|
27
|
+
givenName: 'user1',
|
|
28
|
+
picture: 'https://lh3.googleusercontent.com/a/AATXAJxMARAgr96npkZGf4R2uGbahBP4tLh5SRbS9bVq=s96-c',
|
|
29
|
+
emailVerified: true,
|
|
30
|
+
notificationEmail: ''
|
|
27
31
|
});
|
|
28
|
-
const userTwo = this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
notificationEmail: ''
|
|
39
|
-
}
|
|
32
|
+
const userTwo = this.accountService.createAccount({
|
|
33
|
+
username: 'propertyAutomatedUser2',
|
|
34
|
+
email: 'property-automated-user2@resortifi.com',
|
|
35
|
+
alias: ['auth0|62df22109b1f5f6077c1f57e'],
|
|
36
|
+
// This need to match with auth0 id. Otherwise manually updatein the DB
|
|
37
|
+
familyName: 'property-fixure',
|
|
38
|
+
givenName: 'user2',
|
|
39
|
+
picture: 'https://lh3.googleusercontent.com/a/AATXAJxMARAgr96npkZGf4R2uGbahBP4tLh5SRbS9bVq=s96-c',
|
|
40
|
+
emailVerified: true,
|
|
41
|
+
notificationEmail: ''
|
|
40
42
|
});
|
|
41
43
|
return Promise.all([userOne, userTwo]);
|
|
42
44
|
}
|
|
43
|
-
createServiceChannel(owner) {
|
|
44
|
-
return this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}]
|
|
58
|
-
}
|
|
45
|
+
async createServiceChannel(owner) {
|
|
46
|
+
return this.channelService.create({
|
|
47
|
+
topic: 'CustomerSupportServiceChat',
|
|
48
|
+
title: `${config.APP_NAME} SUPPORT`,
|
|
49
|
+
description: `${config.APP_NAME} SUPPORT SERVICE`,
|
|
50
|
+
creator: owner.id,
|
|
51
|
+
displayName: `followup-support-${owner.id}`,
|
|
52
|
+
type: RoomType.Service,
|
|
53
|
+
members: [{
|
|
54
|
+
id: undefined,
|
|
55
|
+
schemeAdmin: false,
|
|
56
|
+
roles: 'OWNER',
|
|
57
|
+
user: owner.id
|
|
58
|
+
}]
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
createChannel(owner, guest) {
|
|
62
|
-
return this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}]
|
|
80
|
-
}
|
|
61
|
+
async createChannel(owner, guest) {
|
|
62
|
+
return this.channelService.create({
|
|
63
|
+
topic: 'Fixtures',
|
|
64
|
+
title: `${owner.alias}:${guest.alias}`,
|
|
65
|
+
creator: guest.id,
|
|
66
|
+
displayName: `${owner.id}:${guest.id}`,
|
|
67
|
+
type: RoomType.Direct,
|
|
68
|
+
members: [{
|
|
69
|
+
id: undefined,
|
|
70
|
+
schemeAdmin: false,
|
|
71
|
+
roles: 'OWNER',
|
|
72
|
+
user: owner.id
|
|
73
|
+
}, {
|
|
74
|
+
id: undefined,
|
|
75
|
+
schemeAdmin: true,
|
|
76
|
+
roles: 'GUEST',
|
|
77
|
+
user: guest.id
|
|
78
|
+
}]
|
|
81
79
|
});
|
|
82
80
|
}
|
|
83
81
|
async createSimpleMessage(channelId, editedBy) {
|
|
84
|
-
return this.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
files: []
|
|
91
|
-
}
|
|
82
|
+
return this.postService.create({
|
|
83
|
+
editedBy: editedBy,
|
|
84
|
+
channel: channelId,
|
|
85
|
+
message: 'Hello from the migrations',
|
|
86
|
+
type: PostTypeEnum.Simple,
|
|
87
|
+
files: []
|
|
92
88
|
});
|
|
93
89
|
}
|
|
94
90
|
async createAlertMessage(channelId, editedBy) {
|
|
95
91
|
const message = 'This is a dummy alert!';
|
|
96
|
-
return this.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
link: `/some-route/some-id`
|
|
113
|
-
}
|
|
92
|
+
return this.postService.create({
|
|
93
|
+
editedBy: editedBy,
|
|
94
|
+
channel: channelId,
|
|
95
|
+
message,
|
|
96
|
+
type: PostTypeEnum.Alert,
|
|
97
|
+
files: [],
|
|
98
|
+
props: {
|
|
99
|
+
ref: 'Dummy',
|
|
100
|
+
refId: 'some-ref',
|
|
101
|
+
attachment: {
|
|
102
|
+
title: message,
|
|
103
|
+
isTitleHtml: false,
|
|
104
|
+
icon: 'InfoIcon',
|
|
105
|
+
callToAction: {
|
|
106
|
+
title: 'View',
|
|
107
|
+
link: `/some-route/some-id`
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
110
|
}
|
|
@@ -118,49 +112,40 @@ let PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = class Proper
|
|
|
118
112
|
}
|
|
119
113
|
async createCardMessage(channelId, editedBy) {
|
|
120
114
|
const message = 'Inquiry for fixture property';
|
|
121
|
-
return this.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
totalReview: 450
|
|
149
|
-
}
|
|
115
|
+
return this.postService.create({
|
|
116
|
+
editedBy: editedBy,
|
|
117
|
+
channel: channelId,
|
|
118
|
+
message,
|
|
119
|
+
type: PostTypeEnum.Card,
|
|
120
|
+
files: [],
|
|
121
|
+
props: {
|
|
122
|
+
ref: 'Property',
|
|
123
|
+
refId: 'some-property-id',
|
|
124
|
+
attachment: {
|
|
125
|
+
image: 'https://placehold.co/300',
|
|
126
|
+
title: message,
|
|
127
|
+
isTitleHtml: false,
|
|
128
|
+
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis interdum leo augue, non posuere sapien ullamcorper ac. Aliquam vitae ornare libero, ac vulputate elit. Aenean interdum, mi a viverra maximus, leo nibh maximus augue, vel ultrices leo ante et ex. Maecenas vel mi auctor, egestas tellus nec, placerat odio. Curabitur eget tortor sed ligula pharetra varius. Aliquam sit amet lacus ligula. Etiam vitae magna eros.',
|
|
129
|
+
isDescriptionHtml: false,
|
|
130
|
+
callToAction: {
|
|
131
|
+
title: 'View',
|
|
132
|
+
// Should come from frontend
|
|
133
|
+
link: `/property/some-id`
|
|
134
|
+
},
|
|
135
|
+
property: {
|
|
136
|
+
price: 10,
|
|
137
|
+
priceType: 'Hourly',
|
|
138
|
+
type: 'Hotel',
|
|
139
|
+
totalStar: 5,
|
|
140
|
+
maxPeople: 500,
|
|
141
|
+
totalReview: 450
|
|
150
142
|
}
|
|
151
143
|
}
|
|
152
144
|
}
|
|
153
145
|
});
|
|
154
146
|
}
|
|
155
|
-
async waitForServices() {
|
|
156
|
-
if (config.isDev) {
|
|
157
|
-
await Promise.all([this.broker.waitForServices(`${MoleculerTopics.ChannelService}`), this.broker.waitForServices('AccountUser'), this.broker.waitForServices(`${MoleculerTopics.PostService}`), this.broker.waitForServices(`${MoleculerTopics.PostThreadService}`)]);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
147
|
async up() {
|
|
161
148
|
await this.down();
|
|
162
|
-
await this.waitForServices();
|
|
163
|
-
// await this.down();
|
|
164
149
|
this.logger.debug(`(up) Starting up migration...`);
|
|
165
150
|
const users = await this.createUsers();
|
|
166
151
|
if (!users) {
|
|
@@ -182,15 +167,10 @@ let PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = class Proper
|
|
|
182
167
|
}
|
|
183
168
|
async down() {
|
|
184
169
|
this.logger.debug(`(down) Starting down migration...`);
|
|
185
|
-
await this.waitForServices();
|
|
186
170
|
try {
|
|
187
|
-
const users = await this.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
email: {
|
|
191
|
-
$in: ['property-automated-user@resortifi.com', 'property-automated-user2@resortifi.com']
|
|
192
|
-
}
|
|
193
|
-
}
|
|
171
|
+
const users = await this.accountService.getUsers({
|
|
172
|
+
email: {
|
|
173
|
+
$in: ['property-automated-user@resortifi.com', 'property-automated-user2@resortifi.com']
|
|
194
174
|
}
|
|
195
175
|
});
|
|
196
176
|
if (!users.length) {
|
|
@@ -198,81 +178,67 @@ let PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = class Proper
|
|
|
198
178
|
return;
|
|
199
179
|
}
|
|
200
180
|
const [userOne, userTwo] = users;
|
|
201
|
-
const
|
|
181
|
+
const channels = await this.channelService.getAll({
|
|
202
182
|
criteria: {
|
|
203
183
|
displayName: `${userTwo.id}:${userOne.id}`
|
|
204
184
|
}
|
|
205
185
|
});
|
|
186
|
+
const [channel] = channels;
|
|
206
187
|
if (!channel?.id) {
|
|
207
188
|
this.logger.debug(`(down) No Channel found, skipping channel delete!`);
|
|
208
189
|
} else {
|
|
209
|
-
const posts = await this.
|
|
190
|
+
const posts = await this.postService.getAll({
|
|
210
191
|
criteria: {
|
|
211
192
|
channel: channel.id
|
|
212
193
|
}
|
|
213
194
|
});
|
|
214
195
|
await Promise.all(posts.map(({
|
|
215
196
|
id
|
|
216
|
-
}) => this.
|
|
217
|
-
|
|
218
|
-
})));
|
|
219
|
-
await this.broker.call(`${MoleculerTopics.ChannelService}.${BaseServiceCommands.Delete}`, {
|
|
220
|
-
id: channel.id
|
|
221
|
-
});
|
|
197
|
+
}) => this.postService.delete(id)));
|
|
198
|
+
await this.channelService.delete(channel.id);
|
|
222
199
|
}
|
|
223
200
|
/////////////////////////....Service Channel....//////////////////////////////////
|
|
224
|
-
const serviceUsers = await this.
|
|
225
|
-
|
|
226
|
-
criteria: {
|
|
227
|
-
email: 'property-automated-user2@resortifi.com'
|
|
228
|
-
}
|
|
229
|
-
}
|
|
201
|
+
const serviceUsers = await this.accountService.getUsers({
|
|
202
|
+
email: 'property-automated-user2@resortifi.com'
|
|
230
203
|
});
|
|
231
204
|
if (!serviceUsers.length) {
|
|
232
205
|
this.logger.debug(`(down) No service Users found, skipping migrations!`);
|
|
233
206
|
return;
|
|
234
207
|
}
|
|
235
208
|
const [serviceUser] = serviceUsers;
|
|
236
|
-
const
|
|
209
|
+
const serviceChannels = await this.channelService.getAll({
|
|
237
210
|
criteria: {
|
|
238
211
|
displayName: `followup-support-${serviceUser?.id}`
|
|
239
212
|
}
|
|
240
213
|
});
|
|
214
|
+
const [servicehannel] = serviceChannels;
|
|
241
215
|
this.logger.debug(`servicehannel = ${JSON.stringify(servicehannel)}`);
|
|
242
216
|
if (!servicehannel?.id) {
|
|
243
217
|
this.logger.debug(`(down) No Service Channel found, skipping service channel delete!`);
|
|
244
218
|
} else {
|
|
245
|
-
const posts = await this.
|
|
219
|
+
const posts = await this.postService.getAll({
|
|
246
220
|
criteria: {
|
|
247
221
|
channel: servicehannel.id
|
|
248
222
|
}
|
|
249
223
|
});
|
|
250
224
|
await Promise.all(posts.map(({
|
|
251
225
|
id
|
|
252
|
-
}) => this.
|
|
253
|
-
|
|
254
|
-
})));
|
|
255
|
-
const postsThreads = await this.broker.call(`${MoleculerTopics.PostThreadService}.getAll`, {
|
|
226
|
+
}) => this.postService.delete(id)));
|
|
227
|
+
const postsThreads = await this.postThreadService.getAll({
|
|
256
228
|
criteria: {
|
|
257
229
|
channel: servicehannel.id
|
|
258
230
|
}
|
|
259
231
|
});
|
|
260
232
|
await Promise.all(postsThreads.map(({
|
|
261
233
|
id
|
|
262
|
-
}) => this.
|
|
263
|
-
|
|
264
|
-
})));
|
|
265
|
-
await this.broker.call(`${MoleculerTopics.ChannelService}.${BaseServiceCommands.Delete}`, {
|
|
266
|
-
id: servicehannel.id
|
|
267
|
-
});
|
|
234
|
+
}) => this.postThreadService.delete(id)));
|
|
235
|
+
await this.channelService.delete(servicehannel.id);
|
|
268
236
|
}
|
|
269
237
|
/////////////////////////....Service Channel.... end//////////////////////////////////
|
|
270
238
|
await Promise.all(users.map(({
|
|
271
239
|
id
|
|
272
|
-
}) => this.
|
|
273
|
-
|
|
274
|
-
id
|
|
275
|
-
}
|
|
240
|
+
}) => this.accountService.deleteAccount({
|
|
241
|
+
id
|
|
276
242
|
})));
|
|
277
243
|
this.logger.debug(`(down) Successful`);
|
|
278
244
|
} catch (e) {
|
|
@@ -280,4 +246,4 @@ let PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = class Proper
|
|
|
280
246
|
}
|
|
281
247
|
}
|
|
282
248
|
};
|
|
283
|
-
PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = __decorate([injectable(), __param(0, inject(
|
|
249
|
+
PropertyExtMessagesMigration = PropertyExtMessagesMigration_1 = __decorate([injectable(), __param(0, inject(SERVER_TYPES.IAccountService)), __param(1, inject(SERVER_TYPES.ChannelService)), __param(2, inject(SERVER_TYPES.PostService)), __param(3, inject(SERVER_TYPES.PostThreadService)), __param(4, inject('Logger')), __metadata("design:paramtypes", [Object, Object, Object, Object, Object])], PropertyExtMessagesMigration);export{PropertyExtMessagesMigration};//# sourceMappingURL=property-ext-messages-migration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-ext-messages-migration.js","sources":["../../src/migrations/property-ext-messages-migration.ts"],"sourcesContent":[null],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"property-ext-messages-migration.js","sources":["../../src/migrations/property-ext-messages-migration.ts"],"sourc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AACZ,UAAA;AACJ,SAAA,KAAA,IAAC,CAAC,iBAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAA,CAAA;kBACH,CAAA,cAAiB,CAAC,MAAA,CAAA,aAAoB,CAAA,EAAE,CAAE;;;YAG9C,OAAA,CAAA,GAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA;;AAEA,OAAA,KAAA,IAAI,CAAC,cAAa,CAAA,aAAA,CAAA;QACtB;QAAE,CAAA,CAAA;AACE,MAAA,IAAA,CAAA,MAAK,CAAA,KAAM,CAAC,CAAA,iBAAkB,CAAC,CAAA;aAClC,CAAA,EAAA;MACJ,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA,CAAA,OAAA,EAAA,CAAA,CAAA,KAAA,CAAA;IACJ;AAnQY,EAAA;AADZ;AAGQ,4BAAO,GAAA,8BAA6B,GAAA,UAAA,CAAA,CAAA,UAAA,EAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,eAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,cAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,WAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,iBAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,4BAAA,CAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CdmLogger } from '@cdm-logger/core';
|
|
2
|
-
import { IChannelRepository, IPostRepository } from 'common/server';
|
|
3
|
-
import { ServiceBroker } from 'moleculer';
|
|
2
|
+
import { IAccountService, IChannelRepository, IPostRepository } from 'common/server';
|
|
4
3
|
export declare class AddPropertyMigration {
|
|
5
4
|
private readonly channelRepository;
|
|
6
5
|
private readonly postRepository;
|
|
7
|
-
private readonly
|
|
6
|
+
private readonly accountService;
|
|
8
7
|
private readonly logger;
|
|
9
8
|
private VERSION;
|
|
10
|
-
constructor(channelRepository: IChannelRepository, postRepository: IPostRepository,
|
|
9
|
+
constructor(channelRepository: IChannelRepository, postRepository: IPostRepository, accountService: IAccountService, logger: CdmLogger.ILogger);
|
|
11
10
|
get id(): string;
|
|
12
11
|
flattenIds(data: Record<string, unknown>): Record<string, unknown>;
|
|
13
12
|
readFiles<T>(listener?: (data: T[]) => Promise<unknown>): Promise<number>;
|
package/lib/module.d.ts
CHANGED
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":[null],"names":[],"mappings":"+JAIA,aAAe,IAAI,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":[null],"names":[],"mappings":"+JAIA,aAAe,IAAI,OAAO,CAAC;QACvB;qBACA,EAAmB,CAAA,uBAAG;AACzB,CAAA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/property-ext-server",
|
|
3
|
-
"version": "10.0.3-alpha.
|
|
3
|
+
"version": "10.0.3-alpha.170",
|
|
4
4
|
"description": "Extension to Messenger to support property",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -38,23 +38,22 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@messenger-box/core": "10.0.3-alpha.
|
|
42
|
-
"@messenger-box/platform-server": "10.0.3-alpha.
|
|
41
|
+
"@messenger-box/core": "10.0.3-alpha.165",
|
|
42
|
+
"@messenger-box/platform-server": "10.0.3-alpha.170",
|
|
43
43
|
"@messenger-box/property-ext-core": "9.0.4-alpha.22"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@adminide-stack/account-api-server": "*",
|
|
47
47
|
"@adminide-stack/core": "*",
|
|
48
|
+
"@adminide-stack/file-info-core": "*",
|
|
48
49
|
"@adminide-stack/platform-server": "*",
|
|
49
50
|
"@cdm-logger/core": "*",
|
|
50
51
|
"@cdm-logger/server": "*",
|
|
51
52
|
"@common-stack/core": "*",
|
|
52
53
|
"@common-stack/server-core": "*",
|
|
53
54
|
"@common-stack/store-mongo": "*",
|
|
54
|
-
"@
|
|
55
|
-
"@messenger-box/
|
|
56
|
-
"@messenger-box/notification-api-core": "10.0.3-alpha.6",
|
|
57
|
-
"@messenger-box/platform-server": "10.0.3-alpha.16",
|
|
55
|
+
"@messenger-box/core": "10.0.3-alpha.165",
|
|
56
|
+
"@messenger-box/platform-server": "10.0.3-alpha.165",
|
|
58
57
|
"@vscode-alt/monaco-editor": "*",
|
|
59
58
|
"bunyan": "*",
|
|
60
59
|
"graphql": "*",
|
|
@@ -72,5 +71,5 @@
|
|
|
72
71
|
"typescript": {
|
|
73
72
|
"definition": "lib/index.d.ts"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "8fb47eeebf15a8058b948d0db147125bb5562a9b"
|
|
76
75
|
}
|