@marcoappio/marco-config 2.0.330 → 2.0.332

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.
Files changed (38) hide show
  1. package/dist/clients/account.js +1 -1
  2. package/dist/clients/index.d.ts +1 -1
  3. package/dist/clients/user.d.ts +1 -1
  4. package/dist/clients/user.js +1 -1
  5. package/dist/schemas/app.d.ts +5 -0
  6. package/dist/schemas/app.d.ts.map +1 -0
  7. package/dist/schemas/app.js +8 -0
  8. package/dist/schemas/drafts.d.ts +16 -0
  9. package/dist/schemas/drafts.d.ts.map +1 -0
  10. package/dist/schemas/drafts.js +15 -0
  11. package/dist/schemas/emailAccount.d.ts +17 -0
  12. package/dist/schemas/emailAccount.d.ts.map +1 -0
  13. package/dist/schemas/emailAccount.js +27 -0
  14. package/dist/schemas/index.d.ts +42 -34
  15. package/dist/schemas/index.d.ts.map +1 -1
  16. package/dist/schemas/index.js +15 -63
  17. package/dist/schemas/labels.d.ts +5 -0
  18. package/dist/schemas/labels.d.ts.map +1 -0
  19. package/dist/schemas/labels.js +10 -0
  20. package/dist/schemas/number.d.ts +6 -0
  21. package/dist/schemas/number.d.ts.map +1 -0
  22. package/dist/schemas/number.js +5 -0
  23. package/dist/schemas/oauth.d.ts +5 -0
  24. package/dist/schemas/oauth.d.ts.map +1 -0
  25. package/dist/schemas/oauth.js +7 -0
  26. package/dist/schemas/pushNotifications.d.ts +10 -0
  27. package/dist/schemas/pushNotifications.d.ts.map +1 -0
  28. package/dist/schemas/pushNotifications.js +14 -0
  29. package/dist/sdk/endpoints/index.d.ts +1 -1
  30. package/dist/sdk/endpoints/private/index.d.ts +1 -1
  31. package/dist/sdk/endpoints/private/sync/index.d.ts +1 -1
  32. package/dist/sdk/endpoints/private/sync/push/index.d.ts +1 -1
  33. package/dist/sdk/endpoints/private/sync/push/user.d.ts +1 -1
  34. package/dist/sdk/endpoints/private/sync/push/user.js +3 -3
  35. package/dist/sdk/index.d.ts +1 -1
  36. package/dist/types/MarcoClient.d.ts +1 -1
  37. package/dist/types/MarcoClient.d.ts.map +1 -1
  38. package/package.json +1 -1
@@ -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.labelSpecialUse()),
29
+ specialUse: v.nullable(marcoSchemas.labels.specialUse()),
30
30
  })),
31
31
  settings: accountSettingsSchema,
32
32
  }),
@@ -459,7 +459,7 @@ export declare const marcoClients: {
459
459
  readonly name: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
460
460
  }, undefined>;
461
461
  };
462
- setSettingsPushNotifactionToken: {
462
+ setSettingsPushNotificationToken: {
463
463
  delta: import("valibot").ObjectSchema<{
464
464
  readonly id: import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
465
465
  readonly pushNotificationToken: import("valibot").ObjectSchema<{
@@ -21,7 +21,7 @@ export declare const user: {
21
21
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
22
22
  }, undefined>;
23
23
  };
24
- setSettingsPushNotifactionToken: {
24
+ setSettingsPushNotificationToken: {
25
25
  delta: v.ObjectSchema<{
26
26
  readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
27
27
  readonly pushNotificationToken: v.ObjectSchema<{
@@ -25,7 +25,7 @@ export const user = {
25
25
  name: marcoSchemas.string.nullable(),
26
26
  }),
27
27
  },
28
- setSettingsPushNotifactionToken: {
28
+ setSettingsPushNotificationToken: {
29
29
  delta: v.object({
30
30
  id: marcoSchemas.string.shortUUID(),
31
31
  pushNotificationToken,
@@ -0,0 +1,5 @@
1
+ import * as v from 'valibot';
2
+ export declare const app: {
3
+ platform: () => v.UnionSchema<[v.LiteralSchema<"ios", undefined>, v.LiteralSchema<"osx", undefined>, v.LiteralSchema<"web", undefined>], undefined>;
4
+ };
5
+ //# sourceMappingURL=app.d.ts.map
@@ -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,8 @@
1
+ import * as v from 'valibot';
2
+ export const app = {
3
+ platform: () => v.union([
4
+ v.literal('ios'),
5
+ v.literal('osx'),
6
+ v.literal('web'),
7
+ ]),
8
+ };
@@ -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
+ };
@@ -1,55 +1,63 @@
1
- import * as v from 'valibot';
2
1
  export declare const marcoSchemas: {
3
2
  app: {
4
- platform: () => v.UnionSchema<[v.LiteralSchema<"ios", undefined>, v.LiteralSchema<"osx", undefined>, v.LiteralSchema<"web", undefined>], undefined>;
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: () => v.ObjectSchema<{
9
- readonly index: v.NumberSchema<undefined>;
10
- readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
11
- readonly value: v.StringSchema<undefined>;
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: () => v.ArraySchema<v.ObjectSchema<{
14
- readonly index: v.NumberSchema<undefined>;
15
- readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
16
- readonly value: v.StringSchema<undefined>;
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: () => v.ObjectSchema<{
22
- readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
23
- readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
24
- readonly imapPort: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
25
- readonly smtpHost: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
26
- readonly smtpPassword: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
27
- readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
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: () => v.ObjectSchema<{
30
- readonly code: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
31
- readonly provider: v.UnionSchema<[v.LiteralSchema<"GOOGLE", undefined>, v.LiteralSchema<"OUTLOOK", undefined>], undefined>;
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: () => 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>;
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) => v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
38
- positiveInteger: () => v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
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: () => v.UnionSchema<[v.LiteralSchema<"GOOGLE", undefined>, v.LiteralSchema<"OUTLOOK", undefined>], undefined>;
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 threadId: import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
48
+ }, undefined>;
49
+ readonly event: import("valibot").LiteralSchema<"EMAIL_RECEIVED", undefined>;
50
+ }, undefined>], undefined>;
42
51
  };
43
52
  string: {
44
- email: () => v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
45
- enum: (values: Record<string, string>) => v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EnumSchema<Record<string, string>, undefined>]>, undefined>;
46
- matches: (regex: RegExp) => v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
47
- nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
48
- optional: (maxLength?: number) => v.UndefinedableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
49
- required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
50
- shortUUID: () => v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
51
- uuid: () => v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
53
+ email: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
54
+ enum: (values: Record<string, string>) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EnumSchema<Record<string, string>, undefined>]>, undefined>;
55
+ matches: (regex: RegExp) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, undefined>]>, undefined>;
56
+ 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>;
57
+ 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>;
58
+ 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>;
59
+ shortUUID: () => import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
60
+ uuid: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
52
61
  };
53
62
  };
54
- export type LabelSpecialUse = v.InferInput<ReturnType<typeof marcoSchemas.labelSpecialUse>>;
55
63
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA6CP,MAAM,OAAO,MAAM;;;;;;;;;;;;;;;;CAYpC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,eAAe,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASxB,CAAA"}
@@ -1,66 +1,18 @@
1
- import * as v from 'valibot';
2
1
  import { string } from '../schemas/string';
3
- const patchInstructionSchema = v.object({
4
- index: v.number(),
5
- type: v.union([
6
- v.literal('INSERTION'),
7
- v.literal('DELETION'),
8
- ]),
9
- value: v.string(),
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
- platform: () => v.union([
14
- v.literal('ios'),
15
- v.literal('osx'),
16
- v.literal('web'),
17
- ]),
18
- },
19
- drafts: {
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,10 @@
1
+ import * as v from 'valibot';
2
+ export const labels = {
3
+ specialUse: () => v.union([
4
+ v.literal('ARCHIVE'),
5
+ v.literal('INBOX'),
6
+ v.literal('SENT'),
7
+ v.literal('SPAM'),
8
+ v.literal('TRASH'),
9
+ ]),
10
+ };
@@ -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,5 @@
1
+ import * as v from 'valibot';
2
+ export const number = {
3
+ minMax: (min, max) => v.nonOptional(v.pipe(v.number(), v.minValue(min), v.maxValue(max))),
4
+ positiveInteger: () => v.nonOptional(v.pipe(v.number(), v.integer(), v.minValue(0))),
5
+ };
@@ -0,0 +1,5 @@
1
+ import * as v from 'valibot';
2
+ export declare const oauth: {
3
+ provider: () => v.UnionSchema<[v.LiteralSchema<"GOOGLE", undefined>, v.LiteralSchema<"OUTLOOK", undefined>], undefined>;
4
+ };
5
+ //# sourceMappingURL=oauth.d.ts.map
@@ -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,7 @@
1
+ import * as v from 'valibot';
2
+ export const oauth = {
3
+ provider: () => v.union([
4
+ v.literal('GOOGLE'),
5
+ v.literal('OUTLOOK'),
6
+ ]),
7
+ };
@@ -0,0 +1,10 @@
1
+ import * as v from 'valibot';
2
+ export declare const pushNotifications: {
3
+ payload: v.UnionSchema<[v.ObjectSchema<{
4
+ readonly data: v.ObjectSchema<{
5
+ readonly threadId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
6
+ }, undefined>;
7
+ readonly event: v.LiteralSchema<"EMAIL_RECEIVED", undefined>;
8
+ }, undefined>], undefined>;
9
+ };
10
+ //# 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;AAe5B,eAAO,MAAM,iBAAiB;;;;;;;CAE7B,CAAA"}
@@ -0,0 +1,14 @@
1
+ import * as v from 'valibot';
2
+ import { string } from './string';
3
+ const pushNotificationEmailReceivedPayload = v.object({
4
+ data: v.object({
5
+ threadId: string.shortUUID(),
6
+ }),
7
+ event: v.literal('EMAIL_RECEIVED'),
8
+ });
9
+ const pushNotificationPayload = v.union([
10
+ pushNotificationEmailReceivedPayload,
11
+ ]);
12
+ export const pushNotifications = {
13
+ payload: pushNotificationPayload,
14
+ };
@@ -784,7 +784,7 @@ export declare const endpoints: {
784
784
  }, undefined>;
785
785
  readonly clientID: import("valibot").StringSchema<undefined>;
786
786
  readonly id: import("valibot").NumberSchema<undefined>;
787
- readonly name: import("valibot").LiteralSchema<"setSettingsPushNotifactionToken", undefined>;
787
+ readonly name: import("valibot").LiteralSchema<"setSettingsPushNotificationToken", undefined>;
788
788
  }, undefined>)[], undefined>, undefined>;
789
789
  }, undefined>, GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
790
790
  readonly data: import("valibot").ObjectSchema<{
@@ -781,7 +781,7 @@ export declare const privateGroup: {
781
781
  }, undefined>;
782
782
  readonly clientID: import("valibot").StringSchema<undefined>;
783
783
  readonly id: import("valibot").NumberSchema<undefined>;
784
- readonly name: import("valibot").LiteralSchema<"setSettingsPushNotifactionToken", undefined>;
784
+ readonly name: import("valibot").LiteralSchema<"setSettingsPushNotificationToken", undefined>;
785
785
  }, undefined>)[], undefined>, undefined>;
786
786
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
787
787
  readonly data: import("valibot").ObjectSchema<{
@@ -748,7 +748,7 @@ export declare const sync: {
748
748
  }, undefined>;
749
749
  readonly clientID: import("valibot").StringSchema<undefined>;
750
750
  readonly id: import("valibot").NumberSchema<undefined>;
751
- readonly name: import("valibot").LiteralSchema<"setSettingsPushNotifactionToken", undefined>;
751
+ readonly name: import("valibot").LiteralSchema<"setSettingsPushNotificationToken", undefined>;
752
752
  }, undefined>)[], undefined>, undefined>;
753
753
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
754
754
  readonly data: import("valibot").ObjectSchema<{
@@ -441,7 +441,7 @@ export declare const push: {
441
441
  }, undefined>;
442
442
  readonly clientID: import("valibot").StringSchema<undefined>;
443
443
  readonly id: import("valibot").NumberSchema<undefined>;
444
- readonly name: import("valibot").LiteralSchema<"setSettingsPushNotifactionToken", undefined>;
444
+ readonly name: import("valibot").LiteralSchema<"setSettingsPushNotificationToken", undefined>;
445
445
  }, undefined>)[], undefined>, undefined>;
446
446
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
447
447
  readonly data: import("valibot").ObjectSchema<{
@@ -21,7 +21,7 @@ export declare const syncPushUser: import("../../../../..").EndpointConfig<"/v1/
21
21
  }, undefined>;
22
22
  readonly clientID: v.StringSchema<undefined>;
23
23
  readonly id: v.NumberSchema<undefined>;
24
- readonly name: v.LiteralSchema<"setSettingsPushNotifactionToken", undefined>;
24
+ readonly name: v.LiteralSchema<"setSettingsPushNotificationToken", undefined>;
25
25
  }, undefined>)[], undefined>, undefined>;
