@marcoappio/marco-config 2.0.415 → 2.0.417
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/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/marcoPublicConfig.d.ts +9 -1
- package/dist/marcoPublicConfig.d.ts.map +1 -1
- package/dist/marcoPublicConfig.js +12 -0
- package/dist/schemas/app.d.ts +1 -1
- package/dist/schemas/app.d.ts.map +1 -1
- package/dist/schemas/app.js +2 -1
- package/dist/schemas/emailAccount.d.ts +1 -1
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/oauth.d.ts +1 -1
- package/dist/schemas/oauth.d.ts.map +1 -1
- package/dist/schemas/oauth.js +2 -1
- package/dist/sdk/endpoints/index.d.ts +0 -887
- package/dist/sdk/endpoints/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/index.d.ts +0 -887
- package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/index.js +0 -2
- package/dist/sdk/index.d.ts +0 -887
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/types/MarcoPlatform.d.ts +3 -0
- package/dist/types/MarcoPlatform.d.ts.map +1 -0
- package/dist/types/MarcoPlatform.js +1 -0
- package/dist/types/OAuthProvider.d.ts +3 -0
- package/dist/types/OAuthProvider.d.ts.map +1 -0
- package/dist/types/OAuthProvider.js +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/labels/index.d.ts +4 -0
- package/dist/utils/labels/index.d.ts.map +1 -0
- package/dist/utils/labels/index.js +4 -0
- package/dist/zero/index.d.ts +1448 -0
- package/dist/zero/index.d.ts.map +1 -0
- package/dist/zero/index.js +13 -0
- package/dist/{sdk/endpoints/private/sync/push → zero/mutators}/account.d.ts +33 -75
- package/dist/zero/mutators/account.d.ts.map +1 -0
- package/dist/zero/mutators/account.js +69 -0
- package/dist/{sdk/endpoints/private/sync/push → zero/mutators}/draft.d.ts +35 -79
- package/dist/{clients → zero/mutators}/draft.d.ts.map +1 -1
- package/dist/zero/mutators/draft.js +114 -0
- package/dist/{sdk/endpoints/private/sync/push → zero/mutators}/thread.d.ts +32 -76
- package/dist/zero/mutators/thread.d.ts.map +1 -0
- package/dist/zero/mutators/thread.js +76 -0
- package/dist/zero/mutators/user.d.ts +32 -0
- package/dist/zero/mutators/user.d.ts.map +1 -0
- package/dist/zero/mutators/user.js +33 -0
- package/dist/zero/mutators.d.ts +412 -0
- package/dist/zero/mutators.d.ts.map +1 -0
- package/dist/zero/mutators.js +44 -0
- package/dist/zero/mutators.test.d.ts +2 -0
- package/dist/zero/mutators.test.d.ts.map +1 -0
- package/dist/zero/mutators.test.js +33 -0
- package/dist/zero/schema.d.ts +1438 -0
- package/dist/zero/schema.d.ts.map +1 -0
- package/dist/zero/schema.js +430 -0
- package/package.json +2 -1
- package/dist/clients/account.d.ts +0 -144
- package/dist/clients/account.d.ts.map +0 -1
- package/dist/clients/account.js +0 -93
- package/dist/clients/contact.d.ts +0 -14
- package/dist/clients/contact.d.ts.map +0 -1
- package/dist/clients/contact.js +0 -14
- package/dist/clients/draft.d.ts +0 -196
- package/dist/clients/draft.js +0 -122
- package/dist/clients/index.d.ts +0 -526
- package/dist/clients/index.d.ts.map +0 -1
- package/dist/clients/index.js +0 -13
- package/dist/clients/thread.d.ts +0 -125
- package/dist/clients/thread.d.ts.map +0 -1
- package/dist/clients/thread.js +0 -117
- package/dist/clients/user.d.ts +0 -53
- package/dist/clients/user.d.ts.map +0 -1
- package/dist/clients/user.js +0 -52
- package/dist/clients/utils/index.d.ts +0 -4
- package/dist/clients/utils/index.d.ts.map +0 -1
- package/dist/clients/utils/index.js +0 -4
- package/dist/clients/utils/labelSpecialUseOrdering.d.ts +0 -3
- package/dist/clients/utils/labelSpecialUseOrdering.d.ts.map +0 -1
- package/dist/clients/utils/labelSpecialUseOrdering.js +0 -1
- package/dist/sdk/endpoints/private/sync/index.d.ts +0 -888
- package/dist/sdk/endpoints/private/sync/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/index.js +0 -3
- package/dist/sdk/endpoints/private/sync/pull/account.d.ts +0 -71
- package/dist/sdk/endpoints/private/sync/pull/account.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/account.js +0 -33
- package/dist/sdk/endpoints/private/sync/pull/contact.d.ts +0 -56
- package/dist/sdk/endpoints/private/sync/pull/contact.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/contact.js +0 -40
- package/dist/sdk/endpoints/private/sync/pull/draft.d.ts +0 -72
- package/dist/sdk/endpoints/private/sync/pull/draft.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/draft.js +0 -36
- package/dist/sdk/endpoints/private/sync/pull/index.d.ts +0 -349
- package/dist/sdk/endpoints/private/sync/pull/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/index.js +0 -6
- package/dist/sdk/endpoints/private/sync/pull/thread.d.ts +0 -100
- package/dist/sdk/endpoints/private/sync/pull/thread.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/thread.js +0 -45
- package/dist/sdk/endpoints/private/sync/pull/user.d.ts +0 -57
- package/dist/sdk/endpoints/private/sync/pull/user.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/user.js +0 -33
- package/dist/sdk/endpoints/private/sync/push/account.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/account.js +0 -73
- package/dist/sdk/endpoints/private/sync/push/draft.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/draft.js +0 -79
- package/dist/sdk/endpoints/private/sync/push/index.d.ts +0 -538
- package/dist/sdk/endpoints/private/sync/push/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/index.js +0 -5
- package/dist/sdk/endpoints/private/sync/push/thread.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/thread.js +0 -79
- package/dist/sdk/endpoints/private/sync/push/user.d.ts +0 -64
- package/dist/sdk/endpoints/private/sync/push/user.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/user.js +0 -43
- package/dist/types/MarcoClient.d.ts +0 -12
- package/dist/types/MarcoClient.d.ts.map +0 -1
- package/dist/types/MarcoClient.js +0 -1
- package/dist/types/WS.d.ts +0 -7
- package/dist/types/WS.d.ts.map +0 -1
- package/dist/types/WS.js +0 -1
- package/dist/ws.d.ts +0 -6
- package/dist/ws.d.ts.map +0 -1
- package/dist/ws.js +0 -5
|
@@ -1,122 +1,78 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
export declare const
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
readonly args: v.ObjectSchema<{
|
|
2
|
+
export declare const threadMutatorDefinitions: {
|
|
3
|
+
readonly addLabel: {
|
|
4
|
+
readonly delta: v.ObjectSchema<{
|
|
6
5
|
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
6
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
8
7
|
}, undefined>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
}, undefined> | v.ObjectSchema<{
|
|
13
|
-
readonly args: v.UnionSchema<[v.ObjectSchema<{
|
|
8
|
+
};
|
|
9
|
+
readonly delete: {
|
|
10
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
14
11
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
15
12
|
}, undefined>, v.ObjectSchema<{
|
|
16
13
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
17
14
|
}, undefined>], undefined>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly
|
|
21
|
-
}, undefined> | v.ObjectSchema<{
|
|
22
|
-
readonly args: v.ObjectSchema<{
|
|
15
|
+
};
|
|
16
|
+
readonly removeLabel: {
|
|
17
|
+
readonly delta: v.ObjectSchema<{
|
|
23
18
|
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
24
19
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
25
20
|
}, undefined>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly
|
|
29
|
-
}, undefined> | v.ObjectSchema<{
|
|
30
|
-
readonly args: v.UnionSchema<readonly [v.ObjectSchema<{
|
|
21
|
+
};
|
|
22
|
+
readonly requestAttachmentDownload: {
|
|
23
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
31
24
|
readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
32
25
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
26
|
}, undefined>, v.ObjectSchema<{
|
|
34
27
|
readonly attachmentIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
35
28
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
36
29
|
}, undefined>], undefined>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
readonly
|
|
40
|
-
}, undefined> | v.ObjectSchema<{
|
|
41
|
-
readonly args: v.UnionSchema<[v.ObjectSchema<{
|
|
30
|
+
};
|
|
31
|
+
readonly setArchive: {
|
|
32
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
42
33
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
43
34
|
}, undefined>, v.ObjectSchema<{
|
|
44
35
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
45
36
|
}, undefined>], undefined>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
readonly
|
|
49
|
-
}, undefined> | v.ObjectSchema<{
|
|
50
|
-
readonly args: v.UnionSchema<readonly [v.ObjectSchema<{
|
|
37
|
+
};
|
|
38
|
+
readonly setFlagged: {
|
|
39
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
51
40
|
readonly flagged: v.NonOptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
52
41
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
53
42
|
}, undefined>, v.ObjectSchema<{
|
|
54
43
|
readonly flagged: v.NonOptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
55
44
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
56
45
|
}, undefined>], undefined>;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
readonly
|
|
60
|
-
}, undefined> | v.ObjectSchema<{
|
|
61
|
-
readonly args: v.UnionSchema<[v.ObjectSchema<{
|
|
46
|
+
};
|
|
47
|
+
readonly setInbox: {
|
|
48
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
62
49
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
63
50
|
}, undefined>, v.ObjectSchema<{
|
|
64
51
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
65
52
|
}, undefined>], undefined>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
readonly
|
|
69
|
-
}, undefined> | v.ObjectSchema<{
|
|
70
|
-
readonly args: v.UnionSchema<readonly [v.ObjectSchema<{
|
|
53
|
+
};
|
|
54
|
+
readonly setSeen: {
|
|
55
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
71
56
|
readonly seen: v.BooleanSchema<undefined>;
|
|
72
57
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
73
58
|
}, undefined>, v.ObjectSchema<{
|
|
74
59
|
readonly seen: v.BooleanSchema<undefined>;
|
|
75
60
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
76
61
|
}, undefined>], undefined>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
readonly
|
|
80
|
-
}, undefined> | v.ObjectSchema<{
|
|
81
|
-
readonly args: v.UnionSchema<[v.ObjectSchema<{
|
|
62
|
+
};
|
|
63
|
+
readonly setSpam: {
|
|
64
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
82
65
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
83
66
|
}, undefined>, v.ObjectSchema<{
|
|
84
67
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
85
68
|
}, undefined>], undefined>;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
readonly
|
|
89
|
-
}, undefined> | v.ObjectSchema<{
|
|
90
|
-
readonly args: v.UnionSchema<[v.ObjectSchema<{
|
|
69
|
+
};
|
|
70
|
+
readonly setTrash: {
|
|
71
|
+
readonly delta: v.UnionSchema<[v.ObjectSchema<{
|
|
91
72
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
92
73
|
}, undefined>, v.ObjectSchema<{
|
|
93
74
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
94
75
|
}, undefined>], undefined>;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
readonly name: v.LiteralSchema<"setTrash", undefined>;
|
|
98
|
-
}, undefined>)[], undefined>, undefined>;
|
|
99
|
-
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
|
|
100
|
-
readonly data: v.ObjectSchema<{
|
|
101
|
-
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
102
|
-
readonly issues: v.ObjectSchema<{
|
|
103
|
-
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
104
|
-
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
105
|
-
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
106
|
-
}, undefined>;
|
|
107
|
-
}, undefined>;
|
|
108
|
-
readonly status: v.LiteralSchema<400, undefined>;
|
|
109
|
-
}, undefined>, v.ObjectSchema<{
|
|
110
|
-
readonly data: v.ObjectSchema<{
|
|
111
|
-
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
112
|
-
}, undefined>;
|
|
113
|
-
readonly status: v.LiteralSchema<401, undefined>;
|
|
114
|
-
}, undefined>, v.ObjectSchema<{
|
|
115
|
-
readonly data: v.ObjectSchema<{
|
|
116
|
-
readonly code: v.LiteralSchema<"MUTATION_REJECTED", undefined>;
|
|
117
|
-
}, undefined>;
|
|
118
|
-
readonly status: v.LiteralSchema<409, undefined>;
|
|
119
|
-
}, undefined>, v.ObjectSchema<{
|
|
120
|
-
readonly status: v.LiteralSchema<200, undefined>;
|
|
121
|
-
}, undefined>], undefined>>;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
122
78
|
//# sourceMappingURL=thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAmD5B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B3B,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../../schemas';
|
|
3
|
+
const threadIdOrIdsSchema = v.union([
|
|
4
|
+
v.object({
|
|
5
|
+
threadId: marcoSchemas.string.required(),
|
|
6
|
+
}),
|
|
7
|
+
v.object({
|
|
8
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
9
|
+
}),
|
|
10
|
+
]);
|
|
11
|
+
const threadAddRemoveLabelSchema = v.object({
|
|
12
|
+
labelPath: marcoSchemas.string.required(),
|
|
13
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
14
|
+
});
|
|
15
|
+
const threadRequestAttachmentSchema = v.union([
|
|
16
|
+
v.object({
|
|
17
|
+
attachmentId: marcoSchemas.string.required(),
|
|
18
|
+
threadId: marcoSchemas.string.required(),
|
|
19
|
+
}),
|
|
20
|
+
v.object({
|
|
21
|
+
attachmentIds: v.array(marcoSchemas.string.required()),
|
|
22
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
23
|
+
}),
|
|
24
|
+
]);
|
|
25
|
+
const threadSetFlaggedSchema = v.union([
|
|
26
|
+
v.object({
|
|
27
|
+
flagged: v.nonOptional(v.boolean()),
|
|
28
|
+
threadId: marcoSchemas.string.required(),
|
|
29
|
+
}),
|
|
30
|
+
v.object({
|
|
31
|
+
flagged: v.nonOptional(v.boolean()),
|
|
32
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
const threadSetSeenSchema = v.union([
|
|
36
|
+
v.object({
|
|
37
|
+
seen: v.boolean(),
|
|
38
|
+
threadId: marcoSchemas.string.required(),
|
|
39
|
+
}),
|
|
40
|
+
v.object({
|
|
41
|
+
seen: v.boolean(),
|
|
42
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
45
|
+
export const threadMutatorDefinitions = {
|
|
46
|
+
addLabel: {
|
|
47
|
+
delta: threadAddRemoveLabelSchema,
|
|
48
|
+
},
|
|
49
|
+
delete: {
|
|
50
|
+
delta: threadIdOrIdsSchema,
|
|
51
|
+
},
|
|
52
|
+
removeLabel: {
|
|
53
|
+
delta: threadAddRemoveLabelSchema,
|
|
54
|
+
},
|
|
55
|
+
requestAttachmentDownload: {
|
|
56
|
+
delta: threadRequestAttachmentSchema,
|
|
57
|
+
},
|
|
58
|
+
setArchive: {
|
|
59
|
+
delta: threadIdOrIdsSchema,
|
|
60
|
+
},
|
|
61
|
+
setFlagged: {
|
|
62
|
+
delta: threadSetFlaggedSchema,
|
|
63
|
+
},
|
|
64
|
+
setInbox: {
|
|
65
|
+
delta: threadIdOrIdsSchema,
|
|
66
|
+
},
|
|
67
|
+
setSeen: {
|
|
68
|
+
delta: threadSetSeenSchema,
|
|
69
|
+
},
|
|
70
|
+
setSpam: {
|
|
71
|
+
delta: threadIdOrIdsSchema,
|
|
72
|
+
},
|
|
73
|
+
setTrash: {
|
|
74
|
+
delta: threadIdOrIdsSchema,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const userMutatorDefinitions: {
|
|
3
|
+
readonly deleteSettingsPushNotificationToken: {
|
|
4
|
+
readonly delta: v.ObjectSchema<{
|
|
5
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
};
|
|
9
|
+
readonly deleteSettingsPushNotificationTokenForDevice: {
|
|
10
|
+
readonly delta: v.ObjectSchema<{
|
|
11
|
+
readonly deviceId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
12
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
};
|
|
15
|
+
readonly setSettingsName: {
|
|
16
|
+
readonly delta: v.ObjectSchema<{
|
|
17
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
18
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
19
|
+
}, undefined>;
|
|
20
|
+
};
|
|
21
|
+
readonly setSettingsPushNotificationToken: {
|
|
22
|
+
readonly delta: v.ObjectSchema<{
|
|
23
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
24
|
+
readonly pushNotificationToken: v.ObjectSchema<{
|
|
25
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
26
|
+
readonly deviceId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
27
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBzB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../../schemas';
|
|
3
|
+
const userPushNotificationTokenSchema = v.object({
|
|
4
|
+
createdAt: marcoSchemas.number.positiveInteger(),
|
|
5
|
+
deviceId: marcoSchemas.string.required(),
|
|
6
|
+
token: marcoSchemas.string.required(),
|
|
7
|
+
});
|
|
8
|
+
export const userMutatorDefinitions = {
|
|
9
|
+
deleteSettingsPushNotificationToken: {
|
|
10
|
+
delta: v.object({
|
|
11
|
+
id: marcoSchemas.string.required(),
|
|
12
|
+
token: marcoSchemas.string.required(),
|
|
13
|
+
}),
|
|
14
|
+
},
|
|
15
|
+
deleteSettingsPushNotificationTokenForDevice: {
|
|
16
|
+
delta: v.object({
|
|
17
|
+
deviceId: marcoSchemas.string.required(),
|
|
18
|
+
id: marcoSchemas.string.required(),
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
setSettingsName: {
|
|
22
|
+
delta: v.object({
|
|
23
|
+
id: marcoSchemas.string.required(),
|
|
24
|
+
name: marcoSchemas.string.nullable(),
|
|
25
|
+
}),
|
|
26
|
+
},
|
|
27
|
+
setSettingsPushNotificationToken: {
|
|
28
|
+
delta: v.object({
|
|
29
|
+
id: marcoSchemas.string.required(),
|
|
30
|
+
pushNotificationToken: userPushNotificationTokenSchema,
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
};
|