diff --git a/.agents/scratches/v1-api-legacy-deprecation-spec.md b/.agents/scratches/v1-api-legacy-deprecation-spec.md index 764d33d90..342ec0034 100644 --- a/.agents/scratches/v1-api-legacy-deprecation-spec.md +++ b/.agents/scratches/v1-api-legacy-deprecation-spec.md @@ -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 `` under "API V1 - Deprecated" section: + ``` + + V1 API is deprecated and will be removed in a future release. Please migrate to V2. + + ``` + +2. `apps/documentation/pages/developers/public-api/versioning.mdx` - Add callout after "current version is v2" stating V1 is deprecated: + ``` + + V1 API is deprecated. Please migrate to V2. + + ``` + ### Deprecation Message **Per-endpoint message:** diff --git a/apps/documentation/pages/developers/public-api/index.mdx b/apps/documentation/pages/developers/public-api/index.mdx index f589c6c0f..93bc2bd6b 100644 --- a/apps/documentation/pages/developers/public-api/index.mdx +++ b/apps/documentation/pages/developers/public-api/index.mdx @@ -31,6 +31,10 @@ Our new API V2 supports the following typed SDKs: ## API V1 - Deprecated + + v1 API is deprecated and will be removed in a future release. Please migrate to v2. + + 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) diff --git a/apps/documentation/pages/developers/public-api/versioning.mdx b/apps/documentation/pages/developers/public-api/versioning.mdx index 6aca5bcfc..2b9a4d763 100644 --- a/apps/documentation/pages/developers/public-api/versioning.mdx +++ b/apps/documentation/pages/developers/public-api/versioning.mdx @@ -11,6 +11,8 @@ Documenso uses API versioning to manage changes to the public API. This allows u The current version of the API is `v2`. +v1 API is deprecated. Please migrate to v2. + 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. diff --git a/packages/lib/client-only/hooks/use-element-scale-size.ts b/packages/lib/client-only/hooks/use-element-scale-size.ts index 1c8ab320e..842586639 100644 --- a/packages/lib/client-only/hooks/use-element-scale-size.ts +++ b/packages/lib/client-only/hooks/use-element-scale-size.ts @@ -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. diff --git a/packages/trpc/server/webhook-router/find-webhook-calls.ts b/packages/trpc/server/webhook-router/find-webhook-calls.ts index fa3bc0966..4b1fb5755 100644 --- a/packages/trpc/server/webhook-router/find-webhook-calls.ts +++ b/packages/trpc/server/webhook-router/find-webhook-calls.ts @@ -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'; diff --git a/packages/trpc/server/webhook-router/resend-webhook-call.ts b/packages/trpc/server/webhook-router/resend-webhook-call.ts index abb0ca34e..36c3322ab 100644 --- a/packages/trpc/server/webhook-router/resend-webhook-call.ts +++ b/packages/trpc/server/webhook-router/resend-webhook-call.ts @@ -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'; diff --git a/packages/trpc/server/webhook-router/resend-webhook-call.types.ts b/packages/trpc/server/webhook-router/resend-webhook-call.types.ts index f34b9ebc6..d75ba994d 100644 --- a/packages/trpc/server/webhook-router/resend-webhook-call.types.ts +++ b/packages/trpc/server/webhook-router/resend-webhook-call.types.ts @@ -1,4 +1,3 @@ -import { WebhookCallStatus, WebhookTriggerEvents } from '@prisma/client'; import { z } from 'zod'; import WebhookCallSchema from '@documenso/prisma/generated/zod/modelSchema/WebhookCallSchema';