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