@serverbench/js 1.3.2 → 1.3.3

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.
Files changed (95) hide show
  1. package/dist/{Serverbench-DND0EZt-.d.cts → Serverbench-BW58oi57.d.cts} +25 -3
  2. package/dist/{Serverbench-RY3pULSg.d.ts → Serverbench-D_fSlEoS.d.ts} +25 -3
  3. package/dist/Serverbench.cjs +1 -1
  4. package/dist/Serverbench.cjs.map +1 -1
  5. package/dist/Serverbench.d.cts +3 -4
  6. package/dist/Serverbench.d.ts +3 -4
  7. package/dist/Serverbench.js +1 -1
  8. package/dist/chunk-7HGM5ZPM.js +2 -0
  9. package/dist/chunk-7HGM5ZPM.js.map +1 -0
  10. package/dist/chunk-HMMCZKLF.js +2 -0
  11. package/dist/chunk-HMMCZKLF.js.map +1 -0
  12. package/dist/chunk-IEVREEFS.js +2 -0
  13. package/dist/chunk-IEVREEFS.js.map +1 -0
  14. package/dist/chunk-LCZRCKQA.js +2 -0
  15. package/dist/chunk-LCZRCKQA.js.map +1 -0
  16. package/dist/chunk-RJMFX6HT.cjs +2 -0
  17. package/dist/chunk-RJMFX6HT.cjs.map +1 -0
  18. package/dist/chunk-RWLT4VJ2.cjs +2 -0
  19. package/dist/{chunk-XN6ARL7Y.cjs.map → chunk-RWLT4VJ2.cjs.map} +1 -1
  20. package/dist/chunk-VEHTQ4ON.cjs +2 -0
  21. package/dist/chunk-VEHTQ4ON.cjs.map +1 -0
  22. package/dist/chunk-X23T3JT7.js +2 -0
  23. package/dist/chunk-X23T3JT7.js.map +1 -0
  24. package/dist/chunk-X3RFL5ZR.cjs +2 -0
  25. package/dist/chunk-X3RFL5ZR.cjs.map +1 -0
  26. package/dist/chunk-XCHNTARB.cjs +2 -0
  27. package/dist/chunk-XCHNTARB.cjs.map +1 -0
  28. package/dist/element/Element.d.cts +3 -4
  29. package/dist/element/Element.d.ts +3 -4
  30. package/dist/index.cjs +1 -1
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +4 -5
  33. package/dist/index.d.ts +4 -5
  34. package/dist/index.js +1 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/store/Store.d.cts +3 -4
  37. package/dist/store/Store.d.ts +3 -4
  38. package/dist/voting/ListingDisplay.cjs +2 -0
  39. package/dist/voting/ListingDisplay.cjs.map +1 -0
  40. package/dist/voting/ListingDisplay.d.cts +16 -0
  41. package/dist/voting/ListingDisplay.d.ts +16 -0
  42. package/dist/voting/ListingDisplay.js +2 -0
  43. package/dist/voting/ListingSiteDisplay.cjs +2 -0
  44. package/dist/voting/ListingSiteDisplay.cjs.map +1 -0
  45. package/dist/voting/ListingSiteDisplay.d.cts +17 -0
  46. package/dist/voting/ListingSiteDisplay.d.ts +17 -0
  47. package/dist/voting/ListingSiteDisplay.js +2 -0
  48. package/dist/voting/Vote.cjs +2 -0
  49. package/dist/voting/Vote.cjs.map +1 -0
  50. package/dist/voting/Vote.d.cts +7 -0
  51. package/dist/voting/Vote.d.ts +7 -0
  52. package/dist/voting/Vote.js +2 -0
  53. package/dist/voting/Voting.cjs +1 -1
  54. package/dist/voting/Voting.cjs.map +1 -1
  55. package/dist/voting/Voting.d.cts +7 -8
  56. package/dist/voting/Voting.d.ts +7 -8
  57. package/dist/voting/Voting.js +1 -1
  58. package/package.json +1 -1
  59. package/dist/chunk-42HPMZJG.js +0 -2
  60. package/dist/chunk-42HPMZJG.js.map +0 -1
  61. package/dist/chunk-D4DWOLC2.cjs +0 -1
  62. package/dist/chunk-D4DWOLC2.cjs.map +0 -1
  63. package/dist/chunk-DKGB4JPC.cjs +0 -2
  64. package/dist/chunk-DKGB4JPC.cjs.map +0 -1
  65. package/dist/chunk-GN4WL4MB.cjs +0 -1
  66. package/dist/chunk-GN4WL4MB.cjs.map +0 -1
  67. package/dist/chunk-IWJCAFMQ.js +0 -2
  68. package/dist/chunk-IWJCAFMQ.js.map +0 -1
  69. package/dist/chunk-M6U7WLRU.js +0 -1
  70. package/dist/chunk-NCLUIQ3S.cjs +0 -1
  71. package/dist/chunk-NCLUIQ3S.cjs.map +0 -1
  72. package/dist/chunk-QWUYHLI5.js +0 -1
  73. package/dist/chunk-T26IOW25.js +0 -1
  74. package/dist/chunk-XN6ARL7Y.cjs +0 -2
  75. package/dist/voting/IListingDisplay.cjs +0 -2
  76. package/dist/voting/IListingDisplay.cjs.map +0 -1
  77. package/dist/voting/IListingDisplay.d.cts +0 -22
  78. package/dist/voting/IListingDisplay.d.ts +0 -22
  79. package/dist/voting/IListingDisplay.js +0 -2
  80. package/dist/voting/IListingDisplay.js.map +0 -1
  81. package/dist/voting/IListingSiteDisplay.cjs +0 -2
  82. package/dist/voting/IListingSiteDisplay.cjs.map +0 -1
  83. package/dist/voting/IListingSiteDisplay.d.cts +0 -15
  84. package/dist/voting/IListingSiteDisplay.d.ts +0 -15
  85. package/dist/voting/IListingSiteDisplay.js +0 -2
  86. package/dist/voting/IListingSiteDisplay.js.map +0 -1
  87. package/dist/voting/IVote.cjs +0 -2
  88. package/dist/voting/IVote.cjs.map +0 -1
  89. package/dist/voting/IVote.d.cts +0 -5
  90. package/dist/voting/IVote.d.ts +0 -5
  91. package/dist/voting/IVote.js +0 -2
  92. package/dist/voting/IVote.js.map +0 -1
  93. /package/dist/{chunk-M6U7WLRU.js.map → voting/ListingDisplay.js.map} +0 -0
  94. /package/dist/{chunk-QWUYHLI5.js.map → voting/ListingSiteDisplay.js.map} +0 -0
  95. /package/dist/{chunk-T26IOW25.js.map → voting/Vote.js.map} +0 -0
@@ -1,5 +1,6 @@
1
- import IListingDisplay from './voting/IListingDisplay.cjs';
2
1
  import Member from './Member.cjs';
2
+ import IListingSettings from './voting/IListingSettings.cjs';
3
+ import ListingSiteDisplay from './voting/ListingSiteDisplay.cjs';
3
4
  import IDiscount from './store/IDiscount.cjs';
4
5
  import ISkuPrice from './store/ISkuPrice.cjs';
5
6
  import IStore from './store/IStore.cjs';
@@ -28,10 +29,27 @@ declare class Store {
28
29
  billing(): Element;
29
30
  }
30
31
 
32
+ declare class ListingDisplay {
33
+ private readonly client;
34
+ readonly id: string;
35
+ readonly hash: string;
36
+ readonly created: Date;
37
+ readonly member: Member;
38
+ readonly primaryCompleted: Date | null;
39
+ readonly primaryNext: Date | null;
40
+ readonly secondaryCompleted: Date | null;
41
+ readonly secondaryNext: Date | null;
42
+ readonly settings: IListingSettings;
43
+ readonly sites: ListingSiteDisplay[];
44
+ constructor(client: Serverbench, id: string, hash: string, created: Date, member: Member, primaryCompleted: Date | null, primaryNext: Date | null, secondaryCompleted: Date | null, secondaryNext: Date | null, settings: IListingSettings, sites: ListingSiteDisplay[]);
45
+ static fromObject(serverbench: Serverbench, obj: any): ListingDisplay;
46
+ subscribe(callback?: (display: ListingDisplay) => void): () => void;
47
+ }
48
+
31
49
  declare class Voting {
32
50
  private readonly client;
33
51
  constructor(client: Serverbench);
34
- get(username: string | null, eid: string | null): Promise<IListingDisplay>;
52
+ get(username: string | null, eid: string | null): Promise<ListingDisplay>;
35
53
  }
36
54
 
