@crossmint/common-sdk-auth 1.0.30 → 1.0.31

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPWTD6N4Xcjs = require('./chunk-PWTD6N4X.cjs');require('./chunk-W2LLJPST.cjs');require('./chunk-IFDKINXX.cjs');require('./chunk-LEC76ZOA.cjs');require('./chunk-GMVKBAFQ.cjs');require('./chunk-ZSLB6Y6N.cjs');require('./chunk-N7HN3GFB.cjs');require('./chunk-6R7OYJL5.cjs');exports.CrossmintAuth = _chunkPWTD6N4Xcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXD6FLFO2cjs = require('./chunk-XD6FLFO2.cjs');require('./chunk-W2LLJPST.cjs');require('./chunk-IFDKINXX.cjs');require('./chunk-LEC76ZOA.cjs');require('./chunk-GMVKBAFQ.cjs');require('./chunk-ZSLB6Y6N.cjs');require('./chunk-ZBQN6ADA.cjs');require('./chunk-6R7OYJL5.cjs');exports.CrossmintAuth = _chunkXD6FLFO2cjs.a;
@@ -1 +1 @@
1
- import{a}from"./chunk-LHFL3HY2.js";import"./chunk-VQHFGGR7.js";import"./chunk-ATVCM6P4.js";import"./chunk-LEZ3ABWL.js";import"./chunk-NQMKBUHU.js";import"./chunk-H23FMBUL.js";import"./chunk-V4KW4LX4.js";import"./chunk-DUTPQ56Q.js";export{a as CrossmintAuth};
1
+ import{a}from"./chunk-UBZASKJH.js";import"./chunk-VQHFGGR7.js";import"./chunk-ATVCM6P4.js";import"./chunk-LEZ3ABWL.js";import"./chunk-NQMKBUHU.js";import"./chunk-H23FMBUL.js";import"./chunk-TTMEW4M3.js";import"./chunk-DUTPQ56Q.js";export{a as CrossmintAuth};
@@ -1 +1 @@
1
- var t="@crossmint/common-sdk-auth",e="1.0.30";var d=e,p=t,o="2024-09-26",m=`api/${o}/session/sdk/auth`,a="crossmint-jwt",E="crossmint-refresh-token";export{d as a,p as b,o as c,m as d,a as e,E as f};
1
+ var t="@crossmint/common-sdk-auth",e="1.0.31";var d=e,p=t,o="2024-09-26",m=`api/${o}/session/sdk/auth`,a="crossmint-jwt",E="crossmint-refresh-token";export{d as a,p as b,o as c,m as d,a as e,E as f};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-NQMKBUHU.js";import{a as h,b as u,d as o}from"./chunk-V4KW4LX4.js";import{a as s}from"./chunk-DUTPQ56Q.js";import{CrossmintApiClient as p}from"@crossmint/common-sdk-base";var l=class n{constructor(t,e,r={}){var a;this.crossmint=t,this.apiClient=e,this.refreshRoute=(a=r.refreshRoute)!=null?a:null}static from(t,e={}){return new n(t,n.defaultApiClient(t),e)}getJwksUri(){return`${this.apiClient.baseUrl}/.well-known/jwks.json`}refreshAuthMaterial(t){return s(this,null,function*(){if(this.refreshRoute!=null)return yield this.refreshFromCustomRoute(t);if(t!=null)return yield this.refresh(t);throw new i("Refresh token missing from parameters")})}refresh(t){return s(this,null,function*(){let e=yield this.apiClient.post(`${o}/refresh`,{body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}});if(!e.ok)throw new i(e.statusText);let r=yield e.json();return{jwt:r.jwt,refreshToken:r.refresh,user:r.user}})}refreshFromCustomRoute(t){return s(this,null,function*(){if(this.refreshRoute==null)throw new Error("Custom refresh route is not set");let e=yield fetch(this.refreshRoute,{method:"POST",body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}}),r=yield e.json();if(!e.ok)throw new i(r.message);return r})}logoutFromDefaultRoute(t){return s(this,null,function*(){return yield this.apiClient.post(`${o}/logout`,{headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh:t})})})}static defaultApiClient(t){return new p(t,{internalConfig:{sdkMetadata:{name:u,version:h}}})}};export{l as a};
1
+ import{a as i}from"./chunk-NQMKBUHU.js";import{a as h,b as u,d as o}from"./chunk-TTMEW4M3.js";import{a as s}from"./chunk-DUTPQ56Q.js";import{CrossmintApiClient as p}from"@crossmint/common-sdk-base";var l=class n{constructor(t,e,r={}){var a;this.crossmint=t,this.apiClient=e,this.refreshRoute=(a=r.refreshRoute)!=null?a:null}static from(t,e={}){return new n(t,n.defaultApiClient(t),e)}getJwksUri(){return`${this.apiClient.baseUrl}/.well-known/jwks.json`}refreshAuthMaterial(t){return s(this,null,function*(){if(this.refreshRoute!=null)return yield this.refreshFromCustomRoute(t);if(t!=null)return yield this.refresh(t);throw new i("Refresh token missing from parameters")})}refresh(t){return s(this,null,function*(){let e=yield this.apiClient.post(`${o}/refresh`,{body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}});if(!e.ok)throw new i(e.statusText);let r=yield e.json();return{jwt:r.jwt,refreshToken:r.refresh,user:r.user}})}refreshFromCustomRoute(t){return s(this,null,function*(){if(this.refreshRoute==null)throw new Error("Custom refresh route is not set");let e=yield fetch(this.refreshRoute,{method:"POST",body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}}),r=yield e.json();if(!e.ok)throw new i(r.message);return r})}logoutFromDefaultRoute(t){return s(this,null,function*(){return yield this.apiClient.post(`${o}/logout`,{headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh:t})})})}static defaultApiClient(t){return new p(t,{internalConfig:{sdkMetadata:{name:u,version:h}}})}};export{l as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGMVKBAFQcjs = require('./chunk-GMVKBAFQ.cjs');var _chunkN7HN3GFBcjs = require('./chunk-N7HN3GFB.cjs');var _chunk6R7OYJL5cjs = require('./chunk-6R7OYJL5.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var l=class n{constructor(t,e,r={}){var a;this.crossmint=t,this.apiClient=e,this.refreshRoute=(a=r.refreshRoute)!=null?a:null}static from(t,e={}){return new n(t,n.defaultApiClient(t),e)}getJwksUri(){return`${this.apiClient.baseUrl}/.well-known/jwks.json`}refreshAuthMaterial(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){if(this.refreshRoute!=null)return yield this.refreshFromCustomRoute(t);if(t!=null)return yield this.refresh(t);throw new (0, _chunkGMVKBAFQcjs.a)("Refresh token missing from parameters")})}refresh(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){let e=yield this.apiClient.post(`${_chunkN7HN3GFBcjs.d}/refresh`,{body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}});if(!e.ok)throw new (0, _chunkGMVKBAFQcjs.a)(e.statusText);let r=yield e.json();return{jwt:r.jwt,refreshToken:r.refresh,user:r.user}})}refreshFromCustomRoute(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){if(this.refreshRoute==null)throw new Error("Custom refresh route is not set");let e=yield fetch(this.refreshRoute,{method:"POST",body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}}),r=yield e.json();if(!e.ok)throw new (0, _chunkGMVKBAFQcjs.a)(r.message);return r})}logoutFromDefaultRoute(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){return yield this.apiClient.post(`${_chunkN7HN3GFBcjs.d}/logout`,{headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh:t})})})}static defaultApiClient(t){return new (0, _commonsdkbase.CrossmintApiClient)(t,{internalConfig:{sdkMetadata:{name:_chunkN7HN3GFBcjs.b,version:_chunkN7HN3GFBcjs.a}}})}};exports.a = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGMVKBAFQcjs = require('./chunk-GMVKBAFQ.cjs');var _chunkZBQN6ADAcjs = require('./chunk-ZBQN6ADA.cjs');var _chunk6R7OYJL5cjs = require('./chunk-6R7OYJL5.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var l=class n{constructor(t,e,r={}){var a;this.crossmint=t,this.apiClient=e,this.refreshRoute=(a=r.refreshRoute)!=null?a:null}static from(t,e={}){return new n(t,n.defaultApiClient(t),e)}getJwksUri(){return`${this.apiClient.baseUrl}/.well-known/jwks.json`}refreshAuthMaterial(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){if(this.refreshRoute!=null)return yield this.refreshFromCustomRoute(t);if(t!=null)return yield this.refresh(t);throw new (0, _chunkGMVKBAFQcjs.a)("Refresh token missing from parameters")})}refresh(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){let e=yield this.apiClient.post(`${_chunkZBQN6ADAcjs.d}/refresh`,{body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}});if(!e.ok)throw new (0, _chunkGMVKBAFQcjs.a)(e.statusText);let r=yield e.json();return{jwt:r.jwt,refreshToken:r.refresh,user:r.user}})}refreshFromCustomRoute(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){if(this.refreshRoute==null)throw new Error("Custom refresh route is not set");let e=yield fetch(this.refreshRoute,{method:"POST",body:JSON.stringify({refresh:t}),headers:{"Content-Type":"application/json"}}),r=yield e.json();if(!e.ok)throw new (0, _chunkGMVKBAFQcjs.a)(r.message);return r})}logoutFromDefaultRoute(t){return _chunk6R7OYJL5cjs.a.call(void 0, this,null,function*(){return yield this.apiClient.post(`${_chunkZBQN6ADAcjs.d}/logout`,{headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh:t})})})}static defaultApiClient(t){return new (0, _commonsdkbase.CrossmintApiClient)(t,{internalConfig:{sdkMetadata:{name:_chunkZBQN6ADAcjs.b,version:_chunkZBQN6ADAcjs.a}}})}};exports.a = l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var t="@crossmint/common-sdk-auth",e="1.0.30";var c=e,d= exports.b =t,o= exports.c ="2024-09-26",p= exports.d =`api/${o}/session/sdk/auth`,m= exports.e ="crossmint-jwt",a= exports.f ="crossmint-refresh-token";exports.a = c; exports.b = d; exports.c = o; exports.d = p; exports.e = m; exports.f = a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var t="@crossmint/common-sdk-auth",e="1.0.31";var c=e,d= exports.b =t,o= exports.c ="2024-09-26",p= exports.d =`api/${o}/session/sdk/auth`,m= exports.e ="crossmint-jwt",a= exports.f ="crossmint-refresh-token";exports.a = c; exports.b = d; exports.c = o; exports.d = p; exports.e = m; exports.f = a;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-T3DE6MR3.cjs');var _chunkAVI4AQKJcjs = require('./chunk-AVI4AQKJ.cjs');var _chunkPWTD6N4Xcjs = require('./chunk-PWTD6N4X.cjs');require('./chunk-W2LLJPST.cjs');require('./chunk-IFDKINXX.cjs');require('./chunk-LEC76ZOA.cjs');var _chunkGMVKBAFQcjs = require('./chunk-GMVKBAFQ.cjs');require('./chunk-ZSLB6Y6N.cjs');var _chunkN7HN3GFBcjs = require('./chunk-N7HN3GFB.cjs');require('./chunk-6R7OYJL5.cjs');exports.AUTH_SDK_ROOT_ENDPOINT = _chunkN7HN3GFBcjs.d; exports.CROSSMINT_API_VERSION = _chunkN7HN3GFBcjs.c; exports.CrossmintAuth = _chunkPWTD6N4Xcjs.a; exports.CrossmintAuthenticationError = _chunkGMVKBAFQcjs.a; exports.REFRESH_TOKEN_PREFIX = _chunkN7HN3GFBcjs.f; exports.SDK_NAME = _chunkN7HN3GFBcjs.b; exports.SDK_VERSION = _chunkN7HN3GFBcjs.a; exports.SESSION_PREFIX = _chunkN7HN3GFBcjs.e; exports.isEmailValid = _chunkAVI4AQKJcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-T3DE6MR3.cjs');var _chunkAVI4AQKJcjs = require('./chunk-AVI4AQKJ.cjs');var _chunkXD6FLFO2cjs = require('./chunk-XD6FLFO2.cjs');require('./chunk-W2LLJPST.cjs');require('./chunk-IFDKINXX.cjs');require('./chunk-LEC76ZOA.cjs');var _chunkGMVKBAFQcjs = require('./chunk-GMVKBAFQ.cjs');require('./chunk-ZSLB6Y6N.cjs');var _chunkZBQN6ADAcjs = require('./chunk-ZBQN6ADA.cjs');require('./chunk-6R7OYJL5.cjs');exports.AUTH_SDK_ROOT_ENDPOINT = _chunkZBQN6ADAcjs.d; exports.CROSSMINT_API_VERSION = _chunkZBQN6ADAcjs.c; exports.CrossmintAuth = _chunkXD6FLFO2cjs.a; exports.CrossmintAuthenticationError = _chunkGMVKBAFQcjs.a; exports.REFRESH_TOKEN_PREFIX = _chunkZBQN6ADAcjs.f; exports.SDK_NAME = _chunkZBQN6ADAcjs.b; exports.SDK_VERSION = _chunkZBQN6ADAcjs.a; exports.SESSION_PREFIX = _chunkZBQN6ADAcjs.e; exports.isEmailValid = _chunkAVI4AQKJcjs.a;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import"./chunk-UDDCAABA.js";import{a}from"./chunk-3XL5CEDG.js";import{a as x}from"./chunk-LHFL3HY2.js";import"./chunk-VQHFGGR7.js";import"./chunk-ATVCM6P4.js";import"./chunk-LEZ3ABWL.js";import{a as t}from"./chunk-NQMKBUHU.js";import"./chunk-H23FMBUL.js";import{a as o,b as r,c as e,d as f,e as m,f as p}from"./chunk-V4KW4LX4.js";import"./chunk-DUTPQ56Q.js";export{f as AUTH_SDK_ROOT_ENDPOINT,e as CROSSMINT_API_VERSION,x as CrossmintAuth,t as CrossmintAuthenticationError,p as REFRESH_TOKEN_PREFIX,r as SDK_NAME,o as SDK_VERSION,m as SESSION_PREFIX,a as isEmailValid};
1
+ import"./chunk-UDDCAABA.js";import{a}from"./chunk-3XL5CEDG.js";import{a as x}from"./chunk-UBZASKJH.js";import"./chunk-VQHFGGR7.js";import"./chunk-ATVCM6P4.js";import"./chunk-LEZ3ABWL.js";import{a as t}from"./chunk-NQMKBUHU.js";import"./chunk-H23FMBUL.js";import{a as o,b as r,c as e,d as f,e as m,f as p}from"./chunk-TTMEW4M3.js";import"./chunk-DUTPQ56Q.js";export{f as AUTH_SDK_ROOT_ENDPOINT,e as CROSSMINT_API_VERSION,x as CrossmintAuth,t as CrossmintAuthenticationError,p as REFRESH_TOKEN_PREFIX,r as SDK_NAME,o as SDK_VERSION,m as SESSION_PREFIX,a as isEmailValid};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkN7HN3GFBcjs = require('../chunk-N7HN3GFB.cjs');require('../chunk-6R7OYJL5.cjs');exports.AUTH_SDK_ROOT_ENDPOINT = _chunkN7HN3GFBcjs.d; exports.CROSSMINT_API_VERSION = _chunkN7HN3GFBcjs.c; exports.REFRESH_TOKEN_PREFIX = _chunkN7HN3GFBcjs.f; exports.SDK_NAME = _chunkN7HN3GFBcjs.b; exports.SDK_VERSION = _chunkN7HN3GFBcjs.a; exports.SESSION_PREFIX = _chunkN7HN3GFBcjs.e;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZBQN6ADAcjs = require('../chunk-ZBQN6ADA.cjs');require('../chunk-6R7OYJL5.cjs');exports.AUTH_SDK_ROOT_ENDPOINT = _chunkZBQN6ADAcjs.d; exports.CROSSMINT_API_VERSION = _chunkZBQN6ADAcjs.c; exports.REFRESH_TOKEN_PREFIX = _chunkZBQN6ADAcjs.f; exports.SDK_NAME = _chunkZBQN6ADAcjs.b; exports.SDK_VERSION = _chunkZBQN6ADAcjs.a; exports.SESSION_PREFIX = _chunkZBQN6ADAcjs.e;
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"../chunk-V4KW4LX4.js";import"../chunk-DUTPQ56Q.js";export{d as AUTH_SDK_ROOT_ENDPOINT,c as CROSSMINT_API_VERSION,f as REFRESH_TOKEN_PREFIX,b as SDK_NAME,a as SDK_VERSION,e as SESSION_PREFIX};
1
+ import{a,b,c,d,e,f}from"../chunk-TTMEW4M3.js";import"../chunk-DUTPQ56Q.js";export{d as AUTH_SDK_ROOT_ENDPOINT,c as CROSSMINT_API_VERSION,f as REFRESH_TOKEN_PREFIX,b as SDK_NAME,a as SDK_VERSION,e as SESSION_PREFIX};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-T3DE6MR3.cjs');var _chunkAVI4AQKJcjs = require('../chunk-AVI4AQKJ.cjs');var _chunkN7HN3GFBcjs = require('../chunk-N7HN3GFB.cjs');require('../chunk-6R7OYJL5.cjs');exports.AUTH_SDK_ROOT_ENDPOINT = _chunkN7HN3GFBcjs.d; exports.CROSSMINT_API_VERSION = _chunkN7HN3GFBcjs.c; exports.REFRESH_TOKEN_PREFIX = _chunkN7HN3GFBcjs.f; exports.SDK_NAME = _chunkN7HN3GFBcjs.b; exports.SDK_VERSION = _chunkN7HN3GFBcjs.a; exports.SESSION_PREFIX = _chunkN7HN3GFBcjs.e; exports.isEmailValid = _chunkAVI4AQKJcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-T3DE6MR3.cjs');var _chunkAVI4AQKJcjs = require('../chunk-AVI4AQKJ.cjs');var _chunkZBQN6ADAcjs = require('../chunk-ZBQN6ADA.cjs');require('../chunk-6R7OYJL5.cjs');exports.AUTH_SDK_ROOT_ENDPOINT = _chunkZBQN6ADAcjs.d; exports.CROSSMINT_API_VERSION = _chunkZBQN6ADAcjs.c; exports.REFRESH_TOKEN_PREFIX = _chunkZBQN6ADAcjs.f; exports.SDK_NAME = _chunkZBQN6ADAcjs.b; exports.SDK_VERSION = _chunkZBQN6ADAcjs.a; exports.SESSION_PREFIX = _chunkZBQN6ADAcjs.e; exports.isEmailValid = _chunkAVI4AQKJcjs.a;
@@ -1 +1 @@
1
- import"../chunk-UDDCAABA.js";import{a as g}from"../chunk-3XL5CEDG.js";import{a,b,c,d,e,f}from"../chunk-V4KW4LX4.js";import"../chunk-DUTPQ56Q.js";export{d as AUTH_SDK_ROOT_ENDPOINT,c as CROSSMINT_API_VERSION,f as REFRESH_TOKEN_PREFIX,b as SDK_NAME,a as SDK_VERSION,e as SESSION_PREFIX,g as isEmailValid};
1
+ import"../chunk-UDDCAABA.js";import{a as g}from"../chunk-3XL5CEDG.js";import{a,b,c,d,e,f}from"../chunk-TTMEW4M3.js";import"../chunk-DUTPQ56Q.js";export{d as AUTH_SDK_ROOT_ENDPOINT,c as CROSSMINT_API_VERSION,f as REFRESH_TOKEN_PREFIX,b as SDK_NAME,a as SDK_VERSION,e as SESSION_PREFIX,g as isEmailValid};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossmint/common-sdk-auth",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
@@ -18,8 +18,8 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "dependencies": {
21
- "@crossmint/client-sdk-base": "1.4.21",
22
- "@crossmint/common-sdk-base": "0.4.2"
21
+ "@crossmint/client-sdk-base": "1.5.0",
22
+ "@crossmint/common-sdk-base": "0.5.0"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsup",