@pagopa/io-react-native-wallet 0.16.3 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -103,6 +103,12 @@ const handleObtainCredentialError = e => {
103
103
  if (!(e instanceof _errors.UnexpectedStatusCodeError)) {
104
104
  throw e;
105
105
  }
106
+
107
+ // Although it is technically not an error, we handle it as such to avoid
108
+ // changing the return type of `obtainCredential` and introduce a breaking change.
109
+ if (e.statusCode === 201) {
110
+ throw new _errors.CredentialIssuingNotSynchronousError("This credential cannot be issued synchronously. It will be available at a later time.", e.message);
111
+ }
106
112
  if (e.statusCode === 404) {
107
113
  throw new _errors.CredentialNotEntitledError("Invalid status found for the given credential", e.message);
108
114
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","ValidationFailed","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuid","v4","ath","sha256ToBase64","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","hasStatus","res","json","CredentialResponse","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","UnexpectedStatusCodeError","statusCode","CredentialNotEntitledError","CredentialRequestError"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAMA,IAAAG,MAAA,GAAAH,OA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AAC,CAAC,CAAC,CACzBH,IAAI,CAAEH,IAAI,IAAKO,yBAAkB,CAACC,SAAS,CAACR,IAAI,CAAC,CAAC,CAClDS,KAAK,CAACC,2BAA2B,CAAC;EAErC,IAAI,CAAChB,aAAa,CAACiB,OAAO,EAAE;IAC1B,MAAM,IAAIjC,wBAAgB,CAACgB,aAAa,CAACkB,KAAK,CAACC,OAAO,CAAC;EACzD;EAEA,OAAOnB,aAAa,CAACoB,IAAI;AAC3B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANA3D,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAOA,MAAMsD,2BAA2B,GAAIK,CAAU,IAAK;EAClD,IAAI,EAAEA,CAAC,YAAYC,iCAAyB,CAAC,EAAE;IAC7C,MAAMD,CAAC;EACT;EAEA,IAAIA,CAAC,CAACE,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAIC,kCAA0B,CAClC,+CAA+C,EAC/CH,CAAC,CAACF,OACJ,CAAC;EACH;EAEA,MAAM,IAAIM,8BAAsB,CAC7B,oEAAmEJ,CAAC,CAACE,UAAW,GAAE,EACnFF,CAAC,CAACF,OACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","ValidationFailed","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuid","v4","ath","sha256ToBase64","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","hasStatus","res","json","CredentialResponse","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","UnexpectedStatusCodeError","statusCode","CredentialIssuingNotSynchronousError","CredentialNotEntitledError","CredentialRequestError"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAqC,SAAAM,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAc9B,MAAMG,gBAAgB,GAAG,MAAAA,CAC9BC,KAAa,EACbC,MAAc,EACdC,QAAgB,EAChBC,GAAkB,KACE;EACpB,MAAMC,GAAG,GAAG,MAAMD,GAAG,CAACE,YAAY,CAAC,CAAC;EACpC,OAAO,IAAIC,yBAAO,CAACH,GAAG,CAAC,CACpBI,UAAU,CAAC;IACVP;EACF,CAAC,CAAC,CACDQ,kBAAkB,CAAC;IAClBC,GAAG,EAAE,sBAAsB;IAC3BL;EACF,CAAC,CAAC,CACDM,WAAW,CAACR,QAAQ,CAAC,CACrBS,SAAS,CAACV,MAAM,CAAC,CACjBW,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;AACX,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfAC,OAAA,CAAAhB,gBAAA,GAAAA,gBAAA;AAgBO,MAAMiB,gBAAkC,GAAG,MAAAA,CAChDC,UAAU,EACVC,WAAW,EACXC,QAAQ,EACRC,oBAAoB,EACpBC,OAAO,KACJ;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
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.serializeAttrs = exports.WalletProviderResponseError = exports.WalletInstanceRevokedError = exports.WalletInstanceNotFoundError = exports.WalletInstanceAttestationIssuingError = exports.ValidationFailed = exports.UnexpectedStatusCodeError = exports.StatusAttestationInvalid = exports.StatusAttestationError = exports.PidMetadataError = exports.PidIssuingError = exports.OperationAbortedError = exports.NoSuitableKeysFoundInEntityConfiguration = exports.IoWalletError = exports.CredentialRequestError = exports.CredentialNotEntitledError = exports.ClaimsNotFoundInToken = exports.ClaimsNotFoundBetweenDislosures = exports.AuthorizationIdpError = exports.AuthorizationError = exports.AuthRequestDecodeError = void 0;
6
+ exports.serializeAttrs = exports.WalletProviderResponseError = exports.WalletInstanceRevokedError = exports.WalletInstanceNotFoundError = exports.WalletInstanceAttestationIssuingError = exports.ValidationFailed = exports.UnexpectedStatusCodeError = exports.StatusAttestationInvalid = exports.StatusAttestationError = exports.PidMetadataError = exports.PidIssuingError = exports.OperationAbortedError = exports.NoSuitableKeysFoundInEntityConfiguration = exports.IoWalletError = exports.CredentialRequestError = exports.CredentialNotEntitledError = exports.CredentialIssuingNotSynchronousError = exports.ClaimsNotFoundInToken = exports.ClaimsNotFoundBetweenDislosures = exports.AuthorizationIdpError = exports.AuthorizationError = exports.AuthRequestDecodeError = void 0;
7
7
  /**
8
8
  * utility to format a set of attributes into an error message string
9
9
  *
@@ -453,5 +453,24 @@ class CredentialRequestError extends IoWalletError {
453
453
  this.reason = reason;
454
454
  }
455
455
  }
456
+
457
+ /**
458
+ * Error subclass thrown when a credential cannot be issued immediately because it follows the async flow.
459
+ */
456
460
  exports.CredentialRequestError = CredentialRequestError;
461
+ class CredentialIssuingNotSynchronousError extends IoWalletError {
462
+ static get code() {
463
+ return "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
464
+ }
465
+ code = "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
466
+ constructor(message) {
467
+ let reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "unspecified";
468
+ super(serializeAttrs({
469
+ message,
470
+ reason
471
+ }));
472
+ this.reason = reason;
473
+ }
474
+ }
475
+ exports.CredentialIssuingNotSynchronousError = CredentialIssuingNotSynchronousError;
457
476
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","exports","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","UnexpectedStatusCodeError","statusCode","toString","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","AuthorizationError","AuthorizationIdpError","error","errorDescription","OperationAbortedError","operation","StatusAttestationInvalid","StatusAttestationError","CredentialNotEntitledError","CredentialRequestError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GACzBC,KAAsC,IAEtCC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC,CAChEH,GAAG,CAAEO,CAAC,IAAKA,CAAC,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IAAI,CAAC,GAAG,CAAC;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AAFAlB,OAAA,CAAAuC,sBAAA,GAAAA,sBAAA;AAGO,MAAMC,0BAA0B,SAASvC,aAAa,CAAC;EAC5D,WAAWE,IAAIA,CAAA,EAAoC;IACjD,OAAO,+BAA+B;EACxC;EAEAA,IAAI,GAAG,+BAA+B;EAItCC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC3B,cAAc,CAAC;MAAEiB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AAFAlB,OAAA,CAAAwC,0BAAA,GAAAA,0BAAA;AAGO,MAAMC,sBAAsB,SAASxC,aAAa,CAAC;EACxD,WAAWE,IAAIA,CAAA,EAA+B;IAC5C,OAAO,0BAA0B;EACnC;EAEAA,IAAI,GAAG,0BAA0B;EAIjCC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC3B,cAAc,CAAC;MAAEiB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;AAAClB,OAAA,CAAAyC,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","exports","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","UnexpectedStatusCodeError","statusCode","toString","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","AuthorizationError","AuthorizationIdpError","error","errorDescription","OperationAbortedError","operation","StatusAttestationInvalid","StatusAttestationError","CredentialNotEntitledError","CredentialRequestError","CredentialIssuingNotSynchronousError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GACzBC,KAAsC,IAEtCC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC,CAChEH,GAAG,CAAEO,CAAC,IAAKA,CAAC,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IAAI,CAAC,GAAG,CAAC;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVAE,OAAA,CAAAZ,cAAA,GAAAA,cAAA;AAWO,MAAMa,aAAa,SAASC,KAAK,CAAC;EACvC;EACA,WAAWC,IAAIA,CAAA,EAAW;IACxB,OAAO,uBAAuB;EAChC;;EAEA;EACAA,IAAI,GAAW,uBAAuB;EAEtCC,WAAWA,CAACC,OAAgB,EAAE;IAAA,IAAAC,qBAAA;IAC5B,KAAK,CAACD,OAAO,CAAC;IACd,IAAI,CAACE,IAAI,GAAG,IAAI,CAACH,WAAW,CAACG,IAAI;IACjC;IACA,CAAAD,qBAAA,GAAAJ,KAAK,CAACM,iBAAiB,cAAAF,qBAAA,uBAAvBA,qBAAA,C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3B,cAAc,CAAC;MAAEiB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AAFAlB,OAAA,CAAAwC,0BAAA,GAAAA,0BAAA;AAGO,MAAMC,sBAAsB,SAASxC,aAAa,CAAC;EACxD,WAAWE,IAAIA,CAAA,EAA+B;IAC5C,OAAO,0BAA0B;EACnC;EAEAA,IAAI,GAAG,0BAA0B;EAIjCC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC3B,cAAc,CAAC;MAAEiB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AAFAlB,OAAA,CAAAyC,sBAAA,GAAAA,sBAAA;AAGO,MAAMC,oCAAoC,SAASzC,aAAa,CAAC;EACtE,WAAWE,IAAIA,CAAA,EAA+C;IAC5D,OAAO,0CAA0C;EACnD;EAEAA,IAAI,GAAG,0CAA0C;EAIjDC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC3B,cAAc,CAAC;MAAEiB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;AAAClB,OAAA,CAAA0C,oCAAA,GAAAA,oCAAA"}
@@ -1,6 +1,6 @@
1
1
  import { sha256ToBase64, SignJWT } from "@pagopa/io-react-native-jwt";
2
2
  import { hasStatus } from "../../utils/misc";
3
- import { CredentialNotEntitledError, CredentialRequestError, UnexpectedStatusCodeError, ValidationFailed } from "../../utils/errors";
3
+ import { CredentialIssuingNotSynchronousError, CredentialNotEntitledError, CredentialRequestError, UnexpectedStatusCodeError, ValidationFailed } from "../../utils/errors";
4
4
  import { CredentialResponse } from "./types";
5
5
  import { createDPopToken } from "../../utils/dpop";
6
6
  import uuid from "react-native-uuid";
@@ -94,6 +94,12 @@ const handleObtainCredentialError = e => {
94
94
  if (!(e instanceof UnexpectedStatusCodeError)) {
95
95
  throw e;
96
96
  }
97
+
98
+ // Although it is technically not an error, we handle it as such to avoid
99
+ // changing the return type of `obtainCredential` and introduce a breaking change.
100
+ if (e.statusCode === 201) {
101
+ throw new CredentialIssuingNotSynchronousError("This credential cannot be issued synchronously. It will be available at a later time.", e.message);
102
+ }
97
103
  if (e.statusCode === 404) {
98
104
  throw new CredentialNotEntitledError("Invalid status found for the given credential", e.message);
99
105
  }
@@ -1 +1 @@
1
- {"version":3,"names":["sha256ToBase64","SignJWT","hasStatus","CredentialNotEntitledError","CredentialRequestError","UnexpectedStatusCodeError","ValidationFailed","CredentialResponse","createDPopToken","uuid","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","htm","htu","jti","v4","ath","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","res","json","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","statusCode"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":"AAAA,SACEA,cAAc,EACdC,OAAO,QAEF,6BAA6B;AAGpC,SAASC,SAAS,QAAkB,kBAAkB;AAEtD,SACEC,0BAA0B,EAC1BC,sBAAsB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I,CAAC,CAAC,CAClDO,KAAK,CAACC,2BAA2B,CAAC;EAErC,IAAI,CAACd,aAAa,CAACe,OAAO,EAAE;IAC1B,MAAM,IAAIpE,gBAAgB,CAACqD,aAAa,CAACgB,KAAK,CAACC,OAAO,CAAC;EACzD;EAEA,OAAOjB,aAAa,CAACkB,IAAI;AAC3B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMJ,2BAA2B,GAAIK,CAAU,IAAK;EAClD,IAAI,EAAEA,CAAC,YAAYzE,yBAAyB,CAAC,EAAE;IAC7C,MAAMyE,CAAC;EACT;EAEA,IAAIA,CAAC,CAACC,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAI5E,0BAA0B,CAClC,+CAA+C,EAC/C2E,CAAC,CAACF,OACJ,CAAC;EACH;EAEA,MAAM,IAAIxE,sBAAsB,CAC7B,oEAAmE0E,CAAC,CAACC,UAAW,GAAE,EACnFD,CAAC,CAACF,OACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"names":["sha256ToBase64","SignJWT","hasStatus","CredentialIssuingNotSynchronousError","CredentialNotEntitledError","CredentialRequestError","UnexpectedStatusCodeError","ValidationFailed","CredentialResponse","createDPopToken","uuid","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","htm","htu","jti","v4","ath","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","res","json","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","statusCode"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mapp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CACpBmE,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAAEH,IAAI,IAAK1D,kBAAkB,CAACgE,SAAS,CAACN,IAAI,CAAC,CAAC,CAClDO,KAAK,CAACC,2BAA2B,CAAC;EAErC,IAAI,CAACd,aAAa,CAACe,OAAO,EAAE;IAC1B,MAAM,IAAIpE,gBAAgB,CAACqD,aAAa,CAACgB,KAAK,CAACC,OAAO,CAAC;EACzD;EAEA,OAAOjB,aAAa,CAACkB,IAAI;AAC3B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMJ,2BAA2B,GAAIK,CAAU,IAAK;EAClD,IAAI,EAAEA,CAAC,YAAYzE,yBAAyB,CAAC,EAAE;IAC7C,MAAMyE,CAAC;EACT;;EAEA;EACA;EACA,IAAIA,CAAC,CAACC,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAI7E,oCAAoC,CAC5C,uFAAuF,EACvF4E,CAAC,CAACF,OACJ,CAAC;EACH;EAEA,IAAIE,CAAC,CAACC,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAI5E,0BAA0B,CAClC,+CAA+C,EAC/C2E,CAAC,CAACF,OACJ,CAAC;EACH;EAEA,MAAM,IAAIxE,sBAAsB,CAC7B,oEAAmE0E,CAAC,CAACC,UAAW,GAAE,EACnFD,CAAC,CAACF,OACJ,CAAC;AACH,CAAC"}
@@ -427,4 +427,22 @@ export class CredentialRequestError extends IoWalletError {
427
427
  this.reason = reason;
428
428
  }
429
429
  }
430
+
431
+ /**
432
+ * Error subclass thrown when a credential cannot be issued immediately because it follows the async flow.
433
+ */
434
+ export class CredentialIssuingNotSynchronousError extends IoWalletError {
435
+ static get code() {
436
+ return "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
437
+ }
438
+ code = "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
439
+ constructor(message) {
440
+ let reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "unspecified";
441
+ super(serializeAttrs({
442
+ message,
443
+ reason
444
+ }));
445
+ this.reason = reason;
446
+ }
447
+ }
430
448
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","UnexpectedStatusCodeError","statusCode","toString","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","AuthorizationError","AuthorizationIdpError","error","errorDescription","OperationAbortedError","operation","StatusAttestationInvalid","StatusAttestationError","CredentialNotEntitledError","CredentialRequestError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GACzBC,KAAsC,IAEtCC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC,CAChEH,GAAG,CAAEO,CAAC,IAAKA,CAAC,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IAAI,CAAC,GAAG,CAAC;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,aAAa,SAASC,KAAK,CAAC;EACvC;EACA,WAAWC,IAAIA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A,MAAG,aAAa;IACzD,KAAK,CAAC1B,cAAc,CAAC;MAAEgB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF"}
1
+ {"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","UnexpectedStatusCodeError","statusCode","toString","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","AuthorizationError","AuthorizationIdpError","error","errorDescription","OperationAbortedError","operation","StatusAttestationInvalid","StatusAttestationError","CredentialNotEntitledError","CredentialRequestError","CredentialIssuingNotSynchronousError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GACzBC,KAAsC,IAEtCC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC,CAChEH,GAAG,CAAEO,CAAC,IAAKA,CAAC,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IAAI,CAAC,GAAG,CAAC;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,aAAa,SAASC,KAAK,CAAC;EACvC;EACA,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A,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC1B,cAAc,CAAC;MAAEgB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMwB,oCAAoC,SAASzC,aAAa,CAAC;EACtE,WAAWE,IAAIA,CAAA,EAA+C;IAC5D,OAAO,0CAA0C;EACnD;EAEAA,IAAI,GAAG,0CAA0C;EAIjDC,WAAWA,CAACC,OAAe,EAAkC;IAAA,IAAhCa,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IACzD,KAAK,CAAC1B,cAAc,CAAC;MAAEgB,OAAO;MAAEa;IAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAACA,MAAM,GAAGA,MAAM;EACtB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAO5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAkF9B,CAAC"}
1
+ {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAkF9B,CAAC"}
@@ -224,4 +224,13 @@ export declare class CredentialRequestError extends IoWalletError {
224
224
  reason: string;
225
225
  constructor(message: string, reason?: string);
226
226
  }
227
+ /**
228
+ * Error subclass thrown when a credential cannot be issued immediately because it follows the async flow.
229
+ */
230
+ export declare class CredentialIssuingNotSynchronousError extends IoWalletError {
231
+ static get code(): "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
232
+ code: string;
233
+ reason: string;
234
+ constructor(message: string, reason?: string);
235
+ }
227
236
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,UAClB,OAAO,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAIW,CAAC;AAEf;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,6DAA6D;IAC7D,MAAM,KAAK,IAAI,IAAI,MAAM,CAExB;IAED,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAA2B;gBAE3B,OAAO,CAAC,EAAE,MAAM;CAM7B;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,aAAa;IAC1D,MAAM,KAAK,IAAI,IAAI,4BAA4B,CAE9C;IAED,IAAI,SAAgC;IAEpC,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;gBAEP,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAShD;A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;gBAEH,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAsB;CAI5D;AAED;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,aAAa;IACrE,MAAM,KAAK,IAAI,IAAI,0CAA0C,CAE5D;IAED,IAAI,SAA8C;IAElD,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAsB;CAI5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-react-native-wallet",
3
- "version": "0.16.3",
3
+ "version": "0.17.0",
4
4
  "description": "Provide data structures, helpers and API for IO Wallet",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -8,6 +8,7 @@ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
8
8
  import { hasStatus, type Out } from "../../utils/misc";
9
9
  import type { StartUserAuthorization } from "./03-start-user-authorization";
10
10
  import {
11
+ CredentialIssuingNotSynchronousError,
11
12
  CredentialNotEntitledError,
12
13
  CredentialRequestError,
13
14
  UnexpectedStatusCodeError,
@@ -164,6 +165,15 @@ const handleObtainCredentialError = (e: unknown) => {
164
165
  throw e;
165
166
  }
166
167
 
168
+ // Although it is technically not an error, we handle it as such to avoid
169
+ // changing the return type of `obtainCredential` and introduce a breaking change.
170
+ if (e.statusCode === 201) {
171
+ throw new CredentialIssuingNotSynchronousError(
172
+ "This credential cannot be issued synchronously. It will be available at a later time.",
173
+ e.message
174
+ );
175
+ }
176
+
167
177
  if (e.statusCode === 404) {
168
178
  throw new CredentialNotEntitledError(
169
179
  "Invalid status found for the given credential",
@@ -462,3 +462,21 @@ export class CredentialRequestError extends IoWalletError {
462
462
  this.reason = reason;
463
463
  }
464
464
  }
465
+
466
+ /**
467
+ * Error subclass thrown when a credential cannot be issued immediately because it follows the async flow.
468
+ */
469
+ export class CredentialIssuingNotSynchronousError extends IoWalletError {
470
+ static get code(): "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR" {
471
+ return "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
472
+ }
473
+
474
+ code = "CREDENTIAL_ISSUING_NOT_SYNCHRONOUS_ERROR";
475
+
476
+ reason: string;
477
+
478
+ constructor(message: string, reason: string = "unspecified") {
479
+ super(serializeAttrs({ message, reason }));
480
+ this.reason = reason;
481
+ }
482
+ }