37
55
  declare class Serverbench {
@@ -44,8 +62,12 @@ declare class Serverbench {
44
62
  get store(): Store;
45
63
  get voting(): Voting;
46
64
  private fetch;
65
+ socket(action: string, ignoreClose?: boolean): {
66
+ dispose: () => void;
67
+ ws: WebSocket;
68
+ };
47
69
  get(realm: string, url: string): Promise<any>;
48
70
  post(realm: string, url: string, body?: any): Promise<any>;
49
71
  }
50
72
 
51
- export { Element as E, Serverbench as S, Voting as V, Store as a };
73
+ export { Element as E, ListingDisplay as L, Serverbench as S, Voting as V, Store as a };
@@ -1,5 +1,6 @@
1
- import IListingDisplay from './voting/IListingDisplay.js';
2
1
  import Member from './Member.js';
2
+ import IListingSettings from './voting/IListingSettings.js';
3
+ import ListingSiteDisplay from './voting/ListingSiteDisplay.js';
3
4
  import IDiscount from './store/IDiscount.js';
4
5
  import ISkuPrice from './store/ISkuPrice.js';
5
6
  import IStore from './store/IStore.js';
@@ -28,10 +29,27 @@ declare class Store {
28
29
  billing(): Element;
29
30
  }
30
31
 
32
+ declare class ListingDisplay {
33
+ private readonly client;
34
+ readonly id: string;
35
+ readonly hash: string;
36
+ readonly created: Date;
37
+ readonly member: Member;
38
+ readonly primaryCompleted: Date | null;
39
+ readonly primaryNext: Date | null;
40
+ readonly secondaryCompleted: Date | null;
41
+ readonly secondaryNext: Date | null;
42
+ readonly settings: IListingSettings;
43
+ readonly sites: ListingSiteDisplay[];
44
+ constructor(client: Serverbench, id: string, hash: string, created: Date, member: Member, primaryCompleted: Date | null, primaryNext: Date | null, secondaryCompleted: Date | null, secondaryNext: Date | null, settings: IListingSettings, sites: ListingSiteDisplay[]);
45
+ static fromObject(serverbench: Serverbench, obj: any): ListingDisplay;
46
+ subscribe(callback?: (display: ListingDisplay) => void): () => void;
47
+ }
48
+
31
49
  declare class Voting {
32
50
  private readonly client;
33
51
  constructor(client: Serverbench);
34
- get(username: string | null, eid: string | null): Promise<IListingDisplay>;
52
+ get(username: string | null, eid: string | null): Promise<ListingDisplay>;
35
53
  }
36
54
 
37
55
  declare class Serverbench {
@@ -44,8 +62,12 @@ declare class Serverbench {
44
62
  get store(): Store;
45
63
  get voting(): Voting;
46
64
  private fetch;
65
+ socket(action: string, ignoreClose?: boolean): {
66
+ dispose: () => void;
67
+ ws: WebSocket;
68
+ };
47
69
  get(realm: string, url: string): Promise<any>;
48
70
  post(realm: string, url: string, body?: any): Promise<any>;
49
71
  }
50
72
 
51
- export { Element as E, Serverbench as S, Voting as V, Store as a };
73
+ export { Element as E, ListingDisplay as L, Serverbench as S, Voting as V, Store as a };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXN6ARL7Ycjs = require('./chunk-XN6ARL7Y.cjs');require('./chunk-DKGB4JPC.cjs');require('./chunk-EDOIUX46.cjs');require('./chunk-BTEE2PLS.cjs');exports.default = _chunkXN6ARL7Ycjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRWLT4VJ2cjs = require('./chunk-RWLT4VJ2.cjs');require('./chunk-X3RFL5ZR.cjs');require('./chunk-RJMFX6HT.cjs');require('./chunk-VEHTQ4ON.cjs');require('./chunk-XCHNTARB.cjs');require('./chunk-EDOIUX46.cjs');require('./chunk-BTEE2PLS.cjs');exports.default = _chunkRWLT4VJ2cjs.a;
2
2
  //# sourceMappingURL=Serverbench.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\Serverbench.cjs"],"names":[],"mappings":"AAAA,iIAAmC,gCAA6B,gCAA6B,gCAA6B,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\Serverbench.cjs"}
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\Serverbench.cjs"],"names":[],"mappings":"AAAA,iIAAmC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\Serverbench.cjs"}
@@ -1,12 +1,11 @@
1
- export { S as default } from './Serverbench-DND0EZt-.cjs';
2
- import './voting/IListingDisplay.cjs';
1
+ export { S as default } from './Serverbench-BW58oi57.cjs';
3
2
  import './Member.cjs';
4
3
  import './voting/IListingSettings.cjs';
5
4
  import './voting/IListingAmountSettings.cjs';
6
- import './voting/IListingSiteDisplay.cjs';
5
+ import './voting/ListingSiteDisplay.cjs';
7
6
  import './voting/ISiteSetup.cjs';
8
7
  import './voting/ISite.cjs';
9
- import './voting/IVote.cjs';
8
+ import './voting/Vote.cjs';
10
9
  import './store/IDiscount.cjs';
11
10
  import './store/ISkuPrice.cjs';
12
11
  import './store/ICountryCurrency.cjs';
@@ -1,12 +1,11 @@
1
- export { S as default } from './Serverbench-RY3pULSg.js';
2
- import './voting/IListingDisplay.js';
1
+ export { S as default } from './Serverbench-D_fSlEoS.js';
3
2
  import './Member.js';
4
3
  import './voting/IListingSettings.js';
5
4
  import './voting/IListingAmountSettings.js';
6
- import './voting/IListingSiteDisplay.js';
5
+ import './voting/ListingSiteDisplay.js';
7
6
  import './voting/ISiteSetup.js';
8
7
  import './voting/ISite.js';
9
- import './voting/IVote.js';
8
+ import './voting/Vote.js';
10
9
  import './store/IDiscount.js';
11
10
  import './store/ISkuPrice.js';
12
11
  import './store/ICountryCurrency.js';
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-IWJCAFMQ.js";import"./chunk-42HPMZJG.js";import"./chunk-QCKIIGYU.js";import"./chunk-WXZHVORI.js";export{a as default};
1
+ import{a}from"./chunk-X23T3JT7.js";import"./chunk-LCZRCKQA.js";import"./chunk-7HGM5ZPM.js";import"./chunk-IEVREEFS.js";import"./chunk-HMMCZKLF.js";import"./chunk-QCKIIGYU.js";import"./chunk-WXZHVORI.js";export{a as default};
2
2
  //# sourceMappingURL=Serverbench.js.map
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-IEVREEFS.js";var n=class a{constructor(t,e,i,r,s,c,p,m,d,y,o){this.client=t,this.id=e,this.hash=i,this.created=r,this.member=s,this.primaryCompleted=c,this.primaryNext=p,this.secondaryCompleted=m,this.secondaryNext=d,this.settings=y,this.sites=o}static fromObject(t,e){return new a(t,e.id,e.hash,new Date(e.created),e.member,e.primaryCompleted?new Date(e.primaryCompleted):null,e.primaryNext?new Date(e.primaryNext):null,e.secondaryCompleted?new Date(e.secondaryCompleted):null,e.secondaryNext?new Date(e.secondaryNext):null,e.settings,e.sites.map(i=>l.fromObject(i)))}subscribe(t=e=>{}){let{ws:e,dispose:i}=this.client.socket(`listing.display.${this.member.id}`);return e.onmessage=r=>{let s=JSON.parse(r.data);t(a.fromObject(this.client,s))},i}};export{n as a};
2
+ //# sourceMappingURL=chunk-7HGM5ZPM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/voting/ListingDisplay.ts"],"sourcesContent":["import Member from \"../Member.js\"\r\nimport Serverbench from \"../Serverbench.js\"\r\nimport IListingSettings from \"./IListingSettings.js\"\r\nimport ListingSiteDisplay from \"./ListingSiteDisplay.js\"\r\n\r\nexport default class ListingDisplay {\r\n\r\n private readonly client: Serverbench\r\n\r\n public readonly id: string\r\n public readonly hash: string\r\n public readonly created: Date\r\n public readonly member: Member\r\n public readonly primaryCompleted: Date | null\r\n public readonly primaryNext: Date | null\r\n public readonly secondaryCompleted: Date | null\r\n public readonly secondaryNext: Date | null\r\n public readonly settings: IListingSettings\r\n public readonly sites: ListingSiteDisplay[]\r\n\r\n constructor(client: Serverbench, id: string, hash: string, created: Date, member: Member, primaryCompleted: Date | null, primaryNext: Date | null, secondaryCompleted: Date | null, secondaryNext: Date | null, settings: IListingSettings, sites: ListingSiteDisplay[]) {\r\n this.client = client\r\n this.id = id\r\n this.hash = hash\r\n this.created = created\r\n this.member = member\r\n this.primaryCompleted = primaryCompleted\r\n this.primaryNext = primaryNext\r\n this.secondaryCompleted = secondaryCompleted\r\n this.secondaryNext = secondaryNext\r\n this.settings = settings\r\n this.sites = sites\r\n }\r\n\r\n public static fromObject(serverbench: Serverbench, obj: any) {\r\n return new ListingDisplay(\r\n serverbench,\r\n obj.id,\r\n obj.hash,\r\n new Date(obj.created),\r\n obj.member as Member,\r\n obj.primaryCompleted ? new Date(obj.primaryCompleted) : null,\r\n obj.primaryNext ? new Date(obj.primaryNext) : null,\r\n obj.secondaryCompleted ? new Date(obj.secondaryCompleted) : null,\r\n obj.secondaryNext ? new Date(obj.secondaryNext) : null,\r\n obj.settings as IListingSettings,\r\n obj.sites.map((site: any) => ListingSiteDisplay.fromObject(site))\r\n )\r\n }\r\n\r\n public subscribe(callback = (display: ListingDisplay) => { }) {\r\n const { ws, dispose } = this.client.socket(`listing.display.${this.member.id}`)\r\n ws.onmessage = (event) => {\r\n const data = JSON.parse(event.data)\r\n callback(ListingDisplay.fromObject(this.client, data))\r\n }\r\n return dispose\r\n }\r\n}"],"mappings":"wCAKA,IAAqBA,EAArB,MAAqBC,CAAe,CAehC,YAAYC,EAAqBC,EAAYC,EAAcC,EAAeC,EAAgBC,EAA+BC,EAA0BC,EAAiCC,EAA4BC,EAA4BC,EAA6B,CACrQ,KAAK,OAASV,EACd,KAAK,GAAKC,EACV,KAAK,KAAOC,EACZ,KAAK,QAAUC,EACf,KAAK,OAASC,EACd,KAAK,iBAAmBC,EACxB,KAAK,YAAcC,EACnB,KAAK,mBAAqBC,EAC1B,KAAK,cAAgBC,EACrB,KAAK,SAAWC,EAChB,KAAK,MAAQC,CACjB,CAEA,OAAc,WAAWC,EAA0BC,EAAU,CACzD,OAAO,IAAIb,EACPY,EACAC,EAAI,GACJA,EAAI,KACJ,IAAI,KAAKA,EAAI,OAAO,EACpBA,EAAI,OACJA,EAAI,iBAAmB,IAAI,KAAKA,EAAI,gBAAgB,EAAI,KACxDA,EAAI,YAAc,IAAI,KAAKA,EAAI,WAAW,EAAI,KAC9CA,EAAI,mBAAqB,IAAI,KAAKA,EAAI,kBAAkB,EAAI,KAC5DA,EAAI,cAAgB,IAAI,KAAKA,EAAI,aAAa,EAAI,KAClDA,EAAI,SACJA,EAAI,MAAM,IAAKC,GAAcC,EAAmB,WAAWD,CAAI,CAAC,CACpE,CACJ,CAEO,UAAUE,EAAYC,GAA4B,CAAE,EAAG,CAC1D,GAAM,CAAE,GAAAC,EAAI,QAAAC,CAAQ,EAAI,KAAK,OAAO,OAAO,mBAAmB,KAAK,OAAO,EAAE,EAAE,EAC9E,OAAAD,EAAG,UAAaE,GAAU,CACtB,IAAMC,EAAO,KAAK,MAAMD,EAAM,IAAI,EAClCJ,EAAShB,EAAe,WAAW,KAAK,OAAQqB,CAAI,CAAC,CACzD,EACOF,CACX,CACJ","names":["ListingDisplay","_ListingDisplay","client","id","hash","created","member","primaryCompleted","primaryNext","secondaryCompleted","secondaryNext","settings","sites","serverbench","obj","site","ListingSiteDisplay","callback","display","ws","dispose","event","data"]}
@@ -0,0 +1,2 @@
1
+ var l=class t{constructor(e){this.completed=e}static fromObject(e){return new t(e.completed?new Date(e.completed):null)}};export{l as a};
2
+ //# sourceMappingURL=chunk-HMMCZKLF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/voting/Vote.ts"],"sourcesContent":["export default class Vote {\r\n public readonly completed: Date | null\r\n\r\n constructor(completed: Date | null) {\r\n this.completed = completed\r\n }\r\n\r\n public static fromObject(obj: any) {\r\n return new Vote(\r\n obj.completed ? new Date(obj.completed) : null\r\n )\r\n }\r\n}"],"mappings":"AAAA,IAAqBA,EAArB,MAAqBC,CAAK,CAGtB,YAAYC,EAAwB,CAChC,KAAK,UAAYA,CACrB,CAEA,OAAc,WAAWC,EAAU,CAC/B,OAAO,IAAIF,EACPE,EAAI,UAAY,IAAI,KAAKA,EAAI,SAAS,EAAI,IAC9C,CACJ,CACJ","names":["Vote","_Vote","completed","obj"]}
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-HMMCZKLF.js";var t=class n{constructor(e,i,r,a,u,o,s){this.id=e,this.index=i,this.last=r,this.next=a,this.primary=u,this.secondary=o,this.site=s}static fromObject(e){return new n(e.id,e.index,e.last?l.fromObject(e.last):null,e.next?new Date(e.next):null,e.primary,e.secondary,e.site)}};export{t as a};
2
+ //# sourceMappingURL=chunk-IEVREEFS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/voting/ListingSiteDisplay.ts"],"sourcesContent":["import ISiteSetup from \"./ISiteSetup.js\"\r\nimport Vote from \"./Vote.js\"\r\n\r\nexport default class ListingSiteDisplay {\r\n public readonly id: string\r\n public readonly index: number\r\n public readonly last: Vote | null\r\n public readonly next: Date | null\r\n public readonly primary: boolean\r\n public readonly secondary: boolean\r\n public readonly site: ISiteSetup\r\n\r\n constructor(id: string, index: number, last: Vote | null, next: Date | null, primary: boolean, secondary: boolean, site: ISiteSetup) {\r\n this.id = id\r\n this.index = index\r\n this.last = last\r\n this.next = next\r\n this.primary = primary\r\n this.secondary = secondary\r\n this.site = site\r\n }\r\n\r\n public static fromObject(obj: any) {\r\n return new ListingSiteDisplay(\r\n obj.id,\r\n obj.index,\r\n obj.last ? Vote.fromObject(obj.last) : null,\r\n obj.next ? new Date(obj.next) : null,\r\n obj.primary,\r\n obj.secondary,\r\n obj.site as ISiteSetup\r\n )\r\n }\r\n}"],"mappings":"wCAGA,IAAqBA,EAArB,MAAqBC,CAAmB,CASpC,YAAYC,EAAYC,EAAeC,EAAmBC,EAAmBC,EAAkBC,EAAoBC,EAAkB,CACjI,KAAK,GAAKN,EACV,KAAK,MAAQC,EACb,KAAK,KAAOC,EACZ,KAAK,KAAOC,EACZ,KAAK,QAAUC,EACf,KAAK,UAAYC,EACjB,KAAK,KAAOC,CAChB,CAEA,OAAc,WAAWC,EAAU,CAC/B,OAAO,IAAIR,EACPQ,EAAI,GACJA,EAAI,MACJA,EAAI,KAAOC,EAAK,WAAWD,EAAI,IAAI,EAAI,KACvCA,EAAI,KAAO,IAAI,KAAKA,EAAI,IAAI,EAAI,KAChCA,EAAI,QACJA,EAAI,UACJA,EAAI,IACR,CACJ,CACJ","names":["ListingSiteDisplay","_ListingSiteDisplay","id","index","last","next","primary","secondary","site","obj","Vote"]}
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-7HGM5ZPM.js";var e=class{constructor(t){this.client=t}async get(t,i){return r.fromObject(this.client,await this.client.post("community","/listing/display",{username:t,eid:i}))}};export{e as a};
2
+ //# sourceMappingURL=chunk-LCZRCKQA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/voting/Voting.ts"],"sourcesContent":["import Serverbench from \"../Serverbench.js\"\r\nimport ListingDisplay from \"./ListingDisplay.js\"\r\n\r\nexport default class Voting {\r\n\r\n private readonly client: Serverbench\r\n\r\n constructor(client: Serverbench) {\r\n this.client = client\r\n }\r\n\r\n async get(username: string | null, eid: string | null) {\r\n return ListingDisplay.fromObject(\r\n this.client,\r\n await this.client.post('community', '/listing/display', {\r\n username,\r\n eid\r\n })\r\n )\r\n }\r\n\r\n}"],"mappings":"wCAGA,IAAqBA,EAArB,KAA4B,CAIxB,YAAYC,EAAqB,CAC7B,KAAK,OAASA,CAClB,CAEA,MAAM,IAAIC,EAAyBC,EAAoB,CACnD,OAAOC,EAAe,WAClB,KAAK,OACL,MAAM,KAAK,OAAO,KAAK,YAAa,mBAAoB,CACpD,SAAAF,EACA,IAAAC,CACJ,CAAC,CACL,CACJ,CAEJ","names":["Voting","client","username","eid","ListingDisplay"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVEHTQ4ONcjs = require('./chunk-VEHTQ4ON.cjs');var n=class a{constructor(t,e,i,r,s,c,p,m,d,y,o){this.client=t,this.id=e,this.hash=i,this.created=r,this.member=s,this.primaryCompleted=c,this.primaryNext=p,this.secondaryCompleted=m,this.secondaryNext=d,this.settings=y,this.sites=o}static fromObject(t,e){return new a(t,e.id,e.hash,new Date(e.created),e.member,e.primaryCompleted?new Date(e.primaryCompleted):null,e.primaryNext?new Date(e.primaryNext):null,e.secondaryCompleted?new Date(e.secondaryCompleted):null,e.secondaryNext?new Date(e.secondaryNext):null,e.settings,e.sites.map(i=>_chunkVEHTQ4ONcjs.a.fromObject(i)))}subscribe(t=e=>{}){let{ws:e,dispose:i}=this.client.socket(`listing.display.${this.member.id}`);return e.onmessage=r=>{let s=JSON.parse(r.data);t(a.fromObject(this.client,s))},i}};exports.a = n;
2
+ //# sourceMappingURL=chunk-RJMFX6HT.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-RJMFX6HT.cjs"],"names":[],"mappings":"AAAA,iIAAwC,IAAK,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,mBAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-RJMFX6HT.cjs","sourcesContent":[null]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkX3RFL5ZRcjs = require('./chunk-X3RFL5ZR.cjs');var _chunkEDOIUX46cjs = require('./chunk-EDOIUX46.cjs');var s=class s{constructor(t,n,e){this.clientId=t,this.clientSecret=n,this.test=e}static get(t,n,e=!1){return(!s.instance||s.instance.clientId!==t||s.instance.clientSecret!==n||s.instance.test!==e)&&(s.instance=new s(t,n,e)),s.instance}get store(){return new (0, _chunkEDOIUX46cjs.a)(this)}get voting(){return new (0, _chunkX3RFL5ZRcjs.a)(this)}async fetch(t,n,e){let i=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",r=new Headers({authorization:`ApiKey ${this.clientSecret}`});return e&&r.set("Content-Type","application/json"),(await fetch(`${i}/${t}/${this.clientId}${n}`,{headers:r,method:e?"POST":"GET",body:e?JSON.stringify(e):void 0})).json()}socket(t,n=!1){let e=this.test?"ws://localhost:3030":"wss://stream.beta.serverbench.io",i=new WebSocket(`${e}?${new URLSearchParams({key:this.clientSecret})}`),r=0;return i.onopen=()=>{r=0,i.send(JSON.stringify({action:`community.${this.clientId}.${t}`}))},n||(i.onclose=()=>{r++,setTimeout(()=>{i=this.socket(t,!0).ws},Math.min(1e3*r*5,30*1e3))}),{dispose:()=>{i.onclose=null,i.close()},ws:i}}async get(t,n){return this.fetch(t,n)}async post(t,n,e={}){return this.fetch(t,n,e)}};s.instance=null;var o=s;exports.a = o;
2
+ //# sourceMappingURL=chunk-RWLT4VJ2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-XN6ARL7Y.cjs"],"names":[],"mappings":"AAAA,iIAAwC,wDAAoC,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,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-XN6ARL7Y.cjs","sourcesContent":[null]}
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-RWLT4VJ2.cjs"],"names":[],"mappings":"AAAA,iIAAmC,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,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-RWLT4VJ2.cjs","sourcesContent":[null]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXCHNTARBcjs = require('./chunk-XCHNTARB.cjs');var t=class n{constructor(e,i,r,a,u,o,s){this.id=e,this.index=i,this.last=r,this.next=a,this.primary=u,this.secondary=o,this.site=s}static fromObject(e){return new n(e.id,e.index,e.last?_chunkXCHNTARBcjs.a.fromObject(e.last):null,e.next?new Date(e.next):null,e.primary,e.secondary,e.site)}};exports.a = t;
2
+ //# sourceMappingURL=chunk-VEHTQ4ON.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-VEHTQ4ON.cjs"],"names":[],"mappings":"AAAA,iIAAwC,IAAK,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-VEHTQ4ON.cjs","sourcesContent":[null]}
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-LCZRCKQA.js";import{a as c}from"./chunk-QCKIIGYU.js";var s=class s{constructor(t,n,e){this.clientId=t,this.clientSecret=n,this.test=e}static get(t,n,e=!1){return(!s.instance||s.instance.clientId!==t||s.instance.clientSecret!==n||s.instance.test!==e)&&(s.instance=new s(t,n,e)),s.instance}get store(){return new c(this)}get voting(){return new a(this)}async fetch(t,n,e){let i=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",r=new Headers({authorization:`ApiKey ${this.clientSecret}`});return e&&r.set("Content-Type","application/json"),(await fetch(`${i}/${t}/${this.clientId}${n}`,{headers:r,method:e?"POST":"GET",body:e?JSON.stringify(e):void 0})).json()}socket(t,n=!1){let e=this.test?"ws://localhost:3030":"wss://stream.beta.serverbench.io",i=new WebSocket(`${e}?${new URLSearchParams({key:this.clientSecret})}`),r=0;return i.onopen=()=>{r=0,i.send(JSON.stringify({action:`community.${this.clientId}.${t}`}))},n||(i.onclose=()=>{r++,setTimeout(()=>{i=this.socket(t,!0).ws},Math.min(1e3*r*5,30*1e3))}),{dispose:()=>{i.onclose=null,i.close()},ws:i}}async get(t,n){return this.fetch(t,n)}async post(t,n,e={}){return this.fetch(t,n,e)}};s.instance=null;var o=s;export{o as a};
2
+ //# sourceMappingURL=chunk-X23T3JT7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Serverbench.ts"],"sourcesContent":["import Store from \"./store/Store.js\"\r\nimport Voting from \"./voting/Voting.js\"\r\n\r\nexport default class Serverbench {\r\n\r\n clientId: string\r\n clientSecret: string\r\n test: boolean\r\n\r\n private static instance: Serverbench | null = null\r\n\r\n private constructor(clientId: string, clientSecret: string, test: boolean) {\r\n this.clientId = clientId\r\n this.clientSecret = clientSecret\r\n this.test = test\r\n }\r\n\r\n static get(clientId: string, clientSecret: string, test: boolean = false) {\r\n if (!Serverbench.instance || Serverbench.instance.clientId !== clientId || Serverbench.instance.clientSecret !== clientSecret || Serverbench.instance.test !== test) {\r\n Serverbench.instance = new Serverbench(clientId, clientSecret, test)\r\n }\r\n return Serverbench.instance\r\n }\r\n\r\n get store() {\r\n return new Store(this)\r\n }\r\n\r\n get voting() {\r\n return new Voting(this)\r\n }\r\n\r\n private async fetch(realm: string, url: string, body?: any) {\r\n const domain = this.test ? 'https://dev.serverbench.io' : 'https://api.beta.serverbench.io'\r\n const headers = new Headers({\r\n authorization: `ApiKey ${this.clientSecret}`,\r\n })\r\n if (body) {\r\n headers.set('Content-Type', 'application/json')\r\n }\r\n const response = await fetch(`${domain}/${realm}/${this.clientId}${url}`, {\r\n headers,\r\n method: body ? 'POST' : 'GET',\r\n body: body ? JSON.stringify(body) : undefined\r\n })\r\n return response.json()\r\n }\r\n\r\n public socket(action: string, ignoreClose = false) {\r\n const domain = this.test ? 'ws://localhost:3030' : 'wss://stream.beta.serverbench.io'\r\n let ws = new WebSocket(`${domain}?${new URLSearchParams({\r\n key: this.clientSecret,\r\n })}`)\r\n let i = 0\r\n ws.onopen = () => {\r\n i = 0\r\n ws.send(JSON.stringify({\r\n action: `community.${this.clientId}.${action}`,\r\n }))\r\n }\r\n if (!ignoreClose) {\r\n ws.onclose = () => {\r\n i++\r\n setTimeout(() => {\r\n ws = this.socket(action, true).ws\r\n }, Math.min(1000 * (i) * 5, 30 * 1000));\r\n }\r\n }\r\n return {\r\n dispose: () => {\r\n ws.onclose = null\r\n ws.close()\r\n },\r\n ws\r\n }\r\n }\r\n\r\n async get(realm: string, url: string) {\r\n return this.fetch(realm, url)\r\n }\r\n\r\n async post(realm: string, url: string, body: any = {}) {\r\n return this.fetch(realm, url, body)\r\n }\r\n\r\n}"],"mappings":"2EAGA,IAAqBA,EAArB,MAAqBA,CAAY,CAQrB,YAAYC,EAAkBC,EAAsBC,EAAe,CACvE,KAAK,SAAWF,EAChB,KAAK,aAAeC,EACpB,KAAK,KAAOC,CAChB,CAEA,OAAO,IAAIF,EAAkBC,EAAsBC,EAAgB,GAAO,CACtE,OAAI,CAACH,EAAY,UAAYA,EAAY,SAAS,WAAaC,GAAYD,EAAY,SAAS,eAAiBE,GAAgBF,EAAY,SAAS,OAASG,KAC3JH,EAAY,SAAW,IAAIA,EAAYC,EAAUC,EAAcC,CAAI,GAEhEH,EAAY,QACvB,CAEA,IAAI,OAAQ,CACR,OAAO,IAAII,EAAM,IAAI,CACzB,CAEA,IAAI,QAAS,CACT,OAAO,IAAIC,EAAO,IAAI,CAC1B,CAEA,MAAc,MAAMC,EAAeC,EAAaC,EAAY,CACxD,IAAMC,EAAS,KAAK,KAAO,6BAA+B,kCACpDC,EAAU,IAAI,QAAQ,CACxB,cAAe,UAAU,KAAK,YAAY,EAC9C,CAAC,EACD,OAAIF,GACAE,EAAQ,IAAI,eAAgB,kBAAkB,GAEjC,MAAM,MAAM,GAAGD,CAAM,IAAIH,CAAK,IAAI,KAAK,QAAQ,GAAGC,CAAG,GAAI,CACtE,QAAAG,EACA,OAAQF,EAAO,OAAS,MACxB,KAAMA,EAAO,KAAK,UAAUA,CAAI,EAAI,MACxC,CAAC,GACe,KAAK,CACzB,CAEO,OAAOG,EAAgBC,EAAc,GAAO,CAC/C,IAAMH,EAAS,KAAK,KAAO,sBAAwB,mCAC/CI,EAAK,IAAI,UAAU,GAAGJ,CAAM,IAAI,IAAI,gBAAgB,CACpD,IAAK,KAAK,YACd,CAAC,CAAC,EAAE,EACAK,EAAI,EACR,OAAAD,EAAG,OAAS,IAAM,CACdC,EAAI,EACJD,EAAG,KAAK,KAAK,UAAU,CACnB,OAAQ,aAAa,KAAK,QAAQ,IAAIF,CAAM,EAChD,CAAC,CAAC,CACN,EACKC,IACDC,EAAG,QAAU,IAAM,CACfC,IACA,WAAW,IAAM,CACbD,EAAK,KAAK,OAAOF,EAAQ,EAAI,EAAE,EACnC,EAAG,KAAK,IAAI,IAAQG,EAAK,EAAG,GAAK,GAAI,CAAC,CAC1C,GAEG,CACH,QAAS,IAAM,CACXD,EAAG,QAAU,KACbA,EAAG,MAAM,CACb,EACA,GAAAA,CACJ,CACJ,CAEA,MAAM,IAAIP,EAAeC,EAAa,CAClC,OAAO,KAAK,MAAMD,EAAOC,CAAG,CAChC,CAEA,MAAM,KAAKD,EAAeC,EAAaC,EAAY,CAAC,EAAG,CACnD,OAAO,KAAK,MAAMF,EAAOC,EAAKC,CAAI,CACtC,CAEJ,EAlFqBR,EAMF,SAA+B,KANlD,IAAqBe,EAArBf","names":["_Serverbench","clientId","clientSecret","test","Store","Voting","realm","url","body","domain","headers","action","ignoreClose","ws","i","Serverbench"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRJMFX6HTcjs = require('./chunk-RJMFX6HT.cjs');var e=class{constructor(t){this.client=t}async get(t,i){return _chunkRJMFX6HTcjs.a.fromObject(this.client,await this.client.post("community","/listing/display",{username:t,eid:i}))}};exports.a = e;
2
+ //# sourceMappingURL=chunk-X3RFL5ZR.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-X3RFL5ZR.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,mBAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-X3RFL5ZR.cjs","sourcesContent":[null]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var l=class t{constructor(e){this.completed=e}static fromObject(e){return new t(e.completed?new Date(e.completed):null)}};exports.a = l;
2
+ //# sourceMappingURL=chunk-XCHNTARB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-XCHNTARB.cjs"],"names":[],"mappings":"AAAA,6EAAI,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-XCHNTARB.cjs","sourcesContent":[null]}
@@ -1,12 +1,11 @@
1
- export { E as default } from '../Serverbench-DND0EZt-.cjs';
2
- import '../voting/IListingDisplay.cjs';
1
+ export { E as default } from '../Serverbench-BW58oi57.cjs';
3
2
  import '../Member.cjs';
4
3
  import '../voting/IListingSettings.cjs';
5
4
  import '../voting/IListingAmountSettings.cjs';
6
- import '../voting/IListingSiteDisplay.cjs';
5
+ import '../voting/ListingSiteDisplay.cjs';
7
6
  import '../voting/ISiteSetup.cjs';
8
7
  import '../voting/ISite.cjs';
9
- import '../voting/IVote.cjs';
8
+ import '../voting/Vote.cjs';
10
9
  import '../store/IDiscount.cjs';
11
10
  import '../store/ISkuPrice.cjs';
12
11
  import '../store/ICountryCurrency.cjs';
@@ -1,12 +1,11 @@
1
- export { E as default } from '../Serverbench-RY3pULSg.js';
2
- import '../voting/IListingDisplay.js';
1
+ export { E as default } from '../Serverbench-D_fSlEoS.js';
3
2
  import '../Member.js';
4
3
  import '../voting/IListingSettings.js';
5
4
  import '../voting/IListingAmountSettings.js';
6
- import '../voting/IListingSiteDisplay.js';
5
+ import '../voting/ListingSiteDisplay.js';
7
6
  import '../voting/ISiteSetup.js';
8
7
  import '../voting/ISite.js';
9
- import '../voting/IVote.js';
8
+ import '../voting/Vote.js';
10
9
  import '../store/IDiscount.js';
11
10
  import '../store/ISkuPrice.js';
12
11
  import '../store/ICountryCurrency.js';
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-GN4WL4MB.cjs');require('./chunk-CJWXGEQN.cjs');require('./chunk-A63AYQ4G.cjs');require('./chunk-NCLUIQ3S.cjs');require('./chunk-OW4YZ724.cjs');require('./chunk-OJYCLEOF.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');require('./chunk-SYLAVD2D.cjs');require('./chunk-D4DWOLC2.cjs');require('./chunk-NRMKMC27.cjs');var _chunkXN6ARL7Ycjs = require('./chunk-XN6ARL7Y.cjs');require('./chunk-DKGB4JPC.cjs');var _chunkEDOIUX46cjs = require('./chunk-EDOIUX46.cjs');var _chunkBTEE2PLScjs = require('./chunk-BTEE2PLS.cjs');require('./chunk-GOVZHEHO.cjs');require('./chunk-D22KLLON.cjs');require('./chunk-UHS7Z46V.cjs');require('./chunk-OVXIHLHV.cjs');var p=_chunkXN6ARL7Ycjs.a;exports.Element = _chunkBTEE2PLScjs.a; exports.Store = _chunkEDOIUX46cjs.a; exports.default = p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-A63AYQ4G.cjs');require('./chunk-OW4YZ724.cjs');require('./chunk-OJYCLEOF.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');require('./chunk-SYLAVD2D.cjs');require('./chunk-CJWXGEQN.cjs');require('./chunk-NRMKMC27.cjs');var _chunkRWLT4VJ2cjs = require('./chunk-RWLT4VJ2.cjs');require('./chunk-X3RFL5ZR.cjs');var _chunkRJMFX6HTcjs = require('./chunk-RJMFX6HT.cjs');var _chunkVEHTQ4ONcjs = require('./chunk-VEHTQ4ON.cjs');var _chunkXCHNTARBcjs = require('./chunk-XCHNTARB.cjs');var _chunkEDOIUX46cjs = require('./chunk-EDOIUX46.cjs');var _chunkBTEE2PLScjs = require('./chunk-BTEE2PLS.cjs');require('./chunk-GOVZHEHO.cjs');require('./chunk-D22KLLON.cjs');require('./chunk-UHS7Z46V.cjs');require('./chunk-OVXIHLHV.cjs');var u=_chunkRWLT4VJ2cjs.a;exports.Element = _chunkBTEE2PLScjs.a; exports.IListingDisplay = _chunkRJMFX6HTcjs.a; exports.IListingSiteDisplay = _chunkVEHTQ4ONcjs.a; exports.IVote = _chunkXCHNTARBcjs.a; exports.Store = _chunkEDOIUX46cjs.a; exports.default = u;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\index.cjs"],"names":[],"mappings":"AAAA,yGAA4B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,IAAK,CAAC,CAAC,mBAAC,CAAC,gGAA4C","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\index.cjs","sourcesContent":[null]}
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\index.cjs"],"names":[],"mappings":"AAAA,yGAA4B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,IAAK,CAAC,CAAC,mBAAC,CAAC,uOAAqG","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\index.cjs","sourcesContent":[null]}
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-DND0EZt-.cjs';
3
- export { E as Element, a as Store } from './Serverbench-DND0EZt-.cjs';
2
+ import { S as Serverbench } from './Serverbench-BW58oi57.cjs';
3
+ export { E as Element, L as IListingDisplay, a as Store } from './Serverbench-BW58oi57.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';
@@ -9,12 +9,11 @@ export { default as IStore } from './store/IStore.cjs';
9
9
  export { default as IStoreCategory } from './store/IStoreCategory.cjs';
