pub struct Client { /* private fields */ }Expand description
Client for Hindclaw API
Access control API for Hindsight memory server
Version: 0.1.0
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub async fn list_template_sources<'a>(
&'a self,
) -> Result<ResponseValue<Vec<SourceResponse>>, Error<()>>
pub async fn list_template_sources<'a>( &'a self, ) -> Result<ResponseValue<Vec<SourceResponse>>, Error<()>>
List Template Sources
List all configured marketplace sources.
Sends a GET request to /ext/hindclaw/admin/template-sources
Sourcepub async fn create_template_source<'a>(
&'a self,
body: &'a CreateSourceRequest,
) -> Result<ResponseValue<SourceResponse>, Error<HttpValidationError>>
pub async fn create_template_source<'a>( &'a self, body: &'a CreateSourceRequest, ) -> Result<ResponseValue<SourceResponse>, Error<HttpValidationError>>
Create Template Source
Register a trusted marketplace source.
Sends a POST request to /ext/hindclaw/admin/template-sources
Sourcepub async fn delete_template_source<'a>(
&'a self,
name: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_template_source<'a>( &'a self, name: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Template Source
Remove a trusted marketplace source.
Sends a DELETE request to /ext/hindclaw/admin/template-sources/{name}
Sourcepub async fn create_bank_from_template<'a>(
&'a self,
body: &'a CreateBankFromTemplateRequest,
) -> Result<ResponseValue<BankCreationResponse>, Error<HttpValidationError>>
pub async fn create_bank_from_template<'a>( &'a self, body: &'a CreateBankFromTemplateRequest, ) -> Result<ResponseValue<BankCreationResponse>, Error<HttpValidationError>>
Create Bank From Template
Create a bank from an installed template.
Sends a POST request to /ext/hindclaw/banks
Sourcepub async fn get_bank_policy<'a>(
&'a self,
bank_id: &'a str,
) -> Result<ResponseValue<BankPolicyResponse>, Error<HttpValidationError>>
pub async fn get_bank_policy<'a>( &'a self, bank_id: &'a str, ) -> Result<ResponseValue<BankPolicyResponse>, Error<HttpValidationError>>
Get Bank Policy Endpoint
Sends a GET request to /ext/hindclaw/banks/{bank_id}/policy
Sourcepub async fn upsert_bank_policy<'a>(
&'a self,
bank_id: &'a str,
body: &'a UpsertBankPolicyRequest,
) -> Result<ResponseValue<BankPolicyResponse>, Error<HttpValidationError>>
pub async fn upsert_bank_policy<'a>( &'a self, bank_id: &'a str, body: &'a UpsertBankPolicyRequest, ) -> Result<ResponseValue<BankPolicyResponse>, Error<HttpValidationError>>
Upsert Bank Policy Endpoint
Sends a PUT request to /ext/hindclaw/banks/{bank_id}/policy
Sourcepub async fn delete_bank_policy<'a>(
&'a self,
bank_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_bank_policy<'a>( &'a self, bank_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Bank Policy Endpoint
Sends a DELETE request to /ext/hindclaw/banks/{bank_id}/policy
Sourcepub async fn debug_resolve<'a>(
&'a self,
action: Option<&'a str>,
bank: &'a str,
sa_id: Option<&'a str>,
sender: Option<&'a str>,
user_id: Option<&'a str>,
) -> Result<ResponseValue<Value>, Error<HttpValidationError>>
pub async fn debug_resolve<'a>( &'a self, action: Option<&'a str>, bank: &'a str, sa_id: Option<&'a str>, sender: Option<&'a str>, user_id: Option<&'a str>, ) -> Result<ResponseValue<Value>, Error<HttpValidationError>>
Debug Resolve
Resolve and return effective access policy + bank policy for a context.
Sends a GET request to /ext/hindclaw/debug/resolve
Sourcepub async fn list_groups<'a>(
&'a self,
) -> Result<ResponseValue<Vec<GroupSummaryResponse>>, Error<()>>
pub async fn list_groups<'a>( &'a self, ) -> Result<ResponseValue<Vec<GroupSummaryResponse>>, Error<()>>
List Groups
Sends a GET request to /ext/hindclaw/groups
Sourcepub async fn create_group<'a>(
&'a self,
body: &'a CreateGroupRequest,
) -> Result<ResponseValue<GroupSummaryResponse>, Error<HttpValidationError>>
pub async fn create_group<'a>( &'a self, body: &'a CreateGroupRequest, ) -> Result<ResponseValue<GroupSummaryResponse>, Error<HttpValidationError>>
Create Group
Sends a POST request to /ext/hindclaw/groups
Sourcepub async fn get_group<'a>(
&'a self,
group_id: &'a str,
) -> Result<ResponseValue<GroupSummaryResponse>, Error<HttpValidationError>>
pub async fn get_group<'a>( &'a self, group_id: &'a str, ) -> Result<ResponseValue<GroupSummaryResponse>, Error<HttpValidationError>>
Get Group
Sends a GET request to /ext/hindclaw/groups/{group_id}
Sourcepub async fn update_group<'a>(
&'a self,
group_id: &'a str,
body: &'a UpdateGroupRequest,
) -> Result<ResponseValue<GroupSummaryResponse>, Error<HttpValidationError>>
pub async fn update_group<'a>( &'a self, group_id: &'a str, body: &'a UpdateGroupRequest, ) -> Result<ResponseValue<GroupSummaryResponse>, Error<HttpValidationError>>
Update Group
Sends a PUT request to /ext/hindclaw/groups/{group_id}
Sourcepub async fn delete_group<'a>(
&'a self,
group_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_group<'a>( &'a self, group_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Group
Sends a DELETE request to /ext/hindclaw/groups/{group_id}
Sourcepub async fn list_group_members<'a>(
&'a self,
group_id: &'a str,
) -> Result<ResponseValue<Vec<GroupMemberResponse>>, Error<HttpValidationError>>
pub async fn list_group_members<'a>( &'a self, group_id: &'a str, ) -> Result<ResponseValue<Vec<GroupMemberResponse>>, Error<HttpValidationError>>
List Group Members
Sends a GET request to /ext/hindclaw/groups/{group_id}/members
Sourcepub async fn add_group_member<'a>(
&'a self,
group_id: &'a str,
body: &'a AddMemberRequest,
) -> Result<ResponseValue<GroupMembershipConfirmation>, Error<HttpValidationError>>
pub async fn add_group_member<'a>( &'a self, group_id: &'a str, body: &'a AddMemberRequest, ) -> Result<ResponseValue<GroupMembershipConfirmation>, Error<HttpValidationError>>
Add Group Member
Sends a POST request to /ext/hindclaw/groups/{group_id}/members
Sourcepub async fn remove_group_member<'a>(
&'a self,
group_id: &'a str,
user_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn remove_group_member<'a>( &'a self, group_id: &'a str, user_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Remove Group Member
Sends a DELETE request to /ext/hindclaw/groups/{group_id}/members/{user_id}
Sourcepub async fn marketplace_search<'a>(
&'a self,
q: Option<&'a str>,
source: Option<&'a str>,
tag: Option<&'a str>,
) -> Result<ResponseValue<MarketplaceSearchResponse>, Error<HttpValidationError>>
pub async fn marketplace_search<'a>( &'a self, q: Option<&'a str>, source: Option<&'a str>, tag: Option<&'a str>, ) -> Result<ResponseValue<MarketplaceSearchResponse>, Error<HttpValidationError>>
Marketplace Search
Search marketplace templates across configured sources.
Sends a GET request to /ext/hindclaw/marketplace/search
Arguments:
q: Search querysource: Filter by source nametag: Filter by tag
Sourcepub async fn list_my_service_accounts<'a>(
&'a self,
) -> Result<ResponseValue<Vec<ServiceAccountResponse>>, Error<()>>
pub async fn list_my_service_accounts<'a>( &'a self, ) -> Result<ResponseValue<Vec<ServiceAccountResponse>>, Error<()>>
List My Service Accounts
Sends a GET request to /ext/hindclaw/me/service-accounts
Sourcepub async fn create_my_service_account<'a>(
&'a self,
body: &'a CreateSelfServiceAccountRequest,
) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
pub async fn create_my_service_account<'a>( &'a self, body: &'a CreateSelfServiceAccountRequest, ) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
Create My Service Account
Sends a POST request to /ext/hindclaw/me/service-accounts
Sourcepub async fn get_my_service_account<'a>(
&'a self,
sa_id: &'a str,
) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
pub async fn get_my_service_account<'a>( &'a self, sa_id: &'a str, ) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
Get My Service Account
Sends a GET request to /ext/hindclaw/me/service-accounts/{sa_id}
Sourcepub async fn update_my_service_account<'a>(
&'a self,
sa_id: &'a str,
body: &'a UpdateSelfServiceAccountRequest,
) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
pub async fn update_my_service_account<'a>( &'a self, sa_id: &'a str, body: &'a UpdateSelfServiceAccountRequest, ) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
Update My Service Account
Sends a PUT request to /ext/hindclaw/me/service-accounts/{sa_id}
Sourcepub async fn delete_my_service_account<'a>(
&'a self,
sa_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_my_service_account<'a>( &'a self, sa_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete My Service Account
Sends a DELETE request to /ext/hindclaw/me/service-accounts/{sa_id}
Sourcepub async fn list_my_sa_keys<'a>(
&'a self,
sa_id: &'a str,
) -> Result<ResponseValue<Vec<SaKeyResponse>>, Error<HttpValidationError>>
pub async fn list_my_sa_keys<'a>( &'a self, sa_id: &'a str, ) -> Result<ResponseValue<Vec<SaKeyResponse>>, Error<HttpValidationError>>
List My Sa Keys
Sends a GET request to /ext/hindclaw/me/service-accounts/{sa_id}/keys
Sourcepub async fn create_my_sa_key<'a>(
&'a self,
sa_id: &'a str,
body: &'a CreateSaKeyRequest,
) -> Result<ResponseValue<SaKeyCreateResponse>, Error<HttpValidationError>>
pub async fn create_my_sa_key<'a>( &'a self, sa_id: &'a str, body: &'a CreateSaKeyRequest, ) -> Result<ResponseValue<SaKeyCreateResponse>, Error<HttpValidationError>>
Create My Sa Key
Sends a POST request to /ext/hindclaw/me/service-accounts/{sa_id}/keys
Sourcepub async fn delete_my_sa_key<'a>(
&'a self,
sa_id: &'a str,
key_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_my_sa_key<'a>( &'a self, sa_id: &'a str, key_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete My Sa Key
Sends a DELETE request to /ext/hindclaw/me/service-accounts/{sa_id}/keys/{key_id}
Sourcepub async fn list_policies<'a>(
&'a self,
) -> Result<ResponseValue<Vec<PolicyResponse>>, Error<()>>
pub async fn list_policies<'a>( &'a self, ) -> Result<ResponseValue<Vec<PolicyResponse>>, Error<()>>
List Policies
Sends a GET request to /ext/hindclaw/policies
Sourcepub async fn create_policy<'a>(
&'a self,
body: &'a CreatePolicyRequest,
) -> Result<ResponseValue<PolicyResponse>, Error<HttpValidationError>>
pub async fn create_policy<'a>( &'a self, body: &'a CreatePolicyRequest, ) -> Result<ResponseValue<PolicyResponse>, Error<HttpValidationError>>
Create Policy
Sends a POST request to /ext/hindclaw/policies
Sourcepub async fn get_policy<'a>(
&'a self,
policy_id: &'a str,
) -> Result<ResponseValue<PolicyResponse>, Error<HttpValidationError>>
pub async fn get_policy<'a>( &'a self, policy_id: &'a str, ) -> Result<ResponseValue<PolicyResponse>, Error<HttpValidationError>>
Get Policy Endpoint
Sends a GET request to /ext/hindclaw/policies/{policy_id}
Sourcepub async fn update_policy<'a>(
&'a self,
policy_id: &'a str,
body: &'a UpdatePolicyRequest,
) -> Result<ResponseValue<PolicyResponse>, Error<HttpValidationError>>
pub async fn update_policy<'a>( &'a self, policy_id: &'a str, body: &'a UpdatePolicyRequest, ) -> Result<ResponseValue<PolicyResponse>, Error<HttpValidationError>>
Update Policy Endpoint
Sends a PUT request to /ext/hindclaw/policies/{policy_id}
Sourcepub async fn delete_policy<'a>(
&'a self,
policy_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_policy<'a>( &'a self, policy_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Policy Endpoint
Sends a DELETE request to /ext/hindclaw/policies/{policy_id}
Sourcepub async fn list_policy_attachments<'a>(
&'a self,
policy_id: &'a str,
) -> Result<ResponseValue<Vec<PolicyAttachmentResponse>>, Error<HttpValidationError>>
pub async fn list_policy_attachments<'a>( &'a self, policy_id: &'a str, ) -> Result<ResponseValue<Vec<PolicyAttachmentResponse>>, Error<HttpValidationError>>
List Attachments
Sends a GET request to /ext/hindclaw/policy-attachments
Sourcepub async fn upsert_policy_attachment<'a>(
&'a self,
body: &'a CreatePolicyAttachmentRequest,
) -> Result<ResponseValue<PolicyAttachmentResponse>, Error<HttpValidationError>>
pub async fn upsert_policy_attachment<'a>( &'a self, body: &'a CreatePolicyAttachmentRequest, ) -> Result<ResponseValue<PolicyAttachmentResponse>, Error<HttpValidationError>>
Upsert Attachment
Sends a PUT request to /ext/hindclaw/policy-attachments
Sourcepub async fn delete_policy_attachment<'a>(
&'a self,
policy_id: &'a str,
principal_type: &'a str,
principal_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_policy_attachment<'a>( &'a self, policy_id: &'a str, principal_type: &'a str, principal_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Attachment
Sends a DELETE request to /ext/hindclaw/policy-attachments/{policy_id}/{principal_type}/{principal_id}
Sourcepub async fn list_service_accounts<'a>(
&'a self,
) -> Result<ResponseValue<Vec<ServiceAccountResponse>>, Error<()>>
pub async fn list_service_accounts<'a>( &'a self, ) -> Result<ResponseValue<Vec<ServiceAccountResponse>>, Error<()>>
List Service Accounts
Sends a GET request to /ext/hindclaw/service-accounts
Sourcepub async fn create_service_account<'a>(
&'a self,
body: &'a CreateServiceAccountRequest,
) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
pub async fn create_service_account<'a>( &'a self, body: &'a CreateServiceAccountRequest, ) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
Create Service Account
Sends a POST request to /ext/hindclaw/service-accounts
Sourcepub async fn get_service_account<'a>(
&'a self,
sa_id: &'a str,
) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
pub async fn get_service_account<'a>( &'a self, sa_id: &'a str, ) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
Get Service Account Endpoint
Sends a GET request to /ext/hindclaw/service-accounts/{sa_id}
Sourcepub async fn update_service_account<'a>(
&'a self,
sa_id: &'a str,
body: &'a UpdateServiceAccountRequest,
) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
pub async fn update_service_account<'a>( &'a self, sa_id: &'a str, body: &'a UpdateServiceAccountRequest, ) -> Result<ResponseValue<ServiceAccountResponse>, Error<HttpValidationError>>
Update Service Account Endpoint
Sends a PUT request to /ext/hindclaw/service-accounts/{sa_id}
Sourcepub async fn delete_service_account<'a>(
&'a self,
sa_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_service_account<'a>( &'a self, sa_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Service Account Endpoint
Sends a DELETE request to /ext/hindclaw/service-accounts/{sa_id}
Sourcepub async fn list_sa_keys<'a>(
&'a self,
sa_id: &'a str,
) -> Result<ResponseValue<Vec<SaKeyResponse>>, Error<HttpValidationError>>
pub async fn list_sa_keys<'a>( &'a self, sa_id: &'a str, ) -> Result<ResponseValue<Vec<SaKeyResponse>>, Error<HttpValidationError>>
List Sa Keys
Sends a GET request to /ext/hindclaw/service-accounts/{sa_id}/keys
Sourcepub async fn create_sa_key<'a>(
&'a self,
sa_id: &'a str,
body: &'a CreateSaKeyRequest,
) -> Result<ResponseValue<SaKeyCreateResponse>, Error<HttpValidationError>>
pub async fn create_sa_key<'a>( &'a self, sa_id: &'a str, body: &'a CreateSaKeyRequest, ) -> Result<ResponseValue<SaKeyCreateResponse>, Error<HttpValidationError>>
Create Sa Key
Sends a POST request to /ext/hindclaw/service-accounts/{sa_id}/keys
Sourcepub async fn delete_sa_key<'a>(
&'a self,
sa_id: &'a str,
key_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_sa_key<'a>( &'a self, sa_id: &'a str, key_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Sa Key
Sends a DELETE request to /ext/hindclaw/service-accounts/{sa_id}/keys/{key_id}
Sourcepub async fn list_templates<'a>(
&'a self,
scope: Option<&'a str>,
) -> Result<ResponseValue<Vec<TemplateSummaryResponse>>, Error<HttpValidationError>>
pub async fn list_templates<'a>( &'a self, scope: Option<&'a str>, ) -> Result<ResponseValue<Vec<TemplateSummaryResponse>>, Error<HttpValidationError>>
List Templates
List installed templates filtered by access.
When scope is None, returns all server templates plus the caller’s personal templates. When scope is specified, returns only that scope.
Args: scope: Optional scope filter (‘server’ or ‘personal’). principal: Authenticated principal from IAM.
Returns: List of template summaries.
Sends a GET request to /ext/hindclaw/templates
Sourcepub async fn create_template<'a>(
&'a self,
body: &'a CreateTemplateRequest,
) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
pub async fn create_template<'a>( &'a self, body: &'a CreateTemplateRequest, ) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
Create Template
Create a custom template (no marketplace source).
Args: request: Template creation payload. principal: Authenticated principal from IAM.
Returns: The created template.
Raises: HTTPException: 409 if template already exists.
Sends a POST request to /ext/hindclaw/templates
Sourcepub async fn install_template<'a>(
&'a self,
body: &'a InstallTemplateRequest,
) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
pub async fn install_template<'a>( &'a self, body: &'a InstallTemplateRequest, ) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
Install Template
Install a template from a registered marketplace source.
Sends a POST request to /ext/hindclaw/templates/install
Sourcepub async fn get_template<'a>(
&'a self,
scope: &'a str,
name: &'a str,
) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
pub async fn get_template<'a>( &'a self, scope: &'a str, name: &'a str, ) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
Get Template Endpoint
Get a template by scope and name.
Finds any template matching (scope, name) regardless of source. This covers both custom templates and marketplace-installed ones.
Args: scope: Template scope (‘server’ or ‘personal’). name: Template name. principal: Authenticated principal from IAM.
Returns: Full template details.
Raises: HTTPException: 404 if template not found.
Sends a GET request to /ext/hindclaw/templates/{scope}/{name}
Sourcepub async fn update_template<'a>(
&'a self,
scope: &'a str,
name: &'a str,
body: &'a UpdateTemplateRequest,
) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
pub async fn update_template<'a>( &'a self, scope: &'a str, name: &'a str, body: &'a UpdateTemplateRequest, ) -> Result<ResponseValue<TemplateResponse>, Error<HttpValidationError>>
Update Template Endpoint
Update a custom template.
Performs cross-field validation when extraction mode or custom instructions are part of the update by merging with the existing record before applying.
Args: scope: Template scope (‘server’ or ‘personal’). name: Template name. request: Partial update payload. principal: Authenticated principal from IAM.
Returns: The updated template.
Raises: HTTPException: 404 if template not found, 422 if cross-field validation fails.
Sends a PUT request to /ext/hindclaw/templates/{scope}/{name}
Sourcepub async fn delete_template<'a>(
&'a self,
scope: &'a str,
name: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_template<'a>( &'a self, scope: &'a str, name: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Template Endpoint
Delete a custom template.
Args: scope: Template scope (‘server’ or ‘personal’). name: Template name. principal: Authenticated principal from IAM.
Raises: HTTPException: 404 if template not found.
Sends a DELETE request to /ext/hindclaw/templates/{scope}/{name}
Sourcepub async fn update_template_from_marketplace<'a>(
&'a self,
scope: &'a str,
source: &'a str,
name: &'a str,
) -> Result<ResponseValue<TemplateUpdateResponse>, Error<HttpValidationError>>
pub async fn update_template_from_marketplace<'a>( &'a self, scope: &'a str, source: &'a str, name: &'a str, ) -> Result<ResponseValue<TemplateUpdateResponse>, Error<HttpValidationError>>
Update Template From Marketplace
Update an installed template from its marketplace source.
Sends a POST request to /ext/hindclaw/templates/{scope}/{source}/{name}/update
Sourcepub async fn list_users<'a>(
&'a self,
) -> Result<ResponseValue<Vec<UserResponse>>, Error<()>>
pub async fn list_users<'a>( &'a self, ) -> Result<ResponseValue<Vec<UserResponse>>, Error<()>>
List Users
Sends a GET request to /ext/hindclaw/users
Sourcepub async fn create_user<'a>(
&'a self,
body: &'a CreateUserRequest,
) -> Result<ResponseValue<UserResponse>, Error<HttpValidationError>>
pub async fn create_user<'a>( &'a self, body: &'a CreateUserRequest, ) -> Result<ResponseValue<UserResponse>, Error<HttpValidationError>>
Create User
Sends a POST request to /ext/hindclaw/users
Sourcepub async fn get_user<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<UserResponse>, Error<HttpValidationError>>
pub async fn get_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<UserResponse>, Error<HttpValidationError>>
Get User
Sends a GET request to /ext/hindclaw/users/{user_id}
Sourcepub async fn update_user<'a>(
&'a self,
user_id: &'a str,
body: &'a UpdateUserRequest,
) -> Result<ResponseValue<UserResponse>, Error<HttpValidationError>>
pub async fn update_user<'a>( &'a self, user_id: &'a str, body: &'a UpdateUserRequest, ) -> Result<ResponseValue<UserResponse>, Error<HttpValidationError>>
Update User
Sends a PUT request to /ext/hindclaw/users/{user_id}
Sourcepub async fn delete_user<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete User
Sends a DELETE request to /ext/hindclaw/users/{user_id}
Sourcepub async fn list_api_keys<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<Vec<ApiKeyResponse>>, Error<HttpValidationError>>
pub async fn list_api_keys<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<Vec<ApiKeyResponse>>, Error<HttpValidationError>>
List Api Keys
List API keys for a user. Keys are masked after creation.
Sends a GET request to /ext/hindclaw/users/{user_id}/api-keys
Sourcepub async fn create_api_key<'a>(
&'a self,
user_id: &'a str,
body: &'a CreateApiKeyRequest,
) -> Result<ResponseValue<ApiKeyCreateResponse>, Error<HttpValidationError>>
pub async fn create_api_key<'a>( &'a self, user_id: &'a str, body: &'a CreateApiKeyRequest, ) -> Result<ResponseValue<ApiKeyCreateResponse>, Error<HttpValidationError>>
Create Api Key
Sends a POST request to /ext/hindclaw/users/{user_id}/api-keys
Sourcepub async fn delete_api_key<'a>(
&'a self,
user_id: &'a str,
key_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn delete_api_key<'a>( &'a self, user_id: &'a str, key_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Delete Api Key
Sends a DELETE request to /ext/hindclaw/users/{user_id}/api-keys/{key_id}
Sourcepub async fn list_user_channels<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<Vec<ChannelResponse>>, Error<HttpValidationError>>
pub async fn list_user_channels<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<Vec<ChannelResponse>>, Error<HttpValidationError>>
List User Channels
Sends a GET request to /ext/hindclaw/users/{user_id}/channels
Sourcepub async fn add_user_channel<'a>(
&'a self,
user_id: &'a str,
body: &'a AddChannelRequest,
) -> Result<ResponseValue<ChannelResponse>, Error<HttpValidationError>>
pub async fn add_user_channel<'a>( &'a self, user_id: &'a str, body: &'a AddChannelRequest, ) -> Result<ResponseValue<ChannelResponse>, Error<HttpValidationError>>
Add User Channel
Sends a POST request to /ext/hindclaw/users/{user_id}/channels
Sourcepub async fn remove_user_channel<'a>(
&'a self,
user_id: &'a str,
provider: &'a str,
sender_id: &'a str,
) -> Result<ResponseValue<()>, Error<HttpValidationError>>
pub async fn remove_user_channel<'a>( &'a self, user_id: &'a str, provider: &'a str, sender_id: &'a str, ) -> Result<ResponseValue<()>, Error<HttpValidationError>>
Remove User Channel
Sends a DELETE request to /ext/hindclaw/users/{user_id}/channels/{provider}/{sender_id}