@iyio/obj-sync 0.0.2 → 0.3.0

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.
Files changed (37) hide show
  1. package/esm/src/index.d.ts +2 -0
  2. package/esm/src/index.js +2 -0
  3. package/esm/src/index.js.map +1 -1
  4. package/esm/src/lib/ObjSyncClient.d.ts +29 -6
  5. package/esm/src/lib/ObjSyncClient.js +133 -17
  6. package/esm/src/lib/ObjSyncClient.js.map +1 -1
  7. package/esm/src/lib/ObjSyncWebsocketClient.d.ts +2 -0
  8. package/esm/src/lib/ObjSyncWebsocketClient.js +21 -5
  9. package/esm/src/lib/ObjSyncWebsocketClient.js.map +1 -1
  10. package/esm/src/lib/obj-sync-tables.d.ts +4 -2
  11. package/esm/src/lib/obj-sync-tables.js +8 -2
  12. package/esm/src/lib/obj-sync-tables.js.map +1 -1
  13. package/esm/src/lib/obj-sync-types.d.ts +85 -33
  14. package/esm/src/lib/obj-sync-types.js +26 -3
  15. package/esm/src/lib/obj-sync-types.js.map +1 -1
  16. package/esm/src/lib/obj-sync.deps.d.ts +4 -0
  17. package/esm/src/lib/obj-sync.deps.js +5 -1
  18. package/esm/src/lib/obj-sync.deps.js.map +1 -1
  19. package/package.json +10 -10
  20. package/src/index.d.ts +2 -0
  21. package/src/index.js +2 -0
  22. package/src/index.js.map +1 -1
  23. package/src/lib/ObjSyncClient.d.ts +29 -6
  24. package/src/lib/ObjSyncClient.js +131 -15
  25. package/src/lib/ObjSyncClient.js.map +1 -1
  26. package/src/lib/ObjSyncWebsocketClient.d.ts +2 -0
  27. package/src/lib/ObjSyncWebsocketClient.js +21 -5
  28. package/src/lib/ObjSyncWebsocketClient.js.map +1 -1
  29. package/src/lib/obj-sync-tables.d.ts +4 -2
  30. package/src/lib/obj-sync-tables.js +8 -2
  31. package/src/lib/obj-sync-tables.js.map +1 -1
  32. package/src/lib/obj-sync-types.d.ts +85 -33
  33. package/src/lib/obj-sync-types.js +26 -3
  34. package/src/lib/obj-sync-types.js.map +1 -1
  35. package/src/lib/obj-sync.deps.d.ts +4 -0
  36. package/src/lib/obj-sync.deps.js +5 -1
  37. package/src/lib/obj-sync.deps.js.map +1 -1
@@ -139,11 +139,11 @@ export declare const ObjSyncRecursiveObjWatchEvtScheme: z.ZodIntersection<z.ZodU
139
139
  type: "load";
140
140
  prop?: string | undefined;
141
141
  }>]>, z.ZodObject<{
142
- path: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>>;
142
+ path: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>, "many">>;
143
143
  }, "strip", z.ZodTypeAny, {
144
- path?: string | number | null | undefined;
144
+ path?: (string | number | null)[] | undefined;
145
145
  }, {
146
- path?: string | number | null | undefined;
146
+ path?: (string | number | null)[] | undefined;
147
147
  }>>;
148
148
  export type ObjSyncRecursiveObjWatchEvt = z.infer<typeof ObjSyncRecursiveObjWatchEvtScheme>;
149
149
  export declare const ObjSyncObjStateScheme: z.ZodObject<{
@@ -229,12 +229,22 @@ export declare const ObjSyncObjStateScheme: z.ZodObject<{
229
229
  type: "load";
230
230
  prop?: string | undefined;
231
231
  }>]>, z.ZodObject<{
232
- path: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>>;
232
+ path: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>, "many">>;
233
233
  }, "strip", z.ZodTypeAny, {
234
- path?: string | number | null | undefined;
234
+ path?: (string | number | null)[] | undefined;
235
235
  }, {
236
- path?: string | number | null | undefined;
236
+ path?: (string | number | null)[] | undefined;
237
237
  }>>, "many">;
