Skip to content

feat: sync .NET client with Apify OpenAPI spec v2-2026-10-19T133704Z - #18

Open
Pijukatel wants to merge 4 commits into
masterfrom
claude/compassionate-babbage-u46frr
Open

Pijukatel wants to merge 4 commits into
masterfrom
claude/compassionate-babbage-u46frr

Conversation

@Pijukatel

Copy link
Copy Markdown
Collaborator

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: CreateActorRequest gains actorPermissionLevel, CreateOrUpdateVersionRequest splits into CreateVersionRequest/UpdateVersionRequest, EnvVarRequest becomes standalone, and ScheduleNotifications is extracted. None of this needs a code change, because every mutating call in this client already accepts any JSON-serializable object.

Changes:

  • ApifyClientException is a new common base class for ApifyApiException and ApifyTransportException, so catch (ApifyClientException) catches every error the client raises for a failed call (apify-client-js#1145).
  • SetRecordOptions.ContentEncoding uploads a key-value store record that is already compressed. The client sends it as the Content-Encoding header and doesn't compress it again (apify-client-js#1140).
  • DatasetClient.StreamItemsAsync streams a dataset export instead of buffering it into a byte[] (apify-client-js#1139, #1152).
  • LogClient.GetBytesAsync fetches a log as raw bytes instead of a decoded string (apify-client-js#1141).
  • KeyValueStoreClient.IterateKeysAsync (with IterateKeysOptions) pages through a store's keys automatically, with a per-page MaxPageLimit (apify-client-js#1142). Like the reference client, it keeps paging while nextExclusiveStartKey is set. Limit = 0 yields no keys and sends no request, because the API reads a literal limit=0 as unbounded. A negative Limit or a non-positive MaxPageLimit throws ArgumentException.
  • apify-client-js#1144 (pricingInfos/exampleRunInput on Actor update) needed no change: ActorClient.UpdateAsync(object) already passes any field through.

Bumped ApifyClientVersion.ApiSpecVersion to v2-2026-10-19T133704Z and the package version to 0.6.0. Updated docs/README.md, docs/storages.md, docs/misc.md and CHANGELOG.md.

Verification: dotnet format --verify-no-changes is clean, dotnet build -c Release -warnaserror reports 0 warnings, and the unit, integration and example tests pass against the live API.


Generated by Claude Code

…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
@Pijukatel Pijukatel added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 19, 2026 — with Claude
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants