540 lines
19 KiB
Go
540 lines
19 KiB
Go
// Code generated by zi2go from protocol.zi. DO NOT EDIT.
|
|
package main
|
|
|
|
type ChallengeResponse struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
Nonce string "json:\"nonce\""
|
|
ExpiresIn int64 "json:\"expires_in_seconds\""
|
|
}
|
|
|
|
type LoginRequest struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
ClientID string "json:\"client_id\""
|
|
PublicKey string "json:\"public_key,omitempty\""
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
Status string "json:\"status\""
|
|
AuthToken string "json:\"auth_token\""
|
|
ExpiresIn int64 "json:\"expires_in_seconds\""
|
|
ServerTime int64 "json:\"server_time,omitempty\""
|
|
AccountAlias string "json:\"account_alias,omitempty\""
|
|
ProfileIcon int "json:\"profile_icon,omitempty\""
|
|
}
|
|
|
|
type NodePeer struct {
|
|
Name string "json:\"name,omitempty\""
|
|
URL string "json:\"url\""
|
|
NodeID string "json:\"node_id,omitempty\""
|
|
Sync *NodeSyncPolicy "json:\"sync,omitempty\""
|
|
}
|
|
|
|
type NodeSyncPolicy struct {
|
|
Direction string "json:\"direction,omitempty\""
|
|
Apps []string "json:\"apps,omitempty\""
|
|
Collections []string "json:\"collections,omitempty\""
|
|
Spaces []string "json:\"spaces,omitempty\""
|
|
Data []string "json:\"data,omitempty\""
|
|
}
|
|
|
|
type NodeUsage struct {
|
|
RegisteredUsers int "json:\"registered_users\""
|
|
ActiveUsers30d int "json:\"active_users_30d\""
|
|
RegisteredClients int "json:\"registered_clients\""
|
|
ActiveClients30d int "json:\"active_clients_30d\""
|
|
ConnectedUsers int "json:\"connected_users\""
|
|
ConnectedWebSocketClients int "json:\"connected_websocket_clients\""
|
|
RecentActivityWindowDays int "json:\"recent_activity_window_days\""
|
|
WebSocketConnectionLimitPerUser int "json:\"websocket_connection_limit_per_user\""
|
|
}
|
|
|
|
type StorageBucketUsage struct {
|
|
LogicalBytes int64 "json:\"logical_bytes\""
|
|
Count int "json:\"count\""
|
|
}
|
|
|
|
type NodeStorageUsage struct {
|
|
DatabaseFileBytes int64 "json:\"database_file_bytes\""
|
|
DatabaseWALBytes int64 "json:\"database_wal_bytes,omitempty\""
|
|
DatabaseSHMBytes int64 "json:\"database_shm_bytes,omitempty\""
|
|
DatabaseTotalBytes int64 "json:\"database_total_bytes\""
|
|
SQLitePageBytes int64 "json:\"sqlite_page_bytes,omitempty\""
|
|
LogicalBytes int64 "json:\"logical_bytes\""
|
|
EncryptedRecordBytes int64 "json:\"encrypted_record_bytes\""
|
|
EncryptedPayloadBytes int64 "json:\"encrypted_payload_bytes\""
|
|
UnassignedBytes int64 "json:\"unassigned_bytes,omitempty\""
|
|
UnassignedEncryptedPayloads StorageBucketUsage "json:\"unassigned_encrypted_payloads,omitempty\""
|
|
Apps []AppStorageUsage "json:\"apps\""
|
|
}
|
|
|
|
type AppStorageUsage struct {
|
|
AppID string "json:\"app_id\""
|
|
DisplayName string "json:\"display_name,omitempty\""
|
|
LogicalBytes int64 "json:\"logical_bytes\""
|
|
RecordBytes int64 "json:\"record_bytes\""
|
|
RecordCount int "json:\"record_count\""
|
|
Collections []CollectionStorageUsage "json:\"collections\""
|
|
}
|
|
|
|
type CollectionStorageUsage struct {
|
|
CollectionPrefix string "json:\"collection_prefix,omitempty\""
|
|
Collection string "json:\"collection\""
|
|
LogicalBytes int64 "json:\"logical_bytes\""
|
|
RecordBytes int64 "json:\"record_bytes\""
|
|
RecordCount int "json:\"record_count\""
|
|
}
|
|
|
|
type CleanHabitDay struct {
|
|
HabitID string "json:\"habit_id\""
|
|
HabitName string "json:\"habit_name,omitempty\""
|
|
LocalDate int "json:\"local_date\""
|
|
Completed bool "json:\"completed\""
|
|
Count int "json:\"count\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
}
|
|
|
|
type EncryptedRecord struct {
|
|
Collection string "json:\"collection\""
|
|
ID string "json:\"id\""
|
|
KeyID string "json:\"key_id,omitempty\""
|
|
Nonce string "json:\"nonce,omitempty\""
|
|
Ciphertext string "json:\"ciphertext,omitempty\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
DeletedAt int64 "json:\"deleted_at,omitempty\""
|
|
ContentHash string "json:\"content_hash,omitempty\""
|
|
SchemaVersion int "json:\"schema_version,omitempty\""
|
|
ParentID string "json:\"parent_id,omitempty\""
|
|
}
|
|
|
|
type SyncResult struct {
|
|
MeditationLogs int "json:\"meditation_logs\""
|
|
Habits int "json:\"habits\""
|
|
HabitDays int "json:\"habit_days\""
|
|
Sessions int "json:\"sessions\""
|
|
SocialCache int "json:\"social_cache\""
|
|
EncryptedRecords int "json:\"encrypted_records,omitempty\""
|
|
}
|
|
|
|
type SyncDiagnostics struct {
|
|
SnapshotReason string "json:\"snapshot_reason,omitempty\""
|
|
RequestedSinceServerVersion int64 "json:\"requested_since_server_version\""
|
|
EffectiveSinceServerVersion int64 "json:\"effective_since_server_version\""
|
|
ClientClock int64 "json:\"client_clock\""
|
|
CompactedThroughVersion int64 "json:\"compacted_through_version,omitempty\""
|
|
HasLocalChanges bool "json:\"has_local_changes\""
|
|
AcceptedOps int "json:\"accepted_ops\""
|
|
RemoteOps int "json:\"remote_ops\""
|
|
AppliedInput SyncResult "json:\"applied_input\""
|
|
ReturnedChanges SyncResult "json:\"returned_changes\""
|
|
}
|
|
|
|
type SyncAuditEntry struct {
|
|
ID int64 "json:\"id,omitempty\""
|
|
UserIDHash string "json:\"user_id_hash,omitempty\""
|
|
ClientID string "json:\"client_id,omitempty\""
|
|
AppID string "json:\"app_id,omitempty\""
|
|
ProtocolVersion int "json:\"protocol_version\""
|
|
SinceServerVersion int64 "json:\"since_server_version\""
|
|
ClientClock int64 "json:\"client_clock\""
|
|
ServerVersion int64 "json:\"server_version\""
|
|
Applied SyncResult "json:\"applied\""
|
|
RemoteOps int "json:\"remote_ops\""
|
|
FullSnapshotRequired bool "json:\"full_snapshot_required\""
|
|
SnapshotReason string "json:\"snapshot_reason,omitempty\""
|
|
EncryptedPayload bool "json:\"encrypted_payload\""
|
|
EncryptedPayloadBytes int64 "json:\"encrypted_payload_bytes,omitempty\""
|
|
CreatedAt string "json:\"created_at,omitempty\""
|
|
}
|
|
|
|
type DeleteRequest struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
}
|
|
|
|
type AliasRequest struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
Alias string "json:\"alias\""
|
|
}
|
|
|
|
type AliasResponse struct {
|
|
Status string "json:\"status\""
|
|
Alias string "json:\"alias\""
|
|
}
|
|
|
|
type ProfileIconRequest struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
ProfileIcon int "json:\"profile_icon\""
|
|
}
|
|
|
|
type ProfileIconResponse struct {
|
|
Status string "json:\"status\""
|
|
ProfileIcon int "json:\"profile_icon\""
|
|
}
|
|
|
|
type FriendRequestCreateRequest struct {
|
|
Target string "json:\"target\""
|
|
}
|
|
|
|
type FriendRequestActionRequest struct {
|
|
UserIDHash string "json:\"user_id_hash,omitempty\""
|
|
}
|
|
|
|
type FriendRequest struct {
|
|
ID string "json:\"id\""
|
|
RequesterUserID string "json:\"requester_user_id_hash\""
|
|
RequesterAlias string "json:\"requester_alias,omitempty\""
|
|
TargetUserID string "json:\"target_user_id_hash\""
|
|
TargetAlias string "json:\"target_alias,omitempty\""
|
|
Status string "json:\"status\""
|
|
CreatedAt string "json:\"created_at\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
}
|
|
|
|
type FriendRequestResponse struct {
|
|
Status string "json:\"status\""
|
|
Request FriendRequest "json:\"request\""
|
|
}
|
|
|
|
type FriendRequestsResponse struct {
|
|
Incoming []FriendRequest "json:\"incoming\""
|
|
Outgoing []FriendRequest "json:\"outgoing\""
|
|
}
|
|
|
|
type FriendsResponse struct {
|
|
Friends []Friend "json:\"friends\""
|
|
}
|
|
|
|
type ProfileStatsRequest struct {
|
|
App string "json:\"app\""
|
|
Metrics []ProfileMetric "json:\"metrics\""
|
|
}
|
|
|
|
type ProfileStatsResponse struct {
|
|
Status string "json:\"status\""
|
|
Applied int "json:\"applied\""
|
|
}
|
|
|
|
type FriendStatsResponse struct {
|
|
Rows []FriendStatRow "json:\"rows\""
|
|
}
|
|
|
|
type AppCollection struct {
|
|
AppID string "json:\"app_id,omitempty\""
|
|
CollectionPrefix string "json:\"collection_prefix\""
|
|
Visibility string "json:\"visibility\""
|
|
SchemaVersion int "json:\"schema_version,omitempty\""
|
|
Description string "json:\"description,omitempty\""
|
|
CreatedAt string "json:\"created_at,omitempty\""
|
|
}
|
|
|
|
type AppFeature struct {
|
|
ID string "json:\"id\""
|
|
Collections []string "json:\"collections,omitempty\""
|
|
RequiresSignedTx bool "json:\"requires_signed_tx,omitempty\""
|
|
Description string "json:\"description,omitempty\""
|
|
}
|
|
|
|
type LegacyProtocol struct {
|
|
Name string "json:\"name\""
|
|
Version int "json:\"version,omitempty\""
|
|
Status string "json:\"status\""
|
|
ValidUntil string "json:\"valid_until\""
|
|
}
|
|
|
|
type AppGrant struct {
|
|
ID string "json:\"id\""
|
|
UserIDHash string "json:\"user_id_hash,omitempty\""
|
|
SourceAppID string "json:\"source_app_id\""
|
|
TargetAppID string "json:\"target_app_id\""
|
|
CollectionPrefix string "json:\"collection_prefix\""
|
|
Permission string "json:\"permission\""
|
|
Status string "json:\"status\""
|
|
CreatedAt string "json:\"created_at,omitempty\""
|
|
UpdatedAt string "json:\"updated_at,omitempty\""
|
|
RevokedAt string "json:\"revoked_at,omitempty\""
|
|
}
|
|
|
|
type AppGrantRequest struct {
|
|
SourceAppID string "json:\"source_app_id\""
|
|
TargetAppID string "json:\"target_app_id\""
|
|
CollectionPrefix string "json:\"collection_prefix\""
|
|
Permission string "json:\"permission,omitempty\""
|
|
}
|
|
|
|
type AppGrantsResponse struct {
|
|
Grants []AppGrant "json:\"grants\""
|
|
}
|
|
|
|
type AppRecordsResponse struct {
|
|
Records []EncryptedRecord "json:\"records\""
|
|
}
|
|
|
|
type TokenProduct struct {
|
|
ProductID string "json:\"product_id\""
|
|
TokenUnits int64 "json:\"token_units\""
|
|
MoneroAtomicAmount int64 "json:\"monero_atomic_amount,omitempty\""
|
|
}
|
|
|
|
type TokenAsset struct {
|
|
IssuerID string "json:\"issuer_id\""
|
|
AssetID string "json:\"asset_id\""
|
|
DisplayName string "json:\"display_name\""
|
|
Decimals int "json:\"decimals\""
|
|
Status string "json:\"status\""
|
|
}
|
|
|
|
type TokenAssetsResponse struct {
|
|
Assets []TokenAsset "json:\"assets\""
|
|
}
|
|
|
|
type TokenProductsResponse struct {
|
|
Products []TokenProduct "json:\"products\""
|
|
}
|
|
|
|
type TokenIssuerResponse struct {
|
|
IssuerID string "json:\"issuer_id\""
|
|
PublicKey string "json:\"public_key\""
|
|
Algorithm string "json:\"algorithm\""
|
|
Status string "json:\"status\""
|
|
}
|
|
|
|
type TokenBalanceResponse struct {
|
|
AccountID string "json:\"account_id\""
|
|
AssetID string "json:\"asset_id\""
|
|
AppID string "json:\"app_id,omitempty\""
|
|
Balance int64 "json:\"balance\""
|
|
}
|
|
|
|
type TokenLedgerResponse struct {
|
|
Events []TokenReceipt "json:\"events\""
|
|
}
|
|
|
|
type TokenReceipt struct {
|
|
ReceiptID string "json:\"receipt_id\""
|
|
IssuerID string "json:\"issuer_id\""
|
|
AssetID string "json:\"asset_id\""
|
|
AccountID string "json:\"account_id\""
|
|
AppID string "json:\"app_id,omitempty\""
|
|
EventType string "json:\"event_type\""
|
|
AmountDelta int64 "json:\"amount_delta\""
|
|
LedgerSeq int64 "json:\"ledger_seq\""
|
|
PreviousHash string "json:\"previous_hash\""
|
|
EventHash string "json:\"event_hash\""
|
|
CreatedAt string "json:\"created_at\""
|
|
SourceType string "json:\"source_type\""
|
|
SourceRef string "json:\"source_ref\""
|
|
Signature string "json:\"signature\""
|
|
}
|
|
|
|
type TokenSpendRequest struct {
|
|
AppID string "json:\"app_id\""
|
|
AssetID string "json:\"asset_id\""
|
|
Amount int64 "json:\"amount\""
|
|
Action string "json:\"action\""
|
|
IdempotencyKey string "json:\"idempotency_key\""
|
|
Metadata string "json:\"metadata,omitempty\""
|
|
}
|
|
|
|
type TokenSpendResponse struct {
|
|
Status string "json:\"status\""
|
|
Balance int64 "json:\"balance\""
|
|
Receipt TokenReceipt "json:\"receipt\""
|
|
}
|
|
|
|
type GooglePurchaseVerifyRequest struct {
|
|
AppID string "json:\"app_id\""
|
|
PackageName string "json:\"package_name\""
|
|
ProductID string "json:\"product_id\""
|
|
PurchaseToken string "json:\"purchase_token\""
|
|
}
|
|
|
|
type TokenPurchaseResponse struct {
|
|
Status string "json:\"status\""
|
|
Balance int64 "json:\"balance\""
|
|
Receipt TokenReceipt "json:\"receipt\""
|
|
}
|
|
|
|
type MoneroInvoiceRequest struct {
|
|
AppID string "json:\"app_id\""
|
|
ProductID string "json:\"product_id\""
|
|
}
|
|
|
|
type MoneroInvoiceResponse struct {
|
|
ID string "json:\"id\""
|
|
AppID string "json:\"app_id,omitempty\""
|
|
Status string "json:\"status\""
|
|
ProductID string "json:\"product_id\""
|
|
AssetID string "json:\"asset_id\""
|
|
TokenUnits int64 "json:\"token_units\""
|
|
AtomicAmount int64 "json:\"atomic_amount\""
|
|
Address string "json:\"address\""
|
|
AddressIndex int "json:\"address_index,omitempty\""
|
|
PaymentID string "json:\"payment_id,omitempty\""
|
|
ExpiresAt string "json:\"expires_at\""
|
|
Receipt *TokenReceipt "json:\"receipt,omitempty\""
|
|
}
|
|
|
|
type MoneroAccountAddress struct {
|
|
AccountID string "json:\"account_id\""
|
|
Alias string "json:\"alias,omitempty\""
|
|
ProfileIcon int "json:\"profile_icon,omitempty\""
|
|
Address string "json:\"address\""
|
|
AccountIndex int "json:\"-\""
|
|
AddressIndex int "json:\"-\""
|
|
CreatedAt string "json:\"created_at\""
|
|
}
|
|
|
|
type MoneroRate struct {
|
|
AtomicAmount int64 "json:\"xmr_atomic_units\""
|
|
TokenUnits int64 "json:\"token_units\""
|
|
}
|
|
|
|
type MoneroAddressResponse struct {
|
|
AccountID string "json:\"account_id\""
|
|
Alias string "json:\"alias,omitempty\""
|
|
ProfileIcon int "json:\"profile_icon,omitempty\""
|
|
AssetID string "json:\"asset_id\""
|
|
Address string "json:\"address\""
|
|
URI string "json:\"uri\""
|
|
Network string "json:\"network\""
|
|
ConfirmationsRequired int64 "json:\"confirmations_required\""
|
|
MinimumAtomicAmount int64 "json:\"minimum_atomic_amount\""
|
|
Rate MoneroRate "json:\"rate\""
|
|
}
|
|
|
|
type MoneroDeposit struct {
|
|
TxID string "json:\"tx_id\""
|
|
AccountID string "json:\"account_id,omitempty\""
|
|
AmountAtomic int64 "json:\"amount_atomic\""
|
|
TokenUnits int64 "json:\"token_units,omitempty\""
|
|
BlockHeight int64 "json:\"block_height,omitempty\""
|
|
Confirmations int64 "json:\"confirmations\""
|
|
Status string "json:\"status\""
|
|
FirstSeenAt string "json:\"first_seen_at\""
|
|
ConfirmedAt string "json:\"confirmed_at,omitempty\""
|
|
CreditedAt string "json:\"credited_at,omitempty\""
|
|
Receipt *TokenReceipt "json:\"receipt,omitempty\""
|
|
AccountIndex int "json:\"-\""
|
|
AddressIndex int "json:\"-\""
|
|
UnlockTime int64 "json:\"-\""
|
|
Locked bool "json:\"-\""
|
|
DoubleSpendSeen bool "json:\"-\""
|
|
RateAtomic int64 "json:\"-\""
|
|
RateTokenUnits int64 "json:\"-\""
|
|
ReceiptID string "json:\"-\""
|
|
}
|
|
|
|
type MoneroDepositsResponse struct {
|
|
Deposits []MoneroDeposit "json:\"deposits\""
|
|
}
|
|
|
|
type TokenCheckpoint struct {
|
|
LedgerSeq int64 "json:\"ledger_seq\""
|
|
IssuerID string "json:\"issuer_id\""
|
|
AssetID string "json:\"asset_id\""
|
|
LedgerRoot string "json:\"ledger_root\""
|
|
Signature string "json:\"signature\""
|
|
CreatedAt string "json:\"created_at\""
|
|
}
|
|
|
|
type Friend struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
Alias string "json:\"alias,omitempty\""
|
|
ProfileIcon int "json:\"profile_icon,omitempty\""
|
|
CreatedAt string "json:\"created_at\""
|
|
}
|
|
|
|
type ProfileMetric struct {
|
|
Practice string "json:\"practice\""
|
|
Metric string "json:\"metric\""
|
|
Value float64 "json:\"value\""
|
|
Label string "json:\"label,omitempty\""
|
|
LocalDate int "json:\"local_date,omitempty\""
|
|
}
|
|
|
|
type FriendStatRow struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
Alias string "json:\"alias,omitempty\""
|
|
ProfileIcon int "json:\"profile_icon,omitempty\""
|
|
App string "json:\"app\""
|
|
Practice string "json:\"practice\""
|
|
Metric string "json:\"metric\""
|
|
Value float64 "json:\"value\""
|
|
Label string "json:\"label,omitempty\""
|
|
LocalDate int "json:\"local_date,omitempty\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
}
|
|
|
|
type DeleteWithKeyRequest struct {
|
|
UserIDHash string "json:\"user_id_hash\""
|
|
ExportedKey string "json:\"exported_key,omitempty\""
|
|
}
|
|
|
|
type MeditationLog struct {
|
|
ID string "json:\"id\""
|
|
SessionID string "json:\"session_id\""
|
|
DurationSeconds int "json:\"duration_seconds,omitempty\""
|
|
Duration int "json:\"duration,omitempty\""
|
|
CompletedAt string "json:\"completed_at,omitempty\""
|
|
Timestamp string "json:\"timestamp,omitempty\""
|
|
}
|
|
|
|
type Habit struct {
|
|
ID string "json:\"id\""
|
|
Name string "json:\"name\""
|
|
ColorR int "json:\"color_r\""
|
|
ColorG int "json:\"color_g\""
|
|
ColorB int "json:\"color_b\""
|
|
SyncMode int "json:\"sync_mode\""
|
|
SyncActivity int "json:\"sync_activity\""
|
|
CounterEnabled int "json:\"counter_enabled\""
|
|
SortOrder int "json:\"sort_order\""
|
|
DeletedAt int64 "json:\"deleted_at\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
}
|
|
|
|
type HabitDay struct {
|
|
HabitID string "json:\"habit_id\""
|
|
LocalDate int "json:\"local_date\""
|
|
Completed bool "json:\"completed\""
|
|
Count int "json:\"count\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
}
|
|
|
|
type Session struct {
|
|
ID string "json:\"id\""
|
|
StartedAt string "json:\"started_at\""
|
|
LocalDate int "json:\"local_date\""
|
|
Topic string "json:\"topic\""
|
|
Activity int "json:\"activity\""
|
|
Source string "json:\"source\""
|
|
RoundsHash string "json:\"rounds_hash\""
|
|
MoodBefore int "json:\"mood_before\""
|
|
MoodAfter int "json:\"mood_after\""
|
|
Energy int "json:\"energy\""
|
|
Stress int "json:\"stress\""
|
|
Note string "json:\"note\""
|
|
Tags string "json:\"tags\""
|
|
DeletedAt int64 "json:\"deleted_at\""
|
|
UpdatedAt string "json:\"updated_at\""
|
|
Rounds []SessionRound "json:\"rounds,omitempty\""
|
|
}
|
|
|
|
type SessionRound struct {
|
|
RoundIndex int "json:\"round_index\""
|
|
Breaths int "json:\"breaths\""
|
|
HoldSeconds int "json:\"hold_seconds\""
|
|
}
|
|
|
|
const ProfileIconNone = 0
|
|
const ProfileIconBird = 1
|
|
const ProfileIconBowl = 2
|
|
const ProfileIconCactus = 3
|
|
const ProfileIconHeart = 4
|
|
const ProfileIconIncense = 5
|
|
const ProfileIconLotus = 6
|
|
const ProfileIconTree1 = 7
|
|
const ProfileIconTree2 = 8
|
|
const ProfileIconTree3 = 9
|
|
const ProfileIconTree4 = 10
|
|
const ProfileIconTree5 = 11
|