@marcoappio/marco-config 2.0.529 → 2.0.531
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 +16 -51
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas.d.ts +3 -30
- package/dist/zero/mutatorSchemas.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas.js +1 -5
- package/dist/zero/mutators.d.ts +9 -11
- package/dist/zero/mutators.d.ts.map +1 -1
- package/dist/zero/mutators.js +3 -5
- package/dist/zero/mutators.test.js +343 -264
- package/dist/zero/queries.d.ts +2 -4
- package/dist/zero/queries.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +2 -6
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +1 -1
- package/package.json +1 -1
package/dist/zero/index.d.ts
CHANGED
|
@@ -272,38 +272,11 @@ export declare const marcoZero: {
|
|
|
272
272
|
}, undefined>;
|
|
273
273
|
updateView: import("valibot").ObjectSchema<{
|
|
274
274
|
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
|
|
275
|
+
readonly view: import("valibot").ObjectSchema<{
|
|
276
276
|
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>]>;
|
|
277
|
+
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
278
|
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>;
|
|
279
|
+
}, undefined>;
|
|
307
280
|
}, undefined>;
|
|
308
281
|
};
|
|
309
282
|
};
|
|
@@ -829,18 +802,18 @@ export declare const marcoZero: {
|
|
|
829
802
|
}, unknown>;
|
|
830
803
|
readonly updateView: import("@rocicorp/zero").MutatorDefinition<{
|
|
831
804
|
id: string;
|
|
832
|
-
|
|
833
|
-
aliasEmails
|
|
834
|
-
|
|
805
|
+
view: {
|
|
806
|
+
aliasEmails: string[];
|
|
807
|
+
id: string;
|
|
808
|
+
name: string;
|
|
835
809
|
};
|
|
836
|
-
viewId: string;
|
|
837
810
|
}, {
|
|
838
811
|
id: string;
|
|
839
|
-
|
|
840
|
-
aliasEmails
|
|
841
|
-
|
|
812
|
+
view: {
|
|
813
|
+
aliasEmails: string[];
|
|
814
|
+
id: string;
|
|
815
|
+
name: string;
|
|
842
816
|
};
|
|
843
|
-
viewId: string;
|
|
844
817
|
}, {
|
|
845
818
|
userId: string;
|
|
846
819
|
}, unknown>;
|
|
@@ -878,7 +851,7 @@ export declare const marcoZero: {
|
|
|
878
851
|
} & {
|
|
879
852
|
serverName: string;
|
|
880
853
|
};
|
|
881
|
-
readonly views:
|
|
854
|
+
readonly views: {
|
|
882
855
|
type: "json";
|
|
883
856
|
optional: false;
|
|
884
857
|
customType: {
|
|
@@ -886,8 +859,6 @@ export declare const marcoZero: {
|
|
|
886
859
|
name: string;
|
|
887
860
|
aliasEmails: string[];
|
|
888
861
|
}[];
|
|
889
|
-
}, "optional"> & {
|
|
890
|
-
optional: true;
|
|
891
862
|
};
|
|
892
863
|
};
|
|
893
864
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -2170,7 +2141,7 @@ export declare const marcoZero: {
|
|
|
2170
2141
|
id: string;
|
|
2171
2142
|
name: string;
|
|
2172
2143
|
aliasEmails: string[];
|
|
2173
|
-
}[]
|
|
2144
|
+
}[];
|
|
2174
2145
|
} & {
|
|
2175
2146
|
readonly accounts: readonly ({
|
|
2176
2147
|
readonly color: string;
|
|
@@ -2251,7 +2222,7 @@ export declare const marcoZero: {
|
|
|
2251
2222
|
} & {
|
|
2252
2223
|
serverName: string;
|
|
2253
2224
|
};
|
|
2254
|
-
readonly views:
|
|
2225
|
+
readonly views: {
|
|
2255
2226
|
type: "json";
|
|
2256
2227
|
optional: false;
|
|
2257
2228
|
customType: {
|
|
@@ -2259,8 +2230,6 @@ export declare const marcoZero: {
|
|
|
2259
2230
|
name: string;
|
|
2260
2231
|
aliasEmails: string[];
|
|
2261
2232
|
}[];
|
|
2262
|
-
}, "optional"> & {
|
|
2263
|
-
optional: true;
|
|
2264
2233
|
};
|
|
2265
2234
|
};
|
|
2266
2235
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -3294,7 +3263,7 @@ export declare const marcoZero: {
|
|
|
3294
3263
|
} & {
|
|
3295
3264
|
serverName: string;
|
|
3296
3265
|
};
|
|
3297
|
-
readonly views:
|
|
3266
|
+
readonly views: {
|
|
3298
3267
|
type: "json";
|
|
3299
3268
|
optional: false;
|
|
3300
3269
|
customType: {
|
|
@@ -3302,8 +3271,6 @@ export declare const marcoZero: {
|
|
|
3302
3271
|
name: string;
|
|
3303
3272
|
aliasEmails: string[];
|
|
3304
3273
|
}[];
|
|
3305
|
-
}, "optional"> & {
|
|
3306
|
-
optional: true;
|
|
3307
3274
|
};
|
|
3308
3275
|
};
|
|
3309
3276
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -5033,7 +5000,7 @@ export declare const marcoZero: {
|
|
|
5033
5000
|
} & {
|
|
5034
5001
|
serverName: string;
|
|
5035
5002
|
};
|
|
5036
|
-
readonly views:
|
|
5003
|
+
readonly views: {
|
|
5037
5004
|
type: "json";
|
|
5038
5005
|
optional: false;
|
|
5039
5006
|
customType: {
|
|
@@ -5041,8 +5008,6 @@ export declare const marcoZero: {
|
|
|
5041
5008
|
name: string;
|
|
5042
5009
|
aliasEmails: string[];
|
|
5043
5010
|
}[];
|
|
5044
|
-
}, "optional"> & {
|
|
5045
|
-
optional: true;
|
|
5046
5011
|
};
|
|
5047
5012
|
};
|
|
5048
5013
|
primaryKey: readonly [string, ...string[]];
|
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"}
|
|
@@ -272,38 +272,11 @@ export declare const mutatorSchemas: {
|
|
|
272
272
|
}, undefined>;
|
|
273
273
|
updateView: v.ObjectSchema<{
|
|
274
274
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
275
|
-
readonly
|
|
275
|
+
readonly view: v.ObjectSchema<{
|
|
276
276
|
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>]>;
|
|
277
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
277
278
|
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>;
|
|
279
|
+
}, undefined>;
|
|
307
280
|
}, undefined>;
|
|
308
281
|
};
|
|
309
282
|
};
|
|
@@ -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
|
|
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"}
|
|
@@ -206,11 +206,7 @@ export const mutatorSchemas = {
|
|
|
206
206
|
}),
|
|
207
207
|
updateView: v.object({
|
|
208
208
|
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(),
|
|
209
|
+
view: userViewSchema,
|
|
214
210
|
}),
|
|
215
211
|
},
|
|
216
212
|
};
|
package/dist/zero/mutators.d.ts
CHANGED
|
@@ -459,18 +459,18 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
459
459
|
}, Context, unknown>;
|
|
460
460
|
readonly updateView: import("@rocicorp/zero").MutatorDefinition<{
|
|
461
461
|
id: string;
|
|
462
|
-
|
|
463
|
-
aliasEmails
|
|
464
|
-
|
|
462
|
+
view: {
|
|
463
|
+
aliasEmails: string[];
|
|
464
|
+
id: string;
|
|
465
|
+
name: string;
|
|
465
466
|
};
|
|
466
|
-
viewId: string;
|
|
467
467
|
}, {
|
|
468
468
|
id: string;
|
|
469
|
-
|
|
470
|
-
aliasEmails
|
|
471
|
-
|
|
469
|
+
view: {
|
|
470
|
+
aliasEmails: string[];
|
|
471
|
+
id: string;
|
|
472
|
+
name: string;
|
|
472
473
|
};
|
|
473
|
-
viewId: string;
|
|
474
474
|
}, Context, unknown>;
|
|
475
475
|
};
|
|
476
476
|
}, {
|
|
@@ -506,7 +506,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
506
506
|
} & {
|
|
507
507
|
serverName: string;
|
|
508
508
|
};
|
|
509
|
-
readonly views:
|
|
509
|
+
readonly views: {
|
|
510
510
|
type: "json";
|
|
511
511
|
optional: false;
|
|
512
512
|
customType: {
|
|
@@ -514,8 +514,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
514
514
|
name: string;
|
|
515
515
|
aliasEmails: string[];
|
|
516
516
|
}[];
|
|
517
|
-
}, "optional"> & {
|
|
518
|
-
optional: true;
|
|
519
517
|
};
|
|
520
518
|
};
|
|
521
519
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -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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Mutator(mutatorSchemas.user.updateView, async ({ tx, args }) => {
|
|
536
536
|
const user = await tx.run(zql.user.where('id', args.id).one());
|
|
537
537
|
if (user) {
|
|
538
|
-
const viewExists = (user.views ?? []).some(x => x.id === args.
|
|
538
|
+
const viewExists = (user.views ?? []).some(x => x.id === args.view.id);
|
|
539
539
|
if (viewExists) {
|
|
540
|
-
const deduplicatedEmails =
|
|
540
|
+
const deduplicatedEmails = [...new Set(args.view.aliasEmails)];
|
|
541
541
|
await tx.mutate.user.update({
|
|
542
542
|
id: args.id,
|
|
543
|
-
views: (user.views ?? []).map(x => x.id === args.
|
|
544
|
-
? { ...x, aliasEmails: deduplicatedEmails ?? x.aliasEmails, name: args.updates.name ?? x.name }
|
|
545
|
-
: x),
|
|
543
|
+
views: (user.views ?? []).map(x => x.id === args.view.id ? { ...args.view, aliasEmails: deduplicatedEmails } : x),
|
|
546
544
|
});
|
|
547
545
|
}
|
|
548
546
|
}
|