Skip to main content

GeneratedDbApi

Struct GeneratedDbApi 

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

Auto-generated API methods.

Implementations§

Source§

impl<'a> GeneratedDbApi<'a>

Source

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

Source

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

Health check — GET /api/health

Source

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

Sign up with email and password — POST /api/auth/signup

Source

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

Sign in with email and password — POST /api/auth/signin

Source

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

Sign in anonymously — POST /api/auth/signin/anonymous

Send magic link to email — POST /api/auth/signin/magic-link

Verify magic link token — POST /api/auth/verify-magic-link

Source

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

Send OTP SMS to phone number — POST /api/auth/signin/phone

Source

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

Verify phone OTP and create session — POST /api/auth/verify-phone

Link phone number to existing account — POST /api/auth/link/phone

Verify OTP and link phone to account — POST /api/auth/verify-link-phone

Source

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

Send OTP code to email — POST /api/auth/signin/email-otp

Source

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

Verify email OTP and create session — POST /api/auth/verify-email-otp

Source

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

Enroll new TOTP factor — POST /api/auth/mfa/totp/enroll

Source

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

Confirm TOTP enrollment with code — POST /api/auth/mfa/totp/verify

Source

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

Verify MFA code during signin — POST /api/auth/mfa/verify

Source

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

Use recovery code during MFA signin — POST /api/auth/mfa/recovery

Source

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

Disable TOTP factor — DELETE /api/auth/mfa/totp

Source

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

List MFA factors for authenticated user — GET /api/auth/mfa/factors

Source

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

Refresh access token — POST /api/auth/refresh

Source

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

Sign out and revoke refresh token — POST /api/auth/signout

Source

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

Change password for authenticated user — POST /api/auth/change-password

Source

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

Request email change with password confirmation — POST /api/auth/change-email

Source

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

Verify email change token — POST /api/auth/verify-email-change

Source

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

Generate passkey registration options — POST /api/auth/passkeys/register-options

Source

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

Verify and store passkey registration — POST /api/auth/passkeys/register

Source

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

Generate passkey authentication options — POST /api/auth/passkeys/auth-options

Source

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

Authenticate with passkey — POST /api/auth/passkeys/authenticate

Source

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

List passkeys for authenticated user — GET /api/auth/passkeys

Source

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

Delete a passkey — DELETE /api/auth/passkeys/{credentialId}

Source

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

Get current authenticated user info — GET /api/auth/me

Source

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

Update user profile — PATCH /api/auth/profile

Source

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

List active sessions — GET /api/auth/sessions

Source

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

Delete a session — DELETE /api/auth/sessions/{id}

Source

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

List linked sign-in identities for the current user — GET /api/auth/identities

Source

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

Unlink a linked sign-in identity — DELETE /api/auth/identities/{identityId}

Link email and password to existing account — POST /api/auth/link/email

Source

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

Send a verification email to the current authenticated user — POST /api/auth/request-email-verification

Source

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

Verify email address with token — POST /api/auth/verify-email

Source

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

Request password reset email — POST /api/auth/request-password-reset

Source

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

Reset password with token — POST /api/auth/reset-password

Source

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

Start OAuth redirect — GET /api/auth/oauth/{provider}

Source

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

OAuth callback — GET /api/auth/oauth/{provider}/callback

Start OAuth account linking — POST /api/auth/oauth/link/{provider}

OAuth link callback — GET /api/auth/oauth/link/{provider}/callback

Source

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

Count records in a single-instance table — GET /api/db/{namespace}/tables/{table}/count

Source

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

Search records in a single-instance table — GET /api/db/{namespace}/tables/{table}/search

Source

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

Get a single record from a single-instance table — GET /api/db/{namespace}/tables/{table}/{id}

Source

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

Update a record in a single-instance table — PATCH /api/db/{namespace}/tables/{table}/{id}

Source

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

Delete a record from a single-instance table — DELETE /api/db/{namespace}/tables/{table}/{id}

Source

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

List records from a single-instance table — GET /api/db/{namespace}/tables/{table}

Source

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

Insert a record into a single-instance table — POST /api/db/{namespace}/tables/{table}

Source

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

Batch insert records into a single-instance table — POST /api/db/{namespace}/tables/{table}/batch

Source

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

Batch update/delete records by filter in a single-instance table — POST /api/db/{namespace}/tables/{table}/batch-by-filter

Source

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

Count records in dynamic table — GET /api/db/{namespace}/{instanceId}/tables/{table}/count

Source

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

Search records in dynamic table — GET /api/db/{namespace}/{instanceId}/tables/{table}/search

Source

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

Get single record from dynamic table — GET /api/db/{namespace}/{instanceId}/tables/{table}/{id}

Source

pub async fn db_update_record( &self, namespace: &str, instance_id: &str, table: &str, id: &str, body: &Value, ) -> Result<Value, Error>

Update record in dynamic table — PATCH /api/db/{namespace}/{instanceId}/tables/{table}/{id}

Source

pub async fn db_delete_record( &self, namespace: &str, instance_id: &str, table: &str, id: &str, ) -> Result<Value, Error>

Delete record from dynamic table — DELETE /api/db/{namespace}/{instanceId}/tables/{table}/{id}

Source

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

List records from dynamic table — GET /api/db/{namespace}/{instanceId}/tables/{table}

Source

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

Insert record into dynamic table — POST /api/db/{namespace}/{instanceId}/tables/{table}

Source

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

Batch insert records into dynamic table — POST /api/db/{namespace}/{instanceId}/tables/{table}/batch

Source

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

Batch update/delete records by filter in dynamic table — POST /api/db/{namespace}/{instanceId}/tables/{table}/batch-by-filter

Source

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

Check database live subscription WebSocket prerequisites — GET /api/db/connect-check

Source

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

Connect to database live subscriptions WebSocket — GET /api/db/subscribe

Source

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

Get table schema — GET /api/schema

Source

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

Upload file — POST /api/storage/{bucket}/upload

Source

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

Get file metadata — GET /api/storage/{bucket}/{key}/metadata

Source

pub async fn update_file_metadata( &self, bucket: &str, key: &str, body: &Value, ) -> Result<Value, Error>

Update file metadata — PATCH /api/storage/{bucket}/{key}/metadata

Source

pub async fn check_file_exists( &self, bucket: &str, key: &str, ) -> Result<bool, Error>

Check if file exists — HEAD /api/storage/{bucket}/{key}

Source

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

Download file — GET /api/storage/{bucket}/{key}

Source

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

Delete file — DELETE /api/storage/{bucket}/{key}

Source

pub async fn get_upload_parts( &self, bucket: &str, upload_id: &str, query: &HashMap<String, String>, ) -> Result<Value, Error>

Get uploaded parts — GET /api/storage/{bucket}/uploads/{uploadId}/parts

Source

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

List files in bucket — GET /api/storage/{bucket}

Source

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

Batch delete files — POST /api/storage/{bucket}/delete-batch

Source

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

Create signed download URL — POST /api/storage/{bucket}/signed-url

Source

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

Batch create signed download URLs — POST /api/storage/{bucket}/signed-urls

Source

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

Create signed upload URL — POST /api/storage/{bucket}/signed-upload-url

Source

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

Start multipart upload — POST /api/storage/{bucket}/multipart/create

Source

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

Upload a part — POST /api/storage/{bucket}/multipart/upload-part

Source

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

Complete multipart upload — POST /api/storage/{bucket}/multipart/complete

Source

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

Abort multipart upload — POST /api/storage/{bucket}/multipart/abort

Source

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

Get public configuration — GET /api/config

Source

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

Register push token — POST /api/push/register

Source

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

Unregister push token — POST /api/push/unregister

Source

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

Subscribe token to topic — POST /api/push/topic/subscribe

Source

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

Unsubscribe token from topic — POST /api/push/topic/unsubscribe

Source

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

Check room WebSocket connection prerequisites — GET /api/room/connect-check

Source

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

Connect to room WebSocket — GET /api/room

Source

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

Get room metadata — GET /api/room/metadata

Source

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

Get the active room realtime media session — GET /api/room/media/realtime/session

Source

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

Create a room realtime media session — POST /api/room/media/realtime/session

Source

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

Generate TURN / ICE credentials for room realtime media — POST /api/room/media/realtime/turn

Source

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

Add realtime media tracks to a room session — POST /api/room/media/realtime/tracks/new

Source

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

Renegotiate a room realtime media session — PUT /api/room/media/realtime/renegotiate

Source

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

Close room realtime media tracks — PUT /api/room/media/realtime/tracks/close

Source

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

Create a room Cloudflare RealtimeKit session — POST /api/room/media/cloudflare_realtimekit/session

Source

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

Track custom events — POST /api/analytics/track

Auto Trait Implementations§

§

impl<'a> Freeze for GeneratedDbApi<'a>

§

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

§

impl<'a> Send for GeneratedDbApi<'a>

§

impl<'a> Sync for GeneratedDbApi<'a>

§

impl<'a> Unpin for GeneratedDbApi<'a>

§

impl<'a> UnsafeUnpin for GeneratedDbApi<'a>

§

impl<'a> !UnwindSafe for GeneratedDbApi<'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