Skip to content

Commit

Permalink
feat(backend): Deprecate createEmail (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikpolik committed Jan 11, 2024
1 parent bb7cf9f commit 2a615bf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/rich-years-help.md
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 12 additions & 0 deletions packages/backend/src/api/endpoints/EmailApi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { deprecated } from '@clerk/shared/deprecated';

import type { Email } from '../resources/Email';
import { AbstractAPI } from './AbstractApi';

Expand All @@ -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<Email>({
method: 'POST',
path: basePath,
Expand Down

0 comments on commit 2a615bf

Please sign in to comment.