Skip to main content

UsersController

Struct UsersController 

Source
pub struct UsersController { /* private fields */ }

Implementations§

Source§

impl UsersController

Source

pub fn new(client: Arc<ApiClient>) -> Self

Source§

impl UsersController

Source

pub async fn create( &self, request: CreateUserRequestDto, ) -> Result<CreateUserResponseDto, ApiError>

POST /api/users - UsersController

Source§

impl UsersController

Source

pub async fn update( &self, request: UpdateUserRequestDto, ) -> Result<UpdateUserResponseDto, ApiError>

PATCH /api/users - UsersController

Source§

impl UsersController

Source

pub async fn get_all( &self, size: Option<u32>, start: Option<u32>, ) -> Result<GetAllUsersResponseDto, ApiError>

GET /api/users - UsersController

Source§

impl UsersController

Source

pub async fn delete( &self, uuid: Uuid, ) -> Result<DeleteUserResponseDto, ApiError>

DELETE /api/users/{uuid} - UsersController

Source§

impl UsersController

Source

pub async fn get_by_uuid( &self, uuid: Uuid, ) -> Result<GetUserByUuidResponseDto, ApiError>

GET /api/users/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_all_tags(&self) -> Result<GetAllTagsResponseDto, ApiError>

GET /api/users/tags - UsersController

Source§

impl UsersController

Source

pub async fn get_accessible_nodes( &self, uuid: Uuid, ) -> Result<GetUserAccessibleNodesResponseDto, ApiError>

GET /api/users/{}/accessible-nodes - UsersController

Source§

impl UsersController

Source

pub async fn get_subscription_request_history( &self, uuid: Uuid, ) -> Result<GetUserSubscriptionRequestHistoryResponseDto, ApiError>

GET /api/users/{}/subscription-request-history - UsersController

Source§

impl UsersController

Source

pub async fn get_by_short_uuid( &self, short_uuid: String, ) -> Result<GetUserByShortUuidResponseDto, ApiError>

GET /api/users/by-short-uuid/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_by_username( &self, username: String, ) -> Result<GetUserByUsernameResponseDto, ApiError>

GET /api/users/by-username/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_by_telegram_id( &self, telegram_id: String, ) -> Result<GetUserByTelegramIdResponseDto, ApiError>

GET /api/users/by-telegram-id/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_by_email( &self, email: String, ) -> Result<GetUserByEmailResponseDto, ApiError>

GET /api/users/by-email/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_by_tag( &self, tag: String, ) -> Result<GetUserByTagResponseDto, ApiError>

GET /api/users/by-tag/{} - UsersController

Source§

impl UsersController

Source

pub async fn revoke_subscription( &self, uuid: Uuid, request: RevokeUserSubscriptionBodyDto, ) -> Result<RevokeUserSubscriptionResponseDto, ApiError>

POST /api/users/{}/actions/revoke - UsersController

Source§

impl UsersController

Source

pub async fn disable( &self, uuid: Uuid, ) -> Result<DisableUserResponseDto, ApiError>

POST /api/users/{}/actions/disable - UsersController

Source§

impl UsersController

Source

pub async fn enable( &self, uuid: Uuid, ) -> Result<EnableUserResponseDto, ApiError>

POST /api/users/{}/actions/enable - UsersController

Source§

impl UsersController

Source

pub async fn reset_traffic( &self, uuid: Uuid, ) -> Result<ResetUserTrafficResponseDto, ApiError>

POST /api/users/{}/actions/reset-traffic - UsersController

Source§

impl UsersController

Source

pub async fn bulk_delete_by_status( &self, request: BulkDeleteUsersByStatusRequestDto, ) -> Result<BulkDeleteUsersByStatusResponseDto, ApiError>

POST /api/users/bulk/delete-by-status - UsersController

Source§

impl UsersController

Source

pub async fn bulk_delete( &self, request: BulkDeleteUsersRequestDto, ) -> Result<BulkDeleteUsersResponseDto, ApiError>

POST /api/users/bulk/delete - UsersController

Source§

impl UsersController

Source

pub async fn bulk_revoke_subscription( &self, request: BulkRevokeUsersSubscriptionRequestDto, ) -> Result<BulkRevokeUsersSubscriptionResponseDto, ApiError>

POST /api/users/bulk/revoke-subscription - UsersController

Source§

impl UsersController

Source

pub async fn bulk_reset_traffic( &self, request: BulkResetTrafficUsersRequestDto, ) -> Result<BulkResetTrafficUsersResponseDto, ApiError>

POST /api/users/bulk/reset-traffic - UsersController

Source§

impl UsersController

Source

pub async fn bulk_update( &self, request: BulkUpdateUsersRequestDto, ) -> Result<BulkUpdateUsersResponseDto, ApiError>

POST /api/users/bulk/update - UsersController

Source§

impl UsersController

Source

pub async fn bulk_update_internal_squads( &self, request: BulkUpdateUsersSquadsRequestDto, ) -> Result<BulkUpdateUsersSquadsResponseDto, ApiError>

POST /api/users/bulk/update-squads - UsersController

Source§

impl UsersController

Source

pub async fn bulk_update_all( &self, request: BulkAllUpdateUsersRequestDto, ) -> Result<BulkAllUpdateUsersResponseDto, ApiError>

POST /api/users/bulk/all/update - UsersController

Source§

impl UsersController

Source

pub async fn bulk_all_reset_traffic( &self, ) -> Result<BulkAllResetTrafficUsersResponseDto, ApiError>

POST /api/users/bulk/all/reset-traffic - UsersController

Source§

impl UsersController

Source

pub async fn get_usage_by_range( &self, uuid: Uuid, start: Option<String>, end: Option<String>, ) -> Result<GetUserUsageByRangeResponseDto, ApiError>

GET /api/users/stats/usage/{}/range - UsersController

Source§

impl UsersController

Source

pub async fn create_user( &self, request: CreateUserRequestDto, ) -> Result<CreateUserResponseDto, ApiError>

👎Deprecated:

Use create

POST /api/users - UsersController

Source§

impl UsersController

Source

pub async fn update_user( &self, request: UpdateUserRequestDto, ) -> Result<UpdateUserResponseDto, ApiError>

👎Deprecated:

Use update

PATCH /api/users - UsersController

Source§

impl UsersController

Source

pub async fn get_all_users( &self, size: Option<u32>, start: Option<u32>, ) -> Result<GetAllUsersResponseDto, ApiError>

👎Deprecated:

Use get_all

GET /api/users - UsersController

Source§

impl UsersController

Source

pub async fn delete_user( &self, uuid: Uuid, ) -> Result<DeleteUserResponseDto, ApiError>

👎Deprecated:

Use delete

DELETE /api/users/{uuid} - UsersController

Source§

impl UsersController

Source

pub async fn get_user_by_uuid( &self, uuid: Uuid, ) -> Result<GetUserByUuidResponseDto, ApiError>

👎Deprecated:

Use get_by_uuid

GET /api/users/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_all_tags_deprecated( &self, ) -> Result<GetAllTagsResponseDto, ApiError>

👎Deprecated:

Use get_all_tags

GET /api/users/tags - UsersController

Source§

impl UsersController

Source

pub async fn get_user_accessible_nodes( &self, uuid: Uuid, ) -> Result<GetUserAccessibleNodesResponseDto, ApiError>

👎Deprecated:

Use get_accessible_nodes

GET /api/users/{}/accessible-nodes - UsersController

Source§

impl UsersController

Source

pub async fn get_user_subscription_request_history( &self, uuid: Uuid, ) -> Result<GetUserSubscriptionRequestHistoryResponseDto, ApiError>

👎Deprecated:

Use get_subscription_request_history

GET /api/users/{}/subscription-request-history - UsersController

Source§

impl UsersController

Source

pub async fn get_user_by_short_uuid( &self, short_uuid: String, ) -> Result<GetUserByShortUuidResponseDto, ApiError>

👎Deprecated:

Use get_by_short_uuid

GET /api/users/by-short-uuid/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_user_by_username( &self, username: String, ) -> Result<GetUserByUsernameResponseDto, ApiError>

👎Deprecated:

Use get_by_username

GET /api/users/by-username/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_user_by_telegram_id( &self, telegram_id: String, ) -> Result<GetUserByTelegramIdResponseDto, ApiError>

👎Deprecated:

Use get_by_telegram_id

GET /api/users/by-telegram-id/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_users_by_email( &self, email: String, ) -> Result<GetUserByEmailResponseDto, ApiError>

👎Deprecated:

Use get_by_email