26
26
  }, undefined>, v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>> | undefined, v.UnionSchema<[v.ObjectSchema<{
27
27
  readonly data: v.ObjectSchema<{
@@ -12,11 +12,11 @@ export const syncPushUser = createEndpoint({
12
12
  id: v.number(),
13
13
  name: v.literal('setSettingsName'),
14
14
  }),
15
- setSettingsPushNotifactionToken: v.object({
16
- args: user.mutators.setSettingsPushNotifactionToken.delta,
15
+ setSettingsPushNotificationToken: v.object({
16
+ args: user.mutators.setSettingsPushNotificationToken.delta,
17
17
  clientID: v.string(),
18
18
  id: v.number(),
19
- name: v.literal('setSettingsPushNotifactionToken'),
19
+ name: v.literal('setSettingsPushNotificationToken'),
20
20
  }),
21
21
  }))),
22
22
  }),
@@ -783,7 +783,7 @@ export declare const marcoSDK: {
783
783
  }, undefined>;
784
784
  readonly clientID: import("valibot").StringSchema<undefined>;
785
785
  readonly id: import("valibot").NumberSchema<undefined>;
786
- readonly name: import("valibot").LiteralSchema<"setSettingsPushNotifactionToken", undefined>;
786
+ readonly name: import("valibot").LiteralSchema<"setSettingsPushNotificationToken", undefined>;
787
787
  }, undefined>)[], undefined>, undefined>;
788
788
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
789
789
  readonly data: import("valibot").ObjectSchema<{
@@ -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.labelSpecialUse>>;
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,eAAe,CAAC,CAAC,CAAA"}
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
3
  "packageManager": "bun@1.2.0",
4
- "version": "2.0.330",
4
+ "version": "2.0.332",
5
5
  "author": "team@marcoapp.io",
6
6
  "main": "dist/index.js",
7
7
  "repository": "git@github.com:marcoappio/marco-config.git",