pub struct Client { /* private fields */ }Expand description
Client for OpenApp API
IoT Device Management (Gates/Doors/Provisioning) API
Version: v1
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 get_admin_quota_overrides<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_admin_quota_overrides<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Sends a GET request to /admin/quota_overrides
Sourcepub async fn post_admin_quota_override<'a>(
&'a self,
body: &'a QuotaOverrideRequest,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn post_admin_quota_override<'a>( &'a self, body: &'a QuotaOverrideRequest, ) -> Result<ResponseValue<()>, Error<()>>
Sends a POST request to /admin/quota_overrides
Sourcepub async fn list_api_keys<'a>(
&'a self,
) -> Result<ResponseValue<Vec<ApiKeyListItem>>, Error<()>>
pub async fn list_api_keys<'a>( &'a self, ) -> Result<ResponseValue<Vec<ApiKeyListItem>>, Error<()>>
Sends a GET request to /api-keys
Sourcepub async fn create_api_key<'a>(
&'a self,
body: &'a CreateApiKeyRequest,
) -> Result<ResponseValue<CreateApiKeyResponse>, Error<()>>
pub async fn create_api_key<'a>( &'a self, body: &'a CreateApiKeyRequest, ) -> Result<ResponseValue<CreateApiKeyResponse>, Error<()>>
Sends a POST request to /api-keys
Sourcepub async fn revoke_api_key<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn revoke_api_key<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Sends a DELETE request to /api-keys/{id}
Arguments:
- `id`: API key IDSourcepub async fn update_api_key<'a>(
&'a self,
id: &'a str,
body: &'a UpdateApiKeyRequest,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn update_api_key<'a>( &'a self, id: &'a str, body: &'a UpdateApiKeyRequest, ) -> Result<ResponseValue<()>, Error<()>>
Sends a PATCH request to /api-keys/{id}
Arguments:
- `id`: API key ID
- `body`Sourcepub async fn purge_api_key<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn purge_api_key<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Sends a DELETE request to /api-keys/{id}/purge
Arguments:
- `id`: API key IDSourcepub async fn restore_api_key<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn restore_api_key<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Sends a POST request to /api-keys/{id}/restore
Arguments:
- `id`: API key IDSourcepub async fn get_auth_kratos_identity<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_auth_kratos_identity<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Same as [get_auth_session] but under a path that is not stripped by some edge WAF rules
(which block URL segments named session or whoami)
Sends a `GET` request to `/auth/kratos-identity`Sourcepub async fn post_auth_logout<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn post_auth_logout<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Logout: clear session cookie so the browser becomes logged out
Sends a `POST` request to `/auth/logout`Sourcepub async fn get_auth_provisioned<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_auth_provisioned<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Lightweight provisioning check. Returns 204 if user is provisioned, 401 if not. No DB access; relies on X-User header set by middleware when provisioned
Sends a `GET` request to `/auth/provisioned`Sourcepub async fn get_auth_session<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_auth_session<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Get current Kratos session if present, otherwise null. Public endpoint (anonymous allowed)
Sends a `GET` request to `/auth/session`Sourcepub async fn post_auth_sign_out<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn post_auth_sign_out<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Sends a POST request to /auth/sign-out
Sourcepub async fn get_auth_whoami<'a>(
&'a self,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_auth_whoami<'a>( &'a self, ) -> Result<ResponseValue<()>, Error<()>>
Sends a GET request to /auth/whoami
Sourcepub async fn post_billing_webhook<'a, B: Into<Body>>(
&'a self,
provider: &'a str,
body: B,
) -> Result<ResponseValue<BillingWebhookResponse>, Error<()>>
pub async fn post_billing_webhook<'a, B: Into<Body>>( &'a self, provider: &'a str, body: B, ) -> Result<ResponseValue<BillingWebhookResponse>, Error<()>>
Sends a POST request to /billing/webhooks/{provider}
Arguments:
- `provider`
- `body`: Raw billing provider webhook payloadSourcepub async fn list_devices<'a>(
&'a self,
device_kind: Option<&'a str>,
external_id: Option<&'a str>,
has_external_id: Option<bool>,
has_go2rtc_channel: Option<bool>,
include_deleted: bool,
include_metadata: bool,
include_stale: Option<bool>,
integration_id: Option<&'a str>,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: bool,
q: Option<&'a str>,
x_org: &'a str,
) -> Result<ResponseValue<Vec<DeviceResponse>>, Error<ApiErrorResponse>>
pub async fn list_devices<'a>( &'a self, device_kind: Option<&'a str>, external_id: Option<&'a str>, has_external_id: Option<bool>, has_go2rtc_channel: Option<bool>, include_deleted: bool, include_metadata: bool, include_stale: Option<bool>, integration_id: Option<&'a str>, limit: Option<i32>, offset: Option<i32>, only_deleted: bool, q: Option<&'a str>, x_org: &'a str, ) -> Result<ResponseValue<Vec<DeviceResponse>>, Error<ApiErrorResponse>>
List devices for the organization context (X-Org)
Sends a `GET` request to `/devices`
Arguments:
- `device_kind`: Optional filter: only devices with metadata.kind equal to this value (e.g. virtual_access_portal).
Requires integration_id. Filtering done at SQL level.
- `external_id`: Optional filter: only devices with this external_id. Requires integration_id and device_kind.
Returns at most 1 device. Filtering done at SQL level.
- `has_external_id`: When true, only devices with a non-empty `external_id`. Requires `integration_id`.
- `has_go2rtc_channel`: When true, only devices whose metadata JSON has a non-empty `channel` (go2rtc cameras). Requires `integration_id`.
- `include_deleted`
- `include_metadata`
- `include_stale`: When true with `integration_id`, include `stale` per device when the provider supports it.
- `integration_id`: Optional filter: only devices belonging to this integration.
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`
- `q`: Case-insensitive substring match on localized device name (JSON). Best-effort when `integration_id` is set (SQL ILIKE).
- `x_org`Sourcepub async fn create_device<'a>(
&'a self,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a CreateDeviceRequest,
) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
pub async fn create_device<'a>( &'a self, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a CreateDeviceRequest, ) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
Create a device in an organization
Sends a `POST` request to `/devices`
Arguments:
- `include_deleted`
- `include_metadata`
- `x_org`: Organization context (required)
- `body`Sourcepub async fn list_device_apartment_floors<'a>(
&'a self,
device_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<ApartmentFloorListResponse>, Error<ApiErrorResponse>>
pub async fn list_device_apartment_floors<'a>( &'a self, device_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<ApartmentFloorListResponse>, Error<ApiErrorResponse>>
Sends a GET request to /devices/{device_id}/apartment-floors
Sourcepub async fn list_device_entities<'a>(
&'a self,
device_id: &'a str,
entity_type: Option<&'a str>,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
pub async fn list_device_entities<'a>( &'a self, device_id: &'a str, entity_type: Option<&'a str>, include_deleted: Option<bool>, include_metadata: Option<bool>, limit: Option<i32>, offset: Option<i32>, only_deleted: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
List entities for a device
Sends a `GET` request to `/devices/{device_id}/entities`
Arguments:
- `device_id`
- `entity_type`: When set, only entities of this type are returned (e.g. `apartment`).
- `include_deleted`
- `include_metadata`
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`
- `x_org`Sourcepub async fn get_device_entity_metadata_definition<'a>(
&'a self,
device_id: &'a str,
entity_type: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<EntityMetadataDefinitionResponse>, Error<()>>
pub async fn get_device_entity_metadata_definition<'a>( &'a self, device_id: &'a str, entity_type: &'a str, x_org: &'a str, ) -> Result<ResponseValue<EntityMetadataDefinitionResponse>, Error<()>>
Get provider-specific JSON schema for entity_metadata, for creating a new entity on a device
Sends a `GET` request to `/devices/{device_id}/entities/metadata-definition`Sourcepub async fn get_device<'a>(
&'a self,
id: &'a str,
include_deleted: bool,
include_metadata: bool,
include_stale: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
pub async fn get_device<'a>( &'a self, id: &'a str, include_deleted: bool, include_metadata: bool, include_stale: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
Get a device by ID
Sends a `GET` request to `/devices/{id}`
Arguments:
- `id`: Device ULID
- `include_deleted`
- `include_metadata`
- `include_stale`: When true, include `stale` if the integration provider supports stale device detection.
- `x_org`Sourcepub async fn update_device<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a UpdateDeviceRequest,
) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
pub async fn update_device<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a UpdateDeviceRequest, ) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
Update a device
Sends a `PUT` request to `/devices/{id}`Sourcepub async fn delete_device<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
recursive: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
pub async fn delete_device<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, recursive: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
Soft-delete a device
Sends a `DELETE` request to `/devices/{id}`
Arguments:
- `id`
- `include_deleted`
- `include_metadata`
- `recursive`: If true, delete (or purge) all device entities first.
- `x_org`Sourcepub async fn get_door_restrictions<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<DoorRestrictionsResponse>, Error<()>>
pub async fn get_door_restrictions<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<DoorRestrictionsResponse>, Error<()>>
GET /devices/{id}/door-restrictions — list apartment entity IDs allowed to open this door. Empty = no restrictions (all building residents can open). Only for virtual_access_portal devices
Sends a `GET` request to `/devices/{id}/door-restrictions`Sourcepub async fn get_device_metadata_definition<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<DeviceMetadataDefinitionResponse>, Error<()>>
pub async fn get_device_metadata_definition<'a>( &'a self, id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<DeviceMetadataDefinitionResponse>, Error<()>>
Get provider-specific JSON schema for device_metadata, for a given device
Sends a `GET` request to `/devices/{id}/metadata-definition`Sourcepub async fn hard_delete_device<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
recursive: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
pub async fn hard_delete_device<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, recursive: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
Permanently delete (purge) a device
Sends a `DELETE` request to `/devices/{id}/purge`
Arguments:
- `id`
- `include_deleted`
- `include_metadata`
- `recursive`: If true, delete (or purge) all device entities first.
- `x_org`Sourcepub async fn restore_device<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
pub async fn restore_device<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<DeviceResponse>, Error<ApiErrorResponse>>
Restore a soft-deleted device
Sends a `POST` request to `/devices/{id}/restore`Sourcepub async fn list_entities<'a>(
&'a self,
include_deleted: bool,
include_metadata: bool,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: bool,
zone_id: Option<&'a str>,
x_org: &'a str,
) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
pub async fn list_entities<'a>( &'a self, include_deleted: bool, include_metadata: bool, limit: Option<i32>, offset: Option<i32>, only_deleted: bool, zone_id: Option<&'a str>, x_org: &'a str, ) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
Sends a GET request to /entities
Arguments:
- `include_deleted`
- `include_metadata`
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`
- `zone_id`: Optional filter: only entities in this zone.
- `x_org`Sourcepub async fn create_entity<'a>(
&'a self,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a CreateEntityRequest,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn create_entity<'a>( &'a self, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a CreateEntityRequest, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Create an entity on a device
Sends a `POST` request to `/entities`Sourcepub async fn get_entity<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn get_entity<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Get an entity by ID
Sends a `GET` request to `/entities/{id}`Sourcepub async fn update_entity<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a UpdateEntityRequest,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn update_entity<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a UpdateEntityRequest, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Update an entity
Sends a `PUT` request to `/entities/{id}`Sourcepub async fn delete_entity<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn delete_entity<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Soft-delete an entity
Sends a `DELETE` request to `/entities/{id}`Sourcepub async fn patch_entity<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a PatchEntityRequest,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn patch_entity<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a PatchEntityRequest, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Partially update entity metadata (shallow merge). Other fields (name, etc.) are unchanged
Sends a `PATCH` request to `/entities/{id}`Sourcepub async fn execute_entity_action<'a>(
&'a self,
id: &'a str,
action_id: &'a str,
body: &'a Value,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn execute_entity_action<'a>( &'a self, id: &'a str, action_id: &'a str, body: &'a Value, ) -> Result<ResponseValue<()>, Error<()>>
Execute an entity action using the integration engine
Sends a `POST` request to `/entities/{id}/actions/{action_id}`Sourcepub async fn get_entity_metadata_definition<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<EntityMetadataDefinitionResponse>, Error<()>>
pub async fn get_entity_metadata_definition<'a>( &'a self, id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<EntityMetadataDefinitionResponse>, Error<()>>
Get provider-specific JSON schema for entity_metadata, for a given entity
Sends a `GET` request to `/entities/{id}/metadata-definition`Sourcepub async fn hard_delete_entity<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn hard_delete_entity<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Permanently delete (purge) an entity
Sends a `DELETE` request to `/entities/{id}/purge`Sourcepub async fn restore_entity<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
pub async fn restore_entity<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<EntityResponse>, Error<ApiErrorResponse>>
Restore a soft-deleted entity
Sends a `POST` request to `/entities/{id}/restore`Sourcepub async fn get_eula<'a>(
&'a self,
) -> Result<ResponseValue<EulaResponse>, Error<()>>
pub async fn get_eula<'a>( &'a self, ) -> Result<ResponseValue<EulaResponse>, Error<()>>
Get EULA text. Anonymous GET is allowed at the edge so reading the agreement is never blocked by auth
Sends a `GET` request to `/eula`Sourcepub async fn accept_eula<'a>(
&'a self,
body: &'a AcceptEulaRequest,
) -> Result<ResponseValue<AcceptEulaResponse>, Error<()>>
pub async fn accept_eula<'a>( &'a self, body: &'a AcceptEulaRequest, ) -> Result<ResponseValue<AcceptEulaResponse>, Error<()>>
Accept EULA and provision user. Requires X-User-Email (set by Oathkeeper cookie_session)
Sends a `POST` request to `/eula/accept`Sourcepub async fn list_integrations<'a>(
&'a self,
include_deleted: bool,
include_metadata: bool,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: bool,
provider_type: Option<&'a str>,
q: Option<&'a str>,
x_org: &'a str,
) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
pub async fn list_integrations<'a>( &'a self, include_deleted: bool, include_metadata: bool, limit: Option<i32>, offset: Option<i32>, only_deleted: bool, provider_type: Option<&'a str>, q: Option<&'a str>, x_org: &'a str, ) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
List integrations for the organization context (X-Org)
Sends a `GET` request to `/integrations`
Arguments:
- `include_deleted`
- `include_metadata`
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`
- `provider_type`: Optional filter: only integrations with this provider_type (e.g. virtual_access).
- `q`: Optional case-insensitive substring match on integration `name` (localized JSON), same as devices list.
- `x_org`Sourcepub async fn create_integration<'a>(
&'a self,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a CreateIntegrationRequest,
) -> Result<ResponseValue<IntegrationResponse>, Error<()>>
pub async fn create_integration<'a>( &'a self, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a CreateIntegrationRequest, ) -> Result<ResponseValue<IntegrationResponse>, Error<()>>
Create an integration in an organization
Sends a `POST` request to `/integrations`Sourcepub async fn get_access_portal_by_id<'a>(
&'a self,
portal_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<GetAccessPortalResponse>, Error<()>>
pub async fn get_access_portal_by_id<'a>( &'a self, portal_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<GetAccessPortalResponse>, Error<()>>
Get an access portal by ID. Resolves the portal’s building (integration) for direct links
Sends a `GET` request to `/integrations/access-portals/{portal_id}`Sourcepub async fn list_integration_provider_types<'a>(
&'a self,
) -> Result<ResponseValue<HashMap<String, HashMap<String, String>>>, Error<()>>
pub async fn list_integration_provider_types<'a>( &'a self, ) -> Result<ResponseValue<HashMap<String, HashMap<String, String>>>, Error<()>>
List supported integration provider types (canonical values)
Sends a `GET` request to `/integrations/provider-types`Sourcepub async fn get_integration_provider_definition<'a>(
&'a self,
provider_type: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_integration_provider_definition<'a>( &'a self, provider_type: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Get a provider definition (capabilities, actions, schemas) for UI/CLI
Sends a `GET` request to `/integrations/provider-types/{provider_type}/definition`Sourcepub async fn get_integration<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<IntegrationResponse>, Error<ApiErrorResponse>>
pub async fn get_integration<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<IntegrationResponse>, Error<ApiErrorResponse>>
Sends a GET request to /integrations/{id}
Sourcepub async fn update_integration<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a UpdateIntegrationRequest,
) -> Result<ResponseValue<IntegrationResponse>, Error<()>>
pub async fn update_integration<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a UpdateIntegrationRequest, ) -> Result<ResponseValue<IntegrationResponse>, Error<()>>
Update an integration
Sends a `PUT` request to `/integrations/{id}`Sourcepub async fn list_integration_access_invites<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<ListIntegrationAccessInvitesResponse>, Error<ApiErrorResponse>>
pub async fn list_integration_access_invites<'a>( &'a self, id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<ListIntegrationAccessInvitesResponse>, Error<ApiErrorResponse>>
List access invites for an integration
Sends a `GET` request to `/integrations/{id}/access-invites`Sourcepub async fn create_integration_access_invite<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
body: &'a CreateAccessInviteRequest,
) -> Result<ResponseValue<CreateAccessInviteResponse>, Error<ApiErrorResponse>>
pub async fn create_integration_access_invite<'a>( &'a self, id: &'a str, x_org: &'a str, body: &'a CreateAccessInviteRequest, ) -> Result<ResponseValue<CreateAccessInviteResponse>, Error<ApiErrorResponse>>
Create an access invite granting portal_open on one or more portals
Sends a `POST` request to `/integrations/{id}/access-invites`Sourcepub async fn update_integration_access_invite<'a>(
&'a self,
id: &'a str,
invite_link_id: &'a str,
x_org: &'a str,
body: &'a UpdateAccessInviteRequest,
) -> Result<ResponseValue<AccessInviteListItem>, Error<ApiErrorResponse>>
pub async fn update_integration_access_invite<'a>( &'a self, id: &'a str, invite_link_id: &'a str, x_org: &'a str, body: &'a UpdateAccessInviteRequest, ) -> Result<ResponseValue<AccessInviteListItem>, Error<ApiErrorResponse>>
Update an access invite (portals, validity, max_uses). Only active invites can be updated
Sends a `PUT` request to `/integrations/{id}/access-invites/{invite_link_id}`Sourcepub async fn delete_integration_access_invite<'a>(
&'a self,
id: &'a str,
invite_link_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn delete_integration_access_invite<'a>( &'a self, id: &'a str, invite_link_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Delete an access invite (permanently)
Sends a `DELETE` request to `/integrations/{id}/access-invites/{invite_link_id}`Sourcepub async fn restore_integration_access_invite<'a>(
&'a self,
id: &'a str,
invite_link_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<AccessInviteListItem>, Error<ApiErrorResponse>>
pub async fn restore_integration_access_invite<'a>( &'a self, id: &'a str, invite_link_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<AccessInviteListItem>, Error<ApiErrorResponse>>
Restore (un-revoke) an access invite
Sends a `POST` request to `/integrations/{id}/access-invites/{invite_link_id}/restore`Sourcepub async fn list_integration_access_portals<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<ListIntegrationAccessPortalsResponse>, Error<()>>
pub async fn list_integration_access_portals<'a>( &'a self, id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<ListIntegrationAccessPortalsResponse>, Error<()>>
List public access portals for an integration (for admin links to public portal pages)
Sends a `GET` request to `/integrations/{id}/access-portals`Sourcepub async fn create_integration_access_portal<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
body: &'a CreateAccessPortalRequest,
) -> Result<ResponseValue<CreateAccessPortalResponse>, Error<()>>
pub async fn create_integration_access_portal<'a>( &'a self, id: &'a str, x_org: &'a str, body: &'a CreateAccessPortalRequest, ) -> Result<ResponseValue<CreateAccessPortalResponse>, Error<()>>
Create a public access portal for an integration
Sends a `POST` request to `/integrations/{id}/access-portals`Sourcepub async fn update_integration_access_portal<'a>(
&'a self,
id: &'a str,
portal_id: &'a str,
x_org: &'a str,
body: &'a UpdateAccessPortalRequest,
) -> Result<ResponseValue<AccessPortalListItem>, Error<()>>
pub async fn update_integration_access_portal<'a>( &'a self, id: &'a str, portal_id: &'a str, x_org: &'a str, body: &'a UpdateAccessPortalRequest, ) -> Result<ResponseValue<AccessPortalListItem>, Error<()>>
Update a public access portal
Sends a `PUT` request to `/integrations/{id}/access-portals/{portal_id}`Sourcepub async fn delete_integration_access_portal<'a>(
&'a self,
id: &'a str,
portal_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn delete_integration_access_portal<'a>( &'a self, id: &'a str, portal_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Delete a public access portal
Sends a `DELETE` request to `/integrations/{id}/access-portals/{portal_id}`Sourcepub async fn list_building_users<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn list_building_users<'a>( &'a self, id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
List building users (users with virtual_access:integration:{id}:* role)
Sends a `GET` request to `/integrations/{id}/building-users`Sourcepub async fn add_building_user<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
body: &'a AddBuildingUserPayload,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn add_building_user<'a>( &'a self, id: &'a str, x_org: &'a str, body: &'a AddBuildingUserPayload, ) -> Result<ResponseValue<()>, Error<()>>
Add user to building (adds org role; creates membership if missing)
Sends a `POST` request to `/integrations/{id}/building-users`Sourcepub async fn delete_building_user<'a>(
&'a self,
id: &'a str,
user_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn delete_building_user<'a>( &'a self, id: &'a str, user_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
Remove user from building (removes org roles and apartment assignments)
Sends a `DELETE` request to `/integrations/{id}/building-users/{user_id}`Sourcepub async fn get_integration_device_metadata_schema<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<IntegrationDeviceMetadataSchemaResponse>, Error<()>>
pub async fn get_integration_device_metadata_schema<'a>( &'a self, id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<IntegrationDeviceMetadataSchemaResponse>, Error<()>>
Get provider-specific JSON Schema for device_metadata for this integration (for generic UI labels)
Sends a `GET` request to `/integrations/{id}/device-metadata-schema`Sourcepub async fn get_integration_discovered_devices<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<Value>, Error<()>>
pub async fn get_integration_discovered_devices<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<Value>, Error<()>>
List devices discovered from the upstream provider for this integration
Sends a `GET` request to `/integrations/{id}/discovered-devices`Sourcepub async fn list_integration_entities<'a>(
&'a self,
id: &'a str,
entity_type: Option<&'a str>,
include_deleted: bool,
include_metadata: bool,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: bool,
x_org: &'a str,
) -> Result<ResponseValue<PaginatedResponseEntityResponse>, Error<ApiErrorResponse>>
pub async fn list_integration_entities<'a>( &'a self, id: &'a str, entity_type: Option<&'a str>, include_deleted: bool, include_metadata: bool, limit: Option<i32>, offset: Option<i32>, only_deleted: bool, x_org: &'a str, ) -> Result<ResponseValue<PaginatedResponseEntityResponse>, Error<ApiErrorResponse>>
List resource entities for devices belonging to an integration
Sends a `GET` request to `/integrations/{id}/entities`
Arguments:
- `id`
- `entity_type`: Comma-separated entity types (e.g. `door,switch`). Omit for all types.
- `include_deleted`
- `include_metadata`
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`
- `x_org`Sourcepub async fn list_integration_ops<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn list_integration_ops<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
List provider-specific ops available for an integration
Sends a `GET` request to `/integrations/{id}/ops`Sourcepub async fn execute_integration_op<'a>(
&'a self,
id: &'a str,
op_id: &'a str,
x_org: &'a str,
body: &'a Value,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn execute_integration_op<'a>( &'a self, id: &'a str, op_id: &'a str, x_org: &'a str, body: &'a Value, ) -> Result<ResponseValue<()>, Error<()>>
Execute a provider-specific op for an integration
Sends a `POST` request to `/integrations/{id}/ops/{op_id}`Sourcepub async fn hard_delete_integration<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<IntegrationResponse>, Error<ApiErrorResponse>>
pub async fn hard_delete_integration<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<IntegrationResponse>, Error<ApiErrorResponse>>
Permanently delete (purge) an integration
Sends a `DELETE` request to `/integrations/{id}/purge`Sourcepub async fn restore_integration<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<IntegrationResponse>, Error<ApiErrorResponse>>
pub async fn restore_integration<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<IntegrationResponse>, Error<ApiErrorResponse>>
Restore a soft-deleted integration
Sends a `POST` request to `/integrations/{id}/restore`Sourcepub async fn post_integration_lan_agent_task_spec<'a>(
&'a self,
integration_id: &'a str,
x_org: &'a str,
body: &'a LanAgentTaskSpecRequest,
) -> Result<ResponseValue<LanAgentTaskSpecResponse>, Error<()>>
pub async fn post_integration_lan_agent_task_spec<'a>( &'a self, integration_id: &'a str, x_org: &'a str, body: &'a LanAgentTaskSpecRequest, ) -> Result<ResponseValue<LanAgentTaskSpecResponse>, Error<()>>
POST /integrations/{id}/lan-agent/task-spec
Sends a `POST` request to `/integrations/{integration_id}/lan-agent/task-spec`
Arguments:
- `integration_id`: Integration ULID
- `x_org`: Organization ULID
- `body`Sourcepub async fn get_integration_lan_agent_tasks<'a>(
&'a self,
integration_id: &'a str,
x_org: &'a str,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn get_integration_lan_agent_tasks<'a>( &'a self, integration_id: &'a str, x_org: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
GET /integrations/{id}/lan-agent/tasks
Sends a `GET` request to `/integrations/{integration_id}/lan-agent/tasks`
Arguments:
- `integration_id`: Integration ULID
- `x_org`: Organization ULIDSourcepub async fn list_integration_zones<'a>(
&'a self,
integration_id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
only_deleted: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<Vec<ZoneResponse>>, Error<ApiErrorResponse>>
pub async fn list_integration_zones<'a>( &'a self, integration_id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, only_deleted: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<Vec<ZoneResponse>>, Error<ApiErrorResponse>>
List zones for an integration
Sends a `GET` request to `/integrations/{integration_id}/zones`Sourcepub async fn post_lan_agent_cli_bootstrap_token<'a>(
&'a self,
body: &'a LanAgentBootstrapTokenRequest,
) -> Result<ResponseValue<LanAgentBootstrapTokenResponse>, Error<()>>
pub async fn post_lan_agent_cli_bootstrap_token<'a>( &'a self, body: &'a LanAgentBootstrapTokenRequest, ) -> Result<ResponseValue<LanAgentBootstrapTokenResponse>, Error<()>>
POST /lan-agent/cli/bootstrap-token — ULID for bootstrap.sh?key=… (JWT in Redis)
Sends a `POST` request to `/lan-agent/cli/bootstrap-token`Sourcepub async fn get_lan_agent_cli_bootstrap_sh<'a>(
&'a self,
key: &'a str,
) -> Result<ResponseValue<ByteStream>, Error<()>>
pub async fn get_lan_agent_cli_bootstrap_sh<'a>( &'a self, key: &'a str, ) -> Result<ResponseValue<ByteStream>, Error<()>>
GET /lan-agent/cli/bootstrap.sh?key=… — bash that downloads a versioned binary and runs the task
Sends a `GET` request to `/lan-agent/cli/bootstrap.sh`
Arguments:
- `key`: ULID from `POST /lan-agent/cli/bootstrap-token`.Sourcepub async fn post_lan_agent_cli_token<'a>(
&'a self,
) -> Result<ResponseValue<LanAgentCliTokenResponse>, Error<()>>
pub async fn post_lan_agent_cli_token<'a>( &'a self, ) -> Result<ResponseValue<LanAgentCliTokenResponse>, Error<()>>
POST /lan-agent/cli/token — session cookie or Bearer; returns JWT for LAN agent (iss=oathkeeper)
Sends a `POST` request to `/lan-agent/cli/token`Sourcepub async fn get_lan_agent_meta<'a>(
&'a self,
) -> Result<ResponseValue<LanAgentMetaResponse>, Error<()>>
pub async fn get_lan_agent_meta<'a>( &'a self, ) -> Result<ResponseValue<LanAgentMetaResponse>, Error<()>>
GET /lan-agent/meta
Sends a `GET` request to `/lan-agent/meta`Sourcepub async fn get_me_apartments<'a>(
&'a self,
) -> Result<ResponseValue<MeApartmentsResponse>, Error<()>>
pub async fn get_me_apartments<'a>( &'a self, ) -> Result<ResponseValue<MeApartmentsResponse>, Error<()>>
GET /me/apartments — returns apartments the current user is a resident of
Sends a `GET` request to `/me/apartments`Sourcepub async fn get_me_invitations<'a>(
&'a self,
) -> Result<ResponseValue<MeInvitationsResponse>, Error<()>>
pub async fn get_me_invitations<'a>( &'a self, ) -> Result<ResponseValue<MeInvitationsResponse>, Error<()>>
GET /me/invitations — returns invitations the current user has claimed
Sends a `GET` request to `/me/invitations`Sourcepub async fn get_me_push_subscription_status<'a>(
&'a self,
) -> Result<ResponseValue<MePushSubscriptionStatusResponse>, Error<()>>
pub async fn get_me_push_subscription_status<'a>( &'a self, ) -> Result<ResponseValue<MePushSubscriptionStatusResponse>, Error<()>>
GET /me/push-subscription-status — returns whether the current user has any push subscription
Sends a `GET` request to `/me/push-subscription-status`Sourcepub async fn post_me_push_subscription<'a>(
&'a self,
body: &'a PostMePushSubscriptionPayload,
) -> Result<ResponseValue<()>, Error<()>>
pub async fn post_me_push_subscription<'a>( &'a self, body: &'a PostMePushSubscriptionPayload, ) -> Result<ResponseValue<()>, Error<()>>
POST /me/push-subscriptions — store Web Push subscription for call notifications
Sends a `POST` request to `/me/push-subscriptions`Sourcepub async fn get_me_push_vapid_public_key<'a>(
&'a self,
) -> Result<ResponseValue<MePushVapidPublicKeyResponse>, Error<()>>
pub async fn get_me_push_vapid_public_key<'a>( &'a self, ) -> Result<ResponseValue<MePushVapidPublicKeyResponse>, Error<()>>
GET /me/push-vapid-public-key — returns VAPID public key for client subscription. 404 when not configured
Sends a `GET` request to `/me/push-vapid-public-key`Sourcepub async fn list_orgs<'a>(
&'a self,
include_deleted: bool,
include_metadata: bool,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: bool,
) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
pub async fn list_orgs<'a>( &'a self, include_deleted: bool, include_metadata: bool, limit: Option<i32>, offset: Option<i32>, only_deleted: bool, ) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
List organizations the user has access to
Sends a `GET` request to `/orgs`
Arguments:
- `include_deleted`
- `include_metadata`
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`Sourcepub async fn create_org<'a>(
&'a self,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
body: &'a CreateOrganizationRequest,
) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
pub async fn create_org<'a>( &'a self, include_deleted: Option<bool>, include_metadata: Option<bool>, body: &'a CreateOrganizationRequest, ) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
Create an organization (body: name, description?, parent_id?)
Sends a `POST` request to `/orgs`Sourcepub async fn get_org<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
pub async fn get_org<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, ) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
Get an organization by ID
Sends a `GET` request to `/orgs/{id}`Sourcepub async fn update_org<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
body: &'a UpdateOrganizationRequest,
) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
pub async fn update_org<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, body: &'a UpdateOrganizationRequest, ) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
Update an organization (body: name?, description?)
Sends a `PUT` request to `/orgs/{id}`Sourcepub async fn delete_org<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
pub async fn delete_org<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, ) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
Soft-delete an organization
Sends a `DELETE` request to `/orgs/{id}`Sourcepub async fn post_org_billing_checkout<'a>(
&'a self,
id: &'a str,
body: &'a CheckoutRequest,
) -> Result<ResponseValue<SubscriptionRef>, Error<()>>
pub async fn post_org_billing_checkout<'a>( &'a self, id: &'a str, body: &'a CheckoutRequest, ) -> Result<ResponseValue<SubscriptionRef>, Error<()>>
Sends a POST request to /orgs/{id}/billing/checkout
Sourcepub async fn get_org_billing_plan<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<BillingPlanResponse>, Error<()>>
pub async fn get_org_billing_plan<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<BillingPlanResponse>, Error<()>>
Sends a GET request to /orgs/{id}/billing/plan
Sourcepub async fn post_org_billing_portal<'a>(
&'a self,
id: &'a str,
body: &'a PortalRequest,
) -> Result<ResponseValue<PortalResponse>, Error<()>>
pub async fn post_org_billing_portal<'a>( &'a self, id: &'a str, body: &'a PortalRequest, ) -> Result<ResponseValue<PortalResponse>, Error<()>>
Sends a POST request to /orgs/{id}/billing/portal
Sourcepub async fn get_org_billing_upgrade_options<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<PlansResponse>, Error<()>>
pub async fn get_org_billing_upgrade_options<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<PlansResponse>, Error<()>>
Sends a GET request to /orgs/{id}/billing/upgrade-options
Sourcepub async fn get_org_billing_usage<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<QuotaReport>, Error<()>>
pub async fn get_org_billing_usage<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<QuotaReport>, Error<()>>
Sends a GET request to /orgs/{id}/billing/usage
Sourcepub async fn get_org_permissions<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<OrgPermissionsResponse>, Error<()>>
pub async fn get_org_permissions<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<OrgPermissionsResponse>, Error<()>>
Get current user’s permissions for an organization
Sends a `GET` request to `/orgs/{id}/permissions`Sourcepub async fn hard_delete_org<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
pub async fn hard_delete_org<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, ) -> Result<ResponseValue<OrganizationResponse>, Error<ApiErrorResponse>>
Permanently delete (purge) an organization
Sends a `DELETE` request to `/orgs/{id}/purge`Sourcepub async fn list_org_users<'a>(
&'a self,
org_id: &'a str,
include_deleted: bool,
include_metadata: bool,
limit: Option<i32>,
offset: Option<i32>,
only_deleted: bool,
recursive: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
pub async fn list_org_users<'a>( &'a self, org_id: &'a str, include_deleted: bool, include_metadata: bool, limit: Option<i32>, offset: Option<i32>, only_deleted: bool, recursive: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
List users in an organization (and optionally descendant orgs)
Sends a `GET` request to `/orgs/{org_id}/users`
Arguments:
- `org_id`
- `include_deleted`
- `include_metadata`
- `limit`: Number of items per page. Default from config, max 200.
- `offset`: Number of items to skip. Default 0.
- `only_deleted`
- `recursive`
- `x_org`Sourcepub async fn get_plans<'a>(
&'a self,
) -> Result<ResponseValue<PlansResponse>, Error<()>>
pub async fn get_plans<'a>( &'a self, ) -> Result<ResponseValue<PlansResponse>, Error<()>>
Sends a GET request to /plans
Sourcepub async fn get_public_invite<'a>(
&'a self,
invite_token: &'a str,
) -> Result<ResponseValue<PublicInviteResponse>, Error<ApiErrorResponse>>
pub async fn get_public_invite<'a>( &'a self, invite_token: &'a str, ) -> Result<ResponseValue<PublicInviteResponse>, Error<ApiErrorResponse>>
Sends a GET request to /public/access/invites/{inviteToken}
Sourcepub async fn post_public_invite_claim<'a>(
&'a self,
invite_token: &'a str,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_invite_claim<'a>( &'a self, invite_token: &'a str, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/invites/{inviteToken}/claim
Sourcepub async fn post_public_invite_execute<'a>(
&'a self,
invite_token: &'a str,
body: &'a PublicInviteExecuteRequest,
) -> Result<ResponseValue<PublicInviteExecuteResponse>, Error<ApiErrorResponse>>
pub async fn post_public_invite_execute<'a>( &'a self, invite_token: &'a str, body: &'a PublicInviteExecuteRequest, ) -> Result<ResponseValue<PublicInviteExecuteResponse>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/invites/{inviteToken}/execute
Sourcepub async fn post_public_invite_session<'a>(
&'a self,
invite_token: &'a str,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_invite_session<'a>( &'a self, invite_token: &'a str, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/invites/{inviteToken}/session
Sourcepub async fn get_public_portal<'a>(
&'a self,
public_portal_id: &'a str,
) -> Result<ResponseValue<PublicPortalResponse>, Error<ApiErrorResponse>>
pub async fn get_public_portal<'a>( &'a self, public_portal_id: &'a str, ) -> Result<ResponseValue<PublicPortalResponse>, Error<ApiErrorResponse>>
Sends a GET request to /public/access/portals/{publicPortalId}
Sourcepub async fn post_public_portal_lights<'a>(
&'a self,
public_portal_id: &'a str,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_portal_lights<'a>( &'a self, public_portal_id: &'a str, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/portals/{publicPortalId}/lights
Sourcepub async fn post_public_portal_open<'a>(
&'a self,
public_portal_id: &'a str,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_portal_open<'a>( &'a self, public_portal_id: &'a str, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/portals/{publicPortalId}/open
Sourcepub async fn get_public_portal_reachable<'a>(
&'a self,
public_portal_id: &'a str,
) -> Result<ResponseValue<PublicPortalReachableResponse>, Error<ApiErrorResponse>>
pub async fn get_public_portal_reachable<'a>( &'a self, public_portal_id: &'a str, ) -> Result<ResponseValue<PublicPortalReachableResponse>, Error<ApiErrorResponse>>
Sends a GET request to /public/access/portals/{publicPortalId}/reachable
Sourcepub async fn post_public_portal_sessions<'a>(
&'a self,
public_portal_id: &'a str,
body: &'a PublicPortalCreateSessionRequest,
) -> Result<ResponseValue<PublicPortalCreateSessionResponse>, Error<ApiErrorResponse>>
pub async fn post_public_portal_sessions<'a>( &'a self, public_portal_id: &'a str, body: &'a PublicPortalCreateSessionRequest, ) -> Result<ResponseValue<PublicPortalCreateSessionResponse>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/portals/{publicPortalId}/sessions
Sourcepub async fn get_public_portal_targets<'a>(
&'a self,
public_portal_id: &'a str,
) -> Result<ResponseValue<PublicPortalTargetsResponse>, Error<ApiErrorResponse>>
pub async fn get_public_portal_targets<'a>( &'a self, public_portal_id: &'a str, ) -> Result<ResponseValue<PublicPortalTargetsResponse>, Error<ApiErrorResponse>>
Sends a GET request to /public/access/portals/{publicPortalId}/targets
Sourcepub async fn get_public_session<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
) -> Result<ResponseValue<PublicSessionResponse>, Error<ApiErrorResponse>>
pub async fn get_public_session<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, ) -> Result<ResponseValue<PublicSessionResponse>, Error<ApiErrorResponse>>
Sends a GET request to /public/access/sessions/{sessionId}
Arguments:
- `session_id`
- `token`: Session token (alternative to Bearer when headers stripped)Sourcepub async fn post_public_session_cancel<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_session_cancel<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Caller hangs up while ringing so callees polling GET session can dismiss incoming UI
Sends a `POST` request to `/public/access/sessions/{sessionId}/cancel`Sourcepub async fn post_public_session_decline<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_session_decline<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Callee rejects the ring before answering; caller can observe state via GET session
Sends a `POST` request to `/public/access/sessions/{sessionId}/decline`Sourcepub async fn post_public_session_lights<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_session_lights<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/sessions/{sessionId}/lights
Sourcepub async fn post_public_session_notify_message<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
body: &'a NotifyPortalMessageBody,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_session_notify_message<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, body: &'a NotifyPortalMessageBody, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Caller notifies apartment residents with the chat message text (Web Push)
Sends a `POST` request to `/public/access/sessions/{sessionId}/notify-message`Sourcepub async fn post_public_session_open<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
pub async fn post_public_session_open<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, ) -> Result<ResponseValue<()>, Error<ApiErrorResponse>>
Sends a POST request to /public/access/sessions/{sessionId}/open
Sourcepub async fn get_public_session_streams<'a>(
&'a self,
session_id: &'a str,
token: Option<&'a str>,
) -> Result<ResponseValue<PublicSessionStreamsResponse>, Error<ApiErrorResponse>>
pub async fn get_public_session_streams<'a>( &'a self, session_id: &'a str, token: Option<&'a str>, ) -> Result<ResponseValue<PublicSessionStreamsResponse>, Error<ApiErrorResponse>>
Sends a GET request to /public/access/sessions/{sessionId}/streams
Sourcepub async fn execute_scripting<'a>(
&'a self,
body: &'a ExecuteScriptingRequest,
) -> Result<ResponseValue<ExecuteScriptingResponse>, Error<()>>
pub async fn execute_scripting<'a>( &'a self, body: &'a ExecuteScriptingRequest, ) -> Result<ResponseValue<ExecuteScriptingResponse>, Error<()>>
Execute an OpenApp Scripting program. Requires execute permission in at least one org
Sends a `POST` request to `/scripting/execute`Sourcepub async fn get_backend_status<'a>(
&'a self,
) -> Result<ResponseValue<BackendStatus>, Error<()>>
pub async fn get_backend_status<'a>( &'a self, ) -> Result<ResponseValue<BackendStatus>, Error<()>>
Get backend status and version
Sends a `GET` request to `/status`Sourcepub async fn create_user<'a>(
&'a self,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
only_deleted: Option<bool>,
x_org: &'a str,
body: &'a CreateUserRequest,
) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
pub async fn create_user<'a>( &'a self, include_deleted: Option<bool>, include_metadata: Option<bool>, only_deleted: Option<bool>, x_org: &'a str, body: &'a CreateUserRequest, ) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
Create a user in the organization context
Sends a `POST` request to `/users`Sourcepub async fn search_users<'a>(
&'a self,
exclude_ids: Option<&'a str>,
limit: Option<u64>,
offset: Option<u64>,
org_id: Option<&'a str>,
q: Option<&'a str>,
scope: Option<&'a str>,
) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
pub async fn search_users<'a>( &'a self, exclude_ids: Option<&'a str>, limit: Option<u64>, offset: Option<u64>, org_id: Option<&'a str>, q: Option<&'a str>, scope: Option<&'a str>, ) -> Result<ResponseValue<PaginatedResponse>, Error<ApiErrorResponse>>
Search users by name/email. Requires users:list in the org (X-Org or org_id), or on the root org when scope=all
Sends a `GET` request to `/users/search`
Arguments:
- `exclude_ids`: Comma-separated user IDs to exclude
- `limit`
- `offset`
- `org_id`: Filter by org subtree (ignored when `scope=all`).
- `q`: Search text (ILIKE on name and email)
- `scope`: `all`: search every user in the database (requires `users:list` on the root org). Otherwise org-scoped.Sourcepub async fn get_user<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
pub async fn get_user<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
Get a user by ID
Sends a `GET` request to `/users/{id}`Sourcepub async fn update_user<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a UpdateUserRequest,
) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
pub async fn update_user<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a UpdateUserRequest, ) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
Update a user by ID
Sends a `PUT` request to `/users/{id}`Sourcepub async fn delete_user<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
pub async fn delete_user<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
Soft-delete a user
Sends a `DELETE` request to `/users/{id}`Sourcepub async fn hard_delete_user<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
pub async fn hard_delete_user<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<UserResponse>, Error<ApiErrorResponse>>
Permanently delete (purge) a user
Sends a `DELETE` request to `/users/{id}/purge`Sourcepub async fn add_roles<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
body: &'a AddRolesRequest,
) -> Result<ResponseValue<UserResponse>, Error<()>>
pub async fn add_roles<'a>( &'a self, id: &'a str, x_org: &'a str, body: &'a AddRolesRequest, ) -> Result<ResponseValue<UserResponse>, Error<()>>
Add roles to a user. Requires users:create (or admin) in each org where roles are added
Sends a `POST` request to `/users/{id}/roles`Sourcepub async fn delete_roles<'a>(
&'a self,
id: &'a str,
x_org: &'a str,
body: &'a DeleteRolesRequest,
) -> Result<ResponseValue<UserResponse>, Error<()>>
pub async fn delete_roles<'a>( &'a self, id: &'a str, x_org: &'a str, body: &'a DeleteRolesRequest, ) -> Result<ResponseValue<UserResponse>, Error<()>>
Delete roles from a user. Requires users:create (or admin) in each org where roles are deleted
Sends a `DELETE` request to `/users/{id}/roles`Sourcepub async fn create_zone<'a>(
&'a self,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a CreateZoneRequest,
) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
pub async fn create_zone<'a>( &'a self, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a CreateZoneRequest, ) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
Create a zone for an integration
Sends a `POST` request to `/zones`Sourcepub async fn get_zone<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
pub async fn get_zone<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
Get a zone by ID
Sends a `GET` request to `/zones/{id}`Sourcepub async fn update_zone<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
body: &'a UpdateZoneRequest,
) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
pub async fn update_zone<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, body: &'a UpdateZoneRequest, ) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
Update a zone
Sends a `PUT` request to `/zones/{id}`Sourcepub async fn delete_zone<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
pub async fn delete_zone<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
Soft-delete a zone
Sends a `DELETE` request to `/zones/{id}`Sourcepub async fn hard_delete_zone<'a>(
&'a self,
id: &'a str,
include_deleted: Option<bool>,
include_metadata: Option<bool>,
x_org: &'a str,
) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
pub async fn hard_delete_zone<'a>( &'a self, id: &'a str, include_deleted: Option<bool>, include_metadata: Option<bool>, x_org: &'a str, ) -> Result<ResponseValue<ZoneResponse>, Error<ApiErrorResponse>>
Permanently delete (purge) a zone
Sends a `DELETE` request to `/zones/{id}/purge`