@marcoappio/marco-config 2.0.350 → 2.0.351

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 (49) hide show
  1. package/dist/clients/account.d.ts +17 -17
  2. package/dist/clients/account.js +15 -15
  3. package/dist/clients/contact.d.ts +1 -1
  4. package/dist/clients/contact.js +1 -1
  5. package/dist/clients/draft.d.ts +23 -23
  6. package/dist/clients/draft.js +18 -18
  7. package/dist/clients/index.d.ts +62 -57
  8. package/dist/clients/index.d.ts.map +1 -1
  9. package/dist/clients/thread.d.ts +18 -13
  10. package/dist/clients/thread.d.ts.map +1 -1
  11. package/dist/clients/thread.js +18 -13
  12. package/dist/clients/user.d.ts +3 -3
  13. package/dist/clients/user.js +3 -3
  14. package/dist/schemas/index.d.ts +2 -2
  15. package/dist/schemas/pushNotifications.d.ts +2 -2
  16. package/dist/schemas/pushNotifications.js +2 -2
  17. package/dist/sdk/endpoints/index.d.ts +65 -58
  18. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  19. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts +1 -1
  20. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.js +1 -1
  21. package/dist/sdk/endpoints/private/emailMessage/index.d.ts +1 -1
  22. package/dist/sdk/endpoints/private/index.d.ts +65 -58
  23. package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
  24. package/dist/sdk/endpoints/private/sync/index.d.ts +64 -57
  25. package/dist/sdk/endpoints/private/sync/index.d.ts.map +1 -1
  26. package/dist/sdk/endpoints/private/sync/pull/account.d.ts +3 -3
  27. package/dist/sdk/endpoints/private/sync/pull/contact.d.ts +1 -1
  28. package/dist/sdk/endpoints/private/sync/pull/draft.d.ts +4 -4
  29. package/dist/sdk/endpoints/private/sync/pull/index.d.ts +13 -13
  30. package/dist/sdk/endpoints/private/sync/pull/thread.d.ts +4 -4
  31. package/dist/sdk/endpoints/private/sync/pull/user.d.ts +1 -1
  32. package/dist/sdk/endpoints/private/sync/push/account.d.ts +14 -14
  33. package/dist/sdk/endpoints/private/sync/push/draft.d.ts +19 -19
  34. package/dist/sdk/endpoints/private/sync/push/index.d.ts +51 -44
  35. package/dist/sdk/endpoints/private/sync/push/index.d.ts.map +1 -1
  36. package/dist/sdk/endpoints/private/sync/push/thread.d.ts +16 -9
  37. package/dist/sdk/endpoints/private/sync/push/thread.d.ts.map +1 -1
  38. package/dist/sdk/endpoints/private/sync/push/thread.js +7 -2
  39. package/dist/sdk/endpoints/private/sync/push/user.d.ts +2 -2
  40. package/dist/sdk/index.d.ts +65 -58
  41. package/dist/sdk/index.d.ts.map +1 -1
  42. package/dist/utils/accounts/index.d.ts +0 -4
  43. package/dist/utils/accounts/index.d.ts.map +1 -1
  44. package/dist/utils/accounts/index.js +0 -2
  45. package/dist/ws.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/utils/accounts/labelIdGenerate.test.d.ts +0 -2
  48. package/dist/utils/accounts/labelIdGenerate.test.d.ts.map +0 -1
  49. package/dist/utils/accounts/labelIdGenerate.test.js +0 -51
@@ -7,29 +7,29 @@ const inlineContact = v.object({
7
7
  });
8
8
  const inlineAttachment = v.object({
9
9
  fileName: marcoSchemas.string.required(),
10
- id: marcoSchemas.string.shortUUID(),
10
+ id: marcoSchemas.string.required(),
11
11
  mimeType: marcoSchemas.string.required(),
12
12
  size: marcoSchemas.number.positiveInteger(),
13
13
  });
14
14
  const specialUseMutators = {
15
15
  setArchive: {
16
16
  delta: v.object({
17
- threadId: marcoSchemas.string.shortUUID(),
17
+ threadId: marcoSchemas.string.required(),
18
18
  }),
19
19
  },
20
20
  setInbox: {
21
21
  delta: v.object({
22
- threadId: marcoSchemas.string.shortUUID(),
22
+ threadId: marcoSchemas.string.required(),
23
23
  }),
24
24
  },
25
25
  setSpam: {
26
26
  delta: v.object({
27
- threadId: marcoSchemas.string.shortUUID(),
27
+ threadId: marcoSchemas.string.required(),
28
28
  }),
29
29
  },
30
30
  setTrash: {
31
31
  delta: v.object({
32
- threadId: marcoSchemas.string.shortUUID(),
32
+ threadId: marcoSchemas.string.required(),
33
33
  }),
34
34
  },
35
35
  };
@@ -38,7 +38,7 @@ export const thread = {
38
38
  bagOfWords: v.array(marcoSchemas.string.required()),
39
39
  emailAccountId: marcoSchemas.string.required(),
40
40
  flagged: v.nonOptional(v.boolean()),
41
- id: marcoSchemas.string.shortUUID(),
41
+ id: marcoSchemas.string.required(),
42
42
  messages: v.array(v.object({
43
43
  attachments: v.array(inlineAttachment),
44
44
  bcc: v.array(inlineContact),
@@ -47,8 +47,8 @@ export const thread = {
47
47
  envelopeDate: marcoSchemas.number.positiveInteger(),
48
48
  envelopeSubject: marcoSchemas.string.nullable(),
49
49
  from: v.array(inlineContact),
50
- id: marcoSchemas.string.shortUUID(),
51
- labelIds: v.array(marcoSchemas.string.shortUUID()),
50
+ id: marcoSchemas.string.required(),
51
+ labelIds: v.array(marcoSchemas.string.required()),
52
52
  previewText: marcoSchemas.string.required(marcoConstants.messages.PREVIEW_TEXT_MAX_LENGTH),
53
53
  replyTo: v.array(inlineContact),
54
54
  to: v.array(inlineContact),
@@ -59,25 +59,30 @@ export const thread = {
59
59
  ...specialUseMutators,
60
60
  delete: {
61
61
  delta: v.object({
62
- threadId: marcoSchemas.string.shortUUID(),
62
+ threadId: marcoSchemas.string.required(),
63
+ }),
64
+ },
65
+ requestAttachmentDownload: {
66
+ delta: v.object({
67
+ attachmentId: marcoSchemas.string.required(),
63
68
  }),
64
69
  },
65
70
  setFlagged: {
66
71
  delta: v.object({
67
72
  flagged: v.nonOptional(v.boolean()),
68
- threadId: marcoSchemas.string.shortUUID(),
73
+ threadId: marcoSchemas.string.required(),
69
74
  }),
70
75
  },
71
76
  setLabels: {
72
77
  delta: v.object({
73
- labelIds: v.array(marcoSchemas.string.shortUUID()),
74
- threadId: marcoSchemas.string.shortUUID(),
78
+ labelIds: v.array(marcoSchemas.string.required()),
79
+ threadId: marcoSchemas.string.required(),
75
80
  }),
76
81
  },
77
82
  setSeen: {
78
83
  delta: v.object({
79
84
  seen: v.boolean(),
80
- threadId: marcoSchemas.string.shortUUID(),
85
+ threadId: marcoSchemas.string.required(),
81
86
  }),
82
87
  },
83
88
  },
@@ -1,7 +1,7 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const user: {
3
3
  model: v.ObjectSchema<{
4
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
4
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
5
5
  readonly settings: v.ObjectSchema<{
6
6
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
7
  readonly notifications: v.ObjectSchema<{
@@ -16,13 +16,13 @@ export declare const user: {
16
16
  mutators: {
17
17
  setSettingsName: {
18
18
  delta: v.ObjectSchema<{
19
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
19
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
20
20
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
21
21
  }, undefined>;
22
22
  };
23
23
  setSettingsPushNotificationToken: {
24
24
  delta: v.ObjectSchema<{
25
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
25
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
26
26
  readonly pushNotificationToken: v.ObjectSchema<{
27
27
  readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
28
28
  readonly deviceId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -14,19 +14,19 @@ const userSettings = v.object({
14
14
  });
15
15
  export const user = {
16
16
  model: v.object({
17
- id: marcoSchemas.string.shortUUID(),
17
+ id: marcoSchemas.string.required(),
18
18
  settings: userSettings,
19
19
  }),
20
20
  mutators: {
21
21
  setSettingsName: {
22
22
  delta: v.object({
23
- id: marcoSchemas.string.shortUUID(),
23
+ id: marcoSchemas.string.required(),
24
24
  name: marcoSchemas.string.nullable(),
25
25
  }),
26
26
  },
27
27
  setSettingsPushNotificationToken: {
28
28
  delta: v.object({
29
- id: marcoSchemas.string.shortUUID(),
29
+ id: marcoSchemas.string.required(),
30
30
  pushNotificationToken,
31
31
  }),
32
32
  },
@@ -59,8 +59,8 @@ export declare const marcoSchemas: {
59
59
  pushNotifications: {
60
60
  payload: import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
61
61
  readonly data: import("valibot").ObjectSchema<{
62
- readonly messageId: import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
63
- readonly threadId: import("valibot").CustomSchema<string, import("valibot").ErrorMessage<import("valibot").CustomIssue> | undefined>;
62
+ readonly messageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
63
+ readonly threadId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
64
64
  }, undefined>;
65
65
  readonly event: import("valibot").LiteralSchema<"EMAIL_RECEIVED", undefined>;
66
66
  }, undefined>], undefined>;
@@ -2,8 +2,8 @@ import * as v from 'valibot';
2
2
  export declare const pushNotifications: {
3
3
  payload: v.UnionSchema<[v.ObjectSchema<{
4
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>;
5
+ readonly messageId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
7
  }, undefined>;
8
8
  readonly event: v.LiteralSchema<"EMAIL_RECEIVED", undefined>;
9
9
  }, undefined>], undefined>;
@@ -2,8 +2,8 @@ import * as v from 'valibot';
2
2
  import { string } from './string';
3
3
  const pushNotificationEmailReceivedPayload = v.object({
4
4
  data: v.object({
5
- messageId: string.shortUUID(),
6
- threadId: string.shortUUID(),
5
+ messageId: string.required(),
6
+ threadId: string.required(),
7
7
  }),
8
8
  event: v.literal('EMAIL_RECEIVED'),
9
9
  });