# @zapier/zapier-sdk-core

## 0.15.0

### Minor Changes

- 6c44dfa: Add the SDK deprecation version gate: responses to requests from `@zapier/zapier-sdk` versions below `MIN_SUPPORTED_ZAPIER_SDK_VERSION` (unset = gate disabled) carry trusted `zapier-sdk-deprecation-*` warning headers, with the upgrade target tailored to the calling package. The relay route is excluded and the SDK proxy strips upstream copies, so the gate is the only writer. The headers are documented as shared OpenAPI header components referenced from every response.
- 3cdeec5: Proxy approval routes to approvalsapi through the SDK proxy layer without sdkapi-owned request or response shaping.

## 0.14.1

### Patch Changes

- 40f208f: fix: correct OAuth bearer token authentication so valid tokens are no longer incorrectly rejected.

## 0.14.0

### Minor Changes

- 44596c6: Add `mode` (`"manual" | "auto"`) and `reason` to `ApprovalResponseSchema`, and make `approval_url` and `poll_url` required. `mode` lets clients branch UI/UX between human-reviewed approvals and agent-reviewed (auto) approvals. `approval_url` is populated for both modes — auto-mode records point at the existing approval UI so older SDK clients that always navigate users to `approval_url` continue to work. `reason` carries the human-readable denial message when `status` is `denied`.

## 0.13.1

### Patch Changes

- 1a9c6ed: Bump policy-context version to 1.1.1 for action_key fix

## 0.13.0

### Minor Changes

- eb48f58: Adopt canonical resource-shaped `ActionRunContext` for the
  `POST /api/v0/approvals` request body.

  The inline `RequestContext` / `ActionRunContext` / `HttpRequestContext`
  Zod mirrors in `create-approval.ts` are deleted in favor of importing
  the canonical `RequestContextSchema` directly from `@zapier/policy-context`
  (now a runtime dependency). Action identity is now carried in a single
  canonical `resource` field of the form
  `action/{selected_api}/{action_type}/{action_key}`; the legacy
  `{selected_api, action_type, action_key}` triple is still accepted on
  input during the migration window and normalized to the canonical shape
  before storage. No wire-level breaking change for existing callers.

## 0.12.0

### Minor Changes

- 821a368: Add `POST /api/v0/approvals` endpoint. The SDK calls this to create an approval request after receiving a `403 x-zapier-error-type: approval_required` from a proxy or handler. The body carries a typed request context (`http_request` or `action_run`).

## 0.11.0

### Minor Changes

- eb026a9: Add `GET /api/v0/approvals/{approvalId}` polling endpoint. The SDK uses this to poll approval status. On resolution, sdkapi invalidates the token-exchange cache so the next request re-fetches a fresh JWT with the updated `policy_urn`.

## 0.10.0

### Minor Changes

- 55b8587: Allow optional `policy` passthrough on create-client-credentials request. sdkapi forwards the field to Identity, which owns validation.

## 0.9.2

### Patch Changes

- 8956e20: Add snake_case query parameter aliases alongside deprecated camelCase params for apps, actions, authentications, and client-credentials endpoints

## 0.9.1

### Patch Changes

- da935f8: Add public_id, account_public_id, and customuser_public_id fields to authentication and connection schemas for passthrough from monolith.

## 0.9.0

### Minor Changes

- ef37474: Upgrade zod packages and swap embedded policy package to shared one.

## 0.8.0

### Minor Changes

- e0588b7: Add new connections endpoint.

## 0.7.2

### Patch Changes

- 74f835d: Move x-required-scopes to x-fastify-config.requiredScopes.

## 0.7.1

### Patch Changes

- c740422: Add dedupe method to zapier-sdk-core

## 0.7.0

### Minor Changes

- 1184ce7: Adds new endpoints for client crendentials.

## 0.6.0

### Minor Changes

- 2fb9fb0: Adds an isExpired parameter for filtering authentications

## 0.5.2

### Patch Changes

- 7bc7201: - Fixes ListActions schemas to be publicly available

## 0.5.1

### Patch Changes

- c67af83: - Add ListAuths schemas to shared schemas

## 0.5.0

### Minor Changes

- cae16a7: - Adds `actions.ts` schema.
  - Modifies the `authenticationId` from `authentications.ts` schemas to be a string

## 0.4.0

### Minor Changes

- 7d0d61b: - Resolves an issue with `/dist` not being available in the package.
  - Adds `apps` and `implementations` schemas

## 0.3.0

### Minor Changes

- 044e801: Switch numeric IDs to strings.

## 0.2.0

### Minor Changes

- f85ce88: Change user_id (mapped from customuser_id) to profile_id to avoid confusion with our internal user_id.

## 0.1.0

### Minor Changes

- c387335: Initial publish