238
+ /**
239
+ * Defines the path to an object that has values with keys matching the ids of the clients
240
+ * connected to the object
241
+ */
242
+ clientMapProp: z.ZodOptional<z.ZodString>;
243
+ /**
244
+ * If true objects in the client object map at the path defined by clientMapProp will be
245
+ * automatically deleted on disconnect.
246
+ */
247
+ autoDeleteClientObjects: z.ZodOptional<z.ZodBoolean>;
238
248
  }, "strip", z.ZodTypeAny, {
239
249
  objId: string;
240
250
  changeIndex: number;
@@ -266,8 +276,10 @@ export declare const ObjSyncObjStateScheme: z.ZodObject<{
266
276
  type: "load";
267
277
  prop?: string | undefined;
268
278
  }) & {
269
- path?: string | number | null | undefined;
279
+ path?: (string | number | null)[] | undefined;
270
280
  })[];
281
+ clientMapProp?: string | undefined;
282
+ autoDeleteClientObjects?: boolean | undefined;
271
283
  }, {
272
284
  objId: string;
273
285
  changeIndex: number;
@@ -299,14 +311,16 @@ export declare const ObjSyncObjStateScheme: z.ZodObject<{
299
311
  type: "load";
300
312
  prop?: string | undefined;
301
313
  }) & {
302
- path?: string | number | null | undefined;
314
+ path?: (string | number | null)[] | undefined;
303
315
  })[];
316
+ clientMapProp?: string | undefined;
317
+ autoDeleteClientObjects?: boolean | undefined;
304
318
  }>;
305
319
  export type ObjSyncObjState = z.infer<typeof ObjSyncObjStateScheme>;
306
- export declare const ObjSyncRemoteCommandTypeScheme: z.ZodEnum<["delete", "get", "evt", "createClient"]>;
320
+ export declare const ObjSyncRemoteCommandTypeScheme: z.ZodEnum<["delete", "get", "evt", "createClient", "ping"]>;
307
321
  export type ObjSyncRemoteCommandType = z.infer<typeof ObjSyncRemoteCommandTypeScheme>;
308
322
  export declare const ObjSyncRemoteCommandScheme: z.ZodObject<{
309
- type: z.ZodEnum<["delete", "get", "evt", "createClient"]>;
323
+ type: z.ZodEnum<["delete", "get", "evt", "createClient", "ping"]>;
310
324
  /**
311
325
  * Id of the client connected
312
326
  */
@@ -394,14 +408,27 @@ export declare const ObjSyncRemoteCommandScheme: z.ZodObject<{
394
408
  type: "load";
395
409
  prop?: string | undefined;
396
410
  }>]>, z.ZodObject<{
397
- path: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>>;
411
+ path: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>, "many">>;
398
412
  }, "strip", z.ZodTypeAny, {
399
- path?: string | number | null | undefined;
413
+ path?: (string | number | null)[] | undefined;
400
414
  }, {
401
- path?: string | number | null | undefined;
415
+ path?: (string | number | null)[] | undefined;
402
416
  }>>, "many">>;
417
+ /**
418
+ * When used with a get request the supplied object will be used as the default state if
419
+ * not yet defined
420
+ */
421
+ defaultState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
422
+ /**
423
+ * Value used for the clientMapProp prop when creating a new object
424
+ */
425
+ clientMapProp: z.ZodOptional<z.ZodString>;
426
+ /**
427
+ * Value used for the autoDeleteClientObjects prop when creating a new object
428
+ */
429
+ autoDeleteClientObjects: z.ZodOptional<z.ZodBoolean>;
403
430
  }, "strip", z.ZodTypeAny, {
404
- type: "delete" | "get" | "evt" | "createClient";
431
+ type: "delete" | "get" | "evt" | "createClient" | "ping";
405
432
  clientId: string;
406
433
  objId: string;
407
434
  evts?: (({
@@ -431,10 +458,13 @@ export declare const ObjSyncRemoteCommandScheme: z.ZodObject<{
431
458
  type: "load";
432
459
  prop?: string | undefined;
433
460
  }) & {
434
- path?: string | number | null | undefined;
461
+ path?: (string | number | null)[] | undefined;
435
462
  })[] | undefined;
463
+ defaultState?: Record<string, any> | undefined;
464
+ clientMapProp?: string | undefined;
465
+ autoDeleteClientObjects?: boolean | undefined;
436
466
  }, {
437
- type: "delete" | "get" | "evt" | "createClient";
467
+ type: "delete" | "get" | "evt" | "createClient" | "ping";
438
468
  clientId: string;
439
469
  objId: string;
440
470
  evts?: (({
@@ -464,15 +494,18 @@ export declare const ObjSyncRemoteCommandScheme: z.ZodObject<{
464
494
  type: "load";
465
495
  prop?: string | undefined;
466
496
  }) & {
467
- path?: string | number | null | undefined;
497
+ path?: (string | number | null)[] | undefined;
468
498
  })[] | undefined;
499
+ defaultState?: Record<string, any> | undefined;
500
+ clientMapProp?: string | undefined;
501
+ autoDeleteClientObjects?: boolean | undefined;
469
502
  }>;
470
503
  export type ObjSyncRemoteCommand = z.infer<typeof ObjSyncRemoteCommandScheme>;
471
504
  export type ScopedObjSyncRemoteCommand = Omit<ObjSyncRemoteCommand, 'clientId' | 'objId'>;
472
- export declare const ObjSyncClientCommandTypeScheme: z.ZodEnum<["set", "delete", "evt", "reset"]>;
505
+ export declare const ObjSyncClientCommandTypeScheme: z.ZodEnum<["set", "delete", "evt", "reset", "pong"]>;
473
506
  export type ObjSyncClientCommandType = z.infer<typeof ObjSyncClientCommandTypeScheme>;
474
507
  export declare const ObjSyncClientCommandScheme: z.ZodObject<{
475
- type: z.ZodEnum<["set", "delete", "evt", "reset"]>;
508
+ type: z.ZodEnum<["set", "delete", "evt", "reset", "pong"]>;
476
509
  /**
477
510
  * Id of the client connected
478
511
  */
@@ -560,11 +593,11 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
560
593
  type: "load";
561
594
  prop?: string | undefined;
562
595
  }>]>, z.ZodObject<{
563
- path: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>>;
596
+ path: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>, "many">>;
564
597
  }, "strip", z.ZodTypeAny, {
565
- path?: string | number | null | undefined;
598
+ path?: (string | number | null)[] | undefined;
566
599
  }, {
567
- path?: string | number | null | undefined;
600
+ path?: (string | number | null)[] | undefined;
568
601
  }>>, "many">>;
569
602
  changeIndex: z.ZodNumber;
570
603
  state: z.ZodOptional<z.ZodObject<{
@@ -650,12 +683,22 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
650
683
  type: "load";
651
684
  prop?: string | undefined;
652
685
  }>]>, z.ZodObject<{
653
- path: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>>;
686
+ path: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodNull]>, "many">>;
654
687
  }, "strip", z.ZodTypeAny, {
655
- path?: string | number | null | undefined;
688
+ path?: (string | number | null)[] | undefined;
656
689
  }, {
657
- path?: string | number | null | undefined;
690
+ path?: (string | number | null)[] | undefined;
658
691
  }>>, "many">;
692
+ /**
693
+ * Defines the path to an object that has values with keys matching the ids of the clients
694
+ * connected to the object
695
+ */
696
+ clientMapProp: z.ZodOptional<z.ZodString>;
697
+ /**
698
+ * If true objects in the client object map at the path defined by clientMapProp will be
699
+ * automatically deleted on disconnect.
700
+ */
701
+ autoDeleteClientObjects: z.ZodOptional<z.ZodBoolean>;
659
702
  }, "strip", z.ZodTypeAny, {
660
703
  objId: string;
661
704
  changeIndex: number;
@@ -687,8 +730,10 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
687
730
  type: "load";
688
731
  prop?: string | undefined;
689
732
  }) & {
690
- path?: string | number | null | undefined;
733
+ path?: (string | number | null)[] | undefined;
691
734
  })[];
735
+ clientMapProp?: string | undefined;
736
+ autoDeleteClientObjects?: boolean | undefined;
692
737
  }, {
693
738
  objId: string;
694
739
  changeIndex: number;
@@ -720,11 +765,13 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
720
765
  type: "load";
721
766
  prop?: string | undefined;
722
767
  }) & {
723
- path?: string | number | null | undefined;
768
+ path?: (string | number | null)[] | undefined;
724
769
  })[];
770
+ clientMapProp?: string | undefined;
771
+ autoDeleteClientObjects?: boolean | undefined;
725
772
  }>>;
726
773
  }, "strip", z.ZodTypeAny, {
727
- type: "set" | "delete" | "evt" | "reset";
774
+ type: "set" | "delete" | "evt" | "reset" | "pong";
728
775
  clientId: string;
729
776
  objId: string;
730
777
  changeIndex: number;
@@ -755,7 +802,7 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
755
802
  type: "load";
756
803
  prop?: string | undefined;
757
804
  }) & {
758
- path?: string | number | null | undefined;
805
+ path?: (string | number | null)[] | undefined;
759
806
  })[] | undefined;
760
807
  state?: {
761
808
  objId: string;
@@ -788,11 +835,13 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
788
835
  type: "load";
789
836
  prop?: string | undefined;
790
837
  }) & {
791
- path?: string | number | null | undefined;
838
+ path?: (string | number | null)[] | undefined;
792
839
  })[];
840
+ clientMapProp?: string | undefined;
841
+ autoDeleteClientObjects?: boolean | undefined;
793
842
  } | undefined;
794
843
  }, {
795
- type: "set" | "delete" | "evt" | "reset";
844
+ type: "set" | "delete" | "evt" | "reset" | "pong";
796
845
  clientId: string;
797
846
  objId: string;
798
847
  changeIndex: number;
@@ -823,7 +872,7 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
823
872
  type: "load";
824
873
  prop?: string | undefined;
825
874
  }) & {
826
- path?: string | number | null | undefined;
875
+ path?: (string | number | null)[] | undefined;
827
876
  })[] | undefined;
828
877
  state?: {
829
878
  objId: string;
@@ -856,10 +905,13 @@ export declare const ObjSyncClientCommandScheme: z.ZodObject<{
856
905
  type: "load";
857
906
  prop?: string | undefined;
858
907
  }) & {
859
- path?: string | number | null | undefined;
908
+ path?: (string | number | null)[] | undefined;
860
909
  })[];
910
+ clientMapProp?: string | undefined;
911
+ autoDeleteClientObjects?: boolean | undefined;
861
912
  } | undefined;
862
913
  }>;
863
914
  export type ObjSyncClientCommand = z.infer<typeof ObjSyncClientCommandScheme> & {
864
915
  evts?: RecursiveObjWatchEvt<any>[];
865
916
  };
917
+ export type ObjSyncConnectionState = 'waiting' | 'connecting' | 'connected' | 'disconnected' | 'reconnecting' | 'closed';
@@ -58,15 +58,25 @@ exports.ObjSyncRecursiveObjWatchEvtScheme = zod_1.z.object({
58
58
  type: zod_1.z.literal('load'),
59
59
  prop: zod_1.z.string().optional(),
60
60
  })).and(zod_1.z.object({
61
- path: zod_1.z.string().or(zod_1.z.number().int()).or(zod_1.z.null()).optional()
61
+ path: zod_1.z.array(zod_1.z.string().or(zod_1.z.number().int()).or(zod_1.z.null())).optional()
62
62
  }));
63
63
  exports.ObjSyncObjStateScheme = zod_1.z.object({
64
64
  objId: zod_1.z.string(),
65
65
  changeIndex: zod_1.z.number().int(),
66
66
  state: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
67
67
  log: zod_1.z.array(exports.ObjSyncRecursiveObjWatchEvtScheme),
68
+ /**
69
+ * Defines the path to an object that has values with keys matching the ids of the clients
70
+ * connected to the object
71
+ */
72
+ clientMapProp: zod_1.z.string().optional(),
73
+ /**
74
+ * If true objects in the client object map at the path defined by clientMapProp will be
75
+ * automatically deleted on disconnect.
76
+ */
77
+ autoDeleteClientObjects: zod_1.z.boolean().optional(),
68
78
  });
69
- exports.ObjSyncRemoteCommandTypeScheme = zod_1.z.enum(['delete', 'get', 'evt', 'createClient']);
79
+ exports.ObjSyncRemoteCommandTypeScheme = zod_1.z.enum(['delete', 'get', 'evt', 'createClient', 'ping']);
70
80
  exports.ObjSyncRemoteCommandScheme = zod_1.z.object({
71
81
  type: exports.ObjSyncRemoteCommandTypeScheme,
72
82
  /**
@@ -78,8 +88,21 @@ exports.ObjSyncRemoteCommandScheme = zod_1.z.object({
78
88
  */
79
89
  objId: zod_1.z.string(),
80
90
  evts: zod_1.z.optional(zod_1.z.array(exports.ObjSyncRecursiveObjWatchEvtScheme)),
91
+ /**
92
+ * When used with a get request the supplied object will be used as the default state if
93
+ * not yet defined
94
+ */
95
+ defaultState: zod_1.z.optional(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
96
+ /**
97
+ * Value used for the clientMapProp prop when creating a new object
98
+ */
99
+ clientMapProp: zod_1.z.string().optional(),
100
+ /**
101
+ * Value used for the autoDeleteClientObjects prop when creating a new object
102
+ */
103
+ autoDeleteClientObjects: zod_1.z.boolean().optional(),
81
104
  });
82
- exports.ObjSyncClientCommandTypeScheme = zod_1.z.enum(['set', 'delete', 'evt', 'reset']);
105
+ exports.ObjSyncClientCommandTypeScheme = zod_1.z.enum(['set', 'delete', 'evt', 'reset', 'pong']);
83
106
  exports.ObjSyncClientCommandScheme = zod_1.z.object({
84
107
  type: exports.ObjSyncClientCommandTypeScheme,
85
108
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"obj-sync-types.js","sourceRoot":"","sources":["../../../../../packages/obj-sync/src/lib/obj-sync-types.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAEX,QAAA,iBAAiB,GAAC,OAAC,CAAC,MAAM,CAAC;IACpC;;;OAGG;IACH,KAAK,EAAC,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAA;AAEW,QAAA,6BAA6B,GAAC,OAAC,CAAC,MAAM,CAAC;IAEhD;;OAEG;IACH,QAAQ,EAAC,OAAC,CAAC,MAAM,EAAE;IAEnB;;OAEG;IACH,KAAK,EAAC,OAAC,CAAC,MAAM,EAAE;IAEhB;;OAEG;IACH,QAAQ,EAAC,OAAC,CAAC,MAAM,EAAE;IAEnB;;OAEG;IACH,KAAK,EAAC,yBAAiB,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAE1C,MAAM,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAA;AAIF;;GAEG;AACU,QAAA,iCAAiC,GAAC,OAAC,CAAC,MAAM,CAAC;IACpD,IAAI,EAAC,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACrB,IAAI,EAAC,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAC,OAAC,CAAC,GAAG,EAAE;CAChB,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACxB,IAAI,EAAC,OAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC,CAA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AAM,EAAE,EAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAErD;;OAEG;IACH,aAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEnC;;OAEG;IACH,uBAAuB,EAAC,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAA;AAQW,QAAA,8BAA8B,GAAC,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAC,OAAO,EAAC,MAAM,CAAC,CAAC,CAAC;AAI7E,QAAA,0BAA0B,GAAC,OAAC,CAAC,MAAM,CAAC;IAE7C,IAAI,EAAC,sCAA8B;IAEnC;;OAEG;IACH,QAAQ,EAAC,OAAC,CAAC,MAAM,EAAE;IAEnB;;OAEG;IACH,KAAK,EAAC,OAAC,CAAC,MAAM,EAAE;IAEhB,IAAI,EAAC,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,KAAK,CAAC,yCAAiC,CAAC,CAAC;IAE3D,WAAW,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAE5B,KAAK,EAAC,6BAAqB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA"}
@@ -1,5 +1,9 @@
1
1
  export declare const objSyncClientConnectionTableParam: import("@iyio/common").ParamTypeDef<string>;
2
2
  export declare const objSyncObjStateTableParam: import("@iyio/common").ParamTypeDef<string>;
3
3
  export declare const objSyncEndpointParam: import("@iyio/common").ParamTypeDef<string>;
4
+ /**
5
+ * The length at which log entires will be merged into the state of ObjSyncObjState objects.
6
+ */
7
+ export declare const objSyncAutoMergeLogLengthParam: import("@iyio/common").ParamTypeDef<number>;
4
8
  export declare const objSyncCreateDefaultStateFnArnParam: import("@iyio/common").ParamTypeDef<string>;
5
9
  export declare const objSyncTransformClientConnectionFnArnParam: import("@iyio/common").ParamTypeDef<string>;
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.objSyncTransformClientConnectionFnArnParam = exports.objSyncCreateDefaultStateFnArnParam = exports.objSyncEndpointParam = exports.objSyncObjStateTableParam = exports.objSyncClientConnectionTableParam = void 0;
3
+ exports.objSyncTransformClientConnectionFnArnParam = exports.objSyncCreateDefaultStateFnArnParam = exports.objSyncAutoMergeLogLengthParam = exports.objSyncEndpointParam = exports.objSyncObjStateTableParam = exports.objSyncClientConnectionTableParam = void 0;
4
4
  const common_1 = require("@iyio/common");
5
5
  exports.objSyncClientConnectionTableParam = (0, common_1.defineStringParam)('objSyncClientConnectionTable');
6
6
  exports.objSyncObjStateTableParam = (0, common_1.defineStringParam)('objSyncObjStateTable');
7
7
  exports.objSyncEndpointParam = (0, common_1.defineStringParam)('objSyncEndpoint');
8
+ /**
9
+ * The length at which log entires will be merged into the state of ObjSyncObjState objects.
10
+ */
11
+ exports.objSyncAutoMergeLogLengthParam = (0, common_1.defineNumberParam)('objSyncAutoMergeLogLength', 5 /*20*/);
8
12
  exports.objSyncCreateDefaultStateFnArnParam = (0, common_1.defineStringParam)('objSyncCreateDefaultStateFnArn');
9
13
  exports.objSyncTransformClientConnectionFnArnParam = (0, common_1.defineStringParam)('objSyncTransformClientConnectionFnArn');
10
14
  //# sourceMappingURL=obj-sync.deps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"obj-sync.deps.js","sourceRoot":"","sources":["../../../../../packages/obj-sync/src/lib/obj-sync.deps.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AAEpC,QAAA,iCAAiC,GAAC,IAAA,0BAAiB,EAAC,8BAA8B,CAAC,CAAC;AACpF,QAAA,yBAAyB,GAAC,IAAA,0BAAiB,EAAC,sBAAsB,CAAC,CAAC;AACpE,QAAA,oBAAoB,GAAC,IAAA,0BAAiB,EAAC,iBAAiB,CAAC,CAAC;AAE1D,QAAA,mCAAmC,GAAC,IAAA,0BAAiB,EAAC,gCAAgC,CAAC,CAAC;AACxF,QAAA,0CAA0C,GAAC,IAAA,0BAAiB,EAAC,uCAAuC,CAAC,CAAC"}
1
+ {"version":3,"file":"obj-sync.deps.js","sourceRoot":"","sources":["../../../../../packages/obj-sync/src/lib/obj-sync.deps.ts"],"names":[],"mappings":";;;AAAA,yCAAoE;AAEvD,QAAA,iCAAiC,GAAC,IAAA,0BAAiB,EAAC,8BAA8B,CAAC,CAAC;AACpF,QAAA,yBAAyB,GAAC,IAAA,0BAAiB,EAAC,sBAAsB,CAAC,CAAC;AACpE,QAAA,oBAAoB,GAAC,IAAA,0BAAiB,EAAC,iBAAiB,CAAC,CAAC;AACvE;;GAEG;AACU,QAAA,8BAA8B,GAAC,IAAA,0BAAiB,EAAC,2BAA2B,EAAC,CAAC,CAAA,MAAM,CAAC,CAAC;AAEtF,QAAA,mCAAmC,GAAC,IAAA,0BAAiB,EAAC,gCAAgC,CAAC,CAAC;AACxF,QAAA,0CAA0C,GAAC,IAAA,0BAAiB,EAAC,uCAAuC,CAAC,CAAC"}