@techzunction/sdk 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -995,6 +995,48 @@ function createStorefrontHelp(c) {
995
995
  };
996
996
  }
997
997
 
998
+ // src/storefront/rooms.ts
999
+ function createStorefrontRooms(c) {
1000
+ return {
1001
+ create(data) {
1002
+ return c.post("/rooms", data, "enduser");
1003
+ },
1004
+ get(roomId) {
1005
+ return c.get(`/rooms/${roomId}`);
1006
+ },
1007
+ join(roomId, data) {
1008
+ return c.post(`/rooms/${roomId}/join`, data, "enduser");
1009
+ },
1010
+ leave(roomId) {
1011
+ return c.post(`/rooms/${roomId}/leave`, void 0, "enduser");
1012
+ },
1013
+ switchMode(roomId, data) {
1014
+ return c.post(`/rooms/${roomId}/switch-mode`, data, "enduser");
1015
+ },
1016
+ end(roomId) {
1017
+ return c.post(`/rooms/${roomId}/end`, void 0, "enduser");
1018
+ },
1019
+ listLive(params) {
1020
+ return c.paginated("/rooms/live", params);
1021
+ },
1022
+ listForMovie(tmdbId) {
1023
+ return c.get(`/rooms/movie/${tmdbId}`);
1024
+ }
1025
+ };
1026
+ }
1027
+
1028
+ // src/storefront/earnings.ts
1029
+ function createStorefrontEarnings(c) {
1030
+ return {
1031
+ getSummary() {
1032
+ return c.get("/earnings/summary", "enduser");
1033
+ },
1034
+ getHistory(params) {
1035
+ return c.paginated("/earnings/history", params);
1036
+ }
1037
+ };
1038
+ }
1039
+
998
1040
  // src/storefront/index.ts
999
1041
  function createStorefront(c) {
1000
1042
  return {
@@ -1025,7 +1067,9 @@ function createStorefront(c) {
1025
1067
  wallet: createStorefrontWallet(c),
1026
1068
  student: createStorefrontStudent(c),
1027
1069
  mealPlans: createStorefrontMealPlans(c),
1028
- help: createStorefrontHelp(c)
1070
+ help: createStorefrontHelp(c),
1071
+ rooms: createStorefrontRooms(c),
1072
+ earnings: createStorefrontEarnings(c)
1029
1073
  };
1030
1074
  }
1031
1075