From fe1c3ecc0b669d1e027b465964cdf856c76e78d0 Mon Sep 17 00:00:00 2001 From: Jacek Date: Thu, 12 Jun 2025 21:39:38 -0500 Subject: [PATCH 1/3] fix(backend): Update Verification types --- packages/backend/src/api/resources/JSON.ts | 6 +++--- packages/backend/src/api/resources/Verification.ts | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/api/resources/JSON.ts b/packages/backend/src/api/resources/JSON.ts index fb2de4b5110..0d824c086cd 100644 --- a/packages/backend/src/api/resources/JSON.ts +++ b/packages/backend/src/api/resources/JSON.ts @@ -1,4 +1,4 @@ -import type { SignUpStatus } from '@clerk/types'; +import type { SignUpStatus, VerificationStatus, VerificationStrategy } from '@clerk/types'; import type { ActorTokenStatus, @@ -588,8 +588,8 @@ export interface UserJSON extends ClerkResourceJSON { } export interface VerificationJSON extends ClerkResourceJSON { - status: string; - strategy: string; + status: VerificationStatus; + strategy: VerificationStrategy; attempts: number | null; expire_at: number | null; verified_at_client?: string; diff --git a/packages/backend/src/api/resources/Verification.ts b/packages/backend/src/api/resources/Verification.ts index 82a645bba31..8e0c252df42 100644 --- a/packages/backend/src/api/resources/Verification.ts +++ b/packages/backend/src/api/resources/Verification.ts @@ -1,3 +1,5 @@ +import type { VerificationStatus, VerificationStrategy } from '@clerk/types'; + import type { OrganizationDomainVerificationJSON, VerificationJSON } from './JSON'; /** @@ -16,11 +18,11 @@ export class Verification { *
  • `expired`: The verification has expired.
  • * */ - readonly status: string, + readonly status: VerificationStatus, /** * The strategy pertaining to the parent sign-up or sign-in attempt. */ - readonly strategy: string, + readonly strategy: VerificationStrategy, /** * The redirect URL for an external verification. */ From 0272058f92f9b8316dc1dcec9e6cb5a1d43816bf Mon Sep 17 00:00:00 2001 From: Jacek Date: Thu, 12 Jun 2025 21:42:49 -0500 Subject: [PATCH 2/3] changeset --- .changeset/puny-suns-hug.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/puny-suns-hug.md diff --git a/.changeset/puny-suns-hug.md b/.changeset/puny-suns-hug.md new file mode 100644 index 00000000000..22f15cdb102 --- /dev/null +++ b/.changeset/puny-suns-hug.md @@ -0,0 +1,5 @@ +--- +'@clerk/backend': patch +--- + +Updating types of Verification.status and Verification.strategy From ee90878540e7dbab20183312baf14c99a71247d9 Mon Sep 17 00:00:00 2001 From: Jacek Date: Fri, 13 Jun 2025 08:38:39 -0500 Subject: [PATCH 3/3] only update status --- .changeset/puny-suns-hug.md | 2 +- packages/backend/src/api/resources/JSON.ts | 4 ++-- packages/backend/src/api/resources/Verification.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.changeset/puny-suns-hug.md b/.changeset/puny-suns-hug.md index 22f15cdb102..86a92e40b0d 100644 --- a/.changeset/puny-suns-hug.md +++ b/.changeset/puny-suns-hug.md @@ -2,4 +2,4 @@ '@clerk/backend': patch --- -Updating types of Verification.status and Verification.strategy +Updating type of Verification.status diff --git a/packages/backend/src/api/resources/JSON.ts b/packages/backend/src/api/resources/JSON.ts index 0d824c086cd..faea4ed7424 100644 --- a/packages/backend/src/api/resources/JSON.ts +++ b/packages/backend/src/api/resources/JSON.ts @@ -1,4 +1,4 @@ -import type { SignUpStatus, VerificationStatus, VerificationStrategy } from '@clerk/types'; +import type { SignUpStatus, VerificationStatus } from '@clerk/types'; import type { ActorTokenStatus, @@ -589,7 +589,7 @@ export interface UserJSON extends ClerkResourceJSON { export interface VerificationJSON extends ClerkResourceJSON { status: VerificationStatus; - strategy: VerificationStrategy; + strategy: string; attempts: number | null; expire_at: number | null; verified_at_client?: string; diff --git a/packages/backend/src/api/resources/Verification.ts b/packages/backend/src/api/resources/Verification.ts index 8e0c252df42..7f65bc9a492 100644 --- a/packages/backend/src/api/resources/Verification.ts +++ b/packages/backend/src/api/resources/Verification.ts @@ -1,4 +1,4 @@ -import type { VerificationStatus, VerificationStrategy } from '@clerk/types'; +import type { VerificationStatus } from '@clerk/types'; import type { OrganizationDomainVerificationJSON, VerificationJSON } from './JSON'; @@ -22,7 +22,7 @@ export class Verification { /** * The strategy pertaining to the parent sign-up or sign-in attempt. */ - readonly strategy: VerificationStrategy, + readonly strategy: string, /** * The redirect URL for an external verification. */