@marcoappio/marco-config 2.0.408 → 2.0.409

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 (144) hide show
  1. package/dist/constants/emailProvider.d.ts.map +1 -1
  2. package/dist/index.d.ts +3 -4
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -3
  5. package/dist/marcoPublicConfig.d.ts +0 -6
  6. package/dist/marcoPublicConfig.d.ts.map +1 -1
  7. package/dist/marcoPublicConfig.js +15 -32
  8. package/dist/schemas/app.d.ts.map +1 -1
  9. package/dist/schemas/app.js +1 -5
  10. package/dist/schemas/drafts.d.ts.map +1 -1
  11. package/dist/schemas/drafts.js +1 -4
  12. package/dist/schemas/emailAccount.d.ts.map +1 -1
  13. package/dist/schemas/emailAccount.js +1 -4
  14. package/dist/schemas/labels.d.ts.map +1 -1
  15. package/dist/schemas/labels.js +1 -7
  16. package/dist/schemas/number.d.ts.map +1 -1
  17. package/dist/schemas/oauth.d.ts.map +1 -1
  18. package/dist/schemas/oauth.js +1 -4
  19. package/dist/schemas/pushNotifications.d.ts.map +1 -1
  20. package/dist/schemas/pushNotifications.js +1 -3
  21. package/dist/schemas/string.d.ts.map +1 -1
  22. package/dist/sdk/endpoints/createEndpointConfig.d.ts +2 -2
  23. package/dist/sdk/endpoints/createEndpointConfig.d.ts.map +1 -1
  24. package/dist/sdk/endpoints/index.d.ts +2 -1083
  25. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  26. package/dist/sdk/endpoints/index.js +0 -2
  27. package/dist/sdk/endpoints/public/index.d.ts +0 -136
  28. package/dist/sdk/endpoints/public/index.d.ts.map +1 -1
  29. package/dist/sdk/endpoints/public/index.js +0 -2
  30. package/dist/sdk/index.d.ts +0 -1081
  31. package/dist/sdk/index.d.ts.map +1 -1
  32. package/dist/sdk/validation/utils/flattenRequirements/flattenRequirements.d.ts +1 -1
  33. package/dist/sdk/validation/utils/flattenRequirements/flattenRequirements.d.ts.map +1 -1
  34. package/dist/types/Endpoint.d.ts +2 -3
  35. package/dist/types/Endpoint.d.ts.map +1 -1
  36. package/dist/types/index.d.ts +0 -3
  37. package/dist/types/index.d.ts.map +1 -1
  38. package/dist/types/index.js +0 -3
  39. package/dist/utils/accounts/generateAccountColor.d.ts.map +1 -1
  40. package/dist/utils/accounts/generateAccountColor.js +12 -3
  41. package/dist/utils/stringPatch/stringPatch.d.ts +2 -2
  42. package/dist/utils/stringPatch/stringPatch.d.ts.map +1 -1
  43. package/dist/utils/stringPatch/stringPatch.test.js +2 -2
  44. package/package.json +38 -46
  45. package/.eslintrc.json +0 -294
  46. package/dist/clients/account.d.ts +0 -144
  47. package/dist/clients/account.d.ts.map +0 -1
  48. package/dist/clients/account.js +0 -93
  49. package/dist/clients/contact.d.ts +0 -14
  50. package/dist/clients/contact.d.ts.map +0 -1
  51. package/dist/clients/contact.js +0 -14
  52. package/dist/clients/draft.d.ts +0 -202
  53. package/dist/clients/draft.d.ts.map +0 -1
  54. package/dist/clients/draft.js +0 -137
  55. package/dist/clients/index.d.ts +0 -532
  56. package/dist/clients/index.d.ts.map +0 -1
  57. package/dist/clients/index.js +0 -13
  58. package/dist/clients/thread.d.ts +0 -125
  59. package/dist/clients/thread.d.ts.map +0 -1
  60. package/dist/clients/thread.js +0 -121
  61. package/dist/clients/user.d.ts +0 -53
  62. package/dist/clients/user.d.ts.map +0 -1
  63. package/dist/clients/user.js +0 -52
  64. package/dist/clients/utils/index.d.ts +0 -4
  65. package/dist/clients/utils/index.d.ts.map +0 -1
  66. package/dist/clients/utils/index.js +0 -4
  67. package/dist/clients/utils/labelSpecialUseOrdering.d.ts +0 -3
  68. package/dist/clients/utils/labelSpecialUseOrdering.d.ts.map +0 -1
  69. package/dist/clients/utils/labelSpecialUseOrdering.js +0 -7
  70. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts +0 -21
  71. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts.map +0 -1
  72. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.js +0 -16
  73. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts +0 -19
  74. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts.map +0 -1
  75. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.js +0 -19
  76. package/dist/sdk/endpoints/private/emailMessage/index.d.ts +0 -39
  77. package/dist/sdk/endpoints/private/emailMessage/index.d.ts.map +0 -1
  78. package/dist/sdk/endpoints/private/emailMessage/index.js +0 -6
  79. package/dist/sdk/endpoints/private/index.d.ts +0 -946
  80. package/dist/sdk/endpoints/private/index.d.ts.map +0 -1
  81. package/dist/sdk/endpoints/private/index.js +0 -8
  82. package/dist/sdk/endpoints/private/sync/index.d.ts +0 -896
  83. package/dist/sdk/endpoints/private/sync/index.d.ts.map +0 -1
  84. package/dist/sdk/endpoints/private/sync/index.js +0 -3
  85. package/dist/sdk/endpoints/private/sync/pull/account.d.ts +0 -71
  86. package/dist/sdk/endpoints/private/sync/pull/account.d.ts.map +0 -1
  87. package/dist/sdk/endpoints/private/sync/pull/account.js +0 -33
  88. package/dist/sdk/endpoints/private/sync/pull/contact.d.ts +0 -56
  89. package/dist/sdk/endpoints/private/sync/pull/contact.d.ts.map +0 -1
  90. package/dist/sdk/endpoints/private/sync/pull/contact.js +0 -40
  91. package/dist/sdk/endpoints/private/sync/pull/draft.d.ts +0 -72
  92. package/dist/sdk/endpoints/private/sync/pull/draft.d.ts.map +0 -1
  93. package/dist/sdk/endpoints/private/sync/pull/draft.js +0 -36
  94. package/dist/sdk/endpoints/private/sync/pull/index.d.ts +0 -349
  95. package/dist/sdk/endpoints/private/sync/pull/index.d.ts.map +0 -1
  96. package/dist/sdk/endpoints/private/sync/pull/index.js +0 -6
  97. package/dist/sdk/endpoints/private/sync/pull/thread.d.ts +0 -100
  98. package/dist/sdk/endpoints/private/sync/pull/thread.d.ts.map +0 -1
  99. package/dist/sdk/endpoints/private/sync/pull/thread.js +0 -45
  100. package/dist/sdk/endpoints/private/sync/pull/user.d.ts +0 -57
  101. package/dist/sdk/endpoints/private/sync/pull/user.d.ts.map +0 -1
  102. package/dist/sdk/endpoints/private/sync/pull/user.js +0 -33
  103. package/dist/sdk/endpoints/private/sync/push/account.d.ts +0 -151
  104. package/dist/sdk/endpoints/private/sync/push/account.d.ts.map +0 -1
  105. package/dist/sdk/endpoints/private/sync/push/account.js +0 -73
  106. package/dist/sdk/endpoints/private/sync/push/draft.d.ts +0 -214
  107. package/dist/sdk/endpoints/private/sync/push/draft.d.ts.map +0 -1
  108. package/dist/sdk/endpoints/private/sync/push/draft.js +0 -85
  109. package/dist/sdk/endpoints/private/sync/push/index.d.ts +0 -546
  110. package/dist/sdk/endpoints/private/sync/push/index.d.ts.map +0 -1
  111. package/dist/sdk/endpoints/private/sync/push/index.js +0 -5
  112. package/dist/sdk/endpoints/private/sync/push/thread.d.ts +0 -122
  113. package/dist/sdk/endpoints/private/sync/push/thread.d.ts.map +0 -1
  114. package/dist/sdk/endpoints/private/sync/push/thread.js +0 -79
  115. package/dist/sdk/endpoints/private/sync/push/user.d.ts +0 -64
  116. package/dist/sdk/endpoints/private/sync/push/user.d.ts.map +0 -1
  117. package/dist/sdk/endpoints/private/sync/push/user.js +0 -43
  118. package/dist/sdk/endpoints/private/user/deleteUser.d.ts +0 -10
  119. package/dist/sdk/endpoints/private/user/deleteUser.d.ts.map +0 -1
  120. package/dist/sdk/endpoints/private/user/deleteUser.js +0 -13
  121. package/dist/sdk/endpoints/private/user/index.d.ts +0 -11
  122. package/dist/sdk/endpoints/private/user/index.d.ts.map +0 -1
  123. package/dist/sdk/endpoints/private/user/index.js +0 -4
  124. package/dist/sdk/endpoints/public/auth/index.d.ts +0 -137
  125. package/dist/sdk/endpoints/public/auth/index.d.ts.map +0 -1
  126. package/dist/sdk/endpoints/public/auth/index.js +0 -8
  127. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts +0 -41
  128. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts.map +0 -1
  129. package/dist/sdk/endpoints/public/auth/refreshAuth.js +0 -33
  130. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts +0 -27
  131. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts.map +0 -1
  132. package/dist/sdk/endpoints/public/auth/sendAuthCode.js +0 -19
  133. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts +0 -72
  134. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts.map +0 -1
  135. package/dist/sdk/endpoints/public/auth/verifyAuthCode.js +0 -40
  136. package/dist/types/MarcoClient.d.ts +0 -14
  137. package/dist/types/MarcoClient.d.ts.map +0 -1
  138. package/dist/types/MarcoClient.js +0 -1
  139. package/dist/types/SDKError.d.ts +0 -4
  140. package/dist/types/SDKError.d.ts.map +0 -1
  141. package/dist/types/SDKError.js +0 -1
  142. package/dist/types/WS.d.ts +0 -7
  143. package/dist/types/WS.d.ts.map +0 -1
  144. package/dist/types/WS.js +0 -1
