@marcoappio/marco-config 2.0.535 → 2.0.536
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
|
@@ -2139,7 +2139,15 @@ export declare const marcoZero: {
|
|
|
2139
2139
|
}, {
|
|
2140
2140
|
userId: string;
|
|
2141
2141
|
}>;
|
|
2142
|
-
readonly getUser: import("@rocicorp/zero").QueryDefinition<"user",
|
|
2142
|
+
readonly getUser: import("@rocicorp/zero").QueryDefinition<"user", {
|
|
2143
|
+
aliasesLimit?: number | undefined;
|
|
2144
|
+
labelsLimit?: number | undefined;
|
|
2145
|
+
pushNotificationTokensLimit?: number | undefined;
|
|
2146
|
+
} | undefined, {
|
|
2147
|
+
aliasesLimit: number;
|
|
2148
|
+
labelsLimit: number;
|
|
2149
|
+
pushNotificationTokensLimit: number;
|
|
2150
|
+
}, {
|
|
2143
2151
|
readonly id: string;
|
|
2144
2152
|
readonly name: string | null;
|
|
2145
2153
|
readonly profilePicture: string | null;
|
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"}
|
package/dist/zero/queries.d.ts
CHANGED
|
@@ -262,7 +262,15 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
262
262
|
})[];
|
|
263
263
|
}) | undefined;
|
|
264
264
|
}, Context>;
|
|
265
|
-
readonly getUser: import("@rocicorp/zero").QueryDefinition<"user",
|
|
265
|
+
readonly getUser: import("@rocicorp/zero").QueryDefinition<"user", {
|
|
266
|
+
aliasesLimit?: number | undefined;
|
|
267
|
+
labelsLimit?: number | undefined;
|
|
268
|
+
pushNotificationTokensLimit?: number | undefined;
|
|
269
|
+
} | undefined, {
|
|
270
|
+
aliasesLimit: number;
|
|
271
|
+
labelsLimit: number;
|
|
272
|
+
pushNotificationTokensLimit: number;
|
|
273
|
+
}, {
|
|
266
274
|
readonly id: string;
|
|
267
275
|
readonly name: string | null;
|
|
268
276
|
readonly profilePicture: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/zero/queries.ts"],"names":[],"mappings":"AAOA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/zero/queries.ts"],"names":[],"mappings":"AAOA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAOjC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkPlB,CAAA"}
|
package/dist/zero/queries.js
CHANGED
|
@@ -5,11 +5,10 @@ import { threadsUtils } from '../utils/threads';
|
|
|
5
5
|
import { schema } from '../zero/schema';
|
|
6
6
|
const zql = createBuilder(schema);
|
|
7
7
|
const defineQuery = defineQueryWithType();
|
|
8
|
-
const MAX_LIMIT = 1000;
|
|
9
8
|
const DEFAULT_LIMIT = 50;
|
|
10
9
|
export const queries = defineQueries({
|
|
11
10
|
getContacts: defineQuery(v.object({
|
|
12
|
-
limit: v.optional(v.pipe(v.number(), v.minValue(0)
|
|
11
|
+
limit: v.optional(v.pipe(v.number(), v.minValue(0)), DEFAULT_LIMIT),
|
|
13
12
|
search: v.optional(v.string()),
|
|
14
13
|
where: v.optional(v.object({
|
|
15
14
|
emailAddress: v.optional(v.string()),
|
|
@@ -38,7 +37,7 @@ export const queries = defineQueries({
|
|
|
38
37
|
}),
|
|
39
38
|
getDrafts: defineQuery(v.object({
|
|
40
39
|
accountId: v.optional(v.string()),
|
|
41
|
-
limit: v.optional(v.pipe(v.number(), v.minValue(0)
|
|
40
|
+
limit: v.optional(v.pipe(v.number(), v.minValue(0)), DEFAULT_LIMIT),
|
|
42
41
|
status: v.optional(v.picklist(DRAFT_STATUSES)),
|
|
43
42
|
}), ({ ctx, args: { status, accountId, limit } }) => {
|
|
44
43
|
let query = zql.draft.where('userId', ctx.userId).related('attachments').orderBy('updatedAt', 'desc');
|
|
@@ -65,7 +64,7 @@ export const queries = defineQueries({
|
|
|
65
64
|
.one()),
|
|
66
65
|
getThreadList: defineQuery(v.object({
|
|
67
66
|
labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
|
|
68
|
-
limit: v.optional(v.pipe(v.number(), v.minValue(0)
|
|
67
|
+
limit: v.optional(v.pipe(v.number(), v.minValue(0)), DEFAULT_LIMIT),
|
|
69
68
|
search: v.optional(v.string()),
|
|
70
69
|
where: v.optional(v.object({
|
|
71
70
|
flagged: v.optional(v.boolean()),
|
|
@@ -112,7 +111,7 @@ export const queries = defineQueries({
|
|
|
112
111
|
}),
|
|
113
112
|
getThreads: defineQuery(v.object({
|
|
114
113
|
labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
|
|
115
|
-
limit: v.optional(v.pipe(v.number(), v.minValue(0)
|
|
114
|
+
limit: v.optional(v.pipe(v.number(), v.minValue(0)), DEFAULT_LIMIT),
|
|
116
115
|
search: v.optional(v.string()),
|
|
117
116
|
where: v.optional(v.object({
|
|
118
117
|
flagged: v.optional(v.boolean()),
|
|
@@ -159,9 +158,16 @@ export const queries = defineQueries({
|
|
|
159
158
|
});
|
|
160
159
|
return query;
|
|
161
160
|
}),
|
|
162
|
-
getUser: defineQuery(({
|
|
161
|
+
getUser: defineQuery(v.optional(v.object({
|
|
162
|
+
aliasesLimit: v.optional(v.pipe(v.number(), v.minValue(0)), 100),
|
|
163
|
+
labelsLimit: v.optional(v.pipe(v.number(), v.minValue(0)), 100),
|
|
164
|
+
pushNotificationTokensLimit: v.optional(v.pipe(v.number(), v.minValue(0)), 100),
|
|
165
|
+
}), { aliasesLimit: 100, labelsLimit: 100, pushNotificationTokensLimit: 100 }), ({ ctx, args: { aliasesLimit, labelsLimit, pushNotificationTokensLimit } }) => zql.user
|
|
163
166
|
.where('id', ctx.userId)
|
|
164
167
|
.limit(1)
|
|
165
|
-
.related('accounts', x => x
|
|
166
|
-
.related('
|
|
168
|
+
.related('accounts', x => x
|
|
169
|
+
.related('aliases', a => a.limit(aliasesLimit))
|
|
170
|
+
.related('primaryAlias')
|
|
171
|
+
.related('labels', l => l.limit(labelsLimit)))
|
|
172
|
+
.related('pushNotificationTokens', t => t.limit(pushNotificationTokensLimit))),
|
|
167
173
|
});
|