@marcoappio/marco-config 4.0.18 → 4.0.20
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 +240 -240
- package/dist/appwrite/appwrite.d.ts.map +1 -1
- package/dist/appwrite/appwrite.js +1 -1
- package/dist/appwrite/appwrite.test.js +54 -288
- package/dist/appwrite/commands.d.ts +1 -1
- package/dist/appwrite/commands.d.ts.map +1 -1
- package/dist/appwrite/commands.js +1 -1
- package/dist/appwrite/commands.test.js +11 -114
- package/dist/appwrite/decodedSchemas.d.ts +1 -1
- package/dist/appwrite/decodedSchemas.d.ts.map +1 -1
- package/dist/appwrite/decodedSchemas.js +1 -1
- package/dist/appwrite/functions.d.ts +1 -1
- package/dist/appwrite/functions.d.ts.map +1 -1
- package/dist/appwrite/functions.js +1 -1
- package/dist/appwrite/functions.test.js +1 -1
- package/dist/appwrite/index.d.ts +3 -1
- package/dist/appwrite/index.d.ts.map +1 -1
- package/dist/appwrite/index.js +1 -0
- package/dist/appwrite/queryContracts/queryContracts.d.ts +392 -0
- package/dist/appwrite/queryContracts/queryContracts.d.ts.map +1 -0
- package/dist/appwrite/queryContracts/queryContracts.js +299 -0
- package/dist/appwrite/queryContracts/queryContracts.test.d.ts +2 -0
- package/dist/appwrite/queryContracts/queryContracts.test.d.ts.map +1 -0
- package/dist/appwrite/queryContracts/queryContracts.test.js +39 -0
- package/dist/appwrite/tableContract/identity.d.ts +35 -35
- package/dist/appwrite/tableContract/identity.d.ts.map +1 -1
- package/dist/appwrite/tableContract/identity.js +71 -36
- package/dist/appwrite/tableContract/index.d.ts +1186 -440
- package/dist/appwrite/tableContract/index.d.ts.map +1 -1
- package/dist/appwrite/tableContract/index.js +1 -1
- package/dist/appwrite/tableContract/index.test.js +1 -1
- package/dist/appwrite/tableContract/mailbox.d.ts +64 -64
- package/dist/appwrite/tableContract/mailbox.d.ts.map +1 -1
- package/dist/appwrite/tableContract/mailbox.js +155 -68
- package/dist/appwrite/tableContract/operational.d.ts +1 -1
- package/dist/appwrite/tableContract/operational.d.ts.map +1 -1
- package/dist/appwrite/tableContract/operational.js +1 -1
- package/dist/appwrite/tableContract/shared.d.ts +1 -1
- package/dist/appwrite/tableContract/shared.d.ts.map +1 -1
- package/dist/appwrite/tableContract/shared.js +2 -2
- package/dist/index.test.js +5 -11
- package/dist/schemas/app.d.ts +1 -1
- package/dist/schemas/app.d.ts.map +1 -1
- package/dist/schemas/app.js +1 -1
- package/dist/schemas/auth.d.ts +1 -1
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/auth.js +1 -1
- package/dist/schemas/emailAccount.d.ts +1 -1
- package/dist/schemas/emailAccount.d.ts.map +1 -1
- package/dist/schemas/emailAccount.js +1 -1
- package/dist/schemas/id.d.ts +1 -1
- package/dist/schemas/id.d.ts.map +1 -1
- package/dist/schemas/id.js +1 -1
- package/dist/schemas/models/account.d.ts +1 -1
- package/dist/schemas/models/account.d.ts.map +1 -1
- package/dist/schemas/models/account.js +1 -1
- package/dist/schemas/models/contact.d.ts +1 -1
- package/dist/schemas/models/contact.d.ts.map +1 -1
- package/dist/schemas/models/contact.js +1 -1
- package/dist/schemas/models/draft.d.ts +1 -1
- package/dist/schemas/models/draft.d.ts.map +1 -1
- package/dist/schemas/models/draft.js +1 -1
- package/dist/schemas/models/mailboxAddress.test.js +1 -1
- package/dist/schemas/models/numericSemantics.test.js +1 -1
- package/dist/schemas/models/thread.d.ts +1 -1
- package/dist/schemas/models/thread.d.ts.map +1 -1
- package/dist/schemas/models/thread.js +1 -1
- package/dist/schemas/models/user.d.ts +1 -1
- package/dist/schemas/models/user.d.ts.map +1 -1
- package/dist/schemas/models/user.js +1 -1
- package/dist/schemas/models/user.test.js +1 -1
- package/dist/schemas/number.d.ts +1 -1
- package/dist/schemas/number.d.ts.map +1 -1
- package/dist/schemas/number.js +1 -1
- package/dist/schemas/oauth.d.ts +1 -1
- package/dist/schemas/oauth.d.ts.map +1 -1
- package/dist/schemas/oauth.js +1 -1
- package/dist/schemas/pushNotifications.d.ts +1 -1
- package/dist/schemas/pushNotifications.d.ts.map +1 -1
- package/dist/schemas/pushNotifications.js +1 -1
- package/dist/schemas/scalars.d.ts +1 -1
- package/dist/schemas/scalars.d.ts.map +1 -1
- package/dist/schemas/scalars.js +1 -1
- package/dist/schemas/scalars.test.js +1 -1
- package/dist/schemas/schemaValues.test.js +1 -1
- package/dist/schemas/string.d.ts +1 -1
- package/dist/schemas/string.d.ts.map +1 -1
- package/dist/schemas/string.js +1 -1
- package/dist/utils/accounts/generateAccountColor.d.ts.map +1 -1
- package/dist/utils/accounts/generateAccountColor.js +10 -15
- package/dist/utils/valibot/index.d.ts +3 -0
- package/dist/utils/valibot/index.d.ts.map +1 -0
- package/dist/utils/valibot/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { appwriteTables } from '../../appwrite/tableContract/index.js';
|
|
2
|
+
export const appwriteQueryIndexRequirementNames = [
|
|
3
|
+
'accountsByProfileAssignmentKey',
|
|
4
|
+
'accountsByProfileAssignmentKeyAndState',
|
|
5
|
+
'accountsByState',
|
|
6
|
+
'accountsByStateAndPollShardAssignmentId',
|
|
7
|
+
'accountsByPollShardAssignmentId',
|
|
8
|
+
'aliasesByAccountAssignmentKey',
|
|
9
|
+
'aliasesByAccountAssignmentKeyAndProviderId',
|
|
10
|
+
'labelsByAccountAssignmentKeyAndPath',
|
|
11
|
+
'labelsByAccountAssignmentKeyAndSpecialUse',
|
|
12
|
+
'labelsByAccountAssignmentKeyAndProviderId',
|
|
13
|
+
'contactsByProfileAssignmentKey',
|
|
14
|
+
'contactsByProfileAssignmentKeyAndLastContactedAt',
|
|
15
|
+
'contactsByProfileAssignmentKeyAndNormalisedAddress',
|
|
16
|
+
'contactsBySearchText',
|
|
17
|
+
'draftsByAccountAssignmentKeyAndStatus',
|
|
18
|
+
'draftsByAccountAssignmentKey',
|
|
19
|
+
'draftsByScheduledAt',
|
|
20
|
+
'threadsByAccountAssignmentKeyAndLatestMessageAt',
|
|
21
|
+
'threadsByAccountAssignmentKeyAndSeenAndLatestMessageAt',
|
|
22
|
+
'threadsByAccountAssignmentKeyAndFlaggedAndLatestMessageAt',
|
|
23
|
+
'threadsByAccountAssignmentKeyAndSnoozedUntilAndLatestMessageAt',
|
|
24
|
+
'threadsBySnoozedUntil',
|
|
25
|
+
'threadsByAccountAssignmentKeyAndArchivedAndLatestMessageAt',
|
|
26
|
+
'threadsByAccountAssignmentKeyAndSpamAndLatestMessageAt',
|
|
27
|
+
'threadsByAccountAssignmentKeyAndTrashedAndLatestMessageAt',
|
|
28
|
+
'threadsBySearchText',
|
|
29
|
+
'threadLabelsByThreadAssignmentKeyAndLabelAssignmentKey',
|
|
30
|
+
'threadLabelsByLabelAssignmentKeyAndLatestMessageAt',
|
|
31
|
+
'threadAliasesByThreadAssignmentKeyAndAliasAssignmentKey',
|
|
32
|
+
'threadAliasesByAliasAssignmentKeyAndLatestMessageAt',
|
|
33
|
+
'messagesByThreadAssignmentKeyAndSentAt',
|
|
34
|
+
'messagesByAccountAssignmentKeyAndProviderId',
|
|
35
|
+
'messagesByAccountAssignmentKeyAndRfcMessageId',
|
|
36
|
+
'messageLocationsByAccountAssignmentKeyAndLabelAssignmentKeyAndUidValidityAndUid',
|
|
37
|
+
'messageLocationsByAccountAssignmentKeyAndThreadAssignmentKey',
|
|
38
|
+
'messageLocationsByThreadAssignmentKeyAndLabelAssignmentKeyAndMessageAt',
|
|
39
|
+
'mailboxSyncCandidatesByAccountLaneGenerationPriorityReceivedLabelUidUidValidity',
|
|
40
|
+
'mailboxSyncCandidatesByLane',
|
|
41
|
+
'mailboxSyncLanesByAccountIdAndLane',
|
|
42
|
+
'mailboxSyncLanesByLaneAndState',
|
|
43
|
+
'mailboxSyncStatesByStateAndNextPollAt',
|
|
44
|
+
'commandsByUserIdAndSubmittedAt',
|
|
45
|
+
'commandsByUserId',
|
|
46
|
+
'commandsByAccountIdAndState',
|
|
47
|
+
'commandsByStateAndSubmittedAt',
|
|
48
|
+
'jobsByStateAndNextRunAt',
|
|
49
|
+
'jobsByStateAndLeaseExpiresAt',
|
|
50
|
+
'jobsByUserIdAndStateAndLeaseExpiresAt',
|
|
51
|
+
'jobsByStateAndLeaseExpiresAtAndLeaseIdAndAttempts',
|
|
52
|
+
'jobsByCommandId',
|
|
53
|
+
'jobsByDedupeKey',
|
|
54
|
+
'jobsByUserId',
|
|
55
|
+
'pollShardsByStateAndNextStartAt',
|
|
56
|
+
'pollShardsByLeaseExpiresAt',
|
|
57
|
+
'pushNotificationTokensByUserId',
|
|
58
|
+
'pushNotificationTokensByToken',
|
|
59
|
+
];
|
|
60
|
+
export const appwriteQueryIndexRequirements = {
|
|
61
|
+
accountsByPollShardAssignmentId: { attributes: ['pollShardAssignmentId'], kind: 'filter', tableKey: 'accounts' },
|
|
62
|
+
accountsByProfileAssignmentKey: { attributes: ['profileAssignmentKey'], kind: 'filter', tableKey: 'accounts' },
|
|
63
|
+
accountsByProfileAssignmentKeyAndState: { attributes: ['profileAssignmentKey', 'state'], kind: 'filter', tableKey: 'accounts' },
|
|
64
|
+
accountsByState: { attributes: ['state'], kind: 'filter', tableKey: 'accounts' },
|
|
65
|
+
accountsByStateAndPollShardAssignmentId: { attributes: ['state', 'pollShardAssignmentId'], kind: 'filter', tableKey: 'accounts' },
|
|
66
|
+
aliasesByAccountAssignmentKey: { attributes: ['accountAssignmentKey'], kind: 'filter', tableKey: 'aliases' },
|
|
67
|
+
aliasesByAccountAssignmentKeyAndProviderId: { attributes: ['accountAssignmentKey', 'providerId'], kind: 'filter', tableKey: 'aliases' },
|
|
68
|
+
commandsByAccountIdAndState: { attributes: ['accountId', 'state'], kind: 'filter', tableKey: 'commands' },
|
|
69
|
+
commandsByStateAndSubmittedAt: { attributes: ['state', 'submittedAt'], kind: 'filter', tableKey: 'commands' },
|
|
70
|
+
commandsByUserId: { attributes: ['userId'], kind: 'filter', tableKey: 'commands' },
|
|
71
|
+
commandsByUserIdAndSubmittedAt: { attributes: ['userId', 'submittedAt'], kind: 'filter', tableKey: 'commands' },
|
|
72
|
+
contactsByProfileAssignmentKey: { attributes: ['profileAssignmentKey'], kind: 'filter', tableKey: 'contacts' },
|
|
73
|
+
contactsByProfileAssignmentKeyAndLastContactedAt: { attributes: ['profileAssignmentKey', 'lastContactedAt'], kind: 'filter', tableKey: 'contacts' },
|
|
74
|
+
contactsByProfileAssignmentKeyAndNormalisedAddress: { attributes: ['profileAssignmentKey', 'normalisedAddress'], kind: 'filter', tableKey: 'contacts' },
|
|
75
|
+
contactsBySearchText: { attributes: ['searchText'], kind: 'fulltext', tableKey: 'contacts' },
|
|
76
|
+
draftsByAccountAssignmentKey: { attributes: ['accountAssignmentKey'], kind: 'filter', tableKey: 'drafts' },
|
|
77
|
+
draftsByAccountAssignmentKeyAndStatus: { attributes: ['accountAssignmentKey', 'status'], kind: 'filter', tableKey: 'drafts' },
|
|
78
|
+
draftsByScheduledAt: { attributes: ['scheduledAt'], kind: 'filter', tableKey: 'drafts' },
|
|
79
|
+
jobsByCommandId: { attributes: ['commandId'], kind: 'filter', tableKey: 'jobs' },
|
|
80
|
+
jobsByDedupeKey: { attributes: ['dedupeKey'], kind: 'filter', tableKey: 'jobs' },
|
|
81
|
+
jobsByStateAndLeaseExpiresAt: { attributes: ['state', 'leaseExpiresAt'], kind: 'filter', tableKey: 'jobs' },
|
|
82
|
+
jobsByStateAndLeaseExpiresAtAndLeaseIdAndAttempts: { attributes: ['state', 'leaseExpiresAt', 'leaseId', 'attempts'], kind: 'filter', tableKey: 'jobs' },
|
|
83
|
+
jobsByStateAndNextRunAt: { attributes: ['state', 'nextRunAt'], kind: 'filter', tableKey: 'jobs' },
|
|
84
|
+
jobsByUserId: { attributes: ['userId'], kind: 'filter', tableKey: 'jobs' },
|
|
85
|
+
jobsByUserIdAndStateAndLeaseExpiresAt: { attributes: ['userId', 'state', 'leaseExpiresAt'], kind: 'filter', tableKey: 'jobs' },
|
|
86
|
+
labelsByAccountAssignmentKeyAndPath: { attributes: ['accountAssignmentKey', 'path'], kind: 'filter', tableKey: 'labels' },
|
|
87
|
+
labelsByAccountAssignmentKeyAndProviderId: { attributes: ['accountAssignmentKey', 'providerId'], kind: 'filter', tableKey: 'labels' },
|
|
88
|
+
labelsByAccountAssignmentKeyAndSpecialUse: { attributes: ['accountAssignmentKey', 'specialUse'], kind: 'filter', tableKey: 'labels' },
|
|
89
|
+
mailboxSyncCandidatesByAccountLaneGenerationPriorityReceivedLabelUidUidValidity: {
|
|
90
|
+
attributes: ['accountId', 'lane', 'generation', 'mailboxPriority', 'receivedAt', 'labelId', 'uid', 'uidValidity'],
|
|
91
|
+
kind: 'filter',
|
|
92
|
+
tableKey: 'mailboxSyncCandidates',
|
|
93
|
+
},
|
|
94
|
+
mailboxSyncCandidatesByLane: { attributes: ['lane'], kind: 'filter', tableKey: 'mailboxSyncCandidates' },
|
|
95
|
+
mailboxSyncLanesByAccountIdAndLane: { attributes: ['accountId', 'lane'], kind: 'filter', tableKey: 'mailboxSyncLanes' },
|
|
96
|
+
mailboxSyncLanesByLaneAndState: { attributes: ['lane', 'state'], kind: 'filter', tableKey: 'mailboxSyncLanes' },
|
|
97
|
+
mailboxSyncStatesByStateAndNextPollAt: { attributes: ['state', 'nextPollAt'], kind: 'filter', tableKey: 'mailboxSyncStates' },
|
|
98
|
+
messageLocationsByAccountAssignmentKeyAndLabelAssignmentKeyAndUidValidityAndUid: {
|
|
99
|
+
attributes: ['accountAssignmentKey', 'labelAssignmentKey', 'uidValidity', 'uid'],
|
|
100
|
+
kind: 'filter',
|
|
101
|
+
tableKey: 'messageLocations',
|
|
102
|
+
},
|
|
103
|
+
messageLocationsByAccountAssignmentKeyAndThreadAssignmentKey: { attributes: ['accountAssignmentKey', 'threadAssignmentKey'], kind: 'filter', tableKey: 'messageLocations' },
|
|
104
|
+
messageLocationsByThreadAssignmentKeyAndLabelAssignmentKeyAndMessageAt: {
|
|
105
|
+
attributes: ['threadAssignmentKey', 'labelAssignmentKey', 'messageAt'],
|
|
106
|
+
kind: 'filter',
|
|
107
|
+
tableKey: 'messageLocations',
|
|
108
|
+
},
|
|
109
|
+
messagesByAccountAssignmentKeyAndProviderId: { attributes: ['accountAssignmentKey', 'providerId'], kind: 'filter', tableKey: 'messages' },
|
|
110
|
+
messagesByAccountAssignmentKeyAndRfcMessageId: { attributes: ['accountAssignmentKey', 'rfcMessageId'], kind: 'filter', tableKey: 'messages' },
|
|
111
|
+
messagesByThreadAssignmentKeyAndSentAt: { attributes: ['threadAssignmentKey', 'sentAt'], kind: 'filter', tableKey: 'messages' },
|
|
112
|
+
pollShardsByLeaseExpiresAt: { attributes: ['leaseExpiresAt'], kind: 'filter', tableKey: 'pollShards' },
|
|
113
|
+
pollShardsByStateAndNextStartAt: { attributes: ['state', 'nextStartAt'], kind: 'filter', tableKey: 'pollShards' },
|
|
114
|
+
pushNotificationTokensByToken: { attributes: ['token'], kind: 'filter', tableKey: 'pushNotificationTokens' },
|
|
115
|
+
pushNotificationTokensByUserId: { attributes: ['userId'], kind: 'filter', tableKey: 'pushNotificationTokens' },
|
|
116
|
+
threadAliasesByAliasAssignmentKeyAndLatestMessageAt: { attributes: ['aliasAssignmentKey', 'latestMessageAt'], kind: 'filter', tableKey: 'threadAliases' },
|
|
117
|
+
threadAliasesByThreadAssignmentKeyAndAliasAssignmentKey: { attributes: ['threadAssignmentKey', 'aliasAssignmentKey'], kind: 'filter', tableKey: 'threadAliases' },
|
|
118
|
+
threadLabelsByLabelAssignmentKeyAndLatestMessageAt: { attributes: ['labelAssignmentKey', 'latestMessageAt'], kind: 'filter', tableKey: 'threadLabels' },
|
|
119
|
+
threadLabelsByThreadAssignmentKeyAndLabelAssignmentKey: { attributes: ['threadAssignmentKey', 'labelAssignmentKey'], kind: 'filter', tableKey: 'threadLabels' },
|
|
120
|
+
threadsByAccountAssignmentKeyAndArchivedAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'archived', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
121
|
+
threadsByAccountAssignmentKeyAndFlaggedAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'flagged', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
122
|
+
threadsByAccountAssignmentKeyAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
123
|
+
threadsByAccountAssignmentKeyAndSeenAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'seen', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
124
|
+
threadsByAccountAssignmentKeyAndSnoozedUntilAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'snoozedUntil', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
125
|
+
threadsByAccountAssignmentKeyAndSpamAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'spam', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
126
|
+
threadsByAccountAssignmentKeyAndTrashedAndLatestMessageAt: { attributes: ['accountAssignmentKey', 'trashed', 'latestMessageAt'], kind: 'filter', tableKey: 'threads' },
|
|
127
|
+
threadsBySearchText: { attributes: ['searchText'], kind: 'fulltext', tableKey: 'threads' },
|
|
128
|
+
threadsBySnoozedUntil: { attributes: ['snoozedUntil'], kind: 'filter', tableKey: 'threads' },
|
|
129
|
+
};
|
|
130
|
+
const appwriteQueryConsumers = ['BACKEND', 'FRONTEND'];
|
|
131
|
+
export const appwriteQueryContractNames = [
|
|
132
|
+
'accounts',
|
|
133
|
+
'aliases',
|
|
134
|
+
'labels',
|
|
135
|
+
'contacts',
|
|
136
|
+
'drafts',
|
|
137
|
+
'threads',
|
|
138
|
+
'threadLabels',
|
|
139
|
+
'threadAliases',
|
|
140
|
+
'messages',
|
|
141
|
+
'messageLocations',
|
|
142
|
+
'mailboxSyncCandidates',
|
|
143
|
+
'mailboxSyncLanes',
|
|
144
|
+
'mailboxSyncStates',
|
|
145
|
+
'commands',
|
|
146
|
+
'jobs',
|
|
147
|
+
'pollShards',
|
|
148
|
+
'pushNotificationTokens',
|
|
149
|
+
];
|
|
150
|
+
const appwriteQueryContractInputs = {
|
|
151
|
+
accounts: {
|
|
152
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
153
|
+
requirements: [
|
|
154
|
+
'accountsByProfileAssignmentKey',
|
|
155
|
+
'accountsByProfileAssignmentKeyAndState',
|
|
156
|
+
'accountsByState',
|
|
157
|
+
'accountsByStateAndPollShardAssignmentId',
|
|
158
|
+
'accountsByPollShardAssignmentId',
|
|
159
|
+
],
|
|
160
|
+
tableKey: 'accounts',
|
|
161
|
+
},
|
|
162
|
+
aliases: {
|
|
163
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
164
|
+
requirements: ['aliasesByAccountAssignmentKey', 'aliasesByAccountAssignmentKeyAndProviderId'],
|
|
165
|
+
tableKey: 'aliases',
|
|
166
|
+
},
|
|
167
|
+
commands: {
|
|
168
|
+
consumers: ['BACKEND'],
|
|
169
|
+
requirements: ['commandsByUserIdAndSubmittedAt', 'commandsByUserId', 'commandsByAccountIdAndState', 'commandsByStateAndSubmittedAt'],
|
|
170
|
+
tableKey: 'commands',
|
|
171
|
+
},
|
|
172
|
+
contacts: {
|
|
173
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
174
|
+
requirements: [
|
|
175
|
+
'contactsByProfileAssignmentKey',
|
|
176
|
+
'contactsByProfileAssignmentKeyAndLastContactedAt',
|
|
177
|
+
'contactsByProfileAssignmentKeyAndNormalisedAddress',
|
|
178
|
+
'contactsBySearchText',
|
|
179
|
+
],
|
|
180
|
+
tableKey: 'contacts',
|
|
181
|
+
},
|
|
182
|
+
drafts: {
|
|
183
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
184
|
+
requirements: ['draftsByAccountAssignmentKeyAndStatus', 'draftsByAccountAssignmentKey', 'draftsByScheduledAt'],
|
|
185
|
+
tableKey: 'drafts',
|
|
186
|
+
},
|
|
187
|
+
jobs: {
|
|
188
|
+
consumers: ['BACKEND'],
|
|
189
|
+
requirements: [
|
|
190
|
+
'jobsByStateAndNextRunAt',
|
|
191
|
+
'jobsByStateAndLeaseExpiresAt',
|
|
192
|
+
'jobsByUserIdAndStateAndLeaseExpiresAt',
|
|
193
|
+
'jobsByStateAndLeaseExpiresAtAndLeaseIdAndAttempts',
|
|
194
|
+
'jobsByCommandId',
|
|
195
|
+
'jobsByDedupeKey',
|
|
196
|
+
'jobsByUserId',
|
|
197
|
+
],
|
|
198
|
+
tableKey: 'jobs',
|
|
199
|
+
},
|
|
200
|
+
labels: {
|
|
201
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
202
|
+
requirements: ['labelsByAccountAssignmentKeyAndPath', 'labelsByAccountAssignmentKeyAndSpecialUse', 'labelsByAccountAssignmentKeyAndProviderId'],
|
|
203
|
+
tableKey: 'labels',
|
|
204
|
+
},
|
|
205
|
+
mailboxSyncCandidates: {
|
|
206
|
+
consumers: ['BACKEND'],
|
|
207
|
+
requirements: ['mailboxSyncCandidatesByAccountLaneGenerationPriorityReceivedLabelUidUidValidity', 'mailboxSyncCandidatesByLane'],
|
|
208
|
+
tableKey: 'mailboxSyncCandidates',
|
|
209
|
+
},
|
|
210
|
+
mailboxSyncLanes: {
|
|
211
|
+
consumers: ['BACKEND'],
|
|
212
|
+
requirements: ['mailboxSyncLanesByAccountIdAndLane', 'mailboxSyncLanesByLaneAndState'],
|
|
213
|
+
tableKey: 'mailboxSyncLanes',
|
|
214
|
+
},
|
|
215
|
+
mailboxSyncStates: {
|
|
216
|
+
consumers: ['BACKEND'],
|
|
217
|
+
requirements: ['mailboxSyncStatesByStateAndNextPollAt'],
|
|
218
|
+
tableKey: 'mailboxSyncStates',
|
|
219
|
+
},
|
|
220
|
+
messageLocations: {
|
|
221
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
222
|
+
requirements: [
|
|
223
|
+
'messageLocationsByAccountAssignmentKeyAndLabelAssignmentKeyAndUidValidityAndUid',
|
|
224
|
+
'messageLocationsByAccountAssignmentKeyAndThreadAssignmentKey',
|
|
225
|
+
'messageLocationsByThreadAssignmentKeyAndLabelAssignmentKeyAndMessageAt',
|
|
226
|
+
],
|
|
227
|
+
tableKey: 'messageLocations',
|
|
228
|
+
},
|
|
229
|
+
messages: {
|
|
230
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
231
|
+
requirements: ['messagesByThreadAssignmentKeyAndSentAt', 'messagesByAccountAssignmentKeyAndProviderId', 'messagesByAccountAssignmentKeyAndRfcMessageId'],
|
|
232
|
+
tableKey: 'messages',
|
|
233
|
+
},
|
|
234
|
+
pollShards: {
|
|
235
|
+
consumers: ['BACKEND'],
|
|
236
|
+
requirements: ['pollShardsByStateAndNextStartAt', 'pollShardsByLeaseExpiresAt'],
|
|
237
|
+
tableKey: 'pollShards',
|
|
238
|
+
},
|
|
239
|
+
pushNotificationTokens: {
|
|
240
|
+
consumers: ['BACKEND'],
|
|
241
|
+
requirements: ['pushNotificationTokensByUserId', 'pushNotificationTokensByToken'],
|
|
242
|
+
tableKey: 'pushNotificationTokens',
|
|
243
|
+
},
|
|
244
|
+
threadAliases: {
|
|
245
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
246
|
+
requirements: ['threadAliasesByThreadAssignmentKeyAndAliasAssignmentKey', 'threadAliasesByAliasAssignmentKeyAndLatestMessageAt'],
|
|
247
|
+
tableKey: 'threadAliases',
|
|
248
|
+
},
|
|
249
|
+
threadLabels: {
|
|
250
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
251
|
+
requirements: ['threadLabelsByThreadAssignmentKeyAndLabelAssignmentKey', 'threadLabelsByLabelAssignmentKeyAndLatestMessageAt'],
|
|
252
|
+
tableKey: 'threadLabels',
|
|
253
|
+
},
|
|
254
|
+
threads: {
|
|
255
|
+
consumers: ['BACKEND', 'FRONTEND'],
|
|
256
|
+
requirements: [
|
|
257
|
+
'threadsByAccountAssignmentKeyAndLatestMessageAt',
|
|
258
|
+
'threadsByAccountAssignmentKeyAndSeenAndLatestMessageAt',
|
|
259
|
+
'threadsByAccountAssignmentKeyAndFlaggedAndLatestMessageAt',
|
|
260
|
+
'threadsByAccountAssignmentKeyAndSnoozedUntilAndLatestMessageAt',
|
|
261
|
+
'threadsBySnoozedUntil',
|
|
262
|
+
'threadsByAccountAssignmentKeyAndArchivedAndLatestMessageAt',
|
|
263
|
+
'threadsByAccountAssignmentKeyAndSpamAndLatestMessageAt',
|
|
264
|
+
'threadsByAccountAssignmentKeyAndTrashedAndLatestMessageAt',
|
|
265
|
+
'threadsBySearchText',
|
|
266
|
+
],
|
|
267
|
+
tableKey: 'threads',
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
export const appwriteQueryContracts = appwriteQueryContractInputs;
|
|
271
|
+
const appwriteQueryConsumerSet = new Set(appwriteQueryConsumers);
|
|
272
|
+
const isAppwriteQueryConsumer = (value) => appwriteQueryConsumerSet.has(value);
|
|
273
|
+
export const validateAppwriteQueryContracts = () => {
|
|
274
|
+
const physicalRequirements = new Set();
|
|
275
|
+
for (const name of appwriteQueryIndexRequirementNames) {
|
|
276
|
+
const requirement = appwriteQueryIndexRequirements[name];
|
|
277
|
+
const physicalKey = JSON.stringify([requirement.tableKey, requirement.kind, requirement.attributes]);
|
|
278
|
+
const table = appwriteTables[requirement.tableKey];
|
|
279
|
+
const matchingIndex = table.indexes.some(index => {
|
|
280
|
+
const indexTypeMatches = requirement.kind === 'fulltext' ? index.type === 'fulltext' : index.type !== 'fulltext';
|
|
281
|
+
// Appwrite permits a query to use the left prefix of a composite index
|
|
282
|
+
const attributesMatch = index.attributes.length >= requirement.attributes.length && requirement.attributes.every((attribute, indexPosition) => index.attributes[indexPosition] === attribute);
|
|
283
|
+
return indexTypeMatches && attributesMatch;
|
|
284
|
+
});
|
|
285
|
+
if (physicalRequirements.has(physicalKey) || !matchingIndex) {
|
|
286
|
+
throw new Error(`Invalid Appwrite query index requirement: ${name}`);
|
|
287
|
+
}
|
|
288
|
+
physicalRequirements.add(physicalKey);
|
|
289
|
+
}
|
|
290
|
+
for (const name of appwriteQueryContractNames) {
|
|
291
|
+
const contract = appwriteQueryContracts[name];
|
|
292
|
+
const consumersAreValid = contract.consumers.length > 0 && contract.consumers.every(isAppwriteQueryConsumer);
|
|
293
|
+
const requirementsAreValid = contract.requirements.length > 0 && contract.requirements.every(requirementName => appwriteQueryIndexRequirements[requirementName].tableKey === contract.tableKey);
|
|
294
|
+
if (!(consumersAreValid && requirementsAreValid)) {
|
|
295
|
+
throw new Error(`Invalid Appwrite query contract: ${name}`);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
validateAppwriteQueryContracts();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryContracts.test.d.ts","sourceRoot":"","sources":["../../../src/appwrite/queryContracts/queryContracts.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { appwriteQueryContracts, appwriteQueryIndexRequirements, appwriteQueryIndexRequirementNames, appwriteQueryContractNames, validateAppwriteQueryContracts, } from './queryContracts.js';
|
|
3
|
+
describe('Appwrite query contracts', () => {
|
|
4
|
+
it('publishes unique physical requirements', () => {
|
|
5
|
+
const physicalRequirements = appwriteQueryIndexRequirementNames.map(name => {
|
|
6
|
+
const requirement = appwriteQueryIndexRequirements[name];
|
|
7
|
+
return JSON.stringify([requirement.tableKey, requirement.kind, requirement.attributes]);
|
|
8
|
+
});
|
|
9
|
+
expect(new Set(physicalRequirements).size).toBe(physicalRequirements.length);
|
|
10
|
+
});
|
|
11
|
+
it('references only same-table requirements and valid consumers', () => {
|
|
12
|
+
expect(() => validateAppwriteQueryContracts()).not.toThrow();
|
|
13
|
+
for (const name of appwriteQueryContractNames) {
|
|
14
|
+
const contract = appwriteQueryContracts[name];
|
|
15
|
+
expect(contract.consumers.length).toBeGreaterThan(0);
|
|
16
|
+
for (const requirementName of contract.requirements) {
|
|
17
|
+
expect(appwriteQueryIndexRequirements[requirementName].tableKey).toBe(contract.tableKey);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
it('contains the physical index tuples currently required by Appwrite provisioning', () => {
|
|
22
|
+
expect(Object.keys(appwriteQueryIndexRequirements)).toHaveLength(appwriteQueryIndexRequirementNames.length);
|
|
23
|
+
expect(appwriteQueryIndexRequirements.jobsByStateAndNextRunAt).toEqual({
|
|
24
|
+
attributes: ['state', 'nextRunAt'],
|
|
25
|
+
kind: 'filter',
|
|
26
|
+
tableKey: 'jobs',
|
|
27
|
+
});
|
|
28
|
+
expect(appwriteQueryIndexRequirements.threadsByAccountAssignmentKeyAndSeenAndLatestMessageAt).toEqual({
|
|
29
|
+
attributes: ['accountAssignmentKey', 'seen', 'latestMessageAt'],
|
|
30
|
+
kind: 'filter',
|
|
31
|
+
tableKey: 'threads',
|
|
32
|
+
});
|
|
33
|
+
expect(appwriteQueryIndexRequirements.contactsBySearchText).toEqual({
|
|
34
|
+
attributes: ['searchText'],
|
|
35
|
+
kind: 'fulltext',
|
|
36
|
+
tableKey: 'contacts',
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { v } from '../../utils/valibot/index.js';
|
|
2
2
|
export declare const identityTableInputs: {
|
|
3
3
|
readonly accounts: {
|
|
4
4
|
readonly fields: {
|
|
5
|
-
readonly profileAssignmentKey: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
6
|
-
readonly provider: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
|
|
7
|
-
readonly state: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "ERROR", "DISCONNECTED"], undefined>>;
|
|
8
|
-
readonly primaryEmail: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
9
|
-
readonly displayName: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
10
5
|
readonly colour: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>>;
|
|
11
|
-
readonly pollShardAssignmentId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
12
|
-
readonly pollShardId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
13
|
-
readonly lastSuccessfulSyncAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
14
|
-
readonly lastErrorCode: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
15
|
-
readonly mailProcessedCount: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
|
|
16
|
-
readonly mailTotalCount: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
|
|
17
|
-
readonly initialSyncCompletedAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
18
6
|
readonly credential: import("./shared.js").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
19
7
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
20
8
|
}, undefined>, v.TransformAction<{
|
|
21
9
|
$id: string;
|
|
22
10
|
}, string>]>], undefined>, undefined>>;
|
|
11
|
+
readonly displayName: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
12
|
+
readonly initialSyncCompletedAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
13
|
+
readonly lastErrorCode: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
14
|
+
readonly lastSuccessfulSyncAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
23
15
|
readonly mailboxSyncState: import("./shared.js").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
24
16
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
25
17
|
}, undefined>, v.TransformAction<{
|
|
26
18
|
$id: string;
|
|
27
19
|
}, string>]>], undefined>, undefined>>;
|
|
20
|
+
readonly mailProcessedCount: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
|
|
21
|
+
readonly mailTotalCount: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
|
|
22
|
+
readonly pollShardAssignmentId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
23
|
+
readonly pollShardId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
28
24
|
readonly primaryAlias: import("./shared.js").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
29
25
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
30
26
|
}, undefined>, v.TransformAction<{
|
|
31
27
|
$id: string;
|
|
32
28
|
}, string>]>], undefined>, undefined>>;
|
|
29
|
+
readonly primaryEmail: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
33
30
|
readonly profile: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
34
31
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
35
32
|
}, undefined>, v.TransformAction<{
|
|
36
33
|
$id: string;
|
|
37
34
|
}, string>]>], undefined>>;
|
|
35
|
+
readonly profileAssignmentKey: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
36
|
+
readonly provider: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
|
|
37
|
+
readonly state: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "ERROR", "DISCONNECTED"], undefined>>;
|
|
38
38
|
};
|
|
39
39
|
readonly indexes: readonly [{
|
|
40
40
|
readonly attributes: readonly ["profileAssignmentKey"];
|
|
@@ -65,17 +65,17 @@ export declare const identityTableInputs: {
|
|
|
65
65
|
};
|
|
66
66
|
readonly aliases: {
|
|
67
67
|
readonly fields: {
|
|
68
|
-
readonly accountAssignmentKey: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
69
|
-
readonly providerId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
70
|
-
readonly email: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
71
|
-
readonly name: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
72
|
-
readonly signature: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
|
|
73
|
-
readonly isPrimary: import("./shared.js").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
|
|
74
68
|
readonly account: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
75
69
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
76
70
|
}, undefined>, v.TransformAction<{
|
|
77
71
|
$id: string;
|
|
78
72
|
}, string>]>], undefined>>;
|
|
73
|
+
readonly accountAssignmentKey: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
74
|
+
readonly email: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
75
|
+
readonly isPrimary: import("./shared.js").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
|
|
76
|
+
readonly name: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
77
|
+
readonly providerId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
78
|
+
readonly signature: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
|
|
79
79
|
};
|
|
80
80
|
readonly indexes: readonly [{
|
|
81
81
|
readonly attributes: readonly ["accountAssignmentKey"];
|
|
@@ -90,13 +90,13 @@ export declare const identityTableInputs: {
|
|
|
90
90
|
};
|
|
91
91
|
readonly credentials: {
|
|
92
92
|
readonly fields: {
|
|
93
|
-
readonly userId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
94
93
|
readonly accountId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
95
|
-
readonly provider: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
|
|
96
94
|
readonly encryptedPayload: import("./shared.js").AppwriteColumnSchema<v.StringSchema<undefined>>;
|
|
97
95
|
readonly expiresAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
96
|
+
readonly provider: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
|
|
98
97
|
readonly refreshLeaseExpiresAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
|
|
99
98
|
readonly refreshLeaseId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
99
|
+
readonly userId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
100
100
|
};
|
|
101
101
|
readonly indexes: readonly [{
|
|
102
102
|
readonly attributes: readonly ["userId"];
|
|
@@ -111,18 +111,18 @@ export declare const identityTableInputs: {
|
|
|
111
111
|
};
|
|
112
112
|
readonly labels: {
|
|
113
113
|
readonly fields: {
|
|
114
|
+
readonly account: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
115
|
+
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
116
|
+
}, undefined>, v.TransformAction<{
|
|
117
|
+
$id: string;
|
|
118
|
+
}, string>]>], undefined>>;
|
|
114
119
|
readonly accountAssignmentKey: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
115
|
-
readonly providerId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
116
120
|
readonly name: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
117
121
|
readonly path: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
122
|
+
readonly providerId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
118
123
|
readonly specialUse: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.PicklistSchema<readonly ["ALL", "ARCHIVE", "DRAFTS", "INBOX", "JUNK", "SENT", "STARRED", "TRASH"], undefined>, undefined>>;
|
|
119
124
|
readonly totalCount: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
|
|
120
125
|
readonly unreadCount: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
|
|
121
|
-
readonly account: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
122
|
-
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
123
|
-
}, undefined>, v.TransformAction<{
|
|
124
|
-
$id: string;
|
|
125
|
-
}, string>]>], undefined>>;
|
|
126
126
|
};
|
|
127
127
|
readonly indexes: readonly [{
|
|
128
128
|
readonly attributes: readonly ["accountAssignmentKey", "specialUse"];
|
|
@@ -141,28 +141,28 @@ export declare const identityTableInputs: {
|
|
|
141
141
|
};
|
|
142
142
|
readonly oauthStates: {
|
|
143
143
|
readonly fields: {
|
|
144
|
-
readonly userId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
145
144
|
readonly accountId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
146
145
|
readonly email: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
147
146
|
readonly expiresAt: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
|
|
148
147
|
readonly nonceHash: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
149
148
|
readonly operation: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["CONNECT", "REPLACE"], undefined>>;
|
|
150
|
-
readonly provider: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK"], undefined>>;
|
|
151
|
-
readonly returnUri: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["https://app.marcoapp.io/onboarding/loading"], undefined>>;
|
|
152
149
|
readonly profile: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
153
150
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
154
151
|
}, undefined>, v.TransformAction<{
|
|
155
152
|
$id: string;
|
|
156
153
|
}, string>]>], undefined>>;
|
|
154
|
+
readonly provider: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK"], undefined>>;
|
|
155
|
+
readonly returnUri: import("./shared.js").AppwriteColumnSchema<v.PicklistSchema<readonly ["https://app.marcoapp.io/onboarding/loading"], undefined>>;
|
|
156
|
+
readonly userId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
157
157
|
};
|
|
158
158
|
readonly indexes: readonly [];
|
|
159
159
|
readonly name: "OAuth states";
|
|
160
160
|
};
|
|
161
161
|
readonly profileAvatarCleanups: {
|
|
162
162
|
readonly fields: {
|
|
163
|
-
readonly fileId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
164
|
-
readonly claimId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
165
163
|
readonly claimedAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
164
|
+
readonly claimId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
165
|
+
readonly fileId: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
166
166
|
readonly profile: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
167
167
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
168
168
|
}, undefined>, v.TransformAction<{
|
|
@@ -175,9 +175,9 @@ export declare const identityTableInputs: {
|
|
|
175
175
|
};
|
|
176
176
|
readonly profiles: {
|
|
177
177
|
readonly fields: {
|
|
178
|
-
readonly email: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
179
178
|
readonly avatarFileId: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>>;
|
|
180
179
|
readonly deletionRequestedAt: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
|
|
180
|
+
readonly email: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
|
|
181
181
|
readonly name: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
182
182
|
readonly onboardingState: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
183
183
|
readonly timezone: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
@@ -191,9 +191,9 @@ export declare const identityTableInputs: {
|
|
|
191
191
|
};
|
|
192
192
|
readonly savedViews: {
|
|
193
193
|
readonly fields: {
|
|
194
|
-
readonly name: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
195
|
-
readonly icon: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
196
194
|
readonly aliasIds: import("./shared.js").AppwriteColumnSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
195
|
+
readonly icon: import("./shared.js").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
|
|
196
|
+
readonly name: import("./shared.js").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
|
|
197
197
|
readonly profile: import("./shared.js").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
198
198
|
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
199
199
|
}, undefined>, v.TransformAction<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/appwrite/tableContract/identity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/appwrite/tableContract/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,6BAA6B,CAAA;AAwB/C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqK9B,CAAA"}
|