Skip to content

Commit 2a615bf

Browse files
authored
feat(backend): Deprecate createEmail (#2555)
1 parent bb7cf9f commit 2a615bf

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.changeset/rich-years-help.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/backend': patch
3+
---
4+
5+
Add deprecation warning for `EmailAPI.createEmail`.
6+
7+
This endpoint is no longer available and the function will be removed in the next major version.

packages/backend/src/api/endpoints/EmailApi.ts

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { deprecated } from '@clerk/shared/deprecated';
2+
13
import type { Email } from '../resources/Email';
24
import { AbstractAPI } from './AbstractApi';
35

@@ -10,8 +12,18 @@ type EmailParams = {
1012

1113
const basePath = '/emails';
1214

15+
/**
16+
* @deprecated This endpoint is no longer available and the function will be removed in the next major version.
17+
*/
1318
export class EmailAPI extends AbstractAPI {
19+
/**
20+
* @deprecated This endpoint is no longer available and the function will be removed in the next major version.
21+
*/
1422
public async createEmail(params: EmailParams) {
23+
deprecated(
24+
'EmailAPI.createEmail',
25+
'This endpoint is no longer available and the function will be removed in the next major version.',
26+
);
1527
return this.request<Email>({
1628
method: 'POST',
1729
path: basePath,

0 commit comments

Comments
 (0)