@hed-hog/contact 0.0.52 → 0.0.55
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/contact.service.d.ts +16 -0
- package/dist/contact.service.d.ts.map +1 -1
- package/dist/document-type/dto/create.dto.js +1 -1
- package/dist/document-type/dto/create.dto.js.map +1 -1
- package/dist/person/address/address.controller.d.ts +2 -0
- package/dist/person/address/address.controller.d.ts.map +1 -1
- package/dist/person/address/address.service.d.ts +3 -1
- package/dist/person/address/address.service.d.ts.map +1 -1
- package/dist/person/address/address.service.js +3 -2
- package/dist/person/address/address.service.js.map +1 -1
- package/dist/person/contact/contact.controller.d.ts +2 -0
- package/dist/person/contact/contact.controller.d.ts.map +1 -1
- package/dist/person/contact/contact.service.d.ts +3 -1
- package/dist/person/contact/contact.service.d.ts.map +1 -1
- package/dist/person/contact/contact.service.js +3 -2
- package/dist/person/contact/contact.service.js.map +1 -1
- package/dist/person/document/document.controller.d.ts +2 -0
- package/dist/person/document/document.controller.d.ts.map +1 -1
- package/dist/person/document/document.service.d.ts +3 -1
- package/dist/person/document/document.service.d.ts.map +1 -1
- package/dist/person/document/document.service.js +3 -2
- package/dist/person/document/document.service.js.map +1 -1
- package/dist/person/person-company/person-company.controller.d.ts +6 -0
- package/dist/person/person-company/person-company.controller.d.ts.map +1 -1
- package/dist/person/person-company/person-company.service.d.ts +6 -0
- package/dist/person/person-company/person-company.service.d.ts.map +1 -1
- package/dist/person/person-individual/person-individual.controller.d.ts +4 -0
- package/dist/person/person-individual/person-individual.controller.d.ts.map +1 -1
- package/dist/person/person-individual/person-individual.service.d.ts +4 -0
- package/dist/person/person-individual/person-individual.service.d.ts.map +1 -1
- package/dist/person/person-metadata/person-metadata.controller.d.ts +2 -0
- package/dist/person/person-metadata/person-metadata.controller.d.ts.map +1 -1
- package/dist/person/person-metadata/person-metadata.service.d.ts +3 -1
- package/dist/person/person-metadata/person-metadata.service.d.ts.map +1 -1
- package/dist/person/person-metadata/person-metadata.service.js +3 -2
- package/dist/person/person-metadata/person-metadata.service.js.map +1 -1
- package/dist/person/person-relation/person-relation.controller.d.ts +4 -0
- package/dist/person/person-relation/person-relation.controller.d.ts.map +1 -1
- package/dist/person/person-relation/person-relation.service.d.ts +5 -1
- package/dist/person/person-relation/person-relation.service.d.ts.map +1 -1
- package/dist/person/person-relation/person-relation.service.js +3 -2
- package/dist/person/person-relation/person-relation.service.js.map +1 -1
- package/dist/person-relation-type/dto/create.dto.d.ts.map +1 -1
- package/dist/person-relation-type/dto/create.dto.js +3 -1
- package/dist/person-relation-type/dto/create.dto.js.map +1 -1
- package/dist/person-relation-type/person-relation-type.service.d.ts +1 -1
- package/dist/person-relation-type/person-relation-type.service.d.ts.map +1 -1
- package/dist/person-relation-type/person-relation-type.service.js +2 -2
- package/dist/person-relation-type/person-relation-type.service.js.map +1 -1
- package/hedhog/table/address.yaml +1 -0
- package/hedhog/table/address_type.yaml +2 -0
- package/hedhog/table/contact.yaml +1 -0
- package/hedhog/table/contact_type.yaml +1 -0
- package/hedhog/table/document.yaml +1 -0
- package/hedhog/table/document_type.yaml +2 -0
- package/hedhog/table/person_company.yaml +2 -0
- package/hedhog/table/person_individual.yaml +2 -0
- package/hedhog/table/person_metadata.yaml +1 -0
- package/hedhog/table/person_relation.yaml +1 -0
- package/hedhog/table/person_relation_type.yaml +2 -0
- package/package.json +4 -4
- package/src/document-type/dto/create.dto.ts +1 -1
- package/src/person/address/address.service.ts +7 -2
- package/src/person/contact/contact.service.ts +9 -4
- package/src/person/document/document.service.ts +7 -2
- package/src/person/person-metadata/person-metadata.service.ts +7 -2
- package/src/person/person-relation/person-relation.service.ts +7 -2
- package/src/person-relation-type/dto/create.dto.ts +5 -2
- package/src/person-relation-type/person-relation-type.service.ts +11 -7
|
@@ -23,6 +23,7 @@ export declare class ContactService {
|
|
|
23
23
|
line2: string;
|
|
24
24
|
is_primary: boolean;
|
|
25
25
|
created_at: Date;
|
|
26
|
+
updated_at: Date;
|
|
26
27
|
}[];
|
|
27
28
|
contact: {
|
|
28
29
|
value: string;
|
|
@@ -30,6 +31,7 @@ export declare class ContactService {
|
|
|
30
31
|
person_id: number;
|
|
31
32
|
is_primary: boolean;
|
|
32
33
|
created_at: Date;
|
|
34
|
+
updated_at: Date;
|
|
33
35
|
contact_type_id: number;
|
|
34
36
|
}[];
|
|
35
37
|
document: {
|
|
@@ -37,6 +39,7 @@ export declare class ContactService {
|
|
|
37
39
|
id: number;
|
|
38
40
|
person_id: number;
|
|
39
41
|
created_at: Date;
|
|
42
|
+
updated_at: Date;
|
|
40
43
|
document_type_id: number;
|
|
41
44
|
}[];
|
|
42
45
|
person_metadata: {
|
|
@@ -44,6 +47,7 @@ export declare class ContactService {
|
|
|
44
47
|
id: number;
|
|
45
48
|
person_id: number;
|
|
46
49
|
created_at: Date;
|
|
50
|
+
updated_at: Date;
|
|
47
51
|
key: string;
|
|
48
52
|
}[];
|
|
49
53
|
} & {
|
|
@@ -68,6 +72,7 @@ export declare class ContactService {
|
|
|
68
72
|
line2: string;
|
|
69
73
|
is_primary: boolean;
|
|
70
74
|
created_at: Date;
|
|
75
|
+
updated_at: Date;
|
|
71
76
|
}[];
|
|
72
77
|
contact: {
|
|
73
78
|
value: string;
|
|
@@ -75,6 +80,7 @@ export declare class ContactService {
|
|
|
75
80
|
person_id: number;
|
|
76
81
|
is_primary: boolean;
|
|
77
82
|
created_at: Date;
|
|
83
|
+
updated_at: Date;
|
|
78
84
|
contact_type_id: number;
|
|
79
85
|
}[];
|
|
80
86
|
document: {
|
|
@@ -82,6 +88,7 @@ export declare class ContactService {
|
|
|
82
88
|
id: number;
|
|
83
89
|
person_id: number;
|
|
84
90
|
created_at: Date;
|
|
91
|
+
updated_at: Date;
|
|
85
92
|
document_type_id: number;
|
|
86
93
|
}[];
|
|
87
94
|
person_metadata: {
|
|
@@ -89,6 +96,7 @@ export declare class ContactService {
|
|
|
89
96
|
id: number;
|
|
90
97
|
person_id: number;
|
|
91
98
|
created_at: Date;
|
|
99
|
+
updated_at: Date;
|
|
92
100
|
key: string;
|
|
93
101
|
}[];
|
|
94
102
|
} & {
|
|
@@ -115,6 +123,7 @@ export declare class ContactService {
|
|
|
115
123
|
line2: string;
|
|
116
124
|
is_primary: boolean;
|
|
117
125
|
created_at: Date;
|
|
126
|
+
updated_at: Date;
|
|
118
127
|
}[];
|
|
119
128
|
contact: {
|
|
120
129
|
value: string;
|
|
@@ -122,6 +131,7 @@ export declare class ContactService {
|
|
|
122
131
|
person_id: number;
|
|
123
132
|
is_primary: boolean;
|
|
124
133
|
created_at: Date;
|
|
134
|
+
updated_at: Date;
|
|
125
135
|
contact_type_id: number;
|
|
126
136
|
}[];
|
|
127
137
|
document: {
|
|
@@ -129,6 +139,7 @@ export declare class ContactService {
|
|
|
129
139
|
id: number;
|
|
130
140
|
person_id: number;
|
|
131
141
|
created_at: Date;
|
|
142
|
+
updated_at: Date;
|
|
132
143
|
document_type_id: number;
|
|
133
144
|
}[];
|
|
134
145
|
person_metadata: {
|
|
@@ -136,6 +147,7 @@ export declare class ContactService {
|
|
|
136
147
|
id: number;
|
|
137
148
|
person_id: number;
|
|
138
149
|
created_at: Date;
|
|
150
|
+
updated_at: Date;
|
|
139
151
|
key: string;
|
|
140
152
|
}[];
|
|
141
153
|
} & {
|
|
@@ -155,6 +167,7 @@ export declare class ContactService {
|
|
|
155
167
|
person_id: number;
|
|
156
168
|
is_primary: boolean;
|
|
157
169
|
created_at: Date;
|
|
170
|
+
updated_at: Date;
|
|
158
171
|
contact_type_id: number;
|
|
159
172
|
}>;
|
|
160
173
|
addDocumentIfNotExists(personId: number, value: string, typeId: number): Promise<{
|
|
@@ -162,6 +175,7 @@ export declare class ContactService {
|
|
|
162
175
|
id: number;
|
|
163
176
|
person_id: number;
|
|
164
177
|
created_at: Date;
|
|
178
|
+
updated_at: Date;
|
|
165
179
|
document_type_id: number;
|
|
166
180
|
}>;
|
|
167
181
|
getPersonContact(personId: number, typeId: PersonContactTypeEnum): Promise<{
|
|
@@ -170,6 +184,7 @@ export declare class ContactService {
|
|
|
170
184
|
person_id: number;
|
|
171
185
|
is_primary: boolean;
|
|
172
186
|
created_at: Date;
|
|
187
|
+
updated_at: Date;
|
|
173
188
|
contact_type_id: number;
|
|
174
189
|
}>;
|
|
175
190
|
getPersonDocument(personId: number, typeId: PersonDocumentTypeEnum): Promise<{
|
|
@@ -177,6 +192,7 @@ export declare class ContactService {
|
|
|
177
192
|
id: number;
|
|
178
193
|
person_id: number;
|
|
179
194
|
created_at: Date;
|
|
195
|
+
updated_at: Date;
|
|
180
196
|
document_type_id: number;
|
|
181
197
|
}>;
|
|
182
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.service.d.ts","sourceRoot":"","sources":["../src/contact.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAG5E,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAHV,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU;IAGnC,SAAS,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"contact.service.d.ts","sourceRoot":"","sources":["../src/contact.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAG5E,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAHV,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU;IAGnC,SAAS,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAc1B,4BAA4B,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqGR,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IAsBrE,sBAAsB,CAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;;;;;;;;IAuBV,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB;;;;;;;;;IAShE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB;;;;;;;;CAQzE"}
|
|
@@ -23,7 +23,7 @@ __decorate([
|
|
|
23
23
|
], CreateDTO.prototype, "code", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, class_validator_1.IsString)({
|
|
26
|
-
message: (args) => (0, api_locale_1.getLocaleText)('validation.
|
|
26
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.countryCodeMustBeString', args.value),
|
|
27
27
|
}),
|
|
28
28
|
__metadata("design:type", String)
|
|
29
29
|
], CreateDTO.prototype, "country_code", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/document-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmE;AACnE,qDAAsD;AAEtD,MAAa,SAAU,SAAQ,0BAAa;CAe3C;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;AAMb;IAJC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/document-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmE;AACnE,qDAAsD;AAEtD,MAAa,SAAU,SAAQ,0BAAa;CAe3C;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;AAMb;IAJC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,oCAAoC,EAAE,IAAI,CAAC,KAAK,CAAC;KAClE,CAAC;;+CACmB;AAGrB;IADC,IAAA,2BAAS,GAAE;;4CACO"}
|
|
@@ -17,6 +17,7 @@ export declare class PersonAddressController {
|
|
|
17
17
|
line2: string;
|
|
18
18
|
is_primary: boolean;
|
|
19
19
|
created_at: Date;
|
|
20
|
+
updated_at: Date;
|
|
20
21
|
}>;
|
|
21
22
|
list(personId: number, paginationParams: any): Promise<{
|
|
22
23
|
total: any;
|
|
@@ -39,6 +40,7 @@ export declare class PersonAddressController {
|
|
|
39
40
|
line2: string;
|
|
40
41
|
is_primary: boolean;
|
|
41
42
|
created_at: Date;
|
|
43
|
+
updated_at: Date;
|
|
42
44
|
}>;
|
|
43
45
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
44
46
|
delete(personId: number, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.controller.d.ts","sourceRoot":"","sources":["../../../src/person/address/address.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"address.controller.d.ts","sourceRoot":"","sources":["../../../src/person/address/address.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,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"}
|
|
@@ -19,6 +19,7 @@ export declare class PersonAddressService {
|
|
|
19
19
|
line2: string;
|
|
20
20
|
is_primary: boolean;
|
|
21
21
|
created_at: Date;
|
|
22
|
+
updated_at: Date;
|
|
22
23
|
}>;
|
|
23
24
|
get(personId: number, id: number): Promise<{
|
|
24
25
|
id: number;
|
|
@@ -32,6 +33,7 @@ export declare class PersonAddressService {
|
|
|
32
33
|
line2: string;
|
|
33
34
|
is_primary: boolean;
|
|
34
35
|
created_at: Date;
|
|
36
|
+
updated_at: Date;
|
|
35
37
|
}>;
|
|
36
38
|
list(paginationParams: PaginationDTO, personId?: number): Promise<{
|
|
37
39
|
total: any;
|
|
@@ -43,6 +45,6 @@ export declare class PersonAddressService {
|
|
|
43
45
|
data: any;
|
|
44
46
|
}>;
|
|
45
47
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
46
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
48
|
+
delete(personId: number, { ids }: DeleteDTO, locale?: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
47
49
|
}
|
|
48
50
|
//# sourceMappingURL=address.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.service.d.ts","sourceRoot":"","sources":["../../../src/person/address/address.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"address.service.d.ts","sourceRoot":"","sources":["../../../src/person/address/address.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,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,oBAAoB;IAE7B,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;;;;;;;;;;;;;;IAgBxC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;IAShC,IAAI,CAAC,gBAAgB,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;IAiBvD,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,EAAE,MAAM,GAAE,MAAa;CAoBzE"}
|
|
@@ -21,6 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.PersonAddressService = void 0;
|
|
24
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
24
25
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
25
26
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
26
27
|
const common_1 = require("@nestjs/common");
|
|
@@ -64,9 +65,9 @@ let PersonAddressService = class PersonAddressService {
|
|
|
64
65
|
data
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
async delete(personId, { ids }) {
|
|
68
|
+
async delete(personId, { ids }, locale = 'en') {
|
|
68
69
|
if (ids == undefined || ids == null) {
|
|
69
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
70
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
70
71
|
}
|
|
71
72
|
return this.prismaService.address.deleteMany({
|
|
72
73
|
where: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.service.js","sourceRoot":"","sources":["../../../src/person/address/address.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,MAAM,EAAE,eAAe,KAAqB,IAAI,EAApB,WAAW,UAAK,IAAI,EAA1C,mBAAmC,CAAO,CAAC;QACjD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;YACvC,IAAI,kCACC,WAAW,KACd,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE,EAC9B,MAAM,EAAE;oBACN,OAAO,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;iBAC1B,EACD,YAAY,EAAE;oBACZ,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE;iBACjC,GACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC;YAC1C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,OAAO,kBAExB,MAAM,EACJ,4DAA4D,IAC3D,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa;
|
|
1
|
+
{"version":3,"file":"address.service.js","sourceRoot":"","sources":["../../../src/person/address/address.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,MAAM,EAAE,eAAe,KAAqB,IAAI,EAApB,WAAW,UAAK,IAAI,EAA1C,mBAAmC,CAAO,CAAC;QACjD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;YACvC,IAAI,kCACC,WAAW,KACd,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE,EAC9B,MAAM,EAAE;oBACN,OAAO,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;iBAC1B,EACD,YAAY,EAAE;oBACZ,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE;iBACjC,GACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC;YAC1C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,OAAO,kBAExB,MAAM,EACJ,4DAA4D,IAC3D,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa,EAAE,SAAiB,IAAI;QACtE,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,IAAA,0BAAa,EACX,qBAAqB,EACrB,MAAM,EACN,8CAA8C,CAC/C,CACF,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA9EY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAGuB,0BAAa;QACT,kCAAiB;GAH5C,oBAAoB,CA8EhC"}
|
|
@@ -11,6 +11,7 @@ export declare class PersonContactController {
|
|
|
11
11
|
person_id: number;
|
|
12
12
|
is_primary: boolean;
|
|
13
13
|
created_at: Date;
|
|
14
|
+
updated_at: Date;
|
|
14
15
|
contact_type_id: number;
|
|
15
16
|
}>;
|
|
16
17
|
list(personId: number, paginationParams: any): Promise<{
|
|
@@ -28,6 +29,7 @@ export declare class PersonContactController {
|
|
|
28
29
|
person_id: number;
|
|
29
30
|
is_primary: boolean;
|
|
30
31
|
created_at: Date;
|
|
32
|
+
updated_at: Date;
|
|
31
33
|
contact_type_id: number;
|
|
32
34
|
}>;
|
|
33
35
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.controller.d.ts","sourceRoot":"","sources":["../../../src/person/contact/contact.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"contact.controller.d.ts","sourceRoot":"","sources":["../../../src/person/contact/contact.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,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"}
|
|
@@ -13,6 +13,7 @@ export declare class PersonContactService {
|
|
|
13
13
|
person_id: number;
|
|
14
14
|
is_primary: boolean;
|
|
15
15
|
created_at: Date;
|
|
16
|
+
updated_at: Date;
|
|
16
17
|
contact_type_id: number;
|
|
17
18
|
}>;
|
|
18
19
|
get(personId: number, id: number): Promise<{
|
|
@@ -21,6 +22,7 @@ export declare class PersonContactService {
|
|
|
21
22
|
person_id: number;
|
|
22
23
|
is_primary: boolean;
|
|
23
24
|
created_at: Date;
|
|
25
|
+
updated_at: Date;
|
|
24
26
|
contact_type_id: number;
|
|
25
27
|
}>;
|
|
26
28
|
list(paginationParams: PaginationDTO, personId?: number): Promise<{
|
|
@@ -33,6 +35,6 @@ export declare class PersonContactService {
|
|
|
33
35
|
data: any;
|
|
34
36
|
}>;
|
|
35
37
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
36
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
38
|
+
delete(personId: number, { ids }: DeleteDTO, locale?: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
37
39
|
}
|
|
38
40
|
//# sourceMappingURL=contact.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.service.d.ts","sourceRoot":"","sources":["../../../src/person/contact/contact.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"contact.service.d.ts","sourceRoot":"","sources":["../../../src/person/contact/contact.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,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,oBAAoB;IAE7B,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,EAAE,MAAM,GAAE,MAAa;CAoBzE"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PersonContactService = void 0;
|
|
13
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
13
14
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
14
15
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
15
16
|
const common_1 = require("@nestjs/common");
|
|
@@ -48,9 +49,9 @@ let PersonContactService = class PersonContactService {
|
|
|
48
49
|
data
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
async delete(personId, { ids }) {
|
|
52
|
+
async delete(personId, { ids }, locale = 'en') {
|
|
52
53
|
if (ids == undefined || ids == null) {
|
|
53
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
54
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
54
55
|
}
|
|
55
56
|
return this.prismaService.contact.deleteMany({
|
|
56
57
|
where: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.service.js","sourceRoot":"","sources":["../../../src/person/contact/contact.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;YACvC,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC;YAC1C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,OAAO,kBAExB,MAAM,EAAE,kBAAkB,IACvB,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa;
|
|
1
|
+
{"version":3,"file":"contact.service.js","sourceRoot":"","sources":["../../../src/person/contact/contact.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;YACvC,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC;YAC1C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,OAAO,kBAExB,MAAM,EAAE,kBAAkB,IACvB,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa,EAAE,SAAiB,IAAI;QACtE,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,IAAA,0BAAa,EACX,qBAAqB,EACrB,MAAM,EACN,8CAA8C,CAC/C,CACF,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtEY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAGuB,0BAAa;QACT,kCAAiB;GAH5C,oBAAoB,CAsEhC"}
|
|
@@ -10,6 +10,7 @@ export declare class PersonDocumentController {
|
|
|
10
10
|
id: number;
|
|
11
11
|
person_id: number;
|
|
12
12
|
created_at: Date;
|
|
13
|
+
updated_at: Date;
|
|
13
14
|
document_type_id: number;
|
|
14
15
|
}>;
|
|
15
16
|
list(personId: number, paginationParams: any): Promise<{
|
|
@@ -26,6 +27,7 @@ export declare class PersonDocumentController {
|
|
|
26
27
|
id: number;
|
|
27
28
|
person_id: number;
|
|
28
29
|
created_at: Date;
|
|
30
|
+
updated_at: Date;
|
|
29
31
|
document_type_id: number;
|
|
30
32
|
}>;
|
|
31
33
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.controller.d.ts","sourceRoot":"","sources":["../../../src/person/document/document.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAEa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBAArB,qBAAqB,EAAE,qBAAqB;IAI/D,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"document.controller.d.ts","sourceRoot":"","sources":["../../../src/person/document/document.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,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"}
|
|
@@ -12,6 +12,7 @@ export declare class PersonDocumentService {
|
|
|
12
12
|
id: number;
|
|
13
13
|
person_id: number;
|
|
14
14
|
created_at: Date;
|
|
15
|
+
updated_at: Date;
|
|
15
16
|
document_type_id: number;
|
|
16
17
|
}>;
|
|
17
18
|
get(personId: number, id: number): Promise<{
|
|
@@ -19,6 +20,7 @@ export declare class PersonDocumentService {
|
|
|
19
20
|
id: number;
|
|
20
21
|
person_id: number;
|
|
21
22
|
created_at: Date;
|
|
23
|
+
updated_at: Date;
|
|
22
24
|
document_type_id: number;
|
|
23
25
|
}>;
|
|
24
26
|
list(paginationParams: PaginationDTO, personId?: number): Promise<{
|
|
@@ -31,6 +33,6 @@ export declare class PersonDocumentService {
|
|
|
31
33
|
data: any;
|
|
32
34
|
}>;
|
|
33
35
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
34
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
36
|
+
delete(personId: number, { ids }: DeleteDTO, locale?: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
35
37
|
}
|
|
36
38
|
//# sourceMappingURL=document.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.service.d.ts","sourceRoot":"","sources":["../../../src/person/document/document.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"document.service.d.ts","sourceRoot":"","sources":["../../../src/person/document/document.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,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,EAAE,MAAM,GAAE,MAAa;CAoBzE"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PersonDocumentService = void 0;
|
|
13
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
13
14
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
14
15
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
15
16
|
const common_1 = require("@nestjs/common");
|
|
@@ -48,9 +49,9 @@ let PersonDocumentService = class PersonDocumentService {
|
|
|
48
49
|
data
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
async delete(personId, { ids }) {
|
|
52
|
+
async delete(personId, { ids }, locale = 'en') {
|
|
52
53
|
if (ids == undefined || ids == null) {
|
|
53
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
54
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
54
55
|
}
|
|
55
56
|
return this.prismaService.document.deleteMany({
|
|
56
57
|
where: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.service.js","sourceRoot":"","sources":["../../../src/person/document/document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxC,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,QAAQ,kBAEzB,MAAM,EAAE,OAAO,IACZ,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa;
|
|
1
|
+
{"version":3,"file":"document.service.js","sourceRoot":"","sources":["../../../src/person/document/document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxC,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,QAAQ,kBAEzB,MAAM,EAAE,OAAO,IACZ,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa,EAAE,SAAiB,IAAI;QACtE,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,IAAA,0BAAa,EACX,qBAAqB,EACrB,MAAM,EACN,8CAA8C,CAC/C,CACF,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtEY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAGuB,0BAAa;QACT,kCAAiB;GAH5C,qBAAqB,CAsEjC"}
|
|
@@ -6,16 +6,22 @@ export declare class PersonCompanyController {
|
|
|
6
6
|
constructor(personCompanyService: PersonCompanyService);
|
|
7
7
|
create(personId: number, data: CreateDTO): Promise<{
|
|
8
8
|
id: number;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at: Date;
|
|
9
11
|
foundation_date: Date;
|
|
10
12
|
legal_nature: string;
|
|
11
13
|
}>;
|
|
12
14
|
get(personId: number): Promise<{
|
|
13
15
|
id: number;
|
|
16
|
+
created_at: Date;
|
|
17
|
+
updated_at: Date;
|
|
14
18
|
foundation_date: Date;
|
|
15
19
|
legal_nature: string;
|
|
16
20
|
}>;
|
|
17
21
|
update(personId: number, data: UpdateDTO): Promise<{
|
|
18
22
|
id: number;
|
|
23
|
+
created_at: Date;
|
|
24
|
+
updated_at: Date;
|
|
19
25
|
foundation_date: Date;
|
|
20
26
|
legal_nature: string;
|
|
21
27
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-company.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-company/person-company.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"person-company.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-company/person-company.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;;;;;;;IAMzB,GAAG,CAAkC,QAAQ,EAAE,MAAM;;;;;;;IAKrD,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;;;;;;;CAI1B"}
|
|
@@ -6,16 +6,22 @@ export declare class PersonCompanyService {
|
|
|
6
6
|
constructor(prismaService: PrismaService);
|
|
7
7
|
create(data: CreateDTO): Promise<{
|
|
8
8
|
id: number;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at: Date;
|
|
9
11
|
foundation_date: Date;
|
|
10
12
|
legal_nature: string;
|
|
11
13
|
}>;
|
|
12
14
|
get(personId: number): Promise<{
|
|
13
15
|
id: number;
|
|
16
|
+
created_at: Date;
|
|
17
|
+
updated_at: Date;
|
|
14
18
|
foundation_date: Date;
|
|
15
19
|
legal_nature: string;
|
|
16
20
|
}>;
|
|
17
21
|
update(personId: number, data: UpdateDTO): Promise<{
|
|
18
22
|
id: number;
|
|
23
|
+
created_at: Date;
|
|
24
|
+
updated_at: Date;
|
|
19
25
|
foundation_date: Date;
|
|
20
26
|
legal_nature: string;
|
|
21
27
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-company.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-company/person-company.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,MAAM,CAAC,IAAI,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"person-company.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-company/person-company.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,MAAM,CAAC,IAAI,EAAE,SAAS;;;;;;;IAMtB,GAAG,CAAC,QAAQ,EAAE,MAAM;;;;;;;IAQpB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS;;;;;;;CAQ/C"}
|
|
@@ -7,11 +7,15 @@ export declare class PersonIndividualController {
|
|
|
7
7
|
create(personId: number, data: CreateDTO): Promise<any>;
|
|
8
8
|
get(personId: number): Promise<{
|
|
9
9
|
id: number;
|
|
10
|
+
created_at: Date;
|
|
11
|
+
updated_at: Date;
|
|
10
12
|
birth_date: Date;
|
|
11
13
|
gender: import("@prisma/client").$Enums.person_individual_gender_enum;
|
|
12
14
|
}>;
|
|
13
15
|
update(personId: number, data: UpdateDTO): Promise<{
|
|
14
16
|
id: number;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date;
|
|
15
19
|
birth_date: Date;
|
|
16
20
|
gender: import("@prisma/client").$Enums.person_individual_gender_enum;
|
|
17
21
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-individual.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-individual/person-individual.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAEa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAAvB,uBAAuB,EAAE,uBAAuB;IAInE,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IAMzB,GAAG,CAAkC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"person-individual.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-individual/person-individual.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAEa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAAvB,uBAAuB,EAAE,uBAAuB;IAInE,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IAMzB,GAAG,CAAkC,QAAQ,EAAE,MAAM;;;;;;;IAKrD,MAAM,CAC6B,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;;;;;;;CAI1B"}
|
|
@@ -7,11 +7,15 @@ export declare class PersonIndividualService {
|
|
|
7
7
|
create(personId: number, { birth_date, gender }: CreateDTO): Promise<any>;
|
|
8
8
|
get(personId: number): Promise<{
|
|
9
9
|
id: number;
|
|
10
|
+
created_at: Date;
|
|
11
|
+
updated_at: Date;
|
|
10
12
|
birth_date: Date;
|
|
11
13
|
gender: import("@prisma/client").$Enums.person_individual_gender_enum;
|
|
12
14
|
}>;
|
|
13
15
|
update(personId: number, data: UpdateDTO): Promise<{
|
|
14
16
|
id: number;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date;
|
|
15
19
|
birth_date: Date;
|
|
16
20
|
gender: import("@prisma/client").$Enums.person_individual_gender_enum;
|
|
17
21
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-individual.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-individual/person-individual.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC,EAAE,SAAS;IAUxD,GAAG,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"person-individual.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-individual/person-individual.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC,EAAE,SAAS;IAUxD,GAAG,CAAC,QAAQ,EAAE,MAAM;;;;;;;IAQpB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS;;;;;;;CAQ/C"}
|
|
@@ -10,6 +10,7 @@ export declare class PersonMetadataController {
|
|
|
10
10
|
id: number;
|
|
11
11
|
person_id: number;
|
|
12
12
|
created_at: Date;
|
|
13
|
+
updated_at: Date;
|
|
13
14
|
key: string;
|
|
14
15
|
}>;
|
|
15
16
|
list(personId: number, paginationParams: any): Promise<{
|
|
@@ -26,6 +27,7 @@ export declare class PersonMetadataController {
|
|
|
26
27
|
id: number;
|
|
27
28
|
person_id: number;
|
|
28
29
|
created_at: Date;
|
|
30
|
+
updated_at: Date;
|
|
29
31
|
key: string;
|
|
30
32
|
}>;
|
|
31
33
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -12,6 +12,7 @@ export declare class PersonMetadataService {
|
|
|
12
12
|
id: number;
|
|
13
13
|
person_id: number;
|
|
14
14
|
created_at: Date;
|
|
15
|
+
updated_at: Date;
|
|
15
16
|
key: string;
|
|
16
17
|
}>;
|
|
17
18
|
get(personId: number, id: number): Promise<{
|
|
@@ -19,6 +20,7 @@ export declare class PersonMetadataService {
|
|
|
19
20
|
id: number;
|
|
20
21
|
person_id: number;
|
|
21
22
|
created_at: Date;
|
|
23
|
+
updated_at: Date;
|
|
22
24
|
key: string;
|
|
23
25
|
}>;
|
|
24
26
|
list(paginationParams: PaginationDTO, personId?: number): Promise<{
|
|
@@ -31,6 +33,6 @@ export declare class PersonMetadataService {
|
|
|
31
33
|
data: any;
|
|
32
34
|
}>;
|
|
33
35
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
34
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
36
|
+
delete(personId: number, { ids }: DeleteDTO, locale?: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
35
37
|
}
|
|
36
38
|
//# sourceMappingURL=person-metadata.service.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAEzC,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,EAAE,MAAM,GAAE,MAAa;CAoBzE"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PersonMetadataService = void 0;
|
|
13
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
13
14
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
14
15
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
15
16
|
const common_1 = require("@nestjs/common");
|
|
@@ -48,9 +49,9 @@ let PersonMetadataService = class PersonMetadataService {
|
|
|
48
49
|
data
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
async delete(personId, { ids }) {
|
|
52
|
+
async delete(personId, { ids }, locale = 'en') {
|
|
52
53
|
if (ids == undefined || ids == null) {
|
|
53
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
54
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
54
55
|
}
|
|
55
56
|
return this.prismaService.person_metadata.deleteMany({
|
|
56
57
|
where: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-metadata.service.js","sourceRoot":"","sources":["../../../src/person/person-metadata/person-metadata.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC;YAC/C,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC;YAClD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,eAAe,kBAEhC,MAAM,EAAE,WAAW,IAChB,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa;
|
|
1
|
+
{"version":3,"file":"person-metadata.service.js","sourceRoot":"","sources":["../../../src/person/person-metadata/person-metadata.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC;YAC/C,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC;YAClD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,eAAe,kBAEhC,MAAM,EAAE,WAAW,IAChB,gBAAgB,GAErB;YACE,KAAK;SACN,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa,EAAE,SAAiB,IAAI;QACtE,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,IAAA,0BAAa,EACX,qBAAqB,EACrB,MAAM,EACN,8CAA8C,CAC/C,CACF,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;AAtEY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAGuB,0BAAa;QACT,kCAAiB;GAH5C,qBAAqB,CAsEjC"}
|
|
@@ -9,6 +9,7 @@ export declare class PersonRelationController {
|
|
|
9
9
|
id: number;
|
|
10
10
|
person_id: number;
|
|
11
11
|
created_at: Date;
|
|
12
|
+
updated_at: Date;
|
|
12
13
|
related_person_id: number;
|
|
13
14
|
relation_type_id: number;
|
|
14
15
|
}>;
|
|
@@ -33,11 +34,14 @@ export declare class PersonRelationController {
|
|
|
33
34
|
person_relation_type: {
|
|
34
35
|
code: string;
|
|
35
36
|
id: number;
|
|
37
|
+
created_at: Date;
|
|
38
|
+
updated_at: Date;
|
|
36
39
|
};
|
|
37
40
|
} & {
|
|
38
41
|
id: number;
|
|
39
42
|
person_id: number;
|
|
40
43
|
created_at: Date;
|
|
44
|
+
updated_at: Date;
|
|
41
45
|
related_person_id: number;
|
|
42
46
|
relation_type_id: number;
|
|
43
47
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-relation.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-relation/person-relation.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
|
|
1
|
+
{"version":3,"file":"person-relation.controller.d.ts","sourceRoot":"","sources":["../../../src/person/person-relation/person-relation.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"}
|
|
@@ -11,6 +11,7 @@ export declare class PersonRelationService {
|
|
|
11
11
|
id: number;
|
|
12
12
|
person_id: number;
|
|
13
13
|
created_at: Date;
|
|
14
|
+
updated_at: Date;
|
|
14
15
|
related_person_id: number;
|
|
15
16
|
relation_type_id: number;
|
|
16
17
|
}>;
|
|
@@ -26,11 +27,14 @@ export declare class PersonRelationService {
|
|
|
26
27
|
person_relation_type: {
|
|
27
28
|
code: string;
|
|
28
29
|
id: number;
|
|
30
|
+
created_at: Date;
|
|
31
|
+
updated_at: Date;
|
|
29
32
|
};
|
|
30
33
|
} & {
|
|
31
34
|
id: number;
|
|
32
35
|
person_id: number;
|
|
33
36
|
created_at: Date;
|
|
37
|
+
updated_at: Date;
|
|
34
38
|
related_person_id: number;
|
|
35
39
|
relation_type_id: number;
|
|
36
40
|
}>;
|
|
@@ -44,6 +48,6 @@ export declare class PersonRelationService {
|
|
|
44
48
|
data: any;
|
|
45
49
|
}>;
|
|
46
50
|
update(personId: number, id: number, data: UpdateDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
47
|
-
delete(personId: number, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
51
|
+
delete(personId: number, { ids }: DeleteDTO, locale?: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
48
52
|
}
|
|
49
53
|
//# sourceMappingURL=person-relation.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-relation.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-relation/person-relation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"person-relation.service.d.ts","sourceRoot":"","sources":["../../../src/person/person-relation/person-relation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,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;;;;;;;;;;;;;;;;;;;;;;;IAahC,IAAI,CAAC,gBAAgB,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;IAoBvD,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,EAAE,MAAM,GAAE,MAAa;CAoBzE"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PersonRelationService = void 0;
|
|
13
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
13
14
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
14
15
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
15
16
|
const common_1 = require("@nestjs/common");
|
|
@@ -56,9 +57,9 @@ let PersonRelationService = class PersonRelationService {
|
|
|
56
57
|
data
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
async delete(personId, { ids }) {
|
|
60
|
+
async delete(personId, { ids }, locale = 'en') {
|
|
60
61
|
if (ids == undefined || ids == null) {
|
|
61
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
62
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
62
63
|
}
|
|
63
64
|
return this.prismaService.person_relation.deleteMany({
|
|
64
65
|
where: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-relation.service.js","sourceRoot":"","sources":["../../../src/person/person-relation/person-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC;YAC/C,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC;YAClD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,OAAO,EAAE;gBACP,oBAAoB,EAAE,IAAI;gBAC1B,gDAAgD,EAAE,IAAI;aACvD;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,eAAe,kBAEhC,MAAM,EAAE,oCAAoC,IACzC,gBAAgB,GAErB;YACE,KAAK;YACL,OAAO,EAAE;gBACP,oBAAoB,EAAE,IAAI;gBAC1B,gDAAgD,EAAE,IAAI;aACvD;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa;
|
|
1
|
+
{"version":3,"file":"person-relation.service.js","sourceRoot":"","sources":["../../../src/person/person-relation/person-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAGwB;AAKjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,aAA4B,EAC5B,iBAAoC;QADpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,IAAe;QAC5C,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC;YAC/C,IAAI,kBACF,SAAS,EAAE,QAAQ,IAChB,IAAI,CACR;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAU;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC;YAClD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,OAAO,EAAE;gBACP,oBAAoB,EAAE,IAAI;gBAC1B,gDAAgD,EAAE,IAAI;aACvD;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,gBAA+B,EAAE,QAAiB;QAC3D,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,eAAe,kBAEhC,MAAM,EAAE,oCAAoC,IACzC,gBAAgB,GAErB;YACE,KAAK;YACL,OAAO,EAAE;gBACP,oBAAoB,EAAE,IAAI;gBAC1B,gDAAgD,EAAE,IAAI;aACvD;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAU,EAAE,IAAe;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,EAAE,EAAE,EAAE;aACP;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,EAAE,GAAG,EAAa,EAAE,SAAiB,IAAI;QACtE,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,IAAA,0BAAa,EACX,qBAAqB,EACrB,MAAM,EACN,8CAA8C,CAC/C,CACF,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;AA9EY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAGuB,0BAAa;QACT,kCAAiB;GAH5C,qBAAqB,CA8EjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/person-relation-type/dto/create.dto.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/person-relation-type/dto/create.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGnE,qBAAa,SAAU,SAAQ,aAAa;IAK1C,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -16,7 +16,9 @@ class CreateDTO extends api_locale_1.WithLocaleDTO {
|
|
|
16
16
|
}
|
|
17
17
|
exports.CreateDTO = CreateDTO;
|
|
18
18
|
__decorate([
|
|
19
|
-
(0, class_validator_1.IsString)(
|
|
19
|
+
(0, class_validator_1.IsString)({
|
|
20
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.codeMustBeString', args.value),
|
|
21
|
+
}),
|
|
20
22
|
__metadata("design:type", String)
|
|
21
23
|
], CreateDTO.prototype, "code", void 0);
|
|
22
24
|
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/person-relation-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/person-relation-type/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmE;AACnE,qDAA2C;AAE3C,MAAa,SAAU,SAAQ,0BAAa;CAM3C;AAND,8BAMC;AADC;IAJC,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,6BAA6B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC3D,CAAC;;uCACW"}
|
|
@@ -26,6 +26,6 @@ export declare class PersonRelationTypeService {
|
|
|
26
26
|
id: number;
|
|
27
27
|
data: UpdateDTO;
|
|
28
28
|
}): Promise<any>;
|
|
29
|
-
delete({ ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
29
|
+
delete({ ids }: DeleteDTO, locale?: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=person-relation-type.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-relation-type.service.d.ts","sourceRoot":"","sources":["../../src/person-relation-type/person-relation-type.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"person-relation-type.service.d.ts","sourceRoot":"","sources":["../../src/person-relation-type/person-relation-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,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,yBAAyB;IAMlC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAThC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IACpD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;gBAI9B,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB,EAEpC,aAAa,EAAE,aAAa;IAGzC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAQpD,GAAG,CAAC,EAAE,EAAE,MAAM;IAId,MAAM,CAAC,IAAI,EAAE,SAAS;IAQtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IASpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,GAAE,MAAa;CAmBvD"}
|
|
@@ -37,9 +37,9 @@ let PersonRelationTypeService = class PersonRelationTypeService {
|
|
|
37
37
|
async update({ id, data }) {
|
|
38
38
|
return this.localeService.updateModelWithLocale(this.modelName, this.foreignKey, id, data);
|
|
39
39
|
}
|
|
40
|
-
async delete({ ids }) {
|
|
40
|
+
async delete({ ids }, locale = 'en') {
|
|
41
41
|
if (ids == undefined || ids == null) {
|
|
42
|
-
throw new common_1.BadRequestException('You must select at least one item to delete.');
|
|
42
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('deleteItemsRequired', locale, 'You must select at least one item to delete.'));
|
|
43
43
|
}
|
|
44
44
|
return this.prismaService.person_relation_type.deleteMany({
|
|
45
45
|
where: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-relation-type.service.js","sourceRoot":"","sources":["../../src/person-relation-type/person-relation-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"person-relation-type.service.js","sourceRoot":"","sources":["../../src/person-relation-type/person-relation-type.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAAmE;AACnE,4DAA2E;AAC3E,oDAAoD;AACpD,2CAKwB;AAKjB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAIpC,YAEE,aAA6C,EAE7C,iBAAqD,EAErD,aAA6C;QAJ5B,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,kBAAa,GAAb,aAAa,CAAe;QAT9B,cAAS,GAAG,sBAAsB,CAAC;QACnC,eAAU,GAAG,kBAAkB,CAAC;IAS9C,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,gBAA+B;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAC3C,MAAM,EACN,IAAI,CAAC,SAAS,EACd,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAe;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC7C,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAmC;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC7C,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,EAAE,EACF,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa,EAAE,SAAiB,IAAI;QACpD,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,IAAA,0BAAa,EACX,qBAAqB,EACrB,MAAM,EACN,8CAA8C,CAC/C,CACF,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,UAAU,CAAC;YACxD,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7DY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAiB,CAAC,CAAC,CAAA;IAE3C,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;qCAHR,0BAAa;QAET,kCAAiB;QAErB,0BAAa;GAVpC,yBAAyB,CA6DrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/contact",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"@nestjs/mapped-types": "*",
|
|
12
12
|
"@hed-hog/api-prisma": "0.0.4",
|
|
13
13
|
"@hed-hog/api-locale": "0.0.10",
|
|
14
|
+
"@hed-hog/core": "0.0.55",
|
|
14
15
|
"@hed-hog/api": "0.0.3",
|
|
15
|
-
"@hed-hog/api-
|
|
16
|
-
"@hed-hog/
|
|
17
|
-
"@hed-hog/api-pagination": "0.0.3"
|
|
16
|
+
"@hed-hog/api-pagination": "0.0.3",
|
|
17
|
+
"@hed-hog/api-mail": "0.0.7"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
+
import { getLocaleText } from '@hed-hog/api-locale';
|
|
2
3
|
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
3
4
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
4
5
|
import {
|
|
@@ -67,10 +68,14 @@ export class PersonAddressService {
|
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
async delete(personId: number, { ids }: DeleteDTO) {
|
|
71
|
+
async delete(personId: number, { ids }: DeleteDTO, locale: string = 'en') {
|
|
71
72
|
if (ids == undefined || ids == null) {
|
|
72
73
|
throw new BadRequestException(
|
|
73
|
-
|
|
74
|
+
getLocaleText(
|
|
75
|
+
'deleteItemsRequired',
|
|
76
|
+
locale,
|
|
77
|
+
'You must select at least one item to delete.',
|
|
78
|
+
),
|
|
74
79
|
);
|
|
75
80
|
}
|
|
76
81
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
+
import { getLocaleText } from '@hed-hog/api-locale';
|
|
2
3
|
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
3
4
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
4
5
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
BadRequestException,
|
|
7
|
+
Injectable
|
|
7
8
|
} from '@nestjs/common';
|
|
8
9
|
import { CreateDTO } from './dto/create.dto';
|
|
9
10
|
import { UpdateDTO } from './dto/update.dto';
|
|
@@ -59,10 +60,14 @@ export class PersonContactService {
|
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
async delete(personId: number, { ids }: DeleteDTO) {
|
|
63
|
+
async delete(personId: number, { ids }: DeleteDTO, locale: string = 'en') {
|
|
63
64
|
if (ids == undefined || ids == null) {
|
|
64
65
|
throw new BadRequestException(
|
|
65
|
-
|
|
66
|
+
getLocaleText(
|
|
67
|
+
'deleteItemsRequired',
|
|
68
|
+
locale,
|
|
69
|
+
'You must select at least one item to delete.',
|
|
70
|
+
),
|
|
66
71
|
);
|
|
67
72
|
}
|
|
68
73
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
+
import { getLocaleText } from '@hed-hog/api-locale';
|
|
2
3
|
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
3
4
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
4
5
|
import {
|
|
@@ -59,10 +60,14 @@ export class PersonDocumentService {
|
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
async delete(personId: number, { ids }: DeleteDTO) {
|
|
63
|
+
async delete(personId: number, { ids }: DeleteDTO, locale: string = 'en') {
|
|
63
64
|
if (ids == undefined || ids == null) {
|
|
64
65
|
throw new BadRequestException(
|
|
65
|
-
|
|
66
|
+
getLocaleText(
|
|
67
|
+
'deleteItemsRequired',
|
|
68
|
+
locale,
|
|
69
|
+
'You must select at least one item to delete.',
|
|
70
|
+
),
|
|
66
71
|
);
|
|
67
72
|
}
|
|
68
73
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
+
import { getLocaleText } from '@hed-hog/api-locale';
|
|
2
3
|
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
3
4
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
4
5
|
import {
|
|
@@ -59,10 +60,14 @@ export class PersonMetadataService {
|
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
async delete(personId: number, { ids }: DeleteDTO) {
|
|
63
|
+
async delete(personId: number, { ids }: DeleteDTO, locale: string = 'en') {
|
|
63
64
|
if (ids == undefined || ids == null) {
|
|
64
65
|
throw new BadRequestException(
|
|
65
|
-
|
|
66
|
+
getLocaleText(
|
|
67
|
+
'deleteItemsRequired',
|
|
68
|
+
locale,
|
|
69
|
+
'You must select at least one item to delete.',
|
|
70
|
+
),
|
|
66
71
|
);
|
|
67
72
|
}
|
|
68
73
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
+
import { getLocaleText } from '@hed-hog/api-locale';
|
|
2
3
|
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
3
4
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
4
5
|
import {
|
|
@@ -67,10 +68,14 @@ export class PersonRelationService {
|
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
async delete(personId: number, { ids }: DeleteDTO) {
|
|
71
|
+
async delete(personId: number, { ids }: DeleteDTO, locale: string = 'en') {
|
|
71
72
|
if (ids == undefined || ids == null) {
|
|
72
73
|
throw new BadRequestException(
|
|
73
|
-
|
|
74
|
+
getLocaleText(
|
|
75
|
+
'deleteItemsRequired',
|
|
76
|
+
locale,
|
|
77
|
+
'You must select at least one item to delete.',
|
|
78
|
+
),
|
|
74
79
|
);
|
|
75
80
|
}
|
|
76
81
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { WithLocaleDTO } from '@hed-hog/api-locale';
|
|
1
|
+
import { getLocaleText, WithLocaleDTO } from '@hed-hog/api-locale';
|
|
2
2
|
import { IsString } from 'class-validator';
|
|
3
3
|
|
|
4
4
|
export class CreateDTO extends WithLocaleDTO {
|
|
5
|
-
@IsString(
|
|
5
|
+
@IsString({
|
|
6
|
+
message: (args) =>
|
|
7
|
+
getLocaleText('validation.codeMustBeString', args.value),
|
|
8
|
+
})
|
|
6
9
|
code: string;
|
|
7
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DeleteDTO } from '@hed-hog/api';
|
|
2
|
-
import { LocaleService } from '@hed-hog/api-locale';
|
|
2
|
+
import { LocaleService, getLocaleText } from '@hed-hog/api-locale';
|
|
3
3
|
import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
|
|
4
4
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
BadRequestException,
|
|
7
|
+
Inject,
|
|
8
|
+
Injectable,
|
|
9
|
+
forwardRef
|
|
10
10
|
} from '@nestjs/common';
|
|
11
11
|
import { CreateDTO } from './dto/create.dto';
|
|
12
12
|
import { UpdateDTO } from './dto/update.dto';
|
|
@@ -54,10 +54,14 @@ export class PersonRelationTypeService {
|
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
async delete({ ids }: DeleteDTO) {
|
|
57
|
+
async delete({ ids }: DeleteDTO, locale: string = 'en') {
|
|
58
58
|
if (ids == undefined || ids == null) {
|
|
59
59
|
throw new BadRequestException(
|
|
60
|
-
|
|
60
|
+
getLocaleText(
|
|
61
|
+
'deleteItemsRequired',
|
|
62
|
+
locale,
|
|
63
|
+
'You must select at least one item to delete.',
|
|
64
|
+
),
|
|
61
65
|
);
|
|
62
66
|
}
|
|
63
67
|
|