Skip to content

records/changes: add desiredKeys and desiredRecordTypes request options #385

@leogdion

Description

@leogdion

Background

Follow-up to #40 (Fetching Record Changes — CLOSED). A gap review of openapi.yaml against CloudKit.RecordZoneChangesOptions (cloudkitjs.md:4427-4446) found the records/changes request body is missing two documented options.

Current state

records/changes request body (openapi.yaml:231-239) exposes only zoneID, syncToken, resultsLimit.

What needs to be done

Add to the request body schema:

  • desiredKeys (array of field names) — limit fields returned per changed record.
  • desiredRecordTypes (array of record-type names) — limit the change feed to specific record types.

⚠️ Needs live verification

While implementing, capture a live records/changes response and confirm these response-shape items, which the abbreviated docs don't pin down:

  • RecordResponse may carry pluginFields and zoneID (openapi.yaml ~1019-1043) — neither is currently modeled.
  • AssetUploadResponse token may include a wrappingKey / receipt field (openapi.yaml:1460-1473) — only url/recordName/fieldName are modeled today.

(These two are flagged for confirmation, not asserted as confirmed gaps.)

Implementation notes

  • Edit openapi.yaml only, then regenerate via ./Scripts/generate-openapi.sh. Never hand-edit Sources/MistKitOpenAPI/.
  • Surface the new options through fetchRecordChanges / fetchAllRecordChanges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions