You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`keys()`, `values()`, `entries()`| Removed (handled by `KeyValueStore` frontend) |
496
+
497
+
**`RequestQueueClient`:**
498
+
499
+
| Before (v3) | After (v4) |
500
+
|---|---|
501
+
|`deleteRequest(id)`| Removed |
502
+
503
+
**Removed types** from `@crawlee/types`: `DatasetClientUpdateOptions`, `KeyValueStoreClientUpdateOptions`, `KeyValueStoreRecordOptions`, `KeyValueStoreClientListData`, `KeyValueStoreClientGetRecordOptions`. `KeyValueStoreClientListOptions` was renamed to `KeyValueStoreListKeysOptions`.
469
504
470
505
The high-level storage classes (`Dataset`, `KeyValueStore`, `RequestQueue`) now receive their sub-client directly in the constructor options instead of receiving a `StorageClient` and calling its methods.
471
506
507
+
### `RecordOptions` simplified
508
+
509
+
`timeoutSecs` and `doNotRetryTimeouts` were removed from `RecordOptions` (used by `KeyValueStore.setValue`). Only `contentType` remains.
510
+
511
+
### `KeyValueStoreIteratorOptions` simplified
512
+
513
+
`exclusiveStartKey` and `collection` were removed. Only `prefix` remains.
514
+
515
+
### `Dataset.listItems` replaced by `Dataset.getData` and `Dataset.values`
516
+
517
+
`Dataset.listItems()` is replaced by two methods:
518
+
-`Dataset.getData(options?)` — returns a single `PaginatedList<Data>` page.
519
+
-`Dataset.values(options?)` — dual iterable: `for await...of` iterates all items; `await` returns all items as `Data[]`.
520
+
521
+
`Dataset.entries()` works the same way as `values()` but yields `[index, Data]` tuples. `KeyValueStore.keys()`, `.values()`, `.entries()` follow the same dual-iterable pattern.
522
+
472
523
### Removed `list()` method
473
524
474
525
The `list()` method on collection clients (e.g. `client.datasets().list()`) has no replacement. If you were using it to enumerate all storages, you will need to use the Apify API client directly.
@@ -479,7 +530,7 @@ If you implemented a custom `StorageClient`, you need to:
479
530
480
531
1. Remove your `*CollectionClient` classes.
481
532
2. Replace the six getter methods (`dataset`, `datasets`, `keyValueStore`, `keyValueStores`, `requestQueue`, `requestQueues`) with three async factory methods (`createDatasetClient`, `createKeyValueStoreClient`, `createRequestQueueClient`). Each factory should handle both opening an existing storage and creating a new one.
482
-
3.Rename `get()` to`getMetadata()` on your `DatasetClient`, `KeyValueStoreClient`, and `RequestQueueClient` implementations.
533
+
3.Apply the sub-client renames listed above (`get` →`getMetadata`, `delete` → `drop`, etc.) and implement the new `purge()` method.
483
534
484
535
## Storage `.open()` now also accepts `{ id?, name? }`
0 commit comments