@@ -1,144 +0,0 @@
1
- import * as v from 'valibot';
2
- export declare const account: {
3
- model: v.ObjectSchema<{
4
- readonly aliases: v.ObjectSchema<{
5
- readonly nonPrimary: v.ArraySchema<v.ObjectSchema<{
6
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
7
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
8
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
9
- }, undefined>, undefined>;
10
- readonly primary: v.ObjectSchema<{
11
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
12
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
13
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
14
- }, undefined>;
15
- }, undefined>;
16
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
17
- readonly imapConnectionStatus: v.UnionSchema<[v.LiteralSchema<"AWAITING_CONNECTION", undefined>, v.LiteralSchema<"CONNECTED", undefined>, v.LiteralSchema<"CONNECTION_FAILED_AUTHENTICATION_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_CONNECTION_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_QUOTA_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_UNKNOWN_ERROR", undefined>], undefined>;
18
- readonly labels: v.ArraySchema<v.ObjectSchema<{
19
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
20
- readonly path: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
21
- readonly specialUse: v.NullableSchema<v.UnionSchema<[v.LiteralSchema<"ARCHIVE", undefined>, v.LiteralSchema<"INBOX", undefined>, v.LiteralSchema<"SENT", undefined>, v.LiteralSchema<"SPAM", undefined>, v.LiteralSchema<"TRASH", undefined>], undefined>, undefined>;
22
- }, undefined>, undefined>;
23
- readonly mailCounts: v.ObjectSchema<{
24
- readonly processed: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
25
- readonly total: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
26
- }, undefined>;
27
- readonly settings: v.ObjectSchema<{
28
- readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
29
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
30
- }, undefined>;
31
- }, undefined>;
32
- mutators: {
33
- createAccount: {
34
- delta: v.ObjectSchema<{
35
- readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
36
- readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
37
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
38
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
39
- }, undefined>;
40
- };
41
- createAlias: {
42
- delta: v.ObjectSchema<{
43
- readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
44
- readonly alias: v.ObjectSchema<{
45
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
46
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
47
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
48
- }, undefined>;
49
- }, undefined>;
50
- };
51
- deleteAccount: {
52
- delta: v.ObjectSchema<{
53
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
54
- }, undefined>;
55
- };
56
- deleteAlias: {
57
- delta: v.ObjectSchema<{
58
- readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
59
- readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
60
- }, undefined>;
61
- };
62
- setAliasName: {
63
- delta: v.ObjectSchema<{
64
- readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
65
- readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
66
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
67
- }, undefined>;
68
- };
69
- setAliasPrimary: {
70
- delta: v.ObjectSchema<{
71
- readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
72
- readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
73
- }, undefined>;
74
- };
75
- setConnectionConfigImapRaw: {
76
- delta: v.ObjectSchema<{
77
- readonly connectionConfig: v.ObjectSchema<{
78
- readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
79
- readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
80
- readonly imapPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
81
- readonly imapSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
82
- readonly imapUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
83
- readonly smtpHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
84
- readonly smtpPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
85
- readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
86
- readonly smtpSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
87
- readonly smtpUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
88
- }, undefined>;
89
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
90
- }, undefined>;
91
- };
92
- setConnectionConfigOauth: {
93
- delta: v.ObjectSchema<{
94
- readonly connectionConfig: v.ObjectSchema<{
95
- readonly code: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
96
- readonly provider: v.UnionSchema<[v.LiteralSchema<"GOOGLE", undefined>, v.LiteralSchema<"OUTLOOK", undefined>], undefined>;
97
- readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
98
- }, undefined>;
99
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
100
- }, undefined>;
101
- };
102
- setSettings: {
103
- delta: v.ObjectSchema<{
104
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
105
- readonly settings: Omit<v.ObjectSchema<{
106
- readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
107
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
108
- }, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
109
- readonly entries: {
110
- readonly color: v.OptionalSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
111
- readonly name: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
112
- };
113
- readonly '~standard': v.StandardProps<{
114
- color?: string | undefined;
115
- name?: string | null | undefined;
116
- }, {
117
- color?: string | undefined;
118
- name?: string | null | undefined;
119
- }>;
120
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
121
- color?: string | undefined;
122
- name?: string | null | undefined;
123
- }, v.StringIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.ObjectIssue>;
124
- readonly '~types'?: {
125
- readonly input: {
126
- color?: string | undefined;
127
- name?: string | null | undefined;
128
- };
129
- readonly output: {
130
- color?: string | undefined;
131
- name?: string | null | undefined;
132
- };
133
- readonly issue: v.StringIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.ObjectIssue;
134
- } | undefined;
135
- };
136
- }, undefined>;
137
- };
138
- };
139
- name: "account";
140
- pullUrl: "/v1/pv/sync/pull/account";
141
- pushUrl: "/v1/pv/sync/push/account";
142
- schemaVersion: "v1";
143
- };
144
- //# sourceMappingURL=account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/clients/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgB5B,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFG,CAAA"}
@@ -1,93 +0,0 @@
1
- import * as v from 'valibot';
2
- import { marcoSchemas } from '../schemas';
3
- const accountSettingsSchema = v.object({
4
- color: marcoSchemas.string.required(),
5
- name: marcoSchemas.string.nullable(),
6
- });
7
- const aliasSchema = v.object({
8
- emailAddress: marcoSchemas.string.email(),
9
- id: marcoSchemas.string.required(),
10
- name: marcoSchemas.string.nullable(),
11
- });
12
- export const account = {
13
- model: v.object({
14
- aliases: v.object({
15
- nonPrimary: v.array(aliasSchema),
16
- primary: aliasSchema,
17
- }),
18
- id: marcoSchemas.string.required(),
19
- imapConnectionStatus: marcoSchemas.emailAccount.imapConnectionStatus(),
20
- labels: v.array(v.object({
21
- id: marcoSchemas.string.required(),
22
- path: marcoSchemas.string.required(),
23
- specialUse: v.nullable(marcoSchemas.labels.specialUse()),
24
- })),
25
- mailCounts: v.object({
26
- processed: marcoSchemas.number.positiveInteger(),
27
- total: marcoSchemas.number.positiveInteger(),
28
- }),
29
- settings: accountSettingsSchema,
30
- }),
31
- mutators: {
32
- createAccount: {
33
- delta: v.object({
34
- aliasId: marcoSchemas.string.required(),
35
- color: marcoSchemas.string.required(),
36
- emailAddress: marcoSchemas.string.email(),
37
- id: marcoSchemas.string.required(),
38
- }),
39
- },
40
- createAlias: {
41
- delta: v.object({
42
- accountId: marcoSchemas.string.required(),
43
- alias: aliasSchema,
44
- }),
45
- },
46
- deleteAccount: {
47
- delta: v.object({
48
- id: marcoSchemas.string.required(),
49
- }),
50
- },
51
- deleteAlias: {
52
- delta: v.object({
53
- accountId: marcoSchemas.string.required(),
54
- aliasId: marcoSchemas.string.required(),
55
- }),
56
- },
57
- setAliasName: {
58
- delta: v.object({
59
- accountId: marcoSchemas.string.required(),
60
- aliasId: marcoSchemas.string.required(),
61
- name: marcoSchemas.string.nullable(),
62
- }),
63
- },
64
- setAliasPrimary: {
65
- delta: v.object({
66
- accountId: marcoSchemas.string.required(),
67
- aliasId: marcoSchemas.string.required(),
68
- }),
69
- },
70
- setConnectionConfigImapRaw: {
71
- delta: v.object({
72
- connectionConfig: marcoSchemas.emailAccount.connectionConfigImapRaw(),
73
- id: marcoSchemas.string.required(),
74
- }),
75
- },
76
- setConnectionConfigOauth: {
77
- delta: v.object({
78
- connectionConfig: marcoSchemas.emailAccount.connectionConfigOauth(),
79
- id: marcoSchemas.string.required(),
80
- }),
81
- },
82
- setSettings: {
83
- delta: v.object({
84
- id: marcoSchemas.string.required(),
85
- settings: v.partial(accountSettingsSchema),
86
- }),
87
- },
88
- },
89
- name: 'account',
90
- pullUrl: '/v1/pv/sync/pull/account',
91
- pushUrl: '/v1/pv/sync/push/account',
92
- schemaVersion: 'v1',
93
- };
@@ -1,14 +0,0 @@
1
- import * as v from 'valibot';
2
- export declare const contact: {
3
- model: v.ObjectSchema<{
4
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
- readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
- }, undefined>;
8
- mutators: {};
9
- name: "contact";
10
- pullUrl: "/v1/pv/sync/pull/contact";
11
- pushUrl: null;
12
- schemaVersion: "v1";
13
- };
14
- //# sourceMappingURL=contact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../src/clients/contact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAK5B,eAAO,MAAM,OAAO;;;;;;;;;;;CAWG,CAAA"}
@@ -1,14 +0,0 @@
1
- import * as v from 'valibot';
2
- import { marcoSchemas } from '../schemas';
3
- export const contact = {
4
- model: v.object({
5
- emailAddress: marcoSchemas.string.email(),
6
- id: marcoSchemas.string.required(),
7
- name: marcoSchemas.string.nullable(),
8
- }),
9
- mutators: {},
10
- name: 'contact',
11
- pullUrl: '/v1/pv/sync/pull/contact',
12
- pushUrl: null,
13
- schemaVersion: 'v1',
14
- };
@@ -1,202 +0,0 @@
1
- import * as v from 'valibot';
2
- export declare const draft: {
3
- model: v.ObjectSchema<{
4
- readonly attachments: v.ArraySchema<v.ObjectSchema<{
5
- readonly failed: v.BooleanSchema<undefined>;
6
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
8
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
9
- readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
10
- readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
11
- readonly uploadedChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
12
- }, undefined>, undefined>;
13
- readonly body: v.ObjectSchema<{
14
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
15
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
16
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
17
- readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
18
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
19
- }, undefined>;
20
- readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
21
- readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
22
- readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
23
- readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
24
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
25
- readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
26
- readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
27
- readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SEND_REQUESTED", undefined>, v.LiteralSchema<"SEND_CONFIRMED", undefined>, v.LiteralSchema<"SEND_FAILED", undefined>], undefined>;
28
- readonly type: v.UnionSchema<[v.LiteralSchema<"NEW", undefined>, v.LiteralSchema<"REPLY", undefined>, v.LiteralSchema<"FORWARD", undefined>], undefined>;
29
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
30
- }, undefined>;
31
- mutators: {
32
- cancelSend: {
33
- delta: v.ObjectSchema<{
34
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
35
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
36
- }, undefined>;
37
- };
38
- createAttachment: {
39
- delta: v.ObjectSchema<{
40
- readonly attachment: v.ObjectSchema<{
41
- readonly failed: v.BooleanSchema<undefined>;
42
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
43
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
44
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
45
- readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
46
- readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
47
- readonly uploadedChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
48
- }, undefined>;
49
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
50
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
51
- }, undefined>;
52
- };
53
- createDraft: {
54
- delta: v.ObjectSchema<{
55
- readonly attachments: v.ArraySchema<v.ObjectSchema<{
56
- readonly failed: v.BooleanSchema<undefined>;
57
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
58
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
59
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
60
- readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
61
- readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
62
- readonly uploadedChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
63
- }, undefined>, undefined>;
64
- readonly body: v.ObjectSchema<{
65
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
66
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
67
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
68
- readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
69
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
70
- }, undefined>;
71
- readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
72
- readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
73
- readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
74
- readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
75
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
76
- readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
77
- readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
78
- readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SEND_REQUESTED", undefined>, v.LiteralSchema<"SEND_CONFIRMED", undefined>, v.LiteralSchema<"SEND_FAILED", undefined>], undefined>;
79
- readonly type: v.UnionSchema<[v.LiteralSchema<"NEW", undefined>, v.LiteralSchema<"REPLY", undefined>, v.LiteralSchema<"FORWARD", undefined>], undefined>;
80
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
81
- }, undefined>;
82
- };
83
- deleteAttachment: {
84
- delta: v.ObjectSchema<{
85
- readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
86
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
87
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
88
- }, undefined>;
89
- };
90
- deleteDraft: {
91
- delta: v.ObjectSchema<{
92
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
93
- }, undefined>;
94
- };
95
- scheduleSend: {
96
- delta: v.UnionSchema<[v.ObjectSchema<{
97
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
98
- readonly kind: v.LiteralSchema<"IMMEDIATE", undefined>;
99
- readonly undoMs: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
100
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
101
- }, undefined>, v.ObjectSchema<{
102
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
103
- readonly kind: v.LiteralSchema<"SCHEDULED", undefined>;
104
- readonly scheduledFor: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
105
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
106
- }, undefined>], undefined>;
107
- };
108
- sendDraft: {
109
- delta: v.ObjectSchema<{
110
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
111
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
112
- }, undefined>;
113
- };
114
- setContent: {
115
- delta: v.ObjectSchema<{
116
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
117
- readonly patch: v.ArraySchema<v.ObjectSchema<{
118
- readonly index: v.NumberSchema<undefined>;
119
- readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
120
- readonly value: v.StringSchema<undefined>;
121
- }, undefined>, undefined>;
122
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
123
- }, undefined>;
124
- };
125
- setEnvelope: {
126
- delta: v.ObjectSchema<{
127
- readonly envelope: Omit<v.ObjectSchema<{
128
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
129
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
130
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
131
- readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
132
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
133
- }, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
134
- readonly entries: Omit<{
135
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
136
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
137
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
138
- readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
139
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
140
- }, "content">;
141
- readonly '~standard': v.StandardProps<{
142
- bcc: string[];
143
- cc: string[];
144
- to: string[];
145
- subject: string | null;
146
- }, {
147
- bcc: string[];
148
- cc: string[];
149
- to: string[];
150
- subject: string | null;
151
- }>;
152
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
153
- bcc: string[];
154
- cc: string[];
155
- to: string[];
156
- subject: string | null;
157
- }, v.StringIssue | v.EmailIssue<string> | v.MaxLengthIssue<string, 255> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.ObjectIssue | v.ArrayIssue>;
158
- readonly '~types'?: {
159
- readonly input: {
160
- bcc: string[];
161
- cc: string[];
162
- to: string[];
163
- subject: string | null;
164
- };
165
- readonly output: {
166
- bcc: string[];
167
- cc: string[];
168
- to: string[];
169
- subject: string | null;
170
- };
171
- readonly issue: v.StringIssue | v.EmailIssue<string> | v.MaxLengthIssue<string, 255> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.ObjectIssue | v.ArrayIssue;
172
- } | undefined;
173
- };
174
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
175
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
176
- }, undefined>;
177
- };
178
- setFrom: {
179
- delta: v.ObjectSchema<{
180
- readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
181
- readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
182
- readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
183
- readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
184
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
185
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
186
- }, undefined>;
187
- };
188
- uploadAttachmentChunk: {
189
- delta: v.ObjectSchema<{
190
- readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
191
- readonly chunk: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
192
- readonly chunkIndex: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
193
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
194
- }, undefined>;
195
- };
196
- };
197
- name: "draft";
198
- pullUrl: "/v1/pv/sync/pull/draft";
199
- pushUrl: "/v1/pv/sync/push/draft";
200
- schemaVersion: "v1";
201
- };
202
- //# sourceMappingURL=draft.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/clients/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAoE5B,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EK,CAAA"}
@@ -1,137 +0,0 @@
1
- import * as v from 'valibot';
2
- import { marcoSchemas } from '../schemas';
3
- const draftStatusSchema = v.union([
4
- v.literal('DRAFT'),
5
- v.literal('SEND_REQUESTED'),
6
- v.literal('SEND_CONFIRMED'),
7
- v.literal('SEND_FAILED'),
8
- ]);
9
- const draftTypeSchema = v.union([
10
- v.literal('NEW'),
11
- v.literal('REPLY'),
12
- v.literal('FORWARD'),
13
- ]);
14
- const bodySchema = v.object({
15
- bcc: v.array(marcoSchemas.string.email()),
16
- cc: v.array(marcoSchemas.string.email()),
17
- content: v.pipe(v.string(), v.maxLength(384000)),
18
- subject: marcoSchemas.string.nullable(),
19
- to: v.array(marcoSchemas.string.email()),
20
- });
21
- const attachmentSchema = v.object({
22
- failed: v.boolean(),
23
- fileName: marcoSchemas.string.required(),
24
- id: marcoSchemas.string.required(),
25
- mimeType: marcoSchemas.string.required(),
26
- totalChunks: marcoSchemas.number.positiveInteger(),
27
- totalSize: marcoSchemas.number.positiveInteger(),
28
- uploadedChunks: marcoSchemas.number.positiveInteger(),
29
- });
30
- const scheduledForSchema = v.nullable(marcoSchemas.number.positiveInteger());
31
- const scheduleSchema = v.union([
32
- v.object({
33
- id: marcoSchemas.string.required(),
34
- kind: v.literal('IMMEDIATE'),
35
- undoMs: marcoSchemas.number.positiveInteger(),
36
- updatedAt: marcoSchemas.number.positiveInteger(),
37
- }),
38
- v.object({
39
- id: marcoSchemas.string.required(),
40
- kind: v.literal('SCHEDULED'),
41
- scheduledFor: marcoSchemas.number.positiveInteger(),
42
- updatedAt: marcoSchemas.number.positiveInteger(),
43
- }),
44
- ]);
45
- const draftSchema = v.object({
46
- attachments: v.array(attachmentSchema),
47
- body: bodySchema,
48
- emailAccountId: marcoSchemas.string.required(),
49
- error: marcoSchemas.string.nullable(),
50
- from: marcoSchemas.string.email(),
51
- fromName: marcoSchemas.string.nullable(),
52
- id: marcoSchemas.string.required(),
53
- referencedMessageId: marcoSchemas.string.nullable(),
54
- scheduledFor: scheduledForSchema,
55
- status: draftStatusSchema,
56
- type: draftTypeSchema,
57
- updatedAt: marcoSchemas.number.positiveInteger(),
58
- });
59
- export const draft = {
60
- model: draftSchema,
61
- mutators: {
62
- cancelSend: {
63
- delta: v.object({
64
- id: marcoSchemas.string.required(),
65
- updatedAt: marcoSchemas.number.positiveInteger(),
66
- }),
67
- },
68
- createAttachment: {
69
- delta: v.object({
70
- attachment: attachmentSchema,
71
- id: marcoSchemas.string.required(),
72
- updatedAt: marcoSchemas.number.positiveInteger(),
73
- }),
74
- },
75
- createDraft: {
76
- delta: draftSchema,
77
- },
78
- deleteAttachment: {
79
- delta: v.object({
80
- attachmentId: marcoSchemas.string.required(),
81
- id: marcoSchemas.string.required(),
82
- updatedAt: marcoSchemas.number.positiveInteger(),
83
- }),
84
- },
85
- deleteDraft: {
86
- delta: v.object({
87
- id: marcoSchemas.string.required(),
88
- }),
89
- },
90
- scheduleSend: {
91
- delta: scheduleSchema,
92
- },
93
- // TODO: Remove/deprecate
94
- sendDraft: {
95
- delta: v.object({
96
- id: marcoSchemas.string.required(),
97
- updatedAt: marcoSchemas.number.positiveInteger(),
98
- }),
99
- },
100
- setContent: {
101
- delta: v.object({
102
- id: marcoSchemas.string.required(),
103
- patch: marcoSchemas.drafts.contentPatch.patch(),
104
- updatedAt: marcoSchemas.number.positiveInteger(),
105
- }),
106
- },
107
- setEnvelope: {
108
- delta: v.object({
109
- envelope: v.omit(bodySchema, ['content']),
110
- id: marcoSchemas.string.required(),
111
- updatedAt: marcoSchemas.number.positiveInteger(),
112
- }),
113
- },
114
- setFrom: {
115
- delta: v.object({
116
- aliasId: marcoSchemas.string.required(),
117
- emailAccountId: marcoSchemas.string.required(),
118
- from: marcoSchemas.string.email(),
119
- fromName: marcoSchemas.string.nullable(),
120
- id: marcoSchemas.string.required(),
121
- updatedAt: marcoSchemas.number.positiveInteger(),
122
- }),
123
- },
124
- uploadAttachmentChunk: {
125
- delta: v.object({
126
- attachmentId: marcoSchemas.string.required(),
127
- chunk: v.pipe(v.string(), v.base64()),
128
- chunkIndex: marcoSchemas.number.positiveInteger(),
129
- id: marcoSchemas.string.required(),
130
- }),
131
- },
132
- },
133
- name: 'draft',
134
- pullUrl: '/v1/pv/sync/pull/draft',
135
- pushUrl: '/v1/pv/sync/push/draft',
136
- schemaVersion: 'v1',
137
- };