@techzunction/sdk 0.6.2 → 0.6.4
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 +160 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +869 -1
- package/dist/index.d.ts +869 -1
- package/dist/index.js +160 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2086,6 +2086,166 @@ function createAdmin(root, c) {
|
|
|
2086
2086
|
remove(id) {
|
|
2087
2087
|
return c.del(`/help/${id}`);
|
|
2088
2088
|
}
|
|
2089
|
+
},
|
|
2090
|
+
// ─── Dashboard ─────────────────────────────────────────────────────
|
|
2091
|
+
dashboard: {
|
|
2092
|
+
get(params) {
|
|
2093
|
+
return c.get(`/admin/dashboard${params ? toQsInline(params) : ""}`);
|
|
2094
|
+
}
|
|
2095
|
+
},
|
|
2096
|
+
// ─── Loyalty (Extended Admin View) ─────────────────────────────────
|
|
2097
|
+
loyaltyAdmin: {
|
|
2098
|
+
get(params) {
|
|
2099
|
+
return c.get(`/admin/loyalty${params?.search ? "?search=" + encodeURIComponent(params.search) : ""}`);
|
|
2100
|
+
}
|
|
2101
|
+
},
|
|
2102
|
+
// ─── Rewards / Redemptions ─────────────────────────────────────────
|
|
2103
|
+
redemptions: {
|
|
2104
|
+
list(params) {
|
|
2105
|
+
return c.get(`/admin/rewards${params?.status && params.status !== "all" ? "?status=" + params.status : ""}`);
|
|
2106
|
+
},
|
|
2107
|
+
fulfill(data) {
|
|
2108
|
+
return c.post("/admin/rewards", data);
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
// ─── Delivery Agents & Zones ───────────────────────────────────────
|
|
2112
|
+
deliveryAgents: {
|
|
2113
|
+
list() {
|
|
2114
|
+
return c.get("/admin/delivery/agents");
|
|
2115
|
+
},
|
|
2116
|
+
create(data) {
|
|
2117
|
+
return c.post("/admin/delivery/agents", data);
|
|
2118
|
+
},
|
|
2119
|
+
update(id, data) {
|
|
2120
|
+
return c.patch(`/admin/delivery/agents/${id}`, data);
|
|
2121
|
+
},
|
|
2122
|
+
remove(id) {
|
|
2123
|
+
return c.del(`/admin/delivery/agents/${id}`);
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2126
|
+
deliveryZones: {
|
|
2127
|
+
list() {
|
|
2128
|
+
return c.get("/admin/delivery/zones");
|
|
2129
|
+
},
|
|
2130
|
+
create(data) {
|
|
2131
|
+
return c.post("/admin/delivery/zones", data);
|
|
2132
|
+
},
|
|
2133
|
+
update(id, data) {
|
|
2134
|
+
return c.patch(`/admin/delivery/zones/${id}`, data);
|
|
2135
|
+
},
|
|
2136
|
+
remove(id) {
|
|
2137
|
+
return c.del(`/admin/delivery/zones/${id}`);
|
|
2138
|
+
}
|
|
2139
|
+
},
|
|
2140
|
+
// ─── Marketing ─────────────────────────────────────────────────────
|
|
2141
|
+
affiliates: {
|
|
2142
|
+
list() {
|
|
2143
|
+
return c.get("/admin/marketing/affiliates");
|
|
2144
|
+
},
|
|
2145
|
+
update(id, data) {
|
|
2146
|
+
return c.patch(`/admin/marketing/affiliates/${id}`, data);
|
|
2147
|
+
}
|
|
2148
|
+
},
|
|
2149
|
+
popups: {
|
|
2150
|
+
get() {
|
|
2151
|
+
return c.get("/admin/marketing/popups");
|
|
2152
|
+
},
|
|
2153
|
+
update(data) {
|
|
2154
|
+
return c.patch("/admin/marketing/popups", data);
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2157
|
+
// ─── Finance ───────────────────────────────────────────────────────
|
|
2158
|
+
finance: {
|
|
2159
|
+
invoices(params) {
|
|
2160
|
+
return c.paginated("/admin/finance/invoices", params);
|
|
2161
|
+
},
|
|
2162
|
+
tax(params) {
|
|
2163
|
+
return c.get(`/admin/finance/tax${params ? toQsInline(params) : ""}`);
|
|
2164
|
+
},
|
|
2165
|
+
settlements(params) {
|
|
2166
|
+
return c.paginated("/admin/finance/settlements", params);
|
|
2167
|
+
},
|
|
2168
|
+
payouts(params) {
|
|
2169
|
+
return c.paginated("/admin/finance/payouts", params);
|
|
2170
|
+
},
|
|
2171
|
+
markPaid(id) {
|
|
2172
|
+
return c.patch(`/admin/finance/payouts/${id}`, { isPaid: true });
|
|
2173
|
+
},
|
|
2174
|
+
exportReport(params) {
|
|
2175
|
+
return c.post("/admin/reports/export", params);
|
|
2176
|
+
}
|
|
2177
|
+
},
|
|
2178
|
+
// ─── Reports ───────────────────────────────────────────────────────
|
|
2179
|
+
reports: {
|
|
2180
|
+
get(type, params) {
|
|
2181
|
+
return c.get(`/admin/reports?type=${type}${params ? "&" + new URLSearchParams(Object.entries(params).filter(([, v]) => v != null).map(([k, v]) => [k, String(v)])).toString() : ""}`);
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
// ─── Broadcast Notifications ───────────────────────────────────────
|
|
2185
|
+
broadcast: {
|
|
2186
|
+
list() {
|
|
2187
|
+
return c.get("/admin/notifications/broadcast");
|
|
2188
|
+
},
|
|
2189
|
+
send(data) {
|
|
2190
|
+
return c.post("/admin/notifications/broadcast", data);
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
// ─── Scheduled Orders ──────────────────────────────────────────────
|
|
2194
|
+
scheduledOrders: {
|
|
2195
|
+
list(params) {
|
|
2196
|
+
return c.get(`/admin/scheduled-orders${params ? toQsInline(params) : ""}`);
|
|
2197
|
+
},
|
|
2198
|
+
catering() {
|
|
2199
|
+
return c.get("/admin/catering");
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
// ─── Abandoned Carts ───────────────────────────────────────────────
|
|
2203
|
+
abandonedCarts: {
|
|
2204
|
+
list(params) {
|
|
2205
|
+
return c.paginated("/admin/abandoned-carts", params);
|
|
2206
|
+
},
|
|
2207
|
+
recover(id) {
|
|
2208
|
+
return c.post(`/admin/abandoned-carts/${id}/recover`);
|
|
2209
|
+
}
|
|
2210
|
+
},
|
|
2211
|
+
// ─── Waitlists ─────────────────────────────────────────────────────
|
|
2212
|
+
waitlists: {
|
|
2213
|
+
list() {
|
|
2214
|
+
return c.get("/admin/waitlists");
|
|
2215
|
+
},
|
|
2216
|
+
notify(menuItemId) {
|
|
2217
|
+
return c.post(`/admin/waitlists/${menuItemId}/notify`);
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
// ─── Reservation Slots ─────────────────────────────────────────────
|
|
2221
|
+
reservationSlots: {
|
|
2222
|
+
list() {
|
|
2223
|
+
return c.get("/admin/reservations/slots");
|
|
2224
|
+
},
|
|
2225
|
+
create(data) {
|
|
2226
|
+
return c.post("/admin/reservations/slots", data);
|
|
2227
|
+
},
|
|
2228
|
+
update(id, data) {
|
|
2229
|
+
return c.patch(`/admin/reservations/slots/${id}`, data);
|
|
2230
|
+
},
|
|
2231
|
+
remove(id) {
|
|
2232
|
+
return c.del(`/admin/reservations/slots/${id}`);
|
|
2233
|
+
}
|
|
2234
|
+
},
|
|
2235
|
+
// ─── Reservation Tables ────────────────────────────────────────────
|
|
2236
|
+
reservationTables: {
|
|
2237
|
+
list() {
|
|
2238
|
+
return c.get("/admin/reservations/tables");
|
|
2239
|
+
},
|
|
2240
|
+
create(data) {
|
|
2241
|
+
return c.post("/admin/reservations/tables", data);
|
|
2242
|
+
},
|
|
2243
|
+
update(id, data) {
|
|
2244
|
+
return c.patch(`/admin/reservations/tables/${id}`, data);
|
|
2245
|
+
},
|
|
2246
|
+
remove(id) {
|
|
2247
|
+
return c.del(`/admin/reservations/tables/${id}`);
|
|
2248
|
+
}
|
|
2089
2249
|
}
|
|
2090
2250
|
};
|
|
2091
2251
|
}
|