@serverbench/js 1.0.12 → 1.1.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.
- package/dist/{Serverbench-C0I-PLPz.d.cts → Serverbench--7Ya5DBE.d.cts} +1 -0
- package/dist/{Serverbench-F_xIsjPx.d.ts → Serverbench-B33LtS86.d.ts} +1 -0
- package/dist/Serverbench.cjs +1 -1
- package/dist/Serverbench.d.cts +1 -1
- package/dist/Serverbench.d.ts +1 -1
- package/dist/Serverbench.js +1 -1
- package/dist/chunk-GJIGM2EQ.js +2 -0
- package/dist/{chunk-AYXTR6VS.js.map → chunk-GJIGM2EQ.js.map} +1 -1
- package/dist/{chunk-TPRTX46A.cjs → chunk-IOGMEK5X.cjs} +2 -2
- package/dist/{chunk-TPRTX46A.cjs.map → chunk-IOGMEK5X.cjs.map} +1 -1
- package/dist/{chunk-SDVIXTUB.js → chunk-TXPV6QKE.js} +2 -2
- package/dist/chunk-UKSSAZYA.cjs +2 -0
- package/dist/{chunk-6CY3WAPA.cjs.map → chunk-UKSSAZYA.cjs.map} +1 -1
- package/dist/element/Element.d.cts +1 -1
- package/dist/element/Element.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/store/Store.cjs +1 -1
- package/dist/store/Store.d.cts +1 -1
- package/dist/store/Store.d.ts +1 -1
- package/dist/store/Store.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6CY3WAPA.cjs +0 -2
- package/dist/chunk-AYXTR6VS.js +0 -2
- /package/dist/{chunk-SDVIXTUB.js.map → chunk-TXPV6QKE.js.map} +0 -0
package/dist/Serverbench.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIOGMEK5Xcjs = require('./chunk-IOGMEK5X.cjs');require('./chunk-UKSSAZYA.cjs');require('./chunk-3CATKKJU.cjs');exports.default = _chunkIOGMEK5Xcjs.a;
|
2
2
|
//# sourceMappingURL=Serverbench.cjs.map
|
package/dist/Serverbench.d.cts
CHANGED
package/dist/Serverbench.d.ts
CHANGED
package/dist/Serverbench.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{a}from"./chunk-
|
1
|
+
import{a}from"./chunk-TXPV6QKE.js";import"./chunk-GJIGM2EQ.js";import"./chunk-2KLRLXUE.js";export{a as default};
|
2
2
|
//# sourceMappingURL=Serverbench.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{a as i}from"./chunk-2KLRLXUE.js";var n=class{constructor(e){this.client=e}async get(e,r){return await this.client.post("community","/store/view",{username:e,eid:r})}checkout(e,r,o){return new i(this.client,"/community/checkout",{prices:e.map(t=>t.id).join(","),discounts:r.map(t=>t.id).join(","),member:o.id})}billing(){return new i(this.client,"/billing")}};export{n as a};
|
2
|
+
//# sourceMappingURL=chunk-GJIGM2EQ.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/store/Store.ts"],"sourcesContent":["import Element from \"../element/Element.js\";\r\nimport Member from \"../Member.js\";\r\nimport type Serverbench from \"../Serverbench.js\";\r\nimport IDiscount from \"./IDiscount.js\";\r\nimport ISkuPrice from \"./ISkuPrice.js\";\r\nimport type IStore from \"./IStore.js\";\r\n\r\nexport default class Store {\r\n\r\n private client: Serverbench\r\n\r\n constructor(client: Serverbench) {\r\n this.client = client\r\n }\r\n\r\n async get(username?: string, eid?: string) {\r\n return (await this.client.post('community', '/store/view', {\r\n username,\r\n eid\r\n })) as IStore\r\n }\r\n\r\n checkout(prices: ISkuPrice[], discounts: IDiscount[], member: Member) {\r\n return new Element(\r\n this.client,\r\n '/community/checkout',\r\n {\r\n prices: prices.map(price => price.id).join(','),\r\n discounts: discounts.map(discount => discount.id).join(','),\r\n member: member.id\r\n }\r\n )\r\n }\r\n\r\n}"],"mappings":"wCAOA,IAAqBA,EAArB,KAA2B,CAIvB,YAAYC,EAAqB,CAC7B,KAAK,OAASA,CAClB,CAEA,MAAM,IAAIC,EAAmBC,EAAc,CACvC,OAAQ,MAAM,KAAK,OAAO,KAAK,YAAa,cAAe,CACvD,SAAAD,EACA,IAAAC,CACJ,CAAC,CACL,CAEA,SAASC,EAAqBC,EAAwBC,EAAgB,CAClE,OAAO,IAAIC,EACP,KAAK,OACL,sBACA,CACI,OAAQH,EAAO,IAAII,GAASA,EAAM,EAAE,EAAE,KAAK,GAAG,EAC9C,UAAWH,EAAU,IAAII,GAAYA,EAAS,EAAE,EAAE,KAAK,GAAG,EAC1D,OAAQH,EAAO,EACnB,CACJ,CACJ,CAEJ","names":["Store","client","username","eid","prices","discounts","member","Element","price","discount"]}
|
1
|
+
{"version":3,"sources":["../src/store/Store.ts"],"sourcesContent":["import Element from \"../element/Element.js\";\r\nimport Member from \"../Member.js\";\r\nimport type Serverbench from \"../Serverbench.js\";\r\nimport IDiscount from \"./IDiscount.js\";\r\nimport ISkuPrice from \"./ISkuPrice.js\";\r\nimport type IStore from \"./IStore.js\";\r\n\r\nexport default class Store {\r\n\r\n private client: Serverbench\r\n\r\n constructor(client: Serverbench) {\r\n this.client = client\r\n }\r\n\r\n async get(username?: string, eid?: string) {\r\n return (await this.client.post('community', '/store/view', {\r\n username,\r\n eid\r\n })) as IStore\r\n }\r\n\r\n checkout(prices: ISkuPrice[], discounts: IDiscount[], member: Member) {\r\n return new Element(\r\n this.client,\r\n '/community/checkout',\r\n {\r\n prices: prices.map(price => price.id).join(','),\r\n discounts: discounts.map(discount => discount.id).join(','),\r\n member: member.id\r\n }\r\n )\r\n }\r\n\r\n billing() {\r\n return new Element(this.client, '/billing')\r\n }\r\n\r\n}"],"mappings":"wCAOA,IAAqBA,EAArB,KAA2B,CAIvB,YAAYC,EAAqB,CAC7B,KAAK,OAASA,CAClB,CAEA,MAAM,IAAIC,EAAmBC,EAAc,CACvC,OAAQ,MAAM,KAAK,OAAO,KAAK,YAAa,cAAe,CACvD,SAAAD,EACA,IAAAC,CACJ,CAAC,CACL,CAEA,SAASC,EAAqBC,EAAwBC,EAAgB,CAClE,OAAO,IAAIC,EACP,KAAK,OACL,sBACA,CACI,OAAQH,EAAO,IAAII,GAASA,EAAM,EAAE,EAAE,KAAK,GAAG,EAC9C,UAAWH,EAAU,IAAII,GAAYA,EAAS,EAAE,EAAE,KAAK,GAAG,EAC1D,OAAQH,EAAO,EACnB,CACJ,CACJ,CAEA,SAAU,CACN,OAAO,IAAIC,EAAQ,KAAK,OAAQ,UAAU,CAC9C,CAEJ","names":["Store","client","username","eid","prices","discounts","member","Element","price","discount"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
2
|
-
//# sourceMappingURL=chunk-
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUKSSAZYAcjs = require('./chunk-UKSSAZYA.cjs');var s=class s{constructor(e,n,t){this.clientId=e,this.clientSecret=n,this.test=t}static get(e,n,t=!1){return(!s.instance||s.instance.clientId!==e||s.instance.clientSecret!==n||s.instance.test!==t)&&(s.instance=new s(e,n,t)),s.instance}get store(){return new (0, _chunkUKSSAZYAcjs.a)(this)}async fetch(e,n,t){let c=this.test?"https://dev.serverbench.io":"https://api.serverbench.io",r=new Headers({authorization:`ApiKey ${this.clientSecret}`});return t&&r.set("Content-Type","application/json"),(await fetch(`${c}/${e}/${this.clientId}${n}`,{headers:r,method:t?"POST":"GET",body:t?JSON.stringify(t):void 0})).json()}async get(e,n){return this.fetch(e,n)}async post(e,n,t={}){return this.fetch(e,n,t)}};s.instance=null;var i=s;exports.a = i;
|
2
|
+
//# sourceMappingURL=chunk-IOGMEK5X.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-
|
1
|
+
{"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-IOGMEK5X.cjs"],"names":[],"mappings":"AAAA,iIAAmC,IAAK,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,OAAO,IAAI,wBAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,4BAA4B,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-IOGMEK5X.cjs","sourcesContent":[null]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{a}from"./chunk-
|
2
|
-
//# sourceMappingURL=chunk-
|
1
|
+
import{a}from"./chunk-GJIGM2EQ.js";var s=class s{constructor(e,n,t){this.clientId=e,this.clientSecret=n,this.test=t}static get(e,n,t=!1){return(!s.instance||s.instance.clientId!==e||s.instance.clientSecret!==n||s.instance.test!==t)&&(s.instance=new s(e,n,t)),s.instance}get store(){return new a(this)}async fetch(e,n,t){let c=this.test?"https://dev.serverbench.io":"https://api.serverbench.io",r=new Headers({authorization:`ApiKey ${this.clientSecret}`});return t&&r.set("Content-Type","application/json"),(await fetch(`${c}/${e}/${this.clientId}${n}`,{headers:r,method:t?"POST":"GET",body:t?JSON.stringify(t):void 0})).json()}async get(e,n){return this.fetch(e,n)}async post(e,n,t={}){return this.fetch(e,n,t)}};s.instance=null;var i=s;export{i as a};
|
2
|
+
//# sourceMappingURL=chunk-TXPV6QKE.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3CATKKJUcjs = require('./chunk-3CATKKJU.cjs');var n=class{constructor(e){this.client=e}async get(e,r){return await this.client.post("community","/store/view",{username:e,eid:r})}checkout(e,r,o){return new (0, _chunk3CATKKJUcjs.a)(this.client,"/community/checkout",{prices:e.map(t=>t.id).join(","),discounts:r.map(t=>t.id).join(","),member:o.id})}billing(){return new (0, _chunk3CATKKJUcjs.a)(this.client,"/billing")}};exports.a = n;
|
2
|
+
//# sourceMappingURL=chunk-UKSSAZYA.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-
|
1
|
+
{"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-UKSSAZYA.cjs"],"names":[],"mappings":"AAAA,iIAAwC,IAAK,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,wBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,wBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,cAAc","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-UKSSAZYA.cjs","sourcesContent":[null]}
|
package/dist/index.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-OW4YZ724.cjs');require('./chunk-OJYCLEOF.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');require('./chunk-NRMKMC27.cjs');var
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-OW4YZ724.cjs');require('./chunk-OJYCLEOF.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');require('./chunk-NRMKMC27.cjs');var _chunkIOGMEK5Xcjs = require('./chunk-IOGMEK5X.cjs');var _chunkUKSSAZYAcjs = require('./chunk-UKSSAZYA.cjs');var _chunk3CATKKJUcjs = require('./chunk-3CATKKJU.cjs');require('./chunk-GOVZHEHO.cjs');require('./chunk-D22KLLON.cjs');require('./chunk-UHS7Z46V.cjs');require('./chunk-OVXIHLHV.cjs');var i=_chunkIOGMEK5Xcjs.a;exports.Element = _chunk3CATKKJUcjs.a; exports.Store = _chunkUKSSAZYAcjs.a; exports.default = i;
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as Member } from './Member.cjs';
|
2
|
-
import { S as Serverbench } from './Serverbench
|
3
|
-
export { E as Element, a as Store } from './Serverbench
|
2
|
+
import { S as Serverbench } from './Serverbench--7Ya5DBE.cjs';
|
3
|
+
export { E as Element, a as Store } from './Serverbench--7Ya5DBE.cjs';
|
4
4
|
export { default as ICountryCurrency } from './store/ICountryCurrency.cjs';
|
5
5
|
export { default as ISku } from './store/ISku.cjs';
|
6
6
|
export { default as ISkuPerkUsage } from './store/ISkuPerkUsage.cjs';
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as Member } from './Member.js';
|
2
|
-
import { S as Serverbench } from './Serverbench-
|
3
|
-
export { E as Element, a as Store } from './Serverbench-
|
2
|
+
import { S as Serverbench } from './Serverbench-B33LtS86.js';
|
3
|
+
export { E as Element, a as Store } from './Serverbench-B33LtS86.js';
|
4
4
|
export { default as ICountryCurrency } from './store/ICountryCurrency.js';
|
5
5
|
export { default as ISku } from './store/ISku.js';
|
6
6
|
export { default as ISkuPerkUsage } from './store/ISkuPerkUsage.js';
|
package/dist/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import"./chunk-FI7FAFLX.js";import"./chunk-TGMXZUHQ.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import"./chunk-4SUKRL6R.js";import{a as r}from"./chunk-
|
1
|
+
import"./chunk-FI7FAFLX.js";import"./chunk-TGMXZUHQ.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import"./chunk-4SUKRL6R.js";import{a as r}from"./chunk-TXPV6QKE.js";import{a as t}from"./chunk-GJIGM2EQ.js";import{a as o}from"./chunk-2KLRLXUE.js";import"./chunk-RY7QEHM4.js";import"./chunk-ZYLLOUW6.js";import"./chunk-AS4B37XA.js";import"./chunk-56HSL4MD.js";var i=r;export{o as Element,t as Store,i as default};
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/store/Store.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUKSSAZYAcjs = require('../chunk-UKSSAZYA.cjs');require('../chunk-3CATKKJU.cjs');exports.default = _chunkUKSSAZYAcjs.a;
|
2
2
|
//# sourceMappingURL=Store.cjs.map
|
package/dist/store/Store.d.cts
CHANGED
package/dist/store/Store.d.ts
CHANGED
package/dist/store/Store.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{a}from"../chunk-
|
1
|
+
import{a}from"../chunk-GJIGM2EQ.js";import"../chunk-2KLRLXUE.js";export{a as default};
|
2
2
|
//# sourceMappingURL=Store.js.map
|
package/package.json
CHANGED
package/dist/chunk-6CY3WAPA.cjs
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3CATKKJUcjs = require('./chunk-3CATKKJU.cjs');var i=class{constructor(e){this.client=e}async get(e,r){return await this.client.post("community","/store/view",{username:e,eid:r})}checkout(e,r,c){return new (0, _chunk3CATKKJUcjs.a)(this.client,"/community/checkout",{prices:e.map(t=>t.id).join(","),discounts:r.map(t=>t.id).join(","),member:c.id})}};exports.a = i;
|
2
|
-
//# sourceMappingURL=chunk-6CY3WAPA.cjs.map
|
package/dist/chunk-AYXTR6VS.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{a as o}from"./chunk-2KLRLXUE.js";var i=class{constructor(e){this.client=e}async get(e,r){return await this.client.post("community","/store/view",{username:e,eid:r})}checkout(e,r,c){return new o(this.client,"/community/checkout",{prices:e.map(t=>t.id).join(","),discounts:r.map(t=>t.id).join(","),member:c.id})}};export{i as a};
|
2
|
-
//# sourceMappingURL=chunk-AYXTR6VS.js.map
|
File without changes
|