@marcoappio/marco-config 2.0.530 → 2.0.532
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/types/UserSettings.d.ts +17 -0
- package/dist/types/UserSettings.d.ts.map +1 -0
- package/dist/types/UserSettings.js +29 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/zero/index.d.ts +22 -38
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas.d.ts +5 -30
- package/dist/zero/mutatorSchemas.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas.js +3 -6
- package/dist/zero/mutators.d.ts +13 -8
- package/dist/zero/mutators.d.ts.map +1 -1
- package/dist/zero/mutators.js +14 -5
- package/dist/zero/mutators.test.js +508 -243
- package/dist/zero/queries.d.ts +2 -0
- package/dist/zero/queries.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +3 -0
- package/dist/zero/schema.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum CustomViewIcon {
|
|
2
|
+
AIRPLANE = "AIRPLANE",
|
|
3
|
+
BELL = "BELL",
|
|
4
|
+
BRIEFCASE = "BRIEFCASE",
|
|
5
|
+
CLOCK = "CLOCK",
|
|
6
|
+
CREDIT_CARD = "CREDIT_CARD",
|
|
7
|
+
HEART = "HEART",
|
|
8
|
+
HOME = "HOME",
|
|
9
|
+
KEY = "KEY",
|
|
10
|
+
MOON = "MOON",
|
|
11
|
+
PERSON = "PERSON",
|
|
12
|
+
SHOPPING_CART = "SHOPPING_CART",
|
|
13
|
+
STAR = "STAR"
|
|
14
|
+
}
|
|
15
|
+
export declare const USER_SETTINGS_CUSTOM_VIEW_ICONS: readonly [CustomViewIcon.AIRPLANE, CustomViewIcon.BELL, CustomViewIcon.BRIEFCASE, CustomViewIcon.CLOCK, CustomViewIcon.CREDIT_CARD, CustomViewIcon.HEART, CustomViewIcon.HOME, CustomViewIcon.KEY, CustomViewIcon.MOON, CustomViewIcon.PERSON, CustomViewIcon.SHOPPING_CART, CustomViewIcon.STAR];
|
|
16
|
+
export type UserSettingsCustomViewIcon = (typeof USER_SETTINGS_CUSTOM_VIEW_ICONS)[number];
|
|
17
|
+
//# sourceMappingURL=UserSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSettings.d.ts","sourceRoot":"","sources":["../../src/types/UserSettings.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,IAAI,SAAS;CACd;AAED,eAAO,MAAM,+BAA+B,mSAalC,CAAA;AAEV,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export var CustomViewIcon;
|
|
2
|
+
(function (CustomViewIcon) {
|
|
3
|
+
CustomViewIcon["AIRPLANE"] = "AIRPLANE";
|
|
4
|
+
CustomViewIcon["BELL"] = "BELL";
|
|
5
|
+
CustomViewIcon["BRIEFCASE"] = "BRIEFCASE";
|
|
6
|
+
CustomViewIcon["CLOCK"] = "CLOCK";
|
|
7
|
+
CustomViewIcon["CREDIT_CARD"] = "CREDIT_CARD";
|
|
8
|
+
CustomViewIcon["HEART"] = "HEART";
|
|
9
|
+
CustomViewIcon["HOME"] = "HOME";
|
|
10
|
+
CustomViewIcon["KEY"] = "KEY";
|
|
11
|
+
CustomViewIcon["MOON"] = "MOON";
|
|
12
|
+
CustomViewIcon["PERSON"] = "PERSON";
|
|
13
|
+
CustomViewIcon["SHOPPING_CART"] = "SHOPPING_CART";
|
|
14
|
+
CustomViewIcon["STAR"] = "STAR";
|
|
15
|
+
})(CustomViewIcon || (CustomViewIcon = {}));
|
|
16
|
+
export const USER_SETTINGS_CUSTOM_VIEW_ICONS = [
|
|
17
|
+
CustomViewIcon.AIRPLANE,
|
|
18
|
+
CustomViewIcon.BELL,
|
|
19
|
+
CustomViewIcon.BRIEFCASE,
|
|
20
|
+
CustomViewIcon.CLOCK,
|
|
21
|
+
CustomViewIcon.CREDIT_CARD,
|
|
22
|
+
CustomViewIcon.HEART,
|
|
23
|
+
CustomViewIcon.HOME,
|
|
24
|
+
CustomViewIcon.KEY,
|
|
25
|
+
CustomViewIcon.MOON,
|
|
26
|
+
CustomViewIcon.PERSON,
|
|
27
|
+
CustomViewIcon.SHOPPING_CART,
|
|
28
|
+
CustomViewIcon.STAR,
|
|
29
|
+
];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA"}
|
package/dist/types/index.js
CHANGED
package/dist/zero/index.d.ts
CHANGED
|
@@ -246,6 +246,7 @@ export declare const marcoZero: {
|
|
|
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
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[], 1, undefined>, import("valibot").MaxLengthAction<string[], number, undefined>]>;
|
|
249
|
+
readonly icon: import("valibot").NullableSchema<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>, undefined>;
|
|
249
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>;
|
|
250
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>;
|
|
251
252
|
}, undefined>;
|
|
@@ -272,38 +273,12 @@ export declare const marcoZero: {
|
|
|
272
273
|
}, undefined>;
|
|
273
274
|
updateView: import("valibot").ObjectSchema<{
|
|
274
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>;
|
|
275
|
-
readonly
|
|
276
|
+
readonly view: import("valibot").ObjectSchema<{
|
|
276
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[], 1, undefined>, import("valibot").MaxLengthAction<string[], number, undefined>]>;
|
|
278
|
+
readonly icon: import("valibot").NullableSchema<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>, undefined>;
|
|
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>;
|
|
277
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>;
|
|
278
|
-
}, undefined
|
|
279
|
-
readonly entries: {
|
|
280
|
-
readonly aliasEmails: import("valibot").OptionalSchema<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[], 1, undefined>, import("valibot").MaxLengthAction<string[], number, undefined>]>, undefined>;
|
|
281
|
-
readonly name: import("valibot").OptionalSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
282
|
-
};
|
|
283
|
-
readonly '~standard': import("valibot").StandardProps<{
|
|
284
|
-
aliasEmails?: string[] | undefined;
|
|
285
|
-
name?: string | undefined;
|
|
286
|
-
}, {
|
|
287
|
-
aliasEmails?: string[] | undefined;
|
|
288
|
-
name?: string | undefined;
|
|
289
|
-
}>;
|
|
290
|
-
readonly '~run': (dataset: import("valibot").UnknownDataset, config: import("valibot").Config<import("valibot").BaseIssue<unknown>>) => import("valibot").OutputDataset<{
|
|
291
|
-
aliasEmails?: string[] | undefined;
|
|
292
|
-
name?: string | undefined;
|
|
293
|
-
}, import("valibot").StringIssue | import("valibot").RfcEmailIssue<string> | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, number> | import("valibot").ObjectIssue | import("valibot").ArrayIssue | import("valibot").NonOptionalIssue | import("valibot").MinLengthIssue<string[], 1> | import("valibot").MaxLengthIssue<string[], number>>;
|
|
294
|
-
readonly '~types'?: {
|
|
295
|
-
readonly input: {
|
|
296
|
-
aliasEmails?: string[] | undefined;
|
|
297
|
-
name?: string | undefined;
|
|
298
|
-
};
|
|
299
|
-
readonly output: {
|
|
300
|
-
aliasEmails?: string[] | undefined;
|
|
301
|
-
name?: string | undefined;
|
|
302
|
-
};
|
|
303
|
-
readonly issue: import("valibot").StringIssue | import("valibot").RfcEmailIssue<string> | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, number> | import("valibot").ObjectIssue | import("valibot").ArrayIssue | import("valibot").NonOptionalIssue | import("valibot").MinLengthIssue<string[], 1> | import("valibot").MaxLengthIssue<string[], number>;
|
|
304
|
-
} | undefined;
|
|
305
|
-
};
|
|
306
|
-
readonly viewId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
281
|
+
}, undefined>;
|
|
307
282
|
}, undefined>;
|
|
308
283
|
};
|
|
309
284
|
};
|
|
@@ -770,6 +745,7 @@ export declare const marcoZero: {
|
|
|
770
745
|
id: string;
|
|
771
746
|
view: {
|
|
772
747
|
aliasEmails: string[];
|
|
748
|
+
icon: import("..").CustomViewIcon | null;
|
|
773
749
|
id: string;
|
|
774
750
|
name: string;
|
|
775
751
|
};
|
|
@@ -777,6 +753,7 @@ export declare const marcoZero: {
|
|
|
777
753
|
id: string;
|
|
778
754
|
view: {
|
|
779
755
|
aliasEmails: string[];
|
|
756
|
+
icon: import("..").CustomViewIcon | null;
|
|
780
757
|
id: string;
|
|
781
758
|
name: string;
|
|
782
759
|
};
|
|
@@ -829,18 +806,20 @@ export declare const marcoZero: {
|
|
|
829
806
|
}, unknown>;
|
|
830
807
|
readonly updateView: import("@rocicorp/zero").MutatorDefinition<{
|
|
831
808
|
id: string;
|
|
832
|
-
|
|
833
|
-
aliasEmails
|
|
834
|
-
|
|
809
|
+
view: {
|
|
810
|
+
aliasEmails: string[];
|
|
811
|
+
icon: import("..").CustomViewIcon | null;
|
|
812
|
+
id: string;
|
|
813
|
+
name: string;
|
|
835
814
|
};
|
|
836
|
-
viewId: string;
|
|
837
815
|
}, {
|
|
838
816
|
id: string;
|
|
839
|
-
|
|
840
|
-
aliasEmails
|
|
841
|
-
|
|
817
|
+
view: {
|
|
818
|
+
aliasEmails: string[];
|
|
819
|
+
icon: import("..").CustomViewIcon | null;
|
|
820
|
+
id: string;
|
|
821
|
+
name: string;
|
|
842
822
|
};
|
|
843
|
-
viewId: string;
|
|
844
823
|
}, {
|
|
845
824
|
userId: string;
|
|
846
825
|
}, unknown>;
|
|
@@ -885,6 +864,7 @@ export declare const marcoZero: {
|
|
|
885
864
|
id: string;
|
|
886
865
|
name: string;
|
|
887
866
|
aliasEmails: string[];
|
|
867
|
+
icon: import("..").CustomViewIcon | null;
|
|
888
868
|
}[];
|
|
889
869
|
};
|
|
890
870
|
};
|
|
@@ -2168,6 +2148,7 @@ export declare const marcoZero: {
|
|
|
2168
2148
|
id: string;
|
|
2169
2149
|
name: string;
|
|
2170
2150
|
aliasEmails: string[];
|
|
2151
|
+
icon: import("..").CustomViewIcon | null;
|
|
2171
2152
|
}[];
|
|
2172
2153
|
} & {
|
|
2173
2154
|
readonly accounts: readonly ({
|
|
@@ -2256,6 +2237,7 @@ export declare const marcoZero: {
|
|
|
2256
2237
|
id: string;
|
|
2257
2238
|
name: string;
|
|
2258
2239
|
aliasEmails: string[];
|
|
2240
|
+
icon: import("..").CustomViewIcon | null;
|
|
2259
2241
|
}[];
|
|
2260
2242
|
};
|
|
2261
2243
|
};
|
|
@@ -3297,6 +3279,7 @@ export declare const marcoZero: {
|
|
|
3297
3279
|
id: string;
|
|
3298
3280
|
name: string;
|
|
3299
3281
|
aliasEmails: string[];
|
|
3282
|
+
icon: import("..").CustomViewIcon | null;
|
|
3300
3283
|
}[];
|
|
3301
3284
|
};
|
|
3302
3285
|
};
|
|
@@ -5034,6 +5017,7 @@ export declare const marcoZero: {
|
|
|
5034
5017
|
id: string;
|
|
5035
5018
|
name: string;
|
|
5036
5019
|
aliasEmails: string[];
|
|
5020
|
+
icon: import("..").CustomViewIcon | null;
|
|
5037
5021
|
}[];
|
|
5038
5022
|
};
|
|
5039
5023
|
};
|
package/dist/zero/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMZ,CAAA"}
|
|
@@ -246,6 +246,7 @@ export declare const mutatorSchemas: {
|
|
|
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
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[], 1, undefined>, v.MaxLengthAction<string[], number, undefined>]>;
|
|
249
|
+
readonly icon: v.NullableSchema<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>, undefined>;
|
|
249
250
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
250
251
|
readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
251
252
|
}, undefined>;
|
|
@@ -272,38 +273,12 @@ export declare const mutatorSchemas: {
|
|
|
272
273
|
}, undefined>;
|
|
273
274
|
updateView: v.ObjectSchema<{
|
|
274
275
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
275
|
-
readonly
|
|
276
|
+
readonly view: v.ObjectSchema<{
|
|
276
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[], 1, undefined>, v.MaxLengthAction<string[], number, undefined>]>;
|
|
278
|
+
readonly icon: v.NullableSchema<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>, undefined>;
|
|
279
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
277
280
|
readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
278
|
-
}, undefined
|
|
279
|
-
readonly entries: {
|
|
280
|
-
readonly aliasEmails: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>, v.MaxLengthAction<string[], number, undefined>]>, undefined>;
|
|
281
|
-
readonly name: v.OptionalSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
282
|
-
};
|
|
283
|
-
readonly '~standard': v.StandardProps<{
|
|
284
|
-
aliasEmails?: string[] | undefined;
|
|
285
|
-
name?: string | undefined;
|
|
286
|
-
}, {
|
|
287
|
-
aliasEmails?: string[] | undefined;
|
|
288
|
-
name?: string | undefined;
|
|
289
|
-
}>;
|
|
290
|
-
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
291
|
-
aliasEmails?: string[] | undefined;
|
|
292
|
-
name?: string | undefined;
|
|
293
|
-
}, v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue | v.MinLengthIssue<string[], 1> | v.MaxLengthIssue<string[], number>>;
|
|
294
|
-
readonly '~types'?: {
|
|
295
|
-
readonly input: {
|
|
296
|
-
aliasEmails?: string[] | undefined;
|
|
297
|
-
name?: string | undefined;
|
|
298
|
-
};
|
|
299
|
-
readonly output: {
|
|
300
|
-
aliasEmails?: string[] | undefined;
|
|
301
|
-
name?: string | undefined;
|
|
302
|
-
};
|
|
303
|
-
readonly issue: v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue | v.MinLengthIssue<string[], 1> | v.MaxLengthIssue<string[], number>;
|
|
304
|
-
} | undefined;
|
|
305
|
-
};
|
|
306
|
-
readonly viewId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
281
|
+
}, undefined>;
|
|
307
282
|
}, undefined>;
|
|
308
283
|
};
|
|
309
284
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../src/zero/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../src/zero/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAsF5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJ1B,CAAA"}
|
|
@@ -2,7 +2,7 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { marcoConstants } from '../constants';
|
|
3
3
|
import { marcoSchemas } from '../schemas';
|
|
4
4
|
import { socketTypeSchema } from '../schemas/emailAccount';
|
|
5
|
-
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES } from '../types';
|
|
5
|
+
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES, USER_SETTINGS_CUSTOM_VIEW_ICONS, } from '../types';
|
|
6
6
|
const accountAliasSchema = v.object({
|
|
7
7
|
emailAddress: marcoSchemas.string.email(),
|
|
8
8
|
id: marcoSchemas.string.required(),
|
|
@@ -56,6 +56,7 @@ const connectionConfigImapRawSchema = v.object({
|
|
|
56
56
|
});
|
|
57
57
|
const userViewSchema = v.object({
|
|
58
58
|
aliasEmails: v.pipe(v.array(marcoSchemas.string.email()), v.minLength(1), v.maxLength(marcoConstants.user.views.maxAliasEmailsPerView)),
|
|
59
|
+
icon: v.nullable(v.picklist(USER_SETTINGS_CUSTOM_VIEW_ICONS)),
|
|
59
60
|
id: marcoSchemas.string.required(),
|
|
60
61
|
name: marcoSchemas.string.required(),
|
|
61
62
|
});
|
|
@@ -206,11 +207,7 @@ export const mutatorSchemas = {
|
|
|
206
207
|
}),
|
|
207
208
|
updateView: v.object({
|
|
208
209
|
id: marcoSchemas.string.required(),
|
|
209
|
-
|
|
210
|
-
aliasEmails: v.pipe(v.array(marcoSchemas.string.email()), v.minLength(1), v.maxLength(marcoConstants.user.views.maxAliasEmailsPerView)),
|
|
211
|
-
name: marcoSchemas.string.required(),
|
|
212
|
-
})),
|
|
213
|
-
viewId: marcoSchemas.string.required(),
|
|
210
|
+
view: userViewSchema,
|
|
214
211
|
}),
|
|
215
212
|
},
|
|
216
213
|
};
|
package/dist/zero/mutators.d.ts
CHANGED
|
@@ -410,6 +410,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
410
410
|
id: string;
|
|
411
411
|
view: {
|
|
412
412
|
aliasEmails: string[];
|
|
413
|
+
icon: import("../types").CustomViewIcon | null;
|
|
413
414
|
id: string;
|
|
414
415
|
name: string;
|
|
415
416
|
};
|
|
@@ -417,6 +418,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
417
418
|
id: string;
|
|
418
419
|
view: {
|
|
419
420
|
aliasEmails: string[];
|
|
421
|
+
icon: import("../types").CustomViewIcon | null;
|
|
420
422
|
id: string;
|
|
421
423
|
name: string;
|
|
422
424
|
};
|
|
@@ -459,18 +461,20 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
459
461
|
}, Context, unknown>;
|
|
460
462
|
readonly updateView: import("@rocicorp/zero").MutatorDefinition<{
|
|
461
463
|
id: string;
|
|
462
|
-
|
|
463
|
-
aliasEmails
|
|
464
|
-
|
|
464
|
+
view: {
|
|
465
|
+
aliasEmails: string[];
|
|
466
|
+
icon: import("../types").CustomViewIcon | null;
|
|
467
|
+
id: string;
|
|
468
|
+
name: string;
|
|
465
469
|
};
|
|
466
|
-
viewId: string;
|
|
467
470
|
}, {
|
|
468
471
|
id: string;
|
|
469
|
-
|
|
470
|
-
aliasEmails
|
|
471
|
-
|
|
472
|
+
view: {
|
|
473
|
+
aliasEmails: string[];
|
|
474
|
+
icon: import("../types").CustomViewIcon | null;
|
|
475
|
+
id: string;
|
|
476
|
+
name: string;
|
|
472
477
|
};
|
|
473
|
-
viewId: string;
|
|
474
478
|
}, Context, unknown>;
|
|
475
479
|
};
|
|
476
480
|
}, {
|
|
@@ -513,6 +517,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
513
517
|
id: string;
|
|
514
518
|
name: string;
|
|
515
519
|
aliasEmails: string[];
|
|
520
|
+
icon: import("../types").CustomViewIcon | null;
|
|
516
521
|
}[];
|
|
517
522
|
};
|
|
518
523
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../src/zero/mutators.ts"],"names":[],"mappings":"AASA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAqGjC,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../src/zero/mutators.ts"],"names":[],"mappings":"AASA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAqGjC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmjBnB,CAAA"}
|
package/dist/zero/mutators.js
CHANGED
|
@@ -496,7 +496,13 @@ export const mutators = defineMutators({
|
|
|
496
496
|
if (!existingView && currentViews.length < marcoConstants.user.views.maxViews) {
|
|
497
497
|
await tx.mutate.user.update({
|
|
498
498
|
id: args.id,
|
|
499
|
-
views: [
|
|
499
|
+
views: [
|
|
500
|
+
...currentViews,
|
|
501
|
+
{
|
|
502
|
+
...args.view,
|
|
503
|
+
aliasEmails: [...new Set(args.view.aliasEmails)],
|
|
504
|
+
},
|
|
505
|
+
],
|
|
500
506
|
});
|
|
501
507
|
}
|
|
502
508
|
}
|
|
@@ -535,13 +541,16 @@ export const mutators = defineMutators({
|
|
|
535
541
|
updateView: defineMutator(mutatorSchemas.user.updateView, async ({ tx, args }) => {
|
|
536
542
|
const user = await tx.run(zql.user.where('id', args.id).one());
|
|
537
543
|
if (user) {
|
|
538
|
-
const viewExists = (user.views ?? []).some(x => x.id === args.
|
|
544
|
+
const viewExists = (user.views ?? []).some(x => x.id === args.view.id);
|
|
539
545
|
if (viewExists) {
|
|
540
|
-
const deduplicatedEmails =
|
|
546
|
+
const deduplicatedEmails = [...new Set(args.view.aliasEmails)];
|
|
541
547
|
await tx.mutate.user.update({
|
|
542
548
|
id: args.id,
|
|
543
|
-
views: (user.views ?? []).map(x => x.id === args.
|
|
544
|
-
? {
|
|
549
|
+
views: (user.views ?? []).map(x => x.id === args.view.id
|
|
550
|
+
? {
|
|
551
|
+
...args.view,
|
|
552
|
+
aliasEmails: deduplicatedEmails,
|
|
553
|
+
}
|
|
545
554
|
: x),
|
|
546
555
|
});
|
|
547
556
|
}
|