@flusys/nestjs-localization 7.0.2 → 8.0.0-beta.1
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/config/index.d.ts +3 -3
- package/controllers/index.d.ts +3 -3
- package/controllers/language.controller.d.ts +4 -4
- package/controllers/translation-key.controller.d.ts +3 -3
- package/controllers/translation.controller.d.ts +4 -4
- package/docs/index.d.ts +1 -1
- package/docs/localization-swagger.config.d.ts +1 -1
- package/dtos/index.d.ts +3 -3
- package/dtos/translation.dto.d.ts +2 -2
- package/entities/index.d.ts +6 -6
- package/entities/language.entity.d.ts +1 -1
- package/entities/translation-key.entity.d.ts +1 -1
- package/entities/translation.entity.d.ts +2 -2
- package/fesm/349.js +1179 -0
- package/fesm/692.js +1205 -0
- package/fesm/config/index.js +101 -3
- package/fesm/controllers/index.js +15 -3
- package/fesm/docs/index.js +126 -1
- package/fesm/dtos/index.js +680 -3
- package/fesm/entities/index.js +405 -8
- package/fesm/index.js +257 -7
- package/fesm/interfaces/index.js +18 -4
- package/fesm/modules/index.js +152 -1
- package/fesm/runtime.js +85 -0
- package/fesm/services/index.js +15 -5
- package/index.d.ts +7 -7
- package/interfaces/index.d.ts +4 -4
- package/interfaces/language.interface.d.ts +1 -1
- package/interfaces/localization-module-options.interface.d.ts +3 -3
- package/interfaces/translation-key.interface.d.ts +1 -1
- package/interfaces/translation.interface.d.ts +3 -3
- package/modules/index.d.ts +1 -1
- package/modules/localization.module.d.ts +2 -2
- package/package.json +25 -34
- package/services/index.d.ts +5 -5
- package/services/language.service.d.ts +6 -6
- package/services/localization-config.service.d.ts +3 -3
- package/services/localization-datasource.provider.d.ts +3 -3
- package/services/translation-key.service.d.ts +6 -6
- package/services/translation.service.d.ts +5 -5
- package/cjs/config/event-actions.js +0 -33
- package/cjs/config/index.js +0 -20
- package/cjs/config/localization.constants.js +0 -11
- package/cjs/config/message-keys.js +0 -41
- package/cjs/controllers/index.js +0 -20
- package/cjs/controllers/language.controller.js +0 -188
- package/cjs/controllers/language.controller.spec.js +0 -154
- package/cjs/controllers/translation-key.controller.js +0 -135
- package/cjs/controllers/translation-key.controller.spec.js +0 -70
- package/cjs/controllers/translation.controller.js +0 -195
- package/cjs/controllers/translation.controller.spec.js +0 -169
- package/cjs/docs/index.js +0 -11
- package/cjs/docs/localization-swagger.config.js +0 -111
- package/cjs/docs/localization-swagger.config.spec.js +0 -30
- package/cjs/dtos/index.js +0 -20
- package/cjs/dtos/language.dto.js +0 -213
- package/cjs/dtos/translation-key.dto.js +0 -215
- package/cjs/dtos/translation.dto.js +0 -269
- package/cjs/entities/index.js +0 -42
- package/cjs/entities/index.spec.js +0 -18
- package/cjs/entities/language.entity.js +0 -126
- package/cjs/entities/translation-key.entity.js +0 -126
- package/cjs/entities/translation.entity.js +0 -120
- package/cjs/index.js +0 -24
- package/cjs/interfaces/index.js +0 -21
- package/cjs/interfaces/language.interface.js +0 -4
- package/cjs/interfaces/localization-module-options.interface.js +0 -4
- package/cjs/interfaces/translation-key.interface.js +0 -4
- package/cjs/interfaces/translation.interface.js +0 -4
- package/cjs/modules/index.js +0 -18
- package/cjs/modules/localization.module.js +0 -116
- package/cjs/modules/localization.module.spec.js +0 -132
- package/cjs/services/index.js +0 -22
- package/cjs/services/language.service.js +0 -181
- package/cjs/services/language.service.spec.js +0 -256
- package/cjs/services/localization-config.service.js +0 -66
- package/cjs/services/localization-config.service.spec.js +0 -80
- package/cjs/services/localization-datasource.provider.js +0 -79
- package/cjs/services/localization-datasource.provider.spec.js +0 -85
- package/cjs/services/translation-key.service.js +0 -179
- package/cjs/services/translation-key.service.spec.js +0 -303
- package/cjs/services/translation.service.js +0 -228
- package/cjs/services/translation.service.spec.js +0 -530
- package/fesm/config/event-actions.js +0 -12
- package/fesm/config/localization.constants.js +0 -1
- package/fesm/config/message-keys.js +0 -20
- package/fesm/controllers/language.controller.js +0 -178
- package/fesm/controllers/language.controller.spec.js +0 -150
- package/fesm/controllers/translation-key.controller.js +0 -125
- package/fesm/controllers/translation-key.controller.spec.js +0 -66
- package/fesm/controllers/translation.controller.js +0 -185
- package/fesm/controllers/translation.controller.spec.js +0 -165
- package/fesm/docs/localization-swagger.config.js +0 -101
- package/fesm/docs/localization-swagger.config.spec.js +0 -26
- package/fesm/dtos/language.dto.js +0 -192
- package/fesm/dtos/translation-key.dto.js +0 -194
- package/fesm/dtos/translation.dto.js +0 -239
- package/fesm/entities/index.spec.js +0 -14
- package/fesm/entities/language.entity.js +0 -116
- package/fesm/entities/translation-key.entity.js +0 -116
- package/fesm/entities/translation.entity.js +0 -110
- package/fesm/interfaces/language.interface.js +0 -1
- package/fesm/interfaces/localization-module-options.interface.js +0 -1
- package/fesm/interfaces/translation-key.interface.js +0 -1
- package/fesm/interfaces/translation.interface.js +0 -1
- package/fesm/modules/localization.module.js +0 -106
- package/fesm/modules/localization.module.spec.js +0 -128
- package/fesm/services/language.service.js +0 -171
- package/fesm/services/language.service.spec.js +0 -252
- package/fesm/services/localization-config.service.js +0 -56
- package/fesm/services/localization-config.service.spec.js +0 -76
- package/fesm/services/localization-datasource.provider.js +0 -69
- package/fesm/services/localization-datasource.provider.spec.js +0 -81
- package/fesm/services/translation-key.service.js +0 -169
- package/fesm/services/translation-key.service.spec.js +0 -299
- package/fesm/services/translation.service.js +0 -218
- package/fesm/services/translation.service.spec.js +0 -526
package/fesm/349.js
ADDED
|
@@ -0,0 +1,1179 @@
|
|
|
1
|
+
import * as __rspack_external__nestjs_swagger_7cd450b5 from "@nestjs/swagger";
|
|
2
|
+
import * as __rspack_external__flusys_nestjs_shared_decorators_c129b601 from "@flusys/nestjs-shared/decorators";
|
|
3
|
+
import * as __rspack_external__flusys_nestjs_shared_guards_3f79ddd1 from "@flusys/nestjs-shared/guards";
|
|
4
|
+
import * as __rspack_external__flusys_nestjs_shared_dtos_c4585026 from "@flusys/nestjs-shared/dtos";
|
|
5
|
+
import * as __rspack_external_class_transformer_c5a479fb from "class-transformer";
|
|
6
|
+
import * as __rspack_external_class_validator_7b99ef4d from "class-validator";
|
|
7
|
+
export const __rspack_esm_id = 349;
|
|
8
|
+
export const __rspack_esm_ids = [349];
|
|
9
|
+
export const __webpack_modules__ = {
|
|
10
|
+
212(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
11
|
+
|
|
12
|
+
// EXPORTS
|
|
13
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
14
|
+
t7: () => (/* reexport */ LanguageController),
|
|
15
|
+
Ap: () => (/* reexport */ TranslationController),
|
|
16
|
+
$4: () => (/* reexport */ TranslationKeyController)
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// EXTERNAL MODULE: external "@flusys/nestjs-shared/classes"
|
|
20
|
+
var classes_ = __webpack_require__(937);
|
|
21
|
+
;// CONCATENATED MODULE: external "@flusys/nestjs-shared/decorators"
|
|
22
|
+
|
|
23
|
+
;// CONCATENATED MODULE: external "@flusys/nestjs-shared/guards"
|
|
24
|
+
|
|
25
|
+
// EXTERNAL MODULE: external "@nestjs/common"
|
|
26
|
+
var common_ = __webpack_require__(157);
|
|
27
|
+
// EXTERNAL MODULE: external "@nestjs/swagger"
|
|
28
|
+
var swagger_ = __webpack_require__(176);
|
|
29
|
+
// EXTERNAL MODULE: ./projects/nestjs-localization/src/config/message-keys.ts
|
|
30
|
+
var message_keys = __webpack_require__(68);
|
|
31
|
+
// EXTERNAL MODULE: ./projects/nestjs-localization/src/dtos/index.ts + 6 modules
|
|
32
|
+
var dtos = __webpack_require__(431);
|
|
33
|
+
// EXTERNAL MODULE: ./projects/nestjs-localization/src/services/index.ts + 6 modules
|
|
34
|
+
var services = __webpack_require__(367);
|
|
35
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/controllers/language.controller.ts
|
|
36
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
37
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
39
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
40
|
+
} else {
|
|
41
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
42
|
+
if (d = decorators[i]) {
|
|
43
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
48
|
+
}
|
|
49
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
50
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
51
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function _ts_param(paramIndex, decorator) {
|
|
55
|
+
return function(target, key) {
|
|
56
|
+
decorator(target, key, paramIndex);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class LanguageController extends (0,classes_.createApiController)(dtos/* .CreateLanguageDto */.qk, dtos/* .UpdateLanguageDto */.xd, dtos/* .LanguageResponseDto */.Z_, {
|
|
68
|
+
entityName: 'language',
|
|
69
|
+
security: {
|
|
70
|
+
insert: {
|
|
71
|
+
level: 'permission',
|
|
72
|
+
permissions: [
|
|
73
|
+
classes_.LANGUAGE_PERMISSIONS.CREATE
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
insertMany: {
|
|
77
|
+
level: 'permission',
|
|
78
|
+
permissions: [
|
|
79
|
+
classes_.LANGUAGE_PERMISSIONS.CREATE
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
getById: {
|
|
83
|
+
level: 'permission',
|
|
84
|
+
permissions: [
|
|
85
|
+
classes_.LANGUAGE_PERMISSIONS.READ
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
getAll: {
|
|
89
|
+
level: 'permission',
|
|
90
|
+
permissions: [
|
|
91
|
+
classes_.LANGUAGE_PERMISSIONS.READ
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
update: {
|
|
95
|
+
level: 'permission',
|
|
96
|
+
permissions: [
|
|
97
|
+
classes_.LANGUAGE_PERMISSIONS.UPDATE
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
updateMany: {
|
|
101
|
+
level: 'permission',
|
|
102
|
+
permissions: [
|
|
103
|
+
classes_.LANGUAGE_PERMISSIONS.UPDATE
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
delete: {
|
|
107
|
+
level: 'permission',
|
|
108
|
+
permissions: [
|
|
109
|
+
classes_.LANGUAGE_PERMISSIONS.DELETE
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}) {
|
|
114
|
+
service;
|
|
115
|
+
constructor(service){
|
|
116
|
+
super(service), this.service = service;
|
|
117
|
+
}
|
|
118
|
+
async getActive() {
|
|
119
|
+
const data = await this.service.getActiveLanguages();
|
|
120
|
+
return {
|
|
121
|
+
success: true,
|
|
122
|
+
message: 'Active languages retrieved successfully',
|
|
123
|
+
messageKey: message_keys/* .LANGUAGE_MESSAGES.ACTIVE_SUCCESS */.ew.ACTIVE_SUCCESS,
|
|
124
|
+
data,
|
|
125
|
+
meta: {
|
|
126
|
+
total: data.length,
|
|
127
|
+
page: 0,
|
|
128
|
+
pageSize: data.length,
|
|
129
|
+
count: data.length
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
async getDefault() {
|
|
134
|
+
const data = await this.service.getDefaultLanguage();
|
|
135
|
+
return {
|
|
136
|
+
success: true,
|
|
137
|
+
message: 'Default language retrieved successfully',
|
|
138
|
+
messageKey: message_keys/* .LANGUAGE_MESSAGES.GET_DEFAULT_SUCCESS */.ew.GET_DEFAULT_SUCCESS,
|
|
139
|
+
data: data ?? undefined
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
async setDefault(body, _user) {
|
|
143
|
+
const data = await this.service.setAsDefault(body.id);
|
|
144
|
+
return {
|
|
145
|
+
success: true,
|
|
146
|
+
message: 'Default language updated successfully',
|
|
147
|
+
messageKey: message_keys/* .LANGUAGE_MESSAGES.SET_DEFAULT_SUCCESS */.ew.SET_DEFAULT_SUCCESS,
|
|
148
|
+
data: data ?? undefined
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
_ts_decorate([
|
|
153
|
+
(0,common_.Post)('get-active'),
|
|
154
|
+
(0,swagger_.ApiOperation)({
|
|
155
|
+
summary: 'Get all active languages'
|
|
156
|
+
}),
|
|
157
|
+
(0,swagger_.ApiResponse)({
|
|
158
|
+
status: 200,
|
|
159
|
+
type: [
|
|
160
|
+
dtos/* .LanguageResponseDto */.Z_
|
|
161
|
+
]
|
|
162
|
+
}),
|
|
163
|
+
_ts_metadata("design:type", Function),
|
|
164
|
+
_ts_metadata("design:paramtypes", []),
|
|
165
|
+
_ts_metadata("design:returntype", Promise)
|
|
166
|
+
], LanguageController.prototype, "getActive", null);
|
|
167
|
+
_ts_decorate([
|
|
168
|
+
(0,common_.Post)('get-default'),
|
|
169
|
+
(0,swagger_.ApiOperation)({
|
|
170
|
+
summary: 'Get default language'
|
|
171
|
+
}),
|
|
172
|
+
(0,swagger_.ApiResponse)({
|
|
173
|
+
status: 200,
|
|
174
|
+
type: dtos/* .LanguageResponseDto */.Z_
|
|
175
|
+
}),
|
|
176
|
+
_ts_metadata("design:type", Function),
|
|
177
|
+
_ts_metadata("design:paramtypes", []),
|
|
178
|
+
_ts_metadata("design:returntype", Promise)
|
|
179
|
+
], LanguageController.prototype, "getDefault", null);
|
|
180
|
+
_ts_decorate([
|
|
181
|
+
(0,common_.Post)('set-default'),
|
|
182
|
+
(0,common_.UseGuards)(__rspack_external__flusys_nestjs_shared_guards_3f79ddd1.JwtAuthGuard, __rspack_external__flusys_nestjs_shared_guards_3f79ddd1.PermissionGuard),
|
|
183
|
+
(0,swagger_.ApiBearerAuth)(),
|
|
184
|
+
(0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.RequirePermission)(classes_.LANGUAGE_PERMISSIONS.UPDATE),
|
|
185
|
+
(0,swagger_.ApiOperation)({
|
|
186
|
+
summary: 'Set a language as default'
|
|
187
|
+
}),
|
|
188
|
+
(0,swagger_.ApiResponse)({
|
|
189
|
+
status: 200,
|
|
190
|
+
type: dtos/* .LanguageResponseDto */.Z_
|
|
191
|
+
}),
|
|
192
|
+
_ts_param(0, (0,common_.Body)()),
|
|
193
|
+
_ts_param(1, (0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.CurrentUser)()),
|
|
194
|
+
_ts_metadata("design:type", Function),
|
|
195
|
+
_ts_metadata("design:paramtypes", [
|
|
196
|
+
Object,
|
|
197
|
+
typeof ILoggedUserInfo === "undefined" ? Object : ILoggedUserInfo
|
|
198
|
+
]),
|
|
199
|
+
_ts_metadata("design:returntype", Promise)
|
|
200
|
+
], LanguageController.prototype, "setDefault", null);
|
|
201
|
+
LanguageController = _ts_decorate([
|
|
202
|
+
(0,swagger_.ApiTags)('Localization - Language'),
|
|
203
|
+
(0,common_.Controller)('localization/language'),
|
|
204
|
+
_ts_param(0, (0,common_.Inject)(services/* .LanguageService */.gw)),
|
|
205
|
+
_ts_metadata("design:type", Function),
|
|
206
|
+
_ts_metadata("design:paramtypes", [
|
|
207
|
+
typeof services/* .LanguageService */.gw === "undefined" ? Object : services/* .LanguageService */.gw
|
|
208
|
+
])
|
|
209
|
+
], LanguageController);
|
|
210
|
+
|
|
211
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/controllers/translation-key.controller.ts
|
|
212
|
+
function translation_key_controller_ts_decorate(decorators, target, key, desc) {
|
|
213
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
214
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
215
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
216
|
+
} else {
|
|
217
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
218
|
+
if (d = decorators[i]) {
|
|
219
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
224
|
+
}
|
|
225
|
+
function translation_key_controller_ts_metadata(metadataKey, metadataValue) {
|
|
226
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
227
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function translation_key_controller_ts_param(paramIndex, decorator) {
|
|
231
|
+
return function(target, key) {
|
|
232
|
+
decorator(target, key, paramIndex);
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class TranslationKeyController extends (0,classes_.createApiController)(dtos/* .CreateTranslationKeyDto */.I3, dtos/* .UpdateTranslationKeyDto */.TM, dtos/* .TranslationKeyResponseDto */.Ld, {
|
|
244
|
+
entityName: 'translation.key',
|
|
245
|
+
security: {
|
|
246
|
+
insert: {
|
|
247
|
+
level: 'permission',
|
|
248
|
+
permissions: [
|
|
249
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.CREATE
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
insertMany: {
|
|
253
|
+
level: 'permission',
|
|
254
|
+
permissions: [
|
|
255
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.CREATE
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
getById: {
|
|
259
|
+
level: 'permission',
|
|
260
|
+
permissions: [
|
|
261
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.READ
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
getAll: {
|
|
265
|
+
level: 'permission',
|
|
266
|
+
permissions: [
|
|
267
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.READ
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
update: {
|
|
271
|
+
level: 'permission',
|
|
272
|
+
permissions: [
|
|
273
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.UPDATE
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
updateMany: {
|
|
277
|
+
level: 'permission',
|
|
278
|
+
permissions: [
|
|
279
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.UPDATE
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
delete: {
|
|
283
|
+
level: 'permission',
|
|
284
|
+
permissions: [
|
|
285
|
+
classes_.TRANSLATION_KEY_PERMISSIONS.DELETE
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}) {
|
|
290
|
+
service;
|
|
291
|
+
constructor(service){
|
|
292
|
+
super(service), this.service = service;
|
|
293
|
+
}
|
|
294
|
+
async getModules(_user) {
|
|
295
|
+
const data = await this.service.getModules();
|
|
296
|
+
return {
|
|
297
|
+
success: true,
|
|
298
|
+
message: 'Modules retrieved successfully',
|
|
299
|
+
messageKey: message_keys/* .TRANSLATION_KEY_MESSAGES.MODULES_SUCCESS */.Bc.MODULES_SUCCESS,
|
|
300
|
+
data
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
translation_key_controller_ts_decorate([
|
|
305
|
+
(0,common_.Post)('get-modules'),
|
|
306
|
+
(0,common_.UseGuards)(__rspack_external__flusys_nestjs_shared_guards_3f79ddd1.JwtAuthGuard),
|
|
307
|
+
(0,swagger_.ApiBearerAuth)(),
|
|
308
|
+
(0,swagger_.ApiOperation)({
|
|
309
|
+
summary: 'Get all distinct module names'
|
|
310
|
+
}),
|
|
311
|
+
(0,swagger_.ApiResponse)({
|
|
312
|
+
status: 200,
|
|
313
|
+
type: [
|
|
314
|
+
String
|
|
315
|
+
]
|
|
316
|
+
}),
|
|
317
|
+
translation_key_controller_ts_param(0, (0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.CurrentUser)()),
|
|
318
|
+
translation_key_controller_ts_metadata("design:type", Function),
|
|
319
|
+
translation_key_controller_ts_metadata("design:paramtypes", [
|
|
320
|
+
typeof ILoggedUserInfo === "undefined" ? Object : ILoggedUserInfo
|
|
321
|
+
]),
|
|
322
|
+
translation_key_controller_ts_metadata("design:returntype", Promise)
|
|
323
|
+
], TranslationKeyController.prototype, "getModules", null);
|
|
324
|
+
TranslationKeyController = translation_key_controller_ts_decorate([
|
|
325
|
+
(0,swagger_.ApiTags)('Localization - Translation Key'),
|
|
326
|
+
(0,common_.Controller)('localization/translation-key'),
|
|
327
|
+
translation_key_controller_ts_param(0, (0,common_.Inject)(services/* .TranslationKeyService */.q3)),
|
|
328
|
+
translation_key_controller_ts_metadata("design:type", Function),
|
|
329
|
+
translation_key_controller_ts_metadata("design:paramtypes", [
|
|
330
|
+
typeof services/* .TranslationKeyService */.q3 === "undefined" ? Object : services/* .TranslationKeyService */.q3
|
|
331
|
+
])
|
|
332
|
+
], TranslationKeyController);
|
|
333
|
+
|
|
334
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/controllers/translation.controller.ts
|
|
335
|
+
function translation_controller_ts_decorate(decorators, target, key, desc) {
|
|
336
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
337
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
338
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
339
|
+
} else {
|
|
340
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
341
|
+
if (d = decorators[i]) {
|
|
342
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
347
|
+
}
|
|
348
|
+
function translation_controller_ts_metadata(metadataKey, metadataValue) {
|
|
349
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
350
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
function translation_controller_ts_param(paramIndex, decorator) {
|
|
354
|
+
return function(target, key) {
|
|
355
|
+
decorator(target, key, paramIndex);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
class TranslationController extends (0,classes_.createApiController)(dtos/* .CreateTranslationDto */.li, dtos/* .UpdateTranslationDto */.qq, dtos/* .TranslationResponseDto */.uG, {
|
|
367
|
+
entityName: 'translation',
|
|
368
|
+
security: {
|
|
369
|
+
insert: {
|
|
370
|
+
level: 'permission',
|
|
371
|
+
permissions: [
|
|
372
|
+
classes_.TRANSLATION_PERMISSIONS.CREATE
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
insertMany: {
|
|
376
|
+
level: 'permission',
|
|
377
|
+
permissions: [
|
|
378
|
+
classes_.TRANSLATION_PERMISSIONS.CREATE
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
getById: {
|
|
382
|
+
level: 'permission',
|
|
383
|
+
permissions: [
|
|
384
|
+
classes_.TRANSLATION_PERMISSIONS.READ
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
getAll: {
|
|
388
|
+
level: 'permission',
|
|
389
|
+
permissions: [
|
|
390
|
+
classes_.TRANSLATION_PERMISSIONS.READ
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
update: {
|
|
394
|
+
level: 'permission',
|
|
395
|
+
permissions: [
|
|
396
|
+
classes_.TRANSLATION_PERMISSIONS.UPDATE
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
updateMany: {
|
|
400
|
+
level: 'permission',
|
|
401
|
+
permissions: [
|
|
402
|
+
classes_.TRANSLATION_PERMISSIONS.UPDATE
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
delete: {
|
|
406
|
+
level: 'permission',
|
|
407
|
+
permissions: [
|
|
408
|
+
classes_.TRANSLATION_PERMISSIONS.DELETE
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}) {
|
|
413
|
+
service;
|
|
414
|
+
constructor(service){
|
|
415
|
+
super(service), this.service = service;
|
|
416
|
+
}
|
|
417
|
+
async getByLanguage(body) {
|
|
418
|
+
const data = await this.service.getByLanguageCode(body.languageCode, body.modules);
|
|
419
|
+
return {
|
|
420
|
+
success: true,
|
|
421
|
+
message: 'Translations retrieved successfully',
|
|
422
|
+
messageKey: message_keys/* .TRANSLATION_MESSAGES.BY_LANGUAGE_SUCCESS */.Ju.BY_LANGUAGE_SUCCESS,
|
|
423
|
+
data
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
async updateManyValues(body, _user) {
|
|
427
|
+
const data = await this.service.bulkUpdate(body.translations);
|
|
428
|
+
return {
|
|
429
|
+
success: true,
|
|
430
|
+
message: `${data.length} translations updated`,
|
|
431
|
+
messageKey: message_keys/* .TRANSLATION_MESSAGES.UPDATE_MANY_SUCCESS */.Ju.UPDATE_MANY_SUCCESS,
|
|
432
|
+
messageVariables: {
|
|
433
|
+
count: data.length
|
|
434
|
+
},
|
|
435
|
+
data,
|
|
436
|
+
meta: {
|
|
437
|
+
count: data.length
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
async getCounts(_user) {
|
|
442
|
+
const data = await this.service.getTranslationCounts();
|
|
443
|
+
return {
|
|
444
|
+
success: true,
|
|
445
|
+
message: 'Translation counts retrieved successfully',
|
|
446
|
+
messageKey: message_keys/* .TRANSLATION_MESSAGES.GET_ALL_SUCCESS */.Ju.GET_ALL_SUCCESS,
|
|
447
|
+
data
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
translation_controller_ts_decorate([
|
|
452
|
+
(0,common_.Post)('get-by-language'),
|
|
453
|
+
(0,swagger_.ApiOperation)({
|
|
454
|
+
summary: 'Get translations for a language (optionally filtered by modules)'
|
|
455
|
+
}),
|
|
456
|
+
(0,swagger_.ApiResponse)({
|
|
457
|
+
status: 200
|
|
458
|
+
}),
|
|
459
|
+
translation_controller_ts_param(0, (0,common_.Body)()),
|
|
460
|
+
translation_controller_ts_metadata("design:type", Function),
|
|
461
|
+
translation_controller_ts_metadata("design:paramtypes", [
|
|
462
|
+
typeof dtos/* .GetTranslationsByLanguageDto */.Td === "undefined" ? Object : dtos/* .GetTranslationsByLanguageDto */.Td
|
|
463
|
+
]),
|
|
464
|
+
translation_controller_ts_metadata("design:returntype", Promise)
|
|
465
|
+
], TranslationController.prototype, "getByLanguage", null);
|
|
466
|
+
translation_controller_ts_decorate([
|
|
467
|
+
(0,common_.Post)('update-many-values'),
|
|
468
|
+
(0,common_.UseGuards)(__rspack_external__flusys_nestjs_shared_guards_3f79ddd1.JwtAuthGuard, __rspack_external__flusys_nestjs_shared_guards_3f79ddd1.PermissionGuard),
|
|
469
|
+
(0,swagger_.ApiBearerAuth)(),
|
|
470
|
+
(0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.RequirePermission)(classes_.TRANSLATION_PERMISSIONS.UPDATE),
|
|
471
|
+
(0,swagger_.ApiOperation)({
|
|
472
|
+
summary: 'Bulk update translation values'
|
|
473
|
+
}),
|
|
474
|
+
(0,swagger_.ApiResponse)({
|
|
475
|
+
status: 200,
|
|
476
|
+
type: [
|
|
477
|
+
dtos/* .TranslationResponseDto */.uG
|
|
478
|
+
]
|
|
479
|
+
}),
|
|
480
|
+
translation_controller_ts_param(0, (0,common_.Body)()),
|
|
481
|
+
translation_controller_ts_param(1, (0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.CurrentUser)()),
|
|
482
|
+
translation_controller_ts_metadata("design:type", Function),
|
|
483
|
+
translation_controller_ts_metadata("design:paramtypes", [
|
|
484
|
+
typeof dtos/* .BulkUpdateTranslationsDto */.Fw === "undefined" ? Object : dtos/* .BulkUpdateTranslationsDto */.Fw,
|
|
485
|
+
typeof ILoggedUserInfo === "undefined" ? Object : ILoggedUserInfo
|
|
486
|
+
]),
|
|
487
|
+
translation_controller_ts_metadata("design:returntype", Promise)
|
|
488
|
+
], TranslationController.prototype, "updateManyValues", null);
|
|
489
|
+
translation_controller_ts_decorate([
|
|
490
|
+
(0,common_.Post)('get-counts'),
|
|
491
|
+
(0,common_.UseGuards)(__rspack_external__flusys_nestjs_shared_guards_3f79ddd1.JwtAuthGuard, __rspack_external__flusys_nestjs_shared_guards_3f79ddd1.PermissionGuard),
|
|
492
|
+
(0,swagger_.ApiBearerAuth)(),
|
|
493
|
+
(0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.RequirePermission)(classes_.TRANSLATION_PERMISSIONS.READ),
|
|
494
|
+
(0,swagger_.ApiOperation)({
|
|
495
|
+
summary: 'Get translation counts per translation key'
|
|
496
|
+
}),
|
|
497
|
+
(0,swagger_.ApiResponse)({
|
|
498
|
+
status: 200
|
|
499
|
+
}),
|
|
500
|
+
translation_controller_ts_param(0, (0,__rspack_external__flusys_nestjs_shared_decorators_c129b601.CurrentUser)()),
|
|
501
|
+
translation_controller_ts_metadata("design:type", Function),
|
|
502
|
+
translation_controller_ts_metadata("design:paramtypes", [
|
|
503
|
+
typeof ILoggedUserInfo === "undefined" ? Object : ILoggedUserInfo
|
|
504
|
+
]),
|
|
505
|
+
translation_controller_ts_metadata("design:returntype", Promise)
|
|
506
|
+
], TranslationController.prototype, "getCounts", null);
|
|
507
|
+
TranslationController = translation_controller_ts_decorate([
|
|
508
|
+
(0,swagger_.ApiTags)('Localization - Translation'),
|
|
509
|
+
(0,common_.Controller)('localization/translation'),
|
|
510
|
+
translation_controller_ts_param(0, (0,common_.Inject)(services/* .TranslationService */.L0)),
|
|
511
|
+
translation_controller_ts_metadata("design:type", Function),
|
|
512
|
+
translation_controller_ts_metadata("design:paramtypes", [
|
|
513
|
+
typeof services/* .TranslationService */.L0 === "undefined" ? Object : services/* .TranslationService */.L0
|
|
514
|
+
])
|
|
515
|
+
], TranslationController);
|
|
516
|
+
|
|
517
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/controllers/index.ts
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
},
|
|
524
|
+
431(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
525
|
+
|
|
526
|
+
// EXPORTS
|
|
527
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
528
|
+
OW: () => (/* reexport */ BulkUpdateTranslationDto),
|
|
529
|
+
Fw: () => (/* reexport */ BulkUpdateTranslationsDto),
|
|
530
|
+
qk: () => (/* reexport */ CreateLanguageDto),
|
|
531
|
+
li: () => (/* reexport */ CreateTranslationDto),
|
|
532
|
+
I3: () => (/* reexport */ CreateTranslationKeyDto),
|
|
533
|
+
Td: () => (/* reexport */ GetTranslationsByLanguageDto),
|
|
534
|
+
Z_: () => (/* reexport */ LanguageResponseDto),
|
|
535
|
+
Ld: () => (/* reexport */ TranslationKeyResponseDto),
|
|
536
|
+
uG: () => (/* reexport */ TranslationResponseDto),
|
|
537
|
+
xd: () => (/* reexport */ UpdateLanguageDto),
|
|
538
|
+
qq: () => (/* reexport */ UpdateTranslationDto),
|
|
539
|
+
TM: () => (/* reexport */ UpdateTranslationKeyDto)
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
;// CONCATENATED MODULE: external "@flusys/nestjs-shared/dtos"
|
|
543
|
+
|
|
544
|
+
// EXTERNAL MODULE: external "@nestjs/swagger"
|
|
545
|
+
var swagger_ = __webpack_require__(176);
|
|
546
|
+
;// CONCATENATED MODULE: external "class-transformer"
|
|
547
|
+
|
|
548
|
+
;// CONCATENATED MODULE: external "class-validator"
|
|
549
|
+
|
|
550
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/language.dto.ts
|
|
551
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
552
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
553
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
554
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
555
|
+
} else {
|
|
556
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
557
|
+
if (d = decorators[i]) {
|
|
558
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
563
|
+
}
|
|
564
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
565
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
566
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
class CreateLanguageDto {
|
|
574
|
+
code;
|
|
575
|
+
name;
|
|
576
|
+
nativeName;
|
|
577
|
+
direction;
|
|
578
|
+
isActive;
|
|
579
|
+
isDefault;
|
|
580
|
+
serial;
|
|
581
|
+
}
|
|
582
|
+
_ts_decorate([
|
|
583
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
584
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(10),
|
|
585
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()?.toLowerCase()),
|
|
586
|
+
(0,swagger_.ApiProperty)({
|
|
587
|
+
example: 'en',
|
|
588
|
+
description: 'Language code (ISO 639-1)'
|
|
589
|
+
}),
|
|
590
|
+
_ts_metadata("design:type", String)
|
|
591
|
+
], CreateLanguageDto.prototype, "code", void 0);
|
|
592
|
+
_ts_decorate([
|
|
593
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
594
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(100),
|
|
595
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
596
|
+
(0,swagger_.ApiProperty)({
|
|
597
|
+
example: 'English',
|
|
598
|
+
description: 'Language name'
|
|
599
|
+
}),
|
|
600
|
+
_ts_metadata("design:type", String)
|
|
601
|
+
], CreateLanguageDto.prototype, "name", void 0);
|
|
602
|
+
_ts_decorate([
|
|
603
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
604
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
605
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(100),
|
|
606
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
607
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
608
|
+
example: 'English',
|
|
609
|
+
description: 'Native name of the language'
|
|
610
|
+
}),
|
|
611
|
+
_ts_metadata("design:type", String)
|
|
612
|
+
], CreateLanguageDto.prototype, "nativeName", void 0);
|
|
613
|
+
_ts_decorate([
|
|
614
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
615
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsIn)([
|
|
616
|
+
'ltr',
|
|
617
|
+
'rtl'
|
|
618
|
+
]),
|
|
619
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
620
|
+
example: 'ltr',
|
|
621
|
+
enum: [
|
|
622
|
+
'ltr',
|
|
623
|
+
'rtl'
|
|
624
|
+
],
|
|
625
|
+
description: 'Text direction'
|
|
626
|
+
}),
|
|
627
|
+
_ts_metadata("design:type", String)
|
|
628
|
+
], CreateLanguageDto.prototype, "direction", void 0);
|
|
629
|
+
_ts_decorate([
|
|
630
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
631
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
632
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
633
|
+
example: true,
|
|
634
|
+
description: 'Whether the language is active'
|
|
635
|
+
}),
|
|
636
|
+
_ts_metadata("design:type", Boolean)
|
|
637
|
+
], CreateLanguageDto.prototype, "isActive", void 0);
|
|
638
|
+
_ts_decorate([
|
|
639
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
640
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
641
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
642
|
+
example: false,
|
|
643
|
+
description: 'Whether this is the default language'
|
|
644
|
+
}),
|
|
645
|
+
_ts_metadata("design:type", Boolean)
|
|
646
|
+
], CreateLanguageDto.prototype, "isDefault", void 0);
|
|
647
|
+
_ts_decorate([
|
|
648
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
649
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsNumber)(),
|
|
650
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
651
|
+
example: 1,
|
|
652
|
+
description: 'Display order'
|
|
653
|
+
}),
|
|
654
|
+
_ts_metadata("design:type", Number)
|
|
655
|
+
], CreateLanguageDto.prototype, "serial", void 0);
|
|
656
|
+
class UpdateLanguageDto extends (0,swagger_.PartialType)(CreateLanguageDto) {
|
|
657
|
+
id;
|
|
658
|
+
}
|
|
659
|
+
_ts_decorate([
|
|
660
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
661
|
+
(0,swagger_.ApiProperty)({
|
|
662
|
+
description: 'Language ID'
|
|
663
|
+
}),
|
|
664
|
+
_ts_metadata("design:type", String)
|
|
665
|
+
], UpdateLanguageDto.prototype, "id", void 0);
|
|
666
|
+
class LanguageResponseDto extends __rspack_external__flusys_nestjs_shared_dtos_c4585026.IdentityResponseDto {
|
|
667
|
+
code;
|
|
668
|
+
name;
|
|
669
|
+
nativeName;
|
|
670
|
+
direction;
|
|
671
|
+
isActive;
|
|
672
|
+
isDefault;
|
|
673
|
+
isReadonly;
|
|
674
|
+
serial;
|
|
675
|
+
}
|
|
676
|
+
_ts_decorate([
|
|
677
|
+
(0,swagger_.ApiProperty)({
|
|
678
|
+
example: 'en'
|
|
679
|
+
}),
|
|
680
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
681
|
+
_ts_metadata("design:type", String)
|
|
682
|
+
], LanguageResponseDto.prototype, "code", void 0);
|
|
683
|
+
_ts_decorate([
|
|
684
|
+
(0,swagger_.ApiProperty)({
|
|
685
|
+
example: 'English'
|
|
686
|
+
}),
|
|
687
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
688
|
+
_ts_metadata("design:type", String)
|
|
689
|
+
], LanguageResponseDto.prototype, "name", void 0);
|
|
690
|
+
_ts_decorate([
|
|
691
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
692
|
+
example: 'English'
|
|
693
|
+
}),
|
|
694
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
695
|
+
_ts_metadata("design:type", Object)
|
|
696
|
+
], LanguageResponseDto.prototype, "nativeName", void 0);
|
|
697
|
+
_ts_decorate([
|
|
698
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
699
|
+
example: 'ltr',
|
|
700
|
+
enum: [
|
|
701
|
+
'ltr',
|
|
702
|
+
'rtl'
|
|
703
|
+
]
|
|
704
|
+
}),
|
|
705
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
706
|
+
_ts_metadata("design:type", Object)
|
|
707
|
+
], LanguageResponseDto.prototype, "direction", void 0);
|
|
708
|
+
_ts_decorate([
|
|
709
|
+
(0,swagger_.ApiProperty)({
|
|
710
|
+
example: true
|
|
711
|
+
}),
|
|
712
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
713
|
+
_ts_metadata("design:type", Boolean)
|
|
714
|
+
], LanguageResponseDto.prototype, "isActive", void 0);
|
|
715
|
+
_ts_decorate([
|
|
716
|
+
(0,swagger_.ApiProperty)({
|
|
717
|
+
example: false
|
|
718
|
+
}),
|
|
719
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
720
|
+
_ts_metadata("design:type", Boolean)
|
|
721
|
+
], LanguageResponseDto.prototype, "isDefault", void 0);
|
|
722
|
+
_ts_decorate([
|
|
723
|
+
(0,swagger_.ApiProperty)({
|
|
724
|
+
example: false,
|
|
725
|
+
description: 'System language: cannot be renamed or deleted'
|
|
726
|
+
}),
|
|
727
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
728
|
+
_ts_metadata("design:type", Boolean)
|
|
729
|
+
], LanguageResponseDto.prototype, "isReadonly", void 0);
|
|
730
|
+
_ts_decorate([
|
|
731
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
732
|
+
example: 1
|
|
733
|
+
}),
|
|
734
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
735
|
+
_ts_metadata("design:type", Object)
|
|
736
|
+
], LanguageResponseDto.prototype, "serial", void 0);
|
|
737
|
+
LanguageResponseDto = _ts_decorate([
|
|
738
|
+
(0,__rspack_external_class_transformer_c5a479fb.Exclude)()
|
|
739
|
+
], LanguageResponseDto);
|
|
740
|
+
|
|
741
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/translation-key.dto.ts
|
|
742
|
+
function translation_key_dto_ts_decorate(decorators, target, key, desc) {
|
|
743
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
744
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
745
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
746
|
+
} else {
|
|
747
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
748
|
+
if (d = decorators[i]) {
|
|
749
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
754
|
+
}
|
|
755
|
+
function translation_key_dto_ts_metadata(metadataKey, metadataValue) {
|
|
756
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
757
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
class CreateTranslationKeyDto {
|
|
765
|
+
module;
|
|
766
|
+
key;
|
|
767
|
+
defaultMessage;
|
|
768
|
+
description;
|
|
769
|
+
variables;
|
|
770
|
+
isActive;
|
|
771
|
+
isReadonly;
|
|
772
|
+
serial;
|
|
773
|
+
}
|
|
774
|
+
translation_key_dto_ts_decorate([
|
|
775
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
776
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(100),
|
|
777
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()?.toLowerCase()),
|
|
778
|
+
(0,swagger_.ApiProperty)({
|
|
779
|
+
example: 'auth',
|
|
780
|
+
description: 'Module name'
|
|
781
|
+
}),
|
|
782
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
783
|
+
], CreateTranslationKeyDto.prototype, "module", void 0);
|
|
784
|
+
translation_key_dto_ts_decorate([
|
|
785
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
786
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(255),
|
|
787
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
788
|
+
(0,swagger_.ApiProperty)({
|
|
789
|
+
example: 'auth.login.success',
|
|
790
|
+
description: 'Translation key'
|
|
791
|
+
}),
|
|
792
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
793
|
+
], CreateTranslationKeyDto.prototype, "key", void 0);
|
|
794
|
+
translation_key_dto_ts_decorate([
|
|
795
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
796
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(500),
|
|
797
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
798
|
+
(0,swagger_.ApiProperty)({
|
|
799
|
+
example: 'Login successful',
|
|
800
|
+
description: 'Default English message'
|
|
801
|
+
}),
|
|
802
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
803
|
+
], CreateTranslationKeyDto.prototype, "defaultMessage", void 0);
|
|
804
|
+
translation_key_dto_ts_decorate([
|
|
805
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
806
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
807
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
808
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
809
|
+
description: 'Developer notes'
|
|
810
|
+
}),
|
|
811
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
812
|
+
], CreateTranslationKeyDto.prototype, "description", void 0);
|
|
813
|
+
translation_key_dto_ts_decorate([
|
|
814
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
815
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsArray)(),
|
|
816
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)({
|
|
817
|
+
each: true
|
|
818
|
+
}),
|
|
819
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
820
|
+
example: [
|
|
821
|
+
'name'
|
|
822
|
+
],
|
|
823
|
+
description: 'Variable names used in the message'
|
|
824
|
+
}),
|
|
825
|
+
translation_key_dto_ts_metadata("design:type", Array)
|
|
826
|
+
], CreateTranslationKeyDto.prototype, "variables", void 0);
|
|
827
|
+
translation_key_dto_ts_decorate([
|
|
828
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
829
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
830
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
831
|
+
example: true
|
|
832
|
+
}),
|
|
833
|
+
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
834
|
+
], CreateTranslationKeyDto.prototype, "isActive", void 0);
|
|
835
|
+
translation_key_dto_ts_decorate([
|
|
836
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
837
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
838
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
839
|
+
example: false,
|
|
840
|
+
description: 'Readonly keys cannot be deleted by users'
|
|
841
|
+
}),
|
|
842
|
+
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
843
|
+
], CreateTranslationKeyDto.prototype, "isReadonly", void 0);
|
|
844
|
+
translation_key_dto_ts_decorate([
|
|
845
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
846
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsNumber)(),
|
|
847
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
848
|
+
example: 1
|
|
849
|
+
}),
|
|
850
|
+
translation_key_dto_ts_metadata("design:type", Number)
|
|
851
|
+
], CreateTranslationKeyDto.prototype, "serial", void 0);
|
|
852
|
+
class UpdateTranslationKeyDto extends (0,swagger_.PartialType)((0,swagger_.OmitType)(CreateTranslationKeyDto, [
|
|
853
|
+
'isReadonly'
|
|
854
|
+
])) {
|
|
855
|
+
id;
|
|
856
|
+
}
|
|
857
|
+
translation_key_dto_ts_decorate([
|
|
858
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
859
|
+
(0,swagger_.ApiProperty)({
|
|
860
|
+
description: 'Translation key ID'
|
|
861
|
+
}),
|
|
862
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
863
|
+
], UpdateTranslationKeyDto.prototype, "id", void 0);
|
|
864
|
+
class TranslationKeyResponseDto extends __rspack_external__flusys_nestjs_shared_dtos_c4585026.IdentityResponseDto {
|
|
865
|
+
module;
|
|
866
|
+
key;
|
|
867
|
+
defaultMessage;
|
|
868
|
+
description;
|
|
869
|
+
variables;
|
|
870
|
+
isActive;
|
|
871
|
+
isReadonly;
|
|
872
|
+
serial;
|
|
873
|
+
}
|
|
874
|
+
translation_key_dto_ts_decorate([
|
|
875
|
+
(0,swagger_.ApiProperty)({
|
|
876
|
+
example: 'auth'
|
|
877
|
+
}),
|
|
878
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
879
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
880
|
+
], TranslationKeyResponseDto.prototype, "module", void 0);
|
|
881
|
+
translation_key_dto_ts_decorate([
|
|
882
|
+
(0,swagger_.ApiProperty)({
|
|
883
|
+
example: 'auth.login.success'
|
|
884
|
+
}),
|
|
885
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
886
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
887
|
+
], TranslationKeyResponseDto.prototype, "key", void 0);
|
|
888
|
+
translation_key_dto_ts_decorate([
|
|
889
|
+
(0,swagger_.ApiProperty)({
|
|
890
|
+
example: 'Login successful'
|
|
891
|
+
}),
|
|
892
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
893
|
+
translation_key_dto_ts_metadata("design:type", String)
|
|
894
|
+
], TranslationKeyResponseDto.prototype, "defaultMessage", void 0);
|
|
895
|
+
translation_key_dto_ts_decorate([
|
|
896
|
+
(0,swagger_.ApiPropertyOptional)(),
|
|
897
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
898
|
+
translation_key_dto_ts_metadata("design:type", Object)
|
|
899
|
+
], TranslationKeyResponseDto.prototype, "description", void 0);
|
|
900
|
+
translation_key_dto_ts_decorate([
|
|
901
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
902
|
+
example: [
|
|
903
|
+
'name'
|
|
904
|
+
]
|
|
905
|
+
}),
|
|
906
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
907
|
+
translation_key_dto_ts_metadata("design:type", Object)
|
|
908
|
+
], TranslationKeyResponseDto.prototype, "variables", void 0);
|
|
909
|
+
translation_key_dto_ts_decorate([
|
|
910
|
+
(0,swagger_.ApiProperty)({
|
|
911
|
+
example: true
|
|
912
|
+
}),
|
|
913
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
914
|
+
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
915
|
+
], TranslationKeyResponseDto.prototype, "isActive", void 0);
|
|
916
|
+
translation_key_dto_ts_decorate([
|
|
917
|
+
(0,swagger_.ApiProperty)({
|
|
918
|
+
example: false
|
|
919
|
+
}),
|
|
920
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
921
|
+
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
922
|
+
], TranslationKeyResponseDto.prototype, "isReadonly", void 0);
|
|
923
|
+
translation_key_dto_ts_decorate([
|
|
924
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
925
|
+
example: 1
|
|
926
|
+
}),
|
|
927
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
928
|
+
translation_key_dto_ts_metadata("design:type", Object)
|
|
929
|
+
], TranslationKeyResponseDto.prototype, "serial", void 0);
|
|
930
|
+
TranslationKeyResponseDto = translation_key_dto_ts_decorate([
|
|
931
|
+
(0,__rspack_external_class_transformer_c5a479fb.Exclude)()
|
|
932
|
+
], TranslationKeyResponseDto);
|
|
933
|
+
|
|
934
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/translation.dto.ts
|
|
935
|
+
function translation_dto_ts_decorate(decorators, target, key, desc) {
|
|
936
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
937
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
938
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
939
|
+
} else {
|
|
940
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
941
|
+
if (d = decorators[i]) {
|
|
942
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
947
|
+
}
|
|
948
|
+
function translation_dto_ts_metadata(metadataKey, metadataValue) {
|
|
949
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
950
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
class CreateTranslationDto {
|
|
960
|
+
languageId;
|
|
961
|
+
translationKeyId;
|
|
962
|
+
value;
|
|
963
|
+
isVerified;
|
|
964
|
+
isActive;
|
|
965
|
+
}
|
|
966
|
+
translation_dto_ts_decorate([
|
|
967
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
968
|
+
(0,swagger_.ApiProperty)({
|
|
969
|
+
description: 'Language ID'
|
|
970
|
+
}),
|
|
971
|
+
translation_dto_ts_metadata("design:type", String)
|
|
972
|
+
], CreateTranslationDto.prototype, "languageId", void 0);
|
|
973
|
+
translation_dto_ts_decorate([
|
|
974
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
975
|
+
(0,swagger_.ApiProperty)({
|
|
976
|
+
description: 'Translation key ID'
|
|
977
|
+
}),
|
|
978
|
+
translation_dto_ts_metadata("design:type", String)
|
|
979
|
+
], CreateTranslationDto.prototype, "translationKeyId", void 0);
|
|
980
|
+
translation_dto_ts_decorate([
|
|
981
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
982
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
983
|
+
(0,swagger_.ApiProperty)({
|
|
984
|
+
example: 'Login successful',
|
|
985
|
+
description: 'Translated value'
|
|
986
|
+
}),
|
|
987
|
+
translation_dto_ts_metadata("design:type", String)
|
|
988
|
+
], CreateTranslationDto.prototype, "value", void 0);
|
|
989
|
+
translation_dto_ts_decorate([
|
|
990
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
991
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
992
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
993
|
+
example: false,
|
|
994
|
+
description: 'Whether translation is verified'
|
|
995
|
+
}),
|
|
996
|
+
translation_dto_ts_metadata("design:type", Boolean)
|
|
997
|
+
], CreateTranslationDto.prototype, "isVerified", void 0);
|
|
998
|
+
translation_dto_ts_decorate([
|
|
999
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
1000
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
1001
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
1002
|
+
example: true
|
|
1003
|
+
}),
|
|
1004
|
+
translation_dto_ts_metadata("design:type", Boolean)
|
|
1005
|
+
], CreateTranslationDto.prototype, "isActive", void 0);
|
|
1006
|
+
class UpdateTranslationDto extends (0,swagger_.PartialType)(CreateTranslationDto) {
|
|
1007
|
+
id;
|
|
1008
|
+
}
|
|
1009
|
+
translation_dto_ts_decorate([
|
|
1010
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
1011
|
+
(0,swagger_.ApiProperty)({
|
|
1012
|
+
description: 'Translation ID'
|
|
1013
|
+
}),
|
|
1014
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1015
|
+
], UpdateTranslationDto.prototype, "id", void 0);
|
|
1016
|
+
class BulkUpdateTranslationDto {
|
|
1017
|
+
id;
|
|
1018
|
+
languageId;
|
|
1019
|
+
translationKeyId;
|
|
1020
|
+
value;
|
|
1021
|
+
isVerified;
|
|
1022
|
+
}
|
|
1023
|
+
translation_dto_ts_decorate([
|
|
1024
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
1025
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
1026
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
1027
|
+
description: 'Translation ID (if updating existing)'
|
|
1028
|
+
}),
|
|
1029
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1030
|
+
], BulkUpdateTranslationDto.prototype, "id", void 0);
|
|
1031
|
+
translation_dto_ts_decorate([
|
|
1032
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
1033
|
+
(0,swagger_.ApiProperty)({
|
|
1034
|
+
description: 'Language ID'
|
|
1035
|
+
}),
|
|
1036
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1037
|
+
], BulkUpdateTranslationDto.prototype, "languageId", void 0);
|
|
1038
|
+
translation_dto_ts_decorate([
|
|
1039
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsUUID)(),
|
|
1040
|
+
(0,swagger_.ApiProperty)({
|
|
1041
|
+
description: 'Translation key ID'
|
|
1042
|
+
}),
|
|
1043
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1044
|
+
], BulkUpdateTranslationDto.prototype, "translationKeyId", void 0);
|
|
1045
|
+
translation_dto_ts_decorate([
|
|
1046
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
1047
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()),
|
|
1048
|
+
(0,swagger_.ApiProperty)({
|
|
1049
|
+
example: 'Updated translation value'
|
|
1050
|
+
}),
|
|
1051
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1052
|
+
], BulkUpdateTranslationDto.prototype, "value", void 0);
|
|
1053
|
+
translation_dto_ts_decorate([
|
|
1054
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
1055
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsBoolean)(),
|
|
1056
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
1057
|
+
example: true
|
|
1058
|
+
}),
|
|
1059
|
+
translation_dto_ts_metadata("design:type", Boolean)
|
|
1060
|
+
], BulkUpdateTranslationDto.prototype, "isVerified", void 0);
|
|
1061
|
+
class BulkUpdateTranslationsDto {
|
|
1062
|
+
translations;
|
|
1063
|
+
}
|
|
1064
|
+
translation_dto_ts_decorate([
|
|
1065
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsArray)(),
|
|
1066
|
+
(0,__rspack_external_class_validator_7b99ef4d.ValidateNested)({
|
|
1067
|
+
each: true
|
|
1068
|
+
}),
|
|
1069
|
+
(0,__rspack_external_class_transformer_c5a479fb.Type)(()=>BulkUpdateTranslationDto),
|
|
1070
|
+
(0,swagger_.ApiProperty)({
|
|
1071
|
+
type: [
|
|
1072
|
+
BulkUpdateTranslationDto
|
|
1073
|
+
]
|
|
1074
|
+
}),
|
|
1075
|
+
translation_dto_ts_metadata("design:type", Array)
|
|
1076
|
+
], BulkUpdateTranslationsDto.prototype, "translations", void 0);
|
|
1077
|
+
class TranslationResponseDto extends __rspack_external__flusys_nestjs_shared_dtos_c4585026.IdentityResponseDto {
|
|
1078
|
+
languageId;
|
|
1079
|
+
translationKeyId;
|
|
1080
|
+
value;
|
|
1081
|
+
isVerified;
|
|
1082
|
+
isActive;
|
|
1083
|
+
language;
|
|
1084
|
+
translationKey;
|
|
1085
|
+
}
|
|
1086
|
+
translation_dto_ts_decorate([
|
|
1087
|
+
(0,swagger_.ApiProperty)(),
|
|
1088
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1089
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1090
|
+
], TranslationResponseDto.prototype, "languageId", void 0);
|
|
1091
|
+
translation_dto_ts_decorate([
|
|
1092
|
+
(0,swagger_.ApiProperty)(),
|
|
1093
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1094
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1095
|
+
], TranslationResponseDto.prototype, "translationKeyId", void 0);
|
|
1096
|
+
translation_dto_ts_decorate([
|
|
1097
|
+
(0,swagger_.ApiProperty)({
|
|
1098
|
+
example: 'Login successful'
|
|
1099
|
+
}),
|
|
1100
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1101
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1102
|
+
], TranslationResponseDto.prototype, "value", void 0);
|
|
1103
|
+
translation_dto_ts_decorate([
|
|
1104
|
+
(0,swagger_.ApiProperty)({
|
|
1105
|
+
example: false
|
|
1106
|
+
}),
|
|
1107
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1108
|
+
translation_dto_ts_metadata("design:type", Boolean)
|
|
1109
|
+
], TranslationResponseDto.prototype, "isVerified", void 0);
|
|
1110
|
+
translation_dto_ts_decorate([
|
|
1111
|
+
(0,swagger_.ApiProperty)({
|
|
1112
|
+
example: true
|
|
1113
|
+
}),
|
|
1114
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1115
|
+
translation_dto_ts_metadata("design:type", Boolean)
|
|
1116
|
+
], TranslationResponseDto.prototype, "isActive", void 0);
|
|
1117
|
+
translation_dto_ts_decorate([
|
|
1118
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
1119
|
+
type: ()=>LanguageResponseDto
|
|
1120
|
+
}),
|
|
1121
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1122
|
+
translation_dto_ts_metadata("design:type", typeof LanguageResponseDto === "undefined" ? Object : LanguageResponseDto)
|
|
1123
|
+
], TranslationResponseDto.prototype, "language", void 0);
|
|
1124
|
+
translation_dto_ts_decorate([
|
|
1125
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
1126
|
+
type: ()=>TranslationKeyResponseDto
|
|
1127
|
+
}),
|
|
1128
|
+
(0,__rspack_external_class_transformer_c5a479fb.Expose)(),
|
|
1129
|
+
translation_dto_ts_metadata("design:type", typeof TranslationKeyResponseDto === "undefined" ? Object : TranslationKeyResponseDto)
|
|
1130
|
+
], TranslationResponseDto.prototype, "translationKey", void 0);
|
|
1131
|
+
TranslationResponseDto = translation_dto_ts_decorate([
|
|
1132
|
+
(0,__rspack_external_class_transformer_c5a479fb.Exclude)()
|
|
1133
|
+
], TranslationResponseDto);
|
|
1134
|
+
class GetTranslationsByLanguageDto {
|
|
1135
|
+
languageCode;
|
|
1136
|
+
modules;
|
|
1137
|
+
}
|
|
1138
|
+
translation_dto_ts_decorate([
|
|
1139
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)(),
|
|
1140
|
+
(0,__rspack_external_class_validator_7b99ef4d.MaxLength)(10),
|
|
1141
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.trim()?.toLowerCase()),
|
|
1142
|
+
(0,swagger_.ApiProperty)({
|
|
1143
|
+
example: 'en',
|
|
1144
|
+
description: 'Language code'
|
|
1145
|
+
}),
|
|
1146
|
+
translation_dto_ts_metadata("design:type", String)
|
|
1147
|
+
], GetTranslationsByLanguageDto.prototype, "languageCode", void 0);
|
|
1148
|
+
translation_dto_ts_decorate([
|
|
1149
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsOptional)(),
|
|
1150
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsArray)(),
|
|
1151
|
+
(0,__rspack_external_class_validator_7b99ef4d.IsString)({
|
|
1152
|
+
each: true
|
|
1153
|
+
}),
|
|
1154
|
+
(0,__rspack_external_class_transformer_c5a479fb.Transform)(({ value })=>value?.map((v)=>v?.trim())),
|
|
1155
|
+
(0,swagger_.ApiPropertyOptional)({
|
|
1156
|
+
example: [
|
|
1157
|
+
'shared',
|
|
1158
|
+
'auth'
|
|
1159
|
+
],
|
|
1160
|
+
description: 'Filter by modules (optional)'
|
|
1161
|
+
}),
|
|
1162
|
+
translation_dto_ts_metadata("design:type", Array)
|
|
1163
|
+
], GetTranslationsByLanguageDto.prototype, "modules", void 0);
|
|
1164
|
+
|
|
1165
|
+
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/index.ts
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
},
|
|
1172
|
+
176(module) {
|
|
1173
|
+
|
|
1174
|
+
module.exports = __rspack_external__nestjs_swagger_7cd450b5;
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
},
|
|
1178
|
+
|
|
1179
|
+
};
|