@smartsoft001/crud-shell-app-services 2.153.0 → 2.155.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/crud-shell-app-services",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.155.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@nestjs/common": "^11.1.5",
|
|
33
|
-
"@smartsoft001/crud-domain": "2.
|
|
34
|
-
"@smartsoft001/crud-shell-dtos": "2.
|
|
35
|
-
"@smartsoft001/domain-core": "2.
|
|
36
|
-
"@smartsoft001/models": "2.
|
|
37
|
-
"@smartsoft001/nestjs": "2.
|
|
38
|
-
"@smartsoft001/users": "2.
|
|
39
|
-
"@smartsoft001/utils": "2.
|
|
33
|
+
"@smartsoft001/crud-domain": "2.155.0",
|
|
34
|
+
"@smartsoft001/crud-shell-dtos": "2.155.0",
|
|
35
|
+
"@smartsoft001/domain-core": "2.155.0",
|
|
36
|
+
"@smartsoft001/models": "2.155.0",
|
|
37
|
+
"@smartsoft001/nestjs": "2.155.0",
|
|
38
|
+
"@smartsoft001/users": "2.155.0",
|
|
39
|
+
"@smartsoft001/utils": "2.155.0",
|
|
40
40
|
"rxjs": "^7.8.1"
|
|
41
41
|
},
|
|
42
42
|
"types": "./src/index.d.ts"
|
|
@@ -2,18 +2,20 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { ICreateManyOptions } from '@smartsoft001/crud-domain';
|
|
3
3
|
import { ItemChangedData } from '@smartsoft001/crud-shell-dtos';
|
|
4
4
|
import { IAttachmentRepository, IEntity, IItemRepository, ISpecification } from '@smartsoft001/domain-core';
|
|
5
|
-
import { PermissionService } from '@smartsoft001/nestjs';
|
|
5
|
+
import { PermissionService, SharedConfig } from '@smartsoft001/nestjs';
|
|
6
6
|
import { IUser } from '@smartsoft001/users';
|
|
7
7
|
import { Readable, Stream } from 'stream';
|
|
8
8
|
export declare class CrudService<T extends IEntity<string>> {
|
|
9
9
|
protected readonly permissionService: PermissionService;
|
|
10
10
|
protected readonly repository: IItemRepository<T>;
|
|
11
11
|
protected readonly attachmentRepository: IAttachmentRepository<T>;
|
|
12
|
+
protected readonly config?: SharedConfig;
|
|
12
13
|
private _logger;
|
|
13
|
-
constructor(permissionService: PermissionService, repository: IItemRepository<T>, attachmentRepository: IAttachmentRepository<T
|
|
14
|
+
constructor(permissionService: PermissionService, repository: IItemRepository<T>, attachmentRepository: IAttachmentRepository<T>, config?: SharedConfig);
|
|
14
15
|
create(data: T, user: IUser): Promise<string>;
|
|
15
16
|
createMany(data: T[], user: IUser, options: ICreateManyOptions): Promise<T[]>;
|
|
16
|
-
|
|
17
|
+
/** Resolves to `null` when no item has that id; the caller decides what that means (the controller answers 404). */
|
|
18
|
+
readById(id: string, user: IUser): Promise<T | null>;
|
|
17
19
|
read(criteria: any, options: any, user: IUser): Promise<{
|
|
18
20
|
data: T[];
|
|
19
21
|
totalCount: number;
|
|
@@ -32,22 +34,31 @@ export declare class CrudService<T extends IEntity<string>> {
|
|
|
32
34
|
mimeType: string;
|
|
33
35
|
encoding: string;
|
|
34
36
|
}, options?: {
|
|
35
|
-
streamCallback?: (
|
|
37
|
+
streamCallback?: (stream: unknown) => void;
|
|
36
38
|
start?: number;
|
|
37
39
|
}): Promise<string>;
|
|
38
40
|
getAttachmentInfo(id: string): Promise<{
|
|
39
41
|
fileName: string;
|
|
40
42
|
contentType: string;
|
|
41
43
|
length: number;
|
|
42
|
-
}>;
|
|
44
|
+
} | null>;
|
|
43
45
|
getAttachmentStream(id: string, options?: {
|
|
44
46
|
start: number;
|
|
45
|
-
end
|
|
47
|
+
end?: number;
|
|
46
48
|
}): Promise<Readable>;
|
|
47
49
|
deleteAttachment(id: string): Promise<void>;
|
|
48
50
|
changes(criteria: {
|
|
49
51
|
id?: string;
|
|
50
52
|
}): Observable<ItemChangedData>;
|
|
53
|
+
private hashCredentials;
|
|
54
|
+
private stripPassword;
|
|
55
|
+
/**
|
|
56
|
+
* Turns a plain request body into an instance of the configured model type so
|
|
57
|
+
* that the model metadata used by castModel and getInvalidFields is available.
|
|
58
|
+
* The instance keeps only the keys the payload carried, because a new instance
|
|
59
|
+
* declares every field as an own key.
|
|
60
|
+
*/
|
|
61
|
+
protected toModel<D extends Partial<T>>(data: D): D;
|
|
51
62
|
private checkValidCreate;
|
|
52
63
|
private checkValidUpdate;
|
|
53
64
|
private checkValidUpdatePartial;
|
|
@@ -15,26 +15,27 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
15
15
|
permissionService;
|
|
16
16
|
repository;
|
|
17
17
|
attachmentRepository;
|
|
18
|
+
config;
|
|
18
19
|
_logger = new common_1.Logger(CrudService_1.name, { timestamp: true });
|
|
19
|
-
constructor(permissionService, repository, attachmentRepository) {
|
|
20
|
+
constructor(permissionService, repository, attachmentRepository, config) {
|
|
20
21
|
this.permissionService = permissionService;
|
|
21
22
|
this.repository = repository;
|
|
22
23
|
this.attachmentRepository = attachmentRepository;
|
|
24
|
+
this.config = config;
|
|
25
|
+
if (!config?.type) {
|
|
26
|
+
this._logger.warn('No model type is configured (SharedConfig.type), request bodies are stored without model validation');
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
29
|
async create(data, user) {
|
|
25
30
|
data.id = guid_typescript_1.Guid.raw();
|
|
26
31
|
try {
|
|
27
32
|
this.permissionService.valid('create', user);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
delete data['passwordConfirm'];
|
|
35
|
-
}
|
|
36
|
-
await this.repository.create(data, user);
|
|
37
|
-
return data.id;
|
|
33
|
+
const item = this.toModel(data);
|
|
34
|
+
(0, models_1.castModel)(item, 'create', user.permissions);
|
|
35
|
+
this.checkValidCreate(item, user.permissions);
|
|
36
|
+
await this.hashCredentials(item);
|
|
37
|
+
await this.repository.create(item, user);
|
|
38
|
+
return item.id;
|
|
38
39
|
}
|
|
39
40
|
catch (e) {
|
|
40
41
|
this._logger.error(e);
|
|
@@ -47,6 +48,9 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
47
48
|
});
|
|
48
49
|
try {
|
|
49
50
|
this.permissionService.valid('create', user);
|
|
51
|
+
data.forEach((item, index) => {
|
|
52
|
+
data[index] = this.toModel(item);
|
|
53
|
+
});
|
|
50
54
|
data.forEach((item) => {
|
|
51
55
|
(0, models_1.castModel)(item, 'create', user.permissions);
|
|
52
56
|
this.checkValidCreate(item, user.permissions);
|
|
@@ -55,13 +59,7 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
55
59
|
await this.repository.clear(user);
|
|
56
60
|
}
|
|
57
61
|
for (let index = 0; index < data.length; index++) {
|
|
58
|
-
|
|
59
|
-
if (item['password']) {
|
|
60
|
-
item['password'] = await utils_1.PasswordService.hash(item['password']);
|
|
61
|
-
}
|
|
62
|
-
if (item['passwordConfirm']) {
|
|
63
|
-
delete item['passwordConfirm'];
|
|
64
|
-
}
|
|
62
|
+
await this.hashCredentials(data[index]);
|
|
65
63
|
}
|
|
66
64
|
await this.repository.createMany(data, user);
|
|
67
65
|
}
|
|
@@ -71,11 +69,14 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
71
69
|
}
|
|
72
70
|
return data;
|
|
73
71
|
}
|
|
72
|
+
/** Resolves to `null` when no item has that id; the caller decides what that means (the controller answers 404). */
|
|
74
73
|
async readById(id, user) {
|
|
75
74
|
try {
|
|
76
75
|
this.permissionService.valid('read', user);
|
|
77
76
|
const result = await this.repository.getById(id);
|
|
78
|
-
|
|
77
|
+
if (!result)
|
|
78
|
+
return null;
|
|
79
|
+
this.stripPassword(result);
|
|
79
80
|
return result;
|
|
80
81
|
}
|
|
81
82
|
catch (e) {
|
|
@@ -87,7 +88,7 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
87
88
|
try {
|
|
88
89
|
this.permissionService.valid('read', user);
|
|
89
90
|
const result = await this.repository.getByCriteria(criteria, options);
|
|
90
|
-
result.data.forEach((item) =>
|
|
91
|
+
result.data.forEach((item) => this.stripPassword(item));
|
|
91
92
|
return result;
|
|
92
93
|
}
|
|
93
94
|
catch (e) {
|
|
@@ -102,15 +103,11 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
102
103
|
try {
|
|
103
104
|
data.id = id;
|
|
104
105
|
this.permissionService.valid('update', user);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (data['passwordConfirm']) {
|
|
111
|
-
delete data['passwordConfirm'];
|
|
112
|
-
}
|
|
113
|
-
await this.repository.update(data, user);
|
|
106
|
+
const item = this.toModel(data);
|
|
107
|
+
(0, models_1.castModel)(item, 'update', user.permissions);
|
|
108
|
+
this.checkValidUpdate(item, user.permissions);
|
|
109
|
+
await this.hashCredentials(item);
|
|
110
|
+
await this.repository.update(item, user);
|
|
114
111
|
}
|
|
115
112
|
catch (e) {
|
|
116
113
|
this._logger.error(e);
|
|
@@ -119,17 +116,14 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
119
116
|
}
|
|
120
117
|
async updatePartial(id, data, user) {
|
|
121
118
|
try {
|
|
122
|
-
|
|
119
|
+
// Same object, now known to carry the id, turned into a model instance
|
|
120
|
+
// so the field metadata is there for the validation below.
|
|
121
|
+
const item = this.toModel(Object.assign(data, { id }));
|
|
123
122
|
this.permissionService.valid('update', user);
|
|
124
|
-
(0, models_1.castModel)(
|
|
125
|
-
this.checkValidUpdatePartial(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
if (data['passwordConfirm']) {
|
|
130
|
-
delete data['passwordConfirm'];
|
|
131
|
-
}
|
|
132
|
-
await this.repository.updatePartial(data, user);
|
|
123
|
+
(0, models_1.castModel)(item, 'update', user.permissions);
|
|
124
|
+
this.checkValidUpdatePartial(item, user.permissions);
|
|
125
|
+
await this.hashCredentials(item);
|
|
126
|
+
await this.repository.updatePartial(item, user);
|
|
133
127
|
}
|
|
134
128
|
catch (e) {
|
|
135
129
|
this._logger.error(e);
|
|
@@ -180,6 +174,39 @@ let CrudService = CrudService_1 = class CrudService {
|
|
|
180
174
|
changes(criteria) {
|
|
181
175
|
return this.repository.changesByCriteria(criteria);
|
|
182
176
|
}
|
|
177
|
+
async hashCredentials(item) {
|
|
178
|
+
// Any entity may carry credentials; the decorators, not T, say whether it does.
|
|
179
|
+
const credentials = item;
|
|
180
|
+
if (credentials.password) {
|
|
181
|
+
credentials.password = await utils_1.PasswordService.hash(credentials.password);
|
|
182
|
+
}
|
|
183
|
+
if (credentials.passwordConfirm) {
|
|
184
|
+
delete credentials.passwordConfirm;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
stripPassword(item) {
|
|
188
|
+
const credentials = item;
|
|
189
|
+
delete credentials.password;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Turns a plain request body into an instance of the configured model type so
|
|
193
|
+
* that the model metadata used by castModel and getInvalidFields is available.
|
|
194
|
+
* The instance keeps only the keys the payload carried, because a new instance
|
|
195
|
+
* declares every field as an own key.
|
|
196
|
+
*/
|
|
197
|
+
toModel(data) {
|
|
198
|
+
const type = this.config?.type;
|
|
199
|
+
if (!type || !data || data instanceof type)
|
|
200
|
+
return data;
|
|
201
|
+
const keys = Object.keys(data);
|
|
202
|
+
const model = Object.assign(new type(), data);
|
|
203
|
+
Object.keys(model)
|
|
204
|
+
.filter((key) => !keys.some((payloadKey) => payloadKey === key))
|
|
205
|
+
.forEach((key) => {
|
|
206
|
+
delete model[key];
|
|
207
|
+
});
|
|
208
|
+
return model;
|
|
209
|
+
}
|
|
183
210
|
checkValidCreate(item, permissions) {
|
|
184
211
|
const array = (0, models_1.getInvalidFields)(item, 'create', permissions);
|
|
185
212
|
if (array.length) {
|
|
@@ -211,8 +238,10 @@ tslib_1.__decorate([
|
|
|
211
238
|
], CrudService.prototype, "getAttachmentInfo", null);
|
|
212
239
|
exports.CrudService = CrudService = CrudService_1 = tslib_1.__decorate([
|
|
213
240
|
(0, common_1.Injectable)(),
|
|
241
|
+
tslib_1.__param(3, (0, common_1.Optional)()),
|
|
214
242
|
tslib_1.__metadata("design:paramtypes", [nestjs_1.PermissionService,
|
|
215
243
|
domain_core_1.IItemRepository,
|
|
216
|
-
domain_core_1.IAttachmentRepository
|
|
244
|
+
domain_core_1.IAttachmentRepository,
|
|
245
|
+
nestjs_1.SharedConfig])
|
|
217
246
|
], CrudService);
|
|
218
247
|
//# sourceMappingURL=crud.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.service.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/app-services/src/lib/services/crud/crud.service.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"crud.service.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/app-services/src/lib/services/crud/crud.service.ts"],"names":[],"mappings":";;;;;AAAA,2CAA8D;AAC9D,wEAAkD;AAClD,qDAAuC;AACvC,yDAA4C;AAK5C,2DAMmC;AACnC,iDAA4E;AAC5E,iDAAuE;AAEvE,+CAAmE;AAY5D,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAID;IACA;IACA;IACY;IANzB,OAAO,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpE,YACqB,iBAAoC,EACpC,UAA8B,EAC9B,oBAA8C,EAClC,MAAqB;QAHjC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,eAAU,GAAV,UAAU,CAAoB;QAC9B,yBAAoB,GAApB,oBAAoB,CAA0B;QAClC,WAAM,GAAN,MAAM,CAAe;QAEpD,IAA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