Skip to content

Commit 2a10939

Browse files
docs: regenerate API documentation
1 parent 7f562f9 commit 2a10939

46 files changed

Lines changed: 219 additions & 222 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/reference/electric-db-collection/functions/electricCollectionOptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: electricCollectionOptions
1111
function electricCollectionOptions<T>(config): Omit<CollectionConfig<InferSchemaOutput<T>, string | number, T, UtilsRecord>, "utils"> & object;
1212
```
1313

14-
Defined in: [packages/electric-db-collection/src/electric.ts:474](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L474)
14+
Defined in: [packages/electric-db-collection/src/electric.ts:499](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L499)
1515

1616
Creates Electric collection options for use with a standard Collection
1717

@@ -43,7 +43,7 @@ Collection options with utilities
4343
function electricCollectionOptions<T>(config): Omit<CollectionConfig<T, string | number, never, UtilsRecord>, "utils"> & object;
4444
```
4545

46-
Defined in: [packages/electric-db-collection/src/electric.ts:485](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L485)
46+
Defined in: [packages/electric-db-collection/src/electric.ts:510](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L510)
4747

4848
Creates Electric collection options for use with a standard Collection
4949

docs/reference/electric-db-collection/functions/isChangeMessage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: isChangeMessage
99
function isChangeMessage<T>(message): message is ChangeMessage<T>;
1010
```
1111

12-
Defined in: node\_modules/.pnpm/@electric-sql+client@1.2.0/node\_modules/@electric-sql/client/dist/index.d.ts:783
12+
Defined in: node\_modules/.pnpm/@electric-sql+client@1.3.0/node\_modules/@electric-sql/client/dist/index.d.ts:816
1313

1414
Type guard for checking Message is ChangeMessage.
1515

docs/reference/electric-db-collection/functions/isControlMessage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: isControlMessage
99
function isControlMessage<T>(message): message is ControlMessage;
1010
```
1111

12-
Defined in: node\_modules/.pnpm/@electric-sql+client@1.2.0/node\_modules/@electric-sql/client/dist/index.d.ts:801
12+
Defined in: node\_modules/.pnpm/@electric-sql+client@1.3.0/node\_modules/@electric-sql/client/dist/index.d.ts:834
1313

1414
Type guard for checking Message is ControlMessage.
1515

docs/reference/electric-db-collection/interfaces/ElectricCollectionConfig.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: ElectricCollectionConfig
55

66
# Interface: ElectricCollectionConfig\<T, TSchema\>
77

8-
Defined in: [packages/electric-db-collection/src/electric.ts:124](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L124)
8+
Defined in: [packages/electric-db-collection/src/electric.ts:140](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L140)
99

1010
Configuration interface for Electric collection options
1111

@@ -35,7 +35,7 @@ The schema type for validation
3535
optional [ELECTRIC_TEST_HOOKS]: ElectricTestHooks;
3636
```
3737

38-
Defined in: [packages/electric-db-collection/src/electric.ts:147](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L147)
38+
Defined in: [packages/electric-db-collection/src/electric.ts:163](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L163)
3939

4040
Internal test hooks (for testing only)
4141
Hidden via Symbol to prevent accidental usage in production
@@ -48,7 +48,7 @@ Hidden via Symbol to prevent accidental usage in production
4848
optional onDelete: (params) => Promise<MatchingStrategy>;
4949
```
5050

51-
Defined in: [packages/electric-db-collection/src/electric.ts:264](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L264)
51+
Defined in: [packages/electric-db-collection/src/electric.ts:280](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L280)
5252

5353
Optional asynchronous handler function called before a delete operation
5454

@@ -100,7 +100,7 @@ onDelete: async ({ transaction, collection }) => {
100100
optional onInsert: (params) => Promise<MatchingStrategy>;
101101
```
102102

103-
Defined in: [packages/electric-db-collection/src/electric.ts:195](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L195)
103+
Defined in: [packages/electric-db-collection/src/electric.ts:211](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L211)
104104

105105
Optional asynchronous handler function called before an insert operation
106106

@@ -174,7 +174,7 @@ onInsert: async ({ transaction, collection }) => {
174174
optional onUpdate: (params) => Promise<MatchingStrategy>;
175175
```
176176

177-
Defined in: [packages/electric-db-collection/src/electric.ts:230](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L230)
177+
Defined in: [packages/electric-db-collection/src/electric.ts:246](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L246)
178178

179179
Optional asynchronous handler function called before an update operation
180180

@@ -227,7 +227,7 @@ onUpdate: async ({ transaction, collection }) => {
227227
shapeOptions: ShapeStreamOptions<GetExtensions<T>>;
228228
```
229229

230-
Defined in: [packages/electric-db-collection/src/electric.ts:140](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L140)
230+
Defined in: [packages/electric-db-collection/src/electric.ts:156](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L156)
231231

232232
Configuration options for the ElectricSQL ShapeStream
233233

@@ -239,4 +239,4 @@ Configuration options for the ElectricSQL ShapeStream
239239
optional syncMode: ElectricSyncMode;
240240
```
241241

242-
Defined in: [packages/electric-db-collection/src/electric.ts:141](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L141)
242+
Defined in: [packages/electric-db-collection/src/electric.ts:157](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L157)

docs/reference/electric-db-collection/interfaces/ElectricCollectionUtils.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: ElectricCollectionUtils
55

66
# Interface: ElectricCollectionUtils\<T\>
77

8-
Defined in: [packages/electric-db-collection/src/electric.ts:456](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L456)
8+
Defined in: [packages/electric-db-collection/src/electric.ts:481](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L481)
99

1010
Electric collection utilities type
1111

@@ -33,7 +33,7 @@ Electric collection utilities type
3333
awaitMatch: AwaitMatchFn<T>;
3434
```
3535

36-
Defined in: [packages/electric-db-collection/src/electric.ts:460](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L460)
36+
Defined in: [packages/electric-db-collection/src/electric.ts:485](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L485)
3737

3838
***
3939

@@ -43,4 +43,4 @@ Defined in: [packages/electric-db-collection/src/electric.ts:460](https://github
4343
awaitTxId: AwaitTxIdFn;
4444
```
4545

46-
Defined in: [packages/electric-db-collection/src/electric.ts:459](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L459)
46+
Defined in: [packages/electric-db-collection/src/electric.ts:484](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L484)

docs/reference/electric-db-collection/type-aliases/AwaitTxIdFn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: AwaitTxIdFn
99
type AwaitTxIdFn = (txId, timeout?) => Promise<boolean>;
1010
```
1111

12-
Defined in: [packages/electric-db-collection/src/electric.ts:443](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L443)
12+
Defined in: [packages/electric-db-collection/src/electric.ts:468](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L468)
1313

1414
Type for the awaitTxId utility function
1515

docs/reference/electric-db-collection/type-aliases/Txid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ title: Txid
99
type Txid = number;
1010
```
1111

12-
Defined in: [packages/electric-db-collection/src/electric.ts:62](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L62)
12+
Defined in: [packages/electric-db-collection/src/electric.ts:78](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L78)
1313

1414
Type representing a transaction ID in ElectricSQL

docs/reference/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ title: "@tanstack/db"
128128
- [LocalStorageCollectionConfig](interfaces/LocalStorageCollectionConfig.md)
129129
- [LocalStorageCollectionUtils](interfaces/LocalStorageCollectionUtils.md)
130130
- [OperationConfig](interfaces/OperationConfig.md)
131-
- [OptimisticChangeMessage](interfaces/OptimisticChangeMessage.md)
132131
- [PacedMutationsConfig](interfaces/PacedMutationsConfig.md)
133132
- [ParsedOrderBy](interfaces/ParsedOrderBy.md)
134133
- [Parser](interfaces/Parser.md)
@@ -153,12 +152,14 @@ title: "@tanstack/db"
153152
## Type Aliases
154153

155154
- [ChangeListener](type-aliases/ChangeListener.md)
155+
- [ChangeMessageOrDeleteKeyMessage](type-aliases/ChangeMessageOrDeleteKeyMessage.md)
156156
- [ChangesPayload](type-aliases/ChangesPayload.md)
157157
- [CleanupFn](type-aliases/CleanupFn.md)
158158
- [ClearStorageFn](type-aliases/ClearStorageFn.md)
159159
- [CollectionConfigSingleRowOption](type-aliases/CollectionConfigSingleRowOption.md)
160160
- [CollectionStatus](type-aliases/CollectionStatus.md)
161161
- [CursorExpressions](type-aliases/CursorExpressions.md)
162+
- [DeleteKeyMessage](type-aliases/DeleteKeyMessage.md)
162163
- [DeleteMutationFn](type-aliases/DeleteMutationFn.md)
163164
- [DeleteMutationFnParams](type-aliases/DeleteMutationFnParams.md)
164165
- [FieldPath](type-aliases/FieldPath.md)
@@ -180,6 +181,7 @@ title: "@tanstack/db"
180181
- [LiveQueryCollectionUtils](type-aliases/LiveQueryCollectionUtils.md)
181182
- [LoadSubsetFn](type-aliases/LoadSubsetFn.md)
182183
- [LoadSubsetOptions](type-aliases/LoadSubsetOptions.md)
184+
- [MakeOptional](type-aliases/MakeOptional.md)
183185
- [MaybeSingleResult](type-aliases/MaybeSingleResult.md)
184186
- [MutationFn](type-aliases/MutationFn.md)
185187
- [MutationFnParams](type-aliases/MutationFnParams.md)
@@ -189,6 +191,7 @@ title: "@tanstack/db"
189191
- [NonSingleResult](type-aliases/NonSingleResult.md)
190192
- [OperationType](type-aliases/OperationType.md)
191193
- [OperatorName](type-aliases/OperatorName.md)
194+
- [OptimisticChangeMessage](type-aliases/OptimisticChangeMessage.md)
192195
- [QueryBuilder](type-aliases/QueryBuilder.md)
193196
- [Ref](type-aliases/Ref.md)
194197
- [ResolveTransactionChanges](type-aliases/ResolveTransactionChanges.md)

docs/reference/interfaces/BaseCollectionConfig.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: BaseCollectionConfig
55

66
# Interface: BaseCollectionConfig\<T, TKey, TSchema, TUtils, TReturn\>
77

8-
Defined in: [packages/db/src/types.ts:477](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L477)
8+
Defined in: [packages/db/src/types.ts:493](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L493)
99

1010
## Extended by
1111

@@ -42,7 +42,7 @@ Defined in: [packages/db/src/types.ts:477](https://github.com/TanStack/db/blob/m
4242
optional autoIndex: "eager" | "off";
4343
```
4444

45-
Defined in: [packages/db/src/types.ts:526](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L526)
45+
Defined in: [packages/db/src/types.ts:542](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L542)
4646

4747
Auto-indexing mode for the collection.
4848
When enabled, indexes will be automatically created for simple where expressions.
@@ -66,7 +66,7 @@ When enabled, indexes will be automatically created for simple where expressions
6666
optional compare: (x, y) => number;
6767
```
6868

69-
Defined in: [packages/db/src/types.ts:537](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L537)
69+
Defined in: [packages/db/src/types.ts:553](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L553)
7070

7171
Optional function to compare two items.
7272
This is used to order the items in the collection.
@@ -106,7 +106,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime()
106106
optional defaultStringCollation: StringCollationConfig;
107107
```
108108

109-
Defined in: [packages/db/src/types.ts:683](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L683)
109+
Defined in: [packages/db/src/types.ts:699](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L699)
110110

111111
Specifies how to compare data in the collection.
112112
This should be configured to match data ordering on the backend.
@@ -121,7 +121,7 @@ E.g., when using the Electric DB collection these options
121121
optional gcTime: number;
122122
```
123123

124-
Defined in: [packages/db/src/types.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L506)
124+
Defined in: [packages/db/src/types.ts:522](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L522)
125125

126126
Time in milliseconds after which the collection will be garbage collected
127127
when it has no active subscribers. Defaults to 5 minutes (300000ms).
@@ -134,7 +134,7 @@ when it has no active subscribers. Defaults to 5 minutes (300000ms).
134134
getKey: (item) => TKey;
135135
```
136136

137-
Defined in: [packages/db/src/types.ts:501](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L501)
137+
Defined in: [packages/db/src/types.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L517)
138138

139139
Function to extract the ID from an object
140140
This is required for update/delete operations which now only accept IDs
@@ -168,7 +168,7 @@ getKey: (item) => item.uuid
168168
optional id: string;
169169
```
170170

171-
Defined in: [packages/db/src/types.ts:490](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L490)
171+
Defined in: [packages/db/src/types.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L506)
172172

173173
***
174174

@@ -178,7 +178,7 @@ Defined in: [packages/db/src/types.ts:490](https://github.com/TanStack/db/blob/m
178178
optional onDelete: DeleteMutationFn<T, TKey, TUtils, TReturn>;
179179
```
180180

181-
Defined in: [packages/db/src/types.ts:675](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L675)
181+
Defined in: [packages/db/src/types.ts:691](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L691)
182182

183183
Optional asynchronous handler function called before a delete operation
184184

@@ -242,7 +242,7 @@ onDelete: async ({ transaction, collection }) => {
242242
optional onInsert: InsertMutationFn<T, TKey, TUtils, TReturn>;
243243
```
244244

245-
Defined in: [packages/db/src/types.ts:588](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L588)
245+
Defined in: [packages/db/src/types.ts:604](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L604)
246246

247247
Optional asynchronous handler function called before an insert operation
248248

@@ -305,7 +305,7 @@ onInsert: async ({ transaction, collection }) => {
305305
optional onUpdate: UpdateMutationFn<T, TKey, TUtils, TReturn>;
306306
```
307307

308-
Defined in: [packages/db/src/types.ts:632](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L632)
308+
Defined in: [packages/db/src/types.ts:648](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L648)
309309

310310
Optional asynchronous handler function called before an update operation
311311

@@ -369,7 +369,7 @@ onUpdate: async ({ transaction, collection }) => {
369369
optional schema: TSchema;
370370
```
371371

372-
Defined in: [packages/db/src/types.ts:491](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L491)
372+
Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507)
373373

374374
***
375375

@@ -379,7 +379,7 @@ Defined in: [packages/db/src/types.ts:491](https://github.com/TanStack/db/blob/m
379379
optional startSync: boolean;
380380
```
381381

382-
Defined in: [packages/db/src/types.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L517)
382+
Defined in: [packages/db/src/types.ts:533](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L533)
383383

384384
Whether to eagerly start syncing on collection creation.
385385
When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches.
@@ -402,7 +402,7 @@ false
402402
optional syncMode: SyncMode;
403403
```
404404

405-
Defined in: [packages/db/src/types.ts:546](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L546)
405+
Defined in: [packages/db/src/types.ts:562](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L562)
406406

407407
The mode of sync to use for the collection.
408408

@@ -424,4 +424,4 @@ The exact implementation of the sync mode is up to the sync implementation.
424424
optional utils: TUtils;
425425
```
426426

427-
Defined in: [packages/db/src/types.ts:685](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L685)
427+
Defined in: [packages/db/src/types.ts:701](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L701)

docs/reference/interfaces/ChangeMessage.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ title: ChangeMessage
77

88
Defined in: [packages/db/src/types.ts:353](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L353)
99

10-
## Extended by
11-
12-
- [`OptimisticChangeMessage`](OptimisticChangeMessage.md)
13-
1410
## Type Parameters
1511

1612
### T

0 commit comments

Comments
 (0)