@marcoappio/marco-config 4.0.12 → 4.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appwrite/appwrite.d.ts +35 -35
- package/dist/appwrite/appwrite.d.ts.map +1 -1
- package/dist/appwrite/appwrite.js +1 -2
- package/dist/appwrite/appwrite.test.js +18 -0
- package/dist/appwrite/commands.d.ts +5 -5
- package/dist/appwrite/commands.d.ts.map +1 -1
- package/dist/appwrite/commands.js +4 -6
- package/dist/appwrite/commands.test.js +18 -0
- package/dist/appwrite/functions.d.ts +12 -12
- package/dist/appwrite/functions.d.ts.map +1 -1
- package/dist/appwrite/functions.js +3 -9
- package/dist/appwrite/tableContract/identity.d.ts +2 -2
- package/dist/appwrite/tableContract/identity.d.ts.map +1 -1
- package/dist/appwrite/tableContract/identity.js +12 -12
- package/dist/appwrite/tableContract/index.d.ts +36 -36
- package/dist/appwrite/tableContract/index.js +3 -3
- package/dist/appwrite/tableContract/mailbox.d.ts +10 -10
- package/dist/appwrite/tableContract/mailbox.d.ts.map +1 -1
- package/dist/appwrite/tableContract/mailbox.js +12 -12
- package/dist/appwrite/tableContract/operational.d.ts +12 -12
- package/dist/appwrite/tableContract/operational.d.ts.map +1 -1
- package/dist/appwrite/tableContract/operational.js +12 -12
- package/dist/appwrite/tableContract/shared.d.ts +1 -7
- package/dist/appwrite/tableContract/shared.d.ts.map +1 -1
- package/dist/appwrite/tableContract/shared.js +1 -7
- package/dist/schemas/emailAccount.d.ts +6 -6
- package/dist/schemas/emailAccount.d.ts.map +1 -1
- package/dist/schemas/emailAccount.js +4 -4
- package/dist/schemas/index.d.ts +35 -34
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/models/account.d.ts +2 -2
- package/dist/schemas/models/account.js +3 -3
- package/dist/schemas/models/contact.d.ts +1 -1
- package/dist/schemas/models/draft.d.ts +8 -8
- package/dist/schemas/models/draft.js +1 -1
- package/dist/schemas/models/numericSemantics.test.d.ts +2 -0
- package/dist/schemas/models/numericSemantics.test.d.ts.map +1 -0
- package/dist/schemas/models/numericSemantics.test.js +24 -0
- package/dist/schemas/models/thread.d.ts +16 -16
- package/dist/schemas/models/thread.js +2 -2
- package/dist/schemas/number.d.ts +2 -1
- package/dist/schemas/number.d.ts.map +1 -1
- package/dist/schemas/number.js +3 -1
- package/dist/schemas/scalars.d.ts +13 -0
- package/dist/schemas/scalars.d.ts.map +1 -0
- package/dist/schemas/scalars.js +15 -0
- package/dist/schemas/scalars.test.d.ts +2 -0
- package/dist/schemas/scalars.test.d.ts.map +1 -0
- package/dist/schemas/scalars.test.js +44 -0
- package/dist/schemas/string.d.ts +1 -1
- package/dist/schemas/string.d.ts.map +1 -1
- package/dist/schemas/string.js +3 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export declare const threadMessageAttachmentSchema: v.ObjectSchema<{
|
|
|
7
7
|
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
8
8
|
}, undefined>;
|
|
9
9
|
export declare const threadMessageRecipientSchema: v.ObjectSchema<{
|
|
10
|
-
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
10
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
11
11
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RecipientId">]>, undefined>;
|
|
12
12
|
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
13
|
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
@@ -22,18 +22,18 @@ export declare const threadMessageSchema: v.ObjectSchema<{
|
|
|
22
22
|
readonly size: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
23
23
|
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
24
24
|
}, undefined>, undefined>;
|
|
25
|
-
readonly envelopeDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
25
|
+
readonly envelopeDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
26
26
|
readonly envelopeSubject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
27
27
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
28
28
|
readonly previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
29
29
|
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
30
|
-
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
30
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
31
31
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RecipientId">]>, undefined>;
|
|
32
32
|
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
33
|
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
34
34
|
readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
|
|
35
35
|
}, undefined>, undefined>;
|
|
36
|
-
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
36
|
+
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
37
37
|
readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
38
38
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
|
|
39
39
|
readonly unsubscribeUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -44,14 +44,14 @@ export declare const threadSchema: v.ObjectSchema<{
|
|
|
44
44
|
hasAttachments: v.BooleanSchema<undefined>;
|
|
45
45
|
id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
|
|
46
46
|
labelIdList: v.StringSchema<undefined>;
|
|
47
|
-
latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
47
|
+
latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
48
48
|
latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
49
49
|
messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
50
50
|
previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
51
51
|
seen: v.BooleanSchema<undefined>;
|
|
52
|
-
senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
52
|
+
senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
53
53
|
senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
54
|
-
snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
54
|
+
snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>, undefined>;
|
|
55
55
|
subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
56
56
|
userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
|
|
57
57
|
words: v.StringSchema<undefined>;
|
|
@@ -62,14 +62,14 @@ export declare const threadListSchema: v.ObjectSchema<{
|
|
|
62
62
|
hasAttachments: v.BooleanSchema<undefined>;
|
|
63
63
|
id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
|
|
64
64
|
labelIdList: v.StringSchema<undefined>;
|
|
65
|
-
latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
65
|
+
latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
66
66
|
latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
67
67
|
messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
68
68
|
previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
69
69
|
seen: v.BooleanSchema<undefined>;
|
|
70
|
-
senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
70
|
+
senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
71
71
|
senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
72
|
-
snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
72
|
+
snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>, undefined>;
|
|
73
73
|
subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
74
74
|
userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
|
|
75
75
|
words: v.StringSchema<undefined>;
|
|
@@ -84,18 +84,18 @@ export declare const threadFullSchema: v.ObjectSchema<{
|
|
|
84
84
|
readonly size: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
85
85
|
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
86
86
|
}, undefined>, undefined>;
|
|
87
|
-
readonly envelopeDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
87
|
+
readonly envelopeDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
88
88
|
readonly envelopeSubject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
89
89
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
90
90
|
readonly previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
91
91
|
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
92
|
-
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
92
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
93
93
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RecipientId">]>, undefined>;
|
|
94
94
|
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
95
95
|
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
96
96
|
readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
|
|
97
97
|
}, undefined>, undefined>;
|
|
98
|
-
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
98
|
+
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
99
99
|
readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
100
100
|
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
|
|
101
101
|
readonly unsubscribeUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -105,14 +105,14 @@ export declare const threadFullSchema: v.ObjectSchema<{
|
|
|
105
105
|
readonly hasAttachments: v.BooleanSchema<undefined>;
|
|
106
106
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
|
|
107
107
|
readonly labelIdList: v.StringSchema<undefined>;
|
|
108
|
-
readonly latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
108
|
+
readonly latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
109
109
|
readonly latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
|
|
110
110
|
readonly messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
111
111
|
readonly previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
112
112
|
readonly seen: v.BooleanSchema<undefined>;
|
|
113
|
-
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
113
|
+
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
114
114
|
readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
115
|
-
readonly snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number,
|
|
115
|
+
readonly snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>, undefined>;
|
|
116
116
|
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
117
117
|
readonly userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
|
|
118
118
|
readonly words: v.StringSchema<undefined>;
|
|
@@ -8,7 +8,7 @@ export const threadMessageAttachmentSchema = v.object({
|
|
|
8
8
|
fileName: string.required(),
|
|
9
9
|
id: id.attachmentId.required(),
|
|
10
10
|
mimeType: string.required(),
|
|
11
|
-
size: number.
|
|
11
|
+
size: number.nonNegativeInteger(),
|
|
12
12
|
threadMessageId: id.messageId.required(),
|
|
13
13
|
});
|
|
14
14
|
export const threadMessageRecipientSchema = v.object({
|
|
@@ -39,7 +39,7 @@ const threadBaseEntries = {
|
|
|
39
39
|
labelIdList: v.string(),
|
|
40
40
|
latestMessageDate: number.positiveInteger(),
|
|
41
41
|
latestMessageId: id.messageId.required(),
|
|
42
|
-
messageCount: number.
|
|
42
|
+
messageCount: number.nonNegativeInteger(),
|
|
43
43
|
previewText: string.required(messages.PREVIEW_TEXT_MAX_LENGTH),
|
|
44
44
|
seen: v.boolean(),
|
|
45
45
|
senderEmail: string.mailboxAddress(),
|
package/dist/schemas/number.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const number: {
|
|
3
3
|
minMax: (min: number, max: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
4
|
-
|
|
4
|
+
nonNegativeInteger: () => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
5
|
+
positiveInteger: () => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/schemas/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/schemas/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,MAAM;kBACH,MAAM,OAAO,MAAM;;;CAGlC,CAAA"}
|
package/dist/schemas/number.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { nonNegativeIntegerSchema, positiveIntegerSchema } from './scalars';
|
|
2
3
|
export const number = {
|
|
3
4
|
minMax: (min, max) => v.nonOptional(v.pipe(v.number(), v.minValue(min), v.maxValue(max))),
|
|
4
|
-
|
|
5
|
+
nonNegativeInteger: () => v.nonOptional(nonNegativeIntegerSchema),
|
|
6
|
+
positiveInteger: () => v.nonOptional(positiveIntegerSchema),
|
|
5
7
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const socketTypes: readonly ["SSL", "STARTTLS"];
|
|
3
|
+
export declare const socketTypeSchema: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
|
|
4
|
+
export declare const nonNegativeIntegerSchema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
5
|
+
export declare const positiveIntegerSchema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
6
|
+
export declare const portSchema: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.MaxValueAction<number, 65535, undefined>]>;
|
|
7
|
+
export declare const isoTimestampSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
8
|
+
export declare const canonicalTimestampSchema: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
9
|
+
export declare const webEmailSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
|
|
10
|
+
export declare const rfcEmailSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>;
|
|
11
|
+
export declare const mailboxAddressSchema: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>;
|
|
12
|
+
export declare const jsonObjectTextSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
|
|
13
|
+
//# sourceMappingURL=scalars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalars.d.ts","sourceRoot":"","sources":["../../src/schemas/scalars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,WAAW,8BAA+B,CAAA;AACvD,eAAO,MAAM,gBAAgB,2DAA0B,CAAA;AAEvD,eAAO,MAAM,wBAAwB,oIAAiD,CAAA;AACtF,eAAO,MAAM,qBAAqB,oIAAiD,CAAA;AACnF,eAAO,MAAM,UAAU,6MAAoD,CAAA;AAE3E,eAAO,MAAM,kBAAkB,iGAAuC,CAAA;AACtE,eAAO,MAAM,wBAAwB,gKAMpC,CAAA;AAED,eAAO,MAAM,cAAc,0FAAgC,CAAA;AAC3D,eAAO,MAAM,cAAc,6FAAmC,CAAA;AAC9D,eAAO,MAAM,oBAAoB,qKAA2C,CAAA;AAE5E,eAAO,MAAM,oBAAoB,gLAKhC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export const socketTypes = ['SSL', 'STARTTLS'];
|
|
3
|
+
export const socketTypeSchema = v.picklist(socketTypes);
|
|
4
|
+
export const nonNegativeIntegerSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
|
|
5
|
+
export const positiveIntegerSchema = v.pipe(v.number(), v.integer(), v.minValue(1));
|
|
6
|
+
export const portSchema = v.pipe(positiveIntegerSchema, v.maxValue(65_535));
|
|
7
|
+
export const isoTimestampSchema = v.pipe(v.string(), v.isoTimestamp());
|
|
8
|
+
export const canonicalTimestampSchema = v.pipe(isoTimestampSchema, v.check(timestamp => {
|
|
9
|
+
const milliseconds = Date.parse(timestamp);
|
|
10
|
+
return Number.isFinite(milliseconds) && new Date(milliseconds).toISOString() === timestamp;
|
|
11
|
+
}));
|
|
12
|
+
export const webEmailSchema = v.pipe(v.string(), v.email());
|
|
13
|
+
export const rfcEmailSchema = v.pipe(v.string(), v.rfcEmail());
|
|
14
|
+
export const mailboxAddressSchema = v.pipe(rfcEmailSchema, v.maxLength(320));
|
|
15
|
+
export const jsonObjectTextSchema = v.pipe(v.string(), v.parseJson(), v.check(value => !Array.isArray(value)), v.looseObject({}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalars.test.d.ts","sourceRoot":"","sources":["../../src/schemas/scalars.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { number } from './number';
|
|
4
|
+
import { canonicalTimestampSchema, isoTimestampSchema, jsonObjectTextSchema, mailboxAddressSchema, portSchema, rfcEmailSchema, socketTypeSchema, socketTypes, webEmailSchema, } from './scalars';
|
|
5
|
+
describe('scalar contracts', () => {
|
|
6
|
+
it('distinguishes non-negative and positive integers', () => {
|
|
7
|
+
expect(v.safeParse(number.nonNegativeInteger(), 0).success).toBe(true);
|
|
8
|
+
expect(v.safeParse(number.nonNegativeInteger(), -1).success).toBe(false);
|
|
9
|
+
expect(v.safeParse(number.nonNegativeInteger(), 0.5).success).toBe(false);
|
|
10
|
+
expect(v.safeParse(number.positiveInteger(), 0).success).toBe(false);
|
|
11
|
+
expect(v.safeParse(number.positiveInteger(), 1).success).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
it('validates ports and socket types', () => {
|
|
14
|
+
expect(socketTypes).toEqual(['SSL', 'STARTTLS']);
|
|
15
|
+
for (const value of [1, 65_535]) {
|
|
16
|
+
expect(v.safeParse(portSchema, value).success).toBe(true);
|
|
17
|
+
}
|
|
18
|
+
for (const value of [0, 1.5, 65_536]) {
|
|
19
|
+
expect(v.safeParse(portSchema, value).success).toBe(false);
|
|
20
|
+
}
|
|
21
|
+
expect(v.safeParse(socketTypeSchema, 'SSL').success).toBe(true);
|
|
22
|
+
expect(v.safeParse(socketTypeSchema, 'STARTTLS').success).toBe(true);
|
|
23
|
+
expect(v.safeParse(socketTypeSchema, 'PLAIN').success).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
it('keeps format-only and canonical timestamps distinct', () => {
|
|
26
|
+
expect(v.safeParse(isoTimestampSchema, '2026-06-31T12:00:30.000Z').success).toBe(true);
|
|
27
|
+
expect(v.safeParse(canonicalTimestampSchema, '2026-07-23T12:00:30.000Z').success).toBe(true);
|
|
28
|
+
expect(v.safeParse(canonicalTimestampSchema, '2026-06-31T12:00:30.000Z').success).toBe(false);
|
|
29
|
+
expect(v.safeParse(canonicalTimestampSchema, '2026-07-23T12:00:30.000+00:00').success).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
it('keeps strict web, RFC, and persisted mailbox email policies distinct', () => {
|
|
32
|
+
const maximumLengthMailboxAddress = `${'a'.repeat(64)}@${'b'.repeat(63)}.${'c'.repeat(63)}.${'d'.repeat(63)}.${'e'.repeat(63)}`;
|
|
33
|
+
expect(v.safeParse(webEmailSchema, 'sender@example').success).toBe(false);
|
|
34
|
+
expect(v.safeParse(rfcEmailSchema, 'sender@example').success).toBe(true);
|
|
35
|
+
expect(v.safeParse(mailboxAddressSchema, maximumLengthMailboxAddress).success).toBe(true);
|
|
36
|
+
expect(v.safeParse(mailboxAddressSchema, `a${maximumLengthMailboxAddress}`).success).toBe(false);
|
|
37
|
+
});
|
|
38
|
+
it('decodes JSON object text without accepting other JSON values', () => {
|
|
39
|
+
expect(v.safeParse(jsonObjectTextSchema, '{"key":"value"}').success).toBe(true);
|
|
40
|
+
for (const value of ['[]', 'null', '"value"', '1', 'invalid']) {
|
|
41
|
+
expect(v.safeParse(jsonObjectTextSchema, value).success).toBe(false);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
package/dist/schemas/string.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const string: {
|
|
3
3
|
email: () => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
4
|
-
mailboxAddress: () => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
4
|
+
mailboxAddress: () => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
|
|
5
5
|
nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
6
|
required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/schemas/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/schemas/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,MAAM;;;;;CAKlB,CAAA"}
|
package/dist/schemas/string.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { mailboxAddressSchema, rfcEmailSchema } from './scalars';
|
|
2
3
|
export const string = {
|
|
3
|
-
email: () => v.nonOptional(
|
|
4
|
-
mailboxAddress: () => v.nonOptional(
|
|
4
|
+
email: () => v.nonOptional(rfcEmailSchema),
|
|
5
|
+
mailboxAddress: () => v.nonOptional(mailboxAddressSchema),
|
|
5
6
|
nullable: (maxLength = 255) => v.nullable(v.pipe(v.string(), v.nonEmpty(), v.maxLength(maxLength))),
|
|
6
7
|
required: (maxLength = 255) => v.nonOptional(v.pipe(v.string(), v.nonEmpty(), v.maxLength(maxLength))),
|
|
7
8
|
};
|