@getpara/user-management-client 2.0.0-alpha.13 → 2.0.0-alpha.15

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.
@@ -374,6 +374,10 @@ class Client {
374
374
  });
375
375
  return res.data;
376
376
  });
377
+ this.issueJwt = (..._0) => __async(this, [..._0], function* ({ keyIndex = 0 } = {}) {
378
+ const res = yield this.baseRequest.post(`/auth/jwt`, { keyIndex });
379
+ return res.data;
380
+ });
377
381
  this.trackError = (opts) => __async(this, null, function* () {
378
382
  yield this.baseRequest.post("/errors/sdk", opts);
379
383
  });
@@ -297,6 +297,10 @@ class Client {
297
297
  });
298
298
  return res.data;
299
299
  });
300
+ this.issueJwt = (..._0) => __async(this, [..._0], function* ({ keyIndex = 0 } = {}) {
301
+ const res = yield this.baseRequest.post(`/auth/jwt`, { keyIndex });
302
+ return res.data;
303
+ });
300
304
  this.trackError = (opts) => __async(this, null, function* () {
301
305
  yield this.baseRequest.post("/errors/sdk", opts);
302
306
  });
@@ -1,5 +1,5 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { AccountMetadata, Auth, AuthIdentifier, AuthMethod, BackupKitEmailProps, BiometricLocationHint, Chain, CurrentWalletIds, EncryptedKeyShare, EncryptorType, ExternalWalletInfo, LoginExternalWalletResponse, KeyShareType, Network, OnRampAsset, OnRampConfig, OnRampProvider, OnRampPurchase, OnRampPurchaseCreateParams, OnRampPurchaseUpdateParams, PasswordStatus, PregenIds, PrimaryAuth, PublicKeyStatus, PublicKeyType, ServerAuthStateSignup, SessionInfo, Setup2faResponse, SignUpOrLogInResponse, TelegramAuthResponse, TPregenIdentifierType, VerificationEmailProps, VerifiedAuth, VerifyFarcasterResponse, VerifyTelegramResponse, VerifyThirdPartyAuth, WalletEntity, WalletParams, TWalletScheme, TWalletType, VerifyExternalWalletParams } from './types/index.js';
2
+ import { AccountMetadata, Auth, AuthIdentifier, AuthMethod, BackupKitEmailProps, BiometricLocationHint, Chain, CurrentWalletIds, EncryptedKeyShare, EncryptorType, ExternalWalletInfo, LoginExternalWalletResponse, KeyShareType, Network, OnRampAsset, OnRampConfig, OnRampProvider, OnRampPurchase, OnRampPurchaseCreateParams, OnRampPurchaseUpdateParams, PasswordStatus, PregenIds, PrimaryAuth, PublicKeyStatus, PublicKeyType, ServerAuthStateSignup, SessionInfo, Setup2faResponse, SignUpOrLogInResponse, TelegramAuthResponse, TPregenIdentifierType, VerificationEmailProps, VerifiedAuth, VerifyFarcasterResponse, VerifyTelegramResponse, VerifyThirdPartyAuth, WalletEntity, WalletParams, TWalletScheme, TWalletType, VerifyExternalWalletParams, IssueJwtParams, IssueJwtResponse } from './types/index.js';
3
3
  interface ConfigOpts {
4
4
  useFetchAdapter?: boolean;
5
5
  }
@@ -340,6 +340,7 @@ declare class Client {
340
340
  walletId: string;
341
341
  rpcUrl?: string;
342
342
  }) => Promise<GetWalletBalanceRes>;
343
+ issueJwt: ({ keyIndex }?: IssueJwtParams) => Promise<IssueJwtResponse>;
343
344
  trackError: (opts: {
344
345
  methodName: string;
345
346
  error: {
@@ -213,3 +213,19 @@ export type AccountMetadata = Partial<Record<AccountMetadataKey, {
213
213
  date: Date;
214
214
  metadata: Record<string, any>;
215
215
  }>>;
216
+ export type IssueJwtParams = {
217
+ /**
218
+ * The index of the Para RSA keypair to use for signing the JWT. Defaults to `0`.
219
+ */
220
+ keyIndex?: number;
221
+ };
222
+ export type IssueJwtResponse = {
223
+ /**
224
+ * The Para JWT token.
225
+ */
226
+ token: string;
227
+ /**
228
+ * The `keyid`` / `kid` of the keypair used to sign the JWT.
229
+ */
230
+ keyId: string;
231
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/user-management-client",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.15",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -32,5 +32,5 @@
32
32
  "require": "./dist/cjs/index.js"
33
33
  }
34
34
  },
35
- "gitHead": "fbd9384b1b3fb8577f9d6c323d4e41d0de1ac83b"
35
+ "gitHead": "f837a1584f2a0b5d61c9b7a91cd74a68c01d5161"
36
36
  }