@marcoappio/marco-config 2.0.531 → 2.0.533

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.
@@ -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
+ ];
@@ -11,5 +11,6 @@ export * from './MarcoPlatform';
11
11
  export * from './MessageRecipientType';
12
12
  export * from './OAuthProvider';
13
13
  export * from './SDKError';
14
+ export * from './UserSettings';
14
15
  export * from './Zero';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -11,4 +11,5 @@ export * from './MarcoPlatform';
11
11
  export * from './MessageRecipientType';
12
12
  export * from './OAuthProvider';
13
13
  export * from './SDKError';
14
+ export * from './UserSettings';
14
15
  export * from './Zero';
@@ -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").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>;
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>;
@@ -274,6 +275,7 @@ export declare const marcoZero: {
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
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").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>;
277
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>;
278
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>;
279
281
  }, undefined>;
@@ -743,6 +745,7 @@ export declare const marcoZero: {
743
745
  id: string;
744
746
  view: {
745
747
  aliasEmails: string[];
748
+ icon: import("..").CustomViewIcon;
746
749
  id: string;
747
750
  name: string;
748
751
  };
@@ -750,6 +753,7 @@ export declare const marcoZero: {
750
753
  id: string;
751
754
  view: {
752
755
  aliasEmails: string[];
756
+ icon: import("..").CustomViewIcon;
753
757
  id: string;
754
758
  name: string;
755
759
  };
@@ -804,6 +808,7 @@ export declare const marcoZero: {
804
808
  id: string;
805
809
  view: {
806
810
  aliasEmails: string[];
811
+ icon: import("..").CustomViewIcon;
807
812
  id: string;
808
813
  name: string;
809
814
  };
@@ -811,6 +816,7 @@ export declare const marcoZero: {
811
816
  id: string;
812
817
  view: {
813
818
  aliasEmails: string[];
819
+ icon: import("..").CustomViewIcon;
814
820
  id: string;
815
821
  name: string;
816
822
  };
@@ -858,6 +864,7 @@ export declare const marcoZero: {
858
864
  id: string;
859
865
  name: string;
860
866
  aliasEmails: string[];
867
+ icon: import("..").CustomViewIcon;
861
868
  }[];
862
869
  };
863
870
  };
@@ -2141,6 +2148,7 @@ export declare const marcoZero: {
2141
2148
  id: string;
2142
2149
  name: string;
2143
2150
  aliasEmails: string[];
2151
+ icon: import("..").CustomViewIcon;
2144
2152
  }[];
2145
2153
  } & {
2146
2154
  readonly accounts: readonly ({
@@ -2229,6 +2237,7 @@ export declare const marcoZero: {
2229
2237
  id: string;
2230
2238
  name: string;
2231
2239
  aliasEmails: string[];
2240
+ icon: import("..").CustomViewIcon;
2232
2241
  }[];
2233
2242
  };
2234
2243
  };
@@ -3270,6 +3279,7 @@ export declare const marcoZero: {
3270
3279
  id: string;
3271
3280
  name: string;
3272
3281
  aliasEmails: string[];
3282
+ icon: import("..").CustomViewIcon;
3273
3283
  }[];
3274
3284
  };
3275
3285
  };
@@ -5007,6 +5017,7 @@ export declare const marcoZero: {
5007
5017
  id: string;
5008
5018
  name: string;
5009
5019
  aliasEmails: string[];
5020
+ icon: import("..").CustomViewIcon;
5010
5021
  }[];
5011
5022
  };
5012
5023
  };
@@ -1 +1 @@
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.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>;
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>;
@@ -274,6 +275,7 @@ export declare const mutatorSchemas: {
274
275
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
275
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.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>;
277
279
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
278
280
  readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
279
281
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../src/zero/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgF5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJ1B,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.picklist(USER_SETTINGS_CUSTOM_VIEW_ICONS),
59
60
  id: marcoSchemas.string.required(),
60
61
  name: marcoSchemas.string.required(),
61
62
  });
