@powersync/service-types 0.0.0-dev-20260511080634 → 0.0.0-dev-20261007110800

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/CHANGELOG.md CHANGED
@@ -1,9 +1,76 @@
1
1
  # @powersync/service-types
2
2
 
3
- ## 0.0.0-dev-20260511080634
3
+ ## 0.0.0-dev-20261007110800
4
+
5
+ ### Minor Changes
6
+
7
+ - ef5e87c: Add `config.source_table_options` to edition 3 sync configs, including MongoDB pre-filtering expressions. Generate editor schemas with examples and report validation errors at their YAML source locations.
8
+
9
+ MongoDB replication pre-filtering is only available in the Team and Enterprise editions. For example:
10
+
11
+ ```yaml
12
+ config:
13
+ edition: 3
14
+ source_table_options:
15
+ orders:
16
+ mongodb_filter_expression:
17
+ $and:
18
+ - $eq: ['$$doc.active', true]
19
+ - $in: ['$$doc.status', ['pending', 'shipped']]
20
+ streams:
21
+ orders:
22
+ query: SELECT * FROM orders
23
+ ```
24
+
25
+ Validation and deployment reject filters when the feature is unavailable. Changing source-table options requires replacement processing when deploying a new sync config.
26
+
27
+ Source capability validation returns structured `ValidationDiagnostic` entries, allowing multiple fatal issues and
28
+ advisory warnings. Deployment and reprocessing reject fatal diagnostics while validation continues collecting
29
+ independent findings. Existing `ReplicationError` consumers retain the same diagnostic shape.
30
+
31
+ ## 0.19.0
32
+
33
+ ### Minor Changes
34
+
35
+ - 5078032: Change the default MongoDB storage version from 2 to 4.
36
+
37
+ ## 0.18.0
38
+
39
+ ### Minor Changes
40
+
41
+ - 33a3c23: Add optional version_label for sync configs.
42
+
43
+ ### Patch Changes
44
+
45
+ - fccdff2: Add object storage metrics, and storage metrics split by sync config.
46
+ - 4e4063b: Optimize runtime type checks, closes https://github.com/powersync-ja/powersync-service/issues/771.
47
+ - 4037e8f: Add storage.default_storage_version config option.
48
+
49
+ ## 0.17.0
50
+
51
+ ### Minor Changes
52
+
53
+ - 2189250: Add `/sync/checkpoint-request` for client-supplied checkpoint request ids, previously called write checkpoint ids. The route returns the stored `checkpoint_request_id`, storage now treats managed request ids as monotonic per user/client, custom checkpoint request ids continue to use the existing `checkpoint` field for backwards compatibility, and `checkpoint_requested_at` metadata lets compact jobs remove expired request-derived checkpoint records.
54
+
55
+ This release includes storage migrations for the checkpoint request metadata. Self-hosters should run migrations as part of the upgrade.
56
+
57
+ ## 0.16.1
58
+
59
+ ### Patch Changes
60
+
61
+ - c2edf86: Add `api.parameters.bucket_count_cache_ttl_minutes` configuration option.
62
+
63
+ ## 0.16.0
64
+
65
+ ### Minor Changes
66
+
67
+ - a91a08f: [Experimental] Enable incremental reprocessing for MongoDB source + MongoDB storage. This includes significant changes to the v3 storage format.
68
+
69
+ ## 0.15.2
4
70
 
5
71
  ### Patch Changes
6
72
 
73
+ - ad9ea06: Fix typo to allow P-521 EC curves in JWKs.
7
74
  - 040fffd: Improve consistency of logs and error messages
8
75
 
9
76
  ## 0.15.1
@@ -0,0 +1,29 @@
1
+ import type { AnyCodec, Codec, Ix, Ox } from 'ts-codec';
2
+ /**
3
+ * An optimized codec equivalent to `type.or(Null)`.
4
+ */
5
+ export declare function orNull<T extends AnyCodec>(type: T): Codec<Ix<T> | null, Ox<T> | null>;
6
+ /**
7
+ * A codec parsing a static enumeration of literals.
8
+ *
9
+ * `enumLiteral('foo', 'bar')` is an equivalent but more efficient implementation of
10
+ * `literal('foo').or(literal('bar'))`
11
+ */
12
+ export declare function enumLiteral<T extends string>(...values: T[]): Codec<T, T>;
13
+ type NamedPrimitiveTypes = {
14
+ string: string;
15
+ number: number;
16
+ boolean: boolean;
17
+ null: null;
18
+ };
19
+ type EnabledKeys<T> = {
20
+ [K in keyof T]: T[K] extends true ? K : never;
21
+ }[keyof T];
22
+ type PrimitiveUnion<T extends Partial<Record<keyof NamedPrimitiveTypes, boolean>>> = NamedPrimitiveTypes[Extract<EnabledKeys<T>, keyof NamedPrimitiveTypes>];
23
+ /**
24
+ * Parses multiple primitive types.
25
+ *
26
+ * `anyPrimitive({ boolean: true, string: true })` behaves identical to `boolean.or(string)`, but is more efficient.
27
+ */
28
+ export declare function anyPrimitive<const T extends Partial<Record<keyof NamedPrimitiveTypes, boolean>>>(allowedPrimitives: T): Codec<PrimitiveUnion<T>, PrimitiveUnion<T>>;
29
+ export {};
package/dist/codecs.js ADDED
@@ -0,0 +1,85 @@
1
+ import * as t from 'ts-codec';
2
+ /**
3
+ * An optimized codec equivalent to `type.or(Null)`.
4
+ */
5
+ export function orNull(type) {
6
+ return t.codec(t.CodecType.Union, (data) => {
7
+ if (data === null) {
8
+ return null;
9
+ }
10
+ return type.encode(data);
11
+ }, (data) => {
12
+ if (data === null) {
13
+ return null;
14
+ }
15
+ return type.decode(data);
16
+ }, {
17
+ codecs: [type, t.Null]
18
+ });
19
+ }
20
+ /**
21
+ * A codec parsing a static enumeration of literals.
22
+ *
23
+ * `enumLiteral('foo', 'bar')` is an equivalent but more efficient implementation of
24
+ * `literal('foo').or(literal('bar'))`
25
+ */
26
+ export function enumLiteral(...values) {
27
+ function validate(source) {
28
+ function invalid() {
29
+ const allowed = values.join(', ');
30
+ throw new t.TransformError(`Expected one of ${allowed}, but got ${source}`);
31
+ }
32
+ if (typeof source !== 'string')
33
+ invalid();
34
+ if (!values.includes(source))
35
+ invalid();
36
+ return source;
37
+ }
38
+ return t.codec(t.CodecType.Enum, validate, validate, {
39
+ enum: values
40
+ });
41
+ }
42
+ const primitiveCodecs = {
43
+ string: t.string,
44
+ number: t.number,
45
+ boolean: t.boolean,
46
+ null: t.Null
47
+ };
48
+ /**
49
+ * Parses multiple primitive types.
50
+ *
51
+ * `anyPrimitive({ boolean: true, string: true })` behaves identical to `boolean.or(string)`, but is more efficient.
52
+ */
53
+ export function anyPrimitive(allowedPrimitives) {
54
+ function validate(source) {
55
+ switch (typeof source) {
56
+ case 'string':
57
+ if (allowedPrimitives.string)
58
+ return source;
59
+ break;
60
+ case 'number':
61
+ if (allowedPrimitives.number)
62
+ return source;
63
+ break;
64
+ case 'boolean':
65
+ if (allowedPrimitives.boolean)
66
+ return source;
67
+ break;
68
+ case 'object':
69
+ if (allowedPrimitives.null && source === null)
70
+ return source;
71
+ break;
72
+ }
73
+ throw new t.TransformError(`Primitive value ${source} is not allowed.`);
74
+ }
75
+ const codecsForSchema = [];
76
+ for (const [key, value] of Object.entries(allowedPrimitives)) {
77
+ if (value) {
78
+ codecsForSchema.push(primitiveCodecs[key]);
79
+ }
80
+ }
81
+ return t.codec(t.CodecType.Union, validate, validate, {
82
+ codecs: codecsForSchema
83
+ });
84
+ }
85
+ //# sourceMappingURL=codecs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codecs.js","sourceRoot":"","sources":["../src/codecs.ts"],"names":[],"mappings":"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"}
@@ -121,9 +121,7 @@ export declare const jwkHmac: t.Codec<{
121
121
  }>;
