@serverbench/js 1.4.4 → 1.4.5
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/{Member-Dn4ZZXNC.d.ts → Member-BEqEp3P5.d.ts} +1 -0
- package/dist/{Member-DRjGpwP5.d.cts → Member-M9xI7pT2.d.cts} +1 -0
- package/dist/Member.d.cts +1 -1
- package/dist/Member.d.ts +1 -1
- 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-J5G6YBKI.js → chunk-5PEVSOHO.js} +2 -2
- package/dist/chunk-A7JERYFB.js +2 -0
- package/dist/chunk-A7JERYFB.js.map +1 -0
- package/dist/chunk-LQCRQR4U.cjs +2 -0
- package/dist/chunk-LQCRQR4U.cjs.map +1 -0
- package/dist/{chunk-BG52LMTK.cjs → chunk-QNLKAFF3.cjs} +2 -2
- package/dist/{chunk-BG52LMTK.cjs.map → chunk-QNLKAFF3.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/dist/store/StoreDisplay.d.cts +1 -1
- package/dist/store/StoreDisplay.d.ts +1 -1
- package/dist/voting/ListingDisplay.d.cts +1 -1
- package/dist/voting/ListingDisplay.d.ts +1 -1
- package/dist/voting/Voting.d.cts +1 -1
- package/dist/voting/Voting.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-3BO45QXB.cjs +0 -2
- package/dist/chunk-3BO45QXB.cjs.map +0 -1
- package/dist/chunk-5PW7OT26.js +0 -2
- package/dist/chunk-5PW7OT26.js.map +0 -1
- /package/dist/{chunk-J5G6YBKI.js.map → chunk-5PEVSOHO.js.map} +0 -0
@@ -36,6 +36,7 @@ declare class Store {
|
|
36
36
|
private client;
|
37
37
|
constructor(client: Serverbench);
|
38
38
|
get(username?: string, eid?: string): Promise<StoreDisplay>;
|
39
|
+
subscriptionCount(): Promise<any>;
|
39
40
|
checkout(prices: ISkuPrice[] | string[], discounts: IDiscount[] | string[], member: Member | string, country: string | null): Element;
|
40
41
|
billing(): Element;
|
41
42
|
}
|
@@ -36,6 +36,7 @@ declare class Store {
|
|
36
36
|
private client;
|
37
37
|
constructor(client: Serverbench);
|
38
38
|
get(username?: string, eid?: string): Promise<StoreDisplay>;
|
39
|
+
subscriptionCount(): Promise<any>;
|
39
40
|
checkout(prices: ISkuPrice[] | string[], discounts: IDiscount[] | string[], member: Member | string, country: string | null): Element;
|
40
41
|
billing(): Element;
|
41
42
|
}
|
package/dist/Member.d.cts
CHANGED
package/dist/Member.d.ts
CHANGED
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 _chunkQNLKAFF3cjs = require('./chunk-QNLKAFF3.cjs');require('./chunk-SR2YAYG2.cjs');require('./chunk-YCFUBZMV.cjs');require('./chunk-VEHTQ4ON.cjs');require('./chunk-XCHNTARB.cjs');require('./chunk-LQCRQR4U.cjs');require('./chunk-UOIX5WSB.cjs');require('./chunk-ZHOZDMQP.cjs');require('./chunk-BTEE2PLS.cjs');exports.default = _chunkQNLKAFF3cjs.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-5PEVSOHO.js";import"./chunk-DH7XPEYC.js";import"./chunk-HJBHNTF4.js";import"./chunk-IEVREEFS.js";import"./chunk-HMMCZKLF.js";import"./chunk-A7JERYFB.js";import"./chunk-DU2INKNJ.js";import"./chunk-TQVGB5FK.js";import"./chunk-WXZHVORI.js";export{a as default};
|
2
2
|
//# sourceMappingURL=Serverbench.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{a as m}from"./chunk-DH7XPEYC.js";import{a as u}from"./chunk-
|
2
|
-
//# sourceMappingURL=chunk-
|
1
|
+
import{a as m}from"./chunk-DH7XPEYC.js";import{a as u}from"./chunk-A7JERYFB.js";import{a as h}from"./chunk-TQVGB5FK.js";var i=class i{constructor(t,e,s){this.clientId=t,this.clientSecret=e,this.test=s}static get(t,e,s=!1){return(!i.instance||i.instance.clientId!==t||i.instance.clientSecret!==e||i.instance.test!==s)&&(i.instance=new i(t,e,s)),i.instance}get store(){return new u(this)}get voting(){return new m(this)}async member(t){return h.fromObject(this,await this.post("community","/member/search",t))}async fetch(t,e,s){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",n=new Headers({authorization:`ApiKey ${this.clientSecret}`});s&&n.set("Content-Type","application/json");let r=await fetch(`${o}/${t}/${this.clientId}${e}`,{headers:n,method:s?"POST":"GET",body:s?JSON.stringify(s):void 0});if(r.status<200||r.status>=300)throw new Error(r.statusText);return r.json()}socket(t,e=o=>{},s=!1){let o=this.test?"ws://localhost:3030":"wss://stream.beta.serverbench.io",n=new WebSocket(`${o}?${new URLSearchParams({key:this.clientSecret})}`),r=0;return n.onopen=()=>{r=0,n.send(JSON.stringify({action:`community.${this.clientId}.${t}`}))},n.onmessage=g=>{let a=JSON.parse(g.data);if(a.result!=null&&(Array.isArray(a.result)&&a.result.length||Object.keys(a.result).length>0))e(a.result);else{let c=[a.realm];a.realm=="community"&&c.push(this.clientId),c.push(a.action),n.send(JSON.stringify({action:c.join(".")}))}},s||(n.onclose=()=>{r++,setTimeout(()=>{n=this.socket(t,e,!0).ws},Math.min(1e3*r*5,30*1e3))}),{dispose:()=>{n.onclose=null,n.close()},ws:n}}async get(t,e){return this.fetch(t,e)}async post(t,e,s={}){return this.fetch(t,e,s)}};i.instance=null;var l=i;export{l as a};
|
2
|
+
//# sourceMappingURL=chunk-5PEVSOHO.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{a as s}from"./chunk-DU2INKNJ.js";import{a as e}from"./chunk-WXZHVORI.js";var o=class{constructor(t){this.client=t}async get(t,n){return s.fromObject(this.client,await this.client.post("community","/store/view",{username:t,eid:n}))}async subscriptionCount(){let{count:t}=await this.client.get("community","/subscription/count");return t}checkout(t,n,r,c){let m=t.map(i=>typeof i=="string"?i:i.id),u=n.map(i=>typeof i=="string"?i:i.id),l=typeof r=="string"?r:r.id;return new e(this.client,"/community/checkout",{prices:m.join(","),discounts:u.join(","),member:l,country:c??void 0})}billing(){return new e(this.client,"/billing")}};export{o as a};
|
2
|
+
//# sourceMappingURL=chunk-A7JERYFB.js.map
|
@@ -0,0 +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 StoreDisplay from \"./StoreDisplay.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 StoreDisplay.fromObject(this.client, await this.client.post('community', '/store/view', {\r\n username,\r\n eid\r\n }))\r\n }\r\n\r\n async subscriptionCount() {\r\n const { count } = await this.client.get('community', '/subscription/count')\r\n return count\r\n }\r\n\r\n checkout(prices: ISkuPrice[] | string[], discounts: IDiscount[] | string[], member: Member | string, country: string | null) {\r\n const finalPrices = prices.map(price => typeof price === 'string' ? price : price.id)\r\n const finalDiscounts = discounts.map(discount => typeof discount === 'string' ? discount : discount.id)\r\n const finalMember = typeof member === 'string' ? member : member.id\r\n return new Element(\r\n this.client,\r\n '/community/checkout',\r\n {\r\n prices: finalPrices.join(','),\r\n discounts: finalDiscounts.join(','),\r\n member: finalMember,\r\n country: country ?? undefined\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":"gFAOA,IAAqBA,EAArB,KAA2B,CAIvB,YAAYC,EAAqB,CAC7B,KAAK,OAASA,CAClB,CAEA,MAAM,IAAIC,EAAmBC,EAAc,CACvC,OAAOC,EAAa,WAAW,KAAK,OAAQ,MAAM,KAAK,OAAO,KAAK,YAAa,cAAe,CAC3F,SAAAF,EACA,IAAAC,CACJ,CAAC,CAAC,CACN,CAEA,MAAM,mBAAoB,CACtB,GAAM,CAAE,MAAAE,CAAM,EAAI,MAAM,KAAK,OAAO,IAAI,YAAa,qBAAqB,EAC1E,OAAOA,CACX,CAEA,SAASC,EAAgCC,EAAmCC,EAAyBC,EAAwB,CACzH,IAAMC,EAAcJ,EAAO,IAAIK,GAAS,OAAOA,GAAU,SAAWA,EAAQA,EAAM,EAAE,EAC9EC,EAAiBL,EAAU,IAAIM,GAAY,OAAOA,GAAa,SAAWA,EAAWA,EAAS,EAAE,EAChGC,EAAc,OAAON,GAAW,SAAWA,EAASA,EAAO,GACjE,OAAO,IAAIO,EACP,KAAK,OACL,sBACA,CACI,OAAQL,EAAY,KAAK,GAAG,EAC5B,UAAWE,EAAe,KAAK,GAAG,EAClC,OAAQE,EACR,QAASL,GAAW,MACxB,CACJ,CACJ,CAEA,SAAU,CACN,OAAO,IAAIM,EAAQ,KAAK,OAAQ,UAAU,CAC9C,CAEJ","names":["Store","client","username","eid","StoreDisplay","count","prices","discounts","member","country","finalPrices","price","finalDiscounts","discount","finalMember","Element"]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkUOIX5WSBcjs = require('./chunk-UOIX5WSB.cjs');var _chunkBTEE2PLScjs = require('./chunk-BTEE2PLS.cjs');var o=class{constructor(t){this.client=t}async get(t,n){return _chunkUOIX5WSBcjs.a.fromObject(this.client,await this.client.post("community","/store/view",{username:t,eid:n}))}async subscriptionCount(){let{count:t}=await this.client.get("community","/subscription/count");return t}checkout(t,n,r,c){let m=t.map(i=>typeof i=="string"?i:i.id),u=n.map(i=>typeof i=="string"?i:i.id),l=typeof r=="string"?r:r.id;return new (0, _chunkBTEE2PLScjs.a)(this.client,"/community/checkout",{prices:m.join(","),discounts:u.join(","),member:l,country:_nullishCoalesce(c, () => (void 0))})}billing(){return new (0, _chunkBTEE2PLScjs.a)(this.client,"/billing")}};exports.a = o;
|
2
|
+
//# sourceMappingURL=chunk-LQCRQR4U.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-LQCRQR4U.cjs"],"names":[],"mappings":"AAAA,qOAAwC,wDAAyC,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,mBAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,IAAI,wBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,kBAAC,CAAC,SAAE,KAAK,GAAC,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-LQCRQR4U.cjs","sourcesContent":[null]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSR2YAYG2cjs = require('./chunk-SR2YAYG2.cjs');var
|
2
|
-
//# sourceMappingURL=chunk-
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSR2YAYG2cjs = require('./chunk-SR2YAYG2.cjs');var _chunkLQCRQR4Ucjs = require('./chunk-LQCRQR4U.cjs');var _chunkZHOZDMQPcjs = require('./chunk-ZHOZDMQP.cjs');var i=class i{constructor(t,e,s){this.clientId=t,this.clientSecret=e,this.test=s}static get(t,e,s=!1){return(!i.instance||i.instance.clientId!==t||i.instance.clientSecret!==e||i.instance.test!==s)&&(i.instance=new i(t,e,s)),i.instance}get store(){return new (0, _chunkLQCRQR4Ucjs.a)(this)}get voting(){return new (0, _chunkSR2YAYG2cjs.a)(this)}async member(t){return _chunkZHOZDMQPcjs.a.fromObject(this,await this.post("community","/member/search",t))}async fetch(t,e,s){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",n=new Headers({authorization:`ApiKey ${this.clientSecret}`});s&&n.set("Content-Type","application/json");let r=await fetch(`${o}/${t}/${this.clientId}${e}`,{headers:n,method:s?"POST":"GET",body:s?JSON.stringify(s):void 0});if(r.status<200||r.status>=300)throw new Error(r.statusText);return r.json()}socket(t,e=o=>{},s=!1){let o=this.test?"ws://localhost:3030":"wss://stream.beta.serverbench.io",n=new WebSocket(`${o}?${new URLSearchParams({key:this.clientSecret})}`),r=0;return n.onopen=()=>{r=0,n.send(JSON.stringify({action:`community.${this.clientId}.${t}`}))},n.onmessage=g=>{let a=JSON.parse(g.data);if(a.result!=null&&(Array.isArray(a.result)&&a.result.length||Object.keys(a.result).length>0))e(a.result);else{let c=[a.realm];a.realm=="community"&&c.push(this.clientId),c.push(a.action),n.send(JSON.stringify({action:c.join(".")}))}},s||(n.onclose=()=>{r++,setTimeout(()=>{n=this.socket(t,e,!0).ws},Math.min(1e3*r*5,30*1e3))}),{dispose:()=>{n.onclose=null,n.close()},ws:n}}async get(t,e){return this.fetch(t,e)}async post(t,e,s={}){return this.fetch(t,e,s)}};i.instance=null;var l=i;exports.a = l;
|
2
|
+
//# sourceMappingURL=chunk-QNLKAFF3.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-QNLKAFF3.cjs"],"names":[],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,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,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,IAAI,wBAAC,CAAC,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,mBAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,iCAAiC,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-QNLKAFF3.cjs","sourcesContent":[null]}
|
package/dist/index.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-A63AYQ4G.cjs');require('./chunk-OW4YZ724.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');require('./chunk-SYLAVD2D.cjs');require('./chunk-CJWXGEQN.cjs');var
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-A63AYQ4G.cjs');require('./chunk-OW4YZ724.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');require('./chunk-SYLAVD2D.cjs');require('./chunk-CJWXGEQN.cjs');var _chunkQNLKAFF3cjs = require('./chunk-QNLKAFF3.cjs');require('./chunk-SR2YAYG2.cjs');var _chunkYCFUBZMVcjs = require('./chunk-YCFUBZMV.cjs');var _chunkVEHTQ4ONcjs = require('./chunk-VEHTQ4ON.cjs');var _chunkXCHNTARBcjs = require('./chunk-XCHNTARB.cjs');require('./chunk-LQCRQR4U.cjs');var _chunkUOIX5WSBcjs = require('./chunk-UOIX5WSB.cjs');var _chunkZHOZDMQPcjs = require('./chunk-ZHOZDMQP.cjs');var _chunkBTEE2PLScjs = require('./chunk-BTEE2PLS.cjs');require('./chunk-GOVZHEHO.cjs');require('./chunk-D22KLLON.cjs');require('./chunk-UHS7Z46V.cjs');require('./chunk-OVXIHLHV.cjs');var g=_chunkQNLKAFF3cjs.a;exports.Element = _chunkBTEE2PLScjs.a; exports.IStore = _chunkUOIX5WSBcjs.a; exports.ListingDisplay = _chunkYCFUBZMVcjs.a; exports.ListingSiteDisplay = _chunkVEHTQ4ONcjs.a; exports.Member = _chunkZHOZDMQPcjs.a; exports.Store = _chunkUOIX5WSBcjs.a; exports.Vote = _chunkXCHNTARBcjs.a; exports.default = g;
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { S as Serverbench } from './Member-
|
2
|
-
export { E as Element, a as IStore, L as ListingDisplay, M as Member, a as Store } from './Member-
|
1
|
+
import { S as Serverbench } from './Member-M9xI7pT2.cjs';
|
2
|
+
export { E as Element, a as IStore, L as ListingDisplay, M as Member, a as Store } from './Member-M9xI7pT2.cjs';
|
3
3
|
export { default as ICountryCurrency } from './store/ICountryCurrency.cjs';
|
4
4
|
export { default as ISku } from './store/ISku.cjs';
|
5
5
|
export { default as ISkuPerkUsage } from './store/ISkuPerkUsage.cjs';
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { S as Serverbench } from './Member-
|
2
|
-
export { E as Element, a as IStore, L as ListingDisplay, M as Member, a as Store } from './Member-
|
1
|
+
import { S as Serverbench } from './Member-BEqEp3P5.js';
|
2
|
+
export { E as Element, a as IStore, L as ListingDisplay, M as Member, a as Store } from './Member-BEqEp3P5.js';
|
3
3
|
export { default as ICountryCurrency } from './store/ICountryCurrency.js';
|
4
4
|
export { default as ISku } from './store/ISku.js';
|
5
5
|
export { default as ISkuPerkUsage } from './store/ISkuPerkUsage.js';
|
package/dist/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import"./chunk-33DIW7ZK.js";import"./chunk-FI7FAFLX.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import"./chunk-5YLG7KH6.js";import"./chunk-EMFCL4IX.js";import{a as r}from"./chunk-
|
1
|
+
import"./chunk-33DIW7ZK.js";import"./chunk-FI7FAFLX.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import"./chunk-5YLG7KH6.js";import"./chunk-EMFCL4IX.js";import{a as r}from"./chunk-5PEVSOHO.js";import"./chunk-DH7XPEYC.js";import{a as p}from"./chunk-HJBHNTF4.js";import{a as e}from"./chunk-IEVREEFS.js";import{a as i}from"./chunk-HMMCZKLF.js";import"./chunk-A7JERYFB.js";import{a as m}from"./chunk-DU2INKNJ.js";import{a as o}from"./chunk-TQVGB5FK.js";import{a as t}from"./chunk-WXZHVORI.js";import"./chunk-RY7QEHM4.js";import"./chunk-ZYLLOUW6.js";import"./chunk-AS4B37XA.js";import"./chunk-56HSL4MD.js";var g=r;export{t as Element,m as IStore,p as ListingDisplay,e as ListingSiteDisplay,o as Member,m as Store,i as Vote,g 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 _chunkLQCRQR4Ucjs = require('../chunk-LQCRQR4U.cjs');require('../chunk-UOIX5WSB.cjs');require('../chunk-ZHOZDMQP.cjs');require('../chunk-BTEE2PLS.cjs');exports.default = _chunkLQCRQR4Ucjs.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-A7JERYFB.js";import"../chunk-DU2INKNJ.js";import"../chunk-TQVGB5FK.js";import"../chunk-WXZHVORI.js";export{a as default};
|
2
2
|
//# sourceMappingURL=Store.js.map
|
package/dist/voting/Voting.d.cts
CHANGED
package/dist/voting/Voting.d.ts
CHANGED
package/package.json
CHANGED
package/dist/chunk-3BO45QXB.cjs
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkUOIX5WSBcjs = require('./chunk-UOIX5WSB.cjs');var _chunkBTEE2PLScjs = require('./chunk-BTEE2PLS.cjs');var o=class{constructor(i){this.client=i}async get(i,e){return _chunkUOIX5WSBcjs.a.fromObject(this.client,await this.client.post("community","/store/view",{username:i,eid:e}))}checkout(i,e,r,c){let m=i.map(t=>typeof t=="string"?t:t.id),l=e.map(t=>typeof t=="string"?t:t.id),u=typeof r=="string"?r:r.id;return new (0, _chunkBTEE2PLScjs.a)(this.client,"/community/checkout",{prices:m.join(","),discounts:l.join(","),member:u,country:_nullishCoalesce(c, () => (void 0))})}billing(){return new (0, _chunkBTEE2PLScjs.a)(this.client,"/billing")}};exports.a = o;
|
2
|
-
//# sourceMappingURL=chunk-3BO45QXB.cjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-3BO45QXB.cjs"],"names":[],"mappings":"AAAA,qOAAwC,wDAAyC,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,mBAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,IAAI,wBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,kBAAC,CAAC,SAAE,KAAK,GAAC,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-3BO45QXB.cjs","sourcesContent":[null]}
|
package/dist/chunk-5PW7OT26.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{a as s}from"./chunk-DU2INKNJ.js";import{a as n}from"./chunk-WXZHVORI.js";var o=class{constructor(i){this.client=i}async get(i,e){return s.fromObject(this.client,await this.client.post("community","/store/view",{username:i,eid:e}))}checkout(i,e,r,c){let m=i.map(t=>typeof t=="string"?t:t.id),l=e.map(t=>typeof t=="string"?t:t.id),u=typeof r=="string"?r:r.id;return new n(this.client,"/community/checkout",{prices:m.join(","),discounts:l.join(","),member:u,country:c??void 0})}billing(){return new n(this.client,"/billing")}};export{o as a};
|
2
|
-
//# sourceMappingURL=chunk-5PW7OT26.js.map
|
@@ -1 +0,0 @@
|
|
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 StoreDisplay from \"./StoreDisplay.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 StoreDisplay.fromObject(this.client, await this.client.post('community', '/store/view', {\r\n username,\r\n eid\r\n }))\r\n }\r\n\r\n checkout(prices: ISkuPrice[] | string[], discounts: IDiscount[] | string[], member: Member | string, country: string | null) {\r\n const finalPrices = prices.map(price => typeof price === 'string' ? price : price.id)\r\n const finalDiscounts = discounts.map(discount => typeof discount === 'string' ? discount : discount.id)\r\n const finalMember = typeof member === 'string' ? member : member.id\r\n return new Element(\r\n this.client,\r\n '/community/checkout',\r\n {\r\n prices: finalPrices.join(','),\r\n discounts: finalDiscounts.join(','),\r\n member: finalMember,\r\n country: country ?? undefined\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":"gFAOA,IAAqBA,EAArB,KAA2B,CAIvB,YAAYC,EAAqB,CAC7B,KAAK,OAASA,CAClB,CAEA,MAAM,IAAIC,EAAmBC,EAAc,CACvC,OAAOC,EAAa,WAAW,KAAK,OAAQ,MAAM,KAAK,OAAO,KAAK,YAAa,cAAe,CAC3F,SAAAF,EACA,IAAAC,CACJ,CAAC,CAAC,CACN,CAEA,SAASE,EAAgCC,EAAmCC,EAAyBC,EAAwB,CACzH,IAAMC,EAAcJ,EAAO,IAAIK,GAAS,OAAOA,GAAU,SAAWA,EAAQA,EAAM,EAAE,EAC9EC,EAAiBL,EAAU,IAAIM,GAAY,OAAOA,GAAa,SAAWA,EAAWA,EAAS,EAAE,EAChGC,EAAc,OAAON,GAAW,SAAWA,EAASA,EAAO,GACjE,OAAO,IAAIO,EACP,KAAK,OACL,sBACA,CACI,OAAQL,EAAY,KAAK,GAAG,EAC5B,UAAWE,EAAe,KAAK,GAAG,EAClC,OAAQE,EACR,QAASL,GAAW,MACxB,CACJ,CACJ,CAEA,SAAU,CACN,OAAO,IAAIM,EAAQ,KAAK,OAAQ,UAAU,CAC9C,CAEJ","names":["Store","client","username","eid","StoreDisplay","prices","discounts","member","country","finalPrices","price","finalDiscounts","discount","finalMember","Element"]}
|
File without changes
|