schemas#

The API’s ingest schemas — the shapes used to parse each source’s native upstream payload on the way into the catalog.

See also

The catalog response schemas (App, AppSources, the per-source payloads, GeneratedLabel, drift) now live in the shared patcher.catalog.schemas module and are documented on the Patcher API Client page.

Shared base#

UpstreamModel is the camelCase base every upstream payload schema inherits from (it is not Installomator-specific; Installomator’s raw payload is stored as a dict rather than a typed model).

class UpstreamModel[source]#

Base for models that mirror a third-party source’s camelCase payload.

Field names stay snake_case; to_camel auto-generates the camelCase wire alias (bundle_idbundleId), so most fields need no explicit Field(alias=...). populate_by_name lets our code construct by either name, and unknown fields are ignored (Pydantic’s default) so an upstream addition never breaks ingest.

Deliberately a small twin of patcher.core.models.UpstreamModel rather than an import of it: importing the client package pulls pandas + keyring + the Jamf clients into the API process (a real cost on the 1 GB host), and the API is a separate, lightweight deployable.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Homebrew Cask#

class HomebrewCaskRecord(*, token: str, name: list[str], desc: str | None = None, homepage: str | None = None, url: str | None = None, version: str | None = None, sha256: str | None = None, auto_updates: bool | None = None, depends_on: dict | None = None, artifacts: list[dict] = [])[source]#

The subset of Homebrew Cask API fields the catalog ingests.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

AutoPkg#

class AutopkgIndexEntry(*, name: str | None = None, description: str | None = None, repo: str, path: str, parent: str | None = None, shortname: str | None = None, inferred_type: str | None = None, children: list[str] = [])[source]#

A single recipe entry as it appears in the value of an identifiers map key in upstream index.json. The map’s key (the reverse-DNS identifier like com.github.autopkg.download.Firefox) is passed separately when ingesting; it is not part of the entry value.

name and shortname are intentionally optional because the upstream index has substantial inconsistency on these fields. Shared- processor utility recipes typically have name: null; some app recipes have unusual shortname values (often containing special characters like . or whitespace) that the index doesn’t capture cleanly. Preserving these rows keeps the catalog complete; the stitch matching logic already gates on a non-empty normalized name, so recipes without one naturally never attach to apps.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • name (str | None)

  • description (str | None)

  • repo (str)

  • path (str)

  • parent (str | None)

  • shortname (str | None)

  • inferred_type (str | None)

  • children (list[str])

Jamf App Installers#

class JaiMediaSource(*, url: str, hash: str | None = None, hashType: str | None = None)[source]#

One download source for a title — titles often carry one per architecture.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • url (str)

  • hash (str | None)

  • hashType (str | None)

class JaiTitle(*, id: str, bundleId: str | None = None, titleName: str, publisher: str | None = None, iconUrl: str | None = None, version: str | None = None, shortVersion: str | None = None, architecture: str | None = None, minimumOsVersion: str | None = None, language: str | None = None, availabilityDate: datetime | None = None, mediaSourceType: str | None = None, originalMediaSources: list[JaiMediaSource] = <factory>, sizeInBytes: int | None = None, installationPathShared: bool | None = None, packageSigningIdentity: str | None = None, installerPackageHash: str | None = None, installerPackageHashType: str | None = None, launchDaemonIncluded: bool | None = None, notificationAvailable: bool | None = None, suppressAutoUpdate: bool | None = None, originalTermsAndConditions: list[Any] = <factory>)[source]#

A Jamf App Installers catalog title.

The list endpoint returns the leading identity fields; the per-title detail endpoint adds the rest. Everything past title_name is optional, so the same model parses both shapes. Aliases are auto-generated camelCase except the two original* fields, whose wire names don’t follow from the snake_case field name.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • id (str)

  • bundleId (str | None)

  • titleName (str)

  • publisher (str | None)

  • iconUrl (str | None)

  • version (str | None)

  • shortVersion (str | None)

  • architecture (str | None)

  • minimumOsVersion (str | None)

  • language (str | None)

  • availabilityDate (datetime | None)

  • mediaSourceType (str | None)

  • originalMediaSources (list[JaiMediaSource])

  • sizeInBytes (int | None)

  • installationPathShared (bool | None)

  • packageSigningIdentity (str | None)

  • installerPackageHash (str | None)

  • installerPackageHashType (str | None)

  • launchDaemonIncluded (bool | None)

  • notificationAvailable (bool | None)

  • suppressAutoUpdate (bool | None)

  • originalTermsAndConditions (list[Any])

class JaiTitlePage(*, totalCount: int, results: list[JaiTitle])[source]#

One page of GET /api/v1/app-installers/titles (totalCount + results).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters: