Skip to content

Commit 71c219f

Browse files
github-actions[bot]kevin-dp
authored andcommitted
docs: regenerate API documentation (#888)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ed97ec6 commit 71c219f

39 files changed

Lines changed: 157 additions & 124 deletions

docs/reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ title: "@tanstack/db"
207207
- [SyncMode](../type-aliases/SyncMode.md)
208208
- [TransactionState](../type-aliases/TransactionState.md)
209209
- [TransactionWithMutations](../type-aliases/TransactionWithMutations.md)
210+
- [UnloadSubsetFn](../type-aliases/UnloadSubsetFn.md)
210211
- [UpdateMutationFn](../type-aliases/UpdateMutationFn.md)
211212
- [UpdateMutationFnParams](../type-aliases/UpdateMutationFnParams.md)
212213
- [UtilsRecord](../type-aliases/UtilsRecord.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:435](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L435)
8+
Defined in: [packages/db/src/types.ts:438](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L438)
99

1010
## Extended by
1111

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

45-
Defined in: [packages/db/src/types.ts:484](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L484)
45+
Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487)
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:495](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L495)
69+
Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498)
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:641](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L641)
109+
Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644)
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:464](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L464)
124+
Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467)
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:459](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L459)
137+
Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462)
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:448](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L448)
171+
Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451)
172172

173173
***
174174

@@ -178,7 +178,7 @@ Defined in: [packages/db/src/types.ts:448](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:633](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L633)
181+
Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636)
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:546](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L546)
245+
Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549)
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:590](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L590)
308+
Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593)
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:449](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L449)
372+
Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452)
373373

374374
***
375375

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

382-
Defined in: [packages/db/src/types.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L475)
382+
Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478)
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:504](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L504)
405+
Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507)
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:643](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L643)
427+
Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646)

docs/reference/interfaces/ChangeMessage.md

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

66
# Interface: ChangeMessage\<T, TKey\>
77

8-
Defined in: [packages/db/src/types.ts:311](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L311)
8+
Defined in: [packages/db/src/types.ts:314](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L314)
99

1010
## Extended by
1111

@@ -29,7 +29,7 @@ Defined in: [packages/db/src/types.ts:311](https://github.com/TanStack/db/blob/m
2929
key: TKey;
3030
```
3131

32-
Defined in: [packages/db/src/types.ts:315](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L315)
32+
Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L318)
3333

3434
***
3535

@@ -39,7 +39,7 @@ Defined in: [packages/db/src/types.ts:315](https://github.com/TanStack/db/blob/m
3939
optional metadata: Record<string, unknown>;
4040
```
4141

42-
Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319)
42+
Defined in: [packages/db/src/types.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L322)
4343

4444
***
4545

@@ -49,7 +49,7 @@ Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/m
4949
optional previousValue: T;
5050
```
5151

52-
Defined in: [packages/db/src/types.ts:317](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L317)
52+
Defined in: [packages/db/src/types.ts:320](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L320)
5353

5454
***
5555

@@ -59,7 +59,7 @@ Defined in: [packages/db/src/types.ts:317](https://github.com/TanStack/db/blob/m
5959
type: OperationType;
6060
```
6161

62-
Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L318)
62+
Defined in: [packages/db/src/types.ts:321](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L321)
6363

6464
***
6565

@@ -69,4 +69,4 @@ Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/m
6969
value: T;
7070
```
7171

72-
Defined in: [packages/db/src/types.ts:316](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L316)
72+
Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319)

docs/reference/interfaces/CollectionConfig.md

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

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

8-
Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646)
8+
Defined in: [packages/db/src/types.ts:649](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L649)
99

1010
## Extends
1111

@@ -37,7 +37,7 @@ Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/m
3737
optional autoIndex: "eager" | "off";
3838
```
3939

40-
Defined in: [packages/db/src/types.ts:484](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L484)
40+
Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487)
4141

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

68-
Defined in: [packages/db/src/types.ts:495](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L495)
68+
Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498)
6969

7070
Optional function to compare two items.
7171
This is used to order the items in the collection.
@@ -109,7 +109,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime()
109109
optional defaultStringCollation: StringCollationConfig;
110110
```
111111

112-
Defined in: [packages/db/src/types.ts:641](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L641)
112+
Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644)
113113

114114
Specifies how to compare data in the collection.
115115
This should be configured to match data ordering on the backend.
@@ -128,7 +128,7 @@ E.g., when using the Electric DB collection these options
128128
optional gcTime: number;
129129
```
130130

131-
Defined in: [packages/db/src/types.ts:464](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L464)
131+
Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467)
132132

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

148-
Defined in: [packages/db/src/types.ts:459](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L459)
148+
Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462)
149149

150150
Function to extract the ID from an object
151151
This is required for update/delete operations which now only accept IDs
@@ -183,7 +183,7 @@ getKey: (item) => item.uuid
183183
optional id: string;
184184
```
185185

186-
Defined in: [packages/db/src/types.ts:448](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L448)
186+
Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451)
187187

188188
#### Inherited from
189189

@@ -197,7 +197,7 @@ Defined in: [packages/db/src/types.ts:448](https://github.com/TanStack/db/blob/m
197197
optional onDelete: DeleteMutationFn<T, TKey, TUtils, any>;
198198
```
199199

200-
Defined in: [packages/db/src/types.ts:633](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L633)
200+
Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636)
201201

202202
Optional asynchronous handler function called before a delete operation
203203

@@ -265,7 +265,7 @@ onDelete: async ({ transaction, collection }) => {
265265
optional onInsert: InsertMutationFn<T, TKey, TUtils, any>;
266266
```
267267

268-
Defined in: [packages/db/src/types.ts:546](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L546)
268+
Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549)
269269

270270
Optional asynchronous handler function called before an insert operation
271271

@@ -332,7 +332,7 @@ onInsert: async ({ transaction, collection }) => {
332332
optional onUpdate: UpdateMutationFn<T, TKey, TUtils, any>;
333333
```
334334

335-
Defined in: [packages/db/src/types.ts:590](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L590)
335+
Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593)
336336

337337
Optional asynchronous handler function called before an update operation
338338

@@ -400,7 +400,7 @@ onUpdate: async ({ transaction, collection }) => {
400400
optional schema: TSchema;
401401
```
402402

403-
Defined in: [packages/db/src/types.ts:449](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L449)
403+
Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452)
404404

405405
#### Inherited from
406406

@@ -414,7 +414,7 @@ Defined in: [packages/db/src/types.ts:449](https://github.com/TanStack/db/blob/m
414414
optional startSync: boolean;
415415
```
416416

417-
Defined in: [packages/db/src/types.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L475)
417+
Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478)
418418

419419
Whether to eagerly start syncing on collection creation.
420420
When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches.
@@ -441,7 +441,7 @@ false
441441
sync: SyncConfig<T, TKey>;
442442
```
443443

444-
Defined in: [packages/db/src/types.ts:652](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L652)
444+
Defined in: [packages/db/src/types.ts:655](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L655)
445445

446446
***
447447

@@ -451,7 +451,7 @@ Defined in: [packages/db/src/types.ts:652](https://github.com/TanStack/db/blob/m
451451
optional syncMode: SyncMode;
452452
```
453453

454-
Defined in: [packages/db/src/types.ts:504](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L504)
454+
Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507)
455455

456456
The mode of sync to use for the collection.
457457

@@ -477,7 +477,7 @@ The exact implementation of the sync mode is up to the sync implementation.
477477
optional utils: TUtils;
478478
```
479479

480-
Defined in: [packages/db/src/types.ts:643](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L643)
480+
Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646)
481481

482482
#### Inherited from
483483

docs/reference/interfaces/CurrentStateAsChangesOptions.md

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

66
# Interface: CurrentStateAsChangesOptions
77

8-
Defined in: [packages/db/src/types.ts:736](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L736)
8+
Defined in: [packages/db/src/types.ts:739](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L739)
99

1010
Options for getting current state as changes
1111

@@ -17,7 +17,7 @@ Options for getting current state as changes
1717
optional limit: number;
1818
```
1919

20-
Defined in: [packages/db/src/types.ts:740](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L740)
20+
Defined in: [packages/db/src/types.ts:743](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L743)
2121

2222
***
2323

@@ -27,7 +27,7 @@ Defined in: [packages/db/src/types.ts:740](https://github.com/TanStack/db/blob/m
2727
optional optimizedOnly: boolean;
2828
```
2929

30-
Defined in: [packages/db/src/types.ts:741](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L741)
30+
Defined in: [packages/db/src/types.ts:744](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L744)
3131

3232
***
3333

@@ -37,7 +37,7 @@ Defined in: [packages/db/src/types.ts:741](https://github.com/TanStack/db/blob/m
3737
optional orderBy: OrderBy;
3838
```
3939

40-
Defined in: [packages/db/src/types.ts:739](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L739)
40+
Defined in: [packages/db/src/types.ts:742](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L742)
4141

4242
***
4343

@@ -47,6 +47,6 @@ Defined in: [packages/db/src/types.ts:739](https://github.com/TanStack/db/blob/m
4747
optional where: BasicExpression<boolean>;
4848
```
4949

50-
Defined in: [packages/db/src/types.ts:738](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L738)
50+
Defined in: [packages/db/src/types.ts:741](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L741)
5151

5252
Pre-compiled expression for filtering the current state

docs/reference/interfaces/InsertConfig.md

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

66
# Interface: InsertConfig
77

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

1010
## Properties
1111

@@ -15,7 +15,7 @@ Defined in: [packages/db/src/types.ts:353](https://github.com/TanStack/db/blob/m
1515
optional metadata: Record<string, unknown>;
1616
```
1717

18-
Defined in: [packages/db/src/types.ts:354](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L354)
18+
Defined in: [packages/db/src/types.ts:357](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L357)
1919

2020
***
2121

@@ -25,6 +25,6 @@ Defined in: [packages/db/src/types.ts:354](https://github.com/TanStack/db/blob/m
2525
optional optimistic: boolean;
2626
```
2727

28-
Defined in: [packages/db/src/types.ts:356](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L356)
28+
Defined in: [packages/db/src/types.ts:359](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L359)
2929

3030
Whether to apply optimistic updates immediately. Defaults to true.

0 commit comments

Comments
 (0)