122
122
  kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
123
123
  k: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
124
- alg: t.Codec<"HS256" | "HS384" | "HS512", "HS256" | "HS384" | "HS512", t.CodecType.Union, {
125
- codecs: t.AnyCodec[];
126
- }>;
124
+ alg: t.Codec<"HS256" | "HS384" | "HS512", "HS256" | "HS384" | "HS512", string, t.CodecProps>;
127
125
  use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
128
126
  };
129
127
  }>;
@@ -148,9 +146,7 @@ export declare const jwkOKP: t.Codec<{
148
146
  }>;
149
147
  kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
150
148
  /** Other curves have security issues so only these two are supported. */
151
- crv: t.Codec<"Ed25519" | "Ed448", "Ed25519" | "Ed448", t.CodecType.Union, {
152
- codecs: t.AnyCodec[];
153
- }>;
149
+ crv: t.Codec<"Ed25519" | "Ed448", "Ed25519" | "Ed448", string, t.CodecProps>;
154
150
  x: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
155
151
  alg: t.Codec<"EdDSA", "EdDSA", t.CodecType.Literal, {
156
152
  value: "EdDSA";
@@ -161,7 +157,7 @@ export declare const jwkOKP: t.Codec<{
161
157
  export declare const jwkEC: t.Codec<{
162
158
  kty: "EC";
163
159
  alg: "ES256" | "ES384" | "ES512";
164
- crv: "P-256" | "P-384" | "P-512";
160
+ crv: "P-256" | "P-384" | "P-521";
165
161
  x: string;
166
162
  y: string;
167
163
  kid?: string | undefined;
@@ -169,7 +165,7 @@ export declare const jwkEC: t.Codec<{
169
165
  }, {
170
166
  kty: "EC";
171
167
  alg: "ES256" | "ES384" | "ES512";
172
- crv: "P-256" | "P-384" | "P-512";
168
+ crv: "P-256" | "P-384" | "P-521";
173
169
  x: string;
174
170
  y: string;
175
171
  kid?: string | undefined;
@@ -180,14 +176,10 @@ export declare const jwkEC: t.Codec<{
180
176
  value: "EC";
181
177
  }>;
182
178
  kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
183
- crv: t.Codec<"P-256" | "P-384" | "P-512", "P-256" | "P-384" | "P-512", t.CodecType.Union, {
184
- codecs: t.AnyCodec[];
185
- }>;
179
+ crv: t.Codec<"P-256" | "P-384" | "P-521", "P-256" | "P-384" | "P-521", string, t.CodecProps>;
186
180
  x: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
187
181
  y: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
188
- alg: t.Codec<"ES256" | "ES384" | "ES512", "ES256" | "ES384" | "ES512", t.CodecType.Union, {
189
- codecs: t.AnyCodec[];
190
- }>;
182
+ alg: t.Codec<"ES256" | "ES384" | "ES512", "ES256" | "ES384" | "ES512", string, t.CodecProps>;
191
183
  use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
192
184
  };
193
185
  }>;
@@ -214,7 +206,7 @@ declare const jwk: t.Codec<{
214
206
  } | {
215
207
  kty: "EC";
216
208
  alg: "ES256" | "ES384" | "ES512";
217
- crv: "P-256" | "P-384" | "P-512";
209
+ crv: "P-256" | "P-384" | "P-521";
218
210
  x: string;
219
211
  y: string;
220
212
  kid?: string | undefined;
@@ -242,7 +234,7 @@ declare const jwk: t.Codec<{
242
234
  } | {
243
235
  kty: "EC";
244
236
  alg: "ES256" | "ES384" | "ES512";
245
- crv: "P-256" | "P-384" | "P-512";
237
+ crv: "P-256" | "P-384" | "P-521";
246
238
  x: string;
247
239
  y: string;
248
240
  kid?: string | undefined;
@@ -274,7 +266,7 @@ export declare const strictJwks: t.Codec<{
274
266
  } | {
275
267
  kty: "EC";
276
268
  alg: "ES256" | "ES384" | "ES512";
277
- crv: "P-256" | "P-384" | "P-512";
269
+ crv: "P-256" | "P-384" | "P-521";
278
270
  x: string;
279
271
  y: string;
280
272
  kid?: string | undefined;
@@ -304,7 +296,7 @@ export declare const strictJwks: t.Codec<{
304
296
  } | {
305
297
  kty: "EC";
306
298
  alg: "ES256" | "ES384" | "ES512";
307
- crv: "P-256" | "P-384" | "P-512";
299
+ crv: "P-256" | "P-384" | "P-521";
308
300
  x: string;
309
301
  y: string;
310
302
  kid?: string | undefined;
@@ -335,7 +327,7 @@ export declare const strictJwks: t.Codec<{
335
327
  } | {
336
328
  kty: "EC";
337
329
  alg: "ES256" | "ES384" | "ES512";
338
- crv: "P-256" | "P-384" | "P-512";
330
+ crv: "P-256" | "P-384" | "P-521";
339
331
  x: string;
340
332
  y: string;
341
333
  kid?: string | undefined;
@@ -363,7 +355,7 @@ export declare const strictJwks: t.Codec<{
363
355
  } | {
364
356
  kty: "EC";
365
357
  alg: "ES256" | "ES384" | "ES512";
366
- crv: "P-256" | "P-384" | "P-512";
358
+ crv: "P-256" | "P-384" | "P-521";
367
359
  x: string;
368
360
  y: string;
369
361
  kid?: string | undefined;
@@ -392,7 +384,7 @@ export declare const strictJwks: t.Codec<{
392
384
  } | {
393
385
  kty: "EC";
394
386
  alg: "ES256" | "ES384" | "ES512";
395
- crv: "P-256" | "P-384" | "P-512";
387
+ crv: "P-256" | "P-384" | "P-521";
396
388
  x: string;
397
389
  y: string;
398
390
  kid?: string | undefined;
@@ -420,7 +412,7 @@ export declare const strictJwks: t.Codec<{
420
412
  } | {
421
413
  kty: "EC";
422
414
  alg: "ES256" | "ES384" | "ES512";
423
- crv: "P-256" | "P-384" | "P-512";
415
+ crv: "P-256" | "P-384" | "P-521";
424
416
  x: string;
425
417
  y: string;
426
418
  kid?: string | undefined;
@@ -448,13 +440,16 @@ export type LoggingConfig = t.Decoded<typeof LoggingConfig>;
448
440
  export declare const BaseStorageConfig: t.Codec<{
449
441
  type: string;
450
442
  max_pool_size?: number | undefined;
443
+ default_storage_version?: number | undefined;
451
444
  }, {
452
445
  type: string;
453
446
  max_pool_size?: number | undefined;
447
+ default_storage_version?: number | undefined;
454
448
  }, t.CodecType.Object, {
455
449
  shape: {
456
450
  type: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
457
451
  max_pool_size: t.OptionalCodec<t.Codec<number, number, string, t.CodecProps>>;
452
+ default_storage_version: t.OptionalCodec<t.Codec<number, number, string, t.CodecProps>>;
458
453
  };
459
454
  }>;
460
455
  /**
@@ -467,21 +462,26 @@ export type BaseStorageConfig = t.Encoded<typeof BaseStorageConfig>;
467
462
  export declare const GenericStorageConfig: t.Intersection<t.Codec<{
468
463
  type: string;
469
464
  max_pool_size?: number | undefined;
465
+ default_storage_version?: number | undefined;
470
466
  }, {
471
467
  type: string;
472
468
  max_pool_size?: number | undefined;
469
+ default_storage_version?: number | undefined;
473
470
  }, string, t.CodecProps>, t.RecordCodec<t.Codec<any, any, t.CodecType.Any, t.CodecProps>>>;
474
471
  export type GenericStorageConfig = t.Encoded<typeof GenericStorageConfig>;
475
472
  export declare const SyncConfig: t.Codec<{
473
+ version_label?: string | undefined;
476
474
  content?: string | undefined;
477
475
  path?: string | undefined;
478
476
  exit_on_error?: boolean | undefined;
479
477
  }, {
478
+ version_label?: string | undefined;
480
479
  content?: string | undefined;
481
480
  path?: string | undefined;
482
481
  exit_on_error?: boolean | undefined;
483
482
  }, t.CodecType.Object, {
484
483
  shape: {
484
+ version_label: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
485
485
  path: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
486
486
  content: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
487
487
  exit_on_error: t.OptionalCodec<t.Codec<boolean, boolean, string, t.CodecProps>>;
@@ -491,6 +491,7 @@ export declare const powerSyncConfig: t.Codec<{
491
491
  storage: {
492
492
  type: string;
493
493
  max_pool_size?: number | undefined;
494
+ default_storage_version?: number | undefined;
494
495
  } & Record<string, any>;
495
496
  replication?: {
496
497
  connections?: ({
@@ -528,7 +529,7 @@ export declare const powerSyncConfig: t.Codec<{
528
529
  } | {
529
530
  kty: "EC";
530
531
  alg: "ES256" | "ES384" | "ES512";
531
- crv: "P-256" | "P-384" | "P-512";
532
+ crv: "P-256" | "P-384" | "P-521";
532
533
  x: string;
533
534
  y: string;
534
535
  kid?: string | undefined;
@@ -547,15 +548,19 @@ export declare const powerSyncConfig: t.Codec<{
547
548
  max_data_fetch_concurrency?: number | undefined;
548
549
  max_buckets_per_connection?: number | undefined;
549
550
  max_parameter_query_results?: number | undefined;
551
+ checkpoint_request_retention_minutes?: number | undefined;
552
+ bucket_count_cache_ttl_minutes?: number | undefined;
550
553
  } | undefined;
551
554
  } | undefined;
552
555
  port?: number | undefined;
553
556
  sync_config?: {
557
+ version_label?: string | undefined;
554
558
  content?: string | undefined;
555
559
  path?: string | undefined;
556
560
  exit_on_error?: boolean | undefined;
557
561
  } | undefined;
558
562
  sync_rules?: {
563
+ version_label?: string | undefined;
559
564
  content?: string | undefined;
560
565
  path?: string | undefined;
561
566
  exit_on_error?: boolean | undefined;
@@ -586,6 +591,7 @@ export declare const powerSyncConfig: t.Codec<{
586
591
  storage: {
587
592
  type: string;
588
593
  max_pool_size?: number | undefined;
594
+ default_storage_version?: number | undefined;
589
595
  } & Record<string, any>;
590
596
  replication?: {
591
597
  connections?: ({
@@ -623,7 +629,7 @@ export declare const powerSyncConfig: t.Codec<{
623
629
  } | {
624
630
  kty: "EC";
625
631
  alg: "ES256" | "ES384" | "ES512";
626
- crv: "P-256" | "P-384" | "P-512";
632
+ crv: "P-256" | "P-384" | "P-521";
627
633
  x: string;
628
634
  y: string;
629
635
  kid?: string | undefined;
@@ -642,15 +648,19 @@ export declare const powerSyncConfig: t.Codec<{
642
648
  max_data_fetch_concurrency?: number | undefined;
643
649
  max_buckets_per_connection?: number | undefined;
644
650
  max_parameter_query_results?: number | undefined;
651
+ checkpoint_request_retention_minutes?: number | undefined;
652
+ bucket_count_cache_ttl_minutes?: number | undefined;
645
653
  } | undefined;
646
654
  } | undefined;
647
655
  port?: string | number | undefined;
648
656
  sync_config?: {
657
+ version_label?: string | undefined;
649
658
  content?: string | undefined;
650
659
  path?: string | undefined;
651
660
  exit_on_error?: boolean | undefined;
652
661
  } | undefined;
653
662
  sync_rules?: {
663
+ version_label?: string | undefined;
654
664
  content?: string | undefined;
655
665
  path?: string | undefined;
656
666
  exit_on_error?: boolean | undefined;
@@ -722,7 +732,7 @@ export declare const powerSyncConfig: t.Codec<{
722
732
  } | {
723
733
  kty: "EC";
724
734
  alg: "ES256" | "ES384" | "ES512";
725
- crv: "P-256" | "P-384" | "P-512";
735
+ crv: "P-256" | "P-384" | "P-521";
726
736
  x: string;
727
737
  y: string;
728
738
  kid?: string | undefined;
@@ -760,7 +770,7 @@ export declare const powerSyncConfig: t.Codec<{
760
770
  } | {
761
771
  kty: "EC";
762
772
  alg: "ES256" | "ES384" | "ES512";
763
- crv: "P-256" | "P-384" | "P-512";
773
+ crv: "P-256" | "P-384" | "P-521";
764
774
  x: string;
765
775
  y: string;
766
776
  kid?: string | undefined;
@@ -778,6 +788,8 @@ export declare const powerSyncConfig: t.Codec<{
778
788
  max_data_fetch_concurrency?: number | undefined;
779
789
  max_buckets_per_connection?: number | undefined;
780
790
  max_parameter_query_results?: number | undefined;
791
+ checkpoint_request_retention_minutes?: number | undefined;
792
+ bucket_count_cache_ttl_minutes?: number | undefined;
781
793
  } | undefined;
782
794
  }, {
783
795
  tokens?: string[] | undefined;
@@ -786,23 +798,29 @@ export declare const powerSyncConfig: t.Codec<{
786
798
  max_data_fetch_concurrency?: number | undefined;
787
799
  max_buckets_per_connection?: number | undefined;
788
800
  max_parameter_query_results?: number | undefined;
801
+ checkpoint_request_retention_minutes?: number | undefined;
802
+ bucket_count_cache_ttl_minutes?: number | undefined;
789
803
  } | undefined;
790
804
  }, string, t.CodecProps>>;
791
805
  storage: t.Codec<{
792
806
  type: string;
793
807
  max_pool_size?: number | undefined;
808
+ default_storage_version?: number | undefined;
794
809
  } & Record<string, any>, {
795
810
  type: string;
796
811
  max_pool_size?: number | undefined;
812
+ default_storage_version?: number | undefined;
797
813
  } & Record<string, any>, t.CodecType.Intersection, {
798
814
  codecs: t.AnyCodec[];
799
815
  }>;
800
816
  port: t.OptionalCodec<t.Codec<number, string | number, string, t.CodecProps>>;
801
817
  sync_config: t.OptionalCodec<t.Codec<{
818
+ version_label?: string | undefined;
802
819
  content?: string | undefined;
803
820
  path?: string | undefined;
804
821
  exit_on_error?: boolean | undefined;
805
822
  }, {
823
+ version_label?: string | undefined;
806
824
  content?: string | undefined;
807
825
  path?: string | undefined;
808
826
  exit_on_error?: boolean | undefined;
@@ -812,10 +830,12 @@ export declare const powerSyncConfig: t.Codec<{
812
830
  * This is preserved for backwards compatibility but should not be used in new configurations.
813
831
  */
814
832
  sync_rules: t.OptionalCodec<t.Codec<{
833
+ version_label?: string | undefined;
815
834
  content?: string | undefined;
816
835
  path?: string | undefined;
817
836
  exit_on_error?: boolean | undefined;
818
837
  }, {
838
+ version_label?: string | undefined;
819
839
  content?: string | undefined;
820
840
  path?: string | undefined;
821
841
  exit_on_error?: boolean | undefined;