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,