Skip to content

Commit

Permalink
feat(backend): Deprecate createSMSMessage (#2184)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikpolik committed Nov 22, 2023
1 parent d8cd0e2 commit e61df05
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .changeset/slimy-windows-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@clerk/backend': patch
---

Deprecate `createSMSMessage` and `SMSMessageApi` from `clerkClient`.

The `/sms_messages` Backend API endpoint will also be dropped in the future since this feature will no longer be available for new Clerk instances.

For a brief period it will still be accessible for instances that have used it in the past 7
days (13-11-2023 to 20-11-2023).

New instances will get a 403 forbidden response if they try to access it.
12 changes: 12 additions & 0 deletions packages/backend/src/api/endpoints/SMSMessageApi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { deprecated } from '@clerk/shared/deprecated';

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

Expand All @@ -8,8 +10,18 @@ type SMSParams = {
message: string;
};

/**
* @deprecated This endpoint is no longer available and the function will be removed in the next major version.
*/
export class SMSMessageAPI extends AbstractAPI {
/**
* @deprecated This endpoint is no longer available and the function will be removed in the next major version.
*/
public async createSMSMessage(params: SMSParams) {
deprecated(
'SMSMessageAPI.createSMSMessage',
'This endpoint is no longer available and the function will be removed in the next major version.',
);
return this.request<SMSMessage>({
method: 'POST',
path: basePath,
Expand Down

0 comments on commit e61df05

Please sign in to comment.