@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,167 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
/* oxlint-disable eslint/sort-keys */
|
|
3
|
-
import { accountProviders, appwriteColumnDefinitions,
|
|
3
|
+
import { accountProviders, appwriteColumnDefinitions, appwriteRelationship, appwriteRelationshipIdSchema, canonicalTimestampSchema, commandStates, defineAppwriteTableGroup, identifierSchema, jobStates, labelSpecialUses, mailboxSortKeySchema, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncProvisionedStates, nonNegativeIntegerSchema, positiveIntegerSchema, pollShardStates, isoTimestampSchema, } from './shared';
|
|
4
4
|
const { bigint, dateTime, enumValue, identifier, integer, longText, string: stringColumn, stringArray, text } = appwriteColumnDefinitions;
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
export const operationalTableInputs = defineAppwriteTableGroup({
|
|
6
|
+
commands: {
|
|
7
|
+
fields: {
|
|
8
|
+
userId: stringColumn(identifierSchema),
|
|
9
|
+
accountId: stringColumn(v.nullable(identifierSchema), false),
|
|
10
|
+
draftId: identifier(v.nullable(identifierSchema), false),
|
|
11
|
+
kind: stringColumn(identifierSchema),
|
|
12
|
+
payload: longText(v.string()),
|
|
13
|
+
payloadHash: stringColumn(identifierSchema),
|
|
14
|
+
state: enumValue(v.picklist(commandStates), commandStates),
|
|
15
|
+
attempts: integer(nonNegativeIntegerSchema),
|
|
16
|
+
canonicalRevision: integer(v.nullable(nonNegativeIntegerSchema), false),
|
|
17
|
+
errorCode: stringColumn(v.nullable(identifierSchema), false),
|
|
18
|
+
submittedAt: dateTime(isoTimestampSchema),
|
|
19
|
+
account: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'accounts', 'manyToOne', 'setNull'),
|
|
20
|
+
profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
|
|
21
|
+
},
|
|
22
|
+
indexes: [
|
|
23
|
+
{ attributes: ['userId'], name: 'user', type: 'key' },
|
|
24
|
+
{ attributes: ['userId', 'submittedAt'], name: 'user_submitted', type: 'key' },
|
|
25
|
+
{ attributes: ['accountId', 'state'], name: 'account_state', type: 'key' },
|
|
26
|
+
{ attributes: ['draftId', 'canonicalRevision'], name: 'draft_sequence', type: 'key' },
|
|
27
|
+
{ attributes: ['state', 'submittedAt'], name: 'state_submitted', type: 'key' },
|
|
28
|
+
],
|
|
29
|
+
name: 'Commands',
|
|
22
30
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
jobs: {
|
|
32
|
+
fields: {
|
|
33
|
+
commandId: stringColumn(identifierSchema),
|
|
34
|
+
userId: stringColumn(identifierSchema),
|
|
35
|
+
accountId: stringColumn(v.nullable(identifierSchema), false),
|
|
36
|
+
kind: stringColumn(identifierSchema),
|
|
37
|
+
payload: longText(v.string()),
|
|
38
|
+
dedupeKey: stringColumn(identifierSchema),
|
|
39
|
+
state: enumValue(v.picklist(jobStates), jobStates),
|
|
40
|
+
attempts: integer(nonNegativeIntegerSchema),
|
|
41
|
+
maxAttempts: integer(nonNegativeIntegerSchema),
|
|
42
|
+
nextRunAt: dateTime(canonicalTimestampSchema),
|
|
43
|
+
leaseId: stringColumn(v.nullable(identifierSchema), false),
|
|
44
|
+
leaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
45
|
+
errorCode: stringColumn(v.nullable(identifierSchema), false),
|
|
30
46
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
lane: enumValue(v.picklist(mailboxSyncLanes), mailboxSyncLanes),
|
|
43
|
-
state: enumValue(v.picklist(mailboxSyncLaneStates), mailboxSyncLaneStates),
|
|
44
|
-
errorCode: identifier(v.nullable(identifierSchema), false),
|
|
45
|
-
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
47
|
+
indexes: [
|
|
48
|
+
{ attributes: ['state', 'nextRunAt'], name: 'state_next_run', type: 'key' },
|
|
49
|
+
{ attributes: ['leaseExpiresAt'], name: 'lease_expiry', type: 'key' },
|
|
50
|
+
{ attributes: ['state', 'leaseExpiresAt'], name: 'state_lease_expiry', type: 'key' },
|
|
51
|
+
{ attributes: ['userId', 'state', 'leaseExpiresAt'], name: 'user_state_lease_expiry', type: 'key' },
|
|
52
|
+
{ attributes: ['state', 'leaseExpiresAt', 'leaseId', 'attempts'], name: 'recovery_fence', type: 'key' },
|
|
53
|
+
{ attributes: ['commandId'], name: 'command', type: 'key' },
|
|
54
|
+
{ attributes: ['dedupeKey'], name: 'dedupe_key_unique', type: 'unique' },
|
|
55
|
+
{ attributes: ['userId'], name: 'user', type: 'key' },
|
|
56
|
+
],
|
|
57
|
+
name: 'Jobs',
|
|
46
58
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
mailboxSyncCandidates: {
|
|
60
|
+
fields: {
|
|
61
|
+
userId: identifier(identifierSchema),
|
|
62
|
+
accountId: identifier(identifierSchema),
|
|
63
|
+
generation: integer(nonNegativeIntegerSchema),
|
|
64
|
+
lane: enumValue(v.picklist(mailboxSyncLanes), mailboxSyncLanes),
|
|
65
|
+
labelId: identifier(identifierSchema),
|
|
66
|
+
mailboxPath: stringColumn(identifierSchema),
|
|
67
|
+
mailboxPriority: integer(nonNegativeIntegerSchema),
|
|
68
|
+
mailboxSortKey: stringColumn(mailboxSortKeySchema, true, 257),
|
|
69
|
+
providerId: stringColumn(identifierSchema),
|
|
70
|
+
receivedAt: dateTime(isoTimestampSchema),
|
|
71
|
+
specialUse: enumValue(v.nullable(v.picklist(labelSpecialUses)), labelSpecialUses, false),
|
|
72
|
+
uid: bigint(positiveIntegerSchema),
|
|
73
|
+
uidValidity: bigint(positiveIntegerSchema),
|
|
74
|
+
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
75
|
+
label: appwriteRelationship(appwriteRelationshipIdSchema, 'labels'),
|
|
76
|
+
},
|
|
77
|
+
indexes: [
|
|
78
|
+
{ attributes: ['lane'], name: 'lane', type: 'key' },
|
|
79
|
+
{
|
|
80
|
+
attributes: ['accountId', 'lane', 'generation', 'mailboxPriority', 'receivedAt', 'labelId', 'uid', 'uidValidity'],
|
|
81
|
+
name: 'account_lane_generation_order',
|
|
82
|
+
type: 'key',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
name: 'Mailbox sync candidates',
|
|
59
86
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
materialisationLeaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
79
|
-
errorCode: stringColumn(v.nullable(identifierSchema), false),
|
|
87
|
+
mailboxSyncLanes: {
|
|
88
|
+
fields: {
|
|
89
|
+
userId: identifier(identifierSchema),
|
|
90
|
+
accountId: identifier(identifierSchema),
|
|
91
|
+
commandId: identifier(identifierSchema),
|
|
92
|
+
cursor: text(v.nullable(v.string()), false),
|
|
93
|
+
generation: integer(nonNegativeIntegerSchema),
|
|
94
|
+
lane: enumValue(v.picklist(mailboxSyncLanes), mailboxSyncLanes),
|
|
95
|
+
state: enumValue(v.picklist(mailboxSyncLaneStates), mailboxSyncLaneStates),
|
|
96
|
+
errorCode: identifier(v.nullable(identifierSchema), false),
|
|
97
|
+
account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
|
|
98
|
+
},
|
|
99
|
+
indexes: [
|
|
100
|
+
{ attributes: ['accountId', 'lane'], name: 'account_lane_unique', type: 'unique' },
|
|
101
|
+
{ attributes: ['lane', 'state'], name: 'lane_state', type: 'key' },
|
|
102
|
+
],
|
|
103
|
+
name: 'Mailbox sync lanes',
|
|
104
|
+
wirePermissions: 'empty',
|
|
80
105
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
submittedAt: dateTime(isoTimestampSchema),
|
|
102
|
-
account: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'accounts', 'manyToOne', 'setNull'),
|
|
103
|
-
profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
|
|
106
|
+
mailboxSyncStates: {
|
|
107
|
+
fields: {
|
|
108
|
+
userId: stringColumn(identifierSchema),
|
|
109
|
+
accountId: stringColumn(identifierSchema),
|
|
110
|
+
provider: enumValue(v.picklist(accountProviders), accountProviders),
|
|
111
|
+
providerCursor: text(v.nullable(v.string()), false),
|
|
112
|
+
uidValidity: stringColumn(v.nullable(v.string()), false),
|
|
113
|
+
state: enumValue(v.picklist(mailboxSyncProvisionedStates), mailboxSyncProvisionedStates),
|
|
114
|
+
nextPollAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
115
|
+
lastEventAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
116
|
+
lastSyncAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
117
|
+
materialisationLeaseId: identifier(v.nullable(identifierSchema), false),
|
|
118
|
+
materialisationLeaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
119
|
+
errorCode: stringColumn(v.nullable(identifierSchema), false),
|
|
120
|
+
},
|
|
121
|
+
indexes: [
|
|
122
|
+
{ attributes: ['state', 'nextPollAt'], name: 'state_next_poll', type: 'key' },
|
|
123
|
+
{ attributes: ['accountId'], name: 'account_unique', type: 'unique' },
|
|
124
|
+
],
|
|
125
|
+
name: 'Mailbox sync states',
|
|
104
126
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
],
|
|
113
|
-
key: 'commands',
|
|
114
|
-
name: 'Commands',
|
|
115
|
-
});
|
|
116
|
-
export const jobsTable = defineAppwriteTable({
|
|
117
|
-
fields: {
|
|
118
|
-
commandId: stringColumn(identifierSchema),
|
|
119
|
-
userId: stringColumn(identifierSchema),
|
|
120
|
-
accountId: stringColumn(v.nullable(identifierSchema), false),
|
|
121
|
-
kind: stringColumn(identifierSchema),
|
|
122
|
-
payload: longText(v.string()),
|
|
123
|
-
dedupeKey: stringColumn(identifierSchema),
|
|
124
|
-
state: enumValue(v.picklist(jobStates), jobStates),
|
|
125
|
-
attempts: integer(nonNegativeIntegerSchema),
|
|
126
|
-
maxAttempts: integer(nonNegativeIntegerSchema),
|
|
127
|
-
nextRunAt: dateTime(canonicalTimestampSchema),
|
|
128
|
-
leaseId: stringColumn(v.nullable(identifierSchema), false),
|
|
129
|
-
leaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
130
|
-
errorCode: stringColumn(v.nullable(identifierSchema), false),
|
|
127
|
+
pollShardCoordinators: {
|
|
128
|
+
fields: {
|
|
129
|
+
accountCursor: stringColumn(v.nullable(identifierSchema), false),
|
|
130
|
+
},
|
|
131
|
+
indexes: [],
|
|
132
|
+
name: 'Poll shard coordinators',
|
|
133
|
+
wirePermissions: 'empty',
|
|
131
134
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
leaseId: identifier(v.nullable(identifierSchema), false),
|
|
152
|
-
leaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
153
|
-
lastStartedAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
154
|
-
nextStartAt: dateTime(canonicalTimestampSchema),
|
|
155
|
-
pollingSnapshot: longText(v.string()),
|
|
156
|
-
scheduledExecutionId: identifier(v.nullable(identifierSchema), false),
|
|
157
|
-
errorCode: identifier(v.nullable(identifierSchema), false),
|
|
135
|
+
pollShards: {
|
|
136
|
+
fields: {
|
|
137
|
+
accountIds: stringArray(v.pipe(v.array(identifierSchema), v.maxLength(10)), true, 36),
|
|
138
|
+
generation: integer(nonNegativeIntegerSchema),
|
|
139
|
+
state: enumValue(v.picklist(pollShardStates), pollShardStates),
|
|
140
|
+
leaseId: identifier(v.nullable(identifierSchema), false),
|
|
141
|
+
leaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
|
|
142
|
+
lastStartedAt: dateTime(v.nullable(isoTimestampSchema), false),
|
|
143
|
+
nextStartAt: dateTime(canonicalTimestampSchema),
|
|
144
|
+
pollingSnapshot: longText(v.string()),
|
|
145
|
+
scheduledExecutionId: identifier(v.nullable(identifierSchema), false),
|
|
146
|
+
errorCode: identifier(v.nullable(identifierSchema), false),
|
|
147
|
+
},
|
|
148
|
+
indexes: [
|
|
149
|
+
{ attributes: ['state', 'nextStartAt'], name: 'state_next_start', type: 'key' },
|
|
150
|
+
{ attributes: ['leaseExpiresAt'], name: 'lease_expiry', type: 'key' },
|
|
151
|
+
],
|
|
152
|
+
name: 'Poll shards',
|
|
153
|
+
wirePermissions: 'empty',
|
|
158
154
|
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
userId: stringColumn(identifierSchema),
|
|
171
|
-
token: stringColumn(identifierSchema),
|
|
172
|
-
profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
|
|
155
|
+
pushNotificationTokens: {
|
|
156
|
+
fields: {
|
|
157
|
+
userId: stringColumn(identifierSchema),
|
|
158
|
+
token: stringColumn(identifierSchema),
|
|
159
|
+
profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
|
|
160
|
+
},
|
|
161
|
+
indexes: [
|
|
162
|
+
{ attributes: ['userId'], name: 'user', type: 'key' },
|
|
163
|
+
{ attributes: ['token'], name: 'token_unique', type: 'unique' },
|
|
164
|
+
],
|
|
165
|
+
name: 'Push notification tokens',
|
|
173
166
|
},
|
|
174
|
-
id: appwriteIds.tables.pushNotificationTokens,
|
|
175
|
-
indexes: [
|
|
176
|
-
{ attributes: ['userId'], name: 'user', type: 'key' },
|
|
177
|
-
{ attributes: ['token'], name: 'token_unique', type: 'unique' },
|
|
178
|
-
],
|
|
179
|
-
key: 'pushNotificationTokens',
|
|
180
|
-
name: 'Push notification tokens',
|
|
181
167
|
});
|
|
182
|
-
export const operationalTableInputs = {
|
|
183
|
-
commands: commandsTable,
|
|
184
|
-
jobs: jobsTable,
|
|
185
|
-
mailboxSyncCandidates: mailboxSyncCandidatesTable,
|
|
186
|
-
mailboxSyncLanes: mailboxSyncLanesTable,
|
|
187
|
-
mailboxSyncStates: mailboxSyncStatesTable,
|
|
188
|
-
pollShardCoordinators: pollShardCoordinatorsTable,
|
|
189
|
-
pollShards: pollShardsTable,
|
|
190
|
-
pushNotificationTokens: pushNotificationTokensTable,
|
|
191
|
-
};
|
|
@@ -79,8 +79,8 @@ export type AppwriteColumnDefinition = ReadonlyDeep<{
|
|
|
79
79
|
size?: number;
|
|
80
80
|
type: AppwriteColumnType;
|
|
81
81
|
}>;
|
|
82
|
-
export type AppwriteIndexDefinition = ReadonlyDeep<{
|
|
83
|
-
attributes: readonly
|
|
82
|
+
export type AppwriteIndexDefinition<TAttribute extends string = string> = ReadonlyDeep<{
|
|
83
|
+
attributes: readonly TAttribute[];
|
|
84
84
|
name: string;
|
|
85
85
|
type: AppwriteIndexType;
|
|
86
86
|
}>;
|
|
@@ -111,15 +111,22 @@ export type AppwriteRelationshipSchema<TSchema extends v.GenericSchema = v.Gener
|
|
|
111
111
|
readonly definition: AppwriteRelationshipDefinitionInput;
|
|
112
112
|
};
|
|
113
113
|
export type AppwriteTableFields = Readonly<Record<string, AppwriteColumnSchema | AppwriteRelationshipSchema>>;
|
|
114
|
+
type AppwriteIndexableFieldKey<TFields extends AppwriteTableFields> = {
|
|
115
|
+
[TKey in keyof TFields]: TFields[TKey] extends AppwriteRelationshipSchema ? never : TKey;
|
|
116
|
+
}[keyof TFields] & string;
|
|
114
117
|
export type AppwriteTableInput<TFields extends AppwriteTableFields = AppwriteTableFields> = Readonly<{
|
|
115
118
|
dataCheck?: (input: unknown) => boolean;
|
|
116
119
|
fields: TFields;
|
|
117
|
-
|
|
118
|
-
indexes: readonly AppwriteIndexDefinition[];
|
|
119
|
-
key: AppwriteTableKey;
|
|
120
|
+
readonly indexes: readonly AppwriteIndexDefinition<AppwriteIndexableFieldKey<TFields>>[];
|
|
120
121
|
name: string;
|
|
121
122
|
wirePermissions?: 'empty';
|
|
122
123
|
}>;
|
|
124
|
+
type AppwriteTableGroupShape = Readonly<Record<string, AppwriteTableInput>>;
|
|
125
|
+
type AppwriteTableGroupConstraint<TTables extends AppwriteTableGroupShape> = {
|
|
126
|
+
readonly [TKey in keyof TTables]: TKey extends AppwriteTableKey ? TTables[TKey] extends {
|
|
127
|
+
readonly fields: infer TFields extends AppwriteTableFields;
|
|
128
|
+
} ? AppwriteTableInput<TFields> : never : never;
|
|
129
|
+
};
|
|
123
130
|
export declare const appwriteColumn: <const TSchema extends v.GenericSchema>(schema: TSchema, definition: AppwriteColumnDefinitionInput) => AppwriteColumnSchema<TSchema>;
|
|
124
131
|
export declare const appwriteRelationship: <const TSchema extends v.GenericSchema>(schema: TSchema, relatedTable: AppwriteTableKey, type?: AppwriteRelationshipType, onDelete?: AppwriteRelationshipOnDelete) => AppwriteRelationshipSchema<TSchema>;
|
|
125
132
|
export declare const appwriteColumnDefinitions: {
|
|
@@ -134,6 +141,6 @@ export declare const appwriteColumnDefinitions: {
|
|
|
134
141
|
stringArray: <const TSchema extends v.GenericSchema>(schema: TSchema, required?: boolean, size?: number) => AppwriteColumnSchema<TSchema>;
|
|
135
142
|
text: <const TSchema extends v.GenericSchema>(schema: TSchema, required?: boolean) => AppwriteColumnSchema<TSchema>;
|
|
136
143
|
};
|
|
137
|
-
export declare const
|
|
144
|
+
export declare const defineAppwriteTableGroup: <const TTables extends AppwriteTableGroupShape>(tables: TTables & AppwriteTableGroupConstraint<TTables>) => TTables;
|
|
138
145
|
export declare const messageLocationCoordinateCheck: (location: unknown) => boolean;
|
|
139
146
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/appwrite/tableContract/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,GACf,MAAM,+BAA+B,CAAA;AAEtC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCd,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,WAAW,CAAC,MAAM,CAAA;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAA;AAC3E,eAAO,MAAM,gBAAgB,EAAE,SAAS,eAAe,EAAsC,CAAA;AAC7F,eAAO,MAAM,qBAAqB,yDAA+B,CAAA;AAEjE,eAAO,MAAM,mBAAmB,6KAA+F,CAAA;AAE/H,eAAO,MAAM,4BAA4B;;;;yBAMvC,CAAA;AAEF,eAAO,MAAM,gBAAgB,uCAAwC,CAAA;AACrE,eAAO,MAAM,aAAa,wEAAyE,CAAA;AACnG,eAAO,MAAM,a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MAAM,8BAA8B,aAAc,OAAO,YAM/D,CAAA"}
|
|
@@ -74,7 +74,7 @@ export const appwriteColumnDefinitions = {
|
|
|
74
74
|
stringArray: (schema, required = true, size = 255) => appwriteColumn(schema, { array: true, required, size, type: 'string' }),
|
|
75
75
|
text: (schema, required = true) => appwriteColumn(schema, { required, type: 'text' }),
|
|
76
76
|
};
|
|
77
|
-
export const
|
|
77
|
+
export const defineAppwriteTableGroup = (tables) => tables;
|
|
78
78
|
export const messageLocationCoordinateCheck = (location) => {
|
|
79
79
|
if (typeof location === 'object' && location !== null && 'uid' in location && 'uidValidity' in location) {
|
|
80
80
|
return (location.uid === null && location.uidValidity === null) || (location.uid !== null && location.uidValidity !== null);
|