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
7
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 1.4.1 to 1.5.0

32

dist/cjs/client.js

@@ -172,6 +172,6 @@ "use strict";

});
// PATCH /users/:userId/wallets/:walletId
this.updateWallet = (userId, walletId) => __awaiter(this, void 0, void 0, function* () {
const res = yield this.baseRequest.post(`/users/${userId}/wallets/${walletId}`);
return res;
// PATCH /wallets/pregen/:walletId
this.updatePregenWallet = (walletId, body) => __awaiter(this, void 0, void 0, function* () {
const res = yield this.baseRequest.patch(`wallets/pregen/${walletId}`, body);
return res.data;
});

@@ -223,3 +223,3 @@ // GET /users/:userId/wallets

// TODO remove after this is not optional anymore
const headers = apiKey ? { "X-External-API-Key": apiKey } : undefined;
const headers = apiKey ? { 'X-External-API-Key': apiKey } : undefined;
const axiosConfig = {

@@ -231,5 +231,5 @@ baseURL: userManagementHost,

if (retrieveSessionCookie) {
const defaultTransformRequest = Array.isArray(axios_1.default.defaults.transformRequest) ?
axios_1.default.defaults.transformRequest :
[axios_1.default.defaults.transformRequest];
const defaultTransformRequest = Array.isArray(axios_1.default.defaults.transformRequest)
? axios_1.default.defaults.transformRequest
: [axios_1.default.defaults.transformRequest];
axiosConfig.transformRequest = [

@@ -247,5 +247,5 @@ function (data, headers) {

if (persistSessionCookie) {
const defaultTransformResponse = Array.isArray(axios_1.default.defaults.transformResponse) ?
axios_1.default.defaults.transformResponse :
[axios_1.default.defaults.transformResponse];
const defaultTransformResponse = Array.isArray(axios_1.default.defaults.transformResponse)
? axios_1.default.defaults.transformResponse
: [axios_1.default.defaults.transformResponse];
axiosConfig.transformResponse = [

@@ -268,4 +268,5 @@ ...defaultTransformResponse,

body: config.data,
credentials: config.withCredentials ? 'include' : undefined
}).then(response => response.text().then(text => ({
credentials: config.withCredentials ? 'include' : undefined,
})
.then((response) => response.text().then((text) => ({
data: text,

@@ -276,4 +277,5 @@ status: response.status,

config: config,
request: fetch
}))).catch(function (reason) {
request: fetch,
})))
.catch(function (reason) {
throw reason;

@@ -280,0 +282,0 @@ });

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

});
// PATCH /users/:userId/wallets/:walletId
this.updateWallet = (userId, walletId) => __awaiter(this, void 0, void 0, function* () {
const res = yield this.baseRequest.post(`/users/${userId}/wallets/${walletId}`);
return res;
// PATCH /wallets/pregen/:walletId
this.updatePregenWallet = (walletId, body) => __awaiter(this, void 0, void 0, function* () {
const res = yield this.baseRequest.patch(`wallets/pregen/${walletId}`, body);
return res.data;
});

@@ -217,3 +217,3 @@ // GET /users/:userId/wallets

// TODO remove after this is not optional anymore
const headers = apiKey ? { "X-External-API-Key": apiKey } : undefined;
const headers = apiKey ? { 'X-External-API-Key': apiKey } : undefined;
const axiosConfig = {

@@ -225,5 +225,5 @@ baseURL: userManagementHost,

if (retrieveSessionCookie) {
const defaultTransformRequest = Array.isArray(axios.defaults.transformRequest) ?
axios.defaults.transformRequest :
[axios.defaults.transformRequest];
const defaultTransformRequest = Array.isArray(axios.defaults.transformRequest)
? axios.defaults.transformRequest
: [axios.defaults.transformRequest];
axiosConfig.transformRequest = [

@@ -241,5 +241,5 @@ function (data, headers) {

if (persistSessionCookie) {
const defaultTransformResponse = Array.isArray(axios.defaults.transformResponse) ?
axios.defaults.transformResponse :
[axios.defaults.transformResponse];
const defaultTransformResponse = Array.isArray(axios.defaults.transformResponse)
? axios.defaults.transformResponse
: [axios.defaults.transformResponse];
axiosConfig.transformResponse = [

@@ -262,4 +262,5 @@ ...defaultTransformResponse,

body: config.data,
credentials: config.withCredentials ? 'include' : undefined
}).then(response => response.text().then(text => ({
credentials: config.withCredentials ? 'include' : undefined,
})
.then((response) => response.text().then((text) => ({
data: text,

@@ -270,4 +271,5 @@ status: response.status,

config: config,
request: fetch
}))).catch(function (reason) {
request: fetch,
})))
.catch(function (reason) {
throw reason;

@@ -274,0 +276,0 @@ });

@@ -112,2 +112,5 @@ export declare const USER_NOT_VERIFIED = "user must verify biometrics";

}
interface updatePregenWalletBody {
email: string;
}
interface createWalletRes {

@@ -180,3 +183,3 @@ protocolId: string;

refreshKeys: (userId: string, walletId: string) => Promise<any>;
updateWallet: (userId: string, walletId: string) => Promise<any>;
updatePregenWallet: (walletId: string, body: updatePregenWalletBody) => Promise<any>;
getWallets: (userId: string) => Promise<any>;

@@ -183,0 +186,0 @@ login: (props: {

{
"name": "@usecapsule/user-management-client",
"version": "1.4.1",
"version": "1.5.0",
"main": "dist/cjs/index.js",

@@ -33,3 +33,3 @@ "module": "dist/esm/index.js",

},
"gitHead": "6e398e072e850563e48f7f8c2d62ebd792bb78a3"
"gitHead": "18b6d11b654f3c05995e1a5dff9f0dedcbc37c0a"
}
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