Skip to main content

GeneratedAdminApi

Struct GeneratedAdminApi 

Source
pub struct GeneratedAdminApi<'a> { /* private fields */ }
Expand description

Auto-generated API methods.

Implementations§

Source§

impl<'a> GeneratedAdminApi<'a>

Source

pub fn new(http: &'a HttpClient) -> Self

Source

pub async fn admin_auth_get_user(&self, id: &str) -> Result<Value, Error>

Get user by ID — GET /api/auth/admin/users/{id}

Source

pub async fn admin_auth_update_user( &self, id: &str, body: &Value, ) -> Result<Value, Error>

Update user by ID — PATCH /api/auth/admin/users/{id}

Source

pub async fn admin_auth_delete_user(&self, id: &str) -> Result<Value, Error>

Delete user by ID — DELETE /api/auth/admin/users/{id}

Source

pub async fn admin_auth_list_users( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

List users — GET /api/auth/admin/users

Source

pub async fn admin_auth_create_user(&self, body: &Value) -> Result<Value, Error>

Create a new user — POST /api/auth/admin/users

Source

pub async fn admin_auth_delete_user_mfa(&self, id: &str) -> Result<Value, Error>

Delete user MFA — DELETE /api/auth/admin/users/{id}/mfa

Source

pub async fn admin_auth_set_claims( &self, id: &str, body: &Value, ) -> Result<Value, Error>

Set custom claims for user — PUT /api/auth/admin/users/{id}/claims

Source

pub async fn admin_auth_revoke_user_sessions( &self, id: &str, ) -> Result<Value, Error>

Revoke all sessions for user — POST /api/auth/admin/users/{id}/revoke

Source

pub async fn admin_auth_import_users( &self, body: &Value, ) -> Result<Value, Error>

Batch import users — POST /api/auth/admin/users/import

Source

pub async fn database_live_broadcast( &self, body: &Value, ) -> Result<Value, Error>

Broadcast to database live channel — POST /api/db/broadcast

Source

pub async fn execute_sql(&self, body: &Value) -> Result<Value, Error>

Execute SQL via DatabaseDO — POST /api/sql

Source

pub async fn kv_operation( &self, namespace: &str, body: &Value, ) -> Result<Value, Error>

Execute KV operation — POST /api/kv/{namespace}

Source

pub async fn execute_d1_query( &self, database: &str, body: &Value, ) -> Result<Value, Error>

Execute raw SQL on D1 database — POST /api/d1/{database}

Source

pub async fn vectorize_operation( &self, index: &str, body: &Value, ) -> Result<Value, Error>

Execute Vectorize operation — POST /api/vectorize/{index}

Source

pub async fn push_send(&self, body: &Value) -> Result<Value, Error>

Send push notification to user — POST /api/push/send

Source

pub async fn push_send_many(&self, body: &Value) -> Result<Value, Error>

Send push to multiple users — POST /api/push/send-many

Source

pub async fn push_send_to_token(&self, body: &Value) -> Result<Value, Error>

Send push to specific token — POST /api/push/send-to-token

Source

pub async fn push_send_to_topic(&self, body: &Value) -> Result<Value, Error>

Send push to topic — POST /api/push/send-to-topic

Source

pub async fn push_broadcast(&self, body: &Value) -> Result<Value, Error>

Broadcast push to all devices — POST /api/push/broadcast

Source

pub async fn get_push_logs( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Get push notification logs — GET /api/push/logs

Source

pub async fn get_push_tokens( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Get registered push tokens — GET /api/push/tokens

Source

pub async fn put_push_tokens(&self, body: &Value) -> Result<Value, Error>

Upsert a device token — PUT /api/push/tokens

Source

pub async fn patch_push_tokens(&self, body: &Value) -> Result<Value, Error>

Update device metadata — PATCH /api/push/tokens

Source

pub async fn query_analytics( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Query request log metrics — GET /api/analytics/query

Source

pub async fn query_custom_events( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Query custom events — GET /api/analytics/events

Source

pub async fn admin_setup_status(&self) -> Result<Value, Error>

Check if admin setup is needed — GET /admin/api/setup/status

Source

pub async fn admin_setup(&self, body: &Value) -> Result<Value, Error>

Create the first admin account — POST /admin/api/setup

Source

pub async fn admin_login(&self, body: &Value) -> Result<Value, Error>

Admin login — POST /admin/api/auth/login

Source

pub async fn admin_refresh(&self, body: &Value) -> Result<Value, Error>

Rotate admin token — POST /admin/api/auth/refresh

Source

pub async fn admin_reset_password(&self, body: &Value) -> Result<Value, Error>

Reset admin password (Service Key required) — POST /admin/api/internal/reset-password

Source

pub async fn admin_list_tables(&self) -> Result<Value, Error>

List all tables from config — GET /admin/api/data/tables

Source

pub async fn admin_get_table_records(&self, name: &str) -> Result<Value, Error>

List table records with pagination — GET /admin/api/data/tables/{name}/records

Source

pub async fn admin_create_table_record( &self, name: &str, body: &Value, ) -> Result<Value, Error>

Create a table record — POST /admin/api/data/tables/{name}/records

Source

pub async fn admin_update_table_record( &self, name: &str, id: &str, body: &Value, ) -> Result<Value, Error>

Update a table record — PUT /admin/api/data/tables/{name}/records/{id}

Source

pub async fn admin_delete_table_record( &self, name: &str, id: &str, ) -> Result<Value, Error>

Delete a table record — DELETE /admin/api/data/tables/{name}/records/{id}

Source

pub async fn admin_list_users(&self) -> Result<Value, Error>

List users via D1 index — GET /admin/api/data/users

Source

pub async fn admin_create_user(&self, body: &Value) -> Result<Value, Error>

Create a new user — POST /admin/api/data/users

Source

pub async fn admin_get_user(&self, id: &str) -> Result<Value, Error>

Fetch a single user by ID — GET /admin/api/data/users/{id}

Source

pub async fn admin_update_user( &self, id: &str, body: &Value, ) -> Result<Value, Error>

Update user status or role — PUT /admin/api/data/users/{id}

Source

pub async fn admin_delete_user(&self, id: &str) -> Result<Value, Error>

Delete a user completely — DELETE /admin/api/data/users/{id}

Source

pub async fn admin_get_user_profile(&self, id: &str) -> Result<Value, Error>

Fetch user profile with cache — GET /admin/api/data/users/{id}/profile

Source

pub async fn admin_delete_user_sessions(&self, id: &str) -> Result<Value, Error>

Revoke all user sessions — DELETE /admin/api/data/users/{id}/sessions

Source

pub async fn admin_cleanup_anon(&self) -> Result<Value, Error>

Cleanup anonymous user index — POST /admin/api/data/cleanup-anon

Source

pub async fn admin_list_buckets(&self) -> Result<Value, Error>

List configured storage buckets — GET /admin/api/data/storage/buckets

Source

pub async fn admin_list_bucket_objects( &self, name: &str, ) -> Result<Value, Error>

List objects in a storage bucket — GET /admin/api/data/storage/buckets/{name}/objects

Source

pub async fn admin_get_bucket_object( &self, name: &str, key: &str, ) -> Result<Value, Error>

Get a storage object content — GET /admin/api/data/storage/buckets/{name}/objects/{key}

Source

pub async fn admin_delete_bucket_object( &self, name: &str, key: &str, ) -> Result<Value, Error>

Delete a storage object — DELETE /admin/api/data/storage/buckets/{name}/objects/{key}

Source

pub async fn admin_get_bucket_stats(&self, name: &str) -> Result<Value, Error>

Get bucket statistics (total objects and size) — GET /admin/api/data/storage/buckets/{name}/stats

Source

pub async fn admin_create_signed_url( &self, name: &str, body: &Value, ) -> Result<Value, Error>

Create a signed download URL for a storage object — POST /admin/api/data/storage/buckets/{name}/signed-url

Source

pub async fn admin_get_schema(&self) -> Result<Value, Error>

Get full schema structure from config — GET /admin/api/data/schema

Source

pub async fn admin_list_namespace_instances( &self, namespace: &str, query: &HashMap<String, String>, ) -> Result<Value, Error>

List instance suggestions for a dynamic namespace — GET /admin/api/data/namespaces/{namespace}/instances

Source

pub async fn admin_export_table(&self, name: &str) -> Result<Value, Error>

Export table data as JSON — GET /admin/api/data/tables/{name}/export

Source

pub async fn admin_get_logs(&self) -> Result<Value, Error>

Get request logs — GET /admin/api/data/logs

Source

pub async fn admin_get_monitoring(&self) -> Result<Value, Error>

Get live monitoring stats — GET /admin/api/data/monitoring

Source

pub async fn admin_get_analytics( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Get analytics dashboard data — GET /admin/api/data/analytics

Source

pub async fn admin_get_analytics_events(&self) -> Result<Value, Error>

Query analytics events for admin dashboard — GET /admin/api/data/analytics/events

Source

pub async fn admin_get_overview( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Get project overview for dashboard home — GET /admin/api/data/overview

Source

pub async fn admin_get_dev_info(&self) -> Result<Value, Error>

Get dev mode status and sidecar port — GET /admin/api/data/dev-info

Source

pub async fn admin_execute_sql(&self, body: &Value) -> Result<Value, Error>

Execute raw SQL query — POST /admin/api/data/sql

Source

pub async fn admin_import_table( &self, name: &str, body: &Value, ) -> Result<Value, Error>

Batch import records into a table — POST /admin/api/data/tables/{name}/import

Source

pub async fn admin_rules_test(&self, body: &Value) -> Result<Value, Error>

Evaluate access rules with simulated auth context — POST /admin/api/data/rules-test

Source

pub async fn admin_list_functions(&self) -> Result<Value, Error>

List registered functions from config — GET /admin/api/data/functions

Source

pub async fn admin_get_config_info(&self) -> Result<Value, Error>

Get environment and config overview — GET /admin/api/data/config-info

Source

pub async fn admin_get_recent_logs(&self) -> Result<Value, Error>

Get recent request logs with filtering — GET /admin/api/data/logs/recent

Source

pub async fn admin_get_auth_settings(&self) -> Result<Value, Error>

Get OAuth provider config — GET /admin/api/data/auth/settings

Source

pub async fn admin_get_email_templates(&self) -> Result<Value, Error>

Get email template and subject config — GET /admin/api/data/email/templates

Source

pub async fn admin_delete_user_mfa(&self, id: &str) -> Result<Value, Error>

Disable MFA for a user — DELETE /admin/api/data/users/{id}/mfa

Source

pub async fn admin_send_password_reset(&self, id: &str) -> Result<Value, Error>

Send password reset email for a user — POST /admin/api/data/users/{id}/send-password-reset

Source

pub async fn admin_upload_file( &self, name: &str, body: &Value, ) -> Result<Value, Error>

Upload file to R2 storage — POST /admin/api/data/storage/buckets/{name}/upload

Source

pub async fn admin_get_push_tokens(&self) -> Result<Value, Error>

List push tokens for a user — GET /admin/api/data/push/tokens

Source

pub async fn admin_get_push_logs(&self) -> Result<Value, Error>

Get push notification logs — GET /admin/api/data/push/logs

Source

pub async fn admin_test_push_send(&self, body: &Value) -> Result<Value, Error>

Test send push notification — POST /admin/api/data/push/test-send

Source

pub async fn admin_backup_list_dos(&self) -> Result<Value, Error>

List Durable Objects for backup — POST /admin/api/data/backup/list-dos

Source

pub async fn admin_backup_dump_do(&self, body: &Value) -> Result<Value, Error>

Dump a Durable Object for backup — POST /admin/api/data/backup/dump-do

Source

pub async fn admin_backup_restore_do( &self, body: &Value, ) -> Result<Value, Error>

Restore a Durable Object from backup — POST /admin/api/data/backup/restore-do

Source

pub async fn admin_backup_dump_d1(&self) -> Result<Value, Error>

Dump D1 database for backup — POST /admin/api/data/backup/dump-d1

Source

pub async fn admin_backup_restore_d1( &self, body: &Value, ) -> Result<Value, Error>

Restore D1 database from backup — POST /admin/api/data/backup/restore-d1

Source

pub async fn admin_backup_dump_data(&self, body: &Value) -> Result<Value, Error>

Dump data namespace tables for admin-side migrations — POST /admin/api/data/backup/dump-data

Source

pub async fn admin_backup_restore_data( &self, body: &Value, ) -> Result<Value, Error>

Restore data namespace tables for admin-side migrations — POST /admin/api/data/backup/restore-data

Source

pub async fn admin_backup_get_config(&self) -> Result<Value, Error>

Get backup config — GET /admin/api/data/backup/config

Source

pub async fn admin_list_admins(&self) -> Result<Value, Error>

List admin accounts — GET /admin/api/data/admins

Source

pub async fn admin_create_admin(&self, body: &Value) -> Result<Value, Error>

Create an admin account — POST /admin/api/data/admins

Source

pub async fn admin_delete_admin(&self, id: &str) -> Result<Value, Error>

Delete an admin account — DELETE /admin/api/data/admins/{id}

Source

pub async fn admin_change_password( &self, id: &str, body: &Value, ) -> Result<Value, Error>

Change admin password — PUT /admin/api/data/admins/{id}/password

Source

pub async fn admin_destroy_app(&self, body: &Value) -> Result<Value, Error>

Delete all Cloudflare resources and the Worker itself (self-destruct) — POST /admin/api/data/destroy-app

Source

pub async fn backup_list_dos(&self, body: &Value) -> Result<Value, Error>

List all DO instances — POST /admin/api/backup/list-dos

Source

pub async fn backup_get_config(&self) -> Result<Value, Error>

Return parsed config snapshot — GET /admin/api/backup/config

Source

pub async fn backup_cleanup_plugin(&self, body: &Value) -> Result<Value, Error>

Remove plugin-prefixed tables and migration metadata — POST /admin/api/backup/cleanup-plugin

Source

pub async fn backup_wipe_do(&self, body: &Value) -> Result<Value, Error>

Wipe a specific DO’s data — POST /admin/api/backup/wipe-do

Source

pub async fn backup_dump_do(&self, body: &Value) -> Result<Value, Error>

Dump a specific DO’s data — POST /admin/api/backup/dump-do

Source

pub async fn backup_restore_do(&self, body: &Value) -> Result<Value, Error>

Restore a specific DO’s data — POST /admin/api/backup/restore-do

Source

pub async fn backup_dump_d1(&self) -> Result<Value, Error>

Dump auth database tables — POST /admin/api/backup/dump-d1

Source

pub async fn backup_restore_d1(&self, body: &Value) -> Result<Value, Error>

Restore auth database tables — POST /admin/api/backup/restore-d1

Source

pub async fn backup_dump_control_d1(&self) -> Result<Value, Error>

Dump control-plane D1 tables — POST /admin/api/backup/dump-control-d1

Source

pub async fn backup_restore_control_d1( &self, body: &Value, ) -> Result<Value, Error>

Restore control-plane D1 tables — POST /admin/api/backup/restore-control-d1

Source

pub async fn backup_dump_data(&self, body: &Value) -> Result<Value, Error>

Dump all tables from a data namespace — POST /admin/api/backup/dump-data

Source

pub async fn backup_restore_data(&self, body: &Value) -> Result<Value, Error>

Restore all tables into a data namespace — POST /admin/api/backup/restore-data

Source

pub async fn backup_dump_storage( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Dump R2 storage (list or download) — POST /admin/api/backup/dump-storage

Source

pub async fn backup_restore_storage( &self, query: &HashMap<String, String>, ) -> Result<Value, Error>

Restore R2 storage (wipe or upload) — POST /admin/api/backup/restore-storage

Source

pub async fn backup_resync_users_public(&self) -> Result<Value, Error>

Resync _users_public from _users in AUTH_DB D1 — POST /admin/api/backup/resync-users-public

Source

pub async fn backup_export_table( &self, name: &str, query: &HashMap<String, String>, ) -> Result<Value, Error>

Export a single table as JSON — GET /admin/api/backup/export/{name}

Auto Trait Implementations§

§

impl<'a> Freeze for GeneratedAdminApi<'a>

§

impl<'a> !RefUnwindSafe for GeneratedAdminApi<'a>

§

impl<'a> Send for GeneratedAdminApi<'a>

§

impl<'a> Sync for GeneratedAdminApi<'a>

§

impl<'a> Unpin for GeneratedAdminApi<'a>

§

impl<'a> UnsafeUnpin for GeneratedAdminApi<'a>

§

impl<'a> !UnwindSafe for GeneratedAdminApi<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more