@@ -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;
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;
420
422
  id: string;
421
423
  name: string;
422
424
  };
@@ -461,6 +463,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
461
463
  id: string;
462
464
  view: {
463
465
  aliasEmails: string[];
466
+ icon: import("../types").CustomViewIcon;
464
467
  id: string;
465
468
  name: string;
466
469
  };
@@ -468,6 +471,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
468
471
  id: string;
469
472
  view: {
470
473
  aliasEmails: string[];
474
+ icon: import("../types").CustomViewIcon;
471
475
  id: string;
472
476
  name: string;
473
477
  };
@@ -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;
516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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmjBnB,CAAA"}
@@ -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: [...currentViews, { ...args.view, aliasEmails: [...new Set(args.view.aliasEmails)] }],
499
+ views: [
500
+ ...currentViews,
501
+ {
502
+ ...args.view,
503
+ aliasEmails: [...new Set(args.view.aliasEmails)],
504
+ },
505
+ ],
500
506
  });
501
507
  }
502
508
  }
@@ -540,7 +546,12 @@ export const mutators = defineMutators({
540
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.view.id ? { ...args.view, aliasEmails: deduplicatedEmails } : x),
549
+ views: (user.views ?? []).map(x => x.id === args.view.id
550
+ ? {
551
+ ...args.view,
552
+ aliasEmails: deduplicatedEmails,
553
+ }
554
+ : x),
544
555
  });
545
556
  }
546
557
  }
@@ -1,5 +1,6 @@
1
1
  import { beforeEach, describe, expect, it, mock } from 'bun:test';
2
2
  import * as v from 'valibot';
3
+ import { CustomViewIcon, USER_SETTINGS_CUSTOM_VIEW_ICONS } from '../types';
3
4
  import { mutatorSchemas } from './mutatorSchemas';
4
5
  import { mutators } from './mutators';
