@hed-hog/contact 0.0.19 → 0.0.22
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/dist/address-type/address-type.service.d.ts.map +1 -1
- package/dist/address-type/address-type.service.js +2 -2
- package/dist/address-type/address-type.service.js.map +1 -1
- package/dist/contact-type/contact-type.service.d.ts.map +1 -1
- package/dist/contact-type/contact-type.service.js +2 -2
- package/dist/contact-type/contact-type.service.js.map +1 -1
- package/dist/contact.module.d.ts.map +1 -1
- package/dist/contact.module.js +2 -6
- package/dist/contact.module.js.map +1 -1
- package/dist/document-type/document-type.service.d.ts.map +1 -1
- package/dist/document-type/document-type.service.js +2 -2
- package/dist/document-type/document-type.service.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/person/person-metadata/dto/create.dto.d.ts +5 -0
- package/dist/person/person-metadata/dto/create.dto.d.ts.map +1 -0
- package/dist/person/person-metadata/dto/create.dto.js +21 -0
- package/dist/person/person-metadata/dto/create.dto.js.map +1 -0
- package/dist/person/person-metadata/dto/update.dto.d.ts +6 -0
- package/dist/person/person-metadata/dto/update.dto.d.ts.map +1 -0
- package/dist/person/person-metadata/dto/update.dto.js +9 -0
- package/dist/person/person-metadata/dto/update.dto.js.map +1 -0
- package/dist/person/person-metadata/person-metadata.controller.d.ts +22 -0
- package/dist/person/person-metadata/person-metadata.controller.d.ts.map +1 -0
- package/dist/person/person-metadata/person-metadata.controller.js +90 -0
- package/dist/person/person-metadata/person-metadata.controller.js.map +1 -0
- package/dist/person/person-metadata/person-metadata.service.d.ts +24 -0
- package/dist/person/person-metadata/person-metadata.service.d.ts.map +1 -0
- package/dist/person/person-metadata/person-metadata.service.js +71 -0
- package/dist/person/person-metadata/person-metadata.service.js.map +1 -0
- package/dist/person/person.module.js +4 -4
- package/dist/person/person.module.js.map +1 -1
- package/hedhog/data/{person_address_type.yaml → address_type.yaml} +7 -7
- package/hedhog/data/{person_contact_type.yaml → contact_type.yaml} +5 -5
- package/hedhog/data/document_type.yaml +25 -0
- package/package.json +3 -3
- package/src/address-type/address-type.service.ts +2 -2
- package/src/contact-type/contact-type.service.ts +2 -2
- package/src/contact.module.ts +2 -6
- package/src/document-type/document-type.service.ts +2 -2
- package/src/index.ts +0 -5
- package/src/person/{metadata/metadata.controller.ts → person-metadata/person-metadata.controller.ts} +1 -1
- package/src/person/person.module.ts +2 -2
- package/hedhog/data/person_document_type.yaml +0 -35
- package/hedhog/data/person_type.yaml +0 -12
- package/src/custom-type/custom-type.controller.ts +0 -55
- package/src/custom-type/custom-type.module.ts +0 -18
- package/src/custom-type/custom-type.service.ts +0 -70
- package/src/custom-type/dto/create.dto.ts +0 -7
- package/src/person/metadata/dto/update.dto.ts +0 -4
- package/src/type/dto/create.dto.ts +0 -7
- package/src/type/dto/update.dto.ts +0 -4
- package/src/type/type.controller.ts +0 -55
- package/src/type/type.enum.ts +0 -7
- package/src/type/type.module.ts +0 -18
- package/src/type/type.service.ts +0 -72
- /package/src/person/{metadata → person-metadata}/dto/create.dto.ts +0 -0
- /package/src/{custom-type → person/person-metadata}/dto/update.dto.ts +0 -0
- /package/src/person/{metadata/metadata.service.ts → person-metadata/person-metadata.service.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-type.service.d.ts","sourceRoot":"","sources":["../../src/address-type/address-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,wBAAwB;IAMjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,QAAQ,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"address-type.service.d.ts","sourceRoot":"","sources":["../../src/address-type/address-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,wBAAwB;IAMjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAC5C,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"}
|
|
@@ -20,7 +20,7 @@ let PersonAddressTypeService = class PersonAddressTypeService {
|
|
|
20
20
|
constructor(prismaService, localeService) {
|
|
21
21
|
this.prismaService = prismaService;
|
|
22
22
|
this.localeService = localeService;
|
|
23
|
-
this.modelName = '
|
|
23
|
+
this.modelName = 'address_type';
|
|
24
24
|
this.foreignKey = 'type_id';
|
|
25
25
|
}
|
|
26
26
|
async list(locale, paginationParams) {
|
|
@@ -39,7 +39,7 @@ let PersonAddressTypeService = class PersonAddressTypeService {
|
|
|
39
39
|
if (ids == undefined || ids == null) {
|
|
40
40
|
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
41
41
|
}
|
|
42
|
-
return this.prismaService.
|
|
42
|
+
return this.prismaService.address_type.deleteMany({
|
|
43
43
|
where: {
|
|
44
44
|
id: {
|
|
45
45
|
in: ids
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-type.service.js","sourceRoot":"","sources":["../../src/address-type/address-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAInC,YAEE,aAA6C,EAE7C,aAA6C;QAF5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,kBAAa,GAAb,aAAa,CAAe;QAP9B,cAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"address-type.service.js","sourceRoot":"","sources":["../../src/address-type/address-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAInC,YAEE,aAA6C,EAE7C,aAA6C;QAF5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,kBAAa,GAAb,aAAa,CAAe;QAP9B,cAAS,GAAG,cAAc,CAAC;QAC3B,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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/contact-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,wBAAwB;IAMjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,QAAQ,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"contact-type.service.d.ts","sourceRoot":"","sources":["../../src/contact-type/contact-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,wBAAwB;IAMjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAC5C,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"}
|
|
@@ -20,7 +20,7 @@ let PersonContactTypeService = class PersonContactTypeService {
|
|
|
20
20
|
constructor(prismaService, localeService) {
|
|
21
21
|
this.prismaService = prismaService;
|
|
22
22
|
this.localeService = localeService;
|
|
23
|
-
this.modelName = '
|
|
23
|
+
this.modelName = 'contact_type';
|
|
24
24
|
this.foreignKey = 'type_id';
|
|
25
25
|
}
|
|
26
26
|
async list(locale, paginationParams) {
|
|
@@ -39,7 +39,7 @@ let PersonContactTypeService = class PersonContactTypeService {
|
|
|
39
39
|
if (ids == undefined || ids == null) {
|
|
40
40
|
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
41
41
|
}
|
|
42
|
-
return this.prismaService.
|
|
42
|
+
return this.prismaService.contact_type.deleteMany({
|
|
43
43
|
where: {
|
|
44
44
|
id: {
|
|
45
45
|
in: ids
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-type.service.js","sourceRoot":"","sources":["../../src/contact-type/contact-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAInC,YAEE,aAA6C,EAE7C,aAA6C;QAF5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,kBAAa,GAAb,aAAa,CAAe;QAP9B,cAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"contact-type.service.js","sourceRoot":"","sources":["../../src/contact-type/contact-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,wBAAwB,GAA9B,MAAM,wBAA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pC,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,wBAAwB,CAuDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.module.d.ts","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contact.module.d.ts","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":"AAeA,qBAgCa,aAAa;CAAI"}
|
package/dist/contact.module.js
CHANGED
|
@@ -18,11 +18,9 @@ const jwt_1 = require("@nestjs/jwt");
|
|
|
18
18
|
const address_type_module_1 = require("./address-type/address-type.module");
|
|
19
19
|
const contact_type_module_1 = require("./contact-type/contact-type.module");
|
|
20
20
|
const contact_service_1 = require("./contact.service");
|
|
21
|
-
const custom_type_module_1 = require("./custom-type/custom-type.module");
|
|
22
21
|
const document_type_module_1 = require("./document-type/document-type.module");
|
|
23
22
|
const person_relation_type_module_1 = require("./person-relation-type/person-relation-type.module");
|
|
24
23
|
const person_module_1 = require("./person/person.module");
|
|
25
|
-
const type_module_1 = require("./type/type.module");
|
|
26
24
|
let ContactModule = class ContactModule {
|
|
27
25
|
};
|
|
28
26
|
exports.ContactModule = ContactModule;
|
|
@@ -45,12 +43,10 @@ exports.ContactModule = ContactModule = __decorate([
|
|
|
45
43
|
(0, common_1.forwardRef)(() => api_locale_1.LocaleModule),
|
|
46
44
|
(0, common_1.forwardRef)(() => api_prisma_1.PrismaModule),
|
|
47
45
|
(0, common_1.forwardRef)(() => api_pagination_1.PaginationModule),
|
|
48
|
-
(0, common_1.forwardRef)(() => type_module_1.PersonTypeModule),
|
|
49
46
|
(0, common_1.forwardRef)(() => person_module_1.PersonModule),
|
|
50
|
-
(0, common_1.forwardRef)(() => document_type_module_1.PersonDocumentTypeModule),
|
|
51
|
-
(0, common_1.forwardRef)(() => contact_type_module_1.PersonContactTypeModule),
|
|
52
47
|
(0, common_1.forwardRef)(() => address_type_module_1.PersonAddressTypeModule),
|
|
53
|
-
(0, common_1.forwardRef)(() =>
|
|
48
|
+
(0, common_1.forwardRef)(() => contact_type_module_1.PersonContactTypeModule),
|
|
49
|
+
(0, common_1.forwardRef)(() => document_type_module_1.PersonDocumentTypeModule),
|
|
54
50
|
(0, common_1.forwardRef)(() => person_relation_type_module_1.PersonRelationTypeModule),
|
|
55
51
|
(0, common_1.forwardRef)(() => api_mail_1.MailModule),
|
|
56
52
|
config_1.ConfigModule.forRoot(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.module.js","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA6C;AAC7C,oDAAmD;AACnD,gDAA+C;AAC/C,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,2CAA8C;AAC9C,qCAAwC;AACxC,4EAA6E;AAC7E,4EAA6E;AAC7E,uDAAmD;AACnD
|
|
1
|
+
{"version":3,"file":"contact.module.js","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA6C;AAC7C,oDAAmD;AACnD,gDAA+C;AAC/C,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,2CAA8C;AAC9C,qCAAwC;AACxC,4EAA6E;AAC7E,4EAA6E;AAC7E,uDAAmD;AACnD,+EAAgF;AAChF,oGAA8F;AAC9F,0DAAsD;AAkC/C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAI,CAAA;AAAjB,sCAAa;wBAAb,aAAa;IAhCzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CACd,eAAS,CAAC,aAAa,CAAC;gBACtB,MAAM,EAAE,IAAI;gBACZ,UAAU,EAAE,GAAG,EAAE;oBACf,OAAO;wBACL,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;wBACtC,MAAM,EAAE,IAAI;wBACZ,WAAW,EAAE;4BACX,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,KAAY;yBAC9D;qBACF,CAAC;gBACJ,CAAC;aACF,CAAC,CACH;YACD,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iCAAgB,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAuB,CAAC;YACzC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAuB,CAAC;YACzC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAwB,CAAC;YAC1C,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sDAAwB,CAAC;YAC1C,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAU,CAAC;YAC5B,qBAAY,CAAC,OAAO,EAAE;SACvB;QACD,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,CAAC,gCAAc,CAAC;QAC3B,OAAO,EAAE,CAAC,gCAAc,CAAC;KAC1B,CAAC;GACW,aAAa,CAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-type.service.d.ts","sourceRoot":"","sources":["../../src/document-type/document-type.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,a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AAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IASpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
|
@@ -20,7 +20,7 @@ let PersonDocumentTypeService = class PersonDocumentTypeService {
|
|
|
20
20
|
constructor(prismaService, localeService) {
|
|
21
21
|
this.prismaService = prismaService;
|
|
22
22
|
this.localeService = localeService;
|
|
23
|
-
this.modelName = '
|
|
23
|
+
this.modelName = 'document_type';
|
|
24
24
|
this.foreignKey = 'type_id';
|
|
25
25
|
}
|
|
26
26
|
async list(locale, paginationParams) {
|
|
@@ -39,7 +39,7 @@ let PersonDocumentTypeService = class PersonDocumentTypeService {
|
|
|
39
39
|
if (ids == undefined || ids == null) {
|
|
40
40
|
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
41
41
|
}
|
|
42
|
-
return this.prismaService.
|
|
42
|
+
return this.prismaService.document_type.deleteMany({
|
|
43
43
|
where: {
|
|
44
44
|
id: {
|
|
45
45
|
in: ids
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-type.service.js","sourceRoot":"","sources":["../../src/document-type/document-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAIpC,YAEE,aAA6C,EAE7C,aAA6C;QAF5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,kBAAa,GAAb,aAAa,CAAe;QAP9B,cAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"document-type.service.js","sourceRoot":"","sources":["../../src/document-type/document-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAoD;AAEpD,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAIpC,YAEE,aAA6C,EAE7C,aAA6C;QAF5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,kBAAa,GAAb,aAAa,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,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;qCADR,0BAAa;QAEb,0BAAa;GARpC,yBAAyB,CAuDrC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ export * from "./contact.service";
|
|
|
3
3
|
export * from "./address-type/address-type.enum";
|
|
4
4
|
export * from "./contact-type/contact-type.enum";
|
|
5
5
|
export * from "./document-type/document-type.enum";
|
|
6
|
-
export * from "./type/type.enum";
|
|
7
6
|
export * from "./address-type/address-type.enum";
|
|
8
7
|
export * from "./contact-type/contact-type.enum";
|
|
9
8
|
export * from "./document-type/document-type.enum";
|
|
10
|
-
export * from "./type/type.enum";
|
|
11
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kCAAkC,CAAC;AAEjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kCAAkC,CAAC;AAEjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,oCAAoC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,9 +19,7 @@ __exportStar(require("./contact.service"), exports);
|
|
|
19
19
|
__exportStar(require("./address-type/address-type.enum"), exports);
|
|
20
20
|
__exportStar(require("./contact-type/contact-type.enum"), exports);
|
|
21
21
|
__exportStar(require("./document-type/document-type.enum"), exports);
|
|
22
|
-
__exportStar(require("./type/type.enum"), exports);
|
|
23
22
|
__exportStar(require("./address-type/address-type.enum"), exports);
|
|
24
23
|
__exportStar(require("./contact-type/contact-type.enum"), exports);
|
|
25
24
|
__exportStar(require("./document-type/document-type.enum"), exports);
|
|
26
|
-
__exportStar(require("./type/type.enum"), exports);
|
|
27
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAElC,mEAAiD;AAEjD,mEAAiD;AAEjD,qEAAmD;AAEnD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAElC,mEAAiD;AAEjD,mEAAiD;AAEjD,qEAAmD;AAEnD,mEAAiD;AAEjD,mEAAiD;AAEjD,qEAAmD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../../src/person/person-metadata/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAEpB,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,GAAG,CAAC;CACZ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../../src/person/person-metadata/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,MAAa,SAAS;CAKrB;AALD,8BAKC;AAHC;IADC,IAAA,0BAAQ,GAAE;;sCACC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/person/person-metadata/dto/update.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;CAAG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../../src/person/person-metadata/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAAG;AAAxD,8BAAwD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 './person-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=person-metadata.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-metadata.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-metadata/person-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,2BAA2B,CAAC;AAElE,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"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 person_metadata_service_1 = require("./person-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)(() => person_metadata_service_1.PersonMetadataService))),
|
|
88
|
+
__metadata("design:paramtypes", [person_metadata_service_1.PersonMetadataService])
|
|
89
|
+
], PersonMetadataController);
|
|
90
|
+
//# sourceMappingURL=person-metadata.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-metadata.controller.js","sourceRoot":"","sources":["../../../src/person/person-metadata/person-metadata.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,4DAAqD;AACrD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,uEAAkE;AAI3D,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,+CAAqB,CAAC,CAAC,CAAA;qCACR,+CAAqB;GAHpD,wBAAwB,CA8CpC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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=person-metadata.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-metadata.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-metadata/person-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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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=person-metadata.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-metadata.service.js","sourceRoot":"","sources":["../../../src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K,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"}
|
|
@@ -17,12 +17,12 @@ const contact_controller_1 = require("./contact/contact.controller");
|
|
|
17
17
|
const contact_service_1 = require("./contact/contact.service");
|
|
18
18
|
const document_controller_1 = require("./document/document.controller");
|
|
19
19
|
const document_service_1 = require("./document/document.service");
|
|
20
|
-
const metadata_controller_1 = require("./metadata/metadata.controller");
|
|
21
|
-
const metadata_service_1 = require("./metadata/metadata.service");
|
|
22
20
|
const person_company_controller_1 = require("./person-company/person-company.controller");
|
|
23
21
|
const person_company_service_1 = require("./person-company/person-company.service");
|
|
24
22
|
const person_individual_controller_1 = require("./person-individual/person-individual.controller");
|
|
25
23
|
const person_individual_service_1 = require("./person-individual/person-individual.service");
|
|
24
|
+
const person_metadata_controller_1 = require("./person-metadata/person-metadata.controller");
|
|
25
|
+
const person_metadata_service_1 = require("./person-metadata/person-metadata.service");
|
|
26
26
|
const person_relation_controller_1 = require("./person-relation/person-relation.controller");
|
|
27
27
|
const person_relation_service_1 = require("./person-relation/person-relation.service");
|
|
28
28
|
const person_controller_1 = require("./person.controller");
|
|
@@ -38,7 +38,7 @@ exports.PersonModule = PersonModule = __decorate([
|
|
|
38
38
|
(0, common_1.forwardRef)(() => api_pagination_1.PaginationModule),
|
|
39
39
|
],
|
|
40
40
|
controllers: [
|
|
41
|
-
|
|
41
|
+
person_metadata_controller_1.PersonMetadataController,
|
|
42
42
|
address_controller_1.PersonAddressController,
|
|
43
43
|
contact_controller_1.PersonContactController,
|
|
44
44
|
document_controller_1.PersonDocumentController,
|
|
@@ -48,7 +48,7 @@ exports.PersonModule = PersonModule = __decorate([
|
|
|
48
48
|
person_controller_1.PersonController,
|
|
49
49
|
],
|
|
50
50
|
providers: [
|
|
51
|
-
|
|
51
|
+
person_metadata_service_1.PersonMetadataService,
|
|
52
52
|
address_service_1.PersonAddressService,
|
|
53
53
|
contact_service_1.PersonContactService,
|
|
54
54
|
document_service_1.PersonDocumentService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.module.js","sourceRoot":"","sources":["../../src/person/person.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA6C;AAC7C,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,qEAAuE;AACvE,+DAAiE;AACjE,qEAAuE;AACvE,+DAAiE;AACjE,wEAA0E;AAC1E,kEAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"person.module.js","sourceRoot":"","sources":["../../src/person/person.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA6C;AAC7C,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,qEAAuE;AACvE,+DAAiE;AACjE,qEAAuE;AACvE,+DAAiE;AACjE,wEAA0E;AAC1E,kEAAoE;AACpE,0FAAqF;AACrF,oFAA+E;AAC/E,mGAA8F;AAC9F,6FAAwF;AACxF,6FAAwF;AACxF,uFAAkF;AAClF,6FAAwF;AACxF,uFAAkF;AAClF,2DAAuD;AACvD,qDAAiD;AA6B1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IA5BxB,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;YACX,qDAAwB;YACxB,4CAAuB;YACvB,4CAAuB;YACvB,8CAAwB;YACxB,qDAAwB;YACxB,yDAA0B;YAC1B,mDAAuB;YACvB,oCAAgB;SACjB;QACD,SAAS,EAAE;YACT,+CAAqB;YACrB,sCAAoB;YACpB,sCAAoB;YACpB,wCAAqB;YACrB,+CAAqB;YACrB,mDAAuB;YACvB,6CAAoB;YACpB,8BAAa;SACd;QACD,OAAO,EAAE,CAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC;KAC3C,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
- name:
|
|
2
2
|
en: Residential
|
|
3
3
|
pt: Residencial
|
|
4
|
-
|
|
4
|
+
code: RESIDENTIAL
|
|
5
5
|
- name:
|
|
6
6
|
en: Commercial
|
|
7
7
|
pt: Comercial
|
|
8
|
-
|
|
8
|
+
code: COMMERCIAL
|
|
9
9
|
- name:
|
|
10
10
|
en: Correspondence
|
|
11
11
|
pt: Correspondência
|
|
12
|
-
|
|
12
|
+
code: CORRESPONDENCE
|
|
13
13
|
- name:
|
|
14
14
|
en: Alternative
|
|
15
15
|
pt: Alternativo
|
|
16
|
-
|
|
16
|
+
code: ALTERNATIVE
|
|
17
17
|
- name:
|
|
18
18
|
en: Work
|
|
19
19
|
pt: Trabalho
|
|
20
|
-
|
|
20
|
+
code: WORK
|
|
21
21
|
- name:
|
|
22
22
|
en: Billing
|
|
23
23
|
pt: Cobrança
|
|
24
|
-
|
|
24
|
+
code: BILLING
|
|
25
25
|
- name:
|
|
26
26
|
en: Shipping
|
|
27
27
|
pt: Entrega
|
|
28
|
-
|
|
28
|
+
code: SHIPPING
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
- name:
|
|
2
2
|
en: Phone
|
|
3
3
|
pt: Telefone
|
|
4
|
-
|
|
4
|
+
code: PHONE
|
|
5
5
|
- name:
|
|
6
6
|
en: Email
|
|
7
7
|
pt: E-mail
|
|
8
|
-
|
|
8
|
+
code: EMAIL
|
|
9
9
|
- name:
|
|
10
10
|
en: Fax
|
|
11
11
|
pt: Fax
|
|
12
|
-
|
|
12
|
+
code: FAX
|
|
13
13
|
- name:
|
|
14
14
|
en: WhatsApp
|
|
15
15
|
pt: WhatsApp
|
|
16
|
-
|
|
16
|
+
code: WHATSAPP
|
|
17
17
|
- name:
|
|
18
18
|
en: Telegram
|
|
19
19
|
pt: Telegram
|
|
20
|
-
|
|
20
|
+
code: TELEGRAM
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
- name:
|
|
2
|
+
en: ID
|
|
3
|
+
pt: RG
|
|
4
|
+
code: RG
|
|
5
|
+
country_code: BRA
|
|
6
|
+
- name:
|
|
7
|
+
en: SSN
|
|
8
|
+
pt: CPF
|
|
9
|
+
code: CPF
|
|
10
|
+
country_code: BRA
|
|
11
|
+
- name:
|
|
12
|
+
en: EIN
|
|
13
|
+
pt: CNPJ
|
|
14
|
+
code: CNPJ
|
|
15
|
+
country_code: BRA
|
|
16
|
+
- name:
|
|
17
|
+
en: Passport
|
|
18
|
+
pt: Passaporte
|
|
19
|
+
code: PASSPORT
|
|
20
|
+
country_code: BRA
|
|
21
|
+
- name:
|
|
22
|
+
en: Driver License
|
|
23
|
+
pt: CNH
|
|
24
|
+
code: CNH
|
|
25
|
+
country_code: BRA
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/contact",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -14,8 +14,8 @@
|
|
|
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",
|
|
17
|
-
"@hed-hog/api-
|
|
18
|
-
"@hed-hog/api-
|
|
17
|
+
"@hed-hog/api-prisma": "0.0.4",
|
|
18
|
+
"@hed-hog/api-mail": "0.0.7"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
@@ -13,7 +13,7 @@ import { UpdateDTO } from './dto/update.dto';
|
|
|
13
13
|
|
|
14
14
|
@Injectable()
|
|
15
15
|
export class PersonAddressTypeService {
|
|
16
|
-
private readonly modelName = '
|
|
16
|
+
private readonly modelName = 'address_type';
|
|
17
17
|
private readonly foreignKey = 'type_id';
|
|
18
18
|
|
|
19
19
|
constructor(
|
|
@@ -59,7 +59,7 @@ export class PersonAddressTypeService {
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
return this.prismaService.
|
|
62
|
+
return this.prismaService.address_type.deleteMany({
|
|
63
63
|
where: {
|
|
64
64
|
id: {
|
|
65
65
|
in: ids
|
|
@@ -13,7 +13,7 @@ import { UpdateDTO } from './dto/update.dto';
|
|
|
13
13
|
|
|
14
14
|
@Injectable()
|
|
15
15
|
export class PersonContactTypeService {
|
|
16
|
-
private readonly modelName = '
|
|
16
|
+
private readonly modelName = 'contact_type';
|
|
17
17
|
private readonly foreignKey = 'type_id';
|
|
18
18
|
|
|
19
19
|
constructor(
|
|
@@ -59,7 +59,7 @@ export class PersonContactTypeService {
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
return this.prismaService.
|
|
62
|
+
return this.prismaService.contact_type.deleteMany({
|
|
63
63
|
where: {
|
|
64
64
|
id: {
|
|
65
65
|
in: ids
|
package/src/contact.module.ts
CHANGED
|
@@ -9,11 +9,9 @@ import { JwtModule } from '@nestjs/jwt';
|
|
|
9
9
|
import { PersonAddressTypeModule } from './address-type/address-type.module';
|
|
10
10
|
import { PersonContactTypeModule } from './contact-type/contact-type.module';
|
|
11
11
|
import { ContactService } from './contact.service';
|
|
12
|
-
import { PersonCustomTypeModule } from './custom-type/custom-type.module';
|
|
13
12
|
import { PersonDocumentTypeModule } from './document-type/document-type.module';
|
|
14
13
|
import { PersonRelationTypeModule } from './person-relation-type/person-relation-type.module';
|
|
15
14
|
import { PersonModule } from './person/person.module';
|
|
16
|
-
import { PersonTypeModule } from './type/type.module';
|
|
17
15
|
|
|
18
16
|
@Module({
|
|
19
17
|
imports: [
|
|
@@ -35,12 +33,10 @@ import { PersonTypeModule } from './type/type.module';
|
|
|
35
33
|
forwardRef(() => LocaleModule),
|
|
36
34
|
forwardRef(() => PrismaModule),
|
|
37
35
|
forwardRef(() => PaginationModule),
|
|
38
|
-
forwardRef(() => PersonTypeModule),
|
|
39
36
|
forwardRef(() => PersonModule),
|
|
40
|
-
forwardRef(() => PersonDocumentTypeModule),
|
|
41
|
-
forwardRef(() => PersonContactTypeModule),
|
|
42
37
|
forwardRef(() => PersonAddressTypeModule),
|
|
43
|
-
forwardRef(() =>
|
|
38
|
+
forwardRef(() => PersonContactTypeModule),
|
|
39
|
+
forwardRef(() => PersonDocumentTypeModule),
|
|
44
40
|
forwardRef(() => PersonRelationTypeModule),
|
|
45
41
|
forwardRef(() => MailModule),
|
|
46
42
|
ConfigModule.forRoot(),
|
|
@@ -13,7 +13,7 @@ import { UpdateDTO } from './dto/update.dto';
|
|
|
13
13
|
|
|
14
14
|
@Injectable()
|
|
15
15
|
export class PersonDocumentTypeService {
|
|
16
|
-
private readonly modelName = '
|
|
16
|
+
private readonly modelName = 'document_type';
|
|
17
17
|
private readonly foreignKey = 'type_id';
|
|
18
18
|
|
|
19
19
|
constructor(
|
|
@@ -59,7 +59,7 @@ export class PersonDocumentTypeService {
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
return this.prismaService.
|
|
62
|
+
return this.prismaService.document_type.deleteMany({
|
|
63
63
|
where: {
|
|
64
64
|
id: {
|
|
65
65
|
in: ids
|
package/src/index.ts
CHANGED
|
@@ -7,13 +7,8 @@ export * from "./contact-type/contact-type.enum";
|
|
|
7
7
|
|
|
8
8
|
export * from "./document-type/document-type.enum";
|
|
9
9
|
|
|
10
|
-
export * from "./type/type.enum";
|
|
11
|
-
|
|
12
10
|
export * from "./address-type/address-type.enum";
|
|
13
11
|
|
|
14
12
|
export * from "./contact-type/contact-type.enum";
|
|
15
13
|
|
|
16
14
|
export * from "./document-type/document-type.enum";
|
|
17
|
-
|
|
18
|
-
export * from "./type/type.enum";
|
|
19
|
-
|
package/src/person/{metadata/metadata.controller.ts → person-metadata/person-metadata.controller.ts}
RENAMED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '@nestjs/common';
|
|
15
15
|
import { CreateDTO } from './dto/create.dto';
|
|
16
16
|
import { UpdateDTO } from './dto/update.dto';
|
|
17
|
-
import { PersonMetadataService } from './metadata.service';
|
|
17
|
+
import { PersonMetadataService } from './person-metadata.service';
|
|
18
18
|
|
|
19
19
|
@Role()
|
|
20
20
|
@Controller('person/:personId/person-metadata')
|
|
@@ -8,12 +8,12 @@ import { PersonContactController } from "./contact/contact.controller";
|
|
|
8
8
|
import { PersonContactService } from "./contact/contact.service";
|
|
9
9
|
import { PersonDocumentController } from "./document/document.controller";
|
|
10
10
|
import { PersonDocumentService } from "./document/document.service";
|
|
11
|
-
import { PersonMetadataController } from "./metadata/metadata.controller";
|
|
12
|
-
import { PersonMetadataService } from "./metadata/metadata.service";
|
|
13
11
|
import { PersonCompanyController } from "./person-company/person-company.controller";
|
|
14
12
|
import { PersonCompanyService } from "./person-company/person-company.service";
|
|
15
13
|
import { PersonIndividualController } from "./person-individual/person-individual.controller";
|
|
16
14
|
import { PersonIndividualService } from "./person-individual/person-individual.service";
|
|
15
|
+
import { PersonMetadataController } from "./person-metadata/person-metadata.controller";
|
|
16
|
+
import { PersonMetadataService } from "./person-metadata/person-metadata.service";
|
|
17
17
|
import { PersonRelationController } from "./person-relation/person-relation.controller";
|
|
18
18
|
import { PersonRelationService } from "./person-relation/person-relation.service";
|
|
19
19
|
import { PersonController } from "./person.controller";
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
- name:
|
|
2
|
-
en: ID
|
|
3
|
-
pt: RG
|
|
4
|
-
slug: RG
|
|
5
|
-
country_id:
|
|
6
|
-
where:
|
|
7
|
-
code: BRA
|
|
8
|
-
- name:
|
|
9
|
-
en: SSN
|
|
10
|
-
pt: CPF
|
|
11
|
-
slug: CPF
|
|
12
|
-
country_id:
|
|
13
|
-
where:
|
|
14
|
-
code: BRA
|
|
15
|
-
- name:
|
|
16
|
-
en: EIN
|
|
17
|
-
pt: CNPJ
|
|
18
|
-
slug: CNPJ
|
|
19
|
-
country_id:
|
|
20
|
-
where:
|
|
21
|
-
code: BRA
|
|
22
|
-
- name:
|
|
23
|
-
en: Passport
|
|
24
|
-
pt: Passaporte
|
|
25
|
-
slug: PASSPORT
|
|
26
|
-
country_id:
|
|
27
|
-
where:
|
|
28
|
-
code: BRA
|
|
29
|
-
- name:
|
|
30
|
-
en: Driver License
|
|
31
|
-
pt: CNH
|
|
32
|
-
slug: CNH
|
|
33
|
-
country_id:
|
|
34
|
-
where:
|
|
35
|
-
code: BRA
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO, Role } from '@hed-hog/api';
|
|
2
|
-
import { Locale } from '@hed-hog/api-locale';
|
|
3
|
-
import { Pagination } from '@hed-hog/api-pagination';
|
|
4
|
-
import {
|
|
5
|
-
Body,
|
|
6
|
-
Controller,
|
|
7
|
-
Delete,
|
|
8
|
-
Get,
|
|
9
|
-
Inject,
|
|
10
|
-
Param,
|
|
11
|
-
ParseIntPipe,
|
|
12
|
-
Patch,
|
|
13
|
-
Post,
|
|
14
|
-
forwardRef
|
|
15
|
-
} from '@nestjs/common';
|
|
16
|
-
import { PersonCustomTypeService } from './custom-type.service';
|
|
17
|
-
import { CreateDTO } from './dto/create.dto';
|
|
18
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
19
|
-
|
|
20
|
-
@Role()
|
|
21
|
-
@Controller('person-custom-type')
|
|
22
|
-
export class PersonCustomTypeController {
|
|
23
|
-
constructor(
|
|
24
|
-
@Inject(forwardRef(() => PersonCustomTypeService))
|
|
25
|
-
private readonly personCustomTypeService: PersonCustomTypeService
|
|
26
|
-
) {}
|
|
27
|
-
|
|
28
|
-
@Get()
|
|
29
|
-
async list(@Locale() locale, @Pagination() paginationParams) {
|
|
30
|
-
return this.personCustomTypeService.list(locale, paginationParams);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Get(':id')
|
|
34
|
-
async get(@Param('id', ParseIntPipe) id: number) {
|
|
35
|
-
return this.personCustomTypeService.get(id);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@Post()
|
|
39
|
-
async create(@Body() data: CreateDTO) {
|
|
40
|
-
return this.personCustomTypeService.create(data);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@Patch(':id')
|
|
44
|
-
async update(@Param('id', ParseIntPipe) id: number, @Body() data: UpdateDTO) {
|
|
45
|
-
return this.personCustomTypeService.update({
|
|
46
|
-
id,
|
|
47
|
-
data
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@Delete()
|
|
52
|
-
async delete(@Body() data: DeleteDTO) {
|
|
53
|
-
return this.personCustomTypeService.delete(data);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AdminModule } from '@hed-hog/admin';
|
|
2
|
-
import { PaginationModule } from '@hed-hog/api-pagination';
|
|
3
|
-
import { PrismaModule } from '@hed-hog/api-prisma';
|
|
4
|
-
import { forwardRef, Module } from '@nestjs/common';
|
|
5
|
-
import { PersonCustomTypeController } from './custom-type.controller';
|
|
6
|
-
import { PersonCustomTypeService } from './custom-type.service';
|
|
7
|
-
|
|
8
|
-
@Module({
|
|
9
|
-
imports: [
|
|
10
|
-
forwardRef(() => AdminModule),
|
|
11
|
-
forwardRef(() => PrismaModule),
|
|
12
|
-
forwardRef(() => PaginationModule)
|
|
13
|
-
],
|
|
14
|
-
controllers: [PersonCustomTypeController],
|
|
15
|
-
providers: [PersonCustomTypeService],
|
|
16
|
-
exports: [PersonCustomTypeService]
|
|
17
|
-
})
|
|
18
|
-
export class PersonCustomTypeModule {}
|
|
@@ -1,70 +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 {
|
|
6
|
-
BadRequestException,
|
|
7
|
-
Inject,
|
|
8
|
-
Injectable,
|
|
9
|
-
forwardRef
|
|
10
|
-
} from '@nestjs/common';
|
|
11
|
-
import { CreateDTO } from './dto/create.dto';
|
|
12
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
13
|
-
|
|
14
|
-
@Injectable()
|
|
15
|
-
export class PersonCustomTypeService {
|
|
16
|
-
private readonly modelName = 'person_custom_type';
|
|
17
|
-
private readonly foreignKey = 'type_id';
|
|
18
|
-
|
|
19
|
-
constructor(
|
|
20
|
-
@Inject(forwardRef(() => PrismaService))
|
|
21
|
-
private readonly prismaService: PrismaService,
|
|
22
|
-
@Inject(forwardRef(() => LocaleService))
|
|
23
|
-
private readonly localeService: LocaleService
|
|
24
|
-
) {}
|
|
25
|
-
|
|
26
|
-
async list(locale: string, paginationParams: PaginationDTO) {
|
|
27
|
-
return this.localeService.listModelWithLocale(
|
|
28
|
-
locale,
|
|
29
|
-
this.modelName,
|
|
30
|
-
paginationParams
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async get(id: number) {
|
|
35
|
-
return this.localeService.getModelWithLocale(this.modelName, id);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async create(data: CreateDTO) {
|
|
39
|
-
return this.localeService.createModelWithLocale(
|
|
40
|
-
this.modelName,
|
|
41
|
-
this.foreignKey,
|
|
42
|
-
data
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async update({ id, data }: { id: number; data: UpdateDTO }) {
|
|
47
|
-
return this.localeService.updateModelWithLocale(
|
|
48
|
-
this.modelName,
|
|
49
|
-
this.foreignKey,
|
|
50
|
-
id,
|
|
51
|
-
data
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async delete({ ids }: DeleteDTO) {
|
|
56
|
-
if (ids == undefined || ids == null) {
|
|
57
|
-
throw new BadRequestException(
|
|
58
|
-
'You must select at least one item to delete.'
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return this.prismaService.person_custom_type.deleteMany({
|
|
63
|
-
where: {
|
|
64
|
-
id: {
|
|
65
|
-
in: ids
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { DeleteDTO, Role } from '@hed-hog/api';
|
|
2
|
-
import { Locale } from '@hed-hog/api-locale';
|
|
3
|
-
import { Pagination } from '@hed-hog/api-pagination';
|
|
4
|
-
import {
|
|
5
|
-
Body,
|
|
6
|
-
Controller,
|
|
7
|
-
Delete,
|
|
8
|
-
Get,
|
|
9
|
-
Inject,
|
|
10
|
-
Param,
|
|
11
|
-
ParseIntPipe,
|
|
12
|
-
Patch,
|
|
13
|
-
Post,
|
|
14
|
-
forwardRef
|
|
15
|
-
} from '@nestjs/common';
|
|
16
|
-
import { CreateDTO } from './dto/create.dto';
|
|
17
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
18
|
-
import { PersonTypeService } from './type.service';
|
|
19
|
-
|
|
20
|
-
@Role()
|
|
21
|
-
@Controller('person-type')
|
|
22
|
-
export class PersonTypeController {
|
|
23
|
-
constructor(
|
|
24
|
-
@Inject(forwardRef(() => PersonTypeService))
|
|
25
|
-
private readonly personTypeService: PersonTypeService
|
|
26
|
-
) {}
|
|
27
|
-
|
|
28
|
-
@Get()
|
|
29
|
-
async list(@Locale() locale, @Pagination() paginationParams) {
|
|
30
|
-
return this.personTypeService.list(locale, paginationParams);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Get(':id')
|
|
34
|
-
async get(@Param('id', ParseIntPipe) id: number) {
|
|
35
|
-
return this.personTypeService.get(id);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@Post()
|
|
39
|
-
async create(@Body() data: CreateDTO) {
|
|
40
|
-
return this.personTypeService.create(data);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@Patch(':id')
|
|
44
|
-
async update(@Param('id', ParseIntPipe) id: number, @Body() data: UpdateDTO) {
|
|
45
|
-
return this.personTypeService.update({
|
|
46
|
-
id,
|
|
47
|
-
data
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@Delete()
|
|
52
|
-
async delete(@Body() data: DeleteDTO) {
|
|
53
|
-
return this.personTypeService.delete(data);
|
|
54
|
-
}
|
|
55
|
-
}
|
package/src/type/type.enum.ts
DELETED
package/src/type/type.module.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AdminModule } from '@hed-hog/admin';
|
|
2
|
-
import { PaginationModule } from '@hed-hog/api-pagination';
|
|
3
|
-
import { PrismaModule } from '@hed-hog/api-prisma';
|
|
4
|
-
import { forwardRef, Module } from '@nestjs/common';
|
|
5
|
-
import { PersonTypeController } from './type.controller';
|
|
6
|
-
import { PersonTypeService } from './type.service';
|
|
7
|
-
|
|
8
|
-
@Module({
|
|
9
|
-
imports: [
|
|
10
|
-
forwardRef(() => AdminModule),
|
|
11
|
-
forwardRef(() => PrismaModule),
|
|
12
|
-
forwardRef(() => PaginationModule)
|
|
13
|
-
],
|
|
14
|
-
controllers: [PersonTypeController],
|
|
15
|
-
providers: [PersonTypeService],
|
|
16
|
-
exports: [PersonTypeService]
|
|
17
|
-
})
|
|
18
|
-
export class PersonTypeModule {}
|
package/src/type/type.service.ts
DELETED
|
@@ -1,72 +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 {
|
|
6
|
-
BadRequestException,
|
|
7
|
-
Inject,
|
|
8
|
-
Injectable,
|
|
9
|
-
forwardRef
|
|
10
|
-
} from '@nestjs/common';
|
|
11
|
-
import { CreateDTO } from './dto/create.dto';
|
|
12
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
13
|
-
|
|
14
|
-
@Injectable()
|
|
15
|
-
export class PersonTypeService {
|
|
16
|
-
private readonly modelName = 'person_type';
|
|
17
|
-
private readonly foreignKey = 'type_id';
|
|
18
|
-
|
|
19
|
-
constructor(
|
|
20
|
-
@Inject(forwardRef(() => PrismaService))
|
|
21
|
-
private readonly prismaService: PrismaService,
|
|
22
|
-
@Inject(forwardRef(() => PaginationService))
|
|
23
|
-
private readonly paginationService: PaginationService,
|
|
24
|
-
@Inject(forwardRef(() => LocaleService))
|
|
25
|
-
private readonly localeService: LocaleService
|
|
26
|
-
) {}
|
|
27
|
-
|
|
28
|
-
async list(locale: string, paginationParams: PaginationDTO) {
|
|
29
|
-
return this.localeService.listModelWithLocale(
|
|
30
|
-
locale,
|
|
31
|
-
this.modelName,
|
|
32
|
-
paginationParams
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async get(id: number) {
|
|
37
|
-
return this.localeService.getModelWithLocale(this.modelName, id);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async create(data: CreateDTO) {
|
|
41
|
-
return this.localeService.createModelWithLocale(
|
|
42
|
-
this.modelName,
|
|
43
|
-
this.foreignKey,
|
|
44
|
-
data
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async update({ id, data }: { id: number; data: UpdateDTO }) {
|
|
49
|
-
return this.localeService.updateModelWithLocale(
|
|
50
|
-
this.modelName,
|
|
51
|
-
this.foreignKey,
|
|
52
|
-
id,
|
|
53
|
-
data
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async delete({ ids }: DeleteDTO) {
|
|
58
|
-
if (ids == undefined || ids == null) {
|
|
59
|
-
throw new BadRequestException(
|
|
60
|
-
'You must select at least one item to delete.'
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return this.prismaService.person_type.deleteMany({
|
|
65
|
-
where: {
|
|
66
|
-
id: {
|
|
67
|
-
in: ids
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/src/person/{metadata/metadata.service.ts → person-metadata/person-metadata.service.ts}
RENAMED
|
File without changes
|