Repository navigation
Conversation
…and apify-client-js changes Syncs to OpenAPI spec v2-2026-10-19T133704Z (apify-docs#3087 request-schema changes needed no code change: every mutating call already takes an arbitrary JSON-serializable object) and to apify-client-js#1140, #1145, #1139, #1141, #1152: - Added ApifyClientException, a common base ApifyApiException/ApifyTransportException now extend, so catch (ApifyClientException) catches every client-raised error. - Added SetRecordOptions.ContentEncoding for uploading already-compressed key-value-store records. - Added DatasetClient.StreamItemsAsync for streaming a dataset item export instead of buffering it. - Added LogClient.GetBytesAsync for fetching a log as raw bytes instead of a decoded string. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3FfQf9r45KVCa5VAYAjkd
… as checked Round 2 fix for the review's two open items: - apify-client-js#1142 (chunkSize on listKeys()/listRequests() iterators): the request-queue side was already covered by the existing PaginateRequestsAsync/MaxPageLimit. Adds the missing key-value-store side: KeyValueStoreClient.IterateKeysAsync, an auto-paging iterator over a store's keys with a new IterateKeysOptions (Limit across pages, MaxPageLimit per page - never sent to the API, matching chunkSize - ExclusiveStartKey, Collection, Prefix). - apify-client-js#1144 (pricingInfos/exampleRunInput on ActorUpdateOptions): recorded as checked, no code change needed (ActorClient.UpdateAsync(object) already passes any fields through). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3FfQf9r45KVCa5VAYAjkd
Round 3 fix for the review's open item: the API reads limit=0 as unbounded, not zero, so Limit=0 (or an already-exhausted total) now short-circuits before building any request instead of sending 0 and yielding whatever the API returns regardless. MaxPageLimit must now be positive for the same reason (a literal 0 would hit the same API quirk). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3FfQf9r45KVCa5VAYAjkd
…ject negative Limit Addresses review round-4 findings: - Page continuation now stops when page.NextExclusiveStartKey is null, matching the reference apify-client-js key_value_store.ts listKeys() iteration, which continues only while nextExclusiveStartKey != null. Previously it continued on !page.IsTruncated alone; if the API ever reported isTruncated=true with a null/absent cursor, the loop would re-fetch the first page forever, yielding duplicate keys. - Limit < 0 now throws ArgumentException before issuing any request, consistent with the existing MaxPageLimit <= 0 validation. Adds unit tests for both cases. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3FfQf9r45KVCa5VAYAjkd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs the client to OpenAPI spec
v2-2026-10-19T133704Z(apify/apify-docs#3087) and to the apify-client-js changes merged since the last sync (apify/apify-client-js#1140, #1145, #1139, #1141, #1152, #1142, #1144). Replaces #17, which was opened from the wrong branch.apify-docs#3087 changes request schemas only:
CreateActorRequestgainsactorPermissionLevel,CreateOrUpdateVersionRequestsplits intoCreateVersionRequest/UpdateVersionRequest,EnvVarRequestbecomes standalone, andScheduleNotificationsis extracted. None of this needs a code change, because every mutating call in this client already accepts any JSON-serializable object.Changes:
ApifyClientExceptionis a new common base class forApifyApiExceptionandApifyTransportException, socatch (ApifyClientException)catches every error the client raises for a failed call (apify-client-js#1145).SetRecordOptions.ContentEncodinguploads a key-value store record that is already compressed. The client sends it as theContent-Encodingheader and doesn't compress it again (apify-client-js#1140).DatasetClient.StreamItemsAsyncstreams a dataset export instead of buffering it into abyte[](apify-client-js#1139, #1152).LogClient.GetBytesAsyncfetches a log as raw bytes instead of a decoded string (apify-client-js#1141).KeyValueStoreClient.IterateKeysAsync(withIterateKeysOptions) pages through a store's keys automatically, with a per-pageMaxPageLimit(apify-client-js#1142). Like the reference client, it keeps paging whilenextExclusiveStartKeyis set.Limit = 0yields no keys and sends no request, because the API reads a literallimit=0as unbounded. A negativeLimitor a non-positiveMaxPageLimitthrowsArgumentException.pricingInfos/exampleRunInputon Actor update) needed no change:ActorClient.UpdateAsync(object)already passes any field through.Bumped
ApifyClientVersion.ApiSpecVersiontov2-2026-10-19T133704Zand the package version to0.6.0. Updateddocs/README.md,docs/storages.md,docs/misc.mdandCHANGELOG.md.Verification:
dotnet format --verify-no-changesis clean,dotnet build -c Release -warnaserrorreports 0 warnings, and the unit, integration and example tests pass against the live API.Generated by Claude Code