@techzunction/sdk 0.1.1 → 0.2.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
@@ -921,6 +921,54 @@ function createStorefrontWallet(c) {
921
921
  };
922
922
  }
923
923
 
924
+ // src/storefront/student.ts
925
+ function createStorefrontStudent(c) {
926
+ return {
927
+ getPassStatus() {
928
+ return c.get("/student/pass", "enduser");
929
+ },
930
+ applyForPass(data) {
931
+ return c.post("/student/pass", data, "enduser");
932
+ },
933
+ previewDiscount(data) {
934
+ return c.post("/student/discount/preview", data, "enduser");
935
+ }
936
+ };
937
+ }
938
+
939
+ // src/storefront/meal-plans.ts
940
+ function createStorefrontMealPlans(c) {
941
+ return {
942
+ list() {
943
+ return c.get("/meal-plans");
944
+ },
945
+ get(id) {
946
+ return c.get(`/meal-plans/${id}`);
947
+ },
948
+ subscribe(data) {
949
+ return c.post("/meal-plans/subscribe", data, "enduser");
950
+ },
951
+ mySubscriptions() {
952
+ return c.get("/meal-plans/subscriptions", "enduser");
953
+ },
954
+ cancelSubscription(id) {
955
+ return c.post(`/meal-plans/subscriptions/${id}/cancel`, void 0, "enduser");
956
+ }
957
+ };
958
+ }
959
+
960
+ // src/storefront/help.ts
961
+ function createStorefrontHelp(c) {
962
+ return {
963
+ list() {
964
+ return c.get("/content?type=help");
965
+ },
966
+ getBySlug(slug) {
967
+ return c.get(`/content/${slug}`);
968
+ }
969
+ };
970
+ }
971
+
924
972
  // src/storefront/index.ts
925
973
  function createStorefront(c) {
926
974
  return {
@@ -948,7 +996,10 @@ function createStorefront(c) {
948
996
  property: createStorefrontProperty(c),
949
997
  movies: createStorefrontMovies(c),
950
998
  tmdb: createStorefrontTmdb(c),
951
- wallet: createStorefrontWallet(c)
999
+ wallet: createStorefrontWallet(c),
1000
+ student: createStorefrontStudent(c),
1001
+ mealPlans: createStorefrontMealPlans(c),
1002
+ help: createStorefrontHelp(c)
952
1003
  };
953
1004
  }
954
1005
 
@@ -1771,6 +1822,96 @@ function createAdmin(root, c) {
1771
1822
  formData.append("file", file);
1772
1823
  if (folder) formData.append("folder", folder);
1773
1824
  return c.upload("/upload", formData);
1825
+ },
1826
+ // ─── Student Passes (Admin) ──────────────────────────────────────
1827
+ studentPasses: {
1828
+ list(params) {
1829
+ return c.paginated("/student-passes", params);
1830
+ },
1831
+ get(id) {
1832
+ return c.get(`/student-passes/${id}`);
1833
+ },
1834
+ review(id, data) {
1835
+ return c.patch(`/student-passes/${id}`, data);
1836
+ },
1837
+ bulkReview(data) {
1838
+ return c.patch("/student-passes", data);
1839
+ },
1840
+ stats() {
1841
+ return c.get("/student-passes/stats");
1842
+ }
1843
+ },
1844
+ // ─── Student Discounts (Admin) ───────────────────────────────────
1845
+ studentDiscounts: {
1846
+ list(params) {
1847
+ return c.paginated("/student-discounts", params);
1848
+ },
1849
+ get(id) {
1850
+ return c.get(`/student-discounts/${id}`);
1851
+ },
1852
+ create(data) {
1853
+ return c.post("/student-discounts", data);
1854
+ },
1855
+ update(id, data) {
1856
+ return c.patch(`/student-discounts/${id}`, data);
1857
+ },
1858
+ remove(id) {
1859
+ return c.del(`/student-discounts/${id}`);
1860
+ }
1861
+ },
1862
+ // ─── Institutions (Admin) ────────────────────────────────────────
1863
+ institutions: {
1864
+ list(params) {
1865
+ return c.paginated("/institutions", params);
1866
+ },
1867
+ get(id) {
1868
+ return c.get(`/institutions/${id}`);
1869
+ },
1870
+ create(data) {
1871
+ return c.post("/institutions", data);
1872
+ },
1873
+ update(id, data) {
1874
+ return c.patch(`/institutions/${id}`, data);
1875
+ },
1876
+ remove(id) {
1877
+ return c.del(`/institutions/${id}`);
1878
+ }
1879
+ },
1880
+ // ─── Meal Plans (Admin) ──────────────────────────────────────────
1881
+ mealPlans: {
1882
+ list(params) {
1883
+ return c.paginated("/meal-plans", params);
1884
+ },
1885
+ get(id) {
1886
+ return c.get(`/meal-plans/${id}`);
1887
+ },
1888
+ create(data) {
1889
+ return c.post("/meal-plans", data);
1890
+ },
1891
+ update(id, data) {
1892
+ return c.patch(`/meal-plans/${id}`, data);
1893
+ },
1894
+ remove(id) {
1895
+ return c.del(`/meal-plans/${id}`);
1896
+ }
1897
+ },
1898
+ // ─── Help Articles (Admin) ───────────────────────────────────────
1899
+ helpArticles: {
1900
+ list(params) {
1901
+ return c.paginated("/help", params);
1902
+ },
1903
+ get(id) {
1904
+ return c.get(`/help/${id}`);
1905
+ },
1906
+ create(data) {
1907
+ return c.post("/help", data);
1908
+ },
1909
+ update(id, data) {
1910
+ return c.patch(`/help/${id}`, data);
1911
+ },
1912
+ remove(id) {
1913
+ return c.del(`/help/${id}`);
1914
+ }
1774
1915
  }
1775
1916
  };
1776
1917
  }