From 2a615bf98a22250c9105671ce72bf5374602802f Mon Sep 17 00:00:00 2001 From: Nikos Polykandriotis Date: Thu, 11 Jan 2024 17:13:48 +0200 Subject: [PATCH] feat(backend): Deprecate createEmail (#2555) --- .changeset/rich-years-help.md | 7 +++++++ packages/backend/src/api/endpoints/EmailApi.ts | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .changeset/rich-years-help.md diff --git a/.changeset/rich-years-help.md b/.changeset/rich-years-help.md new file mode 100644 index 0000000000..ecdf59e572 --- /dev/null +++ b/.changeset/rich-years-help.md @@ -0,0 +1,7 @@ +--- +'@clerk/backend': patch +--- + +Add deprecation warning for `EmailAPI.createEmail`. + +This endpoint is no longer available and the function will be removed in the next major version. diff --git a/packages/backend/src/api/endpoints/EmailApi.ts b/packages/backend/src/api/endpoints/EmailApi.ts index 77e88c06fc..58ddb60c8c 100644 --- a/packages/backend/src/api/endpoints/EmailApi.ts +++ b/packages/backend/src/api/endpoints/EmailApi.ts @@ -1,3 +1,5 @@ +import { deprecated } from '@clerk/shared/deprecated'; + import type { Email } from '../resources/Email'; import { AbstractAPI } from './AbstractApi'; @@ -10,8 +12,18 @@ type EmailParams = { const basePath = '/emails'; +/** + * @deprecated This endpoint is no longer available and the function will be removed in the next major version. + */ export class EmailAPI extends AbstractAPI { + /** + * @deprecated This endpoint is no longer available and the function will be removed in the next major version. + */ public async createEmail(params: EmailParams) { + deprecated( + 'EmailAPI.createEmail', + 'This endpoint is no longer available and the function will be removed in the next major version.', + ); return this.request({ method: 'POST', path: basePath,