@revenexx/app-sdk@1.2.0
Minor Changes
8bfc5f9:
c.marketreads the market a request is for and the country it ships from (PE-1010).The gateway sends the market's
ship_from_country(markets app, RAD-246) asX-Revenexx-Market-Countrynext toX-Revenexx-Market, and sets it itself, so a caller's copy never reaches the App.c.marketis{ code, country }on every route context; either isnullwhen the gateway did not send it, a country is never read without a market, and a value that is not an upper-case ISO 3166-1 alpha-2 code is ignored.marketFrom(header)andMARKET_HEADERSare exported for code outside a handler.An App prints a document's addresses for the sender country: its own sender address when it has one, else
c.market.country, else its own fallback.f129c8d:
mountTrashgives an entity withtrash: trueits trash in one call (PE-1022).DELETE <path>/{id}puts a live row into the trash with its live children as one group, recording who and when; on a row already in the trash it deletes for good, children of the group first.guardrefuses the trash (409 trash_blocked),blockersrefuse the final delete (409 delete_blocked),canDeleteForGoodcan require its own permission (403 not_permitted).POST <path>/{id}/restorebrings back the row and the children of its group; a child whose parent is in the trash is refused (409 parent_in_trash).trash.purge(c)is the scheduled job. It readstrash_retention_daysthrough the gateway (GET /v1/audit/settings, 90 when unset;REVENEXX_AUDIT_SETTINGS_URLoverrides the URL) and deletes for good what is older, through the same blockers. A blocked row stays, with its reason inpurge_blocked_reason, the columntrash: truecreates. When the retention cannot be read the run is skipped.createGatewayCounter()counts another App's records through the gateway for a cross-app blocker. A count it cannot get is anunverifiableblocker.
A check that throws blocks; nothing is deleted for good past a blocker. The PHP SDK has the same as
Trash::mountandGatewayCounter.aae9842: The runtime adapter forwards the request's
X-Revenexx-Auditto the data plane (PE-1039).The gateway signs a short-lived record-history envelope naming the person behind a call and sends it to the App as
X-Revenexx-Audit. The runtime adapter now passes it on unchanged with every PostgREST request, the same wayX-Revenexx-Markettravels, so Baseline can name that person in the record history. The SDK never reads it. A request without one, or with a value that is not one line of visible ASCII, sends no such header and works as before. The remote adapter takes it asaudit.c.actoris unchanged.