@techzunction/sdk 0.1.1 → 0.3.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
@@ -861,6 +861,23 @@ function createStorefrontMovies(c) {
861
861
  buy(id) {
862
862
  return c.post(`/movies/${id}/buy`, void 0, "enduser");
863
863
  },
864
+ // ─── PPM Watch Sessions ──────────────────────────────────────────
865
+ startSession(tmdbId, data) {
866
+ return c.post(`/movies/${tmdbId}/start-session`, data, "enduser");
867
+ },
868
+ getSessionStatus(sessionId) {
869
+ return c.get(`/movies/session/${sessionId}/status`, "enduser");
870
+ },
871
+ pauseSession(sessionId) {
872
+ return c.post(`/movies/session/${sessionId}/pause`, void 0, "enduser");
873
+ },
874
+ resumeSession(sessionId) {
875
+ return c.post(`/movies/session/${sessionId}/resume`, void 0, "enduser");
876
+ },
877
+ endSession(sessionId) {
878
+ return c.post(`/movies/session/${sessionId}/end`, void 0, "enduser");
879
+ },
880
+ // ─── Watchlist ───────────────────────────────────────────────────
864
881
  getWatchlist() {
865
882
  return c.get("/watchlist", "enduser");
866
883
  },
@@ -917,6 +934,63 @@ function createStorefrontWallet(c) {
917
934
  return {
918
935
  getPacks() {
919
936
  return c.get("/wallet/packs");
937
+ },
938
+ getBalance() {
939
+ return c.get("/wallet/balance", "enduser");
940
+ },
941
+ topUp(data) {
942
+ return c.post("/wallet/topup", data, "enduser");
943
+ },
944
+ getTransactions(params) {
945
+ return c.paginated("/wallet/transactions", params);
946
+ }
947
+ };
948
+ }
949
+
950
+ // src/storefront/student.ts
951
+ function createStorefrontStudent(c) {
952
+ return {
953
+ getPassStatus() {
954
+ return c.get("/student/pass", "enduser");
955
+ },
956
+ applyForPass(data) {
957
+ return c.post("/student/pass", data, "enduser");
958
+ },
959
+ previewDiscount(data) {
960
+ return c.post("/student/discount/preview", data, "enduser");
961
+ }
962
+ };
963
+ }
964
+
965
+ // src/storefront/meal-plans.ts
966
+ function createStorefrontMealPlans(c) {
967
+ return {
968
+ list() {
969
+ return c.get("/meal-plans");
970
+ },
971
+ get(id) {
972
+ return c.get(`/meal-plans/${id}`);
973
+ },
974
+ subscribe(data) {
975
+ return c.post("/meal-plans/subscribe", data, "enduser");
976
+ },
977
+ mySubscriptions() {
978
+ return c.get("/meal-plans/subscriptions", "enduser");
979
+ },
980
+ cancelSubscription(id) {
981
+ return c.post(`/meal-plans/subscriptions/${id}/cancel`, void 0, "enduser");
982
+ }
983
+ };
984
+ }
985
+
986
+ // src/storefront/help.ts
987
+ function createStorefrontHelp(c) {
988
+ return {
989
+ list() {
990
+ return c.get("/content?type=help");
991
+ },
992
+ getBySlug(slug) {
993
+ return c.get(`/content/${slug}`);
920
994
  }
921
995
  };
922
996
  }
@@ -948,7 +1022,10 @@ function createStorefront(c) {
948
1022
  property: createStorefrontProperty(c),
949
1023
  movies: createStorefrontMovies(c),
950
1024
  tmdb: createStorefrontTmdb(c),
951
- wallet: createStorefrontWallet(c)
1025
+ wallet: createStorefrontWallet(c),
1026
+ student: createStorefrontStudent(c),
1027
+ mealPlans: createStorefrontMealPlans(c),
1028
+ help: createStorefrontHelp(c)
952
1029
  };
953
1030
  }
954
1031
 
@@ -1771,6 +1848,96 @@ function createAdmin(root, c) {
1771
1848
  formData.append("file", file);
1772
1849
  if (folder) formData.append("folder", folder);
1773
1850
  return c.upload("/upload", formData);
1851
+ },
1852
+ // ─── Student Passes (Admin) ──────────────────────────────────────
1853
+ studentPasses: {
1854
+ list(params) {
1855
+ return c.paginated("/student-passes", params);
1856
+ },
1857
+ get(id) {
1858
+ return c.get(`/student-passes/${id}`);
1859
+ },
1860
+ review(id, data) {
1861
+ return c.patch(`/student-passes/${id}`, data);
1862
+ },
1863
+ bulkReview(data) {
1864
+ return c.patch("/student-passes", data);
1865
+ },
1866
+ stats() {
1867
+ return c.get("/student-passes/stats");
1868
+ }
1869
+ },
1870
+ // ─── Student Discounts (Admin) ───────────────────────────────────
1871
+ studentDiscounts: {
1872
+ list(params) {
1873
+ return c.paginated("/student-discounts", params);
1874
+ },
1875
+ get(id) {
1876
+ return c.get(`/student-discounts/${id}`);
1877
+ },
1878
+ create(data) {
1879
+ return c.post("/student-discounts", data);
1880
+ },
1881
+ update(id, data) {
1882
+ return c.patch(`/student-discounts/${id}`, data);
1883
+ },
1884
+ remove(id) {
1885
+ return c.del(`/student-discounts/${id}`);
1886
+ }
1887
+ },
1888
+ // ─── Institutions (Admin) ────────────────────────────────────────
1889
+ institutions: {
1890
+ list(params) {
1891
+ return c.paginated("/institutions", params);
1892
+ },
1893
+ get(id) {
1894
+ return c.get(`/institutions/${id}`);
1895
+ },
1896
+ create(data) {
1897
+ return c.post("/institutions", data);
1898
+ },
1899
+ update(id, data) {
1900
+ return c.patch(`/institutions/${id}`, data);
1901
+ },
1902
+ remove(id) {
1903
+ return c.del(`/institutions/${id}`);
1904
+ }
1905
+ },
1906
+ // ─── Meal Plans (Admin) ──────────────────────────────────────────
1907
+ mealPlans: {
1908
+ list(params) {
1909
+ return c.paginated("/meal-plans", params);
1910
+ },
1911
+ get(id) {
1912
+ return c.get(`/meal-plans/${id}`);
1913
+ },
1914
+ create(data) {
1915
+ return c.post("/meal-plans", data);
1916
+ },
1917
+ update(id, data) {
1918
+ return c.patch(`/meal-plans/${id}`, data);
1919
+ },
1920
+ remove(id) {
1921
+ return c.del(`/meal-plans/${id}`);
1922
+ }
1923
+ },
1924
+ // ─── Help Articles (Admin) ───────────────────────────────────────
1925
+ helpArticles: {
1926
+ list(params) {
1927
+ return c.paginated("/help", params);
1928
+ },
1929
+ get(id) {
1930
+ return c.get(`/help/${id}`);
1931
+ },
1932
+ create(data) {
1933
+ return c.post("/help", data);
1934
+ },
1935
+ update(id, data) {
1936
+ return c.patch(`/help/${id}`, data);
1937
+ },
1938
+ remove(id) {
1939
+ return c.del(`/help/${id}`);
1940
+ }
1774
1941
  }
1775
1942
  };
1776
1943
  }