Data Types
RecordDataFailure
Defines an interface that represents a failed "record data" result.
Members
errorCode ("server_error" | "not_supported" | "invalid_record_key" | "unacceptable_request" | "record_not_found" | "not_authorized" | "action_not_supported" | "not_logged_in" | "subscription_limit_reached" | "data_too_large" | "invalid_update_policy" | "invalid_delete_policy")
The error code for the failure.
errorMessage string
The error message for the failure.
errorReason? ("data_too_large" | "data_not_allowed" | "too_many_items")
The reason for the error.
reason? DenialReason
The reason why the request was denied authorization.
success false
RecordDataResult
The possible results of a record data request.
A RecordDataResult can be one of the following values:
GetDataFailure
Defines an interface that repeesents a failed "get data" result.
Members
errorCode ("server_error" | "not_supported" | "invalid_record_key" | "unacceptable_request" | "record_not_found" | "not_authorized" | "action_not_supported" | "not_logged_in" | "subscription_limit_reached" | "data_not_found")
The error code for the failure.
errorMessage string
The error message for the failure.
success false
GetDataResult
The possible results of a get data request.
A GetDataResult can be one of the following values:
GetDataSuccess
Defines an interface that represents a successful "get data" result.
Members
data any
The data that was stored.
deletePolicy UserPolicy
The delete policy that the data uses.
markers string[]
The list of markers that have been applied to the data.
publisherId string
The ID of the user that owns the record.
recordName string
The name of the record.
subjectId string
The ID of the user that sent the data.
success true
updatePolicy UserPolicy
The update policy that the data uses.
EraseDataFailure
Defines an interface that represents a failed result for an erase data request.
Members
errorCode ("server_error" | "invalid_record_key" | "unacceptable_request" | "record_not_found" | "not_authorized" | "action_not_supported" | "not_logged_in" | "subscription_limit_reached" | "data_not_found")
The error code for the failure.
errorMessage string
The error message for the failure.
success false
EraseDataResult
The possible results of an erase data request.
A EraseDataResult can be one of the following values:
ListDataResult
The possible results of a list data request.
A ListDataResult can be one of the following values:
DataRecordOptions
The options for data record actions.
Members
deletePolicy? RecordUserPolicyType
The policy that should be used for deleting the record.
endpoint? string
The HTTP endpoint that the request should interface with.
marker? string
The marker that should be applied to the record.
markers? string[]
The markers that should be applied to the record.
updatePolicy? RecordUserPolicyType
The policy that should be used for updating the record.
ListDataOptions
Defines an interface that represents the options for a list data action.
Members
endpoint? string
The HTTP endpoint that the request should interface with.
sort? ("ascending" | "descending")
The order that items should be sorted in.
- "ascending" means that the items should be sorted in alphebatically ascending order by address.
- "descending" means that the items should be sorted in alphebatically descending order by address.
UserPolicy
Defines a type that represents a policy that indicates which users are allowed to affect a record.
True indicates that any user can edit the record. An array of strings indicates the list of users that are allowed to edit the record.
A UserPolicy can be one of the following values:
true
string[]
null