10
10
  export { default as IStoreCategorySet } from './store/IStoreCategorySet.cjs';
11
11
  export { default as IDiscount } from './store/IDiscount.cjs';
12
- export { default as IListingDisplay } from './voting/IListingDisplay.cjs';
13
- export { default as IListingSiteDisplay } from './voting/IListingSiteDisplay.cjs';
12
+ export { default as IListingSiteDisplay } from './voting/ListingSiteDisplay.cjs';
14
13
  export { default as IListingAmountSettings } from './voting/IListingAmountSettings.cjs';
15
14
  export { default as ISite } from './voting/ISite.cjs';
16
15
  export { default as ISiteSetup } from './voting/ISiteSetup.cjs';
17
- export { default as IVote } from './voting/IVote.cjs';
16
+ export { default as IVote } from './voting/Vote.cjs';
18
17
  import './voting/IListingSettings.cjs';
19
18
 
20
19
 
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-RY3pULSg.js';
3
- export { E as Element, a as Store } from './Serverbench-RY3pULSg.js';
2
+ import { S as Serverbench } from './Serverbench-D_fSlEoS.js';
3
+ export { E as Element, L as IListingDisplay, a as Store } from './Serverbench-D_fSlEoS.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';
@@ -9,12 +9,11 @@ export { default as IStore } from './store/IStore.js';
9
9
  export { default as IStoreCategory } from './store/IStoreCategory.js';
10
10
  export { default as IStoreCategorySet } from './store/IStoreCategorySet.js';
11
11
  export { default as IDiscount } from './store/IDiscount.js';
12
- export { default as IListingDisplay } from './voting/IListingDisplay.js';
13
- export { default as IListingSiteDisplay } from './voting/IListingSiteDisplay.js';
12
+ export { default as IListingSiteDisplay } from './voting/ListingSiteDisplay.js';
14
13
  export { default as IListingAmountSettings } from './voting/IListingAmountSettings.js';
15
14
  export { default as ISite } from './voting/ISite.js';
16
15
  export { default as ISiteSetup } from './voting/ISiteSetup.js';
17
- export { default as IVote } from './voting/IVote.js';
16
+ export { default as IVote } from './voting/Vote.js';
18
17
  import './voting/IListingSettings.js';
19
18
 
