@getpara/user-management-client 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,7 +82,6 @@ __export(client_exports, {
82
82
  });
83
83
  module.exports = __toCommonJS(client_exports);
84
84
  var import_axios = __toESM(require("axios"));
85
- var import_qs = __toESM(require("qs"));
86
85
  var import_utils = require("./utils.js");
87
86
  var import_consts = require("./consts.js");
88
87
  var import_error = require("./error.js");
@@ -814,10 +813,7 @@ class Client {
814
813
  // GET /users/:userId/wallets/:walletId/refresh-done
815
814
  isRefreshDone(userId, walletId, partnerId, protocolId) {
816
815
  return __async(this, null, function* () {
817
- const queryParams = {};
818
- if (partnerId) queryParams["partnerId"] = partnerId;
819
- if (protocolId) queryParams["protocolId"] = protocolId;
820
- const query = import_qs.default.stringify(queryParams);
816
+ const query = new URLSearchParams(__spreadValues(__spreadValues({}, partnerId ? { partnerId } : {}), protocolId ? { protocolId } : {})).toString();
821
817
  const res = yield this.baseRequest.get(`/users/${userId}/wallets/${walletId}/refresh-done?${query}`);
822
818
  return res.data;
823
819
  });
@@ -864,9 +860,7 @@ class Client {
864
860
  }
865
861
  getEncryptedWalletPrivateKey(passwordId) {
866
862
  return __async(this, null, function* () {
867
- const queryParams = {};
868
- queryParams["passwordId"] = passwordId;
869
- const query = import_qs.default.stringify(queryParams);
863
+ const query = new URLSearchParams({ passwordId }).toString();
870
864
  const res = yield this.baseRequest.get(`/encrypted-wallet-private-keys?${query}`);
871
865
  return res;
872
866
  });
@@ -25,7 +25,6 @@ __export(wallet_exports, {
25
25
  WalletType: () => WalletType
26
26
  });
27
27
  module.exports = __toCommonJS(wallet_exports);
28
- var import_auth = require("./auth.js");
29
28
  var WalletScheme = /* @__PURE__ */ ((WalletScheme2) => {
30
29
  WalletScheme2["DKLS"] = "DKLS";
31
30
  WalletScheme2["CGGMP"] = "CGGMP";
@@ -62,9 +61,10 @@ const PREGEN_IDENTIFIER_TYPES = [
62
61
  "EMAIL",
63
62
  "PHONE",
64
63
  "CUSTOM_ID",
65
- import_auth.OAuthMethod.DISCORD,
66
- import_auth.OAuthMethod.TWITTER,
67
- import_auth.OAuthMethod.TELEGRAM
64
+ "GUEST_ID",
65
+ "DISCORD",
66
+ "TWITTER",
67
+ "TELEGRAM"
68
68
  ];
69
69
  const NON_ED25519 = ["DKLS" /* DKLS */, "CGGMP" /* CGGMP */];
70
70
  // Annotate the CommonJS export names for ESM import in node:
@@ -5,7 +5,6 @@ import {
5
5
  __spreadValues
6
6
  } from "./chunk-BBZEL7EG.js";
7
7
  import axios from "axios";
8
- import qs from "qs";
9
8
  import { extractWalletRef } from "./utils.js";
10
9
  import { SESSION_COOKIE_HEADER_NAME, VERSION_HEADER_NAME, PARTNER_ID_HEADER_NAME, API_KEY_HEADER_NAME } from "./consts.js";
11
10
  import { ParaApiError } from "./error.js";
@@ -737,10 +736,7 @@ class Client {
737
736
  // GET /users/:userId/wallets/:walletId/refresh-done
738
737
  isRefreshDone(userId, walletId, partnerId, protocolId) {
739
738
  return __async(this, null, function* () {
740
- const queryParams = {};
741
- if (partnerId) queryParams["partnerId"] = partnerId;
742
- if (protocolId) queryParams["protocolId"] = protocolId;
743
- const query = qs.stringify(queryParams);
739
+ const query = new URLSearchParams(__spreadValues(__spreadValues({}, partnerId ? { partnerId } : {}), protocolId ? { protocolId } : {})).toString();
744
740
  const res = yield this.baseRequest.get(`/users/${userId}/wallets/${walletId}/refresh-done?${query}`);
745
741
  return res.data;
746
742
  });
@@ -787,9 +783,7 @@ class Client {
787
783
  }
788
784
  getEncryptedWalletPrivateKey(passwordId) {
789
785
  return __async(this, null, function* () {
790
- const queryParams = {};
791
- queryParams["passwordId"] = passwordId;
792
- const query = qs.stringify(queryParams);
786
+ const query = new URLSearchParams({ passwordId }).toString();
793
787
  const res = yield this.baseRequest.get(`/encrypted-wallet-private-keys?${query}`);
794
788
  return res;
795
789
  });
@@ -1,5 +1,4 @@
1
1
  import "../chunk-BBZEL7EG.js";
2
- import { OAuthMethod } from "./auth.js";
3
2
  var WalletScheme = /* @__PURE__ */ ((WalletScheme2) => {
4
3
  WalletScheme2["DKLS"] = "DKLS";
5
4
  WalletScheme2["CGGMP"] = "CGGMP";
@@ -36,9 +35,10 @@ const PREGEN_IDENTIFIER_TYPES = [
36
35
  "EMAIL",
37
36
  "PHONE",
38
37
  "CUSTOM_ID",
39
- OAuthMethod.DISCORD,
40
- OAuthMethod.TWITTER,
41
- OAuthMethod.TELEGRAM
38
+ "GUEST_ID",
39
+ "DISCORD",
40
+ "TWITTER",
41
+ "TELEGRAM"
42
42
  ];
43
43
  const NON_ED25519 = ["DKLS" /* DKLS */, "CGGMP" /* CGGMP */];
44
44
  export {
@@ -1,4 +1,3 @@
1
- import { OAuthMethod } from './auth.js';
2
1
  import { PartnerEntity } from './partner.js';
3
2
  export declare enum WalletScheme {
4
3
  DKLS = "DKLS",
@@ -33,7 +32,7 @@ export type WalletParams = Partial<{
33
32
  walletId?: string;
34
33
  externalWalletAddress?: string;
35
34
  }>;
36
- export declare const PREGEN_IDENTIFIER_TYPES: readonly ["EMAIL", "PHONE", "CUSTOM_ID", OAuthMethod.DISCORD, OAuthMethod.TWITTER, OAuthMethod.TELEGRAM];
35
+ export declare const PREGEN_IDENTIFIER_TYPES: readonly ["EMAIL", "PHONE", "CUSTOM_ID", "GUEST_ID", "DISCORD", "TWITTER", "TELEGRAM"];
37
36
  export type TPregenIdentifierType = (typeof PREGEN_IDENTIFIER_TYPES)[number];
38
37
  export type PregenIds = Partial<Record<TPregenIdentifierType, string[]>>;
39
38
  export interface WalletEntity {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/user-management-client",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -16,8 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "axios": "^1.8.4",
19
- "libphonenumber-js": "1.11.2",
20
- "qs": "^6.12.0"
19
+ "libphonenumber-js": "1.11.2"
21
20
  },
22
21
  "devDependencies": {
23
22
  "typescript": "^5.0.4"
@@ -33,5 +32,5 @@
33
32
  "require": "./dist/cjs/index.js"
34
33
  }
35
34
  },
36
- "gitHead": "617cf0aa1307a96ec5e91d39e306e8a0b3b86b82"
35
+ "gitHead": "91b68e4ead22e2104307c934f2a582245b176619"
37
36
  }