provenaclient.clients.id_service_client

Created Date: Friday May 31st 2024 +1000 Author: Peter Baker —– Last Modified: Friday May 31st 2024 9:50:26 am +1000 Modified By: Peter Baker —– Description: ID/Handle service L2 Client —– HISTORY: Date By Comments ———- — ———————————————————

18-06-2024 | Peter Baker | Noting that the models published for the endpoints are not being detected in Swagger docs due to a type Alias being used

Classes

IdServiceEndpoints

An ENUM containing the handle api endpoints.

IdServiceClient

This class interface just captures that the client has an instantiated auth

Module Contents

class provenaclient.clients.id_service_client.IdServiceEndpoints[source]

Bases: str, ProvenaInterfaces.HandleAPI.Enum

An ENUM containing the handle api endpoints.

GET_ADMIN_CONFIG = '/admin/config'
GET_ADMIN_SENTRY_DEBUG = '/admin/sentry-debug'
GET_CHECK_ACCESS_CHECK_GENERAL_ACCESS = '/check-access/check-general-access'
GET_CHECK_ACCESS_CHECK_ADMIN_ACCESS = '/check-access/check-admin-access'
GET_CHECK_ACCESS_CHECK_READ_ACCESS = '/check-access/check-read-access'
GET_CHECK_ACCESS_CHECK_WRITE_ACCESS = '/check-access/check-write-access'
POST_HANDLE_MINT = '/handle/mint'
POST_HANDLE_ADD_VALUE = '/handle/add_value'
POST_HANDLE_ADD_VALUE_BY_INDEX = '/handle/add_value_by_index'
GET_HANDLE_GET = '/handle/get'
GET_HANDLE_LIST = '/handle/list'
PUT_HANDLE_MODIFY_BY_INDEX = '/handle/modify_by_index'
POST_HANDLE_REMOVE_BY_INDEX = '/handle/remove_by_index'
GET_HEALTH_CHECK = '/'
class provenaclient.clients.id_service_client.IdServiceClient(auth: provenaclient.clients.client_helpers.AuthManager, config: provenaclient.clients.client_helpers.Config)[source]

Bases: provenaclient.clients.client_helpers.ClientService

This class interface just captures that the client has an instantiated auth manager which allows for helper functions abstracted for L2 clients.

_auth
_config
_build_endpoint(endpoint: IdServiceEndpoints) str[source]
async mint(body: ProvenaInterfaces.HandleAPI.MintRequest) ProvenaInterfaces.HandleAPI.Handle[source]

Mints a new handle with given properties.

Parameters:

body (MintRequest) – The payload

Returns:

The resulting handle object

Return type:

Handle

async add_value(body: ProvenaInterfaces.HandleAPI.AddValueRequest) ProvenaInterfaces.HandleAPI.Handle[source]

Adds value to a handle.

Parameters:

body (AddValueRequest) – The value to add

Returns:

The handle object

Return type:

Handle

async add_value_by_index(body: ProvenaInterfaces.HandleAPI.AddValueIndexRequest) ProvenaInterfaces.HandleAPI.Handle[source]

Adds a value at specified index

Parameters:

body (AddValueIndexRequest) – The value to add

Returns:

The handle object

Return type:

Handle

async list() ProvenaInterfaces.HandleAPI.ListResponse[source]

Lists all handles under domain.

Returns:

The response list

Return type:

ListResponse

async modify_by_index(body: ProvenaInterfaces.HandleAPI.ModifyRequest) ProvenaInterfaces.HandleAPI.Handle[source]

Modifies existing handle value at specified index

Parameters:

body (ModifyRequest) – The request to modify

Returns:

The handle object

Return type:

Handle

async remove_by_index(body: ProvenaInterfaces.HandleAPI.RemoveRequest) ProvenaInterfaces.HandleAPI.Handle[source]

Removes value at specified index

Parameters:

body (RemoveRequest) – The removal request

Returns:

The handle object

Return type:

Handle