@marcoappio/marco-config 2.0.414 → 2.0.416

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 (106) hide show
  1. package/dist/index.d.ts +3 -3
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/marcoPublicConfig.d.ts +14 -0
  5. package/dist/marcoPublicConfig.d.ts.map +1 -1
  6. package/dist/marcoPublicConfig.js +30 -0
  7. package/dist/schemas/app.d.ts +1 -1
  8. package/dist/schemas/app.d.ts.map +1 -1
  9. package/dist/schemas/app.js +2 -1
  10. package/dist/schemas/emailAccount.d.ts +1 -1
  11. package/dist/schemas/index.d.ts +3 -3
  12. package/dist/schemas/oauth.d.ts +1 -1
  13. package/dist/schemas/oauth.d.ts.map +1 -1
  14. package/dist/schemas/oauth.js +2 -1
  15. package/dist/sdk/endpoints/index.d.ts +186 -0
  16. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  17. package/dist/sdk/endpoints/index.js +2 -0
  18. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts +21 -0
  19. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts.map +1 -0
  20. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.js +16 -0
  21. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts +19 -0
  22. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts.map +1 -0
  23. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.js +19 -0
  24. package/dist/sdk/endpoints/private/emailMessage/index.d.ts +39 -0
  25. package/dist/sdk/endpoints/private/emailMessage/index.d.ts.map +1 -0
  26. package/dist/sdk/endpoints/private/emailMessage/index.js +6 -0
  27. package/dist/sdk/endpoints/private/index.d.ts +51 -0
  28. package/dist/sdk/endpoints/private/index.d.ts.map +1 -0
  29. package/dist/sdk/endpoints/private/index.js +6 -0
  30. package/dist/sdk/endpoints/private/user/deleteUser.d.ts +10 -0
  31. package/dist/sdk/endpoints/private/user/deleteUser.d.ts.map +1 -0
  32. package/dist/sdk/endpoints/private/user/deleteUser.js +13 -0
  33. package/dist/sdk/endpoints/private/user/index.d.ts +11 -0
  34. package/dist/sdk/endpoints/private/user/index.d.ts.map +1 -0
  35. package/dist/sdk/endpoints/private/user/index.js +4 -0
  36. package/dist/sdk/endpoints/public/auth/index.d.ts +137 -0
  37. package/dist/sdk/endpoints/public/auth/index.d.ts.map +1 -0
  38. package/dist/sdk/endpoints/public/auth/index.js +8 -0
  39. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts +41 -0
  40. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts.map +1 -0
  41. package/dist/sdk/endpoints/public/auth/refreshAuth.js +33 -0
  42. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts +27 -0
  43. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts.map +1 -0
  44. package/dist/sdk/endpoints/public/auth/sendAuthCode.js +19 -0
  45. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts +72 -0
  46. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts.map +1 -0
  47. package/dist/sdk/endpoints/public/auth/verifyAuthCode.js +37 -0
  48. package/dist/sdk/endpoints/public/index.d.ts +136 -0
  49. package/dist/sdk/endpoints/public/index.d.ts.map +1 -1
  50. package/dist/sdk/endpoints/public/index.js +2 -0
  51. package/dist/sdk/index.d.ts +186 -0
  52. package/dist/sdk/index.d.ts.map +1 -1
  53. package/dist/types/Endpoint.d.ts +2 -1
  54. package/dist/types/Endpoint.d.ts.map +1 -1
  55. package/dist/types/MarcoPlatform.d.ts +3 -0
  56. package/dist/types/MarcoPlatform.d.ts.map +1 -0
  57. package/dist/types/MarcoPlatform.js +1 -0
  58. package/dist/types/OAuthProvider.d.ts +3 -0
  59. package/dist/types/OAuthProvider.d.ts.map +1 -0
  60. package/dist/types/OAuthProvider.js +1 -0
  61. package/dist/types/SDKError.d.ts +4 -0
  62. package/dist/types/SDKError.d.ts.map +1 -0
  63. package/dist/types/SDKError.js +1 -0
  64. package/dist/types/index.d.ts +3 -0
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/dist/types/index.js +3 -0
  67. package/dist/utils/index.d.ts +1 -0
  68. package/dist/utils/index.d.ts.map +1 -1
  69. package/dist/utils/index.js +1 -0
  70. package/dist/utils/labels/index.d.ts +4 -0
  71. package/dist/utils/labels/index.d.ts.map +1 -0
  72. package/dist/utils/labels/index.js +4 -0
  73. package/dist/zero/index.d.ts +1448 -0
  74. package/dist/zero/index.d.ts.map +1 -0
  75. package/dist/zero/index.js +13 -0
  76. package/dist/zero/mutators/account.d.ts +109 -0
  77. package/dist/zero/mutators/account.d.ts.map +1 -0
  78. package/dist/zero/mutators/account.js +69 -0
  79. package/dist/zero/mutators/draft.d.ts +162 -0
  80. package/dist/zero/mutators/draft.d.ts.map +1 -0
  81. package/dist/zero/mutators/draft.js +114 -0
  82. package/dist/zero/mutators/thread.d.ts +78 -0
  83. package/dist/zero/mutators/thread.d.ts.map +1 -0
  84. package/dist/zero/mutators/thread.js +76 -0
  85. package/dist/zero/mutators/user.d.ts +32 -0
  86. package/dist/zero/mutators/user.d.ts.map +1 -0
  87. package/dist/zero/mutators/user.js +33 -0
  88. package/dist/zero/mutators.d.ts +412 -0
  89. package/dist/zero/mutators.d.ts.map +1 -0
  90. package/dist/zero/mutators.js +44 -0
  91. package/dist/zero/mutators.test.d.ts +2 -0
  92. package/dist/zero/mutators.test.d.ts.map +1 -0
  93. package/dist/zero/mutators.test.js +33 -0
  94. package/dist/zero/schema.d.ts +1438 -0
  95. package/dist/zero/schema.d.ts.map +1 -0
  96. package/dist/zero/schema.js +430 -0
  97. package/package.json +2 -2
  98. package/dist/instantDB/index.d.ts +0 -3
  99. package/dist/instantDB/index.d.ts.map +0 -1
  100. package/dist/instantDB/index.js +0 -2
  101. package/dist/instantDB/instant.perms.d.ts +0 -134
  102. package/dist/instantDB/instant.perms.d.ts.map +0 -1
  103. package/dist/instantDB/instant.perms.js +0 -133
  104. package/dist/instantDB/instant.schema.d.ts +0 -338
  105. package/dist/instantDB/instant.schema.d.ts.map +0 -1
  106. package/dist/instantDB/instant.schema.js +0 -180
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIZ,CAAA;AAEV,YAAY,EACV,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { createMutators } from './mutators';
2
+ import { schema, zeroTables } from './schema';
3
+ export const marcoZero = {
4
+ createMutators,
5
+ schema,
6
+ tables: zeroTables,
7
+ };
8
+ export { createMutators, ZeroMutatorValidationError, zeroMutatorSchemas, } from './mutators';
9
+ export { accountMutatorDefinitions } from './mutators/account';
10
+ export { draftMutatorDefinitions } from './mutators/draft';
11
+ export { threadMutatorDefinitions } from './mutators/thread';
12
+ export { userMutatorDefinitions } from './mutators/user';
13
+ export { schema, zeroTables } from './schema';
@@ -0,0 +1,109 @@
1
+ import * as v from 'valibot';
2
+ export declare const accountMutatorDefinitions: {
3
+ readonly createAccount: {
4
+ readonly delta: v.ObjectSchema<{
5
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
+ readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
+ readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
8
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
9
+ }, undefined>;
10
+ };
11
+ readonly createAlias: {
12
+ readonly delta: v.ObjectSchema<{
13
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
14
+ readonly alias: v.ObjectSchema<{
15
+ readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
16
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
17
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
18
+ }, undefined>;
19
+ }, undefined>;
20
+ };
21
+ readonly deleteAccount: {
22
+ readonly delta: v.ObjectSchema<{
23
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
24
+ }, undefined>;
25
+ };
26
+ readonly deleteAlias: {
27
+ readonly delta: v.ObjectSchema<{
28
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
29
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
30
+ }, undefined>;
31
+ };
32
+ readonly setAliasName: {
33
+ readonly delta: v.ObjectSchema<{
34
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
35
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
36
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
37
+ }, undefined>;
38
+ };
39
+ readonly setAliasPrimary: {
40
+ readonly delta: v.ObjectSchema<{
41
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
42
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
43
+ }, undefined>;
44
+ };
45
+ readonly setConnectionConfigImapRaw: {
46
+ readonly delta: v.ObjectSchema<{
47
+ readonly connectionConfig: v.ObjectSchema<{
48
+ readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
49
+ readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
50
+ readonly imapPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
51
+ readonly imapSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
52
+ readonly imapUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
53
+ readonly smtpHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
54
+ readonly smtpPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
55
+ readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
56
+ readonly smtpSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
57
+ readonly smtpUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
58
+ }, undefined>;
59
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
60
+ }, undefined>;
61
+ };
62
+ readonly setConnectionConfigOauth: {
63
+ readonly delta: v.ObjectSchema<{
64
+ readonly connectionConfig: v.ObjectSchema<{
65
+ readonly code: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
66
+ readonly provider: v.PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
67
+ readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
68
+ }, undefined>;
69
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
70
+ }, undefined>;
71
+ };
72
+ readonly setSettings: {
73
+ readonly delta: v.ObjectSchema<{
74
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
75
+ readonly settings: Omit<v.ObjectSchema<{
76
+ readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
77
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
78
+ }, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
79
+ readonly entries: {
80
+ readonly color: v.OptionalSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
81
+ readonly name: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
82
+ };
83
+ readonly '~standard': v.StandardProps<{
84
+ color?: string | undefined;
85
+ name?: string | null | undefined;
86
+ }, {
87
+ color?: string | undefined;
88
+ name?: string | null | undefined;
89
+ }>;
90
+ readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
91
+ color?: string | undefined;
92
+ name?: string | null | undefined;
93
+ }, v.StringIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.NonOptionalIssue>;
94
+ readonly '~types'?: {
95
+ readonly input: {
96
+ color?: string | undefined;
97
+ name?: string | null | undefined;
98
+ };
99
+ readonly output: {
100
+ color?: string | undefined;
101
+ name?: string | null | undefined;
102
+ };
103
+ readonly issue: v.StringIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.NonOptionalIssue;
104
+ } | undefined;
105
+ };
106
+ }, undefined>;
107
+ };
108
+ };
109
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyD5B,CAAA"}
@@ -0,0 +1,69 @@
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 accountAliasSchema = v.object({
8
+ emailAddress: marcoSchemas.string.email(),
9
+ id: marcoSchemas.string.required(),
10
+ name: marcoSchemas.string.nullable(),
11
+ });
12
+ export const accountMutatorDefinitions = {
13
+ createAccount: {
14
+ delta: v.object({
15
+ aliasId: marcoSchemas.string.required(),
16
+ color: marcoSchemas.string.required(),
17
+ emailAddress: marcoSchemas.string.email(),
18
+ id: marcoSchemas.string.required(),
19
+ }),
20
+ },
21
+ createAlias: {
22
+ delta: v.object({
23
+ accountId: marcoSchemas.string.required(),
24
+ alias: accountAliasSchema,
25
+ }),
26
+ },
27
+ deleteAccount: {
28
+ delta: v.object({
29
+ id: marcoSchemas.string.required(),
30
+ }),
31
+ },
32
+ deleteAlias: {
33
+ delta: v.object({
34
+ accountId: marcoSchemas.string.required(),
35
+ aliasId: marcoSchemas.string.required(),
36
+ }),
37
+ },
38
+ setAliasName: {
39
+ delta: v.object({
40
+ accountId: marcoSchemas.string.required(),
41
+ aliasId: marcoSchemas.string.required(),
42
+ name: marcoSchemas.string.nullable(),
43
+ }),
44
+ },
45
+ setAliasPrimary: {
46
+ delta: v.object({
47
+ accountId: marcoSchemas.string.required(),
48
+ aliasId: marcoSchemas.string.required(),
49
+ }),
50
+ },
51
+ setConnectionConfigImapRaw: {
52
+ delta: v.object({
53
+ connectionConfig: marcoSchemas.emailAccount.connectionConfigImapRaw(),
54
+ id: marcoSchemas.string.required(),
55
+ }),
56
+ },
57
+ setConnectionConfigOauth: {
58
+ delta: v.object({
59
+ connectionConfig: marcoSchemas.emailAccount.connectionConfigOauth(),
60
+ id: marcoSchemas.string.required(),
61
+ }),
62
+ },
63
+ setSettings: {
64
+ delta: v.object({
65
+ id: marcoSchemas.string.required(),
66
+ settings: v.partial(accountSettingsSchema),
67
+ }),
68
+ },
69
+ };
@@ -0,0 +1,162 @@
1
+ import * as v from 'valibot';
2
+ export declare const draftMutatorDefinitions: {
3
+ readonly cancelSend: {
4
+ readonly delta: v.ObjectSchema<{
5
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7
+ }, undefined>;
8
+ };
9
+ readonly createAttachment: {
10
+ readonly delta: v.ObjectSchema<{
11
+ readonly attachment: v.ObjectSchema<{
12
+ readonly failed: v.BooleanSchema<undefined>;
13
+ readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
14
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
15
+ readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
16
+ readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
17
+ readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
18
+ readonly uploadedChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
19
+ }, undefined>;
20
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
21
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
22
+ }, undefined>;
23
+ };
24
+ readonly createDraft: {
25
+ readonly delta: v.ObjectSchema<{
26
+ readonly attachments: v.ArraySchema<v.ObjectSchema<{
27
+ readonly failed: v.BooleanSchema<undefined>;
28
+ readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
29
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
30
+ readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
31
+ readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
32
+ readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
33
+ readonly uploadedChunks: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
34
+ }, undefined>, undefined>;
35
+ readonly body: v.ObjectSchema<{
36
+ readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
37
+ readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
38
+ readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
39
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
40
+ readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
41
+ }, undefined>;
42
+ readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
43
+ readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
44
+ readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
45
+ readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, 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 referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
48
+ readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
49
+ readonly status: v.PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
50
+ readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
51
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
52
+ }, undefined>;
53
+ };
54
+ readonly deleteAttachment: {
55
+ readonly delta: v.ObjectSchema<{
56
+ readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
57
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
58
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
59
+ }, undefined>;
60
+ };
61
+ readonly deleteDraft: {
62
+ readonly delta: v.ObjectSchema<{
63
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
64
+ }, undefined>;
65
+ };
66
+ readonly scheduleSend: {
67
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
68
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
69
+ readonly kind: v.LiteralSchema<"IMMEDIATE", undefined>;
70
+ readonly undoMs: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
71
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
72
+ }, undefined>, v.ObjectSchema<{
73
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
74
+ readonly kind: v.LiteralSchema<"SCHEDULED", undefined>;
75
+ readonly scheduledFor: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
76
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
77
+ }, undefined>], undefined>;
78
+ };
79
+ readonly setContent: {
80
+ readonly delta: v.ObjectSchema<{
81
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
82
+ readonly patch: v.ArraySchema<v.ObjectSchema<{
83
+ readonly index: v.NumberSchema<undefined>;
84
+ readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
85
+ readonly value: v.StringSchema<undefined>;
86
+ }, 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
+ readonly setEnvelope: {
91
+ readonly delta: v.ObjectSchema<{
92
+ readonly envelope: Omit<v.ObjectSchema<{
93
+ readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
94
+ readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
95
+ readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
96
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
97
+ readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
98
+ }, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
99
+ readonly entries: Omit<{
100
+ readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
101
+ readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
102
+ readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
103
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
104
+ readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
105
+ }, "content">;
106
+ readonly '~standard': v.StandardProps<{
107
+ bcc: string[];
108
+ cc: string[];
109
+ to: string[];
110
+ subject: string | null;
111
+ }, {
112
+ bcc: string[];
113
+ cc: string[];
114
+ to: string[];
115
+ subject: string | null;
116
+ }>;
117
+ readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
118
+ bcc: string[];
119
+ cc: string[];
120
+ to: string[];
121
+ subject: string | null;
122
+ }, v.StringIssue | v.EmailIssue<string> | v.MaxLengthIssue<string, 255> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue>;
123
+ readonly '~types'?: {
124
+ readonly input: {
125
+ bcc: string[];
126
+ cc: string[];
127
+ to: string[];
128
+ subject: string | null;
129
+ };
130
+ readonly output: {
131
+ bcc: string[];
132
+ cc: string[];
133
+ to: string[];
134
+ subject: string | null;
135
+ };
136
+ readonly issue: v.StringIssue | v.EmailIssue<string> | v.MaxLengthIssue<string, 255> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue;
137
+ } | undefined;
138
+ };
139
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
140
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
141
+ }, undefined>;
142
+ };
143
+ readonly setFrom: {
144
+ readonly delta: v.ObjectSchema<{
145
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
146
+ readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
147
+ readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
148
+ readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
149
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
150
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
151
+ }, undefined>;
152
+ };
153
+ readonly uploadAttachmentChunk: {
154
+ readonly delta: v.ObjectSchema<{
155
+ readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
156
+ readonly chunk: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
157
+ readonly chunkIndex: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
158
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
159
+ }, undefined>;
160
+ };
161
+ };
162
+ //# sourceMappingURL=draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwD5B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE1B,CAAA"}
@@ -0,0 +1,114 @@
1
+ import * as v from 'valibot';
2
+ import { marcoSchemas } from '../../schemas';
3
+ import { DRAFT_STATUSES, DRAFT_TYPES } from '../../types';
4
+ const draftStatusSchema = v.picklist(DRAFT_STATUSES);
5
+ const draftTypeSchema = v.picklist(DRAFT_TYPES);
6
+ const draftBodySchema = v.object({
7
+ bcc: v.array(marcoSchemas.string.email()),
8
+ cc: v.array(marcoSchemas.string.email()),
9
+ content: v.pipe(v.string(), v.maxLength(384000)),
10
+ subject: marcoSchemas.string.nullable(),
11
+ to: v.array(marcoSchemas.string.email()),
12
+ });
13
+ const draftAttachmentSchema = v.object({
14
+ failed: v.boolean(),
15
+ fileName: marcoSchemas.string.required(),
16
+ id: marcoSchemas.string.required(),
17
+ mimeType: marcoSchemas.string.required(),
18
+ totalChunks: marcoSchemas.number.positiveInteger(),
19
+ totalSize: marcoSchemas.number.positiveInteger(),
20
+ uploadedChunks: marcoSchemas.number.positiveInteger(),
21
+ });
22
+ const draftScheduleSchema = v.union([
23
+ v.object({
24
+ id: marcoSchemas.string.required(),
25
+ kind: v.literal('IMMEDIATE'),
26
+ undoMs: marcoSchemas.number.positiveInteger(),
27
+ updatedAt: marcoSchemas.number.positiveInteger(),
28
+ }),
29
+ v.object({
30
+ id: marcoSchemas.string.required(),
31
+ kind: v.literal('SCHEDULED'),
32
+ scheduledFor: marcoSchemas.number.positiveInteger(),
33
+ updatedAt: marcoSchemas.number.positiveInteger(),
34
+ }),
35
+ ]);
36
+ const draftModelSchema = v.object({
37
+ attachments: v.array(draftAttachmentSchema),
38
+ body: draftBodySchema,
39
+ emailAccountId: marcoSchemas.string.required(),
40
+ error: marcoSchemas.string.nullable(),
41
+ from: marcoSchemas.string.email(),
42
+ fromName: marcoSchemas.string.nullable(),
43
+ id: marcoSchemas.string.required(),
44
+ referencedMessageId: marcoSchemas.string.nullable(),
45
+ scheduledFor: v.nullable(marcoSchemas.number.positiveInteger()),
46
+ status: draftStatusSchema,
47
+ type: draftTypeSchema,
48
+ updatedAt: marcoSchemas.number.positiveInteger(),
49
+ });
50
+ export const draftMutatorDefinitions = {
51
+ cancelSend: {
52
+ delta: v.object({
53
+ id: marcoSchemas.string.required(),
54
+ updatedAt: marcoSchemas.number.positiveInteger(),
55
+ }),
56
+ },
57
+ createAttachment: {
58
+ delta: v.object({
59
+ attachment: draftAttachmentSchema,
60
+ id: marcoSchemas.string.required(),
61
+ updatedAt: marcoSchemas.number.positiveInteger(),
62
+ }),
63
+ },
64
+ createDraft: {
65
+ delta: draftModelSchema,
66
+ },
67
+ deleteAttachment: {
68
+ delta: v.object({
69
+ attachmentId: marcoSchemas.string.required(),
70
+ id: marcoSchemas.string.required(),
71
+ updatedAt: marcoSchemas.number.positiveInteger(),
72
+ }),
73
+ },
74
+ deleteDraft: {
75
+ delta: v.object({
76
+ id: marcoSchemas.string.required(),
77
+ }),
78
+ },
79
+ scheduleSend: {
80
+ delta: draftScheduleSchema,
81
+ },
82
+ setContent: {
83
+ delta: v.object({
84
+ id: marcoSchemas.string.required(),
85
+ patch: marcoSchemas.drafts.contentPatch.patch(),
86
+ updatedAt: marcoSchemas.number.positiveInteger(),
87
+ }),
88
+ },
89
+ setEnvelope: {
90
+ delta: v.object({
91
+ envelope: v.omit(draftBodySchema, ['content']),
92
+ id: marcoSchemas.string.required(),
93
+ updatedAt: marcoSchemas.number.positiveInteger(),
94
+ }),
95
+ },
96
+ setFrom: {
97
+ delta: v.object({
98
+ aliasId: marcoSchemas.string.required(),
99
+ emailAccountId: marcoSchemas.string.required(),
100
+ from: marcoSchemas.string.email(),
101
+ fromName: marcoSchemas.string.nullable(),
102
+ id: marcoSchemas.string.required(),
103
+ updatedAt: marcoSchemas.number.positiveInteger(),
104
+ }),
105
+ },
106
+ uploadAttachmentChunk: {
107
+ delta: v.object({
108
+ attachmentId: marcoSchemas.string.required(),
109
+ chunk: v.pipe(v.string(), v.base64()),
110
+ chunkIndex: marcoSchemas.number.positiveInteger(),
111
+ id: marcoSchemas.string.required(),
112
+ }),
113
+ },
114
+ };
@@ -0,0 +1,78 @@
1
+ import * as v from 'valibot';
2
+ export declare const threadMutatorDefinitions: {
3
+ readonly addLabel: {
4
+ readonly delta: v.ObjectSchema<{
5
+ readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
7
+ }, undefined>;
8
+ };
9
+ readonly delete: {
10
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
11
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
12
+ }, undefined>, v.ObjectSchema<{
13
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
14
+ }, undefined>], undefined>;
15
+ };
16
+ readonly removeLabel: {
17
+ readonly delta: v.ObjectSchema<{
18
+ readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
19
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
20
+ }, undefined>;
21
+ };
22
+ readonly requestAttachmentDownload: {
23
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
24
+ readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
25
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
26
+ }, undefined>, v.ObjectSchema<{
27
+ readonly attachmentIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
28
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
29
+ }, undefined>], undefined>;
30
+ };
31
+ readonly setArchive: {
32
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
33
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
34
+ }, undefined>, v.ObjectSchema<{
35
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
36
+ }, undefined>], undefined>;
37
+ };
38
+ readonly setFlagged: {
39
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
40
+ readonly flagged: v.NonOptionalSchema<v.BooleanSchema<undefined>, undefined>;
41
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
42
+ }, undefined>, v.ObjectSchema<{
43
+ readonly flagged: v.NonOptionalSchema<v.BooleanSchema<undefined>, undefined>;
44
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
45
+ }, undefined>], undefined>;
46
+ };
47
+ readonly setInbox: {
48
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
49
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
50
+ }, undefined>, v.ObjectSchema<{
51
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
52
+ }, undefined>], undefined>;
53
+ };
54
+ readonly setSeen: {
55
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
56
+ readonly seen: v.BooleanSchema<undefined>;
57
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
58
+ }, undefined>, v.ObjectSchema<{
59
+ readonly seen: v.BooleanSchema<undefined>;
60
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
61
+ }, undefined>], undefined>;
62
+ };
63
+ readonly setSpam: {
64
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
65
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
66
+ }, undefined>, v.ObjectSchema<{
67
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
68
+ }, undefined>], undefined>;
69
+ };
70
+ readonly setTrash: {
71
+ readonly delta: v.UnionSchema<[v.ObjectSchema<{
72
+ readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
73
+ }, undefined>, v.ObjectSchema<{
74
+ readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
75
+ }, undefined>], undefined>;
76
+ };
77
+ };
78
+ //# sourceMappingURL=thread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAmD5B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B3B,CAAA"}