@marcoappio/marco-config 2.0.331 → 2.0.333
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/clients/account.js +1 -1
- package/dist/schemas/app.d.ts +5 -0
- package/dist/schemas/app.d.ts.map +1 -0
- package/dist/schemas/app.js +8 -0
- package/dist/schemas/drafts.d.ts +16 -0
- package/dist/schemas/drafts.d.ts.map +1 -0
- package/dist/schemas/drafts.js +15 -0
- package/dist/schemas/emailAccount.d.ts +17 -0
- package/dist/schemas/emailAccount.d.ts.map +1 -0
- package/dist/schemas/emailAccount.js +27 -0
- package/dist/schemas/index.d.ts +43 -34
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +15 -63
- package/dist/schemas/labels.d.ts +5 -0
- package/dist/schemas/labels.d.ts.map +1 -0
- package/dist/schemas/labels.js +10 -0
- package/dist/schemas/number.d.ts +6 -0
- package/dist/schemas/number.d.ts.map +1 -0
- package/dist/schemas/number.js +5 -0
- package/dist/schemas/oauth.d.ts +5 -0
- package/dist/schemas/oauth.d.ts.map +1 -0
- package/dist/schemas/oauth.js +7 -0
- package/dist/schemas/pushNotifications.d.ts +11 -0
- package/dist/schemas/pushNotifications.d.ts.map +1 -0
- package/dist/schemas/pushNotifications.js +15 -0
- package/dist/types/MarcoClient.d.ts +1 -1
- package/dist/types/MarcoClient.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/clients/account.js
CHANGED
|
@@ -26,7 +26,7 @@ export const account = {
|
|
|
26
26
|
}),
|
|
27
27
|
name: marcoSchemas.string.required(),
|
|
28
28
|
path: marcoSchemas.string.required(),
|
|
29
|
-
specialUse: v.nullable(marcoSchemas.
|
|
29
|
+
specialUse: v.nullable(marcoSchemas.labels.specialUse()),
|
|
30
30
|
})),
|
|
31
31
|
settings: accountSettingsSchema,
|
|
32
32
|
}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/schemas/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,GAAG;;CAMf,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const drafts: {
|
|
3
|
+
contentPatch: {
|
|
4
|
+
instruction: () => v.ObjectSchema<{
|
|
5
|
+
readonly index: v.NumberSchema<undefined>;
|
|
6
|
+
readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
|
|
7
|
+
readonly value: v.StringSchema<undefined>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
patch: () => v.ArraySchema<v.ObjectSchema<{
|
|
10
|
+
readonly index: v.NumberSchema<undefined>;
|
|
11
|
+
readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
|
|
12
|
+
readonly value: v.StringSchema<undefined>;
|
|
13
|
+
}, undefined>, undefined>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=drafts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../../src/schemas/drafts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAW5B,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAKlB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
const patchInstructionSchema = v.object({
|
|
3
|
+
index: v.number(),
|
|
4
|
+
type: v.union([
|
|
5
|
+
v.literal('INSERTION'),
|
|
6
|
+
v.literal('DELETION'),
|
|
7
|
+
]),
|
|
8
|
+
value: v.string(),
|
|
9
|
+
});
|
|
10
|
+
export const drafts = {
|
|
11
|
+
contentPatch: {
|
|
12
|
+
instruction: () => patchInstructionSchema,
|
|
13
|
+
patch: () => v.array(patchInstructionSchema),
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const emailAccount: {
|
|
3
|
+
connectionConfigImapRaw: () => v.ObjectSchema<{
|
|
4
|
+
readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
5
|
+
readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly imapPort: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
7
|
+
readonly smtpHost: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
8
|
+
readonly smtpPassword: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
|
+
readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
10
|
+
}, undefined>;
|
|
11
|
+
connectionConfigOauth: () => v.ObjectSchema<{
|
|
12
|
+
readonly code: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
|
+
readonly provider: v.UnionSchema<[v.LiteralSchema<"GOOGLE", undefined>, v.LiteralSchema<"OUTLOOK", undefined>], undefined>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
imapConnectionStatus: () => v.UnionSchema<[v.LiteralSchema<"AWAITING_CONNECTION", undefined>, v.LiteralSchema<"CONNECTED", undefined>, v.LiteralSchema<"CONNECTION_FAILED_CONNECTION_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_OAUTH_GOOGLE_EXCHANGE_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_AUTHENTICATION_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_UNKNOWN_ERROR", undefined>], undefined>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=emailAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailAccount.d.ts","sourceRoot":"","sources":["../../src/schemas/emailAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAsBxB,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { number } from './number';
|
|
3
|
+
import { oauth } from './oauth';
|
|
4
|
+
import { string } from './string';
|
|
5
|
+
export const emailAccount = {
|
|
6
|
+
connectionConfigImapRaw: () => v.object({
|
|
7
|
+
imapHost: string.required(),
|
|
8
|
+
imapPassword: string.required(),
|
|
9
|
+
imapPort: number.minMax(1, 65535),
|
|
10
|
+
smtpHost: string.required(),
|
|
11
|
+
smtpPassword: string.required(),
|
|
12
|
+
smtpPort: number.minMax(1, 65535),
|
|
13
|
+
}),
|
|
14
|
+
connectionConfigOauth: () => v.object({
|
|
15
|
+
code: string.required(),
|
|
16
|
+
provider: oauth.provider(),
|
|
17
|
+
}),
|
|
18
|
+
imapConnectionStatus: () => v.union([
|
|
19
|
+
v.literal('AWAITING_CONNECTION'),
|
|
20
|
+
v.literal('CONNECTED'),
|
|
21
|
+
v.literal('CONNECTION_FAILED_CONNECTION_ERROR'),
|
|
22
|
+
v.literal('CONNECTION_FAILED_OAUTH_GOOGLE_EXCHANGE_ERROR'), // TODO: Deprecate this
|
|
23
|
+
v.literal('CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR'),
|
|
24
|
+
v.literal('CONNECTION_FAILED_AUTHENTICATION_ERROR'),
|
|
25
|
+
v.literal('CONNECTION_FAILED_UNKNOWN_ERROR'),
|
|
26
|
+
]),
|
|
27
|
+
};
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,55 +1,64 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
1
|
export declare const marcoSchemas: {
|
|
3
2
|
app: {
|
|
4
|
-
platform: () =>
|
|
3
|
+
platform: () => import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ios", undefined>, import("valibot").LiteralSchema<"osx", undefined>, import("valibot").LiteralSchema<"web", undefined>], undefined>;
|
|
5
4
|
};
|
|
6
5
|
drafts: {
|
|
7
6
|
contentPatch: {
|
|
8
|
-
instruction: () =>
|
|
9
|
-
readonly index:
|
|
10
|
-
readonly type:
|
|
11
|
-
readonly value:
|
|
7
|
+
instruction: () => import("valibot").ObjectSchema<{
|
|
8
|
+
readonly index: import("valibot").NumberSchema<undefined>;
|
|
9
|
+
readonly type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"INSERTION", undefined>, import("valibot").LiteralSchema<"DELETION", undefined>], undefined>;
|
|
10
|
+
readonly value: import("valibot").StringSchema<undefined>;
|
|
12
11
|
}, undefined>;
|
|
13
|
-
patch: () =>
|
|
14
|
-
readonly index:
|
|
15
|
-
readonly type:
|
|
16
|
-
readonly value:
|
|
12
|
+
patch: () => import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
13
|
+
readonly index: import("valibot").NumberSchema<undefined>;
|
|
14
|
+
readonly type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"INSERTION", undefined>, import("valibot").LiteralSchema<"DELETION", undefined>], undefined>;
|
|
15
|
+
readonly value: import("valibot").StringSchema<undefined>;
|
|
17
16
|
}, undefined>, undefined>;
|
|
18
17
|
};
|
|
19
18
|
};
|
|
20
19
|
emailAccount: {
|
|
21
|
-
connectionConfigImapRaw: () =>
|
|
22
|
-
readonly imapHost:
|
|
23
|
-
readonly imapPassword:
|
|
24
|
-
readonly imapPort:
|
|
25
|
-
readonly smtpHost:
|
|
26
|
-
readonly smtpPassword:
|
|
27
|
-
readonly smtpPort:
|
|
20
|
+
connectionConfigImapRaw: () => import("valibot").ObjectSchema<{
|
|
21
|
+
readonly imapHost: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
22
|
+
readonly imapPassword: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
+
readonly imapPort: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, number, undefined>, import("valibot").MaxValueAction<number, number, undefined>]>, undefined>;
|
|
24
|
+
readonly smtpHost: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
25
|
+
readonly smtpPassword: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
26
|
+
readonly smtpPort: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, number, undefined>, import("valibot").MaxValueAction<number, number, undefined>]>, undefined>;
|
|
28
27
|
}, undefined>;
|
|
29
|
-
connectionConfigOauth: () =>
|
|
30
|
-
readonly code:
|
|
31
|
-
readonly provider:
|
|
28
|
+
connectionConfigOauth: () => import("valibot").ObjectSchema<{
|
|
29
|
+
readonly code: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
|
+
readonly provider: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"GOOGLE", undefined>, import("valibot").LiteralSchema<"OUTLOOK", undefined>], undefined>;
|
|
32
31
|
}, undefined>;
|
|
33
|
-
imapConnectionStatus: () =>
|
|
32
|
+
imapConnectionStatus: () => import("valibot").UnionSchema<[import("valibot").LiteralSchema<"AWAITING_CONNECTION", undefined>, import("valibot").LiteralSchema<"CONNECTED", undefined>, import("valibot").LiteralSchema<"CONNECTION_FAILED_CONNECTION_ERROR", undefined>, import("valibot").LiteralSchema<"CONNECTION_FAILED_OAUTH_GOOGLE_EXCHANGE_ERROR", undefined>, import("valibot").LiteralSchema<"CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", undefined>, import("valibot").LiteralSchema<"CONNECTION_FAILED_AUTHENTICATION_ERROR", undefined>, import("valibot").LiteralSchema<"CONNECTION_FAILED_UNKNOWN_ERROR", undefined>], undefined>;
|
|
33
|
+
};
|
|
34
|
+
labels: {
|
|
35
|
+
specialUse: () => import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ARCHIVE", undefined>, import("valibot").LiteralSchema<"INBOX", undefined>, import("valibot").LiteralSchema<"SENT", undefined>, import("valibot").LiteralSchema<"SPAM", undefined>, import("valibot").LiteralSchema<"TRASH", undefined>], undefined>;
|
|
34
36
|
};
|
|
35
|
-
labelSpecialUse: () => v.UnionSchema<[v.LiteralSchema<"ARCHIVE", undefined>, v.LiteralSchema<"INBOX", undefined>, v.LiteralSchema<"SENT", undefined>, v.LiteralSchema<"SPAM", undefined>, v.LiteralSchema<"TRASH", undefined>], undefined>;
|
|
36
37
|
number: {
|
|
37
|
-
minMax: (min: number, max: number) =>
|
|
38
|
-
positiveInteger: () =>
|
|
38
|
+
minMax: (min: number, max: number) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, number, undefined>, import("valibot").MaxValueAction<number, number, undefined>]>, undefined>;
|
|
39
|
+
positiveInteger: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
|
|
39
40
|
};
|
|
40
41
|
oauth: {
|
|
41
|
-
provider: () =>
|
|
42
|
+
provider: () => import("valibot").UnionSchema<[import("valibot").LiteralSchema<"GOOGLE", undefined>, import("valibot").LiteralSchema<"OUTLOOK", undefined>], undefined>;
|
|
43
|
+
};
|
|
44
|
+
pushNotifications: {
|
|
45
|
+
payload: import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
46
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
47
|
+
readonly messageId: import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
|
|
48
|
+
readonly threadId: import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
|
|
49
|
+
}, undefined>;
|
|
50
|
+
readonly event: import("valibot").LiteralSchema<"EMAIL_RECEIVED", undefined>;
|
|
51
|
+
}, undefined>], undefined>;
|
|
42
52
|
};
|
|
43
53
|
string: {
|
|
44
|
-
email: () =>
|
|
45
|
-
enum: (values: Record<string, string>) =>
|
|
46
|
-
matches: (regex: RegExp) =>
|
|
47
|
-
nullable: (maxLength?: number) =>
|
|
48
|
-
optional: (maxLength?: number) =>
|
|
49
|
-
required: (maxLength?: number) =>
|
|
50
|
-
shortUUID: () =>
|
|
51
|
-
uuid: () =>
|
|
54
|
+
email: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
|
|
55
|
+
enum: (values: Record<string, string>) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EnumSchema<Record<string, string>, undefined>]>, undefined>;
|
|
56
|
+
matches: (regex: RegExp) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, undefined>]>, undefined>;
|
|
57
|
+
nullable: (maxLength?: number) => import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
58
|
+
optional: (maxLength?: number) => import("valibot").UndefinedableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
59
|
+
required: (maxLength?: number) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
60
|
+
shortUUID: () => import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
|
|
61
|
+
uuid: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
|
|
52
62
|
};
|
|
53
63
|
};
|
|
54
|
-
export type LabelSpecialUse = v.InferInput<ReturnType<typeof marcoSchemas.labelSpecialUse>>;
|
|
55
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASxB,CAAA"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,66 +1,18 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
1
|
import { string } from '../schemas/string';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
2
|
+
import { app } from './app';
|
|
3
|
+
import { drafts } from './drafts';
|
|
4
|
+
import { emailAccount } from './emailAccount';
|
|
5
|
+
import { labels } from './labels';
|
|
6
|
+
import { number } from './number';
|
|
7
|
+
import { oauth } from './oauth';
|
|
8
|
+
import { pushNotifications } from './pushNotifications';
|
|
11
9
|
export const marcoSchemas = {
|
|
12
|
-
app
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
contentPatch: {
|
|
21
|
-
instruction: () => patchInstructionSchema,
|
|
22
|
-
patch: () => v.array(patchInstructionSchema),
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
emailAccount: {
|
|
26
|
-
connectionConfigImapRaw: () => v.object({
|
|
27
|
-
imapHost: marcoSchemas.string.required(),
|
|
28
|
-
imapPassword: marcoSchemas.string.required(),
|
|
29
|
-
imapPort: marcoSchemas.number.minMax(1, 65535),
|
|
30
|
-
smtpHost: marcoSchemas.string.required(),
|
|
31
|
-
smtpPassword: marcoSchemas.string.required(),
|
|
32
|
-
smtpPort: marcoSchemas.number.minMax(1, 65535),
|
|
33
|
-
}),
|
|
34
|
-
connectionConfigOauth: () => v.object({
|
|
35
|
-
code: marcoSchemas.string.required(),
|
|
36
|
-
provider: marcoSchemas.oauth.provider(),
|
|
37
|
-
}),
|
|
38
|
-
imapConnectionStatus: () => v.union([
|
|
39
|
-
v.literal('AWAITING_CONNECTION'),
|
|
40
|
-
v.literal('CONNECTED'),
|
|
41
|
-
v.literal('CONNECTION_FAILED_CONNECTION_ERROR'),
|
|
42
|
-
v.literal('CONNECTION_FAILED_OAUTH_GOOGLE_EXCHANGE_ERROR'), // TODO: Deprecate this
|
|
43
|
-
v.literal('CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR'),
|
|
44
|
-
v.literal('CONNECTION_FAILED_AUTHENTICATION_ERROR'),
|
|
45
|
-
v.literal('CONNECTION_FAILED_UNKNOWN_ERROR'),
|
|
46
|
-
]),
|
|
47
|
-
},
|
|
48
|
-
labelSpecialUse: () => v.union([
|
|
49
|
-
v.literal('ARCHIVE'),
|
|
50
|
-
v.literal('INBOX'),
|
|
51
|
-
v.literal('SENT'),
|
|
52
|
-
v.literal('SPAM'),
|
|
53
|
-
v.literal('TRASH'),
|
|
54
|
-
]),
|
|
55
|
-
number: {
|
|
56
|
-
minMax: (min, max) => v.nonOptional(v.pipe(v.number(), v.minValue(min), v.maxValue(max))),
|
|
57
|
-
positiveInteger: () => v.nonOptional(v.pipe(v.number(), v.integer(), v.minValue(0))),
|
|
58
|
-
},
|
|
59
|
-
oauth: {
|
|
60
|
-
provider: () => v.union([
|
|
61
|
-
v.literal('GOOGLE'),
|
|
62
|
-
v.literal('OUTLOOK'),
|
|
63
|
-
]),
|
|
64
|
-
},
|
|
65
|
-
string: string,
|
|
10
|
+
app,
|
|
11
|
+
drafts,
|
|
12
|
+
emailAccount,
|
|
13
|
+
labels,
|
|
14
|
+
number,
|
|
15
|
+
oauth,
|
|
16
|
+
pushNotifications,
|
|
17
|
+
string,
|
|
66
18
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const labels: {
|
|
3
|
+
specialUse: () => v.UnionSchema<[v.LiteralSchema<"ARCHIVE", undefined>, v.LiteralSchema<"INBOX", undefined>, v.LiteralSchema<"SENT", undefined>, v.LiteralSchema<"SPAM", undefined>, v.LiteralSchema<"TRASH", undefined>], undefined>;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/schemas/labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,MAAM;;CAQlB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const number: {
|
|
3
|
+
minMax: (min: number, max: number) => v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
4
|
+
positiveInteger: () => v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/schemas/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,MAAM;kBACH,MAAM,OAAO,MAAM;;CAIlC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/schemas/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,KAAK;;CAKjB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const pushNotifications: {
|
|
3
|
+
payload: v.UnionSchema<[v.ObjectSchema<{
|
|
4
|
+
readonly data: v.ObjectSchema<{
|
|
5
|
+
readonly messageId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
6
|
+
readonly threadId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
readonly event: v.LiteralSchema<"EMAIL_RECEIVED", undefined>;
|
|
9
|
+
}, undefined>], undefined>;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=pushNotifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushNotifications.d.ts","sourceRoot":"","sources":["../../src/schemas/pushNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgB5B,eAAO,MAAM,iBAAiB;;;;;;;;CAE7B,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { string } from './string';
|
|
3
|
+
const pushNotificationEmailReceivedPayload = v.object({
|
|
4
|
+
data: v.object({
|
|
5
|
+
messageId: string.shortUUID(),
|
|
6
|
+
threadId: string.shortUUID(),
|
|
7
|
+
}),
|
|
8
|
+
event: v.literal('EMAIL_RECEIVED'),
|
|
9
|
+
});
|
|
10
|
+
const pushNotificationPayload = v.union([
|
|
11
|
+
pushNotificationEmailReceivedPayload,
|
|
12
|
+
]);
|
|
13
|
+
export const pushNotifications = {
|
|
14
|
+
payload: pushNotificationPayload,
|
|
15
|
+
};
|
|
@@ -10,5 +10,5 @@ export type MarcoClient = {
|
|
|
10
10
|
pushUrl: string | null;
|
|
11
11
|
schemaVersion: string;
|
|
12
12
|
};
|
|
13
|
-
export type LabelSpecialUse = v.InferOutput<ReturnType<typeof marcoSchemas.
|
|
13
|
+
export type LabelSpecialUse = v.InferOutput<ReturnType<typeof marcoSchemas.labels.specialUse>>;
|
|
14
14
|
//# sourceMappingURL=MarcoClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarcoClient.d.ts","sourceRoot":"","sources":["../../src/types/MarcoClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC/B,QAAQ,EAAE,MAAM,CACd,MAAM,EACN;QACE,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAChC,CACF,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"MarcoClient.d.ts","sourceRoot":"","sources":["../../src/types/MarcoClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC/B,QAAQ,EAAE,MAAM,CACd,MAAM,EACN;QACE,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAChC,CACF,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED