/** * SDK deprecation warning headers — OpenAPI documentation. * * The API may attach `zapier-sdk-deprecation-*` response headers to a * response — any response — when sdkapi's version gate or a trusted Zapier * upstream service needs SDK clients to raise a deprecation notice. The * version gate is a global response hook on the server, so every documented * response — SDK API and Builder Tools API alike — may carry the headers. * * `documentSdkDeprecationHeaders` is the single writer of that * documentation: the SDK spec generator applies it to the published * openapi.yaml, and the spec merge in @zapier/openapi-spec applies it to * openapi-merged.yaml so Builder Tools responses are covered too. The * mutation is idempotent — already-documented headers are preserved. * * The headers are documented inline (`required: false`) rather than as * `$ref`'d components: openapi-typescript v6 cannot see requiredness * through a header `$ref` and would type the headers as always-present, * overstating the conditional runtime contract. */ /** * Minimal structural view of an OpenAPI document; both the zod-to-openapi * generator output and the YAML-parsed merge documents satisfy it. */ interface OpenAPIDocumentLike { paths?: Record; } /** * Document the SDK deprecation headers on every response. */ declare function documentSdkDeprecationHeaders(document: OpenAPIDocumentLike): void; export { documentSdkDeprecationHeaders };