@marcoappio/marco-config 2.0.533 → 2.0.535
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/zero/index.d.ts
CHANGED
|
@@ -245,7 +245,7 @@ export declare const marcoZero: {
|
|
|
245
245
|
createView: import("valibot").ObjectSchema<{
|
|
246
246
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
247
247
|
readonly view: import("valibot").ObjectSchema<{
|
|
248
|
-
readonly aliasEmails: import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>, import("valibot").MinLengthAction<string[],
|
|
248
|
+
readonly aliasEmails: import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>, import("valibot").MinLengthAction<string[], 2, undefined>, import("valibot").MaxLengthAction<string[], number, undefined>]>;
|
|
249
249
|
readonly icon: import("valibot").PicklistSchema<readonly [import("..").CustomViewIcon.AIRPLANE, import("..").CustomViewIcon.BELL, import("..").CustomViewIcon.BRIEFCASE, import("..").CustomViewIcon.CLOCK, import("..").CustomViewIcon.CREDIT_CARD, import("..").CustomViewIcon.HEART, import("..").CustomViewIcon.HOME, import("..").CustomViewIcon.KEY, import("..").CustomViewIcon.MOON, import("..").CustomViewIcon.PERSON, import("..").CustomViewIcon.SHOPPING_CART, import("..").CustomViewIcon.STAR], undefined>;
|
|
250
250
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
251
251
|
readonly name: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -274,7 +274,7 @@ export declare const marcoZero: {
|
|
|
274
274
|
updateView: import("valibot").ObjectSchema<{
|
|
275
275
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
276
276
|
readonly view: import("valibot").ObjectSchema<{
|
|
277
|
-
readonly aliasEmails: import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>, import("valibot").MinLengthAction<string[],
|
|
277
|
+
readonly aliasEmails: import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>, import("valibot").MinLengthAction<string[], 2, undefined>, import("valibot").MaxLengthAction<string[], number, undefined>]>;
|
|
278
278
|
readonly icon: import("valibot").PicklistSchema<readonly [import("..").CustomViewIcon.AIRPLANE, import("..").CustomViewIcon.BELL, import("..").CustomViewIcon.BRIEFCASE, import("..").CustomViewIcon.CLOCK, import("..").CustomViewIcon.CREDIT_CARD, import("..").CustomViewIcon.HEART, import("..").CustomViewIcon.HOME, import("..").CustomViewIcon.KEY, import("..").CustomViewIcon.MOON, import("..").CustomViewIcon.PERSON, import("..").CustomViewIcon.SHOPPING_CART, import("..").CustomViewIcon.STAR], undefined>;
|
|
279
279
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
280
280
|
readonly name: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -245,7 +245,7 @@ export declare const mutatorSchemas: {
|
|
|
245
245
|
createView: v.ObjectSchema<{
|
|
246
246
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
247
247
|
readonly view: v.ObjectSchema<{
|
|
248
|
-
readonly aliasEmails: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>, v.MinLengthAction<string[],
|
|
248
|
+
readonly aliasEmails: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>, v.MinLengthAction<string[], 2, undefined>, v.MaxLengthAction<string[], number, undefined>]>;
|
|
249
249
|
readonly icon: v.PicklistSchema<readonly [import("../types").CustomViewIcon.AIRPLANE, import("../types").CustomViewIcon.BELL, import("../types").CustomViewIcon.BRIEFCASE, import("../types").CustomViewIcon.CLOCK, import("../types").CustomViewIcon.CREDIT_CARD, import("../types").CustomViewIcon.HEART, import("../types").CustomViewIcon.HOME, import("../types").CustomViewIcon.KEY, import("../types").CustomViewIcon.MOON, import("../types").CustomViewIcon.PERSON, import("../types").CustomViewIcon.SHOPPING_CART, import("../types").CustomViewIcon.STAR], undefined>;
|
|
250
250
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
251
251
|
readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -274,7 +274,7 @@ export declare const mutatorSchemas: {
|
|
|
274
274
|
updateView: v.ObjectSchema<{
|
|
275
275
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
276
276
|
readonly view: v.ObjectSchema<{
|
|
277
|
-
readonly aliasEmails: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>, v.MinLengthAction<string[],
|
|
277
|
+
readonly aliasEmails: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>, v.MinLengthAction<string[], 2, undefined>, v.MaxLengthAction<string[], number, undefined>]>;
|
|
278
278
|
readonly icon: v.PicklistSchema<readonly [import("../types").CustomViewIcon.AIRPLANE, import("../types").CustomViewIcon.BELL, import("../types").CustomViewIcon.BRIEFCASE, import("../types").CustomViewIcon.CLOCK, import("../types").CustomViewIcon.CREDIT_CARD, import("../types").CustomViewIcon.HEART, import("../types").CustomViewIcon.HOME, import("../types").CustomViewIcon.KEY, import("../types").CustomViewIcon.MOON, import("../types").CustomViewIcon.PERSON, import("../types").CustomViewIcon.SHOPPING_CART, import("../types").CustomViewIcon.STAR], undefined>;
|
|
279
279
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
280
280
|
readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -55,7 +55,7 @@ const connectionConfigImapRawSchema = v.object({
|
|
|
55
55
|
smtpUser: marcoSchemas.string.required(),
|
|
56
56
|
});
|
|
57
57
|
const userViewSchema = v.object({
|
|
58
|
-
aliasEmails: v.pipe(v.array(marcoSchemas.string.email()), v.minLength(
|
|
58
|
+
aliasEmails: v.pipe(v.array(marcoSchemas.string.email()), v.minLength(2), v.maxLength(marcoConstants.user.views.maxAliasEmailsPerView)),
|
|
59
59
|
icon: v.picklist(USER_SETTINGS_CUSTOM_VIEW_ICONS),
|
|
60
60
|
id: marcoSchemas.string.required(),
|
|
61
61
|
name: marcoSchemas.string.required(),
|
|
@@ -702,7 +702,7 @@ describe('mutators', () => {
|
|
|
702
702
|
id: 'test-user-id-1',
|
|
703
703
|
views: [
|
|
704
704
|
{
|
|
705
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
705
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
706
706
|
icon: CustomViewIcon.STAR,
|
|
707
707
|
id: 'test-view-id-1',
|
|
708
708
|
name: 'test-view-name-1',
|
|
@@ -712,7 +712,7 @@ describe('mutators', () => {
|
|
|
712
712
|
const args = {
|
|
713
713
|
id: 'test-user-id-1',
|
|
714
714
|
view: {
|
|
715
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
715
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
716
716
|
icon: CustomViewIcon.STAR,
|
|
717
717
|
id: 'test-view-id-2',
|
|
718
718
|
name: 'test-view-name-2',
|
|
@@ -723,13 +723,13 @@ describe('mutators', () => {
|
|
|
723
723
|
id: 'test-user-id-1',
|
|
724
724
|
views: [
|
|
725
725
|
{
|
|
726
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
726
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
727
727
|
icon: CustomViewIcon.STAR,
|
|
728
728
|
id: 'test-view-id-1',
|
|
729
729
|
name: 'test-view-name-1',
|
|
730
730
|
},
|
|
731
731
|
{
|
|
732
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
732
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
733
733
|
icon: CustomViewIcon.STAR,
|
|
734
734
|
id: 'test-view-id-2',
|
|
735
735
|
name: 'test-view-name-2',
|
|
@@ -742,7 +742,7 @@ describe('mutators', () => {
|
|
|
742
742
|
const args = {
|
|
743
743
|
id: 'test-user-id-1',
|
|
744
744
|
view: {
|
|
745
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
745
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
746
746
|
icon: CustomViewIcon.STAR,
|
|
747
747
|
id: 'test-view-id-1',
|
|
748
748
|
name: 'test-view-name-1',
|
|
@@ -756,7 +756,7 @@ describe('mutators', () => {
|
|
|
756
756
|
id: 'test-user-id-1',
|
|
757
757
|
views: [
|
|
758
758
|
{
|
|
759
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
759
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
760
760
|
icon: CustomViewIcon.STAR,
|
|
761
761
|
id: 'test-view-id-1',
|
|
762
762
|
name: 'test-view-name-1',
|
|
@@ -766,7 +766,7 @@ describe('mutators', () => {
|
|
|
766
766
|
const args = {
|
|
767
767
|
id: 'test-user-id-1',
|
|
768
768
|
view: {
|
|
769
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
769
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
770
770
|
icon: CustomViewIcon.STAR,
|
|
771
771
|
id: 'test-view-id-1',
|
|
772
772
|
name: 'test-view-name-2',
|
|
@@ -777,7 +777,7 @@ describe('mutators', () => {
|
|
|
777
777
|
});
|
|
778
778
|
it('does nothing if max views limit reached', async () => {
|
|
779
779
|
const existingViews = Array.from({ length: 25 }, (_, i) => ({
|
|
780
|
-
aliasEmails: [`test-email-${i}@example.com`],
|
|
780
|
+
aliasEmails: [`test-email-${i}@example.com`, `test-email-${i}b@example.com`],
|
|
781
781
|
icon: CustomViewIcon.STAR,
|
|
782
782
|
id: `test-view-id-${i}`,
|
|
783
783
|
name: `test-view-name-${i}`,
|
|
@@ -786,7 +786,7 @@ describe('mutators', () => {
|
|
|
786
786
|
const args = {
|
|
787
787
|
id: 'test-user-id-1',
|
|
788
788
|
view: {
|
|
789
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
789
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
790
790
|
icon: CustomViewIcon.STAR,
|
|
791
791
|
id: 'test-view-id-1',
|
|
792
792
|
name: 'test-view-name-1',
|
|
@@ -802,13 +802,13 @@ describe('mutators', () => {
|
|
|
802
802
|
id: 'test-user-id-1',
|
|
803
803
|
views: [
|
|
804
804
|
{
|
|
805
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
805
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
806
806
|
icon: CustomViewIcon.STAR,
|
|
807
807
|
id: 'test-view-id-1',
|
|
808
808
|
name: 'test-view-name-1',
|
|
809
809
|
},
|
|
810
810
|
{
|
|
811
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
811
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
812
812
|
icon: CustomViewIcon.STAR,
|
|
813
813
|
id: 'test-view-id-2',
|
|
814
814
|
name: 'test-view-name-2',
|
|
@@ -821,7 +821,7 @@ describe('mutators', () => {
|
|
|
821
821
|
id: 'test-user-id-1',
|
|
822
822
|
views: [
|
|
823
823
|
{
|
|
824
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
824
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
825
825
|
icon: CustomViewIcon.STAR,
|
|
826
826
|
id: 'test-view-id-2',
|
|
827
827
|
name: 'test-view-name-2',
|
|
@@ -842,7 +842,7 @@ describe('mutators', () => {
|
|
|
842
842
|
id: 'test-user-id-1',
|
|
843
843
|
views: [
|
|
844
844
|
{
|
|
845
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
845
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
846
846
|
icon: CustomViewIcon.STAR,
|
|
847
847
|
id: 'test-view-id-1',
|
|
848
848
|
name: 'test-view-name-1',
|
|
@@ -852,7 +852,7 @@ describe('mutators', () => {
|
|
|
852
852
|
const args = {
|
|
853
853
|
id: 'test-user-id-1',
|
|
854
854
|
view: {
|
|
855
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
855
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
856
856
|
icon: CustomViewIcon.STAR,
|
|
857
857
|
id: 'test-view-id-1',
|
|
858
858
|
name: 'test-updated-name',
|
|
@@ -863,7 +863,7 @@ describe('mutators', () => {
|
|
|
863
863
|
id: 'test-user-id-1',
|
|
864
864
|
views: [
|
|
865
865
|
{
|
|
866
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
866
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
867
867
|
icon: CustomViewIcon.STAR,
|
|
868
868
|
id: 'test-view-id-1',
|
|
869
869
|
name: 'test-updated-name',
|
|
@@ -876,7 +876,7 @@ describe('mutators', () => {
|
|
|
876
876
|
id: 'test-user-id-1',
|
|
877
877
|
views: [
|
|
878
878
|
{
|
|
879
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
879
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
880
880
|
icon: CustomViewIcon.STAR,
|
|
881
881
|
id: 'test-view-id-1',
|
|
882
882
|
name: 'test-view-name-1',
|
|
@@ -910,7 +910,7 @@ describe('mutators', () => {
|
|
|
910
910
|
id: 'test-user-id-1',
|
|
911
911
|
views: [
|
|
912
912
|
{
|
|
913
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
913
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
914
914
|
icon: CustomViewIcon.STAR,
|
|
915
915
|
id: 'test-view-id-1',
|
|
916
916
|
name: 'test-view-name-1',
|
|
@@ -944,7 +944,7 @@ describe('mutators', () => {
|
|
|
944
944
|
id: 'test-user-id-1',
|
|
945
945
|
views: [
|
|
946
946
|
{
|
|
947
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
947
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
948
948
|
icon: CustomViewIcon.STAR,
|
|
949
949
|
id: 'test-view-id-1',
|
|
950
950
|
name: 'test-view-name-1',
|
|
@@ -954,7 +954,7 @@ describe('mutators', () => {
|
|
|
954
954
|
const args = {
|
|
955
955
|
id: 'test-user-id-1',
|
|
956
956
|
view: {
|
|
957
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
957
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
958
958
|
icon: CustomViewIcon.HEART,
|
|
959
959
|
id: 'test-view-id-1',
|
|
960
960
|
name: 'test-view-name-1',
|
|
@@ -965,7 +965,7 @@ describe('mutators', () => {
|
|
|
965
965
|
id: 'test-user-id-1',
|
|
966
966
|
views: [
|
|
967
967
|
{
|
|
968
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
968
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
969
969
|
icon: CustomViewIcon.HEART,
|
|
970
970
|
id: 'test-view-id-1',
|
|
971
971
|
name: 'test-view-name-1',
|
|
@@ -978,7 +978,7 @@ describe('mutators', () => {
|
|
|
978
978
|
id: 'test-user-id-1',
|
|
979
979
|
views: [
|
|
980
980
|
{
|
|
981
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
981
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
982
982
|
icon: CustomViewIcon.STAR,
|
|
983
983
|
id: 'test-view-id-1',
|
|
984
984
|
name: 'test-view-name-1',
|
|
@@ -988,7 +988,7 @@ describe('mutators', () => {
|
|
|
988
988
|
const args = {
|
|
989
989
|
id: 'test-user-id-1',
|
|
990
990
|
view: {
|
|
991
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
991
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
992
992
|
icon: CustomViewIcon.STAR,
|
|
993
993
|
id: 'test-view-id-1',
|
|
994
994
|
name: 'test-updated-name',
|
|
@@ -999,7 +999,7 @@ describe('mutators', () => {
|
|
|
999
999
|
id: 'test-user-id-1',
|
|
1000
1000
|
views: [
|
|
1001
1001
|
{
|
|
1002
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1002
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1003
1003
|
icon: CustomViewIcon.STAR,
|
|
1004
1004
|
id: 'test-view-id-1',
|
|
1005
1005
|
name: 'test-updated-name',
|
|
@@ -1012,7 +1012,7 @@ describe('mutators', () => {
|
|
|
1012
1012
|
const args = {
|
|
1013
1013
|
id: 'test-user-id-1',
|
|
1014
1014
|
view: {
|
|
1015
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1015
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1016
1016
|
icon: CustomViewIcon.STAR,
|
|
1017
1017
|
id: 'test-view-id-1',
|
|
1018
1018
|
name: 'test-updated-name',
|
|
@@ -1026,7 +1026,7 @@ describe('mutators', () => {
|
|
|
1026
1026
|
id: 'test-user-id-1',
|
|
1027
1027
|
views: [
|
|
1028
1028
|
{
|
|
1029
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1029
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1030
1030
|
icon: CustomViewIcon.STAR,
|
|
1031
1031
|
id: 'test-view-id-1',
|
|
1032
1032
|
name: 'test-view-name-1',
|
|
@@ -1036,7 +1036,7 @@ describe('mutators', () => {
|
|
|
1036
1036
|
const args = {
|
|
1037
1037
|
id: 'test-user-id-1',
|
|
1038
1038
|
view: {
|
|
1039
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1039
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1040
1040
|
icon: CustomViewIcon.STAR,
|
|
1041
1041
|
id: 'test-view-id-nonexistent',
|
|
1042
1042
|
name: 'test-updated-name',
|
|
@@ -1050,13 +1050,13 @@ describe('mutators', () => {
|
|
|
1050
1050
|
id: 'test-user-id-1',
|
|
1051
1051
|
views: [
|
|
1052
1052
|
{
|
|
1053
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1053
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1054
1054
|
icon: CustomViewIcon.STAR,
|
|
1055
1055
|
id: 'test-view-id-1',
|
|
1056
1056
|
name: 'test-view-name-1',
|
|
1057
1057
|
},
|
|
1058
1058
|
{
|
|
1059
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
1059
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
1060
1060
|
icon: CustomViewIcon.STAR,
|
|
1061
1061
|
id: 'test-view-id-2',
|
|
1062
1062
|
name: 'test-view-name-2',
|
|
@@ -1066,7 +1066,7 @@ describe('mutators', () => {
|
|
|
1066
1066
|
const args = {
|
|
1067
1067
|
id: 'test-user-id-1',
|
|
1068
1068
|
view: {
|
|
1069
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1069
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1070
1070
|
icon: CustomViewIcon.STAR,
|
|
1071
1071
|
id: 'test-view-id-1',
|
|
1072
1072
|
name: 'test-view-updated-name',
|
|
@@ -1077,13 +1077,13 @@ describe('mutators', () => {
|
|
|
1077
1077
|
id: 'test-user-id-1',
|
|
1078
1078
|
views: [
|
|
1079
1079
|
{
|
|
1080
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1080
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1081
1081
|
icon: CustomViewIcon.STAR,
|
|
1082
1082
|
id: 'test-view-id-1',
|
|
1083
1083
|
name: 'test-view-updated-name',
|
|
1084
1084
|
},
|
|
1085
1085
|
{
|
|
1086
|
-
aliasEmails: ['test-email-2@example.com'],
|
|
1086
|
+
aliasEmails: ['test-email-2@example.com', 'test-email-2b@example.com'],
|
|
1087
1087
|
icon: CustomViewIcon.STAR,
|
|
1088
1088
|
id: 'test-view-id-2',
|
|
1089
1089
|
name: 'test-view-name-2',
|
|
@@ -1099,11 +1099,29 @@ describe('mutators', () => {
|
|
|
1099
1099
|
const result = v.safeParse(mutatorSchemas.user.updateView, args);
|
|
1100
1100
|
expect(result.success).toBe(false);
|
|
1101
1101
|
});
|
|
1102
|
+
it('schema rejects aliasEmails array with only 1 email', () => {
|
|
1103
|
+
const args = {
|
|
1104
|
+
id: 'test-user-id-1',
|
|
1105
|
+
view: {
|
|
1106
|
+
aliasEmails: ['test-email-1@example.com'],
|
|
1107
|
+
icon: CustomViewIcon.STAR,
|
|
1108
|
+
id: 'test-view-id-1',
|
|
1109
|
+
name: 'test-view-name-1',
|
|
1110
|
+
},
|
|
1111
|
+
};
|
|
1112
|
+
const result = v.safeParse(mutatorSchemas.user.updateView, args);
|
|
1113
|
+
expect(result.success).toBe(false);
|
|
1114
|
+
});
|
|
1102
1115
|
for (const icon of USER_SETTINGS_CUSTOM_VIEW_ICONS) {
|
|
1103
1116
|
it(`schema accepts valid icon value: ${icon}`, () => {
|
|
1104
1117
|
const args = {
|
|
1105
1118
|
id: 'test-user-id-1',
|
|
1106
|
-
view: {
|
|
1119
|
+
view: {
|
|
1120
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1121
|
+
icon,
|
|
1122
|
+
id: 'test-view-id-1',
|
|
1123
|
+
name: 'test-view-name-1',
|
|
1124
|
+
},
|
|
1107
1125
|
};
|
|
1108
1126
|
const result = v.safeParse(mutatorSchemas.user.updateView, args);
|
|
1109
1127
|
expect(result.success).toBe(true);
|
|
@@ -1113,7 +1131,7 @@ describe('mutators', () => {
|
|
|
1113
1131
|
const args = {
|
|
1114
1132
|
id: 'test-user-id-1',
|
|
1115
1133
|
view: {
|
|
1116
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1134
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1117
1135
|
icon: null,
|
|
1118
1136
|
id: 'test-view-id-1',
|
|
1119
1137
|
name: 'test-view-name-1',
|
|
@@ -1126,7 +1144,7 @@ describe('mutators', () => {
|
|
|
1126
1144
|
const args = {
|
|
1127
1145
|
id: 'test-user-id-1',
|
|
1128
1146
|
view: {
|
|
1129
|
-
aliasEmails: ['test-email-1@example.com'],
|
|
1147
|
+
aliasEmails: ['test-email-1@example.com', 'test-email-1b@example.com'],
|
|
1130
1148
|
icon: 'INVALID_ICON',
|
|
1131
1149
|
id: 'test-view-id-1',
|
|
1132
1150
|
name: 'test-view-name-1',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcoappio/marco-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.535",
|
|
4
4
|
"author": "team@marcoapp.io",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "git@github.com:marcoappio/marco-config.git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@orama/stemmers": "3.1.16",
|
|
29
29
|
"@orama/stopwords": "3.1.16",
|
|
30
|
-
"@rocicorp/zero": "0.25.
|
|
30
|
+
"@rocicorp/zero": "0.25.9",
|
|
31
31
|
"diff": "8.0.2",
|
|
32
32
|
"valibot": "1.1.0"
|
|
33
33
|
},
|