GET /api/users/by-email/{} - UsersController

Source§

impl UsersController

Source

pub async fn get_users_by_tag( &self, tag: String, ) -> Result<GetUserByTagResponseDto, ApiError>

👎Deprecated:

Use get_by_tag

GET /api/users/by-tag/{} - UsersController

Source§

impl UsersController

Source

pub async fn revoke_user_subscription( &self, uuid: Uuid, request: RevokeUserSubscriptionBodyDto, ) -> Result<RevokeUserSubscriptionResponseDto, ApiError>

👎Deprecated:

Use revoke_subscription

POST /api/users/{}/actions/revoke - UsersController

Source§

impl UsersController

Source

pub async fn disable_user( &self, uuid: Uuid, ) -> Result<DisableUserResponseDto, ApiError>

👎Deprecated:

Use disable

POST /api/users/{}/actions/disable - UsersController

Source§

impl UsersController

Source

pub async fn enable_user( &self, uuid: Uuid, ) -> Result<EnableUserResponseDto, ApiError>

👎Deprecated:

Use enable

POST /api/users/{}/actions/enable - UsersController

Source§

impl UsersController

Source

pub async fn reset_user_traffic( &self, uuid: Uuid, ) -> Result<ResetUserTrafficResponseDto, ApiError>

👎Deprecated:

Use reset_traffic

POST /api/users/{}/actions/reset-traffic - UsersController

Source§

impl UsersController

Source

pub async fn bulk_delete_users_by_status( &self, request: BulkDeleteUsersByStatusRequestDto, ) -> Result<BulkDeleteUsersByStatusResponseDto, ApiError>

👎Deprecated:

Use bulk_delete_by_status

POST /api/users/bulk/delete-by-status - UsersController

Source§

impl UsersController

Source

pub async fn bulk_delete_users( &self, request: BulkDeleteUsersRequestDto, ) -> Result<BulkDeleteUsersResponseDto, ApiError>

👎Deprecated:

Use bulk_delete

POST /api/users/bulk/delete - UsersController

Source§

impl UsersController

Source

pub async fn bulk_revoke_users_subscription( &self, request: BulkRevokeUsersSubscriptionRequestDto, ) -> Result<BulkRevokeUsersSubscriptionResponseDto, ApiError>

👎Deprecated:

Use bulk_revoke_subscription

POST /api/users/bulk/revoke-subscription - UsersController

Source§

impl UsersController

Source

pub async fn bulk_reset_user_traffic( &self, request: BulkResetTrafficUsersRequestDto, ) -> Result<BulkResetTrafficUsersResponseDto, ApiError>

👎Deprecated:

Use bulk_reset_traffic

POST /api/users/bulk/reset-traffic - UsersController

Source§

impl UsersController

Source

pub async fn bulk_update_users( &self, request: BulkUpdateUsersRequestDto, ) -> Result<BulkUpdateUsersResponseDto, ApiError>

👎Deprecated:

Use bulk_update

POST /api/users/bulk/update - UsersController

Source§

impl UsersController

Source

pub async fn bulk_update_users_internal_squads( &self, request: BulkUpdateUsersSquadsRequestDto, ) -> Result<BulkUpdateUsersSquadsResponseDto, ApiError>

👎Deprecated:

Use bulk_update_internal_squads

POST /api/users/bulk/update-squads - UsersController

Source§

impl UsersController

Source

pub async fn bulk_update_all_users( &self, request: BulkAllUpdateUsersRequestDto, ) -> Result<BulkAllUpdateUsersResponseDto, ApiError>

👎Deprecated:

Use bulk_update_all

POST /api/users/bulk/all/update - UsersController

Source§

impl UsersController

Source

pub async fn bulk_all_reset_user_traffic( &self, ) -> Result<BulkAllResetTrafficUsersResponseDto, ApiError>

👎Deprecated:

Use bulk_all_reset_traffic

POST /api/users/bulk/all/reset-traffic - UsersController

Source§

impl UsersController

Source

pub async fn get_user_usage_by_range( &self, uuid: Uuid, start: Option<String>, end: Option<String>, ) -> Result<GetUserUsageByRangeResponseDto, ApiError>

👎Deprecated:

Use get_usage_by_range

GET /api/users/stats/usage/{}/range - UsersController

Auto Trait Implementations§

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: Sized + 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: Sized + 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, 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<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