Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
14 KiB
UserApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| chatDeleteUserDelete | DELETE /v1/chat/user/delete | Delete user account |
| chatGetUser | GET /v1/chat/user | Get current user |
| chatGetUserTerms | GET /v1/chat/user/terms | Get terms acceptance status |
| chatPostUserPlugins | POST /v1/chat/user/plugins | Update user plugins |
| chatPostUserTermsAccept | POST /v1/chat/user/terms/accept | Accept terms of service |
| chatPostUserVerify | POST /v1/chat/user/verify | Verify email with token |
| chatPostUserVerifyResend | POST /v1/chat/user/verify/resend | Resend verification email |
| platformUserAll | GET /v1/platform/user/all | List all users (admin only) |
| platformUserCreateApiKey | POST /v1/platform/user/createApiKey | Create an API key |
| platformUserDeleteApiKey | POST /v1/platform/user/deleteApiKey | Delete an API key |
| platformUserGet | GET /v1/platform/user/get | Get current authenticated user |
chatDeleteUserDelete
kotlin.Any chatDeleteUserDelete()
Delete user account
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
try {
val result : kotlin.Any = apiInstance.chatDeleteUserDelete()
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatDeleteUserDelete")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatDeleteUserDelete")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatGetUser
ChatUser chatGetUser()
Get current user
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
try {
val result : ChatUser = apiInstance.chatGetUser()
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatGetUser")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatGetUser")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatGetUserTerms
kotlin.Any chatGetUserTerms()
Get terms acceptance status
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
try {
val result : kotlin.Any = apiInstance.chatGetUserTerms()
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatGetUserTerms")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatGetUserTerms")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatPostUserPlugins
kotlin.Any chatPostUserPlugins(chatPostUserPluginsRequest)
Update user plugins
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
val chatPostUserPluginsRequest : ChatPostUserPluginsRequest = // ChatPostUserPluginsRequest |
try {
val result : kotlin.Any = apiInstance.chatPostUserPlugins(chatPostUserPluginsRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatPostUserPlugins")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatPostUserPlugins")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chatPostUserPluginsRequest | ChatPostUserPluginsRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
chatPostUserTermsAccept
kotlin.Any chatPostUserTermsAccept()
Accept terms of service
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
try {
val result : kotlin.Any = apiInstance.chatPostUserTermsAccept()
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatPostUserTermsAccept")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatPostUserTermsAccept")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatPostUserVerify
kotlin.Any chatPostUserVerify(chatPostUserVerifyRequest)
Verify email with token
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
val chatPostUserVerifyRequest : ChatPostUserVerifyRequest = // ChatPostUserVerifyRequest |
try {
val result : kotlin.Any = apiInstance.chatPostUserVerify(chatPostUserVerifyRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatPostUserVerify")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatPostUserVerify")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chatPostUserVerifyRequest | ChatPostUserVerifyRequest |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
chatPostUserVerifyResend
kotlin.Any chatPostUserVerifyResend(chatPostUserVerifyResendRequest)
Resend verification email
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
val chatPostUserVerifyResendRequest : ChatPostUserVerifyResendRequest = // ChatPostUserVerifyResendRequest |
try {
val result : kotlin.Any = apiInstance.chatPostUserVerifyResend(chatPostUserVerifyResendRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#chatPostUserVerifyResend")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#chatPostUserVerifyResend")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chatPostUserVerifyResendRequest | ChatPostUserVerifyResendRequest | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
platformUserAll
PlatformTRPCResult platformUserAll()
List all users (admin only)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
try {
val result : PlatformTRPCResult = apiInstance.platformUserAll()
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#platformUserAll")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#platformUserAll")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
platformUserCreateApiKey
PlatformTRPCResult platformUserCreateApiKey(platformUserCreateApiKeyRequest)
Create an API key
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
val platformUserCreateApiKeyRequest : PlatformUserCreateApiKeyRequest = // PlatformUserCreateApiKeyRequest |
try {
val result : PlatformTRPCResult = apiInstance.platformUserCreateApiKey(platformUserCreateApiKeyRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#platformUserCreateApiKey")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#platformUserCreateApiKey")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| platformUserCreateApiKeyRequest | PlatformUserCreateApiKeyRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
platformUserDeleteApiKey
PlatformTRPCResult platformUserDeleteApiKey(platformUserDeleteApiKeyRequest)
Delete an API key
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
val platformUserDeleteApiKeyRequest : PlatformUserDeleteApiKeyRequest = // PlatformUserDeleteApiKeyRequest |
try {
val result : PlatformTRPCResult = apiInstance.platformUserDeleteApiKey(platformUserDeleteApiKeyRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#platformUserDeleteApiKey")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#platformUserDeleteApiKey")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| platformUserDeleteApiKeyRequest | PlatformUserDeleteApiKeyRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
platformUserGet
PlatformTRPCResult platformUserGet()
Get current authenticated user
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = UserApi()
try {
val result : PlatformTRPCResult = apiInstance.platformUserGet()
println(result)
} catch (e: ClientException) {
println("4xx response calling UserApi#platformUserGet")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UserApi#platformUserGet")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json