Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@usecapsule/user-management-client

Package Overview
Dependencies
Maintainers
10
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@usecapsule/user-management-client - npm Package Compare versions

Comparing version 0.15.0 to 0.15.1

57

client.ts

@@ -431,10 +431,7 @@ import axios, { AxiosInstance, AxiosRequestHeaders, AxiosResponseHeaders } from 'axios';

// POST /users/cancel-recovery
// POST recovery/cancel
async cancelRecoveryAttempt(email: string) {
const res = await this.baseRequest.post<any>(
`/users/cancel-recovery`,
null,
{
params: { email }
}
`recovery/cancel`,
{ email }
);

@@ -459,6 +456,3 @@ return res;

'/users/enable-2fa',
{ verificationCode },
{
params: { email }
},
{ email, verificationCode },
);

@@ -472,6 +466,3 @@ return res;

'/users/setup-2fa',
null,
{
params: { email }
}
{ email },
);

@@ -481,10 +472,7 @@ return res;

// POST /users/recovery-verification-code
// POST /recovery/verification-code
async sendVerificationCodeForRecovery(email: string) {
const res = await this.baseRequest.post<any>(
`/users/recovery-verification-code`,
null,
{
params: { email }
}
`/recovery/verification-code`,
{ email },
);

@@ -496,9 +484,6 @@ return res;

async verifyEmailForRecovery(email: string, verificationCode: string) {
const body = { verificationCode }
const body = { email, verificationCode }
const res = await this.baseRequest.post<any>(
`/users/recovery-verify-email`,
body,
{
params: { email }
}
body
);

@@ -509,10 +494,7 @@ return res;

// POST /users/verify-2fa
async verify2FAForRecovery(email: string, verificationCode: string) {
const body = { verificationCode };
async verify2FAForRecovery(email: string, verificationCode: string, prevEmailVerificationCode: string) {
const body = { email, verificationCode, prevEmailVerificationCode, isRecovery: true };
const res = await this.baseRequest.post<any>(
'/users/verify-2fa',
body,
{
params: { email }
}
body
);

@@ -522,11 +504,8 @@ return res;

// POST /users/verify-2fa/normal
async verify2FA(email: string, verificationCode: string) {
const body = { verificationCode };
// POST /users/verify-2fa
async verify2FA(email: string, verificationCode: string, prevEmailVerificationCode: string) {
const body = { email, verificationCode, prevEmailVerificationCode };
const res = await this.baseRequest.post<any>(
'/users/verify-2fa/normal',
body,
{
params: { email }
}
'/users/verify-2fa',
body
);

@@ -533,0 +512,0 @@ return res;

@@ -150,4 +150,4 @@ export declare const USER_NOT_VERIFIED = "user must verify biometrics";

verifyEmailForRecovery(email: string, verificationCode: string): Promise<import("axios").AxiosResponse<any, any>>;
verify2FAForRecovery(email: string, verificationCode: string): Promise<import("axios").AxiosResponse<any, any>>;
verify2FA(email: string, verificationCode: string): Promise<import("axios").AxiosResponse<any, any>>;
verify2FAForRecovery(email: string, verificationCode: string, prevEmailVerificationCode: string): Promise<import("axios").AxiosResponse<any, any>>;
verify2FA(email: string, verificationCode: string, prevEmailVerificationCode: string): Promise<import("axios").AxiosResponse<any, any>>;
tempTrasmissionInit(message: string, userId?: string): Promise<import("axios").AxiosResponse<any, any>>;

@@ -154,0 +154,0 @@ tempTrasmission(id: string): Promise<import("axios").AxiosResponse<any, any>>;

@@ -556,3 +556,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

};
// POST /users/cancel-recovery
// POST recovery/cancel
Client.prototype.cancelRecoveryAttempt = function (email) {

@@ -563,5 +563,3 @@ return __awaiter(this, void 0, void 0, function () {

switch (_a.label) {
case 0: return [4 /*yield*/, this.baseRequest.post("/users/cancel-recovery", null, {
params: { email: email }
})];
case 0: return [4 /*yield*/, this.baseRequest.post("recovery/cancel", { email: email })];
case 1:

@@ -596,5 +594,3 @@ res = _a.sent();

switch (_a.label) {
case 0: return [4 /*yield*/, this.baseRequest.post('/users/enable-2fa', { verificationCode: verificationCode }, {
params: { email: email }
})];
case 0: return [4 /*yield*/, this.baseRequest.post('/users/enable-2fa', { email: email, verificationCode: verificationCode })];
case 1:

@@ -613,5 +609,3 @@ res = _a.sent();

switch (_a.label) {
case 0: return [4 /*yield*/, this.baseRequest.post('/users/setup-2fa', null, {
params: { email: email }
})];
case 0: return [4 /*yield*/, this.baseRequest.post('/users/setup-2fa', { email: email })];
case 1:

@@ -624,3 +618,3 @@ res = _a.sent();

};
// POST /users/recovery-verification-code
// POST /recovery/verification-code
Client.prototype.sendVerificationCodeForRecovery = function (email) {

@@ -631,5 +625,3 @@ return __awaiter(this, void 0, void 0, function () {

switch (_a.label) {
case 0: return [4 /*yield*/, this.baseRequest.post("/users/recovery-verification-code", null, {
params: { email: email }
})];
case 0: return [4 /*yield*/, this.baseRequest.post("/recovery/verification-code", { email: email })];
case 1:

@@ -649,6 +641,4 @@ res = _a.sent();

case 0:
body = { verificationCode: verificationCode };
return [4 /*yield*/, this.baseRequest.post("/users/recovery-verify-email", body, {
params: { email: email }
})];
body = { email: email, verificationCode: verificationCode };
return [4 /*yield*/, this.baseRequest.post("/users/recovery-verify-email", body)];
case 1:

@@ -662,3 +652,3 @@ res = _a.sent();

// POST /users/verify-2fa
Client.prototype.verify2FAForRecovery = function (email, verificationCode) {
Client.prototype.verify2FAForRecovery = function (email, verificationCode, prevEmailVerificationCode) {
return __awaiter(this, void 0, void 0, function () {

@@ -669,6 +659,4 @@ var body, res;

case 0:
body = { verificationCode: verificationCode };
return [4 /*yield*/, this.baseRequest.post('/users/verify-2fa', body, {
params: { email: email }
})];
body = { email: email, verificationCode: verificationCode, prevEmailVerificationCode: prevEmailVerificationCode, isRecovery: true };
return [4 /*yield*/, this.baseRequest.post('/users/verify-2fa', body)];
case 1:

@@ -681,4 +669,4 @@ res = _a.sent();

};
// POST /users/verify-2fa/normal
Client.prototype.verify2FA = function (email, verificationCode) {
// POST /users/verify-2fa
Client.prototype.verify2FA = function (email, verificationCode, prevEmailVerificationCode) {
return __awaiter(this, void 0, void 0, function () {

@@ -689,6 +677,4 @@ var body, res;

case 0:
body = { verificationCode: verificationCode };
return [4 /*yield*/, this.baseRequest.post('/users/verify-2fa/normal', body, {
params: { email: email }
})];
body = { email: email, verificationCode: verificationCode, prevEmailVerificationCode: prevEmailVerificationCode };
return [4 /*yield*/, this.baseRequest.post('/users/verify-2fa', body)];
case 1:

@@ -695,0 +681,0 @@ res = _a.sent();

{
"name": "@usecapsule/user-management-client",
"version": "0.15.0",
"version": "0.15.1",
"main": "dist/client.js",

@@ -5,0 +5,0 @@ "types": "dist/client.d.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc