@hed-hog/contact 0.0.134 → 0.0.146
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.controller.d.ts +5 -5
- package/dist/address-type/address-type.controller.d.ts.map +1 -1
- package/dist/address-type/address-type.controller.js +17 -13
- package/dist/address-type/address-type.controller.js.map +1 -1
- package/dist/address-type/address-type.service.d.ts +5 -5
- package/dist/address-type/address-type.service.d.ts.map +1 -1
- package/dist/address-type/address-type.service.js +32 -4
- package/dist/address-type/address-type.service.js.map +1 -1
- package/dist/address-type/dto/create.dto.d.ts +4 -2
- package/dist/address-type/dto/create.dto.d.ts.map +1 -1
- package/dist/address-type/dto/create.dto.js +10 -1
- package/dist/address-type/dto/create.dto.js.map +1 -1
- package/dist/address-type/dto/update.dto.d.ts +3 -0
- package/dist/address-type/dto/update.dto.d.ts.map +1 -1
- package/dist/address-type/dto/update.dto.js +15 -0
- package/dist/address-type/dto/update.dto.js.map +1 -1
- package/dist/contact-type/contact-type.controller.d.ts +5 -5
- package/dist/contact-type/contact-type.controller.d.ts.map +1 -1
- package/dist/contact-type/contact-type.controller.js +16 -12
- package/dist/contact-type/contact-type.controller.js.map +1 -1
- package/dist/contact-type/contact-type.service.d.ts +5 -5
- package/dist/contact-type/contact-type.service.d.ts.map +1 -1
- package/dist/contact-type/contact-type.service.js +34 -4
- package/dist/contact-type/contact-type.service.js.map +1 -1
- package/dist/contact-type/dto/create.dto.d.ts +4 -2
- package/dist/contact-type/dto/create.dto.d.ts.map +1 -1
- package/dist/contact-type/dto/create.dto.js +10 -1
- package/dist/contact-type/dto/create.dto.js.map +1 -1
- package/dist/contact-type/dto/update.dto.d.ts +3 -0
- package/dist/contact-type/dto/update.dto.d.ts.map +1 -1
- package/dist/contact-type/dto/update.dto.js +15 -0
- package/dist/contact-type/dto/update.dto.js.map +1 -1
- package/dist/document-type/document-type.controller.d.ts +5 -5
- package/dist/document-type/document-type.controller.d.ts.map +1 -1
- package/dist/document-type/document-type.controller.js +16 -12
- package/dist/document-type/document-type.controller.js.map +1 -1
- package/dist/document-type/document-type.service.d.ts +5 -5
- package/dist/document-type/document-type.service.d.ts.map +1 -1
- package/dist/document-type/document-type.service.js +34 -4
- package/dist/document-type/document-type.service.js.map +1 -1
- package/dist/document-type/dto/create.dto.d.ts +4 -2
- package/dist/document-type/dto/create.dto.d.ts.map +1 -1
- package/dist/document-type/dto/create.dto.js +10 -1
- package/dist/document-type/dto/create.dto.js.map +1 -1
- package/dist/document-type/dto/update.dto.d.ts +3 -0
- package/dist/document-type/dto/update.dto.d.ts.map +1 -1
- package/dist/document-type/dto/update.dto.js +15 -0
- package/dist/document-type/dto/update.dto.js.map +1 -1
- package/dist/person/address/address.controller.d.ts +1 -1
- package/dist/person/address/address.service.d.ts +1 -1
- package/dist/person/contact/contact.controller.d.ts +1 -1
- package/dist/person/contact/contact.service.d.ts +1 -1
- package/dist/person/document/document.controller.d.ts +1 -1
- package/dist/person/document/document.service.d.ts +1 -1
- package/dist/person/person-metadata/person-metadata.controller.d.ts +1 -1
- package/dist/person/person-metadata/person-metadata.service.d.ts +1 -1
- package/dist/person/person-relation/person-relation.controller.d.ts +1 -1
- package/dist/person/person-relation/person-relation.service.d.ts +1 -1
- package/dist/person/person.controller.d.ts +1 -1
- package/dist/person/person.service.d.ts +1 -1
- package/dist/person-relation-type/person-relation-type.controller.d.ts +1 -1
- package/dist/person-relation-type/person-relation-type.service.d.ts +1 -1
- package/package.json +5 -5
- package/src/address-type/address-type.controller.ts +8 -8
- package/src/address-type/address-type.service.ts +55 -8
- package/src/address-type/dto/create.dto.ts +12 -3
- package/src/address-type/dto/update.dto.ts +6 -1
- package/src/contact-type/contact-type.controller.ts +8 -8
- package/src/contact-type/contact-type.service.ts +57 -8
- package/src/contact-type/dto/create.dto.ts +12 -3
- package/src/contact-type/dto/update.dto.ts +6 -1
- package/src/document-type/document-type.controller.ts +8 -8
- package/src/document-type/document-type.service.ts +56 -8
- package/src/document-type/dto/create.dto.ts +12 -3
- package/src/document-type/dto/update.dto.ts +6 -1
- package/src/language/en.json +7 -0
- package/src/language/pt.json +7 -0
|
@@ -12,11 +12,11 @@ export declare class PersonAddressTypeController {
|
|
|
12
12
|
pageSize: number;
|
|
13
13
|
prev: number;
|
|
14
14
|
next: number;
|
|
15
|
-
data: any;
|
|
15
|
+
data: any[];
|
|
16
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<import("@prisma/client").Prisma.BatchPayload>;
|
|
17
|
+
get(id: number, locale: string): Promise<any>;
|
|
18
|
+
create(locale: string, data: CreateDTO): Promise<any>;
|
|
19
|
+
update(id: number, data: UpdateDTO, locale: string): Promise<any>;
|
|
20
|
+
delete(data: DeleteDTO, locale: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=address-type.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-type.controller.d.ts","sourceRoot":"","sources":["../../src/address-type/address-type.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,2BAA2B;IAGpC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAAxB,wBAAwB,EAAE,wBAAwB;IAI/D,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"address-type.controller.d.ts","sourceRoot":"","sources":["../../src/address-type/address-type.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,2BAA2B;IAGpC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAAxB,wBAAwB,EAAE,wBAAwB;IAI/D,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;IAKnE,MAAM,CAAW,MAAM,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAKxD,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM;IAQ/F,MAAM,CAAS,IAAI,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM;CAG/D"}
|
|
@@ -27,20 +27,20 @@ let PersonAddressTypeController = class PersonAddressTypeController {
|
|
|
27
27
|
async list(locale, paginationParams) {
|
|
28
28
|
return this.personAddressTypeService.list(locale, paginationParams);
|
|
29
29
|
}
|
|
30
|
-
async get(id) {
|
|
31
|
-
return this.personAddressTypeService.get(id);
|
|
30
|
+
async get(id, locale) {
|
|
31
|
+
return this.personAddressTypeService.get(id, locale);
|
|
32
32
|
}
|
|
33
|
-
async create(data) {
|
|
34
|
-
return this.personAddressTypeService.create(data);
|
|
33
|
+
async create(locale, data) {
|
|
34
|
+
return this.personAddressTypeService.create(data, locale);
|
|
35
35
|
}
|
|
36
|
-
async update(id, data) {
|
|
36
|
+
async update(id, data, locale) {
|
|
37
37
|
return this.personAddressTypeService.update({
|
|
38
38
|
id,
|
|
39
39
|
data
|
|
40
|
-
});
|
|
40
|
+
}, locale);
|
|
41
41
|
}
|
|
42
|
-
async delete(data) {
|
|
43
|
-
return this.personAddressTypeService.delete(data);
|
|
42
|
+
async delete(data, locale) {
|
|
43
|
+
return this.personAddressTypeService.delete(data, locale);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
exports.PersonAddressTypeController = PersonAddressTypeController;
|
|
@@ -55,30 +55,34 @@ __decorate([
|
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, common_1.Get)(':id'),
|
|
57
57
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
58
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
58
59
|
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [Number]),
|
|
60
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
60
61
|
__metadata("design:returntype", Promise)
|
|
61
62
|
], PersonAddressTypeController.prototype, "get", null);
|
|
62
63
|
__decorate([
|
|
63
64
|
(0, common_1.Post)(),
|
|
64
|
-
__param(0, (0,
|
|
65
|
+
__param(0, (0, api_locale_1.Locale)()),
|
|
66
|
+
__param(1, (0, common_1.Body)()),
|
|
65
67
|
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
|
68
|
+
__metadata("design:paramtypes", [String, create_dto_1.CreateDTO]),
|
|
67
69
|
__metadata("design:returntype", Promise)
|
|
68
70
|
], PersonAddressTypeController.prototype, "create", null);
|
|
69
71
|
__decorate([
|
|
70
72
|
(0, common_1.Patch)(':id'),
|
|
71
73
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
72
74
|
__param(1, (0, common_1.Body)()),
|
|
75
|
+
__param(2, (0, api_locale_1.Locale)()),
|
|
73
76
|
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
|
77
|
+
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO, String]),
|
|
75
78
|
__metadata("design:returntype", Promise)
|
|
76
79
|
], PersonAddressTypeController.prototype, "update", null);
|
|
77
80
|
__decorate([
|
|
78
81
|
(0, common_1.Delete)(),
|
|
79
82
|
__param(0, (0, common_1.Body)()),
|
|
83
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
80
84
|
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [api_1.DeleteDTO]),
|
|
85
|
+
__metadata("design:paramtypes", [api_1.DeleteDTO, String]),
|
|
82
86
|
__metadata("design:returntype", Promise)
|
|
83
87
|
], PersonAddressTypeController.prototype, "delete", null);
|
|
84
88
|
exports.PersonAddressTypeController = PersonAddressTypeController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-type.controller.js","sourceRoot":"","sources":["../../src/address-type/address-type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,iEAAkE;AAClE,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YAEmB,wBAAkD;QAAlD,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAW,MAAM,EAAgB,gBAAgB;QACzD,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACtE,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU;
|
|
1
|
+
{"version":3,"file":"address-type.controller.js","sourceRoot":"","sources":["../../src/address-type/address-type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,iEAAkE;AAClE,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YAEmB,wBAAkD;QAAlD,6BAAwB,GAAxB,wBAAw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,IAAA,cAAK,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;IAAmB,WAAA,IAAA,mBAAM,GAAE,CAAA;;6CAApB,sBAAS;;yDAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;IAAmB,WAAA,IAAA,mBAAM,GAAE,CAAA;;qCAApB,eAAS;;yDAEnC;sCAhCU,2BAA2B;IAFvC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,qBAAqB,CAAC;IAG7B,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAwB,CAAC,CAAC,CAAA;qCACR,+CAAwB;GAH1D,2BAA2B,CAiCvC"}
|
|
@@ -17,14 +17,14 @@ export declare class PersonAddressTypeService {
|
|
|
17
17
|
pageSize: number;
|
|
18
18
|
prev: number;
|
|
19
19
|
next: number;
|
|
20
|
-
data: any;
|
|
20
|
+
data: any[];
|
|
21
21
|
}>;
|
|
22
|
-
get(id: number): Promise<any>;
|
|
23
|
-
create(data: CreateDTO): Promise<any>;
|
|
22
|
+
get(id: number, locale: string): Promise<any>;
|
|
23
|
+
create(data: CreateDTO, locale: string): Promise<any>;
|
|
24
24
|
update({ id, data }: {
|
|
25
25
|
id: number;
|
|
26
26
|
data: UpdateDTO;
|
|
27
|
-
}): Promise<any>;
|
|
28
|
-
delete({ ids }: DeleteDTO, locale
|
|
27
|
+
}, locale: string): Promise<any>;
|
|
28
|
+
delete({ ids }: DeleteDTO, locale: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=address-type.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-type.service.d.ts","sourceRoot":"","sources":["../../src/address-type/address-type.service.ts"],"names":[],"mappings":"AAAA,OA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AE,MAAM;CAmChD"}
|
|
@@ -26,19 +26,47 @@ let PersonAddressTypeService = class PersonAddressTypeService {
|
|
|
26
26
|
async list(locale, paginationParams) {
|
|
27
27
|
return this.localeService.listModelWithLocale(locale, this.modelName, paginationParams);
|
|
28
28
|
}
|
|
29
|
-
async get(id) {
|
|
29
|
+
async get(id, locale) {
|
|
30
|
+
const addressType = await this.prismaService.address_type.findUnique({ where: { id } });
|
|
31
|
+
if (!addressType) {
|
|
32
|
+
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('addressTypeNotFound', locale, `Address Type with ID ${id} not found`).replace('{{item}}', 'Address Type'));
|
|
33
|
+
}
|
|
30
34
|
return this.localeService.getModelWithLocale(this.modelName, id);
|
|
31
35
|
}
|
|
32
|
-
async create(data) {
|
|
36
|
+
async create(data, locale) {
|
|
37
|
+
if (!data.locale || Object.keys(data.locale).length === 0) {
|
|
38
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('localeRequired', locale, 'At least one locale is required'));
|
|
39
|
+
}
|
|
33
40
|
return this.localeService.createModelWithLocale(this.modelName, this.foreignKey, data);
|
|
34
41
|
}
|
|
35
|
-
async update({ id, data }) {
|
|
42
|
+
async update({ id, data }, locale) {
|
|
43
|
+
const addressTypeExists = await this.prismaService.address_type.findUnique({
|
|
44
|
+
where: { id }
|
|
45
|
+
});
|
|
46
|
+
if (!addressTypeExists) {
|
|
47
|
+
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('addressTypeNotFound', locale, `Address Type with ID ${id} not found`).replace('{{item}}', 'Address Type'));
|
|
48
|
+
}
|
|
49
|
+
if (data.locale && Object.keys(data.locale).length === 0) {
|
|
50
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('localeRequired', locale, 'At least one locale is required'));
|
|
51
|
+
}
|
|
36
52
|
return this.localeService.updateModelWithLocale(this.modelName, this.foreignKey, id, data);
|
|
37
53
|
}
|
|
38
|
-
async delete({ ids }, locale
|
|
54
|
+
async delete({ ids }, locale) {
|
|
39
55
|
if (ids == undefined || ids == null) {
|
|
40
56
|
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
41
57
|
}
|
|
58
|
+
const existingAddressTypes = await this.prismaService.address_type.findMany({
|
|
59
|
+
where: {
|
|
60
|
+
id: {
|
|
61
|
+
in: ids,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
if (existingAddressTypes.length !== ids.length) {
|
|
66
|
+
const existingIds = existingAddressTypes.map((item) => item.id);
|
|
67
|
+
const missingIds = ids.filter((id) => !existingIds.includes(id));
|
|
68
|
+
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('addressTypesNotFound', locale, `Address Types with IDs ${missingIds.join(', ')} not found`).replace('{{items}}', 'Address Types'));
|
|
69
|
+
}
|
|
42
70
|
return this.prismaService.address_type.deleteMany({
|
|
43
71
|
where: {
|
|
44
72
|
id: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-type.service.js","sourceRoot":"","sources":["../../src/address-type/address-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAmE;AAEnE,oDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"address-type.service.js","sourceRoot":"","sources":["../../src/address-type/address-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAmE;AAEnE,oDAAoD;AACpD,2CAMwB;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,iBAAiB,CAAC;IAO7C,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,gBAA+B;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAC3C,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AC,EAAE,CAAC,CAAC,CAAC;YACjE,MAAM,IAAI,0BAAiB,CACzB,IAAA,0BAAa,EAAC,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,CAAC,CACjJ,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC;YAChD,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAzGY,4DAAwB;mCAAxB,wBAAwB;IADpC,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,CAyGpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/address-type/dto/create.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/address-type/dto/create.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;IAKpB,IAAI,EAAE,MAAM,CAAC;IASb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1C"}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateDTO = void 0;
|
|
13
13
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
class CreateDTO
|
|
15
|
+
class CreateDTO {
|
|
16
16
|
}
|
|
17
17
|
exports.CreateDTO = CreateDTO;
|
|
18
18
|
__decorate([
|
|
@@ -21,4 +21,13 @@ __decorate([
|
|
|
21
21
|
}),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], CreateDTO.prototype, "code", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsObject)({
|
|
26
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.localeMustBeObject', args.value),
|
|
27
|
+
}),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)({
|
|
29
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.localeRequired', args.value),
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], CreateDTO.prototype, "locale", void 0);
|
|
24
33
|
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/address-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/address-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAAiE;AAEjE,MAAa,SAAS;CAerB;AAfD,8BAeC;AAVC;IAJC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,6BAA6B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC3D,CAAC;;uCACW;AASb;IAPC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC7D,CAAC;IACD,IAAA,4BAAU,EAAC;QACV,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC1E,CAAC;;yCACuC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CreateDTO } from './create.dto';
|
|
2
2
|
declare const UpdateDTO_base: import("@nestjs/mapped-types").MappedType<Partial<CreateDTO>>;
|
|
3
3
|
export declare class UpdateDTO extends UpdateDTO_base {
|
|
4
|
+
locale?: Record<string, {
|
|
5
|
+
name: string;
|
|
6
|
+
}>;
|
|
4
7
|
}
|
|
5
8
|
export {};
|
|
6
9
|
//# sourceMappingURL=update.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/address-type/dto/update.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/address-type/dto/update.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;IAGnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3C"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.UpdateDTO = void 0;
|
|
4
13
|
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
5
15
|
const create_dto_1 = require("./create.dto");
|
|
6
16
|
class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
|
|
7
17
|
}
|
|
8
18
|
exports.UpdateDTO = UpdateDTO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsObject)(),
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
|
+
], UpdateDTO.prototype, "locale", void 0);
|
|
9
24
|
//# sourceMappingURL=update.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/address-type/dto/update.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/address-type/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAmD;AACnD,qDAAuD;AACvD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAIpD;AAJD,8BAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yCAC+B"}
|
|
@@ -12,11 +12,11 @@ export declare class PersonContactTypeController {
|
|
|
12
12
|
pageSize: number;
|
|
13
13
|
prev: number;
|
|
14
14
|
next: number;
|
|
15
|
-
data: any;
|
|
15
|
+
data: any[];
|
|
16
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<import("@prisma/client").Prisma.BatchPayload>;
|
|
17
|
+
get(id: number, locale: string): Promise<any>;
|
|
18
|
+
create(data: CreateDTO, locale: string): Promise<any>;
|
|
19
|
+
update(id: number, data: UpdateDTO, locale: string): Promise<any>;
|
|
20
|
+
delete(data: DeleteDTO, locale: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=contact-type.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-type.controller.d.ts","sourceRoot":"","sources":["../../src/contact-type/contact-type.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,2BAA2B;IAGpC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAAxB,wBAAwB,EAAE,wBAAwB;IAI/D,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"contact-type.controller.d.ts","sourceRoot":"","sources":["../../src/contact-type/contact-type.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,2BAA2B;IAGpC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAAxB,wBAAwB,EAAE,wBAAwB;IAI/D,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;IAKnE,MAAM,CAAS,IAAI,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM;IAKxD,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM;IAQ/F,MAAM,CAAS,IAAI,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM;CAG/D"}
|
|
@@ -27,20 +27,20 @@ let PersonContactTypeController = class PersonContactTypeController {
|
|
|
27
27
|
async list(locale, paginationParams) {
|
|
28
28
|
return this.personContactTypeService.list(locale, paginationParams);
|
|
29
29
|
}
|
|
30
|
-
async get(id) {
|
|
31
|
-
return this.personContactTypeService.get(id);
|
|
30
|
+
async get(id, locale) {
|
|
31
|
+
return this.personContactTypeService.get(id, locale);
|
|
32
32
|
}
|
|
33
|
-
async create(data) {
|
|
34
|
-
return this.personContactTypeService.create(data);
|
|
33
|
+
async create(data, locale) {
|
|
34
|
+
return this.personContactTypeService.create(data, locale);
|
|
35
35
|
}
|
|
36
|
-
async update(id, data) {
|
|
36
|
+
async update(id, data, locale) {
|
|
37
37
|
return this.personContactTypeService.update({
|
|
38
38
|
id,
|
|
39
39
|
data
|
|
40
|
-
});
|
|
40
|
+
}, locale);
|
|
41
41
|
}
|
|
42
|
-
async delete(data) {
|
|
43
|
-
return this.personContactTypeService.delete(data);
|
|
42
|
+
async delete(data, locale) {
|
|
43
|
+
return this.personContactTypeService.delete(data, locale);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
exports.PersonContactTypeController = PersonContactTypeController;
|
|
@@ -55,30 +55,34 @@ __decorate([
|
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, common_1.Get)(':id'),
|
|
57
57
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
58
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
58
59
|
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [Number]),
|
|
60
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
60
61
|
__metadata("design:returntype", Promise)
|
|
61
62
|
], PersonContactTypeController.prototype, "get", null);
|
|
62
63
|
__decorate([
|
|
63
64
|
(0, common_1.Post)(),
|
|
64
65
|
__param(0, (0, common_1.Body)()),
|
|
66
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
65
67
|
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
|
68
|
+
__metadata("design:paramtypes", [create_dto_1.CreateDTO, String]),
|
|
67
69
|
__metadata("design:returntype", Promise)
|
|
68
70
|
], PersonContactTypeController.prototype, "create", null);
|
|
69
71
|
__decorate([
|
|
70
72
|
(0, common_1.Patch)(':id'),
|
|
71
73
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
72
74
|
__param(1, (0, common_1.Body)()),
|
|
75
|
+
__param(2, (0, api_locale_1.Locale)()),
|
|
73
76
|
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
|
77
|
+
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO, String]),
|
|
75
78
|
__metadata("design:returntype", Promise)
|
|
76
79
|
], PersonContactTypeController.prototype, "update", null);
|
|
77
80
|
__decorate([
|
|
78
81
|
(0, common_1.Delete)(),
|
|
79
82
|
__param(0, (0, common_1.Body)()),
|
|
83
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
80
84
|
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [api_1.DeleteDTO]),
|
|
85
|
+
__metadata("design:paramtypes", [api_1.DeleteDTO, String]),
|
|
82
86
|
__metadata("design:returntype", Promise)
|
|
83
87
|
], PersonContactTypeController.prototype, "delete", null);
|
|
84
88
|
exports.PersonContactTypeController = PersonContactTypeController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-type.controller.js","sourceRoot":"","sources":["../../src/contact-type/contact-type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,iEAAkE;AAClE,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YAEmB,wBAAkD;QAAlD,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAW,MAAM,EAAgB,gBAAgB;QACzD,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACtE,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU;
|
|
1
|
+
{"version":3,"file":"contact-type.controller.js","sourceRoot":"","sources":["../../src/contact-type/contact-type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,iEAAkE;AAClE,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YAEmB,wBAAkD;QAAlD,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAW,MAAM,EAAgB,gBAAgB;QACzD,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACtE,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU,EAAY,MAAc;QACvE,OAAO,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe,EAAY,MAAc;QAC5D,OAAO,IAAI,CAAC,wBAAwB,CAA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AA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAwB,CAAC,CAAC,CAAA;qCACR,+CAAwB;GAH1D,2BAA2B,CAiCvC"}
|
|
@@ -17,14 +17,14 @@ export declare class PersonContactTypeService {
|
|
|
17
17
|
pageSize: number;
|
|
18
18
|
prev: number;
|
|
19
19
|
next: number;
|
|
20
|
-
data: any;
|
|
20
|
+
data: any[];
|
|
21
21
|
}>;
|
|
22
|
-
get(id: number): Promise<any>;
|
|
23
|
-
create(data: CreateDTO): Promise<any>;
|
|
22
|
+
get(id: number, locale: string): Promise<any>;
|
|
23
|
+
create(data: CreateDTO, locale: string): Promise<any>;
|
|
24
24
|
update({ id, data }: {
|
|
25
25
|
id: number;
|
|
26
26
|
data: UpdateDTO;
|
|
27
|
-
}): Promise<any>;
|
|
28
|
-
delete({ ids }: DeleteDTO, locale
|
|
27
|
+
}, locale: string): Promise<any>;
|
|
28
|
+
delete({ ids }: DeleteDTO, locale: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=contact-type.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,EAAiB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
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,EAAiB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,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,CAAqB;gBAI7B,aAAa,EAAE,aAAa,EAE5B,aAAa,EAAE,aAAa;IAGzC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAQpD,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAc9B,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;IActC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,EAAE,MAAM,EAAE,MAAM;IAyBpE,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;CAmChD"}
|
|
@@ -26,19 +26,49 @@ let PersonContactTypeService = class PersonContactTypeService {
|
|
|
26
26
|
async list(locale, paginationParams) {
|
|
27
27
|
return this.localeService.listModelWithLocale(locale, this.modelName, paginationParams);
|
|
28
28
|
}
|
|
29
|
-
async get(id) {
|
|
29
|
+
async get(id, locale) {
|
|
30
|
+
const contactType = await this.prismaService.contact_type.findUnique({
|
|
31
|
+
where: { id }
|
|
32
|
+
});
|
|
33
|
+
if (!contactType) {
|
|
34
|
+
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('contactTypeNotFound', locale, `Contact Type with ID ${id} not found`).replace('{{item}}', 'Contact Type'));
|
|
35
|
+
}
|
|
30
36
|
return this.localeService.getModelWithLocale(this.modelName, id);
|
|
31
37
|
}
|
|
32
|
-
async create(data) {
|
|
38
|
+
async create(data, locale) {
|
|
39
|
+
if (!data.locale || Object.keys(data.locale).length === 0) {
|
|
40
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('localeRequired', locale, 'At least one locale is required'));
|
|
41
|
+
}
|
|
33
42
|
return this.localeService.createModelWithLocale(this.modelName, this.foreignKey, data);
|
|
34
43
|
}
|
|
35
|
-
async update({ id, data }) {
|
|
44
|
+
async update({ id, data }, locale) {
|
|
45
|
+
const contactTypeExists = await this.prismaService.contact_type.findUnique({
|
|
46
|
+
where: { id }
|
|
47
|
+
});
|
|
48
|
+
if (!contactTypeExists) {
|
|
49
|
+
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('contactTypeNotFound', locale, `Contact Type with ID ${id} not found`).replace('{{item}}', 'Contact Type'));
|
|
50
|
+
}
|
|
51
|
+
if (data.locale && Object.keys(data.locale).length === 0) {
|
|
52
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('localeRequired', locale, 'At least one locale is required'));
|
|
53
|
+
}
|
|
36
54
|
return this.localeService.updateModelWithLocale(this.modelName, this.foreignKey, id, data);
|
|
37
55
|
}
|
|
38
|
-
async delete({ ids }, locale
|
|
56
|
+
async delete({ ids }, locale) {
|
|
39
57
|
if (ids == undefined || ids == null) {
|
|
40
58
|
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
41
59
|
}
|
|
60
|
+
const existingContactTypes = await this.prismaService.contact_type.findMany({
|
|
61
|
+
where: {
|
|
62
|
+
id: {
|
|
63
|
+
in: ids,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
if (existingContactTypes.length !== ids.length) {
|
|
68
|
+
const existingIds = existingContactTypes.map((item) => item.id);
|
|
69
|
+
const missingIds = ids.filter((id) => !existingIds.includes(id));
|
|
70
|
+
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('contactTypesNotFound', locale, `Contact Types with IDs ${missingIds.join(', ')} not found`).replace('{{items}}', 'Contact Types'));
|
|
71
|
+
}
|
|
42
72
|
return this.prismaService.contact_type.deleteMany({
|
|
43
73
|
where: {
|
|
44
74
|
id: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-type.service.js","sourceRoot":"","sources":["../../src/contact-type/contact-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAmE;AAEnE,oDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"contact-type.service.js","sourceRoot":"","sources":["../../src/contact-type/contact-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAmE;AAEnE,oDAAoD;AACpD,2CAMwB;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,iBAAiB,CAAC;IAO7C,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,EAAE,MAAc;QAClC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC;YACnE,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,0BAAiB,CACzB,IAAA,0BAAa,EAAC,qBAAqB,EAAE,MAAM,EAAE,wBAAwB,E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CAAC;IACL,CAAC;CACF,CAAA;AA3GY,4DAAwB;mCAAxB,wBAAwB;IADpC,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,CA2GpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/contact-type/dto/create.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/contact-type/dto/create.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;IAKpB,IAAI,EAAE,MAAM,CAAC;IASb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1C"}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateDTO = void 0;
|
|
13
13
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
class CreateDTO
|
|
15
|
+
class CreateDTO {
|
|
16
16
|
}
|
|
17
17
|
exports.CreateDTO = CreateDTO;
|
|
18
18
|
__decorate([
|
|
@@ -21,4 +21,13 @@ __decorate([
|
|
|
21
21
|
}),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], CreateDTO.prototype, "code", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsObject)({
|
|
26
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.localeMustBeObject', args.value),
|
|
27
|
+
}),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)({
|
|
29
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.localeRequired', args.value),
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], CreateDTO.prototype, "locale", void 0);
|
|
24
33
|
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/contact-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/contact-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAAiE;AAEjE,MAAa,SAAS;CAerB;AAfD,8BAeC;AAVC;IAJC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,6BAA6B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC3D,CAAC;;uCACW;AASb;IAPC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC7D,CAAC;IACD,IAAA,4BAAU,EAAC;QACV,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC1E,CAAC;;yCACuC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CreateDTO } from './create.dto';
|
|
2
2
|
declare const UpdateDTO_base: import("@nestjs/mapped-types").MappedType<Partial<CreateDTO>>;
|
|
3
3
|
export declare class UpdateDTO extends UpdateDTO_base {
|
|
4
|
+
locale?: Record<string, {
|
|
5
|
+
name: string;
|
|
6
|
+
}>;
|
|
4
7
|
}
|
|
5
8
|
export {};
|
|
6
9
|
//# sourceMappingURL=update.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/contact-type/dto/update.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/contact-type/dto/update.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;IAGnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3C"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.UpdateDTO = void 0;
|
|
4
13
|
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
5
15
|
const create_dto_1 = require("./create.dto");
|
|
6
16
|
class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
|
|
7
17
|
}
|
|
8
18
|
exports.UpdateDTO = UpdateDTO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsObject)(),
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
|
+
], UpdateDTO.prototype, "locale", void 0);
|
|
9
24
|
//# sourceMappingURL=update.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/contact-type/dto/update.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/contact-type/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAmD;AACnD,qDAAuD;AACvD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAIpD;AAJD,8BAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yCAC+B"}
|
|
@@ -12,11 +12,11 @@ export declare class PersonDocumentTypeController {
|
|
|
12
12
|
pageSize: number;
|
|
13
13
|
prev: number;
|
|
14
14
|
next: number;
|
|
15
|
-
data: any;
|
|
15
|
+
data: any[];
|
|
16
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<import("@prisma/client").Prisma.BatchPayload>;
|
|
17
|
+
get(id: number, locale: string): Promise<any>;
|
|
18
|
+
create(data: CreateDTO, locale: string): Promise<any>;
|
|
19
|
+
update(id: number, data: UpdateDTO, locale: string): Promise<any>;
|
|
20
|
+
delete(data: DeleteDTO, locale: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=document-type.controller.d.ts.map
|