8.4.0 • Published 3d ago
@lokalise/content-type-app-engine-contracts
Licence
—
Version
8.4.0
Deps
2
Size
919 kB
Vulns
0
Weekly
0
Lokalise Content Type App Engine Contracts
API contracts of the Content Type App Engine service, built with defineApiContract from
@lokalise/api-contracts.
Consuming the contracts
The contracts need @lokalise/api-contracts >= 8 and are consumed through the *ApiContract
helpers of the Lokalise HTTP libraries:
- backend calls:
sendByApiContractfrom@lokalise/backend-http-client - frontend calls:
sendByApiContractfrom@lokalise/frontend-http-client - Fastify tests:
injectByApiContractfrom@lokalise/fastify-api-contracts
The legacy sendByContract / injectByContract helpers only accept the previous
buildGetRoute / buildPayloadRoute contract shape and do not work with this package.
Contracts of authenticated routes declare their request headers through
AUTHORIZATION_HEADER_SCHEMA (an optional authorization header), so their headers parameter is
required at call sites even when it is an empty object.