chore: add v1 API deprecation callouts and clean up imports

Add deprecation warning callouts to public API documentation pages.
Remove unused imports from webhook router and hooks.
This commit is contained in:
ephraimduncan
2026-01-20 15:28:37 +00:00
parent fd94a403af
commit 1bc090cb83
7 changed files with 25 additions and 5 deletions
@@ -21,6 +21,22 @@ Mark all V1 API endpoints as legacy/deprecated in the OpenAPI documentation to s
1. `packages/api/v1/contract.ts` - Add `deprecated: true` and `description` to all endpoints
2. `packages/api/v1/openapi.ts` - Update the OpenAPI info description
### Documentation Files to Modify
1. `apps/documentation/pages/developers/public-api/index.mdx` - Add deprecation `<Callout type="warning">` under "API V1 - Deprecated" section:
```
<Callout type="warning">
V1 API is deprecated and will be removed in a future release. Please migrate to V2.
</Callout>
```
2. `apps/documentation/pages/developers/public-api/versioning.mdx` - Add callout after "current version is v2" stating V1 is deprecated:
```
<Callout type="warning">
V1 API is deprecated. Please migrate to V2.
</Callout>
```
### Deprecation Message
**Per-endpoint message:**
@@ -31,6 +31,10 @@ Our new API V2 supports the following typed SDKs:
## API V1 - Deprecated
<Callout type="warning">
v1 API is deprecated and will be removed in a future release. Please migrate to v2.
</Callout>
Check out the [API V1 documentation](https://app.documenso.com/api/v1/openapi) for details about the API endpoints, request parameters, response formats, and authentication methods.
📖 [Documentation](https://documen.so/api-v2-docs)
@@ -11,6 +11,8 @@ Documenso uses API versioning to manage changes to the public API. This allows u
<Callout type="info">The current version of the API is `v2`.</Callout>
<Callout type="warning">v1 API is deprecated. Please migrate to v2.</Callout>
The API version is specified in the URL. For example, the base URL for the `v2` API is `https://app.documenso.com/api/v2`.
We may make changes to the API without incrementing the version number. We will always try to avoid breaking changes, but in some cases, it may be necessary to make changes that are not backward compatible. In these cases, we will increment the version number and provide information about the changes in the release notes.
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/consistent-type-assertions */
import { RefObject, useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
/**
* Calculate the width and height of a text element.
@@ -1,4 +1,4 @@
import { Prisma, WebhookCallStatus, WebhookTriggerEvents } from '@prisma/client';
import type { Prisma, WebhookCallStatus, WebhookTriggerEvents } from '@prisma/client';
import { TEAM_MEMBER_ROLE_PERMISSIONS_MAP } from '@documenso/lib/constants/teams';
import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error';
@@ -1,8 +1,7 @@
import { Prisma, WebhookCallStatus, WebhookTriggerEvents } from '@prisma/client';
import { Prisma, WebhookCallStatus } from '@prisma/client';
import { TEAM_MEMBER_ROLE_PERMISSIONS_MAP } from '@documenso/lib/constants/teams';
import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error';
import type { FindResultResponse } from '@documenso/lib/types/search-params';
import { buildTeamWhereQuery } from '@documenso/lib/utils/teams';
import { prisma } from '@documenso/prisma';
@@ -1,4 +1,3 @@
import { WebhookCallStatus, WebhookTriggerEvents } from '@prisma/client';
import { z } from 'zod';
import WebhookCallSchema from '@documenso/prisma/generated/zod/modelSchema/WebhookCallSchema';