@flusys/nestjs-localization 9.1.0-rc.1 → 9.1.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/fesm/349.js +100 -100
- package/fesm/692.js +6 -6
- package/fesm/dtos/index.js +100 -100
- package/fesm/entities/index.js +6 -6
- package/package.json +5 -5
package/fesm/349.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { IdentityResponseDto } from "@flusys/nestjs-shared/dtos";
|
|
2
|
+
import { Exclude, Expose, Transform, Type } from "class-transformer";
|
|
3
|
+
import { IsArray, IsBoolean, IsIn, IsNumber, IsOptional, IsString, IsUUID, MaxLength, ValidateNested } from "class-validator";
|
|
1
4
|
import * as __rspack_external__nestjs_swagger_7cd450b5 from "@nestjs/swagger";
|
|
2
5
|
import * as __rspack_external__flusys_nestjs_shared_decorators_c129b601 from "@flusys/nestjs-shared/decorators";
|
|
3
6
|
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
7
|
export const __rspack_esm_id = 349;
|
|
8
8
|
export const __rspack_esm_ids = [349];
|
|
9
9
|
export const __webpack_modules__ = {
|
|
@@ -580,9 +580,9 @@ class CreateLanguageDto {
|
|
|
580
580
|
serial;
|
|
581
581
|
}
|
|
582
582
|
_ts_decorate([
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
583
|
+
IsString(),
|
|
584
|
+
MaxLength(10),
|
|
585
|
+
Transform(({ value })=>value?.trim()?.toLowerCase()),
|
|
586
586
|
(0,swagger_.ApiProperty)({
|
|
587
587
|
example: 'en',
|
|
588
588
|
description: 'Language code (ISO 639-1)'
|
|
@@ -590,9 +590,9 @@ _ts_decorate([
|
|
|
590
590
|
_ts_metadata("design:type", String)
|
|
591
591
|
], CreateLanguageDto.prototype, "code", void 0);
|
|
592
592
|
_ts_decorate([
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
593
|
+
IsString(),
|
|
594
|
+
MaxLength(100),
|
|
595
|
+
Transform(({ value })=>value?.trim()),
|
|
596
596
|
(0,swagger_.ApiProperty)({
|
|
597
597
|
example: 'English',
|
|
598
598
|
description: 'Language name'
|
|
@@ -600,10 +600,10 @@ _ts_decorate([
|
|
|
600
600
|
_ts_metadata("design:type", String)
|
|
601
601
|
], CreateLanguageDto.prototype, "name", void 0);
|
|
602
602
|
_ts_decorate([
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
603
|
+
IsOptional(),
|
|
604
|
+
IsString(),
|
|
605
|
+
MaxLength(100),
|
|
606
|
+
Transform(({ value })=>value?.trim()),
|
|
607
607
|
(0,swagger_.ApiPropertyOptional)({
|
|
608
608
|
example: 'English',
|
|
609
609
|
description: 'Native name of the language'
|
|
@@ -611,8 +611,8 @@ _ts_decorate([
|
|
|
611
611
|
_ts_metadata("design:type", String)
|
|
612
612
|
], CreateLanguageDto.prototype, "nativeName", void 0);
|
|
613
613
|
_ts_decorate([
|
|
614
|
-
|
|
615
|
-
|
|
614
|
+
IsOptional(),
|
|
615
|
+
IsIn([
|
|
616
616
|
'ltr',
|
|
617
617
|
'rtl'
|
|
618
618
|
]),
|
|
@@ -627,8 +627,8 @@ _ts_decorate([
|
|
|
627
627
|
_ts_metadata("design:type", String)
|
|
628
628
|
], CreateLanguageDto.prototype, "direction", void 0);
|
|
629
629
|
_ts_decorate([
|
|
630
|
-
|
|
631
|
-
|
|
630
|
+
IsOptional(),
|
|
631
|
+
IsBoolean(),
|
|
632
632
|
(0,swagger_.ApiPropertyOptional)({
|
|
633
633
|
example: true,
|
|
634
634
|
description: 'Whether the language is active'
|
|
@@ -636,8 +636,8 @@ _ts_decorate([
|
|
|
636
636
|
_ts_metadata("design:type", Boolean)
|
|
637
637
|
], CreateLanguageDto.prototype, "isActive", void 0);
|
|
638
638
|
_ts_decorate([
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
IsOptional(),
|
|
640
|
+
IsBoolean(),
|
|
641
641
|
(0,swagger_.ApiPropertyOptional)({
|
|
642
642
|
example: false,
|
|
643
643
|
description: 'Whether this is the default language'
|
|
@@ -645,8 +645,8 @@ _ts_decorate([
|
|
|
645
645
|
_ts_metadata("design:type", Boolean)
|
|
646
646
|
], CreateLanguageDto.prototype, "isDefault", void 0);
|
|
647
647
|
_ts_decorate([
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
IsOptional(),
|
|
649
|
+
IsNumber(),
|
|
650
650
|
(0,swagger_.ApiPropertyOptional)({
|
|
651
651
|
example: 1,
|
|
652
652
|
description: 'Display order'
|
|
@@ -657,13 +657,13 @@ class UpdateLanguageDto extends (0,swagger_.PartialType)(CreateLanguageDto) {
|
|
|
657
657
|
id;
|
|
658
658
|
}
|
|
659
659
|
_ts_decorate([
|
|
660
|
-
|
|
660
|
+
IsUUID(),
|
|
661
661
|
(0,swagger_.ApiProperty)({
|
|
662
662
|
description: 'Language ID'
|
|
663
663
|
}),
|
|
664
664
|
_ts_metadata("design:type", String)
|
|
665
665
|
], UpdateLanguageDto.prototype, "id", void 0);
|
|
666
|
-
class LanguageResponseDto extends
|
|
666
|
+
class LanguageResponseDto extends IdentityResponseDto {
|
|
667
667
|
code;
|
|
668
668
|
name;
|
|
669
669
|
nativeName;
|
|
@@ -677,21 +677,21 @@ _ts_decorate([
|
|
|
677
677
|
(0,swagger_.ApiProperty)({
|
|
678
678
|
example: 'en'
|
|
679
679
|
}),
|
|
680
|
-
|
|
680
|
+
Expose(),
|
|
681
681
|
_ts_metadata("design:type", String)
|
|
682
682
|
], LanguageResponseDto.prototype, "code", void 0);
|
|
683
683
|
_ts_decorate([
|
|
684
684
|
(0,swagger_.ApiProperty)({
|
|
685
685
|
example: 'English'
|
|
686
686
|
}),
|
|
687
|
-
|
|
687
|
+
Expose(),
|
|
688
688
|
_ts_metadata("design:type", String)
|
|
689
689
|
], LanguageResponseDto.prototype, "name", void 0);
|
|
690
690
|
_ts_decorate([
|
|
691
691
|
(0,swagger_.ApiPropertyOptional)({
|
|
692
692
|
example: 'English'
|
|
693
693
|
}),
|
|
694
|
-
|
|
694
|
+
Expose(),
|
|
695
695
|
_ts_metadata("design:type", Object)
|
|
696
696
|
], LanguageResponseDto.prototype, "nativeName", void 0);
|
|
697
697
|
_ts_decorate([
|
|
@@ -702,21 +702,21 @@ _ts_decorate([
|
|
|
702
702
|
'rtl'
|
|
703
703
|
]
|
|
704
704
|
}),
|
|
705
|
-
|
|
705
|
+
Expose(),
|
|
706
706
|
_ts_metadata("design:type", Object)
|
|
707
707
|
], LanguageResponseDto.prototype, "direction", void 0);
|
|
708
708
|
_ts_decorate([
|
|
709
709
|
(0,swagger_.ApiProperty)({
|
|
710
710
|
example: true
|
|
711
711
|
}),
|
|
712
|
-
|
|
712
|
+
Expose(),
|
|
713
713
|
_ts_metadata("design:type", Boolean)
|
|
714
714
|
], LanguageResponseDto.prototype, "isActive", void 0);
|
|
715
715
|
_ts_decorate([
|
|
716
716
|
(0,swagger_.ApiProperty)({
|
|
717
717
|
example: false
|
|
718
718
|
}),
|
|
719
|
-
|
|
719
|
+
Expose(),
|
|
720
720
|
_ts_metadata("design:type", Boolean)
|
|
721
721
|
], LanguageResponseDto.prototype, "isDefault", void 0);
|
|
722
722
|
_ts_decorate([
|
|
@@ -724,18 +724,18 @@ _ts_decorate([
|
|
|
724
724
|
example: false,
|
|
725
725
|
description: 'System language: cannot be renamed or deleted'
|
|
726
726
|
}),
|
|
727
|
-
|
|
727
|
+
Expose(),
|
|
728
728
|
_ts_metadata("design:type", Boolean)
|
|
729
729
|
], LanguageResponseDto.prototype, "isReadonly", void 0);
|
|
730
730
|
_ts_decorate([
|
|
731
731
|
(0,swagger_.ApiPropertyOptional)({
|
|
732
732
|
example: 1
|
|
733
733
|
}),
|
|
734
|
-
|
|
734
|
+
Expose(),
|
|
735
735
|
_ts_metadata("design:type", Object)
|
|
736
736
|
], LanguageResponseDto.prototype, "serial", void 0);
|
|
737
737
|
LanguageResponseDto = _ts_decorate([
|
|
738
|
-
|
|
738
|
+
Exclude()
|
|
739
739
|
], LanguageResponseDto);
|
|
740
740
|
|
|
741
741
|
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/translation-key.dto.ts
|
|
@@ -772,9 +772,9 @@ class CreateTranslationKeyDto {
|
|
|
772
772
|
serial;
|
|
773
773
|
}
|
|
774
774
|
translation_key_dto_ts_decorate([
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
775
|
+
IsString(),
|
|
776
|
+
MaxLength(100),
|
|
777
|
+
Transform(({ value })=>value?.trim()?.toLowerCase()),
|
|
778
778
|
(0,swagger_.ApiProperty)({
|
|
779
779
|
example: 'auth',
|
|
780
780
|
description: 'Module name'
|
|
@@ -782,9 +782,9 @@ translation_key_dto_ts_decorate([
|
|
|
782
782
|
translation_key_dto_ts_metadata("design:type", String)
|
|
783
783
|
], CreateTranslationKeyDto.prototype, "module", void 0);
|
|
784
784
|
translation_key_dto_ts_decorate([
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
785
|
+
IsString(),
|
|
786
|
+
MaxLength(255),
|
|
787
|
+
Transform(({ value })=>value?.trim()),
|
|
788
788
|
(0,swagger_.ApiProperty)({
|
|
789
789
|
example: 'auth.login.success',
|
|
790
790
|
description: 'Translation key'
|
|
@@ -792,9 +792,9 @@ translation_key_dto_ts_decorate([
|
|
|
792
792
|
translation_key_dto_ts_metadata("design:type", String)
|
|
793
793
|
], CreateTranslationKeyDto.prototype, "key", void 0);
|
|
794
794
|
translation_key_dto_ts_decorate([
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
795
|
+
IsString(),
|
|
796
|
+
MaxLength(500),
|
|
797
|
+
Transform(({ value })=>value?.trim()),
|
|
798
798
|
(0,swagger_.ApiProperty)({
|
|
799
799
|
example: 'Login successful',
|
|
800
800
|
description: 'Default English message'
|
|
@@ -802,18 +802,18 @@ translation_key_dto_ts_decorate([
|
|
|
802
802
|
translation_key_dto_ts_metadata("design:type", String)
|
|
803
803
|
], CreateTranslationKeyDto.prototype, "defaultMessage", void 0);
|
|
804
804
|
translation_key_dto_ts_decorate([
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
805
|
+
IsOptional(),
|
|
806
|
+
IsString(),
|
|
807
|
+
Transform(({ value })=>value?.trim()),
|
|
808
808
|
(0,swagger_.ApiPropertyOptional)({
|
|
809
809
|
description: 'Developer notes'
|
|
810
810
|
}),
|
|
811
811
|
translation_key_dto_ts_metadata("design:type", String)
|
|
812
812
|
], CreateTranslationKeyDto.prototype, "description", void 0);
|
|
813
813
|
translation_key_dto_ts_decorate([
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
814
|
+
IsOptional(),
|
|
815
|
+
IsArray(),
|
|
816
|
+
IsString({
|
|
817
817
|
each: true
|
|
818
818
|
}),
|
|
819
819
|
(0,swagger_.ApiPropertyOptional)({
|
|
@@ -825,16 +825,16 @@ translation_key_dto_ts_decorate([
|
|
|
825
825
|
translation_key_dto_ts_metadata("design:type", Array)
|
|
826
826
|
], CreateTranslationKeyDto.prototype, "variables", void 0);
|
|
827
827
|
translation_key_dto_ts_decorate([
|
|
828
|
-
|
|
829
|
-
|
|
828
|
+
IsOptional(),
|
|
829
|
+
IsBoolean(),
|
|
830
830
|
(0,swagger_.ApiPropertyOptional)({
|
|
831
831
|
example: true
|
|
832
832
|
}),
|
|
833
833
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
834
834
|
], CreateTranslationKeyDto.prototype, "isActive", void 0);
|
|
835
835
|
translation_key_dto_ts_decorate([
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
IsOptional(),
|
|
837
|
+
IsBoolean(),
|
|
838
838
|
(0,swagger_.ApiPropertyOptional)({
|
|
839
839
|
example: false,
|
|
840
840
|
description: 'Readonly keys cannot be deleted by users'
|
|
@@ -842,8 +842,8 @@ translation_key_dto_ts_decorate([
|
|
|
842
842
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
843
843
|
], CreateTranslationKeyDto.prototype, "isReadonly", void 0);
|
|
844
844
|
translation_key_dto_ts_decorate([
|
|
845
|
-
|
|
846
|
-
|
|
845
|
+
IsOptional(),
|
|
846
|
+
IsNumber(),
|
|
847
847
|
(0,swagger_.ApiPropertyOptional)({
|
|
848
848
|
example: 1
|
|
849
849
|
}),
|
|
@@ -855,13 +855,13 @@ class UpdateTranslationKeyDto extends (0,swagger_.PartialType)((0,swagger_.OmitT
|
|
|
855
855
|
id;
|
|
856
856
|
}
|
|
857
857
|
translation_key_dto_ts_decorate([
|
|
858
|
-
|
|
858
|
+
IsUUID(),
|
|
859
859
|
(0,swagger_.ApiProperty)({
|
|
860
860
|
description: 'Translation key ID'
|
|
861
861
|
}),
|
|
862
862
|
translation_key_dto_ts_metadata("design:type", String)
|
|
863
863
|
], UpdateTranslationKeyDto.prototype, "id", void 0);
|
|
864
|
-
class TranslationKeyResponseDto extends
|
|
864
|
+
class TranslationKeyResponseDto extends IdentityResponseDto {
|
|
865
865
|
module;
|
|
866
866
|
key;
|
|
867
867
|
defaultMessage;
|
|
@@ -875,26 +875,26 @@ translation_key_dto_ts_decorate([
|
|
|
875
875
|
(0,swagger_.ApiProperty)({
|
|
876
876
|
example: 'auth'
|
|
877
877
|
}),
|
|
878
|
-
|
|
878
|
+
Expose(),
|
|
879
879
|
translation_key_dto_ts_metadata("design:type", String)
|
|
880
880
|
], TranslationKeyResponseDto.prototype, "module", void 0);
|
|
881
881
|
translation_key_dto_ts_decorate([
|
|
882
882
|
(0,swagger_.ApiProperty)({
|
|
883
883
|
example: 'auth.login.success'
|
|
884
884
|
}),
|
|
885
|
-
|
|
885
|
+
Expose(),
|
|
886
886
|
translation_key_dto_ts_metadata("design:type", String)
|
|
887
887
|
], TranslationKeyResponseDto.prototype, "key", void 0);
|
|
888
888
|
translation_key_dto_ts_decorate([
|
|
889
889
|
(0,swagger_.ApiProperty)({
|
|
890
890
|
example: 'Login successful'
|
|
891
891
|
}),
|
|
892
|
-
|
|
892
|
+
Expose(),
|
|
893
893
|
translation_key_dto_ts_metadata("design:type", String)
|
|
894
894
|
], TranslationKeyResponseDto.prototype, "defaultMessage", void 0);
|
|
895
895
|
translation_key_dto_ts_decorate([
|
|
896
896
|
(0,swagger_.ApiPropertyOptional)(),
|
|
897
|
-
|
|
897
|
+
Expose(),
|
|
898
898
|
translation_key_dto_ts_metadata("design:type", Object)
|
|
899
899
|
], TranslationKeyResponseDto.prototype, "description", void 0);
|
|
900
900
|
translation_key_dto_ts_decorate([
|
|
@@ -903,32 +903,32 @@ translation_key_dto_ts_decorate([
|
|
|
903
903
|
'name'
|
|
904
904
|
]
|
|
905
905
|
}),
|
|
906
|
-
|
|
906
|
+
Expose(),
|
|
907
907
|
translation_key_dto_ts_metadata("design:type", Object)
|
|
908
908
|
], TranslationKeyResponseDto.prototype, "variables", void 0);
|
|
909
909
|
translation_key_dto_ts_decorate([
|
|
910
910
|
(0,swagger_.ApiProperty)({
|
|
911
911
|
example: true
|
|
912
912
|
}),
|
|
913
|
-
|
|
913
|
+
Expose(),
|
|
914
914
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
915
915
|
], TranslationKeyResponseDto.prototype, "isActive", void 0);
|
|
916
916
|
translation_key_dto_ts_decorate([
|
|
917
917
|
(0,swagger_.ApiProperty)({
|
|
918
918
|
example: false
|
|
919
919
|
}),
|
|
920
|
-
|
|
920
|
+
Expose(),
|
|
921
921
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
922
922
|
], TranslationKeyResponseDto.prototype, "isReadonly", void 0);
|
|
923
923
|
translation_key_dto_ts_decorate([
|
|
924
924
|
(0,swagger_.ApiPropertyOptional)({
|
|
925
925
|
example: 1
|
|
926
926
|
}),
|
|
927
|
-
|
|
927
|
+
Expose(),
|
|
928
928
|
translation_key_dto_ts_metadata("design:type", Object)
|
|
929
929
|
], TranslationKeyResponseDto.prototype, "serial", void 0);
|
|
930
930
|
TranslationKeyResponseDto = translation_key_dto_ts_decorate([
|
|
931
|
-
|
|
931
|
+
Exclude()
|
|
932
932
|
], TranslationKeyResponseDto);
|
|
933
933
|
|
|
934
934
|
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/translation.dto.ts
|
|
@@ -964,22 +964,22 @@ class CreateTranslationDto {
|
|
|
964
964
|
isActive;
|
|
965
965
|
}
|
|
966
966
|
translation_dto_ts_decorate([
|
|
967
|
-
|
|
967
|
+
IsUUID(),
|
|
968
968
|
(0,swagger_.ApiProperty)({
|
|
969
969
|
description: 'Language ID'
|
|
970
970
|
}),
|
|
971
971
|
translation_dto_ts_metadata("design:type", String)
|
|
972
972
|
], CreateTranslationDto.prototype, "languageId", void 0);
|
|
973
973
|
translation_dto_ts_decorate([
|
|
974
|
-
|
|
974
|
+
IsUUID(),
|
|
975
975
|
(0,swagger_.ApiProperty)({
|
|
976
976
|
description: 'Translation key ID'
|
|
977
977
|
}),
|
|
978
978
|
translation_dto_ts_metadata("design:type", String)
|
|
979
979
|
], CreateTranslationDto.prototype, "translationKeyId", void 0);
|
|
980
980
|
translation_dto_ts_decorate([
|
|
981
|
-
|
|
982
|
-
|
|
981
|
+
IsString(),
|
|
982
|
+
Transform(({ value })=>value?.trim()),
|
|
983
983
|
(0,swagger_.ApiProperty)({
|
|
984
984
|
example: 'Login successful',
|
|
985
985
|
description: 'Translated value'
|
|
@@ -987,8 +987,8 @@ translation_dto_ts_decorate([
|
|
|
987
987
|
translation_dto_ts_metadata("design:type", String)
|
|
988
988
|
], CreateTranslationDto.prototype, "value", void 0);
|
|
989
989
|
translation_dto_ts_decorate([
|
|
990
|
-
|
|
991
|
-
|
|
990
|
+
IsOptional(),
|
|
991
|
+
IsBoolean(),
|
|
992
992
|
(0,swagger_.ApiPropertyOptional)({
|
|
993
993
|
example: false,
|
|
994
994
|
description: 'Whether translation is verified'
|
|
@@ -996,8 +996,8 @@ translation_dto_ts_decorate([
|
|
|
996
996
|
translation_dto_ts_metadata("design:type", Boolean)
|
|
997
997
|
], CreateTranslationDto.prototype, "isVerified", void 0);
|
|
998
998
|
translation_dto_ts_decorate([
|
|
999
|
-
|
|
1000
|
-
|
|
999
|
+
IsOptional(),
|
|
1000
|
+
IsBoolean(),
|
|
1001
1001
|
(0,swagger_.ApiPropertyOptional)({
|
|
1002
1002
|
example: true
|
|
1003
1003
|
}),
|
|
@@ -1007,7 +1007,7 @@ class UpdateTranslationDto extends (0,swagger_.PartialType)(CreateTranslationDto
|
|
|
1007
1007
|
id;
|
|
1008
1008
|
}
|
|
1009
1009
|
translation_dto_ts_decorate([
|
|
1010
|
-
|
|
1010
|
+
IsUUID(),
|
|
1011
1011
|
(0,swagger_.ApiProperty)({
|
|
1012
1012
|
description: 'Translation ID'
|
|
1013
1013
|
}),
|
|
@@ -1021,38 +1021,38 @@ class BulkUpdateTranslationDto {
|
|
|
1021
1021
|
isVerified;
|
|
1022
1022
|
}
|
|
1023
1023
|
translation_dto_ts_decorate([
|
|
1024
|
-
|
|
1025
|
-
|
|
1024
|
+
IsOptional(),
|
|
1025
|
+
IsUUID(),
|
|
1026
1026
|
(0,swagger_.ApiPropertyOptional)({
|
|
1027
1027
|
description: 'Translation ID (if updating existing)'
|
|
1028
1028
|
}),
|
|
1029
1029
|
translation_dto_ts_metadata("design:type", String)
|
|
1030
1030
|
], BulkUpdateTranslationDto.prototype, "id", void 0);
|
|
1031
1031
|
translation_dto_ts_decorate([
|
|
1032
|
-
|
|
1032
|
+
IsUUID(),
|
|
1033
1033
|
(0,swagger_.ApiProperty)({
|
|
1034
1034
|
description: 'Language ID'
|
|
1035
1035
|
}),
|
|
1036
1036
|
translation_dto_ts_metadata("design:type", String)
|
|
1037
1037
|
], BulkUpdateTranslationDto.prototype, "languageId", void 0);
|
|
1038
1038
|
translation_dto_ts_decorate([
|
|
1039
|
-
|
|
1039
|
+
IsUUID(),
|
|
1040
1040
|
(0,swagger_.ApiProperty)({
|
|
1041
1041
|
description: 'Translation key ID'
|
|
1042
1042
|
}),
|
|
1043
1043
|
translation_dto_ts_metadata("design:type", String)
|
|
1044
1044
|
], BulkUpdateTranslationDto.prototype, "translationKeyId", void 0);
|
|
1045
1045
|
translation_dto_ts_decorate([
|
|
1046
|
-
|
|
1047
|
-
|
|
1046
|
+
IsString(),
|
|
1047
|
+
Transform(({ value })=>value?.trim()),
|
|
1048
1048
|
(0,swagger_.ApiProperty)({
|
|
1049
1049
|
example: 'Updated translation value'
|
|
1050
1050
|
}),
|
|
1051
1051
|
translation_dto_ts_metadata("design:type", String)
|
|
1052
1052
|
], BulkUpdateTranslationDto.prototype, "value", void 0);
|
|
1053
1053
|
translation_dto_ts_decorate([
|
|
1054
|
-
|
|
1055
|
-
|
|
1054
|
+
IsOptional(),
|
|
1055
|
+
IsBoolean(),
|
|
1056
1056
|
(0,swagger_.ApiPropertyOptional)({
|
|
1057
1057
|
example: true
|
|
1058
1058
|
}),
|
|
@@ -1062,11 +1062,11 @@ class BulkUpdateTranslationsDto {
|
|
|
1062
1062
|
translations;
|
|
1063
1063
|
}
|
|
1064
1064
|
translation_dto_ts_decorate([
|
|
1065
|
-
|
|
1066
|
-
|
|
1065
|
+
IsArray(),
|
|
1066
|
+
ValidateNested({
|
|
1067
1067
|
each: true
|
|
1068
1068
|
}),
|
|
1069
|
-
|
|
1069
|
+
Type(()=>BulkUpdateTranslationDto),
|
|
1070
1070
|
(0,swagger_.ApiProperty)({
|
|
1071
1071
|
type: [
|
|
1072
1072
|
BulkUpdateTranslationDto
|
|
@@ -1074,7 +1074,7 @@ translation_dto_ts_decorate([
|
|
|
1074
1074
|
}),
|
|
1075
1075
|
translation_dto_ts_metadata("design:type", Array)
|
|
1076
1076
|
], BulkUpdateTranslationsDto.prototype, "translations", void 0);
|
|
1077
|
-
class TranslationResponseDto extends
|
|
1077
|
+
class TranslationResponseDto extends IdentityResponseDto {
|
|
1078
1078
|
languageId;
|
|
1079
1079
|
translationKeyId;
|
|
1080
1080
|
value;
|
|
@@ -1085,60 +1085,60 @@ class TranslationResponseDto extends __rspack_external__flusys_nestjs_shared_dto
|
|
|
1085
1085
|
}
|
|
1086
1086
|
translation_dto_ts_decorate([
|
|
1087
1087
|
(0,swagger_.ApiProperty)(),
|
|
1088
|
-
|
|
1088
|
+
Expose(),
|
|
1089
1089
|
translation_dto_ts_metadata("design:type", String)
|
|
1090
1090
|
], TranslationResponseDto.prototype, "languageId", void 0);
|
|
1091
1091
|
translation_dto_ts_decorate([
|
|
1092
1092
|
(0,swagger_.ApiProperty)(),
|
|
1093
|
-
|
|
1093
|
+
Expose(),
|
|
1094
1094
|
translation_dto_ts_metadata("design:type", String)
|
|
1095
1095
|
], TranslationResponseDto.prototype, "translationKeyId", void 0);
|
|
1096
1096
|
translation_dto_ts_decorate([
|
|
1097
1097
|
(0,swagger_.ApiProperty)({
|
|
1098
1098
|
example: 'Login successful'
|
|
1099
1099
|
}),
|
|
1100
|
-
|
|
1100
|
+
Expose(),
|
|
1101
1101
|
translation_dto_ts_metadata("design:type", String)
|
|
1102
1102
|
], TranslationResponseDto.prototype, "value", void 0);
|
|
1103
1103
|
translation_dto_ts_decorate([
|
|
1104
1104
|
(0,swagger_.ApiProperty)({
|
|
1105
1105
|
example: false
|
|
1106
1106
|
}),
|
|
1107
|
-
|
|
1107
|
+
Expose(),
|
|
1108
1108
|
translation_dto_ts_metadata("design:type", Boolean)
|
|
1109
1109
|
], TranslationResponseDto.prototype, "isVerified", void 0);
|
|
1110
1110
|
translation_dto_ts_decorate([
|
|
1111
1111
|
(0,swagger_.ApiProperty)({
|
|
1112
1112
|
example: true
|
|
1113
1113
|
}),
|
|
1114
|
-
|
|
1114
|
+
Expose(),
|
|
1115
1115
|
translation_dto_ts_metadata("design:type", Boolean)
|
|
1116
1116
|
], TranslationResponseDto.prototype, "isActive", void 0);
|
|
1117
1117
|
translation_dto_ts_decorate([
|
|
1118
1118
|
(0,swagger_.ApiPropertyOptional)({
|
|
1119
1119
|
type: ()=>LanguageResponseDto
|
|
1120
1120
|
}),
|
|
1121
|
-
|
|
1121
|
+
Expose(),
|
|
1122
1122
|
translation_dto_ts_metadata("design:type", typeof LanguageResponseDto === "undefined" ? Object : LanguageResponseDto)
|
|
1123
1123
|
], TranslationResponseDto.prototype, "language", void 0);
|
|
1124
1124
|
translation_dto_ts_decorate([
|
|
1125
1125
|
(0,swagger_.ApiPropertyOptional)({
|
|
1126
1126
|
type: ()=>TranslationKeyResponseDto
|
|
1127
1127
|
}),
|
|
1128
|
-
|
|
1128
|
+
Expose(),
|
|
1129
1129
|
translation_dto_ts_metadata("design:type", typeof TranslationKeyResponseDto === "undefined" ? Object : TranslationKeyResponseDto)
|
|
1130
1130
|
], TranslationResponseDto.prototype, "translationKey", void 0);
|
|
1131
1131
|
TranslationResponseDto = translation_dto_ts_decorate([
|
|
1132
|
-
|
|
1132
|
+
Exclude()
|
|
1133
1133
|
], TranslationResponseDto);
|
|
1134
1134
|
class GetTranslationsByLanguageDto {
|
|
1135
1135
|
languageCode;
|
|
1136
1136
|
modules;
|
|
1137
1137
|
}
|
|
1138
1138
|
translation_dto_ts_decorate([
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1139
|
+
IsString(),
|
|
1140
|
+
MaxLength(10),
|
|
1141
|
+
Transform(({ value })=>value?.trim()?.toLowerCase()),
|
|
1142
1142
|
(0,swagger_.ApiProperty)({
|
|
1143
1143
|
example: 'en',
|
|
1144
1144
|
description: 'Language code'
|
|
@@ -1146,12 +1146,12 @@ translation_dto_ts_decorate([
|
|
|
1146
1146
|
translation_dto_ts_metadata("design:type", String)
|
|
1147
1147
|
], GetTranslationsByLanguageDto.prototype, "languageCode", void 0);
|
|
1148
1148
|
translation_dto_ts_decorate([
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1149
|
+
IsOptional(),
|
|
1150
|
+
IsArray(),
|
|
1151
|
+
IsString({
|
|
1152
1152
|
each: true
|
|
1153
1153
|
}),
|
|
1154
|
-
|
|
1154
|
+
Transform(({ value })=>value?.map((v)=>v?.trim())),
|
|
1155
1155
|
(0,swagger_.ApiPropertyOptional)({
|
|
1156
1156
|
example: [
|
|
1157
1157
|
'shared',
|
package/fesm/692.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { Identity } from "@flusys/nestjs-shared/entities";
|
|
2
|
+
import { getJsonColumnType } from "@flusys/nestjs-shared";
|
|
1
3
|
import * as __rspack_external__flusys_nestjs_shared_classes_6076a329 from "@flusys/nestjs-shared/classes";
|
|
2
4
|
import * as __rspack_external__flusys_nestjs_shared_modules_24702bee from "@flusys/nestjs-shared/modules";
|
|
3
5
|
import * as __rspack_external__nestjs_common_a04939da from "@nestjs/common";
|
|
4
6
|
import * as __rspack_external_typeorm from "typeorm";
|
|
5
7
|
import * as __rspack_external__nestjs_core_d7b00a1a from "@nestjs/core";
|
|
6
|
-
import * as __rspack_external__flusys_nestjs_shared_entities_420e6d19 from "@flusys/nestjs-shared/entities";
|
|
7
|
-
import * as __rspack_external__flusys_nestjs_shared_393d2cae from "@flusys/nestjs-shared";
|
|
8
8
|
export const __rspack_esm_id = 692;
|
|
9
9
|
export const __rspack_esm_ids = [692];
|
|
10
10
|
export const __webpack_modules__ = {
|
|
@@ -108,7 +108,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
class Language extends
|
|
111
|
+
class Language extends Identity {
|
|
112
112
|
code;
|
|
113
113
|
name;
|
|
114
114
|
nativeName;
|
|
@@ -231,7 +231,7 @@ function translation_key_entity_ts_metadata(metadataKey, metadataValue) {
|
|
|
231
231
|
|
|
232
232
|
|
|
233
233
|
|
|
234
|
-
class TranslationKey extends
|
|
234
|
+
class TranslationKey extends Identity {
|
|
235
235
|
module;
|
|
236
236
|
key;
|
|
237
237
|
defaultMessage;
|
|
@@ -276,7 +276,7 @@ translation_key_entity_ts_decorate([
|
|
|
276
276
|
], TranslationKey.prototype, "description", void 0);
|
|
277
277
|
translation_key_entity_ts_decorate([
|
|
278
278
|
(0,external_typeorm_.Column)({
|
|
279
|
-
type:
|
|
279
|
+
type: getJsonColumnType(),
|
|
280
280
|
nullable: true
|
|
281
281
|
}),
|
|
282
282
|
translation_key_entity_ts_metadata("design:type", Object)
|
|
@@ -352,7 +352,7 @@ function translation_entity_ts_metadata(metadataKey, metadataValue) {
|
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
|
|
355
|
-
class Translation extends
|
|
355
|
+
class Translation extends Identity {
|
|
356
356
|
languageId;
|
|
357
357
|
translationKeyId;
|
|
358
358
|
value;
|
package/fesm/dtos/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { IdentityResponseDto } from "@flusys/nestjs-shared/dtos";
|
|
2
|
+
import { Exclude, Expose, Transform, Type } from "class-transformer";
|
|
3
|
+
import { IsArray, IsBoolean, IsIn, IsNumber, IsOptional, IsString, IsUUID, MaxLength, ValidateNested } from "class-validator";
|
|
1
4
|
import * as __rspack_external__nestjs_swagger_7cd450b5 from "@nestjs/swagger";
|
|
2
|
-
import * as __rspack_external__flusys_nestjs_shared_dtos_c4585026 from "@flusys/nestjs-shared/dtos";
|
|
3
|
-
import * as __rspack_external_class_transformer_c5a479fb from "class-transformer";
|
|
4
|
-
import * as __rspack_external_class_validator_7b99ef4d from "class-validator";
|
|
5
5
|
export const __rspack_esm_id = 685;
|
|
6
6
|
export const __rspack_esm_ids = [685];
|
|
7
7
|
export const __webpack_modules__ = {
|
|
@@ -64,9 +64,9 @@ class CreateLanguageDto {
|
|
|
64
64
|
serial;
|
|
65
65
|
}
|
|
66
66
|
_ts_decorate([
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
IsString(),
|
|
68
|
+
MaxLength(10),
|
|
69
|
+
Transform(({ value })=>value?.trim()?.toLowerCase()),
|
|
70
70
|
(0,swagger_.ApiProperty)({
|
|
71
71
|
example: 'en',
|
|
72
72
|
description: 'Language code (ISO 639-1)'
|
|
@@ -74,9 +74,9 @@ _ts_decorate([
|
|
|
74
74
|
_ts_metadata("design:type", String)
|
|
75
75
|
], CreateLanguageDto.prototype, "code", void 0);
|
|
76
76
|
_ts_decorate([
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
IsString(),
|
|
78
|
+
MaxLength(100),
|
|
79
|
+
Transform(({ value })=>value?.trim()),
|
|
80
80
|
(0,swagger_.ApiProperty)({
|
|
81
81
|
example: 'English',
|
|
82
82
|
description: 'Language name'
|
|
@@ -84,10 +84,10 @@ _ts_decorate([
|
|
|
84
84
|
_ts_metadata("design:type", String)
|
|
85
85
|
], CreateLanguageDto.prototype, "name", void 0);
|
|
86
86
|
_ts_decorate([
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
IsOptional(),
|
|
88
|
+
IsString(),
|
|
89
|
+
MaxLength(100),
|
|
90
|
+
Transform(({ value })=>value?.trim()),
|
|
91
91
|
(0,swagger_.ApiPropertyOptional)({
|
|
92
92
|
example: 'English',
|
|
93
93
|
description: 'Native name of the language'
|
|
@@ -95,8 +95,8 @@ _ts_decorate([
|
|
|
95
95
|
_ts_metadata("design:type", String)
|
|
96
96
|
], CreateLanguageDto.prototype, "nativeName", void 0);
|
|
97
97
|
_ts_decorate([
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
IsOptional(),
|
|
99
|
+
IsIn([
|
|
100
100
|
'ltr',
|
|
101
101
|
'rtl'
|
|
102
102
|
]),
|
|
@@ -111,8 +111,8 @@ _ts_decorate([
|
|
|
111
111
|
_ts_metadata("design:type", String)
|
|
112
112
|
], CreateLanguageDto.prototype, "direction", void 0);
|
|
113
113
|
_ts_decorate([
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
IsOptional(),
|
|
115
|
+
IsBoolean(),
|
|
116
116
|
(0,swagger_.ApiPropertyOptional)({
|
|
117
117
|
example: true,
|
|
118
118
|
description: 'Whether the language is active'
|
|
@@ -120,8 +120,8 @@ _ts_decorate([
|
|
|
120
120
|
_ts_metadata("design:type", Boolean)
|
|
121
121
|
], CreateLanguageDto.prototype, "isActive", void 0);
|
|
122
122
|
_ts_decorate([
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
IsOptional(),
|
|
124
|
+
IsBoolean(),
|
|
125
125
|
(0,swagger_.ApiPropertyOptional)({
|
|
126
126
|
example: false,
|
|
127
127
|
description: 'Whether this is the default language'
|
|
@@ -129,8 +129,8 @@ _ts_decorate([
|
|
|
129
129
|
_ts_metadata("design:type", Boolean)
|
|
130
130
|
], CreateLanguageDto.prototype, "isDefault", void 0);
|
|
131
131
|
_ts_decorate([
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
IsOptional(),
|
|
133
|
+
IsNumber(),
|
|
134
134
|
(0,swagger_.ApiPropertyOptional)({
|
|
135
135
|
example: 1,
|
|
136
136
|
description: 'Display order'
|
|
@@ -141,13 +141,13 @@ class UpdateLanguageDto extends (0,swagger_.PartialType)(CreateLanguageDto) {
|
|
|
141
141
|
id;
|
|
142
142
|
}
|
|
143
143
|
_ts_decorate([
|
|
144
|
-
|
|
144
|
+
IsUUID(),
|
|
145
145
|
(0,swagger_.ApiProperty)({
|
|
146
146
|
description: 'Language ID'
|
|
147
147
|
}),
|
|
148
148
|
_ts_metadata("design:type", String)
|
|
149
149
|
], UpdateLanguageDto.prototype, "id", void 0);
|
|
150
|
-
class LanguageResponseDto extends
|
|
150
|
+
class LanguageResponseDto extends IdentityResponseDto {
|
|
151
151
|
code;
|
|
152
152
|
name;
|
|
153
153
|
nativeName;
|
|
@@ -161,21 +161,21 @@ _ts_decorate([
|
|
|
161
161
|
(0,swagger_.ApiProperty)({
|
|
162
162
|
example: 'en'
|
|
163
163
|
}),
|
|
164
|
-
|
|
164
|
+
Expose(),
|
|
165
165
|
_ts_metadata("design:type", String)
|
|
166
166
|
], LanguageResponseDto.prototype, "code", void 0);
|
|
167
167
|
_ts_decorate([
|
|
168
168
|
(0,swagger_.ApiProperty)({
|
|
169
169
|
example: 'English'
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
Expose(),
|
|
172
172
|
_ts_metadata("design:type", String)
|
|
173
173
|
], LanguageResponseDto.prototype, "name", void 0);
|
|
174
174
|
_ts_decorate([
|
|
175
175
|
(0,swagger_.ApiPropertyOptional)({
|
|
176
176
|
example: 'English'
|
|
177
177
|
}),
|
|
178
|
-
|
|
178
|
+
Expose(),
|
|
179
179
|
_ts_metadata("design:type", Object)
|
|
180
180
|
], LanguageResponseDto.prototype, "nativeName", void 0);
|
|
181
181
|
_ts_decorate([
|
|
@@ -186,21 +186,21 @@ _ts_decorate([
|
|
|
186
186
|
'rtl'
|
|
187
187
|
]
|
|
188
188
|
}),
|
|
189
|
-
|
|
189
|
+
Expose(),
|
|
190
190
|
_ts_metadata("design:type", Object)
|
|
191
191
|
], LanguageResponseDto.prototype, "direction", void 0);
|
|
192
192
|
_ts_decorate([
|
|
193
193
|
(0,swagger_.ApiProperty)({
|
|
194
194
|
example: true
|
|
195
195
|
}),
|
|
196
|
-
|
|
196
|
+
Expose(),
|
|
197
197
|
_ts_metadata("design:type", Boolean)
|
|
198
198
|
], LanguageResponseDto.prototype, "isActive", void 0);
|
|
199
199
|
_ts_decorate([
|
|
200
200
|
(0,swagger_.ApiProperty)({
|
|
201
201
|
example: false
|
|
202
202
|
}),
|
|
203
|
-
|
|
203
|
+
Expose(),
|
|
204
204
|
_ts_metadata("design:type", Boolean)
|
|
205
205
|
], LanguageResponseDto.prototype, "isDefault", void 0);
|
|
206
206
|
_ts_decorate([
|
|
@@ -208,18 +208,18 @@ _ts_decorate([
|
|
|
208
208
|
example: false,
|
|
209
209
|
description: 'System language: cannot be renamed or deleted'
|
|
210
210
|
}),
|
|
211
|
-
|
|
211
|
+
Expose(),
|
|
212
212
|
_ts_metadata("design:type", Boolean)
|
|
213
213
|
], LanguageResponseDto.prototype, "isReadonly", void 0);
|
|
214
214
|
_ts_decorate([
|
|
215
215
|
(0,swagger_.ApiPropertyOptional)({
|
|
216
216
|
example: 1
|
|
217
217
|
}),
|
|
218
|
-
|
|
218
|
+
Expose(),
|
|
219
219
|
_ts_metadata("design:type", Object)
|
|
220
220
|
], LanguageResponseDto.prototype, "serial", void 0);
|
|
221
221
|
LanguageResponseDto = _ts_decorate([
|
|
222
|
-
|
|
222
|
+
Exclude()
|
|
223
223
|
], LanguageResponseDto);
|
|
224
224
|
|
|
225
225
|
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/translation-key.dto.ts
|
|
@@ -256,9 +256,9 @@ class CreateTranslationKeyDto {
|
|
|
256
256
|
serial;
|
|
257
257
|
}
|
|
258
258
|
translation_key_dto_ts_decorate([
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
IsString(),
|
|
260
|
+
MaxLength(100),
|
|
261
|
+
Transform(({ value })=>value?.trim()?.toLowerCase()),
|
|
262
262
|
(0,swagger_.ApiProperty)({
|
|
263
263
|
example: 'auth',
|
|
264
264
|
description: 'Module name'
|
|
@@ -266,9 +266,9 @@ translation_key_dto_ts_decorate([
|
|
|
266
266
|
translation_key_dto_ts_metadata("design:type", String)
|
|
267
267
|
], CreateTranslationKeyDto.prototype, "module", void 0);
|
|
268
268
|
translation_key_dto_ts_decorate([
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
IsString(),
|
|
270
|
+
MaxLength(255),
|
|
271
|
+
Transform(({ value })=>value?.trim()),
|
|
272
272
|
(0,swagger_.ApiProperty)({
|
|
273
273
|
example: 'auth.login.success',
|
|
274
274
|
description: 'Translation key'
|
|
@@ -276,9 +276,9 @@ translation_key_dto_ts_decorate([
|
|
|
276
276
|
translation_key_dto_ts_metadata("design:type", String)
|
|
277
277
|
], CreateTranslationKeyDto.prototype, "key", void 0);
|
|
278
278
|
translation_key_dto_ts_decorate([
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
IsString(),
|
|
280
|
+
MaxLength(500),
|
|
281
|
+
Transform(({ value })=>value?.trim()),
|
|
282
282
|
(0,swagger_.ApiProperty)({
|
|
283
283
|
example: 'Login successful',
|
|
284
284
|
description: 'Default English message'
|
|
@@ -286,18 +286,18 @@ translation_key_dto_ts_decorate([
|
|
|
286
286
|
translation_key_dto_ts_metadata("design:type", String)
|
|
287
287
|
], CreateTranslationKeyDto.prototype, "defaultMessage", void 0);
|
|
288
288
|
translation_key_dto_ts_decorate([
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
IsOptional(),
|
|
290
|
+
IsString(),
|
|
291
|
+
Transform(({ value })=>value?.trim()),
|
|
292
292
|
(0,swagger_.ApiPropertyOptional)({
|
|
293
293
|
description: 'Developer notes'
|
|
294
294
|
}),
|
|
295
295
|
translation_key_dto_ts_metadata("design:type", String)
|
|
296
296
|
], CreateTranslationKeyDto.prototype, "description", void 0);
|
|
297
297
|
translation_key_dto_ts_decorate([
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
IsOptional(),
|
|
299
|
+
IsArray(),
|
|
300
|
+
IsString({
|
|
301
301
|
each: true
|
|
302
302
|
}),
|
|
303
303
|
(0,swagger_.ApiPropertyOptional)({
|
|
@@ -309,16 +309,16 @@ translation_key_dto_ts_decorate([
|
|
|
309
309
|
translation_key_dto_ts_metadata("design:type", Array)
|
|
310
310
|
], CreateTranslationKeyDto.prototype, "variables", void 0);
|
|
311
311
|
translation_key_dto_ts_decorate([
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
IsOptional(),
|
|
313
|
+
IsBoolean(),
|
|
314
314
|
(0,swagger_.ApiPropertyOptional)({
|
|
315
315
|
example: true
|
|
316
316
|
}),
|
|
317
317
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
318
318
|
], CreateTranslationKeyDto.prototype, "isActive", void 0);
|
|
319
319
|
translation_key_dto_ts_decorate([
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
IsOptional(),
|
|
321
|
+
IsBoolean(),
|
|
322
322
|
(0,swagger_.ApiPropertyOptional)({
|
|
323
323
|
example: false,
|
|
324
324
|
description: 'Readonly keys cannot be deleted by users'
|
|
@@ -326,8 +326,8 @@ translation_key_dto_ts_decorate([
|
|
|
326
326
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
327
327
|
], CreateTranslationKeyDto.prototype, "isReadonly", void 0);
|
|
328
328
|
translation_key_dto_ts_decorate([
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
IsOptional(),
|
|
330
|
+
IsNumber(),
|
|
331
331
|
(0,swagger_.ApiPropertyOptional)({
|
|
332
332
|
example: 1
|
|
333
333
|
}),
|
|
@@ -339,13 +339,13 @@ class UpdateTranslationKeyDto extends (0,swagger_.PartialType)((0,swagger_.OmitT
|
|
|
339
339
|
id;
|
|
340
340
|
}
|
|
341
341
|
translation_key_dto_ts_decorate([
|
|
342
|
-
|
|
342
|
+
IsUUID(),
|
|
343
343
|
(0,swagger_.ApiProperty)({
|
|
344
344
|
description: 'Translation key ID'
|
|
345
345
|
}),
|
|
346
346
|
translation_key_dto_ts_metadata("design:type", String)
|
|
347
347
|
], UpdateTranslationKeyDto.prototype, "id", void 0);
|
|
348
|
-
class TranslationKeyResponseDto extends
|
|
348
|
+
class TranslationKeyResponseDto extends IdentityResponseDto {
|
|
349
349
|
module;
|
|
350
350
|
key;
|
|
351
351
|
defaultMessage;
|
|
@@ -359,26 +359,26 @@ translation_key_dto_ts_decorate([
|
|
|
359
359
|
(0,swagger_.ApiProperty)({
|
|
360
360
|
example: 'auth'
|
|
361
361
|
}),
|
|
362
|
-
|
|
362
|
+
Expose(),
|
|
363
363
|
translation_key_dto_ts_metadata("design:type", String)
|
|
364
364
|
], TranslationKeyResponseDto.prototype, "module", void 0);
|
|
365
365
|
translation_key_dto_ts_decorate([
|
|
366
366
|
(0,swagger_.ApiProperty)({
|
|
367
367
|
example: 'auth.login.success'
|
|
368
368
|
}),
|
|
369
|
-
|
|
369
|
+
Expose(),
|
|
370
370
|
translation_key_dto_ts_metadata("design:type", String)
|
|
371
371
|
], TranslationKeyResponseDto.prototype, "key", void 0);
|
|
372
372
|
translation_key_dto_ts_decorate([
|
|
373
373
|
(0,swagger_.ApiProperty)({
|
|
374
374
|
example: 'Login successful'
|
|
375
375
|
}),
|
|
376
|
-
|
|
376
|
+
Expose(),
|
|
377
377
|
translation_key_dto_ts_metadata("design:type", String)
|
|
378
378
|
], TranslationKeyResponseDto.prototype, "defaultMessage", void 0);
|
|
379
379
|
translation_key_dto_ts_decorate([
|
|
380
380
|
(0,swagger_.ApiPropertyOptional)(),
|
|
381
|
-
|
|
381
|
+
Expose(),
|
|
382
382
|
translation_key_dto_ts_metadata("design:type", Object)
|
|
383
383
|
], TranslationKeyResponseDto.prototype, "description", void 0);
|
|
384
384
|
translation_key_dto_ts_decorate([
|
|
@@ -387,32 +387,32 @@ translation_key_dto_ts_decorate([
|
|
|
387
387
|
'name'
|
|
388
388
|
]
|
|
389
389
|
}),
|
|
390
|
-
|
|
390
|
+
Expose(),
|
|
391
391
|
translation_key_dto_ts_metadata("design:type", Object)
|
|
392
392
|
], TranslationKeyResponseDto.prototype, "variables", void 0);
|
|
393
393
|
translation_key_dto_ts_decorate([
|
|
394
394
|
(0,swagger_.ApiProperty)({
|
|
395
395
|
example: true
|
|
396
396
|
}),
|
|
397
|
-
|
|
397
|
+
Expose(),
|
|
398
398
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
399
399
|
], TranslationKeyResponseDto.prototype, "isActive", void 0);
|
|
400
400
|
translation_key_dto_ts_decorate([
|
|
401
401
|
(0,swagger_.ApiProperty)({
|
|
402
402
|
example: false
|
|
403
403
|
}),
|
|
404
|
-
|
|
404
|
+
Expose(),
|
|
405
405
|
translation_key_dto_ts_metadata("design:type", Boolean)
|
|
406
406
|
], TranslationKeyResponseDto.prototype, "isReadonly", void 0);
|
|
407
407
|
translation_key_dto_ts_decorate([
|
|
408
408
|
(0,swagger_.ApiPropertyOptional)({
|
|
409
409
|
example: 1
|
|
410
410
|
}),
|
|
411
|
-
|
|
411
|
+
Expose(),
|
|
412
412
|
translation_key_dto_ts_metadata("design:type", Object)
|
|
413
413
|
], TranslationKeyResponseDto.prototype, "serial", void 0);
|
|
414
414
|
TranslationKeyResponseDto = translation_key_dto_ts_decorate([
|
|
415
|
-
|
|
415
|
+
Exclude()
|
|
416
416
|
], TranslationKeyResponseDto);
|
|
417
417
|
|
|
418
418
|
;// CONCATENATED MODULE: ./projects/nestjs-localization/src/dtos/translation.dto.ts
|
|
@@ -448,22 +448,22 @@ class CreateTranslationDto {
|
|
|
448
448
|
isActive;
|
|
449
449
|
}
|
|
450
450
|
translation_dto_ts_decorate([
|
|
451
|
-
|
|
451
|
+
IsUUID(),
|
|
452
452
|
(0,swagger_.ApiProperty)({
|
|
453
453
|
description: 'Language ID'
|
|
454
454
|
}),
|
|
455
455
|
translation_dto_ts_metadata("design:type", String)
|
|
456
456
|
], CreateTranslationDto.prototype, "languageId", void 0);
|
|
457
457
|
translation_dto_ts_decorate([
|
|
458
|
-
|
|
458
|
+
IsUUID(),
|
|
459
459
|
(0,swagger_.ApiProperty)({
|
|
460
460
|
description: 'Translation key ID'
|
|
461
461
|
}),
|
|
462
462
|
translation_dto_ts_metadata("design:type", String)
|
|
463
463
|
], CreateTranslationDto.prototype, "translationKeyId", void 0);
|
|
464
464
|
translation_dto_ts_decorate([
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
IsString(),
|
|
466
|
+
Transform(({ value })=>value?.trim()),
|
|
467
467
|
(0,swagger_.ApiProperty)({
|
|
468
468
|
example: 'Login successful',
|
|
469
469
|
description: 'Translated value'
|
|
@@ -471,8 +471,8 @@ translation_dto_ts_decorate([
|
|
|
471
471
|
translation_dto_ts_metadata("design:type", String)
|
|
472
472
|
], CreateTranslationDto.prototype, "value", void 0);
|
|
473
473
|
translation_dto_ts_decorate([
|
|
474
|
-
|
|
475
|
-
|
|
474
|
+
IsOptional(),
|
|
475
|
+
IsBoolean(),
|
|
476
476
|
(0,swagger_.ApiPropertyOptional)({
|
|
477
477
|
example: false,
|
|
478
478
|
description: 'Whether translation is verified'
|
|
@@ -480,8 +480,8 @@ translation_dto_ts_decorate([
|
|
|
480
480
|
translation_dto_ts_metadata("design:type", Boolean)
|
|
481
481
|
], CreateTranslationDto.prototype, "isVerified", void 0);
|
|
482
482
|
translation_dto_ts_decorate([
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
IsOptional(),
|
|
484
|
+
IsBoolean(),
|
|
485
485
|
(0,swagger_.ApiPropertyOptional)({
|
|
486
486
|
example: true
|
|
487
487
|
}),
|
|
@@ -491,7 +491,7 @@ class UpdateTranslationDto extends (0,swagger_.PartialType)(CreateTranslationDto
|
|
|
491
491
|
id;
|
|
492
492
|
}
|
|
493
493
|
translation_dto_ts_decorate([
|
|
494
|
-
|
|
494
|
+
IsUUID(),
|
|
495
495
|
(0,swagger_.ApiProperty)({
|
|
496
496
|
description: 'Translation ID'
|
|
497
497
|
}),
|
|
@@ -505,38 +505,38 @@ class BulkUpdateTranslationDto {
|
|
|
505
505
|
isVerified;
|
|
506
506
|
}
|
|
507
507
|
translation_dto_ts_decorate([
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
IsOptional(),
|
|
509
|
+
IsUUID(),
|
|
510
510
|
(0,swagger_.ApiPropertyOptional)({
|
|
511
511
|
description: 'Translation ID (if updating existing)'
|
|
512
512
|
}),
|
|
513
513
|
translation_dto_ts_metadata("design:type", String)
|
|
514
514
|
], BulkUpdateTranslationDto.prototype, "id", void 0);
|
|
515
515
|
translation_dto_ts_decorate([
|
|
516
|
-
|
|
516
|
+
IsUUID(),
|
|
517
517
|
(0,swagger_.ApiProperty)({
|
|
518
518
|
description: 'Language ID'
|
|
519
519
|
}),
|
|
520
520
|
translation_dto_ts_metadata("design:type", String)
|
|
521
521
|
], BulkUpdateTranslationDto.prototype, "languageId", void 0);
|
|
522
522
|
translation_dto_ts_decorate([
|
|
523
|
-
|
|
523
|
+
IsUUID(),
|
|
524
524
|
(0,swagger_.ApiProperty)({
|
|
525
525
|
description: 'Translation key ID'
|
|
526
526
|
}),
|
|
527
527
|
translation_dto_ts_metadata("design:type", String)
|
|
528
528
|
], BulkUpdateTranslationDto.prototype, "translationKeyId", void 0);
|
|
529
529
|
translation_dto_ts_decorate([
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
IsString(),
|
|
531
|
+
Transform(({ value })=>value?.trim()),
|
|
532
532
|
(0,swagger_.ApiProperty)({
|
|
533
533
|
example: 'Updated translation value'
|
|
534
534
|
}),
|
|
535
535
|
translation_dto_ts_metadata("design:type", String)
|
|
536
536
|
], BulkUpdateTranslationDto.prototype, "value", void 0);
|
|
537
537
|
translation_dto_ts_decorate([
|
|
538
|
-
|
|
539
|
-
|
|
538
|
+
IsOptional(),
|
|
539
|
+
IsBoolean(),
|
|
540
540
|
(0,swagger_.ApiPropertyOptional)({
|
|
541
541
|
example: true
|
|
542
542
|
}),
|
|
@@ -546,11 +546,11 @@ class BulkUpdateTranslationsDto {
|
|
|
546
546
|
translations;
|
|
547
547
|
}
|
|
548
548
|
translation_dto_ts_decorate([
|
|
549
|
-
|
|
550
|
-
|
|
549
|
+
IsArray(),
|
|
550
|
+
ValidateNested({
|
|
551
551
|
each: true
|
|
552
552
|
}),
|
|
553
|
-
|
|
553
|
+
Type(()=>BulkUpdateTranslationDto),
|
|
554
554
|
(0,swagger_.ApiProperty)({
|
|
555
555
|
type: [
|
|
556
556
|
BulkUpdateTranslationDto
|
|
@@ -558,7 +558,7 @@ translation_dto_ts_decorate([
|
|
|
558
558
|
}),
|
|
559
559
|
translation_dto_ts_metadata("design:type", Array)
|
|
560
560
|
], BulkUpdateTranslationsDto.prototype, "translations", void 0);
|
|
561
|
-
class TranslationResponseDto extends
|
|
561
|
+
class TranslationResponseDto extends IdentityResponseDto {
|
|
562
562
|
languageId;
|
|
563
563
|
translationKeyId;
|
|
564
564
|
value;
|
|
@@ -569,60 +569,60 @@ class TranslationResponseDto extends __rspack_external__flusys_nestjs_shared_dto
|
|
|
569
569
|
}
|
|
570
570
|
translation_dto_ts_decorate([
|
|
571
571
|
(0,swagger_.ApiProperty)(),
|
|
572
|
-
|
|
572
|
+
Expose(),
|
|
573
573
|
translation_dto_ts_metadata("design:type", String)
|
|
574
574
|
], TranslationResponseDto.prototype, "languageId", void 0);
|
|
575
575
|
translation_dto_ts_decorate([
|
|
576
576
|
(0,swagger_.ApiProperty)(),
|
|
577
|
-
|
|
577
|
+
Expose(),
|
|
578
578
|
translation_dto_ts_metadata("design:type", String)
|
|
579
579
|
], TranslationResponseDto.prototype, "translationKeyId", void 0);
|
|
580
580
|
translation_dto_ts_decorate([
|
|
581
581
|
(0,swagger_.ApiProperty)({
|
|
582
582
|
example: 'Login successful'
|
|
583
583
|
}),
|
|
584
|
-
|
|
584
|
+
Expose(),
|
|
585
585
|
translation_dto_ts_metadata("design:type", String)
|
|
586
586
|
], TranslationResponseDto.prototype, "value", void 0);
|
|
587
587
|
translation_dto_ts_decorate([
|
|
588
588
|
(0,swagger_.ApiProperty)({
|
|
589
589
|
example: false
|
|
590
590
|
}),
|
|
591
|
-
|
|
591
|
+
Expose(),
|
|
592
592
|
translation_dto_ts_metadata("design:type", Boolean)
|
|
593
593
|
], TranslationResponseDto.prototype, "isVerified", void 0);
|
|
594
594
|
translation_dto_ts_decorate([
|
|
595
595
|
(0,swagger_.ApiProperty)({
|
|
596
596
|
example: true
|
|
597
597
|
}),
|
|
598
|
-
|
|
598
|
+
Expose(),
|
|
599
599
|
translation_dto_ts_metadata("design:type", Boolean)
|
|
600
600
|
], TranslationResponseDto.prototype, "isActive", void 0);
|
|
601
601
|
translation_dto_ts_decorate([
|
|
602
602
|
(0,swagger_.ApiPropertyOptional)({
|
|
603
603
|
type: ()=>LanguageResponseDto
|
|
604
604
|
}),
|
|
605
|
-
|
|
605
|
+
Expose(),
|
|
606
606
|
translation_dto_ts_metadata("design:type", typeof LanguageResponseDto === "undefined" ? Object : LanguageResponseDto)
|
|
607
607
|
], TranslationResponseDto.prototype, "language", void 0);
|
|
608
608
|
translation_dto_ts_decorate([
|
|
609
609
|
(0,swagger_.ApiPropertyOptional)({
|
|
610
610
|
type: ()=>TranslationKeyResponseDto
|
|
611
611
|
}),
|
|
612
|
-
|
|
612
|
+
Expose(),
|
|
613
613
|
translation_dto_ts_metadata("design:type", typeof TranslationKeyResponseDto === "undefined" ? Object : TranslationKeyResponseDto)
|
|
614
614
|
], TranslationResponseDto.prototype, "translationKey", void 0);
|
|
615
615
|
TranslationResponseDto = translation_dto_ts_decorate([
|
|
616
|
-
|
|
616
|
+
Exclude()
|
|
617
617
|
], TranslationResponseDto);
|
|
618
618
|
class GetTranslationsByLanguageDto {
|
|
619
619
|
languageCode;
|
|
620
620
|
modules;
|
|
621
621
|
}
|
|
622
622
|
translation_dto_ts_decorate([
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
623
|
+
IsString(),
|
|
624
|
+
MaxLength(10),
|
|
625
|
+
Transform(({ value })=>value?.trim()?.toLowerCase()),
|
|
626
626
|
(0,swagger_.ApiProperty)({
|
|
627
627
|
example: 'en',
|
|
628
628
|
description: 'Language code'
|
|
@@ -630,12 +630,12 @@ translation_dto_ts_decorate([
|
|
|
630
630
|
translation_dto_ts_metadata("design:type", String)
|
|
631
631
|
], GetTranslationsByLanguageDto.prototype, "languageCode", void 0);
|
|
632
632
|
translation_dto_ts_decorate([
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
633
|
+
IsOptional(),
|
|
634
|
+
IsArray(),
|
|
635
|
+
IsString({
|
|
636
636
|
each: true
|
|
637
637
|
}),
|
|
638
|
-
|
|
638
|
+
Transform(({ value })=>value?.map((v)=>v?.trim())),
|
|
639
639
|
(0,swagger_.ApiPropertyOptional)({
|
|
640
640
|
example: [
|
|
641
641
|
'shared',
|
package/fesm/entities/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Identity } from "@flusys/nestjs-shared/entities";
|
|
2
|
+
import { getJsonColumnType } from "@flusys/nestjs-shared";
|
|
1
3
|
import * as __rspack_external_typeorm from "typeorm";
|
|
2
|
-
import * as __rspack_external__flusys_nestjs_shared_entities_420e6d19 from "@flusys/nestjs-shared/entities";
|
|
3
|
-
import * as __rspack_external__flusys_nestjs_shared_393d2cae from "@flusys/nestjs-shared";
|
|
4
4
|
export const __rspack_esm_id = 604;
|
|
5
5
|
export const __rspack_esm_ids = [604];
|
|
6
6
|
export const __webpack_modules__ = {
|
|
@@ -40,7 +40,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
class Language extends
|
|
43
|
+
class Language extends Identity {
|
|
44
44
|
code;
|
|
45
45
|
name;
|
|
46
46
|
nativeName;
|
|
@@ -163,7 +163,7 @@ function translation_key_entity_ts_metadata(metadataKey, metadataValue) {
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
class TranslationKey extends
|
|
166
|
+
class TranslationKey extends Identity {
|
|
167
167
|
module;
|
|
168
168
|
key;
|
|
169
169
|
defaultMessage;
|
|
@@ -208,7 +208,7 @@ translation_key_entity_ts_decorate([
|
|
|
208
208
|
], TranslationKey.prototype, "description", void 0);
|
|
209
209
|
translation_key_entity_ts_decorate([
|
|
210
210
|
(0,external_typeorm_.Column)({
|
|
211
|
-
type:
|
|
211
|
+
type: getJsonColumnType(),
|
|
212
212
|
nullable: true
|
|
213
213
|
}),
|
|
214
214
|
translation_key_entity_ts_metadata("design:type", Object)
|
|
@@ -284,7 +284,7 @@ function translation_entity_ts_metadata(metadataKey, metadataValue) {
|
|
|
284
284
|
|
|
285
285
|
|
|
286
286
|
|
|
287
|
-
class Translation extends
|
|
287
|
+
class Translation extends Identity {
|
|
288
288
|
languageId;
|
|
289
289
|
translationKeyId;
|
|
290
290
|
value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/nestjs-localization",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "Localization module for multi-language support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./fesm/index.js",
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
"@nestjs/common": "^12.0.0",
|
|
63
63
|
"@nestjs/config": "^12.0.0",
|
|
64
64
|
"@nestjs/core": "^12.0.0",
|
|
65
|
-
"@nestjs/platform-express": "^12.
|
|
65
|
+
"@nestjs/platform-express": "^12.1.2",
|
|
66
66
|
"@nestjs/swagger": "^12.0.0",
|
|
67
67
|
"@nestjs/typeorm": "^12.0.0",
|
|
68
68
|
"class-transformer": "^0.5.1",
|
|
69
69
|
"class-validator": "^0.15.0",
|
|
70
|
-
"typeorm": "^0.3.
|
|
70
|
+
"typeorm": "^0.3.31",
|
|
71
71
|
"express": "^5.0.0"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@flusys/nestjs-core": "9.1.
|
|
75
|
-
"@flusys/nestjs-shared": "9.1.
|
|
74
|
+
"@flusys/nestjs-core": "9.1.1",
|
|
75
|
+
"@flusys/nestjs-shared": "9.1.1"
|
|
76
76
|
}
|
|
77
77
|
}
|