Newapp-sdks

@revenexx/app-sdk@1.5.0

Minor Changes

  • 40dd7cd: An App can store its own settings, and a snapshot says which keys are stored (PE-1174).

    settings.set(c, values, { ifAbsent }) — and c.setSettings(values, { ifAbsent }) on every route context — sends PATCH /v1/settings/apps/{app} with the request's tenant, context token and the platform's x-revenexx-app-context; the gateway lets an App write only its own settings, for the tenant its request belongs to. ifAbsent: true keeps every key the tenant already stored, so an install hook storing defaults never undoes a merchant's choice. It never throws: the result is { ok, status, written, kept, ignored, error? }, a refusal or an unreachable gateway is ok: false and goes to onError. A run started by an event or a schedule carries no app context and gets ok: false without a round trip. A write that stored something drops the tenant's cached reads.

    SettingsSnapshot.stored names the keys whose value the tenant stored rather than the declared default — a stored default and an unset key resolve to the same value. Empty on a fallback and from a gateway that does not report it yet. Reads are otherwise unchanged.