20
19
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-QWUYHLI5.js";import"./chunk-EMFCL4IX.js";import"./chunk-33DIW7ZK.js";import"./chunk-M6U7WLRU.js";import"./chunk-FI7FAFLX.js";import"./chunk-TGMXZUHQ.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import"./chunk-5YLG7KH6.js";import"./chunk-T26IOW25.js";import"./chunk-4SUKRL6R.js";import{a as r}from"./chunk-IWJCAFMQ.js";import"./chunk-42HPMZJG.js";import{a as t}from"./chunk-QCKIIGYU.js";import{a as o}from"./chunk-WXZHVORI.js";import"./chunk-RY7QEHM4.js";import"./chunk-ZYLLOUW6.js";import"./chunk-AS4B37XA.js";import"./chunk-56HSL4MD.js";var p=r;export{o as Element,t as Store,p as default};
1
+ import"./chunk-33DIW7ZK.js";import"./chunk-FI7FAFLX.js";import"./chunk-TGMXZUHQ.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import"./chunk-5YLG7KH6.js";import"./chunk-EMFCL4IX.js";import"./chunk-4SUKRL6R.js";import{a as r}from"./chunk-X23T3JT7.js";import"./chunk-LCZRCKQA.js";import{a as e}from"./chunk-7HGM5ZPM.js";import{a as i}from"./chunk-IEVREEFS.js";import{a as m}from"./chunk-HMMCZKLF.js";import{a as t}from"./chunk-QCKIIGYU.js";import{a as o}from"./chunk-WXZHVORI.js";import"./chunk-RY7QEHM4.js";import"./chunk-ZYLLOUW6.js";import"./chunk-AS4B37XA.js";import"./chunk-56HSL4MD.js";var u=r;export{o as Element,e as IListingDisplay,i as IListingSiteDisplay,m as IVote,t as Store,u as default};
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import Member from \"./Member.js\";\r\nimport Serverbench from \"./Serverbench.js\";\r\nimport ICountryCurrency from \"./store/ICountryCurrency.js\";\r\nimport ISku from \"./store/ISku.js\";\r\nimport ISkuPerkUsage from \"./store/ISkuPerkUsage.js\";\r\nimport ISkuPrice from \"./store/ISkuPrice.js\";\r\nimport IStore from \"./store/IStore.js\";\r\nimport IStoreCategory from \"./store/IStoreCategory.js\";\r\nimport IStoreCategorySet from \"./store/IStoreCategorySet.js\";\r\nimport Store from \"./store/Store.js\";\r\nimport Element from \"./element/Element.js\"\r\nimport IDiscount from \"./store/IDiscount.js\";\r\nimport IListingDisplay from \"./voting/IListingDisplay.js\";\r\nimport IListingSiteDisplay from \"./voting/IListingSiteDisplay.js\";\r\nimport IListingAmountSettings from \"./voting/IListingAmountSettings.js\";\r\nimport ISite from \"./voting/ISite.js\";\r\nimport ISiteSetup from \"./voting/ISiteSetup.js\";\r\nimport IVote from \"./voting/IVote.js\";\r\n\r\nexport {\r\n Store,\r\n ICountryCurrency,\r\n IDiscount,\r\n ISku,\r\n ISkuPerkUsage,\r\n ISkuPrice,\r\n IStore,\r\n IStoreCategory,\r\n IStoreCategorySet,\r\n}\r\n\r\nexport {\r\n IListingDisplay,\r\n IListingSiteDisplay,\r\n IListingAmountSettings,\r\n ISite,\r\n ISiteSetup,\r\n IVote\r\n}\r\n\r\nexport {\r\n Member\r\n}\r\n\r\nexport {\r\n Element\r\n}\r\n\r\nexport default Serverbench"],"mappings":"wjBAgDA,IAAOA,EAAQC","names":["src_default","Serverbench"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import Member from \"./Member.js\";\r\nimport Serverbench from \"./Serverbench.js\";\r\nimport ICountryCurrency from \"./store/ICountryCurrency.js\";\r\nimport ISku from \"./store/ISku.js\";\r\nimport ISkuPerkUsage from \"./store/ISkuPerkUsage.js\";\r\nimport ISkuPrice from \"./store/ISkuPrice.js\";\r\nimport IStore from \"./store/IStore.js\";\r\nimport IStoreCategory from \"./store/IStoreCategory.js\";\r\nimport IStoreCategorySet from \"./store/IStoreCategorySet.js\";\r\nimport Store from \"./store/Store.js\";\r\nimport Element from \"./element/Element.js\"\r\nimport IDiscount from \"./store/IDiscount.js\";\r\nimport IListingDisplay from \"./voting/ListingDisplay.js\";\r\nimport IListingSiteDisplay from \"./voting/ListingSiteDisplay.js\";\r\nimport IListingAmountSettings from \"./voting/IListingAmountSettings.js\";\r\nimport ISite from \"./voting/ISite.js\";\r\nimport ISiteSetup from \"./voting/ISiteSetup.js\";\r\nimport Vote from \"./voting/Vote.js\";\r\n\r\nexport {\r\n Store,\r\n ICountryCurrency,\r\n IDiscount,\r\n ISku,\r\n ISkuPerkUsage,\r\n ISkuPrice,\r\n IStore,\r\n IStoreCategory,\r\n IStoreCategorySet,\r\n}\r\n\r\nexport {\r\n IListingDisplay,\r\n IListingSiteDisplay,\r\n IListingAmountSettings,\r\n ISite,\r\n ISiteSetup,\r\n Vote as IVote\r\n}\r\n\r\nexport {\r\n Member\r\n}\r\n\r\nexport {\r\n Element\r\n}\r\n\r\nexport default Serverbench"],"mappings":"4lBAgDA,IAAOA,EAAQC","names":["src_default","Serverbench"]}
@@ -1,15 +1,14 @@
1
- export { a as default } from '../Serverbench-DND0EZt-.cjs';
1
+ export { a as default } from '../Serverbench-BW58oi57.cjs';
2
2
  import '../Member.cjs';
3
3
  import './IDiscount.cjs';
4
4
  import './ISkuPrice.cjs';
5
5
  import './IStore.cjs';
6
- import '../voting/IListingDisplay.cjs';
7
6
  import '../voting/IListingSettings.cjs';
8
7
  import '../voting/IListingAmountSettings.cjs';
9
- import '../voting/IListingSiteDisplay.cjs';
8
+ import '../voting/ListingSiteDisplay.cjs';
10
9
  import '../voting/ISiteSetup.cjs';
11
10
  import '../voting/ISite.cjs';
12
- import '../voting/IVote.cjs';
11
+ import '../voting/Vote.cjs';
13
12
  import './ICountryCurrency.cjs';
14
13
  import './IStoreCategory.cjs';
15
14
  import './ISku.cjs';
@@ -1,15 +1,14 @@
1
- export { a as default } from '../Serverbench-RY3pULSg.js';
1
+ export { a as default } from '../Serverbench-D_fSlEoS.js';
2
2
  import '../Member.js';
3
3
  import './IDiscount.js';
4
4
  import './ISkuPrice.js';
5
5
  import './IStore.js';
6
- import '../voting/IListingDisplay.js';
7
6
  import '../voting/IListingSettings.js';
8
7
  import '../voting/IListingAmountSettings.js';
9
- import '../voting/IListingSiteDisplay.js';
8
+ import '../voting/ListingSiteDisplay.js';
10
9
  import '../voting/ISiteSetup.js';
11
10
  import '../voting/ISite.js';
12
- import '../voting/IVote.js';
11
+ import '../voting/Vote.js';
13
12
  import './ICountryCurrency.js';
14
13
  import './IStoreCategory.js';
15
14
  import './ISku.js';
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRJMFX6HTcjs = require('../chunk-RJMFX6HT.cjs');require('../chunk-VEHTQ4ON.cjs');require('../chunk-XCHNTARB.cjs');exports.default = _chunkRJMFX6HTcjs.a;
2
+ //# sourceMappingURL=ListingDisplay.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\ListingDisplay.cjs"],"names":[],"mappings":"AAAA,kIAAoC,iCAA8B,iCAA8B,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\ListingDisplay.cjs"}
@@ -0,0 +1,16 @@
1
+ import '../Member.cjs';
2
+ export { L as default } from '../Serverbench-BW58oi57.cjs';
3
+ import './IListingSettings.cjs';
4
+ import './ListingSiteDisplay.cjs';
5
+ import '../store/IDiscount.cjs';
6
+ import '../store/ISkuPrice.cjs';
7
+ import '../store/ICountryCurrency.cjs';
8
+ import '../store/IStore.cjs';
9
+ import '../store/IStoreCategory.cjs';
10
+ import '../store/ISku.cjs';
11
+ import '../store/ISkuPerkUsage.cjs';
12
+ import '../store/IStoreCategorySet.cjs';
13
+ import './IListingAmountSettings.cjs';
14
+ import './ISiteSetup.cjs';
15
+ import './ISite.cjs';
16
+ import './Vote.cjs';
@@ -0,0 +1,16 @@
1
+ import '../Member.js';
2
+ export { L as default } from '../Serverbench-D_fSlEoS.js';
3
+ import './IListingSettings.js';
4
+ import './ListingSiteDisplay.js';
5
+ import '../store/IDiscount.js';
6
+ import '../store/ISkuPrice.js';
7
+ import '../store/ICountryCurrency.js';
8
+ import '../store/IStore.js';
9
+ import '../store/IStoreCategory.js';
10
+ import '../store/ISku.js';
11
+ import '../store/ISkuPerkUsage.js';
12
+ import '../store/IStoreCategorySet.js';
13
+ import './IListingAmountSettings.js';
14
+ import './ISiteSetup.js';
15
+ import './ISite.js';
16
+ import './Vote.js';
@@ -0,0 +1,2 @@
1
+ import{a}from"../chunk-7HGM5ZPM.js";import"../chunk-IEVREEFS.js";import"../chunk-HMMCZKLF.js";export{a as default};
2
+ //# sourceMappingURL=ListingDisplay.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVEHTQ4ONcjs = require('../chunk-VEHTQ4ON.cjs');require('../chunk-XCHNTARB.cjs');exports.default = _chunkVEHTQ4ONcjs.a;
2
+ //# sourceMappingURL=ListingSiteDisplay.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\ListingSiteDisplay.cjs"],"names":[],"mappings":"AAAA,kIAAoC,iCAA8B,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\ListingSiteDisplay.cjs"}
@@ -0,0 +1,17 @@
1
+ import ISiteSetup from './ISiteSetup.cjs';
2
+ import Vote from './Vote.cjs';
3
+ import './ISite.cjs';
4
+
5
+ declare class ListingSiteDisplay {
6
+ readonly id: string;
7
+ readonly index: number;
8
+ readonly last: Vote | null;
9
+ readonly next: Date | null;
10
+ readonly primary: boolean;
11
+ readonly secondary: boolean;
12
+ readonly site: ISiteSetup;
13
+ constructor(id: string, index: number, last: Vote | null, next: Date | null, primary: boolean, secondary: boolean, site: ISiteSetup);
14
+ static fromObject(obj: any): ListingSiteDisplay;
15
+ }
16
+
17
+ export { ListingSiteDisplay as default };
@@ -0,0 +1,17 @@
1
+ import ISiteSetup from './ISiteSetup.js';
2
+ import Vote from './Vote.js';
3
+ import './ISite.js';
4
+
5
+ declare class ListingSiteDisplay {
6
+ readonly id: string;
7
+ readonly index: number;
8
+ readonly last: Vote | null;
9
+ readonly next: Date | null;
10
+ readonly primary: boolean;
11
+ readonly secondary: boolean;
12
+ readonly site: ISiteSetup;
13
+ constructor(id: string, index: number, last: Vote | null, next: Date | null, primary: boolean, secondary: boolean, site: ISiteSetup);
14
+ static fromObject(obj: any): ListingSiteDisplay;
15
+ }
16
+
17
+ export { ListingSiteDisplay as default };
@@ -0,0 +1,2 @@
1
+ import{a}from"../chunk-IEVREEFS.js";import"../chunk-HMMCZKLF.js";export{a as default};
2
+ //# sourceMappingURL=ListingSiteDisplay.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXCHNTARBcjs = require('../chunk-XCHNTARB.cjs');exports.default = _chunkXCHNTARBcjs.a;
2
+ //# sourceMappingURL=Vote.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\Vote.cjs"],"names":[],"mappings":"AAAA,kIAAoC,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\Vote.cjs"}
@@ -0,0 +1,7 @@
1
+ declare class Vote {
2
+ readonly completed: Date | null;
3
+ constructor(completed: Date | null);
4
+ static fromObject(obj: any): Vote;
5
+ }
6
+
7
+ export { Vote as default };
@@ -0,0 +1,7 @@
1
+ declare class Vote {
2
+ readonly completed: Date | null;
3
+ constructor(completed: Date | null);
4
+ static fromObject(obj: any): Vote;
5
+ }
6
+
7
+ export { Vote as default };
@@ -0,0 +1,2 @@
1
+ import{a}from"../chunk-HMMCZKLF.js";export{a as default};
2
+ //# sourceMappingURL=Vote.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDKGB4JPCcjs = require('../chunk-DKGB4JPC.cjs');exports.default = _chunkDKGB4JPCcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkX3RFL5ZRcjs = require('../chunk-X3RFL5ZR.cjs');require('../chunk-RJMFX6HT.cjs');require('../chunk-VEHTQ4ON.cjs');require('../chunk-XCHNTARB.cjs');exports.default = _chunkX3RFL5ZRcjs.a;
2
2
  //# sourceMappingURL=Voting.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\Voting.cjs"],"names":[],"mappings":"AAAA,kIAAoC,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\Voting.cjs"}
1
+ {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\Voting.cjs"],"names":[],"mappings":"AAAA,kIAAoC,iCAA8B,iCAA8B,iCAA8B,sCAAqB","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\Voting.cjs"}
@@ -1,6 +1,11 @@
1
- export { V as default } from '../Serverbench-DND0EZt-.cjs';
2
- import './IListingDisplay.cjs';
1
+ export { V as default } from '../Serverbench-BW58oi57.cjs';
3
2
  import '../Member.cjs';
3
+ import './IListingSettings.cjs';
4
+ import './IListingAmountSettings.cjs';
5
+ import './ListingSiteDisplay.cjs';
6
+ import './ISiteSetup.cjs';
7
+ import './ISite.cjs';
8
+ import './Vote.cjs';
4
9
  import '../store/IDiscount.cjs';
5
10
  import '../store/ISkuPrice.cjs';
6
11
  import '../store/ICountryCurrency.cjs';
@@ -9,9 +14,3 @@ import '../store/IStoreCategory.cjs';
9
14
  import '../store/ISku.cjs';
10
15
  import '../store/ISkuPerkUsage.cjs';
11
16
  import '../store/IStoreCategorySet.cjs';
12
- import './IListingSettings.cjs';
13
- import './IListingAmountSettings.cjs';
14
- import './IListingSiteDisplay.cjs';
15
- import './ISiteSetup.cjs';
16
- import './ISite.cjs';
17
- import './IVote.cjs';
@@ -1,6 +1,11 @@
1
- export { V as default } from '../Serverbench-RY3pULSg.js';
2
- import './IListingDisplay.js';
1
+ export { V as default } from '../Serverbench-D_fSlEoS.js';
3
2
  import '../Member.js';
3
+ import './IListingSettings.js';
4
+ import './IListingAmountSettings.js';
5
+ import './ListingSiteDisplay.js';
6
+ import './ISiteSetup.js';
7
+ import './ISite.js';
8
+ import './Vote.js';
4
9
  import '../store/IDiscount.js';
5
10
  import '../store/ISkuPrice.js';
6
11
  import '../store/ICountryCurrency.js';
@@ -9,9 +14,3 @@ import '../store/IStoreCategory.js';
9
14
  import '../store/ISku.js';
10
15
  import '../store/ISkuPerkUsage.js';
11
16
  import '../store/IStoreCategorySet.js';
12
- import './IListingSettings.js';
13
- import './IListingAmountSettings.js';
14
- import './IListingSiteDisplay.js';
15
- import './ISiteSetup.js';
16
- import './ISite.js';
17
- import './IVote.js';
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-42HPMZJG.js";export{a as default};
1
+ import{a}from"../chunk-LCZRCKQA.js";import"../chunk-7HGM5ZPM.js";import"../chunk-IEVREEFS.js";import"../chunk-HMMCZKLF.js";export{a as default};
2
2
  //# sourceMappingURL=Voting.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serverbench/js",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +0,0 @@
1
- var i=class{constructor(t){this.client=t}async get(t,r){return await this.client.post("community","/listing/display",{username:t,eid:r})}};export{i as a};
2
- //# sourceMappingURL=chunk-42HPMZJG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/voting/Voting.ts"],"sourcesContent":["import Serverbench from \"../Serverbench.js\"\r\nimport IListingDisplay from \"./IListingDisplay.js\"\r\n\r\nexport default class Voting {\r\n\r\n private readonly client: Serverbench\r\n\r\n constructor(client: Serverbench) {\r\n this.client = client\r\n }\r\n\r\n async get(username: string | null, eid: string | null) {\r\n return (await this.client.post('community', '/listing/display', {\r\n username,\r\n eid\r\n })) as IListingDisplay\r\n }\r\n\r\n}"],"mappings":"AAGA,IAAqBA,EAArB,KAA4B,CAIxB,YAAYC,EAAqB,CAC7B,KAAK,OAASA,CAClB,CAEA,MAAM,IAAIC,EAAyBC,EAAoB,CACnD,OAAQ,MAAM,KAAK,OAAO,KAAK,YAAa,mBAAoB,CAC5D,SAAAD,EACA,IAAAC,CACJ,CAAC,CACL,CAEJ","names":["Voting","client","username","eid"]}
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=chunk-D4DWOLC2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-D4DWOLC2.cjs"],"names":[],"mappings":"AAAA","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-D4DWOLC2.cjs"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var i=class{constructor(t){this.client=t}async get(t,r){return await this.client.post("community","/listing/display",{username:t,eid:r})}};exports.a = i;
2
- //# sourceMappingURL=chunk-DKGB4JPC.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-DKGB4JPC.cjs"],"names":[],"mappings":"AAAA,6EAAI,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,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-DKGB4JPC.cjs","sourcesContent":[null]}
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=chunk-GN4WL4MB.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-GN4WL4MB.cjs"],"names":[],"mappings":"AAAA","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-GN4WL4MB.cjs"}
@@ -1,2 +0,0 @@
1
- import{a as c}from"./chunk-42HPMZJG.js";import{a}from"./chunk-QCKIIGYU.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)}get voting(){return new c(this)}async fetch(e,n,t){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",r=new Headers({authorization:`ApiKey ${this.clientSecret}`});return t&&r.set("Content-Type","application/json"),(await fetch(`${o}/${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-IWJCAFMQ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Serverbench.ts"],"sourcesContent":["import Store from \"./store/Store.js\"\r\nimport Voting from \"./voting/Voting.js\"\r\n\r\nexport default class Serverbench {\r\n\r\n clientId: string\r\n clientSecret: string\r\n test: boolean\r\n\r\n private static instance: Serverbench | null = null\r\n\r\n private constructor(clientId: string, clientSecret: string, test: boolean) {\r\n this.clientId = clientId\r\n this.clientSecret = clientSecret\r\n this.test = test\r\n }\r\n\r\n static get(clientId: string, clientSecret: string, test: boolean = false) {\r\n if (!Serverbench.instance || Serverbench.instance.clientId !== clientId || Serverbench.instance.clientSecret !== clientSecret || Serverbench.instance.test !== test) {\r\n Serverbench.instance = new Serverbench(clientId, clientSecret, test)\r\n }\r\n return Serverbench.instance\r\n }\r\n\r\n get store() {\r\n return new Store(this)\r\n }\r\n\r\n get voting() {\r\n return new Voting(this)\r\n }\r\n\r\n private async fetch(realm: string, url: string, body?: any) {\r\n const domain = this.test ? 'https://dev.serverbench.io' : 'https://api.beta.serverbench.io'\r\n const headers = new Headers({\r\n authorization: `ApiKey ${this.clientSecret}`,\r\n })\r\n if (body) {\r\n headers.set('Content-Type', 'application/json')\r\n }\r\n const response = await fetch(`${domain}/${realm}/${this.clientId}${url}`, {\r\n headers,\r\n method: body ? 'POST' : 'GET',\r\n body: body ? JSON.stringify(body) : undefined\r\n })\r\n return response.json()\r\n }\r\n\r\n async get(realm: string, url: string) {\r\n return this.fetch(realm, url)\r\n }\r\n\r\n async post(realm: string, url: string, body: any = {}) {\r\n return this.fetch(realm, url, body)\r\n }\r\n\r\n}"],"mappings":"2EAGA,IAAqBA,EAArB,MAAqBA,CAAY,CAQrB,YAAYC,EAAkBC,EAAsBC,EAAe,CACvE,KAAK,SAAWF,EAChB,KAAK,aAAeC,EACpB,KAAK,KAAOC,CAChB,CAEA,OAAO,IAAIF,EAAkBC,EAAsBC,EAAgB,GAAO,CACtE,OAAI,CAACH,EAAY,UAAYA,EAAY,SAAS,WAAaC,GAAYD,EAAY,SAAS,eAAiBE,GAAgBF,EAAY,SAAS,OAASG,KAC3JH,EAAY,SAAW,IAAIA,EAAYC,EAAUC,EAAcC,CAAI,GAEhEH,EAAY,QACvB,CAEA,IAAI,OAAQ,CACR,OAAO,IAAII,EAAM,IAAI,CACzB,CAEA,IAAI,QAAS,CACT,OAAO,IAAIC,EAAO,IAAI,CAC1B,CAEA,MAAc,MAAMC,EAAeC,EAAaC,EAAY,CACxD,IAAMC,EAAS,KAAK,KAAO,6BAA+B,kCACpDC,EAAU,IAAI,QAAQ,CACxB,cAAe,UAAU,KAAK,YAAY,EAC9C,CAAC,EACD,OAAIF,GACAE,EAAQ,IAAI,eAAgB,kBAAkB,GAEjC,MAAM,MAAM,GAAGD,CAAM,IAAIH,CAAK,IAAI,KAAK,QAAQ,GAAGC,CAAG,GAAI,CACtE,QAAAG,EACA,OAAQF,EAAO,OAAS,MACxB,KAAMA,EAAO,KAAK,UAAUA,CAAI,EAAI,MACxC,CAAC,GACe,KAAK,CACzB,CAEA,MAAM,IAAIF,EAAeC,EAAa,CAClC,OAAO,KAAK,MAAMD,EAAOC,CAAG,CAChC,CAEA,MAAM,KAAKD,EAAeC,EAAaC,EAAY,CAAC,EAAG,CACnD,OAAO,KAAK,MAAMF,EAAOC,EAAKC,CAAI,CACtC,CAEJ,EArDqBR,EAMF,SAA+B,KANlD,IAAqBW,EAArBX","names":["_Serverbench","clientId","clientSecret","test","Store","Voting","realm","url","body","domain","headers","Serverbench"]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-M6U7WLRU.js.map
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=chunk-NCLUIQ3S.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-NCLUIQ3S.cjs"],"names":[],"mappings":"AAAA","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\chunk-NCLUIQ3S.cjs"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-QWUYHLI5.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-T26IOW25.js.map
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDKGB4JPCcjs = require('./chunk-DKGB4JPC.cjs');var _chunkEDOIUX46cjs = require('./chunk-EDOIUX46.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, _chunkEDOIUX46cjs.a)(this)}get voting(){return new (0, _chunkDKGB4JPCcjs.a)(this)}async fetch(e,n,t){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",r=new Headers({authorization:`ApiKey ${this.clientSecret}`});return t&&r.set("Content-Type","application/json"),(await fetch(`${o}/${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-XN6ARL7Y.cjs.map
@@ -1,2 +0,0 @@
1
- "use strict";require('../chunk-D4DWOLC2.cjs');
2
- //# sourceMappingURL=IListingDisplay.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\IListingDisplay.cjs"],"names":[],"mappings":"AAAA,8CAA6B","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\IListingDisplay.cjs"}
@@ -1,22 +0,0 @@
1
- import Member from '../Member.cjs';
2
- import IListingSettings from './IListingSettings.cjs';
3
- import IListingSiteDisplay from './IListingSiteDisplay.cjs';
4
- import './IListingAmountSettings.cjs';
5
- import './ISiteSetup.cjs';
6
- import './ISite.cjs';
7
- import './IVote.cjs';
8
-
9
- interface IListingDisplay {
10
- id: string;
11
- hash: string;
12
- created: Date;
13
- member: Member;
14
- primaryCompleted: Date | null;
15
- primaryNext: Date | null;
16
- secondaryCompleted: Date | null;
17
- secondaryNext: Date | null;
18
- settings: IListingSettings;
19
- sites: IListingSiteDisplay[];
20
- }
21
-
22
- export type { IListingDisplay as default };
@@ -1,22 +0,0 @@
1
- import Member from '../Member.js';
2
- import IListingSettings from './IListingSettings.js';
3
- import IListingSiteDisplay from './IListingSiteDisplay.js';
4
- import './IListingAmountSettings.js';
5
- import './ISiteSetup.js';
6
- import './ISite.js';
7
- import './IVote.js';
8
-
9
- interface IListingDisplay {
10
- id: string;
11
- hash: string;
12
- created: Date;
13
- member: Member;
14
- primaryCompleted: Date | null;
15
- primaryNext: Date | null;
16
- secondaryCompleted: Date | null;
17
- secondaryNext: Date | null;
18
- settings: IListingSettings;
19
- sites: IListingSiteDisplay[];
20
- }
21
-
22
- export type { IListingDisplay as default };
@@ -1,2 +0,0 @@
1
- import"../chunk-T26IOW25.js";
2
- //# sourceMappingURL=IListingDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- "use strict";require('../chunk-GN4WL4MB.cjs');
2
- //# sourceMappingURL=IListingSiteDisplay.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\IListingSiteDisplay.cjs"],"names":[],"mappings":"AAAA,8CAA6B","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\IListingSiteDisplay.cjs"}
@@ -1,15 +0,0 @@
1
- import ISiteSetup from './ISiteSetup.cjs';
2
- import IVote from './IVote.cjs';
3
- import './ISite.cjs';
4
-
5
- interface IListingSiteDisplay {
6
- id: string;
7
- index: number;
8
- last: IVote | null;
9
- next: Date | null;
10
- primary: boolean;
11
- secondary: boolean;
12
- site: ISiteSetup;
13
- }
14
-
15
- export type { IListingSiteDisplay as default };
@@ -1,15 +0,0 @@
1
- import ISiteSetup from './ISiteSetup.js';
2
- import IVote from './IVote.js';
3
- import './ISite.js';
4
-
5
- interface IListingSiteDisplay {
6
- id: string;
7
- index: number;
8
- last: IVote | null;
9
- next: Date | null;
10
- primary: boolean;
11
- secondary: boolean;
12
- site: ISiteSetup;
13
- }
14
-
15
- export type { IListingSiteDisplay as default };
@@ -1,2 +0,0 @@
1
- import"../chunk-QWUYHLI5.js";
2
- //# sourceMappingURL=IListingSiteDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- "use strict";require('../chunk-NCLUIQ3S.cjs');
2
- //# sourceMappingURL=IVote.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\IVote.cjs"],"names":[],"mappings":"AAAA,8CAA6B","file":"C:\\Users\\quique\\Documents\\nominal\\serverbench\\js\\dist\\voting\\IVote.cjs"}
@@ -1,5 +0,0 @@
1
- interface IVote {
2
- completed: Date | null;
3
- }
4
-
5
- export type { IVote as default };
@@ -1,5 +0,0 @@
1
- interface IVote {
2
- completed: Date | null;
3
- }
4
-
5
- export type { IVote as default };
@@ -1,2 +0,0 @@
1
- import"../chunk-M6U7WLRU.js";
2
- //# sourceMappingURL=IVote.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}