@electric-sql/client 1.5.13 → 1.5.14
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/cjs/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/package.json +1 -1
- package/src/types.ts +8 -4
package/dist/cjs/index.d.cts
CHANGED
|
@@ -35,16 +35,18 @@ type Operation = `insert` | `update` | `delete`;
|
|
|
35
35
|
*/
|
|
36
36
|
type MoveTag = string;
|
|
37
37
|
/**
|
|
38
|
-
* A move
|
|
39
|
-
*
|
|
38
|
+
* A move pattern is a position and a value. The position is the index of the column
|
|
39
|
+
* involved in the move. The value is the value of that column.
|
|
40
40
|
*
|
|
41
41
|
* Tag width and value order is fixed for a given shape, so the client can determine
|
|
42
42
|
* which tags match this pattern.
|
|
43
43
|
*/
|
|
44
|
-
type
|
|
44
|
+
type MovePattern = {
|
|
45
45
|
pos: number;
|
|
46
46
|
value: string;
|
|
47
47
|
};
|
|
48
|
+
/** @deprecated Use {@link MovePattern} instead */
|
|
49
|
+
type MoveOutPattern = MovePattern;
|
|
48
50
|
/**
|
|
49
51
|
* Serialized expression types for structured subset queries.
|
|
50
52
|
* These allow Electric to properly apply columnMapper transformations
|
|
@@ -107,8 +109,8 @@ type ControlMessage = {
|
|
|
107
109
|
};
|
|
108
110
|
type EventMessage = {
|
|
109
111
|
headers: Header & {
|
|
110
|
-
event: `move-out`;
|
|
111
|
-
patterns:
|
|
112
|
+
event: `move-out` | `move-in`;
|
|
113
|
+
patterns: MovePattern[];
|
|
112
114
|
};
|
|
113
115
|
};
|
|
114
116
|
type ChangeMessage<T extends Row<unknown> = Row> = {
|
|
@@ -121,6 +123,7 @@ type ChangeMessage<T extends Row<unknown> = Row> = {
|
|
|
121
123
|
/** Tags will always be present for changes if the shape has a subquery in its where clause, and are omitted otherwise.*/
|
|
122
124
|
tags?: MoveTag[];
|
|
123
125
|
removed_tags?: MoveTag[];
|
|
126
|
+
active_conditions?: boolean[];
|
|
124
127
|
};
|
|
125
128
|
};
|
|
126
129
|
type Message<T extends Row<unknown> = Row> = ControlMessage | EventMessage | ChangeMessage<T>;
|
|
@@ -942,4 +945,4 @@ declare function compileExpression(expr: SerializedExpression, columnMapper?: (c
|
|
|
942
945
|
*/
|
|
943
946
|
declare function compileOrderBy(clauses: SerializedOrderByClause[], columnMapper?: (col: string) => string): string;
|
|
944
947
|
|
|
945
|
-
export { BackoffDefaults, type BackoffOptions, type BitColumn, type BpcharColumn, type ChangeMessage, type ColumnInfo, type ColumnMapper, type CommonColumnProps, type ControlMessage, ELECTRIC_PROTOCOL_QUERY_PARAMS, type EventMessage, type ExternalHeadersRecord, type ExternalParamsRecord, FetchError, type GetExtensions, type IntervalColumn, type IntervalColumnWithPrecision, type LogMode, type MaybePromise, type Message, type MoveOutPattern, type MoveTag, type NormalizedPgSnapshot, type NumericColumn, type Offset, type Operation, type PostgresParams, type PostgresSnapshot, type RegularColumn, type Row, type Schema, type SerializedExpression, type SerializedOrderByClause, Shape, type ShapeChangedCallback, type ShapeData, ShapeStream, type ShapeStreamInterface, type ShapeStreamOptions, type SnapshotMetadata, type SubsetParams, type TimeColumn, type TypedMessages, type Value, type VarcharColumn, camelToSnake, compileExpression, compileOrderBy, createColumnMapper, isChangeMessage, isControlMessage, isVisibleInSnapshot, resolveValue, snakeCamelMapper, snakeToCamel };
|
|
948
|
+
export { BackoffDefaults, type BackoffOptions, type BitColumn, type BpcharColumn, type ChangeMessage, type ColumnInfo, type ColumnMapper, type CommonColumnProps, type ControlMessage, ELECTRIC_PROTOCOL_QUERY_PARAMS, type EventMessage, type ExternalHeadersRecord, type ExternalParamsRecord, FetchError, type GetExtensions, type IntervalColumn, type IntervalColumnWithPrecision, type LogMode, type MaybePromise, type Message, type MoveOutPattern, type MovePattern, type MoveTag, type NormalizedPgSnapshot, type NumericColumn, type Offset, type Operation, type PostgresParams, type PostgresSnapshot, type RegularColumn, type Row, type Schema, type SerializedExpression, type SerializedOrderByClause, Shape, type ShapeChangedCallback, type ShapeData, ShapeStream, type ShapeStreamInterface, type ShapeStreamOptions, type SnapshotMetadata, type SubsetParams, type TimeColumn, type TypedMessages, type Value, type VarcharColumn, camelToSnake, compileExpression, compileOrderBy, createColumnMapper, isChangeMessage, isControlMessage, isVisibleInSnapshot, resolveValue, snakeCamelMapper, snakeToCamel };
|
package/dist/index.d.ts
CHANGED
|
@@ -35,16 +35,18 @@ type Operation = `insert` | `update` | `delete`;
|
|
|
35
35
|
*/
|
|
36
36
|
type MoveTag = string;
|
|
37
37
|
/**
|
|
38
|
-
* A move
|
|
39
|
-
*
|
|
38
|
+
* A move pattern is a position and a value. The position is the index of the column
|
|
39
|
+
* involved in the move. The value is the value of that column.
|
|
40
40
|
*
|
|
41
41
|
* Tag width and value order is fixed for a given shape, so the client can determine
|
|
42
42
|
* which tags match this pattern.
|
|
43
43
|
*/
|
|
44
|
-
type
|
|
44
|
+
type MovePattern = {
|
|
45
45
|
pos: number;
|
|
46
46
|
value: string;
|
|
47
47
|
};
|
|
48
|
+
/** @deprecated Use {@link MovePattern} instead */
|
|
49
|
+
type MoveOutPattern = MovePattern;
|
|
48
50
|
/**
|
|
49
51
|
* Serialized expression types for structured subset queries.
|
|
50
52
|
* These allow Electric to properly apply columnMapper transformations
|
|
@@ -107,8 +109,8 @@ type ControlMessage = {
|
|
|
107
109
|
};
|
|
108
110
|
type EventMessage = {
|
|
109
111
|
headers: Header & {
|
|
110
|
-
event: `move-out`;
|
|
111
|
-
patterns:
|
|
112
|
+
event: `move-out` | `move-in`;
|
|
113
|
+
patterns: MovePattern[];
|
|
112
114
|
};
|
|
113
115
|
};
|
|
114
116
|
type ChangeMessage<T extends Row<unknown> = Row> = {
|
|
@@ -121,6 +123,7 @@ type ChangeMessage<T extends Row<unknown> = Row> = {
|
|
|
121
123
|
/** Tags will always be present for changes if the shape has a subquery in its where clause, and are omitted otherwise.*/
|
|
122
124
|
tags?: MoveTag[];
|
|
123
125
|
removed_tags?: MoveTag[];
|
|
126
|
+
active_conditions?: boolean[];
|
|
124
127
|
};
|
|
125
128
|
};
|
|
126
129
|
type Message<T extends Row<unknown> = Row> = ControlMessage | EventMessage | ChangeMessage<T>;
|
|
@@ -942,4 +945,4 @@ declare function compileExpression(expr: SerializedExpression, columnMapper?: (c
|
|
|
942
945
|
*/
|
|
943
946
|
declare function compileOrderBy(clauses: SerializedOrderByClause[], columnMapper?: (col: string) => string): string;
|
|
944
947
|
|
|
945
|
-
export { BackoffDefaults, type BackoffOptions, type BitColumn, type BpcharColumn, type ChangeMessage, type ColumnInfo, type ColumnMapper, type CommonColumnProps, type ControlMessage, ELECTRIC_PROTOCOL_QUERY_PARAMS, type EventMessage, type ExternalHeadersRecord, type ExternalParamsRecord, FetchError, type GetExtensions, type IntervalColumn, type IntervalColumnWithPrecision, type LogMode, type MaybePromise, type Message, type MoveOutPattern, type MoveTag, type NormalizedPgSnapshot, type NumericColumn, type Offset, type Operation, type PostgresParams, type PostgresSnapshot, type RegularColumn, type Row, type Schema, type SerializedExpression, type SerializedOrderByClause, Shape, type ShapeChangedCallback, type ShapeData, ShapeStream, type ShapeStreamInterface, type ShapeStreamOptions, type SnapshotMetadata, type SubsetParams, type TimeColumn, type TypedMessages, type Value, type VarcharColumn, camelToSnake, compileExpression, compileOrderBy, createColumnMapper, isChangeMessage, isControlMessage, isVisibleInSnapshot, resolveValue, snakeCamelMapper, snakeToCamel };
|
|
948
|
+
export { BackoffDefaults, type BackoffOptions, type BitColumn, type BpcharColumn, type ChangeMessage, type ColumnInfo, type ColumnMapper, type CommonColumnProps, type ControlMessage, ELECTRIC_PROTOCOL_QUERY_PARAMS, type EventMessage, type ExternalHeadersRecord, type ExternalParamsRecord, FetchError, type GetExtensions, type IntervalColumn, type IntervalColumnWithPrecision, type LogMode, type MaybePromise, type Message, type MoveOutPattern, type MovePattern, type MoveTag, type NormalizedPgSnapshot, type NumericColumn, type Offset, type Operation, type PostgresParams, type PostgresSnapshot, type RegularColumn, type Row, type Schema, type SerializedExpression, type SerializedOrderByClause, Shape, type ShapeChangedCallback, type ShapeData, ShapeStream, type ShapeStreamInterface, type ShapeStreamOptions, type SnapshotMetadata, type SubsetParams, type TimeColumn, type TypedMessages, type Value, type VarcharColumn, camelToSnake, compileExpression, compileOrderBy, createColumnMapper, isChangeMessage, isControlMessage, isVisibleInSnapshot, resolveValue, snakeCamelMapper, snakeToCamel };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electric-sql/client",
|
|
3
3
|
"description": "Postgres everywhere - your data, in sync, wherever you need it.",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.14",
|
|
5
5
|
"author": "ElectricSQL team and contributors.",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/electric-sql/electric/issues"
|
package/src/types.ts
CHANGED
|
@@ -60,13 +60,16 @@ export type Operation = `insert` | `update` | `delete`
|
|
|
60
60
|
export type MoveTag = string
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* A move
|
|
64
|
-
*
|
|
63
|
+
* A move pattern is a position and a value. The position is the index of the column
|
|
64
|
+
* involved in the move. The value is the value of that column.
|
|
65
65
|
*
|
|
66
66
|
* Tag width and value order is fixed for a given shape, so the client can determine
|
|
67
67
|
* which tags match this pattern.
|
|
68
68
|
*/
|
|
69
|
-
export type
|
|
69
|
+
export type MovePattern = { pos: number; value: string }
|
|
70
|
+
|
|
71
|
+
/** @deprecated Use {@link MovePattern} instead */
|
|
72
|
+
export type MoveOutPattern = MovePattern
|
|
70
73
|
|
|
71
74
|
/**
|
|
72
75
|
* Serialized expression types for structured subset queries.
|
|
@@ -125,7 +128,7 @@ export type ControlMessage = {
|
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
export type EventMessage = {
|
|
128
|
-
headers: Header & { event: `move-out`; patterns:
|
|
131
|
+
headers: Header & { event: `move-out` | `move-in`; patterns: MovePattern[] }
|
|
129
132
|
}
|
|
130
133
|
|
|
131
134
|
export type ChangeMessage<T extends Row<unknown> = Row> = {
|
|
@@ -138,6 +141,7 @@ export type ChangeMessage<T extends Row<unknown> = Row> = {
|
|
|
138
141
|
/** Tags will always be present for changes if the shape has a subquery in its where clause, and are omitted otherwise.*/
|
|
139
142
|
tags?: MoveTag[]
|
|
140
143
|
removed_tags?: MoveTag[]
|
|
144
|
+
active_conditions?: boolean[]
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
|