Skip to content

feat(2FA): remove 2FA required modal - UOD-3895 - #760

Merged
btech222 merged 1 commit into
masterfrom
feat/UOD-3895
Aug 18, 2026
Merged

feat(2FA): remove 2FA required modal - UOD-3895#760
btech222 merged 1 commit into
masterfrom
feat/UOD-3895

Conversation

@btech222

Copy link
Copy Markdown
Contributor

No description provided.

@btech222
btech222 requested review from denis-shtupa-unzer and a lite review from Copilot August 17, 2026 17:03
@btech222 btech222 self-assigned this Aug 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the v0 IamMeClass “reset 2FA for current user” action from the SDK and deletes the associated Jest tests.

Changes:

  • Removed IamMeClass.setup2faActionMe() and IamMeSetup2faActionFailed from src/v0/iam_me.ts.
  • Deleted test/iam_me/setup-2fa-action.test.ts which covered the removed API.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/v0/iam_me.ts Removes the setup2faActionMe API method and its error class from the v0 iam-me handler.
test/iam_me/setup-2fa-action.test.ts Deletes tests for the removed setup2faActionMe behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/v0/iam_me.ts
Comment on lines 2 to 6
import { Client } from '../client'
import { BaseError } from '../errors/baseError'
import { UriHelper } from '../uri-helper'
import { ThBaseHandler } from '../base'
import { IamUser, IamUserResponse } from './iam_users'

Comment thread src/v0/iam_me.ts
Comment on lines 74 to 78
} catch (error: any) {
throw new IamMeFetchFailed(error.message, { error })
}
}

async setup2faActionMe (tenantId: string): Promise<IamUserResponse> {
const base = this.options.base ?? 'https://api.tillhub.com'
const uri = `${base}${this.endpoint}/${tenantId}/reset-2fa`

try {
const response = await this.http.getClient().post(uri)

if (response.status !== 200) {
throw new IamMeSetup2faActionFailed(undefined, { status: response.status })
}
return {
data: response.data.results[0] as IamUser,
msg: response.data.msg,
metadata: { count: response.data.count }
}
} catch (error: any) {
throw new IamMeSetup2faActionFailed(error.message, { error })
}
}
}
Comment thread src/v0/iam_me.ts
Comment on lines 75 to 78
throw new IamMeFetchFailed(error.message, { error })
}
}

async setup2faActionMe (tenantId: string): Promise<IamUserResponse> {
const base = this.options.base ?? 'https://api.tillhub.com'
const uri = `${base}${this.endpoint}/${tenantId}/reset-2fa`

try {
const response = await this.http.getClient().post(uri)

if (response.status !== 200) {
throw new IamMeSetup2faActionFailed(undefined, { status: response.status })
}
return {
data: response.data.results[0] as IamUser,
msg: response.data.msg,
metadata: { count: response.data.count }
}
} catch (error: any) {
throw new IamMeSetup2faActionFailed(error.message, { error })
}
}
}
@btech222
btech222 merged commit ae33793 into master Aug 18, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
# [4.288.0](v4.287.0...v4.288.0) (2026-08-18)

### Features

* **2FA:** remove 2FA required modal - UOD-3895 ([#760](#760)) ([ae33793](ae33793))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants