Skip to main content

edgebase_admin/generated/
admin_api_core.rs

1//! Auto-generated admin API Core — DO NOT EDIT.
2//! Regenerate: npx tsx tools/sdk-codegen/generate.ts
3//! Source: openapi.json (0.1.0)
4
5use crate::Error;
6use crate::HttpClient;
7use serde_json::Value;
8
9fn encode_path_param(value: &str) -> String {
10    urlencoding::encode(value).into_owned()
11}
12
13/// Auto-generated API methods.
14pub struct GeneratedAdminApi<'a> {
15    http: &'a HttpClient,
16}
17
18impl<'a> GeneratedAdminApi<'a> {
19    pub fn new(http: &'a HttpClient) -> Self {
20        Self { http }
21    }
22
23    /// Get user by ID — GET /api/auth/admin/users/{id}
24    pub async fn admin_auth_get_user(&self, id: &str) -> Result<Value, Error> {
25        self.http.get(&format!("/api/auth/admin/users/{}", encode_path_param(id))).await
26    }
27
28    /// Update user by ID — PATCH /api/auth/admin/users/{id}
29    pub async fn admin_auth_update_user(&self, id: &str, body: &Value) -> Result<Value, Error> {
30        self.http.patch(&format!("/api/auth/admin/users/{}", encode_path_param(id)), body).await
31    }
32
33    /// Delete user by ID — DELETE /api/auth/admin/users/{id}
34    pub async fn admin_auth_delete_user(&self, id: &str) -> Result<Value, Error> {
35        self.http.delete(&format!("/api/auth/admin/users/{}", encode_path_param(id))).await
36    }
37
38    /// List users — GET /api/auth/admin/users
39    pub async fn admin_auth_list_users(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
40        self.http.get_with_query("/api/auth/admin/users", query).await
41    }
42
43    /// Create a new user — POST /api/auth/admin/users
44    pub async fn admin_auth_create_user(&self, body: &Value) -> Result<Value, Error> {
45        self.http.post("/api/auth/admin/users", body).await
46    }
47
48    /// Delete user MFA — DELETE /api/auth/admin/users/{id}/mfa
49    pub async fn admin_auth_delete_user_mfa(&self, id: &str) -> Result<Value, Error> {
50        self.http.delete(&format!("/api/auth/admin/users/{}/mfa", encode_path_param(id))).await
51    }
52
53    /// Set custom claims for user — PUT /api/auth/admin/users/{id}/claims
54    pub async fn admin_auth_set_claims(&self, id: &str, body: &Value) -> Result<Value, Error> {
55        self.http.put(&format!("/api/auth/admin/users/{}/claims", encode_path_param(id)), body).await
56    }
57
58    /// Revoke all sessions for user — POST /api/auth/admin/users/{id}/revoke
59    pub async fn admin_auth_revoke_user_sessions(&self, id: &str) -> Result<Value, Error> {
60        self.http.post(&format!("/api/auth/admin/users/{}/revoke", encode_path_param(id)), &Value::Null).await
61    }
62
63    /// Batch import users — POST /api/auth/admin/users/import
64    pub async fn admin_auth_import_users(&self, body: &Value) -> Result<Value, Error> {
65        self.http.post("/api/auth/admin/users/import", body).await
66    }
67
68    /// Broadcast to database live channel — POST /api/db/broadcast
69    pub async fn database_live_broadcast(&self, body: &Value) -> Result<Value, Error> {
70        self.http.post("/api/db/broadcast", body).await
71    }
72
73    /// Execute SQL via DatabaseDO — POST /api/sql
74    pub async fn execute_sql(&self, body: &Value) -> Result<Value, Error> {
75        self.http.post("/api/sql", body).await
76    }
77
78    /// Execute KV operation — POST /api/kv/{namespace}
79    pub async fn kv_operation(&self, namespace: &str, body: &Value) -> Result<Value, Error> {
80        self.http.post(&format!("/api/kv/{}", encode_path_param(namespace)), body).await
81    }
82
83    /// Execute raw SQL on D1 database — POST /api/d1/{database}
84    pub async fn execute_d1_query(&self, database: &str, body: &Value) -> Result<Value, Error> {
85        self.http.post(&format!("/api/d1/{}", encode_path_param(database)), body).await
86    }
87
88    /// Execute Vectorize operation — POST /api/vectorize/{index}
89    pub async fn vectorize_operation(&self, index: &str, body: &Value) -> Result<Value, Error> {
90        self.http.post(&format!("/api/vectorize/{}", encode_path_param(index)), body).await
91    }
92
93    /// Send push notification to user — POST /api/push/send
94    pub async fn push_send(&self, body: &Value) -> Result<Value, Error> {
95        self.http.post("/api/push/send", body).await
96    }
97
98    /// Send push to multiple users — POST /api/push/send-many
99    pub async fn push_send_many(&self, body: &Value) -> Result<Value, Error> {
100        self.http.post("/api/push/send-many", body).await
101    }
102
103    /// Send push to specific token — POST /api/push/send-to-token
104    pub async fn push_send_to_token(&self, body: &Value) -> Result<Value, Error> {
105        self.http.post("/api/push/send-to-token", body).await
106    }
107
108    /// Send push to topic — POST /api/push/send-to-topic
109    pub async fn push_send_to_topic(&self, body: &Value) -> Result<Value, Error> {
110        self.http.post("/api/push/send-to-topic", body).await
111    }
112
113    /// Broadcast push to all devices — POST /api/push/broadcast
114    pub async fn push_broadcast(&self, body: &Value) -> Result<Value, Error> {
115        self.http.post("/api/push/broadcast", body).await
116    }
117
118    /// Get push notification logs — GET /api/push/logs
119    pub async fn get_push_logs(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
120        self.http.get_with_query("/api/push/logs", query).await
121    }
122
123    /// Get registered push tokens — GET /api/push/tokens
124    pub async fn get_push_tokens(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
125        self.http.get_with_query("/api/push/tokens", query).await
126    }
127
128    /// Upsert a device token — PUT /api/push/tokens
129    pub async fn put_push_tokens(&self, body: &Value) -> Result<Value, Error> {
130        self.http.put("/api/push/tokens", body).await
131    }
132
133    /// Update device metadata — PATCH /api/push/tokens
134    pub async fn patch_push_tokens(&self, body: &Value) -> Result<Value, Error> {
135        self.http.patch("/api/push/tokens", body).await
136    }
137
138    /// Query request log metrics — GET /api/analytics/query
139    pub async fn query_analytics(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
140        self.http.get_with_query("/api/analytics/query", query).await
141    }
142
143    /// Query custom events — GET /api/analytics/events
144    pub async fn query_custom_events(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
145        self.http.get_with_query("/api/analytics/events", query).await
146    }
147
148    /// Check if admin setup is needed — GET /admin/api/setup/status
149    pub async fn admin_setup_status(&self) -> Result<Value, Error> {
150        self.http.get("/admin/api/setup/status").await
151    }
152
153    /// Create the first admin account — POST /admin/api/setup
154    pub async fn admin_setup(&self, body: &Value) -> Result<Value, Error> {
155        self.http.post("/admin/api/setup", body).await
156    }
157
158    /// Admin login — POST /admin/api/auth/login
159    pub async fn admin_login(&self, body: &Value) -> Result<Value, Error> {
160        self.http.post("/admin/api/auth/login", body).await
161    }
162
163    /// Rotate admin token — POST /admin/api/auth/refresh
164    pub async fn admin_refresh(&self, body: &Value) -> Result<Value, Error> {
165        self.http.post("/admin/api/auth/refresh", body).await
166    }
167
168    /// Reset admin password (Service Key required) — POST /admin/api/internal/reset-password
169    pub async fn admin_reset_password(&self, body: &Value) -> Result<Value, Error> {
170        self.http.post("/admin/api/internal/reset-password", body).await
171    }
172
173    /// List all tables from config — GET /admin/api/data/tables
174    pub async fn admin_list_tables(&self) -> Result<Value, Error> {
175        self.http.get("/admin/api/data/tables").await
176    }
177
178    /// List table records with pagination — GET /admin/api/data/tables/{name}/records
179    pub async fn admin_get_table_records(&self, name: &str) -> Result<Value, Error> {
180        self.http.get(&format!("/admin/api/data/tables/{}/records", encode_path_param(name))).await
181    }
182
183    /// Create a table record — POST /admin/api/data/tables/{name}/records
184    pub async fn admin_create_table_record(&self, name: &str, body: &Value) -> Result<Value, Error> {
185        self.http.post(&format!("/admin/api/data/tables/{}/records", encode_path_param(name)), body).await
186    }
187
188    /// Update a table record — PUT /admin/api/data/tables/{name}/records/{id}
189    pub async fn admin_update_table_record(&self, name: &str, id: &str, body: &Value) -> Result<Value, Error> {
190        self.http.put(&format!("/admin/api/data/tables/{}/records/{}", encode_path_param(name), encode_path_param(id)), body).await
191    }
192
193    /// Delete a table record — DELETE /admin/api/data/tables/{name}/records/{id}
194    pub async fn admin_delete_table_record(&self, name: &str, id: &str) -> Result<Value, Error> {
195        self.http.delete(&format!("/admin/api/data/tables/{}/records/{}", encode_path_param(name), encode_path_param(id))).await
196    }
197
198    /// List users via D1 index — GET /admin/api/data/users
199    pub async fn admin_list_users(&self) -> Result<Value, Error> {
200        self.http.get("/admin/api/data/users").await
201    }
202
203    /// Create a new user — POST /admin/api/data/users
204    pub async fn admin_create_user(&self, body: &Value) -> Result<Value, Error> {
205        self.http.post("/admin/api/data/users", body).await
206    }
207
208    /// Fetch a single user by ID — GET /admin/api/data/users/{id}
209    pub async fn admin_get_user(&self, id: &str) -> Result<Value, Error> {
210        self.http.get(&format!("/admin/api/data/users/{}", encode_path_param(id))).await
211    }
212
213    /// Update user status or role — PUT /admin/api/data/users/{id}
214    pub async fn admin_update_user(&self, id: &str, body: &Value) -> Result<Value, Error> {
215        self.http.put(&format!("/admin/api/data/users/{}", encode_path_param(id)), body).await
216    }
217
218    /// Delete a user completely — DELETE /admin/api/data/users/{id}
219    pub async fn admin_delete_user(&self, id: &str) -> Result<Value, Error> {
220        self.http.delete(&format!("/admin/api/data/users/{}", encode_path_param(id))).await
221    }
222
223    /// Fetch user profile with cache — GET /admin/api/data/users/{id}/profile
224    pub async fn admin_get_user_profile(&self, id: &str) -> Result<Value, Error> {
225        self.http.get(&format!("/admin/api/data/users/{}/profile", encode_path_param(id))).await
226    }
227
228    /// Revoke all user sessions — DELETE /admin/api/data/users/{id}/sessions
229    pub async fn admin_delete_user_sessions(&self, id: &str) -> Result<Value, Error> {
230        self.http.delete(&format!("/admin/api/data/users/{}/sessions", encode_path_param(id))).await
231    }
232
233    /// Cleanup anonymous user index — POST /admin/api/data/cleanup-anon
234    pub async fn admin_cleanup_anon(&self) -> Result<Value, Error> {
235        self.http.post("/admin/api/data/cleanup-anon", &Value::Null).await
236    }
237
238    /// List configured storage buckets — GET /admin/api/data/storage/buckets
239    pub async fn admin_list_buckets(&self) -> Result<Value, Error> {
240        self.http.get("/admin/api/data/storage/buckets").await
241    }
242
243    /// List objects in a storage bucket — GET /admin/api/data/storage/buckets/{name}/objects
244    pub async fn admin_list_bucket_objects(&self, name: &str) -> Result<Value, Error> {
245        self.http.get(&format!("/admin/api/data/storage/buckets/{}/objects", encode_path_param(name))).await
246    }
247
248    /// Get a storage object content — GET /admin/api/data/storage/buckets/{name}/objects/{key}
249    pub async fn admin_get_bucket_object(&self, name: &str, key: &str) -> Result<Value, Error> {
250        self.http.get(&format!("/admin/api/data/storage/buckets/{}/objects/{}", encode_path_param(name), encode_path_param(key))).await
251    }
252
253    /// Delete a storage object — DELETE /admin/api/data/storage/buckets/{name}/objects/{key}
254    pub async fn admin_delete_bucket_object(&self, name: &str, key: &str) -> Result<Value, Error> {
255        self.http.delete(&format!("/admin/api/data/storage/buckets/{}/objects/{}", encode_path_param(name), encode_path_param(key))).await
256    }
257
258    /// Get bucket statistics (total objects and size) — GET /admin/api/data/storage/buckets/{name}/stats
259    pub async fn admin_get_bucket_stats(&self, name: &str) -> Result<Value, Error> {
260        self.http.get(&format!("/admin/api/data/storage/buckets/{}/stats", encode_path_param(name))).await
261    }
262
263    /// Create a signed download URL for a storage object — POST /admin/api/data/storage/buckets/{name}/signed-url
264    pub async fn admin_create_signed_url(&self, name: &str, body: &Value) -> Result<Value, Error> {
265        self.http.post(&format!("/admin/api/data/storage/buckets/{}/signed-url", encode_path_param(name)), body).await
266    }
267
268    /// Get full schema structure from config — GET /admin/api/data/schema
269    pub async fn admin_get_schema(&self) -> Result<Value, Error> {
270        self.http.get("/admin/api/data/schema").await
271    }
272
273    /// Export table data as JSON — GET /admin/api/data/tables/{name}/export
274    pub async fn admin_export_table(&self, name: &str) -> Result<Value, Error> {
275        self.http.get(&format!("/admin/api/data/tables/{}/export", encode_path_param(name))).await
276    }
277
278    /// Get request logs — GET /admin/api/data/logs
279    pub async fn admin_get_logs(&self) -> Result<Value, Error> {
280        self.http.get("/admin/api/data/logs").await
281    }
282
283    /// Get realtime monitoring stats — GET /admin/api/data/monitoring
284    pub async fn admin_get_monitoring(&self) -> Result<Value, Error> {
285        self.http.get("/admin/api/data/monitoring").await
286    }
287
288    /// Get analytics dashboard data — GET /admin/api/data/analytics
289    pub async fn admin_get_analytics(&self) -> Result<Value, Error> {
290        self.http.get("/admin/api/data/analytics").await
291    }
292
293    /// Query analytics events for admin dashboard — GET /admin/api/data/analytics/events
294    pub async fn admin_get_analytics_events(&self) -> Result<Value, Error> {
295        self.http.get("/admin/api/data/analytics/events").await
296    }
297
298    /// Get project overview for dashboard home — GET /admin/api/data/overview
299    pub async fn admin_get_overview(&self) -> Result<Value, Error> {
300        self.http.get("/admin/api/data/overview").await
301    }
302
303    /// Get dev mode status and sidecar port — GET /admin/api/data/dev-info
304    pub async fn admin_get_dev_info(&self) -> Result<Value, Error> {
305        self.http.get("/admin/api/data/dev-info").await
306    }
307
308    /// Execute raw SQL query — POST /admin/api/data/sql
309    pub async fn admin_execute_sql(&self, body: &Value) -> Result<Value, Error> {
310        self.http.post("/admin/api/data/sql", body).await
311    }
312
313    /// Batch import records into a table — POST /admin/api/data/tables/{name}/import
314    pub async fn admin_import_table(&self, name: &str, body: &Value) -> Result<Value, Error> {
315        self.http.post(&format!("/admin/api/data/tables/{}/import", encode_path_param(name)), body).await
316    }
317
318    /// Evaluate access rules with simulated auth context — POST /admin/api/data/rules-test
319    pub async fn admin_rules_test(&self, body: &Value) -> Result<Value, Error> {
320        self.http.post("/admin/api/data/rules-test", body).await
321    }
322
323    /// List registered functions from config — GET /admin/api/data/functions
324    pub async fn admin_list_functions(&self) -> Result<Value, Error> {
325        self.http.get("/admin/api/data/functions").await
326    }
327
328    /// Get environment and config overview — GET /admin/api/data/config-info
329    pub async fn admin_get_config_info(&self) -> Result<Value, Error> {
330        self.http.get("/admin/api/data/config-info").await
331    }
332
333    /// Get recent request logs with filtering — GET /admin/api/data/logs/recent
334    pub async fn admin_get_recent_logs(&self) -> Result<Value, Error> {
335        self.http.get("/admin/api/data/logs/recent").await
336    }
337
338    /// Get OAuth provider config — GET /admin/api/data/auth/settings
339    pub async fn admin_get_auth_settings(&self) -> Result<Value, Error> {
340        self.http.get("/admin/api/data/auth/settings").await
341    }
342
343    /// Get email template and subject config — GET /admin/api/data/email/templates
344    pub async fn admin_get_email_templates(&self) -> Result<Value, Error> {
345        self.http.get("/admin/api/data/email/templates").await
346    }
347
348    /// Disable MFA for a user — DELETE /admin/api/data/users/{id}/mfa
349    pub async fn admin_delete_user_mfa(&self, id: &str) -> Result<Value, Error> {
350        self.http.delete(&format!("/admin/api/data/users/{}/mfa", encode_path_param(id))).await
351    }
352
353    /// Send password reset email for a user — POST /admin/api/data/users/{id}/send-password-reset
354    pub async fn admin_send_password_reset(&self, id: &str) -> Result<Value, Error> {
355        self.http.post(&format!("/admin/api/data/users/{}/send-password-reset", encode_path_param(id)), &Value::Null).await
356    }
357
358    /// Upload file to R2 storage — POST /admin/api/data/storage/buckets/{name}/upload
359    pub async fn admin_upload_file(&self, name: &str, body: &Value) -> Result<Value, Error> {
360        self.http.post(&format!("/admin/api/data/storage/buckets/{}/upload", encode_path_param(name)), body).await
361    }
362
363    /// List push tokens for a user — GET /admin/api/data/push/tokens
364    pub async fn admin_get_push_tokens(&self) -> Result<Value, Error> {
365        self.http.get("/admin/api/data/push/tokens").await
366    }
367
368    /// Get push notification logs — GET /admin/api/data/push/logs
369    pub async fn admin_get_push_logs(&self) -> Result<Value, Error> {
370        self.http.get("/admin/api/data/push/logs").await
371    }
372
373    /// Test send push notification — POST /admin/api/data/push/test-send
374    pub async fn admin_test_push_send(&self, body: &Value) -> Result<Value, Error> {
375        self.http.post("/admin/api/data/push/test-send", body).await
376    }
377
378    /// List Durable Objects for backup — POST /admin/api/data/backup/list-dos
379    pub async fn admin_backup_list_dos(&self) -> Result<Value, Error> {
380        self.http.post("/admin/api/data/backup/list-dos", &Value::Null).await
381    }
382
383    /// Dump a Durable Object for backup — POST /admin/api/data/backup/dump-do
384    pub async fn admin_backup_dump_do(&self, body: &Value) -> Result<Value, Error> {
385        self.http.post("/admin/api/data/backup/dump-do", body).await
386    }
387
388    /// Restore a Durable Object from backup — POST /admin/api/data/backup/restore-do
389    pub async fn admin_backup_restore_do(&self, body: &Value) -> Result<Value, Error> {
390        self.http.post("/admin/api/data/backup/restore-do", body).await
391    }
392
393    /// Dump D1 database for backup — POST /admin/api/data/backup/dump-d1
394    pub async fn admin_backup_dump_d1(&self) -> Result<Value, Error> {
395        self.http.post("/admin/api/data/backup/dump-d1", &Value::Null).await
396    }
397
398    /// Restore D1 database from backup — POST /admin/api/data/backup/restore-d1
399    pub async fn admin_backup_restore_d1(&self, body: &Value) -> Result<Value, Error> {
400        self.http.post("/admin/api/data/backup/restore-d1", body).await
401    }
402
403    /// Get backup config — GET /admin/api/data/backup/config
404    pub async fn admin_backup_get_config(&self) -> Result<Value, Error> {
405        self.http.get("/admin/api/data/backup/config").await
406    }
407
408    /// List admin accounts — GET /admin/api/data/admins
409    pub async fn admin_list_admins(&self) -> Result<Value, Error> {
410        self.http.get("/admin/api/data/admins").await
411    }
412
413    /// Create an admin account — POST /admin/api/data/admins
414    pub async fn admin_create_admin(&self, body: &Value) -> Result<Value, Error> {
415        self.http.post("/admin/api/data/admins", body).await
416    }
417
418    /// Delete an admin account — DELETE /admin/api/data/admins/{id}
419    pub async fn admin_delete_admin(&self, id: &str) -> Result<Value, Error> {
420        self.http.delete(&format!("/admin/api/data/admins/{}", encode_path_param(id))).await
421    }
422
423    /// Change admin password — PUT /admin/api/data/admins/{id}/password
424    pub async fn admin_change_password(&self, id: &str, body: &Value) -> Result<Value, Error> {
425        self.http.put(&format!("/admin/api/data/admins/{}/password", encode_path_param(id)), body).await
426    }
427
428    /// List all DO instances — POST /admin/api/backup/list-dos
429    pub async fn backup_list_dos(&self, body: &Value) -> Result<Value, Error> {
430        self.http.post("/admin/api/backup/list-dos", body).await
431    }
432
433    /// Return parsed config snapshot — GET /admin/api/backup/config
434    pub async fn backup_get_config(&self) -> Result<Value, Error> {
435        self.http.get("/admin/api/backup/config").await
436    }
437
438    /// Remove plugin-prefixed tables and migration metadata — POST /admin/api/backup/cleanup-plugin
439    pub async fn backup_cleanup_plugin(&self, body: &Value) -> Result<Value, Error> {
440        self.http.post("/admin/api/backup/cleanup-plugin", body).await
441    }
442
443    /// Wipe a specific DO's data — POST /admin/api/backup/wipe-do
444    pub async fn backup_wipe_do(&self, body: &Value) -> Result<Value, Error> {
445        self.http.post("/admin/api/backup/wipe-do", body).await
446    }
447
448    /// Dump a specific DO's data — POST /admin/api/backup/dump-do
449    pub async fn backup_dump_do(&self, body: &Value) -> Result<Value, Error> {
450        self.http.post("/admin/api/backup/dump-do", body).await
451    }
452
453    /// Restore a specific DO's data — POST /admin/api/backup/restore-do
454    pub async fn backup_restore_do(&self, body: &Value) -> Result<Value, Error> {
455        self.http.post("/admin/api/backup/restore-do", body).await
456    }
457
458    /// Dump auth database tables — POST /admin/api/backup/dump-d1
459    pub async fn backup_dump_d1(&self) -> Result<Value, Error> {
460        self.http.post("/admin/api/backup/dump-d1", &Value::Null).await
461    }
462
463    /// Restore auth database tables — POST /admin/api/backup/restore-d1
464    pub async fn backup_restore_d1(&self, body: &Value) -> Result<Value, Error> {
465        self.http.post("/admin/api/backup/restore-d1", body).await
466    }
467
468    /// Dump control-plane D1 tables — POST /admin/api/backup/dump-control-d1
469    pub async fn backup_dump_control_d1(&self) -> Result<Value, Error> {
470        self.http.post("/admin/api/backup/dump-control-d1", &Value::Null).await
471    }
472
473    /// Restore control-plane D1 tables — POST /admin/api/backup/restore-control-d1
474    pub async fn backup_restore_control_d1(&self, body: &Value) -> Result<Value, Error> {
475        self.http.post("/admin/api/backup/restore-control-d1", body).await
476    }
477
478    /// Dump all tables from a data namespace — POST /admin/api/backup/dump-data
479    pub async fn backup_dump_data(&self, body: &Value) -> Result<Value, Error> {
480        self.http.post("/admin/api/backup/dump-data", body).await
481    }
482
483    /// Restore all tables into a data namespace — POST /admin/api/backup/restore-data
484    pub async fn backup_restore_data(&self, body: &Value) -> Result<Value, Error> {
485        self.http.post("/admin/api/backup/restore-data", body).await
486    }
487
488    /// Dump R2 storage (list or download) — POST /admin/api/backup/dump-storage
489    pub async fn backup_dump_storage(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
490        self.http.get_with_query("/admin/api/backup/dump-storage", query).await
491    }
492
493    /// Restore R2 storage (wipe or upload) — POST /admin/api/backup/restore-storage
494    pub async fn backup_restore_storage(&self, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
495        self.http.get_with_query("/admin/api/backup/restore-storage", query).await
496    }
497
498    /// Resync _users_public from _users in AUTH_DB D1 — POST /admin/api/backup/resync-users-public
499    pub async fn backup_resync_users_public(&self) -> Result<Value, Error> {
500        self.http.post("/admin/api/backup/resync-users-public", &Value::Null).await
501    }
502
503    /// Export a single table as JSON — GET /admin/api/backup/export/{name}
504    pub async fn backup_export_table(&self, name: &str, query: &std::collections::HashMap<String, String>) -> Result<Value, Error> {
505        self.http.get_with_query(&format!("/admin/api/backup/export/{}", encode_path_param(name)), query).await
506    }
507}