@marcoappio/marco-config 4.0.16 → 4.0.17
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/commands.d.ts +20 -20
- package/dist/appwrite/functions.d.ts +10 -10
- package/dist/appwrite/tableContract/identity.d.ts +0 -235
- package/dist/appwrite/tableContract/identity.d.ts.map +1 -1
- package/dist/appwrite/tableContract/identity.js +122 -146
- package/dist/appwrite/tableContract/index.d.ts +0 -92
- package/dist/appwrite/tableContract/index.d.ts.map +1 -1
- package/dist/appwrite/tableContract/index.js +18 -5
- package/dist/appwrite/tableContract/index.test.js +36 -0
- package/dist/appwrite/tableContract/mailbox.d.ts +0 -323
- package/dist/appwrite/tableContract/mailbox.d.ts.map +1 -1
- package/dist/appwrite/tableContract/mailbox.js +159 -180
- package/dist/appwrite/tableContract/operational.d.ts +0 -275
- package/dist/appwrite/tableContract/operational.d.ts.map +1 -1
- package/dist/appwrite/tableContract/operational.js +154 -178
- package/dist/appwrite/tableContract/shared.d.ts +13 -6
- package/dist/appwrite/tableContract/shared.d.ts.map +1 -1
- package/dist/appwrite/tableContract/shared.js +1 -1
- package/package.json +1 -1
|
@@ -1,191 +1,170 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
/* oxlint-disable eslint/sort-keys */
|
|
3
|
-
import { appwriteColumnDefinitions,
|
|
3
|
+
import { appwriteColumnDefinitions, appwriteRelationship, appwriteRelationshipIdSchema, canonicalTimestampSchema, defineAppwriteTableGroup, draftStates, draftTypes, identifierSchema, mailboxAddressSchema, messageLocationCoordinateCheck, nonNegativeIntegerSchema, positiveIntegerSchema, isoTimestampSchema, } from './shared';
|
|
4
4
|
const { bigint, boolean, dateTime, enumValue, identifier, integer, longText, string: stringColumn, stringArray, text } = appwriteColumnDefinitions;
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export const mailboxTableInputs = defineAppwriteTableGroup({
|
|
6
|
+
contacts: {
|
|
7
|
+
fields: {
|
|
8
|
+
normalisedAddress: stringColumn(mailboxAddressSchema, true, 320),
|
|
9
|
+
displayName: stringColumn(v.nullable(identifierSchema), false),
|
|
10
|
+
lastContactedAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
11
|
+
messageCount: integer(nonNegativeIntegerSchema),
|
|
12
|
+
profileAssignmentKey: identifier(identifierSchema),
|
|
13
|
+
searchText: text(v.string()),
|
|
14
|
+
profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
|
|
15
|
+
},
|
|
16
|
+
indexes: [
|
|
17
|
+
{ attributes: ['profileAssignmentKey', 'lastContactedAt'], name: 'assignment_profile_last_contacted', type: 'key' },
|
|
18
|
+
{ attributes: ['profileAssignmentKey', 'normalisedAddress'], name: 'assignment_profile_address_unique', type: 'unique' },
|
|
19
|
+
{ attributes: ['searchText'], name: 'search', type: 'fulltext' },
|
|
20
|
+
],
|
|
21
|
+
name: 'Contacts',
|
|
12
22
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
drafts: {
|
|
24
|
+
fields: {
|
|
25
|
+
accountAssignmentKey: identifier(identifierSchema),
|
|
26
|
+
type: enumValue(v.picklist(draftTypes), draftTypes),
|
|
27
|
+
envelope: text(v.string()),
|
|
28
|
+
html: longText(v.string()),
|
|
29
|
+
attachmentMetadata: text(v.string()),
|
|
30
|
+
contentHash: stringColumn(identifierSchema),
|
|
31
|
+
scheduledAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
32
|
+
status: enumValue(v.picklist(draftStates), draftStates),
|
|
33
|
+
revision: integer(nonNegativeIntegerSchema),
|
|
34
|
+
sequence: integer(nonNegativeIntegerSchema),
|
|
35
|
+
executionLeaseId: stringColumn(v.nullable(identifierSchema), false),
|
|
36
|
+
executionLeaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
37
|
+
errorCode: stringColumn(v.nullable(identifierSchema), false),
|
|
38
|
+
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
39
|
+
fromAlias: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'aliases', 'manyToOne', 'setNull'),
|
|
40
|
+
referencedMessage: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'messages', 'manyToOne', 'setNull'),
|
|
41
|
+
},
|
|
42
|
+
indexes: [
|
|
43
|
+
{ attributes: ['accountAssignmentKey'], name: 'assignment_account', type: 'key' },
|
|
44
|
+
{ attributes: ['accountAssignmentKey', 'status'], name: 'assignment_account_status', type: 'key' },
|
|
45
|
+
{ attributes: ['scheduledAt'], name: 'scheduled', type: 'key' },
|
|
46
|
+
],
|
|
47
|
+
name: 'Drafts',
|
|
36
48
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
messageLocations: {
|
|
50
|
+
dataCheck: messageLocationCoordinateCheck,
|
|
51
|
+
fields: {
|
|
52
|
+
accountAssignmentKey: identifier(identifierSchema),
|
|
53
|
+
flagged: boolean(v.boolean()),
|
|
54
|
+
labelAssignmentKey: identifier(identifierSchema),
|
|
55
|
+
messageAt: dateTime(isoTimestampSchema),
|
|
56
|
+
seen: boolean(v.boolean()),
|
|
57
|
+
threadAssignmentKey: identifier(identifierSchema),
|
|
58
|
+
uid: bigint(v.nullable(positiveIntegerSchema), false),
|
|
59
|
+
uidValidity: bigint(v.nullable(positiveIntegerSchema), false),
|
|
60
|
+
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
61
|
+
label: appwriteRelationship(appwriteRelationshipIdSchema, 'labels'),
|
|
62
|
+
message: appwriteRelationship(appwriteRelationshipIdSchema, 'messages'),
|
|
63
|
+
thread: appwriteRelationship(appwriteRelationshipIdSchema, 'threads'),
|
|
64
|
+
},
|
|
65
|
+
indexes: [
|
|
66
|
+
{ attributes: ['accountAssignmentKey', 'labelAssignmentKey', 'uidValidity', 'uid'], name: 'assignment_account_label_uid', type: 'key' },
|
|
67
|
+
{ attributes: ['accountAssignmentKey', 'threadAssignmentKey'], name: 'assignment_account_thread', type: 'key' },
|
|
68
|
+
{ attributes: ['threadAssignmentKey', 'labelAssignmentKey', 'messageAt'], name: 'assignment_thread_label_latest', type: 'key' },
|
|
69
|
+
],
|
|
70
|
+
name: 'Message locations',
|
|
55
71
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
messages: {
|
|
73
|
+
fields: {
|
|
74
|
+
accountAssignmentKey: identifier(identifierSchema),
|
|
75
|
+
providerId: stringColumn(identifierSchema),
|
|
76
|
+
rfcMessageId: stringColumn(v.nullable(identifierSchema), false),
|
|
77
|
+
sender: text(v.nullable(v.string()), false),
|
|
78
|
+
senderName: text(v.nullable(v.string()), false),
|
|
79
|
+
recipients: text(v.nullable(v.string()), false),
|
|
80
|
+
sentAt: dateTime(isoTimestampSchema),
|
|
81
|
+
receivedAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
82
|
+
preview: text(v.nullable(v.string()), false),
|
|
83
|
+
attachmentMetadata: longText(v.string()),
|
|
84
|
+
htmlFileId: stringColumn(v.nullable(identifierSchema), false),
|
|
85
|
+
rawFileId: stringColumn(v.nullable(identifierSchema), false),
|
|
86
|
+
size: integer(nonNegativeIntegerSchema),
|
|
87
|
+
subject: text(v.nullable(v.string()), false),
|
|
88
|
+
revision: integer(nonNegativeIntegerSchema),
|
|
89
|
+
threadAssignmentKey: identifier(identifierSchema),
|
|
90
|
+
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
91
|
+
thread: appwriteRelationship(appwriteRelationshipIdSchema, 'threads'),
|
|
92
|
+
},
|
|
93
|
+
indexes: [
|
|
94
|
+
{ attributes: ['threadAssignmentKey', 'sentAt'], name: 'assignment_thread_sent', type: 'key' },
|
|
95
|
+
{ attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
|
|
96
|
+
{ attributes: ['accountAssignmentKey', 'rfcMessageId'], name: 'assignment_account_rfc_message', type: 'key' },
|
|
97
|
+
],
|
|
98
|
+
name: 'Messages',
|
|
83
99
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
subject: text(v.nullable(v.string()), false),
|
|
98
|
-
firstMessageAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
99
|
-
senderEmail: stringColumn(v.nullable(mailboxAddressSchema), false, 320),
|
|
100
|
-
senderName: stringColumn(v.nullable(identifierSchema), false),
|
|
101
|
-
preview: text(v.nullable(v.string()), false),
|
|
102
|
-
participants: text(v.nullable(v.string()), false),
|
|
103
|
-
labelIds: stringArray(v.array(identifierSchema), true, 36),
|
|
104
|
-
latestMessageAt: dateTime(isoTimestampSchema),
|
|
105
|
-
latestMessageId: identifier(identifierSchema),
|
|
106
|
-
messageCount: integer(nonNegativeIntegerSchema),
|
|
107
|
-
hasAttachments: boolean(v.boolean()),
|
|
108
|
-
unseenLocationCount: integer(nonNegativeIntegerSchema),
|
|
109
|
-
flaggedLocationCount: integer(nonNegativeIntegerSchema),
|
|
110
|
-
seen: boolean(v.boolean()),
|
|
111
|
-
flagged: boolean(v.boolean()),
|
|
112
|
-
archived: boolean(v.boolean()),
|
|
113
|
-
spam: boolean(v.boolean()),
|
|
114
|
-
trashed: boolean(v.boolean()),
|
|
115
|
-
snoozedUntil: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
116
|
-
revision: integer(nonNegativeIntegerSchema),
|
|
117
|
-
searchText: text(v.nullable(v.string()), false),
|
|
118
|
-
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
100
|
+
threadAliases: {
|
|
101
|
+
fields: {
|
|
102
|
+
aliasAssignmentKey: identifier(identifierSchema),
|
|
103
|
+
latestMessageAt: dateTime(isoTimestampSchema),
|
|
104
|
+
threadAssignmentKey: identifier(identifierSchema),
|
|
105
|
+
alias: appwriteRelationship(appwriteRelationshipIdSchema, 'aliases'),
|
|
106
|
+
thread: appwriteRelationship(appwriteRelationshipIdSchema, 'threads'),
|
|
107
|
+
},
|
|
108
|
+
indexes: [
|
|
109
|
+
{ attributes: ['threadAssignmentKey', 'aliasAssignmentKey'], name: 'assignment_thread_alias_unique', type: 'unique' },
|
|
110
|
+
{ attributes: ['aliasAssignmentKey', 'latestMessageAt'], name: 'assignment_alias_latest', type: 'key' },
|
|
111
|
+
],
|
|
112
|
+
name: 'Thread aliases',
|
|
119
113
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
name: 'Threads',
|
|
135
|
-
});
|
|
136
|
-
export const threadLabelsTable = defineAppwriteTable({
|
|
137
|
-
fields: {
|
|
138
|
-
labelAssignmentKey: identifier(identifierSchema),
|
|
139
|
-
latestMessageAt: dateTime(isoTimestampSchema),
|
|
140
|
-
locationCount: integer(nonNegativeIntegerSchema),
|
|
141
|
-
threadAssignmentKey: identifier(identifierSchema),
|
|
142
|
-
label: appwriteRelationship(appwriteRelationshipIdSchema, 'labels'),
|
|
143
|
-
thread: appwriteRelationship(appwriteRelationshipIdSchema, 'threads'),
|
|
114
|
+
threadLabels: {
|
|
115
|
+
fields: {
|
|
116
|
+
labelAssignmentKey: identifier(identifierSchema),
|
|
117
|
+
latestMessageAt: dateTime(isoTimestampSchema),
|
|
118
|
+
locationCount: integer(nonNegativeIntegerSchema),
|
|
119
|
+
threadAssignmentKey: identifier(identifierSchema),
|
|
120
|
+
label: appwriteRelationship(appwriteRelationshipIdSchema, 'labels'),
|
|
121
|
+
thread: appwriteRelationship(appwriteRelationshipIdSchema, 'threads'),
|
|
122
|
+
},
|
|
123
|
+
indexes: [
|
|
124
|
+
{ attributes: ['threadAssignmentKey', 'labelAssignmentKey'], name: 'assignment_thread_label_unique', type: 'unique' },
|
|
125
|
+
{ attributes: ['labelAssignmentKey', 'latestMessageAt'], name: 'assignment_label_latest', type: 'key' },
|
|
126
|
+
],
|
|
127
|
+
name: 'Thread labels',
|
|
144
128
|
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
129
|
+
threads: {
|
|
130
|
+
fields: {
|
|
131
|
+
accountAssignmentKey: identifier(identifierSchema),
|
|
132
|
+
providerId: stringColumn(identifierSchema),
|
|
133
|
+
subject: text(v.nullable(v.string()), false),
|
|
134
|
+
firstMessageAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
135
|
+
senderEmail: stringColumn(v.nullable(mailboxAddressSchema), false, 320),
|
|
136
|
+
senderName: stringColumn(v.nullable(identifierSchema), false),
|
|
137
|
+
preview: text(v.nullable(v.string()), false),
|
|
138
|
+
participants: text(v.nullable(v.string()), false),
|
|
139
|
+
labelIds: stringArray(v.array(identifierSchema), true, 36),
|
|
140
|
+
latestMessageAt: dateTime(isoTimestampSchema),
|
|
141
|
+
latestMessageId: identifier(identifierSchema),
|
|
142
|
+
messageCount: integer(nonNegativeIntegerSchema),
|
|
143
|
+
hasAttachments: boolean(v.boolean()),
|
|
144
|
+
unseenLocationCount: integer(nonNegativeIntegerSchema),
|
|
145
|
+
flaggedLocationCount: integer(nonNegativeIntegerSchema),
|
|
146
|
+
seen: boolean(v.boolean()),
|
|
147
|
+
flagged: boolean(v.boolean()),
|
|
148
|
+
archived: boolean(v.boolean()),
|
|
149
|
+
spam: boolean(v.boolean()),
|
|
150
|
+
trashed: boolean(v.boolean()),
|
|
151
|
+
snoozedUntil: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
152
|
+
revision: integer(nonNegativeIntegerSchema),
|
|
153
|
+
searchText: text(v.nullable(v.string()), false),
|
|
154
|
+
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
155
|
+
},
|
|
156
|
+
indexes: [
|
|
157
|
+
{ attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
|
|
158
|
+
{ attributes: ['accountAssignmentKey', 'latestMessageAt'], name: 'assignment_account_latest', type: 'key' },
|
|
159
|
+
{ attributes: ['accountAssignmentKey', 'seen', 'latestMessageAt'], name: 'assignment_account_seen_latest', type: 'key' },
|
|
160
|
+
{ attributes: ['accountAssignmentKey', 'flagged', 'latestMessageAt'], name: 'assignment_account_flagged_latest', type: 'key' },
|
|
161
|
+
{ attributes: ['accountAssignmentKey', 'snoozedUntil', 'latestMessageAt'], name: 'assignment_account_snoozed_latest', type: 'key' },
|
|
162
|
+
{ attributes: ['snoozedUntil'], name: 'snoozed_due', type: 'key' },
|
|
163
|
+
{ attributes: ['accountAssignmentKey', 'archived', 'latestMessageAt'], name: 'assignment_account_archived_latest', type: 'key' },
|
|
164
|
+
{ attributes: ['accountAssignmentKey', 'spam', 'latestMessageAt'], name: 'assignment_account_spam_latest', type: 'key' },
|
|
165
|
+
{ attributes: ['accountAssignmentKey', 'trashed', 'latestMessageAt'], name: 'assignment_account_trashed_latest', type: 'key' },
|
|
166
|
+
{ attributes: ['searchText'], name: 'search', type: 'fulltext' },
|
|
167
|
+
],
|
|
168
|
+
name: 'Threads',
|
|
173
169
|
},
|
|
174
|
-
id: appwriteIds.tables.messages,
|
|
175
|
-
indexes: [
|
|
176
|
-
{ attributes: ['threadAssignmentKey', 'sentAt'], name: 'assignment_thread_sent', type: 'key' },
|
|
177
|
-
{ attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
|
|
178
|
-
{ attributes: ['accountAssignmentKey', 'rfcMessageId'], name: 'assignment_account_rfc_message', type: 'key' },
|
|
179
|
-
],
|
|
180
|
-
key: 'messages',
|
|
181
|
-
name: 'Messages',
|
|
182
170
|
});
|
|
183
|
-
export const mailboxTableInputs = {
|
|
184
|
-
contacts: contactsTable,
|
|
185
|
-
drafts: draftsTable,
|
|
186
|
-
messageLocations: messageLocationsTable,
|
|
187
|
-
messages: messagesTable,
|
|
188
|
-
threadAliases: threadAliasesTable,
|
|
189
|
-
threadLabels: threadLabelsTable,
|
|
190
|
-
threads: threadsTable,
|
|
191
|
-
};
|