5
6
  const createMockTx = () => ({
@@ -654,6 +655,7 @@ describe('mutators', () => {
654
655
  id: 'test-user-id-1',
655
656
  view: {
656
657
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com'],
658
+ icon: CustomViewIcon.STAR,
657
659
  id: 'test-view-id-1',
658
660
  name: 'test-view-name-1',
659
661
  },
@@ -664,6 +666,7 @@ describe('mutators', () => {
664
666
  views: [
665
667
  {
666
668
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com'],
669
+ icon: CustomViewIcon.STAR,
667
670
  id: 'test-view-id-1',
668
671
  name: 'test-view-name-1',
669
672
  },
@@ -676,6 +679,7 @@ describe('mutators', () => {
676
679
  id: 'test-user-id-1',
677
680
  view: {
678
681
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com', 'test-email-1@example.com'],
682
+ icon: CustomViewIcon.STAR,
679
683
  id: 'test-view-id-1',
680
684
  name: 'test-view-name-1',
681
685
  },
@@ -686,6 +690,7 @@ describe('mutators', () => {
686
690
  views: [
687
691
  {
688
692
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com'],
693
+ icon: CustomViewIcon.STAR,
689
694
  id: 'test-view-id-1',
690
695
  name: 'test-view-name-1',
691
696
  },
@@ -695,18 +700,40 @@ describe('mutators', () => {
695
700
  it('appends to existing views', async () => {
696
701
  tx.run = mock(() => Promise.resolve({
697
702
  id: 'test-user-id-1',
698
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
703
+ views: [
704
+ {
705
+ aliasEmails: ['test-email-1@example.com'],
706
+ icon: CustomViewIcon.STAR,
707
+ id: 'test-view-id-1',
708
+ name: 'test-view-name-1',
709
+ },
710
+ ],
699
711
  }));
700
712
  const args = {
701
713
  id: 'test-user-id-1',
702
- view: { aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-2', name: 'test-view-name-2' },
714
+ view: {
715
+ aliasEmails: ['test-email-2@example.com'],
716
+ icon: CustomViewIcon.STAR,
717
+ id: 'test-view-id-2',
718
+ name: 'test-view-name-2',
719
+ },
703
720
  };
704
721
  await mutators.user.createView.fn({ args, ctx, tx: tx });
705
722
  expect(tx.mutate.user.update).toHaveBeenCalledWith({
706
723
  id: 'test-user-id-1',
707
724
  views: [
708
- { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' },
709
- { aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-2', name: 'test-view-name-2' },
725
+ {
726
+ aliasEmails: ['test-email-1@example.com'],
727
+ icon: CustomViewIcon.STAR,
728
+ id: 'test-view-id-1',
729
+ name: 'test-view-name-1',
730
+ },
731
+ {
732
+ aliasEmails: ['test-email-2@example.com'],
733
+ icon: CustomViewIcon.STAR,
734
+ id: 'test-view-id-2',
735
+ name: 'test-view-name-2',
736
+ },
710
737
  ],
711
738
  });
712
739
  });
@@ -714,7 +741,12 @@ describe('mutators', () => {
714
741
  tx.run = mock(() => Promise.resolve(null));
715
742
  const args = {
716
743
  id: 'test-user-id-1',
717
- view: { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' },
744
+ view: {
745
+ aliasEmails: ['test-email-1@example.com'],
746
+ icon: CustomViewIcon.STAR,
747
+ id: 'test-view-id-1',
748
+ name: 'test-view-name-1',
749
+ },
718
750
  };
719
751
  await mutators.user.createView.fn({ args, ctx, tx: tx });
720
752
  expect(tx.mutate.user.update).not.toHaveBeenCalled();
@@ -722,11 +754,23 @@ describe('mutators', () => {
722
754
  it('does nothing if view with same id already exists', async () => {
723
755
  tx.run = mock(() => Promise.resolve({
724
756
  id: 'test-user-id-1',
725
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
757
+ views: [
758
+ {
759
+ aliasEmails: ['test-email-1@example.com'],
760
+ icon: CustomViewIcon.STAR,
761
+ id: 'test-view-id-1',
762
+ name: 'test-view-name-1',
763
+ },
764
+ ],
726
765
  }));
727
766
  const args = {
728
767
  id: 'test-user-id-1',
729
- view: { aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-1', name: 'test-view-name-2' },
768
+ view: {
769
+ aliasEmails: ['test-email-2@example.com'],
770
+ icon: CustomViewIcon.STAR,
771
+ id: 'test-view-id-1',
772
+ name: 'test-view-name-2',
773
+ },
730
774
  };
731
775
  await mutators.user.createView.fn({ args, ctx, tx: tx });
732
776
  expect(tx.mutate.user.update).not.toHaveBeenCalled();
@@ -734,13 +778,19 @@ describe('mutators', () => {
734
778
  it('does nothing if max views limit reached', async () => {
735
779
  const existingViews = Array.from({ length: 25 }, (_, i) => ({
736
780
  aliasEmails: [`test-email-${i}@example.com`],
781
+ icon: CustomViewIcon.STAR,
737
782
  id: `test-view-id-${i}`,
738
783
  name: `test-view-name-${i}`,
739
784
  }));
740
785
  tx.run = mock(() => Promise.resolve({ id: 'test-user-id-1', views: existingViews }));
741
786
  const args = {
742
787
  id: 'test-user-id-1',
743
- view: { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' },
788
+ view: {
789
+ aliasEmails: ['test-email-1@example.com'],
790
+ icon: CustomViewIcon.STAR,
791
+ id: 'test-view-id-1',
792
+ name: 'test-view-name-1',
793
+ },
744
794
  };
745
795
  await mutators.user.createView.fn({ args, ctx, tx: tx });
746
796
  expect(tx.mutate.user.update).not.toHaveBeenCalled();
@@ -751,15 +801,32 @@ describe('mutators', () => {
751
801
  tx.run = mock(() => Promise.resolve({
752
802
  id: 'test-user-id-1',
753
803
  views: [
754
- { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' },
755
- { aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-2', name: 'test-view-name-2' },
804
+ {
805
+ aliasEmails: ['test-email-1@example.com'],
806
+ icon: CustomViewIcon.STAR,
807
+ id: 'test-view-id-1',
808
+ name: 'test-view-name-1',
809
+ },
810
+ {
811
+ aliasEmails: ['test-email-2@example.com'],
812
+ icon: CustomViewIcon.STAR,
813
+ id: 'test-view-id-2',
814
+ name: 'test-view-name-2',
815
+ },
756
816
  ],
757
817
  }));
758
818
  const args = { id: 'test-user-id-1', viewId: 'test-view-id-1' };
759
819
  await mutators.user.deleteView.fn({ args, ctx, tx: tx });
760
820
  expect(tx.mutate.user.update).toHaveBeenCalledWith({
761
821
  id: 'test-user-id-1',
762
- views: [{ aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-2', name: 'test-view-name-2' }],
822
+ views: [
823
+ {
824
+ aliasEmails: ['test-email-2@example.com'],
825
+ icon: CustomViewIcon.STAR,
826
+ id: 'test-view-id-2',
827
+ name: 'test-view-name-2',
828
+ },
829
+ ],
763
830
  });
764
831
  });
765
832
  it('does nothing if user not found', async () => {
@@ -773,27 +840,54 @@ describe('mutators', () => {
773
840
  it('updates view name', async () => {
774
841
  tx.run = mock(() => Promise.resolve({
775
842
  id: 'test-user-id-1',
776
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
843
+ views: [
844
+ {
845
+ aliasEmails: ['test-email-1@example.com'],
846
+ icon: CustomViewIcon.STAR,
847
+ id: 'test-view-id-1',
848
+ name: 'test-view-name-1',
849
+ },
850
+ ],
777
851
  }));
778
852
  const args = {
779
853
  id: 'test-user-id-1',
780
- view: { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-updated-name' },
854
+ view: {
855
+ aliasEmails: ['test-email-1@example.com'],
856
+ icon: CustomViewIcon.STAR,
857
+ id: 'test-view-id-1',
858
+ name: 'test-updated-name',
859
+ },
781
860
  };
782
861
  await mutators.user.updateView.fn({ args, ctx, tx: tx });
783
862
  expect(tx.mutate.user.update).toHaveBeenCalledWith({
784
863
  id: 'test-user-id-1',
785
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-updated-name' }],
864
+ views: [
865
+ {
866
+ aliasEmails: ['test-email-1@example.com'],
867
+ icon: CustomViewIcon.STAR,
868
+ id: 'test-view-id-1',
869
+ name: 'test-updated-name',
870
+ },
871
+ ],
786
872
  });
787
873
  });
788
874
  it('updates view aliasEmails', async () => {
789
875
  tx.run = mock(() => Promise.resolve({
790
876
  id: 'test-user-id-1',
791
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
877
+ views: [
878
+ {
879
+ aliasEmails: ['test-email-1@example.com'],
880
+ icon: CustomViewIcon.STAR,
881
+ id: 'test-view-id-1',
882
+ name: 'test-view-name-1',
883
+ },
884
+ ],
792
885
  }));
793
886
  const args = {
794
887
  id: 'test-user-id-1',
795
888
  view: {
796
889
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com'],
890
+ icon: CustomViewIcon.STAR,
797
891
  id: 'test-view-id-1',
798
892
  name: 'test-view-name-1',
799
893
  },
@@ -804,6 +898,7 @@ describe('mutators', () => {
804
898
  views: [
805
899
  {
806
900
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com'],
901
+ icon: CustomViewIcon.STAR,
807
902
  id: 'test-view-id-1',
808
903
  name: 'test-view-name-1',
809
904
  },
@@ -813,12 +908,20 @@ describe('mutators', () => {
813
908
  it('deduplicates aliasEmails on update', async () => {
814
909
  tx.run = mock(() => Promise.resolve({
815
910
  id: 'test-user-id-1',
816
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
911
+ views: [
912
+ {
913
+ aliasEmails: ['test-email-1@example.com'],
914
+ icon: CustomViewIcon.STAR,
915
+ id: 'test-view-id-1',
916
+ name: 'test-view-name-1',
917
+ },
918
+ ],
817
919
  }));
818
920
  const args = {
819
921
  id: 'test-user-id-1',
820
922
  view: {
821
923
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com', 'test-email-1@example.com'],
924
+ icon: CustomViewIcon.STAR,
822
925
  id: 'test-view-id-1',
823
926
  name: 'test-view-name-1',
824
927
  },
@@ -829,6 +932,41 @@ describe('mutators', () => {
829
932
  views: [
830
933
  {
831
934
  aliasEmails: ['test-email-1@example.com', 'test-email-2@example.com'],
935
+ icon: CustomViewIcon.STAR,
936
+ id: 'test-view-id-1',
937
+ name: 'test-view-name-1',
938
+ },
939
+ ],
940
+ });
941
+ });
942
+ it('updates view icon', async () => {
943
+ tx.run = mock(() => Promise.resolve({
944
+ id: 'test-user-id-1',
945
+ views: [
946
+ {
947
+ aliasEmails: ['test-email-1@example.com'],
948
+ icon: CustomViewIcon.STAR,
949
+ id: 'test-view-id-1',
950
+ name: 'test-view-name-1',
951
+ },
952
+ ],
953
+ }));
954
+ const args = {
955
+ id: 'test-user-id-1',
956
+ view: {
957
+ aliasEmails: ['test-email-1@example.com'],
958
+ icon: CustomViewIcon.HEART,
959
+ id: 'test-view-id-1',
960
+ name: 'test-view-name-1',
961
+ },
962
+ };
963
+ await mutators.user.updateView.fn({ args, ctx, tx: tx });
964
+ expect(tx.mutate.user.update).toHaveBeenCalledWith({
965
+ id: 'test-user-id-1',
966
+ views: [
967
+ {
968
+ aliasEmails: ['test-email-1@example.com'],
969
+ icon: CustomViewIcon.HEART,
832
970
  id: 'test-view-id-1',
833
971
  name: 'test-view-name-1',
834
972
  },
@@ -838,23 +976,47 @@ describe('mutators', () => {
838
976
  it('updates both name and aliasEmails', async () => {
839
977
  tx.run = mock(() => Promise.resolve({
840
978
  id: 'test-user-id-1',
841
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
979
+ views: [
980
+ {
981
+ aliasEmails: ['test-email-1@example.com'],
982
+ icon: CustomViewIcon.STAR,
983
+ id: 'test-view-id-1',
984
+ name: 'test-view-name-1',
985
+ },
986
+ ],
842
987
  }));
843
988
  const args = {
844
989
  id: 'test-user-id-1',
845
- view: { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-updated-name' },
990
+ view: {
991
+ aliasEmails: ['test-email-1@example.com'],
992
+ icon: CustomViewIcon.STAR,
993
+ id: 'test-view-id-1',
994
+ name: 'test-updated-name',
995
+ },
846
996
  };
847
997
  await mutators.user.updateView.fn({ args, ctx, tx: tx });
848
998
  expect(tx.mutate.user.update).toHaveBeenCalledWith({
849
999
  id: 'test-user-id-1',
850
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-updated-name' }],
1000
+ views: [
1001
+ {
1002
+ aliasEmails: ['test-email-1@example.com'],
1003
+ icon: CustomViewIcon.STAR,
1004
+ id: 'test-view-id-1',
1005
+ name: 'test-updated-name',
1006
+ },
1007
+ ],
851
1008
  });
852
1009
  });
853
1010
  it('does nothing if user not found', async () => {
854
1011
  tx.run = mock(() => Promise.resolve(null));
855
1012
  const args = {
856
1013
  id: 'test-user-id-1',
857
- view: { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-updated-name' },
1014
+ view: {
1015
+ aliasEmails: ['test-email-1@example.com'],
1016
+ icon: CustomViewIcon.STAR,
1017
+ id: 'test-view-id-1',
1018
+ name: 'test-updated-name',
1019
+ },
858
1020
  };
859
1021
  await mutators.user.updateView.fn({ args, ctx, tx: tx });
860
1022
  expect(tx.mutate.user.update).not.toHaveBeenCalled();
@@ -862,12 +1024,20 @@ describe('mutators', () => {
862
1024
  it('does nothing if view does not exist', async () => {
863
1025
  tx.run = mock(() => Promise.resolve({
864
1026
  id: 'test-user-id-1',
865
- views: [{ aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' }],
1027
+ views: [
1028
+ {
1029
+ aliasEmails: ['test-email-1@example.com'],
1030
+ icon: CustomViewIcon.STAR,
1031
+ id: 'test-view-id-1',
1032
+ name: 'test-view-name-1',
1033
+ },
1034
+ ],
866
1035
  }));
867
1036
  const args = {
868
1037
  id: 'test-user-id-1',
869
1038
  view: {
870
1039
  aliasEmails: ['test-email-1@example.com'],
1040
+ icon: CustomViewIcon.STAR,
871
1041
  id: 'test-view-id-nonexistent',
872
1042
  name: 'test-updated-name',
873
1043
  },
@@ -879,27 +1049,88 @@ describe('mutators', () => {
879
1049
  tx.run = mock(() => Promise.resolve({
880
1050
  id: 'test-user-id-1',
881
1051
  views: [
882
- { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-name-1' },
883
- { aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-2', name: 'test-view-name-2' },
1052
+ {
1053
+ aliasEmails: ['test-email-1@example.com'],
1054
+ icon: CustomViewIcon.STAR,
1055
+ id: 'test-view-id-1',
1056
+ name: 'test-view-name-1',
1057
+ },
1058
+ {
1059
+ aliasEmails: ['test-email-2@example.com'],
1060
+ icon: CustomViewIcon.STAR,
1061
+ id: 'test-view-id-2',
1062
+ name: 'test-view-name-2',
1063
+ },
884
1064
  ],
885
1065
  }));
886
1066
  const args = {
887
1067
  id: 'test-user-id-1',
888
- view: { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-updated-name' },
1068
+ view: {
1069
+ aliasEmails: ['test-email-1@example.com'],
1070
+ icon: CustomViewIcon.STAR,
1071
+ id: 'test-view-id-1',
1072
+ name: 'test-view-updated-name',
1073
+ },
889
1074
  };
890
1075
  await mutators.user.updateView.fn({ args, ctx, tx: tx });
891
1076
  expect(tx.mutate.user.update).toHaveBeenCalledWith({
892
1077
  id: 'test-user-id-1',
893
1078
  views: [
894
- { aliasEmails: ['test-email-1@example.com'], id: 'test-view-id-1', name: 'test-view-updated-name' },
895
- { aliasEmails: ['test-email-2@example.com'], id: 'test-view-id-2', name: 'test-view-name-2' },
1079
+ {
1080
+ aliasEmails: ['test-email-1@example.com'],
1081
+ icon: CustomViewIcon.STAR,
1082
+ id: 'test-view-id-1',
1083
+ name: 'test-view-updated-name',
1084
+ },
1085
+ {
1086
+ aliasEmails: ['test-email-2@example.com'],
1087
+ icon: CustomViewIcon.STAR,
1088
+ id: 'test-view-id-2',
1089
+ name: 'test-view-name-2',
1090
+ },
896
1091
  ],
897
1092
  });
898
1093
  });
899
1094
  it('schema rejects empty aliasEmails array', () => {
900
1095
  const args = {
901
1096
  id: 'test-user-id-1',
902
- view: { aliasEmails: [], id: 'test-view-id-1', name: 'test-view-name-1' },
1097
+ view: { aliasEmails: [], icon: CustomViewIcon.STAR, id: 'test-view-id-1', name: 'test-view-name-1' },
1098
+ };
1099
+ const result = v.safeParse(mutatorSchemas.user.updateView, args);
1100
+ expect(result.success).toBe(false);
1101
+ });
1102
+ for (const icon of USER_SETTINGS_CUSTOM_VIEW_ICONS) {
1103
+ it(`schema accepts valid icon value: ${icon}`, () => {
1104
+ const args = {
1105
+ id: 'test-user-id-1',
1106
+ view: { aliasEmails: ['test-email-1@example.com'], icon, id: 'test-view-id-1', name: 'test-view-name-1' },
1107
+ };
1108
+ const result = v.safeParse(mutatorSchemas.user.updateView, args);
1109
+ expect(result.success).toBe(true);
1110
+ });
1111
+ }
1112
+ it('schema rejects null icon value', () => {
1113
+ const args = {
1114
+ id: 'test-user-id-1',
1115
+ view: {
1116
+ aliasEmails: ['test-email-1@example.com'],
1117
+ icon: null,
1118
+ id: 'test-view-id-1',
1119
+ name: 'test-view-name-1',
1120
+ },
1121
+ };
1122
+ const result = v.safeParse(mutatorSchemas.user.updateView, args);
1123
+ expect(result.success).toBe(false);
1124
+ });
1125
+ it('schema rejects invalid icon value', () => {
1126
+ const args = {
1127
+ id: 'test-user-id-1',
1128
+ view: {
1129
+ aliasEmails: ['test-email-1@example.com'],
1130
+ icon: 'INVALID_ICON',
1131
+ id: 'test-view-id-1',
1132
+ name: 'test-view-name-1',
1133
+ },
903
1134
  };
904
1135
  const result = v.safeParse(mutatorSchemas.user.updateView, args);
905
1136
  expect(result.success).toBe(false);
@@ -271,6 +271,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
271
271
  id: string;
272
272
  name: string;
273
273
  aliasEmails: string[];
274
+ icon: import("../types").CustomViewIcon;
274
275
  }[];
275
276
  } & {
276
277
  readonly accounts: readonly ({
@@ -357,6 +358,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
357
358
  id: string;
358
359
  name: string;
359
360
  aliasEmails: string[];
361
+ icon: import("../types").CustomViewIcon;
360
362
  }[];
361
363
  };
362
364
  };
@@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
2
3
  tables: {
3
4
  readonly user: {
@@ -38,6 +39,7 @@ export declare const schema: {
38
39
  id: string;
39
40
  name: string;
40
41
  aliasEmails: string[];
42
+ icon: CustomViewIcon;
41
43
  }[];
42
44
  };
43
45
  };
@@ -1775,6 +1777,7 @@ export declare const tables: {
1775
1777
  id: string;
1776
1778
  name: string;
1777
1779
  aliasEmails: string[];
1780
+ icon: CustomViewIcon;
1778
1781
  }[];
1779
1782
  };
1780
1783
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/zero/schema.ts"],"names":[],"mappings":"AAmcA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAtaL,MAAM;8BACJ,MAAM;qCACC,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAkEhB,MAAM;4BACX,MAAM,EAAE;4BACR,MAAM,EAAE;6BACP,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAxEL,MAAM;0BACJ,MAAM;iCACC,MAAM,EAAE;0BACf,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAudpB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.531",
3
+ "version": "2.0.533",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",