@marcoappio/marco-config 3.0.7 → 3.0.8
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.
|
@@ -275,6 +275,16 @@ declare const rowSchemas: {
|
|
|
275
275
|
readonly $tableId: v.LiteralSchema<"oauth_states", undefined>;
|
|
276
276
|
readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
277
277
|
}, undefined>;
|
|
278
|
+
readonly pollShardCoordinators: v.StrictObjectSchema<{
|
|
279
|
+
readonly $permissions: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.LengthAction<string[], 0, undefined>]>;
|
|
280
|
+
readonly accountCursor: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
|
|
281
|
+
readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
282
|
+
readonly $databaseId: v.LiteralSchema<"marco", undefined>;
|
|
283
|
+
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
|
|
284
|
+
readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
285
|
+
readonly $tableId: v.LiteralSchema<"poll_shard_coordinators", undefined>;
|
|
286
|
+
readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
287
|
+
}, undefined>;
|
|
278
288
|
readonly pollShards: v.StrictObjectSchema<{
|
|
279
289
|
readonly $permissions: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.LengthAction<string[], 0, undefined>]>;
|
|
280
290
|
readonly accountIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, v.MaxLengthAction<string[], 10, undefined>]>;
|
|
@@ -456,6 +466,7 @@ export declare const appwrite: {
|
|
|
456
466
|
readonly mailboxSyncStates: "mailbox_sync_states";
|
|
457
467
|
readonly messages: "messages";
|
|
458
468
|
readonly oauthStates: "oauth_states";
|
|
469
|
+
readonly pollShardCoordinators: "poll_shard_coordinators";
|
|
459
470
|
readonly pollShards: "poll_shards";
|
|
460
471
|
readonly profiles: "profiles";
|
|
461
472
|
readonly pushNotificationTokens: "push_notification_tokens";
|
|
@@ -714,6 +725,16 @@ export declare const appwrite: {
|
|
|
714
725
|
readonly $tableId: v.LiteralSchema<"oauth_states", undefined>;
|
|
715
726
|
readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
716
727
|
}, undefined>;
|
|
728
|
+
readonly pollShardCoordinators: v.StrictObjectSchema<{
|
|
729
|
+
readonly $permissions: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.LengthAction<string[], 0, undefined>]>;
|
|
730
|
+
readonly accountCursor: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
|
|
731
|
+
readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
732
|
+
readonly $databaseId: v.LiteralSchema<"marco", undefined>;
|
|
733
|
+
readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
|
|
734
|
+
readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
735
|
+
readonly $tableId: v.LiteralSchema<"poll_shard_coordinators", undefined>;
|
|
736
|
+
readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
737
|
+
}, undefined>;
|
|
717
738
|
readonly pollShards: v.StrictObjectSchema<{
|
|
718
739
|
readonly $permissions: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.LengthAction<string[], 0, undefined>]>;
|
|
719
740
|
readonly accountIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, v.MaxLengthAction<string[], 10, undefined>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appwrite.d.ts","sourceRoot":"","sources":["../../src/appwrite/appwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAO5B,eAAO,MAAM,mBAAmB,6KAA+F,CAAA;AAW/H,QAAA,MAAM,qBAAqB;;;;;aAKzB,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;;;eASxB,CAAA;AACD,QAAA,MAAM,uBAAuB;;;;;;;aAO3B,CAAA;AAEF,QAAA,MAAM,sBAAsB;;;;aAI1B,CAAA;AAGF,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAA;AAC/F,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAA;AAC3F,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,CAAC,C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
mailboxSyncStates: 'mailbox_sync_states',
|
|
103
103
|
messages: 'messages',
|
|
104
104
|
oauthStates: 'oauth_states',
|
|
105
|
+
pollShardCoordinators: 'poll_shard_coordinators',
|
|
105
106
|
pollShards: 'poll_shards',
|
|
106
107
|
profiles: 'profiles',
|
|
107
108
|
pushNotificationTokens: 'push_notification_tokens',
|
|
@@ -284,6 +285,11 @@ const rowSchemas = {
|
|
|
284
285
|
returnUri: oauthReturnUriSchema,
|
|
285
286
|
userId: identifierSchema,
|
|
286
287
|
}),
|
|
288
|
+
pollShardCoordinators: v.strictObject({
|
|
289
|
+
...wireMetadata(appwriteIds.tables.pollShardCoordinators),
|
|
290
|
+
$permissions: v.pipe(v.array(v.string()), v.length(0)),
|
|
291
|
+
accountCursor: v.nullable(identifierSchema),
|
|
292
|
+
}),
|
|
287
293
|
pollShards: v.strictObject({
|
|
288
294
|
...wireMetadata(appwriteIds.tables.pollShards),
|
|
289
295
|
$permissions: v.pipe(v.array(v.string()), v.length(0)),
|
|
@@ -272,6 +272,13 @@ const validRows = {
|
|
|
272
272
|
state: 'ACTIVE',
|
|
273
273
|
},
|
|
274
274
|
};
|
|
275
|
+
const validPollShardCoordinatorRow = {
|
|
276
|
+
...metadata,
|
|
277
|
+
$permissions: [],
|
|
278
|
+
$tableId: 'poll_shard_coordinators',
|
|
279
|
+
accountCursor: null,
|
|
280
|
+
};
|
|
281
|
+
const pollShardCoordinatorSchema = Object.entries(appwrite.rowSchemas).find(([table]) => table === 'pollShardCoordinators')?.[1];
|
|
275
282
|
describe('appwrite', () => {
|
|
276
283
|
it('publishes the production browser and OAuth configuration', () => {
|
|
277
284
|
expect(appwrite.environments).toEqual(['development', 'production', 'staging']);
|
|
@@ -307,6 +314,7 @@ describe('appwrite', () => {
|
|
|
307
314
|
mailboxSyncStates: 'mailbox_sync_states',
|
|
308
315
|
messages: 'messages',
|
|
309
316
|
oauthStates: 'oauth_states',
|
|
317
|
+
pollShardCoordinators: 'poll_shard_coordinators',
|
|
310
318
|
pollShards: 'poll_shards',
|
|
311
319
|
profiles: 'profiles',
|
|
312
320
|
pushNotificationTokens: 'push_notification_tokens',
|
|
@@ -355,6 +363,18 @@ describe('appwrite', () => {
|
|
|
355
363
|
pollingSnapshot: '{"members":[]}',
|
|
356
364
|
}).success).toBe(true);
|
|
357
365
|
});
|
|
366
|
+
it('exports the strict server-only poll shard coordinator row contract', () => {
|
|
367
|
+
expect(pollShardCoordinatorSchema).toBeDefined();
|
|
368
|
+
if (pollShardCoordinatorSchema) {
|
|
369
|
+
for (const accountCursor of [null, 'test-account-id-1']) {
|
|
370
|
+
expect(v.safeParse(pollShardCoordinatorSchema, { ...validPollShardCoordinatorRow, accountCursor }).success).toBe(true);
|
|
371
|
+
}
|
|
372
|
+
expect(v.safeParse(pollShardCoordinatorSchema, { ...validPollShardCoordinatorRow, $permissions: ['read("user:test-user-id-1")'] }).success).toBe(false);
|
|
373
|
+
expect(v.safeParse(pollShardCoordinatorSchema, { ...validPollShardCoordinatorRow, unexpected: true }).success).toBe(false);
|
|
374
|
+
const { $id: _, ...rowWithoutId } = validPollShardCoordinatorRow;
|
|
375
|
+
expect(v.safeParse(pollShardCoordinatorSchema, rowWithoutId).success).toBe(false);
|
|
376
|
+
}
|
|
377
|
+
});
|
|
358
378
|
const serverOnlyPollingRows = [
|
|
359
379
|
{ row: validRows.mailboxSyncLanes, schema: appwrite.rowSchemas.mailboxSyncLanes },
|
|
360
380
|
{ row: validRows.pollShards, schema: appwrite.rowSchemas.pollShards },
|