@getpara/user-management-client 1.9.0 → 1.10.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.
@@ -636,38 +636,14 @@ class Client {
636
636
  return __async(this, null, function* () {
637
637
  var _f = _e, {
638
638
  userId,
639
- params: {
640
- type,
641
- walletType,
642
- address,
643
- provider,
644
- networks,
645
- assets,
646
- defaultNetwork,
647
- defaultAsset,
648
- fiat,
649
- fiatQuantity,
650
- testMode = false
651
- }
652
- } = _f, params = __objRest(_f, [
639
+ params
640
+ } = _f, walletParams = __objRest(_f, [
653
641
  "userId",
654
642
  "params"
655
643
  ]);
656
- const [key, identifier] = (0, import_utils.extractWalletRef)(params);
644
+ const [key, identifier] = (0, import_utils.extractWalletRef)(walletParams);
657
645
  const walletString = key === "walletId" ? `wallets/${identifier}` : `external-wallets/${identifier}`;
658
- const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`, {
659
- type,
660
- provider,
661
- walletType,
662
- address,
663
- networks,
664
- assets,
665
- defaultAsset,
666
- defaultNetwork,
667
- fiat,
668
- fiatQuantity,
669
- testMode
670
- });
646
+ const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`, params);
671
647
  return res.data;
672
648
  });
673
649
  }
@@ -559,38 +559,14 @@ class Client {
559
559
  return __async(this, null, function* () {
560
560
  var _f = _e, {
561
561
  userId,
562
- params: {
563
- type,
564
- walletType,
565
- address,
566
- provider,
567
- networks,
568
- assets,
569
- defaultNetwork,
570
- defaultAsset,
571
- fiat,
572
- fiatQuantity,
573
- testMode = false
574
- }
575
- } = _f, params = __objRest(_f, [
562
+ params
563
+ } = _f, walletParams = __objRest(_f, [
576
564
  "userId",
577
565
  "params"
578
566
  ]);
579
- const [key, identifier] = extractWalletRef(params);
567
+ const [key, identifier] = extractWalletRef(walletParams);
580
568
  const walletString = key === "walletId" ? `wallets/${identifier}` : `external-wallets/${identifier}`;
581
- const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`, {
582
- type,
583
- provider,
584
- walletType,
585
- address,
586
- networks,
587
- assets,
588
- defaultAsset,
589
- defaultNetwork,
590
- fiat,
591
- fiatQuantity,
592
- testMode
593
- });
569
+ const res = yield this.baseRequest.post(`/users/${userId}/${walletString}/purchases`, params);
594
570
  return res.data;
595
571
  });
596
572
  }
@@ -257,7 +257,7 @@ declare class Client {
257
257
  getPendingTransaction(userId: string, pendingTransactionId: string): Promise<AxiosResponse<any, any>>;
258
258
  acceptPendingTransaction(userId: string, pendingTransactionId: string): Promise<AxiosResponse<any, any>>;
259
259
  getOnRampConfig(): Promise<OnRampConfig>;
260
- createOnRampPurchase({ userId, params: { type, walletType, address, provider, networks, assets, defaultNetwork, defaultAsset, fiat, fiatQuantity, testMode, }, ...params }: {
260
+ createOnRampPurchase({ userId, params, ...walletParams }: {
261
261
  userId: string;
262
262
  params: OnRampPurchaseCreateParams;
263
263
  } & WalletParams): Promise<OnRampPurchase>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/user-management-client",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -33,5 +33,5 @@
33
33
  "require": "./dist/cjs/index.js"
34
34
  }
35
35
  },
36
- "gitHead": "3d749844bf071e2c8de2769dd16e17c026951109"
36
+ "gitHead": "617cf0aa1307a96ec5e91d39e306e8a0b3b86b82"
37
37
  }