@hed-hog/contact 0.0.22 → 0.0.25
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/hedhog/data/document_type.yaml +6 -1
- package/package.json +2 -2
- package/dist/custom-type/custom-type.controller.d.ts +0 -22
- package/dist/custom-type/custom-type.controller.d.ts.map +0 -1
- package/dist/custom-type/custom-type.controller.js +0 -90
- package/dist/custom-type/custom-type.controller.js.map +0 -1
- package/dist/custom-type/custom-type.module.d.ts +0 -3
- package/dist/custom-type/custom-type.module.d.ts.map +0 -1
- package/dist/custom-type/custom-type.module.js +0 -31
- package/dist/custom-type/custom-type.module.js.map +0 -1
- package/dist/custom-type/custom-type.service.d.ts +0 -30
- package/dist/custom-type/custom-type.service.d.ts.map +0 -1
- package/dist/custom-type/custom-type.service.js +0 -59
- package/dist/custom-type/custom-type.service.js.map +0 -1
- package/dist/custom-type/dto/create.dto.d.ts +0 -5
- package/dist/custom-type/dto/create.dto.d.ts.map +0 -1
- package/dist/custom-type/dto/create.dto.js +0 -22
- package/dist/custom-type/dto/create.dto.js.map +0 -1
- package/dist/custom-type/dto/update.dto.d.ts +0 -6
- package/dist/custom-type/dto/update.dto.d.ts.map +0 -1
- package/dist/custom-type/dto/update.dto.js +0 -9
- package/dist/custom-type/dto/update.dto.js.map +0 -1
- package/dist/person/metadata/dto/create.dto.d.ts +0 -5
- package/dist/person/metadata/dto/create.dto.d.ts.map +0 -1
- package/dist/person/metadata/dto/create.dto.js +0 -21
- package/dist/person/metadata/dto/create.dto.js.map +0 -1
- package/dist/person/metadata/dto/update.dto.d.ts +0 -6
- package/dist/person/metadata/dto/update.dto.d.ts.map +0 -1
- package/dist/person/metadata/dto/update.dto.js +0 -9
- package/dist/person/metadata/dto/update.dto.js.map +0 -1
- package/dist/person/metadata/metadata.controller.d.ts +0 -22
- package/dist/person/metadata/metadata.controller.d.ts.map +0 -1
- package/dist/person/metadata/metadata.controller.js +0 -90
- package/dist/person/metadata/metadata.controller.js.map +0 -1
- package/dist/person/metadata/metadata.service.d.ts +0 -24
- package/dist/person/metadata/metadata.service.d.ts.map +0 -1
- package/dist/person/metadata/metadata.service.js +0 -71
- package/dist/person/metadata/metadata.service.js.map +0 -1
- package/dist/type/dto/create.dto.d.ts +0 -5
- package/dist/type/dto/create.dto.d.ts.map +0 -1
- package/dist/type/dto/create.dto.js +0 -22
- package/dist/type/dto/create.dto.js.map +0 -1
- package/dist/type/dto/update.dto.d.ts +0 -6
- package/dist/type/dto/update.dto.d.ts.map +0 -1
- package/dist/type/dto/update.dto.js +0 -9
- package/dist/type/dto/update.dto.js.map +0 -1
- package/dist/type/type.controller.d.ts +0 -22
- package/dist/type/type.controller.d.ts.map +0 -1
- package/dist/type/type.controller.js +0 -90
- package/dist/type/type.controller.js.map +0 -1
- package/dist/type/type.enum.d.ts +0 -6
- package/dist/type/type.enum.d.ts.map +0 -1
- package/dist/type/type.enum.js +0 -10
- package/dist/type/type.enum.js.map +0 -1
- package/dist/type/type.module.d.ts +0 -3
- package/dist/type/type.module.d.ts.map +0 -1
- package/dist/type/type.module.js +0 -31
- package/dist/type/type.module.js.map +0 -1
- package/dist/type/type.service.d.ts +0 -31
- package/dist/type/type.service.d.ts.map +0 -1
- package/dist/type/type.service.js +0 -63
- package/dist/type/type.service.js.map +0 -1
- package/hedhog/query/person_sync_user_trigger.sql +0 -25
|
@@ -3,23 +3,28 @@
|
|
|
3
3
|
pt: RG
|
|
4
4
|
code: RG
|
|
5
5
|
country_code: BRA
|
|
6
|
+
is_unique: false
|
|
6
7
|
- name:
|
|
7
8
|
en: SSN
|
|
8
9
|
pt: CPF
|
|
9
10
|
code: CPF
|
|
10
11
|
country_code: BRA
|
|
12
|
+
is_unique: true
|
|
11
13
|
- name:
|
|
12
14
|
en: EIN
|
|
13
15
|
pt: CNPJ
|
|
14
16
|
code: CNPJ
|
|
15
17
|
country_code: BRA
|
|
18
|
+
is_unique: false
|
|
16
19
|
- name:
|
|
17
20
|
en: Passport
|
|
18
21
|
pt: Passaporte
|
|
19
22
|
code: PASSPORT
|
|
20
23
|
country_code: BRA
|
|
24
|
+
is_unique: true
|
|
21
25
|
- name:
|
|
22
26
|
en: Driver License
|
|
23
27
|
pt: CNH
|
|
24
28
|
code: CNH
|
|
25
|
-
country_code: BRA
|
|
29
|
+
country_code: BRA
|
|
30
|
+
is_unique: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/contact",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@nestjs/core": "^11",
|
|
10
10
|
"@nestjs/jwt": "^11",
|
|
11
11
|
"@nestjs/mapped-types": "*",
|
|
12
|
-
"@hed-hog/api": "0.0.3",
|
|
13
12
|
"@hed-hog/country": "0.0.9",
|
|
13
|
+
"@hed-hog/api": "0.0.3",
|
|
14
14
|
"@hed-hog/api-locale": "0.0.10",
|
|
15
15
|
"@hed-hog/api-pagination": "0.0.3",
|
|
16
16
|
"@hed-hog/admin": "0.0.129",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { PersonCustomTypeService } from './custom-type.service';
|
|
3
|
-
import { CreateDTO } from './dto/create.dto';
|
|
4
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
5
|
-
export declare class PersonCustomTypeController {
|
|
6
|
-
private readonly personCustomTypeService;
|
|
7
|
-
constructor(personCustomTypeService: PersonCustomTypeService);
|
|
8
|
-
list(locale: any, paginationParams: any): Promise<{
|
|
9
|
-
total: any;
|
|
10
|
-
lastPage: number;
|
|
11
|
-
page: number;
|
|
12
|
-
pageSize: number;
|
|
13
|
-
prev: number;
|
|
14
|
-
next: number;
|
|
15
|
-
data: any;
|
|
16
|
-
}>;
|
|
17
|
-
get(id: number): Promise<any>;
|
|
18
|
-
create(data: CreateDTO): Promise<any>;
|
|
19
|
-
update(id: number, data: UpdateDTO): Promise<any>;
|
|
20
|
-
delete(data: DeleteDTO): Promise<any>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=custom-type.controller.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-type.controller.d.ts","sourceRoot":"","sources":["../../src/custom-type/custom-type.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAAvB,uBAAuB,EAAE,uBAAuB;IAI7D,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM;IAKzC,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.PersonCustomTypeController = void 0;
|
|
16
|
-
const api_1 = require("@hed-hog/api");
|
|
17
|
-
const api_locale_1 = require("@hed-hog/api-locale");
|
|
18
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
19
|
-
const common_1 = require("@nestjs/common");
|
|
20
|
-
const custom_type_service_1 = require("./custom-type.service");
|
|
21
|
-
const create_dto_1 = require("./dto/create.dto");
|
|
22
|
-
const update_dto_1 = require("./dto/update.dto");
|
|
23
|
-
let PersonCustomTypeController = class PersonCustomTypeController {
|
|
24
|
-
constructor(personCustomTypeService) {
|
|
25
|
-
this.personCustomTypeService = personCustomTypeService;
|
|
26
|
-
}
|
|
27
|
-
async list(locale, paginationParams) {
|
|
28
|
-
return this.personCustomTypeService.list(locale, paginationParams);
|
|
29
|
-
}
|
|
30
|
-
async get(id) {
|
|
31
|
-
return this.personCustomTypeService.get(id);
|
|
32
|
-
}
|
|
33
|
-
async create(data) {
|
|
34
|
-
return this.personCustomTypeService.create(data);
|
|
35
|
-
}
|
|
36
|
-
async update(id, data) {
|
|
37
|
-
return this.personCustomTypeService.update({
|
|
38
|
-
id,
|
|
39
|
-
data
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
async delete(data) {
|
|
43
|
-
return this.personCustomTypeService.delete(data);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.PersonCustomTypeController = PersonCustomTypeController;
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, common_1.Get)(),
|
|
49
|
-
__param(0, (0, api_locale_1.Locale)()),
|
|
50
|
-
__param(1, (0, api_pagination_1.Pagination)()),
|
|
51
|
-
__metadata("design:type", Function),
|
|
52
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
53
|
-
__metadata("design:returntype", Promise)
|
|
54
|
-
], PersonCustomTypeController.prototype, "list", null);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, common_1.Get)(':id'),
|
|
57
|
-
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
58
|
-
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [Number]),
|
|
60
|
-
__metadata("design:returntype", Promise)
|
|
61
|
-
], PersonCustomTypeController.prototype, "get", null);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, common_1.Post)(),
|
|
64
|
-
__param(0, (0, common_1.Body)()),
|
|
65
|
-
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
|
67
|
-
__metadata("design:returntype", Promise)
|
|
68
|
-
], PersonCustomTypeController.prototype, "create", null);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, common_1.Patch)(':id'),
|
|
71
|
-
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
72
|
-
__param(1, (0, common_1.Body)()),
|
|
73
|
-
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
|
75
|
-
__metadata("design:returntype", Promise)
|
|
76
|
-
], PersonCustomTypeController.prototype, "update", null);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, common_1.Delete)(),
|
|
79
|
-
__param(0, (0, common_1.Body)()),
|
|
80
|
-
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [api_1.DeleteDTO]),
|
|
82
|
-
__metadata("design:returntype", Promise)
|
|
83
|
-
], PersonCustomTypeController.prototype, "delete", null);
|
|
84
|
-
exports.PersonCustomTypeController = PersonCustomTypeController = __decorate([
|
|
85
|
-
(0, api_1.Role)(),
|
|
86
|
-
(0, common_1.Controller)('person-custom-type'),
|
|
87
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => custom_type_service_1.PersonCustomTypeService))),
|
|
88
|
-
__metadata("design:paramtypes", [custom_type_service_1.PersonCustomTypeService])
|
|
89
|
-
], PersonCustomTypeController);
|
|
90
|
-
//# sourceMappingURL=custom-type.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-type.controller.js","sourceRoot":"","sources":["../../src/custom-type/custom-type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,+DAAgE;AAChE,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACrC,YAEmB,uBAAgD;QAAhD,4BAAuB,GAAvB,uBAAuB,CAAyB;IAChE,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAW,MAAM,EAAgB,gBAAgB;QACzD,OAAO,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACrE,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU;QAC7C,OAAO,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAA4B,EAAU,EAAU,IAAe;QACzE,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC;YACzC,EAAE;YACF,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;CACF,CAAA;AAjCY,gEAA0B;AAO/B;IADL,IAAA,YAAG,GAAE;IACM,WAAA,IAAA,mBAAM,GAAE,CAAA;IAAU,WAAA,IAAA,2BAAU,GAAE,CAAA;;;;sDAEzC;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;qDAEnC;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;wDAEnC;AAGK;IADL,IAAA,cAAK,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;wDAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,eAAS;;wDAEnC;qCAhCU,0BAA0B;IAFtC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,oBAAoB,CAAC;IAG5B,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAuB,CAAC,CAAC,CAAA;qCACR,6CAAuB;GAHxD,0BAA0B,CAiCtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-type.module.d.ts","sourceRoot":"","sources":["../../src/custom-type/custom-type.module.ts"],"names":[],"mappings":"AAOA,qBAUa,sBAAsB;CAAG"}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PersonCustomTypeModule = void 0;
|
|
10
|
-
const admin_1 = require("@hed-hog/admin");
|
|
11
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
12
|
-
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const custom_type_controller_1 = require("./custom-type.controller");
|
|
15
|
-
const custom_type_service_1 = require("./custom-type.service");
|
|
16
|
-
let PersonCustomTypeModule = class PersonCustomTypeModule {
|
|
17
|
-
};
|
|
18
|
-
exports.PersonCustomTypeModule = PersonCustomTypeModule;
|
|
19
|
-
exports.PersonCustomTypeModule = PersonCustomTypeModule = __decorate([
|
|
20
|
-
(0, common_1.Module)({
|
|
21
|
-
imports: [
|
|
22
|
-
(0, common_1.forwardRef)(() => admin_1.AdminModule),
|
|
23
|
-
(0, common_1.forwardRef)(() => api_prisma_1.PrismaModule),
|
|
24
|
-
(0, common_1.forwardRef)(() => api_pagination_1.PaginationModule)
|
|
25
|
-
],
|
|
26
|
-
controllers: [custom_type_controller_1.PersonCustomTypeController],
|
|
27
|
-
providers: [custom_type_service_1.PersonCustomTypeService],
|
|
28
|
-
exports: [custom_type_service_1.PersonCustomTypeService]
|
|
29
|
-
})
|
|
30
|
-
], PersonCustomTypeModule);
|
|
31
|
-
//# sourceMappingURL=custom-type.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-type.module.js","sourceRoot":"","sources":["../../src/custom-type/custom-type.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA6C;AAC7C,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,qEAAsE;AACtE,+DAAgE;AAYzD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAAG,CAAA;AAAzB,wDAAsB;iCAAtB,sBAAsB;IAVlC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iCAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,mDAA0B,CAAC;QACzC,SAAS,EAAE,CAAC,6CAAuB,CAAC;QACpC,OAAO,EAAE,CAAC,6CAAuB,CAAC;KACnC,CAAC;GACW,sBAAsB,CAAG"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { LocaleService } from '@hed-hog/api-locale';
|
|
3
|
-
import { PaginationDTO } from '@hed-hog/api-pagination';
|
|
4
|
-
import { PrismaService } from '@hed-hog/api-prisma';
|
|
5
|
-
import { CreateDTO } from './dto/create.dto';
|
|
6
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
7
|
-
export declare class PersonCustomTypeService {
|
|
8
|
-
private readonly prismaService;
|
|
9
|
-
private readonly localeService;
|
|
10
|
-
private readonly modelName;
|
|
11
|
-
private readonly foreignKey;
|
|
12
|
-
constructor(prismaService: PrismaService, localeService: LocaleService);
|
|
13
|
-
list(locale: string, paginationParams: PaginationDTO): Promise<{
|
|
14
|
-
total: any;
|
|
15
|
-
lastPage: number;
|
|
16
|
-
page: number;
|
|
17
|
-
pageSize: number;
|
|
18
|
-
prev: number;
|
|
19
|
-
next: number;
|
|
20
|
-
data: any;
|
|
21
|
-
}>;
|
|
22
|
-
get(id: number): Promise<any>;
|
|
23
|
-
create(data: CreateDTO): Promise<any>;
|
|
24
|
-
update({ id, data }: {
|
|
25
|
-
id: number;
|
|
26
|
-
data: UpdateDTO;
|
|
27
|
-
}): Promise<any>;
|
|
28
|
-
delete({ ids }: DeleteDTO): Promise<any>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=custom-type.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-type.service.d.ts","sourceRoot":"","sources":["../../src/custom-type/custom-type.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,uBAAuB;IAMhC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAIrB,aAAa,EAAE,aAAa,EAE5B,aAAa,EAAE,aAAa;IAGzC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAQpD,GAAG,CAAC,EAAE,EAAE,MAAM;IAId,MAAM,CAAC,IAAI,EAAE,SAAS;IAQtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IASpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.PersonCustomTypeService = void 0;
|
|
16
|
-
const api_locale_1 = require("@hed-hog/api-locale");
|
|
17
|
-
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
18
|
-
const common_1 = require("@nestjs/common");
|
|
19
|
-
let PersonCustomTypeService = class PersonCustomTypeService {
|
|
20
|
-
constructor(prismaService, localeService) {
|
|
21
|
-
this.prismaService = prismaService;
|
|
22
|
-
this.localeService = localeService;
|
|
23
|
-
this.modelName = 'person_custom_type';
|
|
24
|
-
this.foreignKey = 'type_id';
|
|
25
|
-
}
|
|
26
|
-
async list(locale, paginationParams) {
|
|
27
|
-
return this.localeService.listModelWithLocale(locale, this.modelName, paginationParams);
|
|
28
|
-
}
|
|
29
|
-
async get(id) {
|
|
30
|
-
return this.localeService.getModelWithLocale(this.modelName, id);
|
|
31
|
-
}
|
|
32
|
-
async create(data) {
|
|
33
|
-
return this.localeService.createModelWithLocale(this.modelName, this.foreignKey, data);
|
|
34
|
-
}
|
|
35
|
-
async update({ id, data }) {
|
|
36
|
-
return this.localeService.updateModelWithLocale(this.modelName, this.foreignKey, id, data);
|
|
37
|
-
}
|
|
38
|
-
async delete({ ids }) {
|
|
39
|
-
if (ids == undefined || ids == null) {
|
|
40
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
41
|
-
}
|
|
42
|
-
return this.prismaService.person_custom_type.deleteMany({
|
|
43
|
-
where: {
|
|
44
|
-
id: {
|
|
45
|
-
in: ids
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.PersonCustomTypeService = PersonCustomTypeService;
|
|
52
|
-
exports.PersonCustomTypeService = PersonCustomTypeService = __decorate([
|
|
53
|
-
(0, common_1.Injectable)(),
|
|
54
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_prisma_1.PrismaService))),
|
|
55
|
-
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_locale_1.LocaleService))),
|
|
56
|
-
__metadata("design:paramtypes", [api_prisma_1.PrismaService,
|
|
57
|
-
api_locale_1.LocaleService])
|
|
58
|
-
], PersonCustomTypeService);
|
|
59
|
-
//# sourceMappingURL=custom-type.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-type.service.js","sourceRoot":"","sources":["../../src/custom-type/custom-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAIlC,YAEE,aAA6C,EAE7C,aAA6C;QAF5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,kBAAa,GAAb,aAAa,CAAe;QAP9B,cAAS,GAAG,oBAAoB,CAAC;QACjC,eAAU,GAAG,SAAS,CAAC;IAOrC,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,gBAA+B;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAC3C,MAAM,EACN,IAAI,CAAC,SAAS,EACd,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAe;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC7C,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAmC;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC7C,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,EAAE,EACF,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa;QAC7B,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,8CAA8C,CAC/C,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,UAAU,CAAC;YACtD,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAvDY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;qCADR,0BAAa;QAEb,0BAAa;GARpC,uBAAuB,CAuDnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/custom-type/dto/create.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,qBAAa,SAAU,SAAQ,aAAa;IAE1C,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateDTO = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const api_locale_1 = require("@hed-hog/api-locale");
|
|
15
|
-
class CreateDTO extends api_locale_1.WithLocaleDTO {
|
|
16
|
-
}
|
|
17
|
-
exports.CreateDTO = CreateDTO;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, class_validator_1.IsString)(),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
-
], CreateDTO.prototype, "slug", void 0);
|
|
22
|
-
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/custom-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,oDAAoD;AAEpD,MAAa,SAAU,SAAQ,0BAAa;CAG3C;AAHD,8BAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;uCACE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/custom-type/dto/update.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;CAAG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateDTO = void 0;
|
|
4
|
-
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
5
|
-
const create_dto_1 = require("./create.dto");
|
|
6
|
-
class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
|
|
7
|
-
}
|
|
8
|
-
exports.UpdateDTO = UpdateDTO;
|
|
9
|
-
//# sourceMappingURL=update.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/custom-type/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAAG;AAAxD,8BAAwD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../../src/person/metadata/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAEpB,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,GAAG,CAAC;CACZ"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateDTO = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class CreateDTO {
|
|
15
|
-
}
|
|
16
|
-
exports.CreateDTO = CreateDTO;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsString)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], CreateDTO.prototype, "key", void 0);
|
|
21
|
-
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../../src/person/metadata/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,MAAa,SAAS;CAKrB;AALD,8BAKC;AAHC;IADC,IAAA,0BAAQ,GAAE;;sCACC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/person/metadata/dto/update.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;CAAG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateDTO = void 0;
|
|
4
|
-
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
5
|
-
const create_dto_1 = require("./create.dto");
|
|
6
|
-
class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
|
|
7
|
-
}
|
|
8
|
-
exports.UpdateDTO = UpdateDTO;
|
|
9
|
-
//# sourceMappingURL=update.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../../src/person/metadata/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAAG;AAAxD,8BAAwD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { CreateDTO } from './dto/create.dto';
|
|
3
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
4
|
-
import { PersonMetadataService } from './metadata.service';
|
|
5
|
-
export declare class PersonMetadataController {
|
|
6
|
-
private readonly personMetadataService;
|
|
7
|
-
constructor(personMetadataService: PersonMetadataService);
|
|
8
|
-
create(personId: number, data: CreateDTO): Promise<any>;
|
|
9
|
-
list(personId: number, paginationParams: any): Promise<{
|
|
10
|
-
total: any;
|
|
11
|
-
lastPage: number;
|
|
12
|
-
page: number;
|
|
13
|
-
pageSize: number;
|
|
14
|
-
prev: number;
|
|
15
|
-
next: number;
|
|
16
|
-
data: any;
|
|
17
|
-
}>;
|
|
18
|
-
get(personId: number, id: number): Promise<any>;
|
|
19
|
-
update(personId: number, id: number, data: UpdateDTO): Promise<any>;
|
|
20
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<any>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=metadata.controller.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.controller.d.ts","sourceRoot":"","sources":["../../../src/person/metadata/metadata.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,qBAEa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBAArB,qBAAqB,EAAE,qBAAqB;IAI/D,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IAMzB,IAAI,CAC+B,QAAQ,EAAE,MAAM,EACnC,gBAAgB,KAAA;;;;;;;;;IAMhC,GAAG,CACgC,QAAQ,EAAE,MAAM,EACtB,EAAE,EAAE,MAAM;IAMvC,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACtB,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,SAAS;IAMzB,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,EAAE,GAAG,EAAE,EAAE,SAAS;CAI7B"}
|
|
@@ -1,90 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.PersonMetadataController = void 0;
|
|
16
|
-
const api_1 = require("@hed-hog/api");
|
|
17
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
18
|
-
const common_1 = require("@nestjs/common");
|
|
19
|
-
const create_dto_1 = require("./dto/create.dto");
|
|
20
|
-
const update_dto_1 = require("./dto/update.dto");
|
|
21
|
-
const metadata_service_1 = require("./metadata.service");
|
|
22
|
-
let PersonMetadataController = class PersonMetadataController {
|
|
23
|
-
constructor(personMetadataService) {
|
|
24
|
-
this.personMetadataService = personMetadataService;
|
|
25
|
-
}
|
|
26
|
-
create(personId, data) {
|
|
27
|
-
return this.personMetadataService.create(personId, data);
|
|
28
|
-
}
|
|
29
|
-
list(personId, paginationParams) {
|
|
30
|
-
return this.personMetadataService.list(paginationParams, personId);
|
|
31
|
-
}
|
|
32
|
-
get(personId, id) {
|
|
33
|
-
return this.personMetadataService.get(personId, id);
|
|
34
|
-
}
|
|
35
|
-
update(personId, id, data) {
|
|
36
|
-
return this.personMetadataService.update(personId, id, data);
|
|
37
|
-
}
|
|
38
|
-
delete(personId, { ids }) {
|
|
39
|
-
return this.personMetadataService.delete(personId, { ids });
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.PersonMetadataController = PersonMetadataController;
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, common_1.Post)(),
|
|
45
|
-
__param(0, (0, common_1.Param)('personId', common_1.ParseIntPipe)),
|
|
46
|
-
__param(1, (0, common_1.Body)()),
|
|
47
|
-
__metadata("design:type", Function),
|
|
48
|
-
__metadata("design:paramtypes", [Number, create_dto_1.CreateDTO]),
|
|
49
|
-
__metadata("design:returntype", void 0)
|
|
50
|
-
], PersonMetadataController.prototype, "create", null);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, common_1.Get)(),
|
|
53
|
-
__param(0, (0, common_1.Param)('personId', common_1.ParseIntPipe)),
|
|
54
|
-
__param(1, (0, api_pagination_1.Pagination)()),
|
|
55
|
-
__metadata("design:type", Function),
|
|
56
|
-
__metadata("design:paramtypes", [Number, Object]),
|
|
57
|
-
__metadata("design:returntype", void 0)
|
|
58
|
-
], PersonMetadataController.prototype, "list", null);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, common_1.Get)(':id'),
|
|
61
|
-
__param(0, (0, common_1.Param)('personId', common_1.ParseIntPipe)),
|
|
62
|
-
__param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
63
|
-
__metadata("design:type", Function),
|
|
64
|
-
__metadata("design:paramtypes", [Number, Number]),
|
|
65
|
-
__metadata("design:returntype", void 0)
|
|
66
|
-
], PersonMetadataController.prototype, "get", null);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, common_1.Patch)(':id'),
|
|
69
|
-
__param(0, (0, common_1.Param)('personId', common_1.ParseIntPipe)),
|
|
70
|
-
__param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
71
|
-
__param(2, (0, common_1.Body)()),
|
|
72
|
-
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", [Number, Number, update_dto_1.UpdateDTO]),
|
|
74
|
-
__metadata("design:returntype", void 0)
|
|
75
|
-
], PersonMetadataController.prototype, "update", null);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, common_1.Delete)(),
|
|
78
|
-
__param(0, (0, common_1.Param)('personId', common_1.ParseIntPipe)),
|
|
79
|
-
__param(1, (0, common_1.Body)()),
|
|
80
|
-
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [Number, api_1.DeleteDTO]),
|
|
82
|
-
__metadata("design:returntype", void 0)
|
|
83
|
-
], PersonMetadataController.prototype, "delete", null);
|
|
84
|
-
exports.PersonMetadataController = PersonMetadataController = __decorate([
|
|
85
|
-
(0, api_1.Role)(),
|
|
86
|
-
(0, common_1.Controller)('person/:personId/person-metadata'),
|
|
87
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => metadata_service_1.PersonMetadataService))),
|
|
88
|
-
__metadata("design:paramtypes", [metadata_service_1.PersonMetadataService])
|
|
89
|
-
], PersonMetadataController);
|
|
90
|
-
//# sourceMappingURL=metadata.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.controller.js","sourceRoot":"","sources":["../../../src/person/metadata/metadata.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,4DAAqD;AACrD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,yDAA2D;AAIpD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAEmB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAC5D,CAAC;IAGJ,MAAM,CAC6B,QAAgB,EACzC,IAAe;QAEvB,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAGD,IAAI,CAC+B,QAAgB,EACnC,gBAAgB;QAE9B,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;IAGD,GAAG,CACgC,QAAgB,EACtB,EAAU;QAErC,OAAO,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAGD,MAAM,CAC6B,QAAgB,EACtB,EAAU,EAC7B,IAAe;QAEvB,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;IAGD,MAAM,CAC6B,QAAgB,EACzC,EAAE,GAAG,EAAa;QAE1B,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF,CAAA;AA9CY,4DAAwB;AAOnC;IADC,IAAA,aAAI,GAAE;IAEJ,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;sDAGxB;AAGD;IADC,IAAA,YAAG,GAAE;IAEH,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,2BAAU,GAAE,CAAA;;;;oDAGd;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IAER,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;mDAG3B;AAGD;IADC,IAAA,cAAK,EAAC,KAAK,CAAC;IAEV,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;qDAAO,sBAAS;;sDAGxB;AAGD;IADC,IAAA,eAAM,GAAE;IAEN,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAU,eAAS;;sDAG3B;mCA7CU,wBAAwB;IAFpC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,kCAAkC,CAAC;IAG1C,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wCAAqB,CAAC,CAAC,CAAA;qCACR,wCAAqB;GAHpD,wBAAwB,CA8CpC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
3
|
-
import { PrismaService } from '@hed-hog/api-prisma';
|
|
4
|
-
import { CreateDTO } from './dto/create.dto';
|
|
5
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
6
|
-
export declare class PersonMetadataService {
|
|
7
|
-
private readonly prismaService;
|
|
8
|
-
private readonly paginationService;
|
|
9
|
-
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
|
10
|
-
create(personId: number, data: CreateDTO): Promise<any>;
|
|
11
|
-
get(personId: number, id: number): Promise<any>;
|
|
12
|
-
list(paginationParams: PaginationDTO, personId?: number): Promise<{
|
|
13
|
-
total: any;
|
|
14
|
-
lastPage: number;
|
|
15
|
-
page: number;
|
|
16
|
-
pageSize: number;
|
|
17
|
-
prev: number;
|
|
18
|
-
next: number;
|
|
19
|
-
data: any;
|
|
20
|
-
}>;
|
|
21
|
-
update(personId: number, id: number, data: UpdateDTO): Promise<any>;
|
|
22
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<any>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=metadata.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.service.d.ts","sourceRoot":"","sources":["../../../src/person/metadata/metadata.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBADjB,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB;IAGjD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS;IASxC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAShC,IAAI,CAAC,gBAAgB,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;IAgBvD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS;IAUpD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS;CAgBlD"}
|
|
@@ -1,71 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PersonMetadataService = void 0;
|
|
13
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
14
|
-
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
15
|
-
const common_1 = require("@nestjs/common");
|
|
16
|
-
let PersonMetadataService = class PersonMetadataService {
|
|
17
|
-
constructor(prismaService, paginationService) {
|
|
18
|
-
this.prismaService = prismaService;
|
|
19
|
-
this.paginationService = paginationService;
|
|
20
|
-
}
|
|
21
|
-
async create(personId, data) {
|
|
22
|
-
return this.prismaService.person_metadata.create({
|
|
23
|
-
data: Object.assign({ person_id: personId }, data)
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
async get(personId, id) {
|
|
27
|
-
return this.prismaService.person_metadata.findFirst({
|
|
28
|
-
where: {
|
|
29
|
-
person_id: personId,
|
|
30
|
-
id: id
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
async list(paginationParams, personId) {
|
|
35
|
-
const where = {};
|
|
36
|
-
if (personId !== undefined)
|
|
37
|
-
where.person_id = personId;
|
|
38
|
-
return this.paginationService.paginate(this.prismaService.person_metadata, Object.assign({ fields: 'key,value' }, paginationParams), {
|
|
39
|
-
where
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
async update(personId, id, data) {
|
|
43
|
-
return this.prismaService.person_metadata.updateMany({
|
|
44
|
-
where: {
|
|
45
|
-
person_id: personId,
|
|
46
|
-
id: id
|
|
47
|
-
},
|
|
48
|
-
data
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
async delete(personId, { ids }) {
|
|
52
|
-
if (ids == undefined || ids == null) {
|
|
53
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
54
|
-
}
|
|
55
|
-
return this.prismaService.person_metadata.deleteMany({
|
|
56
|
-
where: {
|
|
57
|
-
person_id: personId,
|
|
58
|
-
id: {
|
|
59
|
-
in: ids
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
exports.PersonMetadataService = PersonMetadataService;
|
|
66
|
-
exports.PersonMetadataService = PersonMetadataService = __decorate([
|
|
67
|
-
(0, common_1.Injectable)(),
|
|
68
|
-
__metadata("design:paramtypes", [api_prisma_1.PrismaService,
|
|
69
|
-
api_pagination_1.PaginationService])
|
|
70
|
-
], PersonMetadataService);
|
|
71
|
-
//# sourceMappingURL=metadata.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.service.js","sourceRoot":"","sources":["../../../src/person/metadata/metadata.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC;YAC/C,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC;YAClD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,eAAe,kBAEhC,MAAM,EAAE,WAAW,IAChB,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa;QAC/C,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,8CAA8C,CAC/C,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAlEY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAGuB,0BAAa;QACT,kCAAiB;GAH5C,qBAAqB,CAkEjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/type/dto/create.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,qBAAa,SAAU,SAAQ,aAAa;IAE1C,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateDTO = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const api_locale_1 = require("@hed-hog/api-locale");
|
|
15
|
-
class CreateDTO extends api_locale_1.WithLocaleDTO {
|
|
16
|
-
}
|
|
17
|
-
exports.CreateDTO = CreateDTO;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, class_validator_1.IsString)(),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
-
], CreateDTO.prototype, "slug", void 0);
|
|
22
|
-
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,oDAAoD;AAEpD,MAAa,SAAU,SAAQ,0BAAa;CAG3C;AAHD,8BAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;uCACE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/type/dto/update.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;CAAG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateDTO = void 0;
|
|
4
|
-
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
5
|
-
const create_dto_1 = require("./create.dto");
|
|
6
|
-
class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
|
|
7
|
-
}
|
|
8
|
-
exports.UpdateDTO = UpdateDTO;
|
|
9
|
-
//# sourceMappingURL=update.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/type/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAAG;AAAxD,8BAAwD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { CreateDTO } from './dto/create.dto';
|
|
3
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
4
|
-
import { PersonTypeService } from './type.service';
|
|
5
|
-
export declare class PersonTypeController {
|
|
6
|
-
private readonly personTypeService;
|
|
7
|
-
constructor(personTypeService: PersonTypeService);
|
|
8
|
-
list(locale: any, paginationParams: any): Promise<{
|
|
9
|
-
total: any;
|
|
10
|
-
lastPage: number;
|
|
11
|
-
page: number;
|
|
12
|
-
pageSize: number;
|
|
13
|
-
prev: number;
|
|
14
|
-
next: number;
|
|
15
|
-
data: any;
|
|
16
|
-
}>;
|
|
17
|
-
get(id: number): Promise<any>;
|
|
18
|
-
create(data: CreateDTO): Promise<any>;
|
|
19
|
-
update(id: number, data: UpdateDTO): Promise<any>;
|
|
20
|
-
delete(data: DeleteDTO): Promise<any>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=type.controller.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.controller.d.ts","sourceRoot":"","sources":["../../src/type/type.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAEa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAIjD,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM;IAKzC,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.PersonTypeController = void 0;
|
|
16
|
-
const api_1 = require("@hed-hog/api");
|
|
17
|
-
const api_locale_1 = require("@hed-hog/api-locale");
|
|
18
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
19
|
-
const common_1 = require("@nestjs/common");
|
|
20
|
-
const create_dto_1 = require("./dto/create.dto");
|
|
21
|
-
const update_dto_1 = require("./dto/update.dto");
|
|
22
|
-
const type_service_1 = require("./type.service");
|
|
23
|
-
let PersonTypeController = class PersonTypeController {
|
|
24
|
-
constructor(personTypeService) {
|
|
25
|
-
this.personTypeService = personTypeService;
|
|
26
|
-
}
|
|
27
|
-
async list(locale, paginationParams) {
|
|
28
|
-
return this.personTypeService.list(locale, paginationParams);
|
|
29
|
-
}
|
|
30
|
-
async get(id) {
|
|
31
|
-
return this.personTypeService.get(id);
|
|
32
|
-
}
|
|
33
|
-
async create(data) {
|
|
34
|
-
return this.personTypeService.create(data);
|
|
35
|
-
}
|
|
36
|
-
async update(id, data) {
|
|
37
|
-
return this.personTypeService.update({
|
|
38
|
-
id,
|
|
39
|
-
data
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
async delete(data) {
|
|
43
|
-
return this.personTypeService.delete(data);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.PersonTypeController = PersonTypeController;
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, common_1.Get)(),
|
|
49
|
-
__param(0, (0, api_locale_1.Locale)()),
|
|
50
|
-
__param(1, (0, api_pagination_1.Pagination)()),
|
|
51
|
-
__metadata("design:type", Function),
|
|
52
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
53
|
-
__metadata("design:returntype", Promise)
|
|
54
|
-
], PersonTypeController.prototype, "list", null);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, common_1.Get)(':id'),
|
|
57
|
-
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
58
|
-
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [Number]),
|
|
60
|
-
__metadata("design:returntype", Promise)
|
|
61
|
-
], PersonTypeController.prototype, "get", null);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, common_1.Post)(),
|
|
64
|
-
__param(0, (0, common_1.Body)()),
|
|
65
|
-
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
|
67
|
-
__metadata("design:returntype", Promise)
|
|
68
|
-
], PersonTypeController.prototype, "create", null);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, common_1.Patch)(':id'),
|
|
71
|
-
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
72
|
-
__param(1, (0, common_1.Body)()),
|
|
73
|
-
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
|
75
|
-
__metadata("design:returntype", Promise)
|
|
76
|
-
], PersonTypeController.prototype, "update", null);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, common_1.Delete)(),
|
|
79
|
-
__param(0, (0, common_1.Body)()),
|
|
80
|
-
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [api_1.DeleteDTO]),
|
|
82
|
-
__metadata("design:returntype", Promise)
|
|
83
|
-
], PersonTypeController.prototype, "delete", null);
|
|
84
|
-
exports.PersonTypeController = PersonTypeController = __decorate([
|
|
85
|
-
(0, api_1.Role)(),
|
|
86
|
-
(0, common_1.Controller)('person-type'),
|
|
87
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => type_service_1.PersonTypeService))),
|
|
88
|
-
__metadata("design:paramtypes", [type_service_1.PersonTypeService])
|
|
89
|
-
], PersonTypeController);
|
|
90
|
-
//# sourceMappingURL=type.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.controller.js","sourceRoot":"","sources":["../../src/type/type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAAmD;AAI5C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAW,MAAM,EAAgB,gBAAgB;QACzD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC/D,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU;QAC7C,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAA4B,EAAU,EAAU,IAAe;QACzE,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YACnC,EAAE;YACF,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CACF,CAAA;AAjCY,oDAAoB;AAOzB;IADL,IAAA,YAAG,GAAE;IACM,WAAA,IAAA,mBAAM,GAAE,CAAA;IAAU,WAAA,IAAA,2BAAU,GAAE,CAAA;;;;gDAEzC;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;+CAEnC;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;kDAEnC;AAGK;IADL,IAAA,cAAK,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;kDAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,eAAS;;kDAEnC;+BAhCU,oBAAoB;IAFhC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,aAAa,CAAC;IAGrB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,gCAAiB,CAAC,CAAC,CAAA;qCACR,gCAAiB;GAH5C,oBAAoB,CAiChC"}
|
package/dist/type/type.enum.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.enum.d.ts","sourceRoot":"","sources":["../../src/type/type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,QAAQ,IAAI;IAEZ,KAAK,IAAI;IAET,aAAa,IAAI;CAClB"}
|
package/dist/type/type.enum.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PersonTypeEnum = void 0;
|
|
4
|
-
var PersonTypeEnum;
|
|
5
|
-
(function (PersonTypeEnum) {
|
|
6
|
-
PersonTypeEnum[PersonTypeEnum["PHYSICAL"] = 1] = "PHYSICAL";
|
|
7
|
-
PersonTypeEnum[PersonTypeEnum["LEGAL"] = 2] = "LEGAL";
|
|
8
|
-
PersonTypeEnum[PersonTypeEnum["INTERNATIONAL"] = 3] = "INTERNATIONAL";
|
|
9
|
-
})(PersonTypeEnum || (exports.PersonTypeEnum = PersonTypeEnum = {}));
|
|
10
|
-
//# sourceMappingURL=type.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.enum.js","sourceRoot":"","sources":["../../src/type/type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,2DAAY,CAAA;IAEZ,qDAAS,CAAA;IAET,qEAAiB,CAAA;AACnB,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.module.d.ts","sourceRoot":"","sources":["../../src/type/type.module.ts"],"names":[],"mappings":"AAOA,qBAUa,gBAAgB;CAAG"}
|
package/dist/type/type.module.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PersonTypeModule = void 0;
|
|
10
|
-
const admin_1 = require("@hed-hog/admin");
|
|
11
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
12
|
-
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const type_controller_1 = require("./type.controller");
|
|
15
|
-
const type_service_1 = require("./type.service");
|
|
16
|
-
let PersonTypeModule = class PersonTypeModule {
|
|
17
|
-
};
|
|
18
|
-
exports.PersonTypeModule = PersonTypeModule;
|
|
19
|
-
exports.PersonTypeModule = PersonTypeModule = __decorate([
|
|
20
|
-
(0, common_1.Module)({
|
|
21
|
-
imports: [
|
|
22
|
-
(0, common_1.forwardRef)(() => admin_1.AdminModule),
|
|
23
|
-
(0, common_1.forwardRef)(() => api_prisma_1.PrismaModule),
|
|
24
|
-
(0, common_1.forwardRef)(() => api_pagination_1.PaginationModule)
|
|
25
|
-
],
|
|
26
|
-
controllers: [type_controller_1.PersonTypeController],
|
|
27
|
-
providers: [type_service_1.PersonTypeService],
|
|
28
|
-
exports: [type_service_1.PersonTypeService]
|
|
29
|
-
})
|
|
30
|
-
], PersonTypeModule);
|
|
31
|
-
//# sourceMappingURL=type.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.module.js","sourceRoot":"","sources":["../../src/type/type.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA6C;AAC7C,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,uDAAyD;AACzD,iDAAmD;AAY5C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAV5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iCAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,sCAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,gCAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,gCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { LocaleService } from '@hed-hog/api-locale';
|
|
3
|
-
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
4
|
-
import { PrismaService } from '@hed-hog/api-prisma';
|
|
5
|
-
import { CreateDTO } from './dto/create.dto';
|
|
6
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
7
|
-
export declare class PersonTypeService {
|
|
8
|
-
private readonly prismaService;
|
|
9
|
-
private readonly paginationService;
|
|
10
|
-
private readonly localeService;
|
|
11
|
-
private readonly modelName;
|
|
12
|
-
private readonly foreignKey;
|
|
13
|
-
constructor(prismaService: PrismaService, paginationService: PaginationService, localeService: LocaleService);
|
|
14
|
-
list(locale: string, paginationParams: PaginationDTO): Promise<{
|
|
15
|
-
total: any;
|
|
16
|
-
lastPage: number;
|
|
17
|
-
page: number;
|
|
18
|
-
pageSize: number;
|
|
19
|
-
prev: number;
|
|
20
|
-
next: number;
|
|
21
|
-
data: any;
|
|
22
|
-
}>;
|
|
23
|
-
get(id: number): Promise<any>;
|
|
24
|
-
create(data: CreateDTO): Promise<any>;
|
|
25
|
-
update({ id, data }: {
|
|
26
|
-
id: number;
|
|
27
|
-
data: UpdateDTO;
|
|
28
|
-
}): Promise<any>;
|
|
29
|
-
delete({ ids }: DeleteDTO): Promise<any>;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=type.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.service.d.ts","sourceRoot":"","sources":["../../src/type/type.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,iBAAiB;IAM1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAThC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAIrB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB,EAEpC,aAAa,EAAE,aAAa;IAGzC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAQpD,GAAG,CAAC,EAAE,EAAE,MAAM;IAId,MAAM,CAAC,IAAI,EAAE,SAAS;IAQtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IASpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.PersonTypeService = void 0;
|
|
16
|
-
const api_locale_1 = require("@hed-hog/api-locale");
|
|
17
|
-
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
18
|
-
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
19
|
-
const common_1 = require("@nestjs/common");
|
|
20
|
-
let PersonTypeService = class PersonTypeService {
|
|
21
|
-
constructor(prismaService, paginationService, localeService) {
|
|
22
|
-
this.prismaService = prismaService;
|
|
23
|
-
this.paginationService = paginationService;
|
|
24
|
-
this.localeService = localeService;
|
|
25
|
-
this.modelName = 'person_type';
|
|
26
|
-
this.foreignKey = 'type_id';
|
|
27
|
-
}
|
|
28
|
-
async list(locale, paginationParams) {
|
|
29
|
-
return this.localeService.listModelWithLocale(locale, this.modelName, paginationParams);
|
|
30
|
-
}
|
|
31
|
-
async get(id) {
|
|
32
|
-
return this.localeService.getModelWithLocale(this.modelName, id);
|
|
33
|
-
}
|
|
34
|
-
async create(data) {
|
|
35
|
-
return this.localeService.createModelWithLocale(this.modelName, this.foreignKey, data);
|
|
36
|
-
}
|
|
37
|
-
async update({ id, data }) {
|
|
38
|
-
return this.localeService.updateModelWithLocale(this.modelName, this.foreignKey, id, data);
|
|
39
|
-
}
|
|
40
|
-
async delete({ ids }) {
|
|
41
|
-
if (ids == undefined || ids == null) {
|
|
42
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
43
|
-
}
|
|
44
|
-
return this.prismaService.person_type.deleteMany({
|
|
45
|
-
where: {
|
|
46
|
-
id: {
|
|
47
|
-
in: ids
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
exports.PersonTypeService = PersonTypeService;
|
|
54
|
-
exports.PersonTypeService = PersonTypeService = __decorate([
|
|
55
|
-
(0, common_1.Injectable)(),
|
|
56
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_prisma_1.PrismaService))),
|
|
57
|
-
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_pagination_1.PaginationService))),
|
|
58
|
-
__param(2, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_locale_1.LocaleService))),
|
|
59
|
-
__metadata("design:paramtypes", [api_prisma_1.PrismaService,
|
|
60
|
-
api_pagination_1.PaginationService,
|
|
61
|
-
api_locale_1.LocaleService])
|
|
62
|
-
], PersonTypeService);
|
|
63
|
-
//# sourceMappingURL=type.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.service.js","sourceRoot":"","sources":["../../src/type/type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAI5B,YAEE,aAA6C,EAE7C,iBAAqD,EAErD,aAA6C;QAJ5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,kBAAa,GAAb,aAAa,CAAe;QAT9B,cAAS,GAAG,aAAa,CAAC;QAC1B,eAAU,GAAG,SAAS,CAAC;IASrC,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,gBAA+B;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAC3C,MAAM,EACN,IAAI,CAAC,SAAS,EACd,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAe;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC7C,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAmC;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC7C,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,EAAE,EACF,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa;QAC7B,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,8CAA8C,CAC/C,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC;YAC/C,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAzDY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAiB,CAAC,CAAC,CAAA;IAE3C,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;qCAHR,0BAAa;QAET,kCAAiB;QAErB,0BAAa;GAVpC,iBAAiB,CAyD7B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
-- Criação da função trigger
|
|
2
|
-
CREATE OR REPLACE FUNCTION sync_person_to_user()
|
|
3
|
-
RETURNS TRIGGER AS $$
|
|
4
|
-
BEGIN
|
|
5
|
-
-- Executa apenas se for INSERT ou se name/photo_id mudaram
|
|
6
|
-
IF (TG_OP = 'INSERT') OR
|
|
7
|
-
(OLD.name IS DISTINCT FROM NEW.name) OR
|
|
8
|
-
(OLD.photo_id IS DISTINCT FROM NEW.photo_id) THEN
|
|
9
|
-
UPDATE "user"
|
|
10
|
-
SET name = NEW.name,
|
|
11
|
-
photo_id = NEW.photo_id
|
|
12
|
-
WHERE id = NEW.id;
|
|
13
|
-
END IF;
|
|
14
|
-
|
|
15
|
-
RETURN NEW;
|
|
16
|
-
END;
|
|
17
|
-
$$ LANGUAGE plpgsql;
|
|
18
|
-
|
|
19
|
-
-- Criação da trigger na tabela person
|
|
20
|
-
DROP TRIGGER IF EXISTS person_sync_user_trigger ON person;
|
|
21
|
-
|
|
22
|
-
CREATE TRIGGER person_sync_user_trigger
|
|
23
|
-
AFTER INSERT OR UPDATE OF name, photo_id ON person
|
|
24
|
-
FOR EACH ROW
|
|
25
|
-
EXECUTE FUNCTION sync_person_to_user();
|